]> git.saurik.com Git - bison.git/blob - ChangeLog
878e5404e5011658361eff52131c2ba5ade25a8a
[bison.git] / ChangeLog
1 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
2
3 Fix "make distcheck".
4 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
5 of just calc.stamp.
6
7 2009-08-01 Joel E. Denny <jdenny@clemson.edu>
8
9 Pacify "gcc -Wunused" for the input function from Flex.
10 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
11 and later.
12 * src/scan-code.l: Add "%option noinput", which I cannot find in
13 the Flex manual, but which Flex has supported since at least as
14 far back as 2.5.4. However, if any of our developers still use
15 Flex 2.5.4, they'll need to stop configuring with
16 --enable-gcc-warnings because "%option noinput" didn't work
17 correctly until Flex 2.5.6.
18 * src/scan-gram.l: Likewise.
19 * src/scan-skel.l: Likewise.
20
21 2009-07-31 Alex Rozenman <rozenman@gmail.com>
22
23 Fix --enable-gcc-warnings problems.
24 * src/reader.c: Adjust variable names.
25 * src/scan-code.l: Fix prototypes and adjust names.
26 * src/named-ref.c: Remove redundant "if".
27
28 2009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
29
30 Fix a --enable-gcc-warnings problem.
31 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
32 variable.
33
34 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
35
36 Warn about character literals not of length one.
37 * NEWS (2.5): Document.
38 * src/scan-gram.l (INITIAL): Remove comment that we don't check
39 the length.
40 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
41 * tests/input.at (Bad character literals): New test group.
42
43 2009-07-24 Alex Rozenman <rozenman@gmail.com>
44
45 Fix some memory leaks.
46 * src/named-ref.c: Add a pointer check (named_ref_free).
47 * src/scan-code.l: New function (variant_table_free). Called in
48 code_scanner_free.
49 * src/symlist.c: Call to named_ref_free (symbol_list_free).
50
51 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
52
53 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
54
55 2009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
56
57 Some M4 cleanup in the testsuite.
58 Suggested by Eric Blake at
59 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
60 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
61 complicate the code by distinguishing between a missing value
62 and an empty string value for an optional argument. This fix is
63 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
64 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
65 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
66 arguments are not needed because of the following changes.
67 Fix stale comments.
68 Bison developers should use GNU M4 and should not use
69 POSIXLY_CORRECT when building the test suite, so do not
70 complicate the code by avoiding $10 and above.
71 Do not quote an empty string value for an optional argument, and
72 do not distinguish between a missing value and an empty string
73 value.
74
75 2009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
76
77 Revert unnecessary column realignment in --help output.
78 Reported by Akim Demaille at
79 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
80 * src/getargs.c (usage): Here.
81
82 2009-07-04 Alex Rozenman <rozenman@gmail.com>
83
84 Alphabetical order in src/local.mk.
85 * src/local.mk: Adjust.
86
87 2009-07-04 Alex Rozenman <rozenman@gmail.com>
88
89 Style changes and factoring.
90 * src/named-ref.h: Add comments.
91 * src/parse-gram.y: Readability and style changes.
92 * src/reader.c: Factoring: assign_named_ref function.
93 * src/scan-code.l: Factoring and style changes. Rename
94 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
95 Use "unsigned" type for variant index. Improve readablity.
96 * src/scan-gram.l: Change error messages and add comments.
97 * src/symlist.h: symbol_list_null: New function decl.
98 * src/symlist.c: symbol_list_null: Implement here.
99 * tests/named-refs.at: Adjust for new error messages.
100
101 2009-06-29 Eric Blake <ebb9@byu.net>
102
103 scan-code: avoid compiler warnings
104 * src/scan-code.l (parse_named_ref): Use correct specifiers.
105
106 2009-06-29 Akim Demaille <demaille@gostai.com>
107
108 build: avoid concurrent extraction of calc++.
109 * examples/calc++/Makefile.am (calc.stamp): New.
110 Depend on it to create the sources of calc++ so that concurrent
111 builds don't launch several "extexi" in parallel.
112 Not only this is inefficient, this also builds incorrect sources
113 with several extractions mixed together.
114
115 2009-06-29 Akim Demaille <demaille@gostai.com>
116
117 parse.error: fix.
118 * data/bison.m4: Move code related to specific variables after the
119 definition of the variable-maintaining macros so that we don't
120 "invoke" b4_percent_define_check_values before it is defined.
121
122 2009-06-29 Akim Demaille <demaille@gostai.com>
123
124 variables: parse.error
125
126 Implement, document, and test the replacement of %error-verbose
127 by %define parse.error "verbose".
128 * data/bison.m4 (b4_error_verbose_if): Reimplement to track the
129 values of the parse.error variable.
130 Make "simple" its default value.
131 Check the valid values.
132 * src/parse-gram.y: Use %define parse.error.
133 (PERCENT_ERROR_VERBOSE): New token.
134 Support it.
135 * src/scan-gram.l: Support %error-verbose.
136
137 * doc/bison.texinfo (Decl Summary): Replace the documentation of
138 %define error-verbose by that of %define parse.error.
139 * NEWS: Document it.
140
141 * tests/actions.at, tests/calc.at: Use parse.error instead of
142 %error-verbose.
143
144 2009-06-27 Alex Rozenman <rozenman@gmail.com>
145
146 Implement support for named symbol references.
147 * src/parse-gram.y: Add new syntax (named_ref.opt).
148 * src/reader.c: Store named refs in symbol lists.
149 * src/reader.h: New argument for symbol_append and
150 action_append functions.
151 * src/scan-code.h: Add new field (named_ref) into
152 code_props data structure. Keeps named ref of midrule
153 actions.
154 * src/scan-code.l: Support for named refs in semantic
155 action code. New function 'parse_named_ref'.
156 * src/scan-gram.l: Support bracketed id.
157 * src/symlist.c: Store named refs in symbol lists.
158 * src/symlist.h: New field in symbol list: named_ref.
159 * src/named-ref.h: New file, a struct for named_ref.
160 * src/named-ref.cp: New file, named_ref_new function.
161 * src/local.mk: Add two new files.
162 * tests/testsuite.at: Include new test group:
163 * tests/named-refs.at: this new file.
164
165 2009-06-25 Akim Demaille <demaille@gostai.com>
166
167 hash: check insertion for memory exhaustion.
168 * src/uniqstr.c (uniqstr_new): New.
169
170 2009-06-24 Akim Demaille <demaille@gostai.com>
171
172 variables: rename namespace as api.namespace.
173 Discussed in
174 http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00033.html
175
176 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
177 New.
178 (b4_percent_define_use): New.
179 Use it where applicable.
180 * data/c++.m4: Replace uses of the variable "namespace" by
181 "api.namespace".
182 Default the latter to the former.
183 * doc/bison.texinfo (Decl Summary): Document "namespace" as
184 obsolete.
185 Document api.namespace.
186 Use @samp to document %define uses, keep @code for identifiers.
187 * NEWS: Likewise.
188 * tests/c++.at, tests/input.at: Test api.namespace instead of
189 namespace. (The tests passed with namespace.)
190
191 2009-06-11 Akim Demaille <demaille@gostai.com>
192
193 style changes.
194 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
195 * src/print-xml.c: Style changes.
196 * tests/conflicts.at: Comment changes.
197
198 2009-06-11 Akim Demaille <demaille@gostai.com>
199
200 xml: beware of user strings used to give a %prec to rules.
201 * tests/conflicts.at (%prec with user strings): New.
202 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
203 XML output.
204
205 2009-06-11 Akim Demaille <demaille@gostai.com>
206
207 hash: check insertion for memory exhaustion.
208 * src/muscle-tab.c (muscle_insert, muscle_grow)
209 * src/state.c (state_hash_insert): Check the return value of
210 hash_insert.
211
212 2009-06-11 Akim Demaille <demaille@gostai.com>
213
214 tests: honor TESTSUITEFLAGS in every check target.
215 * tests/local.mk (RUN_TESTSUITE): New.
216 (check-local, installcheck-local, maintainer-check-g++)
217 (maintainer-check-posix, maintainer-check-valgrind): Use it.
218
219 2009-06-10 Akim Demaille <demaille@gostai.com>
220
221 deterministic test suite.
222 Some consistency checks on symbols are performed after all the
223 symbols were read, by an iteration over the symbol table. This
224 traversal is nondeterministic, which can be a problem for test
225 cases.
226 Avoid this.
227 Addresses another form of nondeterminism reported by Joel E. Denny.
228 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
229
230 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
231 test in two.
232 Use different file names for the three tests to make the
233 maintenance easier.
234
235 2009-06-10 Akim Demaille <demaille@gostai.com>
236
237 gnulib: update.
238 * gnulib: Update to latest.
239 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
240 * m4/.gitignore: Regen.
241 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
242 Call xalloc_die on hash_insert failures.
243 Requested by the new __warn_unused_result__ attribute of
244 hash_insert.
245
246 2009-06-10 Akim Demaille <demaille@gostai.com>
247
248 deterministic user-token-number redeclaration errors.
249 Address nondeterminism reported by Joel E. Denny.
250 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
251
252 * src/uniqstr.h: Comment changes.
253 * src/location.h (boundary_cmp, location_cmp): New.
254 * src/symtab.c (user_token_number_redeclaration): New.
255 (symbol_translation): Use it.
256 * tests/input.at (Numbered tokens): Adjust the expected output.
257
258 2009-05-25 Akim Demaille <demaille@gostai.com>
259
260 build: avoid ignored errors.
261 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Don't generate ignored
262 errors, they pollute the output.
263
264 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
265
266 Convert multiple variable definition warnings to complaints.
267 * NEWS (2.5): Add a new entry for that change.
268 * doc/bison.texinfo (Decl Summary): Update %define entry.
269 (Bison Options): Update -D/--define/-F/--force-define entry.
270 * src/muscle-tab.c (muscle_percent_define_insert): Implement.
271 * src/muscle-tab.h (muscle_percent_define_insert): Update
272 comments.
273 * tests/input.at (`%define errors'): Update.
274 (`%define, --define, --force-define'): Update.
275
276 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
277
278 -F/--force-define and relative %define/-D/--define priorities.
279 * NEWS (2.5): Add documentation to -D/--define entry.
280 * build-aux/cross-options.pl: Hard-code association of
281 --force-define with %define.
282 * doc/bison.texinfo (Decl Summary): In %define entry,
283 cross-reference command-line options.
284 (Bison Options): Add documentation to -D/--define entry.
285 (Option Cross Key): Widen column for --force-define row.
286 * src/getargs.c (usage): Document -F/--force-define. Realign
287 options in output.
288 (short_options, long_options, getargs): Parse -F/--force-define,
289 and update muscle_percent_define_insert invocations.
290 * src/muscle-tab.h (muscle_percent_define_how): New enum type.
291 (muscle_percent_define_insert): Add argument with that type.
292 * src/muscle-tab.c (muscle_percent_define_insert): Implement
293 -F/--force-define behavior and priorities.
294 (muscle_percent_define_ensure): Update
295 muscle_percent_define_insert invocation.
296 * src/parse-gram.y (prologue_declaration): Update
297 muscle_percent_define_insert invocations.
298 * tests/input.at (`%define, --define'): Rename to...
299 (`%define, --define, --force-define'): ... this and extend.
300
301 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
302
303 Update some comments to make sense for -D.
304 * data/bison.m4 (b4_check_user_names): In header comments, say
305 "user occurrence" instead of "grammar occurrence".
306 * src/muscle-tab.h (muscle_percent_define_insert): Likewise.
307 (muscle_percent_code_grow): Likewise just for consistency.
308
309 2009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
310
311 * data/c++.m4 (b4_namespace_close): Simplify slightly.
312
313 2009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
314
315 Handle a trailing `:' in a user-supplied C++ namespace better.
316 * data/c++.m4 (b4_namespace_close): Don't let it be printed
317 among the closing braces here. This fix might make the
318 generated code easier to debug, but otherwise it should be
319 insignificant because a trailing `:' is a C++ error already.
320
321 2009-05-19 Akim Demaille <demaille@gostai.com>
322
323 remove useless variable.
324 * src/getargs.c (skeleton_arg): Remove now useless variable.
325 Should help the compiler see that this printf-like call is sane.
326
327 2009-05-15 Akim Demaille <demaille@gostai.com>
328
329 Rename token.prefix as api.tokens.prefix.
330 Discussed here.
331 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00024.html.
332
333 * NEWS, data/bison.m4, data/c.m4, data/java.m4, doc/bison.texinfo,
334 * tests/c++.at, tests/calc.at, tests/java.at, tests/local.at
335 (token.prefix): Rename as...
336 (api.tokens.prefix): this.
337
338 2009-05-11 Akim Demaille <demaille@gostai.com>
339
340 doc: use C++ headers.
341 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
342 headers.
343
344 2009-05-11 Akim Demaille <demaille@gostai.com>
345
346 doc: token.prefix
347 * doc/bison.simple (Decl Summary): Document token.prefix.
348 (Calc++ Parser): Various fixes.
349 Formatting changes.
350 Use token.prefix.
351 Introduce a macro TOKEN to shorten the code and make it more
352 readable.
353 (Calc++ Scanner): Adjust.
354 * NEWS (Variable token.prefix): New.
355
356 2009-05-04 Akim Demaille <demaille@gostai.com>
357
358 bison: catch bad symbol names.
359 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
360 * tests/input.at: Adjust.
361
362 2009-05-04 Akim Demaille <demaille@gostai.com>
363
364 identifiers: dashes are letters.
365 Dashes can now start identifiers (symbols and directives).
366
367 * src/scan-gram.l ({letter}): Add dash.
368 ({id}): Remove it.
369 * tests/input.at (Symbols): Adjust.
370 Remove stray comment.
371 * tests/regression.at (Invalid inputs): Adjust error message.
372 * doc/bison.texinfo (Symbols): Update.
373
374 2009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
375
376 Declare %code to be a permanent feature.
377 * NEWS (2.4.2): Here.
378 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
379 experimental.
380 (Decl Summary): Likewise.
381
382 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
383
384 Convert underscores to dashes in some %define variable names.
385 For now, just api.push-pull and lr.keep-unreachable-states.
386 Maintain old names for backward compatibility.
387 * NEWS (2.5): Document.
388 * data/c.m4 (b4_identification): Update comment.
389 * data/yacc.c: Update access.
390 * doc/bison.texinfo: Update.
391 * etc/bench.pl.in (bench_push_parser): Update use.
392 * src/files.c (tr): Move to...
393 * src/getargs.c, src/getargs.h (tr): ... here because I can't
394 think of a better place to expose it. My logic is that, for all
395 uses of tr so far, command-line arguments can be involved, and
396 getargs.h is already included.
397 * src/main.c (main): Update access.
398 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
399 variable names to new variable names before assigning value.
400 * src/reader.c (reader): Update setting default.
401 * tests/calc.at: Update uses.
402 * tests/conflicts.at (Unreachable States After Conflict
403 Resolution): Update use.
404 * tests/input.at (%define enum variables): Update use.
405 (%define backward compatibility): New test group.
406 * tests/push.at: Update uses.
407 * tests/reduce.at: Update uses.
408 * tests/torture.at: Update uses.
409
410 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
411
412 Set all front-end %define defaults in one place.
413 * src/main.c (main): Move lr.keep_unreachable_states default...
414 * src/reader.c (reader): ... to here.
415
416 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
417
418 Rename lr.default_reductions to lr.default-reductions.
419 * NEWS (2.5): Here.
420 * doc/bison.texinfo: Here.
421 * src/lalr.c (initialize_LA): Here.
422 * src/print.c (print_reductions): Here.
423 * src/reader.c (reader): Here.
424 * src/tables.c (action_row): Here.
425 * tests/input.at (%define enum variables): Here.
426 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
427
428 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
429
430 Pacify ./configure --enable-gcc-warnings.
431 * tests/input.at (Symbols): Prototype yyerror and yylex.
432
433 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
434
435 Document how `%define "var" "value"' is not M4-friendly.
436 * src/parse-gram.y (variable): In comments here.
437
438 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
439
440 Clean up recent patches a little.
441 Reported by Akim Demaille.
442 * doc/bison.texinfo (Understanding): Fix typos.
443 * src/print.c (print_reductions): Don't use negated variable.
444
445 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
446
447 List accepted values for a %define enum variable with an invalid value.
448 Suggested by Akim Demaille at
449 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
450 * data/bison.m4 (_b4_percent_define_check_values): Implement.
451 * src/muscle-tab.c (muscle_percent_define_check_values): Implement.
452 * tests/input.at (%define lr.default_reductions invalid values): Merge
453 into...
454 (%define enum variables): ... here, and update output.
455
456 2009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
457
458 Rename "default rule" to "default reduction".
459 This includes changing variable names in code, changing
460 comments, and renaming %define lr.default_rules to %define
461 lr.default_reductions.
462 * NEWS (2.5): Update IELR documentation.
463 * data/bison.m4 (b4_integral_parser_tables_map): Adjust YYDEFACT
464 documentation.
465 * data/glr.c, data/lalr1.java: Sync copyright dates.
466 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
467 and lr.type documentation. Make some other wording
468 improvements.
469 (Glossary): Adjust cross-references and Default Reduction
470 definition.
471 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
472 Remove a confusing comment pointed out by Akim Demaille.
473 (initialize_LA): Adjust code.
474 * src/print-xml.c (print_reductions): Adjust code.
475 * src/print.c (print_reductions): Adjust code.
476 * src/reader.c (reader): Adjust code.
477 * src/tables.c (action_row): Adjust code.
478 (token_actions): Adjust code.
479 * src/tables.h: Adjust YYDEFACT documentation.
480 * tests/input.at (%define lr.default_rules invalid values):
481 Rename test group to...
482 (%define lr.default_reductions invalid values): ... this, and
483 update grammar file and expected output.
484 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
485 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
486
487 2009-04-21 Akim Demaille <demaille@gostai.com>
488
489 tests: check the use of dashes and periods in symbols.
490 * tests/input.at (Symbol): New test group.
491
492 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
493
494 Document %define lr.type and lr.default_rules.
495 * NEWS (2.5): Add an entry.
496 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
497 besides just LALR(1) and GLR(1).
498 * doc/bison.texinfo (Introduction): Likewise.
499 (Language and Grammar): Bison is no longer limited to LALR(1)
500 restrictions.
501 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
502 when trying to distinguish from GLR. Talk about LR(1) grammars
503 rather than LALR(1) grammars.
504 (Decl Summary): In %define api.push_pull entry, say it applies
505 to deterministic parsers in C rather than LALR(1) parsers in C.
506 Add lr.default_rules entry.
507 Add lr.type entry.
508 (Mystery Conflicts): Bison is no longer limited to LALR(1)
509 restrictions.
510 (Generalized LR Parsing): Same changes as for the previous GLR
511 section.
512 (Memory Management): Say deterministic rather than LALR(1).
513 (Understanding): Correct some bison output.
514 Index discussion of "accepting state".
515 Say deterministic rather than LALR(1).
516 (Bison Options): In --yacc entry, say deterministic rather than
517 LALR(1).
518 In --report, --graph, and --xml entries, just don't mention
519 LALR(1).
520 (C++ Parsers): Say deterministic rather than LALR(1).
521 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
522 (Glossary): Add Accepting State, Consistent State, Default Rule,
523 and IELR(1) definitions.
524 In Generalized LR (GLR) definition, make same changes as in
525 previous GLR sections.
526 In LALR(1) definition, say Bison uses LALR(1) by default rather
527 than implying Bison is limited to LALR(1).
528 (LocalWords): Add IELR.
529
530 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
531
532 Finish implementing %define lr.type.
533 Its value can be "LALR", "IELR", or "canonical LR".
534 * lib/timevar.def (TV_IELR_PHASE1): New var.
535 (TV_IELR_PHASE2): New var.
536 (TV_IELR_PHASE3): New var.
537 (TV_IELR_PHASE4): New var.
538 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
539 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
540 Sbitset.h, ielr.h, and ielr.c.
541 * src/getargs.h, src/getargs.c (enum trace, trace_args,
542 trace_types): Add trace_ielr.
543 * src/lalr.h, src/lalr.c (ngotos): Export it.
544 (F): Rename to...
545 (goto_follows): ... this, update all uses, and export it.
546 (set_goto_map): Export it.
547 (map_goto): Export it.
548 (compute_lookahead_tokens): Don't free goto_follows yet. Now
549 handled in ielr.
550 (initialize_LA): Export it. Move lookback allocation to...
551 (lalr): ... here because, for canonical LR, initialize_LA must
552 be invoked but lookback and much of the rest of LALR isn't
553 needed.
554 * main.c (main): Instead of lalr, invoke ielr, which invokes
555 lalr.
556 * src/reader.c (reader): Default lr.type to "LALR".
557 Default lr.default_rules to "accepting" if lr.type is "canonical
558 LR". Leave the default as "all" otherwise.
559 Check for a valid lr.type value.
560 * src/state.h, src/state.c (struct state_list): Add state_list
561 member.
562 (state_new): Initialize state_list member to NULL.
563 (state_new_isocore): New function, exported.
564 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
565 exercises all values of lr.type.
566 (GNU AWK Grammar): Rename test group to...
567 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
568 AT_TEST_EXISTING_GRAMMAR.
569 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
570 (GNU pic Grammar): Rename test group to...
571 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
572 AT_TEST_EXISTING_GRAMMAR.
573 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
574 all values of lr.type.
575 (Single State Split): New test groups using AT_TEST_LR_TYPE.
576 (Lane Split): Likewise.
577 (Complex Lane Split): Likewise.
578 (Split During Added Lookahead Propagation): Likewise.
579
580 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
581
582 Add new files for IELR and canonical LR implementation.
583 * src/AnnotationList.c: New.
584 * src/AnnotationList.h: New.
585 * src/InadequacyList.c: New.
586 * src/InadequacyList.h: New.
587 * src/Sbitset.c: New.
588 * src/Sbitset.h: New.
589 * src/ielr.c: New.
590 * src/ielr.h: New.
591
592 2009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
593
594 Implement %define lr.default_rules.
595 Its value describes the states that are permitted to contain
596 default rules: "all", "consistent", or "accepting".
597 * src/reader.c (reader): Default lr.default_rules to "all".
598 Check for a valid lr.default_rules value.
599 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
600 is "accepting", then only mark the accepting state as
601 consistent.
602 (initialize_LA): Tell state_lookahead_tokens_count whether
603 lr.default_rules is "accepting".
604 * src/tables.c (action_row): If lr.default_rules is not "all",
605 then disable default rules in inconsistent states.
606 * src/print.c (print_reductions): Use this opportunity to
607 perform some assertions about whether lr.default_rules was
608 obeyed correctly.
609 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
610 helps with checking the parser tables for a grammar.
611 * tests/input.at (%define lr.default_rules invalid values): New
612 test group.
613 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
614 AT_TEST_TABLES_AND_PARSE.
615 (`no %define lr.default_rules'): New test group generated by
616 AT_TEST_LR_DEFAULT_RULES.
617 (`%define lr.default_rules "all"'): Likewise.
618 (`%define lr.default_rules "consistent"'): Likewise.
619 (`%define lr.default_rules "accepting"'): Likewise.
620
621 2009-04-20 Akim Demaille <demaille@gostai.com>
622
623 Formatting change.
624
625 2009-04-20 Akim Demaille <demaille@gostai.com>
626
627 bison: factoring.
628 * src/output.c (token_definitions_output): Use symbol_id_get
629 instead of duplicating its logic.
630 * TODO (YYERRCODE): Extend.
631
632 2009-04-20 Akim Demaille <demaille@gostai.com>
633
634 variables: prefer error-verbose to error_verbose.
635 * data/bison.m4 (b4_error_verbose_if): Based on error-verbose
636 instead of error_verbose.
637 * src/scan-gram.l (%error-verbose): Map to the error-verbose
638 variable.
639 * doc/bison.texinfo: Promote %define error-verbose instead of
640 %error-verbose.
641 * tests/actions.at: Prefer %define error-verbose to %error-verbose.
642
643 2009-04-15 Akim Demaille <demaille@gostai.com>
644
645 variables: accept dashes.
646 * data/bison.m4 (b4_percent_define_if_define_): Also map dashes to
647 underscores.
648 * src/scan-gram.l ({id}): Also accept dashes after the initial
649 letter.
650 ({directive}): Use {id}.
651 * src/parse-gram.y: Comment and formatting changes.
652 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
653 symbols.
654 * src/complain.h, src/complain.c (yacc_at): New.
655 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
656 symbol names.
657 * src/output.c (token_definitions_output): Do not #define token
658 names with dashes.
659
660 2009-04-20 Akim Demaille <demaille@gostai.com>
661
662 Consistently refer to Yacc, not YACC.
663 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
664
665 2009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
666
667 Pacify make maintainer-check-posix.
668 * tests/input.at (%define, --define): Move bison command-line
669 options before grammar file name.
670
671 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
672
673 Document semicolon warnings.
674 * NEWS (2.5): Here.
675
676 2009-04-14 Akim Demaille <demaille@gostai.com>
677
678 variables: use `parse.assert' instead of `assert'.
679 * TODO (assert): Remove.
680 * data/bison.m4 (b4_assert_if): Replace with...
681 (b4_parse_assert_if): this.
682 * data/lalr1.cc, data/variant.hh, tests/c++.at: Adjust.
683 * doc/bison.texinfo (Decl Summary): Document parse.assert.
684
685 2009-04-14 Akim Demaille <demaille@gostai.com>
686
687 variables: use `parse.trace' instead of `debug'.
688 * src/getargs.c (getargs): Map -t to %define trace.parse.
689 * src/scan-gram.l (%debug): Map to %define trace.parse.
690 * data/bison.m4 (b4_percent_define_if_define): Map `.' in variable
691 names to `_' in macro names.
692 (b4_debug_if): Replace with...
693 (b4_parse_trace_if): this.
694 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
695 * data/yacc.c: Adjust.
696 * doc/bison.texinfo (Decl Summary): Document %debug as obsoleted.
697 Use @code to label the variable list.
698 Document the variable parse.trace.
699 (Tracing): Promote the parse.trace variable.
700 * TODO: %printer is not documented.
701
702 2009-04-14 Akim Demaille <demaille@gostai.com>
703
704 doc: minor fixes.
705 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
706 (Table of Symbols): Remove duplicate entry for %debug.
707
708 2009-04-10 Eric Blake <ebb9@byu.net>
709
710 submodules: update to latest
711 * submodules/autoconf: Use latest upstream Autoconf.
712
713 2009-04-06 Eric Blake <ebb9@byu.net>
714
715 Work around autoconf 2.63b bug in testsuite.
716 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
717 autoconf bug related to # in test.
718
719 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
720
721 * NEWS (2.5): New section. Describe new -D/--define feature.
722
723 2009-04-06 Akim Demaille <demaille@gostai.com>
724
725 Regen.
726 * src/parse-gram.h, src/parse-gram.c: Regen.
727
728 2009-04-06 Akim Demaille <demaille@gostai.com>
729
730 rename muscle_tab.* as muscle-tab.* for consistency.
731 * src/muscle_tab.h, src/muscle_tab.c: Rename as...
732 * src/muscle-tab.h, src/muscle-tab.c: these.
733 * src/getargs.c, src/local.mk, src/main.c, src/output.c,
734 * src/parse-gram.y, src/reader.c, src/scan-code.l: Adjust.
735
736 2009-04-06 Akim Demaille <demaille@gostai.com>
737
738 Makefile: introduce $(BISON).
739 * src/local.mk (BISON): New.
740 (YACC): Use it.
741
742 2009-04-06 Akim Demaille <demaille@gostai.com>
743
744 parser: handle %locations as %define locations.
745 * src/getargs.h, src/getargs.c (locations_flag): Remove.
746 * src/getargs.c, src/scan-code.l: Use muscle_percent_define_ensure
747 to set "locations" to true.
748 * src/output.c (prepare): Don't output "locations".
749 * src/scan-gram.l (%locations): Handle it as a %<flag>.
750 * src/parse-gram.y: It's no longer a token.
751 Don't handle it.
752 * data/bison.m4 (b4_locations_if): Define it with
753 b4_percent_define_if_define.
754 * data/c.m4, data/glr.cc: Adjust.
755
756 2009-04-06 Akim Demaille <demaille@gostai.com>
757
758 Regen.
759 * src/parse-gram.c: Regen.
760
761 2009-04-06 Akim Demaille <demaille@gostai.com>
762
763 muscle: factor the handling of obsolete of obsolete directives.
764 Suggested by Joel E. Denny.
765
766 * src/muscle_tab.h, src/muscle_tab.c (muscle_percent_define_ensure):
767 New, extracted from...
768 * src/parse-gram.y (prologue_declaration: pure-parser): here.
769 Remove it.
770 (prologue_declaration: "%<flag>"): Use
771 muscle_percent_define_ensure.
772 (%error-verbose, %pure-parser): No longer tokens.
773 * src/scan-gram.l (pure-parser): Return as a %<flag>.
774
775 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
776
777 Fix options documentation.
778 * build-aux/cross-options.pl: As in --help output, write optional
779 arguments as [=ARG] not =[ARG].
780 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
781
782 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
783
784 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
785 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
786 requirements for a correct m4 are stricter.
787 * m4/m4.m4: Make it a symbolic link to submodules/autoconf/m4/m4.m4.
788 * configure.ac: Update to use AC_PROG_GNU_M4.
789 Reported by Eric Blake.
790
791 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
792
793 Help with updating web manual.
794 * HACKING: Incorporate instructions from gnulib/doc/README.
795 * bootstrap.conf (gnulib_modules): Add gendocs.
796
797 2009-04-03 Akim Demaille <demaille@gostai.com>
798
799 Regen.
800 * src/parse-gram.h, src/parse-gram.c: Regen.
801
802 2009-04-03 Akim Demaille <demaille@gostai.com>
803
804 Factor %FLAG at scan level.
805 * src/parse-gram.y (PERCENT_DEBUG, PERCENT_ERROR_VERBOSE): Token
806 definitions and associated rules, replaced by....
807 (PERCENT_FLAG): this new token type, and rule.
808 * src/scan-gram.l (RETURN_PERCENT_FLAG): New.
809 Use it for %debug and %error-verbose.
810
811 2009-04-03 Akim Demaille <demaille@gostai.com>
812
813 Regen.
814 * src/parse-gram.h, src/parse-gram.c: Regen.
815
816 2009-04-03 Akim Demaille <demaille@gostai.com>
817
818 Treat %debug as %define debug.
819 * data/bison.m4 (b4_debug_if): New.
820 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c,
821 * data/lalr1.java: Use it instead of b4_debug_flag.
822 * src/getargs.h, src/getargs.c (debug_flag): Remove.
823 * src/output.c (prepare): Don't output it.
824 * src/parse-gram.y: Treat %debug as %define debug.
825
826 2009-04-03 Akim Demaille <demaille@gostai.com>
827
828 Treat %error-verbose as %define error_verbose.
829 This allows to pass -Derror_verbose on the command line. Better
830 yet, it allows to pass -Derror_verbose=$(ERROR_VERBOSE), with
831 ERROR_VERBOSE being defined as false or true.
832 * data/bison.m4 (b4_percent_define_if_define): Instead of relying
833 on b4_percent_define_ifdef, for does not check the defined value,
834 but only whether the symbol is defined, rely on
835 b4_percent_define_flag_if, so that a value of "false" is processed
836 as a false.
837 If not defined, define the flag to "false".
838 (b4_error_verbose_if): New.
839 * data/glr.c, data/lalr1.cc, data/yacc.c: Use it instead of
840 b4_error_verbose_flag.
841 * src/getargs.h, src/getargs.c (error_verbose_flag): Remove.
842 * src/output.c (prepare): Don't output it.
843 * src/parse-gram.y (%error-verbose): Treat as %define error_verbose.
844
845 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
846
847 Fix strange %define locations for default values.
848 Reported by Akim Demaille at
849 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
850 and discussed again starting at
851 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
852 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
853 because location information is bogus.
854 Use angle brackets to delimit fake file name because square brackets
855 look like underexpanded m4. Choose a better fake file name.
856 Use negative line numbers.
857 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
858 * src/location.c (location_print): If line for a boundary is negative,
859 only print that boundary's file name.
860 * src/location.h: Document that.
861 * tests/skeletons.at (%define Boolean variables: invalid skeleton
862 defaults): Update output.
863
864 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
865
866 Pacify ./configure --enable-gcc-warnings.
867 * Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS) because many files
868 in lib won't compile with it.
869 * src/local.mk (src_bison_CFLAGS): Use $(WERROR_CFLAGS) here only.
870
871 2009-03-31 Akim Demaille <demaille@gostai.com>
872
873 bootstrap: --help to stdout.
874 * bootstrap (usage): Don't send --help to stderr.
875 Use a here doc instead of a long string.
876
877 2009-03-31 Akim Demaille <demaille@gostai.com>
878
879 bootstrap: README-hacking no longer exists
880 * bootstrap (checkout_only_file): Set to HACKING.
881
882 2009-03-26 Akim Demaille <demaille@gostai.com>
883
884 doc: merge HACKING and README-hacking.
885 Two files is confusing.
886 Reported by Alexandre Duret-Lutz.
887
888 * README-hacking: Merge into...
889 * HACKING (Working from the repository): here.
890
891 2009-03-26 Akim Demaille <demaille@gostai.com>
892
893 doc: update README-hacking.
894 * README-hacking: We now use git and git submodules.
895 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
896
897 2009-03-26 Akim Demaille <demaille@gostai.com>
898
899 lalr1.cc: avoid GCC 4.3 warnings.
900 GCC 4.3 now warns about "a || b && c" and asks for explicit
901 parentheses.
902 Reported by Alexandre Duret-Lutz.
903 * data/location.cc: Update copyright years.
904 (Position::operator==): Use parens to make precedence explicit.
905 Compare lines and columns first, as they are more likely to be
906 different, and they are faster to compare.
907
908 2009-03-26 Akim Demaille <demaille@gostai.com>
909
910 gnulib: update.
911 * gnulib: Update to latest.
912 * src/local.mk (AM_CFLAGS): Move to...
913 * Makefile.am: here.
914 * etc/prefix-gnulib-mk (prefix_assignment): Also transform
915 AM_CFLAGS.
916
917 2009-03-02 Akim Demaille <demaille@gostai.com>
918
919 Comment changes.
920
921 2009-03-02 Akim Demaille <demaille@gostai.com>
922
923 Share b4_yytranslate_define.
924 * data/lalr1.cc (b4_yytranslate_define): Move to...
925 * data/c++.m4: here.
926
927 2009-03-02 Akim Demaille <demaille@gostai.com>
928
929 Use locations in the variant example.
930 Yes, this obfuscates the point of this example, variants only.
931 But glr.cc cannot work (yet?) without locations. This change
932 makes it easier to use this example with glr.cc.
933
934 * examples/variant.yy (assert): %define it.
935 (locations): Request them.
936 (yylex): Bind the location to the stage.
937
938 2009-03-02 Akim Demaille <demaille@gostai.com>
939
940 Dub make_TOKEN as a public type interface.
941 * data/c++.m4 (b4_symbol_constructor_declare)
942 (b4_symbol_constructor_define): New empty stubs.
943 (b4_public_types_declare, b4_public_types_define): Use them.
944 * data/lalr1.cc (b4_symbol_constructor_declare)
945 (b4_symbol_constructor_declare_)
946 (b4_symbol_constructor_define_, b4_symbol_constructor_define):
947 Move to...
948 * data/variant.hh: here.
949 Remove the "b4_variant_if" parts, as variant.hh is loaded only if
950 needed.
951 * data/lalr1.cc: No longer invoke b4_symbol_constructor_define and
952 b4_symbol_constructor_declare, as it is now done by
953 b4_public_types_define and b4_public_types_declare.
954
955 2009-03-02 Akim Demaille <demaille@gostai.com>
956
957 Coding style changes.
958 * data/lalr1.cc (b4_symbol_constructor_declaration_)
959 (b4_symbol_constructor_declarations)
960 (b4_symbol_constructor_definition_)
961 (b4_symbol_constructor_definitions)
962 (b4_yytranslate_definition): Rename as...
963 (b4_symbol_constructor_declare_)
964 (b4_symbol_constructor_declare)
965 (b4_symbol_constructor_define_)
966 (b4_symbol_constructor_define)
967 (b4_yytranslate_define): these.
968 * data/variant.hh (b4_variant_definition): Rename as...
969 (b4_variant_define): this.
970
971 2009-03-02 Akim Demaille <demaille@gostai.com>
972
973 Factor b4_assert_if, b4_lex_symbol_if, and b4_variant_if.
974 * data/bison.m4 (b4_percent_define_if_define): New.
975 * data/c++.m4 (b4_variant_if): Move to...
976 * data/bison.m4: Here, using b4_percent_define_if_define.
977 * data/lalr1.cc (b4_assert_if, b4_lex_symbol_if): Move to...
978 * data/bison.m4: Here, using b4_percent_define_if_define.
979
980 2009-03-02 Akim Demaille <demaille@gostai.com>
981
982 Dub symbol_type_base as a public type.
983 * data/c++.m4 (b4_public_types_declare): Now define
984 symbol_type_base and symbol_type.
985 (b4_public_types_define): New.
986 In both cases, the definitions are taken verbatim from lalr1.cc.
987 * data/lalr1.cc: Adjust.
988
989 2009-03-02 Akim Demaille <demaille@gostai.com>
990
991 b4_public_types_declare.
992 * data/c++.m4 (b4_public_types_declare): New.
993 * data/glr.cc, data/lalr1.cc: Use it.
994
995 2009-03-02 Akim Demaille <demaille@gostai.com>
996
997 b4_semantic_type_declare.
998 * data/c++.m4 (b4_semantic_type_declare): New.
999 Factors and generalizes what was in glr.cc and lalr1.cc.
1000 * data/variant.hh (b4_semantic_type_declare): Redefine it for
1001 variants.
1002 * data/lalr1.cc, data/glr.cc: Use it.
1003
1004 2009-02-26 Akim Demaille <demaille@gostai.com>
1005
1006 Upgrade gnulib.
1007 * gnulib: Upgrade from master.
1008 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, m4/.gitignore:
1009 Regen.
1010
1011 2009-02-25 Akim Demaille <demaille@gostai.com>
1012
1013 Remove useless arguments.
1014 * data/glr.c (yy_reduce_print): $$ and @$ are not used and not
1015 relevant.
1016
1017 2009-02-25 Akim Demaille <demaille@gostai.com>
1018
1019 Comment changes.
1020 * data/lalr1.cc: here.
1021
1022 2009-02-25 Akim Demaille <demaille@gostai.com>
1023
1024 Fix glr.cc's debug level handling.
1025 * data/glr.cc (yydebug_): Remove, as it is actually yydebug from
1026 glr.c which is used.
1027 (debug_level, set_debug_level): Adjust.
1028
1029 2009-02-25 Akim Demaille <demaille@gostai.com>
1030
1031 Copyright years.
1032 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
1033
1034 2009-02-25 Akim Demaille <demaille@gostai.com>
1035
1036 Style changes.
1037 * etc/bench.pl.in (generate_grammar_list): Consitently use
1038 location_type, not yy::location.
1039
1040 2009-02-25 Akim Demaille <demaille@gostai.com>
1041
1042 Comment change.
1043 * data/lalr1.cc: here.
1044
1045 2009-02-19 Akim Demaille <demaille@gostai.com>
1046
1047 Make yyparser::error public.
1048 * data/lalr1.cc: here.
1049 There is no good reason to keep it private (and it is convenient
1050 to use it from the scanner for instance). It is already public in
1051 glr.cc.
1052
1053 2009-02-19 Akim Demaille <demaille@gostai.com>
1054
1055 Comment changes.
1056 * data/glr.cc: here.
1057
1058 2009-02-19 Akim Demaille <demaille@gostai.com>
1059
1060 Remove trailing blanks.
1061 The epilogue has its own ending \n, no need to add another.
1062
1063 * data/glr.c, data/lalr1.java, data/yacc.c: dnl when outputing the
1064 epilogue.
1065 * data/glr.cc: dnl when extending the epilogue.
1066 Remove stray "private:".
1067
1068 2009-02-19 Akim Demaille <demaille@gostai.com>
1069
1070 Use b4_c_modern.
1071 * data/c.m4 (b4_c_function_decl): Here.
1072
1073 2009-02-19 Akim Demaille <demaille@gostai.com>
1074
1075 Comment changes.
1076 * data/lalr1.cc: here.
1077
1078 2009-02-19 Akim Demaille <demaille@gostai.com>
1079
1080 Extract variant.hh
1081 * data/variant.hh: New, extracted from...
1082 * data/lalr1.cc: here.
1083 Adjust.
1084 * data/local.mk: Adjust.
1085
1086 2009-02-19 Akim Demaille <demaille@gostai.com>
1087
1088 Extract stack.hh from lalr1.cc.
1089 * data/stack.hh: New.
1090 * data/lalr1.cc: Extract from here.
1091 * data/local.mk: Adjust.
1092
1093 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
1094
1095 Add reminder about uploading public key to keys.gnupg.net.
1096 * HACKING (Release Procedure): Here.
1097
1098 2009-01-28 Akim Demaille <demaille@gostai.com>
1099
1100 * NEWS: Update information about 2.4.1 and 2.4.2.
1101
1102 2008-11-04 Akim Demaille <demaille@gostai.com>
1103
1104 Reformat NEWS.
1105 * NEWS: Use more outline-mode markup.
1106 Suggested by Jim Meyering.
1107
1108 2009-01-08 Akim Demaille <demaille@gostai.com>
1109
1110 Fix grep portability issues.
1111 Grep on Solaris does not support -q.
1112 Reported by Summum Bonum.
1113
1114 * NEWS: Add a stub for 2.4.2.
1115 * THANKS: Add Summum Bonum.
1116 * tests/atlocal.in (EGREP): New.
1117 (CC, CXX, XSLTPROC): Make it possible to override them via
1118 envvars.
1119 * tests/java.at: Use $EGREP instead of egrep.
1120 Use AT_CHECK's ignore instead of grep's -q.
1121
1122 2008-12-11 Akim Demaille <demaille@gostai.com>
1123
1124 Pass the token type to yysyntax_error.
1125 * data/yacc.c (yysyntax_error): Take the transated token instead
1126 of the raw number.
1127 Adjust callers.
1128 * TODO: Update.
1129
1130 2008-12-11 Akim Demaille <demaille@gostai.com>
1131
1132 Formatting changes.
1133 * data/glr.c: Formatting changes.
1134
1135 2008-12-11 Akim Demaille <demaille@gostai.com>
1136
1137 Propagate i18n changes into glr.c.
1138 * TODO: Update.
1139 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
1140 building the error message format dynamically.
1141 * data/lalr1.java: Formatting changes.
1142
1143 2008-12-11 Akim Demaille <demaille@gostai.com>
1144
1145 Use testsuite -C.
1146 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
1147 Solves problems when top_srcdir is an absolute path.
1148 Suggested by Eric Blake.
1149 * configure.ac: Require Autoconf 2.62.
1150
1151 2008-12-11 Akim Demaille <demaille@gostai.com>
1152
1153 Simplify the i18n of the error messages.
1154 * data/lalr1.cc: Comment changes.
1155 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
1156 lalr1.cc instead of building dynamically the format string.
1157
1158 2008-12-08 Akim Demaille <demaille@gostai.com>
1159
1160 Fix portability issue in the test suite.
1161 * tests/local.at (AT_MATCHES_CHECK): New.
1162 Based on Perl instead of Sed. Sed has too many portability
1163 pitfalls, not ever Sed is GNU Sed.
1164 * tests/actions.at (Fix user actions without a trailing semicolon):
1165 Use it.
1166
1167 2008-12-08 Akim Demaille <demaille@gostai.com>
1168
1169 Update data/README.
1170 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
1171
1172 2008-12-08 Akim Demaille <demaille@gostai.com>
1173
1174 Install autoconf as a submodule to get m4sugar.
1175 * .gitmodules: Add submodules/autoconf.
1176 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
1177 submodules/autoconf.
1178
1179 2008-12-08 Akim Demaille <demaille@gostai.com>
1180
1181 Test token.prefix in all the skeletons.
1182 * data/java.m4 (b4_token_enum): Use the token.prefix.
1183 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
1184 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
1185 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
1186 * tests/java.at: Comment changes.
1187 (AT_CHECK_JAVA_MINIMAL): Define the END token.
1188 (Java parser class and package names): Add token.prefix check.
1189
1190 2008-12-08 Akim Demaille <demaille@gostai.com>
1191
1192 Fix regeneration of atconfig.
1193 * tests/local.mk (tests/atconfig): The rule was incorrect, but
1194 remove it: now that there is no tests/Makefile.am, the top-level
1195 Makefile properly updates atconfig when needed.
1196
1197 2008-12-07 Di-an Jan <dianj@freeshell.org>
1198
1199 Implement the FIXME that ends an user action with a semicolon
1200 if it seems necessary.
1201 * src/scan-code.l (flex rules section): Flag cpp directive from
1202 any `#' to the first unescaped end-of-line. Semicolon is not
1203 needed after `;', `{', '}', or cpp directives and is needed after
1204 any other token (whitespaces and comments have no effect).
1205 * tests/actions.at (Fix user actions without a trailing semicolon):
1206 New test.
1207 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
1208 to make user actions complete statements.
1209 Adjust column numbers in error messages.
1210 * tests/regression.at (Fix user actions without a trailing semicolon):
1211 Remove. Covered by new test.
1212
1213 2008-12-07 Akim Demaille <demaille@gostai.com>
1214
1215 Update gnulib.
1216 * gnulib: Update from master.
1217
1218 2008-12-05 Eric Blake <ebb9@byu.net>
1219
1220 Avoid compiler warning.
1221 * src/output.c (muscle_insert_item_number_table): Delete unused
1222 function.
1223
1224 2008-12-02 Eric Blake <ebb9@byu.net>
1225
1226 Build testsuite with newer autoconf.
1227 * tests/output.at (m4_expand): Don't override in newer autoconf,
1228 where the underlying implementation changed.
1229 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
1230 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
1231 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
1232 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
1233 since some of them contain unbalanced ')'.
1234
1235 2008-12-01 Akim Demaille <demaille@gostai.com>
1236
1237 Use b4_symbol for printers and destructors everywhere.
1238 * data/bison.m4 (b4_symbol_action_location): New.
1239 * data/c.m4 (b4_symbol_actions): Remove.
1240 Adjust all callers to use by b4_symbol_foreach and the corresponding
1241 b4_symbol_printer/destructor macro.
1242 * data/glr.cc: Adjust.
1243 * data/lalr1.java: Adjust the %destructor sanity check.
1244 * src/output.c (symbol_code_props_output): Remove, we no longer
1245 need the b4_symbol_printers/destructors tables.
1246
1247 2008-12-01 Akim Demaille <demaille@gostai.com>
1248
1249 Use b4_symbol_case_.
1250 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
1251 b4_symbol_case_.
1252
1253 2008-12-01 Akim Demaille <demaille@gostai.com>
1254
1255 Move b4_symbol based macro to bison.m4.
1256 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
1257 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
1258 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
1259 (b4_type_foreach): Move to...
1260 * data/bison.m4: Here.
1261 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
1262 b4_symbol_value_template instead of b4_symbol_value.
1263
1264 2008-12-01 Akim Demaille <demaille@gostai.com>
1265
1266 b4_symbol/type_foreach.
1267 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
1268 Use them.
1269
1270 2008-12-01 Akim Demaille <demaille@gostai.com>
1271
1272 Use the symbol properties to output the printer/destructor for lalr1.cc.
1273 Instead of defining complex list of tuples to define various
1274 properties of the symbols, we now prefer to define symbols as
1275 "structs" in m4: using the symbol key (its number), and the
1276 property name, b4_symbol gives it value. Use this to handle
1277 destructors and printers.
1278
1279 * src/output.c (CODE_PROP): New.
1280 (prepare_symbol_definitions): Use it to define the printer and
1281 destructor related attributes of the symbols.
1282 * data/lalr1.cc (b4_symbol_actions): Rename as...
1283 (b4_symbol_action): this.
1284 Use b4_symbol instead of 6 arguments.
1285 (b4_symbol_printer, b4_symbol_destructor): New.
1286 Use them instead of b4_symbol_actions.
1287
1288 2008-12-01 Akim Demaille <demaille@gostai.com>
1289
1290 Avoid capturing variables too easily.
1291 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
1292 v__ and p__ instead of v and p.
1293
1294 2008-12-01 Akim Demaille <demaille@gostai.com>
1295
1296 Remove spurious empty line before syncline.
1297 * data/bison.m4 (b4_syncline): Don't output an empty line before
1298 the output.
1299
1300 2008-11-26 Akim Demaille <demaille@gostai.com>
1301
1302 Convert lib/Makefile.am into lib/local.mk.
1303 The real problem is rather gnulib.mk, which itself is extracted
1304 from a Makefile.am that gnulib expects to the "recursive". The
1305 tool prefix-gnulib-mk converts such a gnulib.mk to be
1306 non-recursive. Also, some AC_SUBST variables need to be adjusted.
1307
1308 * etc/prefix-gnulib-mk: New.
1309 * bootstrap (slurp): Use it to convert further gnulib.mk.
1310 No longer try to avoid re-creation of lib/gnulib.mk as the changes
1311 are deeper.
1312 * lib/Makefile.am: Rename as...
1313 * lib/local.mk: this.
1314 Adjust to be prefixed.
1315 * Makefile.am, configure.ac: Adjust.
1316 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
1317
1318 2008-11-26 Akim Demaille <demaille@gostai.com>
1319
1320 s/_FLAGS/FLAGS/.
1321 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
1322 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
1323 Reported by Eric Blake.
1324
1325 2008-11-26 Akim Demaille <demaille@gostai.com>
1326
1327 Use b4_parser_tables_define in glr.cc.
1328 * data/glr.c: Use b4_parser_tables_define instead of defining the
1329 (deterministic integral) tables by hand.
1330
1331 2008-11-26 Akim Demaille <demaille@gostai.com>
1332
1333 Use b4_parser_tables_define in Java.
1334 * data/java.m4 (b4_typed_parser_table): Rename as...
1335 (b4_typed_parser_table_define): this, for consistency.
1336 Accept a comment as $4.
1337 Move $2 into yy*_.
1338 (b4_integral_parser_table): Rename as...
1339 (b4_integral_parser_table_define): this.
1340 * data/lalr1.java: Adjust all uses.
1341 Use b4_parser_tables_define instead of generation by hand.
1342
1343 2008-11-26 Akim Demaille <demaille@gostai.com>
1344
1345 Prepare the convergence bw C style and Java table generation.
1346 * data/bison.m4 (b4_tables_map, b4_tables_declare)
1347 (b4_tables_define): Rename as...
1348 (b4_integral_parser_tables_map, b4_parser_tables_declare)
1349 (b4_parser_tables_define): these.
1350 * data/c.m4 (b4_table_define): Rename as...
1351 (b4_integral_parser_table_define): this.
1352 * data/lalr1.cc: Adjust.
1353 (b4_table_define, b4_table_declare): Rename as...
1354 (b4_integral_parser_table_define)
1355 (b4_integral_parser_table_declare): these.
1356 (yyrline_): Move the comment where it is actually used.
1357 * data/yacc.c: Adjust.
1358 (yyrline): Use b4_integral_parser_table_define.
1359
1360 2008-11-26 Akim Demaille <demaille@gostai.com>
1361
1362 Regen.
1363 * src/parse-gram.h, src/parse-gram.c: Regen.
1364
1365 2008-11-26 Akim Demaille <demaille@gostai.com>
1366
1367 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
1368 * data/lalr1.cc (b4_tables_map): Move to...
1369 * data/bison.m4: here.
1370 Update the comment for yytable during the flight.
1371 (b4_tables_declare, b4_tables_define): New.
1372 * data/lalr1.cc: Use them.
1373 * data/c.m4 (b4_table_define): New.
1374 * data/yacc.c: Use b4_tables_define instead of output the tables
1375 by hand.
1376 * tests/regression.at (Web2c Actions): Adjust the expected output,
1377 the order of the tables changed.
1378
1379 2008-11-26 Akim Demaille <demaille@gostai.com>
1380
1381 Get rid of (yy)rhs and (yy)prhs.
1382 These tables are no longer needed in the parsers, and they don't seem to
1383 be useful. They are not documented either.
1384
1385 * src/output.c (prepare_rules): Get rid of rhs and prhs.
1386 Adjust the computation of (yy)r2.
1387
1388 2008-11-26 Akim Demaille <demaille@gostai.com>
1389
1390 Rule length is unsigned.
1391 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
1392
1393 2008-11-26 Akim Demaille <demaille@gostai.com>
1394
1395 Get rid of lalr1-split.cc.
1396 It was no longer maintainer.
1397
1398 * data/lalr1-split.cc: Remove.
1399 * etc/bench.pl.in (bench_fusion_parser): Remove.
1400 Adjust.
1401
1402 2008-11-26 Akim Demaille <demaille@gostai.com>
1403
1404 Use yy* consistently.
1405 * data/glr.c: Now that yyrhs no longer exists as a global
1406 variable, rename local "rhs" variables into "yyrhs" for
1407 consistency.
1408
1409 2008-11-25 Akim Demaille <demaille@gostai.com>
1410
1411 Get rid of yyrhs and yyprhs in glr.c.
1412 * data/glr.c (yyrhs, yyprhs): Remove.
1413 Instead, use the state stack and yystos.
1414
1415 2008-11-25 Akim Demaille <demaille@gostai.com>
1416
1417 Flag glr tests.
1418 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
1419 as an Autotest keyword.
1420
1421 2008-11-25 Akim Demaille <demaille@gostai.com>
1422
1423 Prefer TESTSUITE_FLAGS.
1424 TESTSUITEFLAGS is barely readable.
1425
1426 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
1427 for backward compatibility.
1428 Use the former instead of the latter.
1429
1430 2008-11-25 Akim Demaille <demaille@gostai.com>
1431
1432 Get rid of yyrhs and yyprhs in larl1.java.
1433 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
1434 (yy_reduce_print): Rather, use yystos_ and the state stack.
1435
1436 2008-11-25 Akim Demaille <demaille@gostai.com>
1437
1438 Formatting changes.
1439
1440 2008-11-25 Akim Demaille <demaille@gostai.com>
1441
1442 Get rid of yyrhs and yyprhs in yacc.c.
1443 They were used to get the symbol types, given a rule number, when
1444 displaying the top of the stack before a reduction. But the
1445 symbol type is available from the state stack. This has two be
1446 benefits: two tables less in the parser (making it smaller), and a
1447 more consistent use of the three stacks which will help to fuse
1448 them.
1449
1450 * data/yacc.c (yyprhs, yyrhs): Remove.
1451 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
1452 (yy_reduce_print): Take yyssp as argument.
1453 Use it, together with yystos, to get the symbol type.
1454 * tests/regression.at (Web2c Report): Remove these tables from the
1455 expected output.
1456
1457 2008-11-25 Akim Demaille <demaille@gostai.com>
1458
1459 b4_tables_map.
1460 The point is to factor the generation of the tables across skeletons.
1461 This is language dependant.
1462
1463 * data/c.m4 (b4_comment_): New.
1464 Should be usable to define how to generate tables independently of
1465 the language.
1466 (b4_c_comment): New.
1467 (b4_comment): Bounce to b4_c_comment.
1468 Now support $2 = [PREFIX] for indentation.
1469 * data/lalr1.cc (b4_table_declare): Don't output a comment if
1470 there is no comment.
1471 Indent it properly when there is one.
1472 Output the ending semicolon.
1473 (b4_table_define): Space changes.
1474 Output the ending semicolon.
1475 (b4_tables_map): New.
1476 Use it twice instead of declaring and defining the (integral)
1477 tables by hand.
1478
1479 2008-11-25 Akim Demaille <demaille@gostai.com>
1480
1481 b4_table_declare.
1482 * data/lalr1.cc (b4_table_declare): New.
1483 Use it to declare the tables defined with b4_table_define.
1484 (b4_table_define): Declare a third arg to match b4_table_declare
1485 signature.
1486 Move all the comments around invocations of b4_table_define into
1487 the invocations itselves.
1488 Move things around to have the order for declarations and
1489 definitions.
1490
1491 2008-11-25 Akim Demaille <demaille@gostai.com>
1492
1493 Formatting changes.
1494 * data/lalr1.java: here.
1495
1496 2008-11-25 Akim Demaille <demaille@gostai.com>
1497
1498 b4_args is more general than only C++.
1499 * data/lalr1.cc (b4_args, _b4_args): Move to...
1500 * data/bison.m4: here.
1501
1502 2008-11-21 Di-an Jan <dianj@freeshell.org>
1503
1504 Implement no-XXX arguments for --warnings, --report, --trace.
1505 * src/getargs.c (flags_argmatch): Handles no-XXX.
1506 Fix typo in doxygen comment.
1507
1508 2008-11-21 Akim Demaille <demaille@gostai.com>
1509
1510 Display the changes in cross-options.texi.
1511 * build-aux/cross-options.pl ($sep): New, to separate items.
1512 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
1513 changes.
1514
1515 2008-11-20 Di-an Jan <dianj@freeshell.org>
1516
1517 Improves options in the manual.
1518 * doc/bison.texinfo (-g, -x): Add space before argument.
1519 (Option Cross Key): Implement FIXME: listing directives also.
1520 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
1521 (Short Option): Special case -d. Put arguments inside @option.
1522 (Bison Directive): Add column, automatically extracted from
1523 src/scan-gram.l (actual name passed as the first argument)
1524 with special case for %define.
1525 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
1526 to build-aux/cross-options.pl.
1527 * src/getargs.c (usage): Document limitations of cross-options.pl.
1528 * src/scan-gram.l: Likewise.
1529
1530 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
1531
1532 Fix unexpanded macros in GLR defines file.
1533 Reported by Csaba Raduly at
1534 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
1535 * THANKS (Csaba Raduly): Add.
1536 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
1537 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
1538 lexer in a separate module that includes the defines file.
1539 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
1540 source.
1541 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
1542 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
1543 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
1544 (AT_DATA_SOURCE_PROLOGUE): New.
1545 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
1546 (AT_DATA_SOURCE): New.
1547 (AT_FULL_COMPILE): Extend to support an additional source file.
1548
1549 2008-11-18 Akim Demaille <demaille@gostai.com>
1550
1551 More TODO.
1552 * TODO: More short term issues.
1553
1554 2008-11-18 Akim Demaille <demaille@gostai.com>
1555
1556 Regen.
1557 * src/parse-gram.h, src/parse-gram.c: Regen.
1558
1559 2008-11-18 Akim Demaille <demaille@gostai.com>
1560
1561 Use b4_subtract where possible.
1562 * data/lalr1.cc (b4_subtract): Move to...
1563 * data/bison.m4: here.
1564 * data/glr.c (b4_rhs_data): Use it.
1565 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
1566
1567 2008-11-18 Akim Demaille <demaille@gostai.com>
1568
1569 Remove incorrect mode specification.
1570 * data/glr.cc: Don't pretend it's C code.
1571
1572 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1573
1574 Simplify last patch slightly.
1575 * src/getargs.c (getargs): Here.
1576
1577 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1578
1579 Fix last warning from --enable-gcc-warnings.
1580 * src/getargs.c (getargs): Don't assign const address to non-const
1581 pointer.
1582
1583 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1584
1585 Don't let maintainer-*-check targets force a version update.
1586 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
1587 handled.
1588
1589 2008-11-17 Di-an Jan <dianj@freeshell.org>
1590
1591 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
1592 Align menus. Adjust word wrapping. Use node names for menu names.
1593 (Examples): Don't abbreviate node names.
1594 (LocalWords): Remove abbreviations.
1595 (Copying): Make description a sentence.
1596 (Java Action Features): Remove period to match the rest of menu.
1597
1598 2008-11-17 Di-an Jan <dianj@freeshell.org>
1599
1600 Handles several --enable-gcc-warnings.
1601 * src/getargs.c (command_line_location): Set parameters to void.
1602 * src/output.c (symbol_type_name_cmp): Make static.
1603 (symbols_by_type_name): Set parameters to void.
1604 (symbol_definitions_output): Remove unused parameter. Rename as...
1605 (prepare_symbol_definitions): this.
1606 (muscles_output): Move symbol_definitions_output to...
1607 (output): here as prepare_symbol_definitions.
1608 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
1609 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
1610
1611 2008-11-17 Di-an Jan <dianj@freeshell.org>
1612
1613 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
1614 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
1615
1616 2008-11-16 Akim Demaille <demaille@gostai.com>
1617
1618 Add missing $(EXEEXT).
1619 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
1620 "src/bison$(EXEEXT)".
1621 Reported by Di-an Jan.
1622
1623 2008-11-15 Akim Demaille <demaille@gostai.com>
1624
1625 * TODO: Update.
1626
1627 2008-11-15 Akim Demaille <demaille@gostai.com>
1628
1629 Formatting changes.
1630 * tests/input.at: here.
1631
1632 2008-11-15 Akim Demaille <demaille@gostai.com>
1633
1634 Remove duplicate header inclusion.
1635 * src/LR0.c: here.
1636
1637 2008-11-15 Akim Demaille <demaille@gostai.com>
1638
1639 * src/parse-gram.h, src/parse-gram.c: Regen.
1640
1641 2008-11-15 Akim Demaille <demaille@gostai.com>
1642
1643 Support parametric types.
1644
1645 There are two issues to handle: first scanning nested angle
1646 bracket pairs to support types such as std::pair< std::string,
1647 std::list<std::string> > >.
1648
1649 Another issue is to address idiosyncracies of C++: do not glue two
1650 closing angle brackets together (otherwise it's operator>>), and
1651 avoid sticking blindly a TYPE to the opening <, as it can result
1652 in '<:' which is a digraph for '['.
1653
1654 * src/scan-gram.l (brace_level): Rename as...
1655 (nesting): this.
1656 (SC_TAG): New.
1657 Implement support for complex tags.
1658 (tag): Accept
1659 , but not <.
1660 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
1661 (b4_symbol_variant): Leave space around types as parameters.
1662 * examples/variant.yy: Use nested template types and leading ::.
1663 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
1664 Rename as...
1665 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
1666 * tests/c++.at: Test parametric types.
1667
1668 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1669
1670 Test token.prefix.
1671 This is not sufficient, but we test at least that the make_SYMBOL
1672 interface is not affected by token.prefix. A more general test
1673 will be implemented when the support of token.prefix is generalized
1674 to more skeletons.
1675
1676 * tests/c++.at: One more variant test, using token.prefix.
1677
1678 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1679
1680 Test the make_TOKEN interface.
1681 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
1682 Factor the common code in yylex.
1683 Use it to test "%define lex_symbol".
1684
1685 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1686
1687 Formatting change.
1688
1689 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1690
1691 Simplify code for variants bench marks.
1692 * etc/bench.pl.in (&generate_grammar_list): Define and use
1693 location_type.
1694 Factor the common code in yylex.
1695
1696 2008-11-15 Akim Demaille <demaille@gostai.com>
1697
1698 Better error message.
1699 * bootstrap (find_tool): Fix the error message.
1700
1701 2008-11-15 Akim Demaille <demaille@gostai.com>
1702
1703 Update variant.yy to newest interface.
1704 * examples/variant.yy: Define lex_symbol.
1705 Adjust.
1706
1707 2008-11-15 Akim Demaille <demaille@gostai.com>
1708
1709 Don't use locations in variant.yy.
1710 * examples/variant.yy: Adjust to not using locations.
1711
1712 2008-11-15 Akim Demaille <demaille@gostai.com>
1713
1714 Comment changes.
1715 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
1716 comments for the license.
1717
1718 2008-11-15 Akim Demaille <demaille@gostai.com>
1719
1720 Remove tests/Makefile.am.
1721 * tests/Makefile.am: Rename as...
1722 * tests/local.mk: this.
1723 * Makefile.am, configure.ac: Adjust.
1724 * Makefile.am (DISTCLEANFILES): Define.
1725 (maintainer-check, maintainer-xml-check, maintainer-push-check):
1726 Remove, we no longer need to bounce to the real targets.
1727
1728 2008-11-15 Akim Demaille <demaille@gostai.com>
1729
1730 Comment changes.
1731
1732 2008-11-15 Akim Demaille <demaille@gostai.com>
1733
1734 djgpp/local.mk.
1735 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
1736 * djgpp/local.mk: this new file.
1737
1738 2008-11-15 Akim Demaille <demaille@gostai.com>
1739
1740 Remove doc/Makefile.am.
1741 * doc/Makefile.am: Rename as...
1742 * doc/local.mk: this.
1743 Adjust paths
1744 * Makefile.am, configure.ac: Adjust.
1745 * Makefile.am (MOSTLYCLEANFILES): New.
1746 * src/local.mk: Adjust.
1747
1748 2008-11-15 Akim Demaille <demaille@gostai.com>
1749
1750 Move sc_tight_scope into maint.mk.
1751 It does not work, and I don't know how it was supposed to work: it
1752 seems to be looking for sources in the build tree. I just moved
1753 it at a better place, fixing it is still required.
1754
1755 * src/local.mk (echo): Remove.
1756 (sc_tight_scope): Move to...
1757 * maint.mk: here.
1758
1759 2008-11-15 Akim Demaille <demaille@gostai.com>
1760
1761 Regen.
1762 * src/parse-gram.h, src/parse-gram.h: Regen.
1763
1764 2008-11-15 Akim Demaille <demaille@gostai.com>
1765
1766 Remove src/Makefile.am.
1767 * src/Makefile.am: Rename as...
1768 * src/local.mk: this.
1769 Prefix all the paths with src/.
1770 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
1771 (AM_CPPFLAGS): Find find in builddir/src.
1772 (YACC): Move the flags into...
1773 (AM_YFLAGS): here.
1774 * maint.mk (sc_tight_scope): Disable.
1775 It used to bounce to the version in src/Makefile.am which is now
1776 part of this very Makefile.
1777 * Makefile.am, configure.ac: Adjust.
1778 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
1779 include "..." to find files "here": we are no longer in src/, so
1780 qualify the includes with src/.
1781 * doc/Makefile.am (PREPATH): No longer include the top_builddir
1782 prefix.
1783 (.x.1): Adjust to be able to create src/foo from the top level
1784 Makefile, instead of going bounce to src/Makefile the creation of
1785 foo.
1786
1787 2008-11-15 Akim Demaille <demaille@gostai.com>
1788
1789 Remove useless variable.
1790 * doc/Makefile.am (srcsrcdir): Remove.
1791
1792 2008-11-15 Akim Demaille <demaille@gostai.com>
1793
1794 Remove data/Makefile.am.
1795 * data/Makefile.am: Rename as...
1796 * data/local.mk: this.
1797 Adjust paths.
1798 * Makefile.am, configure.ac: Adjust.
1799
1800 2008-11-15 Akim Demaille <demaille@gostai.com>
1801
1802 Remove etc/Makefile.am.
1803 * etc/Makefile.am: Rename as...
1804 * etc/local.mk: this.
1805 Adjust.
1806 * Makefile.am, configure.ac: Adjust.
1807
1808 2008-11-15 Akim Demaille <demaille@gostai.com>
1809
1810 Remove examples/local.mk.
1811 examples/calc++/Makefile.am might be interesting to keep as is, since
1812 it is an example in itself.
1813
1814 * examples/Makefile.am: Rename as...
1815 * examples/local.mk: this.
1816 Adjust.
1817 * Makefile.am, configure.ac: Adjust.
1818
1819 2008-11-15 Akim Demaille <demaille@gostai.com>
1820
1821 Remove build-aux/Makefile.am.
1822 Recursive Makefiles are really way too slow, let's get rid of some of
1823 them.
1824
1825 * build-aux/Makefile.am: Rename as...
1826 * build-aux/local.mk: this.
1827 Adjust paths.
1828 * Makefile.am, configure.ac: Adjust.
1829
1830 2008-11-15 Akim Demaille <demaille@gostai.com>
1831
1832 Provide convenience constructors for locations and positions.
1833 * data/location.cc (position::position): Accept file, line and
1834 column as arguments with default values.
1835 Always qualify initial line and column literals as unsigned.
1836 (location::location): Provide convenience constructors.
1837
1838 2008-11-15 Akim Demaille <demaille@gostai.com>
1839
1840 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
1841 token type.
1842 Using template buys us nothing, and makes it uselessly complex to
1843 construct a symbol. Besides, it could not be generalized to other
1844 languages, while make_FOO would work in C/Java etc.
1845
1846 * data/lalr1.cc (b4_symbol_): New.
1847 (b4_symbol): Use it.
1848 (b4_symbol_constructor_declaration_)
1849 (b4_symbol_constructor_definition_): Instead of generating
1850 specializations of an overloaded template function, just generate
1851 several functions whose names are forged from the token names
1852 without the token.prefix.
1853 (b4_symbol_constructor_declarations): Generate them for all the
1854 symbols, not just by class of symbol type, now that instead of
1855 specializing a function template by the token, we generate a
1856 function named after the token.
1857 (b4_symbol_constructor_specialization_)
1858 (b4_symbol_constructor_specializations): Remove.
1859 * etc/bench.pl.in: Adjust to this new API.
1860
1861 2008-11-13 Akim Demaille <demaille@gostai.com>
1862
1863 %define token.prefix.
1864 Provide a means to add a prefix to the name of the tokens as
1865 output in the generated files. Because of name clashes, it is
1866 good to have such a prefix such as TOK_ that protects from names
1867 such as EOF, FILE etc. But it clutters the grammar itself.
1868
1869 * data/bison.m4 (token.prefix): Empty by default.
1870 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
1871 * data/lalr1.cc (b4_symbol): Ditto.
1872
1873 2008-11-13 Akim Demaille <demaille@gostai.com>
1874
1875 Compute at M4 time some of the subtractions.
1876 * data/lalr1.cc (b4_subtract): New.
1877 (b4_rhs_data): Use it.
1878
1879 2008-11-13 Akim Demaille <demaille@gostai.com>
1880
1881 symbol::token.
1882 This allows the user to get the type of a token returned by yylex.
1883
1884 * data/lalr1.cc (symbol::token): New.
1885 (yytoknum_): Define when %define lex_symbol, independently of
1886 %debug.
1887 (yytoken_number_): Move into...
1888 (symbol::token): here, since that's the only use.
1889 The other one is YYPRINT which was not officially supported
1890 by lalr1.cc, and anyway it did not work since YYPRINT uses this
1891 array under a different name (yytoknum).
1892
1893 2008-11-13 Akim Demaille <demaille@gostai.com>
1894
1895 YYERRCODE.
1896 * TODO (YYERRCODE): Mention the case of $undef.
1897
1898 2008-11-13 Akim Demaille <demaille@gostai.com>
1899
1900 TODO: YYPRINT.
1901 * TODO (YYPRINT): New.
1902
1903 2008-11-13 Akim Demaille <demaille@gostai.com>
1904
1905 Comment changes.
1906 * data/lalr1.cc, data/yacc.c: Fix the description of the
1907 yytranslate and yytoknum tables.
1908
1909 2008-11-13 Akim Demaille <demaille@gostai.com>
1910
1911 Define make_symbol in the header.
1912 To reach good performances these functions should be inlined (yet
1913 this is to measure precisely). To this end they must be available
1914 to the caller.
1915
1916 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
1917 location_type with the class name.
1918 Since will now be output in the header, declare "inline".
1919 No longer use b4_symbol_constructor_specializations, but
1920 b4_symbol_constructor_definitions in the header.
1921 Don't call it in the *.cc file.
1922
1923 2008-11-13 Akim Demaille <demaille@gostai.com>
1924
1925 Define yytranslate in the header for lex_symbol.
1926 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
1927 into the header file when using %define lex_symbol.
1928 (yytranslate_): Declare inline.
1929
1930 2008-11-13 Akim Demaille <demaille@gostai.com>
1931
1932 Define the constructors of symbol_type in
1933 b4_symbol_constructor_definitions.
1934 The constructors are called by the make_symbol functions, which a
1935 forthcoming patch will move elsewhere. Hence the interest of
1936 putting them together.
1937
1938 The stack_symbol_type does not need to be moved, it is used only
1939 by the parser.
1940
1941 * data/lalr1.cc: Move symbol_type and symbol_base_type
1942 constructors into...
1943 (b4_symbol_constructor_definitions): here.
1944 Adjust.
1945
1946 2008-11-13 Akim Demaille <demaille@gostai.com>
1947
1948 Make it easier to move the definition of yytranslate_.
1949 Forthcoming changes will make it possible to use yytranslate_
1950 from outside the parser implementation file.
1951
1952 * data/lalr1.cc (b4_yytranslate_definition): New.
1953 Use it.
1954
1955 2008-11-13 Akim Demaille <demaille@gostai.com>
1956
1957 Remove useless class specification.
1958 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
1959 to refer to the class name to use a type defined by the class for
1960 arguments of member functions.
1961
1962 2008-11-13 Akim Demaille <demaille@gostai.com>
1963
1964 Finer input type for yytranslate.
1965 This patch is debatable: the tradition expects yylex to return an int
1966 which happens to correspond to token_number (which is an enum). This
1967 allows for instance to return characters (such as '*' etc.). But this
1968 goes against the stronger typing I am trying to have with the new
1969 lex interface which return a symbol_type. So in this case, feed
1970 yytranslate_ with a token_type.
1971
1972 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
1973 expect a token_type.
1974
1975 2008-11-13 Akim Demaille <demaille@gostai.com>
1976
1977 Honor lex-params in %define lex_symbol mode.
1978 * data/lalr1.cc: Use b4_lex_param.
1979
1980 2008-11-13 Akim Demaille <demaille@gostai.com>
1981
1982 Simplify names.
1983 * src/output.c (symbol_definitions_output): Rename symbol
1984 attributes type_name and has_type_name as type and has_type.
1985 * data/lalr1.cc: Adjust uses.
1986
1987 2008-11-13 Akim Demaille <demaille@gostai.com>
1988
1989 Use b4_type_names for the union type.
1990 The union used to compute the size of the variant used to iterate
1991 over the type of all the symbols, with a lot of redundancy. Now
1992 iterate over the lists of symbols having the same type-name.
1993
1994 * data/lalr1.cc (b4_char_sizeof_): New.
1995 (b4_char_sizeof): Use it.
1996 Adjust to be called with a list of numbers instead of a single
1997 number.
1998 Adjust its caller for new-line issues.
1999
2000 2008-11-13 Akim Demaille <demaille@gostai.com>
2001
2002 Define the "identifier" of a symbol.
2003 Symbols may have several string representations, for instance if
2004 they have an alias. What I call its "id" is a string that can be
2005 used as an identifier. May not exist.
2006
2007 Currently the symbols which have the "tag_is_id" flag set are
2008 those that don't have an alias. Look harder for the id.
2009
2010 * src/output.c (is_identifier): Move to...
2011 * src/symtab.c (is_identifier): here.
2012 * src/symtab.h, src/symtab.c (symbol_id_get): New.
2013 * src/output.c (symbol_definitions_output): Use it to define "id"
2014 and "has_id".
2015 Remove the definition of "tag_is_id".
2016 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
2017 "tag_is_id" were used to produce code.
2018 We still use "tag" for documentation.
2019
2020 2008-11-11 Akim Demaille <demaille@gostai.com>
2021
2022 Locations are no longer required by lalr1.cc.
2023 * data/lalr1.cc (_b4_args, b4_args): New.
2024 Adjust all uses of locations to make them optional.
2025 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
2026 (AT_CHECK_NAMESPACE): Check the use of locations.
2027 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
2028 without locations with lalr1.cc.
2029 Test these cases.
2030 * tests/output.at: Check lalr1.cc with and without location
2031 support.
2032 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
2033 Don't use locations.
2034
2035 2008-11-11 Akim Demaille <demaille@gostai.com>
2036
2037 AT_FULL_COMPILE.
2038 * tests/local.at (AT_FULL_COMPILE): New.
2039 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
2040
2041 2008-11-11 Akim Demaille <demaille@gostai.com>
2042
2043 Support parens in calc++.
2044 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
2045 * examples/calc++/test (run): Check the expected output.
2046 Adjust callers.
2047 Check parens too.
2048
2049 2008-11-11 Akim Demaille <demaille@gostai.com>
2050
2051 Simplify lalr1.cc since %defines is mandatory.
2052 * data/lalr1.cc: Remove useless calls to b4_defines_if.
2053
2054 2008-11-11 Akim Demaille <demaille@gostai.com>
2055
2056 TODO: yyfmt.
2057 * TODO (yysyntax_error): New item.
2058
2059 2008-11-11 Akim Demaille <demaille@gostai.com>
2060
2061 Prefer M4 to CPP.
2062 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
2063 YYERROR_VERBOSE.
2064
2065 2008-11-11 Akim Demaille <demaille@gostai.com>
2066
2067 Support i18n of the parse error messages.
2068 * TODO (lalr1.cc/I18n): Remove.
2069 * data/lalr1.cc (yysyntax_error_): Support the translation of the
2070 error messages, as done in yacc.c.
2071 Stay within the yy* pseudo namespace.
2072
2073 2008-11-11 Akim Demaille <demaille@gostai.com>
2074
2075 More TODO.
2076 * TODO (single stack, yysyntax_error): New.
2077
2078 2008-11-11 Akim Demaille <demaille@gostai.com>
2079
2080 Make it possible to return a symbol_type from yylex.
2081 * data/lalr1.cc (b4_lex_symbol_if): New.
2082 (parse): When lex_symbol is defined, expected yylex to return the
2083 complete lookahead.
2084 * etc/bench.pl.in (generate_grammar_list): Extend to support this
2085 yylex interface.
2086 (bench_variant_parser): Exercise it.
2087
2088 2008-11-11 Akim Demaille <demaille@gostai.com>
2089
2090 Remove useless bench case.
2091 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
2092 no longer used.
2093
2094 2008-11-11 Akim Demaille <demaille@gostai.com>
2095
2096 Improve display of directives.
2097 * etc/bench.pl.in (parse_term): Don't add useless eol.
2098
2099 2008-11-11 Akim Demaille <demaille@gostai.com>
2100
2101 Use string_cast in the bench.
2102 * etc/bench.pl.in (generate_grammar_list): Define and use
2103 string_cast.
2104
2105 2008-11-11 Akim Demaille <demaille@gostai.com>
2106
2107 Replace yychar with a Boolean.
2108 * data/lalr1.cc (parse::yychar): Replace by...
2109 (parse::yyempty): this.
2110
2111 2008-11-11 Akim Demaille <demaille@gostai.com>
2112
2113 Factor the tables.
2114 * TODO: New item.
2115
2116 2008-11-11 Akim Demaille <demaille@gostai.com>
2117
2118 Let yytranslate handle the eof case.
2119 * data/lalr1.cc (yytranslate_): Handle the EOF case.
2120 Adjust callers.
2121 No longer expect yychar to be equal to yyeof_, rather, test the
2122 lookahead's (translated) kind.
2123
2124 2008-11-11 Akim Demaille <demaille@gostai.com>
2125
2126 yychar cannot be empty in yyerrlab.
2127 * TODO (yychar == yyempty_): New.
2128 * data/lalr1.cc: Remove the handling of this case.
2129 This eases forthcoming changes related to yychar and yytranslate.
2130
2131 2008-11-11 Akim Demaille <demaille@gostai.com>
2132
2133 Bench: syntactic sugar for %define/#define.
2134 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
2135 (&bench_push_parser, bench_variant_parser): Use this feature.
2136 (&eat): New.
2137 Use it.
2138
2139 2008-11-11 Akim Demaille <demaille@gostai.com>
2140
2141 Less memory pressure on the "list" bench.
2142 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
2143 the values, to limit memory pressure.
2144
2145 2008-11-11 Akim Demaille <demaille@gostai.com>
2146
2147 Introduce make_symbol.
2148 make_symbol provides a means to construct a full symbol (kind,
2149 value, location) in a single shot. It is meant to be a Symbol
2150 constructor, parameterized by the symbol kind so that overloading
2151 would prevent incorrect kind/value pairs. Unfortunately
2152 parameterized constructors do not work well in C++ (unless the
2153 parameter also appears as an argument, which is not acceptable),
2154 hence the use of a function instead of a constructor.
2155
2156 * data/lalr1.cc (b4_symbol_constructor_declaration_)
2157 (b4_symbol_constructor_declarations)
2158 (b4_symbol_constructor_specialization_)
2159 (b4_symbol_constructor_specializations)
2160 (b4_symbol_constructor_definition_)
2161 (b4_symbol_constructor_definitions): New.
2162 Use them where appropriate to generate declaration, declaration of
2163 the specializations, and implementations of the templated
2164 overloaded function "make_symbol".
2165 (variant::variant): Always define a default ctor.
2166 Also provide a copy ctor.
2167 (symbol_base_type, symbol_type): New ctor overloads for value-less
2168 symbols.
2169 (symbol_type): Now public, so that functions such as yylex can use
2170 it.
2171
2172 2008-11-11 Akim Demaille <demaille@gostai.com>
2173
2174 Inform m4 whether a tag is a valid id.
2175 * src/output.c (is_identifier): New.
2176 (symbol_definitions_output): Use it to define tag_is_id.
2177 But maybe this should be done at m4 level?
2178
2179 2008-11-11 Akim Demaille <demaille@gostai.com>
2180
2181 Test 214 was failing: it greps with a pattern containing [ ]*
2182 which obviously meant to catch spaces and tabs, but contained only
2183 spaces. Tabulations in sources are a nuisance, so to simplify the
2184 matter, get rid of all the tabulations in the Java sources. The
2185 other skeletons will be treated equally later.
2186
2187 * data/java.m4, data/lalr1.java: Untabify.
2188 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
2189 tabulations are no longer generated.
2190
2191 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
2192
2193 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
2194 * configure.ac: Adjust usage.
2195 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2196 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2197 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
2198
2199 2008-11-10 Di-an Jan <dianj@freeshell.org>
2200
2201 Workaround Java's ``code too large'' problem for parser tables
2202 in most cases, by using one function per initialization.
2203 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
2204 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
2205 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
2206 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
2207 (yytname_): Use b4_typed_parser_table.
2208 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
2209 ``code too large'' error.
2210
2211 2008-11-10 Di-an Jan <dianj@freeshell.org>
2212
2213 * NEWS: Document them.
2214
2215 General Java skeleton improvements.
2216 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
2217 using gcj < 4.3 in the testsuite, according to comments in
2218 gnulib/m4/javacomp.m4.
2219 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
2220 location_type, position_type): Remove extraneous brackets from
2221 b4_percent_define_default.
2222 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
2223 m4_define and m4_define_default.
2224 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
2225 which marks the end of user code with appropriate syncline, like all
2226 the other skeletons.
2227 (b4_user_post_prologue): Add. Don't silently drop.
2228 (yylex): Remove.
2229 (parse): Inline yylex.
2230 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
2231 (%{...%}): Fix typo of %code imports.
2232 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
2233
2234 Support annotations on parser class with %define annotations.
2235 * data/lalr1.java (annotations): Add to parser class modifier.
2236 * doc/bison.texinfo (Java Parser Interface): Document
2237 %define annotations.
2238 (Java Declarations Summary): Document %define annotations.
2239 * tests/java.at (Java parser class modifiers): Test annotations.
2240
2241 Do not generate code for %error-verbose unless requested.
2242 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
2243 Make private. Make conditional on %error-verbose.
2244 (getErrorVerbose, setErrorVerbose): New.
2245 (yytnamerr_): Make conditional on %error-verbose.
2246 (yysyntax_error): Make some code conditional on %error-verbose.
2247 * doc/bison.texinfo (Java Bison Interface): Remove the parts
2248 about %error-verbose having no effect.
2249 (getErrorVerbose, setErrorVerbose): Document.
2250
2251 Move constants for token names to Lexer interface.
2252 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
2253 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
2254 (parse): Qualify EOF to Lexer.EOF.
2255 * doc/bison.texinfo (Java Parser Interface): Move documentation of
2256 EOF and token names to Java Lexer Interface.
2257 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
2258
2259 Make yyerror public.
2260 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
2261 (yyerror): Change to public. Add Javadoc comments. Use longer
2262 parameter names. Make the body rather than the declarator
2263 conditional on %locations.
2264 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
2265
2266 Allow user to add code to the constructor with %code init.
2267 * data/java.m4 (b4_init_throws): New, for %define init_throws.
2268 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
2269 Add %code init to the front of the constructor body.
2270 * doc/bison.texinfo (YYParser.YYParser): Document %code init
2271 and %define init_throws.
2272 (Java Declarations Summary): Document %code init and
2273 %define init_throws.
2274 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
2275 (Java constructor init and init_throws): Add tests.
2276
2277 2008-11-10 Akim Demaille <demaille@gostai.com>
2278
2279 Update TODO.
2280 * TODO (-D): is implemented.
2281 (associativity): Same precedence must have the same associativity.
2282 For instance, how can a * b / c be parsed if * is %left and / is
2283 %right?
2284 (YYERRORCODE, YYFAIL, YYBACKUP): New.
2285
2286 2008-11-10 Akim Demaille <demaille@gostai.com>
2287
2288 Formatting changes.
2289
2290 2008-11-10 Akim Demaille <demaille@gostai.com>
2291
2292 More information about the symbols.
2293 * src/output.c (type_names_output): Document all the symbols,
2294 including those that don't have a type-name.
2295 (symbol_definitions_output): Define "is_token" and
2296 "has_type_name".
2297 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
2298 type-name, now that they are defined too in b4_type_names.
2299
2300 2008-11-10 Akim Demaille <demaille@gostai.com>
2301
2302 Regen.
2303
2304 2008-11-10 Akim Demaille <demaille@gostai.com>
2305
2306 Make parser::yytranslate static.
2307 Small speedup (1%) on the list grammar. And makes yytranslate_
2308 available in non member functions.
2309
2310 * data/lalr1.cc (yytranslate_): Does not need to be a instance
2311 function.
2312
2313 2008-11-10 Akim Demaille <demaille@gostai.com>
2314
2315 Avoid trailing spaces.
2316 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
2317 * data/lalr1.cc: Don't indent before rule and symbol actions, as
2318 they can be empty, and anyway this incorrectly indents the first
2319 action.
2320
2321 2008-11-10 Akim Demaille <demaille@gostai.com>
2322
2323 Comment changes.
2324
2325 2008-11-10 Akim Demaille <demaille@gostai.com>
2326
2327 Use "enum" for integral constants.
2328 This is just nicer to read, I observed no speedup.
2329
2330 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
2331 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
2332 (yyuser_token_number_max_, yyundef_token_): Move into...
2333 (yytranslate_): here.
2334
2335 2008-11-10 Akim Demaille <demaille@gostai.com>
2336
2337 Shortcuts in bench directives.
2338 * etc/bench.pl.in (parse_dirs): New.
2339 Use it.
2340 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
2341 Create the benches in "benches/".
2342
2343 2008-11-10 Akim Demaille <demaille@gostai.com>
2344
2345 Formatting changes.
2346 * data/lalr1.cc: here.
2347
2348 2008-11-10 Akim Demaille <demaille@gostai.com>
2349
2350 Adjust verbose message to using emacs.
2351 * etc/bench.pl.in: Inform compilation-mode when we change the
2352 directory.
2353 (generate_grammar_list): Recognize %define "variant" in addition
2354 to %define variant.
2355
2356 2008-11-10 Akim Demaille <demaille@gostai.com>
2357
2358 Classify symbols by type-name.
2359 * src/uniqstr.h (UNIQSTR_CMP): New.
2360 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
2361 (type_names_output): New.
2362 (muscles_output): Use it.
2363 * data/lalr1.cc (b4_symbol_action_): Remove.
2364 (b4_symbol_case_, b4_type_action_): New.
2365 Adjust uses of b4_symbol_action_ to use b4_type_action_.
2366
2367 2008-11-10 Akim Demaille <demaille@gostai.com>
2368
2369 Change the handling of the symbols in the skeletons.
2370 Before we were using tables which lines were the symbols and which
2371 columns were things like number, tag, type-name etc. It is was
2372 difficult to extend: each time a column was added, all the numbers had
2373 to be updated (you asked for colon $2, not for "tag"). Also, it was
2374 hard to filter these tables when only a subset of the symbols (say the
2375 tokens, or the nterms, or the tokens that have and external number
2376 *and* a type-name) was of interest.
2377
2378 Now instead of monolithic tables, we define one macro per cell. For
2379 instance "b4_symbol(0, tag)" is a macro name which contents is
2380 self-decriptive. The macro "b4_symbol" provides easier access to
2381 these cells.
2382
2383 * src/output.c (type_names_output): Remove.
2384 (symbol_numbers_output, symbol_definitions_output): New.
2385 (muscles_output): Call them.
2386 (prepare_symbols): Define b4_symbols_number.
2387
2388 2008-11-10 Akim Demaille <demaille@gostai.com>
2389
2390 --trace=muscles
2391 * src/getargs.h, src/getargs.c (trace_muscle): New.
2392 (trace_types, trace_args): Support it.
2393 * src/output.c (output_skeleton): Use it.
2394
2395 2008-11-10 Akim Demaille <demaille@gostai.com>
2396
2397 muscles_output.
2398 * src/output.c (muscles_output): New, extracted from...
2399 (output_skeleton): here.
2400 Adjust.
2401
2402 2008-11-10 Akim Demaille <demaille@gostai.com>
2403
2404 Formatting changes.
2405
2406 2008-11-10 Akim Demaille <demaille@gostai.com>
2407
2408 Update the variant example.
2409 * examples/variant.yy: Formatting changes.
2410 One stage build.
2411
2412 2008-11-10 Akim Demaille <demaille@gostai.com>
2413
2414 Support constructor with an argument.
2415 This improves the "list" bench by 2%.
2416
2417 * data/lalr1.cc (variant::build): Add an overloaded version with
2418 an argument.
2419 * tests/c++.at (AT_CHECK_VARIANT): Check it.
2420
2421 2008-11-10 Akim Demaille <demaille@gostai.com>
2422
2423 Test variants.
2424 * tests/c++.at (AT_CHECK_VARIANTS): New.
2425 Use it with and without %define assert.
2426
2427 2008-11-10 Akim Demaille <demaille@gostai.com>
2428
2429 Add %precedence support.
2430 Unfortunately it is not possible to reuse the %prec directive. This
2431 is because to please POSIX, we do not require to end the rules with a
2432 semicolon. As a result,
2433
2434 foo: bar %prec baz
2435
2436 is ambiguous: either a rule which precedence is that of baz, or a rule,
2437 and then a declaration of the precedence of the token baz.
2438
2439 * doc/bison.texinfo: Document %precedence.
2440 (Precedence Only): New.
2441 * src/assoc.h, src/assoc.c (precedence_assoc): New.
2442 * src/conflicts.c (resolve_sr_conflict): Support it.
2443 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
2444 Parse it.
2445 * tests/calc.at: Use %precedence for NEG.
2446 * tests/conflicts.at (%precedence does not suffice)
2447 (%precedence suffices): New tests.
2448
2449 2008-11-09 Akim Demaille <demaille@gostai.com>
2450
2451 Make benches in a sub dirs.
2452 * etc/bench.pl.in ($dir): New.
2453 Use it.
2454 Check the use of constructors with an argument.
2455 (bench_variant_parser): Fix.
2456
2457 2008-11-09 Akim Demaille <demaille@gostai.com>
2458
2459 fix eof condition
2460
2461 2008-11-09 Akim Demaille <demaille@gostai.com>
2462
2463 Fix --help.
2464
2465 2008-11-09 Akim Demaille <demaille@gostai.com>
2466
2467 Require the generation of parse-gram.output.
2468 * src/Makefile.am (YACC): Pass --report=all.
2469
2470 2008-11-09 Akim Demaille <demaille@gostai.com>
2471
2472 Formatting changes.
2473
2474 2008-11-09 Akim Demaille <demaille@gostai.com>
2475
2476 Update TODO.
2477 * TODO: Remove obsolete items.
2478 Update others.
2479
2480 2008-11-09 Akim Demaille <demaille@gostai.com>
2481
2482 Enhance bench.pl.
2483 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
2484 (@token, $grammar, $bench): New.
2485 (generate_grammar_variant): Rename as...
2486 (generate_grammar_list): this.
2487 (generate_grammar): Adjust.
2488 (bench_grammar): Rename as...
2489 (bench): this.
2490 Use it in the various bench-marking routines.
2491 (-b, -g): New options.
2492
2493 2008-11-09 Akim Demaille <demaille@gostai.com>
2494
2495 Use a static hierarchy for symbols in the C++ parser.
2496 * data/lalr1.cc (symbol_base_type, symbol_type)
2497 (stack_symbol_type): Make it a static hierarchy.
2498 Adjust dependencies.
2499
2500 2008-11-09 Akim Demaille <demaille@gostai.com>
2501
2502 bench.pl -d, --directive.
2503 * etc/bench.pl.in (@directive): New.
2504 (&bench_grammar): Use it.
2505 (&bench_list_grammar): New, to provide access to the "variant"
2506 grammar.
2507 Use it.
2508 (getopts): Support -d, --directive.
2509
2510 2008-11-09 Akim Demaille <demaille@gostai.com>
2511
2512 Use inline for small operations.
2513 * data/lalr1.cc (symbol_base_type, symbol_type)
2514 (stack_symbol_type): Declare constructor and other operations as
2515 inline.
2516 (yy_destroy_): Inline.
2517
2518 2008-11-09 Akim Demaille <demaille@gostai.com>
2519
2520 Introduce a hierarchy for symbols.
2521 * data/lalr1.cc (symbol_base_type, symbol_type): New.
2522 (data_type): Rename as...
2523 (stack_symbol_type): this.
2524 Derive from symbol_base_type.
2525 (yy_symbol_value_print_): Merge into...
2526 (yy_symbol_print_): this.
2527 Rename as...
2528 (yy_print_): this.
2529 (yydestruct_): Rename as...
2530 (yy_destroy_): this.
2531 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
2532 (parser::parse): yyla is now of symbol_type.
2533 Use its type member instead of yytoken.
2534
2535 2008-11-09 Akim Demaille <demaille@gostai.com>
2536
2537 Rename data_type and stack_symbol_type.
2538 * data/lalr1.cc (data_type): Rename as...
2539 (stack_symbol_type): this.
2540
2541 2008-11-09 Akim Demaille <demaille@gostai.com>
2542
2543 Handle semantic value and location together.
2544 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
2545 yydata.value and yydata.location.
2546 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
2547 (YY_SYMBOL_PRINT): Now take semantic value and location as a
2548 single arg.
2549 Adjust all callers.
2550 (yydestruct_): New overload for a stack symbol.
2551
2552 2008-11-09 Akim Demaille <demaille@gostai.com>
2553
2554 Push a complete symbol, not connected parts.
2555 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
2556 state, value and location.
2557 Adjust callers.
2558
2559 2008-11-09 Akim Demaille <demaille@gostai.com>
2560
2561 Agregate yylval and yylloc.
2562 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
2563 (parser::yyla): this.
2564
2565 2008-11-09 Akim Demaille <demaille@gostai.com>
2566
2567 Rely on the state stack to display reduction traces.
2568 To display rhs symbols before a reduction, we used information
2569 about the rule reduced, which required the tables yyrhs and
2570 yyprhs. Now use rely only on the state stack to get the same
2571 information.
2572
2573 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
2574 Use them.
2575 (parser::yyrhs_, parser::yyprhs_): Remove.
2576 (parser::yy_reduce_print_): Use the state stack.
2577
2578 2008-11-09 Akim Demaille <demaille@gostai.com>
2579
2580 Fuse yyval and yyloc into yylhs.
2581 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
2582 yylhs.
2583 (parse): Replace yyval and yyloc with yylhs.value and
2584 yylhs.location.
2585 After a user action, compute yylhs.state earlier.
2586 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
2587 fresh error_token.
2588
2589 2008-11-09 Di-an Jan <dianj@freeshell.org>
2590
2591 Remove unused variable.
2592 * src/output.c (type_names_output): Remove unused variable sep.
2593
2594 2008-11-09 Paolo Bonzini <bonzini@gnu.org>
2595
2596 Change tests/output.at quoting.
2597 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
2598 expanding arguments.
2599
2600 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2601
2602 Don't add a semicolon to actions for %skeleton or %language.
2603 It breaks Java test cases as reported by Akim Demaille.
2604 * src/scan-code.l: Implement.
2605
2606 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2607
2608 Clean up %skeleton and %language priority implementation.
2609 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
2610 remove static qualifier because others will soon need to see it.
2611 (language_prio): Likewise.
2612 (getargs): Use command_line_prio rather than 0.
2613 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
2614 enum fields.
2615 (skeleton_prio): Extern it.
2616 (language_prio): Extern it.
2617 * src/parse-gram.y: Use grammar_prio rather than 1.
2618
2619 2008-11-07 Akim Demaille <demaille@gostai.com>
2620
2621 Moving push traces into yypush_.
2622 * data/lalr1.cc (yypush_): Now takes a optional trace message.
2623 Adjust all uses.
2624
2625 2008-11-07 Akim Demaille <demaille@gostai.com>
2626
2627 The single-stack C++ parser is now the standard one.
2628 * data/lalr1.cc: Rename as...
2629 * data/lalr1-split.cc: this.
2630 * data/lalr1-fusion.cc: Rename as...
2631 * data/lalr1.cc: this.
2632 * etc/bench.pl.in: Adjust.
2633
2634 2008-11-07 Akim Demaille <demaille@gostai.com>
2635
2636 Avoid empty-if warnings.
2637 Reported by Quentin Hocquet.
2638
2639 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
2640 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
2641
2642 2008-11-07 Akim Demaille <demaille@gostai.com>
2643
2644 Pass command line location to skeleton_arg and language_argmatch.
2645 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
2646 The location argument is now mandatory.
2647 Adjust all dependencies.
2648 (getargs): Use command_line_location.
2649
2650 2008-11-07 Akim Demaille <demaille@gostai.com>
2651
2652 -D, --define.
2653 * src/getargs.c (usage): Document -D.
2654 Fix help string for --locations.
2655 (command_line_location): New.
2656 (short_options, long_options, getargs): Support -D, --define.
2657 (getargs): Move -d support at the right place.
2658 * doc/bison.texinfo (Bison Options): Update.
2659 * tests/input.at (%define, --define): New.
2660
2661 2008-11-07 Akim Demaille <demaille@gostai.com>
2662
2663 Initialize the muscle table before parsing the command line.
2664 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
2665 (getargs): Define file_name.
2666 * src/main.c (main): Initialize muscle_tab before calling
2667 getargs.
2668 * src/muscle_tab.c (muscle_init): No longer define file_name, as
2669 its value is not available yet.
2670
2671 2008-11-07 Akim Demaille <demaille@gostai.com>
2672
2673 Locations without columns for command line arguments.
2674 * src/location.c (location_print): Don't display negative columns.
2675 * src/location.h: Document this.
2676
2677 2008-11-07 Akim Demaille <demaille@gostai.com>
2678
2679 Fix --help.
2680 * src/getargs.c (usage): Fix help string for -W.
2681
2682 2008-11-07 Akim Demaille <demaille@gostai.com>
2683
2684 Handle more general types of option arguments.
2685 * build-aux/cross-options.pl: The argument ends at the first
2686 space, not the first non-symbol character.
2687 Use @var for each word appearing the argument description.
2688
2689 2008-11-07 Akim Demaille <demaille@gostai.com>
2690
2691 Destroy the variants that remain on the stack in case of error.
2692 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
2693 destructor.
2694 Display the value only if yymsg is nonnull.
2695 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
2696
2697 2008-11-07 Akim Demaille <demaille@gostai.com>
2698
2699 Add "%define assert" to variants.
2700 This is used to help the user catch cases where some value gets
2701 ovewritten by a new one. This should not happen, as this will
2702 probably leak.
2703
2704 Unfortunately this uncovered a bug in the C++ parser itself: the
2705 lookahead value was not destroyed between two calls to yylex. For
2706 instance if the previous lookahead was a std::string, and then an int,
2707 then the value of the std::string was correctly taken (i.e., the
2708 lookahead was now an empty string), but std::string structure itself
2709 was not reclaimed.
2710
2711 This is now done in variant::build(other&) (which is used to take the
2712 value of the lookahead): other is not only stolen from its value, it
2713 is also destroyed. This incurs a new performance penalty of a few
2714 percent, and union becomes faster again.
2715
2716 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
2717 (b4_variant_if): New.
2718 (variant::built): New.
2719 Use it whereever the status of the variant changes.
2720 * etc/bench.pl.in: Check the penalty of %define assert.
2721
2722 2008-11-07 Akim Demaille <demaille@gostai.com>
2723
2724 Use "%define variant" in bench.pl.
2725 * etc/bench.pl.in: No longer use the pseudo directive %variants,
2726 just use %define variants.
2727
2728 2008-11-07 Akim Demaille <demaille@gostai.com>
2729
2730 Regen.
2731 * src/parse-gram.h, src/parse-gram.c: Regen.
2732
2733 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
2734
2735 Fix user actions without a trailing semicolon.
2736 Reported by Sergei Steshenko at
2737 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
2738 * THANKS (Sergei Steshenko): Add.
2739 * src/scan-code.l (SC_RULE_ACTION): Fix it.
2740 * tests/regression.at (Fix user actions without a trailing semicolon):
2741 New test case.
2742
2743 2008-11-04 Akim Demaille <demaille@gostai.com>
2744
2745 Use b4_copyright_years.
2746 * data/yacc.c (b4_copyright_years): New.
2747 Fix its value according to the comments in the file.
2748 Use it and undefine it.
2749
2750 2008-11-04 Akim Demaille <demaille@gostai.com>
2751
2752 Formatting changes.
2753 * data/lalr1-fusion.cc, src/parse-gram.y: here.
2754
2755 2008-11-04 Akim Demaille <demaille@gostai.com>
2756
2757 Formatting changes.
2758 * data/lalr1-fusion.cc: here.
2759
2760 2008-11-04 Akim Demaille <demaille@gostai.com>
2761
2762 Use strict on bench.pl.
2763 * etc/bench.pl.in (&run, &generate_grammar): New.
2764 Rename the grammar generating functions for consistency.
2765 Change the interface so that the list of benches to run is passed
2766 as (optionless) arguments.
2767 (&compile): Use &run.
2768
2769 2008-11-04 Akim Demaille <demaille@gostai.com>
2770
2771 Remove spurious initial empty lines.
2772 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
2773 * data/yacc.c: End the @output lines with an @.
2774
2775 2008-11-04 Akim Demaille <demaille@gostai.com>
2776
2777 Improve the display of sizes.
2778 * etc/bench.p.in: Higher precision.
2779 Sort by decreasing size.
2780
2781 2008-11-04 Akim Demaille <demaille@gostai.com>
2782
2783 Don't memcpy C++ structures.
2784 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
2785 arguments.
2786 (variant::build): New overload for
2787 copy-construction-that-destroys.
2788 (variant::swap): New.
2789 (parser::yypush_): Use it in variant mode.
2790
2791 2008-11-04 Akim Demaille <demaille@gostai.com>
2792
2793 Better defaults for bench.pl.
2794 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
2795 default values.
2796 Adjust &verbose uses.
2797 (-q, --quiet): New.
2798
2799 2008-11-04 Akim Demaille <demaille@gostai.com>
2800
2801 Make variant.yy more complex.
2802 std::list cannot be copied via memcpy, they are more demanding than
2803 std::string. Use one std::list to strengthen the test.
2804
2805 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
2806 Adjust.
2807 Create a list of strings, instead of a single large string.
2808
2809 2008-11-04 Akim Demaille <demaille@gostai.com>
2810
2811 bench.pl --bench.
2812 * etc/bench.pl.in (--bench, $bench): New.
2813
2814 2008-11-04 Akim Demaille <demaille@gostai.com>
2815
2816 Sort methods.
2817 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
2818 Define it after as().
2819
2820 2008-11-04 Akim Demaille <demaille@gostai.com>
2821
2822 Useless parens.
2823 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
2824
2825 2008-11-04 Akim Demaille <demaille@gostai.com>
2826
2827 Issue missing synclines after user actions.
2828 * data/c.m4 (b4_case): Issue synclines on the output file.
2829
2830 2008-11-04 Akim Demaille <demaille@gostai.com>
2831
2832 Remove trailing empty line.
2833 * data/lalr1-fusion.cc: Don't add an empty line after the user's
2834 epilogue.
2835
2836 2008-11-04 Akim Demaille <demaille@gostai.com>
2837
2838 Fix output of copyright years.
2839 * data/bison.m4 (b4_copyright): Fix the indentation of the
2840 copyright year paragraph.
2841 Use b4_copyright_years when no years are given.
2842 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
2843 (b4_copyright_years): New.
2844 Use it.
2845
2846 2008-11-04 Akim Demaille <demaille@gostai.com>
2847
2848 Avoid the spurious initial empty line.
2849 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
2850 the end of @output request to suppress the empty line that
2851 results.
2852
2853 2008-11-04 Akim Demaille <demaille@gostai.com>
2854
2855 Remove parser::rhs_number_type.
2856 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
2857 (yyrhs_): Use b4_table_define.
2858
2859 2008-11-04 Akim Demaille <demaille@gostai.com>
2860
2861 Fix iteration type.
2862 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
2863
2864 2008-11-04 Akim Demaille <demaille@gostai.com>
2865
2866 Factor the declaration of the integer tables.
2867 * data/lalr1-fusion.cc (b4_table_define): New.
2868 Use it.
2869
2870 2008-11-03 Akim Demaille <demaille@gostai.com>
2871
2872 Fix indentation of tables in lalr1.cc
2873 * data/lalr1-fusion.cc: Fix the indentation.
2874
2875 2008-11-03 Akim Demaille <demaille@gostai.com>
2876
2877 Destroy the lhs symbols after reduction.
2878 * data/lalr1-fusion.cc (parse): After the user action, when in
2879 variant mode, destroy the lhs symbols.
2880
2881 2008-11-03 Akim Demaille <demaille@gostai.com>
2882
2883 Simplify yysyntax_error_ use.
2884 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
2885 type, but make it unnamed in the declaration when it is not used.
2886
2887 2008-11-03 Akim Demaille <demaille@gostai.com>
2888
2889 Let yy::variant::build return an lvalue.
2890 * data/lalr1-fusion.cc (variant::build): Return a reference to the
2891 object.
2892
2893 2008-11-03 Akim Demaille <demaille@gostai.com>
2894
2895 Define yy::variant only when needed.
2896 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
2897 used.
2898
2899 2008-11-03 Akim Demaille <demaille@gostai.com>
2900
2901 Bench the three-stack lalr1.cc.
2902 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
2903 one-stack one.
2904
2905 2008-11-03 Akim Demaille <demaille@gostai.com>
2906
2907 Fail on parse error in calc++.
2908 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
2909 status.
2910 * examples/calc++/test ($me, $number, $exit, run): New.
2911 Use them to propagate errors to the exit status.
2912
2913 2008-11-03 Akim Demaille <demaille@gostai.com>
2914
2915 Don't specify the skeleton twice in the example.
2916 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
2917 file does what is needed.
2918
2919 2008-11-03 Akim Demaille <demaille@gostai.com>
2920
2921 bench: Improve output.
2922 * etc/bench.pl.in (bench_grammar): Tune the printf format.
2923
2924 2008-11-03 Akim Demaille <demaille@gostai.com>
2925
2926 bench: check impact of %debug on variants.
2927 * etc/bench.pl.in (variant_grammar): Fix the computation of
2928 $variant.
2929 Generate a grammar file that can work with or without %debug.
2930 Do use the @directive.
2931 (bench_variant_parser): Check impact of %debug.
2932 (@directives): Rename all the occurrences to...
2933 (@directive): this, for consistency.
2934
2935 2008-11-03 Akim Demaille <demaille@gostai.com>
2936
2937 bench: report the size too.
2938 * etc/bench.pl.in ($iterations): Defaults to -3.
2939 (&bench_grammar): Require hireswallclock.
2940 Compute and display the size of the result.
2941 More comments.
2942
2943 2008-11-03 Akim Demaille <demaille@gostai.com>
2944
2945 bench: More use of the verbosity level.
2946 * etc/bench.pl.in ($verbose, &verbose): New.
2947 Use them.
2948 More POD documentation.
2949
2950 2008-11-03 Akim Demaille <demaille@gostai.com>
2951
2952 bench.pl: a command line interface
2953 * etc/bench.pl.in: More doc.
2954 Some fixes in the documentation.
2955 ($cflags, $iterations, &help, &getopt): New.
2956 Use them.
2957 (&variant_grammar): Let the number of stages be 10 times what is
2958 specified.
2959
2960 2008-11-03 Akim Demaille <demaille@gostai.com>
2961
2962 Bench the use of Boost.Variants.
2963 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
2964 New.
2965 (&compile): Be ready to compile C++ parsers.
2966 (&bench_push_parser): Move debug information to the outermost
2967 level.
2968 * THANKS: Add Michiel De Wilde.
2969
2970 2008-11-03 Akim Demaille <demaille@gostai.com>
2971
2972 bench.pl: Pass directives as a list instead of as a string.
2973 * etc/bench.pl.in (&directives): New.
2974 (&triangular_grammar, &calc_grammar): Use it to format the Bison
2975 directives.
2976 (&triangular_grammar): Do use the directives (were ignored).
2977 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
2978 directives.
2979
2980 2008-11-03 Akim Demaille <demaille@gostai.com>
2981
2982 Improve genericity of bench.pl.
2983 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
2984 argument.
2985 (&bench_push_parser): New.
2986 Call it.
2987
2988 2008-11-03 Akim Demaille <demaille@gostai.com>
2989
2990 Add documentation to bench.pl.
2991 * etc/bench.pl.in: Comment changes.
2992
2993 2008-11-03 Akim Demaille <demaille@gostai.com>
2994
2995 Fuse the three stacks into a single one.
2996
2997 In order to make it easy to perform benchmarks to ensure that
2998 there are no performance loss, lalr1.cc is forked into
2999 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
3000 lalr1.cc.
3001
3002 Meanwhile, to make sure that lalr1-fusion.cc is correctly
3003 exercized by the test suite, the user must install a symbolic link
3004 from lalr1.cc to it.
3005
3006 Instead of having three stacks (state, value, location), use a
3007 stack of triples. This considerably simplifies the code (and it
3008 will be easier not to require locations as currently does the C++
3009 parser), and also gives a 10% speedup according to
3010 etc/bench (probably mainly since memory allocation is done once
3011 instead of three times).
3012
3013 Another motivation is to make it easier to destruct properly
3014 semantic values: now that they are bound to their state (hence
3015 symbol type) it will be easier to call the appropriate destructor.
3016
3017 These changes should probably benefit the C parser too.
3018
3019 * data/lalr1.cc: Copy as...
3020 * data/lalr1-fusion.cc: this new file.
3021 (b4_rhs_value, b4_rhs_location): New definitions overriding those
3022 from c++.m4.
3023 (state_stack_type, semantic_stack_type, location_stack_type)
3024 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
3025 (data_type, stack_type, yystack_): New.
3026 (YYLLOC_DEFAULT, yypush_): Adjust.
3027 (yyerror_range): Now based on data_type, not location_type.
3028
3029 2008-11-03 Akim Demaille <demaille@gostai.com>
3030
3031 Push the state, value, and location at the same time.
3032 This is needed to prepare a forthcoming patch that fuses the three
3033 stacks into one.
3034
3035 * data/lalr1.cc (parser::yypush_): New.
3036 (parser::yynewstate): Change the semantics: instead of arriving to
3037 this label when value and location have been pushed, but yystate
3038 is to be pushed on the state stack, now the three of them must
3039 have been pushed before. yystate still must be the new state.
3040 This allows to use yypush_ everywhere instead of individual
3041 handling of the stacks.
3042
3043 2008-11-03 Akim Demaille <demaille@gostai.com>
3044
3045 Prefer references to pointers.
3046 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
3047 definition to use references instead of pointers.
3048 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
3049 Take the value and location as references.
3050 Adjust callers.
3051
3052 2008-11-03 Akim Demaille <demaille@gostai.com>
3053
3054 stack::size instead of stack::height.
3055 * data/lalr1.cc (stack::height): Rename as...
3056 (stack::size): this.
3057 Fix the output type.
3058 Comment changes.
3059
3060 2008-11-03 Akim Demaille <demaille@gostai.com>
3061
3062 Use variants to support objects as semantic values.
3063 This patch was inspired by work by Michiel De Wilde. But he used
3064 Boost variants which (i) requires Boost on the user side, (ii) is
3065 slow, and (iii) has useless overhead (the parser knows the type of
3066 the semantic value there is no reason to duplicate this
3067 information as Boost.Variants do).
3068
3069 This implementation reserves a buffer large enough to store the
3070 largest objects. yy::variant implements this buffer. It was
3071 implemented with Quentin Hocquet.
3072
3073 * src/output.c (type_names_output): New.
3074 (output_skeleton): Invoke it.
3075 * data/c++.m4 (b4_variant_if): New.
3076 (b4_symbol_value): If needed, provide a definition for variants.
3077 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
3078 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
3079 (b4_char_sizeof, yy::variant): New.
3080 (parser::parse): If variants are requested, define
3081 parser::union_type, parser::variant, change the definition of
3082 semantic_type, construct $$ before running the user action instead
3083 of performing a default $$ = $1.
3084 * examples/variant.yy: New.
3085 Based on an example by Michiel De Wilde.
3086
3087 2008-11-03 Akim Demaille <demaille@gostai.com>
3088
3089 Parameterize the extraction of semantic values.
3090 To make future changes easier, no longer rely on ".TYPE" being the
3091 way to get a semantic value.
3092
3093 * data/c.m4 (b4_symbol_value): New.
3094 Use it.
3095 * data/c++.m4, data/yacc.c: Use it.
3096 * data/glr.c: Use b4_symbol_value.
3097 (b4_rhs_data): New.
3098 Use it.
3099
3100 2008-11-03 Akim Demaille <demaille@gostai.com>
3101
3102 Prepare easier M4 changes.
3103 * data/lalr1.cc: Use escaped [] instead of literals to prepare
3104 future changes.
3105
3106 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3107
3108 Initiate further development.
3109 * NEWS: Create an empty section for new entries.
3110 * gnulib: Update submodule to HEAD.
3111
3112 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3113
3114 * NEWS: Version 2.4.
3115
3116 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3117
3118 Prepare for next release.
3119 * NEWS: Briefly mention changes since 2.3b.
3120 * README: Say GNU m4 1.4.6, which we've been requiring in release
3121 announcements already, not 1.4.3, which breaks the build.
3122
3123 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3124
3125 Say %language is experimental.
3126 We're thinking of extending it's effect on output file naming. See the
3127 thread at
3128 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
3129 * NEWS: Say it's experimental.
3130 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
3131 recommend it over %skeleton for now.
3132 (Bison Options): Likewise.
3133 (C++ Bison Interface): Use %skeleton not %language.
3134 (Calc++ Parser): Use %skeleton not %language.
3135 * src/getargs.c (usage): Say it's experimental.
3136
3137 2008-11-01 Di-an Jan <dianj@freeshell.org>
3138 Paolo Bonzini <bonzini@gnu.org>
3139
3140 Support all Java parser class modifiers.
3141 * data/java.m4 (b4_percent_define_get3): New.
3142 (b4_final_if, b4_strictfp_if): New.
3143 * data/lalr1.java (final, strictfp, extends, implements): Support.
3144 * doc/bison.texinfo (final, strictfp, extends, implements): Add
3145 documentation.
3146 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
3147 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
3148 (AT_CHECK_JAVA_GREP): New.
3149 (Java parser class modifiers): New test.
3150 (Java parser class extends and implements): New test.
3151
3152 Model exception propagation better with throws and lex_throws.
3153 * data/java.m4 (b4_list2): New.
3154 (throws): Change default.
3155 * data/lalr1.java (yyaction): Add throws.
3156 (parse): Add lex_throws in addition to throws.
3157 * doc/bison.texinfo (throws, lex_throws): Add documentation.
3158 * tests/java.at (Java throws specifications): New test.
3159
3160 Improve documentation for Java parsers.
3161 * doc/bison.texinfo (Java Parsers): Add subsections.
3162 Don't quote first argument of %define.
3163 (Java Bison Interface): Document output files. Move documentation
3164 of parser class and merge into Java Parser Interface. Document
3165 features that error out. Document directives with no effect.
3166 Move note about Javadoc higher.
3167 (Java Semantic Values): Explicitly mention stype.
3168 Document that generic types cannot be used.
3169 (Java Location Values): Use @deftypeivar. Document constructors.
3170 Correct return value for toString.
3171 (Java Parser Interface): List undocumented constants/fields.
3172 Move documentation of fields added by %parse-param closer to list
3173 of members. Document that token names are added as fields.
3174 Document constructors accurately. Remove error method.
3175 (Java Scanner Interface): Move note on %pure-parser to Java Bison
3176 Interface. Describe %code lexer and yylex accutately.
3177 Remove documentation that does not match the code.
3178 (Java Action Features): New.
3179 (Java Differences): Add reference. Add item on semantic values.
3180 Add note about @{ ... @}. Clarify %% epilogue placement.
3181 (Java Declarations Summary): New.
3182
3183 Fix Java skeleton.
3184 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
3185 (b4_remove_comma): Quote test argument.
3186 (b4_identification): Remove "bison" field.
3187 * tests/java.at (Java parser class and package names): New test.
3188 (Java %parse-param and %lex-param): New test.
3189 (Java stype, position_class and location_class): New test.
3190
3191 2008-10-31 Di-an Jan <dianj@freeshell.org>
3192
3193 * data/lalr1.jave: Update copyright years.
3194 (YYParser): Correct name of "generated from" file in Javadoc:
3195 use b4_file_name instead of @ofile@.
3196 (Location constructor): Correct Javadoc parameter name.
3197 (yylloc): Add missing opening m4 quote after b4_location_if.
3198 This removes a stray [ in the Javadoc of Lexer.getStartPos.
3199 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
3200 (YYParser constructor): Correct Javadoc parameter name.
3201
3202 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
3203
3204 Always put auxiliary code files in the same dir as other output files.
3205 * src/files.c (compute_file_name_parts): When the user specifies
3206 --output but not --file-prefix, extract the directory prefix from the
3207 file prefix not from the grammar file name. This affects the location
3208 of files like location.hh generated by the C++ skeleton. The includes
3209 in the other output files require this fix.
3210 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
3211 for expected output files.
3212 (Output files): Add a test for the above.
3213
3214 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
3215
3216 * gnulib: Update submodule to HEAD.
3217
3218 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3219
3220 Update copyright year.
3221 * src/files.c: Here.
3222
3223 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
3224
3225 Don't overwrite the input file.
3226 * src/files.c (output_file_name_check): Fatal error if using input file
3227 for output.
3228 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
3229 argument.
3230 (Conflicting output files): Add test.
3231
3232 2008-10-28 Akim Demaille <demaille@gostai.com>
3233
3234 Space changes.
3235 * data/lalr1.cc: Formatting changes.
3236
3237 2008-10-28 Akim Demaille <demaille@gostai.com>
3238
3239 Don't define debugging functions when !YYDEBUG.
3240 * data/lalr1.cc (debug_stream, set_debug_stream)
3241 (debug_level_type, debug_level, set_debug_level): Don't
3242 declare them when YYDEBUG is not defined.
3243 The implementation are already YYDEBUG-aware.
3244
3245 2008-10-28 Akim Demaille <demaille@gostai.com>
3246
3247 Prefer "continue" for empty loop bodies.
3248 * etc/bench.pl.in: Use "continue" instead of {}.
3249
3250 2008-10-28 Akim Demaille <demaille@gostai.com>
3251
3252 Space and comments changes.
3253 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
3254 * data/c.m4, data/lalr1.cc: Space changes.
3255
3256 2008-10-28 Akim Demaille <demaille@gostai.com>
3257
3258 Make gnulib a submodule.
3259 * gnulib: New.
3260 * .gitmodules (gnulib): New.
3261
3262 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
3263
3264 Fix yyerror_range for user-defined location type in C++. Reported by
3265 Georg Sauthoff at
3266 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
3267 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
3268 * THANKS (Georg Sauthoff): Add.
3269
3270 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
3271
3272 Update several administrative files mainly to facilitate releasing.
3273 * HACKING (Administrivia): Make the git-merge-changelog notes more
3274 helpful.
3275 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
3276 (Release Procedure): Update for git and add numerous details that were
3277 previously missing.
3278 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
3279 * maint.mk (announcement): Don't list bison as a bootstrap tool so
3280 that announcements don't claim we bootstrapped with whatever bison
3281 happened to be in PATH. Add flex as a bootstrap tool.
3282 * Makefile.maint: Remove, previously replaced by maint.mk.
3283 * Makefile.cfg: Remove, and migrate settings to...
3284 * cfg.mk: ... here for the sake of `make announcement'.
3285 * bootstrap.conf (gnulib_modules): Add announce-gen.
3286 * README: Say GNU Bison instead of just Bison. Suggested by Karl
3287 Berry.
3288
3289 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
3290
3291 Small but important bugfixes for the Java skeleton.
3292 * data/lalr1.java (yyerror): Change Location to b4_location_type.
3293 (yy_symbol_print): Call toString on yyvaluep.
3294
3295 2008-08-29 Akim Demaille <demaille@gostai.com>
3296
3297 Clarify UPDATED use.
3298 * doc/bison.texinfo: It refers to the last edition of this file,
3299 not to the release date of Bison.
3300 Reported by Joel E. Denny.
3301
3302 2008-08-29 Akim Demaille <demaille@gostai.com>
3303
3304 * README: Update FAQ pointer.
3305 Reported by Joel E. Denny.
3306
3307 2008-08-27 Eric Blake <ebb9@byu.net>
3308
3309 Resync m4sugar from autoconf.
3310 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
3311 (m4_init): Adjust to latest m4.git changes.
3312 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
3313 effects.
3314 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
3315 (_m4_list_cmp): Reduce side effects.
3316
3317 2008-08-27 Akim Demaille <demaille@gostai.com>
3318
3319 Check yyerrok in calc.at.
3320 * tests/calc.at (calc.y): Use yyerrok on "( error )".
3321 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
3322 expected.
3323
3324 2008-08-27 Akim Demaille <demaille@gostai.com>
3325
3326 Support yyerrok in lalr1.cc.
3327 YYBACKUP is still to import back into lalr1.cc.
3328 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
3329
3330 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3331
3332 For maintainer-check*, don't recompile for a $(VERSION) update.
3333 * cfg.mk: New file.
3334 (_is-dist-target): Override the one in GNUmakefile.
3335 * Makefile.am (EXTRA_DIST): Add cfg.mk.
3336
3337 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3338
3339 Update for recent change to gnulib.
3340 * src/parse-gram.y: Don't include strverscmp.h. It comes from
3341 string.h now.
3342
3343 2008-08-15 Eric Blake <ebb9@byu.net>
3344
3345 Remaining m4sugar merge from autoconf.
3346 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
3347 * data/m4sugar/foreach.m4: New file, copied from autoconf.
3348 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
3349 * src/output.c (output_skeleton): Tell m4 how to find it.
3350
3351 Partial m4sugar merge from autoconf: m4_map.
3352 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
3353 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
3354 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
3355 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
3356 for empty list.
3357 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
3358 Likewise.
3359 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
3360 declares it.
3361
3362 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
3363
3364 Keep .version and PACKAGE_VERSION in sync.
3365 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
3366 dependency, and add comments justifying this in more detail. Discussed
3367 starting at
3368 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
3369
3370 2008-08-06 Eric Blake <ebb9@byu.net>
3371
3372 Partial m4sugar merge from autoconf: m4_shiftn.
3373 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
3374 (m4_shift2, m4_shift3): New macros.
3375 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
3376 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
3377 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
3378 * data/java.m4 (b4_remove_comma): Likewise.
3379
3380 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
3381 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
3382 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
3383 (m4_init): Consolidate wrapped text into single m4_wrap.
3384 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
3385 in wrapped text.
3386
3387 2008-08-05 Eric Blake <ebb9@byu.net>
3388
3389 Partial m4sugar merge from autoconf: builtins, version.m4.
3390 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
3391 (m4_prepend): Remove, as it is unused and inherently quadratic,
3392 whereas m4_append is linear in newer m4.
3393 (m4_mkstemp): New builtin.
3394 (m4_symbols): Make rename conditional.
3395 (m4_version_prereq): Ensure fatal error if used in bison, which
3396 intentionally lacks version.m4.
3397
3398 Fix comments in m4sugar.
3399 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
3400
3401 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
3402
3403 Update for recent .gitignore fix in Gnulib.
3404 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
3405 anchored .gitignore entries.
3406
3407 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
3408
3409 Set gnu or gnits strictness.
3410 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
3411 development and gnits strictness for releases. Based on Eric Blake's
3412 suggestion at
3413 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
3414
3415 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
3416
3417 * NEWS: Clarify documentation of %language.
3418
3419 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
3420
3421 Support usage of git-merge-changelog.
3422 * .gitattributes: New.
3423 * HACKING: Document usage of git-merge-changelog.
3424 * bootstrap: Install git-merge-changelog entries in .git/config
3425 if appropriate.
3426
3427 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3428
3429 Remove remaining dependence on CVS Id keyword.
3430 * ChangeLog: For the sake of people still using CVS, don't use dollars
3431 when mentioning Id.
3432 * data/xslt/bison.xsl: Remove Id from header comments, where it was
3433 unusual anyway.
3434 * data/xslt/xml2dot.xsl: Likewise.
3435 * data/xslt/xml2text.xsl: Likewise.
3436 * data/xslt/xml2xhtml.xsl: Likewise.
3437 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
3438 * doc/Makefile.am (neutralize): Remove, no longer needed.
3439 (.x.1): Don't use neutralize.
3440 (edit): Don't substitute for ID.
3441 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
3442
3443 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3444
3445 Fix dependence on computed configure variables.
3446 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
3447 $(top_srcdir)/configure.ac so that changes to computed variables, such
3448 as PACKAGE_VERSION, are seen.
3449 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
3450
3451 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
3452
3453 Update copyright dates for recent changes.
3454 * Makefile.am: Here.
3455 * src/Makefile.am: Here.
3456 * src/reduce.c: Here.
3457 * tests/reduce.at: Here.
3458
3459 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
3460
3461 Use git-version-gen for version names between releases.
3462 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
3463 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
3464 * .prev-version: New.
3465 * .version.in: Remove.
3466 * ChangeLog: Remove the Id previously used for capturing the CVS
3467 revision.
3468 * GNUmakefile: Remove, now copied from Gnulib.
3469 * Makefile.am: Add code suggested by comments in
3470 build-aux/git-version-gen.
3471 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
3472 .prev-version, and .version.
3473 * NEWS (2.3b+): Rename to...
3474 (?.?): ... this because we're dropping the "+" version naming scheme,
3475 but, in general, we still can't be sure of our next release name.
3476 * bootstrap: Add a quick hack to remove from .gitignore the
3477 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
3478 entry. This should really be fixed in gnulib instead.
3479 * bootstrap.conf (gnulib_modules): Add gnumakefile.
3480 * configure.ac (AC_INIT): Set version name by invoking
3481 build-aux/git-version-gen.
3482 (AC_CONFIG_FILES): Remove .version, now generated by
3483 build-aux/git-version-gen.
3484 * maint.mk: New, copied from coreutils.
3485 * doc/.cvsignore (bison.1): Add.
3486 * doc/.gitignore (/bison.1): Add.
3487 * doc/bison.1: Remove, generated.
3488 * src/.cvsignore (revision.c): Remove.
3489 * src/.gitignore (/revision.c): Remove.
3490 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
3491 (BUILT_SOURCES): Remove revision.c.
3492 (revision.c): Remove.
3493 * src/getargs.c (version): Don't print revision after the VERSION.
3494 * src/revision.h: Remove.
3495
3496 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
3497
3498 Fix untranslatable composition of sentences. Reported by Goran
3499 Uddeborg at
3500 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
3501 * THANKS (Goran Uddeborg): Add.
3502 * src/reduce.c (reduce_print): Report the number of nonterminals and
3503 rules useless in the grammar in separate sentences.
3504 * tests/reduce.at (Useless Rules): Update output.
3505 (Reduced Automaton): Likewise.
3506 (Underivable Rules): Likewise.
3507 (Empty Language): Likewise.
3508
3509 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
3510
3511 Fix some .gitignore and .cvsignore problems.
3512 * bootstrap (insert_sorted_if_absent): Replace all uses with...
3513 (insert_vc_ignore): ... this new function, which prepends `/' to all
3514 .gitignore entries before passing them to insert_sorted_if_absent.
3515 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
3516 .cvsignore files are maintained even though Bison developers run
3517 bootstrap while using Git.
3518 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
3519 unneeded by Bison.
3520 (gnulib): Add.
3521 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
3522 unneeded. Reported by Eric Blake.
3523 * lib/.gitignore (/*~): Add.
3524 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
3525 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
3526 Blake.
3527 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
3528
3529 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
3530
3531 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
3532 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
3533 * bootstrap.conf (gnulib_modules): Add unsetenv.
3534 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
3535 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
3536 (/setenv.m4): Add.
3537 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
3538 the first argument because it may become position-dependent, and unset
3539 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
3540 Add comments explaining these issues in more detail.
3541
3542 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
3543
3544 Add .gitignore everywhere based on .cvsignore.
3545 * .gitignore: New.
3546 * build-aux/.gitignore: New.
3547 * data/.gitignore: New.
3548 * doc/.gitignore: New.
3549 * etc/.gitignore: New.
3550 * examples/.gitignore: New.
3551 * examples/calc++/.gitignore: New.
3552 * lib/.gitignore: New.
3553 * m4/.gitignore: New.
3554 * po/.gitignore: New.
3555 * runtime-po/.gitignore: New.
3556 * src/.gitignore: New.
3557 * tests/.gitignore: New.
3558
3559 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3560
3561 * NEWS (2.3b+): New section, empty for now.
3562 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
3563
3564 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3565
3566 * NEWS (2.3b): Update release date since there has been a delay in
3567 getting the announcements and tarballs out.
3568
3569 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
3570
3571 * NEWS: Version 2.3b.
3572 * configure.ac (AC_INIT): Likewise.
3573 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
3574
3575 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
3576
3577 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
3578 been doing it for years.
3579 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
3580 (Release Procedure): Add FIXME about make alpha being unmaintained.
3581
3582 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
3583
3584 * data/yacc.c: Reformat m4 a little for readability.
3585 * src/lalr.c (build_relations): Correct comment.
3586
3587 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3588
3589 DJGPP specific issue.
3590 * djgpp/config.sed: Fixes required to run configure scripts generated
3591 by autoconf 2.62.
3592
3593 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
3594
3595 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
3596 coordinator@translationproject.org.
3597
3598 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3599
3600 * THANKS: Add Eric Blake.
3601
3602 2008-04-23 Eric Blake <ebb9@byu.net>
3603
3604 Revert prior patch, by working around autoconf regression.
3605 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
3606 ("Output file name: ("): Uncomment test.
3607 ("Output file name: )"): Likewise.
3608 Based on an idea from Noah Misch.
3609
3610 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3611
3612 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
3613 2.61. Reported by Juan Manuel Guerrero at
3614 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
3615 * tests/output.at ("Output file name: ("): Comment out test case for
3616 now.
3617 ("Output file name: )"): Likewise.
3618
3619 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3620
3621 * GNUmakefile: Update git-version-gen invocation so make dist
3622 succeeds.
3623
3624 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3625
3626 Update to the current gnulib CVS repository, and fix trigraph handling
3627 in Bison.
3628 * bootstrap: Update gnulib CVS repository URL.
3629 (symlink_to_dir): Encapsulate the code that guarantees the destination
3630 directory exists into...
3631 (check_dst_dir): ... this new function, and...
3632 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
3633 fail when copying files into lib/uniwidth/.
3634 * src/output.c (prepare_symbols): When writing yytname muscles, where
3635 symbol names will be encoded in C-string literals, tell quotearg to
3636 escape trigraphs. This used to be the default in gnulib.
3637 * tests/regression.at (Token definitions): Because of the change in
3638 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
3639 escapes trigraphs in symbol names. Thus, yytname no longer has
3640 trigraphs unnecessarily doubly escaped. Update test case output.
3641 Extend test case to be sure Bison's own error messages will no longer
3642 have trigraphs in symbol names unnecessarily escaped once.
3643
3644 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
3645
3646 Fix make dist infinite loop reported by Juan Manuel Guerrero at
3647 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
3648 * .cvsignore: Add .version.
3649 * .version.in: New.
3650 * bootstrap.conf (gnulib_modules): Add git-version-gen.
3651 * configure.ac (AC_CONFIG_FILES): Add .version.
3652 * build-aux/.cvsignore: Add git-version-gen.
3653
3654 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
3655
3656 * NEWS (2.3a+): Mention that -g now takes an argument.
3657 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
3658 consistency. Update the -g and -x entries now that they take
3659 arguments. Use brackets to indicate optional arguments.
3660 * src/getargs.c (usage): Explain the relationship between arguments of
3661 long and short options more completely. Document --defines and -d
3662 separately since the former takes an argument but, for POSIX Yacc, the
3663 latter does not.
3664 (short_options): Let -W take an optional argument like --warnings.
3665 (getargs): Sort cases.
3666
3667 2008-02-28 Akim Demaille <demaille@gostai.com>
3668
3669 * doc/bison.texinfo: Fix a few typos.
3670
3671 2008-02-28 Akim Demaille <akim@epita.fr>
3672
3673 * doc/bison.texinfo (Bison Options): Document -W.
3674 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
3675
3676 2008-02-28 Akim Demaille <akim@epita.fr>
3677
3678 * src/getargs.c (short_options): Split and sort for readability.
3679 -g and -x take optional arguments, just like their long options.
3680 * build-aux/cross-options.pl: Use /x to make the regexp easier to
3681 understand.
3682 Fix the handling of $opt which resulted in all the argument to be
3683 considered as optional.
3684
3685 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
3686
3687 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
3688 say its interface is experimental.
3689 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
3690 Java.
3691 (Bison Options): In the -L and --language entry, mention Java.
3692 (Java Bison Interface): Say the interface is experimental.
3693 * src/getargs.c (usage): Mention -L and --language.
3694
3695 * NEWS (2.3a+): Say the push parsing interface is experimental.
3696 * doc/bison.texinfo (Push Decl): Likewise.
3697 (Decl Summary): Likewise in the "%define api.push_pull" entry.
3698 (Push Parser Function): Likewise.
3699 (Pull Parser Function): Likewise.
3700 (Parser Create Function): Likewise.
3701 (Parser Delete Function): Likewise.
3702 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
3703 yypull_parse, and yypush_parse entries.
3704
3705 * NEWS (2.3a+): Mention XML support, and say the schema is
3706 experimental.
3707 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
3708 * src/getargs.c (usage): Say the XML schema is experimental.
3709
3710 * NEWS (2.3a+): Say option instead of flag.
3711
3712 2008-02-21 Wojciech Polak <polak@gnu.org>
3713
3714 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
3715 text.
3716
3717 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
3718
3719 Fix impure push parser compile error reported by Bob Rossi at
3720 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
3721 * data/yacc.c: Clean up whitespace in the output a little.
3722 (yypstate_allocated): Define for impure push parsers regardless of
3723 whether the pull interface is also requested.
3724 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
3725 check impure push parsers without the pull interface.
3726
3727 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
3728 yyerror takes arguments specified by %parse-param while yypstate_new
3729 does not.
3730 * doc/bison.texinfo (Parser Create Function): Document that
3731 yypstate_new returns 0 for multiple impure parser instances.
3732 * tests/push.at (Push Parsing: Multiple impure instances): Update
3733 expected stderr output.
3734
3735 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
3736
3737 * runtime-po/POTFILES.in (push.c): Remove.
3738
3739 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3740
3741 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
3742 * data/push.c: Rename to...
3743 * data/yacc.c: ... this, overwriting it.
3744 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
3745 `%push-pull-parser' -> `%define api.push_pull "both"'.
3746 Remove old yacc.c tests, and update push.c tests to yacc.c.
3747
3748 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3749
3750 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
3751 `"%code top" blocks' instead of `%code "top" blocks'.
3752 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
3753 Clean up whitespace in the output a little.
3754
3755 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3756
3757 Fix documentation problems reported by Tim Josling at
3758 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
3759 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
3760 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
3761 integers. Explain the effect of literal string aliases on error
3762 messages. Copy token 0 documentation from the C++ skeleton
3763 documentation.
3764
3765 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3766
3767 Accept a token number in a %left, %right, or %nonassoc for POSIX
3768 conformance. Reported by Tim Josling at
3769 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
3770 * NEWS (2.3a+): Mention.
3771 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
3772 and code numbers are treated by precedence declarations.
3773 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
3774 of symbols.1.
3775 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
3776 of symbol.
3777 (symbol.prec): New, just like symbol but allows INT.
3778 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
3779 longer holds.
3780 * tests/regression.at (Token number in precedence declaration): New
3781 test case.
3782
3783 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3784
3785 DJGPP specific issues.
3786 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
3787 be changed. Copyright timestamp adjusted.
3788 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
3789 be changed. Copyright timestamp adjusted.
3790 * djgpp/config.site: Copyright timestamp adjusted.
3791 * djgpp/config_h.sed: Copyright timestamp adjusted.
3792 * djgpp/djunpack.bat: Copyright timestamp adjusted.
3793 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
3794 filename translation list.
3795 * djgpp/subpipe.c (init_subpipe): Check the environment variables
3796 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
3797 files shall be created. Before trying to use the temp dir where the
3798 environment variable points to check that the dir really exists. If
3799 not default to the cwd as temp dir. Copyright timestamp adjusted.
3800 * djgpp/subpipe.h: Copyright timestamp adjusted.
3801 * djgpp/testsuite.sed: Copyright timestamp adjusted.
3802
3803 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
3804
3805 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
3806
3807 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
3808
3809 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
3810 Problem reported by Claudio Saavedra in
3811 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
3812
3813 2008-01-05 Wojciech Polak <polak@gnu.org>
3814
3815 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
3816 document's title with the input grammar file name.
3817
3818 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
3819
3820 Automate regression testing of the XML/XSLT implementation. Discussed
3821 starting at
3822 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
3823 * configure.ac (XSLTPROC): New substitution.
3824 * Makefile.am (maintainer-xml-check): New phony target invoking...
3825 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
3826 invoking make maintainer-check with BISON_TEST_XML=1.
3827 * tests/atlocal.in (XSLTPROC): New.
3828 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
3829 not to report reachable memory when Bison is expected to have a
3830 non-zero exit status and (2) to compare XML/XSLT output with --graph
3831 and --report=all output for every working grammar when
3832 BISON_TEST_XML=1.
3833 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
3834 (AT_BISON_CHECK_XML): New.
3835 (AT_QUELL_VALGRIND): New.
3836 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
3837 (AT_CHECK): ... don't redefine this since this was the old way to
3838 quell Valgrind.
3839 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
3840 AT_BISON_CHECK invocations.
3841 * tests/c++.at: Likewise.
3842 * tests/calc.at: Likewise.
3843 * tests/conflicts.at: Likewise.
3844 * tests/cxx-type.at: Likewise.
3845 * tests/existing.at: Likewise.
3846 * tests/glr-regression.at: Likewise.
3847 * tests/headers.at: Likewise.
3848 * tests/input.at: Likewise.
3849 * tests/java.at: Likewise.
3850 * tests/output.at: Likewise.
3851 * tests/push.at: Likewise.
3852 * tests/reduce.at: Likewise.
3853 * tests/regression.at: Likewise.
3854 * tests/sets.at: Likewise.
3855 * tests/skeletons.at: Likewise.
3856 * tests/synclines.at: Likewise.
3857 * tests/torture.at: Likewise.
3858 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
3859 tends to hang xsltproc.
3860 (Big horizontal): Likewise.
3861
3862 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3863
3864 In XML output, remove redundant class attribute on symbol element.
3865 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
3866 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
3867 look up a symbol to determine whether it's a nonterminal or terminal.
3868 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
3869 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
3870
3871 Add prec/assoc information to XML output.
3872 * src/gram.c (grammar_rules_print_xml): For each rule that has a
3873 %prec, add a percent_prec attribute.
3874 * src/print-xml.c (print_grammar): For each terminal that has a
3875 precedence or associativity, add a prec or assoc attribute.
3876 (xml_indent): New.
3877 (xml_puts): Use xml_indent.
3878 (xml_printf): Use xml_indent.
3879 * src/print-xml.h (xml_indent): Prototype.
3880
3881 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
3882 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
3883
3884 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3885
3886 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
3887 (bison:ruleByNumber): ... this for clarity.
3888 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
3889 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
3890 (xsl:template match="reduction"): Update.
3891 (xsl:template match="item"): Update.
3892 (xsl:template match="reduction"): Update.
3893
3894 In the XML output, don't print the list of rules where symbols appear.
3895 Compute it in XSLT instead. Discussed at
3896 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
3897 * data/xslt/bison.xsl (bison:ruleByLhs): New.
3898 (bison:ruleByRhs): New.
3899 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
3900 bison:ruleByRhs.
3901 (xsl:template match="terminal/rule"): Remove.
3902 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3903 bison:ruleByRhs.
3904 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3905 Remove.
3906 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
3907 bison:ruleByRhs and mode="number-link" for rule template.
3908 (xsl:template match="terminal/rule"): Remove.
3909 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3910 bison:ruleByRhs and mode="number-link" for rule template.
3911 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3912 Rewrite as...
3913 (xsl:template match="rule" mode="number-link"): ... this.
3914 * src/print-xml.c (print_grammar): Don't print the list of rules.
3915
3916 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
3917
3918 Don't let --report affect XML output; always print all information.
3919 Discussed at
3920 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
3921 * src/conflicts.c (log_resolution): Implement.
3922 * src/print-xml.c (print_core): Implement.
3923 (print_state): Implement.
3924 (print_xml): Implement.
3925
3926 * NEWS (2.3a+): Fix quotes.
3927 * src/parse-gram.y (prologue_declaration): For consistency with -v,
3928 don't let %verbose clear the list specified by --report.
3929
3930 2007-11-26 Akim Demaille <akim@epita.fr>
3931
3932 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
3933
3934 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
3935
3936 In the XML output, list useless and unused symbols and rules with the
3937 useful ones and add a "usefulness" attribute. Discussed starting at
3938 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
3939 * src/gram.c (grammar_rules_partial_print_xml): Remove.
3940 (grammar_rules_print_xml): Print all rules instead of just those
3941 useful in the grammar, and add a "usefulness" attribute.
3942 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
3943 * src/print-xml.c (print_rules_useless_in_parser): Remove.
3944 (print_grammar): Print all nonterminals instead of just useful ones,
3945 and add a "usefulness" attribute to nonterminals and terminals.
3946 (print_xml): Don't print a separate "reductions" or
3947 "rules-useless-in-parser" element.
3948 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
3949 (reduce_xml): Remove.
3950 (reduce_token_unused_in_grammar): New.
3951 (reduce_nonterminal_useless_in_grammar): New.
3952 * src/reduce.h (reduce_xml): Remove prototype.
3953 (reduce_token_unused_in_grammar): Add prototype.
3954 (reduce_nonterminal_useless_in_grammar): Add prototype.
3955 * data/xslt/xml2text.xsl: Update for XML changes.
3956 * data/xslt/xml2xhtml.xsl: Update for XML changes.
3957 * tests/reduce.at (Useless Terminals): Update output.
3958 (Useless Rules): Update output.
3959 (Reduced Automaton): Update output.
3960
3961 Say "Terminals unused in grammar" instead of "Unused terminals".
3962 * NEWS (2.3a+): Update.
3963 * doc/bison.texinfo (Understanding): Update example output.
3964 * src/reduce.c (reduce_output): Implement.
3965 * data/xslt/xml2text.xsl: Implement.
3966 * data/xslt/xml2xhtml.xsl: Implement.
3967
3968 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
3969
3970 Accept --report-file=FILE to override the default `.output' filename.
3971 * NEWS (2.3a+): Mention.
3972 * doc/bison.texinfo (Bison Options): Add an entry.
3973 * src/files.c (compute_output_file_names): Don't override
3974 spec_verbose_file if already set.
3975 * src/getargs.c (usage): Document --report-file.
3976 (REPORT_FILE_OPTION): New anonymous enum member.
3977 (long_options): Add entry for it.
3978 (getargs): Add case for it setting spec_verbose_file.
3979
3980 * build-aux/cross-options.pl: Don't record a short option just because
3981 there's an arg.
3982 * doc/.cvsignore: Add yacc.1.
3983
3984 2007-11-14 Akim Demaille <akim@epita.fr>
3985
3986 * doc/yacc.1.in: New.
3987 * configure.ac, doc/Makefile.am: Adjust.
3988 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
3989 config.h symbol.
3990 Use AC_SUBST for assignments too.
3991 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
3992
3993 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
3994
3995 * src/gram.c: Remove comments that duplicate comments in gram.h.
3996
3997 When reporting useless rules and nonterminals, say "useless in grammar"
3998 instead of "useless", and say "useless in parser" instead of "never
3999 reduced". Discussed starting at
4000 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
4001 * NEWS (2.3a+): Mention this change.
4002 * data/xslt/xml2text.xsl: Update output text and expected input XML
4003 element names to match changes below.
4004 * data/xslt/xml2xhtml.xsl: Likewise.
4005 (xsl:template match="bison-xml-report"): Add missing entry in Table of
4006 Contents: "Rules useless in parser due to conflicts".
4007 * doc/bison.texinfo (Decl Summary): Reword a little.
4008 (Understanding): Update example output for changes below.
4009 * src/gram.c: (rule_useful_p): Rename to...
4010 (rule_useful_in_grammar_p): ... this.
4011 (rule_useless_p): Rename to...
4012 (rule_useless_in_grammar_p): ... this.
4013 (rule_never_reduced_p): Rename to...
4014 (rule_useless_in_parser_p): ... this.
4015 (grammar_rules_print): Update for renames.
4016 (grammar_rules_print_xml): Update for renames.
4017 (grammar_rules_never_reduced_report): Rename to...
4018 (grammar_rules_useless_report): ... this since it is used for either
4019 kind of useless rule.
4020 * src/gram.h: Reword comments and update function names in prototypes.
4021 * src/main.c (main): Say "rule useless in parser due to conflicts".
4022 * src/print-xml.c (print_rules_never_reduced): Rename to...
4023 (print_rules_useless_in_parser): ... this, and rename output XML
4024 element "rules-never-reduced" to "rules-useless-in-parser".
4025 (print_xml): Update for rename.
4026 * src/print.c (print_results): Say "Rules useless in parser due to
4027 conflicts".
4028 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
4029 (nonterminals_reduce): Say "nonterminal useless in grammar".
4030 (reduce_output): Say "Nonterminals useless in grammar".
4031 Say "Rules useless in grammar".
4032 (reduce_xml): Rename output XML element "useless" to
4033 "useless-in-grammar".
4034 (reduce_print): Don't report the count of grammatically useless rules
4035 as "rules never reduced" just because %yacc is specified.
4036 In the correct report of this count, say nonterminal(s) and rule(s)
4037 "useless in grammar".
4038 * tests/conflicts.at (S/R in initial): Update expected output.
4039 (Defaulted Conflicted Reduction): Likewise.
4040 (Unreachable States After Conflict Resolution): Likewise.
4041 * tests/existing.at (GNU pic Grammar): Likewise.
4042 * tests/reduce.at (Useless Nonterminals): Likewise.
4043 (Useless Rules): Likewise.
4044 (Reduced Automaton): Likewise.
4045 (Underivable Rules): Likewise.
4046 (Empty Language): Likewise.
4047
4048 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
4049
4050 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
4051 here document and before the EOF so that BSD's implementation of Bourne
4052 shell doesn't parse the delimiter as part of the here document.
4053 * doc/.cvsignore: Add cross-options.texi.
4054 * src/getargs.c (usage): Add a blank line after the warning categories.
4055
4056 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
4057
4058 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
4059
4060 2007-11-05 Akim Demaille <akim@epita.fr>
4061
4062 Remove Id: from bison.1.
4063 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
4064 (perl -0777 -pi -e 's/\.PP\nId): New.
4065 (.x.1): Use it to ignore the version control revision.
4066
4067 2007-11-05 Akim Demaille <demaille@gostai.com>
4068
4069 * build-aux/Makefile.am: Ship cross-options.pl.
4070 * doc/Makefile.am: Always refer to cross-options.texi with
4071 $(srcdir).
4072 (MAINTAINERCLEANFILES): Add it.
4073
4074 2007-11-04 Akim Demaille <demaille@gostai.com>
4075
4076 Generate the long/short option cross-table.
4077 * build-aux/cross-options.pl: New.
4078 * doc/Makefile.am (cross-options.texi): New.
4079 * doc/bison.texinfo: Use it.
4080
4081 2007-11-04 Akim Demaille <demaille@gostai.com>
4082
4083 Generate bison.1 using help2man.
4084 * doc/common.x, doc/bison.x: New.
4085 * doc/Makefile.am (bison.1, .x.1): New.
4086 The code is taken from autoconf-2.61/man/Makefile.am.
4087 * configure.ac: Look for help2man.
4088
4089 2007-11-04 Akim Demaille <demaille@gostai.com>
4090
4091 Complete --help.
4092 * src/getargs.c (usage): Document -W, make it clear that -d,
4093 -g and -x have optional arguments.
4094
4095 2007-11-04 Akim Demaille <demaille@gostai.com>
4096
4097 Find sha1sum when named gsha1sum.
4098 * bootstrap (find_tool): New.
4099 ($SHA1SUM): New.
4100
4101 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4102
4103 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
4104 at
4105 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
4106 * NEWS (2.3a+): Mention.
4107 * data/bison.m4 (b4_pure_if): Don't define it here.
4108 * data/c.m4 (b4_identification): Depend on individual skeletons to
4109 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
4110 values of the %define variables api.pure or api.push_pull. Define
4111 YYPURE, YYPUSH, and YYPULL accordingly.
4112 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
4113 glr.cc has already defined b4_pure_flag.
4114 * data/push.c: Define b4_pure_if based on `%define api.pure'.
4115 Remove YYPUSH and YYPULL since they're back in b4_identification again.
4116 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
4117 * doc/bison.texinfo (Pure Decl): Update.
4118 (Push Decl): Update.
4119 (Decl Summary): Add api.pure to %define entry.
4120 In %pure-parser entry, say it's deprecated and reference %define.
4121 (Pure Calling): Update.
4122 (Error Reporting): Update.
4123 (C++ Scanner Interface): Update.
4124 (How Can I Reset the Parser): Update.
4125 (Table of Symbols): In %pure-parser entry, say it's deprecated and
4126 reference %define.
4127 * src/getargs.c (pure_parser): Remove global variable.
4128 * src/getargs.h (pure_parser): Remove extern.
4129 * src/output.c (prepare): Don't define pure_flag muscle.
4130 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
4131 wrapper around `%define api.pure'.
4132 * tests/calc.at (Simple LALR Calculator): Update.
4133 (Simple GLR Calculator): Update.
4134 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
4135 Update.
4136 (GLR: Resolve ambiguity, pure, locations): Update.
4137 (GLR: Merge conflicting parses, pure, no locations): Update.
4138 (GLR: Merge conflicting parses, pure, locations): Update.
4139 * tests/glr-regression.at (Uninitialized location when reporting
4140 ambiguity): Update
4141 * tests/input.at (Unused %define api.pure): New test case.
4142 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
4143 AT_PURE_IF and AT_PURE_AND_LOC_IF.
4144 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
4145
4146 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4147
4148 %define push_pull -> %define api.push_pull. Discussed starting at
4149 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
4150 * data/push.c: Expect the new name.
4151 * data/yacc.c: Likewise.
4152 * doc/bison.texinfo (Push Decl): Update.
4153 (Decl Summary): Update %define entry.
4154 (Push Parser Function): Update.
4155 (Pull Parser Function): Update.
4156 (Parser Create Function): Update.
4157 (Parser Delete Function): Update.
4158 * tests/calc.at (Simple LALR Calculator): Update.
4159 * tests/input.at (%define enum variables): Update.
4160 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
4161 (Push Parsing: Multiple impure instances): Update.
4162 (Push Parsing: Unsupported Skeletons): Update.
4163 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
4164 (Exploding the Stack Size with Malloc): Update.
4165
4166 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
4167 other entries some.
4168
4169 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
4170
4171 For the XML output's terminal element, rename @number to @token-number,
4172 and add @symbol-number. In the nonterminal element, rename @number to
4173 @symbol-number. Discussed starting at
4174 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
4175 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
4176 renames.
4177 (xsl:template match="nonterminal"): Likewise.
4178 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
4179 (xsl:template match="nonterminal"): Likewise.
4180 * src/print-xml.c (print_grammar): Implement.
4181
4182 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
4183
4184 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
4185 2007-10-11 change, the child elements here are items not rules.
4186 (xsl:template match="item"): New.
4187 (xsl:template match="rule"): Update for new reduced itemset.
4188 (xsl:template match="point"): Remove.
4189 (xsl:template match="empty"): For consistency with --graph, don't
4190 output "/* empty */".
4191 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
4192 line-wrap, don't pass a negative value as first-line-length since this
4193 won't work with the following changes.
4194 (xsl:template name="line-wrap"): Simplify slightly.
4195 (xsl:template name="ws-search"): Eliminate recursion.
4196 * src/print_graph.c (print_core): Don't print a reduction's lookahead
4197 set next to an item whose dot is not at the end of the RHS even if it
4198 happens to be associated with the same rule.
4199
4200 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
4201
4202 Add %define lr.keep_unreachable_states.
4203 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
4204 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
4205 * src/main.c (main): Implement it.
4206 * tests/conflicts.at (Unreachable States After Conflict Resolution):
4207 Extend to test it, and fix a typo.
4208
4209 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
4210
4211 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
4212 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
4213 the example .output text.
4214 * tests/regression.at (Extra lookahead sets in report): Improve wording
4215 of comments.
4216
4217 2007-10-17 Wojciech Polak <polak@gnu.org>
4218
4219 * src/print-xml.c (print_grammar): Renamed
4220 <terminal> and <nonterminal> attributes:
4221 "type" to "number" and "symbol" to "name".
4222 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
4223 Use new attribute names.
4224 (xsl:template match="nonterminal"): Likewise.
4225 * data/xslt/xml2xhtml.xsl: Likewise.
4226
4227 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
4228
4229 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
4230 (Option Cross Key): Likewise.
4231
4232 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
4233 next to an item whose dot is not at the end of the RHS even if it
4234 happens to be associated with the same rule.
4235 * src/print.c (print_core): Likewise.
4236 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
4237 (Resolved SR Conflicts): Update output.
4238 * tests/regression.at (Extra lookahead sets in report): New test case.
4239
4240 2007-10-11 Wojciech Polak <polak@gnu.org>
4241
4242 * src/print-xml.c (print_core): Remove item set
4243 redundancy.
4244 * data/xslt/bison.xsl (bison:ruleNumber): New key.
4245 Improve processing time. Suggested by Joel E. Denny.
4246 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
4247 Write xsl:param "required" attribute as comment.
4248 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
4249 (xsl:template match="rule"): Support new reduced itemset.
4250 (xsl:template match="point"): Remove.
4251 * data/xslt/xml2xhtml.xsl: Likewise.
4252
4253 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
4254
4255 * src/getargs.c (version): Update copyright year.
4256
4257 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
4258
4259 Make xml2dot.xsl and --graph produce the same output.
4260 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
4261 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
4262 escaped later.
4263 (xsl:template name="output-node"): Use the new escape template instead
4264 of the string-replace template directly.
4265 (xsl:template name="output-edge"): Likewise.
4266 (xsl:template name="escape"): New, escapes backslashes and newlines in
4267 addition to quotation marks.
4268 * src/graphviz.c (start_graph, output_node, output_edge): Add
4269 whitespace to output for legibility.
4270
4271 Make xml2text.xsl and --report produce the same output, and remove the
4272 XML "conflicts" element since a conflict summary is easily extracted
4273 from the automaton.
4274 * data/xslt/bison.xsl: New.
4275 (xsl:template match="state" mode="bison:count-conflicts): New.
4276 * data/xslt/xml2text.xsl: Import bison.xsl.
4277 (xsl:template match="bison-xml-report"): Instead of styling the
4278 "conflicts" element, style the "automaton" element with mode
4279 "conflicts". Unlike the former, the latter lists S/R and R/R
4280 conflicts for a state on the same line.
4281 (xsl:template match="conflicts"): Remove.
4282 (xsl:template match="conflict"): Remove.
4283 (xsl:template match="terminal"): Line-wrap the list of rules in which
4284 the terminal is used.
4285 (xsl:template match="nonterminal"): Likewise for nonterminals.
4286 (xsl:template match="automaton" mode="conflicts"): New.
4287 (xsl:template match="state" mode="conflicts"): New.
4288 (xsl:template name="line-wrap"): New.
4289 (xsl:template name="ws-search"): New.
4290 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
4291 (xsl:template match="bison-xml-report"): Instead of styling the
4292 "conflicts" element, style the "automaton" element with mode
4293 "conflicts."
4294 (xsl:template match="conflicts"): Remove.
4295 (xsl:template match="conflict"): Remove.
4296 (xsl:template match="automaton" mode="conflicts"): New.
4297 (xsl:template match="state" mode="conflicts): New.
4298 * src/conflicts.c (conflicts_output_xml): Remove.
4299 * src/conflicts.h (conflicts_output_xml): Remove prototype.
4300 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
4301 * src/print.c (print_grammar): Consistently wrap at the 66th column so
4302 the corresponding XSLT is easier. Also, never wrap between a word and
4303 the comma that follows it.
4304
4305 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
4306
4307 Improve C++ namespace support. Discussed starting at
4308 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
4309 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
4310 b4_namespace_close): New macros that interpret the %define variable
4311 "namespace" so its value can contain "::" to indicate nested
4312 namespaces.
4313 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
4314 the above macros.
4315 * data/lalr1.cc (b4_namespace): Likewise.
4316 * data/location.cc (b4_namespace): Likewise.
4317 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
4318 inside a new table in the general %define entry. Document `%define
4319 namespace' there as well. Point the %name-prefix entry to it since it
4320 explains it more completely in the case of C++.
4321 (C++ Bison Interface): Mention `%define namespace' instead of
4322 %name-prefix.
4323 (Table of Symbols): Remove the `%define push_pull' entry. The %define
4324 entry suffices.
4325 * tests/c++.at (Relative namespace references): New test case.
4326 (Absolute namespace references): New test case.
4327 (Syntactically invalid namespace references): New test case.
4328 * tests/input.at (C++ namespace reference errors): New test case.
4329
4330 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
4331
4332 Add syncline support and location accessor to internal %define
4333 interfaces.
4334 * data/bison.m4 (b4_percent_define_get_loc): New.
4335 (b4_percent_define_get_syncline): New.
4336 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
4337 (b4_percent_define_default): Record defining location as line 1 rather
4338 than 0 for the sake of synchronizing #line's, and define
4339 b4_percent_define_syncline(VARIABLE).
4340 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
4341 * src/muscle_tab.c (muscle_syncline_grow): New.
4342 (muscle_code_grow): Use muscle_syncline_grow.
4343 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
4344 define b4_percent_define_syncline(VARIABLE).
4345 (muscle_percent_define_get_loc): New.
4346 (muscle_percent_define_get_syncline): New.
4347 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
4348 remove some unused variables.
4349 (muscle_percent_define_default): Record defining location as line 1
4350 rather than 0 for the sake of synchronizing #line's, and define
4351 b4_percent_define_syncline(VARIABLE).
4352 (muscle_percent_define_check_values): Use
4353 muscle_percent_define_get_loc.
4354 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
4355 (muscle_percent_define_get_syncline): Prototype.
4356 * tests/skeletons.at (%define Boolean variables: invalid skeleton
4357 defaults): Update output for location change.
4358 (Complaining during macro argument expansion): Extend to test
4359 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
4360
4361 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
4362
4363 Fix some error-reporting macro bugs.
4364 * data/bison.m4 (b4_cat): New.
4365 (b4_error, b4_error_at): Use b4_cat to send error directives directly
4366 to stdout so they don't become arguments to other macros. Update
4367 comments and add examples.
4368 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
4369 add examples.
4370 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
4371 after printing the error directive so that M4 doesn't report subsequent
4372 problems that are induced by this problem.
4373 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
4374 instead of just in them. Recognize @\n in both places. Both expand to
4375 the empty string. Needed by b4_cat.
4376 * tests/skeletons.at (Complaining during macro argument expansion):
4377 New test case.
4378 (Fatal errors make M4 exit immediately): New test case.
4379
4380 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
4381
4382 Implement --print-datadir.
4383 * src/getargs.c (usage): Mention.
4384 (PRINT_DATADIR_OPTION): New anonymous enum member.
4385 (long_options): Add entry for it.
4386 (getargs): Add case for it calling compute_pkgdatadir.
4387 * src/output.c (output_skeleton): Encapsulate data directory
4388 computation from here...
4389 (prepare): ... and from here...
4390 (compute_pkgdatadir): ... into this new function.
4391 * src/output.h (compute_pkgdatadir): Prototype.
4392
4393 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
4394
4395 * src/print-xml.c (escape_bufs): New static global variable
4396 replacing...
4397 (xml_escape_n): ... the static local variable buf here.
4398 (print_xml): Free memory for escape_bufs.
4399 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
4400
4401 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
4402
4403 Replace `%push-parser' and `%push-pull-parser' with
4404 `%define push_pull "push"' and `%define push_pull "both"'.
4405 `%define push_pull "pull"' is the default.
4406 * doc/bison.texinfo (Push Decl, Push Parser Function,
4407 Pull Parser Function, Parser Create Function, Parser Delete Function):
4408 Update declarations.
4409 (Decl Summary, Table of Symbols): Replace %push-parser and
4410 %push-pull-parser entries with a %define push_pull entry.
4411 * data/bison.m4 (b4_percent_define_check_values): New macro.
4412 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
4413 definitions...
4414 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
4415 definitions...
4416 * data/push.c: ... to here and compute them from the value of the
4417 %define variable push_pull.
4418 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
4419 parsing requests here...
4420 * data/yacc.c: ... hack this to switch to push.c any time
4421 b4_use_push_pull_flag or the %define variable push_pull is set. This
4422 will go away when we mv push.c yacc.c.
4423 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
4424 push parsing is not supported since unused %define variables are
4425 reported anyway.
4426 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
4427 * src/muscle_tab.h (muscle_percent_define_check_values): Update
4428 comments for consistency with b4_percent_define_check_values.
4429 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
4430 muscles.
4431 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
4432 Remove.
4433 (prologue_declaration): Remove %push-parser and %push-pull-parser
4434 rules.
4435 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
4436 * tests/calc.at: Update declarations.
4437 * tests/input.at (%define enum variables): New test case.
4438 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
4439 declaration.
4440 (Push Parsing: Multiple impure instances): Update declaration.
4441 (Push Parsing: Unsupported Skeletons): New test case.
4442 * tests/torture.at (Exploding the Stack Size with Alloca): Update
4443 declaration.
4444 (Exploding the Stack Size with Malloc): Update declaration.
4445
4446 2007-09-24 Wojciech Polak <polak@gnu.org>
4447
4448 Add XSLT transformations.
4449
4450 * data/xslt/xml2dot.xsl: Transform XML into DOT.
4451 * data/xslt/xml2text.xsl: Transform XML into plain text.
4452 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
4453 * data/Makefile.am (xsltdir): New variable.
4454 (dist_xslt_DATA): Add xslt/*.xsl files.
4455
4456 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
4457
4458 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
4459 Problem reported by Wojciech Polak.
4460 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
4461 (xml_printf): Undo change I made on 21 September; that is,
4462 indent 2 spaces, not 1.
4463
4464 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
4465
4466 Pacify ./configure --enable-gcc-warnings.
4467 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
4468 `char const *' instead of `char *'.
4469 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
4470 local variable `sep'.
4471
4472 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
4473
4474 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
4475 elsewhere.
4476 * src/print-xml.c: Prefer "const" after types; that's more consistent.
4477 (xml_printf): Indent just 1 space for level.
4478 (e_char, xlate_char): Remove.
4479 (xml_escape_string): Rewrite to avoid undefined behavior (used
4480 storage that was freed from the stack).
4481 (xml_escape_n): Don't bother checking for subscript error.
4482
4483 2007-09-21 Wojciech Polak <polak@gnu.org>
4484
4485 Add Bison XML Automaton Report.
4486
4487 Add support for an -x option to generate an XML report.
4488 It is not documented yet.
4489 * src/print-xml.c: New file.
4490 * src/print-xml.h: Likewise.
4491 * lib/timevar.def (TV_XML): New var.
4492 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
4493 * src/conflicts.c: Include print-xml.h.
4494 (solved_conflicts_xml_obstack): New var.
4495 (log_resolution, conflicts_solve, conflicts_free):
4496 Add support for XML report.
4497 (conflicts_output_val): New function.
4498 * src/conflicts.h (conflicts_output_val): New decl.
4499 * src/files.c (spec_xml_file): New var.
4500 (compute_output_file_names, output_file_names_free): Add XML support.
4501 * src/files.h (spec_xml_file): New decl.
4502 * src/getargs.c (xml_flag): New var.
4503 (usage, short_options, long_options, getargs): Add XML support.
4504 * src/getargs.h (xml_flag): New decl.
4505 * src/gram.c: Include print-xml.h.
4506 (rule_lhs_print_xml, rule_rhs_print_xml):
4507 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
4508 New functions.
4509 * src/gram.h: Declare external ones.
4510 * src/main.c: Include print-xml.h.
4511 (main): Add XML support.
4512 * src/reduce.c: Include print-xml.h.
4513 (reduce_xml): New function.
4514 * src/reduce.h: Declare it.
4515 * src/state.c: Include print-xml.h.
4516 (state_new): Add XML support.
4517 (state_rule_lookahead_tokens_print_xml): New function.
4518 * src/state.h: Declare it.
4519 (struct state): New member solved_conflicts_xml.
4520 * src/symtab.c (symbol_class_get_string): New function.
4521 * src/symtab.h: Declare it.
4522
4523 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
4524
4525 * GNUmakefile: Switch to coreutils's version.
4526 * bootstrap: Likewise.
4527 * Makefile.cfg: Adjust to new GNUmakefile.
4528 * README-hacking: Likewise.
4529
4530 Import from gnulib:
4531
4532 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
4533 Bruno Haible <bruno@clisp.org>
4534
4535 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
4536 and is a script that invokes bison. Tighten the code. Add comments.
4537
4538 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
4539
4540 Spell "boolean" as "Boolean". Reported by Akim Demaille.
4541 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
4542 * doc/bison.texinfo (Decl Summary): Fix.
4543 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
4544 * tests/input.at (Boolean %define variables): Update output.
4545 * tests/skeletons.at (%define boolean variables: invalid skeleton
4546 defaults): Rename to...
4547 (%define Boolean variables: invalid skeleton defaults): ... this and
4548 update output.
4549
4550 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
4551
4552 In impure push mode, don't allow more than one yypstate to be allocated
4553 since multiple impure parsers would corrupt yynerrs.
4554 * data/push.c (yypstate_allocated): New static global variable
4555 initialized to 0.
4556 (yypull_parse): If yypstate_new returns 0, don't report it as memory
4557 exhaustion if yypstate_allocated is 1, but still return 2.
4558 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
4559 already 1. Otherwise, set it to 1.
4560 (yypstate_delete): Set it to 0.
4561 * tests/push.at (Push Parsing: Multiple impure instances): New test
4562 case.
4563
4564 2007-08-17 Bob Rossi <bob@brasko.net>
4565
4566 * doc/bison.texinfo (Push Decl): Document the push parser.
4567 (Table of Symbols): Ditto.
4568 (Pure Decl): Ditto.
4569 (Decl Summary): Ditto.
4570 (Multiple Parsers, Push Parser Function, Pull Parser Function,
4571 Parser Create Function, Parser Delete Function):
4572 Add new push parser symbols.
4573 (Table of Symbols): Document push-parser, push-pull-parser,
4574 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
4575
4576 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
4577
4578 Update to GPLv3.
4579 * doc/gpl-3.0.texi: New file.
4580 * doc/gpl.texi: Remove.
4581 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
4582 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
4583 * README-hacking, TODO, bootstrap, bootstrap.conf:
4584 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
4585 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
4586 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
4587 * data/lalr1.cc, data/lalr1.java, data/location.cc:
4588 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
4589 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
4590 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
4591 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
4592 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
4593 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
4594 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
4595 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
4596 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
4597 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
4598 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
4599 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
4600 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
4601 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
4602 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
4603 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
4604 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
4605 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
4606 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
4607 * src/complain.c, src/complain.h, src/conflicts.c:
4608 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
4609 * src/files.h, src/flex-scanner.h, src/getargs.c:
4610 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
4611 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
4612 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
4613 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
4614 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
4615 * src/print.c, src/print.h, src/print_graph.c:
4616 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
4617 * src/reduce.h, src/relation.c, src/relation.h:
4618 * src/revision.h, src/scan-code.h, src/scan-code.l:
4619 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
4620 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
4621 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
4622 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
4623 * tests/Makefile.am, tests/actions.at, tests/c++.at:
4624 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
4625 * tests/existing.at, tests/glr-regression.at:
4626 * tests/headers.at, tests/input.at, tests/java.at:
4627 * tests/local.at, tests/output.at, tests/push.at:
4628 * tests/reduce.at, tests/regression.at, tests/sets.at:
4629 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
4630 * tests/torture.at:
4631 Update to GPLv3.
4632
4633 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4634
4635 Get rid of broken %no-parser, -n, and --no-parser implementation and
4636 documentation.
4637 * TODO: Don't mention them.
4638 * doc/bison.1: Likewise.
4639 * doc/bison.texinfo (Decl Summary): Likewise.
4640 (Bison Options): Likewise.
4641 (Option Cross Key): Likewise.
4642 * src/getargs.c (no_parser_flag): Remove global variable.
4643 (usage): Don't print description of -n and --no-parser.
4644 (long_options): Remove --no-parser entry here.
4645 (getargs): Remove -n case in the switch here.
4646 * src/getargs.h (no_parser_flag): Remove extern.
4647 * tests/regression.at (Web2c Actions): Remove comment that mentions
4648 --no-parser.
4649
4650 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4651
4652 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
4653 name user variables starting with `yy'. Just pass NULL instead of a
4654 dummy local &yylval to yypush_parse.
4655 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
4656 starting with `yy'.
4657
4658 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
4659
4660 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
4661 true since it's then always used regardless of whether yyoverflow is
4662 defined. Reported by Christian Burger at
4663 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
4664 * THANKS: Add Christian Burger.
4665
4666 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4667 node names: say "Decl Summary" not "Bison Declaration Summary".
4668
4669 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
4670
4671 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
4672 determine whether this function has already complained about an invalid
4673 value for a %define boolean variable, don't check whether Bison has
4674 ever examined the value. As written, the check was a tautology.
4675 Instead, record and check for this complaint using a separate muscle.
4676
4677 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
4678
4679 Fix push parsing memory leak reported by Brandon Lucia at
4680 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
4681 * THANKS: Add Brandon Lucia.
4682 * data/push.c (yypstate_delete): Free the stack if it was reallocated
4683 but the parse never completed and thus freed it.
4684 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
4685 * tests/testsuite.at: Include push.at.
4686 * test/push.at: New.
4687 (Push Parsing: Memory Leak for Early Deletion): New test case.
4688
4689 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
4690
4691 Improve handling of multiple S/R conflicts in the same state and of S/R
4692 conflicts involving multiple reductions.
4693 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
4694 set for a state here or Bison will abort if it is reassigned on a
4695 later conflicted reduction in the same state.
4696 Similarly, don't finalize and assign the solved conflicts report here
4697 or it will be lost if it is reassigned on a later conflicted reduction
4698 in the same state.
4699 (set_conflicts): Instead, assign them both here after all S/R conflicts
4700 in the state have been fully examined.
4701 * src/print.c (shift_set): Rename to...
4702 (no_reduce_set): ... this.
4703 (print_reductions): Update for rename, and add %nonassoc error action
4704 tokens to no_reduce_set so that, when printing the first remaining
4705 reduction on an error action token, the reduction is enclosed in
4706 brackets.
4707 (print_results): Update for rename.
4708 * tests/conflicts.at (Solved conflicts report for multiple reductions
4709 in a state): New test case.
4710 (%nonassoc error actions for multiple reductions in a state): New test
4711 case.
4712
4713 * src/main.c (main): Don't depend on C99 features.
4714
4715 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
4716
4717 * build-aux/.cvsignore: Add compile.
4718 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
4719 uniwidth.
4720
4721 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
4722
4723 * bootstrap (slurp): Create target directories that don't exist.
4724 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
4725
4726 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
4727
4728 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
4729 than item number.
4730 * closure.c (closure): Likewise.
4731 * state.h (reductions): Comment sorting of rules.
4732 (state): Comment sorting of items.
4733
4734 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
4735
4736 Fix C++ test cases after recent Gnulib changes. Discussed starting at
4737 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
4738 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
4739 definition in order to avoid Gnulib headers since we don't use config.h
4740 here.
4741 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
4742 rather than AT_DATA so that config.h is included.
4743
4744 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
4745
4746 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
4747 instead of fprintf. Guard these functions with #if YYDEBUG instead of
4748 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
4749 and so that YYFPRINTF is guaranteed to be defined here.
4750
4751 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
4752
4753 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
4754 with...
4755 (muscle_percent_define_check_values): ... this more helpful function.
4756 Again, it's not used yet, but it will be.
4757 * src/muscle_tab.h: Likewise.
4758
4759 Improve some comments in parser table construction.
4760 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
4761 (generate_states): Don't mention ruleset, which is internal to closure.
4762 * src/closure.c (closure): Explain sorting of core and itemset, which
4763 is required for this function to behave correctly.
4764 * src/closure.h (closure): Mention sorting.
4765
4766 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
4767
4768 * src/lalr.c (state_lookahead_tokens_count): For code readability,
4769 move the check for disabled transitions to an aver since conflict
4770 resolution hasn't happened yet.
4771
4772 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
4773 labels a state as inconsistent just because it has error transitions.
4774 The original form of this check appeared in revision 1.1 of lalr.c,
4775 which was committed on 1991-12-21. Now (at least), changing the
4776 consistency label on such a state appears to have no useful effect in
4777 any of the places it is examined, which I enumerate below. The key
4778 point to understanding each item in this enumeration is that a state
4779 with an error transition is labelled consistent in the first place only
4780 if it has no rules, so the check cannot matter for states that have
4781 rules. (1) Labelling a state as inconsistent will cause set_conflicts
4782 to try to identify its conflicts, and a state must have *rules* to have
4783 conflicts. (2) Labelling a state as inconsistent will affect how
4784 action_row sets the default *rule* for the state. (3) Labelling a
4785 state as inconsistent will cause build_relations to add lookback edges
4786 to *rules* in that state.
4787 * src/state.h (struct state): Word the comment for member consistent
4788 more carefully.
4789
4790 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
4791
4792 Don't depend on C99 features.
4793 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
4794 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
4795 * src/reader.c (check_and_convert_grammar): Fix for-loop.
4796 * src/state.c (state_mark_reachable_states): Fix for-loop.
4797 (state_remove_unreachable_states): Fix for-loop.
4798
4799 Don't widen struct state with member reachable just to temporarily
4800 record reachability. Instead, use a local bitset.
4801 * src/state.h (struct state): Remove member.
4802 * src/state.c (state_new): Don't initialize it.
4803 (state_mark_reachable_states): Rename to...
4804 (state_record_reachable_states): ... this, and use bitset.
4805 (state_remove_unreachable_states): Use bitset.
4806
4807 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
4808
4809 * src/Makefile.am (yacc): Quote target action commands properly so
4810 that the yacc script isn't corrupt. Reported by Hans Aberg at
4811 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
4812
4813 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
4814 the case of pure parsers. Reported by Frans Englich at
4815 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
4816 * THANKS: Add Frans Englich.
4817
4818 * NEWS (2.3a+): In the %code entry, reference section `Bison
4819 Declaration Summary' from the manual now since the %code summary has
4820 moved there.
4821 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
4822 in the rules section must be terminated by semicolons.
4823
4824 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
4825
4826 Extend the front-end API for %define variables to more completely
4827 mirror the back-end. This will be useful in the future.
4828 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
4829 Update comments to mention the new front-end counterparts of these
4830 macros.
4831 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
4832 for muscle_string_decode and muscle_location_decode.
4833 (muscle_string_decode): New static function.
4834 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
4835 (muscle_percent_define_get, muscle_percent_define_ifdef): New
4836 functions.
4837 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
4838 muscle_percent_define_get to mimic the b4_percent_define_flag_if
4839 implementation more closely.
4840 (muscle_percent_define_invalid_value): New function.
4841 * src/muscle_tab.h (muscle_percent_define_get,
4842 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
4843 Prototype.
4844
4845 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
4846
4847 * NEWS (2.3a+): Mention yesterday's state-removal change.
4848 (2.3a): Remove the %language entry, which was added after 2.3a.
4849 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
4850 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
4851 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
4852 tests/existing.at: Update copyright date.
4853
4854 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4855
4856 If conflict resolution makes states unreachable, remove those states,
4857 report rules that are then unused, and don't report conflicts in those
4858 states.
4859 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
4860 New global function.
4861 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
4862 function.
4863 * src/main.c (main): After conflict resolution, remove the unreachable
4864 states and update all data structures that reference states by number.
4865 * src/state.c (state_new): Initialize each state's reachable member to
4866 false.
4867 (state_mark_reachable_states): New static function.
4868 (state_remove_unreachable_states): New global function.
4869 * src/state.h (struct state): Add member bool reachable.
4870 (state_remove_unreachable_states): Prototype.
4871 * tests/conflicts.at (Unreachable States After Conflict Resolution):
4872 New test case.
4873 * tests/existing.at (GNU pic Grammar): Update test case output now that
4874 an unused rule is discovered.
4875
4876 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4877
4878 Minor code cleanup in parser table construction.
4879 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
4880 (new_itemsets, save_reductions): Update for rename to nitemset.
4881 * src/closure.c (nritemset): Rename to...
4882 (nitemset): ... this since the "r" appears to meaningless and isn't
4883 used in the comments.
4884 (closure): Update for rename.
4885 * src/closure.h (nritemset): Update extern to...
4886 (nitemset): ... this.
4887 * src/lalr.c (LA): Fix a typo in comments.
4888 * src/print.c (print_core): Update for rename to nitemset.
4889 * src/print_graph.c (print_graph): Likewise.
4890 * src/state.h: Fix some typos in header comments.
4891
4892 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
4893
4894 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
4895 still sticks to ASCII. Sorry!
4896
4897 * README-hacking: New file, taken mostly from coreutils, with changes
4898 for Bison. Contains much of the contents of:
4899 * README-cvs: Remove.
4900 * bootstrap: Sync from gnulib.
4901 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
4902 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
4903
4904 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
4905
4906 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
4907 Setzer.
4908 (Java Differences): Fix some typos.
4909 * THANKS: Add Sebastian Setzer.
4910
4911 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
4912
4913 * data/java.m4 (b4_single_class_if): Remove.
4914 (b4_abstract_if): Look at "%define abstract".
4915 (b4_lexer_if): New.
4916 (b4_union_name): Rename...
4917 (b4_yystype): ... to this. Map to "%define stype".
4918 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
4919 b4_maybe_throws): Fix quoting.
4920 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
4921 * data/lalr1.java (Lexer interface): Always define.
4922 (Lexer interface within parser class): Remove.
4923 (YYLexer class): New, used when "%code lexer" is present.
4924 (constructor): When "%code lexer" is used, pass %lex-param
4925 to the lexer constructor.
4926 (yylex, yyparse): Remove %lex-param from method invocations
4927 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
4928
4929 * doc/bison.texinfo (Java Bison Interface): Mention "%define
4930 abstract". Rename "%define union_name" to "%define stype".
4931 Rename method names according to previous patch.
4932 (Java Scanner Interface): Describe "%code lexer" instead of
4933 "%pure-parser" and "%define single_class".
4934 (Java Differences): Mention "%code lexer".
4935
4936 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
4937 Include scanner here, using macros from tests/local.at.
4938 (AT_DATA_CALC_Y): Remove final argument.
4939 (_AT_CHECK_JAVA_CALC): Likewise.
4940 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
4941 of %locations and %error-verbose.
4942 (main): Test with and without %lex-param.
4943 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
4944 (AT_BISON_OPTION_POPDEFS): Pop it.
4945
4946 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4947
4948 DJGPP spefic issue. Inhibit the use of disallowed characters for
4949 file name genertion on Win98, WinXP, etc. These are |<>":?*\
4950 and concern testsuite case 46.
4951 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
4952 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
4953 * djgpp/config.bat: Inhibit the use of disallowed characters.
4954
4955 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4956
4957 Miscellaneous %define and %code cleanup.
4958 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
4959 values are interpreted.
4960 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
4961 documentation a little more.
4962 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
4963 muscle_percent_define_insert, muscle_percent_code_grow): New
4964 functions/macros.
4965 * src/muscle_tab.h (muscle_percent_define_insert,
4966 muscle_percent_code_grow): Prototype.
4967 * src/parse-gram.y (prologue_declaration): Use
4968 muscle_percent_define_insert and muscle_percent_code_grow when parsing
4969 %define and %code directives.
4970
4971 Make it easy to share %define boolean variables between the front-end
4972 and back-end. Though not used yet, this will be useful in the future.
4973 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
4974 Bison uses of names rather than just skeleton uses of names.
4975 (b4_percent_define_get, b4_percent_define_ifdef): Rename
4976 b4_percent_define_skeleton_variables(VARIABLE) to
4977 b4_percent_define_bison_variables(VARIABLE).
4978 (b4_percent_code_get, b4_percent_code_ifdef): Rename
4979 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
4980 b4_percent_code_bison_qualifiers(QUALIFIER).
4981 (b4_check_user_names_wrap): Update for renames.
4982 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
4983 muscle_percent_define_default): New functions mimicking
4984 b4_percent_define_flag_if and b4_percent_define_default.
4985
4986 For %define variables, report locations for invalid values and
4987 redefinitions.
4988 * data/bison.m4 (b4_percent_define_flag_if): Read
4989 b4_percent_define_loc(VARIABLE) to report the location of an invalid
4990 value for VARIABLE.
4991 (b4_percent_define_default): Save a special location in
4992 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
4993 must later be reported as invalid.
4994 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
4995 functions.
4996 (muscle_percent_define_insert): Record the location of VARIABLE in
4997 muscle percent_define_loc(VARIABLE), and use it to report the previous
4998 location for a redefinition.
4999 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
5000 (muscle_percent_define_default): Update like b4_percent_define_default.
5001 (muscle_grow_user_name_list): Rename to...
5002 (muscle_user_name_list_grow): ... this for consistency and use
5003 muscle_location_grow.
5004 * src/muscle_tab.h (muscle_location_grow): Prototype.
5005 * tests/input.at (%define errors): Update expected output.
5006 * tests/skeletons.at (%define boolean variables: invalid skeleton
5007 defaults): New test case.
5008
5009 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
5010
5011 * src/print.c (lookahead_set, state_default_rule): Remove.
5012 (print_reductions): Replace state_default_rule invocation with
5013 equivalent use of yydefact, which was computed in token_actions in
5014 tables.c.
5015 (print_results): Don't allocate lookahead_set.
5016
5017 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
5018
5019 * data/lalr1.java: Prefix all private members with yy.
5020
5021 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
5022
5023 Use YYFPRINTF instead of fprintf where appropriate. Reported by
5024 Sebastien Fricker at
5025 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
5026 * THANKS: Add Sebastien Fricker.
5027 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
5028 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
5029 accept a variable number of arguments.
5030
5031 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
5032
5033 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
5034
5035 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5036
5037 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
5038 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
5039 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
5040
5041 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
5042
5043 Undo my 2007-02-07 change, switching back to the c-strcase module
5044 introduced in the 2007-02-03 change. Bruno Haible reported that
5045 the 2007-02-07 change would be dangerous in Turkish if we add a
5046 language whose name contains "i", since "i" is not lowercase "I"
5047 in Turkish.
5048 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
5049 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
5050 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
5051 * m4/.cvsignore: Remove strcase.m4.
5052 * src/getargs.c: Revert 2007-02-07 change, as follows.
5053 Include c-strcase.h.
5054 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
5055
5056 2007-02-11 Bruno Haible <bruno@clisp.org>
5057
5058 Enable the Java related testsuite tests when the only Java compiler
5059 found is a gcj < 4.3. Discussed at
5060 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
5061 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
5062
5063 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
5064
5065 * data/Makefile.am: Update copyright date.
5066 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
5067 yypstate_new returns NULL.
5068 (yypstate_new): Return NULL if malloc does.
5069 * src/reader.c (packgram): Move translation of rule actions from the
5070 beginning of packgram to...
5071 (check_and_convert_grammar): ... here right before packgram is invoked
5072 so it's easier to write more complete comments, and remove redundant
5073 code.
5074
5075 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
5076
5077 As in semantic actions, make @$ in %initial-action, %destructor, and
5078 %printer imply %locations.
5079 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
5080 scanning @$.
5081 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
5082 (@$ in %initial-action implies %locations,
5083 @$ in %destructor implies %locations,
5084 @$ in %printer implies %locations): ... these new test cases.
5085
5086 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
5087
5088 Undo most of the 2007-02-03 change, switching to the strcase module
5089 now that gnulib strcase has been fixed.
5090 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
5091 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
5092 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
5093 * m4/.cvsignore: Add strcase.m4.
5094 * src/getargs.c: Revert 2007-02-03 change, as follows.
5095 Don't include c-strcase.h.
5096 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
5097 strcasecmp has "unspecified behavior" outside the POSIX locale,
5098 but it works fine in practice if at least one argument is ASCII,
5099 as is the case in Bison.
5100
5101 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
5102
5103 * tests/java.at: Skip tests if only one of javac/java is present.
5104 Reported by Joel E. Denny.
5105 * tests/atlocal.in: Adjust copyright years.
5106
5107 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
5108
5109 * data/lalr1.java (Stack): Work around old verifiers that disallow
5110 access to the private fields of an inner class, from the outer class.
5111 We can make Stack's fields public because user code doesn't have access
5112 to the instance of Stack used by parse(). Reported by Paul Eggert.
5113
5114 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
5115
5116 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
5117 the right spot for these files?
5118 * bootstrap.conf (gnulib_modules): Add c-strcase.
5119 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
5120 c-strncasecmp.c.
5121 * src/getargs.c: Include c-strcase.h.
5122 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
5123 to avoid unspecified behavior.
5124
5125 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
5126
5127 * doc/bison.texinfo (Decl Summary): Correct typo.
5128
5129 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
5130
5131 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
5132 Complain if the value does not match empty, "true" or "false".
5133 * data/c++.m4: Adjust default definitions of %define variables.
5134 * data/java.m4: Adjust default definitions of %define variables.
5135 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
5136 to above behavior.
5137 * tests/input.at (Boolean %define variables): Test new behavior.
5138
5139 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
5140
5141 * NEWS: Mention java.
5142 * TODO: Remove things that are done.
5143 * bootstrap.conf: Add javacomp-script and javaexec-script.
5144 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
5145
5146 * data/Makefile.am: Add new files.
5147 * data/java-skel.m4: New.
5148 * data/java.m4: New.
5149 * data/lalr1.java: New.
5150
5151 * doc/bison.texinfo: Put "A Complete C++ Example" under
5152 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
5153 under Other Languages.
5154
5155 * src/getargs.c (valid_languages): Add Java.
5156 * src/getargs.h (struct bison_language): Update size of string fields.
5157
5158 * tests/Makefile.am: Add java.at.
5159 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
5160 * tests/java.at: New.
5161 * tests/testsuite.at: Include it.
5162
5163 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
5164
5165 Clean up.
5166 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
5167 at_directive_argv arguments so these no longer have to be global
5168 variables. Also, update the implementation for the following changes.
5169 (fail_for_at_directive_too_many_args,
5170 fail_for_at_directive_too_few_args): Add at_directive_name argument.
5171 (at_directive_name): Remove as at_directive_argv[0] will be used for
5172 this now.
5173 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
5174 for the directive name.
5175 (at_directive_argc, at_directive_argv): Make these local within
5176 skel_lex instead of global.
5177 (INITIAL): Update directive start action for above changes.
5178 (SC_AT_DIRECTIVE_ARG): Rename to...
5179 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
5180 (SC_AT_DIRECTIVE_SKIP_WS): Update.
5181 (scan_skel): Move yylex_destroy to...
5182 (skel_scanner_free): ... here.
5183 * tests/skeletons.at (installed skeleton file name): Rename to...
5184 (installed skeleton file names): ... this.
5185
5186 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
5187
5188 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
5189 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
5190 Summary" not "Directives".
5191 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
5192 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
5193 since the former is now the more complete one.
5194 (Prologue Alternatives): Likewise and do the same for %defines.
5195 (Table of Symbols): Add summary of %code, add summary of %define, and
5196 move full %code documentation to...
5197 (Decl Summary): ... here for consistency with other entries in these
5198 sections.
5199 Move %define entry in order to keep this list alphabetized.
5200 Reword %define entry a little to put less emphasis on the skeleton
5201 concept, which most users shouldn't have to think about.
5202
5203 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
5204
5205 Adjust to recent gnulib changes.
5206 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
5207 Add string.h, string_.h, unistd_.h, wchar_.h.
5208 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
5209 * src/system.h: Don't include <stpcpy.h>; this is now done by
5210 <string.h>.
5211
5212 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
5213
5214 Simplify implementation of unqualified %code, implement macros for
5215 uniform treatment of boolean %define flags. Document %define.
5216 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
5217 b4_percent_code_ifdef): New.
5218 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
5219 * data/c++.m4: Define default value for global_tokens_and_yystype.
5220 * data/glr.cc: Likewise.
5221 * data/location.cc: Use b4_percent_define_flag_if.
5222
5223 * doc/bison.texinfo (Decl Summary): Document %define.
5224
5225 * src/parse-gram.y (Unqualified %code): Change muscle name to
5226 b4_percent_code().
5227 (content.opt): Default to empty.
5228
5229 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
5230
5231 Implement support for relative and absolute skeleton file names.
5232 Discussed starting at
5233 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
5234 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
5235 (Bison Options): Document in --skeleton entry.
5236 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
5237 full_skeleton can't necessarily hold all of pkgdatadir.
5238 If the specified skeleton file name contains a `/', don't prepend
5239 pkgdatadir.
5240 * src/parse-gram.y (prologue_declaration): If the specified skeleton
5241 file name contains a `/', prepend the grammar file directory.
5242 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
5243 * skeletons.at: New file.
5244 (relative skeleton file names): New test case.
5245 (installed skeleton file names): New test case.
5246 * tests/testsuite.at: Include skeletons.at.
5247
5248 * bootstrap: Update copyright to 2007.
5249
5250 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
5251
5252 * bootstrap: Remove occurrences of .#bootmp from the files.
5253
5254 2007-01-17 Akim Demaille <akim@epita.fr>
5255
5256 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
5257 nonterminals.
5258 Use per-type %printer.
5259
5260 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
5261
5262 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
5263 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5264 djgpp/config.site, src/files.c, src/files.h, src/main.c,
5265 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
5266 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
5267 tests/glr-regression.at, tests/input.at, tests/local.at,
5268 tests/output.at, tests/torture.at: Update copyright to 2007.
5269
5270 2007-01-16 Akim Demaille <akim@epita.fr>
5271
5272 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
5273 error code.
5274 (Calc++ Scanner): Exit with failure if we can't open the input
5275 file.
5276 Accept "-" standing for stdin.
5277 (Calc++ Top Level): Print the result only if the parsing was
5278 successful.
5279
5280 2007-01-16 Akim Demaille <akim@epita.fr>
5281
5282 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
5283
5284 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
5285 and Joel E. Denny <jdenny@ces.clemson.edu>
5286
5287 Clean up %define and %code implementation in M4 some. Most
5288 importantly, rename all related macros to be in the b4_percent_define
5289 and b4_percent_code namespaces. Also, complete support for `.' in
5290 %define variable names and %code qualifiers.
5291 * data/bison.m4 (b4_check_user_names): Check for special
5292 "SKELETON-NAMESPACE(name)" macros instead of using two nested
5293 m4_foreach loops.
5294 (b4_get_percent_define, b4_get_percent_code): Rename to...
5295 (b4_percent_define_get, b4_percent_code_get): ... these.
5296 Extend documentation with examples.
5297 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
5298 b4_percent_define_skeleton_variables and
5299 b4_percent_code_skeleton_qualifiers.
5300 Expect any value for the %define variable `foo' to be stored in the
5301 macro named `b4_percent_define(foo)'; expect any %code blocks for the
5302 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
5303 expect any unqualified %code blocks to be stored in a macro named
5304 `b4_percent_code_unqualified'.
5305 Use m4_indir so that %define variable names and %code qualifiers can
5306 contain `.', which is allowed by the grammar parser.
5307 (b4_percent_define_default): New macro to set a default value for a
5308 %define variable.
5309 (m4_wrap): Update wrapped code, and fix some underquoting.
5310 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
5311 Expect grammar uses of %define variables and %code qualifiers to be
5312 defined in b4_percent_define_user_variables and
5313 b4_percent_code_user_qualifiers.
5314 * data/c++.m4: Use b4_percent_define_default rather than
5315 m4_define_default. Fix some underquoting. Skeleton usage of %define
5316 variable define_location_comparison now implies skeleton usage of
5317 %define variable filename_type.
5318 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5319 data/push.c, data/yacc.c: Update macro names.
5320 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
5321 muscle names.
5322
5323 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5324
5325 DJGPP specific issues.
5326
5327 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
5328 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
5329
5330 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5331
5332 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
5333 run parsers in all tests so that Valgrind is invoked during
5334 maintainer-check-valgrind.
5335 (Duplicate representation of merged trees): Free all semantic values.
5336 (Duplicated user destructor for lookahead): Likewise.
5337
5338 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5339
5340 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
5341 command-line prefix.
5342 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
5343 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
5344 miss Valgrind messages.
5345 (Exploding the Stack Size with Malloc): Likewise.
5346
5347 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5348
5349 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
5350 locals. Reported by Juan Manuel Guerrero at
5351 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
5352 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
5353 Fix some indentation also.
5354 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
5355 explaining this issue.
5356
5357 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
5358 and Joel E. Denny <jdenny@ces.clemson.edu>
5359
5360 Simplify union and prologue handling, and escape union and lex/parse
5361 params with digraphs.
5362 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
5363 values to the empty string since these are no longer guaranteed
5364 initialized by the front-end.
5365 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
5366 braces around b4_user_stype since this is no longer done by the
5367 front-end.
5368 * src/files.c, src/files.h (pre_prologue_obstack,
5369 post_prologue_obstack): Remove.
5370 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
5371 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
5372 with digraphs. This fixes lex params and parse params.
5373 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
5374 * src/output.c (prepare): Remove muscle insertion of the prologues.
5375 (output): Remove freeing of pre_prologue_obstack and
5376 post_prologue_obstack.
5377 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
5378 than prologue_augment for prologue parsing so you don't need prologue
5379 obstacks.
5380 (grammar_declaration): For %union RHS, use `braceless' instead of
5381 "{...}" so that braces are already stripped and code is escaped with
5382 digraphs.
5383 * src/reader.c (prologue_augment): Remove.
5384 (reader): Remove initialization of pre_prologue_obstack and
5385 post_prologue_obstack.
5386 * src/reader.h (prologue_augment): Remove.
5387
5388 * data/c.m4: Remove stray parenthesis.
5389
5390 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5391
5392 Remove quotes from variables names in %define directives and from
5393 qualifiers in %code directives, and restrict the characters that are
5394 allowed in them to M4-friendly ones. For %define, continue to support
5395 the quoted form as a deprecated feature. Discussed starting at
5396 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
5397 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
5398 %code.
5399 * doc/bison.texinfo (Prologue Alternatives): Update.
5400 (Decl Summary): In %defines entry, update mention of `%code requires'
5401 and `%code provides'.
5402 (C++ Location Values): Update %define uses.
5403 (Calc++ Parser Interface): Likewise.
5404 (Calc++ Parser): Likewise, and update `%code requires' uses.
5405 (Table of Symbols): Update %code documentation.
5406 * src/parse-gram.y (prologue_declaration): For %define variables, use
5407 `variable' instead of `STRING'.
5408 (grammar_declaration): For %code qualifiers, use `ID' instead of
5409 `STRING'.
5410 (variable): New nonterminal that takes an `ID' or a `STRING'.
5411 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
5412 and %define uses.
5413 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
5414 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
5415 (%define errors): Update %define uses.
5416
5417 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5418
5419 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
5420 instead of muscle_insert for %define values so that M4-special
5421 characters are replaced with digraphs.
5422 * tests/input.at (%define errors): Extend to check weird values.
5423
5424 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5425
5426 Instead of having skeletons declare all valid %define variables and
5427 %code qualifiers, provide macros that retrieve the associated values
5428 and build these lists automatically. Thus Bison will now warn when a
5429 variable or qualifier is not used by the skeleton in the current
5430 invocation regardless of whether it might sometimes be used by that
5431 skeleton in other invocations. Also, move all %define value macros to
5432 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
5433 form, which is replaced by %code.
5434 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
5435 (b4_check_user_names): ... this, and change the series of valid name
5436 arguments to a single list argument for names used in the skeleton
5437 similar to the existing list argument for names used in the grammar.
5438 Warn instead of complaining.
5439 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
5440 values and %code code, to format %code code properly, and to build
5441 lists of all %define variables and %code qualifiers used in the
5442 skeleton: b4_skeleton_percent_define_variables and
5443 b4_skeleton_percent_code_qualifiers.
5444 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
5445 Remove, and...
5446 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
5447 the skeleton names lists can finish building first. In place of
5448 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
5449 expect the lists b4_user_percent_define_variables and
5450 b4_user_percent_code_qualifiers.
5451 * data/c++.m4: Where setting default values for b4_parser_class_name,
5452 b4_location_type, b4_filename_type, b4_namespace, and
5453 b4_define_location_comparison, update their names to the
5454 b4_percent_define_ namespace.
5455 * data/glr.c: Don't use b4_check_percent_define_variables and
5456 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
5457 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
5458 (b4_parser_class_name, b4_namespace): Define these using
5459 b4_get_percent_define for parser_class_name and namespace.
5460 * data/location.cc: Use b4_get_percent_define.
5461 * data/push.c: Don't use b4_check_percent_define_variables and
5462 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
5463 * data/yacc.c: Likewise, and don't call m4_exit in
5464 b4_use_push_for_pull_if or m4_wrap code will never execute.
5465 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
5466 Rename to...
5467 (muscle_grow_user_name_list): ... this for consistency with the
5468 terminology used in bison.m4.
5469 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
5470 %define variable names, and rename muscle used_percent_define_variables
5471 to user_percent_define_variables.
5472 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
5473 user_percent_code_qualifiers.
5474 (content): Remove.
5475 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
5476 {CODE} form is no longer accepted.
5477 * tests/input.at (Reject bad %code qualifiers): Rename to...
5478 (Reject unused %code qualifiers): ... this, and update test output.
5479 (%define error): Update test output.
5480
5481 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
5482
5483 Check for unrecognized %define variables similar to checking for
5484 unrecognized %code qualifiers. Check for redefined %define variables.
5485 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
5486 generalizes...
5487 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
5488 (b4_check_percent_define_variables): New, also wraps it.
5489 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
5490 variables using b4_check_percent_define_variables.
5491 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
5492 all those exercised in the test suite and all those listed in the
5493 `Default values' section of c++.m4. Are there others?
5494 * data/push.c, data/yacc.c: Declare no valid %define variables.
5495 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
5496 similar to muscle_find, but it works even when the muscle stores a
5497 const value.
5498 (muscle_grow_used_name_list): New function for constructing the used
5499 name list muscles that b4_check_for_unrecognized_names requires.
5500 * src/parse-gram.y (prologue_declaration): Warn if a variable is
5501 %define'd more than once. Define the b4_used_percent_define_variables
5502 muscle with muscle_grow_used_name_list.
5503 (grammar_declaration): Abbreviate %code code with
5504 muscle_grow_used_name_list.
5505 * tests/input.at (%define errors): New.
5506
5507 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5508
5509 Provide warn_at, complain_at, and fatal_at function callbacks to the
5510 skeletons, and use this for %code qualifier complaints.
5511 * data/bison.m4 (b4_error_at): New, invoked by...
5512 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
5513 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
5514 @fatal_at(...@) directives.
5515 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
5516 qualifiers in b4_used_percent_code_qualifiers and to use
5517 b4_complain_at.
5518 * src/location.c, src/location.h (boundary_set_from_string): New global
5519 function.
5520 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
5521 function.
5522 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
5523 to b4_used_percent_code_qualifiers.
5524 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
5525 function.
5526 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
5527 (lineno): Rename to...
5528 (out_lineno): ... this so I don't misunderstand it again.
5529 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
5530 here; these newlines are in the input but not the output file.
5531 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
5532 (at_directive_perform): ... this new static function, and add handling
5533 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
5534 directives.
5535 * tests/input.at (Reject bad %code qualifiers): Update test output with
5536 locations and extend.
5537
5538 * tests/output.at (Output file name: [, Output file name: ]): Remove
5539 bogus comment about these tests failing.
5540
5541 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5542
5543 Clean up b4_check_percent_code_qualifiers a little.
5544 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
5545 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
5546 documentation and add examples.
5547 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
5548 qualifiers here.
5549
5550 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
5551
5552 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
5553 unreliable -- especially when they're hidden inside another macro.
5554 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
5555 data/c.m4: Remove m4_divert(-1).
5556 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5557 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
5558 m4_divert_push(0) and m4_divert_pop(0).
5559 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
5560 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
5561 pushed and popped by m4sugar, should be first on the stack.
5562
5563 Provide warn, complain, and fatal function callbacks to the skeletons.
5564 This provides more flexibility than m4_fatal, improves the error
5565 message format, and captures messages for translation. Discussed
5566 starting at
5567 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
5568 * data/bison.m4 (b4_error): New, invoked by...
5569 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
5570 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
5571 directives. Because these M4 macros might be called when the current
5572 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
5573 the previous removal of uses of m4_divert, which caused trouble.
5574 (b4_check_percent_code_qualifiers): Use b4_complain instead of
5575 m4_fatal to report unrecognized %code qualifiers.
5576 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
5577 push parser requests.
5578 * data/glr.c: Use b4_complain instead of m4_fatal to report
5579 non-deterministic push parser requests.
5580 Update @output usage to @output(...@) form.
5581 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
5582 report missing %defines. Update @output usage to @output(...@) form.
5583 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
5584 @output(...@) form.
5585 * src/main.c (main): Invoke skel_scanner_free.
5586 * src/scan-skel.h (skel_scanner_free): Prototype new function.
5587 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
5588 obstack_for_string from flex-scanner.h.
5589 (YY_DECL): Use to declare skel_lex static.
5590 (decode_at_digraphs): Remove; now handled in the new
5591 SC_AT_DIRECTIVE_ARG start condition.
5592 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
5593 functions.
5594 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
5595 at_directive_argv): New static globals.
5596 (INITIAL): Use fail_for_invalid_at.
5597 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
5598 recognize the start of a generalized `@directive(...@)' form and
5599 start...
5600 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
5601 directive args (using the new obstack_for_string), to decode the
5602 contained @ diagraphs, and to perform the directive. It recognizes
5603 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
5604 @output(...@).
5605 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
5606 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
5607 `@,'.
5608 (scan_skel): Initialize obstack_for_string on the first call.
5609 (skel_scanner_free): New function to free obstack_for_string.
5610 * tests/input.at (Reject bad %code qualifiers): Update test output.
5611
5612 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
5613
5614 Consolidate the 4 prologue alternative directives (%code, %requires,
5615 %provides, and %code-top) into a single %code directive with an
5616 optional qualifier field. Discussed at
5617 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
5618 * NEWS (2.3a+): Rewrite the existing entry for the prologue
5619 alternatives.
5620 * doc/bison.texinfo (Prologue Alternatives): Update.
5621 (Decl Summary): Update to %code "requires" and %code "provides".
5622 (Calc++ Parser): Update to %code "requires".
5623 (Table of Symbols): Remove entries for %requires, %provides, and
5624 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
5625 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
5626 are replaced by b4_percent_code_provides and b4_percent_code_requires,
5627 which are skeleton-specific.
5628 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
5629 declare what %code qualifiers it supports and to complain if any other
5630 qualifiers were used in the grammar.
5631 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
5632 and b4_user_code([b4_percent_code_provides]) in place of
5633 b4_user_requires and b4_user_provides.
5634 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
5635 Add b4_user_code([b4_percent_code_top]) and
5636 b4_user_code([b4_percent_code]).
5637 Invoke b4_check_percent_code_qualifiers.
5638 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5639 PERCENT_REQUIRES): Remove.
5640 (grammar_declaration): Remove RHS's for %code-top, %provides, and
5641 %requires. Rewrite the %code RHS as the unqualified form defining the
5642 muscle b4_percent_code. Add another RHS for the qualified %code form,
5643 which defines muscles of the form b4_percent_code_QUALIFIER and the
5644 b4_used_percent_code_qualifiers muscle.
5645 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5646 PERCENT_REQUIRES): Remove.
5647 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
5648 %code "requires" and %code "provides".
5649 * tests/input.at (Reject bad %code qualifiers): New.
5650
5651 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5652
5653 Use the new code_props interface for destructors and printers.
5654 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
5655 printer_location members, and change the type of the destructor and
5656 printer members to code_props.
5657 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
5658 symbol_printer_get, semantic_type_destructor_set,
5659 semantic_type_printer_set, default_tagged_destructor_set,
5660 default_tagless_destructor_set, default_tagged_printer_set,
5661 default_tagless_printer_set): Use code_props in arguments and return
5662 types in place of char const * and location.
5663 (symbol_destructor_location_get, symbol_printer_location_get): Remove
5664 since the locations are now contained in the return of
5665 symbol_destructor_get and symbol_printer_get.
5666 * src/output.c (symbol_destructors_output, symbol_printers_output):
5667 Replace with...
5668 (symbol_code_props_output): ... this to eliminate duplicate code.
5669 (output_skeleton): Update to use symbol_code_props_output.
5670 * src/reader.c (symbol_should_be_used): Update use of
5671 symbol_destructor_get.
5672 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
5673 Update uses of the various _destructor_set and _printer_set functions.
5674 * src/symtab.c: (default_tagged_destructor_location,
5675 default_tagless_destructor_location, default_tagged_printer_location,
5676 default_tagless_printer_location): Remove since we...
5677 (default_tagged_destructor, default_tagless_destructor,
5678 default_tagged_printer, default_tagless_printer): ... change the type
5679 of these to code_props.
5680 (symbol_new, semantic_type_new, symbol_destructor_set,
5681 semantic_type_destructor_set, symbol_destructor_get,
5682 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
5683 symbol_check_alias_consistency, default_tagged_destructor_set,
5684 default_tagless_destructor_set, default_tagged_printer_set,
5685 default_tagless_printer_set): Update.
5686 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
5687 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
5688 code_props members.
5689 (symbol_print): Use SYMBOL_CODE_PRINT.
5690
5691 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5692
5693 Use the new code_props interface for rule actions.
5694 * src/symlist.h (symbol_list): Replace action, action_location, and
5695 used members with a code_props action_props member.
5696 * src/reader.c (symbol_should_be_used, grammar_rule_check,
5697 grammar_midrule_action, grammar_current_rule_merge_set,
5698 grammar_current_rule_symbol_append, packgram): Update.
5699 * src/scan-code.h (translate_rule_action): Remove, no longer used.
5700 * src/scan-code.l (handle_action_dollar): Update.
5701 (translate_rule_action): Remove, no longer used.
5702 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
5703
5704 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5705
5706 Use the new code_props interface in parse-gram.y.
5707 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
5708 Update all uses of translate_* functions to use the new code_props
5709 interface and to use gram_scanner_last_string_free and
5710 code_scanner_last_string_free where possible.
5711 (grammar_declaration): symbol_list_destructor_set and
5712 symbol_list_printer_set now perform the translation, so don't do it
5713 here. Use gram_scanner_last_string_free where possible.
5714 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
5715 translate_code): Remove, no longer used.
5716 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
5717 symbol_list_printer_set): Perform code translation here rather than
5718 depending on the caller to do so.
5719
5720 * src/symlist.h (struct symbol_list): Correct some documentation typos.
5721 * src/scan-gram.h (gram_last_string): Remove declaration.
5722 * src/scan-gram.l (last_string): Declare it static.
5723
5724 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5725
5726 Encapsulate code properties and related functionality for the various
5727 destructors, printers, and actions into a code_props structure and
5728 interface. This patch merely implements code_props in scan-code.h and
5729 scan-code.l. Future patches will rewrite other modules to use it.
5730 Discussed starting at
5731 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
5732 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
5733 consistently initialize const structs that have an empty location
5734 field.
5735 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
5736 to ensure consistency.
5737 * src/scan-code.h (code_props): New structure.
5738 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
5739 function, macro, and const global variable for initializing a
5740 code_props with no code.
5741 (code_props_plain_init, code_props_symbol_action_init,
5742 code_props_rule_action_init, code_props_translate_code): The rest of
5743 the new code_props functional interface. Among other things, the init
5744 functions set the code_props kind field so that
5745 code_props_translate_code will know whether to behave like
5746 translate_symbol_action, translate_rule_action, or translate_code.
5747 These old translate functions must remain until all other modules are
5748 updated to use the new code_props interface.
5749 (code_scanner_last_string_free): New function similar to
5750 gram_scanner_last_string_free.
5751 (code_scanner_free): Add documentation.
5752 * src/scan-code.l: Implement the new interface.
5753 (code_lex): Make it static, add a code_props* argument, and remove the
5754 rule argument.
5755 (last_string): New static global similar to the one in scan-gram.l.
5756 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
5757 instead of rule.
5758 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
5759 code_props since Bison may one day use this information for destructors
5760 and printers.
5761 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
5762 (handle_action_dollar): Use symbol_list_n_get and set used flag
5763 directly since symbol_list_n_used_set is removed.
5764 (translate_action): Add a code_props* argument and remove the rule,
5765 action, and location arguments. Pass the code_props* on to code_lex.
5766 (translate_rule_action, translate_symbol_action, translate_code):
5767 Rewrite as wrappers around the new code_props interface.
5768 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
5769 it would eventually need to break the encapsulation of code_props.
5770
5771 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5772
5773 * etc/.cvsignore: New.
5774
5775 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5776
5777 Add maintainer-push-check to run maintainer-check using push parsing in
5778 place of pull parsing where available.
5779 * Makefile.am (maintainer-push-check): New.
5780 * data/bison.m4 (b4_use_push_for_pull_if): New.
5781 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
5782 appropriately based on their existing values.
5783 (yypush_parse): Don't print push-parser-specific diagnostics if push
5784 parsing is being used in place of pull parsing.
5785 * data/yacc.c: If push parsing should replace pull parsing, redirect to
5786 push.c.
5787 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
5788 variable, and insert b4_use_push_for_pull_flag into muscles.
5789 * tests/Makefile.am (maintainer-push-check): New.
5790
5791 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5792
5793 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
5794 (whether successful or failed) so that yypush_parse can be invoked
5795 again to start a new parse using the same yypstate.
5796 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
5797 check multiple yypull_parse invocations on the same yypstate. For pull
5798 mode, extend to check multiple yyparse invocations.
5799 (Exploding the Stack Size with Alloca): Extend to try with
5800 %push-pull-parser.
5801 (Exploding the Stack Size with Malloc): Likewise.
5802
5803 * tests/calc.at (Simple LALR Calculator): Don't specify
5804 %skeleton "push.c" since %push-pull-parser implies that now.
5805 * tests/headers.at (export YYLTYPE): Don't check for the push
5806 declarations. Otherwise, this test case can't be used to see if push
5807 mode can truly emulate pull mode.
5808 * tests/input.at (Torturing the Scanner): Likewise.
5809 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
5810 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
5811 AT_YACC_IF, which now includes the case of push mode since %skeleton
5812 need not be used for push mode. This will be more intuitive once
5813 push.c is renamed to yacc.c.
5814
5815 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5816
5817 For push mode, convert yyparse from a macro to a function, invoke yylex
5818 instead of passing a yylexp argument to yypull_parse, and don't
5819 generate yypull_parse or yyparse unless %push-pull-parser is declared.
5820 Discussed starting at
5821 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
5822 * data/bison.m4 (b4_pull_if): New.
5823 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
5824 * data/push.c: Improve M4 quoting a little.
5825 (b4_generate_macro_args, b4_parenthesize): Remove.
5826 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
5827 any time a pull parser is requested.
5828 Don't #define this as a wrapper around yypull_parse. Instead, when
5829 both push and pull are requested, make it a function that does that
5830 same thing.
5831 (yypull_parse): If there's a b4_prefix, #define this to
5832 b4_prefix[pull_parse] when both push and pull are requested.
5833 Don't define this as a function unless both push and pull are
5834 requested.
5835 Remove the yylexp argument and hard-code yylex invocation instead.
5836 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
5837 %push-parser.
5838 * src/getargs.c (pull_parser): New global initialized to true.
5839 * getargs.h (pull_parser): extern it.
5840 * src/output.c (prepare): Insert pull_flag muscle.
5841 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
5842 (prologue_declaration): Set both push_parser and pull_parser = true for
5843 %push-pull-parser. Set push_parser = true and pull_parser = false for
5844 %push-parser.
5845 * src/scan-gram.l: Don't accept %push_parser as an alternative to
5846 %push-parser since there's no backward-compatibility concern here.
5847 Scan %push-pull-parser.
5848 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
5849 instead of %push-parser.
5850 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
5851 prototype it in the module that calls yyparse.
5852 * tests/input.at (Torturing the Scanner): Likewise.
5853 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
5854
5855 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
5856
5857 Update etc/bench.pl. Optimize push mode a little (the yyn change
5858 deserves most of the credit).
5859 * Makefile.am (SUBDIRS): Add etc subdirectory.
5860 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
5861 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
5862 yytoken, yyval, and yyloc declarations to...
5863 (yyparse or yypush_parse): ... here to improve performance. For
5864 yypush_parse invocations after the first, be sure to assign yyn its old
5865 value again.
5866 (yypstate_new): Don't bother initializing the yyresult field since the
5867 initial value isn't used.
5868 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
5869 remove the #define that, in push mode, set it to yyps->NAME.
5870 * etc/Makefile.am: New.
5871 * etc/bench.pl: Remove and build it instead from...
5872 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
5873 "tests/bison" from the build directory by default rather than just
5874 invoking "bison" from $PATH.
5875 (calc_grammar): Update push parser code: don't declare yylval globally,
5876 don't define yyparse_wrapper, and don't #define yyparse.
5877 (bench_grammar): Update to check all working combinations of yacc.c,
5878 push.c, impure, pure, pull, and push.
5879
5880 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5881
5882 For push mode, add pull wrappers around yypush_parse.
5883 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
5884 (yypull_parse): New function wrapping yypush_parse.
5885 (yyparse): New #define wrapping yypull_parse.
5886 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
5887 is declared.
5888 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
5889 prototype yylex in the module that calls yyparse, and don't prototype
5890 yyparse there. Otherwise, the yyparse expansion won't compile.
5891 * tests/input.at (Torturing the Scanner): Likewise.
5892
5893 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5894
5895 Enable push parsers to operate in impure mode. Thus, %push-parser no
5896 longer implies %pure-parser. The point of this change is to move
5897 towards being able to test the push parser code by running the entire
5898 test suite as if %push-parser had been declared.
5899 * data/push.c (yypush_parse): For impure mode, remove the
5900 yypushed_char, yypushed_val, and yypushed_loc arguments.
5901 Instead, declare these as local variables initialized to the global
5902 yychar, yylval, and yylloc.
5903 For the first yypush_parse invocation only, restore the initial values
5904 of these global variables when it's time to read a token since they
5905 have been overwritten.
5906 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
5907 %push-parser.
5908 * tests/calc.at (Simple LALR(1) Calculator): Always declare
5909 %pure-parser along with %push-parser since this test case was designed
5910 for pure push parsers.
5911 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
5912 (AT_YACC_OR_PUSH_IF): New.
5913 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
5914 add a note that it's still wrong for some cases (as it has been for a
5915 while).
5916 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
5917 %push-parser no longer implies %pure-parser.
5918
5919 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5920
5921 Remove some unnecessary differences between the pull parser code and
5922 the push parser code. This patch enables yynerrs in push mode.
5923 * data/push.c: Reformat M4 a little.
5924 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
5925 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
5926 because push mode is on. Instead, if pure mode is on, move yynerrs
5927 to...
5928 (b4_declare_parser_state_variables): ... here.
5929 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
5930 to yyps->NAME so it can be used in yypush_parse.
5931 (yypush_parse): Don't omit uses of yynerrs in push mode.
5932
5933 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5934
5935 Fix bug such that the first pushed token's value and location are
5936 sometimes overwritten (sometimes by %initial-action) before being used.
5937 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
5938 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
5939 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
5940 more closely mimic the pull parser logic.
5941 Don't copy the pushed token to yychar, yylval, and yylloc until it's
5942 time to read a token, which is after any initialization of yylval and
5943 yylloc.
5944 (gottoken): Rename label to...
5945 (yyread_pushed_token): ... for clarity and to avoid infringing on the
5946 user namespace.
5947
5948 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5949
5950 Rearrange initialization of the parser state variables so that the
5951 skeleton doesn't have to have a copy for pull mode and another for push
5952 mode. This patch also fixes at least a bug such that yylloc was not
5953 initialized (with b4_location_initial_line and
5954 b4_location_initial_column) upon calling yypush_parse. However, that
5955 initialization now overwrites the first token's location;
5956 %initial-action assigning @$ already did the same thing, and both bugs
5957 will be fixed in a later patch.
5958 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
5959 (b4_declare_parser_state_variables): Remove initialization of yytoken,
5960 yyss, yyvs, yyls, and yystacksize.
5961 (yypstate_new): Remove initialization of some yypstate fields: yystate,
5962 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
5963 yylsp.
5964 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
5965 yyps->NAME so it can be used in yypush_parse.
5966 (yyparse or yypush_parse): For yypush_parse, don't print the
5967 "Starting parse" diagnostic for invocations after the first.
5968 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
5969 yypush_parse, only do it for the first invocation.
5970 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
5971 initialization to occur in yypush_parse but only on the first
5972 invocation.
5973
5974 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5975
5976 * data/push.c: Add CPP guards around push parser declarations in both
5977 the header and the code file.
5978 In the code file, move the push parser declarations to the same place
5979 they appear in the header file.
5980 Clean up the M4 some, especially the inconsistent underquoting in
5981 some b4_c_function_def and b4_c_function_decl uses.
5982
5983 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5984
5985 Encapsulate the push parser state variables into an M4 macro so the
5986 push skeleton doesn't have to list them again for pull mode's yyparse.
5987 For push mode, remove yypush_parse's local equivalents of these
5988 variables to eliminate unnecessary copying between the two sets at
5989 run-time. This patch also fixes at least a bug related to multiple
5990 %initial-action invocations in push mode.
5991 * data/push.c (b4_declare_parser_variables): Rename to...
5992 (b4_declare_scanner_communication_variables): ... this for clarity and
5993 update both uses.
5994 (b4_declare_yyparse_variables): Remove and move its contents to the one
5995 spot where it was invoked.
5996 (b4_declare_parser_state_variables): New macro containing the parser
5997 state variables required by push mode.
5998 (struct yypstate): Replace all fields but yynew with
5999 b4_declare_parser_state_variables.
6000 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
6001 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
6002 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
6003 (yyparse or yypush_parse): For yyparse in pull mode, replace local
6004 parser state variable declarations with
6005 b4_declare_parser_state_variables.
6006 Don't initialize parser state variables when calling yypush_parse since
6007 yypstate_new already does that.
6008 Invoke the user's initial action only upon the first yypush_parse
6009 invocation.
6010 Remove all code that copies between the local parser state variables
6011 and the yypstate.
6012
6013 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
6014
6015 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
6016 prevent a name collision in a future patch where these names will
6017 sometimes be #define'd.
6018 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
6019 since it no longer has the same name as the existing argument.
6020 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
6021
6022 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
6023 and Joel E. Denny <jdenny@ces.clemson.edu>
6024
6025 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
6026 that the argument is case-insensitive, and there's no `=' here.
6027 For the %skeleton entry, mention that %language is better.
6028 (Bison Options): Likewise for --language and --skeleton. Move the
6029 --skeleton entry so that the `Tuning the parser' section is sorted
6030 alphabetically on long options.
6031 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
6032 %language directive in detail here; cross-reference the %language
6033 documentation instead.
6034 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
6035 `%require "2.3b"' so that the example is always up-to-date.
6036 (Table of Symbols): Add entries for %language and %skeleton.
6037 * examples/extexi (normalize): Instead of replacing every %require
6038 argument with the current Bison version, just substitute for
6039 `@value{VERSION}'. This guarantees that we're testing what actually
6040 appears in the documentation.
6041 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
6042 rather than `@VERSION@'.
6043
6044 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
6045
6046 * NEWS: Reword the %language news a bit, and put it earlier.
6047
6048 * src/getargs.c (skeleton_arg): Last arg is now location const *.
6049 Rewrite to simplify the logic.
6050 (language_argmatch): Likewise.
6051 (program_name): We now own this var.
6052 * src/getargs.h (struct bison_language): Use char[] rather than
6053 const char *.
6054
6055 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
6056 Java is supported.
6057 * src/complain.c (program_name): Remove decl; no longer needed.
6058 * src/main.c (program_name): Remove; now belongs to getargs.
6059
6060 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
6061
6062 * NEWS: Document %language.
6063
6064 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
6065
6066 * data/c-skel.m4, data/c++-skel.m4: New files.
6067 * data/glr.c: Complain on push parsers.
6068
6069 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
6070 over %skeleton.
6071 (Decl Summary): Document %language and %skeleton.
6072 (Command line): Document -L.
6073
6074 * examples/extexi: Rewrite %require directive.
6075 * examples/calc++/Makefile.am: Pass VERSION to extexi.
6076
6077 * src/files.c (compute_exts_from_gc): Look in language structure
6078 for .y extension.
6079 (compute_file_name_parts): Check whether .tab should be added.
6080 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
6081 (language, skeleton_arg, language_argmatch): New.
6082 (long_options): Add --language.
6083 (getargs): Use skeleton_arg, add -L/--language.
6084 * src/getargs.h: Include location.h.
6085 (struct bison_language, language, skeleton_arg, language_argmatch): New.
6086 * src/output.c (prepare): Pick default skeleton from struct language.
6087 Don't dispatch C skeletons here.
6088 * src/parse-gram.y (PERCENT_LANGUAGE): New.
6089 (prologue_declaration): Add "%language" rule, use skeleton_arg.
6090 * src/scan-gram.l ("%language"): New rule.
6091
6092 * tests/calc.at: Test %skeleton and %language.
6093 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
6094 (AT_GLR_IF): Look for %skeleton "glr.cc".
6095 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
6096 (AT_YACC_IF): Reject %language.
6097
6098 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
6099
6100 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
6101 since it wasn't used; only the typedef name 'semantic_type' is needed.
6102 Also, omit trailing white space.
6103
6104 * bootstrap: Sync from coreutils.
6105 (gnulib_extra_files): Add build-aux/announce.gen.
6106 (slurp): Adjust .gitignore files like .cvsignore files.
6107 * build-aux/announce-gen: Remove from CVS, since bootstrap
6108 now creates this.
6109
6110 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
6111
6112 Make %push-parser imply %pure-parser. This fixes several bugs; see
6113 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
6114 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
6115 pure_parser = true.
6116 * data/push.c: Don't bother testing b4_push_if when deciding whether
6117 to expand b4_declare_parser_variables globally.
6118 (yypush_parse): Likewise in here.
6119
6120 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
6121 (yy_reduce_print): Reformat M4 for readability.
6122
6123 2006-12-15 Bob Rossi <bob@brasko.net>
6124 and Joel Denny <jdenny@ces.clemson.edu>
6125
6126 * data/push.c (yypstate): Add typedef, and update all uses of
6127 struct yypstate to just yypstate.
6128 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
6129
6130 2006-12-14 Bob Rossi <bob@brasko.net>
6131
6132 * data/push.c (yypush_parse): Declare prototype regardless of
6133 %locations option.
6134
6135 2006-12-14 Bob Rossi <bob@brasko.net>
6136
6137 * data/push.c (yyparse): Remove the prototype and the #define when in
6138 push-parser mode.
6139
6140 2006-12-13 Bob Rossi <bob@brasko.net>
6141
6142 * data/push.c (yypstate_init): Rename to...
6143 (yypstate_new): ... this and use b4_c_function_def.
6144 (yypstate_delete): New.
6145 (yypush_parse): Change parameters yynval and yynlloc to be const.
6146 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
6147 yypstate_delete functions.
6148
6149 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
6150
6151 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
6152 strange test case titles. Reported by Bob Rossi.
6153
6154 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
6155
6156 * TODO: Add pointer to Sylvain Schmitz's work on static detection
6157 of potential ambiguities in GLR grammers.
6158
6159 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
6160
6161 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
6162 `bison ', use m4_index instead of m4_substr since chopping up a string
6163 containing M4-special characters causes problems here.
6164
6165 Fix a couple of bugs related to special characters in user-specified
6166 file names, and make it easier for skeletons to compute output file
6167 names with the same file name prefix as Bison-computed output file
6168 names.
6169 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
6170 b4_parser_file_name and b4_spec_defines_file instead of
6171 @output_parser_name@ and @output_header_name@, which are now redundant.
6172 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
6173 b4_parser_file_name, b4_spec_defines_file, and the new
6174 @basename(FILENAME@) instead of @output_parser_name@ and
6175 @output_header_name@, which inappropriately escaped the file names as
6176 C string literals.
6177 * src/files.c (all_but_ext): Remove static qualifier.
6178 (compute_output_file_names): Move `free (all_but_ext)' to...
6179 (output_file_names_free): ... here since all_but_ext is needed later.
6180 * src/files.h (all_but_ext): Extern.
6181 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
6182 exactly what MUSCLE_INSERT_STRING used to do.
6183 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
6184 characters are escaped properly.
6185 * src/output.c (prepare): Define muscle file_name_all_but_ext as
6186 all_but_ext.
6187 For pkgdatadir muscle, maintain previous functionality by using
6188 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
6189 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
6190 digraphs would never be expanded. Hopefully no one has M4-special
6191 characters in his Bison installation path.
6192 * src/scan-skel.l: Don't parse @output_header_name@ and
6193 @output_parser_name@ anymore since they're now redundant.
6194 In @output, use decode_at_digraphs.
6195 Parse a new @basename command that invokes last_component.
6196 (decode_at_digraphs): New.
6197 (BASE_QPUTS): Remove unused.
6198 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
6199 (Output file name): New tests.
6200
6201 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
6202
6203 Warn about output files that are generated by the skeletons and that
6204 conflict with other output files.
6205 * data/glr.c: Don't generate the header file here when glr.cc does.
6206 * src/files.c (file_names, file_names_count): New static globals.
6207 (compute_output_file_names): Invoke output_file_name_check for files
6208 not generated by the skeletons and remove existing checks.
6209 (output_file_name_check): New function that warns about conflicting
6210 output file names.
6211 (output_file_names_free): Free file_names.
6212 * src/files.h (output_file_name_check): Declare.
6213 * src/scan-skel.l: Invoke output_file_name_check for files generated by
6214 the skeletons.
6215 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
6216 (Conflicting output files): New tests.
6217
6218 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6219
6220 * doc/bison.texinfo: Fix a couple of typos.
6221
6222 2006-12-08 Bob Rossi <bob@brasko.net>
6223
6224 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
6225 Rename to...
6226 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
6227 update all uses.
6228 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
6229 (yypush_parse): Rename yypvars argument to yyps and remove redundant
6230 local pv.
6231 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
6232 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
6233
6234 2006-12-07 Bob Rossi <bob@brasko.net>
6235 and Joel Denny <jdenny@ces.clemson.edu>
6236
6237 * data/push.c (yypvarsinit): Change return type from void* to struct
6238 yypvars*. No longer cast to void* on return.
6239 (struct yypvars): Remove yylen since it need not be remembered between
6240 yypushparse invocations.
6241 (yypushparse): Don't copy between yylen and pv->yylen.
6242
6243 2006-12-05 Bob Rossi <bob@brasko.net>
6244
6245 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
6246 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
6247 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
6248 (struct yypvars): Remove b4_declare_parser_variables.
6249 (yypvarsinit): Remove init code for removed variables.
6250 (global scope): Do not declare b4_declare_parser_variables if
6251 push or pure mode.
6252 (yypushparse): Add b4_declare_parser_variables.
6253 Init new local variables, and remove init code for removed
6254 yypvars variables.
6255 (yyparse): Delete.
6256 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
6257 and yyparse for other modes.
6258 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
6259 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
6260 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
6261 (AT_PURE_LEX_IF): True if pure or push parser.
6262
6263 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
6264
6265 Document Yacc prologue alternatives and default %destructor's and
6266 %printer's as experimental. Don't mention Java yet. Discussed at
6267 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
6268 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
6269 (2.3a): Annotate this entry to say the old forms of these features were
6270 also experimental.
6271 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
6272 Table of Symbols): Say they're experimental. Comment out any mention
6273 of Java (we'll want this back eventually).
6274
6275 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
6276
6277 Support a file name argument to %defines. Deprecate `=' in
6278 %file-prefix, %name-prefix, and %output. Discussed at
6279 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
6280 * NEWS (2.3a+): Mention.
6281 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
6282 form of %defines, and remove `=' from entries for %file-prefix,
6283 %name-prefix, and %output.
6284 * src/parse-gram.y (prologue_declaration): Implement.
6285 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
6286 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
6287 all but one occurrence of %name-prefix.
6288 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
6289 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
6290 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
6291 occurrence of each of %file-prefix and %output. Add check for %defines
6292 with argument.
6293 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
6294 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
6295 Remove the `=' from %output.
6296
6297 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
6298
6299 Don't escape $ in test case titles since Autoconf 2.61 now does that
6300 correctly.
6301 * tests/actions.at (Default %printer and %destructor are not for error
6302 or $undefined): Here.
6303 (Default %printer and %destructor are not for $accept): Here.
6304 * tests/input.at (Invalid $n and @n): Here.
6305
6306 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
6307
6308 Rename <!> to <>. Discussed starting at
6309 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
6310 * NEWS (2.3a+): Update.
6311 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
6312 Update.
6313 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
6314 * src/scan-gram.l (INITIAL): Implement.
6315 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
6316 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
6317 comment.
6318 * tests/actions.at (Default tagless %printer and %destructor,
6319 Default tagged and per-type %printer and %destructor,
6320 Default %printer and %destructor are not for error or $undefined,
6321 Default %printer and %destructor are not for $accept,
6322 Default %printer and %destructor for mid-rule values): Update.
6323 * tests/input.at (Default %printer and %destructor redeclared,
6324 Unused values with default %destructor): Update.
6325
6326 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
6327
6328 Don't let %prec take a nonterminal.
6329 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
6330 token.
6331 * tests/input.at (%prec takes a token): New test checking that %prec
6332 won't take a nonterminal.
6333
6334 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6335
6336 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
6337 it was double-quoted.
6338 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
6339 grammar is maintained with Bison's highest standards.
6340 * src/getargs.c: Fix some typos in Doxygen comments.
6341
6342 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6343
6344 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
6345 later. Reported by Paul Eggert in
6346 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
6347 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
6348 * src/scan-code.l (translate_action): Don't bother invoking
6349 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
6350 (code_scanner_free): Instead of invoking
6351 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
6352 which frees more.
6353 * src/scan-gram.l (gram_scanner_free): Likewise.
6354 * src/scan-skel.l (scan_skel): Likewise.
6355
6356 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
6357
6358 * src/files.c (tr): Change return type to void.
6359 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
6360 has been called previously for the same key.
6361 (muscle_find): Return storage instead of value so that
6362 --enable-gcc-warnings doesn't produce warnings that the return discards
6363 const. aver that the value and storage are the same since storage
6364 could potentially be NULL when value is not.
6365 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
6366 same as 0.
6367
6368 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6369
6370 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
6371 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
6372 us a slightly cleaner distribution, and also works.
6373 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
6374 gnulib changes.
6375
6376 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
6377 and Paul Eggert <eggert@cs.ucla.edu>
6378
6379 Don't let Bison leak memory except when it complains.
6380 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
6381 (spec_defines_file, dir_prefix): Now char *, not const char *,
6382 since they are freed.
6383 * src/files.c: Likewise.
6384 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
6385 Likewise.
6386 (tr): Now operates in-place. All uses changed.
6387 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
6388 values.
6389 (compute_file_name_parts, compute_output_file_names): Don't store
6390 read-only data in variables that will be freed.
6391 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
6392 src_extension, and header_extension.
6393 (output_file_names_free): New public function to free
6394 spec_verbose_file, spec_graph_file, spec_defines_file,
6395 parser_file_name, and dir_prefix.
6396 * src/getargs.c (getargs): Don't store read-only data in variables that
6397 will be freed.
6398 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
6399 (which previously existed but was unused), and quotearg_free.
6400 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
6401 * src/muscle_tab.c: Likewise.
6402 (muscle_entry): Make the value char const *,
6403 and add a new storage member that is char * and can be freed.
6404 (muscle_entry_free): New private function.
6405 (muscle_init): Use it instead of free.
6406 (muscle_insert, muscle_grow): Update and use new storage member.
6407 (muscle_code_grow): Free the string passed to muscle_grow
6408 since it's not needed anymore.
6409 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
6410 add a new `char *code' member.
6411 ("{...}"): Declare semantic type as code.
6412 * src/scan-code.h (translate_rule_action):
6413 (translate_symbol_action, translate_code, translate_action): Return
6414 `char const *' rather than `char *' since external code should not free
6415 these strings.
6416 * src/scan-code.l: Likewise.
6417 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
6418 which is "{...}" in the parser.
6419 * tests/Makefile.am (maintainer-check-valgrind): Set
6420 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
6421 Valgrind.
6422 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
6423 complain.
6424 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
6425 expecting a non-zero exit status sets --leak-check=summary and
6426 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
6427 this case, and we don't want to hear about it.
6428
6429 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6430
6431 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
6432 instead of from the template, to simplify configuration a bit.
6433 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
6434 and m4/wint_t.m4, as they are needed with the latest gnulib.
6435
6436 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6437
6438 Disable unset/unused mid-rule value warnings by default, and recognize
6439 --warnings=midrule-values to enable them. Discussed starting at
6440 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
6441 * NEWS (2.3a+): Mention.
6442 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
6443 warnings): Add entry for midrule-values subargument.
6444 * src/reader.c (symbol_should_be_used): Don't return true just because
6445 the value is a set/used mid-rule value unless
6446 --warnings=midrule-values was specified.
6447 * tests/input.at (Unused values, Unused values before symbol
6448 declarations): Run tests with and without --warnings=midrule-values.
6449
6450 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
6451 than LIST_FREE directly.
6452
6453 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6454
6455 Finish implementing --warnings=error, which should not be implied by
6456 --warnings=all (or by its synonyms -W and --warnings without
6457 subarguments).
6458 * src/complain.c (set_warning_issued): New function to report that
6459 warnings are being treated as errors and to record an error if so.
6460 Invoke...
6461 (warn_at, warn): ... here.
6462 * src/getargs.c (warnings_args, warnings_types): Reorder so that
6463 "error - warnings are errors" does not appear above "all - all of the
6464 above".
6465 (getargs): For -W and --warnings without subarguments, don't let
6466 FLAGS_ARGMATCH set warnings_error in warnings_flag.
6467 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
6468
6469 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6470
6471 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
6472 empty subargument list. For example: `bison --warnings= parser.y'.
6473
6474 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6475
6476 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
6477 the parser header file so that gcc doesn't warn.
6478
6479 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6480
6481 Split the default %destructor/%printer into two kinds: <*> and <!>.
6482 Discussed starting at
6483 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
6484 * NEWS (2.3a+): Mention.
6485 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
6486 previous change today related to mid-rules.
6487 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
6488 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
6489 (TYPE_TAG_ANY): Add as <*>.
6490 (TYPE_TAG_NONE): Add as <!>.
6491 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
6492 for <*> and <!>.
6493 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
6494 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
6495 * src/symlist.c (symbol_list_default_new): Split into tagged and
6496 tagless versions.
6497 (symbol_list_destructor_set, symbol_list_printer_set): Split
6498 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
6499 SYMLIST_DEFAULT_TAGLESS.
6500 * src/symlist.h: Update symbol_list_default*_new prototypes.
6501 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
6502 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
6503 * src/symtab.c (default_destructor, default_destructor_location,
6504 default_printer, default_printer_location): Split each into tagged and
6505 tagless versions.
6506 (symbol_destructor_get, symbol_destructor_location_get,
6507 symbol_printer_get, symbol_printer_location_get): Implement tagged
6508 default and tagless default cases.
6509 (default_destructor_set, default_printer_set): Split each into tagged
6510 and tagless versions.
6511 * src/symtab.h: Update prototypes.
6512 * tests/actions.at (Default %printer and %destructor): Rename to...
6513 (Default tagless %printer and %destructor): ... this, and extend.
6514 (Per-type %printer and %destructor): Rename to...
6515 (Default tagged and per-type %printer and %destructor): ... this, and
6516 extend.
6517 (Default %printer and %destructor for user-defined end token): Extend.
6518 (Default %printer and %destructor are not for error or $undefined):
6519 Update.
6520 (Default %printer and %destructor are not for $accept): Update.
6521 (Default %printer and %destructor for mid-rule values): Extend.
6522 * tests/input.at (Default %printer and %destructor redeclared): Extend.
6523 (Unused values with default %destructor): Extend.
6524
6525 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6526
6527 Don't apply the default %destructor/%printer to an unreferenced midrule
6528 value. Mentioned at
6529 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
6530 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
6531 like $@n instead of just @n so that the default %destructor/%printer
6532 logic doesn't see them as user-defined symbols.
6533 (symbol_is_dummy): Check for both forms of the name.
6534 * src/reader.c (packgram): Remove the `$' from each midrule symbol
6535 name for which the midrule value is referenced in any action.
6536 * tests/actions.at (Default %printer and %destructor for mid-rule
6537 values): New test.
6538 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
6539 for change to dummy symbol names.
6540
6541 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
6542
6543 Warn about unset midrule $$ if the corresponding $n is used.
6544 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
6545 $n usage.
6546 (packgram): Before invoking grammar_rule_check on any rule, make sure
6547 all actions have already been scanned in order to set `used' flags.
6548 Otherwise, checking that a midrule's $$ is set will not always work
6549 properly because the midrule check must forward-reference the midrule's
6550 parent rule.
6551 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
6552 warning.
6553
6554 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
6555
6556 More improvements to the documentation of the prologue alternatives:
6557 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
6558 Bison manual.
6559 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
6560 some text to clarify the relative importance of the new directives and
6561 to show how these directives may be viewed as code labels.
6562
6563 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
6564
6565 Similar to the recently removed %before-header, add %code-top as the
6566 alternative to the pre-prologue. Mentioned at
6567 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
6568 Also, let the prologue alternatives appear in the grammar section.
6569 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
6570 (prologue_declaration): Move the existing prologue alternatives to...
6571 (grammar_declaration): ... here and add %code-top.
6572 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
6573
6574 Clean up and extend documentation for the prologue alternatives.
6575 * NEWS (2.3a+): Describe prologue alternatives.
6576 * doc/bison.texinfo (Prologue): Move discussion of prologue
6577 alternatives to...
6578 (Prologue Alternatives): ... this new section, and extend it to discuss
6579 all 4 directives in detail.
6580 (Table of Symbols): Clean up discussion of prologue alternatives and
6581 add %code-top.
6582
6583 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6584
6585 DJGPP specific issues.
6586
6587 * djgpp/config.bat: config.hin has been moved to lib. Adjust
6588 config.bat accordingly.
6589 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
6590 * djgpp/config.site: Likewise.
6591
6592 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
6593
6594 Replace %*-header with %provides, %requires, %code. See discussion at
6595 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
6596
6597 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
6598 (b4_user_start_header): Remove.
6599 * data/glr.c: Use new macros instead of b4_*start_header
6600 and b4_*end_header.
6601 * data/glr.cc: Likewise.
6602 * data/lalr1.cc: Likewise.
6603 * data/push.c: Likewise.
6604 * data/yacc.c: Likewise.
6605
6606 * doc/bison.texinfo: Remove %before-header, rename
6607 %{start,end,after}-header to %requires, %provides, %code.
6608
6609 * src/parse-gram.y: Likewise (also rename token names accordingly).
6610 * src/scan-gram.l: Likewise.
6611 * tests/actions.at: Likewise.
6612
6613 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
6614
6615 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
6616 Problem reported by Joel E. Denny.
6617
6618 2006-10-14 Jim Meyering <jim@meyering.net>
6619
6620 (Sync from coreutils.)
6621 Work also when the working directory (with e.g. coreutils sources)
6622 is version controlled with git, rather than CVS.
6623 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
6624 rather than CVS.
6625 In messages and comments, say e.g., "checked-out sources",
6626 rather than "CVS sources".
6627 (version_controlled_file): New function. Work for git as well as
6628 for CVS. Don't use grep's -q option.
6629 (slurp): Call it here, in place of CVS-specific code.
6630
6631 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
6632
6633 Fix testsuite for ./configure --enable-gcc-warnings:
6634 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
6635 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
6636 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
6637 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
6638 * test/regression.at (Diagnostic that expects two alternatives):
6639 Likewise.
6640
6641 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6642
6643 * bootstrap.conf (gnulib_modules): Add config-h.
6644 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
6645 worry about HAVE_CONFIG_H.
6646 * lib/abitset.c: Likewise.
6647 * lib/bitset.c: Likewise.
6648 * lib/bitset_stats.c: Likewise.
6649 * lib/bitsetv-print.c: Likewise.
6650 * lib/bitsetv.c: Likewise.
6651 * lib/ebitset.c: Likewise.
6652 * lib/get-errno.c: Likewise.
6653 * lib/lbitset.c: Likewise.
6654 * lib/subpipe.c: Likewise.
6655 * lib/timevar.c: Likewise.
6656 * lib/vbitset.c: Likewise.
6657 * lib/bitset.c: Include "bitset.h" first, to test interface.
6658 * lib/bitset_stats.c: Include "bitset_stats.h" first.
6659 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
6660 * lib/bitsetv.c: Include "bitsetv.h" first.
6661 * lib/get-errno.c: Include "get-errno.h" first.
6662 * m4/.cvsignore: Add config-h.m4.
6663 * tests/actions.at (Default %printer and %destructor for ...):
6664 Adjust expected line numbers in output to reflect removal of #if
6665 HAVE_CONFIG_H lines.
6666 * tests/glr-regression.at (Missed %merge type warnings when ...):
6667 Likewise.
6668 * tests/regression.at (Braced code in declaration in rules section):
6669 Likewise.
6670 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
6671 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
6672 Include <config.h> unconditionally.
6673
6674 * bootstrap: Sync from coreutils, as follows:
6675
6676 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6677
6678 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
6679 variable was sometimes used without being initialized. This
6680 messed up the installation of the INSTALL file in some cases.
6681
6682 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6683
6684 * bootstrap (usage, main program, symlink_to_gnulib): Add option
6685 --copy. Inspired by a suggestion from Bruno Haible.
6686
6687 2006-10-03 Jim Meyering <jim@meyering.net>
6688
6689 * bootstrap: Undo last change to this file, since now gnulib-tool
6690 sticks with the automake default in generating dependencies.
6691
6692 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6693
6694 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
6695 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
6696
6697 * doc/bison.1: Add copyright notice.
6698
6699 * data/glr.c: Don't include <stdarg.h>; not used.
6700
6701 * NEWS: The -g and --graph options now output graphs in Graphviz
6702 DOT format, not VCG format.
6703 * doc/bison.1: Likewise.
6704 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
6705 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
6706 of this change in
6707 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
6708 * TODO: Remove Graphviz entry.
6709 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
6710 remove vcg.c, vcg.h, vcg_defaults.h.
6711 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
6712 * src/graphviz.c, src/graphviz.h: New files.
6713 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
6714 * src/files.h: Make comment more generic.
6715 * src/main.c (main): Likewise.
6716 * src/print_graph.h: Likewise.
6717 * src/getargs.c (usage): Make usage description more generic.
6718 * src/print_graph.c: Include graphviz.h rather than vcg.h.
6719 (static_graph, fgraph): Remove. All uses changed to pass
6720 arguments instead of sharing a static var.
6721 (print_core, print_actions, print_state, print_graph):
6722 Output graphviz format rather than VCG format.
6723 * tests/.cvsignore: Remove *.vcg; add *.dot.
6724 * tests/output.at: Expect *.dot files, not *.vcg files.
6725
6726 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
6727 accommodates the 2006-10-08 change.
6728
6729 2006-10-11 Bob Rossi <bob@brasko.net>
6730
6731 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
6732 (b4_yyssa, b4_yyerror_range): New macros.
6733 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
6734 (yypvarsinit): Remove init of removed fields.
6735 (yypushparse): Remove use of removed fields; use new macros instead.
6736
6737 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6738
6739 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
6740 in a push parser. Reindent slightly to match yacc.c better.
6741
6742 2006-10-11 Bob Rossi <bob@brasko.net>
6743
6744 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
6745 yymsg_alloc fields.
6746 (yypvarsinit, yypushparse): Remove init of removed fields.
6747 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
6748
6749 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6750
6751 * THANKS: Add Paolo Bonzini and Bob Rossi.
6752
6753 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
6754
6755 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
6756 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
6757 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
6758 b4_define_user_cde and uses): Remove.
6759 (b4_comment, b4_prefix, b4_sync_start): New.
6760 * data/bison.m4: New file, with most of the content removed from c.m4.
6761 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
6762 * src/output.c (output_skeleton): Pass bison.m4.
6763 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
6764 only if specified.
6765
6766 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
6767
6768 Fix test failure reported by Tom Lane in
6769 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
6770 and try to make such failures easier to catch in the future.
6771 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
6772 that's now the caller's responsibility.
6773 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
6774 Set yychar = YYEOF if it's negative.
6775 * tests/actions.at (yylex): Abort if asked to read past EOF.
6776 * tests/conflicts.at (yylex): Likewise.
6777 * tests/cxx-type.at (yylex): Likewise.
6778 * tests/glr-regression.at (yylex): Likewise.
6779 * tests/input.at (yylex): Likewise.
6780 * tests/regression.at (yylex): Likewise.
6781 * tests/torture.at (yylex): Likewise.
6782
6783 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
6784
6785 Fix problems with translating English-language diagnostics.
6786 * bootstrap: Fix bug introduced in recent bootstrap changes, with
6787 respect to bison-runtime pot generation. The YY_ stuff
6788 wasn't being captured.
6789 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
6790 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
6791 * runtime-po/POTFILES.in: Add data/push.c.
6792
6793 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
6794
6795 Merge bootstrap changes from coreutils.
6796
6797 2006-09-28 Jim Meyering <jim@meyering.net>
6798
6799 Automatically generated dependencies are important even
6800 when all of the sources in a directory come from gnulib.
6801 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
6802 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
6803
6804 2006-09-23 Jim Meyering <jim@meyering.net>
6805
6806 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
6807
6808 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6809
6810 * bootstrap: Add support for --force.
6811 (usage): New function. Describe usage less tersely.
6812 (CVS_only_file): New var.
6813
6814 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
6815
6816 * data/push.c (YYPUSH_MORE): Make it an enum instead.
6817 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
6818 Adjust white space and comments to match GNU style better.
6819
6820 2006-09-20 Bob Rossi <bob@brasko.net>
6821
6822 * data/push.c (yyresult_get): Remove function.
6823 (YYPUSH_MORE): Add #define.
6824 (yypushparse): Modify return value.
6825
6826 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6827
6828 * stamp-h.in: Remove; no longer needed.
6829 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
6830 Remove config.h, config.hin, intl (no longer created).
6831 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
6832 stamp-h1.
6833
6834 Sync bootstrap from coreutils, as follows:
6835
6836 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
6837
6838 * bootstrap (symlink_to_gnulib): New function.
6839 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
6840 to copies-of-gnulib.
6841 (cp_mark_as_generated, slurp, gnulib_files):
6842 Avoid making a copy if it's the same as the old version.
6843 (gnulib_files): Add support for this variable (used by Bison).
6844
6845 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6846
6847 * src/getargs.c (usage): Rework to use conventions similar to
6848 coreutils, to make translation a bit easier and the code a bit
6849 smaller. Problem reported by Tim Van Holder.
6850
6851 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
6852
6853 Use some of gnulib's new modules, taken from coreutils.
6854
6855 * bootstrap: Sync from coreutils, except add support for gnulib_files.
6856 * bootstrap.conf: New file.
6857 (gnulib_modules): Add configmake, inttypes, unistd.
6858 (XGETTEXT_OPTIONS): Add complain, complain_at,
6859 fatal, fatal_at, warn, warn_at, unexpected_end.
6860 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
6861 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
6862 (gl_EARLY): Add.
6863 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
6864 (gl_INIT): Add
6865 (GNULIB_AUTOCONF_SNIPPET): Remove.
6866 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
6867 the pickiest.
6868 * lib/.cvsignore: Add inttypes_.h.
6869 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
6870 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
6871 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
6872 no-longer-necessary initializations.
6873 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
6874 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
6875 use the unistd module.
6876 * src/system.h: Likewise.
6877 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
6878 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
6879 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
6880 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
6881 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
6882 * src/system.h: Include inttypes.h unconditionally, now that we
6883 use the inttypes module. Don't bother to include stdint.h, since
6884 inttypes.h now does that for us.
6885 (LOCALEDIR): Remove, now that we use the configmake module.
6886 * src/getargs.c: Include configmake.h.
6887 * src/main.c: Likewise.
6888 * src/output.c: Likewise.
6889 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
6890 not from $abs_top_builddir, since config.h moved.
6891
6892
6893 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
6894 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
6895
6896 * src/parse-gram.y (symbol_declaration): Don't put statements
6897 before declarations; it's not portable to C89.
6898 * src/scan-code.l (handle_action_at): Likewise.
6899
6900 * src/scan-code.l: Always initialize braces_level; the old code
6901 left it uninitialized and therefore had undefined behavior.
6902
6903 Don't attempt to redefine 'assert', since it runs afoul of
6904 systems where standard headers (mistakenly) include <assert.h>.
6905 Instead, define and use our own alternative, called 'aver'.
6906 * src/reader.c: Don't include assert.h, since we no longer
6907 use assert.
6908 * src/scan-code.l: Likewise.
6909 * src/system.h (assert): Remove, replacing with....
6910 (aver): New function, taking a bool arg. All uses changed.
6911 * src/tables.c (pack_vector): Ensure that aver arg is bool,
6912 not merely an integer.
6913
6914 2006-09-15 Bob Rossi <bob@brasko.net>
6915
6916 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
6917 * data/c.m4 (YYPUSH): New.
6918 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
6919 * src/getargs.c (push_parser): New var.
6920 * src/getargs.h (push_parser): New declaration.
6921 * src/output.c (prepare): Add macro insertion of `push_flag'.
6922 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
6923 (prologue_declaration): Parse %push-parser.
6924 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
6925 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
6926 list of removed lines from the traces observed.
6927 (AT_CHECK_CALC_LALR): Added push parser tests.
6928
6929 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
6930
6931 * NEWS: Version 2.3a.
6932 * configure.ac (AC_INIT): Likewise.
6933
6934 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
6935 "#define YYSTYPE int" that caused "make maintainer-check" to fail
6936 due to header ordering dependencies. I don't know why the #define
6937 was there.
6938
6939 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
6940 runtime cost when YYDEBUG is not defined, and so that some tests
6941 that used to fail now work. Problem and initial suggestion by
6942 Paolo Bonzini.
6943 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
6944 * data/glr.cc (b4_parser_class_name):
6945 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
6946 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
6947 (yydebug_) [YYDEBUG]: New member.
6948 (yycdebug_): Now defined only if YYDEBUG.
6949 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
6950 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
6951 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
6952 if YYYDEBUG.
6953 (debug_stream, set_debug_stream, debug_level, set_debug_level):
6954 Define only if YYDEBUG.
6955 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
6956 set_debug_level.
6957 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
6958 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
6959 AT_CHECK_CALC_GLR_CC that are working now.
6960
6961 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
6962
6963 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
6964 We don't need them in glr.cc, and glr.c defines them.
6965 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
6966 assumes that defining it to anything is the same as defining
6967 it to 1. Problem reported by Paolo Bonzini.
6968
6969 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
6970
6971 * data/c.m4 (b4_null, b4_case): Define.
6972 * src/output.c (prepare_symbols): Use b4_null.
6973 (user_actions_output): Use b4_case.
6974
6975 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
6976
6977 * data/glr.c (b4_shared_declarations): Put start-header first,
6978 before any #includes that we generate, so that feature-test
6979 macros work. Problem reported by Michael Deutschmann in
6980 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
6981 * data/lalr1.cc: Likewise.
6982 * doc/bison.texinfo (Prologue): Document that feature-test macros
6983 should be defined before any Bison declarations.
6984 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
6985 that depend on location.hh after, not before, Bison decls, since
6986 we now include location.hh after the first user prologue.
6987
6988 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
6989 Sander Brandenburg in
6990 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
6991 Also, fix minor white space and comment issues.
6992 (Prologue): Mention that it's better to define feature-test macros
6993 before Bison declarations. Problem reported by Michael Deutschmann.
6994
6995 * README-cvs: Fix typo: "&" should be "&&". Problem reported
6996 by Jim Meyering.
6997 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
6998 This adjusts to recent gnulib changes.
6999
7000 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
7001
7002 Finish implementation of per-type %destructor/%printer. Discussed
7003 starting at
7004 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
7005 and
7006 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
7007 * NEWS (2.3+): Add a description of this feature to the default
7008 %destructor/%printer description.
7009 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
7010 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
7011 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
7012 list node contains a semantic type.
7013 * src/symtab.c, src/symtab.h: Extend with a table that associates
7014 semantic types with their %destructor's and %printer's.
7015 (semantic_type_from_uniqstr, semantic_type_get,
7016 semantic_type_destructor_set, semantic_type_printer_set): New functions
7017 composing the public interface of that table.
7018 (symbol_destructor_get, symbol_destructor_location_get,
7019 symbol_printer_get, symbol_printer_location_get): If there's no
7020 per-symbol %destructor/%printer, look up the per-type before trying
7021 the default.
7022 * tests/actions.at (Per-type %printer and %destructor): New test case.
7023 * tests/input.at (Default %printer and %destructor redeclared):
7024 Extend to check that multiple occurrences of %symbol-default in a
7025 single %destructor/%printer declaration is an error.
7026 (Per-type %printer and %destructor redeclared, Unused values with
7027 per-type %destructor): New test cases.
7028
7029 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
7030
7031 Require default %destructor/%printer to be declared using
7032 %symbol-default instead of an empty symbol list, and start working on
7033 new per-type %destructor/%printer. Discussed at
7034 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
7035 * NEWS (2.3+): Add %symbol-default to example.
7036 * bison.texinfo (Freeing Discarded Symbols): Likewise.
7037 (Table of Symbols): Add entry for %symbol-default.
7038 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
7039 (generic_symlist, generic_symlist_item): New nonterminals for creating
7040 a list in which each item is a symbol, semantic type, or
7041 %symbol-default.
7042 (grammar_declaration): Use generic_symlist in %destructor and %printer
7043 declarations instead of symbols.1 or an empty list.
7044 (symbol_declaration, precedence_declaration, symbols.1): Update actions
7045 for changes to symbol_list.
7046 * src/reader.c: Update for changes to symbol_list.
7047 * src/scan-code.l: Likewise.
7048 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
7049 * src/symlist.c, src/symlist.h: Extend such that a list node may
7050 represent a semantic type or a %symbol-default in addition to just an
7051 ordinary symbol. Add switched functions for setting %destructor's and
7052 %printer's.
7053 * tests/actions.at, tests/input.at: Add %symbol-default to all default
7054 %destructor/%printer declarations.
7055
7056 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
7057
7058 Whether the default %destructor/%printer applies to a particular symbol
7059 isn't a question of whether the user *declares* that symbol (in %token,
7060 for example). It's a question of whether the user by any means
7061 *defines* the symbol at all (by simply using a char token, for
7062 example). $end is defined by Bison whereas any other token with token
7063 number 0 is defined by the user. The error token is always defined by
7064 Bison regardless of whether the user declares it with %token, but we
7065 may one day let the user define error as a nonterminal instead.
7066 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
7067 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
7068 the meaning of "user-defined".
7069 * tests/actions.at (Default %printer and %destructor for user-declared
7070 end token): Rename to...
7071 (Default %printer and %destructor for user-defined end token): ...
7072 this.
7073
7074 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
7075 computation of whether to apply the default, don't maintain a list of
7076 every Bison-defined symbol. Instead, just check for a first character
7077 of '$', which a user symbol cannot have, and check for the error token.
7078
7079 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
7080
7081 Don't apply the default %destructor or %printer to the error token,
7082 $undefined, or $accept. This change fits the general rule that the
7083 default %destructor and %printer are only for user-declared symbols,
7084 and it solves several difficulties that are described in the new test
7085 cases listed below.
7086 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
7087 * tests/actions.at (Default %printer and %destructor are not for error
7088 or $undefined, Default %printer and %destructor are not for $accept):
7089 New test cases.
7090
7091 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
7092
7093 Allow %start after the first rule.
7094 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
7095 when parsing the first rule.
7096 (check_and_convert_grammar): Search for it here after all grammar
7097 declarations have been parsed. Skip midrules, which have dummy LHS
7098 nonterminals.
7099 * src/symtab.c (symbol_is_dummy): New function.
7100 * src/symtab.h (symbol_is_dummy): Declare it.
7101 * tests/input.at (%start after first rule): New test.
7102
7103 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
7104
7105 Redo some of the previous commit: add back the ability to use
7106 non-aliased/undeclared string literals since it might be useful to
7107 those declaring %token-table.
7108 * src/reader.c (check_and_convert_grammar): Undo changes in previous
7109 commit: don't worry about complaints from symbols_pack.
7110 * src/symtab.c (symbol_new, symbol_class_set,
7111 symbol_check_alias_consistency): Undo changes in previous commit: count
7112 each string literal as a new symbol and token, assign it a symbol
7113 number, and don't complain about non-aliased string literals.
7114 (symbols_pack): Since symbol_make_alias still does not decrement symbol
7115 and token counts but does still set aliased tokens to the same number,
7116 symbol_pack_processor now leaves empty slots in the symbols array.
7117 Remove those slots.
7118 * tests/regression.at (Undeclared string literal): Remove test case
7119 added in previous commit since non-aliased string literals are allowed
7120 again.
7121 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
7122 remove unnecessary string literal declarations.
7123 * tests/sets.at (Firsts): Likewise.
7124
7125 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
7126
7127 Don't allow an undeclared string literal, but allow a string literal to
7128 be used before its declaration.
7129 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
7130 symbols_pack complained.
7131 * src/symtab.c (symbol_new): Don't count a string literal as a new
7132 symbol.
7133 (symbol_class_set): Don't count a string literal as a new token, and
7134 don't assign it a symbol number since symbol_make_alias does that.
7135 (symbol_make_alias): It's not necessary to decrement the symbol and
7136 token counts anymore. Don't assume that an alias declaration occurs
7137 before any uses of the identifier or string, and thus don't assert that
7138 one of them has the highest symbol number so far.
7139 (symbol_check_alias_consistency): Complain if there's a string literal
7140 that wasn't declared as an alias.
7141 (symbols_pack): Bail if symbol_check_alias_consistency failed since
7142 symbol_pack asserts that every token has been assigned a symbol number
7143 although undeclared string literals have not.
7144 * tests/regression.at (String alias declared after use, Undeclared
7145 string literal): New test cases.
7146 (Characters Escapes, Web2c Actions): Declare string literals as
7147 aliases.
7148 * tests/sets.at (Firsts): Likewise.
7149
7150 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
7151
7152 In the grammar scanner, STRING_FINISH unclosed constructs and return
7153 them to the parser in order to improve error messages.
7154 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
7155 SC_BRACED_CODE, SC_PROLOGUE): Implement.
7156 * tests/input.at (Unclosed constructs): New test case.
7157 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
7158 seen.
7159
7160 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
7161 unused global.
7162
7163 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
7164
7165 Handle string aliases for character tokens correctly.
7166 * src/symtab.c (symbol_user_token_number_set): If the token has an
7167 alias, check and set its alias's user token number instead of its own,
7168 which is set to indicate the alias. Previously, every occurrence of
7169 the character token in the grammar overwrote that alias indicator with
7170 the character code.
7171 * tests/input.at (String aliases for character tokens): New test.
7172
7173 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
7174
7175 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
7176
7177 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
7178
7179 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
7180 to prevent failures when building on older platforms.
7181 Check for autopoint failure.
7182 Set XGETTEXT_OPTIONS to values that check for C format strings,
7183 so that translators are warned about them (this also helps
7184 prevent core dumps).
7185
7186 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
7187 function, since it simplifies our code a bit.
7188
7189 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
7190 rather than -W, so we don't get bogus warnings about sign comparisons.
7191 Add -Wpointer-arith, since that warning is useful (it reports code
7192 that does not conform to C89 and that some compilers reject).
7193 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
7194 since it's no longer needed.
7195
7196 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
7197
7198 Clean up scanners a bit.
7199 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
7200 definitions so gcc won't warn when obstack_for_string is unused.
7201 * src/scan-code.l: config.h and system.h are already #include'd by
7202 scan-code-c.c, so get rid of them here.
7203 * src/scan-gram.l: Likewise.
7204 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
7205 definitions rather than duplicating the rest of it.
7206 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
7207
7208 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
7209
7210 Suppress signed/unsigned comparison warnings for yycheck.
7211 * data/c.m4 (b4_safest_int_type): New macro.
7212 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
7213 a signed int type, cast it to b4_safest_int_type first.
7214 * data/yacc.c: Likewise.
7215 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
7216 also overwritten.
7217
7218 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
7219
7220 * doc/bison.texinfo: Fix some typos.
7221
7222 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
7223
7224 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
7225 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
7226
7227 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
7228 the latest gnulib does this a different way.
7229 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
7230 translation was patched, so stop omitting it.
7231
7232 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
7233
7234 Enable declaration of default %printer/%destructor. Make the parser
7235 use these for all user-declared grammar symbols for which the user does
7236 not declare a specific %printer/%destructor. Thus, the parser uses it
7237 for token 0 if the user declares it but not if Bison generates it as
7238 $end. Discussed starting at
7239 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
7240 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
7241 and
7242 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
7243 * NEWS (2.3+): Mention.
7244 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
7245 declare a %destructor for a mid-rule's semantic value. It's just
7246 impossible to declare one specific to it.
7247 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
7248 code. Describe default %destructor form.
7249 * src/parse-gram.y (grammar_declaration): Parse default
7250 %printer/%destructor declarations.
7251 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
7252 and symbol_destructor_location_get rather than accessing the destructor
7253 and destructor_location members of struct symbol.
7254 (symbol_printers_output): Likewise but for %printer's.
7255 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
7256 again.
7257 * src/symtab.c (default_destructor, default_destructor_location,
7258 default_printer, default_printer_location): New static global
7259 variables to record the default %destructor and %printer.
7260 (symbol_destructor_get, symbol_destructor_location_get,
7261 symbol_printer_get, symbol_printer_location_get): New functions to
7262 compute the appropriate %destructor and %printer for a symbol.
7263 (default_destructor_set, default_printer_set): New functions to set the
7264 default %destructor and %printer.
7265 * src/symtab.h: Prototype all those new functions.
7266 * tests/actions.at (Default %printer and %destructor): New test to
7267 check that the right %printer and %destructor are called, that they're
7268 not called for $end, and that $$ and @$ work correctly.
7269 (Default %printer and %destructor for user-declared end token): New
7270 test to check that the default %printer and %destructor are called for
7271 a user-declared end token.
7272 * tests/input.at (Default %printer and %destructor redeclared, Unused
7273 values with default %destructor): New tests to check related grammar
7274 warnings and errors.
7275
7276 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
7277
7278 Clean up handling of %destructor for the end token (token 0).
7279 Discussed starting at
7280 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
7281 and
7282 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
7283
7284 Make the skeletons consistent in how they pop the end token and invoke
7285 its %destructor.
7286 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
7287 state, which has token number 0, since this would invoke the
7288 %destructor for the end token.
7289 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
7290 until after shifting the end token, or else it won't be popped.
7291 * data/yacc.c (yyparse): Likewise.
7292
7293 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
7294 it's the end token. Upon termination, destroy an unshifted lookahead
7295 even when it's the end token.
7296 * data/lalr1.cc (yy::parser::parse): Likewise.
7297 * data/yacc.c (yyparse): Likewise.
7298
7299 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
7300 value warnings for the end token when the user gives the end token a
7301 %destructor.
7302
7303 * tests/actions.at (Printers and Destructors): Test all the above.
7304
7305 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
7306
7307 Update to latest gnulib and gettext versions.
7308 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
7309 Add fopen-safer.
7310 (gnulib_files): Add m4/warning.m4. Don't worry about files
7311 overwritten by autopoint.
7312 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
7313 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
7314 rejects them.
7315 Don't use autoreconf; instead, invoke autopoint etc. by hand,
7316 so that we can remove the intl files at a better time.
7317 (intl_files_to_remove): Remove aclocal.m4, since it gets
7318 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
7319 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
7320 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
7321 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
7322 Remove datarootdir hack; no longer needed.
7323 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
7324 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
7325 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
7326 strdup.h.
7327 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
7328 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
7329
7330 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
7331
7332 * bootstrap: Adjust to today's change to gnulib-tool by invoking
7333 it with --assume-autoconf='latest-stable'.
7334
7335 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
7336
7337 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
7338 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
7339 YYSTYPE' and `{'.
7340 * src/muscle_tab.h (muscle_grow): Replace the header comments with
7341 those from muscle_tab.c since the old ones are misleading.
7342
7343 2006-07-13 Akim Demaille <akim@epita.fr>
7344
7345 Support %define "KEY" {VALUE}.
7346 * src/scan-code.h, src/scan-code.l (translate_action)
7347 (translate_rule_action, translate_symbol_action, translate_code):
7348 Return char *, not const char *.
7349 * src/parse-gram.y (declaration): Rename as...
7350 (prologue_declaration): this.
7351 (string_content): Remove this nonterminal, use STRING.
7352 (braceless, content, content.opt): New nonterminal.
7353 Use them.
7354 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
7355 as value.
7356 * src/scan-gram.l (getargs.h): Don't include it.
7357
7358 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
7359
7360 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
7361 rather than a for-loop that declares a local bool variable. This
7362 should work around a compatibility problem with a Cray x1e C++
7363 compiler reported by Hung Nguyen in
7364 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
7365 The for-loop was introduced in the 2004-11-17 change but I don't
7366 know why it was needed.
7367
7368 2006-07-12 Akim Demaille <akim@epita.fr>
7369
7370 * data/c.m4: Comment changes.
7371
7372 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
7373
7374 * src/complain.c (error_message, ERROR_MESSAGE): New.
7375 To factor...
7376 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
7377 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
7378
7379 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7380
7381 * NEWS: Instead of %union, you can define and use your own union type
7382 YYSTYPE if your grammar contains at least one <type> tag.
7383 Your YYSTYPE need not be a macro; it can be a typedef.
7384 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
7385 (Union Decl, Decl Summary): Document this.
7386 * data/glr.c (YYSTYPE): Implement this.
7387 * data/glr.cc (YYSTYPE): Likewise.
7388 * data/lalr1.cc (YYSTYPE): Likewise.
7389 * data/yacc.c (YYSTYPE): Likewise.
7390 * src/output.c (prepare): Output tag_seen_flag.
7391 * src/parse-gram.y (declaration, grammar_declaration):
7392 Use 'union_seen' rather than 'typed' to determine whether
7393 %union has been seen, since grammars can now be typed without
7394 %union.
7395 (symbol_declaration, type.opt, symbol_def):
7396 Keep track of whether a tag has been seen.
7397 * src/reader.c (union_seen, tag_seen): New vars.
7398 (typed): remove.
7399 * src/reader.h (union_seen, tag_seen, typed): Likewise.
7400 * src/scan-code.l (untyped_var_seen): New variable.
7401 (handle_action_dollar): Adjust to above changes.
7402 (handle_action_dollar, handle_action_at):
7403 Improve overflow checking for outlandish numbers.
7404 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
7405 avoid new diagnostics generated by above changes.
7406 * tests/regression.at (YYSTYPE typedef): Add test to check
7407 for type tags without %union.
7408
7409 * src/symlist.c (symbol_list_length): Return int, not unsigned
7410 int, since callers expect int. This may need to get revisited
7411 once we have proper integer overflow checking.
7412
7413 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
7414 object is now static.
7415
7416 * src/getargs.c (flags_argmatch): Return void, not int,
7417 to pacify ./configure --enable-gcc-warnings.
7418
7419 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
7420 since last_string is already defined to FLEX_PREFIX (last_string).
7421
7422 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
7423
7424 Implement --warnings/-W.
7425 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
7426 replaced by...
7427 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
7428 Adjust callers.
7429 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
7430 (warnings_args, warnings_types): New.
7431 (getargs, short_options, long_options): Accept -W/--warnings.
7432 Sort the options by alphabetical order, upper case letter right
7433 before its lower case.
7434
7435 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
7436
7437 Change %merge result type clash warnings to errors. Discussed at
7438 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
7439 * src/reader.c (record_merge_function_type): Use complain_at.
7440 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7441 declared later): Update test case results.
7442
7443 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
7444
7445 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
7446 to be in alphabetical order.
7447 (trace_args): Spelling fixes.
7448
7449 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7450
7451 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
7452 so they don't collide with user-defined macros.
7453 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
7454 this was never guaranteed, and now that we're using gnulib stdint,
7455 which defines int_fast16_t to long int, the problem is exposed.
7456
7457 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
7458
7459 * data/c.m4 (b4_basename): Simplify a bit, since we don't
7460 need the full POSIX semantics (and weren't implementing them
7461 anyway).
7462
7463 Adjust to Autoconf 2.60 and today's gnulib.
7464 * bootstrap (gnulib_modules): Add stdint.
7465 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
7466 no longer copies it.
7467 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
7468 since stdint needs the former and wcwidth (which is now required
7469 by mbswidth) needs the latter.
7470 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
7471 work around a compatibility glitch between gettext 0.14.6 and
7472 Autoconf 2.60.
7473 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
7474 Do not check for uintptr_t, since new stdint module does the right
7475 thing.
7476 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
7477 Add stdint.h, stdint_.h, wcwidth.h.
7478 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
7479 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
7480 stdint.m4, wchar_t.m4, wcwidth.m4.
7481 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
7482 usual order for ../lib/*.h files.
7483 (file_name_split): Use last_component, not base_name, to adjust
7484 to gnulib changes.
7485 * src/parse-gram.h: Include <strverscmp.h> in the usual order
7486 for ../lib/*.h files.
7487 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
7488 Define unconditionally, since we now assume the stdint module.
7489 * src/scan-skel.l: Include <dirname.h>.
7490 (BASE_QPUTS): Use last_component, not base_name.
7491 * src/system.h: Include <unlocked-io.h> in the usual order
7492 for ../lib/*.h files. Include <stdint.h> unconditionally,
7493 since we now use the stdint module.
7494 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
7495 HAVE_UINTPTR_T, since we now use the stdint module.
7496 (base_name): Remove decl, since files now include <dirname.h>
7497 to get the decl.
7498
7499 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
7500
7501 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
7502 New, default to 1.
7503 * data/yacc.c, data/glr.c, data/location.cc: Use them.
7504 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
7505 default.
7506 * tests/calc.at: Adjust.
7507
7508 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
7509
7510 * data/c.m4 (b4_basename): New.
7511 (b4_syncline): Also output the location of its invocation (from
7512 the skeleton).
7513 (b4_user_action, b4_define_user_action, b4_user_actions)
7514 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
7515 (b4_user_stype): New.
7516 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
7517
7518 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
7519
7520 In the grammar file, the first column is 1 not 0 on the first line as
7521 on every other line.
7522 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
7523 * tests/input.at (Torturing the Scanner): Update output.
7524
7525 * src/scan-gram.l (scanner_cursor): Declare it static.
7526
7527 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
7528
7529 In warnings, say "previous declaration" rather than "first
7530 declaration".
7531 * src/symtab.c (redeclaration): Do that here.
7532 * src/reader.c (record_merge_function_type): In the case of a result
7533 type clash, report the previous declaration rather than the very first
7534 one in the grammar file.
7535 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7536 declared later): Add a third declaration to check this behavior.
7537 * tests/input.at (Incompatible Aliases): Update output.
7538
7539 2006-06-27 Akim Demaille <akim@epita.fr>
7540
7541 * doc/Doxyfile.in: New.
7542 * doc/Makefile.am: Use it.
7543 * src/lalr.h, src/symtab.h: Initial doxygenation.
7544
7545 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7546
7547 Don't miss %merge result type warnings just because the LHS types are
7548 declared after the %merge. This continues the effort of the previous
7549 patch.
7550 * src/reader.c (get_merge_function): Don't set the merger type yet.
7551 (record_merge_function_type): New function for setting the merger type
7552 and checking for clashes.
7553 (grammar_current_rule_merge_set): Set the location of the %merge for
7554 the current rule.
7555 (packgram): Invoke record_merge_function_type for each rule now that
7556 all symbol type declarations have been parsed.
7557 * src/reader.h (merger_list.type_declaration_location): New member
7558 storing the location of the first %merge from which the type for this
7559 merging function was derived.
7560 * src/symlist.h (symbol_list.merger_declaration_location): New member
7561 storing the location of a rule's %merge, if any.
7562 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7563 declared later): New test to catch the error fixed by the above patch.
7564
7565 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7566
7567 Get action warnings (grammar_rule_check) right even when symbol
7568 declarations appear after the rules. Discussed at
7569 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
7570 and
7571 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
7572 Don't mistake the type of $$ in a midrule to be that of its parent
7573 rule's $$.
7574 * src/reader.c (grammar_current_rule_end): Don't invoke
7575 grammar_rule_check yet since not all symbol declarations may have been
7576 parsed yet.
7577 (grammar_midrule_action): Likewise.
7578 Don't record whether the midrule's $$ has been used yet since actions
7579 haven't been translated yet.
7580 Record the midrule's parent rule and its RHS index within the parent
7581 rule.
7582 (grammar_current_rule_action_append): Don't translate the action yet
7583 since not all symbol declarations may have been parsed yet and, thus,
7584 warnings about types for $$, $n, @$, and @n can't be reported yet.
7585 (packgram): Translate the action and invoke grammar_rule_check now that
7586 all symbol declarations have been parsed.
7587 * src/scan-code.l (handle_action_dollar): Now that this is invoked
7588 after parsing the entire grammar file, the symbol list here in the case
7589 of a midrule is actually the midrule's empty RHS, so reference its
7590 parent rule's RHS where necessary.
7591 On the other hand, now that you can already know it's a midrule, you
7592 aren't forced to think $$ has the same type as its parent rule's $$.
7593 (handle_action_at): In the case of a midrule, reference the parent rule
7594 where necessary.
7595 * src/symlist.c (symbol_list_new): Initialize new midrule-related
7596 members.
7597 (symbol_list_length): Now that this is invoked after all rules have
7598 been parsed, a NULL symbol (rather than a NULL symbol list node)
7599 terminates a rule. symbol_list_print already does this correctly.
7600 * src/symlist.h (symbol_list.midrule_parent_rule,
7601 symbol_list.midrule_parent_rhs_index): New members so that midrules can
7602 remember their relationships with their parents.
7603 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
7604 fixed by the above patch.
7605 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
7606 implementing...
7607 (Unused values): ... this old test case and...
7608 (Unused values before symbol declarations): ... this new test case.
7609 This one is the same as `Unused values' except that all symbol
7610 declarations appear after the rules in order to catch the rest of the
7611 errors fixed by the above patch.
7612
7613 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7614
7615 More cleanup.
7616 * src/reader.c (current_rule): Declare it static since it's no longer
7617 used outside this file.
7618 (grammar_current_rule_action_append): Remove redundant arguments from
7619 translate_rule_action invocation.
7620 * src/reader.h (current_rule): Remove this unused extern.
7621 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
7622 * src/scan-code.l (translate_rule_action): Likewise.
7623
7624 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
7625
7626 Clean up yesterday's patch.
7627 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
7628 to...
7629 * src/reader.c (grammar_current_rule_action_append): ... here for
7630 consistency with grammar_current_rule_symbol_append.
7631 * tests/regression.at (Braced code in declaration in rules section):
7632 Make yyerror and yylex static as usual.
7633
7634 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
7635
7636 Fix bug that mistakes braced code in a declaration in the rules section
7637 to be a rule action. Mentioned at
7638 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
7639 * src/scan-gram.l: Move midrule action detection from the start of the
7640 scanning of any braced code to...
7641 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
7642 action. For readability, use $2 and @2 rather than the equivalent
7643 global variables.
7644 * tests/regression.at (Braced code in declaration in rules section):
7645 New test to catch the error fixed by the above patch.
7646
7647 Work on code readability some.
7648 * src/scan-code.l (current_rule): Get rid of this misleading and
7649 redundant declaration: it's actually extern'ed in reader.h.
7650 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
7651 translate_action): Add a rule argument and use it instead of the global
7652 current_rule.
7653 (translate_rule_action): This already receives current_rule through an
7654 argument, so pass it on to translate_action instead of assigning
7655 current_rule to current_rule.
7656 (translate_symbol_action, translate_code): Pass rule = NULL to
7657 translate_action.
7658
7659 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
7660
7661 Rename %before-definitions to %start-header and %after-definitions to
7662 %end-header. Don't use these declarations to separate pre-prologue
7663 blocks from post-prologue blocks. Add new order-independent
7664 declarations %before-header and %after-header as alternatives to the
7665 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
7666 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
7667 * NEWS (2.3+): Update for these changes.
7668 * data/glr.c (b4_before_definitions): Update to...
7669 (b4_start_header): ... this.
7670 (b4_after_definitions): Update to...
7671 (b4_end_header): ... this.
7672 * data/glr.cc: Likewise.
7673 * data/lalr1.cc: Likewise.
7674 * data/yacc.c: Likewise.
7675 * doc/bison.texinfo (The prologue): Update names, and replace remaining
7676 prologue blocks with %*-header declarations.
7677 (Calc++ Parser): Likewise.
7678 (Decl Summary): Update names.
7679 (Table of Symbols): Update description.
7680 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
7681 (PERCENT_END_HEADER): ... this.
7682 (PERCENT_BEFORE_DEFINITIONS): Update to...
7683 (PERCENT_START_HEADER): ... this.
7684 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7685 (declaration): Update token names and m4 macro names.
7686 When parsing %end-header and %start-header, invoke translate_code
7687 before muscle_code_grow, and no longer set global booleans to remember
7688 whether these declarations have been seen.
7689 Parse new %after-header and %before-header.
7690 * src/reader.c (before_definitions, after_definitions): Remove.
7691 (prologue_augment): Accept a new bool argument to specify whether to
7692 augment the pre-prologue or post-prologue.
7693 * src/reader.h (before_definitions, after_definitions): Remove these
7694 extern's.
7695 (prologue_augment): Add new bool argument.
7696 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
7697 (PERCENT_END_HEADER): ... this.
7698 (PERCENT_BEFORE_DEFINITIONS): Update to...
7699 (PERCENT_START_HEADER): ... this.
7700 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7701 * tests/actions.at (Printers and Destructors): Update names.
7702
7703 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
7704
7705 Add comparison operators for C++ location classes. Discussed at
7706 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
7707 * data/c++.m4 (b4_define_location_comparison): New boolean %define
7708 declaration indicating whether filename_type has an operator==. If
7709 filename_type is `std::string', it defaults to `1', `0' otherwise.
7710 * data/location.cc: Iff b4_define_location_comparison is `1', add
7711 operator== and operator!= for class position and for class location.
7712
7713 Some minor fixes.
7714 * src/scan-action.l: Remove unused file.
7715 * src/symtab.c (symbol_printer_set): Use printer_location not
7716 destructor_location.
7717 * src/symtab.h (struct symbol): Replace incorrect source comment for
7718 printer members.
7719 * tests/input.at (Incompatible Aliases): Update output with correct
7720 printer location.
7721
7722 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
7723
7724 Don't put the pre-prologue in the header file. For the yacc.c code
7725 file and the glr.c header and code files, move the pre-prologue before
7726 the token definitions. Add new %before-definitions and
7727 %after-definitions to declare code that will go in both the header file
7728 and code file. Discussed at
7729 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
7730 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
7731 and
7732 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
7733 * NEWS (2.3+): Describe these changes.
7734 * data/glr.c (b4_pre_prologue): Move from within to before...
7735 (b4_shared_declarations): ... this.
7736 Add new b4_before_definitions before b4_token_enums.
7737 Add new b4_after_definitions at the end.
7738 * data/glr.cc (b4_pre_prologue): Replace with...
7739 (b4_before_definitions): ... this in the header file.
7740 (b4_after_definitions): New near the end of the header file.
7741 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
7742 code file right before including the header file.
7743 (b4_before_definitions): New in the previous position of
7744 b4_pre_prologue in the header file.
7745 (b4_after_definitions): New near the end of the header file.
7746 * data/yacc.c: Clean up some m4 quoting especially in the header file.
7747 (b4_token_enums_defines): In the code file, move to right before
7748 YYSTYPE for consistency with the header file.
7749 (b4_before_definitions): New right before b4_token_enums_defines in
7750 both the header and code file.
7751 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
7752 header and code file.
7753 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
7754 of prologues for %union dependencies.
7755 (Decl Summary): In %defines description, mention the effect of
7756 %before-definitions and %after-definitions on the header file.
7757 (Calc++ Parser): Forward declare driver in a %before-definitions rather
7758 than in the pre-prologue so that make check succeeds.
7759 (Table of Symbols): Add entries for %before-definitions and
7760 %after-definitions.
7761 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
7762 %before-definitions.
7763 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
7764 (declaration): Parse those declarations and append to
7765 b4_before_definitions and b4_after_definitions, respectively.
7766 * src/reader.c (before_definitions, after_definitions): New bools to
7767 track whether those declarations have been seen.
7768 (prologue_augment): Add to the post-prologue if %union,
7769 %before-definitions, or %after-definitions has been seen.
7770 * src/reader.h (before_definitions, after_definitions): New extern's.
7771 * src/scan-gram.l: Scan the new declarations.
7772 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
7773 prologue block in a %before-definitions or a %after-definitions based
7774 on whether the %union is declared.
7775 * tests/regression.at (Early token definitions with --yacc, Early token
7776 definitions without --yacc): Move tests for token definitions into the
7777 post-prologue since token names are no longer defined in the
7778 pre-prologue.
7779
7780 2006-06-20 Akim Demaille <akim@epita.fr>
7781
7782 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
7783 (symbol_get): Use it.
7784 * src/parse-gram.y: Use it.
7785
7786 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
7787
7788 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
7789 build succeeds when configured with --enable-gcc-warnings.
7790
7791 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
7792
7793 * src/parse-gram.y (char_name): New function.
7794 (CHAR, STRING, string_content): For %printer, properly escape.
7795 (ID): Prefer fputs to fprintf.
7796 (id): Reindent to be consistent with other rules.
7797 Properly quote char.
7798
7799 The Translation Project changed its way of publishing translations
7800 to maintainers. I haven't received any responses to my request
7801 for supporting the old way, or for documenting the new way. I
7802 have modified 'bootstrap' to use screen scraping
7803 (in this case, HTML scraping). This is unreliable and inelegant,
7804 but I don't see any better way. Yuck.
7805 * bootstrap (TP_URL, WGET_COMMAND): New vars.
7806 (get_translations): New function, which uses HTML scraping to
7807 deduce locations of latest translations.
7808 Use this function to grab both bison and bison-runtime .po files.
7809 Don't bother priming the pump for the runtime-po domain any more,
7810 as it's now translated better than bison is.
7811
7812 2006-06-19 Akim Demaille <akim@epita.fr>
7813
7814 * src/scan-gram.l: No longer "parse" things after `%union' until
7815 `{'. Rather, return a single "%union" token.
7816 No longer make symbols: return strings, and leave the conversion
7817 to symbols to the parser.
7818 (SC_PRE_CODE, token_type): Remove.
7819 * src/parse-gram.y (%union): New field `character'.
7820 Sort tokens.
7821 (CHAR): New token.
7822 (ID, ID_COLON): Now that the scanner no longer makes them
7823 identifiers, adjust all uses to invoke symbol_get.
7824 (id_colon): New, wraps the conversion from string to symbol.
7825 (%union): Accept a possible union_name.
7826 (symbol): Now can be a char.
7827 * data/c.m4 (b4_union_name): Leave a default value.
7828 * data/glr.c, data/yacc.c: Use it.
7829
7830 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
7831
7832 For associating token numbers with token names for "yacc.c", don't use
7833 #define statements unless `--yacc' is specified; always use enum
7834 yytokentype. Most important discussions start at:
7835 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
7836 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
7837 and
7838 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
7839 * NEWS (2.3+): Mention.
7840 * data/c.m4 (b4_yacc_if): New.
7841 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
7842 token #define's.
7843 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
7844 on token name definitions.
7845 * src/getargs.c (usage): Capitalize `Yacc' in English.
7846 * src/output.c (prepare): Define b4_yacc_flag.
7847 * tests/regression.at (Early token definitions): Test that tokens names
7848 are defined before the pre-prologue not just before the post-prologue.
7849 Remove this test case and copy to...
7850 (Early token definitions with --yacc): ... this to test #define's.
7851 (Early token definitions without --yacc): ... and this to test enums.
7852
7853 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
7854
7855 * NEWS: Reword the post-2.3 change to not be so optimistic about
7856 removing the old "look-ahead" spelling.
7857 Update previous look-ahead/lookahead change reports.
7858 * REFERENCES: look-ahead -> lookahead (since that's
7859 what he actually wrote).
7860 * doc/refcard.tex: look ahead -> lookahead,
7861 look-ahead -> lookahead
7862
7863 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
7864
7865 For consistency, use `lookahead' instead of `look-ahead' or
7866 `look_ahead'. Discussed starting at
7867 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
7868 and then at
7869 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
7870 * NEWS: For the next release, note the change to `--report'.
7871 * TODO, doc/bison.1: Update English.
7872 * doc/bison.texinfo: Update English.
7873 (Understanding Your Parser, Bison Options): Document as
7874 `--report=lookahead' rather than `--report=look-ahead'.
7875 * src/conflicts.c: Update English in comments.
7876 (lookahead_set): Rename from look_ahead_set.
7877 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
7878 (resolve_sr_conflict): Rename local look_ahead_tokens to
7879 lookahead_tokens, and update other uses.
7880 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
7881 count_rr_conflicts, conflicts_free): Update uses.
7882 * src/getargs.c (report_args): Move "lookahead" before alternate
7883 spellings.
7884 (report_types): Update uses.
7885 (usage): For `--report' usage description, state `lookahead' spelling
7886 rather than `look-ahead'.
7887 * src/getargs.h (report.report_lookahead_tokens): Rename from
7888 report_look_ahead_tokens.
7889 * src/lalr.c: Update English in comments.
7890 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
7891 (state_lookahead_tokens_count): Rename from
7892 state_look_ahead_tokens_count.
7893 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7894 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
7895 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7896 Update other uses.
7897 Update English in output.
7898 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
7899 * src/print.c: Update English in comments.
7900 (lookahead_set): Rename from look_ahead_set.
7901 (print_reduction): Rename argument lookahead_token from
7902 look_ahead_token.
7903 (print_core, state_default_rule, print_reductions, print_results):
7904 Update uses.
7905 * src/print_graph.c: Update English in comments.
7906 (print_core): Update uses.
7907 * src/state.c: Update English in comments.
7908 (reductions_new): Update uses.
7909 (state_rule_lookahead_tokens_print): Rename from
7910 state_rule_look_ahead_tokens_print, and update other uses.
7911 * src/state.h: Update English in comments.
7912 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
7913 (state_rule_lookahead_tokens_print): Rename from
7914 state_rule_look_ahead_tokens_print.
7915 * src/tables.c: Update English in comments.
7916 (conflict_row, action_row): Update uses.
7917 * tests/glr-regression.at
7918 (Incorrect lookahead during deterministic GLR,
7919 Incorrect lookahead during nondeterministic GLR): Rename
7920 print_look_ahead to print_lookahead.
7921 * tests/torture.at: Update English in comments.
7922 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
7923 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
7924 (Many lookahead tokens): Update uses.
7925 * data/glr.c: Update English in comments.
7926 * lalr1.cc: Likewise.
7927 * yacc.c: Likewise.
7928 * src/conflicts.h: Likewise.
7929 * src/lalr.h: Likewise.
7930 * src/main.c: Likewise.
7931 * src/output.c: Likewise.
7932 * src/parse-gram.c: Likewise.
7933 * src/tables.h: Likewise.
7934 * tests/calc.at: Likewise.
7935
7936 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
7937
7938 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
7939
7940 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
7941
7942 * TODO: Add request from Nelson H. F. Beebe to be able to install
7943 Bison without installing the yacc script.
7944
7945 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7946
7947 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
7948 and yytext if they're already #define'd.
7949 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
7950 * src/scan-code-c.c: ... here.
7951 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
7952 <config.h>.
7953
7954 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7955
7956 Get Bison to build again when configured with --enable-gcc-warnings.
7957 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
7958 missing #include's.
7959 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
7960 loc argument as it shadows a global.
7961 * src/scan-gram.l: Remove stray comma that prevents boundary_set
7962 invocation.
7963
7964 * src/.cvsignore: Add scan-code.c.
7965
7966 2006-06-07 Akim Demaille <akim@epita.fr>
7967
7968 * src/scan-gram.l: Move the "add a trailing ; to actions" code
7969 to...
7970 * src/scan-code.l: here.
7971 * tests/input.at (Torturing the Scanner): Fix another location
7972 error.
7973
7974 2006-06-07 Akim Demaille <akim@epita.fr>
7975
7976 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
7977
7978 2006-06-06 Akim Demaille <akim@epita.fr>
7979
7980 Extract the parsing of user actions from the grammar scanner.
7981 As a consequence, the relation between the grammar scanner and
7982 parser is much simpler. We can also split "composite tokens" back
7983 into simple tokens.
7984 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
7985 * src/scan-gram.l (add_column_width, adjust_location): Move to and
7986 rename as...
7987 * src/location.h, src/location.c (add_column_width)
7988 (location_compute): these.
7989 Fix the column count: the initial column is 0.
7990 (location_print): Be robust to ending column being 0.
7991 * src/location.h (boundary_set): New.
7992 * src/main.c: Adjust to scanner_free being renamed as
7993 gram_scanner_free.
7994 * src/output.c: Include scan-code.h.
7995 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
7996 Use boundary_set.
7997 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
7998 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
7999 which is now, again, a separate token.
8000 Adjust all dependencies.
8001 Whereever actions with $ and @ are used, use translate_code.
8002 (action): Remove this nonterminal which is now useless.
8003 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
8004 (grammar_current_rule_action_append): Use translate_code.
8005 (packgram): Bound check ruleno, itemno, and rule_length.
8006 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
8007 (last_string, last_braced_code_loc, max_left_semantic_context)
8008 (scanner_initialize, scanner_free, scanner_last_string_free)
8009 (gram_out, gram_lineno, YY_DECL_): Move to...
8010 * src/scan-gram.h: this new file.
8011 (YY_DECL): Rename as...
8012 (GRAM_DECL): this.
8013 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
8014 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
8015 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
8016 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
8017 Move these declarations, and...
8018 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
8019 these to...
8020 * src/flex-scanner.h: this new file.
8021 * src/scan-gram.l (rule_length, rule_length_overflow)
8022 (increment_rule_length): Remove.
8023 (last_braced_code_loc): Rename as...
8024 (gram_last_braced_code_loc): this.
8025 Adjust to the changes of the parser.
8026 Move all the handling of $ and @ into...
8027 * src/scan-code.l: here.
8028 * src/scan-gram.l (handle_dollar, handle_at): Remove.
8029 (handle_action_dollar, handle_action_at): Move to...
8030 * src/scan-code.l: here.
8031 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
8032 scan-code.h, scan-code-c.c, scan-gram.h.
8033 (EXTRA_bison_SOURCES): Add scan-code.l.
8034 (BUILT_SOURCES): Add scan-code.c.
8035 (yacc): Be robust to white spaces.
8036
8037 * tests/conflicts.at, tests/input.at, tests/reduce.at,
8038 * tests/regression.at: Adjust the column numbers.
8039 * tests/regression.at: Adjust the error message.
8040
8041 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
8042
8043 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
8044 Use Akim's wording from
8045 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
8046
8047 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
8048
8049 Between Bison releases, manually append `+' to the previous Bison
8050 release number, and use that as a signal to automatically print the
8051 ChangeLog's CVS Id keyword from --version. Discussed starting at
8052 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
8053 * ChangeLog: Add Id header.
8054 * configure.ac (AC_INIT): Append `+' to `2.3'.
8055 * src/.cvsignore: Add revision.c.
8056 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
8057 (BUILT_SOURCES): Add revision.c.
8058 (revision.c): New target rule. This file defines a new global variable
8059 named revision. It initializes it with either the Id from ChangeLog
8060 or, if VERSION doesn't contain `+', with the empty string.
8061 * src/getargs.c (version): Print the value of revision.
8062 * src/revision.h: Extern revision.
8063
8064 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
8065
8066 * NEWS: Version 2.3.
8067 * configure.ac (AC_INIT): Likewise.
8068
8069 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
8070
8071 * data/glr.c (YYRECOVERING): Define to be a function-like macro
8072 with no arguments, not as an object-like macro. This is for
8073 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
8074 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
8075 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
8076 Document this.
8077
8078 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
8079
8080 * src/getargs.c (usage): Back out yesterday's modification of the
8081 --help output so that we don't have to wait for translation before
8082 releasing 2.3.
8083
8084 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
8085
8086 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
8087 Problem reported by Akim Demaille.
8088
8089 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
8090
8091 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
8092
8093 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
8094
8095 * data/yacc.c (yy_reduce_print): Omit trailing white space in
8096 generated source code. Problem reported by Frans Englich in
8097 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
8098
8099 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
8100
8101 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
8102 shell, not within 'make', so that 'make' by an ordinary builder
8103 (using GNU make) does not worry about configuring gzip. This also
8104 works around a bug reported independently by Keith Thompson and by
8105 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
8106 stderr rather than stdout, messing up the build logs.
8107
8108 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
8109
8110 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
8111 to make sure that YYID will never be unused. This fixes a 'make
8112 maintainer-check' failure caused by the recent changes to the 'Trivial
8113 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
8114 not used.
8115 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
8116
8117 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
8118
8119 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
8120 state before an empty RHS is always resolved here. Only the location
8121 of that state is guaranteed to be resolved, and that's enough. This
8122 fixes the remaining bug reported by Derek M. Jones in
8123 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
8124 * tests/glr-regression.at (Uninitialized location when reporting
8125 ambiguity): Test the above case.
8126 Also, the embedded comments in this test case claim it checks the case
8127 of an empty RHS that has inherited the initial location. However, the
8128 corresponding LHS was already resolved, so yyresolveLocations didn't
8129 actually have reason to modify it. Fix this by forcing
8130 nondeterministic operation at the beginning of the parse.
8131
8132 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
8133
8134 * data/c.m4 (b4_yy_symbol_print_generate):
8135 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
8136 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
8137 of the bugs reported today by Derek M Jones in
8138 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
8139 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
8140 defined to be a type name without parens or brackets.
8141 (Location Type): Similarly for YYLTYPE.
8142 * tests/regression.at (Trivial grammars): Put in a test for this
8143 bug that will be caught by 'make maintainer-check' (though not,
8144 alas, by 'make check' unless your compiler is picky).
8145
8146 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
8147
8148 * NEWS: Version 2.2.
8149 * configure.ac (AC_INIT): Likewise.
8150
8151 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
8152
8153 * data/glr.c (yyreportTree): Make room in yystates for the state
8154 preceding the RHS. This fixes the segmentation fault reported by Derek
8155 M. Jones in
8156 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
8157 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
8158 to the user. Reported for yyreportTree by Derek M. Jones later in the
8159 same thread.
8160 * THANKS: Add Derek M. Jones.
8161 Update my email address.
8162 Fix typo in Steve Murphy's name.
8163
8164 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
8165
8166 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
8167 checking against YYLAST that caused the parser to miss a potential
8168 alternative in its diagnostic.
8169 Problem reported by Maria Jose Moron Fernandez in
8170 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
8171 * data/lalr1.cc (yysyntax_error_): Likewise.
8172 * data/yacc.c (yysyntax_error): Likewise.
8173 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
8174 tokens, in case we run into an older C compiler.
8175 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
8176 Use them to check for the off-by-one error fixed above.
8177
8178 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
8179 YYSIZE_T, not size_t.
8180 * tests/regression.at (Trivial grammars): New test, to catch
8181 the error fixed by the above patch.
8182
8183 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8184
8185 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
8186 scheme.
8187 Reported by Steve Murphy.
8188
8189 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8190
8191 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
8192 * data/glr.cc: b4_location_flag is now b4_locations_flag.
8193
8194 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8195
8196 Implement --trace=m4.
8197 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
8198 * src/output.c (output_skeleton): When set, pass -dV to m4.
8199
8200 Factor the handling of flags in m4.
8201 * src/output.c (prepare): Rename the muscle names debug, defines,
8202 error_verbose to debug_flag, defines_flag, error_verbose_flag.
8203 * data/c.m4: Adjust.
8204 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
8205 Use b4_define_flag_if to define other b4_FLAG_if macros.
8206 (b4_location_if): As a consequence, rename as...
8207 (b4_locations_if): this, for consistency.
8208 Adjust all the skeletons.
8209
8210 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8211
8212 * etc/bench.pm: Shorten bench names.
8213
8214 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8215
8216 * src/output.h, src/output.c (error_verbose): Move to...
8217 * src/getargs.h, src/getargs.c: here.
8218 Sort the flags.
8219 Adjust dependencies.
8220
8221 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
8222
8223 * data/c.m4 (b4_copyright): Put the special exception for Bison
8224 skeletons here, so we don't have to put it in each skeleton. All
8225 uses changed. Suggested by Akim Demaille. Also, wrap the
8226 copyright notice, in case it is longer than 80 columns. Replace
8227 comma by newline after title.
8228
8229 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
8230
8231 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
8232 incompatibility, not a bug. Mention that it wasn't fixed as of
8233 flex 2.5.33.
8234
8235 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
8236
8237 * examples/extexi: Enforce the precedence of concatenation over
8238 >>.
8239 Reported by Tommy Nordgren.
8240
8241 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
8242
8243 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
8244 with the member "token".
8245 Reported by Martin Nylin.
8246
8247 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
8248
8249 * data/glr.c: Switch to Bison 2.2 special-exception language in
8250 the copyright notice. Use more-regular format for titles and
8251 copyright notices.
8252 * data/glr.cc: Likewise.
8253 * data/location.cc: Likewise.
8254 * data/yacc.cc: Likewise.
8255 * doc/bison.texinfo (Conditions): Document this.
8256 * NEWS: likewise. Upgrade version to 2.2.
8257
8258 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
8259
8260 * data/glr.cc: Remove dead code.
8261
8262 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
8263
8264 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
8265 that variable and the line breaks the bootstrap. Problem reported
8266 by Juan M. Guerrero.
8267
8268 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
8269
8270 * doc/bison.texinfo (Multiple start-symbols): New.
8271
8272 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
8273
8274 * etc/README, etc/bench.pl: New.
8275
8276 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
8277
8278 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
8279 rule.
8280 Reported by Mickael Labau.
8281 * tests/input.at (Torturing the Scanner): Test it.
8282
8283 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
8284
8285 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
8286 Problem reported by Bob Rossi.
8287
8288 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
8289
8290 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
8291 and didn't really work.
8292 For the index, use @ifnotinfo, not @iftex.
8293 Minor cleanups of spacing and terminology.
8294
8295 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
8296
8297 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
8298 of AT_NAME_PREFIX when %name-prefix is not used.
8299
8300 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
8301
8302 Apply --prefix to C++ skeletons too: they change the namespace.
8303 The test suite already exercize these cases.
8304 * data/c++.m4 (b4_namespace): New.
8305 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
8306 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
8307 * data/yacc.c, data/glr.c: Remove a useless `[]'.
8308 * doc/bison.texinfo: Document it.
8309 (Option Cross Key): Use @multitable in all formats. It looks
8310 nicer, even in TeX outputs.
8311 (Rules): Use the same code whatever the output type is.
8312 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
8313 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
8314 * tests/calc.at: Use it, instead of hard coding `yy'.
8315
8316 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8317
8318 * TODO: Remove dead items.
8319
8320 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8321
8322 * doc/FAQ: Remove, merged into...
8323 * doc/bison.texinfo (FAQ): this.
8324 * doc/Makefile.am (EXTRA_DIST): Adjust.
8325
8326 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8327
8328 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
8329 even if empty.
8330 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
8331 * doc/bison.texinfo (Calc++ Scanner): Use it.
8332
8333 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
8334
8335 Fix two nits reported by twlevo, plus one more that I discovered.
8336
8337 * src/assoc.h (assoc_to_string): Give a name to the arg, as
8338 this is the usual Bison style.
8339 * src/location.h (location_print): Likewise.
8340
8341 * src/reader.h (token_name): Likewise.
8342
8343 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
8344
8345 Fix some nits reported by twlevo.
8346 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
8347 and "POSIX". Use more-modern syntax for URLs. Mention C++
8348 and ask for Java. Don't hardwire OS version numbers. Add
8349 copyright notice.
8350 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
8351 * src/conflicts.c (solved_conflicts_obstack): Now static.
8352
8353 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
8354
8355 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
8356 page. Say "you can use it" not "you may use it" as on the web page;
8357 we're describing capabilities not granting permission.
8358
8359 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
8360
8361 * data/glr.c (yyresolveLocations): Rename local variables to avoid
8362 shadowing warnings. Use usual patter for iterating through RHS.
8363 * tests/glr-regression.at
8364 (Uninitialized location when reporting ambiguity):
8365 Modify yylex so that it uses its argument, rather than trying
8366 to rely on ARGSUSED (which doesn't work for gcc with warnings).
8367 const char -> char const.
8368
8369 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
8370 Don't use tabs inside commands; it messes up 'ps'.
8371 Problem reported by twlevo.
8372
8373 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
8374
8375 * tests/glr-regression.at (Uninitialized location when reporting
8376 ambiguity): New test case.
8377 * data/glr.c (yyresolveLocations): New function, which uses
8378 YYLLOC_DEFAULT.
8379 (yyresolveValue): Invoke yyresolveLocations before reporting an
8380 ambiguity.
8381 * doc/bison.texinfo (Default Action for Locations): Note
8382 YYLLOC_DEFAULT's usage for ambiguity locations.
8383 (GLR Semantic Actions): Cross-reference those notes.
8384
8385 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
8386
8387 * tests/glr-regression.at (Leaked semantic values when reporting
8388 ambiguity): Remove unnecessary union and type declarations.
8389 (Leaked lookahead after nondeterministic parse syntax error): New test
8390 case.
8391 * data/glr.c (yyparse): Check for zero stacks remaining before
8392 attempting to shift the lookahead so that you don't lose it.
8393
8394 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
8395
8396 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
8397 * tests/glr-regression.at (Leaked semantic values when reporting
8398 ambiguity): New test case.
8399 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
8400 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
8401 now unnecessary yystackp parameter.
8402 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
8403 destructors can be called.
8404
8405 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
8406 in existing testcases.
8407
8408 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
8409
8410 Don't leak semantic values for parent RHS when a user action cuts the
8411 parser, and clean up related code a bit.
8412 * tests/glr-regression.at (Leaked merged semantic value if user action
8413 cuts parse): Rename to...
8414 (Leaked semantic values if user action cuts parse): ... this. Add check
8415 for leaked parent RHS values.
8416 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
8417 between an unresolved state (non-empty chain of semantic options) and
8418 an incomplete one (signaled by an empty chain).
8419 (yyresolveStates): Document the interface. Move all manipulation of a
8420 successfully or unsuccessfully resolved yyGLRState to...
8421 (yyresolveValue): ... here so that yyresolveValue always leaves a
8422 yyGLRState with consistent data and thus is easier to understand.
8423 Remove the yyvalp and yylocp parameters since they are always just
8424 taken from the yys parameter. When reporting a discarded merged value
8425 in debugging output, note that it is incompletely merged. Document the
8426 interface.
8427 (yyresolveAction): If resolving any of the RHS states fails, destroy
8428 them all rather than leaking them. Thus, as long as user actions are
8429 written to clean up the RHS correctly, yyresolveAction always cleans up
8430 the RHS of a semantic option. Document the interface.
8431
8432 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
8433
8434 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
8435 led to a segmentation fault in GNU Pascal. Problem reported
8436 by Waldek Hebisch.
8437
8438 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
8439
8440 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
8441 mid-rule action inside a nonterminal symbol in order to declare a
8442 destructor for its semantic value.
8443
8444 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
8445
8446 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
8447 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
8448 __cplusplus && ! defined _STDLIB_H && !
8449 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
8450 defined free))]: Include <stdlib.h> rather than rolling our own
8451 declarations of malloc and free, to avoid problems with
8452 incompatible declarations (using 'throw') C++'s stdlib.h. This
8453 should fix Debian bug 340012
8454 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
8455 reported by Guillaume Melquiond.
8456
8457 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
8458
8459 * NEWS: Clarify symbols versus types in unused-value warnings.
8460
8461 * configure.ac (AC_INIT): Bump version number.
8462
8463 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
8464
8465 * NEWS: Version 2.1a.
8466 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
8467 since C99 requires this.
8468
8469 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
8470
8471 * m4/c-working.m4: New file.
8472 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
8473
8474 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
8475
8476 * Makefile.maint: Merge from coreutils.
8477
8478 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
8479
8480 More portability fixes for problems summarized by Nelson H. F. Beebe.
8481
8482 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
8483 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
8484 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
8485 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
8486 messes up because C++ code is compiled in 32-bit mode but linked
8487 in 64-bit mode.
8488
8489 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
8490
8491 More portability fixes for problems summarized by Nelson H. F. Beebe.
8492
8493 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
8494 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
8495
8496 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
8497 nodist_PROGRAMS, since we don't need to actually compile the
8498 example if we're just doing a plain 'make'. This avoids bothering
8499 the installer unnecessarily about problems due to weird C++
8500 compilers.
8501
8502 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
8503
8504 More portability fixes for problems summarized by Nelson H. F. Beebe.
8505
8506 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
8507 than #include "...", and compile with -I'.'. The old method was
8508 not portable, according to Posix and the C standard, and it does
8509 not work with Sun C 5.7, where previous #line directives affect
8510 the working directory used in later #include "..." directives.
8511
8512 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8513
8514 Various DJGGP specific issues in /djgpp
8515
8516 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
8517
8518 More portability fixes for problems summarized by Nelson H. F. Beebe.
8519
8520 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
8521 '#include <map>' works and that you can apply ++ to iterators.
8522
8523 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
8524
8525 Work around portability problems summarized by Nelson H. F. Beebe in
8526 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
8527
8528 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8529 that '#include <string>' works.
8530
8531 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
8532 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
8533 "warning: sorry: semantics of inline function static data `const
8534 unsigned char translate_table[262]' are wrong (you'll wind up with
8535 multiple copies)".
8536
8537 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
8538 or, xor to not_, and_, or_, and xor_, respectively. This works
8539 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
8540 random system header somewhere that includes the equivalent of
8541 <iso646.h>.
8542
8543 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
8544 -E" works; it apparently doesn't work with PathScale EKO Compiler
8545 Suite Version 2.0.
8546
8547 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
8548
8549 During deterministic GLR operation, user actions should be able to
8550 influence the parse by changing yychar. To make this easier to fix and
8551 to make glr.c easier to evolve in general, don't maintain yytoken in
8552 parallel with yychar; just compute yytoken when needed.
8553 * tests/glr-regression.at (Incorrect lookahead during deterministic
8554 GLR): Check that setting yychar in a user action has the intended
8555 effect.
8556 * data/glr.c (yyGLRStack): Remove yytokenp member.
8557 (yyclearin): Don't set *yytokenp.
8558 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
8559 yychar rather than *yytokenp to determine the current lookahead.
8560 Compute yytoken locally when needed.
8561 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
8562 point to.
8563
8564 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
8565 after `--report' documentation.
8566
8567 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
8568
8569 * src/parse-gram.y (grammar_declaration): Location of printer
8570 symbol is @1, not list->location. Bug reported by twlevo.
8571 * tests/input.at (Incompatible Aliases): Adjust to above change.
8572
8573 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
8574
8575 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
8576 all the test at once. This makes the output easier to read in the
8577 normal case.
8578
8579 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
8580 got from <http://bro-ids.org/download.html>. The bug is that
8581 when two actions appeared in succession, the second one was
8582 scanned before the first one was added to the grammar rule
8583 as a midrule action. Bison then output the incorrect warning
8584 "parse.y:905.17-906.36: warning: unused value: $3".
8585 * src/parse-gram.y (BRACED_CODE, action): These are no longer
8586 associated with a value.
8587 (rhs): Don't invoke grammar_current_rule_action_append.
8588 (action): Invoke it here instead.
8589 * src/reader.c (grammar_midrule_action): Now extern.
8590 (grammar_current_rule_action_append): Don't invoke
8591 grammar_midrule_action; that is now the scanner's job.
8592 * src/reader.h (last_string, last_braced_code_loc):
8593 (grammar_midrule_action): New decls.
8594 * src/scan-gram.l (last_string): Now extern, sigh.
8595 (last_braced_code_loc): New extern variable.
8596 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
8597 rule already has an action.
8598 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
8599 * tests/input.at (AT_CHECK_UNUSED_VALUES):
8600 Add some tests to check that the above changes fixed the bug.
8601
8602 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
8603
8604 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
8605 All used changed. Check whether the symbol has a destructor,
8606 not whether it is typed.
8607 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
8608 that the values are still reported as unused. All line numbers
8609 adjusted.
8610
8611 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
8612
8613 Work around a bug in bro 0.8, which underparenthesizes its
8614 definition of YYLLOC_DEFAULT.
8615 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
8616 their arguments.
8617 * data/lalr1.cc: Likewise.
8618 * data/yacc.cc: Likewise.
8619
8620 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
8621
8622 Work around a bug in Pike 7.0, and give the Pike folks a
8623 better way to override the usual int widths.
8624 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
8625 user can override the types.
8626 (short): #undef, to work around a bug in Pike 7.0.
8627 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
8628 (union yyalloc.yyss): Use yytype_int16 rather than short.
8629 All uses changed.
8630 (yysigned_char): Remove.
8631 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
8632 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
8633 * tests/regression.at (Web2c Actions): Adjust to above changes.
8634
8635 * src/reader.c (check_and_convert_grammar): New function.
8636 (reader): Close the input file even if something went wrong during
8637 parsing. Minor file descriptor leak reported by twlevo.
8638
8639 * src/assoc.c (assoc_to_string): Use a default: abort (); case
8640 to pacify gcc -Wswitch-default.
8641 * src/scan-gram.l (adjust_location): Use a default: break; case
8642 to pacify gcc -Wswitch-default.
8643 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
8644 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
8645 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
8646 Move these decls to scan-skel.l, since they don't need to be
8647 visible elsewhere.
8648 * src/scan-skel.l: Accept the above decls.
8649 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
8650 is used.
8651
8652 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
8653
8654 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
8655 since we don't want to insist on a version number at the start
8656 of the changelog every time.
8657 * Makefile.maint: Sync from coreutils a bit better.
8658 (sc_trailing_blank): Renamed from sc_trailing_space.
8659 All uses changed.
8660 (sc_no_if_have_config_h, sc_require_config_h):
8661 (sc_prohibit_assert_without_use): New rules.
8662 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
8663 (sc_dd_max_sym_length): Fix leading spaces in rule.
8664 (sc_system_h_headers): Prefix with @.
8665 (sc_useless_cpp_parens, m4-check): Output line numbers.
8666 (changelog-check): Allow version only in head.
8667 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
8668 satisfy new Makefile.maint rule.
8669 * data/glr.c: Likewise.
8670 * data/glr.cc: Likewise.
8671 * data/lalr1.cc: Likewise.
8672 * data/yacc.c: Likewise.
8673 * lib/ebitsetv.c: Likewise.
8674 * lib/lbitset.c: Likewise.
8675 * lib/subpipe.c: Likewise.
8676 * lib/timevar.c: Likewise.
8677 * src/system.h: Likewise.
8678 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
8679 * djgpp/Makefile.maint: Add copyright notice.
8680 * djgpp/README.in: Likewise.
8681 * djgpp/config.bat: Likewise.
8682 * djgpp/config.site: Likewise.
8683 * djgpp/config_h.sed: Likewise.
8684 * djgpp/djunpack.bat: Likewise.
8685 * djgpp/config.sed: Fix copyright notice to match standard format.
8686 * djgpp/subpipe.h: Likewise.
8687 * lib/bitsetv-print.c: Likewise.
8688 * lib/bitsetv.c: Likewise.
8689 * lib/subpipe.h: Likewise.
8690 * lib/timevar.c: Likewise.
8691 * lib/timevar.h: Likewise.
8692 * djgpp/subpipe.c: Use standard recipe for config.h.
8693 * lib/abitset.c: Likewise.
8694 * lib/bitset.c: Likewise.
8695 * lib/bitset_stats.c: Likewise.
8696 * lib/bitsetv-print.c: Likewise.
8697 * lib/bitsetv.c: Likewise.
8698 * lib/ebitsetv.c: Likewise.
8699 * lib/get-errno.c: Likewise.
8700 * lib/lbitset.c: Likewise.
8701 * lib/subpipe.c: Likewise.
8702 * lib/timevar.c: Likewise.
8703 * lib/vbitset.c: Likewise.
8704 * tests/local.at: Likewise.
8705 * src/scan-gram.l: Don't include verify.h, since system.h does
8706 that for us.
8707 * .x-sc_require_config_h: New file.
8708 * .x-sc_unmarked_diagnostics: New file.
8709
8710 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
8711
8712 Be a bit more systematic about using 'abort'.
8713 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
8714 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
8715 Put 'default: abort ();' before some other case, to satisfy older
8716 pedantic compilers.
8717 * lib/bitset_stats.c (bitset_stats_init): Likewise.
8718 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
8719 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
8720 * src/conflicts.c (resolve_sr_conflict): Likewise.
8721 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
8722 (get_decision_str, get_orientation_str, get_node_alignment_str):
8723 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
8724 (get_linestyle_str, get_arrowstyle_str): Likewise.
8725 * src/conflicts.c (resolve_sr_conflict):
8726 Use a default case rather than one for the one remaining enum
8727 value, to catch invalid enum values as well.
8728 * src/lalr.c (set_goto_map, map_goto):
8729 Prefer "assert (FOO);" to "if (!FOO) abort ();".
8730 * src/nullable.c (nullable_compute, token_definitions_output):
8731 Likewise.
8732 * src/reader.c (packgram, reader): Likewise.
8733 * src/state.c (transitions_to, state_new, state_reduction_find):
8734 Likewise.
8735 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
8736 (symbol_pack): Likewise.
8737 * src/tables.c (conflict_row, pack_vector): Likewise.
8738 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
8739 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
8740 * src/system.h: Don't include <assert.h>.
8741 (assert): New macro.
8742
8743 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
8744 (Destructor Decl, Parser Function, Pure Calling):
8745 Describe rules for braces inside C code more carefully.
8746
8747 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
8748
8749 Fix some porting glitches found by Nelson H. F. Beebe.
8750 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
8751 compilers that don't understand that abort () does not return.
8752 * src/state.c (transitions_to): Likewise.
8753 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8754 that '#include <cstdlib>' works.
8755 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
8756 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
8757 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
8758 for the benefit of some pre-C99 compilers.
8759
8760 * bootstrap: Undo changes to gnulib files that autoreconf made.
8761
8762 Minor fixups to get 'make maintainer-check' to work.
8763 * configure.ac: Don't use -Wnested-externs, as it's incompatible
8764 with the new verify.h implementation.
8765 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
8766 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
8767 * data/yacc.c (YYUSE): Likewise.
8768 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
8769 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
8770 * src/parse-gram.y (declaration): Don't pass a string constant
8771 to a function that expects char *, since GCC might complain
8772 about the constant value.
8773 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
8774 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
8775 before #defining them.
8776 * tests/glr-regression.at
8777 (Incorrectly initialized location for empty right-hand side in GLR):
8778 In yyerror, use the msg arg.
8779 (Corrupted semantic options if user action cuts parse):
8780 (Incorrect lookahead during deterministic GLR):
8781 (Incorrect lookahead during nondeterministic GLR):
8782 Don't name a local var 'index'; it shadows string.h's 'index'.
8783
8784 2006-01-19 Akim Demaille <akim@epita.fr>
8785
8786 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
8787 location, not just parts of it.
8788
8789 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
8790
8791 * NEWS: Document the fact that multiple %unions are now allowed.
8792 * doc/bison.texinfo (Union Decl): Likewise.
8793 * TODO: This feature is now implemented, so remove it from
8794 the wishlist.
8795
8796 * Makefile.maint: Merge with coreutils Makefile.maint.
8797 (CVS_LIST): Use build-aux version if available.
8798 (VERSION_REGEXP): New macro.
8799 (syntax-check-rules): Add sc_no_if_have_config_h,
8800 sc_prohibit_assert_without_use, sc_require_config_h,
8801 sc_useless_cpp_parens.
8802 (sc_obsolete_symbols): Check for O_NDELAY.
8803 (sc_dd_max_sym_length): Track coreutils.
8804 (sc_unmarked_diagnostics): Look in all files, not just *.c.
8805 (sc_useless_cpp_parens): New rule.
8806 (news-date-check): Look for version or today's date.
8807 (changelog-check): Don't require version number near head.
8808 (copyright-check): Use current year instead of hardwiring 2005.
8809 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
8810 (announcement): Add --gpg-key-ID.
8811
8812 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
8813 with "file system".
8814
8815 Avoid undefined behavior that addressed just before the start of an
8816 array. Problem reported by twlevo.
8817 * src/reader.c (packgram): Prepend a new sentinel before ritem.
8818 * src/lalr.c (build_relations): Rely on new sentinel.
8819 * src/gram.c (gram_free): Adjust to new sentinel.
8820
8821 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
8822
8823 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
8824 yylookaheadNeeds. All uses updated.
8825 (yysplitStack): Rename local yynewLookaheadStatuses to
8826 yynewLookaheadNeeds.
8827 * data/glr-regression.at (Incorrect lookahead during nondeterministic
8828 GLR): In comments, change `lookahead status' to `lookahead need'.
8829
8830 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8831
8832 * data/glr.c (yysplitStack): A little stylistic rewrite.
8833
8834 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8835
8836 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
8837
8838 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
8839
8840 * doc/bison.texinfo: Fix some typos.
8841 (GLR Semantic Actions): New subsection discussing special
8842 considerations because GLR semantic actions might be deferred.
8843 (Actions): Mention look-ahead usage of yylval.
8844 (Actions and Locations): Mention look-ahead usage of yylloc.
8845 (Special Features for Use in Actions): Add YYEOF entry and mention it
8846 in the yychar entry.
8847 In the yychar entry, remove mention of the local yychar case (pure
8848 parser) since this is irrelevant information when writing semantic
8849 actions and since it's already discussed in `Table of Symbols' where
8850 yychar is otherwise described as an external variable.
8851 In the yychar entry, don't call it the `current' look-ahead since it
8852 isn't when semantic actions are deferred.
8853 In the yychar and yyclearin entries, add note about deferred semantic
8854 actions.
8855 Add yylloc and yylval entries discussing look-ahead usage.
8856 (Look-Ahead Tokens): When discussing yychar, don't call it the
8857 `current' look-ahead, and do mention yylval and yylloc.
8858 (Error Recovery): Cross-reference `Action Features' when mentioning
8859 yyclearin.
8860 (Table of Symbols): In the yychar entry, don't call it the `current'
8861 look-ahead.
8862 In the yylloc and yylval entries, mention look-ahead usage.
8863
8864 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
8865
8866 * tests/glr-regression.at: Update copyright year to 2006.
8867
8868 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8869
8870 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
8871 use during nondeterministic operation to track which stacks have
8872 actually needed the current lookahead.
8873 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
8874 Allocate, deallocate, resize, and otherwise shuffle space for
8875 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
8876 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
8877 appropriately during nondeterministic operation.
8878 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
8879 members to store the current lookahead to be used by the deferred
8880 user action.
8881 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
8882 from which the RHS is taken. Set the lookahead members of the new
8883 yySemanticOption according to the lookahead status for stack yyk.
8884 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
8885 yyaddDeferredAction.
8886 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
8887 members of yySemanticOption before invoking yyuserAction, and then set
8888 them back to their current values afterward.
8889 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
8890 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
8891 * tests/glr-regression.at: Remove `.' from the ends of recent test case
8892 titles for consistency.
8893 (Leaked merged semantic value if user action cuts parse): In order to
8894 suppress lint warnings, use arguments in merge function, and assign
8895 char value < 128 in main.
8896 (Incorrect lookahead during deterministic GLR): New test case.
8897 (Incorrect lookahead during nondeterministic GLR): New test case.
8898
8899 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8900
8901 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
8902 !yyvaluep as signal that no semantic value is available to print.
8903 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
8904 to print a semantic value.
8905
8906 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8907
8908 * tests/glr-regression.at: For consistency with my newer test cases,
8909 don't thank myself.
8910
8911 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
8912
8913 * data/glr.c (yyresolveValue): When merging semantic options, if at
8914 least one user action succeeds but a later one cuts the parse, then
8915 destroy the semantic value before returning rather than leaking it.
8916 (yyresolveStates): If a user action cuts the parse and thus
8917 yyresolveValue fails, ignore the (unset) semantic value rather than
8918 corrupting the yyGLRState, and empty the semantic options list since
8919 the user actions should have called all necessary destructors.
8920 Simplify code with YYCHK.
8921 * tests/glr-regression.at (Corrupted semantic options if user action
8922 cuts parse): New test case.
8923 (Undesirable destructors if user action cuts parse): New test case.
8924 Before applying any of this patch, this test case never actually failed
8925 for me... but only because the corrupted semantic options usually
8926 masked this bug.
8927 (Leaked merged semantic value if user action cuts parse): New test
8928 case.
8929
8930 2006-01-05 Akim Demaille <akim@epita.fr>
8931
8932 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
8933
8934 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
8935
8936 * data/c.m4 (b4_c_modern): New macro, with a new provision for
8937 _MSC_VER. Problem reported by Cenzato Marco.
8938 (b4_c_function_def): Use it.
8939 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
8940 b4_c_modern.
8941 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
8942 than rolling our own.
8943
8944 2006-01-04 Akim Demaille <akim@epita.fr>
8945
8946 Also warn about non-used mid-rule values.
8947 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
8948 member.
8949 (symbol_list_new): Adjust.
8950 * src/reader.c (symbol_typed_p): New.
8951 (grammar_rule_check): Use it.
8952 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
8953 Check its rule.
8954 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
8955 Use it.
8956 * tests/actions.at (Exotic Dollars): Adjust.
8957
8958 2006-01-04 Akim Demaille <akim@epita.fr>
8959
8960 * src/reader.c (grammar_midrule_action): If $$ is set in a
8961 mid-rule, move the `used' bit to its lhs.
8962 * tests/input.at (Unused values): New.
8963 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
8964
8965 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
8966
8967 * doc/bison.texinfo (Bison Options): Say more accurately what
8968 --yacc does.
8969 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
8970 about declarations in the grammar when in Yacc mode, as POSIX does
8971 not require a diagnostic when the grammar uses extensions.
8972
8973 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
8974
8975 Warn about dubious constructions like "%token T T".
8976 Reported by twlevo.
8977 * src/symtab.h (struct symbol.declared): New member.
8978 * src/symtab.c (symbol_new): Initialize it to false.
8979 (symbol_class_set): New arg DECLARING, specifying whether
8980 this is a declaration that we want to warn about, if there
8981 is more than one of them. All uses changed.
8982
8983 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
8984 Allow multiple %union directives, whose contents concatenate.
8985 * src/parse-gram.y (grammar_declaration): Likewise.
8986 Use muscle_code_grow, so that we don't need stype_line any more.
8987 All uses changed.
8988
8989 * src/muscle_tab.c (muscle_grow): Fix comment.
8990
8991 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
8992 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
8993 Update copyright year to 2006.
8994
8995 2006-01-03 Akim Demaille <akim@epita.fr>
8996
8997 Have glr.cc pass (some of) the calc.at tests.
8998 * data/glr.cc (b4_parse_param_orig): New.
8999 (b4_parse_param): Improve its definition, and bound it more
9000 clearly in the skeleton.
9001 (b4_epilogue): Append, instead of prepending, in order to keep
9002 #line consistency.
9003 Simplify the generation of auxiliary functions: locations and
9004 purity are mandated.
9005 (b4_global_tokens_and_yystype): Honor it.
9006 * data/location.cc (c++.m4): Don't include it.
9007 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
9008 and AT_SKEL_CC_IF.
9009 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
9010 AT_LALR1_CC_IF.
9011 Be sure to initialize the first position's filename.
9012 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
9013 mandated anyway.
9014 (AT_CHECK_CALC_GLR_CC): New.
9015 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
9016
9017 2006-01-02 Akim Demaille <akim@epita.fr>
9018
9019 * src/output.c (output_skeleton): Don't hard wire the inclusion of
9020 c.m4.
9021 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
9022 * data/glr.cc: Do not include stack.hh.
9023
9024 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
9025
9026 * data/glr.c: Reformat whitespace with tabs.
9027 (b4_lpure_formals): Remove this unused m4 macro.
9028 * tests/cxx-type.at: Reformat whitespace with tabs.
9029 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
9030 since it's a member. Rename type to isNterm for clarity.
9031
9032 2005-12-29 Akim <akim@sulaco.local>
9033
9034 Let glr.cc catch up with symbol_value_print.
9035 * data/glr.cc (b4_yysymprint_generate): Replace by...
9036 (b4_yy_symbol_print_generate): this.
9037 (yy_symbol_print, yy_symbol_value_print): Declare them.
9038
9039 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
9040
9041 * src/location.h (boundary): Note that a line or column equal
9042 to INT_MAX indicates an overflow.
9043 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
9044 (rule_length_overflow, increment_rule_length, add_column_width):
9045 New functions.
9046 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
9047 (<SC_BRACED_CODE>"}"):
9048 Use increment_rule_length rather than incrementing it by hand.
9049 (adjust_location, handle_syncline): Diagnose overflow.
9050 (handle_action_dollar, handle_action_at):
9051 Fix bug with monstrosities like $-2147483648.
9052 Remove now-unnecessary checks.
9053 (scan_integer): Verify assumptions and remove now-unnecessary checks.
9054 (convert_ucn_to_byte): Verify assumptions.
9055 (handle_syncline): New arg LOC. All callers changed.
9056 Don't store through a value derived from char const * pointer.
9057
9058 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
9059 GCC warnings.
9060
9061 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
9062
9063 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
9064 Remove unnecessary forward static decls.
9065
9066 2005-12-27 Akim Demaille <akim@epita.fr>
9067
9068 * src/reader.c (grammar_current_rule_check): Also check that $$
9069 is used.
9070 Take the rule to check as argument, hence rename as...
9071 (grammar_rule_check): this.
9072 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
9073 Rename as...
9074 (grammar_rule_begin, grammar_rule_end): these, for consistency.
9075 (grammar_midrule_action, grammar_symbol_append): Now static.
9076 * tests/torture.at (input): Don't rely on the default action
9077 being always performed.
9078 * tests/calc.at: "Set" $$ even when the action is "cut" with
9079 YYERROR or other.
9080 * tests/actions.at (Exotic Dollars): Instead of using unused
9081 values, check that the warning is issued.
9082
9083 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
9084
9085 * NEWS: Improve wording for unused-value warnings.
9086
9087 2005-12-22 Akim Demaille <akim@epita.fr>
9088
9089 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
9090 (b4_yysymprint_generate): Rename as...
9091 (b4_yy_symbol_print_generate): this.
9092 Generate yy_symbol_print instead of yysymprint.
9093 Generate also yy_symbol_value_print, and use it.
9094
9095 2005-12-22 Akim Demaille <akim@epita.fr>
9096
9097 * NEWS: Warn about unused values.
9098 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
9099 a `used' member.
9100 (symbol_list_n_get, symbol_list_n_used_set): New.
9101 (symbol_list_n_type_name_get): Use symbol_list_n_get.
9102 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
9103 * src/reader.c (grammar_current_rule_check): Check that values are
9104 used.
9105 * src/symtab.c (symbol_print): Accept 0.
9106 * tests/existing.at: Remove the type information.
9107 Empty the actions.
9108 Remove useless actions (beware of mid-rule actions: perl -000
9109 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
9110 * tests/actions.at (Exotic Dollars): Use unused values.
9111 * tests/calc.at: Likewise.
9112 * tests/glr-regression.at (No users destructors if stack 0 deleted):
9113 Likewise.
9114
9115 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
9116 rule_useful_p.
9117
9118 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
9119
9120 Undo 2005-12-01 tentative license wording change. The wording is
9121 still being reviewed by the lawyers, and we don't want to wait for
9122 them before publishing a test release. For now, revert to the
9123 previous wording.
9124 * NEWS: Undo 2005-12-01 change.
9125 * data/glr.c: Revert to previous license wording.
9126 * data/glr.cc: Likewise.
9127 * data/lalr1.cc: Likewise.
9128 * data/location.cc: Likewise.
9129 * data/yacc.c: Likewise.
9130
9131 * NEWS: Reword %destructor vs YYABORT etc.
9132 * data/glr.c: Use American spacing, for consistency.
9133 * data/glr.cc: Likewise.
9134 * data/lalr1.cc: Likewise.
9135 * data/yacc.c: Likewise.
9136 * data/yacc.c: Reformat comments slightly.
9137 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
9138 for consistency. Fix some spelling errors and reword recently-included
9139 text slightly.
9140 * tests/cxx-type.at: Cast results of malloc, for C++.
9141
9142 2005-12-21 Joel E. Denny <address@hidden>
9143
9144 * tests/cxx-type.at: Construct a tree, count the parents of shared
9145 nodes, and free each node once and only once. Previously, the memory
9146 for semantic values was leaked instead.
9147
9148 2005-12-21 Joel E. Denny <address@hidden>
9149
9150 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
9151 (yylval, yylloc): If pure, #define to yystackp->yyval and
9152 yystackp->yyloc similar to yychar and yynerrs.
9153 (yyparse): If pure, remove local yylval and yylloc. Add local
9154 yystackp to accommodate pure definitions of yylval and yylloc.
9155 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
9156 yylvalp and yyllocp to &yylval and &yylloc.
9157 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
9158 namespace. Previously, nerrs and char were missing, but lval and lloc
9159 weren't necessary.
9160 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
9161 yylvalp and yyllocp parameters since, if pure, these are now always
9162 accessible through yystackp. If not pure, they are still accessible
9163 globally.
9164 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
9165 `if (YYID (N))' to pacify lint.
9166
9167 2005-12-21 Akim Demaille <akim@epita.fr>
9168
9169 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
9170 destroy the RHS symbols of a rule.
9171 * data/yacc.c (yylen): Initialize to 0.
9172 Keep its value to the number of items to possibly shift.
9173 In particular, a regular successful parse that ends on YYFINAL by
9174 a (internal) YYACCEPT must not have yylen != 0.
9175 (yyerrorlab, yyreturn): Pop the RHS.
9176 Reorder a bit to emphasize the `shifting' bits of code.
9177 (YYPOPSTACK): Now accept a number of items to pop.
9178 * data/lalr1.cc: Likewise.
9179 * data/glr.c: Formatting changes.
9180 Use goto instead of fall through.
9181 * doc/bison.texinfo (Destructor Decl): Complete.
9182
9183 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9184
9185 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
9186 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
9187 * djgpp/config.bat: Replace every occurence of the file name
9188 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
9189 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
9190 * djgpp/config.sed: Replace every occurence of the file name
9191 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
9192 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
9193 * djgpp/djunpack.bat: DJGPP specific file.
9194 * djgpp/fnchange.lst: DJGPP specific file.
9195 * djgpp/README.in: Add new information about how to unpack the bison
9196 source on MSDOS and other systems which have 8.3 file name restrictions
9197 using djunpack.bat and fnchange.lst.
9198
9199 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
9200
9201 * bootstrap (build_cvs_prefix): Remove; unused.
9202 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
9203 when getting gnulib.
9204
9205 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
9206
9207 * data/glr.c: Reorder typedef declarations for structs to match order
9208 of struct declarations.
9209 Rename yystack everywhere to yystackp except in yyparse where it's not
9210 a pointer.
9211 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
9212 consistency.
9213 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
9214 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
9215 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
9216 lint.
9217
9218 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
9219
9220 * tests/sets.at (Accept): Fix typos in regular expression used to
9221 sed out the final state number.
9222
9223 Work around portability problem on Solaris 10: flex-generated
9224 files include <stdio.h> before <config.h>, which messes up
9225 because the latter defines __EXTENSIONS__. Address the problem
9226 by creating two new little files that include <config.h> first,
9227 then include the flex-generated files. Rewrite everyone else
9228 to include <config.h> first, as well.
9229 * lib/timevar.c: Always include "config.h".
9230 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
9231 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
9232 (EXTRA_bison_SOURCES): New macro.
9233 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
9234 * src/system.h: Don't include config.h.
9235 * src/LR0.c: Include <config.h> first.
9236 * src/assoc.c: Likewise.
9237 * src/closure.c: Likewise.
9238 * src/complain.c: Likewise.
9239 * src/conflicts.c: Likewise.
9240 * src/derives.c: Likewise.
9241 * src/files.c: Likewise.
9242 * src/getargs.c: Likewise.
9243 * src/gram.c: Likewise.
9244 * src/lalr.c: Likewise.
9245 * src/location.c: Likewise.
9246 * src/main.c: Likewise.
9247 * src/muscle_tab.c: Likewise.
9248 * src/nullable.c: Likewise.
9249 * src/output.c: Likewise.
9250 * src/parse-gram.y: Likewise.
9251 * src/print.c: Likewise.
9252 * src/print_graph.c: Likewise.
9253 * src/reader.c: Likewise.
9254 * src/reduce.c: Likewise.
9255 * src/relation.c: Likewise.
9256 * src/state.c: Likewise.
9257 * src/symlist.c: Likewise.
9258 * src/symtab.c: Likewise.
9259 * src/tables.c: Likewise.
9260 * src/uniqstr.c: Likewise.
9261 * src/vcg.c: Likewise.
9262
9263 * src/parse-gram.y: Fix minor problems uncovered by lint.
9264 (current_lhs, current_lhs_location): Now static.
9265 (current_assoc): Remove unused variable.
9266
9267 Cleanups so that Bison-generated parsers have less lint.
9268 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
9269 Prepend /*ARGSUSED*/, for lint's sake.
9270 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
9271 definition if 'lint' is defined.
9272 (YYID): New macro (or function, if lint).
9273 All uses of /*CONSTCOND*/0 replaced by YYID(0).
9274 * data/yacc.c: Likewise.
9275 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
9276 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
9277 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
9278 is C++ only.
9279 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
9280 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
9281 Use YYID(0) rather than 0, for lint.
9282 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
9283 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
9284
9285 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
9286
9287 * tests/glr-regression.at
9288 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9289 Close memory leak reported by twlevo.
9290
9291 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
9292
9293 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
9294 all stacks.
9295 (yyparse): Iterate another stack in order to call user destructors.
9296 * tests/glr-regression.at (No users destructors if stack 0 deleted):
9297 New test case.
9298 (Duplicated user destructor for lookahead): This test now is expected
9299 to succeed.
9300
9301 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
9302
9303 * NEWS: Document the following change.
9304 * data/yacc.c: Say "parser skeleton" rather than "file", since
9305 it's no longer just a file.
9306 * data/glr.c: Grant a special exception for C GLR parsers, that
9307 reads like the already-existing exception for C LALR(1) parsers.
9308 * data/glr.cc: Likewise.
9309 * data/lalr1.cc: Likewise.
9310 * data/location.cc: Likewise.
9311 * data/yacc.c: Reword the "written by" statement to clarify that
9312 it was the parser skeleton, not the entire output file.
9313 * data/glr.c: Written by Paul Hilfinger.
9314 * data/glr.cc: Written by Akim Demaille.
9315 * data/lalr1.cc: Likewise.
9316
9317 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
9318
9319 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
9320 Fix typos in previous change that broke 'make check'.
9321 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
9322 supported in C.
9323 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
9324 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
9325 We can revert this once things settle down.
9326
9327 * src/conflicts.c (conflicts_print): Don't print file name twice
9328 when %expect fails because there were no conflicts.
9329 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
9330 change.
9331 * tests/conflicts.at (%expect not enough, %expect too much):
9332 (%expect with reduce conflicts): Adjust to new behavior.
9333
9334 2005-11-18 Akim Demaille <akim@epita.fr>
9335
9336 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
9337 errors.
9338 * NEWS: Document this.
9339 * doc/bison.texinfo (Expect Decl): Likewise.
9340
9341 2005-11-16 Akim Demaille <akim@epita.fr>
9342
9343 Generalize the display of semantic values and locations in traces.
9344 * data/glr.c (yy_reduce_print): Fix indices (again).
9345 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
9346 literal integers.
9347 * data/lalr1.cc (yyreduce_print): Rename as...
9348 (yy_reduce_print): this.
9349 Display values and locations.
9350 * data/yacc.c (yy_reduce_print): Likewise.
9351 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
9352 (yysymprint): Move higher to be visible from yy_reduce_print).
9353 (yyparse): Adjust.
9354 * tests/calc.at: Adjust the expected length of the traces.
9355
9356 2005-11-14 Akim Demaille <akim@epita.fr>
9357
9358 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
9359 from 1 to N, while values and location start at 0.
9360 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
9361
9362 2005-11-14 Akim Demaille <akim@epita.fr>
9363
9364 * data/glr.c (yy_reduce_print): Fix the $ number.
9365
9366 2005-11-14 Akim Demaille <akim@epita.fr>
9367
9368 "Use" parse parameters.
9369 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
9370 * data/glr.c, data/glr.cc: Use them.
9371 * data/glr.c (YYUSE): Have a C++ definition that supports
9372 non-pointer types.
9373
9374 2005-11-14 Akim Demaille <akim@epita.fr>
9375
9376 * data/glr.c (yyexpandGLRStack): Declare only if defined.
9377
9378 2005-11-14 Akim Demaille <akim@epita.fr>
9379
9380 * data/glr.cc: New.
9381 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
9382
9383 2005-11-12 Akim Demaille <akim@epita.fr>
9384
9385 Let position and location be PODs.
9386 * data/location.cc (position::initialize, location::initialize): New.
9387 (position::position, location::location): Define only if
9388 b4_location_constructors is defined.
9389 * data/lalr1.cc (b4_location_constructors): Define it for backward
9390 compatibility.
9391 * doc/bison.texinfo (Initial Action Decl): Use initialize.
9392
9393 2005-11-12 Akim Demaille <akim@epita.fr>
9394
9395 * data/lalr1.cc: Move the body of the ctor and dtor into the
9396 parser file (instead of the header).
9397 Wrap the implementations in a "namespace yy".
9398
9399 2005-11-12 Akim Demaille <akim@epita.fr>
9400
9401 Have glr.c include its header file when created.
9402 * data/glr.c (b4_shared_declarations): New.
9403 Output them verbatim in the parser if !%defines, otherwise
9404 output then in the header file, and include it instead.
9405
9406 2005-11-11 Akim Demaille <akim@epita.fr>
9407
9408 * data/glr.c: Comment changes.
9409
9410 2005-11-11 Akim Demaille <akim@epita.fr>
9411
9412 When yydebug, report semantic and location values for reductions.
9413 * data/glr.c (yy_reduce_print): Report the semantic values and the
9414 locations.
9415 (YY_REDUCE_PRINT): Adjust.
9416 (yyglrReduce): Use them.
9417 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
9418 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
9419 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
9420 traces.
9421
9422 2005-11-10 Akim Demaille <akim@epita.fr>
9423
9424 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
9425 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
9426 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
9427
9428 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
9429
9430 * m4/cxx.m4, examples/Makefile.am: Don't build
9431 examples/calc++ if no C++ compiler is available. (trivial change)
9432
9433 2005-11-09 Akim Demaille <akim@epita.fr>
9434
9435 * src/scan-skel.l: Use a couple of asserts.
9436
9437 2005-11-03 Akim Demaille <akim@epita.fr>
9438
9439 In some (weird) cases, the final state number is incorrect.
9440 Reported by Alexandre Duret-Lutz.
9441 * src/LR0.c (state_list_append): Remove the computation of
9442 final_state.
9443 (save_reductions): Do it here.
9444 (get_state): Alpha conversion.
9445 (generate_states): Use a for loop.
9446 * src/gram.h (item_number_is_rule_number)
9447 (item_number_is_symbol_number): New.
9448 * src/state.c: Use assert.
9449 * src/system.h: Include assert.h.
9450 * tests/sets.at (Accept): New.
9451
9452 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9453
9454 * data/glr.c (yyfill): Adjust comment.
9455 (yyresolveAction): Initialize default location properly
9456 for empty right-hand sides.
9457 (yydoAction): Ditto.
9458 Add comment explaining apparently dead code.
9459 * tests/glr-regression.at
9460 (Incorrectly initialized location for empty right-hand side in GLR):
9461 New test.
9462
9463 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
9464
9465 * bootstrap (cleanup_gnulib): New function. Use it to clean up
9466 gnulib when interrupted. This fixes some race conditions and
9467 works around some portability problems (one noted by Paul
9468 Hilfinger).
9469
9470 2005-10-22 Akim <akim@epita.fr>
9471
9472 * Makefile.cfg: Adjust to config -> build-aux.
9473 Reported by twledo.
9474
9475 2005-10-21 Akim Demaille <akim@epita.fr>
9476
9477 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
9478 the %parse-params.
9479 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
9480 * data/yacc.c (b4_Pure_if): Rename as...
9481 (b4_yacc_pure_if): this.
9482 (YY_SYMBOL_PRINT, yyparse): Adjust.
9483 * doc/bison.texinfo: Formatting changes.
9484
9485 2005-10-21 Akim Demaille <akim@epita.fr>
9486
9487 Finish the transition config -> build-aux.
9488 * configure.ac, Makefile.am: Use build-aux.
9489 * config/prev-version, config/announce-gen, config/Makefile.am:
9490 Move to...
9491 * build-aux/prev-version, build-aux/announce-gen,
9492 * build-aux/Makefile.am: here.
9493
9494 2005-10-14 Akim Demaille <akim@epita.fr>
9495
9496 * examples/calc++/test: Use set -x only when VERBOSE.
9497
9498 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
9499
9500 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
9501 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
9502
9503 2005-10-13 Akim Demaille <akim@epita.fr>
9504
9505 * src/scan-skel.l: Output the base name parts of the parser and
9506 header file names.
9507 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
9508 additional checks.
9509 Use this to exercise C++ outputs in subdirs.
9510 Reported by Oleg Smolsky.
9511
9512 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
9513
9514 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
9515 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
9516 Problem reported by John P. Hartmann.
9517 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
9518 already defined it.
9519
9520 2005-10-12 Akim Demaille <akim@epita.fr>
9521
9522 * src/parse-gram.y (version_check): Exit 63 to please missing
9523 (stands for "version mismatch).
9524 * tests/input.at, doc/bison.texinfo: Adjust.
9525
9526 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
9527
9528 Work around portability problems with Visual Age C compiler
9529 (xlc and xlC_r) reported by John P. Hartmann.
9530 * data/location.cc (initial_column, initial_line): Remove.
9531 All uses replaced by 0 and 1.
9532 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
9533 that xlc complains about.
9534 * src/scan-skel.l (skel_wrap): Likewise.
9535 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
9536 as __STDC__.
9537 * data/yacc.c (YYMODERN_C): New macro, which also looks at
9538 __STDC_VERSION__. Use it everywhere instead of looking at
9539 __STDC__ and __cplusplus.
9540
9541 2005-10-10 Akim Demaille <akim@epita.fr>
9542
9543 * examples/calc++/test: Be quiet unless VERBOSE.
9544
9545 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
9546
9547 * data/c.m4 (yydestruct, yysymprint):
9548 Use YYUSE instead of casting to void.
9549 * data/glr.c (YYUSE): New macro.
9550 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9551 Use it instead of rolling our own.
9552 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
9553 (YYCHK1):
9554 Use /*CONSTCOND*/ to suppress lint warnings.
9555 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
9556 (YY_STACK_PRINT): Use 'false' not '0'.
9557 (YYUSE): New macro.
9558 (yysymprint_, yydestruct_): Use it instead of rolling our own.
9559 * data/yacc.c (YYUSE): New macro.
9560 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
9561 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
9562 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
9563
9564
9565 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
9566 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
9567
9568 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
9569
9570 Undo the parts of the unlocked-I/O change that substituted
9571 putc or puts for printf. This might hurt performance a bit,
9572 but some people prefer the printf style.
9573 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
9574 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
9575 All uses replaced by YYFPRINTF and YYDPRINTF.
9576 * data/yacc.c: Likewise.
9577 * lib/bitset.c (bitset_print): Likewise.
9578 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
9579 putc and puts.
9580 * lib/lbitset.c (debug_lbitset): Likewise.
9581 * src/closure.c (print_firsts, print_fderives): Likewise.
9582 * src/gram.c (grammar_dump): Likewise.
9583 * src/lalr.c (look_ahead_tokens_print): Likewise.
9584 * src/output.c (escaped_output): Likewise.
9585 (user_actions_output): Break apart two printfs.
9586 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
9587 * src/reduce.c (reduce_print): Likewise.
9588 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
9589 * src/system.h: Include unlocked-io.h rathe than stdio.h.
9590
9591 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9592 Use assignments rather than casts-to-void to suppress
9593 unused-variable warnings. This pacifies 'lint'.
9594 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
9595 unused-variable warnings.
9596
9597 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9598
9599 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
9600
9601 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
9602
9603 Use unlocked I/O for a minor performance improvement on hosts like
9604 GNU/Linux and Solaris that support unlocked I/O. The basic idea
9605 is to use the gnlib unlocked-io module, and to prefer putc and
9606 puts to printf when either will work (since the latter doesn't
9607 come in an unlocked flavor).
9608 * bootstrap (gnulib_modules): Add unlocked-io.
9609 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
9610 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
9611 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
9612 and similarly for puts and putc and printf.
9613 * data/yacc.c: Likewise.
9614 * lib/bitset.c (bitset_print): Likewise.
9615 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
9616 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
9617 to printf.
9618 * lib/lbitset.c (debug_lbitset): Likewise.
9619 * src/closure.c (print_firsts, print_fderives): Likewise.
9620 * src/gram.c (grammar_dump): Likewise.
9621 * src/lalr.c (look_ahead_tokens_print): Likewise.
9622 * src/output.c (escaped_output): Likewise.
9623 (user_actions_output): Coalesce two printfs.
9624 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
9625 * src/reduce.c (reduce_print): Likewise.
9626 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
9627 * src/system.h: Include unlocked-io.h rather than stdio.h.
9628
9629 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
9630 this confuses xgettext.
9631
9632 2005-10-02 Akim Demaille <akim@epita.fr>
9633
9634 * bootstrap (gnulib_modules): Add strverscmp.
9635 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
9636 * m4/.cvsignore: Add strverscmp.m4.
9637 * src/parse-gram.y (%require): New token, new rule.
9638 (version_check): New.
9639 * src/scan-gram.l (%require): Adjust.
9640 * tests/input.at (AT_REQUIRE): New.
9641 Use it.
9642 * doc/bison.texinfo (Require Decl): New.
9643 (Calc++ Parser): Use %require.
9644
9645 2005-10-02 Akim Demaille <akim@epita.fr>
9646
9647 * data/location.cc: New.
9648
9649 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
9650 Akim Demaille <akim@epita.fr>
9651
9652 Make sure -odir/foo.cc creates dir/location.hh etc.
9653 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
9654 (spec_file_prefix, spec_verbose_file, spec_graph_file)
9655 (spec_defines_file): Now const.
9656 (dir_prefix): New.
9657 (short_base_name): Remove.
9658 * src/files.c: Adjust.
9659 (dirname.h): Include.
9660 (base_name): Don't prototype it.
9661 (finput): Remove, duplicates gram_in.
9662 (full_base_name, short_base_name): Replace by...
9663 (all_but_ext, all_but_tab_ext): these.
9664 (compute_base_names): Rename as...
9665 (compute_file_name_parts): this.
9666 Update to compute the new variables, including dir_prefix.
9667 Adjust dependencies.
9668 * src/output.c (prepare): Output them.
9669 * src/reader.c: Adjust to use gram_in, not finput.
9670 * src/scan-skel.l (@dir_prefix@): New.
9671
9672 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9673
9674 * lib/subpipe.c: New function end_of_output_subpipe() added
9675 to allow support for non-posix systems. This is a no-op function
9676 for posix systems.
9677
9678 * lib/subpipe.h: New function end_of_output_subpipe() added
9679 to allow support for non-posix systems. This is a no-op function
9680 for posix systems.
9681
9682 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
9683 handle the lack of pipe/fork functionality on non-posix systems.
9684
9685 * djgpp/Makefile.maint: DJGPP specific file.
9686
9687 * djgpp/README.in: DJGPP specific file.
9688
9689 * djgpp/config.bat: DJGPP specific configuration file.
9690
9691 * djgpp/config.sed: DJGPP specific configuration file.
9692
9693 * djgpp/config.site: DJGPP specific configuration file.
9694
9695 * djgpp/config_h.sed: DJGPP specific configuration file.
9696
9697 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
9698
9699 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
9700
9701 2005-10-02 Akim Demaille <akim@epita.fr>
9702
9703 * data/location.cc: New, extract from...
9704 * data/lalr1.cc: here.
9705 (location.hh): Include it after the user prologue, in case the
9706 filename type is defined by the user.
9707 Forward declation location and position before the pre-prologue.
9708 (yyresult_): Rename as...
9709 (yyresult): this, it's a local variable, not an attribute.
9710 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
9711
9712 2005-10-01 Akim Demaille <akim@epita.fr>
9713
9714 * examples/extexi: Restore the #line generation.
9715
9716 2005-09-30 Akim Demaille <akim@epita.fr>,
9717 Alexandre Duret-Lutz <adl@gnu.org>
9718
9719 Move the token type and YYSTYPE in the parser class.
9720 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
9721 (parser::token): New, from the moved free definition of tokens.
9722 (parser::semantic_value): Now a full definition instead of an
9723 indirection to YYSTYPE.
9724 (b4_post_prologue): No longer included in the header file, but
9725 in the implementation file.
9726 * doc/bison.texi (C+ Language Interface): Update.
9727 * src/parse-gram.y: Support unary %define.
9728 * tests/actions.at: Define global_tokens_and_yystype for backward
9729 compatibility until we update the tests.
9730 * tests/calc.at: Idem.
9731 (first_line, first_column, last_line, last_column): Define for lalr1.cc
9732 to simplify the code.
9733
9734 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
9735
9736 Port to SunOS 4.1.4, which lacks strtoul and strerror.
9737 Ah, the good old days! Problem reported by Peter Klein.
9738 * bootstrap (gnulib_modules): Add strerror, strtoul.
9739 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
9740 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
9741
9742 2005-09-29 Akim Demaille <akim@epita.fr>
9743
9744 * data/c.m4 (b4_error_verbose_if): New.
9745 * data/lalr1.cc: Use it.
9746 (YYERROR_VERBOSE_IF): Remove.
9747 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
9748 parser members, replaced by...
9749 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
9750 local variables.
9751 (yysyntax_error_): Takes the state number as argument.
9752 (yyreduce_print_): Use the argument yyrule, not the former
9753 attribute yyn_.
9754
9755 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
9756
9757 * bootstrap (gnulib_modules): Add verify.
9758 * lib/.cvsignore: Add verify.h.
9759 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
9760 * src/system.h (verify): Remove.
9761 Include verify.h instead.
9762 * src/tables.c (tables_generate): Use new API for 'verify'.
9763
9764 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
9765
9766 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
9767 local variables whose names begin with 'yy'.
9768 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
9769 Trivial changes from Joel E. Denny.
9770
9771 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
9772 it itself.
9773 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
9774 don't use alloca any more.
9775
9776 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
9777 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
9778 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
9779 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
9780 to match yacc.c, to test more hosts.
9781
9782 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
9783
9784 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
9785 doesn't affect behavior.
9786 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
9787 Solaris, AIX, MSC.
9788 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
9789 This works a bit better with glibc, if user code has already included
9790 stdlib.h.
9791 * doc/bison.texinfo (Bison Parser): Document that users can't
9792 arbitrarily use malloc and free for other purposes. Document
9793 that <alloca.h> and <malloc.h> might be included.
9794 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
9795 user must declare alloca.
9796
9797 * HACKING (release): Forwarn the Translation Project about
9798 stable releses.
9799
9800 2005-09-20 Akim Demaille <akim@epita.fr>
9801
9802 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
9803
9804 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
9805
9806 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
9807 (YYSTACK_ALLOC_MAXIMUM): Use it.
9808 (yysyntax_error): New function.
9809 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
9810 multiple syntax errors are reported, and alloca is being used.
9811 Instead, reallocate buffers twice as big each time, so that
9812 we waste at most half the allocated memory. Start with a small
9813 (128-byte) buffer that will suffice in most cases anyway.
9814 Use yysyntax_error to do most of the work.
9815
9816 * doc/bison.texinfo (Error Reporting, Table of Symbols):
9817 yynerrs is the number of errors reported, not the number of
9818 errors encountered.
9819
9820 * tests/glr-regression.at (Duplicated user destructor for lookahead):
9821 Mark it as expected to fail.
9822 Cast result of malloc; problem reported by twlevo@xs4all.nl.
9823 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
9824 Don't start user-code symbols with "yy", to avoid name space problems.
9825
9826 2005-09-19 Akim Demaille <akim@epita.fr>
9827
9828 Remove the traits, failed experiment.
9829 It never proved useful, and anyway because of the current
9830 definition, it was not possible to have several specialization of
9831 this traits, making it useless.
9832 * data/lalr1.cc (yy:traits): Remove.
9833 Inline its definitions in the parser class.
9834
9835 2005-09-19 Akim Demaille <akim@epita.fr>
9836
9837 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
9838 least Mac OSX with a /usr/local install of gettext.
9839
9840 2005-09-19 Akim Demaille <akim@epita.fr>
9841
9842 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
9843 and yytoken for similarity with the other skeletons.
9844
9845 2005-09-19 Akim Demaille <akim@epita.fr>
9846
9847 * NEWS, configure.ac: update version number to 2.1a.
9848
9849 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
9850
9851 * NEWS: Version 2.1.
9852
9853 * NEWS: Remove notice of yytname change, since it was never in an
9854 official release.
9855 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
9856 diagnostic.
9857 * src/output.c (prepare): Likewise.
9858 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
9859 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
9860 is not defined. This is an awful hack, but it's enough for now.
9861 All callers changed.
9862 * tests/glr-regression-at (make_value): Args are const pointers now,
9863 to avoid GCC warning.
9864 (Duplicated user destructor for lookahead): New test. Currently
9865 skipped. It fails on my host but I'm not sure it'll always fail.
9866
9867 2005-09-16 Akim Demaille <akim@epita.fr>
9868
9869 * src/symtab.h (struct symbol): Declare the printer and destructor
9870 as const, to avoid accidental calls to free.
9871 (symbol_destructor_set, symbol_printer_set): Adjust.
9872 * src/symtab.c: Adjust.
9873
9874 2005-09-16 Akim Demaille <akim@epita.fr>
9875
9876 * data/c.m4 (b4_token_enums): New.
9877 (b4_token_defines): Rename as...
9878 (b4_token_enums_defines): this.
9879 (b4_token_defines): New, output only the #defines.
9880 * data/yacc.c, data/glr.c: Adjust.
9881 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
9882 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
9883 as default values.
9884
9885 2005-09-16 Akim Demaille <akim@epita.fr>
9886
9887 * data/lalr1.cc (yylex_): Remove, inline its code.
9888 (yyreport_syntax_error_): Remove, replaced by...
9889 (yysyntax_error_): this which returns a string and leaves to the
9890 caller the call to the users' error function.
9891 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
9892 Move from members of the parser object...
9893 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
9894 to local variables of the parse function.
9895
9896 2005-09-16 Akim Demaille <akim@epita.fr>
9897
9898 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
9899 since it's in Bison's name space.
9900
9901 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
9902
9903 * data/glr.c (yyresolveValue): Add default case to pacify
9904 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
9905
9906 * NEWS: Document when yyparse started to return 2.
9907 * doc/bison.texinfo (Parser Function): Document when yyparse
9908 returns 2.
9909
9910 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
9911 (b4_filename_type): Renamed back from b4_file_name_type. All uses
9912 changed.
9913 (class position): file_name -> filename (reverting). All uses changed.
9914
9915 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
9916
9917 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
9918 do anything if $@ exists. This reverts part of the 2005-07-07
9919 patch.
9920
9921 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
9922
9923 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
9924 contains obsolete information and isn't worth distributing as a
9925 separate file anyway.
9926 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
9927 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
9928 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
9929 (yyparse): Abort if user code uses longjmp to throw an unexpected
9930 value.
9931
9932 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
9933
9934 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
9935 Suggested by twlevo@xs4all.nl.
9936
9937 * data/glr.c (YYCHK1): Do not assume YYE is in range.
9938 This avoids a diagnostic from gcc -Wswitch-enum.
9939 Problem reported by twlevo@xs4all.nl.
9940
9941 * doc/bison.texinfo: Don't use "filename", as per GNU coding
9942 standards. Use "file name" or "file" or "name", depending on
9943 the context.
9944 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
9945 not to hack/foo.tab.c.
9946 (Calc++ Top Level): 2nd arg of main is not const.
9947 * data/glr.c: b4_filename -> b4_file_name.
9948 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
9949 All uses changed.
9950 (class position): filename -> file_name. All uses changed.
9951 * data/yacc.c: b4_filename -> b4_file_name.
9952 * lib/bitset.h: filename -> file_name in local vars.
9953 * lib/bitset_stats.c: Likewise.
9954 * src/files.c: Likewise.
9955 * src/scan-skel.l ("@output ".*\n): Likewise.
9956 * src/files.c (file_name_split): Renamed from filename_split.
9957 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
9958
9959 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
9960
9961 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
9962 to accommodate latest gnulib.
9963
9964 * tests/glr-regression.at (Duplicate representation of merged trees):
9965 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
9966
9967 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
9968 needed.
9969
9970 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
9971
9972 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
9973 All uses changed. Invoke user destructor after an error during a
9974 split parse (trivial change from Joel E. Denny).
9975
9976 * tests/glr-regression.at
9977 (User destructor after an error during a split parse): New test case.
9978 Problem reported by Joel E. Denny in:
9979 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
9980
9981 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
9982
9983 * README-cvs: Give URLs for recommended tools.
9984 Mention Gzip version problem, and bootstrapping issues.
9985 Remove troubleshooting section, as it's somewhat obsolete.
9986
9987 * bootstrap (no_cache): New var, to accommodate different wget
9988 variants. Use it instead of '-C off'. Problem reported by
9989 twlevo@xs4all.nl.
9990
9991 * data/glr.c (yydestroyStackItem): New function.
9992 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
9993 debugging information. Problem reported by Joel E. Denny.
9994
9995 2005-08-25 Akim Demaille <akim@epita.fr>
9996
9997 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
9998
9999 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
10000
10001 * data/glr.c (yyrecoverSyntaxError, yyreturn):
10002 Don't invoke destructor on unresolved entries.
10003 * tests/glr-regression.at
10004 (User destructor for unresolved GLR semantic value): New test case.
10005 Problem reported by Joel E. Denny in:
10006 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
10007
10008 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
10009
10010 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
10011 Add strnlen.c.
10012 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
10013 lib-prefix.m4, po.m4.
10014
10015 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
10016 in yydestruct diagnostic, since it might not be an error.
10017 Problem reported by Joel Denny near end of
10018 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
10019 * data/lalr1.cc (yyerturn): Likewise.
10020 * data/yacc.c (yyreturn): Likewise.
10021 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
10022
10023 * src/files.c: Remove obsolete FIXME comment.
10024
10025 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
10026 with the other templates, and to fix bogus run-on messages such
10027 as the one reported at the end of
10028 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
10029 All callers changed to avoid the newline.
10030 (yyprocessOneStack): Output two lines rather than one, to accommodate
10031 the above change. This changes the debug output format slightly.
10032
10033 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
10034 reported by Joel E. Denny in
10035 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
10036 (trivial change).
10037 * tests/glr-regression.at (Duplicate representation of merged trees):
10038 New test, from Joel E. Denny in:
10039 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
10040 * THANKS: Add Joel E. Denny.
10041
10042 * configure.ac (AC_INIT): Bump to 2.0c.
10043
10044 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
10045
10046 * NEWS: Version 2.0b.
10047
10048 * Makefile.am (SUBDIRS): Put examples before tests, so that
10049 "make check" doesn't finish with "All 1 tests passed".
10050
10051 * tests/regression.at (Token definitions): Don't rely on
10052 AT_PARSER_CHECK for data that contains backslashes. It currently
10053 uses 'echo', and 'echo' isn't portable if its argument contains
10054 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
10055 that the byte '\0xff' is not printable in the C locale; it is,
10056 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
10057 not printable, so use '\0x81' to test.
10058
10059 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
10060 version of GCC, since the macro is used with non-GCC compilers.
10061
10062 Fix core dump reported by Pablo De Napoli in
10063 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
10064 * tests/regression.at (Invalid inputs with {}): New test.
10065 * src/parse-gram.y (token_name): Translate type before using
10066 it as an index.
10067
10068 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
10069 the user's name space. All uses changed to __attribute__
10070 ((__unused__)).
10071 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
10072 Add __attribute__ ((__noreturn__)).
10073
10074 * etc/clcommit: Remove. We weren't using it, and it failed
10075 "make maintainer-distcheck".
10076 * Makefile.maint: Merge from coreutils.
10077 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
10078 (syntax-check-rules): Change list of rules as described below.
10079 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
10080 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
10081 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
10082 (sc_trailing_space): New rules.
10083 (sc_xalloc_h_in_src): Remove.
10084 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
10085 (sc_space_tab, sc_error_exit_success, sc_changelog):
10086 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
10087 (makefile-check, po-check, author_mark_check):
10088 (makefile_path_separator_check, copyright-check):
10089 Use grep -n, to make it easier to find violations.
10090 Use CVS_LIST and CVS_LIST_EXCEPT.
10091 (header_regexp, h_re): Remove.
10092 (dd_c): New macro.
10093 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
10094 (my-distcheck): Use more-modern GCC flags.
10095 (signatures, %.asc): Remove.
10096 (rel-files, announcement): Remove signatures.
10097 Restore old updating code, even though we don't use it, so
10098 that we're the same as coreutils.
10099 (alpha, beta, major): Depend on news-date-check.
10100 Make the upload commands.
10101
10102 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
10103 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
10104 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
10105 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
10106 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
10107 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
10108 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
10109 * tests/sets.at: Likewise.
10110
10111 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
10112 we comment out the Autoconf version number.
10113 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
10114 it's error-prone and "make maintainer-distcheck" rejects it.
10115
10116 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
10117 Indent calls to "error" to pacify "make maintainer-distcheck",
10118 when the calls are not intended to be translated.
10119 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
10120
10121 * src/Makefile.am (DEFS): Use +=, to pacify
10122 "make maintainer-distcheck".
10123 (bison_SOURCES): Add scan-skel.h.
10124 (sc_tight_scope): New rule, from coreutils.
10125
10126 * src/files.c (src_extension, header_extension):
10127 Now static, not extern.
10128 * src/getargs.c (short_options): Likewise.
10129 * src/muscle_tab.c (muscle_table): Likewise.
10130 * src/parse-gram.y (current_class, current_type, current_prec):
10131 Likewise.
10132 * src/reader.c (grammar_end, previous_rule_end): Likewise.
10133 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
10134 * src/main.c (main): Cast bindtextdomain and textdomain calls to
10135 void, to avoid warning when NLS is disabled.
10136 * src/output.c: Include scan-skel.h.
10137 (scan_skel): Remove decl, since scan-skel.h does this.
10138 (output_skeleton):
10139 Indent calls to "error" to pacify "make maintainer-distcheck".
10140 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
10141 * src/reader.h (gram_end, gram_lineno): New decls to pacify
10142 "make maintainer-distcheck".
10143 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
10144 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
10145 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
10146 (skel_lex_destroy, scan_skel): Move these decls to...
10147 * src/scan-skel.h: New file.
10148 * src/uniqstr.c (uniqstr_assert):
10149 Indent calls to "error" to pacify "make maintainer-distcheck".
10150
10151 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
10152 not @VAR@.
10153
10154 * tests/torture.at: Revamp to avoid misuse of atoi that
10155 "make maintainer-distcheck" complained about.
10156
10157 * examples/extexi (message): Don't print a message more than once,
10158 and omit line-number decoration that makes Emacs compile think
10159 that informative messages are worth worrying about.
10160
10161 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
10162
10163 * configure.ac: Update version number.
10164
10165 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
10166 accidentally.
10167 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
10168 autogenerated by the maintainer.
10169 * examples/calc++/.cvsignore: Add *.yy.
10170
10171 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
10172 * lib/bitset_stats.c (bitset_stats_init): Likewise.
10173 * lib/bitsetv.c (bitsetv_alloc): Likewise.
10174
10175 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
10176
10177 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
10178 from maintainer-distcheck about casting the argument of 'free'.
10179
10180 * NEWS: Mention recent yytname changes.
10181 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
10182
10183 * bootstrap: For translations that have not yet been upgraded to
10184 the new runtime-po domain, prime the pump by extracting the
10185 relevant strings from the obsolete translations. This code can be
10186 removed once the bison-runtime domain has been translated by each
10187 team.
10188
10189 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
10190 now that token names are already quoted.
10191
10192 Fix problem reported by Anthony Heading.
10193 * data/glr.c (YYTOKEN_TABLE): New macro.
10194 (yytname): Define if YYTOKEN_TABLE.
10195 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
10196 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
10197 (YYERROR_VERBOSE): Define the same way the other skeletons do.
10198 * src/output.c (prepare_symbols): Output token_table_flag.
10199
10200 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
10201
10202 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
10203 again if the first call fails.
10204
10205 * data/glr.c (yytnamerr): New function.
10206 (yyreportSyntaxError): Use it to dequote most string literals.
10207 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
10208 with other skeletons. All uses changed.
10209 (yytnameerr_): New function.
10210 (yyreport_syntax_error): Use it to dequote most string literals.
10211 * data/yacc.c (yytnamerr): New function.
10212 (yyerrlab): Use it to decode most string literals.
10213 * doc/bison.texinfo (Decl Summary, Calling Convention):
10214 Clarify quoting convention of yytname.
10215 * src/output.c (prepare_symbols): Quote all names. This undoes
10216 the 2005-04-17 change, which is now accomplished (mostly) via
10217 changes in the parsers as described above.
10218 * tests/regression.at (Token definitions, Web2c Actions):
10219 Undo most 2005-04-17 change here, too.
10220
10221 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
10222
10223 Fix more problems reported by twlevo@xs4all.nl.
10224 * tests/cxx-type.at: Don't pipe output of ./types through sed to
10225 remove trailing spaces. This loses the exit status of ./types,
10226 and isn't needed since ./types shouldn't be emitting trailing
10227 spaces.
10228 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
10229 as the stack isn't valid in that case.
10230
10231 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
10232 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
10233 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
10234 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
10235 is used.
10236 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
10237 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
10238 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
10239 Likewise.
10240
10241 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
10242 overly-picky compilers that reject 'char *foo = "bar";'.
10243
10244 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
10245 to FILE * parameter, not to stderr. This fixes a typo introduced
10246 in the 2005-07-12 change.
10247
10248 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
10249 warnings from GCC 4.
10250
10251 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
10252 (yyglrShiftDefer, yysplitStack):
10253 Remove unused parameters b4_pure_formals. All uses changed.
10254 (yyglrShift): Remove unused parameters b4_user_formals.
10255 All uses changed.
10256 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
10257
10258 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
10259
10260 Destructor cleanups and regularization among the three skeletons.
10261 * NEWS: Document the behavior changes.
10262 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
10263 stack before failing, as the cleanup code will do it for us now.
10264 * data/lalr1.cc (yyerrlab): Likewise.
10265 * data/glr.c (yyparse): Pop everything off the stack before
10266 freeing it, so that destructors get called properly.
10267 * data/lalr1.cc (yyreturn): Likewise.
10268 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
10269 This is more consistent.
10270 * doc/bison.texinfo (Destructor Decl): Mention more reasons
10271 why destructors might be called. 1.875 -> 2.1.
10272 (Destructor Decl, Decl Summary, Table of Symbols):
10273 Some English-language cleanups for %destructor.
10274 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
10275 Add output line for destructor of start symbol.
10276 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
10277 because of that same extra output line.
10278
10279 * NEWS: Document minor wording changes in diagnostics of
10280 Bison-generated parsers.
10281 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
10282 Remove unused formals. All uses changed.
10283 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
10284 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
10285 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
10286 Rename yyoverflowab to yyexhaustedlab.
10287 When memory exhaustion occurs during syntax-error reporting,
10288 report it separately rather than in a single diagnostic; this
10289 eases translation.
10290 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
10291 (Memory Exhausted): Renamed from Parser Stack Overflow.
10292 Revamp wording slightly to prefer "memory exhaustion".
10293 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
10294
10295 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
10296
10297 Add i18n support to the GLR skeleton. Partially fix the C++
10298 skeleton; a C++ expert needs to finish this. Remove debugging
10299 msgids; there's little point to having them translated, since they
10300 can be understood only by someone who can read the
10301 (English-language) source code.
10302
10303 Generate runtime-po/bison-runtime.pot automatically, so that we
10304 don't have to worry about garbage getting in that file. We'll
10305 make sure after the next official release that old msgids don't
10306 get lost. See
10307 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
10308
10309 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
10310 Now auto-generated.
10311 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
10312 Fix typos in explanations of the runtime file.
10313 * bootstrap: Change gettext keyword from YYI18N to YY_.
10314 Use standard Makefile.in.in in runtime-po, since we'll arrange
10315 for backward-compatible bison-runtime.po files in a different way.
10316 * data/glr.c (YY_): New macro, from yacc.c.
10317 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
10318 Translate messages intended for users.
10319 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
10320 the wording in the other skeletons. We don't know that the memory
10321 is virtual.
10322 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
10323 Use same method that yacc.c uses.
10324 Don't translate debugging messages.
10325 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
10326 it doesn't work (yet), and requires C++ expertise to fix.
10327 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
10328 Move defn to a more logical place, to be consistent with other
10329 skeletons.
10330 Don't translate debugging messages.
10331 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
10332 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
10333 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
10334 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
10335
10336 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
10337 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
10338 void, not int.
10339 * tests/glr-regression.at (Badly Collapsed GLR States):
10340 Likewise.
10341 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10342 yylex should return 0 at EOF rather than aborting.
10343
10344 Improve tests for stack overflow in GLR parser.
10345 Problem reported by twlevo@xs4all.nl.
10346 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
10347 All uses removed.
10348 (yyStackOverflow): Just longjmp, but with value 2 so that caller
10349 can handle the problem.
10350 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
10351 (yyparse): New local variable yyresult to record the result.
10352 Use result of setjmp to set it, rather than storing itinto
10353 struct.
10354 (yyDone): Remove label.
10355 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
10356 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
10357 if YYABORT is used).
10358 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
10359 yyparse status; put status > 1 into diagnostic.
10360 Check that status==2 works.
10361 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
10362 Use exit status 3 for failure to open (which shouldn't happen).
10363
10364 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
10365
10366 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
10367 1 on syntax error; just let yyparse do its thing.
10368 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
10369 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
10370 (Exploding the Stack Size with Alloca):
10371 (Exploding the Stack Size with Malloc):
10372 Expect exit status 2, not 1, since the parser is supposed to blow
10373 its stack. Problem reported by twlevo@xs4all.nl.
10374
10375 * data/glr.c (yyparse): Don't assume that the initial calls
10376 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
10377 Print a stack-overflow message and fail instead.
10378 Initialize the line-number information before creating the stack,
10379 so that the stack-overflow message can report line zero safely.
10380
10381 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
10382
10383 Fix problems reported by twlevo@xs4all.nl.
10384 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
10385 (yyuserMerge): Provide a default case if b4_mergers is empty.
10386 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
10387 * tests/glr-regression.at
10388 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10389 Add casts to pacify C++ compilers.
10390 * tests/glr-regression.at (Improper merging of GLR delayed action
10391 sets): Declare yylex before using it.
10392 * tests/Makefile.am (maintainer-check-g++): Fix a stray
10393 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
10394 test for valgrind; valgrind is independent of g++.
10395 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
10396 for compatibility with POSIX 1003.1-2001 (if running coreutils).
10397 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
10398 Use a destructor, so that we can expand the stack. Change
10399 YYSTYPE to char * so that we can free it. Cast result of malloc.
10400
10401 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10402
10403 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
10404 a valgrind failure. Problem reported by twlevo@xs4all.nl.
10405
10406 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
10407
10408 * PACKAGING: New file, suggested by Bruno Haible and taken from
10409 similar wording in gettext's PACKAGING file.
10410 * NEWS: Mention PACKAGING.
10411 * Makefile.am (EXTRA_DIST): Add PACKAGING.
10412
10413 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
10414
10415 * NEWS: Document recent i18n improvements.
10416 * bootstrap: Get runtime translations into runtime-po.
10417 Create runtime-po files automatically, if possible.
10418 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
10419 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
10420 does not infringe on the user's name space.
10421 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
10422 * doc/bison.texinfo (Internationalization): Revamp the English
10423 and Texinfo syntax a bit, to try to make it clearer.
10424 (Bison Options, Option Cross Key): Mention --print-localedir.
10425 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
10426 YYENABLE_NLS. Quote a bit more.
10427 * runtime-po/.cvsignore: New file.
10428 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
10429 * runtime-po/Rules-quot: Remove; now created by bootstrap.
10430 * runtime-po/quot.sed: Likewise.
10431 * runtime-po/boldquot.sed: Likewise.
10432 * runtime-po/en@quot.header: Likewise.
10433 * runtime-po/en@boldquot.header: Likewise.
10434 * runtime-po/insert-header.sin: Likewise.
10435 * runtime-po/remove-potcdate.sin: Likewise.
10436 * runtime-po/Makevars: Likewise.
10437 * runtime-po/LINGUAS: Likewise.
10438 * runtime-po/de.po: Likewise; we will rely on the translation project
10439 to maintain this, so "bootstrap" should get it.
10440 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
10441 its value.
10442 * src/main.c (main): Bind the bison-runtime domain, too.
10443
10444 2005-07-12 Bruno Haible <bruno@clisp.org>
10445
10446 * data/yacc.c: Include <libintl.h> when NLS is enabled.
10447 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
10448 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
10449 * runtime-po: New directory.
10450 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
10451 $(DOMAIN).pot-update rule, so that old messages are never dropped.
10452 * runtime-po/Rules-quot: New file, copied from po/.
10453 * runtime-po/quot.sed: Likewise.
10454 * runtime-po/boldquot.sed: Likewise.
10455 * runtime-po/en@quot.header: Likewise.
10456 * runtime-po/en@boldquot.header: Likewise.
10457 * runtime-po/insert-header.sin: Likewise.
10458 * runtime-po/remove-potcdate.sin: Likewise.
10459 * runtime-po/Makevars: New file.
10460 * runtime-po/POTFILES.in: New file.
10461 * runtime-po/LINGUAS: New file.
10462 * runtime-po/bison-runtime.pot: New file.
10463 * runtime-po/de.po: New file.
10464 * m4/bison.m4: New file.
10465 * Makefile.am (SUBDIRS): Add runtime-po.
10466 (aclocaldir, aclocal_DATA): New variables.
10467 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
10468 Define aclocaldir.
10469 * src/getargs.c (usage): Document --print-localedir option.
10470 (PRINT_LOCALEDIR_OPTION): New enum item.
10471 (long_options): Add --print-localedir option.
10472 (getargs): Handle --print-localedir option.
10473 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
10474 (Internationalization): New section.
10475
10476 2005-07-12 Akim Demaille <akim@epita.fr>
10477
10478 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
10479 for consistency with the rest of the code.
10480 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
10481 Add separators.
10482
10483 2005-07-12 Akim Demaille <akim@epita.fr>
10484
10485 * src/parse-gram.y: Use %printer instead of YYPRINT.
10486
10487 2005-07-12 Akim Demaille <akim@epita.fr>
10488
10489 * src/symtab.h, src/symtab.c (symbol_print): New.
10490 * src/symlist.h, src/symlist.c (symbol_list_print): New.
10491 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
10492
10493 2005-07-12 Akim Demaille <akim@epita.fr>
10494
10495 * data/glr.c (b4_syncline): Fix (swap) the definitions of
10496 b4_at_dollar and b4_dollar_dollar.
10497
10498 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
10499
10500 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
10501 and Pennello's paper.
10502
10503 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
10504
10505 * data/yacc.c (yyparse): Undo previous patch. Instead,
10506 set yylsp[0] and yyvsp[0] only if the initial action
10507 sets yylloc and yylval, respectively.
10508
10509 * data/yacc.c (yyparse): In the initial action, set
10510 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
10511 This avoids the use of undefined variables if the initial
10512 action does not set yylloc and/or yylval.
10513
10514 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
10515
10516 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
10517 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
10518 Remove from CVS. These files are automatically generated.
10519 * examples/extexi: Clarify that this file is now part of Bison,
10520 not GNU M4, and that it works with any POSIX-compatible Awk.
10521 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
10522 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
10523 so that we also get calc++-parser.yy. Geneate it.
10524 Use $(AWK), not gawk, since any conforming Awk will do.
10525 Put comment before action, since older 'make' can't handle comment
10526 in action.
10527 $(BUILT_SOURCES): List all built sources, not just some of them.
10528 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
10529 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
10530 $($(calc_sources_generated)): Remove unnecessary test for existence
10531 of target. (This had a shell syntax error anyway; a stray "x".)
10532 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
10533 calc++-parser.yy.
10534 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
10535
10536 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
10537 implied by the other modules.
10538
10539 2005-07-06 Akim Demaille <akim@epita.fr>
10540
10541 Bind examples/calc++ to the package.
10542 * examples/calc++/Makefile: Remove, replaced by...
10543 * examples/calc++/Makefile.am: ... this new file.
10544 * examples/calc++/test: Remove input.
10545 * examples/calc++/compile: Remove.
10546 * examples/Makefile.am: New.
10547 * configure.ac, Makefile.am: Adjust.
10548 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
10549
10550 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
10551
10552 * data/glr.c (yyFail): Drastically simplify; since the format argument
10553 never had any % directives, we can simply pass it to yyerror.
10554 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
10555 be modified later, as that is the usual style in glr.c.
10556 Problems reported by Paul Hilfinger.
10557
10558 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
10559 and size overflow errors.
10560 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
10561 in case the user prolog sets feature-test macros like _GNU_SOURCE.
10562 (YYSIZEMAX): New macro.
10563 (yystpcpy): New function, taken from yacc.c.
10564 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
10565 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
10566 so that we don't have to maintain their signatures.
10567 (yyFail): Check for buffer overflow, by using vsnprintf rather
10568 than vsprintf. Allocate a bigger buffer if possible.
10569 Report an error if buffer allocation fails.
10570 (yyStackOverflow): New function.
10571 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
10572 the initialization was successful. It might fail if storage was
10573 exhausted.
10574 (yyexpandGLRStack): Add more checks for storage allocation failure.
10575 Use yyStackOverflow to report failures.
10576 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
10577 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
10578 Don't assume stack number fits in int.
10579 (yysplitStack): Check for storage allocation failure.
10580 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
10581 can print diagnostics on storage allocation failure. All callers
10582 changed.
10583 (yyresolveValue): Use yybool for boolean.
10584 (yyreportSyntaxError): Check for size-calculation overflow.
10585 This code is taken from yacc.c.
10586 (yyparse): Check for storage allocation errors when allocating
10587 the initial stack.
10588
10589 2005-07-05 Akim Demaille <akim@epita.fr>
10590
10591 Extract calc++ from the documentation.
10592 * doc/bison.texinfo (Calc++): Add the extraction marks.
10593 * examples/extexi: New, from the aborted GNU Programming 2E.
10594 Separate the different paragraph of a file with empty lines.
10595 * examples/Makefile: Use it to extract the whole calc++ example.
10596
10597 2005-06-24 Akim Demaille <akim@epita.fr>
10598
10599 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
10600 class typedefs.
10601
10602 2005-06-22 Akim Demaille <akim@epita.fr>
10603
10604 * doc/bison.texinfo (C++ Language Interface): First stab.
10605 (C++ Parsers): Remove.
10606
10607 2005-06-22 Akim Demaille <akim@epita.fr>
10608
10609 * data/lalr1.cc (yylex_): Honor %lex-param.
10610
10611 2005-06-22 Akim Demaille <akim@epita.fr>
10612
10613 Start a set of simple examples.
10614 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
10615 * examples/calc++/calc++-driver.hh,
10616 * examples/calc++/calc++-parser.yy,
10617 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
10618 * examples/calc++/compile, examples/calc++/test: New.
10619
10620 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
10621
10622 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
10623 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
10624 which stems from the 2005-05-27 patch.
10625
10626 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10627
10628 * data/glr.c: Modify treatment of unused parameters to permit use
10629 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
10630
10631 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
10632
10633 Fix infringement on user name space reported by Janos Zoltan Szabo.
10634 * data/yacc.c (yyparse): strlen -> yystrlen.
10635
10636 2005-05-30 Akim Demaille <akim@epita.fr>
10637
10638 * data/lalr1.cc (_): New.
10639 Translate the various messages.
10640
10641 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
10642
10643 Fix infringement on user name space reported by Bruno Haible.
10644 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
10645 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
10646 the user's name space.
10647 (alloca): Include <stdlib.h> to get it, if it's not built in.
10648 (YYMALLOC, YYFREE): Define only if needed.
10649 (malloc, free): Declare, but only if needed, as this infringes on
10650 the user name space.
10651
10652 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
10653
10654 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
10655 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
10656 with %d format.
10657 * lib/ebitset.c (min, max): Undef before defining.
10658 * lib/vbitset.c (min, max): Likewise.
10659 * lib/subpipe.c (create_subpipe): Save local variables in case
10660 vfork clobbers them.
10661
10662 2005-05-24 Bruno Haible <bruno@clisp.org>
10663
10664 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
10665 error message syntax used by gcc-4.0.
10666
10667 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
10668
10669 * README: Mention m4 1.4.3. Remove obsolete advice about
10670 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
10671
10672 * bootstrap: Remove workaround for problem I encountered with
10673 gettext 0.14.1; it seems to be fixed now.
10674
10675 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
10676
10677 * NEWS: Version 2.0a.
10678
10679 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
10680 the previous change.
10681
10682 Various maintainer cleanups.
10683 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
10684 conftest*, for benefit of CVS commands run at the same time as
10685 "configure". Add build-aux, since "bootstrap" now creates it and
10686 its subfiles.
10687 * Makefile.cfg (move_if_change): Remove.
10688 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
10689 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
10690 (po_repo, do-po-update, po-update, wget_files, get-targets):
10691 (config.guess-url_prefix, config.sub-url_prefix):
10692 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
10693 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
10694 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
10695 Remove.
10696 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
10697 this is now the recommended name.
10698 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
10699 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
10700 ylwrap. These files now go into build-aux.
10701 * config/move-if-change: Remove.
10702 * config/prev-version.txt: Bump from 1.75 to 2.0.
10703
10704 * bootstrap: Add stdio-safer, unistd-safer modules.
10705 Remove m4/glibc2.m4 (introduced by latest gnulib, but
10706 we don't need it).
10707 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
10708 fopen-safer.c, stdio-safer.h, unistd-safer.h.
10709 * lib/subpipe.c: Include "unistd-safer.h".
10710 (create_subpipe): Make sure all the newly-created
10711 file descriptors are > 2, so that diagnostics don't
10712 get sent down them (which might cause Bison to hang, in theory).
10713 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
10714 * src/files.c (xfopen): Use fopen_safer, not fopen.
10715
10716 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
10717 yesterday's yacc.c fix.
10718
10719 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
10720
10721 * data/glr.c, data/lalr1.cc: Update copyright date.
10722
10723 Fix a destructor bug reported by Wolfgang Spraul in
10724 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
10725 * data/yacc.c (yyabortlab): Don't call destructor, and
10726 don't set yychar to EMPTY.
10727 (yyoverflowlab): Don't call destructor.
10728 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
10729 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
10730 since we no longer output the message "discarding lookahead token
10731 end of input ()".
10732
10733 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10734
10735 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
10736 fix a small glitch in debugging output.
10737 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
10738 after YY_SYMBOL_PRINT where needed.
10739
10740 (struct yyGLRState): Add some comments.
10741 (struct yySemanticOption): Add some comments.
10742 (union yyGLRStackItem): Add comment.
10743
10744 (yymergeOptionSets): Correct this to properly perform the union,
10745 avoiding infinite reported by Michael Rosien.
10746 Update comment.
10747
10748 * tests/glr-regression.at: Add test for GLR merging error reported
10749 by M. Rosien.
10750
10751 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
10752
10753 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
10754 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
10755 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
10756 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
10757 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
10758 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
10759 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
10760 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
10761 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
10762 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
10763 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
10764 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
10765 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
10766 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
10767 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
10768 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
10769 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
10770 src/derives.h, src/files.c, src/files.h, src/getargs.c,
10771 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
10772 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
10773 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
10774 src/output.h, src/parse-gram.c, src/parse-gram.h,
10775 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
10776 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
10777 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
10778 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
10779 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
10780 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
10781 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
10782 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
10783 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
10784 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
10785 tests/reduce.at, tests/regression.at, tests/sets.at,
10786 tests/synclines.at, tests/testsuite.at, tests/torture.at:
10787 Update FSF postal mail address.
10788
10789 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
10790
10791 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
10792 Problem reported by Ralf Menzel.
10793
10794 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
10795
10796 * tests/actions.at: Test that stack overflow invokes destructors.
10797 From Marcus Holland-Moritz.
10798 * data/yacc.c (yyerrlab): Move the code that destroys the stack
10799 from here....
10800 (yyreturn): to here. That way, destructors are called properly
10801 even if the stack overflows, or the user calls YYACCEPT or
10802 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
10803 (yyoverflowlab): Destroy the lookahead.
10804
10805 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
10806
10807 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
10808
10809 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
10810
10811 * NEWS: Bison-generated C parsers no longer quote literal strings
10812 associated with tokens.
10813 * src/output.c (prepare_symbols): Don't escape strings,
10814 since users don't want to see C escapes.
10815 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
10816 in diagnostics.
10817 * tests/input.at (Torturing the Scanner): Likewise.
10818 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
10819
10820 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
10821
10822 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
10823 the data size is known to be too small and we can't increase it.
10824 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
10825
10826 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
10827
10828 * src/parse-gram.y: Include quotearg.h.
10829 (string_as_id): Quote $1 before using it as a key, since the
10830 lexer no longer quotes it for us.
10831 (string_content): Don't strip quotes, since lexer no longer
10832 quotes it for us.
10833 * src/scan-gram.l: Include quotearg.h.
10834 ("\""): Omit quote.
10835 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
10836 a key, since the rest of the lexer doesn't quote it.
10837 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
10838 * tests/regression.at (Token definitions): Check for backslashes
10839 in token strings.
10840
10841 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
10842 (YYSIZE_T): Define to unsigned long int when using an older compiler.
10843 (yyparse): Revamp code to generate long syntax error message, to
10844 make it easier to translate, and to avoid problems with arithmetic
10845 overflow. Change "virtual memory" to "memory" in diagnostic, since
10846 we don't know whether the memory is virtual.
10847
10848 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
10849
10850 * NEWS: Bison-generated C parsers now use the _ macro to
10851 translate strings.
10852 * data/yacc.c (_) [!defined _]: New macro.
10853 All English strings wrapped inside this macro.
10854 * doc/bison.texinfo (Bison Parser): Document _.
10855 * po/POTFILES.in: Include src/parse-gram.c, since it now
10856 includes translateable strings that parse-gram.y doesn't.
10857
10858 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
10859
10860 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
10861 reverting the 2004-10-11 change to this function.
10862 (symbol_check_alias_consistency): Don't call symbol_type_set
10863 if the type name is already correct.
10864 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
10865
10866 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
10867
10868 * tests/regression.at (Token definitions): Don't use a token named
10869 c, as that generates a "#define c ..." that runs afoul of buggy
10870 stdlib.h that uses the identifier c as a member of struct
10871 drand48_data. Problem reported by Horst Wente.
10872
10873 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
10874
10875 * bootstrap: Change translation URL from
10876 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
10877 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
10878 redirection glitches. Problem reported by twlevo@xs4all.nl.
10879
10880 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
10881
10882 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
10883 after operands; POSIX says this isn't portable for the c99 command.
10884
10885 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
10886
10887 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
10888 immediately if a data overrun has occurred; this may help us track
10889 down what may be a spurious failure on MacOS.
10890
10891 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
10892
10893 Respond to problems reported by twlevo@xs4all.nl.
10894
10895 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
10896
10897 * src/vcg.h: Comment fix.
10898 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
10899 (G_CMAX): Change to -1 instead of INT_MAX.
10900
10901 * data/yacc.c (yyparse): Omit spaces before #line.
10902
10903 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
10904
10905 * src/tables.c (state_number_to_vector_number): Put it inside an
10906 "#if 0", since it's not currently used. Problem reported by
10907 Roland McGrath.
10908
10909 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
10910
10911 * src/output.c (escaped_output): Renamed from
10912 escaped_file_name_output, since we now use it for symbol tags as
10913 well. All uses changed.
10914 (symbol_destructors_output, symbol_printers_output):
10915 Escape symbol tags too.
10916 Problem reported by Matyas Forstner in
10917 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
10918
10919 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
10920 not needed.
10921 * src/output.c (user_actions_output, token_definitions_output,
10922 symbol_destructors_output, symbol_printers_output): Likewise.
10923 * src/reader.c (prologue_augment): Likewise.
10924 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
10925
10926 * src/vcg.c (output_edge): Don't quote linestyle arg.
10927 Problem reported by twlevo@xs4all.nl.
10928
10929 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
10930
10931 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
10932 example, reported by Derek M Jones. Also, make the example even
10933 more outrageous, to better illustrate how bad the problem is.
10934
10935 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
10936
10937 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
10938 putsym. Typo reported by Sebastian Piping.
10939
10940 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
10941
10942 * doc/bison.texinfo (Language and Grammar): some -> same
10943 (Epilogue): int he -> in the
10944 Typos reported by Sebastian Piping via Justin Pence.
10945
10946 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
10947
10948 * tests/glr-regression.at (Improper handling of embedded actions
10949 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
10950 embedded actions and $-N in GLR parsers", work around an Autoconf bug
10951 with dollar signs in test names.
10952 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
10953 for a similar reason.
10954
10955 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
10956
10957 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
10958 wants to redefine G_VIEW.
10959
10960 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
10961
10962 * src/vcg.c (get_view_str): Remove case for normal_view.
10963 Problem reported by twlevo@xs4all.nl.
10964
10965 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
10966
10967 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
10968 Problem reported by twlevo@xs4all.nl.
10969
10970 * doc/bison.texinfo: Change @dircategory from "GNU programming
10971 tools" to "Software development". Requested by Richard Stallman
10972 via Karl Berry.
10973
10974 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
10975
10976 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
10977 Problem reported by twlevo@xs4all.nl.
10978
10979 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
10980
10981 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
10982 keyword; it's not needed with modern compilers, and it doesn't
10983 affect correctness with older compilers. Suggested by
10984 twlevo@xs4all.nl.
10985
10986 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
10987
10988 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
10989 gcc -Wswitch-default.
10990 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
10991 * data/yacc.c (yyparse): Likewise.
10992
10993 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
10994
10995 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
10996 already. Let config.h define any nonstandard values.
10997
10998 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
10999
11000 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
11001 for the benefit of slower hosts. Problem reported by
11002 Nelson H. F. Beebe.
11003
11004 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
11005
11006 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
11007 being defined and not used.
11008 * data/lalr1.cc (yyparse): Likewise.
11009 Use "if (false)" rather than "if (0)".
11010
11011 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
11012
11013 * TODO: Mention that we should allow NUL bytes in tokens.
11014
11015 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
11016
11017 * src/scan-skel.l (<<EOF>>): Don't close standard output.
11018 Problem reported by Hans Aberg.
11019
11020 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
11021
11022 * src/getargs.c (version): Happy new year; update overall
11023 program copyright date from 2004 to 2005.
11024
11025 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
11026 Problem reported by Hans Aberg.
11027 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
11028 (Output file names.): Add a test for the case when standard output
11029 is closed.
11030
11031 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
11032
11033 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
11034 to fix an oversight in the Bison 2.0 manual.
11035
11036 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
11037
11038 * NEWS: Version 2.0. Reformat the existing news items since
11039 1.875, so that related items are grouped together.
11040 * configure.ac (AC_INIT): Bump version to 2.0.
11041 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
11042
11043 * tests/torture.at (Exploding the Stack Size with Alloca): Set
11044 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
11045 otherwise, we're not testing alloca. Unfortunately there's no
11046 simple way to consult HAVE_ALLOCA here.
11047
11048 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
11049 for yymsg, too.
11050
11051 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
11052 hand. This avoids a warning about comparing int to size_t when
11053 GCC warnings are enabled.
11054
11055 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
11056
11057 * NEWS: Bison-generated parsers no longer default to using the
11058 alloca function (when available) to extend the parser stack, due
11059 to widespread problems in unchecked stack-overflow detection.
11060 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
11061 responsibility to set it to a positive value. This lets the user
11062 specify a value that is not a preprocessor constant.
11063 * data/yacc.c (YYMAXDEPTH): Likewise.
11064 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
11065 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
11066 to be a compile-time constant. However, explain the constraints on it.
11067 Also, explain the constraints on YYINITDEPTH.
11068 (Table of Symbols): Explain that alloca is no longer the default.
11069 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
11070 to 1.
11071
11072 * doc/bison.texinfo (Location Default Action): Mention that n must
11073 be zero when k is zero. Suggested by Frank Heckenbach.
11074
11075 2004-12-22 Akim Demaille <akim@epita.fr>
11076
11077 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
11078 (parser::state_type, parser::semantic_type, parser::location_type):
11079 Private, not public.
11080 (parser::parse): Return ints, not bool.
11081 Returning a bool introduces a problem: 0 corresponds to false, and
11082 it seems weird to return false on success. Returning true changes
11083 the conventions for yyparse.
11084 Alternatively we could return void and send an exception.
11085 There is no clear consensus (yet?).
11086 (state_stack, semantic_stack, location_stack): Rename as...
11087 (state_stack_type, semantic_stack_type, location_stack_type): these.
11088 Private, not public.
11089 * tests/c++.at: New.
11090 * tests/testsuite.at, tests/Makefile.am: Adjust.
11091
11092 2004-12-21 Akim Demaille <akim@epita.fr>
11093
11094 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
11095
11096 2004-12-21 Akim Demaille <akim@epita.fr>
11097
11098 Don't impose std::string for filenames.
11099
11100 * data/lalr1.cc (b4_filename_type): New.
11101 (position::filename): Use it.
11102 (parser.hh): Move the inclusion of stack.hh and location.hh below
11103 the user code, so that needed headers for the filename type can be
11104 included first.
11105 Forward declare them before the user code.
11106 * tests/Makefile.am (check-local, installcheck-local): Pass
11107 TESTSUITEFLAGS to the TESTSUITE.
11108
11109 2004-12-20 Akim Demaille <akim@epita.fr>
11110
11111 Use more STL like names: my_class instead of MyClass.
11112
11113 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
11114 (SemanticStack, SemanticType, StateStack, StateType)
11115 (TokenNumberType, Stack, Slice, Traits, Parser::location)
11116 (Parser::value): Rename as...
11117 (location_stack, location_type, rhs_number_type, semantic_stack)
11118 (semantic_type, state_stack, state_type, token_number_type, stack)
11119 (slice, traits, parser::yylloc, parser::yylval): these.
11120
11121 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
11122
11123 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
11124
11125 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
11126 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
11127
11128 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
11129
11130 Remove uses of 'short int' and 'unsigned short int'. This raises
11131 some arbitrary limits. It uses more memory but nowadays that's
11132 not much of an issue.
11133
11134 This change does not affect the generated parsers; that's a different
11135 task, as some users will want to conserve memory there.
11136
11137 Ideally we should use size_t to represent all object counts, and
11138 something like ptrdiff_t to represent signed differences of object
11139 counts; but that will require more code-cleanup than I have the
11140 time to do right now.
11141
11142 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
11143 Use size_t, not int or short int, to count objects.
11144 * src/closure.c (nritemset, closure): Likewise.
11145 * src/closure.h (nritemset, closure): Likewise.
11146 * src/nullable.c (nullable_compute): Likewise.
11147 * src/print.c (print_core): Likewise.
11148 * src/print_graph.c (print_core): Likewise.
11149 * src/state.c (state_compare, state_hash): Likewise.
11150 * src/state.h (struct state): Likewise.
11151 * src/tables.c (default_goto, goto_actions): Likewise.
11152
11153 * src/gram.h (rule_number, rule): Use int, not short int.
11154 * src/output.c (prepare_rules): Likewise.
11155 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
11156 errs, reductions): Likewise.
11157 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
11158 Likewise.
11159 * src/tables.c (vector_number, tally, action_number,
11160 ACTION_NUMBER_MINIMUM): Likewise.
11161 * src/output.c (muscle_insert_short_int_table): Remove.
11162
11163 2004-12-17 Akim Demaille <akim@epita.fr>
11164
11165 * data/lalr1.cc: Extensive Doxygenation.
11166 (error_): Rename as...
11167 (error): this, since it is visible to the user.
11168 Adjust callers.
11169 (Parser::message): Now an automatic variable from...
11170 (Parser::yyreport_syntax_error_): here.
11171 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
11172 Parser::error.
11173 * tests/input.at: Escape $.
11174
11175 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
11176
11177 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
11178 Parenthesize rhs to avoid obscure problems with mistakes like
11179 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
11180 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
11181 b4_rhs_location): Likewise.
11182 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
11183 b4_rhs_location): Likewise.
11184
11185 2004-12-16 Akim Demaille <akim@epita.fr>
11186
11187 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
11188 yacc.c: be sure to stay within yycheck_.
11189 * tests/actions.at: Re-enable C++ tests.
11190
11191 2004-12-16 Akim Demaille <akim@epita.fr>
11192
11193 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
11194 real.
11195
11196 2004-12-16 Akim Demaille <akim@epita.fr>
11197
11198 Use #define to handle the %name-prefix.
11199
11200 * data/glr.c, data/yacc.c: Comment changes.
11201 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
11202 so that one can refer to yylex in the parser file, and have it
11203 renamed, as is the case with other skeletons.
11204
11205 2004-12-16 Akim Demaille <akim@epita.fr>
11206
11207 Move lalr1.cc internals into yy*.
11208
11209 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
11210 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
11211 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
11212 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
11213 (empty_, final_, terror_, errcode_, ntokens_)
11214 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
11215 (looka_, ilooka_, error_range_, nerrs_):
11216 Rename as...
11217 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
11218 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
11219 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
11220 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
11221 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
11222 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
11223 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
11224 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
11225 these.
11226
11227 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
11228
11229 Fix some problems reported by twlevo at xs4all.
11230 * src/symtab.c (symbol_new): Report an error if the input grammar
11231 contains too many symbols. This is better than calling abort() later.
11232 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
11233 (struct node, struct graph):
11234 Rename member expand to stretch. All uses changed.
11235 (struct graph): Remove member layoutalgorithm. All uses removed.
11236 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
11237 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
11238 All uses changed.
11239 (N_STRETCH): Rename from N_EXPAND. All uses changed.
11240
11241 2004-12-15 Akim Demaille <akim@epita.fr>
11242
11243 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
11244 Add more Doxygen comments.
11245 (symprint_, stack_print_, reduce_print_, destruct_, pop)
11246 (report_syntax_error_, translate_): Rename as...
11247 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
11248 (yypop_, yyreport_syntax_error_, yytranslate_): this.
11249
11250 2004-12-15 Akim Demaille <akim@epita.fr>
11251
11252 * data/lalr1.cc (lex_): Rename as...
11253 (yylex_): this.
11254 Move the trace here.
11255 Take the %name-prefix into account.
11256 Reported by Alexandre Duret-Lutz.
11257
11258 2004-12-15 Akim Demaille <akim@epita.fr>
11259
11260 Simplify the C++ parser constructor.
11261
11262 * data/lalr1.cc (debug_): Rename as...
11263 (yydebug_): so that the parser's internals are always in the yy*
11264 pseudo namespace.
11265 Adjust uses.
11266 (b4_parse_param_decl): Remove the leading comma as it is now only
11267 called as unique argument list.
11268 (Parser::Parser): Remove the constructor accepting a location and
11269 an initial debugging level.
11270 Remove from the other ctor the argument for the debugging level.
11271 (debug_level_type, debug_level, set_debug_level): New.
11272
11273 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
11274 constructor calls.
11275
11276 2004-12-15 Akim Demaille <akim@epita.fr>
11277
11278 Remove b4_root related material: failure experiment
11279 (which goal was to allow to derive from a class).
11280
11281 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
11282 definitions and uses.
11283
11284 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
11285
11286 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
11287 not 2, since it's not portable to subtract 1 from the start of an
11288 array. The new item 0 is never set or used. All uses changed.
11289
11290 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
11291 the default definition of YYLLOC_DEFAULT. Problem reported
11292 by Frank Heckenbach.
11293
11294 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
11295
11296 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
11297 the normal case and one for the error case. Just use the
11298 first one uniformly. Problem reported by Frank Heckenbach.
11299 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
11300 use exactly the same macro in both places.
11301 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
11302 so that the normal-case YYRHSLOC works for the error case too.
11303 All uses changed.
11304 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
11305 (YYLLOC_DEFAULT): Use the same macro as glr.c.
11306 * doc/bison.texinfo (Location Default Action): Don't claim that
11307 we have an array of locations. Use the same macro for both glr
11308 and lalr parsers. Mention YYRHSLOC. Mention what happens when
11309 the index is 0.
11310
11311 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
11312
11313 * HACKING: Update email addresses to send announcements to.
11314
11315 * configure.ac (AC_INIT): Bump version to 1.875f.
11316
11317 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
11318
11319 * NEWS: Version 1.875e.
11320 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
11321
11322 * src/scan-skel.l: Include "complain.h", for "fatal".
11323
11324 * src/relation.h (relation_print, relation_digraph):
11325 Relation sizes are of type relation_node, not size_t (this is
11326 merely a doc fix, since the two types are equivalent).
11327 (relation_transpose): Relation sizes are of type relation_node,
11328 not int.
11329 * src/relation.c: Likewise.
11330 (top, infinity): Now of type relation_node, not int.
11331 (traverse, relation_transpose): Use relation_node, not int.
11332
11333 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
11334 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
11335 (yyparse): Remove unused local introduced in 2004-10-25 patch.
11336
11337 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
11338 specifying whether the test should be skipped. Use it tp
11339 specify that the [%defines %skeleton "lalr1.cc"] tests currently
11340 fail on some hosts, and should be skipped.
11341
11342 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
11343
11344 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
11345 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
11346 unless otherwise specified below.
11347
11348 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
11349 to allocate kernel_base, kernel_items, kernel_size, since
11350 they needn't be initialized to 0.
11351 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
11352 * src/closure.c (new_closure): Likewise, for itemset.
11353 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
11354 * src/lalr.c (set_goto_map): Likewise, for temp_map.
11355 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
11356 (build_relations): Likewise for edge, states1, includes.
11357 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
11358 * src/reader.c (packgram): Likewise, for ritem, rules.
11359 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
11360 * src/relation.c (relation_digraph): Likewise for VERTICES.
11361 (relation_transpose): Likewise for new_R, end_R.
11362 * src/symtab.c (symbols_token_translations_init): Likewise for
11363 token_translations.
11364 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
11365 (token_actions): Likewise for yydefact, actrow, conflrow,
11366 conflict_list.
11367 (save_column): Likewise for froms[symno], tos[symno].
11368 (goto_actions): Likewise for state_count.
11369 (pack_table): Likewise for base, pos, check.
11370 (tables_generate): Likewise for width.
11371
11372 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
11373 for initial core. Just have a separate core, so we needn't worry
11374 about whether kernel_size and kernel_base are initialized.
11375
11376 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
11377 kernel_size, kernel_items): Remove unnecessary initialization.
11378 * src/conflicts.c (conflicts): Likewise.
11379 * src/derives.c (derives): Likewise.
11380 * src/muscle_tablc (muscle_insert): Likewise.
11381 * src/relation.c (relation_digraph): Likewise.
11382 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
11383 conflrow, conflict_table, conflict_list, table, check):
11384 Likewise.
11385
11386 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
11387 This is because all callers pass unsigned int.
11388 * src/closure.h (new_closure): Likewise.
11389
11390 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
11391 (build_relations): Initialize includes[i] in all cases.
11392 * src/reader.c (packgram): Always initialize rules[ruleno].prec
11393 and rules[ruleno].precsym. Initialize members in order.
11394 * src/relation.c (relation_transpose): Always initialize new_R[i]
11395 and end_R[i].
11396 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
11397
11398 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
11399 conflict_list[0] was always 0, but now it isn't initialized.
11400
11401 * src/table.c (table_grow): When conflict_table grew, the grown
11402 area wasn't cleared. Fix this.
11403
11404 * lib/.cvsignore: Add strdup.c, strdup.h.
11405 * m4/.cvsignore: Add strdup.m4.
11406
11407 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
11408
11409 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
11410 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
11411 GOTO_NUMBER_MAXIMUM, since we occasionally compute
11412 ngotos + 1 without checking for overflow.
11413 (build_relations): Use END_NODE, not -1, to denote end of edges.
11414 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
11415 build_relations): Use goto_number, not int, for goto numbers.
11416 * src/tables.c (save_column, default_goto): Likewise.
11417
11418 2004-11-23 Akim Demaille <akim@epita.fr>
11419
11420 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
11421 of #defining from yystype.
11422 Don't typedef yystype, C++ does not need it.
11423 This lets it possible to forward declare it as union.
11424
11425 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
11426
11427 * bootstrap (gnulib_modules): Add extensions.
11428 Problem reported by Jim Meyering.
11429
11430 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
11431
11432 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
11433 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
11434 src/system.h, src/tables.c: XFREE -> free, to accommodate
11435 recent change to gnulib xalloc.h.
11436 Problem reported by Jim Meyering.
11437
11438 2004-11-17 Akim Demaille <akim@epita.fr>
11439
11440 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
11441
11442 2004-11-17 Akim Demaille <akim@epita.fr>,
11443 Alexandre Duret-Lutz <adl@gnu.org>
11444
11445 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
11446 changes.
11447 (YYCDEBUG): Adjust.
11448 Use it instead of cdebug_.
11449 (Parser::debug_stream, Parser::set_debug_stream): New.
11450 (Parser::symprint_): Define cdebug_ for temporary backward
11451 compatibility.
11452 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
11453 debug_stream ().
11454
11455 2004-11-17 Akim Demaille <akim@epita.fr>
11456
11457 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
11458 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
11459 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
11460 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
11461
11462 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
11463
11464 * data/glr.c (yyloc_default): Remove; not used.
11465 Problem reported by Frank Heckenbach.
11466
11467 2004-10-25 Akim Demaille <akim@epita.fr>
11468
11469 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
11470 Introduce another definition to address simple location arrays.
11471 (yyGLRStack): New member: yyerror_range.
11472 (yyrecoverSyntaxError, yyparse): Update it.
11473 (yyrecoverSyntaxError): Use it when shifting the error token to
11474 have an accurate range, equivalent to the one computed by both
11475 yacc.c and lalr1.cc.
11476 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
11477 that column numbers start at column 0, as per GNU Coding
11478 Standards, the others tests, and the doc.
11479 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
11480 Adjust to the above change (first column is 0).
11481 And adjust the location of the "<error>", now covering the whole
11482 line.
11483
11484 2004-10-22 Akim Demaille <akim@epita.fr>
11485 and Paul Eggert <eggert@cs.ucla.edu>
11486
11487 Remove some arbitrary limits on goto numbers and relations.
11488 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
11489 initial values, since they're never used.
11490 (set_goto_map): ngotos is now unsigned, so test for overflow
11491 by seeing whether it wraps around to zero.
11492 * src/lalr.h (goto_number): Now size_t, not short int.
11493 (GOTO_NUMBER_MAXIMUM): Remove.
11494 * src/relation.c (relation_print, traverse, relation_transpose):
11495 Check for END_NODE rather than looking at sign.
11496 * src/relation.h (END_NODE): New macro.
11497 (relation_node): Now size_t, not short int.
11498
11499 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
11500
11501 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
11502 keyword, not an identifier. Problem reported by Baron Schwartz in
11503 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
11504
11505 2004-10-11 Akim Demaille <akim@epita.fr>
11506
11507 * src/symtab.c (symbol_check_alias_consistency): Also check
11508 type names, destructors, and printers.
11509 Reported by Alexandre Duret-Lutz.
11510 Recode the handling of associativity and precedence in terms
11511 of symbol_precedence_set.
11512 Accept no redeclaration at all, not even equal to the previous
11513 value.
11514 (redeclaration): New.
11515 Use it to factor redeclaration complaints.
11516 (symbol_make_alias): Don't set the type of the alias, let
11517 symbol_check_alias_consistency do it as for other features.
11518 * src/symtab.h (symbol): Add new member prec_location, and
11519 type_location.
11520 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
11521 * tests/input.at (Incompatible Aliases): New.
11522
11523 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
11524
11525 .cvsignore fixes to accommodate gnulib changes,
11526 and the practice of naming build directories "_build".
11527 * .cvsignore: Add "_*". Sort.
11528 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
11529 * m4/.cvsignore: Add "*_gl.m4".
11530
11531 2004-10-06 Akim Demaille <akim@epita.fr>
11532
11533 * src/parse-gram.y (add_param): Fix the truncation of trailing
11534 spaces.
11535
11536 2004-10-05 Akim Demaille <akim@epita.fr>
11537
11538 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
11539 whether the reducion was empty or not. This leaves room to
11540 improve the use of YYLLOC_DEFAULT in such a case.
11541 lalr1.cc is still experimental, so changing this is acceptable.
11542 And finally, there are probably not many users who changed the
11543 handling of locations in GLR, so changing is admissible too.
11544
11545 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
11546 empty reduction, set @$ to an empty location ending the previously
11547 stacked symbol.
11548 Adjust uses to make sure the code is triggered on empty
11549 reductions.
11550 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
11551 expected output: empty reductions have empty locations.
11552
11553 2004-09-29 Akim Demaille <akim@epita.fr>
11554
11555 * data/lalr1.cc: Move towards a more standard C++ coding style
11556 for templates: Class < T > -> Class<T>.
11557
11558 2004-09-29 Akim Demaille <akim@epita.fr>
11559
11560 * data/lalr1.cc: Reinstall the former ctor, for sake of
11561 compatibility, but warn it will be removed.
11562 Move towards a more standard C++ coding style (i.e., type *var ->
11563 type* var).
11564
11565 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
11566
11567 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
11568 since it's less likely to work if NULs are involved in the future.
11569
11570 2004-09-27 Akim Demaille <akim@epita.fr>
11571
11572 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
11573
11574 2004-09-27 Akim Demaille <akim@epita.fr>
11575
11576 * data/lalr1.cc (b4_parse_param_decl_1): New.
11577 (b4_parse_param_decl): Use it to have different names between attribute
11578 and argument names.
11579 (b4_cc_constructor_call): Likewise.
11580
11581 2004-09-24 Akim Demaille <akim@epita.fr>
11582
11583 * src/parse-gram.y (add_param): Strip the leading and trailing
11584 blanks from a formal argument declaration.
11585 (YY_LOCATION_PRINT): New.
11586
11587 2004-09-24 Akim Demaille <akim@epita.fr>
11588
11589 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
11590 after the location.
11591
11592 2004-09-24 Akim Demaille <akim@epita.fr>
11593
11594 * doc/bison.texinfo (Table of Symbols): Sort.
11595
11596 2004-09-21 Akim Demaille <akim@epita.fr>
11597
11598 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
11599 the useless parentheses.
11600 Suggested by Paul Eggert.
11601
11602 2004-09-20 Akim Demaille <akim@epita.fr>
11603
11604 Let the initial-action act on the look-ahead, and use it for the
11605 "initial push" (corresponding to an hypothetical beginning-of-file).
11606 And let lalr1.cc honor %initial-action.
11607
11608 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
11609 example.
11610 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
11611 (Parser::Parser): Remove the ctor that used to initialize it.
11612 (Parser::parse): Like in the other skeletons, issue the "starting
11613 parse" message before any action.
11614 Honor %initial-action.
11615 Initialize the stacks with the lookahead.
11616 * data/yacc.c: Let $$ and @$ in %initial-action designate the
11617 look-ahead.
11618 Push them in the stacks.
11619 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
11620
11621 2004-09-20 Akim Demaille <akim@epita.fr>
11622
11623 * doc/bison.texinfo (Initial Action Decl): New.
11624
11625 2004-09-20 Akim Demaille <akim@epita.fr>
11626
11627 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
11628 clearer criterion to define it.
11629 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
11630 When reducing on an empty RHS, use the latest stacked location as
11631 location.
11632 yylloc is not always available.
11633 * data/glr.c: Likewise.
11634 Also, honor initial-actions.
11635
11636 2004-09-20 Akim Demaille <akim@epita.fr>
11637
11638 * data/yacc.c (YY_LOCATION_PRINT): New.
11639 Define when we know YYLTYPE's structure, i.e., when the default
11640 YYLLOC_DEFAULT is used.
11641 * data/c.m4 (b4_yysymprint_generate): Use it.
11642 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
11643 value of the result.
11644 (error_start_): Replace with...
11645 (error_range_): this location array.
11646 This allows to replace code relying on the implementation of
11647 locations by portable code.
11648 * data/yacc.c (yylerrsp): Replace with...
11649 (yyerror_range): this.
11650 Every time a token is popped, update yyerror_range[0], to have an
11651 accurate location for the error token.
11652 * data/glr.c (YY_LOCATION_PRINT): New.
11653 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
11654 deference a pointer.
11655 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
11656 report the location in %printers.
11657
11658 * src/scan-skel.l: Instead of abort, report error messages to ease
11659 understanding skeleton scanning failures.
11660
11661 2004-09-16 Akim Demaille <akim@epita.fr>
11662
11663 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
11664 (iterator, const_iterator): these, to be more in the C++ spirit.
11665 Also, return reverse iterators so that when displaying the stack
11666 we display its bottom first.
11667 (Parser::stack_print_, Parser::reduce_print_): Match the messages
11668 from yacc.c.
11669 We should probably use vector here though.
11670
11671 2004-09-16 Akim Demaille <akim@epita.fr>
11672
11673 Have more complete shift traces.
11674
11675 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
11676 to report Shifts instead of ad hoc YYDPRINTF invocations,
11677 including for the error token.
11678 * data/lalr1.cc (symprint_): Output the location.
11679 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
11680 output the location within the %printer.
11681 Activate GLR tests, at least to make sure they compile properly.
11682 They still don't pass though.
11683 * tests/calc.at: Adjust expect verbose output, since now "Entering
11684 state..." is on a different line than the "Shifting" message.
11685
11686 2004-09-08 Akim Demaille <akim@epita.fr>
11687
11688 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
11689 Bison directive from the Bison file to the invocation of this
11690 macro, so that these directives are passed to
11691 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
11692 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
11693 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
11694 the extra Bison directives instead of the whole series.
11695 Change the grammar so that there are recoverable errors, and
11696 unrecoverable errors. Now we can have the parser give up before
11697 consuming the whole input. As a result we now can observe that
11698 the lookahead is freed when needed.
11699 Change the parser source to parse argv[1] instead of a hard coded
11700 string.
11701 Simplify yylex, and give a value and location to EOF.
11702 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
11703 passed directives already coded in the file.
11704 Add some tests to check the location of "error".
11705 For some tests, the C++ parser is correct, and not yacc.c.
11706 For other tests, they provide different, but unsatisfying, values,
11707 so keep the C++ value so that at least one parser is "correct"
11708 according to the test suite.
11709 (Actions after errors): Remove, this is subsumed by the
11710 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
11711
11712 2004-09-06 Akim Demaille <akim@epita.fr>
11713
11714 * data/lalr1.cc: Adjust the indentation of the labels.
11715 (Parser::pop): New.
11716 Use it.
11717
11718 2004-09-06 Akim Demaille <akim@epita.fr>
11719
11720 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
11721 argument, an informative message.
11722 Call YY_SYMBOL_PRINT.
11723 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
11724 * data/lalr1.cc (destruct_): Likewise.
11725 In addition, no longer depend on b4_yysymprint_generate and
11726 b4_yydestruct_generate to generate these functions, do it "by
11727 hand".
11728
11729 2004-09-03 Akim Demaille <akim@epita.fr>
11730
11731 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
11732 invoked, yydestruct the lookahead.
11733 * tests/calc.at (Calculator $1): Update the expected lengths of
11734 traces: there is an added line for the discarded lookahead.
11735 * doc/bison.texinfo (Destructor Decl): Some rewording.
11736 Define "discarded" symbols.
11737
11738 2004-09-02 Akim Demaille <akim@epita.fr>
11739
11740 * data/lalr1.cc (translate_, destruct_): No reason to be static.
11741
11742 2004-09-02 Akim Demaille <akim@epita.fr>
11743
11744 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
11745 (YYDSYMPRINTF): Rename as...
11746 (YY_SYMBOL_PRINT): this.
11747 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
11748 two.
11749 Use it instead of direct symprint_ calls.
11750 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
11751 one.
11752
11753 2004-09-02 Akim Demaille <akim@epita.fr>
11754
11755 * data/lalr1.cc (b4_yysymprint_generate): New.
11756 (symprint_): New member function, defined when YYDEBUG.
11757 Use it consistently instead of token/nterm debugging output by
11758 hand.
11759 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
11760 %printer calls to use cdebug_ when using lalr1.cc.
11761
11762 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
11763
11764 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
11765 with #ifdef YYDEBUG.
11766
11767 2004-08-26 Akim Demaille <akim@epita.fr>
11768
11769 * doc/bison.texinfo (Implementing Loops): Rename as...
11770 (Implementing Gotos/Loops): this.
11771
11772 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
11773
11774 Adjust to latest gnulib.
11775 * bootstrap (gnulib_modules): Add xalloc-die.
11776 Set LC_ALL=C so that file names sort consistently.
11777 Prefer the gnulib copies of gettext.m4, glibc21.m4,
11778 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
11779 uintmax_t.m4, ulonglong.m4.
11780 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
11781 po.m4 since we are now using _gl.m4 instead.
11782
11783 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
11784
11785 * src/scan-action.l: Remove. Scanning of semantic actions is
11786 handled in scan-gram.l.
11787
11788 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
11789
11790 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
11791
11792 * src/location.h (struct): The file member is a uniqstr.
11793 (equal_boundaries): Use UNIQSTR_EQ for comparison.
11794
11795 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
11796
11797 Fix bug with non-%union parsers that have printers or destructors,
11798 which led to a Bison core dump. Reported by Peter Fales in
11799 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
11800
11801 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
11802 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
11803 not to our own type.
11804 * src/output.c (symbol_destructors_output, symbol_printers_output):
11805 Don't assume %union.
11806 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
11807 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
11808 UNION-FLAG. All callers changed.
11809 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
11810 Use type char, not unsigned int, when declaring an array of char;
11811 this lets us remove a cast.
11812 (Printers and Destructors): Add non-%union test cases.
11813
11814 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11815
11816 * doc/bison.texinfo: Minor editorial changes, mostly to the new
11817 GLR writeups. E.g., avoid frenchspacing and the future tense,
11818 change "lookahead" to "look-ahead", and change "wrt" to "with
11819 respect to".
11820
11821 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11822
11823 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
11824 New sections, split off from the GLR Parsers section. Put the new
11825 Simple GLR Parser near the start of the GLR section, for clarity.
11826 Rewrite connective text.
11827
11828 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
11829
11830 * doc/bison.texinfo (Simple GLR Parsers): New section.
11831
11832 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11833
11834 * NEWS, TODO, doc/bison.texinfo:
11835 Use "look-ahead" instead of "lookahead", to be consistent.
11836 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
11837 while we're fixing "look-ahead".
11838 * src/conflicts.c (shift_set): Renamed from shiftset.
11839 (look_ahead_set): Renamed from lookaheadset.
11840 * src/print.c: Likewise.
11841 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
11842 name for "lookahead".
11843 (report_types, usage): Likewise.
11844 * src/getargs.h (report_look_ahead_tokens): Renamed from
11845 report_lookaheads.
11846 * src/lalr.c (compute_look_ahead_tokens): Renamed from
11847 compute_lookaheads.
11848 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
11849 (look_ahead_tokens_print): Renamed from lookaheads_print.
11850 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
11851 state_rule_lookaheads_print.
11852 * src/state.h: Likewise.
11853 (reductions.look_ahead_tokens): Renamed from lookaheads.
11854 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
11855 AT_DATA_LOOKAHEADS_GRAMMAR.
11856
11857 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
11858
11859 * README: Update location of patched M4 distribution.
11860
11861 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
11862
11863 Don't assume the C++ compiler takes the same arguments as the C compiler
11864 (trivial change).
11865 * configure.ac (O0CXXFLAGS): New var.
11866 * tests/atlocal.in (CXXFLAGS): Use it.
11867
11868 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
11869
11870 Fix some "make check" problems with C++ reported by
11871 Albert Chin-A-Young for Tru64 C++ in this thread:
11872 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
11873
11874 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
11875 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
11876 Output to a .cc file for C++, not to a .c file.
11877 * tests/calc.at (AT_CHECK_CALC): Likewise.
11878 * tests/regression.at (AT_CHECK_DANCER): Likewise.
11879 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
11880
11881 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
11882
11883 * tests/calc.at, tests/actions.at: Workaround for SGI
11884 C++ compiler. (trivial change)
11885
11886 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
11887
11888 Spent a few hours checking out which prerequisite versions the
11889 current sources actually require. I went all the way back to
11890 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
11891 a seemingly endless set of combinations of versions more recent
11892 than that. The bottom line is that the current sources require
11893 fairly recent versions of the build tools, and it'll be some work
11894 to change this.
11895 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
11896 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
11897 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
11898 Add comments explaining why those particular versions are
11899 currently needed.
11900
11901 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
11902 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
11903 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
11904
11905 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
11906 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
11907
11908 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
11909
11910 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
11911 0.11.5. Suggested by Bruno Haible.
11912 * bootstrap: Remove gettext version checking.
11913
11914 * doc/bison.texinfo (Decl Summary): Also mention that %union
11915 can depend on prerequisite types. Problem reported by Tim
11916 Van Holder.
11917
11918 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
11919
11920 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
11921 * README-alpha: Don't tell people not to package this.
11922
11923 * bootstrap: Don't assume $(...) works; use `...` instead.
11924 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
11925 gettext better.
11926
11927 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
11928 put into the -d output file, and mention what to do if YYSTYPE is
11929 defined as a macro.
11930
11931 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
11932
11933 Undo change made earlier today: it caused autopoint to not bring
11934 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
11935 autopoint's.
11936
11937 * bootstrap: Check that gettext version matches what's in
11938 configure.ac. Warn users to ignore robots.txt ERROR 404.
11939 * bootstrap: Undo today's earlier change (logged below).
11940 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
11941
11942 The gettext version checking is causing more trouble than it's
11943 curing; remove it. Problem reported by Paul Hilfinger.
11944
11945 * bootstrap: Issue a warning that one can expect a message
11946 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
11947 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
11948
11949 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
11950
11951 Ensure that the C++ compiler used for testing actually works on a
11952 simple test program; if not, skip the C++-related tests. Problem
11953 reported by Vin Shelton in:
11954 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
11955
11956 * m4/cxx.m4: New file.
11957 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
11958 * tests/atlocal.in (BISON_CXX_WORKS): Add.
11959 * tests/local.at (AT_COMPILE_CXX): Use it.
11960
11961 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11962
11963 * data/glr.c (yylloc): Output this macro even if locations are not
11964 being generated, as the GLR parser needs it even in that case.
11965 Problem reported by Troy A. Johnson
11966 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
11967
11968 * configure.ac (AC_INIT): Update to 1.875e.
11969
11970 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11971
11972 * NEWS: Version 1.875d.
11973 * configure.ac (AC_INIT): Likewise.
11974 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
11975
11976 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
11977 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
11978 lalr1.cc runs afoul of the first, and the last two are no longer
11979 supported by GCC 3.4.0.
11980 * README: Mention GNU m4 1.4 or later; mention m4 patches.
11981 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
11982
11983 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
11984
11985 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
11986 unsigned int, for compatibility with latest gnulib hash module.
11987 * src/state.c (state_hash, state_hasher): Likewise.
11988 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
11989 * src/uniqstr.c (hash_uniqstr): Likewise.
11990
11991 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
11992
11993 * NEWS: Unescaped newlines are no longer allowed in char & strings.
11994
11995 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
11996 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
11997 character and string literals.
11998 (unexpected_end): New function.
11999 (unexpected_eof): Use it.
12000 (unexpected_newline): New function.
12001 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
12002 actions.
12003
12004 * NEWS: Document %expect-rr.
12005
12006 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
12007 Fix typo by replacing $1 with $option.
12008 Remove more 'intl'-related files.
12009 Don't DEFUN AM_INTL_SUBDIR twice.
12010
12011 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
12012 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
12013 strtoul.c.
12014 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
12015 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
12016 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
12017 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
12018 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
12019 * src/.cvsignore: Add *.output.
12020
12021 * src/parse-gram.y: Put copyright notice inside %{ %} so it
12022 gets copied to the output file.
12023
12024 2004-04-28 Paul Eggert <eggert@twinsun.com>
12025
12026 Get files from the gnulib and po repositories, instead of relying
12027 on them being in our CVS. Upgrade to latest versions of gnulib
12028 and Automake.
12029
12030 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
12031 * bootstrap: Bootstrap from gnulib and po repositories.
12032 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
12033 * README-cvs: Document these changes. Remove version numbers from
12034 mentions of build tools, since they change so often. Mention Flex.
12035
12036 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
12037 (gl_USE_SYSTEM_EXTENSIONS): Add.
12038 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
12039 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
12040 does this for us.
12041 (AC_ISC_POSIX): Remove; we no longer support this
12042 ancient OS, as it gets in the way of latest Autoconf & gnulib.
12043 (AC_HEADER_STDC): Remove: we now assume C89 or better.
12044 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
12045 Do not check for C89 headers, except for locale.h which is used
12046 by the Yacc library and must port to K&R hosts.
12047 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
12048 Do not check for C89 functions, except for setlocale which is
12049 used by the Yacc library.
12050 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
12051 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
12052 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
12053 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
12054 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
12055 AM_GNU_GETTEXT): Remove; now done by:
12056 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
12057 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
12058 for us.
12059
12060 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
12061 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
12062 Define to empty, as gnulib.mk will do the rest for us.
12063 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
12064 for us.
12065 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
12066 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
12067
12068 * src/files.c: Include gnulib's xstrndup.h.
12069
12070 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
12071 (REALLOC): Use xnrealloc, for likewise.
12072 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
12073 (strnlen, memrchr): Remove decls; functions no longer used.
12074 Include <stpcpy.h>.
12075
12076 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
12077 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
12078 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
12079 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
12080 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
12081 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
12082 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
12083 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
12084 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
12085 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
12086 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
12087 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
12088 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
12089 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
12090 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
12091 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
12092 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
12093 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
12094 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
12095 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
12096 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
12097 Remove, as these files are now generated automatically
12098 by bootstrap or automake.
12099
12100 * po/ChangeLog: Remove: all but one entry was a duplicate
12101 of this file, and I moved that 2000-11-02 entry here.
12102
12103 * config/.cvsignore: Add Makefile, depcomp, install-sh.
12104 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
12105 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
12106 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
12107 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
12108 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
12109 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
12110 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
12111 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
12112 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
12113 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
12114 xstrndup.h.
12115 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
12116 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
12117 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
12118 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
12119 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
12120 * src/.cvsignore: Remove *_.c.
12121
12122
12123 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
12124 support it. (The latest stable gzip doesn't.)
12125
12126 2004-04-27 Paul Eggert <eggert@twinsun.com>
12127
12128 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
12129 case, as stos_ is now used by destructors due to the 2004-02-09
12130 change.
12131
12132 Remove more K&R C support.
12133 * lib/libiberty.y (PARAMS): Remove. All uses removed.
12134 * lib/subpipe.c (errno): Remove decl.
12135 Include <stdlib.h> unconditionally.
12136 (EXIT_FAILURE): Remove macro.
12137 * src/complain.c (vfprintf, strerror): Remove.
12138 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
12139 unconditionally.
12140 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
12141 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
12142 (strchr, strspn, memchr): Remove decls.
12143 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
12144 unconditionally. Do not declare perror.
12145 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
12146 unconditionally.
12147
12148 * src/complain.c (_): Remove useless defn, as system.h defines this.
12149
12150 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
12151 with latest obstack.h.
12152 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
12153 to procedure types, as obstack.h now does that for us.
12154 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
12155
12156 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
12157 so that this include file can stand alone.
12158 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
12159 does this now. Include subpipe.h first after config.h, to
12160 test whether it can stand alone.
12161
12162 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
12163 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
12164 unused declaration.
12165
12166 * tests/synclines.at (%union synch line): Put a dummy member in
12167 the union, because empty unions aren't allowed in C. Caught
12168 by GCC 3.4.0.
12169
12170 2004-04-13 Jim Meyering <jim@meyering.net>
12171
12172 * src/conflicts.c (conflicts_print): Correct format string typo:
12173 use `%%' to produce literal `%'. (trivial change)
12174
12175 2004-03-30 Paul Eggert <eggert@twinsun.com>
12176
12177 * src/getargs.c (version): Update copyright year to 2004.
12178
12179 * data/c.m4 (b4_int_type): Use 'short int' rather than
12180 'short', and similarly for 'long', 'unsigned', etc.
12181 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
12182 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
12183 yy_yypstack, yydumpstack): Likewise.
12184 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
12185 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
12186 Likewise.
12187 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
12188 yy_stack_print, yyparse): Likewise.
12189 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
12190 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
12191 * lib/bitset.c (bitset_print): Likewise.
12192 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
12193 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12194 * lib/bitsetv.c (bitsetv_dump): Likewise.
12195 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
12196 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
12197 Likewise.
12198 * src/LR0.c (allocate_itemsets): Likewise.
12199 * src/gram.h (rule_number, rule): Likewise.
12200 * src/lalr.h (goto_number): Likewise.
12201 * src/nullable.c (nullable_compute): Likewise.
12202 * src/output.c (prepare_rules): Likewise.
12203 * src/relation.c (relation_print, relation_digraph): Likewise.
12204 * src/relation.h (relation_node): Likewise.
12205 * src/state.h (state_number, transitions, errs, reductions,
12206 struct state): Likewise.
12207 * src/symtab.h (symbol_number, struct symbol): Likewise.
12208 * src/tables.c (vector_number, tally, action_number,
12209 default_goto, goto_actions): Likewise.
12210 * tests/existing.at (GNU Cim Grammar): Likewise.
12211 * tests/regression.at (Web2c Actions): Likewise.
12212
12213 * src/output.c (muscle_insert_short_int_table): Renamed from
12214 muscle_insert_short_table. All uses changed.
12215
12216 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
12217
12218 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
12219 (declaration): Replace expected_conflicts with expected_sr_conflicts.
12220 Add %expect-rr rule.
12221
12222 * src/scan-gram.l: Recognize %expect-rr.
12223
12224 * src/conflicts.h (expected_sr_conflicts): Rename from
12225 expected_conflicts.
12226 (expected_rr_conflicts): Declare.
12227
12228 * src/conflicts.c (expected_sr_conflicts): Rename from
12229 expected_conflicts.
12230 (expected_rr_conflicts): Define.
12231 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
12232 for GLR parsers.
12233 Use expected_sr_conflicts in place of expected_conflicts.
12234 Warn if expected_rr_conflicts used in non-GLR parser.
12235
12236 * doc/bison.texinfo: Add documentation for %expect-rr.
12237
12238 2004-03-08 Paul Eggert <eggert@gnu.org>
12239
12240 Add support for hex token numbers. Suggested by Odd Arild Olsen in
12241 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
12242
12243 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
12244 in lalr1.cc.
12245 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
12246 * src/scan-gram.l (scan_integer): New function.
12247 ({int}): Use it.
12248 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
12249 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
12250 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
12251 Say "long int", not "long", for uniformity with GNU style.
12252
12253 2004-02-25 Paul Eggert <eggert@twinsun.com>
12254
12255 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
12256 compilers. This fixes a problem with Intel's C++ compiler being
12257 chatty, reported by Guido Trentalancia in
12258 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
12259
12260 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
12261
12262 Support %destructor and merge error locations in lalr1.cc.
12263
12264 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
12265 (Parser::stos_): Define unconditionally.
12266 (Parser::destruct_): New method. Generate its body with
12267 b4_yydestruct_generate.
12268 (Parser::error_start_): New attribute.
12269 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
12270 token which are discarded.
12271 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
12272 error_start_ when erroneous token are discarded.
12273 (Parser::parse) <yyerrlab1>: Compute the location of the error
12274 token so that it covers all the discarded tokens.
12275 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
12276 it can be called with `%skeleton "lalr1.cc"', and do that.
12277
12278 2004-02-02 Paul Eggert <eggert@twinsun.com>
12279
12280 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
12281 $(top_srcdir)/lib and ../lib. This fixes a bug reported
12282 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
12283 There's no need to mention top_builddir since Automake does that
12284 for us.
12285 (INCLUDES): Remove, as Automake says it's obsolescent.
12286 Contents migrated into AM_CPPFLAGS as described above.
12287 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
12288
12289 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12290
12291 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
12292 (yyreportSyntaxError): Handle case where lookahead token is
12293 YYEMPTY.
12294
12295 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12296
12297 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
12298 resulting parsers are compilable with C++.
12299
12300 2003-12-23 Paul Eggert <eggert@twinsun.com>
12301
12302 * config/depcomp, config/install-sh: Sync with Automake 1.8.
12303 * src/output.c (output_skeleton): Rename local var.
12304 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
12305 Bison tokens, as this runs afoul of the 2003-10-07 change that
12306 disallowed NUL bytes in character constants or string literals.
12307
12308 * tests/local.at: Require Autoconf 2.59's Autotest.
12309 * tests/testsuite.at: Don't include local.at, since we now assume
12310 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
12311 including it.
12312 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
12313 multiple inclusion warnings.
12314
12315 2003-12-02 Akim Demaille <akim@epita.fr>
12316
12317 * doc/bison.texinfo (How Can I Reset the Parser): More about start
12318 conditions.
12319 From Bruno Haible.
12320
12321 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
12322
12323 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
12324
12325 2003-10-07 Paul Eggert <eggert@twinsun.com>
12326
12327 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
12328 if testsuite doesn't exist.
12329
12330 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
12331 literals, unfortunately.
12332 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
12333 Complain about NUL bytes in character constants or string literals.
12334
12335 2003-10-05 Paul Eggert <eggert@twinsun.com>
12336
12337 * NEWS: Don't document %no-default-prec, as it's still
12338 too experimental.
12339 * doc/bison.texinfo: Document %no-default-prec only if
12340 the defaultprec flag is set. Normally it's not.
12341
12342 2003-10-04 Paul Eggert <eggert@twinsun.com>
12343
12344 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
12345 non-modifiable lvalue, instead of a modifiable one.
12346 * doc/bison.texinfo (Actions): Document that $$ can
12347 be assigned to. Do not claim that $$ and $N are
12348 array element references: user code should not rely on this.
12349
12350 2003-10-01 Paul Eggert <eggert@twinsun.com>
12351
12352 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
12353 (grammar_declaration): Use it.
12354 * src/scan-gram.l: New token %no-default-prec.
12355 * tests/conflicts.at: Revamp tests to use %no-default-prec.
12356 * NEWS, doc/bison.texinfo: Document the above.
12357
12358 2003-10-01 Akim Demaille <akim@epita.fr>
12359
12360 VCG no longer supports long_straight_phase.
12361
12362 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
12363 * src/print_graph.c (print_graph): Adjust.
12364
12365 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
12366 and Paul Eggert <eggert@twinsun.com>
12367
12368 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
12369 Table of Symbols): Document %default-prec.
12370 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
12371 (grammar_declaration): Set default_prec on %default-prec.
12372 * src/scan-gram.l (%default-prec): New token.
12373 * src/reader.h (default_prec): New flag.
12374 * src/reader.c: Likewise.
12375 (packgram): Handle it.
12376 * tests/conflicts.at (%default-prec without %prec,
12377 %default-prec with %prec, %default-prec 1): New tests.
12378
12379 2003-09-30 Paul Eggert <eggert@twinsun.com>
12380
12381 * tests/testsuite.at: Include local.at, not input.at, fixing
12382 a typo in the 2003-08-25 patch.
12383
12384 2003-08-27 Akim Demaille <akim@epita.fr>
12385
12386 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
12387 GCC warnings.
12388
12389 2003-08-26 Akim Demaille <akim@epita.fr>
12390
12391 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
12392 "<\#" to avoid magic from Gnus when posting parts of this script.
12393
12394 2003-08-26 Akim Demaille <akim@epita.fr>
12395
12396 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
12397 (Parser::parse): here.
12398 Adjust: nerrs and errstatus is now replaced by...
12399 (Parser::nerrs_, Parser::errstatus_): New.
12400
12401 2003-08-25 Akim Demaille <akim@epita.fr>
12402
12403 * config/announce-gen, Makefile.cfg: New.
12404 * Makefile.am: Adjust.
12405 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
12406 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
12407
12408 2003-08-25 Akim Demaille <akim@epita.fr>
12409
12410 When reducing initial empty rules, Bison parser read an initial
12411 location that is not defined. This results in garbage, and that
12412 affects Bison's own parser. Therefore we need (i) to extend Bison
12413 to support a means to initialize this location, and (ii) to use
12414 this CVS Bison to fix CVS Bison's parser.
12415
12416 * src/reader.h, reader.c (epilogue_augment): Remove, replace
12417 with...
12418 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
12419 * src/parse-gram.y: Adjust.
12420 (%initial-action): New.
12421 (%error-verbose): Since we require CVS Bison, there is no reason
12422 not to use it.
12423 * src/scan-gram.l: Adjust.
12424 * src/Makefile.am (YACC): New, to make sure we use our own parser.
12425 * data/yacc.c (yyparse): Use b4_initial_action.
12426
12427 2003-08-25 Akim Demaille <akim@epita.fr>
12428
12429 * doc/bison.texinfo: Don't promote stdout for error messages.
12430
12431 2003-08-25 Akim Demaille <akim@epita.fr>
12432
12433 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
12434 From Alexandre Duret-Lutz.
12435
12436 2003-08-25 Akim Demaille <akim@epita.fr>
12437
12438 Version 1.875c.
12439
12440 2003-08-25 Akim Demaille <akim@epita.fr>
12441
12442 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
12443 Use them.
12444
12445 2003-08-25 Akim Demaille <akim@epita.fr>
12446
12447 * data/lalr1.cc (Parser::reduce_print_): New.
12448 Use it.
12449
12450 2003-08-25 Akim Demaille <akim@epita.fr>
12451
12452 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
12453 error recovery loops. This patch is based on
12454 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
12455 Also, augment the similarity between lalr1.cc and yacc.c.
12456 Note: the locations of error recovery rules are not correct yet.
12457
12458 * data/lalr1.cc: Comment changes to augment the similarity between
12459 lalr1.cc and yacc.c.
12460 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
12461 (yyerrlab1): Remove, but where it used to be (now the bottom part of
12462 yyerrlab), when hitting EOF, pop the whole stack here instead of
12463 merely falling thru the default error handling mechanism.
12464 (yyerrorlab): New label, with the old contents of YYERROR,
12465 plus the following change: pop the stack of rhs corresponding
12466 to the production that invoked YYERROR. That is how Yacc
12467 behaves (required by POSIX).
12468 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
12469 fail.
12470
12471 2003-08-25 Akim Demaille <akim@epita.fr>
12472
12473 Tune local.at so that people can "autom4te -l autotest calc.at -o
12474 calc" for instance, to extract a sub test suite.
12475
12476 * tests/testsuite.at: Move the initialization, Autotest version
12477 requirement, and AT_TESTED invocation into...
12478 * tests/local.at: here.
12479 * tests/testsuite.at: Include it for compatibility with Autoconf
12480 2.57.
12481 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
12482 be ignore.
12483
12484 2003-08-04 Paul Eggert <eggert@twinsun.com>
12485
12486 Rework code slightly to avoid gcc -Wtraditional warnings.
12487 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
12488 The returned value is now stored in *YY0. All callers changed.
12489 * src/output.c (merge_output): Adjust to the above change.
12490
12491 2003-07-26 Paul Eggert <eggert@twinsun.com>
12492
12493 * data/glr.c (YYASSERT): New macro.
12494 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
12495 yyresolveStates, yyprocessOneStack):
12496 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
12497 Derived from a suggestion by Frank Heckenbach.
12498
12499 2003-07-25 Paul Eggert <eggert@twinsun.com>
12500
12501 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
12502 for portability to K&R C (after ansi2knr, presumably). See
12503 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
12504 by Frank Heckenbach, though I have omitted the structure-initialization
12505 part of his glr-knr.diff patch since I recall that the Portable
12506 C Compiler didn't require that change.
12507
12508 Let the user specify how to allocate and free memory.
12509 Derived from a suggestion by Frank Heckenbach in
12510 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
12511 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
12512 All uses of free, malloc, realloc changed to use these macros,
12513 and unnecessary casts removed.
12514 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
12515
12516 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
12517
12518 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
12519 use s.empty() rather than s == "" to test for empty string; see
12520 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
12521 (trivial change)
12522
12523 2003-06-25 Akim Demaille <akim@epita.fr>
12524
12525 * config/depcomp, config/install-sh: Update from masters.
12526
12527 2003-06-20 Paul Eggert <eggert@twinsun.com>
12528
12529 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
12530 and return properly parenthesized result.
12531 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
12532 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
12533 Remove unnecessary parentheses from uses.
12534 * doc/bison.texinfo (Location Default Action): Describe the
12535 conventions for parentheses.
12536
12537 2003-06-19 Paul Eggert <eggert@twinsun.com>
12538
12539 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
12540 yyreportTree): Do not assume that size_t is the same width as int,
12541 when printing sizes. Print sizes using an unsigned format.
12542 Problem reported by Frank Heckenbach in
12543 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
12544
12545 Port to Forte Developer 7 C compiler.
12546 * data/glr.c (struct YYLTYPE): If locations are not being used,
12547 declare a single dummy member, as empty structs do not conform
12548 to the C standard.
12549 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
12550 the Forte Developer 7 C compiler complains that end-of-loop
12551 code is not reached.
12552
12553 2003-06-17 Paul Eggert <eggert@twinsun.com>
12554
12555 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
12556 avoid warnings from picky compilers about redefinition of PARAMS.
12557
12558 2003-06-17 Paul Eggert <eggert@twinsun.com>
12559
12560 Version 1.875b.
12561
12562 * NEWS: Document 1.875b.
12563
12564 * lib/bbitset.h: Do not include config.h; that's the includer's job.
12565 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
12566 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
12567 Don't use 'index' in comments, as it's a builtin fn on some hosts.
12568 * lib/bitset_stats.c: Include gettext.h unconditionally, as
12569 per recent gettext manual's suggestion.
12570 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
12571 Use prototypes, not old-style definitions.
12572 * lib/lbitset.c (lbitset_unused_clear): Likewise.
12573 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
12574 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
12575 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
12576 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
12577 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
12578 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
12579 vbitset_or_and_cmp, vbitset_copy): Likewise.
12580
12581 * lib/libiberty.h: Do not include config.h; that's the includer's job.
12582 Do not include <stdlib.h>.
12583 (PARAMS): Define unconditionally for C89.
12584 (ATTRIBUTE_NORETURN): Remove.
12585 (ATTRIBUTE_UNUSED): Define unconditionally.
12586
12587 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
12588 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
12589 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
12590 * lib/vbitset.c, lib/vbitset.h: New files.
12591 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
12592 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
12593 from libbitset.
12594
12595 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
12596 `How Can I Reset @code{yyparse}', since texinfo does not allow
12597 arbitrary @ in node names.
12598
12599 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
12600 shouldn't be needed according to the gettext 0.12.1 documentation
12601 but which seem to be needed anyway: codeset.m4 glibc21.m4
12602 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
12603 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
12604 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
12605
12606 * lib/.cvsignore: Add stdbool.h.
12607 * m4/.cvsignore: Add nls.m4, po.m4.
12608
12609 Upgrade to CVS gnulib.
12610 * stdbool_.h: File renamed from stdbool.h.in.
12611 * configure.ac (AM_STDBOOL_H): Invoke this instead of
12612 AC_HEADER_STDBOOL.
12613 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
12614 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
12615 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
12616 (MOSTLYCLEANFILES): New var.
12617 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
12618 (stdbool.h): New rule.
12619 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
12620 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
12621 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
12622 m4/quote.m4: Upgrade to today's gnulib.
12623
12624 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
12625 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
12626 the tests right now.
12627 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
12628 yyerror are declared before use; C99 requires this.
12629
12630 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12631
12632 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
12633 first.
12634 (yyrecoverSyntaxError): Correct the logic for setting and testing
12635 yyerrState.
12636 Correct comment on handling EOF.
12637 Allow states with only a default reduction, rather than failing
12638 (I can't quite reconstruct why these were not allowed before).
12639
12640 Fixes to avoid problem that $-N rules in GLR parsers can cause
12641 buffer overruns, corrupting state.
12642
12643 * src/output.c (prepare_rules): Output max_left_semantic_context
12644 definition.
12645 * src/reader.h (max_left_semantic_context): New variable declaration.
12646 * src/scan-gram.l (max_left_semantic_context): Define.
12647 (handle_action_dollar): Update max_left_semantic_context.
12648 * data/glr.c (YYMAXLEFT): New definition.
12649 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
12650 (yyresolveAction): Ditto.
12651
12652 Fixes to problems with location handling in GLR parsers reported by
12653 Frank Heckenbach (2003/06/05).
12654
12655 * data/glr.c (YYLTYPE): Make trivial if locations not used.
12656 (YYRHSLOC): Add parentheses, and define only if locations used.
12657 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
12658 locations not used.
12659 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
12660 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
12661
12662 * tests/cxx-type.at: Exercise location information; update tests
12663 to differentiate output with and without locations.
12664 Remove forward declarations of yylex and yyerror---caused errors
12665 because default YYLTYPE not yet defined.
12666 Change semantic actions to compute strings, rather than printing
12667 them directly (to test proper passing of semantics values). Change
12668 output to prefix notation and update test data and expected results.
12669 (yylex): Track locations.
12670 (stmtMerge): Return value rather than printing, and include arguments
12671 in value.
12672
12673 2003-06-03 Paul Eggert <eggert@twinsun.com>
12674
12675 Avoid warnings generated by GCC 2.95.4 when Bison is
12676 configured with --enable-gcc-warnings.
12677 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
12678 yy::]b4_parser_class_name[::translate_,
12679 yy::Stack::operator[] (unsigned),
12680 yy::Stack::operator[] (unsigned) const,
12681 yy::Slice::operator[] (unsigned),
12682 yy::Slice::operator[] (unsigned) const):
12683 Rename local vars to avoid warnings.
12684 * tests/glr-regression.at (Improper handling of embedded actions
12685 and $-N in GLR parsers): Remove unused local variable from yylex.
12686 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
12687 (void) as arg when not pure, since we now assume C89 when building
12688 Bison. Pacify GCC by using parameter.
12689
12690 2003-06-02 Paul Eggert <eggert@twinsun.com>
12691
12692 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
12693 yy::Location::lines, yy::Location::columns): Rename arguments
12694 to avoid shadowing; this removes a warning generated by GCC 3.3.
12695
12696 2003-06-01 Paul Eggert <eggert@twinsun.com>
12697
12698 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
12699 to g++, as GCC 3.3 complains if you do it.
12700 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
12701 everything that WARNING_CFLAGS has, except omit warnings
12702 not suitable for C++.
12703 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
12704 * tests/atlocal.in (CXXFLAGS): New var.
12705 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
12706
12707 Fix a GLR parser bug I reported in February; see
12708 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
12709 The problem was that GLR parsers did not conform to the C standard,
12710 because actions like { $1 = $2 + $3; } expanded to expressions
12711 that invoked YYFILL in separate subexpressions, and YYFILL assigned
12712 to a local variable. The C standard says that expressions
12713 like (var = f ()) + (var = f ()) have undefined behavior.
12714 Another problem was that GCC sometimes issues warnings that
12715 yyfill and its parameters are unused.
12716
12717 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
12718 as possibly unused.
12719 (yyfill): New function.
12720 (YYFILL): Use it.
12721 (yyuserAction): Change type of yynormal to bool, so that it matches
12722 the new yyfill signature. Mark it as possibly unused.
12723
12724
12725 Follow up on a bug I reported in February, where a Bison-generated
12726 parser can loop. Provide a test case and a fix for yacc.c. I
12727 don't have a fix for lalr1.cc or for glr.c, unfortunately.
12728 The original bug report is in:
12729 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
12730
12731 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
12732 macro's size was becoming unwieldy.
12733 (yyerrlab): Do not discard an empty lookahead symbol, as this
12734 might destroy garbage.
12735 (yyerrorlab): New label, with the old contents of YYERROR,
12736 plus the following change: pop the stack of rhs corresponding
12737 to the production that invoked YYERROR. That is how Yacc
12738 behaves, and POSIX requires this behavior.
12739 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
12740 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
12741 Define 'alarm' to do nothing if unistd.h is not available.
12742 Add a new rule "exp: '-' error;" to test the above change to
12743 data/yacc.c. Use 'alarm' to abort any test taking longer than
12744 10 seconds, as it's probably looping.
12745 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
12746 Also, the new yacc.c generates two fewer diagnostics for an
12747 existing test.
12748
12749 2003-05-24 Paul Eggert <eggert@twinsun.com>
12750
12751 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
12752 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
12753 This fixes a problem reported by John Bowman when the Compaq/HP
12754 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
12755 -ansi -Wall -gall).
12756 * data/yacc.c (union yyalloc): Likewise.
12757 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
12758
12759 Switch from 'int' to 'bool' where that makes sense.
12760
12761 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
12762 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
12763 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
12764 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
12765 Return or accept bool, not int. All callers changed.
12766 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
12767 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
12768 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
12769 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
12770 bitset_or_and_cmp_): Likewise.
12771 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
12772 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
12773 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
12774 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
12775 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
12776 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
12777 bitset_stats_or_and_cmp): Likewise.
12778 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
12779 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
12780 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
12781 ebitset_xor_cmp): Likewise.
12782 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
12783 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
12784 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
12785 lbitset_xor_cmp): Likewise.
12786 * lib/bbitset.h: Include <stdbool.h>.
12787 (struct bitset_vtable): The following members now return bool, not
12788 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
12789 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
12790 or_and_cmp).
12791 * src/conflicts.c (count_rr_conflicts): Likewise.
12792 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
12793 All uses changed.
12794 * lib/ebitset.c (ebitset_obstack_init): Likewise.
12795 * lib/lbitset.c (lbitset_obstack_init): Likewise.
12796 * src/getargs.c (debug_flag, defines_flag, locations_flag,
12797 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12798 graph_flag): Likewise.
12799 * src/getargs.h (debug_flag, defines_flag, locations_flag,
12800 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12801 graph_flag): Likewise.
12802 * src/output.c (error_verbose): Likewise.
12803 * src/output.h (error_verbose): Likewise.
12804 * src/reader.c (start_flag, typed): Likewise.
12805 * src/reader.h (typed): Likewise.
12806 * src/getargs.c (LOCATIONS_OPTION): New constant.
12807 (long_options, getargs): Use it.
12808 * src/lalr.c (build_relations): Use bool, not int.
12809 * src/nullable.c (nullable_compute): Likewise.
12810 * src/print.c (print_reductions): Likewise.
12811 * src/tables.c (action_row, pack_vector): Likewise.
12812 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
12813 * src/output.c (prepare): Use it.
12814 * src/output.c (token_definitions_output,
12815 symbol_destructors_output, symbol_destructors_output): Use string,
12816 not boolean integer, to keep track of whether to output separator.
12817 * src/print_graph.c (print_core): Likewise.
12818 * src/state.c (state_rule_lookaheads_print): Likewise.
12819
12820 * config/install-sh: Sync from automake 1.7.5.
12821
12822 2003-05-14 Paul Eggert <eggert@twinsun.com>
12823
12824 * src/parse-gram.y (rules_or_grammar_declaration): Require a
12825 semicolon after a grammar declaration, in the interest of possible
12826 future changes to the Bison input language.
12827 Do not allow a stray semicolon at the start of the grammar.
12828 (rhses.1): Allow one or more semicolons after any rule, including
12829 just before "|" as required by POSIX.
12830 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
12831 grammar.
12832
12833 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
12834
12835 %parse-param support for lalr1.cc.
12836
12837 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
12838 b4_cc_constructor_calls, b4_cc_constructor_call,
12839 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
12840 definitions.
12841 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
12842 parse-param arguments.
12843 (yy::b4_parser_class_name): Declare instance variables to
12844 hold parse-param arguments.
12845 * tests/calc.at: s/value/semantic_value/ because value clashes
12846 with a member of yy::b4_parser_class_name. Adjust C++ code
12847 to handle %parse-param. Enable %parse-param test in C++.
12848
12849 2003-05-12 Paul Eggert <eggert@twinsun.com>
12850
12851 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
12852 English a bit. Fix fclose typo. Change "const char" to "char
12853 const", and use ANSI C rather than K&R for "main". Suggest
12854 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
12855 and suggest yy_switch_to_buffer.
12856
12857 2003-05-05 Paul Eggert <eggert@twinsun.com>
12858
12859 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
12860 C89. This avoids a diagnostic on compilers that define __STDC__
12861 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
12862 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
12863
12864 2003-05-03 Paul Eggert <eggert@twinsun.com>
12865
12866 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
12867 Do not overrun array bounds.
12868 This should fix a bug reported today by Olatunji Oluwabukunmi in
12869 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
12870
12871 2003-04-29 Akim Demaille <akim@epita.fr>
12872
12873 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
12874 * src/getargs.c, src/getargs.h: here, as bool, not int.
12875 (nondeterministic_parser): New.
12876 * src/parse-gram.y, src/scan-gram.l: Support
12877 %nondeterministic-parser.
12878 * src/output.c (prepare): Use nondeterministic_parser instead
12879 of glr_parser where appropriate.
12880 * src/tables.c (conflict_row, action_row, save_row)
12881 (token_actions, token_actions, pack_vector): Ditto.
12882
12883 2003-04-29 Akim Demaille <akim@epita.fr>
12884
12885 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
12886
12887 2003-04-29 Akim Demaille <akim@epita.fr>
12888
12889 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
12890 with %pure-parser and %locations to exercise the patch from Yakov
12891 Markovitch below.
12892
12893 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
12894
12895 * data/yacc.c: (b4_lex_param): Corrected for the case where
12896 %lex-param is provided and %pure-parser isn't.
12897
12898 2003-04-27 Paul Eggert <eggert@twinsun.com>
12899
12900 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
12901 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
12902 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
12903 if it is not defined.
12904 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
12905
12906 2003-04-26 Paul Eggert <eggert@twinsun.com>
12907
12908 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
12909 Declare to be of type suitable for the ninf value itself, not of
12910 type suitable for the corresponding table, since the latter might
12911 be unsigned but the ninf value might be negative. This fixes a
12912 bug reported by Alexandre Duret-Lutz in
12913 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
12914
12915 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
12916 invokes it. We shouldn't invoke it twice because it will attempt
12917 to put error.o in the archive twice. This fixes a glitch reported
12918 by Martin Mokrejs in
12919 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
12920
12921 2003-04-21 Paul Eggert <eggert@twinsun.com>
12922
12923 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
12924 to gnulib.
12925
12926 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
12927
12928 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
12929 Fix obvious typo that results in uncompilable GLR parsers
12930 when both %pure-parser and %locations are used. (trivial change)
12931
12932 2003-04-17 Paul Eggert <eggert@twinsun.com>
12933
12934 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
12935 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
12936 Do not insert the expected token via unput, as this runs afoul
12937 of a POSIX-compatibility bug in flex 2.5.31.
12938 All uses changed to BEGIN the parent state,
12939 since we no longer insert the expected token via unput.
12940 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
12941 that is no longer emitted after the above change.
12942
12943 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
12944 the first one. This change is from Paul Hilfinger, and it fixes
12945 regression reported by Werner Lemberg in
12946 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
12947
12948 (resolve_sr_conflict): Don't invoke state_errs_set
12949 unless one or more tokens have been explicitly made errors.
12950 Otherwise, the above change causes Bison to abort.
12951
12952 * tests/existing.at (GNU pic Grammar): New test case, taken from
12953 Lemberg's email.
12954
12955 2003-03-31 Akim Demaille <akim@epita.fr>
12956
12957 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
12958
12959 2003-03-31 Akim Demaille <akim@epita.fr>
12960
12961 * src/output.c (prepare_symbols): Avoid trailing spaces in the
12962 output.
12963
12964 2003-03-31 Akim Demaille <akim@epita.fr>
12965
12966 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
12967 From Paul Hilfinger.
12968
12969 2003-03-29 Akim Demaille <akim@epita.fr>
12970
12971 * m4/error.m4: Do not put under dynamic conditions some code which
12972 expansion is under static control.
12973
12974 2003-03-29 Akim Demaille <akim@epita.fr>
12975
12976 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
12977
12978 2003-03-29 Akim Demaille <akim@epita.fr>
12979
12980 * doc/bison.texinfo (Strings are Destroyed): New.
12981
12982 2003-03-13 Paul Eggert <eggert@twinsun.com>
12983
12984 * .cvsignore: Add configure.lineno.
12985 * src/.cvsignore: Add yacc.
12986 * tests/.cvsignore: Add testsuite.log.
12987 * doc/fdl.texi: Sync with latest FSF version.
12988
12989 2003-03-12 Paul Eggert <eggert@twinsun.com>
12990
12991 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
12992 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
12993 cursor, instead of leaving it undefined. This fixes a bug
12994 reported by Tim Van Holder in
12995 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
12996 * tests/input.at (Torturing the Scanner): Test the scanner on
12997 an empty input file, which was Tim Van Holder's test case.
12998
12999 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
13000 <sys/resource.h> can be included, include sys/time.h and
13001 sys/times.h first, if available. This works around the SunOS
13002 4.1.4 porting bug reported by Bruce Becker in
13003 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
13004
13005 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
13006 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
13007 AC_HEADER_SYS_WAIT.
13008
13009 Merge changes from gnulib. This was prompted because the CVS
13010 snapshot didn't build on Solaris 7 due to strnlen problems.
13011
13012 These changes need to be merged back into gnulib:
13013 * lib/hash.c: Include <stdbool.h> unconditionally.
13014 * m4/onceonly.m4 (m4_quote): New macro.
13015 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
13016 Quote AC_FOREACH variable-expansions properly.
13017 The 2003-01-03 obstack.h change also needs merging.
13018 {end of changes requiring merging}
13019
13020 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
13021 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
13022 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
13023 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
13024 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
13025 New files, imported from gnulib.
13026 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
13027 above.
13028
13029 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
13030 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
13031 gnulib sources.
13032
13033 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
13034 Add.
13035 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
13036 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
13037 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
13038 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
13039 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
13040 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
13041 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
13042 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
13043 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
13044 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
13045 (jm_PREREQ_ARGMATCH): Remove.
13046 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
13047 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
13048
13049 * src/system.h: Include <stdbool.h> unconditionally.
13050
13051 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
13052 assuming at least C89 in the bitset code for some time now.
13053
13054 2003-03-03 Akim Demaille <akim@epita.fr>
13055
13056 * ro.po: New.
13057
13058 2003-03-02 Akim Demaille <akim@epita.fr>
13059
13060 * doc/bison.texinfo (Table of Symbols): Reactivate the
13061 documentation for %lex-param, and %parse-param.
13062
13063 2003-03-02 Akim Demaille <akim@epita.fr>
13064
13065 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
13066 generate verbose error messages.
13067 Use the number of tokens as an upper bound in yytname, as it
13068 cannot be a non terminal.
13069
13070 2003-03-02 Akim Demaille <akim@epita.fr>
13071
13072 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
13073 message.
13074
13075 2003-03-02 Akim Demaille <akim@epita.fr>
13076
13077 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
13078 Use them to exercise yycheck overrun.
13079 Based on Andrew Suffield's grammar.
13080
13081 2003-03-02 Akim Demaille <akim@epita.fr>
13082
13083 Create tests/local.at for Bison generic testing macros.
13084
13085 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
13086 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
13087 This new file.
13088 * tests/calc.at (AT_CHECK_CALC): Adjust.
13089 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
13090 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
13091 * tests/local.at: here.
13092 (AT_COMPILE_CXX): Tags the tests using it as c++.
13093 Ignore the test if CXX is not functional.
13094
13095 2003-03-01 Paul Eggert <eggert@twinsun.com>
13096
13097 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
13098 not loc->end, since loc->end might contain garbage and this leads
13099 to undefined behavior on some platforms.
13100 (id_loc, token_start): Use (IF_LINTed) initial values that do not
13101 depend on *loc, so that the reader doesn't give the the false
13102 impression that *loc is initialized.
13103 (<INITIAL>"%%"): Do not bother setting code_start, since its value
13104 does not survive the return.
13105
13106 2003-03-01 Akim Demaille <akim@epita.fr>
13107
13108 * src/scan-gram.l (code_start): Always initialize it when entering
13109 into yylex, as SC_EPILOGUE is activated *before* the corresponding
13110 yylex invocation. An alternative would be making it static, but
13111 then it starts with the second %%'s beginning, instead of its end.
13112
13113 2003-02-28 Paul Eggert <eggert@twinsun.com>
13114
13115 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
13116 around a UnixWare 7.1.1 porting bug reported by John Hughes in
13117 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
13118
13119 2003-02-26 Paul Eggert <eggert@twinsun.com>
13120
13121 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
13122 Remove Sequent/Pyramid discussion (nobody uses them any more).
13123 Merge VMS and MS-DOS discussion; these ports may well be dead
13124 but let's keep mentioning them for now. Put <> around email
13125 addresses. Add copyright notice.
13126
13127 2003-02-24 Paul Eggert <eggert@twinsun.com>
13128
13129 * data/glr.c (yy_reduce_print): yylineno -> yylno,
13130 to avoid collision with flex use of yylineno.
13131 Problem reported by Bruce Lilly in
13132 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
13133 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
13134 * data/yacc.c (yy_reduce_print): Likewise.
13135
13136 * config/depcomp: Sync with Automake 1.7.3.
13137
13138 2003-02-21 Akim Demaille <akim@epita.fr>
13139
13140 * data/lalr1.cc: Use temporary variables instead of casts to
13141 change integer types.
13142 Suggested by Paul Eggert.
13143
13144 2003-02-21 Akim Demaille <akim@epita.fr>
13145
13146 * doc/bison.texinfo: Use "location" consistently to refer to @n,
13147 to avoid confusions with lalr1.cc's notion of Position.
13148 Suggested by Paul Eggert.
13149
13150 2003-02-20 Akim Demaille <akim@epita.fr>
13151
13152 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
13153 before initial_columns.
13154 (location.hh): Use consistent variable names when defining the
13155 operator<<.
13156 Use "last" so that we subtract from Positions, not from unsigned.
13157
13158 2003-02-20 Akim Demaille <akim@epita.fr>
13159
13160 * data/lalr1.cc (position.hh): New subfile, including the extended
13161 and Doxygen'ed documentation of class Position.
13162 (location.hh): Use it.
13163 Document a` la Doxygen.
13164 With the help of Benoit Perrot.
13165
13166 2003-02-20 Akim Demaille <akim@epita.fr>
13167
13168 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
13169 AT_YACC_IF.
13170 Redefine AT_YYERROR_SEES_LOC_IF using it.
13171 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
13172 not defined.
13173 Don't use the location in yy::Parser::error_ and
13174 yy::Parser::print_ when not %locations.
13175 Activate more lalr1.cc tests.
13176
13177 2003-02-19 Akim Demaille <akim@epita.fr>
13178
13179 * data/lalr1.cc: When displaying a line number, be sure to make it
13180 an int.
13181
13182 2003-02-19 Akim Demaille <akim@epita.fr>
13183
13184 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
13185 Remove, useless.
13186 (YYABORT, YYACCEPT, YYERROR): New.
13187 * tests/calc.at: Renable the lalr1.cc test.
13188
13189 2003-02-19 Akim Demaille <akim@epita.fr>
13190
13191 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
13192 error recovery, mixing with/without pops and discarding of the
13193 lookahead.
13194 Exercise YYERROR.
13195 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
13196
13197 2003-02-17 Paul Eggert <eggert@twinsun.com>
13198
13199 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
13200 * tests/testsuite.at (AT_COMPILE): Use them.
13201 This fixes the testsuite problem reported by Robert Lentz in
13202 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
13203
13204 2003-02-12 Paul Eggert <eggert@twinsun.com>
13205
13206 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
13207 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
13208 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
13209 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
13210 Check for malloc failure, for consistency with yacc.c.
13211 (yytname_size): Remove, for consistency with yacc.c.
13212
13213 The bug still remains in data/lalr1.cc, as I didn't have time
13214 to fix it there.
13215
13216 2003-02-06 Akim Demaille <akim@epita.fr>
13217
13218 * configure.ac (GXX): Rename as...
13219 (CXX): this, to keep the original Autoconf semantics.
13220 Require 2.57.
13221 * data/lalr1.cc: Fix b4_copyright invocations.
13222 If YYDEBUG is not defined, don't depend upon name_ being defined.
13223 (location.hh): Include string and iostream.
13224 (Position::filename): New member.
13225 (Position::Position ()): New.
13226 (operator<< (Position)): New.
13227 (operator- (Position, int)): New.
13228 (Location::first, Location::last): Rename as...
13229 (Location::begin, Location::end): these, to mock the conventional
13230 iterator names.
13231 (operator<< (Location)): New.
13232 * tests/atlocal.in (CXX): New.
13233 * tests/testsuite.at (AT_COMPILE_CXX): New.
13234 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
13235 locations in a more synthetic way.
13236 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
13237 lalr1.cc is used.
13238 Adjust the C locations to match those from Emacs: first column is
13239 column 0.
13240 Change all the expected results.
13241 Conform to the GCS: simplify the locations when applicable.
13242 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
13243 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
13244 these CPP macros with the m4 macros new defined by...
13245 (AT_CHECK_PUSHDEFS): this, i.e.:
13246 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
13247 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
13248 New macros.
13249 (AT_CHECK_POPDEFS): Undefine them.
13250 (AT_CHECK_CALC_LALR1_CC): New.
13251 Use it for the first lalr1.cc test.
13252
13253 2003-02-04 Akim Demaille <akim@epita.fr>
13254
13255 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
13256 Location as is defined.
13257
13258 2003-02-04 Akim Demaille <akim@epita.fr>
13259
13260 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
13261 name_ being defined.
13262
13263 2003-02-03 Paul Eggert <eggert@twinsun.com>
13264
13265 * src/gram.h (start_symbol): Remove unused decl.
13266
13267 Use more-consistent naming conventions for local vars.
13268
13269 * src/derives.c (derives_compute): Change type of local var from
13270 int to rule_number.
13271 * src/gram.c (grammar_rules_partial_print): Likewise.
13272 * src/print.c (print_core): Likewise.
13273 * src/reduce.c (reduce_grammar_tables): Likewise.
13274
13275 * src/gram.c (grammar_dump): Change name of item_number *
13276 local var from r to rp.
13277 * src/nullable.c (nullable_compute): Likewise.
13278
13279 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
13280
13281 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
13282 for symbol or symbol_number var.
13283 * src/reader.c (grammar_start_symbol_set): Likewise.
13284 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
13285 Likewise.
13286 * src/state.c (transitions_to): Likewise.
13287 * src/state.h: Likewise.
13288 * src/tables.c (symbol_number_to_vector_number): Likewise.
13289
13290 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
13291 char * var.
13292
13293 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
13294 var.
13295
13296 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
13297 var.
13298
13299 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
13300 Use str, not s, for char * var. Use ch, not c, for character var.
13301 Use size for size var.
13302
13303 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
13304 char * var.
13305 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
13306 uniqstr var.
13307 * src/uniqstr.h: Likewise.
13308
13309 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
13310 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
13311 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
13312 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
13313 param to have same name as that of enum, so that we don't use
13314 "s" to stand for a non-state.
13315
13316 2003-02-02 Akim Demaille <akim@epita.fr>
13317
13318 * src/scan-skel.l: Scan more than one inert character per yylex
13319 invocation.
13320
13321 2003-02-01 Paul Eggert <eggert@twinsun.com>
13322
13323 Version 1.875a.
13324
13325 * po/LINGUAS: Add ms.
13326
13327 2003-01-30 Akim Demaille <akim@epita.fr>
13328
13329 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
13330
13331 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13332
13333 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
13334 of $1.
13335
13336 Changes in response to error report by S. Eken: GLR mode does not
13337 handle negative $ indices or $ indices in embedded rules correctly.
13338 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
13339
13340 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
13341 (b4_rhs_location): Ditto.
13342 (yyfill): New function to copy from stack tree into array
13343 incrementally.
13344 (yyuserAction): Modify to allow incremental move of semantic values
13345 to rhs array when in GLR mode.
13346 Define YYFILL to use in user-defined actions to fill semantic array
13347 as needed.
13348 Remove dummy use of yystack, as there is now a guaranteed use.
13349 (yydoAction): Modify to allow incremental move of semantic values
13350 to rhs array when in GLR mode.
13351 (yyresolveAction): Ditto.
13352 (yyglrShiftDefer): Update comment.
13353 (yyresolveStates): Use X == NULL for pointers, not !X.
13354 (yyglrReduce): Ditto.
13355 (yydoAction): Ditto
13356
13357 * tests/glr-regr1.at: Rename to ...
13358 * tests/glr-regression.at: Add new regression test for the problems
13359 described above (adapted from S. Eken).
13360 Update copyright notice.
13361 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
13362 * tests/Makefile.am: Ditto.
13363
13364 2003-01-28 Paul Eggert <eggert@twinsun.com>
13365
13366 * data/lalr1.cc: Do not use @output_header_name@ unless
13367 b4_defines_flag is set. This fixes two bugs reported by
13368 Tim Van Holder in
13369 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
13370 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
13371
13372 2003-01-21 Paul Eggert <eggert@twinsun.com>
13373
13374 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
13375 we don't need to worry about yyerrlab1 being reported as an
13376 "unused label" by non-GCC C compilers. The downside is that if
13377 locations are used then a couple of statements are duplicated each
13378 time YYERROR is invoked, but the upside is that the warnings
13379 should vanish.
13380 (yyerrlab1): Move code to YERROR.
13381 (yyerrlab2): Remove. Change uses back to yyerrlab1.
13382 This reverts some of the 2002-12-27 change.
13383
13384 2003-01-17 Paul Eggert <eggert@twinsun.com>
13385
13386 * src/output.c (symbol_printers_output): Fix typo that led
13387 to core dump. Problem reported by Antonio Rus in
13388 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
13389
13390 2003-01-13 Akim Demaille <akim@epita.fr>,
13391 Quoc Peyrot <chojin@lrde.epita.fr>,
13392 Robert Anisko <anisko_r@lrde.epita.fr>
13393
13394 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
13395 when the stacks contain one element, as the loop would otherwise
13396 free the last state, and then use the top state (the one we just
13397 popped). This means that the initial elements will not be freed
13398 explicitly, as is the case in yacc.c; it is not a problem, as
13399 these elements have fake values.
13400
13401 2003-01-11 Paul Eggert <eggert@twinsun.com>
13402
13403 * NEWS: %expect-violations are now just warnings, reverting
13404 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
13405 bootstrapping problem reported by Matthias Klose; see
13406 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
13407 * src/conflicts.c (conflicts_print): Likewise.
13408 * tests/conflicts.at (%expect not enough, %expect too much,
13409 %expect with reduce conflicts): Likewise.
13410 * doc/bison.texinfo (Expect Decl): Document this. Also mention
13411 that the warning is enabled if the number of conflicts changes
13412 (not necessarily increases).
13413
13414 * src/getargs.c (version): Update copyright year.
13415
13416 2003-01-09 Akim Demaille <akim@epita.fr>
13417
13418 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
13419
13420 2003-01-08 Paul Eggert <eggert@twinsun.com>
13421
13422 * Makefile.maint (WGETFLAGS):
13423 New macro, containing "-C off" to disable proxy caches.
13424 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
13425 (rel-check): Use $(WGET) instead of wget.
13426
13427 2003-01-06 Paul Eggert <eggert@twinsun.com>
13428
13429 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
13430 the GLR paper of Scott, Johnstone and Hussain.
13431
13432 2003-01-04 Paul Eggert <eggert@twinsun.com>
13433
13434 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
13435 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
13436 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
13437 (EXTRA_LIBRARIES): New var, for liby.a.
13438 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
13439 (EXTRA_SCRIPTS): New var, for yacc.
13440
13441 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
13442 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
13443 Problem reported by Nelson H. F. Beebe.
13444
13445 2003-01-03 Paul Eggert <eggert@twinsun.com>
13446
13447 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
13448 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
13449 when compiling Bison 1.875's `bitset bset = obstack_alloc
13450 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
13451
13452 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
13453 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
13454 grow to a huge size with typical invocation.
13455
13456 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
13457 Use the pattern recommended by Autoconf 2.57, except also protect
13458 against double-definition.
13459 * src/system.h: Likewise.
13460 Portability issues reported by Nelson H. F. Beebe.
13461
13462 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
13463 All uses changed. Provide a definition in both C and C++.
13464 (yytrue, yyfalse): Define even if defined (__cplusplus).
13465
13466 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
13467 Reported by Nelson H. F. Beebe.
13468
13469 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
13470
13471 2003-01-02 Paul Eggert <eggert@twinsun.com>
13472
13473 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
13474 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
13475 Bug reported by Nelson H. F. Beebe.
13476
13477 2003-01-01 Paul Eggert <eggert@twinsun.com>
13478
13479 * Version 1.875.
13480
13481 2002-12-30 Paul Eggert <eggert@twinsun.com>
13482
13483 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
13484 Moved here from...
13485 (<INITIAL>","): Here. This causes stray "," to be treated
13486 more uniformly.
13487
13488 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
13489 last brace in braced code when not in Yacc mode, for compatibility
13490 with Bison 1.35. This resurrects the 2001-12-15 patch to
13491 src/reader.c.
13492
13493 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
13494 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
13495
13496 2002-12-28 Paul Eggert <eggert@twinsun.com>
13497
13498 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
13499 that of SYM's type. This fixes Debian bug 168069, reported by
13500 Thomas Olsson.
13501
13502 2002-12-28 Paul Eggert <eggert@twinsun.com>
13503
13504 Version 1.75f.
13505
13506 Switch back to the Yacc style of conflict reports, undoing some
13507 of the 2002-07-30 change.
13508 * doc/bison.texinfo (Understanding): Use Yacc style for
13509 conflict reports. Also, use new way of locating rules.
13510 * src/conflicts.c (conflict_report):
13511 Renamed from conflict_report_yacc, removing the old
13512 'conflict_report'. Translate the entire conflict report at once,
13513 so that we don't assume that "," has the same interpretation in
13514 all languages.
13515 (conflicts_output): Use Yacc-style conflict report for each state,
13516 instead of our more-complicated style.
13517 (conflicts_print): Use Yacc-style conflict report, except print
13518 the input file name when not emulating Yacc.
13519 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
13520 Conflicted Reduction, %expect not enough, %expect too much,
13521 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
13522 * tests/existing.at (GNU Cim Grammar): Likewise.
13523 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
13524
13525 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
13526 fatal): Don't invoke fflush; it's not needed and it might even be
13527 harmful for stdout, as stdout might not be open.
13528 * src/reduce.c (reduce_print): Likewise.
13529
13530 2002-12-27 Paul Eggert <eggert@twinsun.com>
13531
13532 Fix a bug where error locations were not being recorded correctly.
13533 This problem was originally reported by Paul Hilfinger in
13534 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
13535
13536 * data/yacc.c (yyparse): New local var yylerrsp, to record the
13537 top of the location stack's error locations.
13538 (yyerrlab): Set it. When discarding a token, push its location
13539 onto yylerrsp so that we don't lose track of the error's end.
13540 (yyerrlab1): Now is only the target of YYERROR, so that we can
13541 properly record the location of the action that failed. For GCC
13542 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
13543 GCC warning about yyerrlab1 being unused if YYERROR is unused.
13544 (yyerrlab2): New label, which yyerrlab now falls through to.
13545 Compute the error's location by applying YYLLOC_DEFAULT to
13546 the locations of all the symbols that went into the error.
13547 * doc/bison.texinfo (Location Default Action): Mention that
13548 YYLLOC_DEFAULT is also invoked for syntax errors.
13549 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
13550 Error locations include the locations of all the tokens that were
13551 discarded, not just the last token.
13552
13553 2002-12-26 Paul Eggert <eggert@twinsun.com>
13554
13555 * src/files.c: Include quote.h.
13556 (compute_output_file_names): Warn if we detect conflicting
13557 outputs to the same file. This should catch the misunderstanding
13558 exemplified by Debian Bug 165349, reported by Bruce Stephens..
13559
13560 * src/conflicts.c (conflicts_print): If the user specifies
13561 "%expect N", report an error if there are any reduce/reduce
13562 conflicts. This is what the manual says should happen.
13563 This fixes Debian bug 130890, reported by Anthony DeRobertis.
13564 * tests/conflicts.at (%expect with reduce conflicts): New test.
13565
13566 Don't use m4_include on relative file names, as it doesn't work as
13567 desired if there happens to be a file with that name under ".".
13568
13569 * m4sugar/version.m4: Remove; it was included but it wasn't used.
13570 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
13571 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
13572 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
13573 * src/output.c (output_skeleton): Use full path names when
13574 specifying a file to include; don't rely on include path, as
13575 it's unreliable when the working file contains a file with
13576 that name.
13577
13578 2002-12-25 Paul Eggert <eggert@twinsun.com>
13579
13580 Remove obsolete references to bison.simple and bison.hairy.
13581 Problem mentioned by Aubin Mahe in
13582 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
13583 * data/glr.c: Comment fix.
13584 * doc/bison.1: Remove references. Also, mention "yacc".
13585
13586 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
13587 with -g option.
13588
13589 * src/parse-gram.y (declaration): Use enum "report_states" rather
13590 than its numeric value 1.
13591
13592 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
13593 opening a new one. This fixes Debian bug 165349, reported by
13594 Bruce Stephens.
13595
13596 2002-12-24 Paul Eggert <eggert@twinsun.com>
13597
13598 Version 1.75e.
13599
13600 * Makefile.maint (cvs-update): Don't assume that the shell
13601 supports $(...), as Solaris sh doesn't.
13602
13603 * src/parse-gram.y (lloc_default): Remove test for empty
13604 nonterminals at the end, since it didn't change the result.
13605
13606 2002-12-24 Paul Eggert <eggert@twinsun.com>
13607
13608 If the user does not define YYSTYPE as a macro, Bison now declares it
13609 using typedef instead of defining it as a macro. POSIX requires this.
13610 For consistency, YYLTYPE is also declared instead of defined.
13611
13612 %union directives can now have a tag before the `{', e.g., the
13613 directive `%union foo {...}' now generates the C code
13614 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
13615 The default union tag is `YYSTYPE', for compatibility with Solaris 9
13616 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
13617 instead of `yyltype'.
13618
13619 `yystype' and `yyltype' are now obsolescent macros instead of being
13620 typedefs or tags; they are no longer documented and will be
13621 withdrawn in a future release.
13622
13623 * data/glr.c (b4_location_type): Remove.
13624 (YYSTYPE): Renamed from yystype.
13625 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
13626 (struct YYLTYPE): Renamed from struct yyltype.
13627 (YYLTYPE): Renamed from yyltype.
13628 (yyltype, yystype): New (and obsolescent) macros,
13629 for backward compatibility.
13630 * data/yacc.c: Likewise.
13631
13632 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
13633 does not specify a union tag. This is for compatibility with
13634 Solaris 9 yacc.
13635
13636 * src/parse-gram.y (add_param): 2nd arg is now char * not char
13637 const *, since it is now modified by stripping surrounding { }.
13638 (current_braced_code): Remove.
13639 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
13640 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
13641 trailing " {...}". Now of type <chars>.
13642 (grammar_declaration): Adjust to bundled tokens.
13643 (code_content): Remove; stripping is now done by add_param.
13644 (print_token_value): Print contents of bundled tokens.
13645 (token_name): New function.
13646
13647 * src/reader.h (braced_code, current_braced_code): Remove.
13648 (token_name): New decl.
13649
13650 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
13651 token_type, not braced_code code_kind. All uses changed.
13652 (SC_PRE_CODE): New state, for scanning after a keyword that
13653 has (or usually has) an immediately-following braced code.
13654 (token_type): New local var, to keep track of which token type
13655 to return when scanning braced code.
13656 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
13657 <INITIAL>"%parse-param", <INITIAL>"%printer",
13658 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
13659 instead of returning a token type immediately.
13660 (<INITIAL>"{"): Set token type.
13661 (<SC_BRACED_CODE>"}"): Use it.
13662 (handle_action_dollar, handle_action_at): Now returns bool
13663 indicating success. Fail if ! current_rule; this prevents a core dump.
13664 (handle_symbol_code_dollar, handle_symbol_code_at):
13665 Remove; merge body into caller.
13666 (handle_dollar, handle_at): Complain in invalid contexts.
13667
13668 * NEWS, doc/bison.texinfo: Document the above.
13669 * NEWS: Fix years and program names in copyright notice.
13670
13671 2002-12-17 Paul Eggert <eggert@twinsun.com>
13672
13673 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
13674 Reporting, Table of Symbols): Omit mentions of %lex-param and
13675 %parse-param from the documentation for now.
13676
13677 2002-12-15 Paul Eggert <eggert@twinsun.com>
13678
13679 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
13680 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
13681 lookahead symbol, and which sets yychar in parser actions) and it
13682 disagreed with the Bison documentation. Bug
13683 reported by Andrew Walrond.
13684
13685 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
13686 as the caller now does that.
13687 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
13688 (YYEMPTY): Parenthesize right hand side, since others use it.
13689 (yyparse): Don't assume that our generated code is the only code
13690 that sets yychar.
13691
13692 2002-12-13 Paul Eggert <eggert@twinsun.com>
13693
13694 Version 1.75d.
13695
13696 POSIX requires a "yacc" command.
13697 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
13698 (MOSTLYCLEANFILES): Add yacc.
13699 (yacc): New rule.
13700 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
13701 as an alias for bison y.
13702
13703 * po/LINGUAS: Add da.
13704
13705 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
13706 problem with latest <getopt.h>.
13707 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
13708
13709 * doc/fdl.texi: Upgrade to 1.2.
13710 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
13711 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
13712 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
13713 gnulib.
13714 * config/install-sh: Sync with autotools.
13715
13716 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
13717 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
13718 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
13719 locations are requested.
13720 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
13721 locations are requested.
13722
13723 2002-12-12 Paul Eggert <eggert@twinsun.com>
13724
13725 Remove unportable casts and storage allocation tricks.
13726 While we're at it, remove almost all casts, since they
13727 usually aren't needed and are a sign of trouble.
13728
13729 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
13730
13731 * src/derives.c (derives_compute): Do not subtract NTOKENS from
13732 the pointer DSET returned by malloc; this isn't portable.
13733 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
13734 Similarly for DERIVES.
13735 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
13736 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
13737 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
13738
13739 * src/derives.c (derives_compute): Do not bother invoking
13740 int_of_rule_number, since rule numbers are integers.
13741
13742 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
13743 rather than XMALLOC (char, N).
13744
13745 * src/files.c (filename_split): Rewrite to avoid cast.
13746
13747 * src/gram.h (symbol_number_as_item_number,
13748 item_number_as_symbol_number, rule_number_as_item_number,
13749 item_number_as_rule_number):
13750 Now inline functions rather than macros, to avoid casts.
13751 * src/state.h (state_number_as_int): Likewise.
13752 * src/tables.c (state_number_to_vector_number,
13753 symbol_number_to_vector_number): Likewise.
13754
13755 * src/gram.h (int_of_rule_number): Remove; no longer used.
13756
13757 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
13758 since the resulting storage is always stored into.
13759
13760 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
13761 where it's needed.
13762
13763 * src/muscle_tab.c (muscle_m4_output):
13764 Now inline. Return bool, not int.
13765 * src/state.c (state_compare): Likewise.
13766 * src/symtab.c (symbol_check_defined,
13767 symbol_check_alias_consistency, symbol_pack, symbol_translation,
13768 hash_compare_symbol, hash_symbol):
13769 Likewise.
13770 * src/uniqstr.c (uniqstr_print): Likewise.
13771 * src/muscle_tab.c (muscle_m4_output_processor):
13772 New function, to avoid casts.
13773 * src/state.c (state_comparator, stage_hasher): Likewise.
13774 * src/symtab.c (symbol_check_defined_processor,
13775 symbol_check_alias_consistency_processor, symbol_pack_processor,
13776 symbol_translation_processor, hash_symbol_comparator,
13777 hash_symbol_hasher): Likewise.
13778 * src/uniqstr.c (uniqstr_print_processor): Likewise.
13779 * src/muscle_tab.c (muscles_m4_output):
13780 Use new functions instead of casting old functions unportably.
13781 * src/state.c (state_hash_new): Likewise.
13782 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
13783 symbols_token_translations_init):
13784 Likewise.
13785 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
13786
13787 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
13788 var instead of casting to long, to avoid casts.
13789 (prepare_states): Use MALLOC rather than alloca, so that we don't
13790 have to worry about alloca.
13791 * src/state.c (state_hash_lookup): Likewise.
13792
13793 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
13794 local var instead of casting to unsigned char, to avoid casts.
13795
13796 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
13797 STATE_ALLOC): Remove.
13798 (transitions_new, errs_new, reductions_new, state_new): Use malloc
13799 rather than calloc, and use offsetof to avoid allocating slightly
13800 too much storage.
13801 (state_new): Initialize all members.
13802
13803 * src/state.c (state_hash): Use unsigned accumulator, not signed.
13804
13805 * src/symtab.c (symbol_free): Remove; unused.
13806 (symbol_get): Remove cast in lhs of assignment.
13807 (symbols_do): Now static. Accept generic arguments, not
13808 hashing-related ones.
13809
13810 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
13811 (symbol_processor): Remove.
13812 (symbols_do): Remove decl; now static.
13813
13814 * src/system.h (alloca): Remove; decl no longer needed.
13815 (<stddef.h>): Include, for offsetof.
13816 (<inttypes.>, <stdint.h>): Include if available.
13817 (uintptr_t): New type, if system lacks it.
13818 (CALLOC, MALLOC, REALLOC): New macros.
13819 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
13820 new macros.
13821
13822 * src/tables.c (table_size): Now int, to pacify GCC.
13823 (table_grow, table_ninf_remap): Use signed table size.
13824 (save_row): Don't bother initializing locals when not needed.
13825 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
13826 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
13827
13828 * src/vcg.h: Correct misspellings.
13829
13830 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
13831
13832
13833 * src/getargs.c (getargs): Don't assume EOF == -1.
13834
13835 2002-12-09 Paul Eggert <eggert@twinsun.com>
13836
13837 Change identifier spellings to avoid collisions with names
13838 that are reserved by POSIX.
13839
13840 Don't use names ending in _t, since POSIX reserves them.
13841 For consistency, remove _e and _s endings -- they're weren't
13842 needed to remove ambiguity. All uses changed.
13843 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
13844 turn was just renamed from struniq_t.
13845 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
13846 which in turn was just renamed from struniq_processor_t.
13847 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
13848 in turn was renamed from hash_compare_struniq_t.
13849 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
13850 (state_list): Renamed from state_list_t.
13851 * src/assoc.h (assoc): Renamed from assoc_t.
13852 * src/conflicts.c (enum conflict_resolution): Renamed from
13853 enum conflict_resolution_e.
13854 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
13855 (rule_list): Renamed from rule_list_t.
13856 * src/getargs.h (enum trace): Renamed from enum trace_e.
13857 (enum report): Renamed from enum report_e.
13858 * src/gram.h (item_number): Renamed from item_number_t.
13859 (rule_number): Renamed from rule_number_t.
13860 (struct rule_s): Remove the "rule_s" part; not used.
13861 (rule): Renamed from rule_t.
13862 (rule_filter): Renamed from rule_filter_t.
13863 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
13864 (goto_list): Renamed from goto_list_t.
13865 * src/lalr.h (goto_number): Renamed from goto_number_t.
13866 * src/location.h (location): Renamed from location_t.
13867 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
13868 and moved here from:
13869 * src/muscle_tab.h (muscle_entry_t): here.
13870 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
13871 (rule_list): Renamed from rule_list_t.
13872 * src/print_graph.c (static_graph): Renamed from graph.
13873 * src/reader.h (braced_code): Renamed from braced_code_t.
13874 Remove brace_code_e tag.
13875 * src/relation.h (relation_node): Renamed from relation_node_t.
13876 (relation_nodes): Renamed from relation_nodes_t.
13877 (relation): Renamed from relation_t.
13878 * src/state.h (state_number): Renamed from state_number_t.
13879 (struct state): Renamed from struct state_s.
13880 (state): Renamed from state_t.
13881 (transitions): Renamed from transitions_t. Unused (and
13882 misspelled) transtion_s tag removed.
13883 (errs): Renamed from errs_t. Unused errs_s tag removed.
13884 (reductions): Renamed from reductions_t. Unused tag
13885 reductions_s removed.
13886 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
13887 (struct symbol_list): Renamed from struct symbol_list_s.
13888 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
13889 (struct symbol): Renamed from struct symbol_s.
13890 (symbol): Renamed from symbol_t.
13891 * src/tables.c (vector_number): Renamed from vector_number_t.
13892 (action_number): Renamed from action_t.
13893 * src/tables.h (base_number): Renamed from base_t.
13894 * src/vcg.h (enum color): Renamed from enum color_e.
13895 (enum textmode): Renamed from enum textmode_e.
13896 (enum shape): Renamed from enum shape_e.
13897 (struct colorentry): Renamed from struct colorentry_s.
13898 (struct classname): Renamed from struct classname_s.
13899 (struct infoname): Renamed from struct infoname_s.
13900 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
13901 (enum decision): Renamed from enum decision_e.
13902 (enum orientation): Renamed from enum orientation_e.
13903 (enum alignment): Renamed from enum alignment_e.
13904 (enum arrow_mode): Renamed from enum arrow_mode_e.
13905 (enum crossing_type): Renamed from enum crossing_type_e.
13906 (enum view): Renamed from enum view_e.
13907 (struct node): Renamed from struct node_s.
13908 (node): Renamed from node_t.
13909 (enum linestyle): Renamed from enum linestyle_e.
13910 (enum arrowstyle): Renamed from enum arrowstyle_e.
13911 (struct edge): Renamed from struct edge.
13912 (edge): Renamed from edge_t.
13913 (struct graph): Renamed from struct graph_s.
13914 (graph): Renamed from graph_t.
13915 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
13916 Rename value_t -> value.
13917 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
13918 value_t_as_yystype -> value_as_yystype.
13919
13920 Don't include <errno.h> in the mainstream code, since it
13921 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
13922 * lib/get-errno.c, lib/get-errno.h: New files.
13923 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
13924 get-errno.c.
13925 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
13926 * src/output.c (output_skeleton): Likewise.
13927 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
13928 instead of errno.
13929 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
13930 Likewise.
13931 (handle_action_dollar, handle_action_at): Likewise.
13932 * src/system.h: Do not include <errno.h>.
13933 (TAB_EXT): Renamed from EXT_TAB.
13934 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
13935
13936 Avoid str[a-z]*, since <string.h> reserves that name space.
13937 Change all instances of "struniq" in names to "uniqstr", and
13938 likewise for "STRUNIQ" and "UNIQSTR".
13939 * src/uniqstr.c: Renamed from src/struniq.c.
13940 * src/uniqstr.h: Renamed from src/struniq.h.
13941 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
13942 * src/files.c (strsuffix): Remove; unused.
13943 (concat2): Renamed from stringappend. Now static.
13944 * src/files.h (strsuffix, stringappend): Remove; unused.
13945 * src/parse-gram.y (<chars>): Renamed from <string>.
13946 (<uniqstr>): Renamed from <struniq>.
13947 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
13948 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
13949 (struct graph_s.expand): Renamed from struct graph_s.stretch.
13950 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
13951 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
13952 (N_EXPAND): Renamed from N_STRETCH.
13953
13954 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
13955 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
13956 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
13957 Remove; unused.
13958 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
13959 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
13960 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
13961 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
13962 (BASE_MAXIMUM): Renamed from BASE_MAX.
13963 (BASE_MINIMUM): Renamed from BASE_MIN.
13964 (ACTION_MAX): Remove; unused.
13965 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
13966 Unnecessary casts removed from above defines.
13967
13968
13969 Fix misspelling in names.
13970 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
13971 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
13972 G_NODE_ALIGNEMENT.
13973
13974
13975 * lib/timevar.c (timevar_report): Renamed from time_report,
13976 for consistency with other names.
13977 * lib/timevar.h (timevar_report): New decl.
13978 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
13979
13980
13981 Sort include-file uses.
13982
13983 Reorder all include files under src to be in the order "system.h".
13984 then the ../lib include files in angle brackets (alphabetized),
13985 then the . include files in double-quotes (alphabetized). Fix
13986 dependency breakages encountered in this process, as follows:
13987 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
13988 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
13989 * src/state.h: Include "symtab.h".
13990
13991 2002-12-08 Paul Eggert <eggert@twinsun.com>
13992
13993 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
13994 since this causes problems when __file__ contains character
13995 sequences like "@" that are treated specially by src/scan-skel.l.
13996 Instead, just use the file's basename. This fixes the bug
13997 reported by Martin Mokrejs in
13998 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
13999
14000 2002-12-06 Paul Eggert <eggert@twinsun.com>
14001
14002 Add support for rules that do not have trailing semicolons, as
14003 POSIX requires. Improve the quality of locations in Bison
14004 diagnostics.
14005
14006 * src/location.c: Include <quotearg.h>.
14007 (empty_location): Now const.
14008 (location_print): New function. Follow the recommendation of the
14009 GNU Coding Standards for locations that span file boundaries.
14010 * src/location.h: Do not include <quotearg.h>; no longer needed.
14011 (boundary): New type.
14012 (location_t): Use it. This allows locations to span file boundaries.
14013 All member uses changed: file -> start.file or end.file (as needed),
14014 first_line -> start.line, first_column -> start.column,
14015 last_line -> end.line, last_column -> end.column.
14016 (equal_boundaries): New function.
14017 (LOCATION_RESET, LOCATION_STEP): Remove.
14018 (LOCATION_PRINT): Remove. All callers changed to use location_print.
14019 (empty_location): Now const.
14020 (location_print): New decl.
14021 * src/parse-gram.y (lloc_default): New function, which handles
14022 empty locations more accurately.
14023 (YYLLOC_DEFAULT): Use it.
14024 (%token COLON): Remove.
14025 (%token ID_COLON): New token.
14026 (rules): Use it.
14027 (declarations, rules): Remove trailing semicolon.
14028 (declaration, rules_or_grammar_declaration):
14029 Allow empty (";") declaration.
14030 (symbol_def): Remove empty actions; no longer needed.
14031 (rules_or_grammar_declaration): Remove trailing semicolon.
14032 (semi_colon.opt): Remove.
14033 * src/reader.h: Include location.h.
14034 (scanner_cursor): New decl.
14035 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
14036 rolling our own.
14037 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
14038 of *loc.
14039 (STEP): Remove. No longer needed, now that adjust_location does
14040 the work. All uses removed.
14041 (scanner_cursor): New var.
14042 (adjust_location): Renamed from extend_location. It now sets
14043 *loc and adjusts the scanner cursor. All uses changed.
14044 Don't bother testing for CR.
14045 (handle_syncline): Remove location arg; now updates scanner cursor.
14046 All callers changed.
14047 (unexpected_end_of_file): Now accepts start boundary of token or
14048 comment, not location. All callers changed. Update scanner cursor,
14049 not the location.
14050 (SC_AFTER_IDENTIFIER): New state.
14051 (context_state): Renamed from c_context. All uses changed.
14052 (id_loc, code_start, token_start): New local vars.
14053 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
14054 processing of Yacc white space and equivalents here.
14055 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
14056 instead of returning ID immediately, since we need to search for
14057 a subsequent colon.
14058 (<INITIAL>"'", "\""): Save token_start.
14059 (<INITIAL>"%{", "{", "%%"): Save code_start.
14060 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
14061 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
14062 BEGIN context_state at end, not INITIAL.
14063 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
14064 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
14065 Return correct token start.
14066 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
14067 the start of a character, string or multiline comment is found.
14068 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
14069 Reduction): Adjust reported locations to match the more-precise
14070 results now expected.
14071 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
14072 * tests/reduce.at (Useless Rules, Reduced Automaton,
14073 Underivable Rules): Likewise.
14074 * tests/regression.at (Invalid inputs): No longer `expecting ";"
14075 or "|"' now that so many other tokens are allowed by the new grammar.
14076
14077 * src/complain.h (current_file): Remove duplicate decl;
14078 current_file is now owned by files.h.
14079 * src/complain.c, src/scan-gram.l: Include files.h.
14080
14081 2002-12-06 Paul Eggert <eggert@twinsun.com>
14082
14083 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
14084 promotes to int; it might be unsigned int.
14085 * data/yacc.c (yy_reduce_print): Likewise.
14086
14087 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
14088 be #defined in the prologue, not in the Bison declarations.
14089 This fixes Debian Bug 102878, reported by Shaul Karl.
14090
14091 2002-12-02 Paul Eggert <eggert@twinsun.com>
14092
14093 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
14094 * lib/strtoul.c: New file, from gnulib.
14095 This fixes a porting bug reported by Peter Klein in
14096 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
14097
14098 2002-11-30 Paul Eggert <eggert@twinsun.com>
14099
14100 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
14101 and put only a forward declaration in the prologue. This is for
14102 consistency with the other scanner helper functions.
14103
14104 Type clashes now generate warnings, not errors, since it
14105 appears that POSIX may allow some grammars with type clashes.
14106 * src/reader.c (grammar_current_rule_check): Warn about
14107 type clashes instead of complaining.
14108 * tests/input.at (Type Clashes): Expect warnings, not complaints.
14109
14110 Add Yacc library, since POSIX requires it.
14111 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
14112 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
14113 * lib/main.c, lib/yyerror.c: New files.
14114
14115 gram_error can be static; it need not be extern.
14116 * src/reader.h (gram_error): Remove decl.
14117 * src/parse-gram.y (gram_error): Now static. Add static decl.
14118 (print_token_value): Omit parameter names from forward decl,
14119 for consistency.
14120
14121 2002-11-29 Paul Eggert <eggert@twinsun.com>
14122
14123 * doc/bison.texinfo: Emphasize that yylex and yyerror must
14124 be declared before being used. E.g., one should typically
14125 declare them in the prologue. Use GNU coding style in examples.
14126 Put "const" consistently after the type it modifies. Mention
14127 that C99 supports "inline". Mention that yyerror traditionally
14128 returns "int".
14129
14130 %parse-param and %lex-param now take just one argument, the
14131 declaration; the argument name is deduced from the declaration.
14132
14133 * doc/bison.texinfo (Parser Function, Pure Calling, Error
14134 Reporting, Table of Symbols): Document this.
14135 * src/parse-gram.y (add_param): New function.
14136 (COMMA): Remove.
14137 (declaration): Implement new rule for %parse-param and %lex-param.
14138 * src/scan-gram.l: "," now elicits a warning, rather than being
14139 a token; this is more compatible with byacc.
14140 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
14141
14142 2002-11-27 Paul Eggert <eggert@twinsun.com>
14143
14144 Rename identifiers to avoid real and potential collisions.
14145
14146 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
14147 to avoid collision with lex macro described by Bruce Lilly in
14148 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
14149 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
14150 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
14151 * src/parse-gram.y (print_token_value): Renamed from yyprint.
14152 All uses changed.
14153 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
14154 The name "yycontrol" violates the name space rules, and this stuff
14155 wasn't being used anyway.
14156 (input): Remove action; this stuff wasn't being used.
14157 (gram_error): Rename local variable yylloc -> loc.
14158 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
14159 (YY_DECL): Don't use "yy" at start of local variables.
14160 All uses changed, e.g., yylloc -> loc.
14161 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
14162 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
14163 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
14164 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
14165
14166 * src/parse-gram.y (gram_error): loc is now const *.
14167 * src/reader.h (gram_error): Likewise.
14168
14169 2002-11-24 Paul Eggert <eggert@twinsun.com>
14170
14171 Version 1.75c.
14172
14173 * tests/actions.at (Actions after errors): Use an output format
14174 more similar to that of the Printers and Destructors test.
14175 Test the position of the ';' token too.
14176 (Printers and Destructors): Likewise.
14177 (Printers and Destructors: %glr-parser): Remove for now, to avoid
14178 unnecessarily alarming people when the test fails.
14179
14180 * data/yacc.c (yyerrlab1): Move this label down, so that the
14181 parser does not discard the lookahead token if the user code
14182 invokes YYERROR. This change is required for POSIX conformance.
14183
14184 * lib/error.c: Sync with gnulib.
14185
14186 2002-11-22 Paul Eggert <eggert@twinsun.com>
14187
14188 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
14189 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
14190 * lib/xmalloc.c: Likewise.
14191
14192 2002-11-20 Paul Eggert <eggert@twinsun.com>
14193
14194 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
14195
14196 2002-11-20 Paul Eggert <eggert@twinsun.com>
14197
14198 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
14199 should use `if (! x) abort ();' rather than `assert (x);', and
14200 anyway it's one less thing to worry about configuring.
14201
14202 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
14203 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
14204 and replace all instances of assert with abort.
14205 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
14206 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
14207
14208 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
14209 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
14210 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
14211 hash_find_entry, hash_rehash, hash_insert): Likewise.
14212 * src/conflicts.c (resolve_sr_conflict): Likewise.
14213 * src/lalr.c (set_goto_map, map_goto): Likewise.
14214 * src/nullable.c (nullable_compute): Likewise.
14215 * src/output.c (prepare_rules, token_definitions_output): Likewise.
14216 * src/reader.c (packgram, reader): Likewise.
14217 * src/state.c (state_new, state_free, state_transitions_set,
14218 state_reduction_find): Likewise.
14219 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
14220 symbol_pack): Likewise.
14221 * src/tables.c (conflict_row, pack_vector): Likewise.
14222 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
14223 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
14224 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
14225 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
14226
14227 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
14228 (ARGMATCH_CONSTRAINT): New macro.
14229 (ARGMATCH_ASSERT): Use it.
14230
14231 * src/system.h (verify): New macro.
14232 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
14233 rather than assert.
14234 * src/tables.c (tables_generate): Likewise.
14235
14236 * src/struniq.c (struniq_assert): Now returns void, and aborts
14237 if the assertion is false.
14238 (struniq_assert_p): Remove.
14239 * src/struniq.h: Likewise.
14240
14241 2002-11-18 Paul Eggert <eggert@twinsun.com>
14242
14243 * data/glr.c (yygetLRActions): Replace `yyindex' with
14244 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
14245 This fixes the regression with Sun ONE Studio 7 cc that I reported in
14246 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
14247
14248 2002-11-18 Akim Demaille <akim@epita.fr>
14249
14250 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
14251 space.
14252 From Tim Van Holder.
14253
14254 2002-11-17 Paul Eggert <eggert@twinsun.com>
14255
14256 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
14257 to "SyntaxError" for consistency with my 2002-11-15 change.
14258
14259 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
14260 not define to {}, since this breaks the common use of `YYDPRINTF
14261 ((...));' if a single statement is desired (e.g. before `else').
14262 Work around GCC warnings by surrounding corresponding calls with
14263 {} if needed.
14264 (yyhasResolvedValue): Remove unused function.
14265 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
14266 loop body.
14267 (yyreportSyntaxError): Renamed from yyreportParseError.
14268 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
14269 All uses changed.
14270 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
14271 extern when possible. Remove unused initializations.
14272
14273 2002-11-16 Akim Demaille <akim@epita.fr>
14274
14275 Augment the similarity between GLR and LALR traces.
14276
14277 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
14278 (YY_REDUCE_PRINT): New.
14279 (yyparse): Use them.
14280 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
14281 YYDPRINT here.
14282 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
14283 state reached after the reduction/recovery, since...
14284 (yyparse, yyprocessOneStack): Report the state we are entering in.
14285
14286 2002-11-16 Akim Demaille <akim@epita.fr>
14287
14288 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
14289 Add support for --trace=skeleton.
14290 * src/scan-skel.l: %option debug.
14291 Scan strings of non-@ or \n instead of character by character.
14292 (scan_skel): Handle trace_skeleton.
14293 (QPUTS): New.
14294 (@output_parser_name@, @output_header_name@): ``Restore'' their
14295 support (used to be M4 macros).
14296 * data/yacc.c: Quote larger chunks, a la glr.c.
14297 * data/lalr1.cc: Likewise.
14298 The header guards are no longer available, so use some other
14299 string than `YYLSP_NEEDED'.
14300
14301 2002-11-16 Akim Demaille <akim@epita.fr>
14302
14303 Make the ``Printers and Destructors'' test more verbose, taking
14304 `yacc.c''s behavior as (possibly wrong) reference.
14305
14306 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
14307 instead of fprint on stdout.
14308 Set and report the last_line of the symbols.
14309 Consistently display values and locations.
14310
14311 2002-11-16 Paul Eggert <eggert@twinsun.com>
14312
14313 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
14314
14315 2002-11-15 Paul Eggert <eggert@twinsun.com>
14316
14317 * tests/actions.at (Actions after errors): New test case.
14318
14319 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
14320 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
14321 tests/action.at, tests/calc.at, tests/conflicts.at,
14322 tests/cxx-type.at, tests/regression.at:
14323 "parse error" -> "syntax error" for POSIX compatibility.
14324 "parsing stack overflow..." -> "parser stack overflow" so
14325 that code matches Bison documentation.
14326
14327 2002-11-15 Akim Demaille <akim@epita.fr>
14328
14329 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
14330 take two BRACED_CODE, not two string_content.
14331 Free the scanner's obstack when we are done.
14332 (code_content): New.
14333 * tests/calc.at: Adjust.
14334 * doc/bison.texinfo: Adjust.
14335 Also, make sure to include the `,' for these declarations.
14336
14337 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
14338
14339 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
14340 definition; avoids potential autoreconf problems.
14341
14342 2002-11-15 Akim Demaille <akim@epita.fr>
14343
14344 Always check the value returned by yyparse.
14345
14346 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
14347 returned by yyparse.
14348 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
14349 Adjust calls.
14350 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
14351 returned by yyparse.
14352
14353 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14354
14355 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
14356 on input.at test.
14357
14358 2002-11-14 Paul Eggert <eggert@twinsun.com>
14359
14360 * src/output.c (output_skeleton): Call xfopen instead of
14361 duplicating xfopen's body.
14362
14363 Fix bugs reported by Nelson H. F. Beebe in
14364 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
14365
14366 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
14367 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
14368 Group compiler. Instead, use "$CC -E bar.c". Include the .h
14369 file twice in the grammar, as an extra check.
14370
14371 * tests/input.at (Torturing the Scanner): Surround the
14372 backslash-newline tests with "#if 0", to make it less likely that
14373 we'll run into compiler bugs. Bring back solitary \ inside
14374 comment, but add a closing comment to work around HP C bug. Don't
14375 test backslash-newline in C character constant.
14376
14377 2002-11-14 Akim Demaille <akim@epita.fr>
14378
14379 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
14380 status of the compiler.
14381 Calling `exit 1' is no longer needed.
14382 Reported by Nelson H. F. Beebe.
14383
14384 2002-11-14 Akim Demaille <akim@epita.fr>
14385
14386 * tests/atlocal.in (CPPFLAGS): We have config.h.
14387 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
14388 New.
14389 * tests/actions.at, tests/calc.at, tests/conflicts.at,
14390 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
14391 * tests/regression.at, tests/torture.at: Use them for all the
14392 grammars that are to be compiled.
14393 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
14394 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
14395 * doc/bison.texinfo (GLR Parsers): Document `inline'.
14396
14397 2002-11-14 Akim Demaille <akim@epita.fr>
14398
14399 * doc/bison.texinfo: Various formatting changes (alignments in
14400 samples, additional @group/@end group, GCS in samples.
14401 Use @deffn instead of simple @table to define the directives,
14402 macros, variables etc.
14403
14404 2002-11-13 Paul Eggert <eggert@twinsun.com>
14405
14406 Fix some bugs reported by Albert Chin-A-Young in
14407 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
14408
14409 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
14410 -o c"; the HP C compiler chatters during compilation.
14411 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
14412 * tests/headers.at (export YYLTYPE): Likewise.
14413
14414 * tests/input.at (Torturing the Scanner): Remove lines containing
14415 solitary backslashes, as they tickle a bug in the HP C compiler.
14416
14417 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
14418 comments, since they're not portable. Use GNU coding style.
14419
14420 2002-11-13 Akim Demaille <akim@epita.fr>
14421
14422 * data/yacc.c: Leave bigger chunks of quoted text.
14423 (YYDSYMPRINTF): New.
14424 Use it to report symbol activities.
14425 * data/glr.c (YYDSYMPRINTF): New.
14426 Use it.
14427
14428 2002-11-12 Paul Eggert <eggert@twinsun.com>
14429
14430 Version 1.75b.
14431
14432 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
14433 (yyglrReduce): Return yyok, not 0.
14434 This should avoid the enumerated-type warnings reported
14435 by Nelson H. F. Beebe in
14436 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
14437
14438 * lib/bbitset.h (BITSET_INLINE): Remove.
14439 * lib/bitset.h [! BITSET_INLINE]: Remove.
14440 (bitset_set, bitset_reset, bitset_test): Rename local vars
14441 to avoid shadowing warnings by GCC.
14442
14443 * data/glr.c (inline): Remove #define. It's the user's
14444 responsibility to #define it away, just like 'const'.
14445 This fixes one of the bugs reported by Nelson H. F. Beebe in
14446 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
14447
14448 * Makefile.maint (po-check): Scan .l and .y files instead of the
14449 .c and the .h files that they generate. This fixes the bug
14450 reported by Tim Van Holder in:
14451 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
14452 Look for N_ as well as for _. Try to avoid matching #define for
14453 N_ and _.
14454 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
14455 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
14456 * src/scan-gram.l: Revamp regular expressions so that " and '
14457 do not confuse xgettext.
14458
14459 * src/struniq.h (struniq_new): Do not declare the return type
14460 to be 'const'; this violates the C standard.
14461 * src/struniq.c (struniq_new): Likewise.
14462
14463 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
14464
14465 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
14466 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
14467 linker.
14468
14469 2002-11-12 Akim Demaille <akim@epita.fr>
14470
14471 * Makefile.maint: Sync with Autoconf:
14472 (local_updates): New.
14473
14474 2002-11-12 Akim Demaille <akim@epita.fr>
14475
14476 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
14477
14478 2002-11-12 Akim Demaille <akim@epita.fr>
14479
14480 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
14481 locations.
14482
14483 2002-11-12 Akim Demaille <akim@epita.fr>
14484
14485 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
14486 not yyvalue.
14487
14488 2002-11-12 Akim Demaille <akim@epita.fr>
14489
14490 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
14491 Use it to test the GLR parser.
14492
14493 2002-11-12 Akim Demaille <akim@epita.fr>
14494
14495 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
14496 defines it.
14497 * data/glr.c (yystos): New.
14498 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
14499 (YYDSYMPRINT): New.
14500 (yyval): Don't define it, it is handled via M4.
14501 (yyrecoverParseError): Free verbosely the discarded symbols.
14502 * data/yacc.c (yysymprint): Remove, rather...
14503 (b4_yysymprint_generate): invoke.
14504 * data/c.m4 (b4_yysymprint_generate): New.
14505 Accept pointers as arguments, as opposed to the version from
14506 yacc.c.
14507 (b4_yydestruct_generate): Likewise.
14508 * tests/cations.at (Printers and Destructors): Use Bison directives
14509 instead of CPP macros.
14510 Don't rely on internal details.
14511
14512 2002-11-12 Akim Demaille <akim@epita.fr>
14513
14514 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
14515 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
14516 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
14517 it against YYEMPTY and so forth), work on yytoken (i.e., set
14518 it to YYEMPTY etc.).
14519 (yydestruct): Replace with a b4_yydestruct_generate invocation.
14520 (b4_symbol_actions): Remove.
14521 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
14522 for 0, end-of-input.
14523
14524 2002-11-12 Akim Demaille <akim@epita.fr>
14525
14526 * doc/bison.texinfo (Destructor Decl): New.
14527
14528 2002-11-12 Akim Demaille <akim@epita.fr>
14529
14530 * src/tables.c (tables_generate): Use free for pointers that
14531 cannot be NULL, not XFREE.
14532 (pack_vector): Use assert, not fatal, for bound violations.
14533 * src/state.c (state_new): Likewise.
14534 * src/reader.c (reader): Likewise.
14535 * src/lalr.c (set_goto_map): Likewise.
14536 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
14537 the file name.
14538
14539 2002-11-12 Akim Demaille <akim@epita.fr>
14540
14541 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
14542 Restore.
14543 * src/scan-gram.l (last_string): Is global to the file, not to
14544 yylex.
14545 * src/parse-gram.y (input): Don't append the epilogue here,
14546 (epilogue.opt): do it here, and free the scanner's obstack.
14547 * src/reader.c (epilogue_set): Rename as...
14548 (epilogue_augment): this.
14549 * data/c.m4 (b4_epilogue): Defaults to empty.
14550
14551 2002-11-12 Akim Demaille <akim@epita.fr>
14552
14553 * src/getargs.c (long_options): Remove duplicates.
14554 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
14555 Remove.
14556 * doc/bison.rnh: Remove.
14557 * doc/bison.texinfo (VMS Invocation): Remove.
14558
14559 2002-11-12 Akim Demaille <akim@epita.fr>
14560
14561 * src/struniq.h, src/struniq.c (struniq_t): Is const.
14562 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
14563
14564 Use struniq for symbols.
14565
14566 * src/symtab.h (symbol_t): The tag member is a struniq.
14567 (symbol_type_set): Adjust.
14568 * src/symtab.c (symbol_new): Takes a struniq.
14569 (symbol_free): Don't free the tag member.
14570 (hash_compare_symbol_t, hash_symbol_t): Rename as...
14571 (hash_compare_symbol, hash_symbol): these.
14572 Use the fact that tags as struniqs.
14573 (symbol_get): Use struniq_new.
14574 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
14575 Returns a strniq.
14576 * src/reader.h (merger_list, grammar_currentmerge_set): The name
14577 and type members are struniqs.
14578 * src/reader.c (get_merge_function)
14579 (grammar_current_rule_merge_set): Adjust.
14580 (TYPE, current_type): Are struniq.
14581
14582 Use struniq for file names.
14583
14584 * src/files.h, src/files.c (infile): Split into...
14585 (grammar_file, current_file): these.
14586 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
14587 * src/reduce.c (reduce_print): Likewise.
14588 * src/getargs.c (getargs): Likewise.
14589 * src/complain.h, src/complain.c: Likewise.
14590 * src/main.c (main): Call struniqs_new early enough to use it for
14591 file names.
14592 Don't free the input file name.
14593
14594 2002-11-12 Akim Demaille <akim@epita.fr>
14595
14596 * src/symtab.c (symbol_free): Remove dead deactivated code:
14597 type_name are properly removed.
14598 Don't use XFREE to free items that cannot be NULL.
14599 * src/struniq.h, src/struniq.c: New.
14600 * src/main.c (main): Initialize/free struniqs.
14601 * src/parse-gram.y (%union): Add astruniq member.
14602 (yyprint): Adjust.
14603 * src/scan-gram.l (<{tag}>): Return a struniq.
14604 Free the obstack bit that used to store it.
14605 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
14606
14607 2002-11-11 Paul Eggert <eggert@twinsun.com>
14608
14609 Revamp to fix many (but not all) of the C- and M4-related quoting
14610 problems. Among other things, this fixes the Bison bug reported
14611 by Jan Hubicka when processing the Bash grammar; see:
14612 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
14613
14614 Use new @ escapes consistently. Represent brackets with @{ and @}
14615 rather than @<:@ and @:>@, since this works a bit better with dumb
14616 editors like vi. Represent @ with @@, since @ is now consistently
14617 an escape. Use @oline@ and @ofile@ rather than __oline__ and
14618 __ofile__, to avoid unexpected expansions. Similarly, use @output
14619 rather than #output.
14620
14621 * data/c.m4 (b4_copyright): Omit file name from comment, since
14622 the file name could contain "*/".
14623 (b4_synclines_flag): Don't quote the 2nd argument; it should already
14624 be quoted. All uses changed.
14625
14626 * data/glr.c: Use new @ escapes consistently.
14627 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
14628 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
14629 Remove, since they couldn't handle arbitrary characters in file
14630 names.
14631 * data/lalr1.cc: Likewise.
14632 * data/yacc.c: Likewise.
14633
14634 * src/files.c (output_infix): Remove; all uses removed.
14635 * src/files.h: Likewise.
14636
14637 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
14638 mishandled funny characters in file names, and anyway it isn't
14639 needed any more.
14640 * data/yacc.c: Likewise.
14641 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
14642
14643 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
14644 * data/yacc.c: Likewise.
14645
14646 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
14647 strings now.
14648 (muscle_init): Quote filename as a C string.
14649 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
14650 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
14651 * src/output.c (escaped_file_name_output): New function.
14652 (prepare_symbols): Quote tokens for M4.
14653 (prepare): Don't insert output_infix, output_prefix,
14654 output_parser_name, output_header_name; this is now down by scan-skel.
14655 Insert skeleton as a C string.
14656
14657 * src/output.c (user_actions_output, symbol_destructors_output,
14658 symbol_printers_output): Quote filenames for C and M4.
14659 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14660
14661 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
14662 escapes other than \\ and \'; this simplifies the code.
14663 (<SC_STRING>): Likewise, for \\ and \".
14664 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
14665 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
14666 Use new escapes @{ and @} for [ and ].
14667
14668 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
14669 them with auto vars.
14670 Switch to new escape scheme, where @ is the escape character uniformly.
14671 Abort if a stray escape character is found. Avoid unbounded input
14672 buffer when parsing non-escaped text.
14673
14674 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
14675 __oline__, #output, $@, and @{ do not have unintended meanings.
14676
14677 2002-11-09 Paul Eggert <eggert@twinsun.com>
14678
14679 Fix the test failure due to GCC warnings described in
14680 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
14681 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
14682 evaluate to 0 if it's impossible for NINF to be in the respective
14683 table.
14684 (yygetLRActions, yyrecoverParseError): Use them.
14685
14686 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
14687 counted in the token inserted at end of file. Now takes
14688 location_t *, not location_t, so that the location can be
14689 adjusted. All uses changed.
14690
14691 * tests/regression.at (Invalid inputs): Adjust wording in
14692 diagnostic to match the new behavior.
14693
14694 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
14695 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
14696 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
14697 abort ();'. This reduces the runtime of the "Many lookaheads"
14698 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
14699 GCC 3.2.
14700
14701 2002-11-07 Paul Eggert <eggert@twinsun.com>
14702
14703 * src/parse-gram.y (CHARACTER): Remove unused token.
14704 All uses removed.
14705
14706 * src/scan-gram.l: Remove stack option. We no longer use the
14707 stack, since the stack was never deeper than 1; instead, use the
14708 new auto var c_context to record the stacked value.
14709
14710 Remove nounput option. At an unexpected end of file, we now unput
14711 the minimal input necessary to end cleanly; this simplifies the
14712 code.
14713
14714 Avoid unbounded token sizes where this is easy.
14715
14716 (unexpected_end_of_file): New function.
14717 Use it to systematize the error message on unexpected EOF.
14718 (last-string): Now auto, not static.
14719 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
14720 (scanner_last_string_free): Remove; not used.
14721 (percent_percent_count): Move decl to just before use.
14722 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
14723 not the (never otherwised-used) CHARACTER.
14724
14725 2002-11-07 Akim Demaille <akim@epita.fr>
14726
14727 Let yyerror always receive the msg as last argument, so that
14728 yyerror can be variadic.
14729
14730 * data/yacc.c (b4_yyerror_args): New.
14731 Use it when calling yyerror.
14732 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
14733 Use it when calling yyerror.
14734 * doc/bison.texinfo (Error Reporting): Adjust.
14735 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
14736 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
14737
14738 2002-11-06 Akim Demaille <akim@epita.fr>
14739
14740 #line should have quoted strings.
14741 Ideally, this should be done by m4_quotearg.
14742
14743 * src/scan-skel.l: Include quotearg.h.
14744 Quote __ofile__.
14745 * src/output.c (symbol_printers_output)
14746 (symbol_destructors_output): Quote the file name.
14747
14748 2002-11-06 Akim Demaille <akim@epita.fr>
14749
14750 * tests/regression.at (Invalid inputs): Adjust to the recent
14751 messages.
14752
14753 2002-11-06 Akim Demaille <akim@epita.fr>
14754
14755 Restore --no-lines.
14756 Reported by Jim Kent.
14757
14758 * data/c.m4 (b4_syncline): New.
14759 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
14760 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
14761 * src/output.c (user_actions_output): Likewise.
14762 (prepare): Define 'b4_synclines_flag'.
14763 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
14764
14765 2002-11-06 Akim Demaille <akim@epita.fr>
14766
14767 * src/main.c (main): Free `infile'.
14768 * src/scan-gram.l (handle_syncline): New.
14769 Recognize `#line'.
14770 * src/output.c (user_actions_output, symbol_destructors_output)
14771 (symbol_printers_output): Use the location's file name, not
14772 infile.
14773 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14774
14775 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14776
14777 * src/tables.c (matching_state): Don't allow states to match if
14778 either has GLR conflict entries.
14779
14780 2002-11-05 Paul Eggert <eggert@twinsun.com>
14781
14782 * src/scan-gram.l: Use more accurate diagnostics, e.g.
14783 "integer out of range" rather than "invalid value".
14784 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
14785 accordingly.
14786
14787 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
14788 Also, remove one static variable in the scanner.
14789
14790 * src/scan-gram.l (braces_level): Now auto, not static.
14791 Initialize to zero if the compiler is being picky.
14792 (INITIAL): Clear braces_level instead of incrementing it.
14793 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
14794 as POSIX 1003.1-2001 requires.
14795 * src/system.h (IF_LINT): New macro, taken from coreutils.
14796 * configure.ac: Define "lint" if --enable-gcc-warnings.
14797
14798 2002-11-05 Akim Demaille <akim@epita.fr>
14799
14800 * src/scan-gram.l: When it starts with `%', complain about the
14801 whole directive, not just that `invalid character: %'.
14802
14803 2002-11-04 Akim Demaille <akim@epita.fr>
14804
14805 * Makefile.maint: Update from Autoconf.
14806 (update, cvs-update, po-update, do-po-update): New.
14807
14808 2002-11-04 Akim Demaille <akim@epita.fr>
14809
14810 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
14811 and yyerror.
14812 Have yyerror `use' its arguments.
14813 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
14814 returns true when location & yacc & pure & parse-param.
14815 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
14816
14817 2002-11-04 Akim Demaille <akim@epita.fr>
14818
14819 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
14820 clashes.
14821 * src/scan-gram.l: Use [\'] instead of ['] to pacify
14822 font-lock-mode.
14823 Use complain_at.
14824 Use quote, not quote_n since LOCATION_PRINT no longer uses the
14825 slot 0.
14826
14827 2002-11-03 Paul Eggert <eggert@twinsun.com>
14828
14829 * src/reader.c (get_merge_function, grammar_current_rule_check):
14830 Use consistent diagnostics for reporting type name clashes.
14831 Quote the types with <>, for consistency with Yacc.
14832 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
14833
14834 2002-11-03 Akim Demaille <akim@epita.fr>
14835
14836 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
14837 New.
14838 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
14839 (b4_parse_param): Remove.
14840 Use b4_identification.
14841 Propagate b4_pure_args where needed to pass them to yyerror.
14842 * data/glr.m4 (b4_parse_param): Remove.
14843 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
14844 (b4_lpure_formals): New.
14845 Use b4_identification.
14846 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
14847 b4_user_formals and b4_user_args.
14848 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
14849 (yyreportAmbiguity): When using a pure parser, also need
14850 the location, and the parse-params.
14851 Adjust callers.
14852 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
14853 When using a pure parser, also need the parse-params.
14854 Adjust callers.
14855 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
14856 (%pure-parser + %parse-param) LALR and GLR parsers.
14857 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
14858 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
14859 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
14860 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
14861 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
14862 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
14863 * doc/bison.texinfo: Untabify the whole file.
14864 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
14865 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
14866 (Error Reporting): Adjust to these new directives.
14867 Document %error-verbose, deprecate YYERROR_VERBOSE.
14868
14869 2002-11-03 Akim Demaille <akim@epita.fr>
14870
14871 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
14872 AT_CHECK_CALC_GLR invocations to use % directives, instead of
14873 command line options.
14874 * tests/cxx-type.at: Formatting changes.
14875
14876 2002-11-03 Paul Eggert <eggert@twinsun.com>
14877
14878 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
14879 to count columns correctly, and to check for invalid inputs.
14880
14881 Use mbsnwidth to count columns correctly. Account for tabs, too.
14882 Include mbswidth.h.
14883 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
14884 (extend_location): New function.
14885 (YY_LINES): Remove.
14886
14887 Handle CRLF in C code rather than in Lex code.
14888 (YY_INPUT): New macro.
14889 (no_cr_read): New function.
14890
14891 Scan UCNs, even though we don't fully handle them yet.
14892 (convert_ucn_to_byte): New function.
14893
14894 Handle backslash-newline correctly in C code.
14895 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
14896 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
14897 all uses changed.
14898 (tag, splice): New EREs. Do not allow NUL or newline in tags.
14899 Use {splice} wherever C allows backslash-newline.
14900 YY_STEP after space, newline, vertical-tab.
14901 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
14902
14903 (letter, id): Don't assume ASCII; e.g., spell out a-z.
14904
14905 ({int}, handle_action_dollar, handle_action_at): Check for integer
14906 overflow.
14907
14908 (YY_STEP): Omit trailing semicolon, so that it's more like C.
14909
14910 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
14911 as well as \000. Check for UCHAR_MAX, not 255.
14912 Allow \x with an arbitrary positive number of digits, as in C.
14913 Check for overflow here.
14914 Allow \? and UCNs, for compatibility with C.
14915
14916 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
14917 with quote slot used by complain_at.
14918
14919 * tests/input.at: Add tests for backslash-newline, m4 quotes
14920 in symbols, long literals, and funny escapes in strings.
14921
14922 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
14923 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
14924 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
14925 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
14926 * m4/mbswidth.m4: New file, from GNU coreutils.
14927
14928 * doc/bison.texinfo (Grammar Outline): Document // comments.
14929 (Symbols): Document that trigraphs have no special meaning in Bison,
14930 nor is backslash-newline allowed.
14931 (Actions): Document that trigraphs have no special meaning.
14932
14933 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
14934 no longer used.
14935
14936 2002-11-02 Paul Eggert <eggert@twinsun.com>
14937
14938 * src/reader.c: Don't include quote.h; not needed.
14939 (get_merge_function): Reword warning to be consistent with
14940 type clash diagnostic in grammar_current_rule_check.
14941
14942 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
14943 bug in trigraph handling.
14944
14945 * src/output.c (prepare_symbols): When printing token names,
14946 escape "[" as "@<:@" and likewise for "]".
14947
14948 * src/system.h (errno): Remove declaration, as we are now
14949 assuming C89 or better, and C89 guarantees errno.
14950
14951 2002-10-30 Paul Eggert <eggert@twinsun.com>
14952
14953 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
14954 Check for close failures.
14955 * src/files.h (xfclose): Return void, not int, since it always
14956 returned zero.
14957 * src/files.c (xfclose): Likewise. Report I/O error if ferror
14958 indicates one.
14959 * src/output.c (output_skeleton): Use xfclose rather than fclose
14960 and ferror. xfclose now checks ferror.
14961
14962 * data/glr.c (YYLEFTMOST_STATE): Remove.
14963 (yyreportTree): Use a stack-based leftmost state. This avoids
14964 our continuing battles with bogus warnings about initializers.
14965
14966 2002-10-30 Akim Demaille <akim@epita.fr>
14967
14968 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
14969 #if.
14970
14971 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14972
14973 * tests/glr-regr1.at: New test for reported regressions.
14974 * tests/testsuite.at: Add glr-regr1.at test.
14975 * tests/Makefile.am: Add glr-regr1.at test.
14976
14977 2002-10-24 Paul Eggert <eggert@twinsun.com>
14978
14979 Version 1.75a.
14980
14981 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
14982 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
14983 we use malloc. Don't assume 'A' through 'Z' are contiguous.
14984 Don't assume strdup exists; POSIX says its an XSI extension.
14985 Check for buffer overflow on input.
14986
14987 2002-10-24 Akim Demaille <akim@epita.fr>
14988
14989 * src/output.c (output_skeleton): Don't disable M4sugar comments
14990 too soon: it results in comments being expanded.
14991 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
14992 first output.
14993
14994 2002-10-24 Akim Demaille <akim@epita.fr>
14995
14996 * data/yacc.c (m4_int_type): New.
14997 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
14998 char' as only yacc.c wants K&R portability.
14999 * data/glr.c (yysigned_char): Remove.
15000 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
15001 Reported by Quoc Peyrot.
15002
15003 2002-10-23 Paul Eggert <eggert@twinsun.com>
15004
15005 * src/main.c (main): With --trace=time, report times even if a
15006 non-fatal error occurs. Formerly, the times were reported in some
15007 such cases but not in others.
15008 * src/reader.c (reader): Just return if a complaint has been issued,
15009 instead of exiting, so that 'main' can report times.
15010
15011 2002-10-22 Akim Demaille <akim@epita.fr>
15012
15013 * src/system.h: Include sys/types.
15014 Reported by Bert Deknuydt.
15015
15016 2002-10-23 Paul Eggert <eggert@twinsun.com>
15017
15018 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
15019 Suggested by Art Haas.
15020
15021 2002-10-22 Paul Eggert <eggert@twinsun.com>
15022
15023 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
15024 decl; not needed any more.
15025 * src/main.c (main): Use return to exit, undoing yesterday's change.
15026 The last OS that we could find where this wouldn't work is
15027 SunOS 3.5, and that's too old to worry about now.
15028
15029 * data/glr.c (struct yyltype): Define members even when not
15030 doing locations. This is more consistent with yacc.c, and it
15031 works around the following bug reports:
15032 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
15033 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
15034
15035 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
15036 @acronym consistently. Standardize on "Yacc" instead of "YACC",
15037 "Algol" instead of "ALGOL". Give a bit more history about BNF.
15038
15039 2002-10-22 Akim Demaille <akim@epita.fr>
15040
15041 * data/README: New.
15042
15043 2002-10-21 Paul Eggert <eggert@twinsun.com>
15044
15045 Be consistent about 'bool'; the old code used an enum in one
15046 module and an int in another, and this violates the C standard.
15047 * m4/stdbool.m4: New file, from coreutils 4.5.3.
15048 * configure.ac (AC_HEADER_STDBOOL): Add.
15049 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
15050 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
15051 * src/symtab.c (hash_compare_symbol_t): Likewise.
15052 * src/system.h (bool, false, true): Use a definition consistent
15053 with ../lib/hash.c. All uses changed.
15054
15055 * src/complain.c (warning_issued): Renamed from warn_message_count,
15056 so that we needn't worry about integer overflow (!).
15057 Now of type bool. All uses changed.
15058 (complaint_issued): Renamed from complain_message_count; likewise.
15059
15060 * src/main.c (main): Use exit to exit with failure.
15061
15062 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
15063 rather than 1 and 0.
15064 * src/main.c (main): Likewise.
15065 * src/getargs.c (getargs): Likewise.
15066 * src/reader.c (reader): Likewise.
15067
15068 * src/getarg.c (getargs): Remove duplicate code for
15069 "Try `bison --help'".
15070
15071 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
15072 What was that "2" for?
15073
15074 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
15075 * src/getargs.c (usage): Likewise.
15076
15077 * src/getargs.c (getargs): When there are too few operands, report
15078 the last one. When there are too many, report the first extra
15079 one. This is how diffutils does it.
15080
15081 2002-10-20 Paul Eggert <eggert@twinsun.com>
15082
15083 Remove K&R vestiges.
15084 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
15085 * src/complain.c (VA_START): Remove. Assume prototypes.
15086 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
15087 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
15088 fatal): Assume prototypes.
15089 * src/complain.h: Assume prototypes.
15090 * src/system.h (PARAMS): Remove.
15091 Include <limits.h> unconditionally, since it's guaranteeed even
15092 for a freestanding C89 compiler.
15093 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
15094 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
15095
15096 2002-10-20 Akim Demaille <akim@epita.fr>
15097
15098 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
15099 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
15100 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
15101 (yyresolveStates, yyresolveAction, yyresolveStack)
15102 (yyprocessOneStack): Use them.
15103 (yy_reduce_print): New.
15104 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
15105
15106 2002-10-20 Akim Demaille <akim@epita.fr>
15107
15108 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
15109 arguments and output `void'.
15110 (b4_c_function): Rename as...
15111 (b4_c_function_def): this.
15112 (b4_c_function_decl, b4_c_ansi_function_def)
15113 (b4_c_ansi_function_decl): New.
15114 Change the interpretation of the arguments: before `int, foo', now
15115 `int foo, foo'.
15116 * data/yacc.c (yyparse): Prototype and define thanks to these.
15117 Adjust b4_c_function_def uses.
15118 * data/glr.c (yyparse): Likewise, but ANSI only.
15119
15120 2002-10-20 Akim Demaille <akim@epita.fr>
15121
15122 * src/output.c (prepare): Move the definition of `tokens_number',
15123 `nterms_number', `undef_token_number', `user_token_number_max'
15124 to...
15125 (prepare_tokens): Here.
15126 (prepare_tokens): Rename as...
15127 (prepare_symbols): this.
15128 (prepare): Move the definition of `rules_number' to...
15129 (prepare_rules): here.
15130 (prepare): Move the definition of `last', `final_state_number',
15131 `states_number' to...
15132 (prepare_states): here.
15133 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
15134
15135 2002-10-20 Akim Demaille <akim@epita.fr>
15136
15137 * src/tables.h, src/tables.c, src/output.c: Comment changes.
15138
15139 2002-10-20 Akim Demaille <akim@epita.fr>
15140
15141 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
15142 * data/c.m4: here.
15143
15144 2002-10-20 Akim Demaille <akim@epita.fr>
15145
15146 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
15147 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
15148 `pair'.
15149 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
15150 `name' to...
15151 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
15152 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
15153 These.
15154
15155 2002-10-19 Paul Eggert <eggert@twinsun.com>
15156
15157 Do not create a temporary file, as that involves security and
15158 cleanup headaches. Instead, use a pair of pipes.
15159 Derived from a suggestion by Florian Krohm.
15160 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
15161 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
15162 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
15163 (BISON_PREREQ_SUBPIPE): Add.
15164 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
15165 Add subpipe.h, subpipe.c.
15166 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
15167 * po/POTFILES.in: Add lib/subpipe.c.
15168 * src/output.c: Include "subpipe.h".
15169 (m4_invoke): Remove decl.
15170 (scan_skel): New decl.
15171 (output_skeleton): Use pipe rather than temporary file for m4 input.
15172 Check that m4sugar.m4 is readable, to avoid deadlock.
15173 Check for pipe I/O error.
15174 * src/scan-skel.l (readpipe): Remove decl.
15175 (scan_skel): New function, to be used in place of m4_invoke.
15176 Read from stream rather than file.
15177
15178 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
15179 float, as this generates a warning on Solaris 8 + GCC 3.2 with
15180 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
15181 this generates a more-accurate value anyway.
15182
15183 * lib/timevar.c (timervar_accumulate): Rename locals to
15184 avoid confusion with similarly-named more-global.
15185 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
15186
15187 * src/output.c (prepare): Use xstrdup to convert char const *
15188 to char *, to avoid GCC warning.
15189
15190 2002-10-19 Akim Demaille <akim@epita.fr>
15191
15192 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
15193 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
15194 Use them to have `calc.y' ready for %pure-parser.
15195 * data/yacc.c (YYLEX): Pass a yylex return type to
15196 b4_c_function_call.
15197
15198 2002-10-19 Akim Demaille <akim@epita.fr>
15199
15200 Prototype support of %lex-param and %parse-param.
15201
15202 * src/parse-gram.y: Add the definition of the %lex-param and
15203 %parse-param tokens, plus their rules.
15204 Drop the `_' version of %glr-parser.
15205 Add the "," token.
15206 * src/scan-gram.l (INITIAL): Scan them.
15207 * src/muscle_tab.c: Comment changes.
15208 (muscle_insert, muscle_find): Rename `pair' as `probe'.
15209 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
15210 (muscle_entry_s): The `value' member is no longer const.
15211 Adjust all dependencies.
15212 * src/muscle_tab.c (muscle_init): Adjust: use
15213 MUSCLE_INSERT_STRING.
15214 Initialize the obstack earlier.
15215 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
15216 (muscle_pair_list_grow): New.
15217 * data/c.m4 (b4_c_function_call, b4_c_args): New.
15218 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
15219 * tests/calc.at: Use %locations, not --locations.
15220 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
15221
15222 2002-10-19 Akim Demaille <akim@epita.fr>
15223
15224 * src/getargs.c (usage): Take status as argument and exit
15225 accordingly.
15226 Report the traditional `Try ... --help' message when status != 0.
15227 (usage, version): Don't take a FILE * as arg, it is pointless.
15228 (getargs): When there is an incorrect number of arguments, make it
15229 an error, and report it GNUlically thanks to `usage ()'.
15230
15231 2002-10-18 Paul Eggert <eggert@twinsun.com>
15232
15233 * data/glr.c (yyreportParseError): Don't assume that sprintf
15234 yields the length of the printed string, as this is not true
15235 on SunOS 4.1.4. Reported by Peter Klein.
15236
15237 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
15238 * tests/conflicts.at (%nonassoc and eof): Likewise.
15239 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
15240
15241 2002-10-17 Akim Demaille <akim@epita.fr>
15242
15243 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
15244 * src/getargs.c (trace_types, trace_args): Adjust.
15245 * src/reader.c (grammar_current_rule_prec_set)
15246 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
15247 Standardize error messages.
15248 And s/@prec/%prec/!
15249 (reader): Use trace_flag to enable scanner/parser debugging,
15250 instead of an adhoc scheme.
15251 * src/scan-gram.l: Remove trailing debugging code.
15252
15253 2002-10-16 Paul Eggert <eggert@twinsun.com>
15254
15255 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
15256 MUSCLE_TAB_H.
15257
15258 * NEWS: Officially drop support for building Bison with K&R C,
15259 since it didn't work anyway and it's not worth worrying about.
15260 * Makefile.maint (wget_files): Remove ansi2knr.c.
15261 (ansi2knr.c-url_prefix): Remove.
15262 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
15263 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15264 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15265
15266 2002-10-15 Paul Eggert <eggert@twinsun.com>
15267
15268 Stop using the "enum_" trick for K&R-style function definitions;
15269 it confused me, and I was the author! Instead, assume that people
15270 who want to use K&R C compilers (when using these modules in GCC,
15271 perhaps?) will run ansi2knr.
15272
15273 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
15274 All uses of "enum_" changed to "enum ".
15275 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
15276 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
15277
15278 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
15279 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
15280 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
15281 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
15282 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
15283 abitset_not, abitset_ones, abitset_or, abitset_or_and,
15284 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
15285 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
15286 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
15287 Use function prototypes; this removes the need for declaring
15288 static functions simply to provide their prototypes.
15289 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
15290 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
15291 bitset_count_, bitset_create, bitset_dump, bitset_first,
15292 bitset_free, bitset_init, bitset_last, bitset_next,
15293 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
15294 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
15295 bitset_print, bitset_release_memory, bitset_toggle_,
15296 bitset_type_choose, bitset_type_get, bitset_type_name_get,
15297 debug_bitset): Likewise.
15298 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
15299 * lib/bitset_stats.c (bitset_log_histogram_print,
15300 bitset_percent_histogram_print, bitset_stats_and,
15301 bitset_stats_and_cmp, bitset_stats_and_or,
15302 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
15303 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
15304 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
15305 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
15306 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
15307 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
15308 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
15309 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
15310 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
15311 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
15312 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
15313 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
15314 bitset_stats_zero): Likewise.
15315 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15316 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15317 bitsetv_dump, debug_bitsetv): Likewise.
15318 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
15319 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
15320 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
15321 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
15322 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
15323 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
15324 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
15325 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
15326 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
15327 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
15328 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
15329 Likewise.
15330 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
15331 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
15332 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
15333 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
15334 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
15335 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
15336 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
15337 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
15338 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
15339 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
15340 lbitset_xor_cmp, lbitset_zero): Likewise.
15341
15342 2002-10-14 Akim Demaille <akim@epita.fr>
15343
15344 Version 1.75.
15345
15346 2002-10-14 Akim Demaille <akim@epita.fr>
15347
15348 * tests/Makefile.am (maintainer-check-posix): New.
15349
15350 2002-10-14 Akim Demaille <akim@epita.fr>
15351
15352 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
15353 member.
15354
15355 2002-10-14 Akim Demaille <akim@epita.fr>
15356
15357 * src/tables.c (table_ninf_remap): base -> tab.
15358 Reported by Matt Rosing.
15359
15360 2002-10-14 Paul Eggert <eggert@twinsun.com>
15361
15362 * tests/action.at, tests/calc.at, tests/conflicts.at,
15363 tests/cxx-type.at, tests/headers.at, tests/input.at,
15364 tests/regression.at, tests/synclines.at, tests/torture.at:
15365 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
15366 so that the tests still work even if POSIXLY_CORRECT is set.
15367 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
15368
15369 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
15370 for portability to K&R hosts. Fix typo: signed char is guaranteed
15371 only to 127, not to 128.
15372 * data/glr.c (yysigned_char): New type.
15373 * data/yacc.c (yysigned_char): Likewise.
15374 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
15375
15376 2002-10-13 Paul Eggert <eggert@twinsun.com>
15377
15378 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
15379 true due to limited range of data type" warning from GCC.
15380
15381 * data/c.m4 (b4_token_defines): Protect against double-inclusion
15382 by wrapping enum yytokentype's definition inside #ifndef
15383 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
15384
15385 2002-10-13 Akim Demaille <akim@epita.fr>
15386
15387 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
15388 Un yy- yyrhs to avoid the name clash with the global YYRHS.
15389
15390 2002-10-13 Akim Demaille <akim@epita.fr>
15391
15392 * Makefile.maint: Update from Autoconf 2.54.
15393 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
15394
15395 2002-10-13 Akim Demaille <akim@epita.fr>
15396
15397 * src/print.c (print_state): Separate the list of solved conflicts
15398 from the other items.
15399 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
15400
15401 2002-10-13 Akim Demaille <akim@epita.fr>
15402
15403 Let nondeterministic skeletons be usable with deterministic
15404 tables.
15405
15406 With the patch, GAWK compiled by GCC without -O2 passes its test
15407 suite using a GLR parser driven by LALR tables. It fails with -O2
15408 because `struct stat' gives two different answers on my machine:
15409 88 (definition of an auto var) and later 96 (memset on this var).
15410 Hence the stack is badly corrumpted. The headers inclusion is to
15411 blame: if I move the awk.h inclusion before GLR's system header
15412 inclusion, the two struct stat have the same size.
15413
15414 * src/tables.c (pack_table): Always create conflict_table.
15415 (token_actions): Always create conflict_list.
15416 * data/glr.c (YYFLAG): Remove, unused.
15417
15418 2002-10-13 Akim Demaille <akim@epita.fr>
15419
15420 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
15421 (O0FLAGS): New.
15422 (VALGRIND, GXX): New.
15423 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
15424 * tests/bison.in: Run $PREBISON a pre-command.
15425 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
15426 (maintainer-check-g++): New.
15427 * Makefile.am (maintainer-check): New.
15428
15429 2002-10-13 Akim Demaille <akim@epita.fr>
15430
15431 * data/glr.c: Formatting changes.
15432 Tweak some trace messages to match yacc.c's.
15433
15434 2002-10-13 Akim Demaille <akim@epita.fr>
15435
15436 GLR parsers sometimes raise parse errors instead of performing the
15437 default reduction.
15438 Reported by Charles-Henry de Boysson.
15439
15440 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
15441 check the length of the traces when %glr.
15442 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
15443 GLR's traces.
15444 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
15445 Test GLR parsers.
15446 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
15447 (yyltype): Remove the yy prefix from the member names.
15448 (yytable): Complete its comment.
15449 (yygetLRActions): Map error action number from YYTABLE from
15450 YYTABLE_NINF to 0.
15451 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
15452 (which was a bug: it should have been YYTABEL_NINF, and yet it was
15453 not satisfying as we could compare an YYACTION computed from
15454 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
15455 only value for error actions.
15456 (yyreportParseError): In verbose parse error messages, don't issue
15457 `error' in the list of expected tokens.
15458 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
15459 next action to perform to match glr.c's decoding.
15460 (yytable): Complete its comment.
15461
15462 2002-10-13 Paul Eggert <eggert@twinsun.com>
15463
15464 Fix problem reported by Henrik Grubbstroem in
15465 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
15466 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
15467 because the Bison parser reads the second action before reducing
15468 the first one.
15469 * src/scan-gram.l (rule_length): New static var.
15470 Use it to keep track of the rule length in the scanner, since
15471 we can't expect the parser to be in lock-step sync with the scanner.
15472 (handle_action_dollar, handle_action_at): Use this var.
15473 * tests/actions.at (Exotic Dollars): Test for the problem.
15474
15475 2002-10-12 Paul Eggert <eggert@twinsun.com>
15476
15477 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
15478 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
15479 Include <sys/time.h> when checking for clock_t and struct tms.
15480 Use same include order as source.
15481 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
15482 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
15483
15484 * lib/timevar.c: Update copyright date and clarify comments.
15485 (get_time) [IN_GCC]: Keep the GCC version for reference.
15486
15487 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
15488 GCC version as of today, then merge Bison's changes.
15489 Change "GCC" to "Bison" in copyright notice. timevar.def's
15490 author is Akim, so change that too.
15491
15492 * src/reader.c (grammar_current_rule_check):
15493 Don't worry about the default action if $$ is untyped.
15494 Prevents bogus warnings reported by Jim Gifford in
15495 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
15496
15497 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
15498 * data/glr.c, data/lalr1.cc, data/yacc.c:
15499 Output token definitions before the first part of user declarations.
15500 Fixes compatibility problem reported by Jim Gifford for kbd in
15501 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
15502
15503 2002-10-11 Paul Eggert <eggert@twinsun.com>
15504
15505 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
15506 (yyparse): here. This undoes some of the 2002-07-25 change.
15507 Compatibility problem reported by Ralf S. Engelschall with
15508 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
15509
15510 2002-10-11 Akim Demaille <akim@epita.fr>
15511
15512 * tests/regression.at Characters Escapes): New.
15513 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
15514 characters.
15515 Reported by Jan Nieuwenhuizen.
15516
15517 2002-10-11 Akim Demaille <akim@epita.fr>
15518
15519 * po/id.po: New.
15520
15521 2002-10-10 Paul Eggert <eggert@twinsun.com>
15522
15523 Portability fixes for bitsets; this also avoids several GCC
15524 warnings.
15525
15526 * lib/abitset.c: Include <stddef.h>, for offsetof.
15527 * lib/lbitset.c: Likewise.
15528
15529 * lib/abitset.c (abitset_bytes): Return a size that is aligned
15530 properly for vectors of objects. Do not assume that adding a
15531 header size to a multiple of a word size yields a value that is
15532 properly aligned for the whole union.
15533 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15534
15535 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
15536 unique names for structures.
15537 * lib/ebitset.c (ebitset_bytes): Likewise.
15538 * lib/lbitset.c (lbitset_bytes): Likewise.
15539
15540 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
15541 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
15542 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
15543 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
15544 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
15545 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
15546 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
15547 to improve the type-checking that GCC can do.
15548 * lib/bitset.c (bitset_op4_cmp): Likewise.
15549 * lib/bitset_stats.c (bitset_stats_count,
15550 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
15551 bitset_stats_copy, bitset_stats_disjoint_p,
15552 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
15553 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
15554 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
15555 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
15556 bitset_stats_and_or_cmp, bitset_stats_andn_or,
15557 bitset_stats_andn_or_cmp, bitset_stats_or_and,
15558 bitset_stats_or_and_cmp): Likewise.
15559 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
15560 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
15561 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
15562 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
15563
15564 * lib/abitset.h: Include bitset.h, not bbitset.h.
15565 * lib/ebitset.h: Likewise.
15566 * lib/lbitset.h: Likewise.
15567
15568 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
15569 All instances of parameters of type enum bitset_opts are now of
15570 type enum_bitset_opts, to conform to the C Standard, and similarly
15571 for enum_bitset_type.
15572 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
15573 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
15574
15575 Do not use "struct bitset_struct" to mean different things in
15576 different modules. Not only is this confusing, it violates
15577 the C Standard, which requires that structure types in different
15578 modules must be compatible if one is to be passed to the other.
15579 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
15580 All instances of "struct bitset_struct *" replaced with "bitset".
15581 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
15582 (union bitset_union, struct abitset_struct, struct ebitset_struct,
15583 struct lbitset_struct, struct bitset_stats_struct): New types.
15584 All uses of struct bitset_struct changed to union bitset_union,
15585 etc.
15586 * lib/abitset.c (struct abitset_struct, abitset,
15587 struct bitset_struct): Remove.
15588 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
15589 struct bitset_struct): Remove.
15590 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
15591 bitset_struct): Remove.
15592 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
15593 Likewise.
15594
15595 Do not call a function of type T using a call that assumes the
15596 function is of a different type U. Standard C requires that a
15597 function must be called with a type that is compatible with its
15598 definition.
15599 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15600 New decls.
15601 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15602 New functions.
15603 * lib/ebitset.c (PFV): Remove.
15604 * lib/lbitset.c (PFV): Likewise.
15605 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
15606 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
15607 decls.
15608 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
15609 (ebitset_vtable): Use them.
15610 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
15611 lbitset_xor): New functions.
15612 (lbitset_vtable): Use them.
15613
15614 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
15615 Declare.
15616
15617 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
15618 GCC warning.
15619 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
15620 Use offsetof, for simplicity.
15621
15622 2002-10-06 Paul Eggert <eggert@twinsun.com>
15623
15624 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
15625 the same width as int. This reapplies a hunk of the 2002-08-12 patch
15626 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
15627 which was inadvertently undone by the 2002-09-30 patch.
15628 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
15629 the same width as int.
15630
15631 2002-10-04 Paul Eggert <eggert@twinsun.com>
15632
15633 Version 1.50.
15634
15635 * configure.ac (AC_INIT), NEWS: Increment version number.
15636
15637 * doc/bison.texinfo: Minor spelling, grammar, and white space
15638 fixes.
15639 (Symbols): Mention that any negative value returned from yylex
15640 signifies end-of-input. Warn about negative chars. Mention
15641 the portable Standard C character set.
15642
15643 The GNU coding standard says CFLAGS and YFLAGS are reserved
15644 for the installer to set.
15645 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
15646 * src/Makefile.am (AM_CFLAGS): Likewise.
15647 (AM_YFLAGS): Renamed from YFLAGS.
15648
15649 Fix some MAX and MIN problems.
15650 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
15651 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
15652 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
15653 * src/reader.c (reader): Use it.
15654
15655 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
15656 POSIX 1003.1-2001 has removed fgrep.
15657
15658 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
15659
15660 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
15661 interpreted as signed.
15662 * lib/ebitset.c (ebitset_list): Fix bug.
15663
15664 2002-10-01 Paul Eggert <eggert@twinsun.com>
15665
15666 More fixes for 64-bit hosts and large bitsets.
15667
15668 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
15669 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
15670 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
15671 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
15672 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
15673 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
15674 bitset_count_): Likewise.
15675 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
15676 bitset_first, bitset_last): Likewise.
15677 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
15678 bitset_stats_list_reverse, bitset_stats_size,
15679 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
15680 Likewise.
15681 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15682 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15683 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15684 bitsetv_reflexive_transitive_closure): Likewise.
15685 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
15686 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
15687 Likewise.
15688 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
15689 Likewise.
15690
15691 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
15692 Use size_t, not unsigned int, to count bytes.
15693 * lib/abitset.h (abitset_bytes): Likewise.
15694 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
15695 Likewise.
15696 * lib/bitset.h (bitset_bytes): Likewise.
15697 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
15698 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
15699 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15700 * lib/ebitset.c (ebitset_bytes): Likewise.
15701 * lib/ebitset.h (ebitset_bytes): Likewise.
15702 * lib/lbitset.c (lbitset_bytes): Likewise.
15703 * lib/lbitset.h (lbitset_bytes): Likewise.
15704
15705 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
15706 abitset_subset_p, abitset_disjoint_p, abitset_and,
15707 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
15708 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
15709 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
15710 abitset_or_and, abitset_or_and_cmp):
15711 Use bitset_windex instead of unsigned int.
15712 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15713 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
15714 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
15715 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
15716 Likewise.
15717 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
15718
15719 * lib/bitset.c (bitset_print):
15720 Use proper printf formats for widths of integer types.
15721 * lib/bitset_stats.c (bitset_percent_histogram_print,
15722 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
15723 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15724 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15725 * lib/lbitset.c (lbitset_bytes): Likewise.
15726
15727 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
15728 BITSET_SIZE_MAX): New macros.
15729 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
15730 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
15731 to BITSET_WINDEX_MAX.
15732
15733 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
15734 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
15735 since we now return the bitset_bindex type (not int).
15736
15737 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
15738 when computing sizes.
15739 * lib/ebitset.c (ebitset_elts_grow): Likewise.
15740
15741 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
15742 and avoid cast to unsigned.
15743
15744 2002-09-30 Akim Demaille <akim@epita.fr>
15745
15746 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
15747 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
15748 Updates from Michael Hayes.
15749
15750 2002-09-30 Art Haas <ahaas@neosoft.com>
15751
15752 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
15753 invocations.
15754 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
15755 defined.
15756
15757 2002-09-27 Akim Demaille <akim@epita.fr>
15758
15759 Version 1.49c.
15760
15761 2002-09-27 Akim Demaille <akim@epita.fr>
15762
15763 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
15764 (Because of AC_LIBSOURCE).
15765
15766 2002-09-27 Akim Demaille <akim@epita.fr>
15767
15768 Playing with Autoscan.
15769
15770 * configure.ac: Remove the old LIBOBJ tweaks.
15771 (AC_REPLACE_FUNCS): Add strrchr and strtol.
15772 * lib/strrchr.c: New.
15773 * lib/strtol.c: New, from the Coreutils 4.5.1.
15774
15775 2002-09-27 Akim Demaille <akim@epita.fr>
15776
15777 Playing with Autoscan.
15778
15779 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
15780 * lib/Makefile.am (libbison_a_SOURCES): No longer include
15781 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
15782 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
15783 Coreutils 4.5.1.
15784
15785 2002-09-24 Akim Demaille <akim@epita.fr>
15786
15787 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
15788 (Frequently Asked Questions, Parser Stack Overflow): New.
15789
15790 2002-09-13 Akim Demaille <akim@epita.fr>
15791
15792 Playing with autoscan.
15793
15794 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
15795 * src/files.c (skeleton_find): Remove, unused.
15796 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
15797 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
15798
15799 2002-09-13 Akim Demaille <akim@epita.fr>
15800
15801 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
15802 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
15803
15804 2002-09-13 Akim Demaille <akim@epita.fr>
15805
15806 * configure.ac: Require 2.54.
15807 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
15808 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
15809 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
15810 Remove, provided by Autoconf macros.
15811
15812 2002-09-12 Akim Demaille <akim@epita.fr>
15813
15814 * m4/prereq.m4: Update, from Coreutils 4.5.1.
15815
15816 2002-09-12 Akim Demaille <akim@epita.fr>
15817
15818 * m4/prereq.m4: Update, from Fileutils 4.1.5.
15819 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
15820 Reported by Martin Mokrejs.
15821
15822 2002-09-10 Akim Demaille <akim@epita.fr>
15823
15824 * src/parse-gram.y: Associate a human readable string to each
15825 token type.
15826 * tests/regression.at (Invalid inputs): Adjust.
15827
15828 2002-09-10 Gary V. Vaughan <gary@gnu.org>
15829
15830 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
15831 with an Autoconf-2.5x style configure.ac.
15832
15833 2002-09-06 Paul Eggert <eggert@twinsun.com>
15834
15835 * doc/bison.texinfo (Conditions): Make explicit that the GPL
15836 exception applies only to yacc.c. This is a modification of a
15837 patch originally suggested by Akim Demaille.
15838
15839 2002-09-06 Akim Demaille <akim@epita.fr>
15840
15841 * data/c.m4 (b4_copyright): Move the GPL exception comment from
15842 here to...
15843 * data/yacc.c: here.
15844
15845 * data/lalr1.cc (struct yyltype): Don't define it, since we use
15846 LocationType.
15847 (b4_ltype): Default to yy::Location from location.hh.
15848
15849 2002-09-04 Jim Meyering <jim@meyering.net>
15850
15851 * data/yacc.c: Guard the declaration of yytoknum also with
15852 `#ifdef YYPRINT', so it is declared only when used.
15853
15854 2002-09-04 Akim Demaille <akim@epita.fr>
15855
15856 * configure.in: Rename as...
15857 * configure.ac: this.
15858 Bump to 1.49c.
15859
15860 2002-09-04 Akim Demaille <akim@epita.fr>
15861
15862 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
15863 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
15864 translate maintainer only messages.
15865
15866 2002-08-12 Paul Eggert <eggert@twinsun.com>
15867
15868 Version 1.49b.
15869
15870 * Makefile.am (SUBDIRS): Remove intl.
15871 (DISTCLEANFILES): Remove.
15872 * NEWS: Mention that GNU M4 is now required. Clarify what is
15873 meant by "larger grammars". Mention the pt_BR translation.
15874 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
15875 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
15876 Bump version from 0.11.2 to 0.11.5.
15877 (BISON_PREREQ_STAGE): Remove.
15878 (AM_GNU_GETTEXT): Use external gettext.
15879 (AC_OUTPUT): Remove intl/Makefile.
15880
15881 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
15882
15883 * data/glr.c: Include string.h, for strlen.
15884 (yyreportParseError): Use size_t for yysize.
15885 (yy_yypstack): No longer nested inside yypstates, as nested
15886 functions are not portable. Do not assume size_t is the
15887 same width as int.
15888 (yypstates): Do not assume that ptrdiff_t is the same width
15889 as int, and similarly for yyposn and YYINDEX.
15890
15891 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
15892
15893 * lib/Makefile.am (INCLUDES): Do not include from the intl
15894 directory, which has been removed.
15895 * src/Makefile.am (INCLUDES): Likewise.
15896
15897 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
15898 (bitsets_sources, additional_bitsets_sources, timevars_sources):
15899 New vars.
15900
15901 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
15902 * tests/Makefile.am (EXTRA_DIST): Likewise.
15903
15904 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
15905 Do not assume that bitset_windex is the same width as unsigned.
15906
15907 * lib/abitset.c (abitset_unused_clear): Do not assume that
15908 bitset_word is the same width as int.
15909 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
15910 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
15911 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
15912 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
15913 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
15914
15915 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
15916 portability to one's complement hosts!).
15917 * lib/ebitset.c (ebitset_op1): Likewise.
15918 * lib/lbitset.c (lbitset_op1): Likewise.
15919
15920 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
15921 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
15922 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
15923 Sync with fileutils.
15924 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
15925 lib/gettext.h: Sync with diffutils.
15926
15927 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
15928 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
15929
15930 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
15931 PROTOTYPES to check for prototypes, and "defined __STDC__" to
15932 check for void *.
15933
15934 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
15935 size_t; the old version tried to do this but casted improperly.
15936 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
15937 (bitset_test): Now returns int, not unsigned long.
15938
15939 * lib/bitset_stats.c: Include "gettext.h".
15940 (_): New macro.
15941 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
15942 name locals "index", as it generates unnecessary warnings on some
15943 hosts that have an "index" function.
15944
15945 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
15946 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
15947 they need translation.
15948 * src/LR0.c (state_list_append, new_itemsets, get_state,
15949 append_states, generate_states): Likewise.
15950 * src/assoc.c (assoc_to_string): Likewise.
15951 * src/closure.c (print_closure, set_firsts, closure): Likewise.
15952 * src/gram.c (grammar_dump): Likewise.
15953 * src/injections.c (injections_compute): Likewise.
15954 * src/lalr.c (lookaheads_print): Likewise.
15955 * src/relation.c (relation_transpose): Likewise.
15956 * src/scan-gram.l: Likewise.
15957 * src/tables.c (table_grow, pack_vector): Likewise.
15958
15959 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
15960 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
15961 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
15962 * m4/mbstate_t.m4: Sync with fileutils.
15963 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
15964
15965 * po/LINGUAS: Add pt_BR.
15966 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
15967 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
15968 lib/timevar.c.
15969 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
15970 manual recommends.
15971 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
15972
15973 * src/complain.c (strerror_r): Remove decl; not needed.
15974 (strerror): Use same pattern as ../lib/error.c.
15975
15976 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
15977
15978 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
15979
15980 * src/main.c (main): Cast result of bindtextdomain and textdomain
15981 to void, to avoid a GCC warning when --disable-nls is in effect.
15982
15983 * src/scan-gram.l: Use strings rather than escapes when possible,
15984 to minimize the number of warnings from xgettext.
15985 (handle_action_dollar, handle_action_at): Don't use isdigit,
15986 as it mishandles negative chars and it may not work as expected
15987 outside the C locale.
15988
15989 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
15990 this is a GCC extension and is not portable to other compilers.
15991
15992 * src/system.h (alloca): Use same pattern as ../lib/error.c.
15993 Do not include <ctype.h>; no longer needed.
15994 Do not include <malloc.h>; no longer needed (and generates
15995 warnings on OpenBSD 3.0).
15996
15997 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
15998 it's not portable.
15999
16000 * tests/regression.at: Do not use 'cc -c input.c -o input';
16001 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
16002
16003 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
16004 exit status as failure, not just exit status 1. Sun C exits
16005 with status 2 sometimes.
16006
16007 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
16008 Use it for the two large tests.
16009
16010 2002-08-02 Akim Demaille <akim@epita.fr>
16011
16012 * src/conflicts.c (conflicts_output): Don't output rules never
16013 reduced here, since anyway that computation doesn't work.
16014 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
16015 (rule_useless_p, rule_never_reduced_p): New.
16016 (grammar_rules_partial_print): Use a filter instead of a range.
16017 Display the title only if needed.
16018 (grammar_rules_print): Adjust.
16019 (grammar_rules_never_reduced_report): New.
16020 * src/tables.c (action_row): Move the computation of rules never
16021 reduced to...
16022 (token_actions): here.
16023 * src/main.c (main): Make the parser before making the report, so
16024 that rules never reduced are computed.
16025 Call grammar_rules_never_reduced_report.
16026 * src/print.c (print_results): Report rules never reduced.
16027 * tests/conflicts.at, tests/reduce.at: Adjust.
16028
16029 2002-08-01 Akim Demaille <akim@epita.fr>
16030
16031 Instead of attaching lookaheads and duplicating the rules being
16032 reduced by a state, attach the lookaheads to the reductions.
16033
16034 * src/state.h (state_t): Remove the `lookaheads',
16035 `lookaheads_rule' member.
16036 (reductions_t): Add a `lookaheads' member.
16037 Use a regular array for the `rules'.
16038 * src/state.c (reductions_new): Initialize the lookaheads member
16039 to 0.
16040 (state_rule_lookaheads_print): Adjust.
16041 * src/state.h, src/state.c (state_reductions_find): New.
16042 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
16043 (count_rr_conflicts): Adjust.
16044 * src/lalr.c (LArule): Remove.
16045 (add_lookback_edge): Adjust.
16046 (state_lookaheads_count): New.
16047 (states_lookaheads_initialize): Merge into...
16048 (initialize_LA): this.
16049 (lalr_free): Adjust.
16050 * src/main.c (main): Don't free nullable and derives too early: it
16051 is used by --verbose.
16052 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
16053
16054 2002-08-01 Akim Demaille <akim@epita.fr>
16055
16056 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
16057 `rule_number_t**'.
16058 (set_derives, free_derives): Rename as...
16059 (derives_compute, derives_free): this.
16060 Adjust all dependencies.
16061 * src/nullable.c (set_nullable, free_nullable): Rename as...
16062 (nullable_compute, nullable_free): these.
16063 (rule_list_t): Store rule_t *, not rule_number_t.
16064 * src/state.c (state_rule_lookaheads_print): Directly compare rule
16065 pointers, instead of their numbers.
16066 * src/main.c (main): Call nullable_free, and derives_free earlier,
16067 as they were lo longer used.
16068
16069 2002-08-01 Akim Demaille <akim@epita.fr>
16070
16071 * lib/timevar.c (get_time): Include children time.
16072 * src/lalr.h (LA, LArule): Don't export them: used with the
16073 state_t.
16074 * src/lalr.c (LA, LArule): Static.
16075 * src/lalr.h, src/lalr.c (lalr_free): New.
16076 * src/main.c (main): Call it.
16077 * src/tables.c (pack_vector): Check whether loc is >= to the
16078 table_size, not >.
16079 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
16080 (tables_generate): do it, since that's also it which allocates
16081 them.
16082 Don't free LA and LArule, main does.
16083
16084 2002-07-31 Akim Demaille <akim@epita.fr>
16085
16086 Separate parser tables computation and output.
16087
16088 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
16089 (conflict_list, conflict_list_cnt, table, check, table_ninf)
16090 (yydefgoto, yydefact, high): Move to...
16091 * src/tables.h, src/tables.c: here.
16092 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
16093 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
16094 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
16095 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
16096 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
16097 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
16098 (action_row, save_row, token_actions, save_column, default_goto)
16099 (goto_actions, sort_actions, matching_state, pack_vector)
16100 (table_ninf_remap, pack_table, prepare_actions): Move to...
16101 * src/tables.c: here.
16102 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
16103 * src/output.c (token_actions, output_base, output_conflicts)
16104 (output_check): Merge into...
16105 (prepare_actions): this.
16106 (actions_output): Rename as...
16107 (user_actions_output): this.
16108 * src/main.c (main): Call tables_generate and tables_free.
16109
16110 2002-07-31 Akim Demaille <akim@epita.fr>
16111
16112 Steal GCC's --time-report support.
16113
16114 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
16115 stolen/adjusted from GCC.
16116 * m4/stage.m4: Remove time related checks.
16117 * m4/timevar.m4: New.
16118 * configure.in: Adjust.
16119 * src/system.h: Adjust to using timevar.h.
16120 * src/getargs.h, src/getargs.c: Support trace_time for
16121 --trace=time.
16122 * src/main.c (stage): Remove.
16123 (main): Replace `stage' invocations with timevar calls.
16124 * src/output.c: Insert pertinent timevar calls.
16125
16126 2002-07-31 Akim Demaille <akim@epita.fr>
16127
16128 Let --trace have arguments.
16129
16130 * src/getargs.h (enum trace_e): New.
16131 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
16132 (long_options, short_options): --trace/-T takes an optional
16133 argument.
16134 Change all the uses of trace_flag to reflect the new flags.
16135 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
16136
16137 Strengthen `stage' portability.
16138
16139 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
16140 * configure.in: Use it.
16141 Don't check for malloc.h and sys/times.h.
16142 * src/system.h: Include them when appropriate.
16143 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
16144 times and struct tms are available.
16145
16146 2002-07-30 Akim Demaille <akim@epita.fr>
16147
16148 In verbose parse error message, don't report `error' as an
16149 expected token.
16150 * tests/actions.at (Printers and Destructors): Adjust.
16151 * tests/calc.at (Calculator $1): Adjust.
16152 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
16153 error message, do not report the parser accepts the error token in
16154 that state.
16155
16156 2002-07-30 Akim Demaille <akim@epita.fr>
16157
16158 Normalize conflict related messages.
16159
16160 * src/complain.h, src/complain.c (warn, complain): New.
16161 * src/conflicts.c (conflicts_print): Use them.
16162 (conflict_report_yacc): New, extracted from...
16163 (conflicts_print): here.
16164 * tests/conflicts.at, tests/existing.at: Adjust.
16165
16166 2002-07-30 Akim Demaille <akim@epita.fr>
16167
16168 Report rules which are never reduced by the parser: those hidden
16169 by conflicts.
16170
16171 * src/LR0.c (save_reductions): Don't make the final state too
16172 different: save its reduction (accept) instead of having a state
16173 without any action (no shift or goto, no reduce).
16174 Note: the final state is now a ``regular'' state, i.e., the
16175 parsers now contain `reduce 0' as default reduction.
16176 Nevertheless, since they decide to `accept' when yystate =
16177 final_state, they still will not reduce rule 0.
16178 * src/print.c (print_actions, print_reduction): Adjust.
16179 * src/output.c (action_row): Track reduced rules.
16180 (token_actions): Report rules never reduced.
16181 * tests/conflicts.at, tests/regression.at: Adjust.
16182
16183 2002-07-30 Akim Demaille <akim@epita.fr>
16184
16185 `stage' was accidently included in a previous patch.
16186 Initiate its autoconfiscation.
16187
16188 * configure.in: Look for malloc.h and sys/times.h.
16189 * src/main.c (stage): Adjust.
16190 Report only when trace_flag.
16191
16192 2002-07-29 Akim Demaille <akim@epita.fr>
16193
16194 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
16195 state_number_t.
16196 (errs_t): symbol_t*, not symbol_number_t.
16197 (reductions_t): rule_t*, not rule_number_t.
16198 (FOR_EACH_SHIFT): New.
16199 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
16200 * src/print.c, src/print_graph.c: Adjust.
16201
16202 2002-07-29 Akim Demaille <akim@epita.fr>
16203
16204 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
16205
16206 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
16207 (endtoken, accept): these.
16208 * src/reader.c (reader): Set endtoken's default tag to "$end".
16209 Set undeftoken's tag to "$undefined" instead of "$undefined.".
16210 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
16211 Adjust.
16212
16213 2002-07-29 Akim Demaille <akim@epita.fr>
16214
16215 * src/reduce.c (reduce_grammar): When the language is empty,
16216 complain about the start symbol, not the axiom.
16217 Use its location.
16218 * tests/reduce.at (Empty Language): New.
16219
16220 2002-07-26 Akim Demaille <akim@epita.fr>
16221
16222 * src/reader.h, src/reader.c (gram_error): ... can't get
16223 yycontrol without making too strong assumptions on the parser
16224 itself.
16225 * src/output.c (prepare_tokens): Use the real 0th value of
16226 token_translations instead of `0'.
16227 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
16228 visible here.
16229 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
16230 for the time being: %locations ought to provide it to yyerror.
16231
16232 2002-07-25 Akim Demaille <akim@epita.fr>
16233
16234 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
16235 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
16236 * tests/regression.at (Web2c Actions): Adjust.
16237
16238 2002-07-25 Akim Demaille <akim@epita.fr>
16239
16240 Stop storing rules from 1 to nrules + 1.
16241
16242 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
16243 * src/nullable.c, src/output.c, src/print.c, src/reader.c
16244 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
16245 Iterate from 0 to nrules.
16246 Use rule_number_as_item_number and item_number_as_rule_number.
16247 Adjust to `derive' now containing possibly 0.
16248 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
16249 Handle the `- 1' part in rule numbers from/to item numbers.
16250 * src/conflicts.c (log_resolution): Fix the message which reversed
16251 shift and reduce.
16252 * src/output.c (action_row): Initialize default_rule to -1.
16253 (token_actions): Adjust.
16254 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
16255 expected output.
16256 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
16257
16258 2002-07-25 Akim Demaille <akim@epita.fr>
16259
16260 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
16261 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
16262 (b4_c_knr_arg_decl): New.
16263 * data/yacc.c: Use it to define yysymprint, yydestruct, and
16264 yyreport_parse_error.
16265
16266 2002-07-25 Akim Demaille <akim@epita.fr>
16267
16268 * data/yacc.c (yyreport_parse_error): New, extracted from...
16269 (yyparse): here.
16270 (yydestruct, yysymprint): Move above yyparse.
16271 Be K&R compliant.
16272
16273 2002-07-25 Akim Demaille <akim@epita.fr>
16274
16275 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
16276 replace...
16277 (b4_sint_type, b4_uint_type): these.
16278 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
16279 * tests/regression.at (Web2c Actions): Adjust.
16280
16281 2002-07-25 Akim Demaille <akim@epita.fr>
16282
16283 * src/gram.h (TIEM_NUMBER_MAX): New.
16284 (item_number_of_rule_number, rule_number_of_item_number): Rename
16285 as...
16286 (rule_number_as_item_number, item_number_as_rule_number): these.
16287 Adjust dependencies.
16288 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
16289 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
16290 (symbol_number_to_vector_number): New.
16291 (order): Of vector_number_t* type.
16292 (base_t, BASE_MAX, BASE_MIN): New.
16293 (froms, tos, width, pos, check): Of base_t type.
16294 (action_number_t, ACTION_MIN, ACTION_MAX): New.
16295 (actrow): Of action_number_t type.
16296 (conflrow): Of unsigned int type.
16297 (table_ninf, base_ninf): New.
16298 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
16299 (muscle_insert_int_table, muscle_insert_base_table)
16300 (muscle_insert_rule_number_table): New.
16301 (prepare_tokens): Output `toknum' as int_table.
16302 (action_row): Returns a rule_number_t.
16303 Use ACTION_MIN, not SHRT_MIN.
16304 (token_actions): yydefact is rule_number_t*.
16305 (table_ninf_remap): New.
16306 (pack_table): Use it for `base' and `table'.
16307 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
16308 replaced with...
16309 (YYPACT_NINF, YYTABLE_NINF): these.
16310 (yypact, yytable): Compute their types instead of hard-coded
16311 `short'.
16312 * tests/regression.at (Web2c Actions): Adjust.
16313
16314 2002-07-19 Akim Demaille <akim@epita.fr>
16315
16316 * src/scan-gram.l (id): Can start with an underscore.
16317
16318 2002-07-16 Akim Demaille <akim@epita.fr>
16319
16320 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
16321 Adjust all former `associativity' dependencies.
16322 * src/symtab.c (symbol_new): Default associativity is `undef', not
16323 `right'.
16324 (symbol_check_alias_consistence): Adjust.
16325
16326 2002-07-09 Akim Demaille <akim@epita.fr>
16327
16328 * doc/bison.texinfo: Properly set the ``header'' part.
16329 Use @dircategory ``GNU programming tools'' as per Texinfo's
16330 documentation.
16331 Use @copying.
16332
16333 2002-07-09 Akim Demaille <akim@epita.fr>
16334
16335 * lib/quotearg.h: Protect against multiple inclusions.
16336 * src/location.h (location_t): Add a `file' member.
16337 (LOCATION_RESET, LOCATION_PRINT): Adjust.
16338 * src/complain.c (warn_at, complain_at, fatal_at): Drop
16339 `error_one_per_line' support.
16340
16341 2002-07-09 Akim Demaille <akim@epita.fr>
16342
16343 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
16344 * src/reader.c (lineno): Remove.
16345 Adjust all dependencies.
16346 (get_merge_function): Take a location and use complain_at.
16347 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
16348 * tests/regression.at (Invalid inputs, Mixing %token styles):
16349 Adjust.
16350
16351 2002-07-09 Akim Demaille <akim@epita.fr>
16352
16353 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
16354 recovery rule, and forbid extensions when --yacc.
16355 (gram_error): Use complain_at.
16356 * src/reader.c (reader): Exit if there were parse errors.
16357
16358 2002-07-09 Akim Demaille <akim@epita.fr>
16359
16360 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
16361 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
16362 Reported by R Blake <blakers@mac.com>.
16363
16364 2002-07-09 Akim Demaille <akim@epita.fr>
16365
16366 * data/yacc.c: Output the copyright notive in the header.
16367
16368 2002-07-03 Akim Demaille <akim@epita.fr>
16369
16370 * src/output.c (froms, tos): Are state_number_t.
16371 (save_column): sp, sp1, and sp2 are state_number_t.
16372 (prepare): Rename `final' as `final_state_number', `nnts' as
16373 `nterms_number', `nrules' as `rules_number', `nstates' as
16374 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
16375 unused.
16376 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
16377 * data/lalr1.cc (nsym_): Remove, unused.
16378
16379 2002-07-03 Akim Demaille <akim@epita.fr>
16380
16381 * src/lalr.h, src/lalr.c (goto_number_t): New.
16382 * src/lalr.c (goto_list_t): New.
16383 Propagate them.
16384 * src/nullable.c (rule_list_t): New.
16385 Propagate.
16386 * src/types.h: Remove.
16387
16388 2002-07-03 Akim Demaille <akim@epita.fr>
16389
16390 * src/closure.c (print_fderives): Use rule_rhs_print.
16391 * src/derives.c (print_derives): Use rule_rhs_print.
16392 (rule_list_t): New, replaces `shorts'.
16393 (set_derives): Add comments.
16394 * tests/sets.at (Nullable, Firsts): Adjust.
16395
16396 2002-07-03 Akim Demaille <akim@epita.fr>
16397
16398 * src/output.c (prepare_actions): Free `tally' and `width'.
16399 (prepare_actions): Allocate and free `order'.
16400 * src/symtab.c (symbols_free): Free `symbols'.
16401 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
16402 * src/output.c (m4_invoke): Move to...
16403 * src/scan-skel.l: here.
16404 (<<EOF>>): Close yyout, and free its name.
16405
16406 2002-07-03 Akim Demaille <akim@epita.fr>
16407
16408 Fix some memory leaks, and fix a bug: state 0 was examined twice.
16409
16410 * src/LR0.c (new_state): Merge into...
16411 (state_list_append): this.
16412 (new_states): Merge into...
16413 (generate_states): here.
16414 (set_states): Don't ensure a proper `errs' state member here, do it...
16415 * src/conflicts.c (conflicts_solve): here.
16416 * src/state.h, src/state.c: Comment changes.
16417 (state_t): Rename member `shifts' as `transitions'.
16418 Adjust all dependencies.
16419 (errs_new): For consistency, also take the values as argument.
16420 (errs_dup): Remove.
16421 (state_errs_set): New.
16422 (state_reductions_set, state_transitions_set): Assert that no
16423 previous value was assigned.
16424 (state_free): New.
16425 (states_free): Use it.
16426 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
16427 temporary storage: use `errs' and `nerrs' as elsewhere.
16428 (set_conflicts): Allocate and free this `errs'.
16429
16430 2002-07-02 Akim Demaille <akim@epita.fr>
16431
16432 * lib/libiberty.h: New.
16433 * lib: Update the bitset implementation from upstream.
16434 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
16435 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
16436 * src/main.c: Adjust bitset stats calls.
16437
16438 2002-07-01 Paul Eggert <eggert@twinsun.com>
16439
16440 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
16441 char, so that negative chars don't collide with $.
16442
16443 2002-06-30 Akim Demaille <akim@epita.fr>
16444
16445 Have the GLR tests be `warning' checked, and fix the warnings.
16446
16447 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
16448 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
16449 (yyremoveDeletes): `yyi' and `yyj' are size_t.
16450 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
16451 (yyaddDeferredAction): static.
16452 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
16453 (yyreportParseError): yyprefix is const.
16454 yytokenp is used only when verbose.
16455 (yy__GNUC__): Replace with __GNUC__.
16456 (yypdumpstack): yyi is size_t.
16457 (yypreference): Un-yy local variables and arguments, to avoid
16458 clashes with `yyr1'. Anyway, we are not in the user name space.
16459 (yytname_size): be an int, as is compared with ints.
16460 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
16461 Use them.
16462 * tests/cxx-gram.at: Use quotation to protect $1.
16463 Use AT_COMPILE to enable warnings hunts.
16464 Prototype yylex and yyerror.
16465 `Use' argc.
16466 Include `string.h', not `strings.h'.
16467 Produce and prototype stmtMerge only when used.
16468 yylex takes a location.
16469
16470 2002-06-30 Akim Demaille <akim@epita.fr>
16471
16472 We spend a lot of time in quotearg, in particular when --verbose.
16473
16474 * src/symtab.c (symbol_get): Store a quoted version of the key.
16475 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
16476 Adjust all callers.
16477
16478 2002-06-30 Akim Demaille <akim@epita.fr>
16479
16480 * src/state.h (reductions_t): Rename member `nreds' as num.
16481 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
16482 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
16483
16484 2002-06-30 Akim Demaille <akim@epita.fr>
16485
16486 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
16487 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
16488 (shifts_to): Rename as...
16489 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
16490 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
16491 (TRANSITION_IS_DISABLED, transitions_to): these.
16492
16493 2002-06-30 Akim Demaille <akim@epita.fr>
16494
16495 * src/print.c (print_shifts, print_gotos): Merge into...
16496 (print_transitions): this.
16497 (print_transitions, print_errs, print_reductions): Align the
16498 lookaheads columns.
16499 (print_core, print_transitions, print_errs, print_state,
16500 print_grammar): Output empty lines separator before, not after.
16501 (state_default_rule_compute): Rename as...
16502 (state_default_rule): this.
16503 * tests/conflicts.at (Defaulted Conflicted Reduction),
16504 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
16505 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
16506
16507 2002-06-30 Akim Demaille <akim@epita.fr>
16508
16509 Display items as we display rules.
16510
16511 * src/gram.h, src/gram.c (rule_lhs_print): New.
16512 * src/gram.c (grammar_rules_partial_print): Use it.
16513 * src/print.c (print_core): Likewise.
16514 * tests/conflicts.at (Defaulted Conflicted Reduction),
16515 (Unresolved SR Conflicts): Adjust.
16516 (Unresolved SR Conflicts): Adjust and rename as...
16517 (Resolved SR Conflicts): this, as was meant.
16518 * tests/regression.at (Web2c Report): Adjust.
16519
16520 2002-06-30 Akim Demaille <akim@epita.fr>
16521
16522 * src/print.c (state_default_rule_compute): New, extracted from...
16523 (print_reductions): here.
16524 Pessimize, but clarify the code.
16525 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
16526
16527 2002-06-30 Akim Demaille <akim@epita.fr>
16528
16529 * src/output.c (action_row): Let default_rule be always a rule
16530 number.
16531
16532 2002-06-30 Akim Demaille <akim@epita.fr>
16533
16534 * src/closure.c (print_firsts, print_fderives, closure):
16535 Use BITSET_EXECUTE.
16536 * src/lalr.c (lookaheads_print): Likewise.
16537 * src/state.c (state_rule_lookaheads_print): Likewise.
16538 * src/print_graph.c (print_core): Likewise.
16539 * src/print.c (print_reductions): Likewise.
16540 * src/output.c (action_row): Likewise.
16541 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
16542
16543 2002-06-30 Akim Demaille <akim@epita.fr>
16544
16545 * src/print_graph.c: Use report_flag.
16546
16547 2002-06-30 Akim Demaille <akim@epita.fr>
16548
16549 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
16550 to...
16551 * src/relation.h, src/relation.c (traverse, relation_digraph)
16552 (relation_print, relation_transpose): New.
16553
16554 2002-06-30 Akim Demaille <akim@epita.fr>
16555
16556 * src/state.h, src/state.c (shifts_to): New.
16557 * src/lalr.c (build_relations): Use it.
16558
16559 2002-06-30 Akim Demaille <akim@epita.fr>
16560
16561 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
16562 (item_number_of_rule_number, rule_number_of_item_number): New.
16563 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
16564 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
16565 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
16566 Propagate their use.
16567 Much remains to be done, in particular wrt `shorts' from types.h.
16568
16569 2002-06-30 Akim Demaille <akim@epita.fr>
16570
16571 * src/symtab.c (symbol_new): Initialize the `printer' member.
16572
16573 2002-06-30 Akim Demaille <akim@epita.fr>
16574
16575 * src/LR0.c (save_reductions): Remove, replaced by...
16576 * src/state.h, src/state.c (state_reductions_set): New.
16577 (reductions, errs): Rename as...
16578 (reductions_t, errs_t): these.
16579 Adjust all dependencies.
16580
16581 2002-06-30 Akim Demaille <akim@epita.fr>
16582
16583 * src/LR0.c (state_list_t, state_list_append): New.
16584 (first_state, last_state): Now symbol_list_t.
16585 (this_state): Remove.
16586 (new_itemsets, append_states, save_reductions): Take a state_t as
16587 argument.
16588 (set_states, generate_states): Adjust.
16589 (save_shifts): Remove, replaced by...
16590 * src/state.h, src/state.c (state_shifts_set): New.
16591 (shifts): Rename as...
16592 (shifts_t): this.
16593 Adjust all dependencies.
16594 * src/state.h (state_t): Remove the `next' member.
16595
16596 2002-06-30 Akim Demaille <akim@epita.fr>
16597
16598 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
16599 escaped in slot 0.
16600
16601 2002-06-30 Akim Demaille <akim@epita.fr>
16602
16603 Use hash.h for the state hash table.
16604
16605 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
16606 (allocate_storage): Use state_hash_new.
16607 (free_storage): Use state_hash_free.
16608 (new_state, get_state): Adjust.
16609 * src/lalr.h, src/lalr.c (states): Move to...
16610 * src/states.h (state_t): Remove the `link' member, no longer
16611 used.
16612 * src/states.h, src/states.c: here.
16613 (state_hash_new, state_hash_free, state_hash_lookup)
16614 (state_hash_insert, states_free): New.
16615 * src/states.c (state_table, state_compare, state_hash): New.
16616 * src/output.c (output_actions): Do not free states now, since we
16617 still need to know the final_state number in `prepare', called
16618 afterwards. Do it...
16619 * src/main.c (main): here: call states_free after `output'.
16620
16621 2002-06-30 Akim Demaille <akim@epita.fr>
16622
16623 * src/state.h, src/state.c (state_new): New, extracted from...
16624 * src/LR0.c (new_state): here.
16625 * src/state.h (STATE_ALLOC): Move to...
16626 * src/state.c: here.
16627 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
16628 * src/state.h, src/state.c: here.
16629
16630 2002-06-30 Akim Demaille <akim@epita.fr>
16631
16632 * src/reader.c (gensym): Rename as...
16633 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
16634 (getsym): Rename as...
16635 (symbol_get): this.
16636
16637 2002-06-30 Akim Demaille <akim@epita.fr>
16638
16639 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
16640 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
16641 * src/output.c, src/print.c, src/print_graph.c: Propagate.
16642 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
16643
16644 2002-06-30 Akim Demaille <akim@epita.fr>
16645
16646 Make the test suite pass with warnings checked.
16647
16648 * tests/actions.at (Printers and Destructors): Improve.
16649 Avoid unsigned vs. signed issues.
16650 * tests/calc.at: Don't exercise the scanner here, do it...
16651 * tests/input.at (Torturing the Scanner): here.
16652
16653 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16654
16655 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
16656 reorganize first lines parallel to yacc.c.
16657
16658 2002-06-28 Akim Demaille <akim@epita.fr>
16659
16660 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
16661 (b4_token_enum, b4_token_defines): New, factored from...
16662 * data/lalr1.cc, data/yacc.c, glr.c: here.
16663
16664 2002-06-28 Akim Demaille <akim@epita.fr>
16665
16666 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
16667 unused variables.
16668 * src/output.c (merger_output): static.
16669
16670 2002-06-28 Akim Demaille <akim@epita.fr>
16671
16672 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
16673 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
16674 pacify GCC.
16675 * src/output.c (save_row): Initialize all the variables to pacify GCC.
16676
16677 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16678
16679 Accumulated changelog for new GLR parsing features.
16680
16681 * src/conflicts.c (count_total_conflicts): Change name to
16682 conflicts_total_count.
16683 * src/conflicts.h: Ditto.
16684 * src/output.c (token_actions): Use the new name.
16685 (output_conflicts): Change conflp => conflict_list_heads, and
16686 confl => conflict_list for better readability.
16687 * data/glr.c: Use the new names.
16688 * NEWS: Add self to GLR announcement.
16689
16690 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
16691
16692 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
16693 Akim Demaille.
16694
16695 * data/bison.glr: Change name to glr.c
16696 * data/glr.c: Renamed from bison.glr.
16697 * data/Makefile.am: Add glr.c
16698
16699 * src/getargs.c:
16700
16701 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
16702 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
16703
16704 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16705
16706 * data/bison.glr: Be sure to restore the
16707 current #line when returning to the skeleton contents after having
16708 exposed the input file's #line.
16709
16710 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16711
16712 * data/bison.glr: Bring up to date with changes to bison.simple.
16713
16714 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16715
16716 * data/bison.glr: Correct definitions that use b4_prefix.
16717 Various reformatting.
16718 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
16719 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
16720 yytokenp argument; now part of stack.
16721 (yychar): Define to behave as documented.
16722 (yyclearin): Ditto.
16723
16724 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16725
16726 * src/reader.h: Add declaration for free_merger_functions.
16727
16728 * src/reader.c (merge_functions): New variable.
16729 (get_merge_function): New function.
16730 (free_merger_functions): New function.
16731 (readgram): Check for %prec that is not followed by a symbol.
16732 Handle %dprec and %merge declarations.
16733 (packgram): Initialize dprec and merger fields in rules array.
16734
16735 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
16736 conflict_list_cnt, conflict_list_free): New variables.
16737 (table_grow): Also grow conflict_table.
16738 (prepare_rules): Output dprec and merger tables.
16739 (conflict_row): New function.
16740 (action_row): Output conflict lists for GLR parser. Don't use
16741 default reduction in conflicted states for GLR parser so that there
16742 are spaces for the conflict lists.
16743 (save_row): Also save conflict information.
16744 (token_actions): Allocate conflict list.
16745 (merger_output): New function.
16746 (pack_vector): Pack conflict table, too.
16747 (output_conflicts): New function to output yyconflp and yyconfl.
16748 (output_check): Allocate conflict_tos.
16749 (output_actions): Output conflict tables, also.
16750 (output_skeleton): Output b4_mergers definition.
16751 (prepare): Output b4_max_rhs_length definition.
16752 Use 'bison.glr' as default skeleton for GLR parsers.
16753
16754 * src/gram.c (glr_parser): New flag.
16755 (grammar_free): Call free_merger_functions.
16756
16757 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
16758 all pairs of conflicting reductions, rather than just all tokens
16759 causing conflicts. Needed to size conflict tables.
16760 (conflicts_output): Modify call to count_rr_conflicts for new
16761 interface.
16762 (conflicts_print): Ditto.
16763 (count_total_conflicts): New function.
16764
16765 * src/reader.h (merger_list): New type.
16766 (merge_functions): New variable.
16767
16768 * src/lex.h (tok_dprec, tok_merge): New token types.
16769
16770 * src/gram.h (rule_s): Add dprec and merger fields.
16771 (glr_parser): New flag.
16772
16773 * src/conflicts.h (count_total_conflicts): New function.
16774
16775 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
16776
16777 * doc/bison.texinfo (Generalized LR Parsing): New section.
16778 (GLR Parsers): New section.
16779 (Language and Grammar): Mention GLR parsing.
16780 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
16781 Correct typo ("tge" -> "the").
16782
16783 * data/bison.glr: New skeleton for GLR parsing.
16784
16785 * tests/cxx-gram.at: New tests for GLR parsing.
16786
16787 * tests/testsuite.at: Include cxx-gram.at.
16788
16789 * tests/Makefile.am: Add cxx-gram.at.
16790
16791 * src/parse-gram.y:
16792
16793 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
16794
16795 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
16796
16797 2002-06-27 Akim Demaille <akim@epita.fr>
16798
16799 * src/options.h, src/options.c: Remove.
16800 * src/getargs.c (short_options, long_options): New.
16801
16802 2002-06-27 Akim Demaille <akim@epita.fr>
16803
16804 * data/bison.simple, data/bison.c++: Rename as...
16805 * data/yacc.c, data/lalr1.cc: these.
16806 * doc/bison.texinfo (Environment Variables): Remove.
16807
16808 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
16809
16810 * src/getargs.c (report_argmatch): Initialize strtok().
16811
16812 2002-06-20 Akim Demaille <akim@epita.fr>
16813
16814 * data/bison.simple (b4_symbol_actions): New, replaces...
16815 (b4_symbol_destructor, b4_symbol_printer): these.
16816 (yysymprint): Be sure to call YYPRINT only for tokens, and using
16817 user token numbers.
16818
16819 2002-06-20 Akim Demaille <akim@epita.fr>
16820
16821 * data/bison.simple (yydestructor): Rename as...
16822 (yydestruct): this.
16823
16824 2002-06-20 Akim Demaille <akim@epita.fr>
16825
16826 * src/symtab.h, src/symtab.c (symbol_type_set)
16827 (symbol_destructor_set, symbol_precedence_set): The location is
16828 the last argument.
16829 Adjust all callers.
16830
16831 2002-06-20 Akim Demaille <akim@epita.fr>
16832
16833 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
16834 internals.
16835 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
16836 Takes a location.
16837 * src/symtab.h, src/symtab.c (symbol_class_set)
16838 (symbol_user_token_number_set): Likewise.
16839 Adjust all callers.
16840 Promote complain_at.
16841 * tests/input.at (Type Clashes): Adjust.
16842
16843 2002-06-20 Akim Demaille <akim@epita.fr>
16844
16845 * data/bison.simple (YYLEX): Fix the declaration when
16846 %pure-parser.
16847
16848 2002-06-20 Akim Demaille <akim@epita.fr>
16849
16850 * data/bison.simple (yysymprint): Don't print the token number,
16851 just its name.
16852 * tests/actions.at (Destructors): Rename as...
16853 (Printers and Destructors): this.
16854 Also exercise %printer.
16855
16856 2002-06-20 Akim Demaille <akim@epita.fr>
16857
16858 * data/bison.simple (YYDSYMPRINT): New.
16859 Use it to remove many of the #if YYDEBUG/if (yydebug).
16860
16861 2002-06-20 Akim Demaille <akim@epita.fr>
16862
16863 * src/symtab.h, src/symtab.c (symbol_t): printer and
16864 printer_location are new members.
16865 (symbol_printer_set): New.
16866 * src/parse-gram.y (PERCENT_PRINTER): New token.
16867 Handle its associated rule.
16868 * src/scan-gram.l: Adjust.
16869 (handle_destructor_at, handle_destructor_dollar): Rename as...
16870 (handle_symbol_code_at, handle_symbol_code_dollar): these.
16871 * src/output.c (symbol_printers_output): New.
16872 (output_skeleton): Call it.
16873 * data/bison.simple (yysymprint): New. Cannot be named yyprint
16874 since there are already many grammar files with a user `yyprint'.
16875 Replace the calls to YYPRINT to calls to yysymprint.
16876 * tests/calc.at: Adjust.
16877 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
16878 taking advantage of parser very internal details (stack size!).
16879
16880 2002-06-20 Akim Demaille <akim@epita.fr>
16881
16882 * src/scan-gram.l: Complete the scanner with the missing patterns
16883 to pacify Flex.
16884 Use `quote' and `symbol_tag_get' where appropriate.
16885
16886 2002-06-19 Akim Demaille <akim@epita.fr>
16887
16888 * tests/actions.at (Destructors): Augment to test locations.
16889 * data/bison.simple (yydestructor): Pass it the current location
16890 if locations are enabled.
16891 Prototype only when __STDC__ or C++.
16892 Change the argument names to move into the yy name space: there is
16893 user code here.
16894
16895 2002-06-19 Akim Demaille <akim@epita.fr>
16896
16897 * data/bison.simple (b4_pure_if): New.
16898 Use it instead of #ifdef YYPURE.
16899
16900 2002-06-19 Akim Demaille <akim@epita.fr>
16901
16902 * data/bison.simple (b4_location_if): New.
16903 Use it instead of #ifdef YYLSP_NEEDED.
16904
16905 2002-06-19 Akim Demaille <akim@epita.fr>
16906
16907 Prepare @$ in %destructor, but currently don't bind it in the
16908 skeleton, as %location use is not cleaned up yet.
16909
16910 * src/scan-gram.l (handle_dollar, handle_destructor_at)
16911 (handle_action_at): New.
16912 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
16913 a braced_code_t and a location as additional arguments.
16914 (handle_destructor_dollar): Instead of requiring `b4_eval', just
16915 unquote one when outputting `b4_dollar_dollar'.
16916 Adjust callers.
16917 * data/bison.simple (b4_eval): Remove.
16918 (b4_symbol_destructor): Adjust.
16919 * tests/input.at (Invalid @n): Adjust.
16920
16921 2002-06-19 Zack Weinberg <zack@codesourcery.com>
16922
16923 * doc/bison.texinfo: Document ability to have multiple
16924 prologue sections.
16925
16926 2002-06-18 Akim Demaille <akim@epita.fr>
16927
16928 * src/files.c (compute_base_names): When computing the output file
16929 names from the input file name, strip the directory part.
16930
16931 2002-06-18 Akim Demaille <akim@epita.fr>
16932
16933 * data/bison.simple.new: Comment changes.
16934 Reported by Andreas Schwab.
16935
16936 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
16937
16938 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
16939 there are no `label `yyoverflowlab' defined but not used' warnings
16940 when yyoverflow is defined.
16941
16942 2002-06-18 Akim Demaille <akim@epita.fr>
16943
16944 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
16945 new member.
16946 (symbol_destructor_set): Adjust.
16947 * src/output.c (symbol_destructors_output): Output the destructor
16948 locations.
16949 Output the symbol name.
16950 * data/bison.simple (b4_symbol_destructor): Adjust.
16951
16952 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
16953 and Akim Demaille <akim@epita.fr>
16954
16955 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
16956 what's left on the stack when the error recovery hits EOF.
16957 * tests/actions.at (Destructors): Complete to exercise this case.
16958
16959 2002-06-17 Akim Demaille <akim@epita.fr>
16960
16961 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
16962 arguments is really empty, not only equal to `[]'.
16963 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
16964 member.
16965 (symbol_destructor_set): New.
16966 * src/output.c (symbol_destructors_output): New.
16967 * src/reader.h (brace_code_t, current_braced_code): New.
16968 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
16969 (handle_dollar): Rename as...
16970 (handle_action_dollar): this.
16971 (handle_destructor_dollar): New.
16972 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
16973 (grammar_declaration): Use it.
16974 * data/bison.simple (yystos): Is always defined.
16975 (yydestructor): New.
16976 * tests/actions.at (Destructors): New.
16977 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
16978
16979 2002-06-17 Akim Demaille <akim@epita.fr>
16980
16981 * src/symlist.h, src/symlist.c (symbol_list_length): New.
16982 * src/scan-gram.l (handle_dollar, handle_at): Compute the
16983 rule_length only when needed.
16984 * src/output.c (actions_output, token_definitions_output): Output
16985 the full M4 block.
16986 * src/symtab.c: Don't access directly to the symbol tag, use
16987 symbol_tag_get.
16988 * src/parse-gram.y: Use symbol_list_free.
16989
16990 2002-06-17 Akim Demaille <akim@epita.fr>
16991
16992 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
16993 (symbol_list_prepend, get_type_name): Move to...
16994 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
16995 (symbol_list_prepend, symbol_list_n_type_name_get): here.
16996 Adjust all callers.
16997 (symbol_list_free): New.
16998 * src/scan-gram.l (handle_dollar): Takes a location.
16999 * tests/input.at (Invalid $n): Adjust.
17000
17001 2002-06-17 Akim Demaille <akim@epita.fr>
17002
17003 * src/reader.h, src/reader.c (symbol_list_new): Export it.
17004 (symbol_list_prepend): New.
17005 * src/parse-gram.y (%union): `list' is a new member.
17006 (symbols.1): New, replaces...
17007 (terms_to_prec.1, nterms_to_type.1): these.
17008 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
17009 Take a location as additional argument.
17010 Adjust all callers.
17011
17012 2002-06-15 Akim Demaille <akim@epita.fr>
17013
17014 * src/parse-gram.y: Move %token in the declaration section so that
17015 we don't depend upon CVS Bison.
17016
17017 2002-06-15 Akim Demaille <akim@epita.fr>
17018
17019 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
17020 * src/print.c (print_core): Use it.
17021
17022 2002-06-15 Akim Demaille <akim@epita.fr>
17023
17024 * src/conflicts.c (log_resolution): Accept the rule involved in
17025 the sr conflicts instead of the lookahead number that points to
17026 that rule.
17027 (flush_reduce): Accept the current lookahead vector as argument,
17028 instead of the index in LA.
17029 (resolve_sr_conflict): Accept the current number of lookahead
17030 bitset to consider for the STATE, instead of the index in LA.
17031 (set_conflicts): Adjust.
17032 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
17033
17034 2002-06-15 Akim Demaille <akim@epita.fr>
17035
17036 * src/state.h (state_t): Replace the `lookaheadsp' member, a
17037 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
17038 Adjust all dependencies.
17039 * src/lalr.c (initialize_lookaheads): Split into...
17040 (states_lookaheads_count, states_lookaheads_initialize): these.
17041 (lalr): Adjust.
17042
17043 2002-06-15 Akim Demaille <akim@epita.fr>
17044
17045 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
17046 out of...
17047 (grammar_rules_print): here.
17048 * src/reduce.c (reduce_output): Use it.
17049 * tests/reduce.at (Useless Rules, Reduced Automaton)
17050 (Underivable Rules): Adjust.
17051
17052 2002-06-15 Akim Demaille <akim@epita.fr>
17053
17054 Copy BYacc's nice way to report the grammar.
17055
17056 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
17057 New.
17058 Don't print the rules' location, it is confusing and useless.
17059 (rule_print): Use grammar_rhs_print.
17060 * src/print.c (print_grammar): Use grammar_rules_print.
17061
17062 2002-06-15 Akim Demaille <akim@epita.fr>
17063
17064 Complete and rationalize `useless thing' warnings.
17065
17066 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
17067 (symbol_tag_print): New.
17068 Use them everywhere in place of accessing directly the tag member.
17069 * src/gram.h, src/gram.c (rule_print): New.
17070 Use it where a rule used to be printed `by hand'.
17071 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
17072 (reduce_grammar_tables): Report the useless rules.
17073 (reduce_print): Useless things are a warning, not an error.
17074 Report it as such.
17075 * tests/reduce.at (Useless Nonterminals, Useless Rules):
17076 (Reduced Automaton, Underivable Rules): Adjust.
17077 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
17078 * tests/conflicts.at (Unresolved SR Conflicts)
17079 (Solved SR Conflicts): Adjust.
17080
17081 2002-06-15 Akim Demaille <akim@epita.fr>
17082
17083 Let symbols have a location.
17084
17085 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
17086 (getsym): Adjust.
17087 Adjust all callers.
17088 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
17089 Use location_t, not int.
17090 * src/symtab.c (symbol_check_defined): Take advantage of the
17091 location.
17092 * tests/regression.at (Invalid inputs): Adjust.
17093
17094 2002-06-15 Akim Demaille <akim@epita.fr>
17095
17096 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
17097 (input): Don't try to initialize yylloc here, do it in the
17098 scanner.
17099 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
17100 * src/gram.h (rule_t): Change line and action_line into location
17101 and action_location, of location_t type.
17102 Adjust all dependencies.
17103 * src/location.h, src/location.c (empty_location): New.
17104 * src/reader.h, src/reader.c (grammar_start_symbol_set)
17105 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
17106 (grammar_current_rule_symbol_append)
17107 (grammar_current_rule_action_append): Expect a location as argument.
17108 * src/reader.c (grammar_midrule_action): Adjust to attach an
17109 action's location as dummy symbol location.
17110 * src/symtab.h, src/symtab.c (startsymbol_location): New.
17111 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
17112 the line numbers.
17113
17114 2002-06-14 Akim Demaille <akim@epita.fr>
17115
17116 Grammar declarations may be found in the grammar section.
17117
17118 * src/parse-gram.y (rules_or_grammar_declaration): New.
17119 (declarations): Each declaration may end with a semicolon, not
17120 just...
17121 (grammar_declaration): `"%union"'.
17122 (grammar): Branch to rules_or_grammar_declaration.
17123
17124 2002-06-14 Akim Demaille <akim@epita.fr>
17125
17126 * src/main.c (main): Invoke scanner_free.
17127
17128 2002-06-14 Akim Demaille <akim@epita.fr>
17129
17130 * src/output.c (m4_invoke): Extracted from...
17131 (output_skeleton): here.
17132 Free tempfile.
17133
17134 2002-06-14 Akim Demaille <akim@epita.fr>
17135
17136 * src/parse-gram.y (directives, directive, gram)
17137 (grammar_directives, precedence_directives, precedence_directive):
17138 Rename as...
17139 (declarations, declaration, grammar, grammar_declaration)
17140 (precedence_declaration, precedence_declarator): these.
17141 (symbol_declaration): New.
17142
17143 2002-06-14 Akim Demaille <akim@epita.fr>
17144
17145 * src/files.c (action_obstack): Remove, unused.
17146 (output_obstack): Remove it, and all its dependencies, as it is no
17147 longer needed.
17148 * src/reader.c (epilogue_set): Build the epilogue in the
17149 muscle_obstack.
17150 * src/output.h, src/output.c (muscle_obstack): Move to...
17151 * src/muscle_tab.h, src/muscle_tab.h: here.
17152 (muscle_init): Initialize muscle_obstack.
17153 (muscle_free): New.
17154 * src/main.c (main): Call it.
17155
17156 2002-06-14 Akim Demaille <akim@epita.fr>
17157
17158 * src/location.h: New, extracted from...
17159 * src/reader.h: here.
17160 * src/Makefile.am (noinst_HEADERS): Merge into
17161 (bison_SOURCES): this.
17162 Add location.h.
17163 * src/parse-gram.y: Use location_t instead of Bison's.
17164 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
17165 Use location_t instead of ints.
17166
17167 2002-06-14 Akim Demaille <akim@epita.fr>
17168
17169 * data/bison.simple, data/bison.c++: Be sure to restore the
17170 current #line when returning to the skeleton contents after having
17171 exposed the input file's #line.
17172
17173 2002-06-12 Akim Demaille <akim@epita.fr>
17174
17175 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
17176 eager.
17177 * tests/actions.at (Exotic Dollars): New.
17178
17179 2002-06-12 Akim Demaille <akim@epita.fr>
17180
17181 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
17182 ['"/] too eagerly.
17183 * tests/input.at (Torturing the Scanner): New.
17184
17185 2002-06-11 Akim Demaille <akim@epita.fr>
17186
17187 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
17188 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
17189 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
17190 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
17191 * src/reader.c (reader): Use it.
17192
17193 2002-06-11 Akim Demaille <akim@epita.fr>
17194
17195 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
17196 Adjust all callers.
17197 (scanner_last_string_free): New.
17198
17199 2002-06-11 Akim Demaille <akim@epita.fr>
17200
17201 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
17202 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
17203 (last_string, YY_OBS_FREE): New.
17204 Use them when returning an ID.
17205
17206 2002-06-11 Akim Demaille <akim@epita.fr>
17207
17208 Have Bison grammars parsed by a Bison grammar.
17209
17210 * src/reader.c, src/reader.h (prologue_augment): New.
17211 * src/reader.c (copy_definition): Remove.
17212
17213 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
17214 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
17215 (grammar_current_rule_prec_set, grammar_current_rule_check)
17216 (grammar_current_rule_symbol_append)
17217 (grammar_current_rule_action_append): Export.
17218 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
17219 (symbol_list_action_append): Remove.
17220 Hook the routines from reader.
17221 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
17222 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
17223
17224 * src/reader.c (read_declarations): Remove, unused.
17225
17226 * src/parse-gram.y: Handle the epilogue.
17227 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
17228 (grammar_start_symbol_set): this.
17229 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
17230 * src/reader.c (readgram): Remove, unused.
17231 (reader): Adjust to insert eoftoken and axiom where appropriate.
17232
17233 * src/reader.c (copy_dollar): Replace with...
17234 * src/scan-gram.h (handle_dollar): this.
17235 * src/parse-gram.y: Remove `%thong'.
17236
17237 * src/reader.c (copy_at): Replace with...
17238 * src/scan-gram.h (handle_at): this.
17239
17240 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
17241 New.
17242
17243 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
17244 time being.
17245
17246 * src/reader.h, src/reader.c (grammar_rule_end): New.
17247
17248 * src/parse.y (current_type, current_class): New.
17249 Implement `%nterm', `%token' support.
17250 Merge `%term' into `%token'.
17251 (string_as_id): New.
17252 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
17253 type name.
17254
17255 * src/parse-gram.y: Be sure to handle properly the beginning of
17256 rules.
17257
17258 * src/parse-gram.y: Handle %type.
17259 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
17260
17261 * src/parse-gram.y: More directives support.
17262 * src/options.c: No longer handle source directives.
17263
17264 * src/parse-gram.y: Fix %output.
17265
17266 * src/parse-gram.y: Handle %union.
17267 Use the prologue locations.
17268 * src/reader.c (parse_union_decl): Remove.
17269
17270 * src/reader.h, src/reader.c (epilogue_set): New.
17271 * src/parse-gram.y: Use it.
17272
17273 * data/bison.simple, data/bison.c++: b4_stype is now either not
17274 defined, then default to int, or to the contents of %union,
17275 without `union' itself.
17276 Adjust.
17277 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
17278
17279 * src/output.c (actions_output): Don't output braces, as they are
17280 already handled by the scanner.
17281
17282 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
17283 characters to themselves.
17284
17285 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
17286 that the epilogue has a proper #line.
17287
17288 * src/parse-gram.y: Handle precedence/associativity.
17289
17290 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
17291 a terminal.
17292 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
17293 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
17294 at all to define terminals that cannot be emitted.
17295
17296 * src/scan-gram.l: Escape M4 characters.
17297
17298 * src/scan-gram.l: Working properly with escapes in user
17299 strings/characters.
17300
17301 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
17302 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
17303 grammar.
17304 Use more modest sizes, as for the time being the parser does not
17305 release memory, and therefore the process swallows a huge amount
17306 of memory.
17307
17308 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
17309 stricter %token grammar.
17310
17311 * src/symtab.h (associativity): Add `undef_assoc'.
17312 (symbol_precedence_set): Do nothing when passed an undef_assoc.
17313 * src/symtab.c (symbol_check_alias_consistence): Adjust.
17314
17315 * tests/regression.at (Invalid %directive): Remove, as it is now
17316 meaningless.
17317 (Invalid inputs): Adjust to the new error messages.
17318 (Token definitions): The new grammar doesn't allow too many
17319 eccentricities.
17320
17321 * src/lex.h, src/lex.c: Remove.
17322 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
17323 (copy_character, copy_string2, copy_string, copy_identifier)
17324 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
17325 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
17326 (parse_action): Remove.
17327 * po/POTFILES.in: Adjust.
17328
17329 2002-06-11 Akim Demaille <akim@epita.fr>
17330
17331 * src/reader.c (parse_action): Don't store directly into the
17332 rule's action member: return the action as a string.
17333 Don't require `rule_length' as an argument: compute it.
17334 (grammar_current_rule_symbol_append)
17335 (grammar_current_rule_action_append): New, eved out from
17336 (readgram): here.
17337 Remove `action_flag', `rulelength', unused now.
17338
17339 2002-06-11 Akim Demaille <akim@epita.fr>
17340
17341 * src/reader.c (grammar_current_rule_prec_set).
17342 (grammar_current_rule_check): New, eved out from...
17343 (readgram): here.
17344 Remove `xaction', `first_rhs': useless.
17345 * tests/input.at (Type clashes): New.
17346 * tests/existing.at (GNU Cim Grammar): Adjust.
17347
17348 2002-06-11 Akim Demaille <akim@epita.fr>
17349
17350 * src/reader.c (grammar_midrule_action): New, Eved out from
17351 (readgram): here.
17352
17353 2002-06-11 Akim Demaille <akim@epita.fr>
17354
17355 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
17356 New.
17357 (readgram): Use them as replacement of inlined code, crule and
17358 crule1.
17359
17360 2002-06-11 Akim Demaille <akim@epita.fr>
17361
17362 * src/reader.c (grammar_end, grammar_symbol_append): New.
17363 (readgram): Use them.
17364 Make the use of `p' as local as possible.
17365
17366 2002-06-10 Akim Demaille <akim@epita.fr>
17367
17368 GCJ's parser requires the tokens to be defined before the prologue.
17369
17370 * data/bison.simple: Output the token definition before the user's
17371 prologue.
17372 * tests/regression.at (Braces parsing, Duplicate string)
17373 (Mixing %token styles): Check the output from bison.
17374 (Early token definitions): New.
17375
17376 2002-06-10 Akim Demaille <akim@epita.fr>
17377
17378 * src/symtab.c (symbol_user_token_number_set): Don't complain when
17379 assigning twice the same user number to a token, so that we can
17380 use it in...
17381 * src/lex.c (lex): here.
17382 Also use `symbol_class_set' instead of hand written code.
17383 * src/reader.c (parse_assoc_decl): Likewise.
17384
17385 2002-06-10 Akim Demaille <akim@epita.fr>
17386
17387 * src/symtab.c, src/symtab.c (symbol_class_set)
17388 (symbol_user_token_number_set): New.
17389 * src/reader.c (parse_token_decl): Use them.
17390 Use a switch instead of ifs.
17391 Use a single argument.
17392
17393 2002-06-10 Akim Demaille <akim@epita.fr>
17394
17395 Remove `%thong' support as it is undocumented, unused, duplicates
17396 `%token's job, and creates useless e-mail traffic with people who
17397 want to know what it is, why it is undocumented, unused, and
17398 duplicates `%token's job.
17399
17400 * src/reader.c (parse_thong_decl): Remove.
17401 * src/options.c (option_table): Remove "thong".
17402 * src/lex.h (tok_thong): Remove.
17403
17404 2002-06-10 Akim Demaille <akim@epita.fr>
17405
17406 * src/symtab.c, src/symtab.c (symbol_type_set)
17407 (symbol_precedence_set): New.
17408 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
17409 (value_components_used): Remove, unused.
17410
17411 2002-06-09 Akim Demaille <akim@epita.fr>
17412
17413 Move symbols handling code out of the reader.
17414
17415 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
17416 (axiom): Move to...
17417 * src/symtab.h, src/symtab.c: here.
17418
17419 * src/gram.c (start_symbol): Remove: use startsymbol->number.
17420 * src/reader.c (startval): Rename as...
17421 * src/symtab.h, src/symtab.c (startsymbol): this.
17422 * src/reader.c: Adjust.
17423
17424 * src/reader.c (symbol_check_defined, symbol_make_alias)
17425 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
17426 (token_translations_init)
17427 Move to...
17428 * src/symtab.c: here.
17429 * src/reader.c (packsymbols): Move to...
17430 * src/symtab.h, src/symtab.c (symbols_pack): here.
17431 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
17432 argument.
17433
17434 2002-06-03 Akim Demaille <akim@epita.fr>
17435
17436 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
17437 then statements.
17438
17439 2002-06-03 Akim Demaille <akim@epita.fr>
17440
17441 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
17442 structs with non literals.
17443 * src/scan-skel.l: never-interactive.
17444 * src/conflicts.c (enum conflict_resolution_e): No trailing
17445 comma.
17446 * src/getargs.c (usage): Split long literal strings.
17447 Reported by Hans Aberg.
17448
17449 2002-05-28 Akim Demaille <akim@epita.fr>
17450
17451 * data/bison.c++: Use C++ ostreams.
17452 (cdebug_): New member.
17453
17454 2002-05-28 Akim Demaille <akim@epita.fr>
17455
17456 * src/output.c (output_skeleton): Be sure to allocate enough room
17457 for `/' _and_ for `\0' in full_skeleton.
17458
17459 2002-05-28 Akim Demaille <akim@epita.fr>
17460
17461 * data/bison.c++: Catch up with bison.simple:
17462 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17463 and Paul Eggert <eggert@twinsun.com>: `error' handing.
17464 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
17465 and popping traces.
17466
17467 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17468
17469 * src/output.c (output_skeleton): Put an explicit path in front of
17470 the skeleton file name, rather than relying on the -I directory,
17471 to partially alleviate effects of having a skeleton file lying around
17472 in the current directory.
17473
17474 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17475
17476 * src/conflicts.c (log_resolution): Correct typo:
17477 obstack_printf should be obstack_fgrow1.
17478
17479 2002-05-26 Akim Demaille <akim@epita.fr>
17480
17481 * src/state.h (state_t): `solved_conflicts' is a new member.
17482 * src/LR0.c (new_state): Set it to 0.
17483 * src/conflicts.h, src/conflicts.c (print_conflicts)
17484 (free_conflicts, solve_conflicts): Rename as...
17485 (conflicts_print, conflicts_free, conflicts_solve): these.
17486 Adjust callers.
17487 * src/conflicts.c (enum conflict_resolution_e)
17488 (solved_conflicts_obstack): New, used by...
17489 (log_resolution): this.
17490 Adjust to attach the conflict resolution to each state.
17491 Complete the description with the precedence/associativity
17492 information.
17493 (resolve_sr_conflict): Adjust.
17494 * src/print.c (print_state): Output its solved_conflicts.
17495 * tests/conflicts.at (Unresolved SR Conflicts)
17496 (Solved SR Conflicts): Exercise --report=all.
17497
17498 2002-05-26 Akim Demaille <akim@epita.fr>
17499
17500 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17501 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
17502 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
17503 (token_number_t, item_number_as_token_number)
17504 (token_number_as_item_number, muscle_insert_token_number_table):
17505 Rename as...
17506 (symbol_number_t, item_number_as_symbol_number)
17507 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
17508 these, since it is more appropriate.
17509
17510 2002-05-26 Akim Demaille <akim@epita.fr>
17511
17512 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
17513 `Error:' lines.
17514 * data/bison.simple (yystos) [YYDEBUG]: New.
17515 (yyparse) [YYDEBUG]: Display the symbols which are popped during
17516 error recovery.
17517 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
17518
17519 2002-05-25 Akim Demaille <akim@epita.fr>
17520
17521 * doc/bison.texinfo (Debugging): Split into...
17522 (Tracing): this new section, its former contents, and...
17523 (Understanding): this new section.
17524 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
17525 by...
17526 (report_flag): this.
17527 Adjust all dependencies.
17528 (report_args, report_types, report_argmatch): New.
17529 (usage, getargs): Report/support -r, --report.
17530 * src/options.h
17531 (struct option_table_struct): Rename as..,
17532 (struct option_table_s): this.
17533 Rename the `set_flag' member to `flag' to match with getopt_long's
17534 struct.
17535 * src/options.c (option_table): Split verbose into an entry for
17536 %verbose, and another for --verbose.
17537 Support --report/-r, so remove -r from the obsolete --raw.
17538 * src/print.c: Attach full item sets and lookaheads reports to
17539 report_flag instead of trace_flag.
17540 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
17541
17542 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17543 and Paul Eggert <eggert@twinsun.com>
17544
17545 * data/bison.simple (yyparse): Correct error handling to conform to
17546 POSIX and yacc. Specifically, after syntax error is discovered,
17547 do not reduce further before shifting the error token.
17548 Clean up the code a bit by removing the labels yyerrdefault,
17549 yyerrhandle, yyerrpop.
17550 * NEWS: Document the above.
17551
17552 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17553
17554 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
17555 type; it isn't always big enough, since it doesn't necessarily
17556 include non-terminals.
17557 (yytranslate): Expand definition of yy_token_number_type, so that
17558 the latter can be removed.
17559 (yy_token_number_type): Remove, only one use.
17560 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
17561 don't use TokenNumberType as element type.
17562
17563 * tests/regression.at: Modify expected output to agree with change
17564 to yyr1 and yytranslate.
17565
17566 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
17567
17568 * src/reader.c (parse_action): Use copy_character instead of
17569 obstack_1grow.
17570
17571 2002-05-13 Akim Demaille <akim@epita.fr>
17572
17573 * tests/regression.at (Token definitions): Prototype yylex and
17574 yyerror.
17575
17576 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17577
17578 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
17579 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
17580 32-bit arithmetic.
17581 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
17582
17583 2002-05-07 Akim Demaille <akim@epita.fr>
17584
17585 * tests/synclines.at: Be sure to prototype yylex and yyerror to
17586 avoid GCC warnings.
17587
17588 2002-05-07 Akim Demaille <akim@epita.fr>
17589
17590 Kill GCC warnings.
17591
17592 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
17593 over the RHS of each rule.
17594 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
17595 * src/state.h (state_t): Member `nitems' is unsigned short.
17596 * src/LR0.c (get_state): Adjust.
17597 * src/reader.c (packgram): Likewise.
17598 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
17599 `Type'.
17600 (muscle_insert_int_table): Remove, unused.
17601 (prepare_rules): Remove `max'.
17602
17603 2002-05-06 Akim Demaille <akim@epita.fr>
17604
17605 * src/closure.c (print_firsts): Display of the symbol tags.
17606 (bitmatrix_print): Move to...
17607 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
17608 here.
17609 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
17610
17611 2002-05-06 Akim Demaille <akim@epita.fr>
17612
17613 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
17614 hash_do_for_each.
17615
17616 2002-05-06 Akim Demaille <akim@epita.fr>
17617
17618 * src/LR0.c (new_state, get_state): Instead of using the global
17619 `kernel_size' and `kernel_base', have two new arguments:
17620 `core_size' and `core'.
17621 Adjust callers.
17622
17623 2002-05-06 Akim Demaille <akim@epita.fr>
17624
17625 * src/reader.c (packgram): No longer end `ritem' with a 0
17626 sentinel: it is not used.
17627
17628 2002-05-05 Akim Demaille <akim@epita.fr>
17629
17630 New experimental feature: display the lookaheads in the report and
17631 graph.
17632
17633 * src/print (print_core): When --trace-flag, display the rules
17634 lookaheads.
17635 * src/print_graph.c (print_core): Likewise.
17636 Swap the arguments.
17637 Adjust caller.
17638
17639 2002-05-05 Akim Demaille <akim@epita.fr>
17640
17641 * tests/torture.at (Many lookaheads): New test.
17642
17643 2002-05-05 Akim Demaille <akim@epita.fr>
17644
17645 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
17646 (GENERATE_MUSCLE_INSERT_TABLE): this.
17647 (output_int_table, output_unsigned_int_table, output_short_table)
17648 (output_token_number_table, output_item_number_table): Replace with...
17649 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
17650 (muscle_insert_short_table, muscle_insert_token_number_table)
17651 (muscle_insert_item_number_table): these.
17652 Adjust all callers.
17653 (prepare_tokens): Don't free `translations', since...
17654 * src/reader.h, src/reader.c (grammar_free): do it.
17655 Move to...
17656 * src/gram.h, src/gram.c (grammar_free): here.
17657 * data/bison.simple, data/bison.c++: b4_token_number_max is now
17658 b4_translate_max.
17659
17660 2002-05-05 Akim Demaille <akim@epita.fr>
17661
17662 * src/output.c (output_unsigned_int_table): New.
17663 (prepare_rules): `i' is unsigned.
17664 `prhs', `rline', `r2' are unsigned int.
17665 Rename muscle `rhs_number_max' as `rhs_max'.
17666 Output muscles `prhs_max', `rline_max', and `r2_max'.
17667 Free rline and r1.
17668 * data/bison.simple, data/bison.c++: Adjust to use these muscles
17669 to compute types instead of constant types.
17670 * tests/regression.at (Web2c Actions): Adjust.
17671
17672 2002-05-04 Akim Demaille <akim@epita.fr>
17673
17674 * src/symtab.h (SALIAS, SUNDEF): Rename as...
17675 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
17676 Adjust dependencies.
17677 * src/output.c (token_definitions_output): Be sure not to output a
17678 `#define 'a'' when fed with `%token 'a' "a"'.
17679 * tests/regression.at (Token definitions): New.
17680
17681 2002-05-03 Paul Eggert <eggert@twinsun.com>
17682
17683 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
17684 for K&R C.
17685
17686 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
17687
17688 * Makefile.am (SUBDIRS): Remove intl.
17689 (EXTRA_DIST): Add config/config.rpath.
17690
17691 2002-05-03 Akim Demaille <akim@epita.fr>
17692
17693 * data/bison.simple (m4_if): Don't output empty enums.
17694 And actually, output valid enum definitions :(.
17695
17696 2002-05-03 Akim Demaille <akim@epita.fr>
17697
17698 * configure.bat: Remove, completely obsolete.
17699 * Makefile.am (EXTRA_DIST): Adjust.
17700 Don't distribute config.rpath...
17701 * config/Makefile.am (EXTRA_DIST): Do it.
17702
17703 2002-05-03 Akim Demaille <akim@epita.fr>
17704
17705 * configure.in (GETTEXT_VERSION): New.
17706 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
17707
17708 2002-05-03 Akim Demaille <akim@epita.fr>
17709
17710 * data/bison.simple (b4_token_enum): New.
17711 (b4_token_defines): Use it to output tokens both as #define and
17712 enums.
17713 Suggested by Paul Eggert.
17714 * src/output.c (token_definitions_output): Don't output spurious
17715 white spaces.
17716
17717 2002-05-03 Akim Demaille <akim@epita.fr>
17718
17719 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17720
17721 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
17722
17723 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
17724 Update the stack class, give a try to deque as the default container.
17725
17726 2002-05-02 Akim Demaille <akim@epita.fr>
17727
17728 * data/bison.simple (yyparse): Do not implement @$ = @1.
17729 (YYLLOC_DEFAULT): Adjust to do it.
17730 * doc/bison.texinfo (Location Default Action): Fix.
17731
17732 2002-05-02 Akim Demaille <akim@epita.fr>
17733
17734 * src/reader.c (parse_braces): Merge into...
17735 (parse_action): this.
17736
17737 2002-05-02 Akim Demaille <akim@epita.fr>
17738
17739 * configure.in (ALL_LINGUAS): Remove.
17740 * po/LINGUAS, hr.po: New.
17741
17742 2002-05-02 Akim Demaille <akim@epita.fr>
17743
17744 Remove the so called hairy (semantic) parsers.
17745
17746 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
17747 * src/gram.h, src/gram.c (semantic_parser): Remove.
17748 (rule_t): Remove the guard and guard_line members.
17749 * src/lex.h (token_t): remove tok_guard.
17750 * src/options.c (option_table): Remove %guard and %semantic_parser
17751 support.
17752 * src/output.c, src/output.h (guards_output): Remove.
17753 (prepare): Adjust.
17754 (token_definitions_output): Don't output the `T'
17755 tokens (???).
17756 (output_skeleton): Don't output the guards.
17757 * src/files.c, src/files.c (attrsfile): Remove.
17758 * src/reader.c (symbol_list): Remove the guard and guard_line
17759 members.
17760 Adjust dependencies.
17761 (parse_guard): Remove.
17762 * data/bison.hairy: Remove.
17763 * doc/bison.texinfo (Environment Variables): Remove occurrences of
17764 BISON_HAIRY.
17765
17766 2002-05-02 Akim Demaille <akim@epita.fr>
17767
17768 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
17769 (parse_guard): Rename the formal argument `stack_offset' as
17770 `rule_length', which is more readable.
17771 Adjust callers.
17772 (copy_at, copy_dollar): Instead of outputting the hard coded
17773 values of $$, $n and so forth, output invocation to b4_lhs_value,
17774 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
17775 Note: this patch partially drops `semantic-parser' support: it
17776 always does `rule_length - n', where semantic parsers ought to
17777 always use `-n'.
17778 * data/bison.simple, data/bison.c++ (b4_lhs_value)
17779 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
17780
17781 2002-05-02 Akim Demaille <akim@epita.fr>
17782
17783 * configure.in (AC_INIT): Bump to 1.49b.
17784 (AM_INIT_AUTOMAKE): Short invocation.
17785
17786 2002-05-02 Akim Demaille <akim@epita.fr>
17787
17788 Version 1.49a.
17789
17790 2002-05-01 Akim Demaille <akim@epita.fr>
17791
17792 * src/skeleton.h: Remove.
17793
17794 2002-05-01 Akim Demaille <akim@epita.fr>
17795
17796 * src/skeleton.h: Fix the #endif.
17797 Reported by Magnus Fromreide.
17798
17799 2002-04-26 Paul Eggert <eggert@twinsun.com>
17800
17801 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
17802 Define if we define YYSTYPE and YYLTYPE, respectively.
17803 (YYCOPY): Fix [] quoting problem in the non-GCC case.
17804
17805 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
17806
17807 * src/scan-skel.l: Postprocess quadrigraphs.
17808
17809 * src/reader.c (copy_character): New function, used to output
17810 single characters while replacing `[' and `]' with quadrigraphs, to
17811 avoid troubles with M4 quotes.
17812 (copy_comment): Output characters with copy_character.
17813 (read_additionnal_code): Likewise.
17814 (copy_string2): Likewise.
17815 (copy_definition): Likewise.
17816
17817 * tests/calc.at: Exercise M4 quoting.
17818
17819 2002-04-25 Akim Demaille <akim@epita.fr>
17820
17821 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
17822 between `!' and the command.
17823 Reported by Paul Eggert.
17824
17825 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
17826
17827 * tests/calc.at: Exercise prologue splitting.
17828
17829 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
17830 `b4_post_prologue' instead of `b4_prologue'.
17831
17832 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
17833 muscles.
17834 (output): Free pre_prologue_obstack and post_prologue_obstack.
17835 * src/files.h, src/files.c (attrs_obstack): Remove.
17836 (pre_prologue_obstack, post_prologue_obstack): New.
17837 * src/reader.c (copy_definition): Add a parameter to specify the
17838 obstack to fill, instead of using attrs_obstack unconditionally.
17839 (read_declarations): Pass pre_prologue_obstack to copy_definition if
17840 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
17841
17842 2002-04-23 Paul Eggert <eggert@twinsun.com>
17843
17844 * data/bison.simple: Remove unnecessary commentary and white
17845 space differences from 1_29-branch.
17846 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
17847
17848 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
17849 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
17850 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
17851 constructors or destructors.
17852
17853 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
17854
17855 2002-04-23 Akim Demaille <akim@epita.fr>
17856
17857 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
17858 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
17859 location with columns.
17860 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
17861 All reported by Paul Eggert.
17862
17863 2002-04-22 Akim Demaille <akim@epita.fr>
17864
17865 * src/reduce.c (dump_grammar): Move to...
17866 * src/gram.h, src/gram.c (grammar_dump): here.
17867 Be sure to separate long item numbers.
17868 Don't read the members of a rule's prec if its nil.
17869
17870 2002-04-22 Akim Demaille <akim@epita.fr>
17871
17872 * src/output.c (table_size, table_grow): New.
17873 (MAXTABLE): Remove, replace uses with table_size.
17874 (pack_vector): Instead of dying when the table is too big, grow it.
17875
17876 2002-04-22 Akim Demaille <akim@epita.fr>
17877
17878 * data/bison.simple (yyr1): Its type is that of a token number.
17879 * data/bison.c++ (r1_): Likewise.
17880 * tests/regression.at (Web2c Actions): Adjust.
17881
17882 2002-04-22 Akim Demaille <akim@epita.fr>
17883
17884 * src/reader.c (token_translations_init): 256 is now the default
17885 value for the error token, i.e., it will be assigned another
17886 number if the user assigned 256 to one of her tokens.
17887 (reader): Don't force 256 to error.
17888 * doc/bison.texinfo (Symbols): Adjust.
17889 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
17890 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
17891 etc. instead of 10, 20, 30 (which was used to `jump' over error
17892 (256) and undefined (2)).
17893
17894 2002-04-22 Akim Demaille <akim@epita.fr>
17895
17896 Propagate more token_number_t.
17897
17898 * src/gram.h (token_number_as_item_number)
17899 (item_number_as_token_number): New.
17900 * src/output.c (GENERATE_OUTPUT_TABLE): New.
17901 Use it to create output_item_number_table and
17902 output_token_number_table.
17903 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17904 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
17905 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
17906 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
17907
17908 2002-04-22 Akim Demaille <akim@epita.fr>
17909
17910 * src/output.h, src/output.c (get_lines_number): Remove.
17911
17912 2002-04-19 Akim Demaille <akim@epita.fr>
17913
17914 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
17915 as Lex/Flex'.
17916 (Debugging): More details about enabling the debugging features.
17917 (Table of Symbols): Describe $$, $n, @$, and @n.
17918 Suggested by Tim Josling.
17919
17920 2002-04-19 Akim Demaille <akim@epita.fr>
17921
17922 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
17923
17924 2002-04-10 Akim Demaille <akim@epita.fr>
17925
17926 * src/system.h: Rely on HAVE_LIMITS_H.
17927 Suggested by Paul Eggert.
17928
17929 2002-04-09 Akim Demaille <akim@epita.fr>
17930
17931 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
17932 full stderr, and strip it according to the bison options, instead
17933 of composing the error message from different bits.
17934 This makes it easier to check for several error messages.
17935 Adjust all the invocations.
17936 Add an invocation exercising the error token.
17937 Add an invocation demonstrating a stupid error message.
17938 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
17939 Adjust the tests.
17940 Error message are for stderr, not stdout.
17941
17942 2002-04-09 Akim Demaille <akim@epita.fr>
17943
17944 * src/gram.h, src/gram.c (error_token_number): Remove, use
17945 errtoken->number.
17946 * src/reader.c (reader): Don't specify the user token number (2)
17947 for $undefined, as it uselessly prevents using it.
17948 * src/gram.h (token_number_t): Move to...
17949 * src/symtab.h: here.
17950 (state_t.number): Is a token_number_t.
17951 * src/print.c, src/reader.c: Use undeftoken->number instead of
17952 hard coded 2.
17953 (Even though this 2 is not the same as above: the number of the
17954 undeftoken remains being 2, it is its user token number which
17955 might not be 2).
17956 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
17957 `user_token_number_max'.
17958 Output `undef_token_number'.
17959 * data/bison.simple, data/bison.c++: Use them.
17960 Be sure to map invalid yylex return values to
17961 `undef_token_number'. This saves us from gratuitous SEGV.
17962
17963 * tests/conflicts.at (Solved SR Conflicts)
17964 (Unresolved SR Conflicts): Adjust.
17965 * tests/regression.at (Web2c Actions): Adjust.
17966
17967 2002-04-08 Akim Demaille <akim@epita.fr>
17968
17969 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
17970 Adding #line.
17971 Remove the duplicate `typedefs'.
17972 (RhsNumberType): Fix the declaration and various other typos.
17973 Use __ofile__.
17974 * data/bison.simple: Use __ofile__.
17975 * src/scan-skel.l: Handle __ofile__.
17976
17977 2002-04-08 Akim Demaille <akim@epita.fr>
17978
17979 * src/gram.h (item_number_t): New, the type of item numbers in
17980 RITEM. Note that it must be able to code symbol numbers as
17981 positive number, and the negation of rule numbers as negative
17982 numbers.
17983 Adjust all dependencies (pretty many).
17984 * src/reduce.c (rule): Remove this `short *' pointer: use
17985 item_number_t.
17986 * src/system.h (MINSHORT, MAXSHORT): Remove.
17987 Include `limits.h'.
17988 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
17989 (shortcpy): Remove.
17990 (MAXTABLE): Move to...
17991 * src/output.c (MAXTABLE): here.
17992 (prepare_rules): Use output_int_table to output rhs.
17993 * data/bison.simple, data/bison.c++: Adjust.
17994 * tests/torture.at (Big triangle): Move the limit from 254 to
17995 500.
17996 * tests/regression.at (Web2c Actions): Ajust.
17997
17998 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
17999 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
18000 passes, but produces negative #line number, once fixed, GCC is
18001 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
18002 C), it passes.
18003 * src/state.h (state_h): Code input lines on ints, not shorts.
18004
18005 2002-04-08 Akim Demaille <akim@epita.fr>
18006
18007 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
18008 and then the grammar.
18009
18010 2002-04-08 Akim Demaille <akim@epita.fr>
18011
18012 * src/system.h: No longer using strndup.
18013
18014 2002-04-07 Akim Demaille <akim@epita.fr>
18015
18016 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
18017 * src/output.c (output_table_data): Return the longest number.
18018 (prepare_tokens): Output `token_number_max').
18019 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
18020 New.
18021 Use them to define yy_token_number_type/TokenNumberType.
18022 Use this type for yytranslate.
18023 * tests/torture.at (Big triangle): Push the limit from 124 to
18024 253.
18025 * tests/regression.at (Web2c Actions): Adjust.
18026
18027 2002-04-07 Akim Demaille <akim@epita.fr>
18028
18029 * tests/torture.at (Big triangle): New.
18030 (GNU AWK Grammar, GNU Cim Grammar): Move to...
18031 * tests/existing.at: here.
18032
18033 2002-04-07 Akim Demaille <akim@epita.fr>
18034
18035 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
18036 nritems.
18037 Adjust dependencies.
18038
18039 2002-04-07 Akim Demaille <akim@epita.fr>
18040
18041 * src/reader.c: Normalize increments to prefix form.
18042
18043 2002-04-07 Akim Demaille <akim@epita.fr>
18044
18045 * src/reader.c, symtab.c: Remove debugging code.
18046
18047 2002-04-07 Akim Demaille <akim@epita.fr>
18048
18049 Rename all the `bucket's as `symbol_t'.
18050
18051 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
18052 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
18053 * src/symtab.c, src/symtab.h (bucket): Rename as...
18054 (symbol_t): this.
18055 (symbol_list_new, bucket_check_defined, bucket_make_alias)
18056 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
18057 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
18058 (buckets_new, buckets_free, buckets_do): Rename as...
18059 (symbol_list_new, symbol_check_defined, symbol_make_alias)
18060 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
18061 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
18062 (symbols_new, symbols_free, symbols_do): these.
18063
18064 2002-04-07 Akim Demaille <akim@epita.fr>
18065
18066 Use lib/hash for the symbol table.
18067
18068 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
18069 EOF.
18070 * src/lex.c (lex): Set the `number' member of new terminals.
18071 * src/reader.c (bucket_check_defined, bucket_make_alias)
18072 (bucket_check_alias_consistence, bucket_translation): New.
18073 (reader, grammar_free, readgram, token_translations_init)
18074 (packsymbols): Adjust.
18075 (reader): Number the predefined tokens.
18076 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
18077 for predefined tokens.
18078 * src/symtab.h (bucket): Remove all the hash table related
18079 members.
18080 * src/symtab.c (symtab): Replace by...
18081 (bucket_table): this.
18082 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
18083 (buckets_new, buckets_do): New.
18084
18085 2002-04-07 Akim Demaille <akim@epita.fr>
18086
18087 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
18088 (start_symbol, max_user_token_number, semantic_parser)
18089 (error_token_number): Initialize.
18090 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
18091 Initialize.
18092 (reader): Don't.
18093 (errtoken, eoftoken, undeftoken, axiom): Extern.
18094
18095 2002-04-07 Akim Demaille <akim@epita.fr>
18096
18097 * src/gram.h (rule_s): prec and precsym are now pointers
18098 to the bucket giving the priority/associativity.
18099 Member `associativity' removed: useless.
18100 * src/reduce.c, src/conflicts.c: Adjust.
18101
18102 2002-04-07 Akim Demaille <akim@epita.fr>
18103
18104 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
18105 Properly escape the symbols' TAG when outputting them.
18106
18107 2002-04-07 Akim Demaille <akim@epita.fr>
18108
18109 * src/lalr.h (LA): Is a bitsetv, not bitset*.
18110
18111 2002-04-07 Akim Demaille <akim@epita.fr>
18112
18113 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
18114 (LArule): this, which is an array to rule_t*.
18115 * src/print.c, src/conflicts.c: Adjust.
18116
18117 2002-04-07 Akim Demaille <akim@epita.fr>
18118
18119 * src/gram.h (rule_t): Rename `number' as `user_number'.
18120 `number' is a new member.
18121 Adjust dependencies.
18122 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
18123
18124 2002-04-07 Akim Demaille <akim@epita.fr>
18125
18126 As a result of the previous patch, it is no longer needed
18127 to reorder ritem itself.
18128
18129 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
18130
18131 2002-04-07 Akim Demaille <akim@epita.fr>
18132
18133 Be sure never to walk through RITEMS, but use only data related to
18134 the rules themselves. RITEMS should be banished.
18135
18136 * src/output.c (output_token_translations): Rename as...
18137 (prepare_tokens): this.
18138 In addition to `translate', prepare the muscles `tname' and
18139 `toknum', which were handled by...
18140 (output_rule_data): this.
18141 Remove, and move the remainder of its outputs into...
18142 (prepare_rules): this new routines, which also merges content from
18143 (output_gram): this.
18144 (prepare_rules): Be sure never to walk through RITEMS.
18145 (output_stos): Rename as...
18146 (prepare_stos): this.
18147 (output): Always invoke prepare_states, after all, just don't use it
18148 in the output if you don't need it.
18149
18150 2002-04-07 Akim Demaille <akim@epita.fr>
18151
18152 * src/LR0.c (new_state): Display `nstates' as the name of the
18153 newly created state.
18154 Adjust to initialize first_state and last_state if needed.
18155 Be sure to distinguish the initial from the final state.
18156 (new_states): Create the itemset of the initial state, and use
18157 new_state.
18158 * src/closure.c (closure): Now that the initial state has its
18159 items properly set, there is no need for a special case when
18160 creating `ruleset'.
18161
18162 As a result, now the rule 0, reducing to $axiom, is visible in the
18163 outputs. Adjust the test suite.
18164
18165 * tests/conflicts.at (Solved SR Conflicts)
18166 (Unresolved SR Conflicts): Adjust.
18167 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
18168 * tests/conflicts.at (S/R in initial): New.
18169
18170 2002-04-07 Akim Demaille <akim@epita.fr>
18171
18172 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
18173 the RHS of the rules.
18174 * src/output.c (output_gram): Likewise.
18175
18176 2002-04-07 Akim Demaille <akim@epita.fr>
18177
18178 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
18179 bucket.
18180 Adjust all dependencies.
18181 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
18182 `number' of the buckets too.
18183 * src/gram.h: Include `symtab.h'.
18184 (associativity): Move to...
18185 * src/symtab.h: here.
18186 No longer include `gram.h'.
18187
18188 2002-04-07 Akim Demaille <akim@epita.fr>
18189
18190 * src/gram.h, src/gram.c (rules_rhs_length): New.
18191 (ritem_longest_rhs): Use it.
18192 * src/gram.h (rule_t): `number' is a new member.
18193 * src/reader.c (packgram): Set it.
18194 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
18195 the end of `rules', and count them out of `nrules'.
18196 (reduce_output, dump_grammar): Adjust.
18197 * src/print.c (print_grammar): It is no longer needed to check for
18198 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
18199 * tests/reduce.at (Reduced Automaton): New test.
18200
18201 2002-04-07 Akim Demaille <akim@epita.fr>
18202
18203 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
18204 lacking `+ 1' to nrules, Bison reported as useless a token if it
18205 was used solely to set the precedence of the last rule...
18206
18207 2002-04-07 Akim Demaille <akim@epita.fr>
18208
18209 * data/bison.c++, data/bison.simple: Don't output the current file
18210 name in #line, to avoid useless diffs between two identical
18211 outputs under different names.
18212
18213 2002-04-07 Akim Demaille <akim@epita.fr>
18214
18215 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
18216 Normalize loops to using `< nrules + 1', not `<= nrules'.
18217
18218 2002-04-07 Akim Demaille <akim@epita.fr>
18219
18220 * TODO: Update.
18221
18222 2002-04-07 Akim Demaille <akim@epita.fr>
18223
18224 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
18225 bucket.value as bucket.number.
18226
18227 2002-04-07 Akim Demaille <akim@epita.fr>
18228
18229 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
18230 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
18231 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
18232 RHS, instead of being an index in RITEMS.
18233
18234 2002-04-04 Paul Eggert <eggert@twinsun.com>
18235
18236 * doc/bison.texinfo: Update copyright date.
18237 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
18238 (Symbols): Warn about running Bison in one character set,
18239 but compiling and/or running in an incompatible one.
18240 Warn about character code 256, too.
18241
18242 2002-04-03 Paul Eggert <eggert@twinsun.com>
18243
18244 * src/bison.data (YYSTACK_ALLOC): Depend on whether
18245 YYERROR_VERBOSE is nonzero, not whether it is defined.
18246
18247 Merge changes from bison-1_29-branch.
18248
18249 2002-03-20 Paul Eggert <eggert@twinsun.com>
18250
18251 Merge fixes from Debian bison_1.34-1.diff.
18252
18253 * configure.in (AC_PREREQ): 2.53.
18254
18255 2002-03-20 Akim Demaille <akim@epita.fr>
18256
18257 * src/conflicts.c (log_resolution): Argument `resolution' is const.
18258
18259 2002-03-19 Paul Eggert <eggert@twinsun.com>
18260
18261 * src/bison.simple (YYCOPY): New macro.
18262 (YYSTACK_RELOCATE): Use it.
18263 Remove Type arg; no longer needed. All callers changed.
18264 (yymemcpy): Remove; no longer needed.
18265
18266 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
18267 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
18268
18269 2002-03-19 Akim Demaille <akim@epita.fr>
18270
18271 Test and fix the #line outputs.
18272
18273 * tests/atlocal.at (GCC): New.
18274 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
18275 (Prologue synch line, %union synch line, Postprologue synch line)
18276 (Action synch line, Epilogue synch line): New tests.
18277 * src/reader.c (parse_union_decl): Define the muscle stype_line.
18278 * data/bison.simple, data/bison.c++: Use it.
18279
18280 2002-03-19 Akim Demaille <akim@epita.fr>
18281
18282 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
18283 (Solved SR Conflicts, %expect not enough, %expect right)
18284 (%expect too much): Move to...
18285 * tests/conflicts.at: this new file.
18286
18287 2002-03-19 Akim Demaille <akim@epita.fr>
18288
18289 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
18290 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
18291 that we can move to enums for instance.
18292 * src/output.c (token_definitions_output): Output a list of
18293 `token-name, token-number' instead of the #define.
18294 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
18295
18296 2002-03-14 Akim Demaille <akim@epita.fr>
18297
18298 Use Gettext 0.11.1.
18299
18300 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
18301
18302 * data/bison.c++: Make the user able to add members to the generated
18303 parser by subclassing.
18304
18305 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
18306
18307 * src/reader.c (read_additionnal_code): `c' should be an integer, not
18308 a character.
18309 Reported by Nicolas Tisserand and Nicolas Burrus.
18310
18311 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
18312
18313 * src/reader.c: Warn about lacking semi-colons, do not complain.
18314
18315 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
18316
18317 * data/bison.c++: Remove a debug line.
18318
18319 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
18320
18321 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
18322 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
18323 provide a default implementation.
18324
18325 2002-03-04 Akim Demaille <akim@epita.fr>
18326
18327 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
18328 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
18329 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
18330 * tests/semantic.at (Parsing Guards): Similarly.
18331 * src/reader.at (readgram): Complain if the last rule is not ended
18332 with a semi-colon.
18333
18334 2002-03-04 Akim Demaille <akim@epita.fr>
18335
18336 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
18337 * src/closure.c: here.
18338 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
18339 RTC.
18340 * src/warshall.h, src/warshall.c: Remove.
18341 * tests/sets.at (Broken Closure): Adjust.
18342
18343 2002-03-04 Akim Demaille <akim@epita.fr>
18344
18345 * src/output.c (output_skeleton): tempdir is const.
18346 bytes_read is unused.
18347
18348 2002-03-04 Akim Demaille <akim@epita.fr>
18349
18350 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18351 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
18352 Update.
18353 From Michael Hayes.
18354
18355 2002-03-04 Akim Demaille <akim@epita.fr>
18356
18357 * src/closure.c (closure): `r' is unused.
18358
18359 2002-03-04 Akim Demaille <akim@epita.fr>
18360
18361 * tests/sets.at (Broken Closure): Add the ending `;'.
18362 * src/reader.at (readgram): Complain if a rule is not ended with a
18363 semi-colon.
18364
18365 2002-03-04 Akim Demaille <akim@epita.fr>
18366
18367 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
18368 (count_sr_conflicts): Use bitset_count.
18369 * src/reduce.c (inaccessable_symbols): Ditto.
18370 (bits_size): Remove.
18371 * src/warshall.h, src/warshall.c: Convert to bitsetv.
18372
18373 2002-03-04 Akim Demaille <akim@epita.fr>
18374
18375 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
18376 * src/reduce.c: Remove the `bitset_zero's following the
18377 `bitset_create's, as now it is performed by the latter.
18378
18379 2002-03-04 Akim Demaille <akim@epita.fr>
18380
18381 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
18382 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
18383 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
18384 latest sources from Michael.
18385
18386 2002-03-04 Akim Demaille <akim@epita.fr>
18387
18388 * src/output.c (output): Don't free the grammar.
18389 * src/reader.c (grammar_free): New.
18390 * src/main.c (main): Call it and don't free symtab here.
18391
18392 2002-03-04 Akim Demaille <akim@epita.fr>
18393
18394 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
18395 before returning.
18396 Reported by Benoit Perrot.
18397
18398 2002-03-04 Akim Demaille <akim@epita.fr>
18399
18400 Use bitset operations when possible, not loops over bits.
18401
18402 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
18403 bitset_or.
18404 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
18405 * src/reduce.c (useless_nonterminals): Formatting changes.
18406 * src/warshall.c (TC): Use bitset_or.
18407
18408 2002-03-04 Akim Demaille <akim@epita.fr>
18409
18410 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
18411 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
18412 Ditto.
18413
18414 2002-03-04 Akim Demaille <akim@epita.fr>
18415
18416 * src/lalr.c (F): Now a bitset*.
18417 Adjust all dependencies.
18418
18419 2002-03-04 Akim Demaille <akim@epita.fr>
18420
18421 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
18422 Adjust all dependencies.
18423
18424 2002-03-04 Akim Demaille <akim@epita.fr>
18425
18426 * src/L0.c, src/LR0.h (nstates): Be size_t.
18427 Adjust comparisons (signed vs unsigned).
18428 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
18429 bitset*.
18430 Adjust all dependencies.
18431
18432 2002-03-04 Akim Demaille <akim@epita.fr>
18433
18434 * src/closure.c (firsts): Now, also a bitset.
18435 Adjust all dependencies.
18436 (varsetsize): Remove, now unused.
18437 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
18438
18439 2002-03-04 Akim Demaille <akim@epita.fr>
18440
18441 * src/print.c: Convert to use bitset.h, not hand coded iterations
18442 over ints.
18443
18444 2002-03-04 Akim Demaille <akim@epita.fr>
18445
18446 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
18447
18448 2002-03-04 Akim Demaille <akim@epita.fr>
18449
18450 * src/closure.c (ruleset): Be a bitset.
18451 (rulesetsize): Remove.
18452
18453 2002-03-04 Akim Demaille <akim@epita.fr>
18454
18455 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18456 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
18457 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
18458 * src/closure.c (fderives): Be an array of bitsets.
18459
18460 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
18461
18462 * data/bison.c++: Merge the two generated headers. Insert a copyright
18463 notice in each output file.
18464
18465 2002-02-28 Akim Demaille <akim@epita.fr>
18466
18467 * data/bison.c++: Copy the prologue of bison.simple to fetch
18468 useful M4 definitions, such as b4_header_guard.
18469
18470 2002-02-25 Akim Demaille <akim@epita.fr>
18471
18472 * src/getargs.c (version): Give the name of the authors, and use a
18473 translator friendly scheme for the bgr
18474 copyright notice.
18475
18476 2002-02-25 Akim Demaille <akim@epita.fr>
18477
18478 * src/output.c (header_output): Remove, now handled completely via
18479 M4.
18480
18481 2002-02-25 Akim Demaille <akim@epita.fr>
18482
18483 * m4/m4.m4: New, from CVS Autoconf.
18484 * configure.in: Invoke it.
18485 * src/output.c (output_skeleton): Use its result instead of the
18486 hard coded name.
18487
18488 2002-02-25 Akim Demaille <akim@epita.fr>
18489
18490 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
18491 Fileutils 4.1.5.
18492 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
18493 * src/output.c (output_skeleton): Use mkstemp to create a real
18494 temporary file.
18495 Move the filling of `skeleton' and its muscle to...
18496 (prepare): here.
18497 (output): Move the definition of the prologue muscle to...
18498 (prepare): here.
18499 * src/system.h (DEFAULT_TMPDIR): New.
18500
18501 2002-02-14 Paul Eggert <eggert@twinsun.com>
18502
18503 Remove the support for C++ namespace cleanliness; it was
18504 causing more problems than it was curing, since it didn't work
18505 properly on some nonstandard C++ compilers. This can wait
18506 for a proper C++ parser.
18507
18508 * NEWS: Document this.
18509 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
18510 of C++, as it's treated like C now.
18511 * src/bison.simple (YYSTD): Remove.
18512 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
18513 Treat C++ just like Standard C instead of trying to support
18514 namespace cleanliness.
18515
18516 2002-02-14 Akim Demaille <akim@epita.fr>
18517
18518 * tests/regression.at (else): Adjust to Andreas' change.
18519
18520 2002-02-14 Akim Demaille <akim@epita.fr>
18521
18522 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
18523
18524 2002-02-13 Andreas Schwab <schwab@suse.de>
18525
18526 * src/output.c (output_rule_data): Don't output NULL, it might
18527 not be defined yet.
18528
18529 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
18530
18531 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
18532 (Copyright notice): Update.
18533
18534 2002-02-11 Akim Demaille <akim@epita.fr>
18535
18536 * tests/regression.at (%nonassoc and eof): Don't include
18537 nonportable headers.
18538
18539 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
18540
18541 * data/bison.c++: Correct error recovery. Make the user able to
18542 initialize the starting location.
18543
18544 2002-02-07 Akim Demaille <akim@epita.fr>
18545
18546 * tests/input.at: New.
18547
18548 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18549
18550 * data/bison.c++: Replace some direct m4 expansions by constants. Be
18551 more consistent when naming methods and variables. Put preprocessor
18552 directives around tables only needed for debugging.
18553
18554 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18555
18556 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
18557 C++ parsers.
18558 (yy::b4_name::parse): Use print_.
18559
18560 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18561
18562 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
18563
18564 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18565
18566 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
18567 C++ parsers.
18568 (yy::b4_name::parse): Build verbose error messages, and use error_.
18569
18570 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
18571
18572 * data/bison.c++: Fix m4 quoting in comments.
18573
18574 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
18575
18576 * data/bison.c++: Adjust the parser code. Fix some muscles that were
18577 not expanded by m4.
18578
18579 2002-02-05 Akim Demaille <akim@epita.fr>
18580
18581 * data/bison.c++: Adjust to the M4 back end.
18582 More is certainly needed.
18583
18584 2002-02-05 Akim Demaille <akim@epita.fr>
18585
18586 Give a try to M4 as a back end.
18587
18588 * lib/readpipe.c: New, from wdiff.
18589 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
18590 BISON_HAIRY.
18591 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
18592 specific values. Now it is m4 that performs the lookup.
18593 * src/parse-skel.y: Remove.
18594 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
18595 * src/output.c (actions_output, guards_output)
18596 (token_definitions_output): No longer keeps track of the output
18597 line number, hence remove the second argument.
18598 (guards_output): Check against the guard member of a rule, not the
18599 action member.
18600 Adjust callers.
18601 (output_skeleton): Don't look for the skeleton location, let m4 do
18602 that.
18603 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
18604 file will be used.
18605 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
18606 (prepare): Given that for the time being changesyntax is not
18607 usable in M4, rename the muscles using `-' to `_'.
18608 Define `defines_flag', `output_parser_name' and `output_header_name'.
18609 * src/output.h (actions_output, guards_output)
18610 (token_definitions_output): Adjust prototypes.
18611 * src/scan-skel.l: Instead of scanning the skeletons, it now
18612 processes the output of m4: `__oline__' and `#output'.
18613 * data/bison.simple: Adjust to be used by M4(sugar).
18614 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
18615 to date.
18616 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
18617 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
18618 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
18619 shamelessly stolen from CVS Autoconf.
18620
18621 2002-02-05 Akim Demaille <akim@epita.fr>
18622
18623 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
18624 * configure.in: Check for the declarations of free and malloc.
18625 * src/muscle_tab.c: Adjust.
18626
18627 2002-02-05 Akim Demaille <akim@epita.fr>
18628
18629 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
18630 which have no values.
18631
18632 2002-02-05 Akim Demaille <akim@epita.fr>
18633
18634 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
18635 * data/: here.
18636
18637 2002-01-29 Paul Eggert <eggert@twinsun.com>
18638
18639 * src/bison.simple (YYSIZE_T): Do not define merely because
18640 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
18641 On some platforms, <alloca.h> does not declare YYSTD (size_t).
18642
18643 2002-01-27 Akim Demaille <akim@epita.fr>
18644
18645 Fix `%nonassoc and eof'.
18646
18647 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
18648 which were not properly copied! Replace
18649 memcpy (res->errs, src->errs, src->nerrs);
18650 with
18651 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
18652 !!!
18653 * tests/regression.at (%nonassoc and eof): Adjust to newest
18654 Autotest: `.' is not in the PATH.
18655
18656 2002-01-27 Akim Demaille <akim@epita.fr>
18657
18658 * tests/sets.at (AT_EXTRACT_SETS): New.
18659 (Nullable): Use it.
18660 (Firsts): New.
18661
18662 2002-01-26 Akim Demaille <akim@epita.fr>
18663
18664 * tests/actions.at, tests/calc.at, tests/headers.at,
18665 * tests/torture.at: Adjust to the newest Autotest which no longer
18666 forces `.' in the PATH.
18667
18668 2002-01-25 Akim Demaille <akim@epita.fr>
18669
18670 * tests/regression.at (%nonassoc and eof): New.
18671 Suggested by Robert Anisko.
18672
18673 2002-01-24 Akim Demaille <akim@epita.fr>
18674
18675 Bison dumps core when trying to complain about broken input files.
18676 Reported by Cris van Pelt.
18677
18678 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
18679 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
18680 into...
18681 (Invalid inputs): Strengthen: exercise parse_percent_token.
18682
18683 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
18684
18685 * src/Makefile.am: Add bison.c++.
18686 * src/bison.c++: New skeleton.
18687
18688 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
18689
18690 * po/it.po: New.
18691
18692 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
18693
18694 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
18695
18696 2002-01-20 Marc Autret <marc@gnu.org>
18697
18698 * src/files.c (compute_output_file_names): Fix
18699
18700 2002-01-20 Marc Autret <marc@gnu.org>
18701
18702 * tests/output.at: New test.
18703 * src/files.c (compute_base_names): Don't map extensions when
18704 the YACC flag is set, use defaults.
18705 Reported by Evgeny Stambulchik.
18706
18707 2002-01-20 Marc Autret <marc@gnu.org>
18708
18709 * src/system.h: Need to define __attribute__ away for non-GCC
18710 compilers as well (i.e., the vendor C compiler).
18711 Suggested by Albert Chin-A-Young.
18712
18713 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
18714
18715 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
18716 canonical definition.
18717 * src/system.h: Use the canonical definition for PARAMS (avoids
18718 a conflict with the macro from lib/hash.h).
18719
18720 2002-01-11 Akim Demaille <akim@epita.fr>
18721
18722 * configure.in: Use AC_FUNC_STRNLEN.
18723 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
18724
18725 2002-01-09 Akim Demaille <akim@epita.fr>
18726
18727 * src/files.c, src/files.h (output_infix): New.
18728 (tab_extension): Remove.
18729 (compute_base_names): Compute the former, drop the latter.
18730 * src/output.c (prepare): Insert the muscles `output-infix', and
18731 `output-suffix'.
18732 * src/parse-skel.y (string, string.1): New.
18733 (section.header): Use it.
18734 (section.yacc): Remove.
18735 (prefix): Remove too.
18736 * src/scan-skel.l: Adjust.
18737 * src/bison.simple, src/bison.hairy: Adjust.
18738
18739 2002-01-09 Akim Demaille <akim@epita.fr>
18740
18741 * configure.in (WERROR_CFLAGS): Compute it.
18742 * src/Makefile.am (CFLAGS): Pass it.
18743 * tests/atlocal.in (CFLAGS): Idem.
18744 * src/files.c: Fix a few warnings.
18745 (get_extension_index): Remove, unused.
18746
18747 2002-01-08 Akim Demaille <akim@epita.fr>
18748
18749 * src/getargs.c (AS_FILE_NAME): New.
18750 (getargs): Use it to convert DOSish file names.
18751 * src/files.c (base_name): Rename as full_base_name to avoid
18752 clashes with `base_name ()'.
18753 (filename_split): New.
18754 (compute_base_names): N-th rewrite, using filename_split.
18755
18756 2002-01-08 Akim Demaille <akim@epita.fr>
18757
18758 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
18759 New, stolen from the Fileutils 4.1.
18760 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
18761 * configure.in: Check for the presence of memrchr, and of its
18762 prototype.
18763
18764 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
18765
18766 * lib/hash.h (__P): Added definition for this macro.
18767 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
18768 BUILT_SOURCES, to ensure they are generated first.
18769 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
18770 %error-verbose to allow bootstrapping with bison 1.30x.
18771
18772 2002-01-06 Akim Demaille <akim@epita.fr>
18773
18774 * src/reader.c (parse_braces): Don't fetch the next char, the
18775 convention is to fetch on entry.
18776 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
18777 'switch' without a following semicolon.
18778 * tests/regression.at (braces parsing): New.
18779
18780 2002-01-06 Akim Demaille <akim@epita.fr>
18781
18782 Bison is dead wrong in its RR conflict reports.
18783
18784 * tests/torture.at (GNU Cim Grammar): New.
18785 * src/conflicts.c (count_rr_conflicts): Fix.
18786
18787 2002-01-06 Akim Demaille <akim@epita.fr>
18788
18789 Creating package.m4 from configure.ac causes too many problems.
18790
18791 * tests/Makefile.am (package.m4): Create it by hand,
18792 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
18793
18794 2002-01-06 Akim Demaille <akim@epita.fr>
18795
18796 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
18797 skeleton.h.
18798
18799 2002-01-04 Paul Eggert <eggert@twinsun.com>
18800
18801 * doc/bison.texinfo (Debugging):
18802 Remove YYSTDERR; it's no longer defined or used.
18803 Also, s/cstdio.h/cstdio/.
18804
18805 2002-01-03 Akim Demaille <akim@epita.fr>
18806
18807 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
18808
18809 2002-01-03 Akim Demaille <akim@epita.fr>
18810
18811 * src/parse-skel.y (process_skeleton): Don't bind the parser's
18812 tracing code to --trace, wait for a better --trace option, with
18813 args.
18814
18815 2002-01-03 Akim Demaille <akim@epita.fr>
18816
18817 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
18818 The ISO C++ standard is extremely clear about it: stderr is
18819 considered a macro, not a regular symbol (see table 94 `Header
18820 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
18821 Therefore std:: does not apply to it. It still does with fprintf.
18822 Also, s/cstdio.h/cstdio/.
18823
18824 2002-01-03 Akim Demaille <akim@epita.fr>
18825
18826 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
18827 for non system headers.
18828
18829 2002-01-02 Akim Demaille <akim@epita.fr>
18830
18831 Equip the skeleton chain with location tracking, runtime trace,
18832 pure parser and scanner.
18833
18834 * src/parse-skel.y: Request a pure parser, locations, and prefix
18835 renaming.
18836 (%union): Having several members with the same type does not help
18837 type mismatches, simplify.
18838 (YYPRINT, yyprint): New.
18839 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
18840 (skel_error): this.
18841 Handle locations.
18842 * src/scan-skel.l: Adjust to these changes.
18843 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
18844 (LOCATION_PRINT, skel_control_t): New.
18845
18846 2001-12-30 Akim Demaille <akim@epita.fr>
18847
18848 * src/parse-skel.y: Get rid of the shift/reduce conflict:
18849 replace `gb' with BLANKS.
18850 * src/scan-skel.l: Adjust.
18851
18852 2001-12-30 Akim Demaille <akim@epita.fr>
18853
18854 * src/system.h: We don't need nor want bcopy.
18855 Throw away MS-DOS crap: we don't need getpid.
18856 * configure.in: We don't need strndup. It was even causing
18857 problems: because Flex includes the headers *before* us,
18858 _GNU_SOURCE is not defined by config.h, and therefore strndup was
18859 not visible.
18860 * lib/xstrndup.c: New.
18861 * src/scan-skel.l: Use it.
18862 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
18863 * src/parse-skel.y: Use %directives instead of #defines.
18864
18865 2001-12-30 Akim Demaille <akim@epita.fr>
18866
18867 * src/skeleton.h: New.
18868 * src/output.c (output_parser, output_master_parser): Remove, dead
18869 code.
18870 * src/output.h (get_lines_number, actions_output, guards_output)
18871 (token_definitions_output): Prototype them.
18872 * src/parse-skel.y: Add the license notice.
18873 Include output.h and skeleton.h.
18874 (process_skeleton): Returns void, and takes a single parameter.
18875 * src/scan-skel.l: Add the license notice.
18876 Include skeleton.h.
18877 Don't use %option yylineno: it seems that then Flex imagines
18878 REJECT has been used, and therefore it won't reallocate its
18879 buffers (which makes no other sense to me than a bug). It results
18880 in warnings for `unused: yy_flex_realloc'.
18881
18882 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
18883
18884 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18885 (MUSCLE_INSERT_PREFIX): ...to there.
18886 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18887 (MUSCLE_INSERT_PREFIX): Move from here...
18888
18889 * src/bison.hairy: Add a section directive. Put braces around muscle
18890 names. This parser skeleton is still broken, but Bison should not
18891 choke on a bad muscle 'syntax'.
18892 * src/bison.simple: Add a section directive. Put braces around muscle
18893 names.
18894
18895 * src/files.h (strsuffix, stringappend): Add declarations.
18896 (tab_extension): Add declaration.
18897 (short_base_name): Add declaration.
18898
18899 * src/files.c (strsuffix, stringappend): No longer static. These
18900 functions are used in the skeleton parser.
18901 (tab_extension): New.
18902 (compute_base_names): Use the computations done in this function
18903 to guess if the generated parsers should have '.tab' in their
18904 names.
18905 (short_base_name): No longer static.
18906
18907 * src/output.c (output_skeleton): New.
18908 (output): Disable call to output_master_parser, and give a try to
18909 a new skeleton handling system.
18910 (guards_output, actions_output): No longer static.
18911 (token_definitions_output, get_lines_number): No longer static.
18912
18913 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
18914
18915 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
18916 parse-skel.y.
18917
18918 * src/parse-skel.y: New file.
18919 * src/scan-skel.l: New file.
18920
18921 2001-12-29 Akim Demaille <akim@epita.fr>
18922
18923 %name-prefix is broken.
18924
18925 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
18926 Adjust all dependencies.
18927 * tests/headers.at (export YYLTYPE): Strengthen this test: use
18928 %name-prefix.
18929
18930 Renaming yylval but not yylloc is not consistent. Now we do.
18931
18932 * src/bison.simple: Prefix yylloc if used.
18933 * doc/bison.texinfo (Decl Summary): Document that.
18934
18935 2001-12-29 Akim Demaille <akim@epita.fr>
18936
18937 * doc/bison.texinfo: Promote `%long-directive' over
18938 `%long_directive'.
18939 Remove all references to fixed-output-files, yacc is enough.
18940
18941 2001-12-29 Akim Demaille <akim@epita.fr>
18942
18943 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
18944 user prologue. These are defaults.
18945 * tests/actions.at (Mid-rule actions): Make sure the user can
18946 define YYDEBUG and YYERROR_VERBOSE.
18947
18948 2001-12-29 Akim Demaille <akim@epita.fr>
18949
18950 * src/output.c (header_output): Don't forget to export YYLTYPE and
18951 yylloc.
18952 * tests/headers.at (export YYLTYPE): New, make sure it does.
18953 * tests/regression.at (%union and --defines, Invalid CPP headers):
18954 Move to...
18955 * tests/headers.at: here.
18956
18957 2001-12-29 Akim Demaille <akim@epita.fr>
18958
18959 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
18960
18961 2001-12-29 Akim Demaille <akim@epita.fr>
18962
18963 * tests/actions.at (Mid-rule actions): Output on a single line
18964 instead of several.
18965
18966 2001-12-29 Akim Demaille <akim@epita.fr>
18967
18968 * doc/bison.texinfo: Formatting changes.
18969
18970 2001-12-29 Akim Demaille <akim@epita.fr>
18971
18972 Don't store the token defs in a muscle, just be ready to output it
18973 on command. Now possible via `symbols'. Fixes a memory leak.
18974
18975 * src/output.c (token_definitions_output): New.
18976 (output_parser, header_output): Use it.
18977 * src/reader.c (symbols_save): Remove.
18978
18979 2001-12-29 Akim Demaille <akim@epita.fr>
18980
18981 * src/bison.simple: Do not provide a default for YYSTYPE and
18982 YYLTYPE before the user's prologue. Otherwise it's hardly... a
18983 default.
18984
18985 2001-12-29 Akim Demaille <akim@epita.fr>
18986
18987 Mid-rule actions are simply... ignored!
18988
18989 * src/reader.c (readgram): Be sure to attach mid-rule actions to
18990 the empty-rule associated to the dummy symbol, not to the host
18991 rule.
18992 * tests/actions.at (Mid-rule actions): New.
18993
18994 2001-12-29 Akim Demaille <akim@epita.fr>
18995
18996 Memory leak.
18997
18998 * src/reader.c (reader): Free grammar.
18999
19000 2001-12-29 Akim Demaille <akim@epita.fr>
19001
19002 Memory leak.
19003
19004 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
19005 since it allocates it for each state, although only one is needed.
19006 (allocate_storage): Do it here.
19007
19008 2001-12-29 Akim Demaille <akim@epita.fr>
19009
19010 * src/options.h, src/options.c (create_long_option_table): Rename
19011 as...
19012 (long_option_table_new): this, with a clearer prototype.
19013 (percent_table): Remove, unused,
19014 * src/getargs.c (getargs): Adjust.
19015
19016 2001-12-29 Akim Demaille <akim@epita.fr>
19017
19018 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
19019 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
19020 as states.
19021
19022 2001-12-29 Akim Demaille <akim@epita.fr>
19023
19024 * src/lalr.c (build_relations): Rename `states' as `states1'.
19025 Sorry, I don't understand exactly what it is, no better name...
19026
19027 2001-12-29 Akim Demaille <akim@epita.fr>
19028
19029 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
19030 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
19031 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
19032 as rules.
19033
19034 2001-12-29 Akim Demaille <akim@epita.fr>
19035
19036 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
19037 ago.
19038
19039 2001-12-29 Akim Demaille <akim@epita.fr>
19040
19041 * src/reader.c, src/reader.h (user_toknums): Remove.
19042 Adjust all users to use symbols[i]->user_token_number.
19043
19044 2001-12-29 Akim Demaille <akim@epita.fr>
19045
19046 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
19047 Adjust all users to use symbols[i]->prec or ->assoc.
19048
19049 2001-12-29 Akim Demaille <akim@epita.fr>
19050
19051 * src/reader.c, src/reader.h (tags): Remove.
19052 Adjust all users to use symbols[i]->tag.
19053
19054 2001-12-29 Akim Demaille <akim@epita.fr>
19055
19056 * src/gram.h, src/gram.c (symbols): New, similar to state_table
19057 and rule_table.
19058 * src/reader.c (packsymbols): Fill this table.
19059 Drop sprec.
19060 * src/conflicts.c (resolve_sr_conflict): Adjust.
19061 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
19062 single table.
19063 Use symbols[i]->tag instead of tags[i].
19064
19065 2001-12-29 Akim Demaille <akim@epita.fr>
19066
19067 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
19068 In addition, put a comment in there, to replace...
19069 * tests/regression.at (%union and C comments): Remove.
19070
19071 2001-12-29 Akim Demaille <akim@epita.fr>
19072
19073 * tests/regression.at (Web2c Actions): Blindly move the actual
19074 output as expected output. The contents *seem* right to me, but I
19075 can't pretend reading perfectly parser tables... Nonetheless, all
19076 the other tests pass correctly, the table look OK, even though the
19077 presence of `$axiom' is to be noted: AFAICS it is useless (but
19078 harmless).
19079
19080 2001-12-29 Akim Demaille <akim@epita.fr>
19081
19082 * src/reader.c (readgram): Don't add the rule 0 if there were no
19083 rules read. In other words, add it _after_ having performed
19084 grammar sanity checks.
19085 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
19086
19087 2001-12-29 Akim Demaille <akim@epita.fr>
19088
19089 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
19090 visible, and some states have now a different number.
19091
19092 2001-12-29 Akim Demaille <akim@epita.fr>
19093
19094 * src/reader.c (readgram): Bind the initial rule's lineno to that
19095 of the first rule.
19096 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
19097 (Solved SR Conflicts): Adjust rule 0's line number.
19098
19099 2001-12-29 Akim Demaille <akim@epita.fr>
19100
19101 Fix the `GAWK Grammar' failure.
19102
19103 * src/LR0.c (final_state): Initialize to -1 so that we do compute
19104 the reductions of the first state which was mistakenly confused
19105 with the final state because precisely final_state was initialized
19106 to 0.
19107 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
19108 now noticed by Bison.
19109 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
19110 have a reduction on $default.
19111
19112 2001-12-29 Akim Demaille <akim@epita.fr>
19113
19114 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
19115 rule line numbers.
19116 * src/closure.c (print_closure): Likewise.
19117 * src/derives.c (print_derives): Likewise.
19118 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
19119 now.
19120
19121 2001-12-29 Akim Demaille <akim@epita.fr>
19122
19123 * src/lalr.c (lookaheads_print): New.
19124 (lalr): Call it when --trace-flag.
19125 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
19126 are dumped.
19127
19128 2001-12-29 Akim Demaille <akim@epita.fr>
19129
19130 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
19131 when walking through ritem, even via rule->rhs.
19132 * src/reduce.c (dump_grammar, useful_production, reduce_output)
19133 (useful_production, useless_nonterminals): Likewise.
19134 (reduce_grammar_tables): Likewise, plus update nritems.
19135 * src/nullable.c (set_nullable): Likewise.
19136 * src/lalr.c (build_relations): Likewise.
19137 * tests/sets.at (Nullable): Adjust.
19138 Fortunately, now, the $axiom is no longer nullable.
19139
19140 2001-12-29 Akim Demaille <akim@epita.fr>
19141
19142 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
19143 the 0-sentinel.
19144 * src/gram.c (ritem_longest_rhs): Likewise.
19145 * src/reduce.c (nonterminals_reduce): Likewise.
19146 * src/print_graph.c (print_graph): Likewise.
19147 * src/output.c (output_rule_data): Likewise.
19148 * src/nullable.c (set_nullable): Likewise.
19149
19150 2001-12-29 Akim Demaille <akim@epita.fr>
19151
19152 * src/output.c: Comment changes.
19153
19154 2001-12-27 Paul Eggert <eggert@twinsun.com>
19155
19156 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
19157 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
19158 Sparc, as they were causing more porting problems than the
19159 (minor) performance improvement was worth.
19160
19161 Also, catch up with 1.31's YYSTD.
19162
19163 2001-12-27 Akim Demaille <akim@epita.fr>
19164
19165 * src/output.c (output_gram): Rely on nritems, not the
19166 0-sentinel. See below.
19167 Use -1 as separator, not 0.
19168 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
19169 Rely on -1 as separator in yyrhs, instead of 0.
19170 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
19171 twice `Now at end of input', therefore there are two lines less to
19172 expect.
19173
19174 2001-12-27 Akim Demaille <akim@epita.fr>
19175
19176 * tests/regression.at (Unresolved SR Conflicts):
19177 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
19178 below.
19179
19180 2001-12-27 Akim Demaille <akim@epita.fr>
19181
19182 * src/LR0.c (new_state): Recognize the final state by the fact it
19183 is reached by eoftoken.
19184 (insert_start_shifting_state, insert_eof_shifting_state)
19185 (insert_accepting_state, augment_automaton): Remove, since now
19186 these states are automatically computed from the initial state.
19187 (generate_states): Adjust.
19188 * src/print.c: When reporting a rule number to the user, substract
19189 1, so that the axiom rule is rule 0, and the first user rule is 1.
19190 * src/reduce.c: Likewise.
19191 * src/print_graph.c (print_core): For the time being, just as for
19192 the report, depend upon --trace-flags to dump the full set of
19193 items.
19194 * src/reader.c (readgram): Once the grammar read, insert the rule
19195 0: `$axiom: START-SYMBOL $'.
19196 * tests/set.at: Adjust: rule 0 is now displayed, and since the
19197 number of the states has changed (the final state is no longer
19198 necessarily the last), catch up.
19199
19200 2001-12-27 Akim Demaille <akim@epita.fr>
19201
19202 Try to make the use of the eoftoken valid. Given that its value
19203 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
19204 is used instead of > 0 where appropriate, (ii), depend upon nritems
19205 instead of the 0-sentinel.
19206
19207 * src/gram.h, src/gram.c (nritems): New.
19208 Expected to be duplication of nitems, but for the time being...
19209 * src/reader.c (packgram): Assert nritems and nitems are equal.
19210 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
19211 * src/closure.c (print_closure, print_fderives): Likewise.
19212 * src/gram.c (ritem_print): Likewise.
19213 * src/print.c (print_core, print_grammar): Likewise.
19214 * src/print_graph.c: Likewise.
19215
19216 2001-12-27 Akim Demaille <akim@epita.fr>
19217
19218 * src/main.c (main): If there are complains after grammar
19219 reductions, then output the report anyway if requested, then die.
19220 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
19221 * src/reader.c (eoftoken): New.
19222 (parse_token_decl): If the token being defined has value `0', it
19223 is the eoftoken.
19224 (packsymbols): No longer hack `tags' to insert `$' by hand.
19225 Be sure to preserve the value of the eoftoken.
19226 (reader): Make sure eoftoken is defined.
19227 Initialize nsyms to 0: now eoftoken is created just like the others.
19228 * src/print.c (print_grammar): Don't special case the eof token.
19229 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
19230 lie anyway, albeit pleasant.
19231 * tests/calc.at: Exercise error messages with eoftoken.
19232 Change the grammar so that empty input is invalid.
19233 Adjust expectations.
19234 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
19235
19236 2001-12-27 Akim Demaille <akim@epita.fr>
19237
19238 * configure.in: Check the protos of strchr ans strspn.
19239 Replace strchr if needed.
19240 * src/system.h: Provide the protos of strchr, strspn and memchr if
19241 missing.
19242 * lib/strchr.c: New.
19243 * src/reader.c (symbols_save): Use strchr.
19244
19245 2001-12-27 Akim Demaille <akim@epita.fr>
19246
19247 * src/print.c, src/print_graph.c (escape): New.
19248 Use it to quote the TAGS outputs.
19249 * src/print_graph.c (print_state): Now errors are in red, and
19250 reductions in green.
19251 Prefer high to wide: output the state number on a line of its own.
19252
19253 2001-12-27 Akim Demaille <akim@epita.fr>
19254
19255 * src/state.h, src/state.c (reductions_new): New.
19256 * src/LR0.c (set_state_table): Let all the states have a
19257 `reductions', even if reduced to 0.
19258 (save_reductions): Adjust.
19259 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
19260 * src/print.c (print_reductions, print_actions): Adjust.
19261 * src/output.c (action_row): Adjust.
19262
19263 2001-12-27 Akim Demaille <akim@epita.fr>
19264
19265 * src/state.h, src/state.c (errs_new, errs_dup): New.
19266 * src/LR0.c (set_state_table): Let all the states have an errs,
19267 even if reduced to 0.
19268 * src/print.c (print_errs, print_reductions): Adjust.
19269 * src/output.c (output_actions, action_row): Adjust.
19270 * src/conflicts.c (resolve_sr_conflict): Adjust.
19271
19272 2001-12-27 Akim Demaille <akim@epita.fr>
19273
19274 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
19275
19276 2001-12-27 Akim Demaille <akim@epita.fr>
19277
19278 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
19279 * src/print.c: here.
19280 (lookaheadset, shiftset): New, used as additional storage by
19281 print_reductions.
19282 (print_results): Adjust.
19283 (print_shifts, print_gotos, print_errs): New, extracted from...
19284 (print_actions): here.
19285 * src/print_graph.c (print_actions): Remove dead code.
19286
19287 2001-12-27 Akim Demaille <akim@epita.fr>
19288
19289 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
19290 `$n' and `@n'.
19291
19292 2001-12-27 Akim Demaille <akim@epita.fr>
19293
19294 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
19295 (build_relations): Adjust.
19296
19297 2001-12-27 Akim Demaille <akim@epita.fr>
19298
19299 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
19300 duplication.
19301
19302 2001-12-27 Akim Demaille <akim@epita.fr>
19303
19304 * src/reader.c (packgram): Catch nitems overflows.
19305
19306 2001-12-27 Akim Demaille <akim@epita.fr>
19307
19308 * src/files.c, src/files.h (guard_obstack): Remove.
19309 * src/output.c (output): Adjust.
19310 * src/reader.c (parse_braces): New, factoring...
19311 (copy_action, copy_guard): these two which are renamed as...
19312 (parse_action, parse_guard): these.
19313 As a voluntary consequence, using braces around guards is now
19314 mandatory.
19315
19316 2001-12-27 Akim Demaille <akim@epita.fr>
19317
19318 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
19319 * src/reader.c (symbol_list): `guard' and `guard_line' are new
19320 members.
19321 (symbol_list_new): Adjust.
19322 (copy_action): action_line is the first line, not the last.
19323 (copy_guard): Just as for actions, store the `action' only, not
19324 the switch/case/break flesh.
19325 Don't parse the user action that might follow the guard, let...
19326 (readgram): do it, i.e., now, there can be an action after a
19327 guard.
19328 In other words the guard is just explicitly optional.
19329 (packgram): Adjust.
19330 * src/output.c (guards_output): New.
19331 (output_parser): Call it when needed.
19332 (output): Also free the guard and attrs obstacks.
19333 * src/files.c, src/files.h (obstack_save): Remove.
19334 (output_files): Remove.
19335 As a result, if one needs the former `.act' file, using an
19336 appropriate skeleton which requires actions and guards is now
19337 required.
19338 * src/main.c (main): Adjust.
19339 * tests/semantic.at: New.
19340 * tests/regression.at: Use `input.y' as input file name.
19341 Avoid 8+3 problems by requiring input.c when the test needs the
19342 parser.
19343
19344 2001-12-27 Akim Demaille <akim@epita.fr>
19345
19346 * src/reader.c (symbol_list_new): Be sure to initialize all the
19347 fields.
19348
19349 2001-12-27 Akim Demaille <akim@epita.fr>
19350
19351 All the hacks using a final pseudo state are now useless.
19352
19353 * src/LR0.c (set_state_table): state_table holds exactly nstates.
19354 * src/lalr.c (nLA): New.
19355 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
19356 instead of lookaheadsp from the pseudo state (nstate + 1).
19357
19358 2001-12-27 Akim Demaille <akim@epita.fr>
19359
19360 * src/output.c (action_row, token_actions): Use a state_t instead
19361 of a integer, and nlookaheads instead of the following state's
19362 lookaheadsp.
19363
19364 2001-12-27 Akim Demaille <akim@epita.fr>
19365
19366 * src/conflicts.c (log_resolution, flush_shift)
19367 (resolve_sr_conflict, set_conflicts, solve_conflicts)
19368 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
19369 (conflicts_print, print_reductions): Use a state_t instead of an
19370 integer when referring to a state.
19371 As much as possible, depend upon nlookaheads, instead of the
19372 `lookaheadsp' member of the following state (since lookaheads of
19373 successive states are successive, the difference between state n + 1
19374 and n served as the number of lookaheads for state n).
19375 * src/lalr.c (add_lookback_edge): Likewise.
19376 * src/print.c (print_core, print_actions, print_state)
19377 (print_results): Likewise.
19378 * src/print_graph.c (print_core, print_actions, print_state)
19379 (print_graph): Likewise.
19380 * src/conflicts.h: Adjust.
19381
19382 2001-12-27 Akim Demaille <akim@epita.fr>
19383
19384 * src/bison.hairy: Formatting/comment changes.
19385 ANSIfy.
19386 Remove `register' indications.
19387 Add plenty of `static'.
19388
19389 2001-12-27 Akim Demaille <akim@epita.fr>
19390
19391 * src/output.c (prepare): Drop the muscle `ntbase' which
19392 duplicates ntokens.
19393 * src/bison.simple: Formatting/comment changes.
19394 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
19395 is an undocumented synonym.
19396
19397 2001-12-22 Akim Demaille <akim@epita.fr>
19398
19399 * src/output.c (output_table_data): Change the prototype to use
19400 `int' for array ranges: some invocations do pass an int, not a
19401 short.
19402 Reported by Wayne Green.
19403
19404 2001-12-22 Akim Demaille <akim@epita.fr>
19405
19406 Some actions of web2c.y are improperly triggered.
19407 Reported by Mike Castle.
19408
19409 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
19410 * tests/regression.at (Web2c): Rename as...
19411 (Web2c Report): this.
19412 (Web2c Actions): New.
19413
19414 2001-12-22 Akim Demaille <akim@epita.fr>
19415
19416 Reductions in web2c.y are improperly reported.
19417 Reported by Mike Castle.
19418
19419 * src/conflicts.c (print_reductions): Fix.
19420 * tests/regression.at (Web2c): New.
19421
19422 2001-12-18 Akim Demaille <akim@epita.fr>
19423
19424 Some host fail on `assert (!"foo")', which expands to
19425 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
19426 Reported by Nelson Beebee.
19427
19428 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
19429 `#define it_succeeded 0' and `assert (it_succeeded)'.
19430
19431 2001-12-17 Marc Autret <autret_m@epita.fr>
19432
19433 * src/bison.simple: Don't hard code the skeleton line and filename.
19434 * src/output.c (output_parser): Rename 'line' as 'output_line'.
19435 New line counter 'skeleton_line' (skeleton-line muscle).
19436
19437 2001-12-17 Paul Eggert <eggert@twinsun.com>
19438
19439 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
19440 YYDEBUG must be defined to a nonzero value.
19441
19442 * src/bison.simple (yytname): Do not assume that the user defines
19443 YYDEBUG to a properly parenthesized expression.
19444
19445 2001-12-17 Akim Demaille <akim@epita.fr>
19446
19447 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
19448 nlookaheads is a new member.
19449 Adjust all users.
19450 * src/lalr.h (nlookaheads): Remove this orphan declaration.
19451 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
19452 state.
19453
19454 2001-12-17 Akim Demaille <akim@epita.fr>
19455
19456 * src/files.h, src/files.c (open_files, close_files): Remove.
19457 * src/main.c (main): Don't open/close files, nor invoke lex_free,
19458 let...
19459 * src/reader.c (reader): Do it.
19460
19461 2001-12-17 Akim Demaille <akim@epita.fr>
19462
19463 * src/conflicts.c (print_reductions): Formatting changes.
19464
19465 2001-12-17 Akim Demaille <akim@epita.fr>
19466
19467 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
19468 (flush_reduce): New.
19469 (resolve_sr_conflict): Adjust.
19470
19471 2001-12-17 Akim Demaille <akim@epita.fr>
19472
19473 * src/output.c (output_obstack): Be static and rename as...
19474 (format_obstack): this, to avoid any confusion with files.c's
19475 output_obstack.
19476 * src/reader.h (muscle_obstack): Move to...
19477 * src/output.h: here, since it's defined in output.c.
19478
19479 2001-12-17 Akim Demaille <akim@epita.fr>
19480
19481 * src/output.c (action_row, save_column, default_goto)
19482 (sort_actions, matching_state, pack_vector): Better variable
19483 locality.
19484
19485 2001-12-17 Akim Demaille <akim@epita.fr>
19486
19487 * src/output.c: Various formatting changes.
19488
19489 2001-12-17 Akim Demaille <akim@epita.fr>
19490
19491 * src/files.c (output_files): Free the output_obstack.
19492 * src/main.c (main): Call print and print_graph conditionally.
19493 * src/print.c (print): Work unconditionally.
19494 * src/print_graph.c (print_graph): Work unconditionally.
19495 * src/conflicts.c (log_resolution): Output only if verbose_flag.
19496
19497 2001-12-16 Marc Autret <autret_m@epita.fr>
19498
19499 * src/output.c (actions_output): Fix. When we use %no-lines,
19500 there is one less line per action.
19501
19502 2001-12-16 Marc Autret <autret_m@epita.fr>
19503
19504 * src/bison.simple: Remove a useless #line directive.
19505 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
19506 * src/output.c (get_lines_number): New.
19507 (output_parser): Adjust, now takes care about the lines of a
19508 output muscles.
19509 Fix line numbering.
19510 (actions_output): Computes the number of lines taken by actions.
19511 (output_master_parser): Insert new skeleton which is the name of
19512 the output parser file name.
19513
19514 2001-12-15 Marc Autret <autret_m@epita.fr>
19515
19516 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
19517
19518 2001-12-15 Marc Autret <autret_m@epita.fr>
19519
19520 * src/output.c (output_gram): Keep track of the hairy one.
19521
19522 2001-12-15 Akim Demaille <akim@epita.fr>
19523
19524 Make `make distcheck' work.
19525
19526 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
19527 system.h which uses libgettext.h.
19528
19529 2001-12-15 Akim Demaille <akim@epita.fr>
19530
19531 * src/nullable.c (set_nullable): Useless rules must be skipped,
19532 otherwise, since we range over their symbols, we might look at a
19533 nonterminal which no longer ``exists'', i.e., it is not counted in
19534 `nvars', hence we overflow our arrays.
19535
19536 2001-12-15 Akim Demaille <akim@epita.fr>
19537
19538 The header can also be produced directly, without any obstack!
19539 Yahoo!
19540
19541 * src/files.c, src/files.h (defines_obstack): Remove.
19542 (compute_header_macro): Global.
19543 (defines_obstack_save): Remove.
19544 * src/reader.c (parse_union_decl): No longer output to
19545 defines_obstack: its content can be found in the `stype' muscle
19546 anyway.
19547 (output_token_translations): Merge into...
19548 (symbols_output): this.
19549 Rename as...
19550 (symbols_save): this.
19551 (reader): Adjust.
19552 * src/output.c (header_output): New.
19553 (output): Call it.
19554
19555 2001-12-15 Akim Demaille <akim@epita.fr>
19556
19557 * src/reader.c (parse_union_decl): Instead of handling two obstack
19558 simultaneously, use one to define the `stype' muscle, and use the
19559 value of the latter to fill defines_obstack.
19560 (copy_comment): Remove.
19561 (copy_comment2): Work for a single obstack.
19562 Rename as...
19563 (copy_comment): this.
19564
19565 2001-12-15 Akim Demaille <akim@epita.fr>
19566
19567 * src/lex.c, src/lex.h (xgetc): No longer static.
19568 * src/reader.c (parse_union_decl): Revamp.
19569
19570 2001-12-15 Akim Demaille <akim@epita.fr>
19571
19572 Still making progress in separating Bison into (i) input, (ii)
19573 process, (iii) output: now we can directly output the parser file
19574 without using table_obstack at all.
19575
19576 * src/files.c, src/files.h (table_obstack): Bye bye.
19577 (parser_file_name): New.
19578 * src/files.c (compute_output_file_names): Compute it.
19579 * src/output.c (actions_output, output_parser)
19580 (output_master_parser): To a file instead of an obstack.
19581
19582 2001-12-15 Akim Demaille <akim@epita.fr>
19583
19584 Attach actions to rules, instead of pre-outputting them to
19585 actions_obstack.
19586
19587 * src/gram.h (rule_t): action and action_line are new members.
19588 * src/reader.c (symbol_list): Likewise.
19589 (copy_action): Save the actions within the rule.
19590 (packgram): Save them in rule_table.
19591 * src/output.c (actions_output): New.
19592 (output_parser): Use it on `%%actions'.
19593 (output_rule_data): Don't free rule_table.
19594 (output): Do it.
19595 (prepare): Don't save the `action' muscle.
19596 * src/bison.simple: s/%%action/%%actions/.
19597
19598 2001-12-15 Akim Demaille <akim@epita.fr>
19599
19600 * src/reader.c (copy_action): When --yacc, don't append a `;'
19601 to the user action: let it fail if lacking.
19602 Suggested by Arnold Robbins and Tom Tromey.
19603
19604 2001-12-14 Akim Demaille <akim@epita.fr>
19605
19606 * src/lex.c (literalchar): Simply return the char you decoded, non
19607 longer mess around with obstacks and int pointers.
19608 Adjust all callers.
19609
19610 2001-12-14 Akim Demaille <akim@epita.fr>
19611
19612 * src/lex.c (literalchar): Don't escape the special characters,
19613 just decode them, and keep them as char (before, eol was output as
19614 the 2 char string `\n' etc.).
19615 * src/output.c (output_rule_data): Use quotearg to output the
19616 token strings.
19617
19618 2001-12-13 Paul Eggert <eggert@twinsun.com>
19619
19620 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
19621 Do not infringe on the global user namespace when using C++.
19622 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
19623 All uses of `fprintf' and `stderr' changed.
19624
19625 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
19626
19627 2001-12-13 Akim Demaille <akim@epita.fr>
19628
19629 The computation of nullable is broken: it doesn't handle empty
19630 RHS's properly.
19631
19632 * tests/torture.at (GNU AWK Grammar): New.
19633 * tests/sets.at (Nullable): New.
19634 * src/nullable.c (set_nullable): Instead of blindly looping over
19635 `ritems', loop over the rules, and then over their rhs's.
19636
19637 Work around Autotest bugs.
19638
19639 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
19640 frame, because Autotest understand lines starting with a `+' as
19641 traces from the shell. Then, they are not processed properly.
19642 Admittedly an Autotest bug, but we don't have time to wait for
19643 Autotest to catch up.
19644 * tests/regression.at (Broken Closure): Adjust to the new table
19645 frames.
19646 Move to...
19647 * tests/sets.at: here.
19648
19649 2001-12-13 Akim Demaille <akim@epita.fr>
19650
19651 * src/closure.c (closure): Use nrules instead of playing tricks
19652 with BITS_PER_WORD.
19653
19654 2001-12-13 Akim Demaille <akim@epita.fr>
19655
19656 * src/print.c (print_actions): Output the handling of `$' as the
19657 traces do: shifting the token EOF. Before EOF was treated as a
19658 nonterminal.
19659 * tests/regression.at: Adjust some tests.
19660 * src/print_graph.c (print_core): Complete the set of items via
19661 closure. The next-to-final and final states are still unsatisfying,
19662 but that's to be addressed elsewhere.
19663 No longer output the rule numbers, but do output the state number.
19664 A single loop for the shifts + gotos is enough, but picked a
19665 distinct color for each.
19666 (print_graph): Initialize and finalize closure.
19667
19668 2001-12-13 Akim Demaille <akim@epita.fr>
19669
19670 * src/reader.c (readgram): Remove dead code, an strip useless
19671 braces.
19672 (get_type): Remove, unused.
19673
19674 2001-12-12 Akim Demaille <akim@epita.fr>
19675
19676 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
19677 on that of lib/error.c.
19678
19679 2001-12-12 Akim Demaille <akim@epita.fr>
19680
19681 Some hosts don't like `/' in includes.
19682
19683 * src/system.h: Include libgettext.h without qualifying the path.
19684 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
19685 $(top_srcdir).
19686
19687 2001-12-11 Marc Autret <autret_m@epita.fr>
19688
19689 * src/output.c (output_parser): Remove useless muscle.
19690
19691 2001-12-11 Marc Autret <autret_m@epita.fr>
19692
19693 * src/bison.simple: Remove #line just before %%epilogue. It
19694 is now handled in ...
19695 * src/reader.c (read_additionnal_code): Add the output of a
19696 #line for the epilogue.
19697
19698 2001-12-10 Marc Autret <autret_m@epita.fr>
19699
19700 * src/reader.c (copy_definition): Re-use CPP-outed code which
19701 replace precedent remove.
19702 * src/bison.simple: Remove #line before %%prologue because
19703 %%input-line is wrong at this time.
19704
19705 2001-12-10 Marc Autret <autret_m@epita.fr>
19706
19707 * src/reader.c (symbols_output): Clean up.
19708 * src/output.c (output_gram, output): Clean up.
19709
19710 2001-12-10 Akim Demaille <akim@epita.fr>
19711
19712 * src/lalr.c (initialize_lookaheads): New. Extracted from...
19713 * src/LR0.c (set_state_table): here.
19714 * src/lalr.c (lalr): Call it.
19715
19716 2001-12-10 Akim Demaille <akim@epita.fr>
19717
19718 * src/state.h (shifts): Remove the `number' member: shifts are
19719 attached to state, hence no longer need to be labelled with a
19720 state number.
19721
19722 2001-12-10 Akim Demaille <akim@epita.fr>
19723
19724 Now that states have a complete set of members, the linked list of
19725 shifts is useless: just fill directly the state's shifts member.
19726
19727 * src/state.h (shifts): Remove the `next' member.
19728 * src/LR0.c (first_state, last_state): Remove.
19729 Adjust the callers.
19730 (augment_automaton): Don't look for the shifts that must be added
19731 a shift on EOF: it is those of the state we looked for! But now,
19732 since shifts are attached, it is no longer needed to looking
19733 merely by its id: its number.
19734
19735 2001-12-10 Akim Demaille <akim@epita.fr>
19736
19737 * src/LR0.c (augment_automaton): Better variable locality.
19738 Remove an impossible branch: if there is a state corresponding to
19739 the start symbol being shifted, then there is shift for the start
19740 symbol from the initial state.
19741
19742 2001-12-10 Akim Demaille <akim@epita.fr>
19743
19744 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
19745 only when appropriate: when insert_start_shifting_state' is not
19746 invoked.
19747 * tests/regression.at (Rule Line Numbers): Adjust.
19748
19749 2001-12-10 Akim Demaille <akim@epita.fr>
19750
19751 * src/LR0.c (augment_automaton): Now that all states have shifts,
19752 merge the two cases addition shifts to the initial state.
19753
19754 2001-12-10 Akim Demaille <akim@epita.fr>
19755
19756 * src/lalr.c (set_state_table): Move to...
19757 * src/LR0.c: here.
19758 * src/lalr.c (lalr): Don't call it...
19759 * src/LR0.c (generate_states): do it.
19760 * src/LR0.h (first_state): Remove, only the table is used.
19761
19762 2001-12-10 Akim Demaille <akim@epita.fr>
19763
19764 * src/LR0.h (first_shift, first_reduction): Remove.
19765 * src/lalr.c: Don't use first_shift: find shifts through the
19766 states.
19767
19768 2001-12-10 Akim Demaille <akim@epita.fr>
19769
19770 * src/LR0.c: Attach shifts to states as soon as they are
19771 computed.
19772 * src/lalr.c (set_state_table): Instead of assigning shifts to
19773 state, just assert that the mapping was properly done.
19774
19775 2001-12-10 Akim Demaille <akim@epita.fr>
19776
19777 * src/LR0.c (insert_start_shift): Rename as...
19778 (insert_start_shifting_state): this.
19779 (insert_eof_shifting_state, insert_accepting_state): New.
19780 (augment_automaton): Adjust.
19781 Better locality of the variables.
19782 When looking if the start_symbol is shifted from the initial
19783 state, using `while (... symbol != start_symbol ...)' sounds
19784 better than `while (... symbol < start_symbol ...)': If fail
19785 to see how the order between symbols could be relevant!
19786
19787 2001-12-10 Akim Demaille <akim@epita.fr>
19788
19789 * src/getargs.h: Don't declare `spec_name_prefix' and
19790 `spec_file_prefix', declared by src/files.h.
19791 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
19792 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
19793 * src/output.c (prepare): Adjust.
19794 * src/reader.c (symbols_output): Likewise.
19795 * src/vmsgetargs.c: Vaguely adjust, but who cares?
19796
19797 2001-12-10 Akim Demaille <akim@epita.fr>
19798
19799 * src/muscle_tab.c (muscle_init): NULL is a better default than
19800 `"0"'.
19801
19802 2001-12-10 Akim Demaille <akim@epita.fr>
19803
19804 * src/reader.c (reader): Calling symbols_output once is enough.
19805
19806 2001-12-10 Akim Demaille <akim@epita.fr>
19807
19808 Now that states have a complete set of members, the linked list of
19809 reductions is useless: just fill directly the state's reductions
19810 member.
19811
19812 * src/state.h (struct reductions): Remove member `number' and
19813 `next'.
19814 * src/LR0.c (first_reduction, last_reduction): Remove.
19815 (save_reductions): Don't link the new reductions, store them in
19816 this_state.
19817 * src/lalr.c (set_state_table): No need to attach reductions to
19818 states, it's already done.
19819 * src/output.c (output_actions): No longer free the shifts, then
19820 the reductions, then the states: free all the states and their
19821 members.
19822
19823 2001-12-10 Akim Demaille <akim@epita.fr>
19824
19825 * src/options.c (OPTN, DRTV, BOTH): New.
19826 (option_table): Use them.
19827
19828 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
19829 the job of system.h.
19830 * src/options.c: Don't include stdio.h and xalloc.h for the same
19831 reasons.
19832
19833 2001-12-10 Akim Demaille <akim@epita.fr>
19834
19835 * src/output.c (output, prepare): Make sure the values of the
19836 muscles `action' and `prologue' are 0-terminated.
19837
19838 2001-12-10 Akim Demaille <akim@epita.fr>
19839
19840 Clean up GCC warnings.
19841
19842 * src/reader.c (copy_action): `buf' is not used.
19843 (parse_skel_decl): Be static.
19844 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
19845 * src/options.h (create_long_option_table): Have a real prototype.
19846 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
19847 (hash_delete_at): Return const void *.
19848 Adjust casts to preserve the const.
19849
19850 2001-12-10 Akim Demaille <akim@epita.fr>
19851
19852 * configure.in: Require 2.52g.
19853 M4 is not needed, but AUTOM4TE is.
19854 * m4/m4.m4: Remove.
19855 * tests/Makefile.am: Adjust.
19856
19857 2001-12-10 Akim Demaille <akim@epita.fr>
19858
19859 One structure for states is enough, even though theoretically
19860 there are LR(0) states and LALR(1) states.
19861
19862 * src/lalr.h (state_t): Remove.
19863 (state_table): Be state_t **, not state_t *.
19864 * src/state.h (core, CORE_ALLOC): Rename as...
19865 (state_t, STATE_ALLOC): this.
19866 Add the LALR(1) members: shifts, reductions, errs.
19867 * src/LR0.c (state_table): Rename as...
19868 (state_hash): this, to avoid name clashes with the global
19869 `state_table'.
19870 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
19871 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
19872
19873 2001-12-10 Akim Demaille <akim@epita.fr>
19874
19875 Bison dumps core on bash.y.
19876 Reported by Pascal Bart.
19877
19878 * src/warshall.c (bitmatrix_print): New.
19879 (TC): Use it.
19880 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
19881 j must be the outer loop.
19882 * tests/regression.at (Broken Closure): New.
19883
19884 2001-12-05 Akim Demaille <akim@epita.fr>
19885
19886 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
19887 its argument.
19888 Reported by Peter Hamorsky.
19889
19890 2001-12-05 Akim Demaille <akim@epita.fr>
19891
19892 * src/conflicts.c (err_table): Remove.
19893 (resolve_sr_conflict): Adjust.
19894 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
19895 Rename as...
19896 (state_t.reductions, state_t.shifts): this.
19897
19898 2001-12-05 Akim Demaille <akim@epita.fr>
19899
19900 * src/reduce.c (reduce_grammar_tables): No longer disable the
19901 removal of useless rules via CPP but via `if (0)', so that the
19902 compiler still check the code is valid.
19903 For instance, it should have noticed `rline' no longer exists: use
19904 the `line' member of rule_t.
19905 * src/gram.c (dummy, rline): Remove, unused.
19906
19907 2001-12-05 Akim Demaille <akim@epita.fr>
19908
19909 * src/output.c (pack_vector): Use assert, not berror.
19910 * src/main.c (berror): Remove, unused.
19911
19912 2001-12-05 Akim Demaille <akim@epita.fr>
19913
19914 New experimental feature: if --verbose --trace output all the
19915 items of a state, not only its kernel.
19916
19917 * src/print.c (print_core): If `trace_flag', then invoke closure
19918 before outputting the items of the state (print_core is no longer
19919 a correct name them).
19920 (print_results): Invoke new_closure/free_closure if needed.
19921
19922 2001-12-05 Akim Demaille <akim@epita.fr>
19923
19924 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
19925 * src/closure.c, src/closure.h (itemsetsize): Rename as...
19926 (nitemset): for consistency with the rest of the project.
19927
19928 2001-12-05 Akim Demaille <akim@epita.fr>
19929
19930 * src/closure.c (print_closure): Improve.
19931 (closure): Use it for printing input and output.
19932
19933 2001-12-05 Akim Demaille <akim@epita.fr>
19934
19935 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
19936 indexed by nonterminals.
19937
19938 2001-12-05 Akim Demaille <akim@epita.fr>
19939
19940 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
19941 what it was!).
19942 * src/warshall.h: Remove accidental duplication of the content.
19943
19944 2001-12-05 Akim Demaille <akim@epita.fr>
19945
19946 * src/closure.c (set_fderives): De-obfuscate.
19947
19948 2001-12-05 Akim Demaille <akim@epita.fr>
19949
19950 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
19951
19952 2001-12-05 Akim Demaille <akim@epita.fr>
19953
19954 * src/closure.c (set_firsts): De-obfuscate.
19955
19956 2001-12-05 Akim Demaille <akim@epita.fr>
19957
19958 * src/output.c (action_row): De-obfuscate
19959 using the good o' techniques: arrays not pointers, variable
19960 locality, BITISSET, RESETBIT etc.
19961
19962 2001-12-05 Akim Demaille <akim@epita.fr>
19963
19964 Pessimize the code to simplify it: from now on, all the states
19965 have a valid SHIFTS, which NSHIFTS is possibly 0.
19966
19967 * src/LR0.c (shifts_new): Be global and move to..
19968 * src/state.c, src/state.h: here.
19969 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
19970 * src/print_graph: Adjust.
19971
19972 2001-12-05 Akim Demaille <akim@epita.fr>
19973
19974 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
19975 * src/conflicts.c: Use it.
19976 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
19977 incorrectly ``simplified''.
19978
19979 2001-12-05 Akim Demaille <akim@epita.fr>
19980
19981 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
19982 using the good o' techniques: arrays not pointers, variable
19983 locality, BITISSET, RESETBIT etc.
19984
19985 2001-12-05 Akim Demaille <akim@epita.fr>
19986
19987 * src/state.h (SHIFT_SYMBOL): New.
19988 * src/conflicts.c: Use it to deobfuscate.
19989
19990 2001-12-05 Akim Demaille <akim@epita.fr>
19991
19992 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
19993 (print_reductions): De-obfuscate using the good o' techniques:
19994 arrays not pointers, variable locality, BITISSET.
19995
19996 2001-12-05 Akim Demaille <akim@epita.fr>
19997
19998 * src/conflicts.c (print_reductions): Arrays, not pointers.
19999 Use BITISSET.
20000
20001 2001-12-05 Akim Demaille <akim@epita.fr>
20002
20003 * src/conflicts.c (print_reductions): Pessimize, but clarify.
20004
20005 2001-12-05 Akim Demaille <akim@epita.fr>
20006
20007 * src/conflicts.c (print_reductions): Improve variable locality.
20008
20009 2001-12-05 Akim Demaille <akim@epita.fr>
20010
20011 * src/conflicts.c (print_reductions): Pessimize, but clarify.
20012
20013 2001-12-05 Akim Demaille <akim@epita.fr>
20014
20015 * src/conflicts.c (print_reductions): Improve variable locality.
20016
20017 2001-12-05 Akim Demaille <akim@epita.fr>
20018
20019 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
20020 * src/lalr.c: Use them.
20021
20022 2001-12-05 Akim Demaille <akim@epita.fr>
20023
20024 * src/LR0.c (augment_automaton): Formatting changes.
20025 Better variable locality.
20026
20027 2001-12-05 Akim Demaille <akim@epita.fr>
20028
20029 * src/lalr.c (matrix_print): New.
20030 (transpose): Use it.
20031 Use arrays instead of pointers.
20032
20033 2001-12-05 Akim Demaille <akim@epita.fr>
20034
20035 * src/lalr.c (maxrhs): Move to...
20036 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
20037 * src/lalr.c (build_relations): Adjust.
20038
20039 2001-12-05 Akim Demaille <akim@epita.fr>
20040
20041 * src/lalr.c (transpose): Free the memory allocated to the
20042 argument, as it is replaced by the results by the unique caller.
20043 (build_relations): Merely invoke transpose: it handles the memory
20044 deallocation.
20045 Improve variable locality.
20046 Avoid variables used as mere abbreviations.
20047 (compute_lookaheads): Use arrays instead of pointers.
20048
20049 2001-12-05 Akim Demaille <akim@epita.fr>
20050
20051 * src/lalr.c (initialize_F): Improve variable locality.
20052 Avoid variables used as mere abbreviations.
20053
20054 2001-12-05 Akim Demaille <akim@epita.fr>
20055
20056 * src/derives.c (print_derives): Display the ruleno.
20057 * src/lalr.c (initialize_F, transpose): Better variable locality
20058 to improve readability.
20059 Avoid variables used as mere abbreviations.
20060
20061 2001-12-05 Akim Demaille <akim@epita.fr>
20062
20063 * src/lalr.c (traverse): Use arrays instead of pointers.
20064
20065 2001-12-05 Akim Demaille <akim@epita.fr>
20066
20067 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
20068 the handling of squeue.
20069 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
20070
20071 2001-12-05 Akim Demaille <akim@epita.fr>
20072
20073 Because useless nonterminals are now kept alive (instead of being
20074 `destroyed'), we now sometimes examine them, and store information
20075 related to them. Hence we need to know their number, and adjust
20076 memory allocations.
20077
20078 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
20079 static.
20080 * src/LR0.c (allocate_itemsets): The memory allocated to
20081 `symbol_count' was used for two different purpose: once to count
20082 the number of occurrences of each symbol, and later reassigned to
20083 `shift_symbol', containing the symbol that can be shifted from a
20084 given state.
20085 Deobfuscate, i.e., allocate, use and free `symbol_count' here
20086 only, and...
20087 (new_itemsets): Allocate `shift_symbol' here.
20088 (allocate_itemsets): symbol_count includes useless nonterminals.
20089 Make room for them.
20090 (free_storage): Use `free', not `XFREE', for pointers that cannot
20091 be null.
20092
20093 2001-12-05 Akim Demaille <akim@epita.fr>
20094
20095 * src/nullable.c (set_nullable): Deobfuscate the handling of
20096 ritem.
20097 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
20098
20099 2001-12-05 Akim Demaille <akim@epita.fr>
20100
20101 * src/gram.c, src/gram.h (ritem_print): New.
20102 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
20103 (This useless function was defined only to work around VMS linkers
20104 that can't handle compilation units with variables only).
20105 * src/reduce.c (dump_grammar): Use it to trace the construction of
20106 ritem.
20107
20108 2001-12-04 Paul Eggert <eggert@twinsun.com>
20109
20110 * src/bison.simple (union yyalloc): Change member names
20111 to be the same as the stack names.
20112 (yyparse): yyptr is now union yyalloc *, not char *.
20113 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
20114 and may generate better code on some machines.
20115 (yystpcpy): Use prototype if __STDC__ is defined, not just
20116 if __cplusplus is defined.
20117
20118 2001-11-30 Akim Demaille <akim@epita.fr>
20119
20120 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
20121 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
20122 Gettext doesn't compile cleanly, and dies with -Werror.
20123 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
20124 Include WARNING_CFLAGS here.
20125 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
20126 before being defined.
20127
20128 2001-11-27 Paul Eggert <eggert@twinsun.com>
20129
20130 * lib/quotearg.h (quotearg_n, quotearg_n_style):
20131 First arg is int, not unsigned.
20132 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
20133 (SIZE_MAX, UINT_MAX): New macros.
20134 (quotearg_n_options): Abort if N is negative.
20135 Avoid overflow check on hosts where size_t is 64 bits and int
20136 is 32 bits, as overflow is impossible there.
20137 Fix off-by-one typo that caused unnecessary reallocation.
20138
20139 2001-11-29 Paul Eggert <eggert@twinsun.com>
20140
20141 Name space cleanup in generated parser.
20142
20143 * doc/bison.texinfo (Bison Parser): Discuss system headers
20144 and their effect on the user name space.
20145
20146 * src/bison.simple:
20147 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
20148 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
20149 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
20150
20151 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
20152 on user names when possible.
20153
20154 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
20155 Simplify test for whather <alloca.h> exists.
20156
20157 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
20158
20159 (<stdio.h>): Include if YYDEBUG.
20160
20161 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
20162 ! defined (yyoverflow) && ! defined (yymemcpy).
20163
20164 (yymemcpy, yyparse): Rename local variables as needed so that
20165 they all begin with 'yy'.
20166
20167 (yystrlen, yystpcpy): New functions.
20168
20169 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
20170 All uses changed.
20171
20172 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
20173 instead of relying on string.h functions. Use YYSTACK_ALLOC
20174 and YYSTACK_FREE instead of malloc and free.
20175
20176 2001-11-30 Akim Demaille <akim@epita.fr>
20177
20178 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
20179 before their first uses.
20180 (YYBISON, YYPURE): Move to the top of the output.
20181
20182 2001-11-30 Akim Demaille <akim@epita.fr>
20183
20184 * tests/reduce.at (Useless Nonterminals): Fix.
20185
20186 2001-11-30 Akim Demaille <akim@epita.fr>
20187
20188 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
20189 if body instead of `;' to pacify GCC's warnings.
20190
20191 2001-11-30 Akim Demaille <akim@epita.fr>
20192
20193 Instead of mapping the LHS of unused rules to -1, keep the LHS
20194 valid, but flag the rules as invalid.
20195
20196 * src/gram.h (rule_t): `useful' is a new member.
20197 * src/print.c (print_grammar): Adjust.
20198 * src/derives.c (set_derives): Likewise.
20199 * src/reader.c (packgram, reduce_output): Likewise.
20200 * src/reduce.c (reduce_grammar_tables): Likewise.
20201 * tests/reduce.at (Underivable Rules, Useless Rules): New.
20202
20203 2001-11-30 Akim Demaille <akim@epita.fr>
20204
20205 * src/reduce.c (reduce_output): Formatting changes.
20206 * src/print.c (print_results, print_grammar): Likewise.
20207 * tests/regression.at (Rule Line Numbers)
20208 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
20209
20210 2001-11-30 Akim Demaille <akim@epita.fr>
20211
20212 * src/reduce.c (nonterminals_reduce): Instead of throwing away
20213 useless nonterminals, move them at the end of the symbol arrays.
20214 (reduce_output): Adjust.
20215 * tests/reduce.at (Useless Nonterminals): Adjust.
20216
20217 2001-11-30 Akim Demaille <akim@epita.fr>
20218
20219 * src/reduce.c: Various comment/formatting changes.
20220 (nonterminals_reduce): New, extracted from...
20221 (reduce_grammar_tables): here.
20222 (reduce_grammar): Call nonterminals_reduce.
20223
20224 2001-11-29 Paul Eggert <eggert@twinsun.com>
20225
20226 * src/bison.simple (YYSTACK_REALLOC): Remove.
20227 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
20228 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
20229 New macros.
20230 (union yyalloc): New type.
20231 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
20232 an arbitrary restriction on hosts where size_t is wider than int.
20233
20234 (yyparse): Don't dump core if alloca or malloc fails; instead, report
20235 a parser stack overflow. Allocate just one block of memory for all
20236 three stacks, instead of allocating three blocks; this typically is
20237 faster and reduces fragmentation.
20238
20239 Do not limit the number of items in the stack to a value that fits
20240 in 'int', as this is an arbitrary limit on hosts with 64-bit
20241 size_t and 32-bit int.
20242
20243 2001-11-29 Marc Autret <autret_m@epita.fr>
20244
20245 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
20246 of defining YYERROR_VERBOSE.
20247 [AT_DATA]: $4 is now out of C declarations in the prologue.
20248
20249 2001-11-28 Marc Autret <autret_m@epita.fr>
20250
20251 * src/reader.c (parse_dquoted_param): New.
20252 (parse_skel_decl): Use it.
20253 * src/lex.h: Add its prototype.
20254 * src/lex.c (literalchar): Become not static.
20255
20256 2001-11-28 Marc Autret <autret_m@epita.fr>
20257
20258 * src/output.h: And put its extern declaration here.
20259 * src/output.c (error_verbose): Define here.
20260 (prepare): Echo name modification.
20261 * src/getargs.h: Clean its extern declaration.
20262 * src/getargs.c (error_verbose_flag): Remove.
20263 (getargs): Remove case 'e'.
20264 * src/options.c (option_table): 'error-verbose' is now seen as simple
20265 percent option.
20266 Include output.h.
20267
20268 * src/reader.c (read_declarations): Remove case tok_include.
20269 (parse_include_decl): Remove.
20270 * src/lex.h (token_t): Remove tok_include.
20271 * src/options.c (option_table): 'include' is now a simple command line
20272 option.
20273
20274 2001-11-28 Marc Autret <autret_m@epita.fr>
20275
20276 * src/bison.simple: Adjust muscle names.
20277 * src/muscle_tab.c (muscle_init): Also rename the muscles.
20278 * src/output.c (prepare): s/_/-/ for the muscles names.
20279 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
20280
20281 2001-11-28 Marc Autret <autret_m@epita.fr>
20282
20283 * src/bison.simple: Fix debug.
20284 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
20285
20286 2001-11-28 Akim Demaille <akim@epita.fr>
20287
20288 * src/LR0.c (shifts_new): New.
20289 (save_shifts, insert_start_shift, augment_automaton): Use it.
20290
20291 2001-11-28 Akim Demaille <akim@epita.fr>
20292
20293 * src/closure.c (closure): `b' and `ruleno' denote the same value:
20294 keep ruleno only.
20295
20296 2001-11-28 Akim Demaille <akim@epita.fr>
20297
20298 * src/closure.c (closure): Instead of looping over word in array
20299 then bits in words, loop over bits in array.
20300
20301 2001-11-28 Akim Demaille <akim@epita.fr>
20302
20303 * src/closure.c (closure): No longer optimize the special case
20304 where all the bits of `ruleset[r]' are set to 0, to make the code
20305 clearer.
20306
20307 2001-11-28 Akim Demaille <akim@epita.fr>
20308
20309 * src/closure.c (closure): `r' and `c' are new variables, used to
20310 de-obfuscate accesses to RULESET and CORE.
20311
20312 2001-11-28 Akim Demaille <akim@epita.fr>
20313
20314 * src/reduce.c (reduce_print): Use ngettext.
20315 (dump_grammar): Improve the trace accuracy.
20316
20317 2001-11-28 Akim Demaille <akim@epita.fr>
20318
20319 * src/reduce.c (dump_grammar): Don't translate trace messages.
20320
20321 2001-11-28 Akim Demaille <akim@epita.fr>
20322
20323 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
20324 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
20325 as all tags are free'ed afterwards.
20326 From Enrico Scholz.
20327
20328 2001-11-27 Paul Eggert <eggert@twinsun.com>
20329
20330 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
20331 use alloca when we didn't want to, and vice versa.
20332
20333 2001-11-27 Marc Autret <autret_m@epita.fr>
20334
20335 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
20336 initialization.
20337 * src/output.c (prepare): Remove its update.
20338
20339 2001-11-27 Marc Autret <autret_m@epita.fr>
20340
20341 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
20342 Use %error-verbose.
20343
20344 2001-11-27 Marc Autret <autret_m@epita.fr>
20345
20346 * src/bison.simple: Remove YYERROR_VERBOSE using.
20347 Use %%error_verbose.
20348 (yyparse): Likewise.
20349 * src/output.c (prepare): Give its final value.
20350 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
20351 * src/getargs.h: Add its extern declaration.
20352 * src/getargs.c (error_verbose_flag): New int.
20353 (getargs): Update to catch new case.
20354 * src/options.c (option_table): 'error-verbose' is a new option.
20355 (shortopts): Update.
20356
20357 2001-11-27 Akim Demaille <akim@epita.fr>
20358
20359 * src/system.h: Use intl/libgettext.h.
20360 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
20361
20362 2001-11-27 Akim Demaille <akim@epita.fr>
20363
20364 * tests/torture.at (Exploding the Stack Size with Malloc):
20365 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
20366
20367 2001-11-27 Akim Demaille <akim@epita.fr>
20368
20369 * src/files.c: Include error.h.
20370 Reported by Hans Aberg.
20371
20372 2001-11-26 Marc Autret <autret_m@epita.fr>
20373
20374 * src/reader.c (parse_include_decl): New, not yet implemented.
20375 (read_declarations): Add case tok_include.
20376 * src/getargs.h (include): Add its extern definition.
20377 * src/getargs.c (include): New const char *.
20378 (getargs): Add case '-I'.
20379 * src/options.c (option_table): Add include as command line and
20380 percent option.
20381 * src/lex.h (token_t): Add tok_include.
20382
20383 2001-11-26 Akim Demaille <akim@epita.fr>
20384
20385 * src/reader.c (readgram): Make sure rules for mid-rule actions
20386 have a lineno equal to that of their host rule.
20387 Reported by Hans Aberg.
20388 * tests/regression.at (Rule Line Numbers): New.
20389
20390 2001-11-26 Akim Demaille <akim@epita.fr>
20391
20392 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
20393 size_ts.
20394
20395 2001-11-26 Akim Demaille <akim@epita.fr>
20396
20397 * src/complain.c, src/complain.h (error): Remove, provided by
20398 lib/error.[ch].
20399
20400 2001-11-26 Akim Demaille <akim@epita.fr>
20401
20402 * src/reader.c (read_declarations): Don't abort on tok_illegal,
20403 issue an error message.
20404 * tests/regression.at (Invalid %directive): New.
20405 Reported by Hans Aberg.
20406
20407 2001-11-26 Akim Demaille <akim@epita.fr>
20408
20409 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
20410 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
20411
20412 2001-11-26 Akim Demaille <akim@epita.fr>
20413
20414 * src/conflicts.c (conflicts_print): Don't complain at all when
20415 there are no reduce/reduce conflicts, and as many shift/reduce
20416 conflicts as expected.
20417 * tests/regression.at (%expect right): Adjust.
20418
20419 2001-11-23 Akim Demaille <akim@epita.fr>
20420
20421 * lib/alloca.c: Update, from fileutils.
20422
20423 2001-11-23 Akim Demaille <akim@epita.fr>
20424
20425 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
20426
20427 2001-11-23 Akim Demaille <akim@epita.fr>
20428
20429 * src/system.h: Include alloca.h.
20430 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
20431
20432 2001-11-23 Akim Demaille <akim@epita.fr>
20433
20434 * src/print_graph.c (print_actions): Remove `rule', unused.
20435 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
20436 pacify GCC's signed < unsigned warnings.
20437 * src/closure.c (itemsetsize): Likewise.
20438 * src/reader.c (symbol_list_new): Static.
20439
20440 2001-11-23 Akim Demaille <akim@epita.fr>
20441
20442 Attaching lineno to buckets is stupid, since only one copy of each
20443 symbol is kept, only the line of the first occurrence is kept too.
20444
20445 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
20446 * src/reader.c (rline_allocated): Remove, unused.
20447 (symbol_list): Have a `line' member.
20448 (symbol_list_new): New.
20449 (readgram): Use it.
20450 * src/print.c (print_grammar): Output the rule line numbers.
20451 * tests/regression.at (Solved SR Conflicts)
20452 (Unresolved SR Conflicts): Adjust.
20453 Reported by Hans Aberg.
20454
20455 2001-11-22 Marc Autret <autret_m@epita.fr>
20456
20457 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
20458
20459 2001-11-22 Marc Autret <autret_m@epita.fr>
20460
20461 * src/muscle_tab.c (muscle_init): Remove initialization of
20462 skeleton muscle.
20463 * src/output.c (output_master_parser): Do it here.
20464
20465 2001-11-20 Akim Demaille <akim@epita.fr>
20466
20467 * po/sv.po: New.
20468 * configure.in (ALL_LINGUAS): Adjust.
20469 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
20470 longer contains strings to translate.
20471
20472 2001-11-19 Akim Demaille <akim@epita.fr>
20473
20474 * src/conflicts.c (conflicts_print): Add a missing \n.
20475
20476 2001-11-19 Akim Demaille <akim@epita.fr>
20477
20478 * src/nullable.c (nullable_print): New.
20479 (set_nullable): Call it when tracing.
20480 Better locality of variables.
20481
20482 2001-11-19 Akim Demaille <akim@epita.fr>
20483
20484 * src/print.c (print_actions): Better locality of variables.
20485
20486 2001-11-19 Akim Demaille <akim@epita.fr>
20487
20488 * src/derives.c (print_derives): Fix and enrich.
20489 * src/closure.c (print_fderives): Likewise.
20490
20491 2001-11-19 Akim Demaille <akim@epita.fr>
20492
20493 * src/closure.c (itemsetend): Remove, replaced with...
20494 (itemsetsize): new.
20495
20496 2001-11-19 Akim Demaille <akim@epita.fr>
20497
20498 * src/LR0.c (kernel_end): Remove, replaced with...
20499 (kernel_size): new.
20500
20501 2001-11-19 Akim Demaille <akim@epita.fr>
20502
20503 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
20504 to clarify.
20505
20506 2001-11-19 Akim Demaille <akim@epita.fr>
20507
20508 * src/closure.c (closure): Use arrays instead of pointers to clarify.
20509
20510 2001-11-19 Akim Demaille <akim@epita.fr>
20511
20512 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
20513 trace messages.
20514 * src/LR0.c: Likewise.
20515 (allocate_itemsets): Use arrays instead of pointers to clarify.
20516
20517 2001-11-19 Akim Demaille <akim@epita.fr>
20518
20519 * src/getargs.c (statistics_flag): Replace with...
20520 (trace_flag): New.
20521 (longopts): Accept --trace instead of --statistics.
20522 * src/getargs.h, src/options.c: Adjust.
20523 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
20524 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
20525
20526 2001-11-19 Akim Demaille <akim@epita.fr>
20527
20528 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
20529 pointers to clarify the code.
20530 (save_reductions, save_shifts): Factor common parts of alternatives.
20531
20532 2001-11-19 Akim Demaille <akim@epita.fr>
20533
20534 * src/LR0.c (new_state, get_state): Complete TRACE code.
20535 * src/closure.c: Include `reader.h' to get `tags', needed by the
20536 trace code.
20537 Rename the conditional DEBUG as TRACE.
20538 Output consistently TRACEs to stderr, not stdout.
20539 * src/derives.c: Likewise.
20540 * src/reduce.c: (inaccessable_symbols): Using if is better style
20541 than goto.
20542 Use `#if TRACE' instead of `#if 0' for tracing code.
20543
20544 2001-11-19 Akim Demaille <akim@epita.fr>
20545
20546 * src/system.h (LIST_FREE, shortcpy): New.
20547 * src/LR0.c: Use them.
20548 * src/output.c (free_itemsets, free_reductions, free_shifts):
20549 Remove, replaced by LIST_FREE.
20550
20551 2001-11-19 Akim Demaille <akim@epita.fr>
20552
20553 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
20554 (REDUCTIONS_ALLOC): New.
20555 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
20556 allocation.
20557
20558 2001-11-19 Akim Demaille <akim@epita.fr>
20559
20560 * src/LR0.c (new_state): Complete trace code.
20561 * src/nullable.c (set_nullable): Don't translate traces.
20562
20563 2001-11-19 Akim Demaille <akim@epita.fr>
20564
20565 * src/print_graph.c (print_core): Better locality of variables.
20566 * src/print.c (print_core): Likewise.
20567
20568 2001-11-19 Akim Demaille <akim@epita.fr>
20569
20570 * src/vcg.c: You do the output, so you are responsible of the
20571 handling of VCG syntax, in particular: use quotearg.
20572 * src/print_graph.c: Don't.
20573 (print_actions): Don't output the actions as part of the nodes,
20574 since that's the job of the edges.
20575 (print_state): Don't output by hand: fill the node description,
20576 and ask for its output.
20577
20578 2001-11-19 Akim Demaille <akim@epita.fr>
20579
20580 * src/bison.simple (yyparse): When verbosely reporting an error,
20581 no longer put additional quotes around token names.
20582 * tests/calc.at: Adjust.
20583
20584 2001-11-19 Akim Demaille <akim@epita.fr>
20585
20586 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
20587 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
20588 * src/output.c: Adjust.
20589
20590 2001-11-19 Akim Demaille <akim@epita.fr>
20591
20592 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
20593 (rule_t): this.
20594 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
20595
20596 2001-11-19 Akim Demaille <akim@epita.fr>
20597
20598 * src/gram.h (rule_t): New.
20599 (rule_table): New.
20600 (rrhs, rlhs): Remove, part of state_t.
20601 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
20602 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
20603 * src/reader.c, src/reduce.c: Adjust.
20604
20605 2001-11-19 Akim Demaille <akim@epita.fr>
20606
20607 * src/reader.c (symbols_output): New, extracted from...
20608 (packsymbols): Here.
20609 (reader): Call it.
20610
20611 2001-11-19 Akim Demaille <akim@epita.fr>
20612
20613 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
20614 (maxrhs): this new function.
20615
20616 2001-11-19 Akim Demaille <akim@epita.fr>
20617
20618 * src/lalr.c (F): New macro to access the variable F.
20619 Adjust.
20620
20621 2001-11-19 Akim Demaille <akim@epita.fr>
20622
20623 * src/lalr.h (LA): New macro to access the variable LA.
20624 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20625 * src/lalr.c: Adjust.
20626
20627 2001-11-19 Akim Demaille <akim@epita.fr>
20628
20629 * src/lalr.c (initialize_LA): Only initialize LA. Let...
20630 (set_state_table): handle the `lookaheads' members.
20631
20632 2001-11-19 Akim Demaille <akim@epita.fr>
20633
20634 * src/lalr.h (lookaheads): Removed array, whose contents is now
20635 a member of...
20636 (state_t): this structure.
20637 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20638 Adjust.
20639
20640 2001-11-19 Akim Demaille <akim@epita.fr>
20641
20642 * src/lalr.h (consistent): Removed array, whose contents is now
20643 a member of...
20644 (state_t): this structure.
20645 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20646 Adjust.
20647
20648 2001-11-19 Akim Demaille <akim@epita.fr>
20649
20650 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
20651 contents are now members of...
20652 (state_t): this structure.
20653 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20654 Adjust.
20655
20656 2001-11-19 Akim Demaille <akim@epita.fr>
20657
20658 * src/lalr.h (state_t): New.
20659 (state_table): Be a state_t * instead of a core **.
20660 (accessing_symbol): Remove, part of state_t.
20661 * src/lalr.c: Adjust.
20662 (set_accessing_symbol): Merge into...
20663 (set_state_table): this.
20664 * src/print_graph.c, src/conflicts.c: Adjust.
20665
20666 2001-11-14 Akim Demaille <akim@epita.fr>
20667
20668 * tests/calc.at, tests/output.at, tests/regression.at,
20669 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
20670 now the tests are run in private dirs, therefore AC_CLEANUP and
20671 family can be simplified to 0-ary.
20672 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
20673 use abs. path to find config.h.
20674 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
20675 stderr, there can be way too much random noise.
20676 Instead pass -Werror to GCC and rely on the exit status.
20677 Reported by Wolfram Wagner.
20678
20679 2001-11-14 Akim Demaille <akim@epita.fr>
20680
20681 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
20682 defined only if yyoverflow is defined, to avoid `warning: unused
20683 variable `yyvs1''.
20684 Reported by The Test Suite.
20685
20686 2001-11-14 Akim Demaille <akim@epita.fr>
20687
20688 * src/print.c: Include reduce.h.
20689 Reported by Hans Aberg.
20690
20691 2001-11-14 Akim Demaille <akim@epita.fr>
20692
20693 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
20694 Revert a previous patch: these are really const.
20695 * src/conflicts.c (conflict_report): Additional useless pair of
20696 braces to pacify GCC's warnings for `if () if () {} else {}'.
20697 * src/lex.c (parse_percent_token): Replace equal_offset with
20698 arg_offset.
20699 arg is const.
20700 Be sure to strdup `arg' when used, since there is no reason for
20701 token_buffer not to change.
20702
20703 2001-11-14 Akim Demaille <akim@epita.fr>
20704
20705 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
20706 definition.
20707 * src/main.c (main): Use them.
20708 Suggested by Hans Aberg.
20709
20710 2001-11-12 Akim Demaille <akim@epita.fr>
20711
20712 * src/system.h (ngettext): Now that we use ngettext, be sure to
20713 provide a default definition when NLS are not used.
20714
20715 2001-11-12 Akim Demaille <akim@epita.fr>
20716
20717 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
20718 Use @kbd to denote user input.
20719 (Language and Grammar): ANSIfy the example.
20720 Adjust its layout for info/notinfo.
20721 (Location Tracking Calc): Output error messages to stderr.
20722 Output locations in a more GNUtically correct way.
20723 Fix a couple of Englishos.
20724 Adjust @group/@end group pairs.
20725
20726 2001-11-12 Akim Demaille <akim@epita.fr>
20727
20728 %expect was not functioning at all.
20729
20730 * src/conflicts.c (expected_conflicts): Set to -1.
20731 (conflict_report): Use ngettext.
20732 (conflicts_print): Check %expect and make its violation an error.
20733 * doc/bison.texinfo (Expect Decl): Adjust.
20734 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
20735 * tests/regression.at (%expect not enough, %expect right)
20736 (%expect too much): New.
20737
20738 2001-11-12 Akim Demaille <akim@epita.fr>
20739
20740 * tests/regression.at (Conflicts): Rename as...
20741 (Unresolved SR Conflicts): this.
20742 (Solved SR Conflicts): New.
20743
20744 2001-11-12 Akim Demaille <akim@epita.fr>
20745
20746 * src/reduce.c (print_results): Rename as...
20747 (reduce_output): This.
20748 Output to OUT, passed as argument, instead of output_obstack.
20749 (dump_grammar): Likewise.
20750 (reduce_free): New.
20751 Also free V1.
20752 (reduce_grammar): No longer call reduce_output, since...
20753 * src/print.c (print_results): do it.
20754 * src/main.c (main): Call reduce_free;
20755
20756 2001-11-12 Akim Demaille <akim@epita.fr>
20757
20758 * src/conflicts.c (print_reductions): Accept OUT as argument.
20759 Output to it, not to output_obstack.
20760 * src/print.c (print_actions): Adjust.
20761
20762 2001-11-12 Akim Demaille <akim@epita.fr>
20763
20764 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
20765 the result instead of using...
20766 (src_total, rrc_total, src_count, rrc_count): Remove.
20767 (any_conflicts): Remove.
20768 (print_conflicts): Split into...
20769 (conflicts_print, conflicts_output): New.
20770 * src/conflicts.h: Adjust.
20771 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
20772 * src/print.c (print_grammar): Issue `\n' between two rules.
20773 * tests/regression.at (Conflicts): New.
20774 Reported by Tom Lane.
20775
20776 2001-11-12 Akim Demaille <akim@epita.fr>
20777
20778 * tests/regression.at (Invalid input): Remove, duplicate with
20779 ``Invalid input: 1''.
20780
20781 2001-11-12 Akim Demaille <akim@epita.fr>
20782
20783 * tests/torture.at (AT_DATA_STACK_TORTURE)
20784 (Exploding the Stack Size with Alloca)
20785 (Exploding the Stack Size with Malloc): New.
20786
20787 2001-11-12 Akim Demaille <akim@epita.fr>
20788
20789 * src/bison.simple (YYSTACK_REALLOC): New.
20790 (yyparse) [!yyoverflow]: Use it and free the old stack.
20791 Reported by Per Allansson.
20792
20793 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
20794
20795 * src/bison.simple: Define type yystype instead of YYSTYPE, and
20796 define CPP macro, which substitute YYSTYPE by yystype.
20797 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
20798 with yyltype/YYLTYPE. This allows inclusion of the generated
20799 header within the parser if the compiler, such as GGC, accepts
20800 multiple equivalent #defines.
20801 From Akim.
20802
20803 2001-11-05 Akim Demaille <akim@epita.fr>
20804
20805 * src/reader.c (symbols_output): New, extracted from...
20806 (packsymbols): here.
20807 (reader): Adjust.
20808
20809 2001-11-05 Akim Demaille <akim@epita.fr>
20810
20811 * src/lex.c (parse_percent_token): s/quotearg/quote/.
20812
20813 2001-11-05 Akim Demaille <akim@epita.fr>
20814
20815 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
20816 pattern.
20817
20818 2001-11-05 Akim Demaille <akim@epita.fr>
20819
20820 * src/options.h (struct option_table_struct): set_flags is void*.
20821 * src/options.c (longopts): Support `--output' and `%output'.
20822 (usage): Adjust.
20823 * src/lex.h (tok_setopt): Remove, replaced with...
20824 (tok_intopt, tok_stropt): these new guys.
20825 * src/lex.c (getopt.h): Not needed.
20826 (token_buffer, unlexed_token_buffer): Not const.
20827 (percent_table): Promote `-' over `_' in directive names.
20828 Active `%name-prefix', `file-prefix', and `output'.
20829 (parse_percent_token): Accept possible arguments to directives.
20830 Promote `-' over `_' in directive names.
20831
20832 2001-11-04 Akim Demaille <akim@epita.fr>
20833
20834 * doc/bison.texinfo (Decl Summary): Split the list into
20835 `directives for grammars' and `directives for bison'.
20836 Sort'em.
20837 Add description of `%name-prefix', `file-prefix', and `output'.
20838 Promote `-' over `_' in directive names.
20839 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
20840 Simplify the description of `--name-prefix'.
20841 Promote `-' over `_' in directive names.
20842 Promote `--output' over `--output-file'.
20843 Fix the description of `--defines'.
20844 * tests/output.at: Exercise %file-prefix and %output.
20845
20846 2001-11-02 Akim Demaille <akim@epita.fr>
20847
20848 * doc/refcard.tex: Update.
20849
20850 2001-11-02 Akim Demaille <akim@epita.fr>
20851
20852 * src/symtab.h (SUNDEF): New.
20853 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
20854 stand for `uninitialized', instead of 0.
20855 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
20856 * src/lex.c (lex): Adjust.
20857
20858 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
20859 Number it 0.
20860 Let yylex return it instead of a plain 0.
20861 Reported by Dick Streefland.
20862
20863 2001-11-02 Akim Demaille <akim@epita.fr>
20864
20865 * tests/regression.at (Mixing %token styles): New test.
20866
20867 2001-11-02 Akim Demaille <akim@epita.fr>
20868
20869 * src/reader.c (parse_thong_decl): Formatting changes.
20870 (token_translations_init): New, extracted from...
20871 (packsymbols): Here.
20872 Adjust.
20873
20874 2001-11-01 Akim Demaille <akim@epita.fr>
20875
20876 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
20877 Check that `9foo.y' produces correct cpp guards.
20878 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
20879 guards.
20880 Reported by Wwp.
20881
20882 2001-11-01 Akim Demaille <akim@epita.fr>
20883
20884 * tests/regression.at (Invalid input: 2): New.
20885 * src/lex.c (unlexed_token_buffer): New.
20886 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
20887 too.
20888 Reported by Wwp.
20889
20890 2001-11-01 Akim Demaille <akim@epita.fr>
20891
20892 * tests/calc.at: Catch up with 1.30.
20893 * configure.in: Bump to 1.49a.
20894 Adjust to newer Autotest.
20895
20896 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
20897
20898 * src/conflicts.c: Move global variables rrc_total and src_total ...
20899 (print_conflicts): here.
20900 * src/output.c (output): Free global variable user_toknums.
20901 * src/lex.c (token_obstack): Become static.
20902
20903 2001-10-18 Akim Demaille <akim@epita.fr>
20904
20905 * tests/atlocal.in (GCC): Add.
20906 * tests/calc.at: s/m4_match/m4_bmatch/.
20907 s/m4_patsubst/m4_bpatsubst/.
20908 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
20909 * configure.in: AC_SUBST(GCC).
20910
20911 2001-10-14 Marc Autret <autret_m@epita.fr>
20912
20913 * src/options.c (create_long_option_table): Fix.
20914
20915 2001-10-10 Akim Demaille <akim@epita.fr>
20916
20917 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
20918
20919 2001-10-04 Akim Demaille <akim@epita.fr>
20920
20921 * src/reader.c (parse_union_decl): Push the caracters in
20922 union_obstack, not attrs_obstack.
20923
20924 2001-10-04 Akim Demaille <akim@epita.fr>
20925
20926 Merge in the branch 1.29.
20927
20928 * src/reader.c (packsymbols): Use a temporary obstack for
20929 `%%tokendef', since output_stack is already used elsewhere.
20930
20931 2001-10-02 Akim Demaille <akim@epita.fr>
20932
20933 Bump 1.29d.
20934
20935 2001-10-02 Akim Demaille <akim@epita.fr>
20936
20937 Version 1.29c.
20938
20939 2001-10-02 Akim Demaille <akim@epita.fr>
20940
20941 * tests/regression.at (Invalid CPP headers): New.
20942 From Alexander Belopolsky.
20943 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
20944
20945 2001-10-02 Akim Demaille <akim@epita.fr>
20946
20947 * tests/regression.at (Invalid input): New.
20948 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
20949 Reported by Shura.
20950
20951 2001-10-02 Akim Demaille <akim@epita.fr>
20952
20953 * tests/calc.at: Now that --debug works, the tests must be adjusted.
20954
20955 2001-10-02 Akim Demaille <akim@epita.fr>
20956
20957 * src/output.c (output_parser): Assert `skeleton'.
20958 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
20959 systems.
20960 From Shura.
20961
20962 2001-10-01 Marc Autret <autret_m@epita.fr>
20963
20964 * src/lex.h: Echo modifications.
20965 * src/lex.c (unlex): Parameter is now token_t.
20966 From Hans Aberg.
20967
20968 2001-10-01 Marc Autret <autret_m@epita.fr>
20969
20970 * src/main.c: Include lex.h.
20971 From Hans Aberg.
20972
20973 2001-09-29 Akim Demaille <akim@epita.fr>
20974
20975 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
20976
20977 2001-09-28 Akim Demaille <akim@epita.fr>
20978
20979 * tests/testsuite.at: Update to newer Autotest.
20980 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
20981
20982 2001-09-27 Akim Demaille <akim@epita.fr>
20983
20984 Position independent wrapper.
20985
20986 * tests/bison: Remove.
20987 * tests/bison.in: New.
20988 * configure.in: Adjust.
20989
20990 2001-09-27 Paul Eggert <eggert@twinsun.com>
20991
20992 Port quotearg fixes from tar 1.13.24.
20993
20994 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
20995 tm to be declared.
20996 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
20997 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
20998
20999 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
21000 * m4/mbrtowc.m4: New file.
21001 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
21002 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
21003
21004 2001-09-27 Akim Demaille <akim@epita.fr>
21005
21006 Bump to 1.29c.
21007
21008 2001-09-27 Akim Demaille <akim@epita.fr>
21009
21010 Version 1.29b.
21011
21012 2001-09-25 Akim Demaille <akim@epita.fr>
21013
21014 * src/system.h: Include `xalloc.h'.
21015 Remove it from the C files.
21016 * src/files.c (output_files): Free the obstacks.
21017 * src/lex.c (init_lex): Rename as...
21018 (lex_init): this.
21019 (lex_free): New.
21020 * src/main.c (main): Use it.
21021
21022 2001-09-24 Marc Autret <autret_m@epita.fr>
21023
21024 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
21025 to output informations in fout (FILE*).
21026 (open_graph, close_graph): Likewise.
21027 (output_graph, output_edge, output_node): Likewise.
21028 * src/vcg.h: Update function prototypes.
21029 * src/print_graph.c (print_graph): Open output graph file.
21030 (print_actions): Adjust.
21031 * src/files.h: Remove extern declaration.
21032 * src/files.c: Remove graph_obstack declaration.
21033 (open_files): Remove graph_obstack initialization.
21034 (output_files): Remove graph_obstack saving.
21035
21036 2001-09-24 Marc Autret <autret_m@epita.fr>
21037
21038 * src/files.c (compute_output_file_names): Fix.
21039
21040 2001-09-24 Marc Autret <autret_m@epita.fr>,
21041 Akim Demaille <akim@epita.fr>
21042
21043 * src/reader.c (reader): Remove call to free_symtab ().
21044 * src/main.c (main): Call it here.
21045 Include symtab.h.
21046 * src/conflicts.c (initialize_conflicts): Rename as...
21047 (solve_conflicts): this.
21048 * src/print.c (print_core, print_actions, print_state)
21049 (print_grammar): Dump to a file instead a `output_obstack'.
21050 (print_results): Dump `output_obstack', and then proceed with the
21051 FILE *.
21052 * src/files.c (compute_output_file_names, close_files): New.
21053 (output_files): Adjust.
21054 * src/main.c (main): Adjust.
21055
21056 2001-09-23 Marc Autret <autret_m@epita.fr>
21057
21058 * src/files.c (compute_header_macro): Computes header macro name
21059 from spec_defines_file when given.
21060
21061 2001-09-23 Marc Autret <autret_m@epita.fr>
21062
21063 * src/files.c (output_files): Add default extensions.
21064
21065 2001-09-22 Akim Demaille <akim@epita.fr>
21066
21067 * src/conflicts.c (finalize_conflicts): Rename as...
21068 (free_conflicts): this.
21069
21070 2001-09-22 Akim Demaille <akim@epita.fr>
21071
21072 * src/gram.c (gram_free): Rename back as...
21073 (dummy): this.
21074 (output_token_translations): Free `token_translations'.
21075 * src/symtab.c (free_symtab): Free the tag field.
21076
21077 2001-09-22 Akim Demaille <akim@epita.fr>
21078
21079 Remove `translations' as it is always set to true.
21080
21081 * src/gram.h: Adjust.
21082 * src/reader.c (packsymbols, parse_token_decl): Adjust
21083 * src/print.c (print_grammar): Adjust.
21084 * src/output.c (output_token_translations): Adjust.
21085 * src/lex.c (lex): Adjust.
21086 * src/gram.c: Be sure the set pointers to NULL.
21087 (dummy): Rename as...
21088 (gram_free): this.
21089
21090 2001-09-22 Akim Demaille <akim@epita.fr>
21091
21092 * configure.in: Invoke AM_LIB_DMALLOC.
21093 * src/system.h: Use dmalloc.
21094 * src/LR0.c: Be sure to have pointers initialized to NULL.
21095 (allocate_itemsets): Allocate kernel_items only if needed.
21096
21097 2001-09-22 Akim Demaille <akim@epita.fr>
21098
21099 * configure.in: Bump to 1.29b.
21100 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
21101 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
21102 need xmalloc.c in calc.y.
21103 From Pascal Bart.
21104
21105 2001-09-21 Akim Demaille <akim@epita.fr>
21106
21107 Version 1.29a.
21108 * Makefile.maint, config/config.guess, config/config.sub,
21109 * config/missing: Update from masters.
21110 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
21111 upon package.m4.
21112 * configure.in (ALL_LINGUAS): Add `tr'.
21113
21114 2001-09-21 Akim Demaille <akim@epita.fr>
21115
21116 * tests/Makefile.am (package.m4): Move to...
21117 ($(srcdir)/$(TESTSUITE)): here.
21118
21119 2001-09-20 Akim Demaille <akim@epita.fr>
21120
21121 * src/complain.c: No longer try to be standalone: use system.h.
21122 Don't assume __STDC__ is defined to 1. Just test if it is defined.
21123 * src/complain.h: Likewise.
21124 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
21125 Remove the unused variable `n'.
21126 From Albert Chin-A-Young.
21127
21128 2001-09-18 Marc Autret <autret_m@epita.fr>
21129
21130 * doc/bison.1: Update.
21131 * doc/bison.texinfo (Bison Options): Update --defines and --graph
21132 descriptions.
21133 (Option Cross Key): Update.
21134 Add --graph.
21135
21136 2001-09-18 Marc Autret <autret_m@epita.fr>
21137
21138 * tests/regression.at: New test (comment in %union).
21139
21140 2001-09-18 Marc Autret <autret_m@epita.fr>
21141
21142 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
21143 do that.
21144 Reported by Keith Browne.
21145
21146 2001-09-18 Marc Autret <autret_m@epita.fr>
21147
21148 * tests/output.at: Add tests for --defines and --graph.
21149
21150 2001-09-18 Marc Autret <autret_m@epita.fr>
21151
21152 * tests/output.at: Removes tests of %{header,src}_extension features.
21153
21154 2001-09-18 Akim Demaille <akim@epita.fr>
21155
21156 * tests/Makefile.am (package.m4): New.
21157 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
21158 (_AT_CHECK_CALC_ERROR): Likewise.
21159 Factor the `, ' part of verbose error messages.
21160
21161 2001-09-18 Marc Autret <autret_m@epita.fr>
21162
21163 * src/getargs.c (longopts): Declare --defines and --graph as options
21164 with optional arguments.
21165 * src/files.h: Add extern declarations.
21166 * src/files.c (spec_graph_file, spec_defines_file): New.
21167 (output_files): Update.
21168 Remove CPP-outed code.
21169
21170 2001-09-18 Marc Autret <autret_m@epita.fr>
21171
21172 Turn off %{source,header}_extension feature.
21173
21174 * src/files.c (compute_exts_from_gf): Update.
21175 (compute_exts_from_src): Update.
21176 (output_files): CPP-out useless code.
21177 * src/files.h: Remove {header,source}_extension extern declarations.
21178 * src/reader.c (parse_dquoted_param): CPP-out.
21179 (parse_header_extension_decl): Remove.
21180 (parse_source_extension_decl): Remove.
21181 (read_declarations): Remove cases tok_{hdrext,srcext}.
21182 * src/lex.c (percent_table): Remove {header,source}_extension entries.
21183 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
21184
21185 2001-09-10 Akim Demaille <akim@epita.fr>
21186
21187 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
21188 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
21189 (AT_CHECK_OUTPUT): this.
21190 Merely check ls' exit status, its output is useless.
21191
21192 2001-09-10 Akim Demaille <akim@epita.fr>
21193
21194 * tests/calc.at: Use m4_match.
21195 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
21196
21197 2001-09-10 Marc Autret <autret_m@epita.fr>,
21198 Akim Demaille <akim@epita.fr>
21199
21200 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
21201 enum color_e.
21202 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
21203 to `normal'.
21204 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
21205 * src/lex.h: Adjust prototype.
21206 (token_t): Add `tok_undef'.
21207 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
21208 (parse_percent_token): Now returns token_t.
21209 Add default statement in switch.
21210 (lex): Separate `c' as an input variable, from the token_t result
21211 part.
21212 (unlexed): Is a token_t.
21213
21214 2001-09-10 Akim Demaille <akim@epita.fr>
21215
21216 * configure.in: Bump to 1.29a.
21217
21218 2001-09-07 Akim Demaille <akim@epita.fr>
21219
21220 Version 1.29.
21221
21222 2001-08-30 Akim Demaille <akim@epita.fr>
21223
21224 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
21225 * m4/atconfig.m4: Remove.
21226 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
21227 * tests/bison: New.
21228 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
21229 m4_if, m4_patsubst, and m4_regexp.
21230 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
21231 `input' file instead of echo.
21232
21233 2001-08-29 Akim Demaille <akim@epita.fr>
21234
21235 Bump to 1.28e.
21236
21237 2001-08-29 Akim Demaille <akim@epita.fr>
21238
21239 Version 1.28d.
21240
21241 2001-08-29 Paul Eggert <eggert@twinsun.com>
21242
21243 * src/bison.simple (yyparse): Don't take the address of an
21244 item before the start of an array, as that doesn't conform to
21245 the C Standard.
21246
21247 2001-08-29 Robert Anisko <anisko_r@epita.fr>
21248
21249 * doc/bison.texinfo (Location Tracking Calc): New node.
21250
21251 2001-08-29 Paul Eggert <eggert@twinsun.com>
21252
21253 * src/output.c (output): Do not define const, as this now
21254 causes more problems than it cures.
21255
21256 2001-08-29 Akim Demaille <akim@epita.fr>
21257
21258 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
21259 the nodes.
21260 Be sure to tag the `detailmenu'.
21261
21262 2001-08-29 Akim Demaille <akim@epita.fr>
21263
21264 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
21265 download in a tmp dir.
21266
21267 2001-08-28 Marc Autret <autret_m@epita.fr>
21268
21269 * config/depcomp: New file.
21270
21271 2001-08-28 Marc Autret <autret_m@epita.fr>
21272
21273 * doc/bison.1 (mandoc): Adjust.
21274 From Juan Manuel Guerrero.
21275
21276 2001-08-28 Marc Autret <autret_m@epita.fr>
21277
21278 * src/print_graph.c (print_state): Fix.
21279
21280 2001-08-27 Marc Autret <autret_m@epita.fr>
21281
21282 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
21283 char * members.
21284 Echo modifications to the functions prototypes.
21285 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
21286
21287 2001-08-27 Marc Autret <autret_m@epita.fr>
21288
21289 * src/vcg.c: Include `xalloc.h'.
21290 (add_colorentry): New.
21291 (add_classname): New.
21292 (add_infoname): New.
21293 * src/vcg.h: Add new prototypes.
21294
21295 2001-08-27 Akim Demaille <akim@epita.fr>
21296
21297 * Makefile.maint: Sync. again with CVS Autoconf.
21298
21299 2001-08-27 Akim Demaille <akim@epita.fr>
21300
21301 * Makefile.maint: Formatting changes.
21302 (po-update, cvs-update, update): New targets.
21303 (AMTAR): Remove.
21304
21305 2001-08-27 Akim Demaille <akim@epita.fr>
21306
21307 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21308 * Makefile.maint: Sync. with CVS Autoconf.
21309
21310 2001-08-27 Marc Autret <autret_m@epita.fr>
21311
21312 * src/vcg.h (struct infoname_s): New.
21313 (struct colorentry_s): New.
21314 (graph_s): New fields {vertical,horizontal}_order in structure.
21315 Add `infoname' field.
21316 Add `colorentry' field;
21317 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
21318 (G_HORIZONTAL_ORDER): New.
21319 (G_INFONAME): New.
21320 (G_COLORENTRY): New.
21321 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
21322 Add output of `infoname'.
21323 Add output of `colorentry'.
21324
21325 2001-08-27 Marc Autret <autret_m@epita.fr>
21326
21327 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
21328 This one shadowed a global parameter.
21329
21330 2001-08-24 Marc Autret <autret_m@epita.fr>
21331
21332 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
21333 instead of `unsigned'.
21334 (print_state): Do not call obstack_object_size () in obstack_grow ()
21335 to avoid macro variables shadowing.
21336
21337 2001-08-23 Marc Autret <autret_m@epita.fr>
21338
21339 * src/lex.c (percent_table): Typo: s/naem/name/.
21340 Add graph option.
21341 Normalize new options declarations.
21342
21343 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
21344
21345 * tests/suite.at: Exercise %header_extension and %source_extension.
21346
21347 2001-08-16 Marc Autret <autret_m@epita.fr>
21348
21349 * src/reader.c (parse_dquoted_param): New.
21350 (parse_header_extension_decl): Use it.
21351 (parse_source_extension_decl): Likewise.
21352
21353 2001-08-16 Marc Autret <autret_m@epita.fr>
21354
21355 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
21356 (get_xxxx_str): Use assert () instead of complain ().
21357 Remove return invokations in default cases.
21358 (get_decision_str): Modify default behaviour. Remove second argument.
21359 Echo modifications on calls.
21360 (output_graph): Fix.
21361
21362 2001-08-16 Marc Autret <autret_m@epita.fr>
21363
21364 * src/getargs.c (usage): Update with ``-g, --graph''.
21365
21366 2001-08-16 Marc Autret <autret_m@epita.fr>
21367
21368 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
21369 (Option Cross Key): Likewise.
21370 * doc/bison.1: Update.
21371
21372 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
21373
21374 * src/output.c (output_master_parser): Don't finish action_obstack.
21375 (output_parser): Don't care about the muscle action, here.
21376 (prepare): Copy the action_obstack in the action muscle.
21377 (output): Free action_obstack.
21378
21379 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
21380
21381 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
21382 will contain `%union' declaration.
21383 (parse_union_decl): Delete #line directive output.
21384 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
21385 informations about %union.
21386 (parse_union_decl): Copy the union_obstack in the muscle stype.
21387 * src/bison.simple: Add new #line directive.
21388 Add typdef %%stype YYSTYPE.
21389
21390 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
21391
21392 * src/bison.simple: Add new `#line' directive.
21393
21394 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
21395
21396 * src/bison.simple: New `#line' directive.
21397 * src/output.c (output_parser): Support new dynamic muscle input_line.
21398
21399 2001-09-22 Marc Autret <autret_m@epita.fr>
21400
21401 * src/output.c (output_master_parser): New.
21402 (output_parser): Be more re-entrant.
21403
21404 2001-09-21 Marc Autret <autret_m@epita.fr>
21405
21406 * src/reader.c (copy_definition, parse_union_decl): Update and use
21407 `linef' muscle.
21408 (copy_action): Likewise.
21409 Use obstack_1grow ().
21410 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
21411
21412 2001-09-21 Marc Autret <autret_m@epita.fr>
21413
21414 * src/options.c (option_table): Adjust.
21415 * src/lex.c (parse_percent_token): Fix.
21416
21417 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
21418
21419 * src/options.c (symtab.h): Include it, need by lex.h.
21420
21421 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
21422
21423 * src/lex.c (parse_percent_token): Change type of variable `tx', which
21424 is now an option_table_struct*.
21425 (option_strcmp): New function option_strcmp.
21426 (parse_percent_token): Call option_strcmp.
21427 * src/getargs.c (xalloc.h, options.h): Include it.
21428 (getargs): Call create_long_option_table.
21429 (getargs): Free longopts at the end of the function.
21430 (shortopts): Move in options.c.
21431 * src/options.c (create_long_option_table): New function. Convert
21432 information from option_table to option structure.
21433 * src/reader.c (options.h): Include it.
21434
21435 * src/Makefile.am: Adjust.
21436 * src/options.c (option_table): Create from longopts and percent_table.
21437 * src/getargs.c (longopts): Delete.
21438 * src/lex.c (struct percent_table_struct): Delete.
21439 (percent_table): Delete.
21440 (options.h): Include it.
21441 * src/options.c: Create.
21442 * src/options.h: Create.
21443 Declare enum opt_access_e.
21444 Define struct option_table_struct.
21445
21446 2001-09-20 Marc Autret <autret_m@epita.fr>
21447
21448 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
21449 sections of Bison.
21450
21451 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
21452
21453 * src/bison.simple: s/%%filename/%%skeleton.
21454 * src/muscle_tab.c (getargs.h): Include it.
21455 (muscle_init): Insert new muscle skeleton.
21456
21457 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
21458
21459 * src/output.c (output_parser): Delete unused variable actions_dumped.
21460
21461 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
21462
21463 * src/output.c (output): Delete call to reader_output_yylsp.
21464 * src/reader.c (reader): Likewise.
21465 * src/reader.h: Delete declaration of reader_output_yylsp.
21466
21467 2001-09-02 Marc Autret <autret_m@epita.fr>
21468
21469 * src/reader.c: Include muscle_tab.h.
21470 (parse_union_decl): Update.
21471 (parse_macro_decl): Rename parse_muscle_decl.
21472 Update to use renamed functions and variable.
21473 (read_declarations, copy_action, read_additionnal_code, : Updated
21474 with correct variables and functions names.
21475 (packsymbols, reader): Likewise.
21476
21477 * src/reader.h (muscle_obstack): Extern declaration update.
21478
21479 * src/output.c: Include muscle_tab.h
21480 In all functions using macro_insert, change by using muscle_insert ().
21481 (macro_obstack): Rename muscle_obstack.
21482 Echo modifications in the whole file.
21483 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
21484 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
21485 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
21486
21487 * src/muscle_tab.h: Update double inclusion macros.
21488 (macro_entry_s): Rename muscle_entry_s.
21489 Update prototypes.
21490
21491 * src/muscle_tab.c: Include muscle_tab.h.
21492 Rename macro_tabble to muscle_table.
21493 (mhash1, mhash2, mcmp): Use muscle_entry.
21494 (macro_init): Rename muscle_init. Update.
21495 (macro_insert): Rename muscle_insert. Update.
21496 (macro_find): Rename muscle_find. Update.
21497
21498 * src/main.c: Include muscle_tab.h.
21499 (main): Call muscle_init ().
21500 * src/Makefile.am (bison_SOURCES): Echo modifications.
21501
21502 2001-09-02 Marc Autret <autret_m@epita.fr>
21503
21504 Now the files macro_tab.[ch] are named muscle_tab.[ch].
21505
21506 * src/muscle_tab.c, src/muscle_tab.h: Add files.
21507
21508 2001-09-02 Marc Autret <autret_m@epita.fr>
21509
21510 * src/macrotab.c, src/macrotab.h: Remove.
21511
21512 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
21513
21514 * src/reader.c (copy_guard): Use muscle to specify the `#line'
21515 filename.
21516
21517 2001-09-01 Marc Autret <autret_m@epita.fr>
21518
21519 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
21520 to an explicit value to activate the feature. We do it here.
21521
21522 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21523
21524 * src/output.c (prepare): Delete the `filename' muscule insertion.
21525 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
21526 (parse_union_decl): Likewise.
21527 * src/macrotab.c (macro_init): Initialize filename by infile.
21528
21529 2001-08-31 Marc Autret <autret_m@epita.fr>
21530
21531 * src/bison.simple (YYLSP_NEEDED): New definition.
21532 * src/output.c (prepare): Add macro insertion of `locations_flag'
21533
21534 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21535
21536 * src/output.c (prepare): Delete insertion of previous muscles,
21537 and insert the `prefix' muscles.
21538 * src/macrotab.c (macro_init): Likewise.
21539 (macro_init): Initialization prefix directive by `yy'.
21540 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
21541 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
21542 yylval, yydebug, yyerror, yynerrs and yyparse.
21543 New directive `#define' to substitute yydebug, ... with option
21544 name_prefix.
21545
21546 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21547
21548 * src/main.c (main): Standardize.
21549 * src/output.c (output_table_data, output_parser): Likewise.
21550 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
21551
21552 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
21553
21554 * src/reader.c (read_additionnal_code): Rename %%user_code to
21555 %%epilogue.
21556 * src/output.c (output): Rename %%declarations to %%prologue.
21557 * src/bison.simple: Echo modifications.
21558
21559 2001-08-31 Marc Autret <autret_m@epita.fr>
21560
21561 * src/reader.c (readgram): CleanUp.
21562 (output_token_defines): Likewise.
21563 (packsymbols): Likewise.
21564 (reader): Likewise.
21565 * src/output.c (output): CPP-out useless code.
21566
21567 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21568
21569 * src/reader.c (reader): Delete obsolete call to function
21570 output_trailers and output_headers.
21571 * src/output.h: Remove obsolete functions prototypes of output_headers
21572 and output_trailers.
21573
21574 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
21575
21576 * src/main.c: Include macrotab.h.
21577 * src/macrotab.h (macro_entry_s): Constify fields.
21578 Adjust functions prototypes.
21579 * src/macrotab.c (macro_insert): Constify key and value.
21580 (macro_find): Constify key.
21581 (macro_insert): Include 'xalloc.h'
21582 (macro_insert): Use XMALLOC.
21583 (macro_find): Constify return value.
21584 * src/output.c (output_table_data): Rename table to table_data.
21585 (output_parser): Constify macro_key, macro_value.
21586
21587 2001-08-30 Marc Autret <autret_m@epita.fr>
21588
21589 * src/reader.c (parse_skel_decl): New.
21590 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
21591 * src/lex.h (token_t): New token `tok_skel'.
21592 * src/lex.c (percent_table): Add skeleton option entry.
21593 Standardize.
21594
21595 2001-08-29 Marc Autret <autret_m@epita.fr>
21596
21597 * src/bison.simple: Add %%user_code directive at the end.
21598 * src/reader.c (read_additionnal_code): New.
21599 (reader): Use it.
21600 * src/output.c (output_program): Remove.
21601 (output): Update.
21602
21603 2001-08-28 Marc Autret <autret_m@epita.fr>
21604
21605 * src/output.c (output_actions): Clean up.
21606 (output_gram): CPP-out useless code.
21607 * src/reader.c (reader): Clean up, CPP-out useless code.
21608
21609 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
21610
21611 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
21612 directive.
21613 * src/bison.simple: Add `%%definitions'.
21614
21615 2001-08-28 Marc Autret <autret_m@epita.fr>
21616
21617 * config/depcomp: New file.
21618
21619 2001-08-27 Paul Eggert <eggert@twinsun.com>
21620
21621 * src/bison.simple (yyparse): Don't take the address of an
21622 item before the start of an array, as that doesn't conform to
21623 the C Standard.
21624
21625 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
21626
21627 * src/output.c (output): Remove the initialization of the macro
21628 obstack. It was done too late here.
21629
21630 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
21631 completely wrong.
21632 (reader): Initialize the macro obstack here, since we need it to grow
21633 '%define' directives.
21634
21635 * src/reader.h: Declare the macro obstack as extern.
21636
21637 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
21638
21639 * src/output.c (output_parser): Fix. Store single '%' characters in
21640 the output obstack instead of throwing them away.
21641
21642 2001-08-27 Akim Demaille <akim@epita.fr>
21643
21644 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21645
21646 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21647
21648 * lib/Makefile.am: Adjust.
21649
21650 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21651
21652 * src/bison.simple: Update and add '%%' directives.
21653
21654 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21655
21656 * src/reader.c (reader): Remove calls to 'output_headers' and
21657 'output_trailers'. Remove some C output.
21658 (readgram): Disable a piece of code that was writing a default
21659 definition for 'YYSTYPE'.
21660 (reader_output_yylsp): Remove.
21661 (packsymbols): Output token defintions to a macro.
21662 (copy_definition): Disable C output.
21663
21664 * src/reader.c (parse_macro_decl): New function used to parse macro
21665 declarations.
21666 (copy_string2): Put the body of copy_string into this new function.
21667 Add a parameter to let the caller choose whether he wants to copy the
21668 string delimiters or not.
21669 (copy_string): Be a simple call to copy_string2 with the last argument
21670 bound to true.
21671 (read_declarations): Add case for macro definition.
21672 (copy_identifier): New.
21673 (parse_macro_decl): Read macro identifiers using copy_identifier
21674 rather than lex.
21675
21676 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21677
21678 * src/output.c (prepare): Add prefixed names.
21679 (output_parser): Output semantic actions.
21680 (output_parser): Fix bug on '%%line' directives.
21681
21682 * src/output.c (output_headers): Remove. The C code printed by this
21683 function should now be in the skeletons.
21684 (output_trailers): Remove.
21685 (output): Disable call to 'reader_output_yylsp'.
21686 (output_rule_data): Do not output tables to the table obstack.
21687
21688 * src/output.c: Remove some C dedicated output.
21689 Improve the use of macro and output obstacks.
21690 (output_defines): Remove.
21691
21692 * src/output.c (output_token_translations): Associate 'translate'
21693 table with a macro. No output to the table obstack.
21694 (output_gram): Same for 'rhs' and 'prhs'.
21695 (output_stos): Same for 'stos'.
21696 (output_rule_data): Same for 'r1' and 'r2'.
21697 (token_actions): Same for 'defact'.
21698 (goto_actions): Same for 'defgoto'.
21699 (output_base): Same for 'pact' and 'pgoto'.
21700 (output_table): Same for 'table'.
21701 (output_check): Same for 'check'.
21702
21703 * src/output.c (output_table_data): New function.
21704 (output_short_table): Remove.
21705 (output_short_or_char_table): Remove.
21706
21707 * src/output.c (output_parser): Replace most of the skeleton copy code
21708 with something new. Skeletons are now processed character by character
21709 rather than line by line, and Bison looks for '%%' macros. This is the
21710 first step in making Bison's output process (a lot) more flexible.
21711 (output_parser): Use the macro table.
21712
21713 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21714
21715 * src/main.c (main): Initialize the macro table.
21716
21717 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21718
21719 * src/lex.c (percent_table): Add tok_define.
21720 * src/lex.h: Add tok_define.
21721
21722 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21723
21724 * src/macrotab.c: New file.
21725 * src/macrotab.h: New file.
21726 * src/Makefile.am: Update.
21727
21728 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21729
21730 * lib/hash.c: New file.
21731 * lib/hash.h: New file.
21732 * lib/Makefile.am: Update.
21733
21734 2001-08-15 Akim Demaille <akim@epita.fr>
21735
21736 Version 1.28c.
21737
21738 2001-08-15 Marc Autret <autret_m@epita.fr>
21739
21740 * src/reader.c (readgram): Indent output macro YYSTYPE.
21741 (packsymbols): Likewise.
21742 (output_token_defines): Likewise.
21743 * src/files.c: Standardize.
21744 (compute_header_macro): New.
21745 (defines_obstack_save): New. Use compute_header_macro.
21746 (output_files): Update. Use defines_obstack_save.
21747
21748 2001-08-15 Akim Demaille <akim@epita.fr>
21749
21750 * doc/bison.texinfo (Table of Symbols): Document
21751 YYSTACK_USE_ALLOCA.
21752
21753 2001-08-15 Akim Demaille <akim@epita.fr>
21754
21755 * missing: Update from CVS Automake.
21756 * config/config.guess, config/config.sub, config/texinfo.tex:
21757 Update from gnu.org.
21758
21759 2001-08-15 Akim Demaille <akim@epita.fr>
21760
21761 * Makefile.maint: Sync with CVS Autoconf.
21762
21763 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
21764
21765 * doc/bison.texinfo: Include GNU Free Documentation License from
21766 `fdl.texi'.
21767 * doc/fdl.texi: Add to package.
21768
21769 2001-08-14 Marc Autret <autret_m@epita.fr>
21770
21771 Turn on %{source,header}_extension features.
21772
21773 * src/lex.c (percent_table): Un-CPP out header_extension and
21774 source_extension.
21775 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
21776 (compute_exts_from_src): Remove conditions. It restores priorities
21777 between options.
21778
21779 2001-08-14 Marc Autret <autret_m@epita.fr>
21780
21781 * src/files.c (compute_base_names): Add extensions computing when
21782 `--file-prefix' used.
21783 Standardize function calls.
21784
21785 2001-08-13 Marc Autret <autret_m@epita.fr>
21786
21787 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
21788 defining it (defined but null disables alloca).
21789
21790 2001-08-13 Marc Autret <autret_m@epita.fr>
21791
21792 * src/bison.simple (_yy_memcpy): CPP reformat.
21793
21794 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
21795
21796 * tests/atconfig.in (CPPFLAGS): Fix.
21797
21798 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
21799
21800 * doc/bison.texinfo: Include GNU General Public License from
21801 `gpl.texi'.
21802 * doc/gpl.texi: Add to package.
21803
21804 2001-08-10 Marc Autret <autret_m@epita.fr>
21805
21806 * src/print_graph.h: Fix.
21807 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
21808
21809 2001-08-10 Akim Demaille <akim@epita.fr>
21810
21811 * src/system.h: Provide default declarations for stpcpy, strndup,
21812 and strnlen.
21813
21814 2001-08-10 Robert Anisko <anisko_r@epita.fr>
21815
21816 * doc/bison.texinfo (Locations): Update @$ stuff.
21817
21818 2001-08-09 Robert Anisko <anisko_r@epita.fr>
21819
21820 * src/bison.simple (YYLLOC_DEFAULT): Update.
21821 (yyparse): Adjust.
21822
21823 2001-08-08 Marc Autret <autret_m@epita.fr>
21824
21825 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
21826 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
21827 Reported by Fabrice Bauzac.
21828
21829 2001-08-08 Marc Autret <autret_m@epita.fr>
21830
21831 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
21832 * src/vcg.c (output_node): Fix.
21833 * src/vcg.h: Cleanup.
21834 * src/print_graph.c: Add comments.
21835 (node_output_size): New global variable. Simplify the formatting of
21836 the VCG graph output.
21837 (print_actions): Unused code is now used. It notifies the final state
21838 and no action states in the VCG graph. It also give the reduce actions.
21839 The `shift and goto' edges are red and the `go to state' edges are
21840 blue.
21841 Get the current node name and node_obstack by argument.
21842 (node_obstack): New variable.
21843 (print_state): Manage node_obstack.
21844 (print_core): Use node_obstack given by argument.
21845 A node is not only computed here but in print_actions also.
21846 (print_graph): CPP out useless code instead of commenting it.
21847
21848 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
21849
21850 * tests/atconfig.in (CPPFLAGS): Fix.
21851
21852 2001-08-07 Akim Demaille <akim@epita.fr>
21853
21854 * src/print_graph.c (quote): New.
21855 (print_core): Use it.
21856
21857 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
21858
21859 * src/vcg.c (complain.h): Include it.
21860 Unepitaize `return' invocations.
21861 [NDEBUG] (main): Remove.
21862 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
21863 * src/files.c (open_files): Initialize graph_obstack.
21864 * src/print_graph.c (print_actions): CPP out useless code.
21865 (print_core): Don't output the last `\n' in labels.
21866 Use `quote'.
21867 * src/files.c (output_files): Output the VCG file.
21868 * src/main.c (main): Invoke print_graph ();
21869
21870 2001-08-06 Marc Autret <autret_m@epita.fr>
21871
21872 Automaton VCG graph output.
21873 Using option ``-g'' or long option ``--graph'', you can generate
21874 a gram_filename.vcg file containing a VCG description of the LALR (1)
21875 automaton of your grammar.
21876
21877 * src/main.c: Call to print_graph() function.
21878 * src/getargs.h: Update.
21879 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
21880 (graph_flag): New flag.
21881 (longopts): Update.
21882 (getargs): Add case `g'.
21883 * src/files.c (graph_obstack): New obstack struct.
21884 (open_files): Initialize new obstack.
21885 (output_files): Saves graph_obstack if required.
21886 * src/files.h (graph_obstack): New extern declaration.
21887 * src/Makefile.am: Add new source files.
21888
21889 2001-08-06 Marc Autret <autret_m@epita.fr>
21890
21891 * src/print_graph.c, src/print_graph.h (graph): New.
21892 * src/vcg.h: New file.
21893 * src/vcg.c: New file, VCG graph handling.
21894
21895 2001-08-06 Marc Autret <autret_m@epita.fr>
21896
21897 Add of %source_extension and %header_extension which specify
21898 the source or/and the header output file extension.
21899
21900 * src/files.c (compute_base_names): Remove initialisation of
21901 src_extension and header_extension.
21902 (compute_exts_from_gf): Update.
21903 (compute_exts_from_src): Update.
21904 (output_files): Update.
21905 * src/reader.c (parse_header_extension_decl): New.
21906 (parse_source_extension_decl): New.
21907 (read_declarations): New case statements for the new tokens.
21908 * src/lex.c (percent_table): Add entries for %source_extension
21909 and %header_extension.
21910 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
21911
21912 2001-08-06 Marc Autret <autret_m@epita.fr>
21913
21914 * configure.in: Bump to 1.28c.
21915 * doc/bison.texinfo: Texinfo thingies.
21916
21917 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
21918
21919 * tests/atconfig.in (CPPFLAGS): Add.
21920 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
21921
21922 2001-08-03 Akim Demaille <akim@epita.fr>
21923
21924 Version 1.28b.
21925
21926 2001-08-03 Akim Demaille <akim@epita.fr>
21927
21928 * tests/Makefile.am (check-local): Ship testsuite.
21929 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
21930 Include `string.h'.
21931
21932 2001-08-03 Akim Demaille <akim@epita.fr>
21933
21934 * configure.in: Try using -Wformat when compiling.
21935
21936 2001-08-03 Akim Demaille <akim@epita.fr>
21937
21938 * configure.in: Bump to 1.28b.
21939
21940 2001-08-03 Akim Demaille <akim@epita.fr>
21941
21942 * src/complain.c: Adjust strerror_r portability issues.
21943
21944 2001-08-03 Akim Demaille <akim@epita.fr>
21945
21946 Version 1.28a.
21947
21948 2001-08-03 Akim Demaille <akim@epita.fr>
21949
21950 * src/getargs.c, src/getarg.h (skeleton)): Constify.
21951 * src/lex.c (literalchar): Avoid name clashes on `buf'.
21952 * src/getargs.c: Include complain.h.
21953 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
21954 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
21955
21956 2001-08-03 Akim Demaille <akim@epita.fr>
21957
21958 * src/reader.c (readgram): Display hidden chars in error messages.
21959
21960 2001-08-03 Akim Demaille <akim@epita.fr>
21961
21962 Update to gettext 0.10.39.
21963
21964 2001-08-03 Akim Demaille <akim@epita.fr>
21965
21966 * lib/strspn.c: New.
21967
21968 2001-08-01 Marc Autret <autret_m@epita.fr>
21969
21970 * doc/bison.texinfo: Update.
21971 * doc/bison.1 (mandoc): Update.
21972 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
21973 * src/files.c: Support output files extensions computing.
21974 (src_extension): New static variable.
21975 (header_extension): New static variable.
21976 (tr): New function.
21977 (get_extension_index): New function, gets the index of an extension
21978 filename in a string.
21979 (compute_exts_from_gf): New function, computes extensions from the
21980 grammar file extension.
21981 (compute_exts_from_src): New functions, computes extensions from the
21982 C source file extension, file given by ``-o'' option.
21983 (compute_base_names): Update.
21984 (output_files): Update.
21985
21986 2001-08-01 Robert Anisko <anisko_r@epita.fr>
21987
21988 * doc/bison.texi: Document @$.
21989 (Locations): New section.
21990
21991 2001-07-18 Akim Demaille <akim@epita.fr>
21992
21993 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
21994 * config/prev-version.txt, config/move-if-change: New.
21995 * Makefile.am: Adjust.
21996
21997 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
21998
21999 * src/bison.simple (yyparse): Suppress warning `comparaison
22000 between signed and unsigned'.
22001
22002 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
22003
22004 * src/getargs.h (raw_flag): Remove.
22005 * src/getargs.c: Die on `-r'/`--raw'.
22006 * src/lex.c (parse_percent_token): Die on `%raw'.
22007 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
22008 * tests/calc.at: Suppress test with option `--raw'.
22009
22010 2001-07-14 Akim Demaille <akim@epita.fr>
22011
22012 * config/: New.
22013 * configure.in: Require Autoconf 2.50.
22014 Update to gettext 0.10.38.
22015
22016 2001-03-16 Akim Demaille <akim@epita.fr>
22017
22018 * doc/bison.texinfo: ANSIfy the examples.
22019
22020 2001-03-16 Akim Demaille <akim@epita.fr>
22021
22022 * getargs.c (skeleton): New variable.
22023 (longopts): --skeleton is a new option.
22024 (shortopts, getargs): -S is a new option.
22025 * getargs.h: Declare skeleton.
22026 * output.c (output_parser): Use it.
22027
22028 2001-03-16 Akim Demaille <akim@epita.fr>
22029
22030 * m4/strerror_r.m4: New.
22031 * m4/error.m4: Run AC_FUNC_STRERROR_R.
22032 * lib/error.h, lib/error.c: Update.
22033
22034 2001-03-16 Akim Demaille <akim@epita.fr>
22035
22036 * src/getargs.c (longopts): Clean up.
22037
22038 2001-02-21 Akim Demaille <akim@epita.fr>
22039
22040 * src/reader.c (gensym): `gensym_count' is your own.
22041 Use a static buf to create the symbol name, as token_buffer is no
22042 longer a buffer.
22043
22044 2001-02-08 Akim Demaille <akim@epita.fr>
22045
22046 * src/conflicts.c (conflict_report): Be sure not to append to res
22047 between two calls, which could happen if both first sprintf were
22048 skipped, but not the first cp += strlen.
22049
22050 2001-02-08 Akim Demaille <akim@epita.fr>
22051
22052 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
22053 New, from fileutils 4.0.37.
22054 * configure.in: Require Autoconf 2.49c. I took some time before
22055 making this decision. This is the only way out for portability
22056 issues in Bison, it would mean way too much duplicate effort to
22057 import in Bison features implemented in 2.49c since 2.13.
22058 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
22059
22060 2001-02-02 Akim Demaille <akim@epita.fr>
22061
22062 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
22063 * lib/xalloc.h, lib/xmalloc.c: Update.
22064
22065 2001-01-19 Akim Demaille <akim@epita.fr>
22066
22067 Get rid of the ad hoc handling of token_buffer in the scanner: use
22068 the obstacks.
22069
22070 * src/lex.c (token_obstack): New.
22071 (init_lex): Initialize it. No longer call...
22072 (grow_token_buffer): this. Remove it.
22073 Adjust all the places which used it to use the obstack.
22074
22075 2001-01-19 Akim Demaille <akim@epita.fr>
22076
22077 * src/lex.h: Rename all the tokens:
22078 s/\bENDFILE\b/tok_eof/g;
22079 s/\bIDENTIFIER\b/tok_identifier/g;
22080 etc.
22081 Let them be enums, not #define, to ease debugging.
22082 Adjust all the code.
22083
22084 2001-01-18 Akim Demaille <akim@epita.fr>
22085
22086 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
22087 * src/lex.c (maxtoken, grow_token_buffer): Static.
22088
22089 2001-01-18 Akim Demaille <akim@epita.fr>
22090
22091 Since we now use obstacks, more % directives can be enabled.
22092
22093 * src/lex.c (percent_table): Also accept `%yacc',
22094 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
22095 `%debug'.
22096 Handle the actions for `%semantic_parser' and `%pure_parser' here,
22097 instead of returning a token.
22098 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
22099 * src/reader.c (read_declarations): Adjust.
22100 * src/files.c (open_files): Don't call `compute_base_names', don't
22101 compute `attrsfile' since they depend upon data which might be
22102 *in* the input file now.
22103 (output_files): Do it here.
22104 * src/output.c (output_headers): Document the fact that this patch
22105 introduces a guaranteed SEGV for semantic parsers.
22106 * doc/bison.texinfo: Document them.
22107 * tests/suite.at: Exercise these %options.
22108
22109 2000-12-20 Akim Demaille <akim@epita.fr>
22110
22111 Also handle the output file (--verbose) with obstacks.
22112
22113 * files.c (foutput): Remove.
22114 (output_obstack): New.
22115 Adjust all dependencies.
22116 * src/conflicts.c: Return a string.
22117 * src/system.h (obstack_grow_string): Rename as...
22118 (obstack_sgrow): this. Be ready to work with non literals.
22119 (obstack_fgrow4): New.
22120
22121 2000-12-20 Akim Demaille <akim@epita.fr>
22122
22123 * src/files.c (open_files): Fix the computation of short_base_name
22124 in the case of `-o foo.tab.c'.
22125
22126 2000-12-20 Akim Demaille <akim@epita.fr>
22127
22128 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
22129 (copy_dollar): Now that everything uses obstacks, get rid of the
22130 FILE * parameters.
22131
22132 2000-12-20 Akim Demaille <akim@epita.fr>
22133
22134 * src/files.c (open_files): Actually the `.output' file is based
22135 on the short_base_name, not base_name.
22136 * tests/suite.at (Checking output file names): Adjust.
22137
22138 2000-12-20 Akim Demaille <akim@epita.fr>
22139
22140 * src/bison.s1: Remove, we now use directly...
22141 * src/bison.simple: this.
22142 * src/Makefile.am: Use pkgdata instead of data.
22143
22144 2000-12-20 Akim Demaille <akim@epita.fr>
22145
22146 * src/files.c (guard_obstack): New.
22147 (open_files): Initialize it.
22148 (output_files): Dump it...
22149 * src/files.h: Export it.
22150 * src/reader.c (copy_guard): Use it.
22151
22152 2000-12-19 Akim Demaille <akim@epita.fr>
22153
22154 * src/files.c (outfile, defsfile, actfile): Removed as global
22155 vars.
22156 (open_files): Don't compute them.
22157 (output_files): Adjust.
22158 (base_name, short_base_name): Be global.
22159 Adjust dependencies.
22160
22161 2000-12-19 Akim Demaille <akim@epita.fr>
22162
22163 * src/files.c (strsuffix): New.
22164 (stringappend): Be just like strcat but allocate.
22165 (base_names): Eve out from open_files.
22166 Try to simplify the rather hairy computation of base_name and
22167 short_base_name.
22168 (open_files): Use it.
22169 * tests/suite.at (Checking output file names): New test.
22170
22171 2000-12-19 Akim Demaille <akim@epita.fr>
22172
22173 * src/system.h (obstack_grow_literal_string): Rename as...
22174 (obstack_grow_string): this.
22175 * src/output.c (output_parser): Recognize `%% actions' instead of
22176 `$'.
22177 * src/bison.s1: s/$/%% actions/.
22178 * src/bison.hairy: Likewise.
22179
22180 2000-12-19 Akim Demaille <akim@epita.fr>
22181
22182 * src/output.c (output_parser): Compute the `#line' lines when
22183 there are.
22184 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
22185 Suggested by Hans Aberg.
22186
22187 2000-12-19 Akim Demaille <akim@epita.fr>
22188
22189 Let the handling of the skeleton files be local to the procedures
22190 that use it.
22191
22192 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
22193 longer static.
22194 (fparser, open_extra_files): Remove.
22195 (open_files, output_files): Don't take care of fparser.
22196 * src/files.h: Adjust.
22197 * src/output.c (output_parser): Open and close the file to the
22198 skeleton.
22199 * src/reader.c (read_declarations): When %semantic_parser, open
22200 fguard.
22201
22202 2000-12-19 Akim Demaille <akim@epita.fr>
22203
22204 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
22205 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
22206
22207 2000-12-19 Akim Demaille <akim@epita.fr>
22208
22209 * src/files.c (open_files): Yipee! We no longer need all the code
22210 looking for `/tmp' since we have no tmp file.
22211
22212 2000-12-19 Akim Demaille <akim@epita.fr>
22213
22214 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
22215 New macros.
22216 * src/files.c (open_files): Less dependency on MSDOS etc.
22217
22218 2000-12-14 Akim Demaille <akim@epita.fr>
22219
22220 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
22221 Provide a default definition.
22222 Use it when executing the default @ action.
22223 * src/reader.c (reader_output_yylsp): No longer include
22224 `timestamp' and `text' in the default YYLTYPE.
22225
22226 2000-12-12 Akim Demaille <akim@epita.fr>
22227
22228 * src/reader.c (copy_definition, parse_union_decl, copy_action)
22229 (copy_guard): Quote the file names.
22230 Reported by Laurent Mascherpa.
22231
22232 2000-12-12 Akim Demaille <akim@epita.fr>
22233
22234 * src/output.c (output_headers, output_program, output): Be sure
22235 to escape special characters when outputting filenames.
22236 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
22237 (output_headers): Don't depend on them, Use ACTSTR.
22238
22239 2000-11-17 Akim Demaille <akim@epita.fr>
22240
22241 * lib/obstack.h: Formatting changes.
22242 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
22243 prevents type checking.
22244 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
22245 cast the value to (void *): assigning a `foo *' to a `void *'
22246 variable is valid.
22247 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
22248 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
22249 append characters.
22250
22251 2000-11-17 Akim Demaille <akim@epita.fr>
22252
22253 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
22254 as...
22255 (suite.m4, regression.m4, calc.m4): these.
22256 * tests/atgeneral.m4: Update from CVS Autoconf.
22257
22258 2000-11-17 Akim Demaille <akim@epita.fr>
22259
22260 * tests/regression.m4 (%union and --defines): New test,
22261 demonstrating a current bug in the obstack implementation.
22262
22263 2000-11-17 Akim Demaille <akim@epita.fr>
22264
22265 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
22266 macros.
22267 Use them to declare the variables which are global or local to
22268 `yyparse'.
22269
22270 2000-11-17 Akim Demaille <akim@epita.fr>
22271
22272 * acconfig.h: Remove, no longer used.
22273
22274 2000-11-07 Akim Demaille <akim@epita.fr>
22275
22276 * src: s/Copyright (C)/Copyright/g.
22277
22278 2000-11-07 Akim Demaille <akim@epita.fr>
22279
22280 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
22281 defining.
22282 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
22283
22284 2000-11-07 Akim Demaille <akim@epita.fr>
22285
22286 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
22287 Merge in a single CPP if/else.
22288
22289 2000-11-07 Akim Demaille <akim@epita.fr>
22290
22291 * src/output.c (output): Remove useless variables.
22292 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
22293 argument `data' for consistency with the prototypes.
22294 Qualify it `const'.
22295 (obstack_copy, obstack_copy0): Rename the second argument as
22296 `address' for consistency. Qualify it `const'.
22297 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
22298 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
22299 `const' their input argument (`data' or `address').
22300 Adjust the corresponding macros to include `const' in casts.
22301
22302 2000-11-03 Akim Demaille <akim@epita.fr>
22303
22304 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
22305 s/PFILE1/BISON_HAIRY/.
22306 Adjust dependencies.
22307
22308 2000-11-03 Akim Demaille <akim@epita.fr>
22309
22310 For some reason, this was not applied.
22311
22312 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
22313 `unlink': it's no longer used.
22314
22315 2000-11-03 Akim Demaille <akim@epita.fr>
22316
22317 * src/files.c (skeleton_find): New function, eved out of...
22318 (open_files, open_extra_files): here.
22319
22320 2000-11-03 Akim Demaille <akim@epita.fr>
22321
22322 Don't use `atexit'.
22323
22324 * src/files.c (obstack_save): New function.
22325 (done): Rename as...
22326 (output_files): this.
22327 Use `obstack_save'.
22328 * src/main.c (main): Don't use `atexit' to register `done', since
22329 it no longer has to remove tmp files, just call `output_files'
22330 when there are no errors.
22331
22332 2000-11-02 Akim Demaille <akim@epita.fr>
22333
22334 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
22335 `unlink': it's no longer used.
22336 * src/files.h: Formatting changes.
22337
22338 2000-11-02 Akim Demaille <akim@epita.fr>
22339
22340 Remove the last uses of mktemp and unlink/delete.
22341
22342 * src/files.c (fdefines, ftable): Removed.
22343 (defines_ostack, table_obstack): New.
22344 Adjust dependencies of the former into uses of the latter.
22345 * src/output.c (output_short_or_char_table, output_short_table):
22346 Convert to using obstacks.
22347 * src/reader.c (copy_comment2): Accept one FILE * and two
22348 obstacks.
22349 (output_token_defines, reader_output_yylsp): Use obstacks.
22350 * src/system.h (obstack_fgrow3): New.
22351 * po/POTFILES.in: Adjust.
22352
22353 2000-11-01 Akim Demaille <akim@epita.fr>
22354
22355 Change each use of `fattrs' into a use of `attrs_obstack'.
22356
22357 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
22358 * src/files.c (fattrs): Remove.
22359 (attrs_obstack): New.
22360 Adjust all dependencies.
22361 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
22362
22363 2000-11-01 Akim Demaille <akim@epita.fr>
22364
22365 Introduce obstacks.
22366 Change each use of `faction' into a use of `action_obstack'.
22367
22368 * lib/obstack.h, lib/obstack.c: New files.
22369 * src/files.c (faction): Remove.
22370 (action_obstack): New.
22371 Adjust all dependencies.
22372
22373 2000-10-20 Akim Demaille <akim@epita.fr>
22374
22375 * lib/quote.h (PARAMS): New macro. Use it.
22376
22377 2000-10-16 Akim Demaille <akim@epita.fr>
22378
22379 * src/output.c (output_short_or_char_table): New function.
22380 (output_short_table, output_token_translations): Use it.
22381 (goto_actions): Use output_short_table.
22382
22383 2000-10-16 Akim Demaille <akim@epita.fr>
22384
22385 * src/symtab.c (bucket_new): New function.
22386 (getsym): Use it.
22387
22388 * src/output.c (output_short_table): New argument to display the
22389 comment associated with the table.
22390 Adjust dependencies.
22391 (output_gram): Use it.
22392 (output_rule_data): Nicer output layout for YYTNAME.
22393
22394 2000-10-16 Akim Demaille <akim@epita.fr>
22395
22396 * src/lex.c (read_typename): New function.
22397 (lex): Use it.
22398 * src/reader.c (copy_dollar): Likewise.
22399
22400 2000-10-16 Akim Demaille <akim@epita.fr>
22401
22402 * src/reader.c (copy_comment2): Expect the input stream to be on
22403 the `/' which is suspected to open a comment, instead of being
22404 called after `//' or `/*' was read.
22405 (copy_comment, copy_definition, parse_union_decl, copy_action)
22406 (copy_guard): Adjust.
22407
22408 2000-10-16 Akim Demaille <akim@epita.fr>
22409
22410 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
22411 `read_signed_integer'.
22412
22413 2000-10-16 Akim Demaille <akim@epita.fr>
22414
22415 * src/reader.c (copy_dollar): New function.
22416 (copy_guard, copy_action): Use it.
22417
22418 2000-10-16 Akim Demaille <akim@epita.fr>
22419
22420 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
22421 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
22422 New files, from Fileutils 4.0.27.
22423 * src/main.c (printable_version): Remove.
22424 * src/lex.c, src/reader.c: Use `quote'.
22425
22426 2000-10-04 Akim Demaille <akim@epita.fr>
22427
22428 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
22429
22430 2000-10-04 Akim Demaille <akim@epita.fr>
22431
22432 * doc/bison.texinfo: Various typos spotted by Neil Booth.
22433
22434 2000-10-04 Akim Demaille <akim@epita.fr>
22435
22436 When a literal string is used to define two different tokens,
22437 `bison -v' segfaults.
22438 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
22439
22440 * tests/regression.m4: New file.
22441 Include the core of the sample provided by Piotr Gackiewicz.
22442 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
22443 properly.
22444
22445 2000-10-04 Akim Demaille <akim@epita.fr>
22446
22447 * src/reader.c (parse_expect_decl): Keep `count' within the size
22448 of `buffer'.
22449 From Neil Booth.
22450
22451 2000-10-02 Paul Eggert <eggert@twinsun.com>
22452
22453 * bison.s1 (yyparse): Assign the default value
22454 unconditionally, to avoid a GCC warning and make the parser a
22455 tad smaller.
22456
22457 2000-10-02 Akim Demaille <akim@epita.fr>
22458
22459 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
22460 options.
22461
22462 2000-10-02 Akim Demaille <akim@epita.fr>
22463
22464 * src/derives.c, src/print.c, src/reduce.c: To ease the
22465 translation, move some `\n' out of the translated strings.
22466
22467 2000-10-02 Akim Demaille <akim@epita.fr>
22468
22469 The location tracking mechanism is precious for parse error
22470 messages. Nevertheless, it is enabled only when `@n' is used in
22471 the grammar, which is a different issue (you can use it in error
22472 message, but not in the grammar per se). Therefore, there should
22473 be another means to enable it.
22474
22475 * src/getargs.c (getargs): Support `--locations'.
22476 (usage): Report it.
22477 * src/getargs.h (locationsflag): Export it.
22478 * src/lex.c (percent_table): Support `%locations'.
22479 * src/reader.c (yylsp_needed): Remove this variable, now replaced
22480 with `locationsflag'.
22481 * doc/bison.texinfo: Document `--locations' and `%locations'.
22482 Sort the options.
22483 * tests/calc.m4: Test it.
22484
22485 For regularity of the names, replace each
22486 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
22487 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
22488 In addition replace each `flag' with `_flag'.
22489
22490 2000-10-02 Akim Demaille <akim@epita.fr>
22491
22492 Also test parse error messages, including with YYERROR_VERBOSE.
22493
22494 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
22495 associative).
22496 Use it to check the computations.
22497 Use it to check `nonassoc' is honored.
22498 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
22499 `--yyerror-verbose'.
22500 (_AT_CHECK_CALC): Adjust to this option.
22501 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
22502
22503 2000-10-02 Akim Demaille <akim@epita.fr>
22504
22505 Test also `--verbose', `--defines' and `--name-prefix'. Testing
22506 the latter demonstrates a flaw in the handling of non debugging
22507 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
22508 was used in order to simplify:
22509
22510 #if YYDEBUG
22511 if (yydebug)
22512 {
22513 ...
22514 }
22515 #endif
22516
22517 into
22518
22519 if (yydebug)
22520 {
22521 ...
22522 }
22523
22524 unfortunately this leads to a CPP conflict when
22525 `--name-prefix=foo' is used since it produces `#define yydebug
22526 foodebug'.
22527
22528 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
22529 (YYDPRINTF): New macro.
22530 Spread its use.
22531 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
22532 the bison options.
22533 Also test `--verbose', `--defines' and `--name-prefix'.
22534
22535 2000-10-02 Akim Demaille <akim@epita.fr>
22536
22537 Improve the readability of the produced parsers.
22538
22539 * src/bison.s1: Formatting changes.
22540 Improve the comment related to the `$' mark.
22541 (yydefault): Don't fall through to `yyresume': `goto' there.
22542 * src/output.c (output_parser): When the `$' is met, skip the end
22543 of its line.
22544 New variable, `number_of_dollar_signs', to check there's exactly
22545 one `$' in the parser skeleton.
22546
22547 2000-10-02 Akim Demaille <akim@epita.fr>
22548
22549 * lib/xstrdup.c: New file, from the fileutils.
22550 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
22551 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
22552 instead of strlen + xmalloc + strcpy.
22553 * src/symtab.c (copys): Remove, use xstrdup instead.
22554
22555 2000-10-02 Akim Demaille <akim@epita.fr>
22556
22557 * src/gram.h (associativity): New enum type which replaces the
22558 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
22559 `right_assoc', `left_assoc' and `non_assoc'.
22560 Adjust all dependencies.
22561 * src/reader.c: Formatting changes.
22562 (LTYPESTR): Don't define it, use it as a literal in
22563 `reader_output_yylsp'.
22564 * src/symtab.h (symbol_class): New enum type which replaces the
22565 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
22566 `sunknown', `stoken and `snterm'.
22567
22568 2000-10-02 Akim Demaille <akim@epita.fr>
22569
22570 * src/getargs.c (fixed_outfiles): Rename as...
22571 (yaccflag): for consistency and accuracy.
22572 Adjust dependencies.
22573
22574 2000-10-02 Akim Demaille <akim@epita.fr>
22575
22576 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
22577 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
22578 difficult and introduced a lot of core dump. It turns out that
22579 Bison used an implementation of `xmalloc' based on `calloc', and
22580 at various places it does depend upon the initialization to 0. I
22581 have not tried to isolate the pertinent places, and all the former
22582 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
22583 someone should address this issue.
22584
22585 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
22586 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
22587 files.
22588 Adjust dependencies.
22589 * src/warshall.h: New file.
22590 Propagate.
22591
22592 2000-10-02 Akim Demaille <akim@epita.fr>
22593
22594 Various anti-`extern in *.c' changes.
22595
22596 * src/system.h: Include `assert.h'.
22597
22598 2000-10-02 Akim Demaille <akim@epita.fr>
22599
22600 * src/state.h (nstates, final_state, first_state, first_shift)
22601 (first_reduction): Move their exportation from here...
22602 * src/LR0.h: to here.
22603 Adjust dependencies.
22604 * src/getargs.c (statisticsflag): New variable.
22605 Add support for `--statistics'.
22606 Adjust dependencies.
22607
22608 Remove a lot of now useless `extern' statements in most files.
22609
22610 2000-10-02 Akim Demaille <akim@epita.fr>
22611
22612 * src/LR0.h: New file.
22613 Propagate its use.
22614
22615 2000-10-02 Akim Demaille <akim@epita.fr>
22616
22617 * src/print.h: New file.
22618 Propagate its use.
22619 * src/print.c: Formatting and ordering changes.
22620 (verbose, terse): Replace with...
22621 (print_results): this new function.
22622 Adjust dependencies.
22623
22624 2000-10-02 Akim Demaille <akim@epita.fr>
22625
22626 * src/conflicts.c (conflict_report): New function.
22627 (conflict_log, verbose_conflict_log): Replace with...
22628 (print_conflicts): this function.
22629 Adjust dependencies.
22630 * src/conflicts.h: New file.
22631 Propagate its inclusion.
22632
22633 2000-10-02 Akim Demaille <akim@epita.fr>
22634
22635 * src/nullable.h: New file.
22636 Propagate its inclusion.
22637 * src/nullable.c: Formatting changes.
22638
22639 2000-10-02 Akim Demaille <akim@epita.fr>
22640
22641 * src/reduce.h: New file.
22642 Propagate its inclusion.
22643 * src/reduce.c: Topological sort and other formatting changes.
22644 (bool, TRUE, FALSE): Move their definition to...
22645 * src/system.h: here.
22646
22647 2000-10-02 Akim Demaille <akim@epita.fr>
22648
22649 * src/files.c: Formatting changes.
22650 (tryopen, tryclose, openfiles): Rename as...
22651 (xfopen, xfclose, open_files): this.
22652 (stringappend): static.
22653 * src/files.h: Complete the list of exported symbols.
22654 Propagate its use.
22655
22656 2000-10-02 Akim Demaille <akim@epita.fr>
22657
22658 * src/reader.h: New file.
22659 Propagate its use instead of tedious list of `extern' and
22660 prototypes.
22661 * src/reader.c: Formatting changes, topological sort,
22662 s/register//.
22663
22664 2000-10-02 Akim Demaille <akim@epita.fr>
22665
22666 * src/lex.h: Prototype `lex.c' exported functions.
22667 * src/reader.c: Adjust.
22668 * src/lex.c: Formatting changes.
22669 (safegetc): Rename as...
22670 (xgetc): this.
22671
22672 2000-10-02 Akim Demaille <akim@epita.fr>
22673
22674 * src/lalr.h: New file.
22675 Propagate its inclusion instead of prototypes and `extern'.
22676 * src/lalr.c: Formatting changes, topological sorting etc.
22677
22678 2000-10-02 Akim Demaille <akim@epita.fr>
22679
22680 * src/output.c (token_actions): Introduce a temporary array,
22681 YYDEFACT, that makes it possible for this function to use
22682 output_short_table.
22683
22684 2000-10-02 Akim Demaille <akim@epita.fr>
22685
22686 `user_toknums' is output as a `short[]' in `output.c', while it is
22687 defined as a `int[]' in `reader.c'. For consistency with the
22688 other output tables, `user_toknums' is now defined as a table of
22689 shorts.
22690
22691 * src/reader.c (user_toknums): Be a short table instead of an int
22692 table.
22693 Adjust dependencies.
22694
22695 Factor the short table outputs.
22696
22697 * src/output.c (output_short_table): New function.
22698 * src/output.c (output_gram, output_stos, output_rule_data)
22699 (output_base, output_table, output_check): Use it.
22700
22701 2000-10-02 Akim Demaille <akim@epita.fr>
22702
22703 * src/output.c (output): Topological sort of the functions, in
22704 order to get rid of the `static' prototypes.
22705 No longer use `register'.
22706 * src/output.h: New file.
22707 Propagate its inclusion in files explicitly prototyping functions
22708 from output.c.
22709
22710 2000-09-21 Akim Demaille <akim@epita.fr>
22711
22712 * src/atgeneral.m4: Update from Autoconf.
22713
22714 2000-09-21 Akim Demaille <akim@epita.fr>
22715
22716 * src/closure.h: New file.
22717 * src/closure.c: Formatting changes, topological sort over the
22718 functions, use of closure.h.
22719 (initialize_closure, finalize_closure): Rename as...
22720 (new_closure, free_closure): these. Adjust dependencies.
22721 * src/LR0.c: Formatting changes, topological sort, use of
22722 cloture.h.
22723 (initialize_states): Rename as...
22724 (new_states): this.
22725 * src/Makefile.am (noinst_HEADERS): Adjust.
22726
22727 2000-09-20 Akim Demaille <akim@epita.fr>
22728
22729 * src/acconfig.h: Don't protect config.h against multiple
22730 inclusion.
22731 Don't define PARAMS.
22732 * src/system.h: Define PARAMS.
22733 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
22734 purpose of config.h. system.h must not try to fix wrong
22735 definitions in config.h.
22736
22737 2000-09-20 Akim Demaille <akim@epita.fr>
22738
22739 * src/derives.h: New file.
22740 * src/main.c, src/derives.h: Use it.
22741 Formatting changes.
22742 * src/Makefile.am (noinst_HEADERS): Adjust.
22743
22744 2000-09-20 Akim Demaille <akim@epita.fr>
22745
22746 * tests/atgeneral.m4: Update from Autoconf.
22747 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
22748 (AT_CHECK_CALC): New macros.
22749 Use these macros to test bison with options `', `--raw',
22750 `--debug', `--yacc', `--yacc --debug'.
22751
22752 2000-09-19 Akim Demaille <akim@epita.fr>
22753
22754 * src/output.c: Formatting changes.
22755 * src/machine.h: Remove, leaving its contents in...
22756 * src/system.h: here.
22757 Include stdio.h.
22758 Adjust all dependencies on stdio.h and machine.h.
22759 * src/getargs.h: New file.
22760 Let all `extern' declarations about getargs.c be replaced with
22761 inclusion of `getargs.h'.
22762 * src/Makefile.am (noinst_HEADERS): Adjust.
22763
22764 * tests/calc.m4 (yyin): Be initialized in main, not on the global
22765 scope.
22766 (yyerror): Returns void, not int.
22767 * doc/bison.texinfo: Formatting changes.
22768
22769 2000-09-19 Akim Demaille <akim@epita.fr>
22770
22771 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
22772 portable.
22773
22774 2000-09-18 Akim Demaille <akim@epita.fr>
22775
22776 * configure.in: Append WARNING_CFLAGS to CFLAGS.
22777 * src/Makefile.am (INCLUDES): Don't.
22778 Be ready to fetch headers in lib/.
22779
22780 2000-09-18 Akim Demaille <akim@epita.fr>
22781
22782 * doc/bison.texinfo: Update the copyright.
22783 ANSIfy and GNUify the examples.
22784 Remove the old menu.
22785
22786 2000-09-18 Akim Demaille <akim@epita.fr>
22787
22788 First set of tests: use the `calc' example from the documentation.
22789
22790 * src/bison.s1 (yyparse): Condition the code using `yytname' which
22791 is defined only when YYDEBUG is.
22792 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
22793 * src/files.c (tryopen, tryclose): Formatting changes.
22794 Move to the top and be static.
22795 * src/reader.c (read_signed_integer): Likewise.
22796 * tests/calc.m4: New file.
22797 * Makefile.am, suite.m4: Adjust.
22798 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
22799
22800 2000-09-18 Akim Demaille <akim@epita.fr>
22801
22802 Add support for an Autotest test suite for Bison.
22803
22804 * m4/m4.m4, m4/atconfig.m4: New files.
22805 * m4/Makefile.am (EXTRA_DIST): Adjust.
22806 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
22807 files.
22808 * src/getargs.c: Display a more standard --version message.
22809 * src/reader.c (reader): Formatting changes.
22810 No longer depend upon VERSION_STRING.
22811 * configure.in: No longer use `dnl'.
22812 Set up the test suite and the new directory `tests/.
22813 (VERSION_STRING): Remove.
22814
22815 2000-04-14 Akim Demaille <akim@epita.fr>
22816
22817 * src/reader.c (copy_comment2): New function, same as former
22818 `copy_comment', but outputs into two FILE *.
22819 (copy_comment): Use it.
22820 (parse_union_decl): Use it.
22821 (get_type, parse_start_decl): Use the same `invalid' message.
22822 (parse_start_decl, parse_union_decl): Use the same `multiple'
22823 message.
22824 (parse_union_decl, copy_guard, copy_action): Use the same
22825 `unmatched' message.
22826 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
22827
22828 2000-03-31 Akim Demaille <akim@epita.fr>
22829
22830 * src/files.c (tryopen, tryclose): Move to the top.
22831 Be static.
22832
22833 2000-03-31 Akim Demaille <akim@epita.fr>
22834
22835 * src/main.c (main): Don't call `done', exit does it.
22836
22837 2000-03-31 Akim Demaille <akim@epita.fr>
22838
22839 * allocate.c: s/return (foo)/return foo/.
22840 * lalr.c: Likewise.
22841 * LR0.c: Likewise.
22842 * output.c: Likewise.
22843 * reader.c: Likewise.
22844 * symtab.c: Likewise.
22845 * vmsgetargs.c: Likewise.
22846
22847 2000-03-31 Akim Demaille <akim@epita.fr>
22848
22849 Clean up the error reporting functions.
22850
22851 * src/report.c: New file.
22852 * src/report.h: Likewise.
22853 * src/Makefile.am: Adjust.
22854 * m4/error.m4: New file.
22855 * m4/Makefile.am: Adjust.
22856 * configure.in (jm_PREREQ_ERROR): Call it.
22857 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
22858 Remove.
22859 (fatal, fatals): Remove. All callers use complain.c::fatal.
22860 (warn, warni, warns, warnss, warnss): Remove. All callers use
22861 complain.c::complain.
22862 (toomany): Remove, use fatal instead.
22863 * src/files.c (done): No argument, use complain_message_count.
22864 * src/main.c (main): Register `done' to `atexit'.
22865
22866 * src/getargs.c (usage): More `fputs', less `fprintf'.
22867
22868 2000-03-28 Akim Demaille <akim@epita.fr>
22869
22870 * lib/: New directory.
22871 * Makefile.am (SUBDIRS): Adjust.
22872 * configure.in: Adjust.
22873 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
22874 useless.
22875 * src/alloca.c: Moved to lib/.
22876 * src/getopt.c: Likewise.
22877 * src/getopt1.c: Likewise.
22878 * src/getopt.h: Likewise.
22879 * src/ansi2knr.c: Likewise.
22880 * src/ansi2knr.1: Likewise.
22881 * src/Makefile.am: Adjust.
22882 * lib/Makefile.am: New file.
22883
22884 2000-03-28 Akim Demaille <akim@epita.fr>
22885
22886 * src/getargs.c (usage): Refresh the help message.
22887
22888 2000-03-17 Akim Demaille <akim@epita.fr>
22889
22890 * src/getopt1.c: Updated from textutils 2.0e
22891 * src/getopt.c: Likewise.
22892 * src/getopt.h: Likewise.
22893
22894 2000-03-17 Akim Demaille <akim@epita.fr>
22895
22896 * src/Makefile.am (bison.simple): Fix the awk program: quote only
22897 the file name, not the whole `#line LINE FILE'.
22898
22899 2000-03-17 Akim Demaille <akim@epita.fr>
22900
22901 On syntax errors, report the token on which we choked.
22902
22903 * src/bison.s1 (yyparse): In the label yyerrlab, when
22904 YYERROR_VERBOSE, add yychar in msg.
22905
22906 2000-03-17 Akim Demaille <akim@epita.fr>
22907
22908 * src/reader.c (copy_at): New function.
22909 (copy_guard): Use it.
22910 (copy_action): Use it.
22911
22912 2000-03-17 Akim Demaille <akim@epita.fr>
22913
22914 Be kind to translators, save some useless translations.
22915
22916 * src/main.c (banner): New function.
22917 (fatal_banner): Use it.
22918 (warn_banner): Use it.
22919
22920 2000-03-17 Akim Demaille <akim@epita.fr>
22921
22922 * src/reader.c (copy_definition): Use copy_string and
22923 copy_comment. Removed now unused `match', `ended',
22924 `cplus_comment'.
22925 (copy_comment, copy_string): Moved, to be visible from
22926 copy_definition.
22927
22928 2000-03-17 Akim Demaille <akim@epita.fr>
22929
22930 * src/reader.c (copy_string): Declare `static inline'. No
22931 problems with inline, since it is checked by configure.
22932 (copy_comment): Likewise.
22933
22934 2000-03-17 Akim Demaille <akim@epita.fr>
22935
22936 * src/reader.c (packsymbols): Formatting changes.
22937
22938 2000-03-17 Akim Demaille <akim@epita.fr>
22939
22940 * src/reader.c (copy_comment): New function, factored out from:
22941 (copy_action): Use it. Removed now unused `match', `ended',
22942 `cplus_comment'.
22943 (copy_guard): Likewise.
22944
22945 2000-03-17 Akim Demaille <akim@epita.fr>
22946
22947 * src/reader.c (copy_string): New function, factored out from:
22948 (copy_action): Use it.
22949 (copy_guard): Likewise.
22950
22951 2000-03-17 Akim Demaille <akim@epita.fr>
22952
22953 Change the handling of @s so that they behave exactly like $s.
22954 There is now a pseudo variable @$ (readble and writable), location
22955 of the lhs of the rule (by default ranging from the location of
22956 the first symbol of the rhs, to the location of the last symbol,
22957 or, if the rhs is empty, YYLLOC).
22958
22959 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
22960 yyval.
22961 (yyparse): When providing a default semantic action, provide a
22962 default location action.
22963 (after the $): No longer change `*YYLSP', just stack YYLOC the
22964 same way you stack YYVAL.
22965 * src/reader.c (read_declarations): Use warns.
22966 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
22967 (copy_action, case '@'): Likewise.
22968 Use a standard error message, to save useless work from
22969 translators.
22970
22971 2000-03-17 Akim Demaille <akim@epita.fr>
22972
22973 * src/bison.s1: Formatting and cosmetics changes.
22974 * src/reader.c: Likewise.
22975 Update the Copyright notice.
22976
22977 2000-03-17 Akim Demaille <akim@epita.fr>
22978
22979 * src/bison.s1 (#line): All set to `#line' only, since the
22980 Makefile now handles them.
22981
22982 2000-03-16 Akim Demaille <akim@epita.fr>
22983
22984 * src/output.c (output_rule_data): Output the documentation of
22985 some of the tables.
22986 (Copyright notice): Update.
22987 Formatting changes.
22988
22989 2000-03-16 Akim Demaille <akim@epita.fr>
22990
22991 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
22992 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
22993 One `#if YYDEBUG' remains, since it uses variables which are
22994 defined only if `YYDEBUG != 0'.
22995
22996 2000-03-16 Akim Demaille <akim@epita.fr>
22997
22998 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
22999 and related variables so that the similarities are highlighted.
23000
23001 2000-03-16 Akim Demaille <akim@epita.fr>
23002
23003 * src/bison.s1: Properly indent CPP directives.
23004
23005 2000-03-16 Akim Demaille <akim@epita.fr>
23006
23007 * src/bison.s1: Properly indent the `alloca' CPP section.
23008
23009 2000-03-16 Akim Demaille <akim@epita.fr>
23010
23011 Do not hard code values of directories in `configure.in'.
23012 Update the `configure' tool chain.
23013
23014 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
23015 src/makefile.am.
23016 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
23017 (AC_OUTPUT): Add m4/Makefile.
23018 Bump to bison 1.28a, 1.29 has never been released.
23019 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
23020 handled via src/Makefile.am.
23021 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
23022 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
23023 autoheader.
23024 * Makefile.am (SUBDIRS): Add m4.
23025 (ACLOCAL_AM_FLAGS): New variable.
23026 (AUTOMAKE_OPTIONS): Add check-news.
23027 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
23028 the proper line number and file name.
23029 (DEFS): Propagate the location of bison library files and of the
23030 locale files.
23031 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
23032 builddir.
23033 * acinclude.m4: Remove, replaced by the directory m4.
23034 * m4/Makefile.am (EXTRA_DIST): New variable.
23035 * m4/gettext.m4: New file, from the fileutils.
23036 * m4/lcmessage.m4: Likewise
23037 * m4/progtest.m4: Likewise.
23038 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
23039
23040 2000-03-10 Akim Demaille <akim@epita.fr>
23041
23042 * src/closure.c:
23043 Formatting changes of various comments.
23044 Respect the GNU coding standards at various places.
23045 Don't use `_()' when no translation is needed.
23046
23047 1999-12-13 Jesse Thilo <jthilo@gnu.org>
23048
23049 * src/files.c:
23050 OS/2 honors TMPDIR environment variable.
23051
23052 1999-12-13 Jesse Thilo <jthilo@gnu.org>
23053
23054 * doc/bison.texinfo: Tweaked spelling and grammar.
23055 Updated ISBN.
23056 Removed reference to price of printed copy.
23057 Mention BISON_SIMPLE and BISON_HAIRY.
23058
23059 1999-12-13 Jesse Thilo <jthilo@gnu.org>
23060
23061 * configure.in, NEWS:
23062 Bison 1.29 released.
23063
23064 1999-10-27 Jesse Thilo <jthilo@gnu.org>
23065
23066 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
23067 Added reference card.
23068
23069 1999-07-26 Jesse Thilo <jthilo@gnu.org>
23070
23071 * po/ru.po: Added Russian translation.
23072
23073 1999-07-26 Jesse Thilo <jthilo@gnu.org>
23074
23075 * configure.in: Added Russian translation.
23076
23077 1999-07-06 Jesse Thilo <jthilo@gnu.org>
23078
23079 * configure.in, NEWS, README:
23080 Released version 1.28.
23081
23082 1999-06-14 Jesse Thilo <jthilo@gnu.org>
23083
23084 * src/system.h:
23085 Squashed redefinition warning on some systems.
23086
23087 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
23088 Have configure build version string instead of relying on ANSI string
23089 concatentation.
23090
23091 1999-06-14 Jesse Thilo <jthilo@gnu.org>
23092
23093 * po/POTFILES.in: Got rid of version.c.
23094
23095 1999-06-14 Jesse Thilo <jthilo@gnu.org>
23096
23097 * acconfig.h, configure.in:
23098 Have configure build version string instead of relying on ANSI string
23099 concatentation.
23100
23101 1999-06-08 Jesse Thilo <jthilo@gnu.org>
23102
23103 * doc/bison.1:
23104 Dropped mention of `+' for long-named options.
23105
23106 1999-05-30 Jesse Thilo <jthilo@gnu.org>
23107
23108 * src/files.c: Added <unistd.h> for unlink().
23109
23110 * src/Makefile.am, src/system.h:
23111 I18n fixes.
23112
23113 1999-05-30 Jesse Thilo <jthilo@gnu.org>
23114
23115 * README: Added a FAQ list.
23116
23117 * configure.in, acconfig.h:
23118 I18n fixes.
23119
23120 1999-05-30 Jesse Thilo <jthilo@gnu.org>
23121
23122 * doc/FAQ, doc/Makefile.am:
23123 Added a FAQ list.
23124
23125 1999-05-19 Jesse Thilo <jthilo@gnu.org>
23126
23127 * src/alloc.h, src/symtab.h, src/version.c:
23128 Protected inclusion of "config.h" with HAVE_CONFIG_H.
23129
23130 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23131
23132 * src/.cvsignore, src/Makefile.am:
23133 Reorganized: sources in `src', documentation in `doc'.
23134
23135 * src/lex.c (literalchar):
23136 fixed the code for escaping double quotes (thanks
23137 Jonathan Czisny.)
23138
23139 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23140
23141 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
23142 Adjusted paths to reflect directory reorganization.
23143
23144 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23145
23146 * doc/.cvsignore, doc/Makefile.am:
23147 Reorganized: sources in `src', documentation in `doc'.
23148
23149 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23150
23151 * configure.in:
23152 Updated AC_INIT file to reflect directory reorganization.
23153
23154 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
23155 Reorganized: sources in `src', documentation in `doc'.
23156
23157 1999-04-13 Jesse Thilo <jthilo@gnu.org>
23158
23159 * src/allocate.c:
23160 Don't declare calloc() and realloc() if not necessary.
23161
23162 1999-04-13 Jesse Thilo <jthilo@gnu.org>
23163
23164 * configure.in, acconfig.h, acinclude.m4:
23165 Don't declare calloc() and realloc() if not necessary.
23166
23167 1999-03-23 Jesse Thilo <jthilo@gnu.org>
23168
23169 * po/.cvsignore: Added i18n support.
23170
23171 1999-03-23 Jesse Thilo <jthilo@gnu.org>
23172
23173 * acconfig.h, configure.in, Makefile.am:
23174 Added i18n support.
23175
23176 1999-03-22 Jesse Thilo <jthilo@gnu.org>
23177
23178 * src/bison.s1: Fixed #line numbers.
23179
23180 1999-03-15 Jesse Thilo <jthilo@gnu.org>
23181
23182 * po/es.po, po/fr.po, po/nl.po, po/de.po:
23183 Added PO files from Translation Project.
23184
23185 1999-03-03 Jesse Thilo <jthilo@gnu.org>
23186
23187 * Makefile.am:
23188 Added support for non-ANSI compilers (ansi2knr).
23189
23190 1999-02-16 Jesse Thilo <jthilo@gnu.org>
23191
23192 * configure.in: Bumped version number to 1.27.
23193
23194 * Makefile.am:
23195 Added `bison.simple' to list of files removed by `make distclean'.
23196
23197 1999-02-12 Jesse Thilo <jthilo@gnu.org>
23198
23199 * src/files.c, src/files.h:
23200 Defined locations of parser files in config.h instead of Makefile.
23201
23202 1999-02-12 Jesse Thilo <jthilo@gnu.org>
23203
23204 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
23205 Defined locations of parser files in config.h instead of Makefile.
23206
23207 1999-02-09 Jesse Thilo <jthilo@gnu.org>
23208
23209 * Makefile.am:
23210 Removed inappropriate use of $< macro.
23211
23212 1999-02-05 Jesse Thilo <jthilo@gnu.org>
23213
23214 * po/Makefile.in.in, po/POTFILES.in:
23215 Add `po' directory skeleton.
23216
23217 1999-01-27 Jesse Thilo <jthilo@gnu.org>
23218
23219 * README: Document help-bison list.
23220
23221 * configure.in: Add check for mkstemp().
23222
23223 1999-01-20 Jesse Thilo <jthilo@gnu.org>
23224
23225 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
23226 Hush a few compiler warnings.
23227
23228 * src/files.c:
23229 Add tryclose(), which verifies that fclose was successful.
23230 Hush a couple of compiler warnings.
23231
23232 1999-01-20 Jesse Thilo <jthilo@gnu.org>
23233
23234 * Makefile.am, OChangeLog:
23235 ChangeLog is now automatically generated. Include the old version as
23236 OChangeLog.
23237
23238 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23239
23240 * 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:
23241 Update FSF address.
23242
23243 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23244
23245 * doc/bison.texinfo: Fix formatting glitch.
23246
23247 * doc/bison.texinfo: Update FSF address.
23248
23249 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23250
23251 * acconfig.h: Update FSF address.
23252
23253 1999-01-08 Jesse Thilo <jthilo@gnu.org>
23254
23255 * src/system.h:
23256 Don't define PACKAGE here, since config.h defines it.
23257
23258 1998-12-30 Jesse Thilo <jthilo@gnu.org>
23259
23260 * src/reader.c: Update copyright date.
23261
23262 * src/main.c:
23263 Ditch sprintf to statically-sized buffers in fatal/warn functions in
23264 favor of output directly to stderr (avoids buffer overruns).
23265
23266 * src/reader.c: Some checks for premature EOF.
23267
23268 * 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:
23269 Use prototypes if the compiler understands them.
23270
23271 * src/files.c: Honor TMPDIR on Unix hosts.
23272 Use prototypes if the compiler understands them.
23273
23274 * src/reader.c:
23275 Fix a couple of buffer overrun bugs.
23276 Use prototypes if the compiler understands them.
23277
23278 * src/system.h: Include unistd.h and ctype.h.
23279 Use #ifdef instead of #if for NLS symbols.
23280
23281 1998-12-30 Jesse Thilo <jthilo@gnu.org>
23282
23283 * doc/bison.texinfo:
23284 Delete comment "consider using @set for edition number, etc..." since
23285 we now are doing so.
23286
23287 1998-12-30 Jesse Thilo <jthilo@gnu.org>
23288
23289 * configure.in:
23290 Use prototypes if the compiler understands them.
23291
23292 * NEWS: Document 1.26 highlights.
23293
23294 * Makefile.am: Require Automake 1.3 or later.
23295
23296 * acconfig.h:
23297 Use prototypes if the compiler understands them.
23298
23299 1998-12-29 Jesse Thilo <jthilo@gnu.org>
23300
23301 * src/version.c:
23302 Use VERSION symbol from automake for version number.
23303
23304 1998-12-29 Jesse Thilo <jthilo@gnu.org>
23305
23306 * acconfig.h, configure.in, version.cin:
23307 Use VERSION symbol from automake for version number.
23308
23309 1998-11-28 Jesse Thilo <jthilo@gnu.org>
23310
23311 * Makefile.am:
23312 Distribute original version of simple parser (bison.s1), not built
23313 version (bison.simple).
23314
23315 1998-11-28 Jesse Thilo <jthilo@gnu.org>
23316
23317 * doc/bison.texinfo: Add info dir entry.
23318
23319 * doc/bison.texinfo:
23320 Let automake put version number into documentation.
23321
23322 1998-11-26 Jesse Thilo <jthilo@gnu.org>
23323
23324 * src/bison.cld, src/build.com, src/vmshlp.mar:
23325 Add non-RCS files from /gd/gnu/bison.
23326
23327 1998-11-26 Jesse Thilo <jthilo@gnu.org>
23328
23329 * doc/bison.1:
23330 Document the BISON_HAIRY and BISON_SIMPLE variables.
23331
23332 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23333
23334 * src/version.c: Build version.c automatically.
23335
23336 * src/reader.c:
23337 Fix token numbering (used to start at 258, not 257).
23338
23339 * src/system.h: Include config.h.
23340
23341 * src/getargs.c: Update bug report address.
23342
23343 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
23344 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
23345
23346 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23347
23348 * Makefile.am:
23349 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23350
23351 * configure.in, version.cin:
23352 Build version.c automatically.
23353
23354 * AUTHORS: Add AUTHORS file.
23355
23356 * README: Update bug report address.
23357
23358 * bison.simple:
23359 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23360
23361 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
23362 Add automake stuff.
23363
23364 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23365
23366 * doc/bison.texinfo: Clean up some formatting.
23367
23368 1998-05-05 Richard Stallman <rms@gnu.org>
23369
23370 * doc/bison.texinfo:
23371 Explain better why to make a pure parser.
23372
23373 1998-01-05 Richard Stallman <rms@gnu.org>
23374
23375 * src/files.c (openfiles):
23376 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
23377 find a temporary directory, if possible. Do not unlink files while
23378 they are open.
23379
23380 1997-08-25 Richard Stallman <rms@gnu.org>
23381
23382 * src/reader.c (stack_offset;):
23383 Change some warni to warns.
23384
23385 * src/lex.c (literalchar): Use warns, not warni.
23386
23387 1997-06-28 Richard Stallman <rms@gnu.org>
23388
23389 * src/bison.s1: Add a Bison version comment.
23390
23391 * src/main.c (fatal, warn, berror):
23392 Use program_name.
23393
23394 1997-06-28 Richard Stallman <rms@gnu.org>
23395
23396 * Makefile.in (bison_version): New variable.
23397 (dist): Use that variable.
23398 (bison.s1): Substitute the Bison version into bison.simple.
23399
23400 * bison.simple: Add a Bison version comment.
23401
23402 1997-06-18 Richard Stallman <rms@gnu.org>
23403
23404 * src/main.c (fatal, warn, berror):
23405 Make error messages standard.
23406 (toomany): Improve error message text.
23407
23408 * 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:
23409 new.h renamed to alloc.h.
23410
23411 1997-06-18 Richard Stallman <rms@gnu.org>
23412
23413 * Makefile.in: new.h renamed to alloc.h.
23414
23415 1997-05-24 Richard Stallman <rms@gnu.org>
23416
23417 * src/lex.c (literalchar):
23418 Fix the code for escaping \, " and '.
23419
23420 (lex): Avoid trouble when there are many chars
23421 to discard in a char literal with just several chars in it.
23422
23423 1997-05-17 Richard Stallman <rms@gnu.org>
23424
23425 * src/bison.s1:
23426 Use malloc, if using alloca is troublesome.
23427 (YYSTACK_USE_ALLOCA): New flag macro.
23428 Define it for some systems and compilers.
23429 (YYSTACK_ALLOC): New macro.
23430 (yyparse): Use YYSTACK_ALLOC to allocate stack.
23431 If it was malloc'd, free it.
23432
23433 1997-05-17 Richard Stallman <rms@gnu.org>
23434
23435 * bison.simple:
23436 Use malloc, if using alloca is troublesome.
23437 (YYSTACK_USE_ALLOCA): New flag macro.
23438 Define it for some systems and compilers.
23439 (YYSTACK_ALLOC): New macro.
23440 (yyparse): Use YYSTACK_ALLOC to allocate stack.
23441 If it was malloc'd, free it.
23442
23443 1997-04-23 Richard Stallman <rms@gnu.org>
23444
23445 * src/bison.s1:
23446 (alloca) [__hpux]: Always define as __builtin_alloca.
23447
23448 1997-04-23 Richard Stallman <rms@gnu.org>
23449
23450 * bison.simple:
23451 (alloca) [__hpux]: Always define as __builtin_alloca.
23452
23453 1997-04-22 Richard Stallman <rms@gnu.org>
23454
23455 * src/bison.s1:
23456 [__hpux]: Include alloca.h (right for HPUX 10)
23457 instead of declaring alloca (right for HPUX 9).
23458
23459 * src/bison.s1 (__yy_memcpy):
23460 Declare arg `count' as unsigned int.
23461 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
23462
23463 1997-04-22 Richard Stallman <rms@gnu.org>
23464
23465 * bison.simple:
23466 [__hpux]: Include alloca.h (right for HPUX 10)
23467 instead of declaring alloca (right for HPUX 9).
23468
23469 * bison.simple (__yy_memcpy):
23470 Declare arg `count' as unsigned int.
23471 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
23472
23473 1997-01-03 Richard Stallman <rms@gnu.org>
23474
23475 * src/allocate.c: [__STDC__ or _MSC_VER]:
23476 Declare calloc and realloc to return void *.
23477
23478 1997-01-02 Richard Stallman <rms@gnu.org>
23479
23480 * src/system.h:
23481 [_MSC_VER]: Include stdlib.h and process.h.
23482 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
23483
23484 * src/main.c (main): Return FAILURE as a value.
23485 (printable_version): Declare arg as int, not char.
23486
23487 1997-01-02 Richard Stallman <rms@gnu.org>
23488
23489 * Makefile.in (dist):
23490 Explicitly check for symlinks, and copy them.
23491
23492 1996-12-19 Richard Stallman <rms@gnu.org>
23493
23494 * src/files.c:
23495 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
23496
23497 1996-12-18 Paul Eggert <eggert@gnu.org>
23498
23499 * src/bison.s1 (yyparse):
23500 If __GNUC__ and YYPARSE_PARAM are both defined,
23501 declare yyparse to have a void * argument.
23502
23503 1996-12-18 Paul Eggert <eggert@gnu.org>
23504
23505 * bison.simple (yyparse):
23506 If __GNUC__ and YYPARSE_PARAM are both defined,
23507 declare yyparse to have a void * argument.
23508
23509 1996-12-17 Richard Stallman <rms@gnu.org>
23510
23511 * src/reduce.c (nbits): Add some casts.
23512
23513 1996-08-12 Richard Stallman <rms@gnu.org>
23514
23515 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
23516
23517 1996-08-12 Richard Stallman <rms@gnu.org>
23518
23519 * bison.simple: Test _MSDOS as well as _MSDOS_.
23520
23521 1996-07-31 Richard Stallman <rms@gnu.org>
23522
23523 * src/bison.s1:
23524 [__sun && __i386]: Include alloca.h.
23525
23526 1996-07-31 Richard Stallman <rms@gnu.org>
23527
23528 * bison.simple:
23529 [__sun && __i386]: Include alloca.h.
23530
23531 1996-07-30 Richard Stallman <rms@gnu.org>
23532
23533 * src/bison.s1: Comment change.
23534
23535 * src/bison.s1: Test _MSDOS_, not MSDOS.
23536
23537 1996-07-30 Richard Stallman <rms@gnu.org>
23538
23539 * bison.simple: Comment change.
23540
23541 * bison.simple: Test _MSDOS_, not MSDOS.
23542
23543 1996-06-01 Richard Stallman <rms@gnu.org>
23544
23545 * 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:
23546 Insert `_' macro around many string constants.
23547
23548 * src/main.c:
23549 Insert `_' macro around many string constants.
23550
23551 (main): Call setlocale, bindtextdomain and textdomain.
23552
23553 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
23554 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
23555 [ENABLE_NLS]: Include libintl.h.
23556 [ENABLE_NLS] (gettext): Define.
23557 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
23558 (N_, PACKAGE, LOCALEDIR): New macros.
23559
23560 1996-06-01 Richard Stallman <rms@gnu.org>
23561
23562 * POTFILES.in: New file.
23563
23564 * Makefile.in (allocate.o):
23565 Define target explicitly.
23566
23567 * Makefile.in (CFLAGS): Set to @CFLAGS@.
23568 (LDFLAGS): Set to @LDFLAGS@.
23569 (configure): Run autoconf only if preceding `cd' succeeds.
23570 (bison.s1): Redirect output to temporary file then move the
23571 temporary to the target, rather than redirecting directly to bison.s1.
23572 (clean): Remove config.status and config.log.
23573 (distclean): Don't remove config.status here.
23574
23575 1996-05-12 Richard Stallman <rms@gnu.org>
23576
23577 * src/bison.s1:
23578 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23579
23580 1996-05-12 Richard Stallman <rms@gnu.org>
23581
23582 * bison.simple:
23583 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23584
23585 1996-05-11 Richard Stallman <rms@gnu.org>
23586
23587 * src/bison.s1 (__yy_memcpy):
23588 Really reorder the args, as was supposedly done on Feb 14 1995.
23589 (yyparse): Calls changed accordingly.
23590
23591 1996-05-11 Richard Stallman <rms@gnu.org>
23592
23593 * Makefile.in (dist): Don't use $(srcdir).
23594
23595 * bison.simple (__yy_memcpy):
23596 Really reorder the args, as was supposedly done on Feb 14 1995.
23597 (yyparse): Calls changed accordingly.
23598
23599 1996-01-27 Richard Stallman <rms@gnu.org>
23600
23601 * src/output.c (output_rule_data):
23602 Test YYERROR_VERBOSE in the conditional
23603 around the definition of ttyname.
23604
23605 1995-12-29 Richard Stallman <rms@gnu.org>
23606
23607 * src/bison.s1:
23608 Fix line numbers in #line commands.
23609
23610 1995-12-29 Richard Stallman <rms@gnu.org>
23611
23612 * bison.simple:
23613 Fix line numbers in #line commands.
23614
23615 1995-12-27 Richard Stallman <rms@gnu.org>
23616
23617 * src/bison.s1 (YYPARSE_PARAM_DECL):
23618 In C++, make it always null.
23619 (YYPARSE_PARAM_ARG): New macro.
23620 (yyparse): Use YYPARSE_PARAM_ARG.
23621
23622 1995-12-27 Richard Stallman <rms@gnu.org>
23623
23624 * bison.simple (YYPARSE_PARAM_DECL):
23625 In C++, make it always null.
23626 (YYPARSE_PARAM_ARG): New macro.
23627 (yyparse): Use YYPARSE_PARAM_ARG.
23628
23629 1995-11-29 Richard Stallman <rms@gnu.org>
23630
23631 * doc/bison.texinfo:
23632 Describe literal string tokens, %raw, %no_lines, %token_table.
23633
23634 1995-11-29 Daniel Hagerty <hag@gnu.org>
23635
23636 * doc/bison.texinfo: Fixed update date
23637
23638 1995-10-16 Richard Stallman <rms@gnu.org>
23639
23640 * src/version.c: Version 1.25.
23641
23642 1995-10-16 Richard Stallman <rms@gnu.org>
23643
23644 * NEWS: *** empty log message ***
23645
23646 1995-10-16 Richard Stallman <rms@gnu.org>
23647
23648 * doc/bison.1, doc/bison.rnh:
23649 Add new options.
23650
23651 1995-10-15 Richard Stallman <rms@gnu.org>
23652
23653 * src/vmsgetargs.c, src/getargs.c:
23654 Added -n, -k, and -raw switches.
23655 (noparserflag, toknumflag, rawtoknumflag): New variables.
23656
23657 * src/symtab.h (SALIAS):
23658 New #define for adding aliases to %token.
23659 (struct bucket): Added `alias' field.
23660
23661 * src/reduce.c (reduce_grammar):
23662 Revise error message.
23663 (print_notices): Remove final `.' from error message.
23664
23665 * src/reader.c (reader_output_yylsp):
23666 New function.
23667 (readgram): Use `#if 0' around code that accepted %command
23668 inside grammar rules: The documentation doesn't allow it,
23669 and it will fail since the %command processors scan for the next %.
23670 (parse_token_decl): Extended the %token
23671 declaration to allow a multi-character symbol as an alias.
23672 (parse_thong_decl): New function.
23673 (read_declarations): Added %thong declarations.
23674 (read_declarations): Handle NOOP to deal with allowing
23675 % declarations as another means to specify the flags.
23676 (readgram): Allow %prec prior to semantics embedded in a rule.
23677 (skip_to_char, read_declarations, copy_definition)
23678 (parse_token_decl, parse_start_decl, parse_type_decl)
23679 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
23680 (get_type_name, copy_guard, copy_action, readgram)
23681 (get_type, packsymbols): Revised most error messages.
23682 Changed `fatal' to `warnxxx' to avoid aborting for error.
23683 Revised and use multiple warnxxx functions to avoid using VARARGS1.
23684 (read_declarations): Improve the error message for
23685 an invalid character. Do not abort.
23686 (read_declarations, copy_guard, copy_action): Use
23687 printable_version to avoid unprintable characters in printed output.
23688 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
23689 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
23690 Allow the type of a non-terminal can be given
23691 more than once, as long as all specifications give the same type.
23692
23693 * src/output.c:
23694 (output_headers, output_trailers, output, output_gram)
23695 (output_rule_data): Implement noparserflag variable.
23696 Implement toknumflag variable.
23697 (output): Call reader_output_yylsp to output LTYPESTR.
23698
23699 * src/main.c (main):
23700 If reader sees an error, don't process the grammar.
23701 (fatals): Updated to not use VARARGS1.
23702 (printable_version, int_to_string, warn, warni, warns, warnss)
23703 (warnsss): New error reporting functions. Avoid abort for error.
23704
23705 * src/lex.h:
23706 Added THONG and NOOP for alias processing.
23707 Added SETOPT for the new code that allows setting options with %flags.
23708
23709 * src/lex.c:
23710 Include getopt.h. Add some extern decls.
23711 (safegetc): New function to deal with EOF gracefully.
23712 (literalchar); new function to deal with reading \ escapes.
23713 (lex): Use literalchar.
23714 (lex): Implemented "..." tokens.
23715 (literalchar, lex, parse_percent_token): Made tokenbuffer
23716 always contain the token. This includes growing the token
23717 buffer while reading an integer.
23718 (parse_percent_token): Replaced if-else statement with percent_table.
23719 (parse_percent_token): Added % declarations as another
23720 way to specify the flags -n, -l, and -r. Also added hooks for
23721 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
23722 major changes to files.c.
23723 (lex) Retain in the incoming stream a character following
23724 an incorrect '/'.
23725 (skip_white_space, lex): Revised most error messages
23726 and changed fatal to warn to avoid aborting.
23727 (percent_table): Added %thong declarations.
23728
23729 * src/gram.h: Comment changes.
23730
23731 * src/files.c (openfiles, open_extra_files, done):
23732 Add faction flag
23733 and actfile file. Handle noparserflag. Both for -n switch.
23734
23735 * src/conflicts.c (resolve_sr_conflict):
23736 Remove use of alloca.
23737
23738 1995-06-01 Jim Meyering <meyering@gnu.org>
23739
23740 * doc/bison.texinfo: *** empty log message ***
23741
23742 1995-05-06 Richard Stallman <rms@gnu.org>
23743
23744 * src/bison.s1: Comment change.
23745
23746 1995-05-06 Richard Stallman <rms@gnu.org>
23747
23748 * bison.simple: Comment change.
23749
23750 1995-05-03 Richard Stallman <rms@gnu.org>
23751
23752 * src/version.c: Version now 1.24.
23753
23754 * src/bison.s1: Change distribution terms.
23755
23756 * src/version.c: Version now 1.23.
23757
23758 1995-05-03 Richard Stallman <rms@gnu.org>
23759
23760 * doc/bison.texinfo:
23761 Rewrite "Conditions for Using Bison".
23762 Update version to 1.24.
23763
23764 1995-05-03 Richard Stallman <rms@gnu.org>
23765
23766 * bison.simple: Change distribution terms.
23767
23768 1995-02-23 Richard Stallman <rms@gnu.org>
23769
23770 * src/files.c: Test __VMS_POSIX as well as VMS.
23771
23772 1995-02-14 Jim Meyering <meyering@gnu.org>
23773
23774 * src/bison.s1 (__yy_memcpy):
23775 Renamed from __yy_bcopy to avoid
23776 confusion. Reverse FROM and TO arguments to be consistent with
23777 those of memcpy.
23778
23779 1995-02-14 Jim Meyering <meyering@gnu.org>
23780
23781 * bison.simple (__yy_memcpy):
23782 Renamed from __yy_bcopy to avoid
23783 confusion. Reverse FROM and TO arguments to be consistent with
23784 those of memcpy.
23785
23786 1994-11-10 David J. MacKenzie <djm@gnu.org>
23787
23788 * NEWS: reformat
23789
23790 * NEWS: New file.
23791
23792 * Makefile.in (DISTFILES): Include NEWS.
23793
23794 * Makefile.in (DISTFILES):
23795 Include install-sh, not install.sh.
23796
23797 * configure.in: Update to Autoconf v2 macro names.
23798
23799 1994-10-05 David J. MacKenzie <djm@gnu.org>
23800
23801 * Makefile.in: fix typo
23802
23803 * Makefile.in (prefix, exec_prefix):
23804 Let configure set them.
23805
23806 1994-09-28 David J. MacKenzie <djm@gnu.org>
23807
23808 * Makefile.in: Set datadir to $(prefix)/share.
23809
23810 1994-09-15 Richard Stallman <rms@gnu.org>
23811
23812 * src/bison.s1:
23813 Update copyright notice and GPL version.
23814
23815 1994-09-15 Richard Stallman <rms@gnu.org>
23816
23817 * bison.simple:
23818 Update copyright notice and GPL version.
23819
23820 1994-07-12 Richard Stallman <rms@gnu.org>
23821
23822 * src/reduce.c, src/reader.c:
23823 entered into RCS
23824
23825 1994-05-05 David J. MacKenzie <djm@gnu.org>
23826
23827 * Makefile.in: entered into RCS
23828
23829 1994-03-26 Richard Stallman <rms@gnu.org>
23830
23831 * src/bison.s1: entered into RCS
23832
23833 1994-03-26 Richard Stallman <rms@gnu.org>
23834
23835 * bison.simple: entered into RCS
23836
23837 1994-03-25 Richard Stallman <rms@gnu.org>
23838
23839 * src/main.c: entered into RCS
23840
23841 1994-03-24 Richard Stallman <rms@gnu.org>
23842
23843 * src/conflicts.c: entered into RCS
23844
23845 1994-01-02 Richard Stallman <rms@gnu.org>
23846
23847 * Makefile.in: *** empty log message ***
23848
23849 1993-11-21 Richard Stallman <rms@gnu.org>
23850
23851 * src/bison.s1: *** empty log message ***
23852
23853 1993-11-21 Richard Stallman <rms@gnu.org>
23854
23855 * doc/bison.texinfo: entered into RCS
23856
23857 * doc/bison.texinfo: *** empty log message ***
23858
23859 1993-11-21 Richard Stallman <rms@gnu.org>
23860
23861 * bison.simple: *** empty log message ***
23862
23863 1993-10-25 David J. MacKenzie <djm@gnu.org>
23864
23865 * doc/bison.texinfo: *** empty log message ***
23866
23867 1993-10-19 Richard Stallman <rms@gnu.org>
23868
23869 * src/bison.s1: *** empty log message ***
23870
23871 1993-10-19 Richard Stallman <rms@gnu.org>
23872
23873 * bison.simple: *** empty log message ***
23874
23875 1993-10-14 Richard Stallman <rms@gnu.org>
23876
23877 * src/bison.s1: *** empty log message ***
23878
23879 1993-10-14 Richard Stallman <rms@gnu.org>
23880
23881 * bison.simple: *** empty log message ***
23882
23883 1993-09-14 David J. MacKenzie <djm@gnu.org>
23884
23885 * doc/bison.texinfo: *** empty log message ***
23886
23887 1993-09-13 Noah Friedman <friedman@gnu.org>
23888
23889 * Makefile.in: *** empty log message ***
23890
23891 1993-09-10 Richard Stallman <rms@gnu.org>
23892
23893 * src/conflicts.c: *** empty log message ***
23894
23895 * src/system.h: entered into RCS
23896
23897 1993-09-10 Richard Stallman <rms@gnu.org>
23898
23899 * doc/bison.1: entered into RCS
23900
23901 1993-09-06 Noah Friedman <friedman@gnu.org>
23902
23903 * src/version.c: entered into RCS
23904
23905 1993-09-06 Noah Friedman <friedman@gnu.org>
23906
23907 * Makefile.in: *** empty log message ***
23908
23909 1993-07-30 David J. MacKenzie <djm@gnu.org>
23910
23911 * Makefile.in: *** empty log message ***
23912
23913 1993-07-24 Richard Stallman <rms@gnu.org>
23914
23915 * src/bison.s1: *** empty log message ***
23916
23917 1993-07-24 Richard Stallman <rms@gnu.org>
23918
23919 * bison.simple: *** empty log message ***
23920
23921 1993-07-08 David J. MacKenzie <djm@gnu.org>
23922
23923 * Makefile.in: *** empty log message ***
23924
23925 1993-07-04 Richard Stallman <rms@gnu.org>
23926
23927 * src/bison.s1: *** empty log message ***
23928
23929 1993-07-04 Richard Stallman <rms@gnu.org>
23930
23931 * bison.simple: *** empty log message ***
23932
23933 1993-06-26 David J. MacKenzie <djm@gnu.org>
23934
23935 * src/getargs.c: entered into RCS
23936
23937 1993-06-26 David J. MacKenzie <djm@gnu.org>
23938
23939 * doc/bison.texinfo: *** empty log message ***
23940
23941 * doc/bison.1: New file.
23942
23943 1993-06-25 Richard Stallman <rms@gnu.org>
23944
23945 * src/getargs.c: New file.
23946
23947 1993-06-16 Richard Stallman <rms@gnu.org>
23948
23949 * src/bison.s1: *** empty log message ***
23950
23951 1993-06-16 Richard Stallman <rms@gnu.org>
23952
23953 * bison.simple: *** empty log message ***
23954
23955 1993-06-03 Richard Stallman <rms@gnu.org>
23956
23957 * src/bison.s1: New file.
23958
23959 1993-06-03 Richard Stallman <rms@gnu.org>
23960
23961 * doc/bison.texinfo: *** empty log message ***
23962
23963 1993-06-03 Richard Stallman <rms@gnu.org>
23964
23965 * bison.simple: New file.
23966
23967 1993-05-19 Richard Stallman <rms@gnu.org>
23968
23969 * doc/bison.texinfo: New file.
23970
23971 1993-05-07 Noah Friedman <friedman@gnu.org>
23972
23973 * Makefile.in: *** empty log message ***
23974
23975 1993-04-28 Noah Friedman <friedman@gnu.org>
23976
23977 * src/reader.c: *** empty log message ***
23978
23979 1993-04-23 Noah Friedman <friedman@gnu.org>
23980
23981 * src/alloc.h: entered into RCS
23982
23983 1993-04-20 David J. MacKenzie <djm@gnu.org>
23984
23985 * src/version.c: *** empty log message ***
23986
23987 * src/files.c, src/allocate.c:
23988 entered into RCS
23989
23990 * src/reader.c: *** empty log message ***
23991
23992 * src/lex.c: entered into RCS
23993
23994 * src/conflicts.c: New file.
23995
23996 * src/symtab.c: entered into RCS
23997
23998 * src/alloc.h: New file.
23999
24000 * src/LR0.c: entered into RCS
24001
24002 1993-04-18 Noah Friedman <friedman@gnu.org>
24003
24004 * src/reader.c: New file.
24005
24006 * src/version.c: *** empty log message ***
24007
24008 1993-04-18 Noah Friedman <friedman@gnu.org>
24009
24010 * Makefile.in: *** empty log message ***
24011
24012 1993-04-17 Noah Friedman <friedman@gnu.org>
24013
24014 * Makefile.in: *** empty log message ***
24015
24016 1993-04-15 Richard Stallman <rms@gnu.org>
24017
24018 * src/main.c, src/files.c:
24019 New file.
24020
24021 1993-04-15 Noah Friedman <friedman@gnu.org>
24022
24023 * configure.in: entered into RCS
24024
24025 * configure.in: *** empty log message ***
24026
24027 * configure.in: New file.
24028
24029 1993-04-14 Richard Stallman <rms@gnu.org>
24030
24031 * Makefile.in: New file.
24032
24033 1993-04-13 Richard Stallman <rms@gnu.org>
24034
24035 * src/version.c: New file.
24036
24037 1993-03-25 Richard Stallman <rms@gnu.org>
24038
24039 * src/output.c: entered into RCS
24040
24041 1992-09-25 Richard Stallman <rms@gnu.org>
24042
24043 * configure.bat: entered into RCS
24044
24045 1992-06-22 Richard Stallman <rms@gnu.org>
24046
24047 * src/vmsgetargs.c: entered into RCS
24048
24049 1992-06-22 Richard Stallman <rms@gnu.org>
24050
24051 * doc/bison.rnh: entered into RCS
24052
24053 1992-04-20 David J. MacKenzie <djm@gnu.org>
24054
24055 * README: entered into RCS
24056
24057 1992-01-22 Richard Stallman <rms@gnu.org>
24058
24059 * src/machine.h: entered into RCS
24060
24061 1991-12-21 Richard Stallman <rms@gnu.org>
24062
24063 * src/lalr.c, src/closure.c:
24064 entered into RCS
24065
24066 1991-12-20 Richard Stallman <rms@gnu.org>
24067
24068 * src/state.h: entered into RCS
24069
24070 1991-12-18 Richard Stallman <rms@gnu.org>
24071
24072 * src/print.c, src/nullable.c, src/derives.c:
24073 entered into RCS
24074
24075 1991-11-03 David J. MacKenzie <djm@gnu.org>
24076
24077 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
24078 entered into RCS
24079
24080 1988-09-09 Richard Stallman <rms@gnu.org>
24081
24082 * src/bison.hairy: entered into RCS
24083
24084 1987-12-16 Richard Stallman <rms@gnu.org>
24085
24086 * REFERENCES: entered into RCS
24087
24088
24089 -----
24090
24091 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
24092 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
24093 2008, 2009 Free Software Foundation, Inc.
24094
24095 Copying and distribution of this file, with or without
24096 modification, are permitted provided the copyright notice and this
24097 notice are preserved.