]> git.saurik.com Git - bison.git/blob - ChangeLog
Keep sub-messages aligned. Fix strings for translation.
[bison.git] / ChangeLog
1 2009-09-19 Alex Rozenman <rozenman@gmail.com>
2
3 Keep sub-messages aligned. Fix strings for translation.
4 * src/location.h: (location_print): Add return value.
5 * src/location.c: (location_print): Return number of printed
6 characters.
7 * src/complain.h: Two new functions (complain_at_indent,
8 warn_at_indent).
9 * src/complain.cpp: Implement the alignment mechanism. Add new
10 static variable (indent_ptr). Use and update it (error_message,
11 complain_at_indent, warn_at_indent).
12 * src/scan-code.l: Fix strings for translations. Use new *_indent
13 functions (parse_ref, show_sub_messages).
14 * NEWS (2.5): Add an announcement about named references.
15
16 2009-09-17 Akim Demaille <demaille@gostai.com>
17
18 doc: fixes.
19 * doc/bison.texinfo: here.
20 Reported by Alex Rozenman.
21
22 2009-09-16 Akim Demaille <demaille@gostai.com>
23
24 doc: lalr1.cc and variants.
25 * doc/bison.texinfo (Decl Summary): Document the "lex_symbol" and
26 "variant" %define variables.
27 (C++ Semantic Values): Split into...
28 (C++ Unions, C++ Variants): these.
29 The latter is new.
30 (C++ Parser Interface): Fix type names.
31 Document parser::syntax_error.
32 Document the fact that locations are not mandatory.
33 (C++ Scanner Interface): Split into...
34 (Split Symbols, Complete Symbols): these.
35 The later is new.
36 (Calc++ Parsing Driver): Use variants.
37 Add more comments.
38 Adjust style.
39 (Calc++ Parser): Declare all the tokens, no
40 longer accept raw characters.
41 Remove %union.
42 Adjust types and printers.
43 Remove destructors.
44 (Calc++ Scanner): Use make_<SYMBOL> functions.
45 Use strerror in error message.
46
47 2009-09-16 Akim Demaille <demaille@gostai.com>
48
49 doc: spell checking.
50 * doc/bison.texinfo: here.
51
52 2009-09-16 Akim Demaille <demaille@gostai.com>
53
54 doc: comment changes.
55 * doc/bison.texinfo: Comment changes.
56
57 2009-09-16 Akim Demaille <demaille@gostai.com>
58
59 lalr1.cc: factor the yytranslate_ invocation in make_SYMBOLS.
60 * data/c++.m4, data/lalr1.cc (parser::symbol_type): Change the
61 constructor to take a token_type instead of the (internal) symbol
62 number.
63 Call yytranslate_.
64 * data/variant.hh (b4_symbol_constructor_define_): Therefore,
65 don't call yytranslate_ here.
66
67 2009-09-16 Akim Demaille <demaille@gostai.com>
68
69 TODO: statistics.
70 * TODO (Figures): New.
71
72 2009-09-13 Joel E. Denny <jdenny@clemson.edu>
73
74 tests: clean up push.at test group titles.
75 * tests/push.at: Remove "Push Parsing: " from test group titles
76 because these are already under the banner "Push Parsing Tests".
77
78 2009-09-12 Alex Rozenman <rozenman@gmail.com>
79
80 Provide an additional sub-message for clarity.
81 Add "symbol not found in production" error message when
82 an "invalid reference" is detected in named references
83 resolution.
84 * src/scan-code.l: Update "invalid reference" case.
85 * tests/named-ref.at: Adjust test-cases.
86
87 2009-09-10 Joel E. Denny <jdenny@clemson.edu>
88
89 Clean up yacc.c a little.
90 * data/yacc.c: Clean up M4 for readability, and make output
91 whitespace more consistent. For the main parse function
92 comment, instead of saying "yyparse or yypush_parse", say either
93 "yyparse" or "yypush_parse" depending on which it actually is.
94
95 2009-09-10 Joel E. Denny <jdenny@clemson.edu>
96
97 Fix --enable-gcc-warnings.
98 * src/parse-gram.y (%printer <param>): Handle param_none.
99
100 2009-09-09 Akim Demaille <demaille@gostai.com>
101
102 lalr1.cc: syntax_error as exceptions.
103 It is common to use sort of factories in the user actions. These
104 factories may check some "syntactic" constraints that are not
105 enforced by the grammar itself. This is possible using YYERROR
106 within the action itself. Provide the user with a means to throw
107 a syntax_error exception.
108
109 * data/c++.m4 (b4_public_types_declare, b4_public_types_define):
110 Declare and define yy::parser::syntax_error.
111 * data/lalr1.cc: Include stdexcept.
112 (yy::parser::parse): Wrap the user action within a try/catch.
113 * data/glr.cc: Include stdexcept.
114
115 2009-09-09 Akim Demaille <demaille@gostai.com>
116
117 lalr1.cc: add missing "inline".
118 * data/c++.m4 (b4_public_types_define): Add missing inline to
119 implementations provided in headers.
120
121 2009-09-09 Akim Demaille <demaille@gostai.com>
122
123 %param: documentation.
124 * NEWS (2.6): Document %param, %lex-param, and %parse-param
125 changes.
126 * doc/bison.texinfo: Document that %lex-param and %parse-param
127 are n-ary.
128 Changes some examples to demonstrate it.
129 (Calc++ Parser): Use %param.
130
131 2009-09-09 Akim Demaille <demaille@gostai.com>
132
133 Regen.
134
135 2009-09-09 Akim Demaille <demaille@gostai.com>
136
137 style changes.
138 * src/parse-gram.y (add_param): Scope changes.
139
140 2009-09-09 Akim Demaille <demaille@gostai.com>
141
142 %parse: support several arguments.
143 * src/parse-gram.y (current_param): New.
144 (param_type): Add param_none.
145 (params): New nonterminal.
146 Use it.
147
148 2009-09-09 Akim Demaille <demaille@gostai.com>
149
150 Regen.
151
152 2009-09-09 Akim Demaille <demaille@gostai.com>
153
154 %param.
155 Provide a means to factor lex-param and parse-param common
156 declarations.
157
158 * src/parse-gram.y (param_type): New.
159 Define a %printer for it.
160 (add_param): Use it.
161 (%parse-param, %lex-param): Merge into...
162 (%parse): this new token.
163 Adjust the grammar to use it.
164 * src/scan-gram.l (RETURN_VALUE): New.
165 (RETURN_PERCENT_FLAG): Use it.
166 (RETURN_PERCENT_PARAM): New.
167 Use it to support %parse-param, %lex-param and %param.
168
169 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
170
171 Use aver not assert.
172 * src/output.c: Don't include assert.h.
173 (output_skeleton): Use aver not assert.
174 * src/system.h (aver): In documentation of why, add links to
175 Paul Eggert's explanations in the mailing lists.
176
177 2009-09-05 Alex Rozenman <rozenman@gmail.com>
178
179 Use "Unresolved reference" error message when no symbols were found
180 in a symbolic reference resolution. Remove .expr and -expr from
181 the shown reference when the reference is unresolved.
182 * src/scan-code.l: Change the error message, adjust location columns,
183 rename variable "exact_mode" to "explicit_bracketing".
184 * tests/named-ref.at: Adjust existing tests and add a new one.
185
186 2009-09-04 Akim Demaille <demaille@gostai.com>
187
188 Adjust synclines in src/parse-gram.[ch].
189 * tests/bison.in: Do some magic (including working around issues
190 with ylwrap) when this wrapper is used to compile
191 src/parse-gram.y.
192
193 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
194
195 Complain about unused %define variables and %code qualifiers.
196 * NEWS (2.5): Document.
197 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
198 * doc/bison.texinfo (Decl Summary): Document complaint, and
199 improve %define documentation a little otherwise.
200 * tests/input.at (Reject unused %code qualifiers): Update.
201 (%define errors): Update.
202 (%define, --define, --force-define): Update.
203 (%define backward compatibility): Update.
204 (Unused %define api.pure): Update.
205 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
206
207 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
208
209 Don't suppress warnings about unused parse.error.
210 * data/bison.m4 (b4_error_verbose_flag): Don't examine value of
211 %define variable parse.error unless b4_error_verbose_flag is
212 actually expanded in a skeleton.
213
214 2009-09-03 Akim Demaille <demaille@gostai.com>
215
216 * NEWS (2.4.2): Add "Internationalization" item.
217
218 2009-09-03 Akim Demaille <demaille@gostai.com>
219
220 bootstrap: fix/improve find_tool.
221 * bootstrap (find_tool): Improve error messages.
222 Fix typo about find_tool_names.
223
224 2009-08-29 Joel E. Denny <jdenny@clemson.edu>
225
226 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
227 See
228 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
229 * src/scan-code.h (code_props_rule_action_init): Rename
230 named_ref arg to name so it doesn't shadow named_ref type. This
231 makes it consistent with the function definition in scan-code.l
232 anyway.
233
234 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
235
236 %define: accept unquoted values.
237 * NEWS (2.5): Group all %define changes together, and document
238 this one. Remove quotes in IELR and canonical LR entry.
239 * doc/bison.texinfo: Remove quotes in most examples throughout.
240 (Decl Summary): Update %define documentation.
241 (Table of Symbols): Likewise.
242 * src/ielr.c (LrType): Update documentation.
243 * src/parse-gram.y (content.opt): Add production for ID.
244 * tests/actions.at: Remove quotes in most tests.
245 * tests/calc.at: Likewise.
246 * tests/existing.at: Likewise.
247 * tests/input.at: Likewise.
248 * tests/local.at: Likewise.
249 * tests/push.at: Likewise.
250 * tests/reduce.at: Likewise.
251 * tests/torture.at: Likewise.
252
253 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
254
255 %define lr.type: make values lowercase IDs.
256 That is, "LALR" => "lalr", "IELR" => "ielr", and
257 "canonical LR" => "canonical-lr".
258 * NEWS (2.5): Update documentation.
259 * doc/bison.texinfo (Decl Summary): Likewise.
260 * src/ielr.c (ielr): Use new values.
261 * src/ielr.h (ielr): Update documentation.
262 * src/reader.c (prepare_percent_define_front_end_variables): Use
263 and validate new values.
264 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
265 grammars.
266 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
267
268 2009-08-27 Eric Blake <ebb9@byu.net>
269
270 scan-gram: avoid portability trap with ctype usage.
271 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
272 Avoid compiler warning.
273
274 2009-08-27 Joel E. Denny <jdenny@clemson.edu>
275
276 tests: use perl for printing special sequences to files.
277 And skip tests if perl is not available. This is better than
278 playing tricks with shell portability. Suggested by Akim
279 Demaille.
280 * tests/input.at (Bad character literals): Use it here for
281 omitting final newlines.
282 (Bad escapes in literals): Use it here for special characters.
283
284 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
285
286 tests: show a use of %define lr.default-reductions "consistent"
287 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
288 prevents the omission of expected tokens for %error-verbose.
289
290 2009-08-26 Akim Demaille <demaille@gostai.com>
291
292 tests: portability fix.
293 * tests/input.at (Bad escapes in literals): Don't expect "echo
294 '\0'" to output \ then 0.
295
296 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
297
298 Actually handle the yytable zero value correctly this time.
299 * data/bison.m4 (b4_integral_parser_tables_map): Don't mention
300 zero values in the YYTABLE comments.
301 * data/glr.c (yytable_value_is_error): Don't check for zero
302 value.
303 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
304 * data/yacc.c (yytable_value_is_error): Likewise.
305 * data/lalr1.java (yy_table_value_is_error_): Likewise.
306 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
307 * src/tables.h: In header comments, explain why it's useless to
308 check for a zero value in yytable.
309
310 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
311
312 More fixes related to last two patches.
313 * data/bison.m4 (b4_integral_parser_tables_map): Fix YYTABLE
314 comments: zero indicates syntax error not default action.
315 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
316 defined.
317 * data/glr.c (yyis_pact_ninf): Rename to...
318 (yypact_value_is_default): ... this.
319 (yyisDefaultedState): Update for rename.
320 (yyis_table_ninf): Rename to...
321 (yytable_value_is_error): ... this, and check for value zero
322 besides just YYTABLE_NINF.
323 (yygetLRActions): Check for default value from yypact. It
324 appears that this check is always performed before this function
325 is invoked, and so adding the check here is probably redundant.
326 However, the code may evolve after this subtlety is forgotten.
327 Also, update for rename to yytable_value_is_error. Because that
328 macro now checks for zero, a different but equivalent branch of
329 the if-then-else here is evaluated.
330 (yyreportSyntaxError): Update for rename to
331 yytable_value_is_error. The zero condition was mishandled
332 before.
333 (yyrecoverSyntaxError): Update for renames. No behavioral
334 changes.
335 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
336 New function.
337 (yy_table_value_is_error_): New function.
338 (parse): Use new functions where possible. No behavioral
339 changes.
340 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
341 The zero condition was mishandled before.
342 * data/yacc.c (yyis_pact_ninf): Rename to...
343 (yypact_value_is_default): ... this.
344 (yyis_table_ninf): Rename to...
345 (yytable_value_is_error): ... this, and check for value zero
346 besides just YYTABLE_NINF.
347 (yysyntax_error): Update for rename to yytable_value_is_error.
348 The zero condition was mishandled before.
349 (yyparse): Update for renames. No behavioral changes.
350 * src/tables.h: Improve comments about yypact, yytable, etc.
351 more. Most importantly, say yytable value of zero means syntax
352 error not default action.
353
354 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
355
356 Fix %error-verbose for conflicts resolved by %nonassoc.
357 * NEWS (2.5): Document.
358 * data/glr.c (yyreportSyntaxError): Fix this by checking
359 yyis_table_ninf.
360 * data/yacc.c (yysyntax_error): Likewise.
361 * data/lalr1.cc (yysyntax_error_): Fix this by checking
362 yytable_ninf_.
363 * data/lalr1.java (yysyntax_error): Likewise.
364 * tests/conflicts.at (%nonassoc and eof): Update expected output
365 and remove FIXME.
366
367 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
368
369 Some code and documentation improvements.
370 * data/c.m4 (b4_table_value_equals): New macro to capture
371 some repeated code.
372 * data/glr.c (yyis_pact_ninf): Use it here.
373 (yyis_table_ninf): Likewise.
374 (yyreportSyntaxError): Improve internal comments.
375 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
376 Use it everywhere possible.
377 (yyis_table_ninf): Likewise.
378 (yysyntax_error): Improve internal comments.
379 * data/lalr1.cc (yysyntax_error_): Likewise.
380 * data/lalr1.java (yysyntax_error): Likewise.
381 * src/tables.h: Improve comments about yypact, yytable, etc.
382
383 2009-08-21 Joel E. Denny <jdenny@clemson.edu>
384
385 Use locale when quoting.
386 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
387 quote rather than implementing quoting here.
388
389 2009-08-20 Eric Blake <ebb9@byu.net>
390
391 Make previous patch more robust.
392 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
393 argmatch.h.
394 (output_skeleton): Use it.
395 Suggested by Akim Demaille.
396
397 Import latest m4/m4.m4.
398 * submodules/autoconf: Update to autoconf 2.64.
399 * configure.ac (M4_GNU_OPTION): New define.
400 * src/output.c (output_skeleton): Use it to resolve FIXME.
401 * NEWS: Mention this.
402
403 2009-08-19 Joel E. Denny <jdenny@clemson.edu>
404
405 Fix complaints about escape sequences.
406 Discussed starting at
407 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
408 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
409 For a \0 and similar escape sequences meaning the null
410 character, report an invalid escape sequence instead of an
411 invalid null character because the latter does not actually
412 appear in the user's input.
413 In all escape sequence complaints, don't escape the initial
414 backslash, and don't quote when the sequence appears at the end
415 of the complaint line unless there's whitespace that quotearg
416 won't escape.
417 Consistently say "invalid" not "unrecognized".
418 Consistently prefer "empty character literal" over "extra
419 characters in character literal" warning for invalid escape
420 sequences; that is, consistently discard those sequences.
421 * tests/input.at (Bad escapes in literals): New.
422
423 2009-08-19 Akim Demaille <demaille@gostai.com>
424
425 doc: fixes.
426 * doc/bison.texinfo: Fix minor Texinfo errors.
427
428 2009-08-19 Akim Demaille <demaille@gostai.com>
429
430 tests: distcc compliance.
431 * tests/synclines.at (AT_SYNCLINES_COMPILE): Discard distcc's
432 error messages from the output.
433
434 2009-08-19 Akim Demaille <demaille@gostai.com>
435
436 variables: simplify the upgrade of namespace into api.namespace.
437
438 This patch simplifies "variables: rename namespace as
439 api.namespace", commit 67501061076ba46355cfd9f9361c7eed861b389c.
440 Suggested by Joel E. Denny in
441 http://lists.gnu.org/archive/html/bison-patches/2009-07/msg00006.html
442
443 * src/muscle-tab.c (muscle_percent_variable_update): New.
444 (muscle_percent_define_insert): Use it in replacement of the
445 previous tr invocation.
446 Remove variable_tr, no longer needed.
447 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
448 Remove.
449 * data/c++.m4: No longer handle namespace -> api.namespace.
450 * tests/input.at (%define backward compatibility): Check that
451 namespace is treated as api.namespace.
452
453 2009-08-19 Akim Demaille <demaille@gostai.com>
454
455 doc: %initial-action to initialize yylloc.
456 Reported by Bill Allombert.
457 * doc/bison.texinfo: Set fill-column to 76.
458 (Location Type): Document the use of %initial-action to initialize
459 yylloc.
460
461 2009-08-19 Akim Demaille <demaille@gostai.com>
462
463 lalr1.cc: use state_type.
464 * data/lalr1.cc (yysyntax_error_): Use state_type.
465 Move argument names into yy*.
466
467 2009-08-19 Akim Demaille <demaille@gostai.com>
468
469 lalr1.cc: get rid of yyparse's yystate.
470 yystate and yystack_[0].state are equal, keep only the latter.
471 The former was also used as a temporary variable to compute the
472 post-reduction state. Move this computation into an auxiliary
473 function.
474
475 * data/glr.c (yyLRgotoState): Fuse variable definition and first
476 assignment.
477 * data/lalr1.cc (yy_lr_goto_state_): New.
478 (yyparse): Use it.
479 Replace remaining uses of yystate by yystate_[0].state.
480 Remove the former.
481
482 2009-08-19 Akim Demaille <demaille@gostai.com>
483
484 lalr1.cc: destroy $$ when YYERROR is called.
485 * data/lalr1.cc (yyreduce): Compute the resulting state before
486 running the user action so that yylhs is a valid symbol.
487 (yyerrorlab): Since yylhs is complete (it knows its type), we can
488 simply call yy_destroy_ to destroy $$ on YYERROR invocations.
489 * tests/c++.at (AT_CHECK_VARIANTS): Test YYERROR with variants.
490
491 2009-08-18 Joel E. Denny <jdenny@clemson.edu>
492
493 maint: update for gnulib's recent update-copyright changes
494 * gnulib: Update.
495 * .x-update-copyright (COPYING): Add as it's no longer implied
496 when .x-update-copyright is present.
497 * cfg.mk (update-copyright-local): Remove, now ignored.
498 (update-copyright): Declare update-b4-copyright as a dependency.
499
500 2009-08-17 Akim Demaille <demaille@gostai.com>
501
502 build: require gettext 0.17.
503
504 Suggested by Bruno Haible.
505 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
506 * configure.ac: require gettext 0.17 to ensure compatibility with
507 gnulib.
508
509 2009-08-17 Akim Demaille <demaille@gostai.com>
510
511 build: lower gettext requirements.
512
513 Bison was uselessly requiring the formatstring macros from
514 gettext, which resulted in mo files not being installed on systems
515 that perfectly supported Bison mo files. Lower the requirement.
516 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
517
518 * configure.ac: Require need-ngettext instead of
519 need-formatstring-macros.
520 Reported by Martin Jabocs.
521 Suggested by Bruno Haible.
522 * INSTALL: Restructure.
523 (Internationalization): New.
524
525 2009-08-14 Joel E. Denny <jdenny@clemson.edu>
526
527 maint: fix use of copyright year intervals.
528 * gnulib: Update.
529 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
530 as now recommended in gnulib/NEWS.
531 * build-aux/update-b4-copyright: Fix.
532 * cfg.mk (update-copyright-env): Configure update-copyright.
533
534 2009-08-13 Joel E. Denny <jdenny@clemson.edu>
535
536 Make it easier to write deterministic tests.
537 Continues Akim's work from his 2009-06-10 commits.
538 * src/reader.c (check_and_convert_grammar): Don't add any
539 symbols after the first symbols_do invocation.
540 * src/symtab.c (symbols_sorted): New static global.
541 (user_token_number_redeclaration): Update comments.
542 (symbol_from_uniqstr): If a new symbol is being created, assert
543 that symbols_sorted hasn't been allocated yet.
544 (symbols_free): Free symbols_sorted.
545 (symbols_cmp, symbols_cmp_qsort): New functions.
546 (symbols_do): Sort symbol_table into symbols_sorted on first
547 invocation.
548 * tests/input.at (Numbered tokens): Recombine tests now that the
549 output should be deterministic across multiple numbers.
550
551 2009-08-12 Akim Demaille <demaille@gostai.com>
552
553 tests: GCC 4.5 compliance.
554 * tests/synclines.at (AT_SYNCLINES_COMPILE): Adjust to GCC 4.5's
555 messages about #error.
556
557 2009-08-12 Akim Demaille <demaille@gostai.com>
558
559 build: fix the generation of the documentation.
560 Some of our targets use "bison --help", but they can't depend on
561 "bison" itself (to avoid additional requirements on the user), so
562 they used to call "make src/bison" in the commands. Then
563 concurrent builds may fail: one make might be aiming one of its
564 jobs at compiling src/bison, and another job at generating the man
565 page. If the latter is faster than the former, then we have two
566 makes that concurrently try to compile src/bison.
567
568 This might also be a more convincing explanation for the failure
569 described in the patch "build: fix paths".
570
571 * Makefile.am (SUFFIXES): Initialize.
572 * build-aux/move-if-change: New, symlink to gnulib's.
573 * build-aux/local.mk: Ship it.
574 * doc/common.x: Remove, merged into...
575 * doc/bison.x: here.
576 * doc/local.mk (doc/bison.help): New.
577 ($(CROSS_OPTIONS_TEXI)): Depend on it.
578 Use src/bison.
579 (.x.1): Replace with...
580 (doc/bison.1): this explicit, simpler, target.
581 (common_dep): Remove, inlined where appropriate.
582 (SUFFIXES, PREPATH): Remove, unused.
583
584 2009-08-12 Akim Demaille <demaille@gostai.com>
585
586 gnulib: improve prefixing.
587 * configure.ac (gl_PREFIXED_LIBOBJS): Don't rename it, rather,
588 change the value of...
589 (gl_LIBOBJS): this.
590 Adjust more variables.
591 * etc/prefix-gnulib-mk (prefix_assignment): Don't rename
592 gl_LIBOBJS.
593 (prefix): Also transform rules whose targets have slashes.
594 Use $prefix liberally.
595 Map @MKDIR_P@ to $(MKDIR_P).
596 Prefix directories that are mkdir'd.
597
598 2009-08-12 Akim Demaille <demaille@gostai.com>
599
600 build: fix paths.
601 When using $(top_builddir) inconsistently, Make (including GNU
602 Make) is sometimes confused. As a result it may want to build
603 lib/libbison.la and $(top_builddir)/lib/libbison.la (the same
604 file, different names) concurrently, which, amusingly enough,
605 might end with:
606
607 ranlib lib/libbison.a
608 ranlib lib/libbison.a
609 make[2]: *** [lib/libbison.a] Segmentation fault
610
611 on OS X.
612
613 * doc/local.mk, src/local.mk: Do not use $(top_builddir) when not
614 needed.
615
616 2009-08-12 Akim Demaille <demaille@gostai.com>
617
618 distcheck: fix.
619
620 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
621
622 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
623
624 * tests/local.mk (TESTSUITE_AT): Add named-refs.at.
625
626 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
627
628 Miscellaneous code readability improvements.
629
630 * src/reader.c (reader): Move %define front-end variable
631 defaults and checking into...
632 (prepare_percent_define_front_end_variables): ... this new
633 function.
634
635 * src/scan-gram.l (INITIAL): For consistency with string
636 literals, don't store open quote on character literal. It's
637 discarded before returning anyway.
638 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
639 Make length test more readable, and make the character stored
640 for an empty literal more obvious while consistent with the
641 previous behavior.
642
643 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
644 USER_NUMBER_HAS_STRING_ALIAS throughout.
645 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
646 that is repeated in symtab.h. Improve argument names to make it
647 clear which side of the symbol-string alias pair is which.
648 (symbol_check_alias_consistency): Improve local variable names
649 for the same purpose.
650 * src/symtab.h (struct symbol): Make comments about aliases
651 clearer.
652 (symbol_make_alias): Improve comments and argument name.
653 * src/output.c (token_definitions_output): Update for rename to
654 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
655
656 2009-08-08 Alex Rozenman <rozenman@gmail.com>
657
658 Convert "misleading reference" messages to warnings.
659 * src/scan-code.l: New function 'show_sub_messages', more
660 factoring.
661 * tests/named-ref.at: Adjust tests.
662
663 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
664
665 maint: run "make update-copyright"
666
667 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
668
669 maint: make update-b4-copyright easier to use
670 * build-aux/update-b4-copyright: In warnings, report line
671 numbers rather than character positions.
672 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
673 that update-copyright runs it.
674 * gnulib: Update.
675
676 2009-08-05 Joel E. Denny <jdenny@clemson.edu>
677
678 maint: clean up update-b4-copyright code
679 * build-aux/update-b4-copyright: Do not accept 2-digit
680 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
681 Don't accept a `[' in a b4_copyright argument.
682 Format code more consistently.
683 Don't assume b4*copyright never occurs.
684
685 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
686
687 maint: automate b4_copyright updates.
688 * Makefile.am (update-b4-copyright): New target rule.
689 * build-aux/local.mk (EXTRA_DIST): Add update-b4-copyright.
690 * build-aux/update-b4-copyright: New.
691 * data/yacc.c: Remove stray characters around b4_copyright
692 invocations.
693
694 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
695
696 maint: automate annual package-wide copyright-year update.
697 * .x-update-copyright: New.
698 * Makefile.am (EXTRA_DIST): Remove maint.mk.
699 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
700 update-copyright. Remove gnumakefile, which is implied by
701 maintainer-makefile.
702 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
703 * gnulib: Update.
704 * maint.mk: Remove, now copied from gnulib.
705 * examples/extexi: Add missing "(C)" in copyright statement so
706 update-copyright can recognize it.
707 * src/LR0.h: Likewise.
708 * src/print.h: Likewise.
709 * src/print_graph.h: Likewise.
710 * src/gram.c: Add missing comma in copyright statement.
711 * src/gram.h: Likewise.
712
713 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
714
715 Fix "make distcheck".
716 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
717 of just calc.stamp.
718
719 2009-08-01 Joel E. Denny <jdenny@clemson.edu>
720
721 Pacify "gcc -Wunused" for the input function from Flex.
722 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
723 and later.
724 * src/scan-code.l: Add "%option noinput", which I cannot find in
725 the Flex manual, but which Flex has supported since at least as
726 far back as 2.5.4. However, if any of our developers still use
727 Flex 2.5.4, they'll need to stop configuring with
728 --enable-gcc-warnings because "%option noinput" didn't work
729 correctly until Flex 2.5.6.
730 * src/scan-gram.l: Likewise.
731 * src/scan-skel.l: Likewise.
732
733 2009-07-31 Alex Rozenman <rozenman@gmail.com>
734
735 Fix --enable-gcc-warnings problems.
736 * src/reader.c: Adjust variable names.
737 * src/scan-code.l: Fix prototypes and adjust names.
738 * src/named-ref.c: Remove redundant "if".
739
740 2009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
741
742 Fix a --enable-gcc-warnings problem.
743 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
744 variable.
745
746 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
747
748 Warn about character literals not of length one.
749 * NEWS (2.5): Document.
750 * src/scan-gram.l (INITIAL): Remove comment that we don't check
751 the length.
752 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
753 * tests/input.at (Bad character literals): New test group.
754
755 2009-07-24 Alex Rozenman <rozenman@gmail.com>
756
757 Fix some memory leaks.
758 * src/named-ref.c: Add a pointer check (named_ref_free).
759 * src/scan-code.l: New function (variant_table_free). Called in
760 code_scanner_free.
761 * src/symlist.c: Call to named_ref_free (symbol_list_free).
762
763 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
764
765 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
766
767 2009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
768
769 Some M4 cleanup in the testsuite.
770 Suggested by Eric Blake at
771 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
772 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
773 complicate the code by distinguishing between a missing value
774 and an empty string value for an optional argument. This fix is
775 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
776 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
777 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
778 arguments are not needed because of the following changes.
779 Fix stale comments.
780 Bison developers should use GNU M4 and should not use
781 POSIXLY_CORRECT when building the test suite, so do not
782 complicate the code by avoiding $10 and above.
783 Do not quote an empty string value for an optional argument, and
784 do not distinguish between a missing value and an empty string
785 value.
786
787 2009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
788
789 Revert unnecessary column realignment in --help output.
790 Reported by Akim Demaille at
791 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
792 * src/getargs.c (usage): Here.
793
794 2009-07-04 Alex Rozenman <rozenman@gmail.com>
795
796 Alphabetical order in src/local.mk.
797 * src/local.mk: Adjust.
798
799 2009-07-04 Alex Rozenman <rozenman@gmail.com>
800
801 Style changes and factoring.
802 * src/named-ref.h: Add comments.
803 * src/parse-gram.y: Readability and style changes.
804 * src/reader.c: Factoring: assign_named_ref function.
805 * src/scan-code.l: Factoring and style changes. Rename
806 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
807 Use "unsigned" type for variant index. Improve readablity.
808 * src/scan-gram.l: Change error messages and add comments.
809 * src/symlist.h: symbol_list_null: New function decl.
810 * src/symlist.c: symbol_list_null: Implement here.
811 * tests/named-refs.at: Adjust for new error messages.
812
813 2009-06-29 Eric Blake <ebb9@byu.net>
814
815 scan-code: avoid compiler warnings
816 * src/scan-code.l (parse_named_ref): Use correct specifiers.
817
818 2009-06-29 Akim Demaille <demaille@gostai.com>
819
820 build: avoid concurrent extraction of calc++.
821 * examples/calc++/Makefile.am (calc.stamp): New.
822 Depend on it to create the sources of calc++ so that concurrent
823 builds don't launch several "extexi" in parallel.
824 Not only this is inefficient, this also builds incorrect sources
825 with several extractions mixed together.
826
827 2009-06-29 Akim Demaille <demaille@gostai.com>
828
829 parse.error: fix.
830 * data/bison.m4: Move code related to specific variables after the
831 definition of the variable-maintaining macros so that we don't
832 "invoke" b4_percent_define_check_values before it is defined.
833
834 2009-06-29 Akim Demaille <demaille@gostai.com>
835
836 variables: parse.error
837
838 Implement, document, and test the replacement of %error-verbose
839 by %define parse.error "verbose".
840 * data/bison.m4 (b4_error_verbose_if): Reimplement to track the
841 values of the parse.error variable.
842 Make "simple" its default value.
843 Check the valid values.
844 * src/parse-gram.y: Use %define parse.error.
845 (PERCENT_ERROR_VERBOSE): New token.
846 Support it.
847 * src/scan-gram.l: Support %error-verbose.
848
849 * doc/bison.texinfo (Decl Summary): Replace the documentation of
850 %define error-verbose by that of %define parse.error.
851 * NEWS: Document it.
852
853 * tests/actions.at, tests/calc.at: Use parse.error instead of
854 %error-verbose.
855
856 2009-06-27 Alex Rozenman <rozenman@gmail.com>
857
858 Implement support for named symbol references.
859 * src/parse-gram.y: Add new syntax (named_ref.opt).
860 * src/reader.c: Store named refs in symbol lists.
861 * src/reader.h: New argument for symbol_append and
862 action_append functions.
863 * src/scan-code.h: Add new field (named_ref) into
864 code_props data structure. Keeps named ref of midrule
865 actions.
866 * src/scan-code.l: Support for named refs in semantic
867 action code. New function 'parse_named_ref'.
868 * src/scan-gram.l: Support bracketed id.
869 * src/symlist.c: Store named refs in symbol lists.
870 * src/symlist.h: New field in symbol list: named_ref.
871 * src/named-ref.h: New file, a struct for named_ref.
872 * src/named-ref.cp: New file, named_ref_new function.
873 * src/local.mk: Add two new files.
874 * tests/testsuite.at: Include new test group:
875 * tests/named-refs.at: this new file.
876
877 2009-06-25 Akim Demaille <demaille@gostai.com>
878
879 hash: check insertion for memory exhaustion.
880 * src/uniqstr.c (uniqstr_new): New.
881
882 2009-06-24 Akim Demaille <demaille@gostai.com>
883
884 variables: rename namespace as api.namespace.
885 Discussed in
886 http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00033.html
887
888 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
889 New.
890 (b4_percent_define_use): New.
891 Use it where applicable.
892 * data/c++.m4: Replace uses of the variable "namespace" by
893 "api.namespace".
894 Default the latter to the former.
895 * doc/bison.texinfo (Decl Summary): Document "namespace" as
896 obsolete.
897 Document api.namespace.
898 Use @samp to document %define uses, keep @code for identifiers.
899 * NEWS: Likewise.
900 * tests/c++.at, tests/input.at: Test api.namespace instead of
901 namespace. (The tests passed with namespace.)
902
903 2009-06-11 Akim Demaille <demaille@gostai.com>
904
905 style changes.
906 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
907 * src/print-xml.c: Style changes.
908 * tests/conflicts.at: Comment changes.
909
910 2009-06-11 Akim Demaille <demaille@gostai.com>
911
912 xml: beware of user strings used to give a %prec to rules.
913 * tests/conflicts.at (%prec with user strings): New.
914 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
915 XML output.
916
917 2009-06-11 Akim Demaille <demaille@gostai.com>
918
919 hash: check insertion for memory exhaustion.
920 * src/muscle-tab.c (muscle_insert, muscle_grow)
921 * src/state.c (state_hash_insert): Check the return value of
922 hash_insert.
923
924 2009-06-11 Akim Demaille <demaille@gostai.com>
925
926 tests: honor TESTSUITEFLAGS in every check target.
927 * tests/local.mk (RUN_TESTSUITE): New.
928 (check-local, installcheck-local, maintainer-check-g++)
929 (maintainer-check-posix, maintainer-check-valgrind): Use it.
930
931 2009-06-10 Akim Demaille <demaille@gostai.com>
932
933 deterministic test suite.
934 Some consistency checks on symbols are performed after all the
935 symbols were read, by an iteration over the symbol table. This
936 traversal is nondeterministic, which can be a problem for test
937 cases.
938 Avoid this.
939 Addresses another form of nondeterminism reported by Joel E. Denny.
940 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
941
942 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
943 test in two.
944 Use different file names for the three tests to make the
945 maintenance easier.
946
947 2009-06-10 Akim Demaille <demaille@gostai.com>
948
949 gnulib: update.
950 * gnulib: Update to latest.
951 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
952 * m4/.gitignore: Regen.
953 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
954 Call xalloc_die on hash_insert failures.
955 Requested by the new __warn_unused_result__ attribute of
956 hash_insert.
957
958 2009-06-10 Akim Demaille <demaille@gostai.com>
959
960 deterministic user-token-number redeclaration errors.
961 Address nondeterminism reported by Joel E. Denny.
962 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
963
964 * src/uniqstr.h: Comment changes.
965 * src/location.h (boundary_cmp, location_cmp): New.
966 * src/symtab.c (user_token_number_redeclaration): New.
967 (symbol_translation): Use it.
968 * tests/input.at (Numbered tokens): Adjust the expected output.
969
970 2009-05-25 Akim Demaille <demaille@gostai.com>
971
972 build: avoid ignored errors.
973 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Don't generate ignored
974 errors, they pollute the output.
975
976 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
977
978 Convert multiple variable definition warnings to complaints.
979 * NEWS (2.5): Add a new entry for that change.
980 * doc/bison.texinfo (Decl Summary): Update %define entry.
981 (Bison Options): Update -D/--define/-F/--force-define entry.
982 * src/muscle-tab.c (muscle_percent_define_insert): Implement.
983 * src/muscle-tab.h (muscle_percent_define_insert): Update
984 comments.
985 * tests/input.at (`%define errors'): Update.
986 (`%define, --define, --force-define'): Update.
987
988 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
989
990 -F/--force-define and relative %define/-D/--define priorities.
991 * NEWS (2.5): Add documentation to -D/--define entry.
992 * build-aux/cross-options.pl: Hard-code association of
993 --force-define with %define.
994 * doc/bison.texinfo (Decl Summary): In %define entry,
995 cross-reference command-line options.
996 (Bison Options): Add documentation to -D/--define entry.
997 (Option Cross Key): Widen column for --force-define row.
998 * src/getargs.c (usage): Document -F/--force-define. Realign
999 options in output.
1000 (short_options, long_options, getargs): Parse -F/--force-define,
1001 and update muscle_percent_define_insert invocations.
1002 * src/muscle-tab.h (muscle_percent_define_how): New enum type.
1003 (muscle_percent_define_insert): Add argument with that type.
1004 * src/muscle-tab.c (muscle_percent_define_insert): Implement
1005 -F/--force-define behavior and priorities.
1006 (muscle_percent_define_ensure): Update
1007 muscle_percent_define_insert invocation.
1008 * src/parse-gram.y (prologue_declaration): Update
1009 muscle_percent_define_insert invocations.
1010 * tests/input.at (`%define, --define'): Rename to...
1011 (`%define, --define, --force-define'): ... this and extend.
1012
1013 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1014
1015 Update some comments to make sense for -D.
1016 * data/bison.m4 (b4_check_user_names): In header comments, say
1017 "user occurrence" instead of "grammar occurrence".
1018 * src/muscle-tab.h (muscle_percent_define_insert): Likewise.
1019 (muscle_percent_code_grow): Likewise just for consistency.
1020
1021 2009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
1022
1023 * data/c++.m4 (b4_namespace_close): Simplify slightly.
1024
1025 2009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
1026
1027 Handle a trailing `:' in a user-supplied C++ namespace better.
1028 * data/c++.m4 (b4_namespace_close): Don't let it be printed
1029 among the closing braces here. This fix might make the
1030 generated code easier to debug, but otherwise it should be
1031 insignificant because a trailing `:' is a C++ error already.
1032
1033 2009-05-19 Akim Demaille <demaille@gostai.com>
1034
1035 remove useless variable.
1036 * src/getargs.c (skeleton_arg): Remove now useless variable.
1037 Should help the compiler see that this printf-like call is sane.
1038
1039 2009-05-15 Akim Demaille <demaille@gostai.com>
1040
1041 Rename token.prefix as api.tokens.prefix.
1042 Discussed here.
1043 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00024.html.
1044
1045 * NEWS, data/bison.m4, data/c.m4, data/java.m4, doc/bison.texinfo,
1046 * tests/c++.at, tests/calc.at, tests/java.at, tests/local.at
1047 (token.prefix): Rename as...
1048 (api.tokens.prefix): this.
1049
1050 2009-05-11 Akim Demaille <demaille@gostai.com>
1051
1052 doc: use C++ headers.
1053 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
1054 headers.
1055
1056 2009-05-11 Akim Demaille <demaille@gostai.com>
1057
1058 doc: token.prefix
1059 * doc/bison.simple (Decl Summary): Document token.prefix.
1060 (Calc++ Parser): Various fixes.
1061 Formatting changes.
1062 Use token.prefix.
1063 Introduce a macro TOKEN to shorten the code and make it more
1064 readable.
1065 (Calc++ Scanner): Adjust.
1066 * NEWS (Variable token.prefix): New.
1067
1068 2009-05-04 Akim Demaille <demaille@gostai.com>
1069
1070 bison: catch bad symbol names.
1071 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
1072 * tests/input.at: Adjust.
1073
1074 2009-05-04 Akim Demaille <demaille@gostai.com>
1075
1076 identifiers: dashes are letters.
1077 Dashes can now start identifiers (symbols and directives).
1078
1079 * src/scan-gram.l ({letter}): Add dash.
1080 ({id}): Remove it.
1081 * tests/input.at (Symbols): Adjust.
1082 Remove stray comment.
1083 * tests/regression.at (Invalid inputs): Adjust error message.
1084 * doc/bison.texinfo (Symbols): Update.
1085
1086 2009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
1087
1088 Declare %code to be a permanent feature.
1089 * NEWS (2.4.2): Here.
1090 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
1091 experimental.
1092 (Decl Summary): Likewise.
1093
1094 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
1095
1096 Convert underscores to dashes in some %define variable names.
1097 For now, just api.push-pull and lr.keep-unreachable-states.
1098 Maintain old names for backward compatibility.
1099 * NEWS (2.5): Document.
1100 * data/c.m4 (b4_identification): Update comment.
1101 * data/yacc.c: Update access.
1102 * doc/bison.texinfo: Update.
1103 * etc/bench.pl.in (bench_push_parser): Update use.
1104 * src/files.c (tr): Move to...
1105 * src/getargs.c, src/getargs.h (tr): ... here because I can't
1106 think of a better place to expose it. My logic is that, for all
1107 uses of tr so far, command-line arguments can be involved, and
1108 getargs.h is already included.
1109 * src/main.c (main): Update access.
1110 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
1111 variable names to new variable names before assigning value.
1112 * src/reader.c (reader): Update setting default.
1113 * tests/calc.at: Update uses.
1114 * tests/conflicts.at (Unreachable States After Conflict
1115 Resolution): Update use.
1116 * tests/input.at (%define enum variables): Update use.
1117 (%define backward compatibility): New test group.
1118 * tests/push.at: Update uses.
1119 * tests/reduce.at: Update uses.
1120 * tests/torture.at: Update uses.
1121
1122 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
1123
1124 Set all front-end %define defaults in one place.
1125 * src/main.c (main): Move lr.keep_unreachable_states default...
1126 * src/reader.c (reader): ... to here.
1127
1128 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1129
1130 Rename lr.default_reductions to lr.default-reductions.
1131 * NEWS (2.5): Here.
1132 * doc/bison.texinfo: Here.
1133 * src/lalr.c (initialize_LA): Here.
1134 * src/print.c (print_reductions): Here.
1135 * src/reader.c (reader): Here.
1136 * src/tables.c (action_row): Here.
1137 * tests/input.at (%define enum variables): Here.
1138 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
1139
1140 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1141
1142 Pacify ./configure --enable-gcc-warnings.
1143 * tests/input.at (Symbols): Prototype yyerror and yylex.
1144
1145 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1146
1147 Document how `%define "var" "value"' is not M4-friendly.
1148 * src/parse-gram.y (variable): In comments here.
1149
1150 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
1151
1152 Clean up recent patches a little.
1153 Reported by Akim Demaille.
1154 * doc/bison.texinfo (Understanding): Fix typos.
1155 * src/print.c (print_reductions): Don't use negated variable.
1156
1157 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
1158
1159 List accepted values for a %define enum variable with an invalid value.
1160 Suggested by Akim Demaille at
1161 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
1162 * data/bison.m4 (_b4_percent_define_check_values): Implement.
1163 * src/muscle-tab.c (muscle_percent_define_check_values): Implement.
1164 * tests/input.at (%define lr.default_reductions invalid values): Merge
1165 into...
1166 (%define enum variables): ... here, and update output.
1167
1168 2009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
1169
1170 Rename "default rule" to "default reduction".
1171 This includes changing variable names in code, changing
1172 comments, and renaming %define lr.default_rules to %define
1173 lr.default_reductions.
1174 * NEWS (2.5): Update IELR documentation.
1175 * data/bison.m4 (b4_integral_parser_tables_map): Adjust YYDEFACT
1176 documentation.
1177 * data/glr.c, data/lalr1.java: Sync copyright dates.
1178 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
1179 and lr.type documentation. Make some other wording
1180 improvements.
1181 (Glossary): Adjust cross-references and Default Reduction
1182 definition.
1183 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
1184 Remove a confusing comment pointed out by Akim Demaille.
1185 (initialize_LA): Adjust code.
1186 * src/print-xml.c (print_reductions): Adjust code.
1187 * src/print.c (print_reductions): Adjust code.
1188 * src/reader.c (reader): Adjust code.
1189 * src/tables.c (action_row): Adjust code.
1190 (token_actions): Adjust code.
1191 * src/tables.h: Adjust YYDEFACT documentation.
1192 * tests/input.at (%define lr.default_rules invalid values):
1193 Rename test group to...
1194 (%define lr.default_reductions invalid values): ... this, and
1195 update grammar file and expected output.
1196 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
1197 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
1198
1199 2009-04-21 Akim Demaille <demaille@gostai.com>
1200
1201 tests: check the use of dashes and periods in symbols.
1202 * tests/input.at (Symbol): New test group.
1203
1204 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1205
1206 Document %define lr.type and lr.default_rules.
1207 * NEWS (2.5): Add an entry.
1208 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
1209 besides just LALR(1) and GLR(1).
1210 * doc/bison.texinfo (Introduction): Likewise.
1211 (Language and Grammar): Bison is no longer limited to LALR(1)
1212 restrictions.
1213 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
1214 when trying to distinguish from GLR. Talk about LR(1) grammars
1215 rather than LALR(1) grammars.
1216 (Decl Summary): In %define api.push_pull entry, say it applies
1217 to deterministic parsers in C rather than LALR(1) parsers in C.
1218 Add lr.default_rules entry.
1219 Add lr.type entry.
1220 (Mystery Conflicts): Bison is no longer limited to LALR(1)
1221 restrictions.
1222 (Generalized LR Parsing): Same changes as for the previous GLR
1223 section.
1224 (Memory Management): Say deterministic rather than LALR(1).
1225 (Understanding): Correct some bison output.
1226 Index discussion of "accepting state".
1227 Say deterministic rather than LALR(1).
1228 (Bison Options): In --yacc entry, say deterministic rather than
1229 LALR(1).
1230 In --report, --graph, and --xml entries, just don't mention
1231 LALR(1).
1232 (C++ Parsers): Say deterministic rather than LALR(1).
1233 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
1234 (Glossary): Add Accepting State, Consistent State, Default Rule,
1235 and IELR(1) definitions.
1236 In Generalized LR (GLR) definition, make same changes as in
1237 previous GLR sections.
1238 In LALR(1) definition, say Bison uses LALR(1) by default rather
1239 than implying Bison is limited to LALR(1).
1240 (LocalWords): Add IELR.
1241
1242 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1243
1244 Finish implementing %define lr.type.
1245 Its value can be "LALR", "IELR", or "canonical LR".
1246 * lib/timevar.def (TV_IELR_PHASE1): New var.
1247 (TV_IELR_PHASE2): New var.
1248 (TV_IELR_PHASE3): New var.
1249 (TV_IELR_PHASE4): New var.
1250 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
1251 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
1252 Sbitset.h, ielr.h, and ielr.c.
1253 * src/getargs.h, src/getargs.c (enum trace, trace_args,
1254 trace_types): Add trace_ielr.
1255 * src/lalr.h, src/lalr.c (ngotos): Export it.
1256 (F): Rename to...
1257 (goto_follows): ... this, update all uses, and export it.
1258 (set_goto_map): Export it.
1259 (map_goto): Export it.
1260 (compute_lookahead_tokens): Don't free goto_follows yet. Now
1261 handled in ielr.
1262 (initialize_LA): Export it. Move lookback allocation to...
1263 (lalr): ... here because, for canonical LR, initialize_LA must
1264 be invoked but lookback and much of the rest of LALR isn't
1265 needed.
1266 * main.c (main): Instead of lalr, invoke ielr, which invokes
1267 lalr.
1268 * src/reader.c (reader): Default lr.type to "LALR".
1269 Default lr.default_rules to "accepting" if lr.type is "canonical
1270 LR". Leave the default as "all" otherwise.
1271 Check for a valid lr.type value.
1272 * src/state.h, src/state.c (struct state_list): Add state_list
1273 member.
1274 (state_new): Initialize state_list member to NULL.
1275 (state_new_isocore): New function, exported.
1276 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
1277 exercises all values of lr.type.
1278 (GNU AWK Grammar): Rename test group to...
1279 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
1280 AT_TEST_EXISTING_GRAMMAR.
1281 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
1282 (GNU pic Grammar): Rename test group to...
1283 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
1284 AT_TEST_EXISTING_GRAMMAR.
1285 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
1286 all values of lr.type.
1287 (Single State Split): New test groups using AT_TEST_LR_TYPE.
1288 (Lane Split): Likewise.
1289 (Complex Lane Split): Likewise.
1290 (Split During Added Lookahead Propagation): Likewise.
1291
1292 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1293
1294 Add new files for IELR and canonical LR implementation.
1295 * src/AnnotationList.c: New.
1296 * src/AnnotationList.h: New.
1297 * src/InadequacyList.c: New.
1298 * src/InadequacyList.h: New.
1299 * src/Sbitset.c: New.
1300 * src/Sbitset.h: New.
1301 * src/ielr.c: New.
1302 * src/ielr.h: New.
1303
1304 2009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
1305
1306 Implement %define lr.default_rules.
1307 Its value describes the states that are permitted to contain
1308 default rules: "all", "consistent", or "accepting".
1309 * src/reader.c (reader): Default lr.default_rules to "all".
1310 Check for a valid lr.default_rules value.
1311 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
1312 is "accepting", then only mark the accepting state as
1313 consistent.
1314 (initialize_LA): Tell state_lookahead_tokens_count whether
1315 lr.default_rules is "accepting".
1316 * src/tables.c (action_row): If lr.default_rules is not "all",
1317 then disable default rules in inconsistent states.
1318 * src/print.c (print_reductions): Use this opportunity to
1319 perform some assertions about whether lr.default_rules was
1320 obeyed correctly.
1321 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
1322 helps with checking the parser tables for a grammar.
1323 * tests/input.at (%define lr.default_rules invalid values): New
1324 test group.
1325 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
1326 AT_TEST_TABLES_AND_PARSE.
1327 (`no %define lr.default_rules'): New test group generated by
1328 AT_TEST_LR_DEFAULT_RULES.
1329 (`%define lr.default_rules "all"'): Likewise.
1330 (`%define lr.default_rules "consistent"'): Likewise.
1331 (`%define lr.default_rules "accepting"'): Likewise.
1332
1333 2009-04-20 Akim Demaille <demaille@gostai.com>
1334
1335 Formatting change.
1336
1337 2009-04-20 Akim Demaille <demaille@gostai.com>
1338
1339 bison: factoring.
1340 * src/output.c (token_definitions_output): Use symbol_id_get
1341 instead of duplicating its logic.
1342 * TODO (YYERRCODE): Extend.
1343
1344 2009-04-20 Akim Demaille <demaille@gostai.com>
1345
1346 variables: prefer error-verbose to error_verbose.
1347 * data/bison.m4 (b4_error_verbose_if): Based on error-verbose
1348 instead of error_verbose.
1349 * src/scan-gram.l (%error-verbose): Map to the error-verbose
1350 variable.
1351 * doc/bison.texinfo: Promote %define error-verbose instead of
1352 %error-verbose.
1353 * tests/actions.at: Prefer %define error-verbose to %error-verbose.
1354
1355 2009-04-15 Akim Demaille <demaille@gostai.com>
1356
1357 variables: accept dashes.
1358 * data/bison.m4 (b4_percent_define_if_define_): Also map dashes to
1359 underscores.
1360 * src/scan-gram.l ({id}): Also accept dashes after the initial
1361 letter.
1362 ({directive}): Use {id}.
1363 * src/parse-gram.y: Comment and formatting changes.
1364 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
1365 symbols.
1366 * src/complain.h, src/complain.c (yacc_at): New.
1367 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
1368 symbol names.
1369 * src/output.c (token_definitions_output): Do not #define token
1370 names with dashes.
1371
1372 2009-04-20 Akim Demaille <demaille@gostai.com>
1373
1374 Consistently refer to Yacc, not YACC.
1375 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
1376
1377 2009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
1378
1379 Pacify make maintainer-check-posix.
1380 * tests/input.at (%define, --define): Move bison command-line
1381 options before grammar file name.
1382
1383 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
1384
1385 Document semicolon warnings.
1386 * NEWS (2.5): Here.
1387
1388 2009-04-14 Akim Demaille <demaille@gostai.com>
1389
1390 variables: use `parse.assert' instead of `assert'.
1391 * TODO (assert): Remove.
1392 * data/bison.m4 (b4_assert_if): Replace with...
1393 (b4_parse_assert_if): this.
1394 * data/lalr1.cc, data/variant.hh, tests/c++.at: Adjust.
1395 * doc/bison.texinfo (Decl Summary): Document parse.assert.
1396
1397 2009-04-14 Akim Demaille <demaille@gostai.com>
1398
1399 variables: use `parse.trace' instead of `debug'.
1400 * src/getargs.c (getargs): Map -t to %define trace.parse.
1401 * src/scan-gram.l (%debug): Map to %define trace.parse.
1402 * data/bison.m4 (b4_percent_define_if_define): Map `.' in variable
1403 names to `_' in macro names.
1404 (b4_debug_if): Replace with...
1405 (b4_parse_trace_if): this.
1406 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
1407 * data/yacc.c: Adjust.
1408 * doc/bison.texinfo (Decl Summary): Document %debug as obsoleted.
1409 Use @code to label the variable list.
1410 Document the variable parse.trace.
1411 (Tracing): Promote the parse.trace variable.
1412 * TODO: %printer is not documented.
1413
1414 2009-04-14 Akim Demaille <demaille@gostai.com>
1415
1416 doc: minor fixes.
1417 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
1418 (Table of Symbols): Remove duplicate entry for %debug.
1419
1420 2009-04-10 Eric Blake <ebb9@byu.net>
1421
1422 submodules: update to latest
1423 * submodules/autoconf: Use latest upstream Autoconf.
1424
1425 2009-04-06 Eric Blake <ebb9@byu.net>
1426
1427 Work around autoconf 2.63b bug in testsuite.
1428 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
1429 autoconf bug related to # in test.
1430
1431 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
1432
1433 * NEWS (2.5): New section. Describe new -D/--define feature.
1434
1435 2009-04-06 Akim Demaille <demaille@gostai.com>
1436
1437 Regen.
1438 * src/parse-gram.h, src/parse-gram.c: Regen.
1439
1440 2009-04-06 Akim Demaille <demaille@gostai.com>
1441
1442 rename muscle_tab.* as muscle-tab.* for consistency.
1443 * src/muscle_tab.h, src/muscle_tab.c: Rename as...
1444 * src/muscle-tab.h, src/muscle-tab.c: these.
1445 * src/getargs.c, src/local.mk, src/main.c, src/output.c,
1446 * src/parse-gram.y, src/reader.c, src/scan-code.l: Adjust.
1447
1448 2009-04-06 Akim Demaille <demaille@gostai.com>
1449
1450 Makefile: introduce $(BISON).
1451 * src/local.mk (BISON): New.
1452 (YACC): Use it.
1453
1454 2009-04-06 Akim Demaille <demaille@gostai.com>
1455
1456 parser: handle %locations as %define locations.
1457 * src/getargs.h, src/getargs.c (locations_flag): Remove.
1458 * src/getargs.c, src/scan-code.l: Use muscle_percent_define_ensure
1459 to set "locations" to true.
1460 * src/output.c (prepare): Don't output "locations".
1461 * src/scan-gram.l (%locations): Handle it as a %<flag>.
1462 * src/parse-gram.y: It's no longer a token.
1463 Don't handle it.
1464 * data/bison.m4 (b4_locations_if): Define it with
1465 b4_percent_define_if_define.
1466 * data/c.m4, data/glr.cc: Adjust.
1467
1468 2009-04-06 Akim Demaille <demaille@gostai.com>
1469
1470 Regen.
1471 * src/parse-gram.c: Regen.
1472
1473 2009-04-06 Akim Demaille <demaille@gostai.com>
1474
1475 muscle: factor the handling of obsolete of obsolete directives.
1476 Suggested by Joel E. Denny.
1477
1478 * src/muscle_tab.h, src/muscle_tab.c (muscle_percent_define_ensure):
1479 New, extracted from...
1480 * src/parse-gram.y (prologue_declaration: pure-parser): here.
1481 Remove it.
1482 (prologue_declaration: "%<flag>"): Use
1483 muscle_percent_define_ensure.
1484 (%error-verbose, %pure-parser): No longer tokens.
1485 * src/scan-gram.l (pure-parser): Return as a %<flag>.
1486
1487 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
1488
1489 Fix options documentation.
1490 * build-aux/cross-options.pl: As in --help output, write optional
1491 arguments as [=ARG] not =[ARG].
1492 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
1493
1494 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
1495
1496 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
1497 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
1498 requirements for a correct m4 are stricter.
1499 * m4/m4.m4: Make it a symbolic link to submodules/autoconf/m4/m4.m4.
1500 * configure.ac: Update to use AC_PROG_GNU_M4.
1501 Reported by Eric Blake.
1502
1503 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1504
1505 Help with updating web manual.
1506 * HACKING: Incorporate instructions from gnulib/doc/README.
1507 * bootstrap.conf (gnulib_modules): Add gendocs.
1508
1509 2009-04-03 Akim Demaille <demaille@gostai.com>
1510
1511 Regen.
1512 * src/parse-gram.h, src/parse-gram.c: Regen.
1513
1514 2009-04-03 Akim Demaille <demaille@gostai.com>
1515
1516 Factor %FLAG at scan level.
1517 * src/parse-gram.y (PERCENT_DEBUG, PERCENT_ERROR_VERBOSE): Token
1518 definitions and associated rules, replaced by....
1519 (PERCENT_FLAG): this new token type, and rule.
1520 * src/scan-gram.l (RETURN_PERCENT_FLAG): New.
1521 Use it for %debug and %error-verbose.
1522
1523 2009-04-03 Akim Demaille <demaille@gostai.com>
1524
1525 Regen.
1526 * src/parse-gram.h, src/parse-gram.c: Regen.
1527
1528 2009-04-03 Akim Demaille <demaille@gostai.com>
1529
1530 Treat %debug as %define debug.
1531 * data/bison.m4 (b4_debug_if): New.
1532 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c,
1533 * data/lalr1.java: Use it instead of b4_debug_flag.
1534 * src/getargs.h, src/getargs.c (debug_flag): Remove.
1535 * src/output.c (prepare): Don't output it.
1536 * src/parse-gram.y: Treat %debug as %define debug.
1537
1538 2009-04-03 Akim Demaille <demaille@gostai.com>
1539
1540 Treat %error-verbose as %define error_verbose.
1541 This allows to pass -Derror_verbose on the command line. Better
1542 yet, it allows to pass -Derror_verbose=$(ERROR_VERBOSE), with
1543 ERROR_VERBOSE being defined as false or true.
1544 * data/bison.m4 (b4_percent_define_if_define): Instead of relying
1545 on b4_percent_define_ifdef, for does not check the defined value,
1546 but only whether the symbol is defined, rely on
1547 b4_percent_define_flag_if, so that a value of "false" is processed
1548 as a false.
1549 If not defined, define the flag to "false".
1550 (b4_error_verbose_if): New.
1551 * data/glr.c, data/lalr1.cc, data/yacc.c: Use it instead of
1552 b4_error_verbose_flag.
1553 * src/getargs.h, src/getargs.c (error_verbose_flag): Remove.
1554 * src/output.c (prepare): Don't output it.
1555 * src/parse-gram.y (%error-verbose): Treat as %define error_verbose.
1556
1557 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1558
1559 Fix strange %define locations for default values.
1560 Reported by Akim Demaille at
1561 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
1562 and discussed again starting at
1563 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
1564 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
1565 because location information is bogus.
1566 Use angle brackets to delimit fake file name because square brackets
1567 look like underexpanded m4. Choose a better fake file name.
1568 Use negative line numbers.
1569 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
1570 * src/location.c (location_print): If line for a boundary is negative,
1571 only print that boundary's file name.
1572 * src/location.h: Document that.
1573 * tests/skeletons.at (%define Boolean variables: invalid skeleton
1574 defaults): Update output.
1575
1576 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1577
1578 Pacify ./configure --enable-gcc-warnings.
1579 * Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS) because many files
1580 in lib won't compile with it.
1581 * src/local.mk (src_bison_CFLAGS): Use $(WERROR_CFLAGS) here only.
1582
1583 2009-03-31 Akim Demaille <demaille@gostai.com>
1584
1585 bootstrap: --help to stdout.
1586 * bootstrap (usage): Don't send --help to stderr.
1587 Use a here doc instead of a long string.
1588
1589 2009-03-31 Akim Demaille <demaille@gostai.com>
1590
1591 bootstrap: README-hacking no longer exists
1592 * bootstrap (checkout_only_file): Set to HACKING.
1593
1594 2009-03-26 Akim Demaille <demaille@gostai.com>
1595
1596 doc: merge HACKING and README-hacking.
1597 Two files is confusing.
1598 Reported by Alexandre Duret-Lutz.
1599
1600 * README-hacking: Merge into...
1601 * HACKING (Working from the repository): here.
1602
1603 2009-03-26 Akim Demaille <demaille@gostai.com>
1604
1605 doc: update README-hacking.
1606 * README-hacking: We now use git and git submodules.
1607 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
1608
1609 2009-03-26 Akim Demaille <demaille@gostai.com>
1610
1611 lalr1.cc: avoid GCC 4.3 warnings.
1612 GCC 4.3 now warns about "a || b && c" and asks for explicit
1613 parentheses.
1614 Reported by Alexandre Duret-Lutz.
1615 * data/location.cc: Update copyright years.
1616 (Position::operator==): Use parens to make precedence explicit.
1617 Compare lines and columns first, as they are more likely to be
1618 different, and they are faster to compare.
1619
1620 2009-03-26 Akim Demaille <demaille@gostai.com>
1621
1622 gnulib: update.
1623 * gnulib: Update to latest.
1624 * src/local.mk (AM_CFLAGS): Move to...
1625 * Makefile.am: here.
1626 * etc/prefix-gnulib-mk (prefix_assignment): Also transform
1627 AM_CFLAGS.
1628
1629 2009-03-02 Akim Demaille <demaille@gostai.com>
1630
1631 Comment changes.
1632
1633 2009-03-02 Akim Demaille <demaille@gostai.com>
1634
1635 Share b4_yytranslate_define.
1636 * data/lalr1.cc (b4_yytranslate_define): Move to...
1637 * data/c++.m4: here.
1638
1639 2009-03-02 Akim Demaille <demaille@gostai.com>
1640
1641 Use locations in the variant example.
1642 Yes, this obfuscates the point of this example, variants only.
1643 But glr.cc cannot work (yet?) without locations. This change
1644 makes it easier to use this example with glr.cc.
1645
1646 * examples/variant.yy (assert): %define it.
1647 (locations): Request them.
1648 (yylex): Bind the location to the stage.
1649
1650 2009-03-02 Akim Demaille <demaille@gostai.com>
1651
1652 Dub make_TOKEN as a public type interface.
1653 * data/c++.m4 (b4_symbol_constructor_declare)
1654 (b4_symbol_constructor_define): New empty stubs.
1655 (b4_public_types_declare, b4_public_types_define): Use them.
1656 * data/lalr1.cc (b4_symbol_constructor_declare)
1657 (b4_symbol_constructor_declare_)
1658 (b4_symbol_constructor_define_, b4_symbol_constructor_define):
1659 Move to...
1660 * data/variant.hh: here.
1661 Remove the "b4_variant_if" parts, as variant.hh is loaded only if
1662 needed.
1663 * data/lalr1.cc: No longer invoke b4_symbol_constructor_define and
1664 b4_symbol_constructor_declare, as it is now done by
1665 b4_public_types_define and b4_public_types_declare.
1666
1667 2009-03-02 Akim Demaille <demaille@gostai.com>
1668
1669 Coding style changes.
1670 * data/lalr1.cc (b4_symbol_constructor_declaration_)
1671 (b4_symbol_constructor_declarations)
1672 (b4_symbol_constructor_definition_)
1673 (b4_symbol_constructor_definitions)
1674 (b4_yytranslate_definition): Rename as...
1675 (b4_symbol_constructor_declare_)
1676 (b4_symbol_constructor_declare)
1677 (b4_symbol_constructor_define_)
1678 (b4_symbol_constructor_define)
1679 (b4_yytranslate_define): these.
1680 * data/variant.hh (b4_variant_definition): Rename as...
1681 (b4_variant_define): this.
1682
1683 2009-03-02 Akim Demaille <demaille@gostai.com>
1684
1685 Factor b4_assert_if, b4_lex_symbol_if, and b4_variant_if.
1686 * data/bison.m4 (b4_percent_define_if_define): New.
1687 * data/c++.m4 (b4_variant_if): Move to...
1688 * data/bison.m4: Here, using b4_percent_define_if_define.
1689 * data/lalr1.cc (b4_assert_if, b4_lex_symbol_if): Move to...
1690 * data/bison.m4: Here, using b4_percent_define_if_define.
1691
1692 2009-03-02 Akim Demaille <demaille@gostai.com>
1693
1694 Dub symbol_type_base as a public type.
1695 * data/c++.m4 (b4_public_types_declare): Now define
1696 symbol_type_base and symbol_type.
1697 (b4_public_types_define): New.
1698 In both cases, the definitions are taken verbatim from lalr1.cc.
1699 * data/lalr1.cc: Adjust.
1700
1701 2009-03-02 Akim Demaille <demaille@gostai.com>
1702
1703 b4_public_types_declare.
1704 * data/c++.m4 (b4_public_types_declare): New.
1705 * data/glr.cc, data/lalr1.cc: Use it.
1706
1707 2009-03-02 Akim Demaille <demaille@gostai.com>
1708
1709 b4_semantic_type_declare.
1710 * data/c++.m4 (b4_semantic_type_declare): New.
1711 Factors and generalizes what was in glr.cc and lalr1.cc.
1712 * data/variant.hh (b4_semantic_type_declare): Redefine it for
1713 variants.
1714 * data/lalr1.cc, data/glr.cc: Use it.
1715
1716 2009-02-26 Akim Demaille <demaille@gostai.com>
1717
1718 Upgrade gnulib.
1719 * gnulib: Upgrade from master.
1720 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, m4/.gitignore:
1721 Regen.
1722
1723 2009-02-25 Akim Demaille <demaille@gostai.com>
1724
1725 Remove useless arguments.
1726 * data/glr.c (yy_reduce_print): $$ and @$ are not used and not
1727 relevant.
1728
1729 2009-02-25 Akim Demaille <demaille@gostai.com>
1730
1731 Comment changes.
1732 * data/lalr1.cc: here.
1733
1734 2009-02-25 Akim Demaille <demaille@gostai.com>
1735
1736 Fix glr.cc's debug level handling.
1737 * data/glr.cc (yydebug_): Remove, as it is actually yydebug from
1738 glr.c which is used.
1739 (debug_level, set_debug_level): Adjust.
1740
1741 2009-02-25 Akim Demaille <demaille@gostai.com>
1742
1743 Copyright years.
1744 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
1745
1746 2009-02-25 Akim Demaille <demaille@gostai.com>
1747
1748 Style changes.
1749 * etc/bench.pl.in (generate_grammar_list): Consitently use
1750 location_type, not yy::location.
1751
1752 2009-02-25 Akim Demaille <demaille@gostai.com>
1753
1754 Comment change.
1755 * data/lalr1.cc: here.
1756
1757 2009-02-19 Akim Demaille <demaille@gostai.com>
1758
1759 Make yyparser::error public.
1760 * data/lalr1.cc: here.
1761 There is no good reason to keep it private (and it is convenient
1762 to use it from the scanner for instance). It is already public in
1763 glr.cc.
1764
1765 2009-02-19 Akim Demaille <demaille@gostai.com>
1766
1767 Comment changes.
1768 * data/glr.cc: here.
1769
1770 2009-02-19 Akim Demaille <demaille@gostai.com>
1771
1772 Remove trailing blanks.
1773 The epilogue has its own ending \n, no need to add another.
1774
1775 * data/glr.c, data/lalr1.java, data/yacc.c: dnl when outputing the
1776 epilogue.
1777 * data/glr.cc: dnl when extending the epilogue.
1778 Remove stray "private:".
1779
1780 2009-02-19 Akim Demaille <demaille@gostai.com>
1781
1782 Use b4_c_modern.
1783 * data/c.m4 (b4_c_function_decl): Here.
1784
1785 2009-02-19 Akim Demaille <demaille@gostai.com>
1786
1787 Comment changes.
1788 * data/lalr1.cc: here.
1789
1790 2009-02-19 Akim Demaille <demaille@gostai.com>
1791
1792 Extract variant.hh
1793 * data/variant.hh: New, extracted from...
1794 * data/lalr1.cc: here.
1795 Adjust.
1796 * data/local.mk: Adjust.
1797
1798 2009-02-19 Akim Demaille <demaille@gostai.com>
1799
1800 Extract stack.hh from lalr1.cc.
1801 * data/stack.hh: New.
1802 * data/lalr1.cc: Extract from here.
1803 * data/local.mk: Adjust.
1804
1805 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
1806
1807 Add reminder about uploading public key to keys.gnupg.net.
1808 * HACKING (Release Procedure): Here.
1809
1810 2009-01-28 Akim Demaille <demaille@gostai.com>
1811
1812 * NEWS: Update information about 2.4.1 and 2.4.2.
1813
1814 2008-11-04 Akim Demaille <demaille@gostai.com>
1815
1816 Reformat NEWS.
1817 * NEWS: Use more outline-mode markup.
1818 Suggested by Jim Meyering.
1819
1820 2009-01-08 Akim Demaille <demaille@gostai.com>
1821
1822 Fix grep portability issues.
1823 Grep on Solaris does not support -q.
1824 Reported by Summum Bonum.
1825
1826 * NEWS: Add a stub for 2.4.2.
1827 * THANKS: Add Summum Bonum.
1828 * tests/atlocal.in (EGREP): New.
1829 (CC, CXX, XSLTPROC): Make it possible to override them via
1830 envvars.
1831 * tests/java.at: Use $EGREP instead of egrep.
1832 Use AT_CHECK's ignore instead of grep's -q.
1833
1834 2008-12-11 Akim Demaille <demaille@gostai.com>
1835
1836 Pass the token type to yysyntax_error.
1837 * data/yacc.c (yysyntax_error): Take the transated token instead
1838 of the raw number.
1839 Adjust callers.
1840 * TODO: Update.
1841
1842 2008-12-11 Akim Demaille <demaille@gostai.com>
1843
1844 Formatting changes.
1845 * data/glr.c: Formatting changes.
1846
1847 2008-12-11 Akim Demaille <demaille@gostai.com>
1848
1849 Propagate i18n changes into glr.c.
1850 * TODO: Update.
1851 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
1852 building the error message format dynamically.
1853 * data/lalr1.java: Formatting changes.
1854
1855 2008-12-11 Akim Demaille <demaille@gostai.com>
1856
1857 Use testsuite -C.
1858 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
1859 Solves problems when top_srcdir is an absolute path.
1860 Suggested by Eric Blake.
1861 * configure.ac: Require Autoconf 2.62.
1862
1863 2008-12-11 Akim Demaille <demaille@gostai.com>
1864
1865 Simplify the i18n of the error messages.
1866 * data/lalr1.cc: Comment changes.
1867 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
1868 lalr1.cc instead of building dynamically the format string.
1869
1870 2008-12-08 Akim Demaille <demaille@gostai.com>
1871
1872 Fix portability issue in the test suite.
1873 * tests/local.at (AT_MATCHES_CHECK): New.
1874 Based on Perl instead of Sed. Sed has too many portability
1875 pitfalls, not ever Sed is GNU Sed.
1876 * tests/actions.at (Fix user actions without a trailing semicolon):
1877 Use it.
1878
1879 2008-12-08 Akim Demaille <demaille@gostai.com>
1880
1881 Update data/README.
1882 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
1883
1884 2008-12-08 Akim Demaille <demaille@gostai.com>
1885
1886 Install autoconf as a submodule to get m4sugar.
1887 * .gitmodules: Add submodules/autoconf.
1888 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
1889 submodules/autoconf.
1890
1891 2008-12-08 Akim Demaille <demaille@gostai.com>
1892
1893 Test token.prefix in all the skeletons.
1894 * data/java.m4 (b4_token_enum): Use the token.prefix.
1895 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
1896 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
1897 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
1898 * tests/java.at: Comment changes.
1899 (AT_CHECK_JAVA_MINIMAL): Define the END token.
1900 (Java parser class and package names): Add token.prefix check.
1901
1902 2008-12-08 Akim Demaille <demaille@gostai.com>
1903
1904 Fix regeneration of atconfig.
1905 * tests/local.mk (tests/atconfig): The rule was incorrect, but
1906 remove it: now that there is no tests/Makefile.am, the top-level
1907 Makefile properly updates atconfig when needed.
1908
1909 2008-12-07 Di-an Jan <dianj@freeshell.org>
1910
1911 Implement the FIXME that ends an user action with a semicolon
1912 if it seems necessary.
1913 * src/scan-code.l (flex rules section): Flag cpp directive from
1914 any `#' to the first unescaped end-of-line. Semicolon is not
1915 needed after `;', `{', '}', or cpp directives and is needed after
1916 any other token (whitespaces and comments have no effect).
1917 * tests/actions.at (Fix user actions without a trailing semicolon):
1918 New test.
1919 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
1920 to make user actions complete statements.
1921 Adjust column numbers in error messages.
1922 * tests/regression.at (Fix user actions without a trailing semicolon):
1923 Remove. Covered by new test.
1924
1925 2008-12-07 Akim Demaille <demaille@gostai.com>
1926
1927 Update gnulib.
1928 * gnulib: Update from master.
1929
1930 2008-12-05 Eric Blake <ebb9@byu.net>
1931
1932 Avoid compiler warning.
1933 * src/output.c (muscle_insert_item_number_table): Delete unused
1934 function.
1935
1936 2008-12-02 Eric Blake <ebb9@byu.net>
1937
1938 Build testsuite with newer autoconf.
1939 * tests/output.at (m4_expand): Don't override in newer autoconf,
1940 where the underlying implementation changed.
1941 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
1942 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
1943 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
1944 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
1945 since some of them contain unbalanced ')'.
1946
1947 2008-12-01 Akim Demaille <demaille@gostai.com>
1948
1949 Use b4_symbol for printers and destructors everywhere.
1950 * data/bison.m4 (b4_symbol_action_location): New.
1951 * data/c.m4 (b4_symbol_actions): Remove.
1952 Adjust all callers to use by b4_symbol_foreach and the corresponding
1953 b4_symbol_printer/destructor macro.
1954 * data/glr.cc: Adjust.
1955 * data/lalr1.java: Adjust the %destructor sanity check.
1956 * src/output.c (symbol_code_props_output): Remove, we no longer
1957 need the b4_symbol_printers/destructors tables.
1958
1959 2008-12-01 Akim Demaille <demaille@gostai.com>
1960
1961 Use b4_symbol_case_.
1962 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
1963 b4_symbol_case_.
1964
1965 2008-12-01 Akim Demaille <demaille@gostai.com>
1966
1967 Move b4_symbol based macro to bison.m4.
1968 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
1969 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
1970 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
1971 (b4_type_foreach): Move to...
1972 * data/bison.m4: Here.
1973 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
1974 b4_symbol_value_template instead of b4_symbol_value.
1975
1976 2008-12-01 Akim Demaille <demaille@gostai.com>
1977
1978 b4_symbol/type_foreach.
1979 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
1980 Use them.
1981
1982 2008-12-01 Akim Demaille <demaille@gostai.com>
1983
1984 Use the symbol properties to output the printer/destructor for lalr1.cc.
1985 Instead of defining complex list of tuples to define various
1986 properties of the symbols, we now prefer to define symbols as
1987 "structs" in m4: using the symbol key (its number), and the
1988 property name, b4_symbol gives it value. Use this to handle
1989 destructors and printers.
1990
1991 * src/output.c (CODE_PROP): New.
1992 (prepare_symbol_definitions): Use it to define the printer and
1993 destructor related attributes of the symbols.
1994 * data/lalr1.cc (b4_symbol_actions): Rename as...
1995 (b4_symbol_action): this.
1996 Use b4_symbol instead of 6 arguments.
1997 (b4_symbol_printer, b4_symbol_destructor): New.
1998 Use them instead of b4_symbol_actions.
1999
2000 2008-12-01 Akim Demaille <demaille@gostai.com>
2001
2002 Avoid capturing variables too easily.
2003 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
2004 v__ and p__ instead of v and p.
2005
2006 2008-12-01 Akim Demaille <demaille@gostai.com>
2007
2008 Remove spurious empty line before syncline.
2009 * data/bison.m4 (b4_syncline): Don't output an empty line before
2010 the output.
2011
2012 2008-11-26 Akim Demaille <demaille@gostai.com>
2013
2014 Convert lib/Makefile.am into lib/local.mk.
2015 The real problem is rather gnulib.mk, which itself is extracted
2016 from a Makefile.am that gnulib expects to the "recursive". The
2017 tool prefix-gnulib-mk converts such a gnulib.mk to be
2018 non-recursive. Also, some AC_SUBST variables need to be adjusted.
2019
2020 * etc/prefix-gnulib-mk: New.
2021 * bootstrap (slurp): Use it to convert further gnulib.mk.
2022 No longer try to avoid re-creation of lib/gnulib.mk as the changes
2023 are deeper.
2024 * lib/Makefile.am: Rename as...
2025 * lib/local.mk: this.
2026 Adjust to be prefixed.
2027 * Makefile.am, configure.ac: Adjust.
2028 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
2029
2030 2008-11-26 Akim Demaille <demaille@gostai.com>
2031
2032 s/_FLAGS/FLAGS/.
2033 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
2034 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
2035 Reported by Eric Blake.
2036
2037 2008-11-26 Akim Demaille <demaille@gostai.com>
2038
2039 Use b4_parser_tables_define in glr.cc.
2040 * data/glr.c: Use b4_parser_tables_define instead of defining the
2041 (deterministic integral) tables by hand.
2042
2043 2008-11-26 Akim Demaille <demaille@gostai.com>
2044
2045 Use b4_parser_tables_define in Java.
2046 * data/java.m4 (b4_typed_parser_table): Rename as...
2047 (b4_typed_parser_table_define): this, for consistency.
2048 Accept a comment as $4.
2049 Move $2 into yy*_.
2050 (b4_integral_parser_table): Rename as...
2051 (b4_integral_parser_table_define): this.
2052 * data/lalr1.java: Adjust all uses.
2053 Use b4_parser_tables_define instead of generation by hand.
2054
2055 2008-11-26 Akim Demaille <demaille@gostai.com>
2056
2057 Prepare the convergence bw C style and Java table generation.
2058 * data/bison.m4 (b4_tables_map, b4_tables_declare)
2059 (b4_tables_define): Rename as...
2060 (b4_integral_parser_tables_map, b4_parser_tables_declare)
2061 (b4_parser_tables_define): these.
2062 * data/c.m4 (b4_table_define): Rename as...
2063 (b4_integral_parser_table_define): this.
2064 * data/lalr1.cc: Adjust.
2065 (b4_table_define, b4_table_declare): Rename as...
2066 (b4_integral_parser_table_define)
2067 (b4_integral_parser_table_declare): these.
2068 (yyrline_): Move the comment where it is actually used.
2069 * data/yacc.c: Adjust.
2070 (yyrline): Use b4_integral_parser_table_define.
2071
2072 2008-11-26 Akim Demaille <demaille@gostai.com>
2073
2074 Regen.
2075 * src/parse-gram.h, src/parse-gram.c: Regen.
2076
2077 2008-11-26 Akim Demaille <demaille@gostai.com>
2078
2079 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
2080 * data/lalr1.cc (b4_tables_map): Move to...
2081 * data/bison.m4: here.
2082 Update the comment for yytable during the flight.
2083 (b4_tables_declare, b4_tables_define): New.
2084 * data/lalr1.cc: Use them.
2085 * data/c.m4 (b4_table_define): New.
2086 * data/yacc.c: Use b4_tables_define instead of output the tables
2087 by hand.
2088 * tests/regression.at (Web2c Actions): Adjust the expected output,
2089 the order of the tables changed.
2090
2091 2008-11-26 Akim Demaille <demaille@gostai.com>
2092
2093 Get rid of (yy)rhs and (yy)prhs.
2094 These tables are no longer needed in the parsers, and they don't seem to
2095 be useful. They are not documented either.
2096
2097 * src/output.c (prepare_rules): Get rid of rhs and prhs.
2098 Adjust the computation of (yy)r2.
2099
2100 2008-11-26 Akim Demaille <demaille@gostai.com>
2101
2102 Rule length is unsigned.
2103 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
2104
2105 2008-11-26 Akim Demaille <demaille@gostai.com>
2106
2107 Get rid of lalr1-split.cc.
2108 It was no longer maintainer.
2109
2110 * data/lalr1-split.cc: Remove.
2111 * etc/bench.pl.in (bench_fusion_parser): Remove.
2112 Adjust.
2113
2114 2008-11-26 Akim Demaille <demaille@gostai.com>
2115
2116 Use yy* consistently.
2117 * data/glr.c: Now that yyrhs no longer exists as a global
2118 variable, rename local "rhs" variables into "yyrhs" for
2119 consistency.
2120
2121 2008-11-25 Akim Demaille <demaille@gostai.com>
2122
2123 Get rid of yyrhs and yyprhs in glr.c.
2124 * data/glr.c (yyrhs, yyprhs): Remove.
2125 Instead, use the state stack and yystos.
2126
2127 2008-11-25 Akim Demaille <demaille@gostai.com>
2128
2129 Flag glr tests.
2130 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
2131 as an Autotest keyword.
2132
2133 2008-11-25 Akim Demaille <demaille@gostai.com>
2134
2135 Prefer TESTSUITE_FLAGS.
2136 TESTSUITEFLAGS is barely readable.
2137
2138 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
2139 for backward compatibility.
2140 Use the former instead of the latter.
2141
2142 2008-11-25 Akim Demaille <demaille@gostai.com>
2143
2144 Get rid of yyrhs and yyprhs in larl1.java.
2145 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
2146 (yy_reduce_print): Rather, use yystos_ and the state stack.
2147
2148 2008-11-25 Akim Demaille <demaille@gostai.com>
2149
2150 Formatting changes.
2151
2152 2008-11-25 Akim Demaille <demaille@gostai.com>
2153
2154 Get rid of yyrhs and yyprhs in yacc.c.
2155 They were used to get the symbol types, given a rule number, when
2156 displaying the top of the stack before a reduction. But the
2157 symbol type is available from the state stack. This has two be
2158 benefits: two tables less in the parser (making it smaller), and a
2159 more consistent use of the three stacks which will help to fuse
2160 them.
2161
2162 * data/yacc.c (yyprhs, yyrhs): Remove.
2163 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
2164 (yy_reduce_print): Take yyssp as argument.
2165 Use it, together with yystos, to get the symbol type.
2166 * tests/regression.at (Web2c Report): Remove these tables from the
2167 expected output.
2168
2169 2008-11-25 Akim Demaille <demaille@gostai.com>
2170
2171 b4_tables_map.
2172 The point is to factor the generation of the tables across skeletons.
2173 This is language dependant.
2174
2175 * data/c.m4 (b4_comment_): New.
2176 Should be usable to define how to generate tables independently of
2177 the language.
2178 (b4_c_comment): New.
2179 (b4_comment): Bounce to b4_c_comment.
2180 Now support $2 = [PREFIX] for indentation.
2181 * data/lalr1.cc (b4_table_declare): Don't output a comment if
2182 there is no comment.
2183 Indent it properly when there is one.
2184 Output the ending semicolon.
2185 (b4_table_define): Space changes.
2186 Output the ending semicolon.
2187 (b4_tables_map): New.
2188 Use it twice instead of declaring and defining the (integral)
2189 tables by hand.
2190
2191 2008-11-25 Akim Demaille <demaille@gostai.com>
2192
2193 b4_table_declare.
2194 * data/lalr1.cc (b4_table_declare): New.
2195 Use it to declare the tables defined with b4_table_define.
2196 (b4_table_define): Declare a third arg to match b4_table_declare
2197 signature.
2198 Move all the comments around invocations of b4_table_define into
2199 the invocations itselves.
2200 Move things around to have the order for declarations and
2201 definitions.
2202
2203 2008-11-25 Akim Demaille <demaille@gostai.com>
2204
2205 Formatting changes.
2206 * data/lalr1.java: here.
2207
2208 2008-11-25 Akim Demaille <demaille@gostai.com>
2209
2210 b4_args is more general than only C++.
2211 * data/lalr1.cc (b4_args, _b4_args): Move to...
2212 * data/bison.m4: here.
2213
2214 2008-11-21 Di-an Jan <dianj@freeshell.org>
2215
2216 Implement no-XXX arguments for --warnings, --report, --trace.
2217 * src/getargs.c (flags_argmatch): Handles no-XXX.
2218 Fix typo in doxygen comment.
2219
2220 2008-11-21 Akim Demaille <demaille@gostai.com>
2221
2222 Display the changes in cross-options.texi.
2223 * build-aux/cross-options.pl ($sep): New, to separate items.
2224 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
2225 changes.
2226
2227 2008-11-20 Di-an Jan <dianj@freeshell.org>
2228
2229 Improves options in the manual.
2230 * doc/bison.texinfo (-g, -x): Add space before argument.
2231 (Option Cross Key): Implement FIXME: listing directives also.
2232 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
2233 (Short Option): Special case -d. Put arguments inside @option.
2234 (Bison Directive): Add column, automatically extracted from
2235 src/scan-gram.l (actual name passed as the first argument)
2236 with special case for %define.
2237 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
2238 to build-aux/cross-options.pl.
2239 * src/getargs.c (usage): Document limitations of cross-options.pl.
2240 * src/scan-gram.l: Likewise.
2241
2242 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
2243
2244 Fix unexpanded macros in GLR defines file.
2245 Reported by Csaba Raduly at
2246 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
2247 * THANKS (Csaba Raduly): Add.
2248 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
2249 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
2250 lexer in a separate module that includes the defines file.
2251 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
2252 source.
2253 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
2254 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
2255 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
2256 (AT_DATA_SOURCE_PROLOGUE): New.
2257 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
2258 (AT_DATA_SOURCE): New.
2259 (AT_FULL_COMPILE): Extend to support an additional source file.
2260
2261 2008-11-18 Akim Demaille <demaille@gostai.com>
2262
2263 More TODO.
2264 * TODO: More short term issues.
2265
2266 2008-11-18 Akim Demaille <demaille@gostai.com>
2267
2268 Regen.
2269 * src/parse-gram.h, src/parse-gram.c: Regen.
2270
2271 2008-11-18 Akim Demaille <demaille@gostai.com>
2272
2273 Use b4_subtract where possible.
2274 * data/lalr1.cc (b4_subtract): Move to...
2275 * data/bison.m4: here.
2276 * data/glr.c (b4_rhs_data): Use it.
2277 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
2278
2279 2008-11-18 Akim Demaille <demaille@gostai.com>
2280
2281 Remove incorrect mode specification.
2282 * data/glr.cc: Don't pretend it's C code.
2283
2284 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2285
2286 Simplify last patch slightly.
2287 * src/getargs.c (getargs): Here.
2288
2289 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2290
2291 Fix last warning from --enable-gcc-warnings.
2292 * src/getargs.c (getargs): Don't assign const address to non-const
2293 pointer.
2294
2295 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2296
2297 Don't let maintainer-*-check targets force a version update.
2298 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
2299 handled.
2300
2301 2008-11-17 Di-an Jan <dianj@freeshell.org>
2302
2303 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
2304 Align menus. Adjust word wrapping. Use node names for menu names.
2305 (Examples): Don't abbreviate node names.
2306 (LocalWords): Remove abbreviations.
2307 (Copying): Make description a sentence.
2308 (Java Action Features): Remove period to match the rest of menu.
2309
2310 2008-11-17 Di-an Jan <dianj@freeshell.org>
2311
2312 Handles several --enable-gcc-warnings.
2313 * src/getargs.c (command_line_location): Set parameters to void.
2314 * src/output.c (symbol_type_name_cmp): Make static.
2315 (symbols_by_type_name): Set parameters to void.
2316 (symbol_definitions_output): Remove unused parameter. Rename as...
2317 (prepare_symbol_definitions): this.
2318 (muscles_output): Move symbol_definitions_output to...
2319 (output): here as prepare_symbol_definitions.
2320 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
2321 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
2322
2323 2008-11-17 Di-an Jan <dianj@freeshell.org>
2324
2325 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
2326 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
2327
2328 2008-11-16 Akim Demaille <demaille@gostai.com>
2329
2330 Add missing $(EXEEXT).
2331 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
2332 "src/bison$(EXEEXT)".
2333 Reported by Di-an Jan.
2334
2335 2008-11-15 Akim Demaille <demaille@gostai.com>
2336
2337 * TODO: Update.
2338
2339 2008-11-15 Akim Demaille <demaille@gostai.com>
2340
2341 Formatting changes.
2342 * tests/input.at: here.
2343
2344 2008-11-15 Akim Demaille <demaille@gostai.com>
2345
2346 Remove duplicate header inclusion.
2347 * src/LR0.c: here.
2348
2349 2008-11-15 Akim Demaille <demaille@gostai.com>
2350
2351 * src/parse-gram.h, src/parse-gram.c: Regen.
2352
2353 2008-11-15 Akim Demaille <demaille@gostai.com>
2354
2355 Support parametric types.
2356
2357 There are two issues to handle: first scanning nested angle
2358 bracket pairs to support types such as std::pair< std::string,
2359 std::list<std::string> > >.
2360
2361 Another issue is to address idiosyncracies of C++: do not glue two
2362 closing angle brackets together (otherwise it's operator>>), and
2363 avoid sticking blindly a TYPE to the opening <, as it can result
2364 in '<:' which is a digraph for '['.
2365
2366 * src/scan-gram.l (brace_level): Rename as...
2367 (nesting): this.
2368 (SC_TAG): New.
2369 Implement support for complex tags.
2370 (tag): Accept
2371 , but not <.
2372 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
2373 (b4_symbol_variant): Leave space around types as parameters.
2374 * examples/variant.yy: Use nested template types and leading ::.
2375 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
2376 Rename as...
2377 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
2378 * tests/c++.at: Test parametric types.
2379
2380 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
2381
2382 Test token.prefix.
2383 This is not sufficient, but we test at least that the make_SYMBOL
2384 interface is not affected by token.prefix. A more general test
2385 will be implemented when the support of token.prefix is generalized
2386 to more skeletons.
2387
2388 * tests/c++.at: One more variant test, using token.prefix.
2389
2390 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
2391
2392 Test the make_TOKEN interface.
2393 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
2394 Factor the common code in yylex.
2395 Use it to test "%define lex_symbol".
2396
2397 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
2398
2399 Formatting change.
2400
2401 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
2402
2403 Simplify code for variants bench marks.
2404 * etc/bench.pl.in (&generate_grammar_list): Define and use
2405 location_type.
2406 Factor the common code in yylex.
2407
2408 2008-11-15 Akim Demaille <demaille@gostai.com>
2409
2410 Better error message.
2411 * bootstrap (find_tool): Fix the error message.
2412
2413 2008-11-15 Akim Demaille <demaille@gostai.com>
2414
2415 Update variant.yy to newest interface.
2416 * examples/variant.yy: Define lex_symbol.
2417 Adjust.
2418
2419 2008-11-15 Akim Demaille <demaille@gostai.com>
2420
2421 Don't use locations in variant.yy.
2422 * examples/variant.yy: Adjust to not using locations.
2423
2424 2008-11-15 Akim Demaille <demaille@gostai.com>
2425
2426 Comment changes.
2427 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
2428 comments for the license.
2429
2430 2008-11-15 Akim Demaille <demaille@gostai.com>
2431
2432 Remove tests/Makefile.am.
2433 * tests/Makefile.am: Rename as...
2434 * tests/local.mk: this.
2435 * Makefile.am, configure.ac: Adjust.
2436 * Makefile.am (DISTCLEANFILES): Define.
2437 (maintainer-check, maintainer-xml-check, maintainer-push-check):
2438 Remove, we no longer need to bounce to the real targets.
2439
2440 2008-11-15 Akim Demaille <demaille@gostai.com>
2441
2442 Comment changes.
2443
2444 2008-11-15 Akim Demaille <demaille@gostai.com>
2445
2446 djgpp/local.mk.
2447 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
2448 * djgpp/local.mk: this new file.
2449
2450 2008-11-15 Akim Demaille <demaille@gostai.com>
2451
2452 Remove doc/Makefile.am.
2453 * doc/Makefile.am: Rename as...
2454 * doc/local.mk: this.
2455 Adjust paths
2456 * Makefile.am, configure.ac: Adjust.
2457 * Makefile.am (MOSTLYCLEANFILES): New.
2458 * src/local.mk: Adjust.
2459
2460 2008-11-15 Akim Demaille <demaille@gostai.com>
2461
2462 Move sc_tight_scope into maint.mk.
2463 It does not work, and I don't know how it was supposed to work: it
2464 seems to be looking for sources in the build tree. I just moved
2465 it at a better place, fixing it is still required.
2466
2467 * src/local.mk (echo): Remove.
2468 (sc_tight_scope): Move to...
2469 * maint.mk: here.
2470
2471 2008-11-15 Akim Demaille <demaille@gostai.com>
2472
2473 Regen.
2474 * src/parse-gram.h, src/parse-gram.h: Regen.
2475
2476 2008-11-15 Akim Demaille <demaille@gostai.com>
2477
2478 Remove src/Makefile.am.
2479 * src/Makefile.am: Rename as...
2480 * src/local.mk: this.
2481 Prefix all the paths with src/.
2482 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
2483 (AM_CPPFLAGS): Find find in builddir/src.
2484 (YACC): Move the flags into...
2485 (AM_YFLAGS): here.
2486 * maint.mk (sc_tight_scope): Disable.
2487 It used to bounce to the version in src/Makefile.am which is now
2488 part of this very Makefile.
2489 * Makefile.am, configure.ac: Adjust.
2490 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
2491 include "..." to find files "here": we are no longer in src/, so
2492 qualify the includes with src/.
2493 * doc/Makefile.am (PREPATH): No longer include the top_builddir
2494 prefix.
2495 (.x.1): Adjust to be able to create src/foo from the top level
2496 Makefile, instead of going bounce to src/Makefile the creation of
2497 foo.
2498
2499 2008-11-15 Akim Demaille <demaille@gostai.com>
2500
2501 Remove useless variable.
2502 * doc/Makefile.am (srcsrcdir): Remove.
2503
2504 2008-11-15 Akim Demaille <demaille@gostai.com>
2505
2506 Remove data/Makefile.am.
2507 * data/Makefile.am: Rename as...
2508 * data/local.mk: this.
2509 Adjust paths.
2510 * Makefile.am, configure.ac: Adjust.
2511
2512 2008-11-15 Akim Demaille <demaille@gostai.com>
2513
2514 Remove etc/Makefile.am.
2515 * etc/Makefile.am: Rename as...
2516 * etc/local.mk: this.
2517 Adjust.
2518 * Makefile.am, configure.ac: Adjust.
2519
2520 2008-11-15 Akim Demaille <demaille@gostai.com>
2521
2522 Remove examples/local.mk.
2523 examples/calc++/Makefile.am might be interesting to keep as is, since
2524 it is an example in itself.
2525
2526 * examples/Makefile.am: Rename as...
2527 * examples/local.mk: this.
2528 Adjust.
2529 * Makefile.am, configure.ac: Adjust.
2530
2531 2008-11-15 Akim Demaille <demaille@gostai.com>
2532
2533 Remove build-aux/Makefile.am.
2534 Recursive Makefiles are really way too slow, let's get rid of some of
2535 them.
2536
2537 * build-aux/Makefile.am: Rename as...
2538 * build-aux/local.mk: this.
2539 Adjust paths.
2540 * Makefile.am, configure.ac: Adjust.
2541
2542 2008-11-15 Akim Demaille <demaille@gostai.com>
2543
2544 Provide convenience constructors for locations and positions.
2545 * data/location.cc (position::position): Accept file, line and
2546 column as arguments with default values.
2547 Always qualify initial line and column literals as unsigned.
2548 (location::location): Provide convenience constructors.
2549
2550 2008-11-15 Akim Demaille <demaille@gostai.com>
2551
2552 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
2553 token type.
2554 Using template buys us nothing, and makes it uselessly complex to
2555 construct a symbol. Besides, it could not be generalized to other
2556 languages, while make_FOO would work in C/Java etc.
2557
2558 * data/lalr1.cc (b4_symbol_): New.
2559 (b4_symbol): Use it.
2560 (b4_symbol_constructor_declaration_)
2561 (b4_symbol_constructor_definition_): Instead of generating
2562 specializations of an overloaded template function, just generate
2563 several functions whose names are forged from the token names
2564 without the token.prefix.
2565 (b4_symbol_constructor_declarations): Generate them for all the
2566 symbols, not just by class of symbol type, now that instead of
2567 specializing a function template by the token, we generate a
2568 function named after the token.
2569 (b4_symbol_constructor_specialization_)
2570 (b4_symbol_constructor_specializations): Remove.
2571 * etc/bench.pl.in: Adjust to this new API.
2572
2573 2008-11-13 Akim Demaille <demaille@gostai.com>
2574
2575 %define token.prefix.
2576 Provide a means to add a prefix to the name of the tokens as
2577 output in the generated files. Because of name clashes, it is
2578 good to have such a prefix such as TOK_ that protects from names
2579 such as EOF, FILE etc. But it clutters the grammar itself.
2580
2581 * data/bison.m4 (token.prefix): Empty by default.
2582 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
2583 * data/lalr1.cc (b4_symbol): Ditto.
2584
2585 2008-11-13 Akim Demaille <demaille@gostai.com>
2586
2587 Compute at M4 time some of the subtractions.
2588 * data/lalr1.cc (b4_subtract): New.
2589 (b4_rhs_data): Use it.
2590
2591 2008-11-13 Akim Demaille <demaille@gostai.com>
2592
2593 symbol::token.
2594 This allows the user to get the type of a token returned by yylex.
2595
2596 * data/lalr1.cc (symbol::token): New.
2597 (yytoknum_): Define when %define lex_symbol, independently of
2598 %debug.
2599 (yytoken_number_): Move into...
2600 (symbol::token): here, since that's the only use.
2601 The other one is YYPRINT which was not officially supported
2602 by lalr1.cc, and anyway it did not work since YYPRINT uses this
2603 array under a different name (yytoknum).
2604
2605 2008-11-13 Akim Demaille <demaille@gostai.com>
2606
2607 YYERRCODE.
2608 * TODO (YYERRCODE): Mention the case of $undef.
2609
2610 2008-11-13 Akim Demaille <demaille@gostai.com>
2611
2612 TODO: YYPRINT.
2613 * TODO (YYPRINT): New.
2614
2615 2008-11-13 Akim Demaille <demaille@gostai.com>
2616
2617 Comment changes.
2618 * data/lalr1.cc, data/yacc.c: Fix the description of the
2619 yytranslate and yytoknum tables.
2620
2621 2008-11-13 Akim Demaille <demaille@gostai.com>
2622
2623 Define make_symbol in the header.
2624 To reach good performances these functions should be inlined (yet
2625 this is to measure precisely). To this end they must be available
2626 to the caller.
2627
2628 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
2629 location_type with the class name.
2630 Since will now be output in the header, declare "inline".
2631 No longer use b4_symbol_constructor_specializations, but
2632 b4_symbol_constructor_definitions in the header.
2633 Don't call it in the *.cc file.
2634
2635 2008-11-13 Akim Demaille <demaille@gostai.com>
2636
2637 Define yytranslate in the header for lex_symbol.
2638 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
2639 into the header file when using %define lex_symbol.
2640 (yytranslate_): Declare inline.
2641
2642 2008-11-13 Akim Demaille <demaille@gostai.com>
2643
2644 Define the constructors of symbol_type in
2645 b4_symbol_constructor_definitions.
2646 The constructors are called by the make_symbol functions, which a
2647 forthcoming patch will move elsewhere. Hence the interest of
2648 putting them together.
2649
2650 The stack_symbol_type does not need to be moved, it is used only
2651 by the parser.
2652
2653 * data/lalr1.cc: Move symbol_type and symbol_base_type
2654 constructors into...
2655 (b4_symbol_constructor_definitions): here.
2656 Adjust.
2657
2658 2008-11-13 Akim Demaille <demaille@gostai.com>
2659
2660 Make it easier to move the definition of yytranslate_.
2661 Forthcoming changes will make it possible to use yytranslate_
2662 from outside the parser implementation file.
2663
2664 * data/lalr1.cc (b4_yytranslate_definition): New.
2665 Use it.
2666
2667 2008-11-13 Akim Demaille <demaille@gostai.com>
2668
2669 Remove useless class specification.
2670 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
2671 to refer to the class name to use a type defined by the class for
2672 arguments of member functions.
2673
2674 2008-11-13 Akim Demaille <demaille@gostai.com>
2675
2676 Finer input type for yytranslate.
2677 This patch is debatable: the tradition expects yylex to return an int
2678 which happens to correspond to token_number (which is an enum). This
2679 allows for instance to return characters (such as '*' etc.). But this
2680 goes against the stronger typing I am trying to have with the new
2681 lex interface which return a symbol_type. So in this case, feed
2682 yytranslate_ with a token_type.
2683
2684 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
2685 expect a token_type.
2686
2687 2008-11-13 Akim Demaille <demaille@gostai.com>
2688
2689 Honor lex-params in %define lex_symbol mode.
2690 * data/lalr1.cc: Use b4_lex_param.
2691
2692 2008-11-13 Akim Demaille <demaille@gostai.com>
2693
2694 Simplify names.
2695 * src/output.c (symbol_definitions_output): Rename symbol
2696 attributes type_name and has_type_name as type and has_type.
2697 * data/lalr1.cc: Adjust uses.
2698
2699 2008-11-13 Akim Demaille <demaille@gostai.com>
2700
2701 Use b4_type_names for the union type.
2702 The union used to compute the size of the variant used to iterate
2703 over the type of all the symbols, with a lot of redundancy. Now
2704 iterate over the lists of symbols having the same type-name.
2705
2706 * data/lalr1.cc (b4_char_sizeof_): New.
2707 (b4_char_sizeof): Use it.
2708 Adjust to be called with a list of numbers instead of a single
2709 number.
2710 Adjust its caller for new-line issues.
2711
2712 2008-11-13 Akim Demaille <demaille@gostai.com>
2713
2714 Define the "identifier" of a symbol.
2715 Symbols may have several string representations, for instance if
2716 they have an alias. What I call its "id" is a string that can be
2717 used as an identifier. May not exist.
2718
2719 Currently the symbols which have the "tag_is_id" flag set are
2720 those that don't have an alias. Look harder for the id.
2721
2722 * src/output.c (is_identifier): Move to...
2723 * src/symtab.c (is_identifier): here.
2724 * src/symtab.h, src/symtab.c (symbol_id_get): New.
2725 * src/output.c (symbol_definitions_output): Use it to define "id"
2726 and "has_id".
2727 Remove the definition of "tag_is_id".
2728 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
2729 "tag_is_id" were used to produce code.
2730 We still use "tag" for documentation.
2731
2732 2008-11-11 Akim Demaille <demaille@gostai.com>
2733
2734 Locations are no longer required by lalr1.cc.
2735 * data/lalr1.cc (_b4_args, b4_args): New.
2736 Adjust all uses of locations to make them optional.
2737 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
2738 (AT_CHECK_NAMESPACE): Check the use of locations.
2739 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
2740 without locations with lalr1.cc.
2741 Test these cases.
2742 * tests/output.at: Check lalr1.cc with and without location
2743 support.
2744 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
2745 Don't use locations.
2746
2747 2008-11-11 Akim Demaille <demaille@gostai.com>
2748
2749 AT_FULL_COMPILE.
2750 * tests/local.at (AT_FULL_COMPILE): New.
2751 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
2752
2753 2008-11-11 Akim Demaille <demaille@gostai.com>
2754
2755 Support parens in calc++.
2756 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
2757 * examples/calc++/test (run): Check the expected output.
2758 Adjust callers.
2759 Check parens too.
2760
2761 2008-11-11 Akim Demaille <demaille@gostai.com>
2762
2763 Simplify lalr1.cc since %defines is mandatory.
2764 * data/lalr1.cc: Remove useless calls to b4_defines_if.
2765
2766 2008-11-11 Akim Demaille <demaille@gostai.com>
2767
2768 TODO: yyfmt.
2769 * TODO (yysyntax_error): New item.
2770
2771 2008-11-11 Akim Demaille <demaille@gostai.com>
2772
2773 Prefer M4 to CPP.
2774 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
2775 YYERROR_VERBOSE.
2776
2777 2008-11-11 Akim Demaille <demaille@gostai.com>
2778
2779 Support i18n of the parse error messages.
2780 * TODO (lalr1.cc/I18n): Remove.
2781 * data/lalr1.cc (yysyntax_error_): Support the translation of the
2782 error messages, as done in yacc.c.
2783 Stay within the yy* pseudo namespace.
2784
2785 2008-11-11 Akim Demaille <demaille@gostai.com>
2786
2787 More TODO.
2788 * TODO (single stack, yysyntax_error): New.
2789
2790 2008-11-11 Akim Demaille <demaille@gostai.com>
2791
2792 Make it possible to return a symbol_type from yylex.
2793 * data/lalr1.cc (b4_lex_symbol_if): New.
2794 (parse): When lex_symbol is defined, expected yylex to return the
2795 complete lookahead.
2796 * etc/bench.pl.in (generate_grammar_list): Extend to support this
2797 yylex interface.
2798 (bench_variant_parser): Exercise it.
2799
2800 2008-11-11 Akim Demaille <demaille@gostai.com>
2801
2802 Remove useless bench case.
2803 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
2804 no longer used.
2805
2806 2008-11-11 Akim Demaille <demaille@gostai.com>
2807
2808 Improve display of directives.
2809 * etc/bench.pl.in (parse_term): Don't add useless eol.
2810
2811 2008-11-11 Akim Demaille <demaille@gostai.com>
2812
2813 Use string_cast in the bench.
2814 * etc/bench.pl.in (generate_grammar_list): Define and use
2815 string_cast.
2816
2817 2008-11-11 Akim Demaille <demaille@gostai.com>
2818
2819 Replace yychar with a Boolean.
2820 * data/lalr1.cc (parse::yychar): Replace by...
2821 (parse::yyempty): this.
2822
2823 2008-11-11 Akim Demaille <demaille@gostai.com>
2824
2825 Factor the tables.
2826 * TODO: New item.
2827
2828 2008-11-11 Akim Demaille <demaille@gostai.com>
2829
2830 Let yytranslate handle the eof case.
2831 * data/lalr1.cc (yytranslate_): Handle the EOF case.
2832 Adjust callers.
2833 No longer expect yychar to be equal to yyeof_, rather, test the
2834 lookahead's (translated) kind.
2835
2836 2008-11-11 Akim Demaille <demaille@gostai.com>
2837
2838 yychar cannot be empty in yyerrlab.
2839 * TODO (yychar == yyempty_): New.
2840 * data/lalr1.cc: Remove the handling of this case.
2841 This eases forthcoming changes related to yychar and yytranslate.
2842
2843 2008-11-11 Akim Demaille <demaille@gostai.com>
2844
2845 Bench: syntactic sugar for %define/#define.
2846 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
2847 (&bench_push_parser, bench_variant_parser): Use this feature.
2848 (&eat): New.
2849 Use it.
2850
2851 2008-11-11 Akim Demaille <demaille@gostai.com>
2852
2853 Less memory pressure on the "list" bench.
2854 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
2855 the values, to limit memory pressure.
2856
2857 2008-11-11 Akim Demaille <demaille@gostai.com>
2858
2859 Introduce make_symbol.
2860 make_symbol provides a means to construct a full symbol (kind,
2861 value, location) in a single shot. It is meant to be a Symbol
2862 constructor, parameterized by the symbol kind so that overloading
2863 would prevent incorrect kind/value pairs. Unfortunately
2864 parameterized constructors do not work well in C++ (unless the
2865 parameter also appears as an argument, which is not acceptable),
2866 hence the use of a function instead of a constructor.
2867
2868 * data/lalr1.cc (b4_symbol_constructor_declaration_)
2869 (b4_symbol_constructor_declarations)
2870 (b4_symbol_constructor_specialization_)
2871 (b4_symbol_constructor_specializations)
2872 (b4_symbol_constructor_definition_)
2873 (b4_symbol_constructor_definitions): New.
2874 Use them where appropriate to generate declaration, declaration of
2875 the specializations, and implementations of the templated
2876 overloaded function "make_symbol".
2877 (variant::variant): Always define a default ctor.
2878 Also provide a copy ctor.
2879 (symbol_base_type, symbol_type): New ctor overloads for value-less
2880 symbols.
2881 (symbol_type): Now public, so that functions such as yylex can use
2882 it.
2883
2884 2008-11-11 Akim Demaille <demaille@gostai.com>
2885
2886 Inform m4 whether a tag is a valid id.
2887 * src/output.c (is_identifier): New.
2888 (symbol_definitions_output): Use it to define tag_is_id.
2889 But maybe this should be done at m4 level?
2890
2891 2008-11-11 Akim Demaille <demaille@gostai.com>
2892
2893 Test 214 was failing: it greps with a pattern containing [ ]*
2894 which obviously meant to catch spaces and tabs, but contained only
2895 spaces. Tabulations in sources are a nuisance, so to simplify the
2896 matter, get rid of all the tabulations in the Java sources. The
2897 other skeletons will be treated equally later.
2898
2899 * data/java.m4, data/lalr1.java: Untabify.
2900 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
2901 tabulations are no longer generated.
2902
2903 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
2904
2905 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
2906 * configure.ac: Adjust usage.
2907 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2908 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2909 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
2910
2911 2008-11-10 Di-an Jan <dianj@freeshell.org>
2912
2913 Workaround Java's ``code too large'' problem for parser tables
2914 in most cases, by using one function per initialization.
2915 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
2916 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
2917 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
2918 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
2919 (yytname_): Use b4_typed_parser_table.
2920 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
2921 ``code too large'' error.
2922
2923 2008-11-10 Di-an Jan <dianj@freeshell.org>
2924
2925 * NEWS: Document them.
2926
2927 General Java skeleton improvements.
2928 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
2929 using gcj < 4.3 in the testsuite, according to comments in
2930 gnulib/m4/javacomp.m4.
2931 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
2932 location_type, position_type): Remove extraneous brackets from
2933 b4_percent_define_default.
2934 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
2935 m4_define and m4_define_default.
2936 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
2937 which marks the end of user code with appropriate syncline, like all
2938 the other skeletons.
2939 (b4_user_post_prologue): Add. Don't silently drop.
2940 (yylex): Remove.
2941 (parse): Inline yylex.
2942 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
2943 (%{...%}): Fix typo of %code imports.
2944 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
2945
2946 Support annotations on parser class with %define annotations.
2947 * data/lalr1.java (annotations): Add to parser class modifier.
2948 * doc/bison.texinfo (Java Parser Interface): Document
2949 %define annotations.
2950 (Java Declarations Summary): Document %define annotations.
2951 * tests/java.at (Java parser class modifiers): Test annotations.
2952
2953 Do not generate code for %error-verbose unless requested.
2954 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
2955 Make private. Make conditional on %error-verbose.
2956 (getErrorVerbose, setErrorVerbose): New.
2957 (yytnamerr_): Make conditional on %error-verbose.
2958 (yysyntax_error): Make some code conditional on %error-verbose.
2959 * doc/bison.texinfo (Java Bison Interface): Remove the parts
2960 about %error-verbose having no effect.
2961 (getErrorVerbose, setErrorVerbose): Document.
2962
2963 Move constants for token names to Lexer interface.
2964 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
2965 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
2966 (parse): Qualify EOF to Lexer.EOF.
2967 * doc/bison.texinfo (Java Parser Interface): Move documentation of
2968 EOF and token names to Java Lexer Interface.
2969 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
2970
2971 Make yyerror public.
2972 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
2973 (yyerror): Change to public. Add Javadoc comments. Use longer
2974 parameter names. Make the body rather than the declarator
2975 conditional on %locations.
2976 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
2977
2978 Allow user to add code to the constructor with %code init.
2979 * data/java.m4 (b4_init_throws): New, for %define init_throws.
2980 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
2981 Add %code init to the front of the constructor body.
2982 * doc/bison.texinfo (YYParser.YYParser): Document %code init
2983 and %define init_throws.
2984 (Java Declarations Summary): Document %code init and
2985 %define init_throws.
2986 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
2987 (Java constructor init and init_throws): Add tests.
2988
2989 2008-11-10 Akim Demaille <demaille@gostai.com>
2990
2991 Update TODO.
2992 * TODO (-D): is implemented.
2993 (associativity): Same precedence must have the same associativity.
2994 For instance, how can a * b / c be parsed if * is %left and / is
2995 %right?
2996 (YYERRORCODE, YYFAIL, YYBACKUP): New.
2997
2998 2008-11-10 Akim Demaille <demaille@gostai.com>
2999
3000 Formatting changes.
3001
3002 2008-11-10 Akim Demaille <demaille@gostai.com>
3003
3004 More information about the symbols.
3005 * src/output.c (type_names_output): Document all the symbols,
3006 including those that don't have a type-name.
3007 (symbol_definitions_output): Define "is_token" and
3008 "has_type_name".
3009 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
3010 type-name, now that they are defined too in b4_type_names.
3011
3012 2008-11-10 Akim Demaille <demaille@gostai.com>
3013
3014 Regen.
3015
3016 2008-11-10 Akim Demaille <demaille@gostai.com>
3017
3018 Make parser::yytranslate static.
3019 Small speedup (1%) on the list grammar. And makes yytranslate_
3020 available in non member functions.
3021
3022 * data/lalr1.cc (yytranslate_): Does not need to be a instance
3023 function.
3024
3025 2008-11-10 Akim Demaille <demaille@gostai.com>
3026
3027 Avoid trailing spaces.
3028 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
3029 * data/lalr1.cc: Don't indent before rule and symbol actions, as
3030 they can be empty, and anyway this incorrectly indents the first
3031 action.
3032
3033 2008-11-10 Akim Demaille <demaille@gostai.com>
3034
3035 Comment changes.
3036
3037 2008-11-10 Akim Demaille <demaille@gostai.com>
3038
3039 Use "enum" for integral constants.
3040 This is just nicer to read, I observed no speedup.
3041
3042 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
3043 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
3044 (yyuser_token_number_max_, yyundef_token_): Move into...
3045 (yytranslate_): here.
3046
3047 2008-11-10 Akim Demaille <demaille@gostai.com>
3048
3049 Shortcuts in bench directives.
3050 * etc/bench.pl.in (parse_dirs): New.
3051 Use it.
3052 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
3053 Create the benches in "benches/".
3054
3055 2008-11-10 Akim Demaille <demaille@gostai.com>
3056
3057 Formatting changes.
3058 * data/lalr1.cc: here.
3059
3060 2008-11-10 Akim Demaille <demaille@gostai.com>
3061
3062 Adjust verbose message to using emacs.
3063 * etc/bench.pl.in: Inform compilation-mode when we change the
3064 directory.
3065 (generate_grammar_list): Recognize %define "variant" in addition
3066 to %define variant.
3067
3068 2008-11-10 Akim Demaille <demaille@gostai.com>
3069
3070 Classify symbols by type-name.
3071 * src/uniqstr.h (UNIQSTR_CMP): New.
3072 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
3073 (type_names_output): New.
3074 (muscles_output): Use it.
3075 * data/lalr1.cc (b4_symbol_action_): Remove.
3076 (b4_symbol_case_, b4_type_action_): New.
3077 Adjust uses of b4_symbol_action_ to use b4_type_action_.
3078
3079 2008-11-10 Akim Demaille <demaille@gostai.com>
3080
3081 Change the handling of the symbols in the skeletons.
3082 Before we were using tables which lines were the symbols and which
3083 columns were things like number, tag, type-name etc. It is was
3084 difficult to extend: each time a column was added, all the numbers had
3085 to be updated (you asked for colon $2, not for "tag"). Also, it was
3086 hard to filter these tables when only a subset of the symbols (say the
3087 tokens, or the nterms, or the tokens that have and external number
3088 *and* a type-name) was of interest.
3089
3090 Now instead of monolithic tables, we define one macro per cell. For
3091 instance "b4_symbol(0, tag)" is a macro name which contents is
3092 self-decriptive. The macro "b4_symbol" provides easier access to
3093 these cells.
3094
3095 * src/output.c (type_names_output): Remove.
3096 (symbol_numbers_output, symbol_definitions_output): New.
3097 (muscles_output): Call them.
3098 (prepare_symbols): Define b4_symbols_number.
3099
3100 2008-11-10 Akim Demaille <demaille@gostai.com>
3101
3102 --trace=muscles
3103 * src/getargs.h, src/getargs.c (trace_muscle): New.
3104 (trace_types, trace_args): Support it.
3105 * src/output.c (output_skeleton): Use it.
3106
3107 2008-11-10 Akim Demaille <demaille@gostai.com>
3108
3109 muscles_output.
3110 * src/output.c (muscles_output): New, extracted from...
3111 (output_skeleton): here.
3112 Adjust.
3113
3114 2008-11-10 Akim Demaille <demaille@gostai.com>
3115
3116 Formatting changes.
3117
3118 2008-11-10 Akim Demaille <demaille@gostai.com>
3119
3120 Update the variant example.
3121 * examples/variant.yy: Formatting changes.
3122 One stage build.
3123
3124 2008-11-10 Akim Demaille <demaille@gostai.com>
3125
3126 Support constructor with an argument.
3127 This improves the "list" bench by 2%.
3128
3129 * data/lalr1.cc (variant::build): Add an overloaded version with
3130 an argument.
3131 * tests/c++.at (AT_CHECK_VARIANT): Check it.
3132
3133 2008-11-10 Akim Demaille <demaille@gostai.com>
3134
3135 Test variants.
3136 * tests/c++.at (AT_CHECK_VARIANTS): New.
3137 Use it with and without %define assert.
3138
3139 2008-11-10 Akim Demaille <demaille@gostai.com>
3140
3141 Add %precedence support.
3142 Unfortunately it is not possible to reuse the %prec directive. This
3143 is because to please POSIX, we do not require to end the rules with a
3144 semicolon. As a result,
3145
3146 foo: bar %prec baz
3147
3148 is ambiguous: either a rule which precedence is that of baz, or a rule,
3149 and then a declaration of the precedence of the token baz.
3150
3151 * doc/bison.texinfo: Document %precedence.
3152 (Precedence Only): New.
3153 * src/assoc.h, src/assoc.c (precedence_assoc): New.
3154 * src/conflicts.c (resolve_sr_conflict): Support it.
3155 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
3156 Parse it.
3157 * tests/calc.at: Use %precedence for NEG.
3158 * tests/conflicts.at (%precedence does not suffice)
3159 (%precedence suffices): New tests.
3160
3161 2008-11-09 Akim Demaille <demaille@gostai.com>
3162
3163 Make benches in a sub dirs.
3164 * etc/bench.pl.in ($dir): New.
3165 Use it.
3166 Check the use of constructors with an argument.
3167 (bench_variant_parser): Fix.
3168
3169 2008-11-09 Akim Demaille <demaille@gostai.com>
3170
3171 fix eof condition
3172
3173 2008-11-09 Akim Demaille <demaille@gostai.com>
3174
3175 Fix --help.
3176
3177 2008-11-09 Akim Demaille <demaille@gostai.com>
3178
3179 Require the generation of parse-gram.output.
3180 * src/Makefile.am (YACC): Pass --report=all.
3181
3182 2008-11-09 Akim Demaille <demaille@gostai.com>
3183
3184 Formatting changes.
3185
3186 2008-11-09 Akim Demaille <demaille@gostai.com>
3187
3188 Update TODO.
3189 * TODO: Remove obsolete items.
3190 Update others.
3191
3192 2008-11-09 Akim Demaille <demaille@gostai.com>
3193
3194 Enhance bench.pl.
3195 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
3196 (@token, $grammar, $bench): New.
3197 (generate_grammar_variant): Rename as...
3198 (generate_grammar_list): this.
3199 (generate_grammar): Adjust.
3200 (bench_grammar): Rename as...
3201 (bench): this.
3202 Use it in the various bench-marking routines.
3203 (-b, -g): New options.
3204
3205 2008-11-09 Akim Demaille <demaille@gostai.com>
3206
3207 Use a static hierarchy for symbols in the C++ parser.
3208 * data/lalr1.cc (symbol_base_type, symbol_type)
3209 (stack_symbol_type): Make it a static hierarchy.
3210 Adjust dependencies.
3211
3212 2008-11-09 Akim Demaille <demaille@gostai.com>
3213
3214 bench.pl -d, --directive.
3215 * etc/bench.pl.in (@directive): New.
3216 (&bench_grammar): Use it.
3217 (&bench_list_grammar): New, to provide access to the "variant"
3218 grammar.
3219 Use it.
3220 (getopts): Support -d, --directive.
3221
3222 2008-11-09 Akim Demaille <demaille@gostai.com>
3223
3224 Use inline for small operations.
3225 * data/lalr1.cc (symbol_base_type, symbol_type)
3226 (stack_symbol_type): Declare constructor and other operations as
3227 inline.
3228 (yy_destroy_): Inline.
3229
3230 2008-11-09 Akim Demaille <demaille@gostai.com>
3231
3232 Introduce a hierarchy for symbols.
3233 * data/lalr1.cc (symbol_base_type, symbol_type): New.
3234 (data_type): Rename as...
3235 (stack_symbol_type): this.
3236 Derive from symbol_base_type.
3237 (yy_symbol_value_print_): Merge into...
3238 (yy_symbol_print_): this.
3239 Rename as...
3240 (yy_print_): this.
3241 (yydestruct_): Rename as...
3242 (yy_destroy_): this.
3243 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
3244 (parser::parse): yyla is now of symbol_type.
3245 Use its type member instead of yytoken.
3246
3247 2008-11-09 Akim Demaille <demaille@gostai.com>
3248
3249 Rename data_type and stack_symbol_type.
3250 * data/lalr1.cc (data_type): Rename as...
3251 (stack_symbol_type): this.
3252
3253 2008-11-09 Akim Demaille <demaille@gostai.com>
3254
3255 Handle semantic value and location together.
3256 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
3257 yydata.value and yydata.location.
3258 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
3259 (YY_SYMBOL_PRINT): Now take semantic value and location as a
3260 single arg.
3261 Adjust all callers.
3262 (yydestruct_): New overload for a stack symbol.
3263
3264 2008-11-09 Akim Demaille <demaille@gostai.com>
3265
3266 Push a complete symbol, not connected parts.
3267 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
3268 state, value and location.
3269 Adjust callers.
3270
3271 2008-11-09 Akim Demaille <demaille@gostai.com>
3272
3273 Agregate yylval and yylloc.
3274 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
3275 (parser::yyla): this.
3276
3277 2008-11-09 Akim Demaille <demaille@gostai.com>
3278
3279 Rely on the state stack to display reduction traces.
3280 To display rhs symbols before a reduction, we used information
3281 about the rule reduced, which required the tables yyrhs and
3282 yyprhs. Now use rely only on the state stack to get the same
3283 information.
3284
3285 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
3286 Use them.
3287 (parser::yyrhs_, parser::yyprhs_): Remove.
3288 (parser::yy_reduce_print_): Use the state stack.
3289
3290 2008-11-09 Akim Demaille <demaille@gostai.com>
3291
3292 Fuse yyval and yyloc into yylhs.
3293 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
3294 yylhs.
3295 (parse): Replace yyval and yyloc with yylhs.value and
3296 yylhs.location.
3297 After a user action, compute yylhs.state earlier.
3298 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
3299 fresh error_token.
3300
3301 2008-11-09 Di-an Jan <dianj@freeshell.org>
3302
3303 Remove unused variable.
3304 * src/output.c (type_names_output): Remove unused variable sep.
3305
3306 2008-11-09 Paolo Bonzini <bonzini@gnu.org>
3307
3308 Change tests/output.at quoting.
3309 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
3310 expanding arguments.
3311
3312 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
3313
3314 Don't add a semicolon to actions for %skeleton or %language.
3315 It breaks Java test cases as reported by Akim Demaille.
3316 * src/scan-code.l: Implement.
3317
3318 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
3319
3320 Clean up %skeleton and %language priority implementation.
3321 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
3322 remove static qualifier because others will soon need to see it.
3323 (language_prio): Likewise.
3324 (getargs): Use command_line_prio rather than 0.
3325 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
3326 enum fields.
3327 (skeleton_prio): Extern it.
3328 (language_prio): Extern it.
3329 * src/parse-gram.y: Use grammar_prio rather than 1.
3330
3331 2008-11-07 Akim Demaille <demaille@gostai.com>
3332
3333 Moving push traces into yypush_.
3334 * data/lalr1.cc (yypush_): Now takes a optional trace message.
3335 Adjust all uses.
3336
3337 2008-11-07 Akim Demaille <demaille@gostai.com>
3338
3339 The single-stack C++ parser is now the standard one.
3340 * data/lalr1.cc: Rename as...
3341 * data/lalr1-split.cc: this.
3342 * data/lalr1-fusion.cc: Rename as...
3343 * data/lalr1.cc: this.
3344 * etc/bench.pl.in: Adjust.
3345
3346 2008-11-07 Akim Demaille <demaille@gostai.com>
3347
3348 Avoid empty-if warnings.
3349 Reported by Quentin Hocquet.
3350
3351 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
3352 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
3353
3354 2008-11-07 Akim Demaille <demaille@gostai.com>
3355
3356 Pass command line location to skeleton_arg and language_argmatch.
3357 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
3358 The location argument is now mandatory.
3359 Adjust all dependencies.
3360 (getargs): Use command_line_location.
3361
3362 2008-11-07 Akim Demaille <demaille@gostai.com>
3363
3364 -D, --define.
3365 * src/getargs.c (usage): Document -D.
3366 Fix help string for --locations.
3367 (command_line_location): New.
3368 (short_options, long_options, getargs): Support -D, --define.
3369 (getargs): Move -d support at the right place.
3370 * doc/bison.texinfo (Bison Options): Update.
3371 * tests/input.at (%define, --define): New.
3372
3373 2008-11-07 Akim Demaille <demaille@gostai.com>
3374
3375 Initialize the muscle table before parsing the command line.
3376 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
3377 (getargs): Define file_name.
3378 * src/main.c (main): Initialize muscle_tab before calling
3379 getargs.
3380 * src/muscle_tab.c (muscle_init): No longer define file_name, as
3381 its value is not available yet.
3382
3383 2008-11-07 Akim Demaille <demaille@gostai.com>
3384
3385 Locations without columns for command line arguments.
3386 * src/location.c (location_print): Don't display negative columns.
3387 * src/location.h: Document this.
3388
3389 2008-11-07 Akim Demaille <demaille@gostai.com>
3390
3391 Fix --help.
3392 * src/getargs.c (usage): Fix help string for -W.
3393
3394 2008-11-07 Akim Demaille <demaille@gostai.com>
3395
3396 Handle more general types of option arguments.
3397 * build-aux/cross-options.pl: The argument ends at the first
3398 space, not the first non-symbol character.
3399 Use @var for each word appearing the argument description.
3400
3401 2008-11-07 Akim Demaille <demaille@gostai.com>
3402
3403 Destroy the variants that remain on the stack in case of error.
3404 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
3405 destructor.
3406 Display the value only if yymsg is nonnull.
3407 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
3408
3409 2008-11-07 Akim Demaille <demaille@gostai.com>
3410
3411 Add "%define assert" to variants.
3412 This is used to help the user catch cases where some value gets
3413 ovewritten by a new one. This should not happen, as this will
3414 probably leak.
3415
3416 Unfortunately this uncovered a bug in the C++ parser itself: the
3417 lookahead value was not destroyed between two calls to yylex. For
3418 instance if the previous lookahead was a std::string, and then an int,
3419 then the value of the std::string was correctly taken (i.e., the
3420 lookahead was now an empty string), but std::string structure itself
3421 was not reclaimed.
3422
3423 This is now done in variant::build(other&) (which is used to take the
3424 value of the lookahead): other is not only stolen from its value, it
3425 is also destroyed. This incurs a new performance penalty of a few
3426 percent, and union becomes faster again.
3427
3428 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
3429 (b4_variant_if): New.
3430 (variant::built): New.
3431 Use it whereever the status of the variant changes.
3432 * etc/bench.pl.in: Check the penalty of %define assert.
3433
3434 2008-11-07 Akim Demaille <demaille@gostai.com>
3435
3436 Use "%define variant" in bench.pl.
3437 * etc/bench.pl.in: No longer use the pseudo directive %variants,
3438 just use %define variants.
3439
3440 2008-11-07 Akim Demaille <demaille@gostai.com>
3441
3442 Regen.
3443 * src/parse-gram.h, src/parse-gram.c: Regen.
3444
3445 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
3446
3447 Fix user actions without a trailing semicolon.
3448 Reported by Sergei Steshenko at
3449 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
3450 * THANKS (Sergei Steshenko): Add.
3451 * src/scan-code.l (SC_RULE_ACTION): Fix it.
3452 * tests/regression.at (Fix user actions without a trailing semicolon):
3453 New test case.
3454
3455 2008-11-04 Akim Demaille <demaille@gostai.com>
3456
3457 Use b4_copyright_years.
3458 * data/yacc.c (b4_copyright_years): New.
3459 Fix its value according to the comments in the file.
3460 Use it and undefine it.
3461
3462 2008-11-04 Akim Demaille <demaille@gostai.com>
3463
3464 Formatting changes.
3465 * data/lalr1-fusion.cc, src/parse-gram.y: here.
3466
3467 2008-11-04 Akim Demaille <demaille@gostai.com>
3468
3469 Formatting changes.
3470 * data/lalr1-fusion.cc: here.
3471
3472 2008-11-04 Akim Demaille <demaille@gostai.com>
3473
3474 Use strict on bench.pl.
3475 * etc/bench.pl.in (&run, &generate_grammar): New.
3476 Rename the grammar generating functions for consistency.
3477 Change the interface so that the list of benches to run is passed
3478 as (optionless) arguments.
3479 (&compile): Use &run.
3480
3481 2008-11-04 Akim Demaille <demaille@gostai.com>
3482
3483 Remove spurious initial empty lines.
3484 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
3485 * data/yacc.c: End the @output lines with an @.
3486
3487 2008-11-04 Akim Demaille <demaille@gostai.com>
3488
3489 Improve the display of sizes.
3490 * etc/bench.p.in: Higher precision.
3491 Sort by decreasing size.
3492
3493 2008-11-04 Akim Demaille <demaille@gostai.com>
3494
3495 Don't memcpy C++ structures.
3496 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
3497 arguments.
3498 (variant::build): New overload for
3499 copy-construction-that-destroys.
3500 (variant::swap): New.
3501 (parser::yypush_): Use it in variant mode.
3502
3503 2008-11-04 Akim Demaille <demaille@gostai.com>
3504
3505 Better defaults for bench.pl.
3506 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
3507 default values.
3508 Adjust &verbose uses.
3509 (-q, --quiet): New.
3510
3511 2008-11-04 Akim Demaille <demaille@gostai.com>
3512
3513 Make variant.yy more complex.
3514 std::list cannot be copied via memcpy, they are more demanding than
3515 std::string. Use one std::list to strengthen the test.
3516
3517 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
3518 Adjust.
3519 Create a list of strings, instead of a single large string.
3520
3521 2008-11-04 Akim Demaille <demaille@gostai.com>
3522
3523 bench.pl --bench.
3524 * etc/bench.pl.in (--bench, $bench): New.
3525
3526 2008-11-04 Akim Demaille <demaille@gostai.com>
3527
3528 Sort methods.
3529 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
3530 Define it after as().
3531
3532 2008-11-04 Akim Demaille <demaille@gostai.com>
3533
3534 Useless parens.
3535 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
3536
3537 2008-11-04 Akim Demaille <demaille@gostai.com>
3538
3539 Issue missing synclines after user actions.
3540 * data/c.m4 (b4_case): Issue synclines on the output file.
3541
3542 2008-11-04 Akim Demaille <demaille@gostai.com>
3543
3544 Remove trailing empty line.
3545 * data/lalr1-fusion.cc: Don't add an empty line after the user's
3546 epilogue.
3547
3548 2008-11-04 Akim Demaille <demaille@gostai.com>
3549
3550 Fix output of copyright years.
3551 * data/bison.m4 (b4_copyright): Fix the indentation of the
3552 copyright year paragraph.
3553 Use b4_copyright_years when no years are given.
3554 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
3555 (b4_copyright_years): New.
3556 Use it.
3557
3558 2008-11-04 Akim Demaille <demaille@gostai.com>
3559
3560 Avoid the spurious initial empty line.
3561 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
3562 the end of @output request to suppress the empty line that
3563 results.
3564
3565 2008-11-04 Akim Demaille <demaille@gostai.com>
3566
3567 Remove parser::rhs_number_type.
3568 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
3569 (yyrhs_): Use b4_table_define.
3570
3571 2008-11-04 Akim Demaille <demaille@gostai.com>
3572
3573 Fix iteration type.
3574 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
3575
3576 2008-11-04 Akim Demaille <demaille@gostai.com>
3577
3578 Factor the declaration of the integer tables.
3579 * data/lalr1-fusion.cc (b4_table_define): New.
3580 Use it.
3581
3582 2008-11-03 Akim Demaille <demaille@gostai.com>
3583
3584 Fix indentation of tables in lalr1.cc
3585 * data/lalr1-fusion.cc: Fix the indentation.
3586
3587 2008-11-03 Akim Demaille <demaille@gostai.com>
3588
3589 Destroy the lhs symbols after reduction.
3590 * data/lalr1-fusion.cc (parse): After the user action, when in
3591 variant mode, destroy the lhs symbols.
3592
3593 2008-11-03 Akim Demaille <demaille@gostai.com>
3594
3595 Simplify yysyntax_error_ use.
3596 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
3597 type, but make it unnamed in the declaration when it is not used.
3598
3599 2008-11-03 Akim Demaille <demaille@gostai.com>
3600
3601 Let yy::variant::build return an lvalue.
3602 * data/lalr1-fusion.cc (variant::build): Return a reference to the
3603 object.
3604
3605 2008-11-03 Akim Demaille <demaille@gostai.com>
3606
3607 Define yy::variant only when needed.
3608 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
3609 used.
3610
3611 2008-11-03 Akim Demaille <demaille@gostai.com>
3612
3613 Bench the three-stack lalr1.cc.
3614 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
3615 one-stack one.
3616
3617 2008-11-03 Akim Demaille <demaille@gostai.com>
3618
3619 Fail on parse error in calc++.
3620 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
3621 status.
3622 * examples/calc++/test ($me, $number, $exit, run): New.
3623 Use them to propagate errors to the exit status.
3624
3625 2008-11-03 Akim Demaille <demaille@gostai.com>
3626
3627 Don't specify the skeleton twice in the example.
3628 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
3629 file does what is needed.
3630
3631 2008-11-03 Akim Demaille <demaille@gostai.com>
3632
3633 bench: Improve output.
3634 * etc/bench.pl.in (bench_grammar): Tune the printf format.
3635
3636 2008-11-03 Akim Demaille <demaille@gostai.com>
3637
3638 bench: check impact of %debug on variants.
3639 * etc/bench.pl.in (variant_grammar): Fix the computation of
3640 $variant.
3641 Generate a grammar file that can work with or without %debug.
3642 Do use the @directive.
3643 (bench_variant_parser): Check impact of %debug.
3644 (@directives): Rename all the occurrences to...
3645 (@directive): this, for consistency.
3646
3647 2008-11-03 Akim Demaille <demaille@gostai.com>
3648
3649 bench: report the size too.
3650 * etc/bench.pl.in ($iterations): Defaults to -3.
3651 (&bench_grammar): Require hireswallclock.
3652 Compute and display the size of the result.
3653 More comments.
3654
3655 2008-11-03 Akim Demaille <demaille@gostai.com>
3656
3657 bench: More use of the verbosity level.
3658 * etc/bench.pl.in ($verbose, &verbose): New.
3659 Use them.
3660 More POD documentation.
3661
3662 2008-11-03 Akim Demaille <demaille@gostai.com>
3663
3664 bench.pl: a command line interface
3665 * etc/bench.pl.in: More doc.
3666 Some fixes in the documentation.
3667 ($cflags, $iterations, &help, &getopt): New.
3668 Use them.
3669 (&variant_grammar): Let the number of stages be 10 times what is
3670 specified.
3671
3672 2008-11-03 Akim Demaille <demaille@gostai.com>
3673
3674 Bench the use of Boost.Variants.
3675 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
3676 New.
3677 (&compile): Be ready to compile C++ parsers.
3678 (&bench_push_parser): Move debug information to the outermost
3679 level.
3680 * THANKS: Add Michiel De Wilde.
3681
3682 2008-11-03 Akim Demaille <demaille@gostai.com>
3683
3684 bench.pl: Pass directives as a list instead of as a string.
3685 * etc/bench.pl.in (&directives): New.
3686 (&triangular_grammar, &calc_grammar): Use it to format the Bison
3687 directives.
3688 (&triangular_grammar): Do use the directives (were ignored).
3689 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
3690 directives.
3691
3692 2008-11-03 Akim Demaille <demaille@gostai.com>
3693
3694 Improve genericity of bench.pl.
3695 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
3696 argument.
3697 (&bench_push_parser): New.
3698 Call it.
3699
3700 2008-11-03 Akim Demaille <demaille@gostai.com>
3701
3702 Add documentation to bench.pl.
3703 * etc/bench.pl.in: Comment changes.
3704
3705 2008-11-03 Akim Demaille <demaille@gostai.com>
3706
3707 Fuse the three stacks into a single one.
3708
3709 In order to make it easy to perform benchmarks to ensure that
3710 there are no performance loss, lalr1.cc is forked into
3711 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
3712 lalr1.cc.
3713
3714 Meanwhile, to make sure that lalr1-fusion.cc is correctly
3715 exercized by the test suite, the user must install a symbolic link
3716 from lalr1.cc to it.
3717
3718 Instead of having three stacks (state, value, location), use a
3719 stack of triples. This considerably simplifies the code (and it
3720 will be easier not to require locations as currently does the C++
3721 parser), and also gives a 10% speedup according to
3722 etc/bench (probably mainly since memory allocation is done once
3723 instead of three times).
3724
3725 Another motivation is to make it easier to destruct properly
3726 semantic values: now that they are bound to their state (hence
3727 symbol type) it will be easier to call the appropriate destructor.
3728
3729 These changes should probably benefit the C parser too.
3730
3731 * data/lalr1.cc: Copy as...
3732 * data/lalr1-fusion.cc: this new file.
3733 (b4_rhs_value, b4_rhs_location): New definitions overriding those
3734 from c++.m4.
3735 (state_stack_type, semantic_stack_type, location_stack_type)
3736 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
3737 (data_type, stack_type, yystack_): New.
3738 (YYLLOC_DEFAULT, yypush_): Adjust.
3739 (yyerror_range): Now based on data_type, not location_type.
3740
3741 2008-11-03 Akim Demaille <demaille@gostai.com>
3742
3743 Push the state, value, and location at the same time.
3744 This is needed to prepare a forthcoming patch that fuses the three
3745 stacks into one.
3746
3747 * data/lalr1.cc (parser::yypush_): New.
3748 (parser::yynewstate): Change the semantics: instead of arriving to
3749 this label when value and location have been pushed, but yystate
3750 is to be pushed on the state stack, now the three of them must
3751 have been pushed before. yystate still must be the new state.
3752 This allows to use yypush_ everywhere instead of individual
3753 handling of the stacks.
3754
3755 2008-11-03 Akim Demaille <demaille@gostai.com>
3756
3757 Prefer references to pointers.
3758 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
3759 definition to use references instead of pointers.
3760 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
3761 Take the value and location as references.
3762 Adjust callers.
3763
3764 2008-11-03 Akim Demaille <demaille@gostai.com>
3765
3766 stack::size instead of stack::height.
3767 * data/lalr1.cc (stack::height): Rename as...
3768 (stack::size): this.
3769 Fix the output type.
3770 Comment changes.
3771
3772 2008-11-03 Akim Demaille <demaille@gostai.com>
3773
3774 Use variants to support objects as semantic values.
3775 This patch was inspired by work by Michiel De Wilde. But he used
3776 Boost variants which (i) requires Boost on the user side, (ii) is
3777 slow, and (iii) has useless overhead (the parser knows the type of
3778 the semantic value there is no reason to duplicate this
3779 information as Boost.Variants do).
3780
3781 This implementation reserves a buffer large enough to store the
3782 largest objects. yy::variant implements this buffer. It was
3783 implemented with Quentin Hocquet.
3784
3785 * src/output.c (type_names_output): New.
3786 (output_skeleton): Invoke it.
3787 * data/c++.m4 (b4_variant_if): New.
3788 (b4_symbol_value): If needed, provide a definition for variants.
3789 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
3790 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
3791 (b4_char_sizeof, yy::variant): New.
3792 (parser::parse): If variants are requested, define
3793 parser::union_type, parser::variant, change the definition of
3794 semantic_type, construct $$ before running the user action instead
3795 of performing a default $$ = $1.
3796 * examples/variant.yy: New.
3797 Based on an example by Michiel De Wilde.
3798
3799 2008-11-03 Akim Demaille <demaille@gostai.com>
3800
3801 Parameterize the extraction of semantic values.
3802 To make future changes easier, no longer rely on ".TYPE" being the
3803 way to get a semantic value.
3804
3805 * data/c.m4 (b4_symbol_value): New.
3806 Use it.
3807 * data/c++.m4, data/yacc.c: Use it.
3808 * data/glr.c: Use b4_symbol_value.
3809 (b4_rhs_data): New.
3810 Use it.
3811
3812 2008-11-03 Akim Demaille <demaille@gostai.com>
3813
3814 Prepare easier M4 changes.
3815 * data/lalr1.cc: Use escaped [] instead of literals to prepare
3816 future changes.
3817
3818 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3819
3820 Initiate further development.
3821 * NEWS: Create an empty section for new entries.
3822 * gnulib: Update submodule to HEAD.
3823
3824 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3825
3826 * NEWS: Version 2.4.
3827
3828 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3829
3830 Prepare for next release.
3831 * NEWS: Briefly mention changes since 2.3b.
3832 * README: Say GNU m4 1.4.6, which we've been requiring in release
3833 announcements already, not 1.4.3, which breaks the build.
3834
3835 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3836
3837 Say %language is experimental.
3838 We're thinking of extending it's effect on output file naming. See the
3839 thread at
3840 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
3841 * NEWS: Say it's experimental.
3842 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
3843 recommend it over %skeleton for now.
3844 (Bison Options): Likewise.
3845 (C++ Bison Interface): Use %skeleton not %language.
3846 (Calc++ Parser): Use %skeleton not %language.
3847 * src/getargs.c (usage): Say it's experimental.
3848
3849 2008-11-01 Di-an Jan <dianj@freeshell.org>
3850 Paolo Bonzini <bonzini@gnu.org>
3851
3852 Support all Java parser class modifiers.
3853 * data/java.m4 (b4_percent_define_get3): New.
3854 (b4_final_if, b4_strictfp_if): New.
3855 * data/lalr1.java (final, strictfp, extends, implements): Support.
3856 * doc/bison.texinfo (final, strictfp, extends, implements): Add
3857 documentation.
3858 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
3859 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
3860 (AT_CHECK_JAVA_GREP): New.
3861 (Java parser class modifiers): New test.
3862 (Java parser class extends and implements): New test.
3863
3864 Model exception propagation better with throws and lex_throws.
3865 * data/java.m4 (b4_list2): New.
3866 (throws): Change default.
3867 * data/lalr1.java (yyaction): Add throws.
3868 (parse): Add lex_throws in addition to throws.
3869 * doc/bison.texinfo (throws, lex_throws): Add documentation.
3870 * tests/java.at (Java throws specifications): New test.
3871
3872 Improve documentation for Java parsers.
3873 * doc/bison.texinfo (Java Parsers): Add subsections.
3874 Don't quote first argument of %define.
3875 (Java Bison Interface): Document output files. Move documentation
3876 of parser class and merge into Java Parser Interface. Document
3877 features that error out. Document directives with no effect.
3878 Move note about Javadoc higher.
3879 (Java Semantic Values): Explicitly mention stype.
3880 Document that generic types cannot be used.
3881 (Java Location Values): Use @deftypeivar. Document constructors.
3882 Correct return value for toString.
3883 (Java Parser Interface): List undocumented constants/fields.
3884 Move documentation of fields added by %parse-param closer to list
3885 of members. Document that token names are added as fields.
3886 Document constructors accurately. Remove error method.
3887 (Java Scanner Interface): Move note on %pure-parser to Java Bison
3888 Interface. Describe %code lexer and yylex accutately.
3889 Remove documentation that does not match the code.
3890 (Java Action Features): New.
3891 (Java Differences): Add reference. Add item on semantic values.
3892 Add note about @{ ... @}. Clarify %% epilogue placement.
3893 (Java Declarations Summary): New.
3894
3895 Fix Java skeleton.
3896 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
3897 (b4_remove_comma): Quote test argument.
3898 (b4_identification): Remove "bison" field.
3899 * tests/java.at (Java parser class and package names): New test.
3900 (Java %parse-param and %lex-param): New test.
3901 (Java stype, position_class and location_class): New test.
3902
3903 2008-10-31 Di-an Jan <dianj@freeshell.org>
3904
3905 * data/lalr1.jave: Update copyright years.
3906 (YYParser): Correct name of "generated from" file in Javadoc:
3907 use b4_file_name instead of @ofile@.
3908 (Location constructor): Correct Javadoc parameter name.
3909 (yylloc): Add missing opening m4 quote after b4_location_if.
3910 This removes a stray [ in the Javadoc of Lexer.getStartPos.
3911 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
3912 (YYParser constructor): Correct Javadoc parameter name.
3913
3914 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
3915
3916 Always put auxiliary code files in the same dir as other output files.
3917 * src/files.c (compute_file_name_parts): When the user specifies
3918 --output but not --file-prefix, extract the directory prefix from the
3919 file prefix not from the grammar file name. This affects the location
3920 of files like location.hh generated by the C++ skeleton. The includes
3921 in the other output files require this fix.
3922 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
3923 for expected output files.
3924 (Output files): Add a test for the above.
3925
3926 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
3927
3928 * gnulib: Update submodule to HEAD.
3929
3930 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3931
3932 Update copyright year.
3933 * src/files.c: Here.
3934
3935 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
3936
3937 Don't overwrite the input file.
3938 * src/files.c (output_file_name_check): Fatal error if using input file
3939 for output.
3940 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
3941 argument.
3942 (Conflicting output files): Add test.
3943
3944 2008-10-28 Akim Demaille <demaille@gostai.com>
3945
3946 Space changes.
3947 * data/lalr1.cc: Formatting changes.
3948
3949 2008-10-28 Akim Demaille <demaille@gostai.com>
3950
3951 Don't define debugging functions when !YYDEBUG.
3952 * data/lalr1.cc (debug_stream, set_debug_stream)
3953 (debug_level_type, debug_level, set_debug_level): Don't
3954 declare them when YYDEBUG is not defined.
3955 The implementation are already YYDEBUG-aware.
3956
3957 2008-10-28 Akim Demaille <demaille@gostai.com>
3958
3959 Prefer "continue" for empty loop bodies.
3960 * etc/bench.pl.in: Use "continue" instead of {}.
3961
3962 2008-10-28 Akim Demaille <demaille@gostai.com>
3963
3964 Space and comments changes.
3965 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
3966 * data/c.m4, data/lalr1.cc: Space changes.
3967
3968 2008-10-28 Akim Demaille <demaille@gostai.com>
3969
3970 Make gnulib a submodule.
3971 * gnulib: New.
3972 * .gitmodules (gnulib): New.
3973
3974 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
3975
3976 Fix yyerror_range for user-defined location type in C++. Reported by
3977 Georg Sauthoff at
3978 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
3979 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
3980 * THANKS (Georg Sauthoff): Add.
3981
3982 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
3983
3984 Update several administrative files mainly to facilitate releasing.
3985 * HACKING (Administrivia): Make the git-merge-changelog notes more
3986 helpful.
3987 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
3988 (Release Procedure): Update for git and add numerous details that were
3989 previously missing.
3990 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
3991 * maint.mk (announcement): Don't list bison as a bootstrap tool so
3992 that announcements don't claim we bootstrapped with whatever bison
3993 happened to be in PATH. Add flex as a bootstrap tool.
3994 * Makefile.maint: Remove, previously replaced by maint.mk.
3995 * Makefile.cfg: Remove, and migrate settings to...
3996 * cfg.mk: ... here for the sake of `make announcement'.
3997 * bootstrap.conf (gnulib_modules): Add announce-gen.
3998 * README: Say GNU Bison instead of just Bison. Suggested by Karl
3999 Berry.
4000
4001 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
4002
4003 Small but important bugfixes for the Java skeleton.
4004 * data/lalr1.java (yyerror): Change Location to b4_location_type.
4005 (yy_symbol_print): Call toString on yyvaluep.
4006
4007 2008-08-29 Akim Demaille <demaille@gostai.com>
4008
4009 Clarify UPDATED use.
4010 * doc/bison.texinfo: It refers to the last edition of this file,
4011 not to the release date of Bison.
4012 Reported by Joel E. Denny.
4013
4014 2008-08-29 Akim Demaille <demaille@gostai.com>
4015
4016 * README: Update FAQ pointer.
4017 Reported by Joel E. Denny.
4018
4019 2008-08-27 Eric Blake <ebb9@byu.net>
4020
4021 Resync m4sugar from autoconf.
4022 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
4023 (m4_init): Adjust to latest m4.git changes.
4024 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
4025 effects.
4026 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
4027 (_m4_list_cmp): Reduce side effects.
4028
4029 2008-08-27 Akim Demaille <demaille@gostai.com>
4030
4031 Check yyerrok in calc.at.
4032 * tests/calc.at (calc.y): Use yyerrok on "( error )".
4033 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
4034 expected.
4035
4036 2008-08-27 Akim Demaille <demaille@gostai.com>
4037
4038 Support yyerrok in lalr1.cc.
4039 YYBACKUP is still to import back into lalr1.cc.
4040 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
4041
4042 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
4043
4044 For maintainer-check*, don't recompile for a $(VERSION) update.
4045 * cfg.mk: New file.
4046 (_is-dist-target): Override the one in GNUmakefile.
4047 * Makefile.am (EXTRA_DIST): Add cfg.mk.
4048
4049 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
4050
4051 Update for recent change to gnulib.
4052 * src/parse-gram.y: Don't include strverscmp.h. It comes from
4053 string.h now.
4054
4055 2008-08-15 Eric Blake <ebb9@byu.net>
4056
4057 Remaining m4sugar merge from autoconf.
4058 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
4059 * data/m4sugar/foreach.m4: New file, copied from autoconf.
4060 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
4061 * src/output.c (output_skeleton): Tell m4 how to find it.
4062
4063 Partial m4sugar merge from autoconf: m4_map.
4064 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
4065 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
4066 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
4067 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
4068 for empty list.
4069 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
4070 Likewise.
4071 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
4072 declares it.
4073
4074 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
4075
4076 Keep .version and PACKAGE_VERSION in sync.
4077 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
4078 dependency, and add comments justifying this in more detail. Discussed
4079 starting at
4080 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
4081
4082 2008-08-06 Eric Blake <ebb9@byu.net>
4083
4084 Partial m4sugar merge from autoconf: m4_shiftn.
4085 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
4086 (m4_shift2, m4_shift3): New macros.
4087 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
4088 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
4089 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
4090 * data/java.m4 (b4_remove_comma): Likewise.
4091
4092 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
4093 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
4094 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
4095 (m4_init): Consolidate wrapped text into single m4_wrap.
4096 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
4097 in wrapped text.
4098
4099 2008-08-05 Eric Blake <ebb9@byu.net>
4100
4101 Partial m4sugar merge from autoconf: builtins, version.m4.
4102 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
4103 (m4_prepend): Remove, as it is unused and inherently quadratic,
4104 whereas m4_append is linear in newer m4.
4105 (m4_mkstemp): New builtin.
4106 (m4_symbols): Make rename conditional.
4107 (m4_version_prereq): Ensure fatal error if used in bison, which
4108 intentionally lacks version.m4.
4109
4110 Fix comments in m4sugar.
4111 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
4112
4113 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
4114
4115 Update for recent .gitignore fix in Gnulib.
4116 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
4117 anchored .gitignore entries.
4118
4119 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
4120
4121 Set gnu or gnits strictness.
4122 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
4123 development and gnits strictness for releases. Based on Eric Blake's
4124 suggestion at
4125 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
4126
4127 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
4128
4129 * NEWS: Clarify documentation of %language.
4130
4131 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
4132
4133 Support usage of git-merge-changelog.
4134 * .gitattributes: New.
4135 * HACKING: Document usage of git-merge-changelog.
4136 * bootstrap: Install git-merge-changelog entries in .git/config
4137 if appropriate.
4138
4139 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
4140
4141 Remove remaining dependence on CVS Id keyword.
4142 * ChangeLog: For the sake of people still using CVS, don't use dollars
4143 when mentioning Id.
4144 * data/xslt/bison.xsl: Remove Id from header comments, where it was
4145 unusual anyway.
4146 * data/xslt/xml2dot.xsl: Likewise.
4147 * data/xslt/xml2text.xsl: Likewise.
4148 * data/xslt/xml2xhtml.xsl: Likewise.
4149 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
4150 * doc/Makefile.am (neutralize): Remove, no longer needed.
4151 (.x.1): Don't use neutralize.
4152 (edit): Don't substitute for ID.
4153 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
4154
4155 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
4156
4157 Fix dependence on computed configure variables.
4158 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
4159 $(top_srcdir)/configure.ac so that changes to computed variables, such
4160 as PACKAGE_VERSION, are seen.
4161 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
4162
4163 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
4164
4165 Update copyright dates for recent changes.
4166 * Makefile.am: Here.
4167 * src/Makefile.am: Here.
4168 * src/reduce.c: Here.
4169 * tests/reduce.at: Here.
4170
4171 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
4172
4173 Use git-version-gen for version names between releases.
4174 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
4175 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
4176 * .prev-version: New.
4177 * .version.in: Remove.
4178 * ChangeLog: Remove the Id previously used for capturing the CVS
4179 revision.
4180 * GNUmakefile: Remove, now copied from Gnulib.
4181 * Makefile.am: Add code suggested by comments in
4182 build-aux/git-version-gen.
4183 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
4184 .prev-version, and .version.
4185 * NEWS (2.3b+): Rename to...
4186 (?.?): ... this because we're dropping the "+" version naming scheme,
4187 but, in general, we still can't be sure of our next release name.
4188 * bootstrap: Add a quick hack to remove from .gitignore the
4189 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
4190 entry. This should really be fixed in gnulib instead.
4191 * bootstrap.conf (gnulib_modules): Add gnumakefile.
4192 * configure.ac (AC_INIT): Set version name by invoking
4193 build-aux/git-version-gen.
4194 (AC_CONFIG_FILES): Remove .version, now generated by
4195 build-aux/git-version-gen.
4196 * maint.mk: New, copied from coreutils.
4197 * doc/.cvsignore (bison.1): Add.
4198 * doc/.gitignore (/bison.1): Add.
4199 * doc/bison.1: Remove, generated.
4200 * src/.cvsignore (revision.c): Remove.
4201 * src/.gitignore (/revision.c): Remove.
4202 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
4203 (BUILT_SOURCES): Remove revision.c.
4204 (revision.c): Remove.
4205 * src/getargs.c (version): Don't print revision after the VERSION.
4206 * src/revision.h: Remove.
4207
4208 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
4209
4210 Fix untranslatable composition of sentences. Reported by Goran
4211 Uddeborg at
4212 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
4213 * THANKS (Goran Uddeborg): Add.
4214 * src/reduce.c (reduce_print): Report the number of nonterminals and
4215 rules useless in the grammar in separate sentences.
4216 * tests/reduce.at (Useless Rules): Update output.
4217 (Reduced Automaton): Likewise.
4218 (Underivable Rules): Likewise.
4219 (Empty Language): Likewise.
4220
4221 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
4222
4223 Fix some .gitignore and .cvsignore problems.
4224 * bootstrap (insert_sorted_if_absent): Replace all uses with...
4225 (insert_vc_ignore): ... this new function, which prepends `/' to all
4226 .gitignore entries before passing them to insert_sorted_if_absent.
4227 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
4228 .cvsignore files are maintained even though Bison developers run
4229 bootstrap while using Git.
4230 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
4231 unneeded by Bison.
4232 (gnulib): Add.
4233 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
4234 unneeded. Reported by Eric Blake.
4235 * lib/.gitignore (/*~): Add.
4236 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
4237 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
4238 Blake.
4239 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
4240
4241 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
4242
4243 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
4244 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
4245 * bootstrap.conf (gnulib_modules): Add unsetenv.
4246 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
4247 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
4248 (/setenv.m4): Add.
4249 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
4250 the first argument because it may become position-dependent, and unset
4251 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
4252 Add comments explaining these issues in more detail.
4253
4254 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
4255
4256 Add .gitignore everywhere based on .cvsignore.
4257 * .gitignore: New.
4258 * build-aux/.gitignore: New.
4259 * data/.gitignore: New.
4260 * doc/.gitignore: New.
4261 * etc/.gitignore: New.
4262 * examples/.gitignore: New.
4263 * examples/calc++/.gitignore: New.
4264 * lib/.gitignore: New.
4265 * m4/.gitignore: New.
4266 * po/.gitignore: New.
4267 * runtime-po/.gitignore: New.
4268 * src/.gitignore: New.
4269 * tests/.gitignore: New.
4270
4271 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
4272
4273 * NEWS (2.3b+): New section, empty for now.
4274 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
4275
4276 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
4277
4278 * NEWS (2.3b): Update release date since there has been a delay in
4279 getting the announcements and tarballs out.
4280
4281 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
4282
4283 * NEWS: Version 2.3b.
4284 * configure.ac (AC_INIT): Likewise.
4285 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
4286
4287 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
4288
4289 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
4290 been doing it for years.
4291 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
4292 (Release Procedure): Add FIXME about make alpha being unmaintained.
4293
4294 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
4295
4296 * data/yacc.c: Reformat m4 a little for readability.
4297 * src/lalr.c (build_relations): Correct comment.
4298
4299 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4300
4301 DJGPP specific issue.
4302 * djgpp/config.sed: Fixes required to run configure scripts generated
4303 by autoconf 2.62.
4304
4305 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
4306
4307 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
4308 coordinator@translationproject.org.
4309
4310 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4311
4312 * THANKS: Add Eric Blake.
4313
4314 2008-04-23 Eric Blake <ebb9@byu.net>
4315
4316 Revert prior patch, by working around autoconf regression.
4317 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
4318 ("Output file name: ("): Uncomment test.
4319 ("Output file name: )"): Likewise.
4320 Based on an idea from Noah Misch.
4321
4322 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
4323
4324 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
4325 2.61. Reported by Juan Manuel Guerrero at
4326 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
4327 * tests/output.at ("Output file name: ("): Comment out test case for
4328 now.
4329 ("Output file name: )"): Likewise.
4330
4331 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
4332
4333 * GNUmakefile: Update git-version-gen invocation so make dist
4334 succeeds.
4335
4336 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
4337
4338 Update to the current gnulib CVS repository, and fix trigraph handling
4339 in Bison.
4340 * bootstrap: Update gnulib CVS repository URL.
4341 (symlink_to_dir): Encapsulate the code that guarantees the destination
4342 directory exists into...
4343 (check_dst_dir): ... this new function, and...
4344 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
4345 fail when copying files into lib/uniwidth/.
4346 * src/output.c (prepare_symbols): When writing yytname muscles, where
4347 symbol names will be encoded in C-string literals, tell quotearg to
4348 escape trigraphs. This used to be the default in gnulib.
4349 * tests/regression.at (Token definitions): Because of the change in
4350 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
4351 escapes trigraphs in symbol names. Thus, yytname no longer has
4352 trigraphs unnecessarily doubly escaped. Update test case output.
4353 Extend test case to be sure Bison's own error messages will no longer
4354 have trigraphs in symbol names unnecessarily escaped once.
4355
4356 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
4357
4358 Fix make dist infinite loop reported by Juan Manuel Guerrero at
4359 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
4360 * .cvsignore: Add .version.
4361 * .version.in: New.
4362 * bootstrap.conf (gnulib_modules): Add git-version-gen.
4363 * configure.ac (AC_CONFIG_FILES): Add .version.
4364 * build-aux/.cvsignore: Add git-version-gen.
4365
4366 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
4367
4368 * NEWS (2.3a+): Mention that -g now takes an argument.
4369 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
4370 consistency. Update the -g and -x entries now that they take
4371 arguments. Use brackets to indicate optional arguments.
4372 * src/getargs.c (usage): Explain the relationship between arguments of
4373 long and short options more completely. Document --defines and -d
4374 separately since the former takes an argument but, for POSIX Yacc, the
4375 latter does not.
4376 (short_options): Let -W take an optional argument like --warnings.
4377 (getargs): Sort cases.
4378
4379 2008-02-28 Akim Demaille <demaille@gostai.com>
4380
4381 * doc/bison.texinfo: Fix a few typos.
4382
4383 2008-02-28 Akim Demaille <akim@epita.fr>
4384
4385 * doc/bison.texinfo (Bison Options): Document -W.
4386 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
4387
4388 2008-02-28 Akim Demaille <akim@epita.fr>
4389
4390 * src/getargs.c (short_options): Split and sort for readability.
4391 -g and -x take optional arguments, just like their long options.
4392 * build-aux/cross-options.pl: Use /x to make the regexp easier to
4393 understand.
4394 Fix the handling of $opt which resulted in all the argument to be
4395 considered as optional.
4396
4397 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
4398
4399 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
4400 say its interface is experimental.
4401 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
4402 Java.
4403 (Bison Options): In the -L and --language entry, mention Java.
4404 (Java Bison Interface): Say the interface is experimental.
4405 * src/getargs.c (usage): Mention -L and --language.
4406
4407 * NEWS (2.3a+): Say the push parsing interface is experimental.
4408 * doc/bison.texinfo (Push Decl): Likewise.
4409 (Decl Summary): Likewise in the "%define api.push_pull" entry.
4410 (Push Parser Function): Likewise.
4411 (Pull Parser Function): Likewise.
4412 (Parser Create Function): Likewise.
4413 (Parser Delete Function): Likewise.
4414 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
4415 yypull_parse, and yypush_parse entries.
4416
4417 * NEWS (2.3a+): Mention XML support, and say the schema is
4418 experimental.
4419 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
4420 * src/getargs.c (usage): Say the XML schema is experimental.
4421
4422 * NEWS (2.3a+): Say option instead of flag.
4423
4424 2008-02-21 Wojciech Polak <polak@gnu.org>
4425
4426 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
4427 text.
4428
4429 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
4430
4431 Fix impure push parser compile error reported by Bob Rossi at
4432 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
4433 * data/yacc.c: Clean up whitespace in the output a little.
4434 (yypstate_allocated): Define for impure push parsers regardless of
4435 whether the pull interface is also requested.
4436 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
4437 check impure push parsers without the pull interface.
4438
4439 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
4440 yyerror takes arguments specified by %parse-param while yypstate_new
4441 does not.
4442 * doc/bison.texinfo (Parser Create Function): Document that
4443 yypstate_new returns 0 for multiple impure parser instances.
4444 * tests/push.at (Push Parsing: Multiple impure instances): Update
4445 expected stderr output.
4446
4447 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
4448
4449 * runtime-po/POTFILES.in (push.c): Remove.
4450
4451 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
4452
4453 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
4454 * data/push.c: Rename to...
4455 * data/yacc.c: ... this, overwriting it.
4456 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
4457 `%push-pull-parser' -> `%define api.push_pull "both"'.
4458 Remove old yacc.c tests, and update push.c tests to yacc.c.
4459
4460 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
4461
4462 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
4463 `"%code top" blocks' instead of `%code "top" blocks'.
4464 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
4465 Clean up whitespace in the output a little.
4466
4467 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
4468
4469 Fix documentation problems reported by Tim Josling at
4470 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
4471 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
4472 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
4473 integers. Explain the effect of literal string aliases on error
4474 messages. Copy token 0 documentation from the C++ skeleton
4475 documentation.
4476
4477 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
4478
4479 Accept a token number in a %left, %right, or %nonassoc for POSIX
4480 conformance. Reported by Tim Josling at
4481 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
4482 * NEWS (2.3a+): Mention.
4483 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
4484 and code numbers are treated by precedence declarations.
4485 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
4486 of symbols.1.
4487 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
4488 of symbol.
4489 (symbol.prec): New, just like symbol but allows INT.
4490 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
4491 longer holds.
4492 * tests/regression.at (Token number in precedence declaration): New
4493 test case.
4494
4495 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4496
4497 DJGPP specific issues.
4498 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
4499 be changed. Copyright timestamp adjusted.
4500 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
4501 be changed. Copyright timestamp adjusted.
4502 * djgpp/config.site: Copyright timestamp adjusted.
4503 * djgpp/config_h.sed: Copyright timestamp adjusted.
4504 * djgpp/djunpack.bat: Copyright timestamp adjusted.
4505 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
4506 filename translation list.
4507 * djgpp/subpipe.c (init_subpipe): Check the environment variables
4508 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
4509 files shall be created. Before trying to use the temp dir where the
4510 environment variable points to check that the dir really exists. If
4511 not default to the cwd as temp dir. Copyright timestamp adjusted.
4512 * djgpp/subpipe.h: Copyright timestamp adjusted.
4513 * djgpp/testsuite.sed: Copyright timestamp adjusted.
4514
4515 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
4516
4517 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
4518
4519 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
4520
4521 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
4522 Problem reported by Claudio Saavedra in
4523 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
4524
4525 2008-01-05 Wojciech Polak <polak@gnu.org>
4526
4527 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
4528 document's title with the input grammar file name.
4529
4530 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
4531
4532 Automate regression testing of the XML/XSLT implementation. Discussed
4533 starting at
4534 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
4535 * configure.ac (XSLTPROC): New substitution.
4536 * Makefile.am (maintainer-xml-check): New phony target invoking...
4537 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
4538 invoking make maintainer-check with BISON_TEST_XML=1.
4539 * tests/atlocal.in (XSLTPROC): New.
4540 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
4541 not to report reachable memory when Bison is expected to have a
4542 non-zero exit status and (2) to compare XML/XSLT output with --graph
4543 and --report=all output for every working grammar when
4544 BISON_TEST_XML=1.
4545 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
4546 (AT_BISON_CHECK_XML): New.
4547 (AT_QUELL_VALGRIND): New.
4548 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
4549 (AT_CHECK): ... don't redefine this since this was the old way to
4550 quell Valgrind.
4551 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
4552 AT_BISON_CHECK invocations.
4553 * tests/c++.at: Likewise.
4554 * tests/calc.at: Likewise.
4555 * tests/conflicts.at: Likewise.
4556 * tests/cxx-type.at: Likewise.
4557 * tests/existing.at: Likewise.
4558 * tests/glr-regression.at: Likewise.
4559 * tests/headers.at: Likewise.
4560 * tests/input.at: Likewise.
4561 * tests/java.at: Likewise.
4562 * tests/output.at: Likewise.
4563 * tests/push.at: Likewise.
4564 * tests/reduce.at: Likewise.
4565 * tests/regression.at: Likewise.
4566 * tests/sets.at: Likewise.
4567 * tests/skeletons.at: Likewise.
4568 * tests/synclines.at: Likewise.
4569 * tests/torture.at: Likewise.
4570 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
4571 tends to hang xsltproc.
4572 (Big horizontal): Likewise.
4573
4574 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
4575
4576 In XML output, remove redundant class attribute on symbol element.
4577 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
4578 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
4579 look up a symbol to determine whether it's a nonterminal or terminal.
4580 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
4581 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
4582
4583 Add prec/assoc information to XML output.
4584 * src/gram.c (grammar_rules_print_xml): For each rule that has a
4585 %prec, add a percent_prec attribute.
4586 * src/print-xml.c (print_grammar): For each terminal that has a
4587 precedence or associativity, add a prec or assoc attribute.
4588 (xml_indent): New.
4589 (xml_puts): Use xml_indent.
4590 (xml_printf): Use xml_indent.
4591 * src/print-xml.h (xml_indent): Prototype.
4592
4593 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
4594 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
4595
4596 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
4597
4598 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
4599 (bison:ruleByNumber): ... this for clarity.
4600 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
4601 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
4602 (xsl:template match="reduction"): Update.
4603 (xsl:template match="item"): Update.
4604 (xsl:template match="reduction"): Update.
4605
4606 In the XML output, don't print the list of rules where symbols appear.
4607 Compute it in XSLT instead. Discussed at
4608 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
4609 * data/xslt/bison.xsl (bison:ruleByLhs): New.
4610 (bison:ruleByRhs): New.
4611 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
4612 bison:ruleByRhs.
4613 (xsl:template match="terminal/rule"): Remove.
4614 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
4615 bison:ruleByRhs.
4616 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
4617 Remove.
4618 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
4619 bison:ruleByRhs and mode="number-link" for rule template.
4620 (xsl:template match="terminal/rule"): Remove.
4621 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
4622 bison:ruleByRhs and mode="number-link" for rule template.
4623 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
4624 Rewrite as...
4625 (xsl:template match="rule" mode="number-link"): ... this.
4626 * src/print-xml.c (print_grammar): Don't print the list of rules.
4627
4628 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
4629
4630 Don't let --report affect XML output; always print all information.
4631 Discussed at
4632 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
4633 * src/conflicts.c (log_resolution): Implement.
4634 * src/print-xml.c (print_core): Implement.
4635 (print_state): Implement.
4636 (print_xml): Implement.
4637
4638 * NEWS (2.3a+): Fix quotes.
4639 * src/parse-gram.y (prologue_declaration): For consistency with -v,
4640 don't let %verbose clear the list specified by --report.
4641
4642 2007-11-26 Akim Demaille <akim@epita.fr>
4643
4644 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
4645
4646 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
4647
4648 In the XML output, list useless and unused symbols and rules with the
4649 useful ones and add a "usefulness" attribute. Discussed starting at
4650 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
4651 * src/gram.c (grammar_rules_partial_print_xml): Remove.
4652 (grammar_rules_print_xml): Print all rules instead of just those
4653 useful in the grammar, and add a "usefulness" attribute.
4654 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
4655 * src/print-xml.c (print_rules_useless_in_parser): Remove.
4656 (print_grammar): Print all nonterminals instead of just useful ones,
4657 and add a "usefulness" attribute to nonterminals and terminals.
4658 (print_xml): Don't print a separate "reductions" or
4659 "rules-useless-in-parser" element.
4660 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
4661 (reduce_xml): Remove.
4662 (reduce_token_unused_in_grammar): New.
4663 (reduce_nonterminal_useless_in_grammar): New.
4664 * src/reduce.h (reduce_xml): Remove prototype.
4665 (reduce_token_unused_in_grammar): Add prototype.
4666 (reduce_nonterminal_useless_in_grammar): Add prototype.
4667 * data/xslt/xml2text.xsl: Update for XML changes.
4668 * data/xslt/xml2xhtml.xsl: Update for XML changes.
4669 * tests/reduce.at (Useless Terminals): Update output.
4670 (Useless Rules): Update output.
4671 (Reduced Automaton): Update output.
4672
4673 Say "Terminals unused in grammar" instead of "Unused terminals".
4674 * NEWS (2.3a+): Update.
4675 * doc/bison.texinfo (Understanding): Update example output.
4676 * src/reduce.c (reduce_output): Implement.
4677 * data/xslt/xml2text.xsl: Implement.
4678 * data/xslt/xml2xhtml.xsl: Implement.
4679
4680 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
4681
4682 Accept --report-file=FILE to override the default `.output' filename.
4683 * NEWS (2.3a+): Mention.
4684 * doc/bison.texinfo (Bison Options): Add an entry.
4685 * src/files.c (compute_output_file_names): Don't override
4686 spec_verbose_file if already set.
4687 * src/getargs.c (usage): Document --report-file.
4688 (REPORT_FILE_OPTION): New anonymous enum member.
4689 (long_options): Add entry for it.
4690 (getargs): Add case for it setting spec_verbose_file.
4691
4692 * build-aux/cross-options.pl: Don't record a short option just because
4693 there's an arg.
4694 * doc/.cvsignore: Add yacc.1.
4695
4696 2007-11-14 Akim Demaille <akim@epita.fr>
4697
4698 * doc/yacc.1.in: New.
4699 * configure.ac, doc/Makefile.am: Adjust.
4700 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
4701 config.h symbol.
4702 Use AC_SUBST for assignments too.
4703 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
4704
4705 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
4706
4707 * src/gram.c: Remove comments that duplicate comments in gram.h.
4708
4709 When reporting useless rules and nonterminals, say "useless in grammar"
4710 instead of "useless", and say "useless in parser" instead of "never
4711 reduced". Discussed starting at
4712 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
4713 * NEWS (2.3a+): Mention this change.
4714 * data/xslt/xml2text.xsl: Update output text and expected input XML
4715 element names to match changes below.
4716 * data/xslt/xml2xhtml.xsl: Likewise.
4717 (xsl:template match="bison-xml-report"): Add missing entry in Table of
4718 Contents: "Rules useless in parser due to conflicts".
4719 * doc/bison.texinfo (Decl Summary): Reword a little.
4720 (Understanding): Update example output for changes below.
4721 * src/gram.c: (rule_useful_p): Rename to...
4722 (rule_useful_in_grammar_p): ... this.
4723 (rule_useless_p): Rename to...
4724 (rule_useless_in_grammar_p): ... this.
4725 (rule_never_reduced_p): Rename to...
4726 (rule_useless_in_parser_p): ... this.
4727 (grammar_rules_print): Update for renames.
4728 (grammar_rules_print_xml): Update for renames.
4729 (grammar_rules_never_reduced_report): Rename to...
4730 (grammar_rules_useless_report): ... this since it is used for either
4731 kind of useless rule.
4732 * src/gram.h: Reword comments and update function names in prototypes.
4733 * src/main.c (main): Say "rule useless in parser due to conflicts".
4734 * src/print-xml.c (print_rules_never_reduced): Rename to...
4735 (print_rules_useless_in_parser): ... this, and rename output XML
4736 element "rules-never-reduced" to "rules-useless-in-parser".
4737 (print_xml): Update for rename.
4738 * src/print.c (print_results): Say "Rules useless in parser due to
4739 conflicts".
4740 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
4741 (nonterminals_reduce): Say "nonterminal useless in grammar".
4742 (reduce_output): Say "Nonterminals useless in grammar".
4743 Say "Rules useless in grammar".
4744 (reduce_xml): Rename output XML element "useless" to
4745 "useless-in-grammar".
4746 (reduce_print): Don't report the count of grammatically useless rules
4747 as "rules never reduced" just because %yacc is specified.
4748 In the correct report of this count, say nonterminal(s) and rule(s)
4749 "useless in grammar".
4750 * tests/conflicts.at (S/R in initial): Update expected output.
4751 (Defaulted Conflicted Reduction): Likewise.
4752 (Unreachable States After Conflict Resolution): Likewise.
4753 * tests/existing.at (GNU pic Grammar): Likewise.
4754 * tests/reduce.at (Useless Nonterminals): Likewise.
4755 (Useless Rules): Likewise.
4756 (Reduced Automaton): Likewise.
4757 (Underivable Rules): Likewise.
4758 (Empty Language): Likewise.
4759
4760 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
4761
4762 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
4763 here document and before the EOF so that BSD's implementation of Bourne
4764 shell doesn't parse the delimiter as part of the here document.
4765 * doc/.cvsignore: Add cross-options.texi.
4766 * src/getargs.c (usage): Add a blank line after the warning categories.
4767
4768 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
4769
4770 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
4771
4772 2007-11-05 Akim Demaille <akim@epita.fr>
4773
4774 Remove Id: from bison.1.
4775 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
4776 (perl -0777 -pi -e 's/\.PP\nId): New.
4777 (.x.1): Use it to ignore the version control revision.
4778
4779 2007-11-05 Akim Demaille <demaille@gostai.com>
4780
4781 * build-aux/Makefile.am: Ship cross-options.pl.
4782 * doc/Makefile.am: Always refer to cross-options.texi with
4783 $(srcdir).
4784 (MAINTAINERCLEANFILES): Add it.
4785
4786 2007-11-04 Akim Demaille <demaille@gostai.com>
4787
4788 Generate the long/short option cross-table.
4789 * build-aux/cross-options.pl: New.
4790 * doc/Makefile.am (cross-options.texi): New.
4791 * doc/bison.texinfo: Use it.
4792
4793 2007-11-04 Akim Demaille <demaille@gostai.com>
4794
4795 Generate bison.1 using help2man.
4796 * doc/common.x, doc/bison.x: New.
4797 * doc/Makefile.am (bison.1, .x.1): New.
4798 The code is taken from autoconf-2.61/man/Makefile.am.
4799 * configure.ac: Look for help2man.
4800
4801 2007-11-04 Akim Demaille <demaille@gostai.com>
4802
4803 Complete --help.
4804 * src/getargs.c (usage): Document -W, make it clear that -d,
4805 -g and -x have optional arguments.
4806
4807 2007-11-04 Akim Demaille <demaille@gostai.com>
4808
4809 Find sha1sum when named gsha1sum.
4810 * bootstrap (find_tool): New.
4811 ($SHA1SUM): New.
4812
4813 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4814
4815 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
4816 at
4817 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
4818 * NEWS (2.3a+): Mention.
4819 * data/bison.m4 (b4_pure_if): Don't define it here.
4820 * data/c.m4 (b4_identification): Depend on individual skeletons to
4821 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
4822 values of the %define variables api.pure or api.push_pull. Define
4823 YYPURE, YYPUSH, and YYPULL accordingly.
4824 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
4825 glr.cc has already defined b4_pure_flag.
4826 * data/push.c: Define b4_pure_if based on `%define api.pure'.
4827 Remove YYPUSH and YYPULL since they're back in b4_identification again.
4828 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
4829 * doc/bison.texinfo (Pure Decl): Update.
4830 (Push Decl): Update.
4831 (Decl Summary): Add api.pure to %define entry.
4832 In %pure-parser entry, say it's deprecated and reference %define.
4833 (Pure Calling): Update.
4834 (Error Reporting): Update.
4835 (C++ Scanner Interface): Update.
4836 (How Can I Reset the Parser): Update.
4837 (Table of Symbols): In %pure-parser entry, say it's deprecated and
4838 reference %define.
4839 * src/getargs.c (pure_parser): Remove global variable.
4840 * src/getargs.h (pure_parser): Remove extern.
4841 * src/output.c (prepare): Don't define pure_flag muscle.
4842 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
4843 wrapper around `%define api.pure'.
4844 * tests/calc.at (Simple LALR Calculator): Update.
4845 (Simple GLR Calculator): Update.
4846 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
4847 Update.
4848 (GLR: Resolve ambiguity, pure, locations): Update.
4849 (GLR: Merge conflicting parses, pure, no locations): Update.
4850 (GLR: Merge conflicting parses, pure, locations): Update.
4851 * tests/glr-regression.at (Uninitialized location when reporting
4852 ambiguity): Update
4853 * tests/input.at (Unused %define api.pure): New test case.
4854 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
4855 AT_PURE_IF and AT_PURE_AND_LOC_IF.
4856 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
4857
4858 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4859
4860 %define push_pull -> %define api.push_pull. Discussed starting at
4861 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
4862 * data/push.c: Expect the new name.
4863 * data/yacc.c: Likewise.
4864 * doc/bison.texinfo (Push Decl): Update.
4865 (Decl Summary): Update %define entry.
4866 (Push Parser Function): Update.
4867 (Pull Parser Function): Update.
4868 (Parser Create Function): Update.
4869 (Parser Delete Function): Update.
4870 * tests/calc.at (Simple LALR Calculator): Update.
4871 * tests/input.at (%define enum variables): Update.
4872 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
4873 (Push Parsing: Multiple impure instances): Update.
4874 (Push Parsing: Unsupported Skeletons): Update.
4875 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
4876 (Exploding the Stack Size with Malloc): Update.
4877
4878 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
4879 other entries some.
4880
4881 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
4882
4883 For the XML output's terminal element, rename @number to @token-number,
4884 and add @symbol-number. In the nonterminal element, rename @number to
4885 @symbol-number. Discussed starting at
4886 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
4887 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
4888 renames.
4889 (xsl:template match="nonterminal"): Likewise.
4890 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
4891 (xsl:template match="nonterminal"): Likewise.
4892 * src/print-xml.c (print_grammar): Implement.
4893
4894 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
4895
4896 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
4897 2007-10-11 change, the child elements here are items not rules.
4898 (xsl:template match="item"): New.
4899 (xsl:template match="rule"): Update for new reduced itemset.
4900 (xsl:template match="point"): Remove.
4901 (xsl:template match="empty"): For consistency with --graph, don't
4902 output "/* empty */".
4903 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
4904 line-wrap, don't pass a negative value as first-line-length since this
4905 won't work with the following changes.
4906 (xsl:template name="line-wrap"): Simplify slightly.
4907 (xsl:template name="ws-search"): Eliminate recursion.
4908 * src/print_graph.c (print_core): Don't print a reduction's lookahead
4909 set next to an item whose dot is not at the end of the RHS even if it
4910 happens to be associated with the same rule.
4911
4912 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
4913
4914 Add %define lr.keep_unreachable_states.
4915 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
4916 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
4917 * src/main.c (main): Implement it.
4918 * tests/conflicts.at (Unreachable States After Conflict Resolution):
4919 Extend to test it, and fix a typo.
4920
4921 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
4922
4923 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
4924 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
4925 the example .output text.
4926 * tests/regression.at (Extra lookahead sets in report): Improve wording
4927 of comments.
4928
4929 2007-10-17 Wojciech Polak <polak@gnu.org>
4930
4931 * src/print-xml.c (print_grammar): Renamed
4932 <terminal> and <nonterminal> attributes:
4933 "type" to "number" and "symbol" to "name".
4934 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
4935 Use new attribute names.
4936 (xsl:template match="nonterminal"): Likewise.
4937 * data/xslt/xml2xhtml.xsl: Likewise.
4938
4939 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
4940
4941 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
4942 (Option Cross Key): Likewise.
4943
4944 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
4945 next to an item whose dot is not at the end of the RHS even if it
4946 happens to be associated with the same rule.
4947 * src/print.c (print_core): Likewise.
4948 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
4949 (Resolved SR Conflicts): Update output.
4950 * tests/regression.at (Extra lookahead sets in report): New test case.
4951
4952 2007-10-11 Wojciech Polak <polak@gnu.org>
4953
4954 * src/print-xml.c (print_core): Remove item set
4955 redundancy.
4956 * data/xslt/bison.xsl (bison:ruleNumber): New key.
4957 Improve processing time. Suggested by Joel E. Denny.
4958 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
4959 Write xsl:param "required" attribute as comment.
4960 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
4961 (xsl:template match="rule"): Support new reduced itemset.
4962 (xsl:template match="point"): Remove.
4963 * data/xslt/xml2xhtml.xsl: Likewise.
4964
4965 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
4966
4967 * src/getargs.c (version): Update copyright year.
4968
4969 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
4970
4971 Make xml2dot.xsl and --graph produce the same output.
4972 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
4973 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
4974 escaped later.
4975 (xsl:template name="output-node"): Use the new escape template instead
4976 of the string-replace template directly.
4977 (xsl:template name="output-edge"): Likewise.
4978 (xsl:template name="escape"): New, escapes backslashes and newlines in
4979 addition to quotation marks.
4980 * src/graphviz.c (start_graph, output_node, output_edge): Add
4981 whitespace to output for legibility.
4982
4983 Make xml2text.xsl and --report produce the same output, and remove the
4984 XML "conflicts" element since a conflict summary is easily extracted
4985 from the automaton.
4986 * data/xslt/bison.xsl: New.
4987 (xsl:template match="state" mode="bison:count-conflicts): New.
4988 * data/xslt/xml2text.xsl: Import bison.xsl.
4989 (xsl:template match="bison-xml-report"): Instead of styling the
4990 "conflicts" element, style the "automaton" element with mode
4991 "conflicts". Unlike the former, the latter lists S/R and R/R
4992 conflicts for a state on the same line.
4993 (xsl:template match="conflicts"): Remove.
4994 (xsl:template match="conflict"): Remove.
4995 (xsl:template match="terminal"): Line-wrap the list of rules in which
4996 the terminal is used.
4997 (xsl:template match="nonterminal"): Likewise for nonterminals.
4998 (xsl:template match="automaton" mode="conflicts"): New.
4999 (xsl:template match="state" mode="conflicts"): New.
5000 (xsl:template name="line-wrap"): New.
5001 (xsl:template name="ws-search"): New.
5002 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
5003 (xsl:template match="bison-xml-report"): Instead of styling the
5004 "conflicts" element, style the "automaton" element with mode
5005 "conflicts."
5006 (xsl:template match="conflicts"): Remove.
5007 (xsl:template match="conflict"): Remove.
5008 (xsl:template match="automaton" mode="conflicts"): New.
5009 (xsl:template match="state" mode="conflicts): New.
5010 * src/conflicts.c (conflicts_output_xml): Remove.
5011 * src/conflicts.h (conflicts_output_xml): Remove prototype.
5012 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
5013 * src/print.c (print_grammar): Consistently wrap at the 66th column so
5014 the corresponding XSLT is easier. Also, never wrap between a word and
5015 the comma that follows it.
5016
5017 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
5018
5019 Improve C++ namespace support. Discussed starting at
5020 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
5021 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
5022 b4_namespace_close): New macros that interpret the %define variable
5023 "namespace" so its value can contain "::" to indicate nested
5024 namespaces.
5025 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
5026 the above macros.
5027 * data/lalr1.cc (b4_namespace): Likewise.
5028 * data/location.cc (b4_namespace): Likewise.
5029 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
5030 inside a new table in the general %define entry. Document `%define
5031 namespace' there as well. Point the %name-prefix entry to it since it
5032 explains it more completely in the case of C++.
5033 (C++ Bison Interface): Mention `%define namespace' instead of
5034 %name-prefix.
5035 (Table of Symbols): Remove the `%define push_pull' entry. The %define
5036 entry suffices.
5037 * tests/c++.at (Relative namespace references): New test case.
5038 (Absolute namespace references): New test case.
5039 (Syntactically invalid namespace references): New test case.
5040 * tests/input.at (C++ namespace reference errors): New test case.
5041
5042 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
5043
5044 Add syncline support and location accessor to internal %define
5045 interfaces.
5046 * data/bison.m4 (b4_percent_define_get_loc): New.
5047 (b4_percent_define_get_syncline): New.
5048 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
5049 (b4_percent_define_default): Record defining location as line 1 rather
5050 than 0 for the sake of synchronizing #line's, and define
5051 b4_percent_define_syncline(VARIABLE).
5052 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
5053 * src/muscle_tab.c (muscle_syncline_grow): New.
5054 (muscle_code_grow): Use muscle_syncline_grow.
5055 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
5056 define b4_percent_define_syncline(VARIABLE).
5057 (muscle_percent_define_get_loc): New.
5058 (muscle_percent_define_get_syncline): New.
5059 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
5060 remove some unused variables.
5061 (muscle_percent_define_default): Record defining location as line 1
5062 rather than 0 for the sake of synchronizing #line's, and define
5063 b4_percent_define_syncline(VARIABLE).
5064 (muscle_percent_define_check_values): Use
5065 muscle_percent_define_get_loc.
5066 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
5067 (muscle_percent_define_get_syncline): Prototype.
5068 * tests/skeletons.at (%define Boolean variables: invalid skeleton
5069 defaults): Update output for location change.
5070 (Complaining during macro argument expansion): Extend to test
5071 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
5072
5073 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
5074
5075 Fix some error-reporting macro bugs.
5076 * data/bison.m4 (b4_cat): New.
5077 (b4_error, b4_error_at): Use b4_cat to send error directives directly
5078 to stdout so they don't become arguments to other macros. Update
5079 comments and add examples.
5080 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
5081 add examples.
5082 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
5083 after printing the error directive so that M4 doesn't report subsequent
5084 problems that are induced by this problem.
5085 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
5086 instead of just in them. Recognize @\n in both places. Both expand to
5087 the empty string. Needed by b4_cat.
5088 * tests/skeletons.at (Complaining during macro argument expansion):
5089 New test case.
5090 (Fatal errors make M4 exit immediately): New test case.
5091
5092 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
5093
5094 Implement --print-datadir.
5095 * src/getargs.c (usage): Mention.
5096 (PRINT_DATADIR_OPTION): New anonymous enum member.
5097 (long_options): Add entry for it.
5098 (getargs): Add case for it calling compute_pkgdatadir.
5099 * src/output.c (output_skeleton): Encapsulate data directory
5100 computation from here...
5101 (prepare): ... and from here...
5102 (compute_pkgdatadir): ... into this new function.
5103 * src/output.h (compute_pkgdatadir): Prototype.
5104
5105 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
5106
5107 * src/print-xml.c (escape_bufs): New static global variable
5108 replacing...
5109 (xml_escape_n): ... the static local variable buf here.
5110 (print_xml): Free memory for escape_bufs.
5111 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
5112
5113 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
5114
5115 Replace `%push-parser' and `%push-pull-parser' with
5116 `%define push_pull "push"' and `%define push_pull "both"'.
5117 `%define push_pull "pull"' is the default.
5118 * doc/bison.texinfo (Push Decl, Push Parser Function,
5119 Pull Parser Function, Parser Create Function, Parser Delete Function):
5120 Update declarations.
5121 (Decl Summary, Table of Symbols): Replace %push-parser and
5122 %push-pull-parser entries with a %define push_pull entry.
5123 * data/bison.m4 (b4_percent_define_check_values): New macro.
5124 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
5125 definitions...
5126 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
5127 definitions...
5128 * data/push.c: ... to here and compute them from the value of the
5129 %define variable push_pull.
5130 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
5131 parsing requests here...
5132 * data/yacc.c: ... hack this to switch to push.c any time
5133 b4_use_push_pull_flag or the %define variable push_pull is set. This
5134 will go away when we mv push.c yacc.c.
5135 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
5136 push parsing is not supported since unused %define variables are
5137 reported anyway.
5138 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
5139 * src/muscle_tab.h (muscle_percent_define_check_values): Update
5140 comments for consistency with b4_percent_define_check_values.
5141 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
5142 muscles.
5143 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
5144 Remove.
5145 (prologue_declaration): Remove %push-parser and %push-pull-parser
5146 rules.
5147 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
5148 * tests/calc.at: Update declarations.
5149 * tests/input.at (%define enum variables): New test case.
5150 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
5151 declaration.
5152 (Push Parsing: Multiple impure instances): Update declaration.
5153 (Push Parsing: Unsupported Skeletons): New test case.
5154 * tests/torture.at (Exploding the Stack Size with Alloca): Update
5155 declaration.
5156 (Exploding the Stack Size with Malloc): Update declaration.
5157
5158 2007-09-24 Wojciech Polak <polak@gnu.org>
5159
5160 Add XSLT transformations.
5161
5162 * data/xslt/xml2dot.xsl: Transform XML into DOT.
5163 * data/xslt/xml2text.xsl: Transform XML into plain text.
5164 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
5165 * data/Makefile.am (xsltdir): New variable.
5166 (dist_xslt_DATA): Add xslt/*.xsl files.
5167
5168 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
5169
5170 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
5171 Problem reported by Wojciech Polak.
5172 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
5173 (xml_printf): Undo change I made on 21 September; that is,
5174 indent 2 spaces, not 1.
5175
5176 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
5177
5178 Pacify ./configure --enable-gcc-warnings.
5179 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
5180 `char const *' instead of `char *'.
5181 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
5182 local variable `sep'.
5183
5184 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
5185
5186 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
5187 elsewhere.
5188 * src/print-xml.c: Prefer "const" after types; that's more consistent.
5189 (xml_printf): Indent just 1 space for level.
5190 (e_char, xlate_char): Remove.
5191 (xml_escape_string): Rewrite to avoid undefined behavior (used
5192 storage that was freed from the stack).
5193 (xml_escape_n): Don't bother checking for subscript error.
5194
5195 2007-09-21 Wojciech Polak <polak@gnu.org>
5196
5197 Add Bison XML Automaton Report.
5198
5199 Add support for an -x option to generate an XML report.
5200 It is not documented yet.
5201 * src/print-xml.c: New file.
5202 * src/print-xml.h: Likewise.
5203 * lib/timevar.def (TV_XML): New var.
5204 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
5205 * src/conflicts.c: Include print-xml.h.
5206 (solved_conflicts_xml_obstack): New var.
5207 (log_resolution, conflicts_solve, conflicts_free):
5208 Add support for XML report.
5209 (conflicts_output_val): New function.
5210 * src/conflicts.h (conflicts_output_val): New decl.
5211 * src/files.c (spec_xml_file): New var.
5212 (compute_output_file_names, output_file_names_free): Add XML support.
5213 * src/files.h (spec_xml_file): New decl.
5214 * src/getargs.c (xml_flag): New var.
5215 (usage, short_options, long_options, getargs): Add XML support.
5216 * src/getargs.h (xml_flag): New decl.
5217 * src/gram.c: Include print-xml.h.
5218 (rule_lhs_print_xml, rule_rhs_print_xml):
5219 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
5220 New functions.
5221 * src/gram.h: Declare external ones.
5222 * src/main.c: Include print-xml.h.
5223 (main): Add XML support.
5224 * src/reduce.c: Include print-xml.h.
5225 (reduce_xml): New function.
5226 * src/reduce.h: Declare it.
5227 * src/state.c: Include print-xml.h.
5228 (state_new): Add XML support.
5229 (state_rule_lookahead_tokens_print_xml): New function.
5230 * src/state.h: Declare it.
5231 (struct state): New member solved_conflicts_xml.
5232 * src/symtab.c (symbol_class_get_string): New function.
5233 * src/symtab.h: Declare it.
5234
5235 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
5236
5237 * GNUmakefile: Switch to coreutils's version.
5238 * bootstrap: Likewise.
5239 * Makefile.cfg: Adjust to new GNUmakefile.
5240 * README-hacking: Likewise.
5241
5242 Import from gnulib:
5243
5244 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
5245 Bruno Haible <bruno@clisp.org>
5246
5247 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
5248 and is a script that invokes bison. Tighten the code. Add comments.
5249
5250 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
5251
5252 Spell "boolean" as "Boolean". Reported by Akim Demaille.
5253 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
5254 * doc/bison.texinfo (Decl Summary): Fix.
5255 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
5256 * tests/input.at (Boolean %define variables): Update output.
5257 * tests/skeletons.at (%define boolean variables: invalid skeleton
5258 defaults): Rename to...
5259 (%define Boolean variables: invalid skeleton defaults): ... this and
5260 update output.
5261
5262 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
5263
5264 In impure push mode, don't allow more than one yypstate to be allocated
5265 since multiple impure parsers would corrupt yynerrs.
5266 * data/push.c (yypstate_allocated): New static global variable
5267 initialized to 0.
5268 (yypull_parse): If yypstate_new returns 0, don't report it as memory
5269 exhaustion if yypstate_allocated is 1, but still return 2.
5270 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
5271 already 1. Otherwise, set it to 1.
5272 (yypstate_delete): Set it to 0.
5273 * tests/push.at (Push Parsing: Multiple impure instances): New test
5274 case.
5275
5276 2007-08-17 Bob Rossi <bob@brasko.net>
5277
5278 * doc/bison.texinfo (Push Decl): Document the push parser.
5279 (Table of Symbols): Ditto.
5280 (Pure Decl): Ditto.
5281 (Decl Summary): Ditto.
5282 (Multiple Parsers, Push Parser Function, Pull Parser Function,
5283 Parser Create Function, Parser Delete Function):
5284 Add new push parser symbols.
5285 (Table of Symbols): Document push-parser, push-pull-parser,
5286 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
5287
5288 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
5289
5290 Update to GPLv3.
5291 * doc/gpl-3.0.texi: New file.
5292 * doc/gpl.texi: Remove.
5293 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
5294 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
5295 * README-hacking, TODO, bootstrap, bootstrap.conf:
5296 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
5297 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
5298 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
5299 * data/lalr1.cc, data/lalr1.java, data/location.cc:
5300 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
5301 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
5302 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
5303 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
5304 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
5305 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
5306 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
5307 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
5308 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
5309 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
5310 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
5311 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
5312 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
5313 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
5314 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
5315 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
5316 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
5317 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
5318 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
5319 * src/complain.c, src/complain.h, src/conflicts.c:
5320 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
5321 * src/files.h, src/flex-scanner.h, src/getargs.c:
5322 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
5323 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
5324 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
5325 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
5326 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
5327 * src/print.c, src/print.h, src/print_graph.c:
5328 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
5329 * src/reduce.h, src/relation.c, src/relation.h:
5330 * src/revision.h, src/scan-code.h, src/scan-code.l:
5331 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
5332 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
5333 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
5334 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
5335 * tests/Makefile.am, tests/actions.at, tests/c++.at:
5336 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
5337 * tests/existing.at, tests/glr-regression.at:
5338 * tests/headers.at, tests/input.at, tests/java.at:
5339 * tests/local.at, tests/output.at, tests/push.at:
5340 * tests/reduce.at, tests/regression.at, tests/sets.at:
5341 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
5342 * tests/torture.at:
5343 Update to GPLv3.
5344
5345 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
5346
5347 Get rid of broken %no-parser, -n, and --no-parser implementation and
5348 documentation.
5349 * TODO: Don't mention them.
5350 * doc/bison.1: Likewise.
5351 * doc/bison.texinfo (Decl Summary): Likewise.
5352 (Bison Options): Likewise.
5353 (Option Cross Key): Likewise.
5354 * src/getargs.c (no_parser_flag): Remove global variable.
5355 (usage): Don't print description of -n and --no-parser.
5356 (long_options): Remove --no-parser entry here.
5357 (getargs): Remove -n case in the switch here.
5358 * src/getargs.h (no_parser_flag): Remove extern.
5359 * tests/regression.at (Web2c Actions): Remove comment that mentions
5360 --no-parser.
5361
5362 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
5363
5364 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
5365 name user variables starting with `yy'. Just pass NULL instead of a
5366 dummy local &yylval to yypush_parse.
5367 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
5368 starting with `yy'.
5369
5370 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
5371
5372 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
5373 true since it's then always used regardless of whether yyoverflow is
5374 defined. Reported by Christian Burger at
5375 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
5376 * THANKS: Add Christian Burger.
5377
5378 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
5379 node names: say "Decl Summary" not "Bison Declaration Summary".
5380
5381 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
5382
5383 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
5384 determine whether this function has already complained about an invalid
5385 value for a %define boolean variable, don't check whether Bison has
5386 ever examined the value. As written, the check was a tautology.
5387 Instead, record and check for this complaint using a separate muscle.
5388
5389 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
5390
5391 Fix push parsing memory leak reported by Brandon Lucia at
5392 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
5393 * THANKS: Add Brandon Lucia.
5394 * data/push.c (yypstate_delete): Free the stack if it was reallocated
5395 but the parse never completed and thus freed it.
5396 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
5397 * tests/testsuite.at: Include push.at.
5398 * test/push.at: New.
5399 (Push Parsing: Memory Leak for Early Deletion): New test case.
5400
5401 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
5402
5403 Improve handling of multiple S/R conflicts in the same state and of S/R
5404 conflicts involving multiple reductions.
5405 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
5406 set for a state here or Bison will abort if it is reassigned on a
5407 later conflicted reduction in the same state.
5408 Similarly, don't finalize and assign the solved conflicts report here
5409 or it will be lost if it is reassigned on a later conflicted reduction
5410 in the same state.
5411 (set_conflicts): Instead, assign them both here after all S/R conflicts
5412 in the state have been fully examined.
5413 * src/print.c (shift_set): Rename to...
5414 (no_reduce_set): ... this.
5415 (print_reductions): Update for rename, and add %nonassoc error action
5416 tokens to no_reduce_set so that, when printing the first remaining
5417 reduction on an error action token, the reduction is enclosed in
5418 brackets.
5419 (print_results): Update for rename.
5420 * tests/conflicts.at (Solved conflicts report for multiple reductions
5421 in a state): New test case.
5422 (%nonassoc error actions for multiple reductions in a state): New test
5423 case.
5424
5425 * src/main.c (main): Don't depend on C99 features.
5426
5427 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
5428
5429 * build-aux/.cvsignore: Add compile.
5430 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
5431 uniwidth.
5432
5433 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
5434
5435 * bootstrap (slurp): Create target directories that don't exist.
5436 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
5437
5438 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
5439
5440 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
5441 than item number.
5442 * closure.c (closure): Likewise.
5443 * state.h (reductions): Comment sorting of rules.
5444 (state): Comment sorting of items.
5445
5446 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
5447
5448 Fix C++ test cases after recent Gnulib changes. Discussed starting at
5449 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
5450 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
5451 definition in order to avoid Gnulib headers since we don't use config.h
5452 here.
5453 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
5454 rather than AT_DATA so that config.h is included.
5455
5456 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
5457
5458 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
5459 instead of fprintf. Guard these functions with #if YYDEBUG instead of
5460 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
5461 and so that YYFPRINTF is guaranteed to be defined here.
5462
5463 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
5464
5465 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
5466 with...
5467 (muscle_percent_define_check_values): ... this more helpful function.
5468 Again, it's not used yet, but it will be.
5469 * src/muscle_tab.h: Likewise.
5470
5471 Improve some comments in parser table construction.
5472 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
5473 (generate_states): Don't mention ruleset, which is internal to closure.
5474 * src/closure.c (closure): Explain sorting of core and itemset, which
5475 is required for this function to behave correctly.
5476 * src/closure.h (closure): Mention sorting.
5477
5478 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
5479
5480 * src/lalr.c (state_lookahead_tokens_count): For code readability,
5481 move the check for disabled transitions to an aver since conflict
5482 resolution hasn't happened yet.
5483
5484 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
5485 labels a state as inconsistent just because it has error transitions.
5486 The original form of this check appeared in revision 1.1 of lalr.c,
5487 which was committed on 1991-12-21. Now (at least), changing the
5488 consistency label on such a state appears to have no useful effect in
5489 any of the places it is examined, which I enumerate below. The key
5490 point to understanding each item in this enumeration is that a state
5491 with an error transition is labelled consistent in the first place only
5492 if it has no rules, so the check cannot matter for states that have
5493 rules. (1) Labelling a state as inconsistent will cause set_conflicts
5494 to try to identify its conflicts, and a state must have *rules* to have
5495 conflicts. (2) Labelling a state as inconsistent will affect how
5496 action_row sets the default *rule* for the state. (3) Labelling a
5497 state as inconsistent will cause build_relations to add lookback edges
5498 to *rules* in that state.
5499 * src/state.h (struct state): Word the comment for member consistent
5500 more carefully.
5501
5502 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
5503
5504 Don't depend on C99 features.
5505 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
5506 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
5507 * src/reader.c (check_and_convert_grammar): Fix for-loop.
5508 * src/state.c (state_mark_reachable_states): Fix for-loop.
5509 (state_remove_unreachable_states): Fix for-loop.
5510
5511 Don't widen struct state with member reachable just to temporarily
5512 record reachability. Instead, use a local bitset.
5513 * src/state.h (struct state): Remove member.
5514 * src/state.c (state_new): Don't initialize it.
5515 (state_mark_reachable_states): Rename to...
5516 (state_record_reachable_states): ... this, and use bitset.
5517 (state_remove_unreachable_states): Use bitset.
5518
5519 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
5520
5521 * src/Makefile.am (yacc): Quote target action commands properly so
5522 that the yacc script isn't corrupt. Reported by Hans Aberg at
5523 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
5524
5525 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
5526 the case of pure parsers. Reported by Frans Englich at
5527 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
5528 * THANKS: Add Frans Englich.
5529
5530 * NEWS (2.3a+): In the %code entry, reference section `Bison
5531 Declaration Summary' from the manual now since the %code summary has
5532 moved there.
5533 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
5534 in the rules section must be terminated by semicolons.
5535
5536 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
5537
5538 Extend the front-end API for %define variables to more completely
5539 mirror the back-end. This will be useful in the future.
5540 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
5541 Update comments to mention the new front-end counterparts of these
5542 macros.
5543 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
5544 for muscle_string_decode and muscle_location_decode.
5545 (muscle_string_decode): New static function.
5546 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
5547 (muscle_percent_define_get, muscle_percent_define_ifdef): New
5548 functions.
5549 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
5550 muscle_percent_define_get to mimic the b4_percent_define_flag_if
5551 implementation more closely.
5552 (muscle_percent_define_invalid_value): New function.
5553 * src/muscle_tab.h (muscle_percent_define_get,
5554 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
5555 Prototype.
5556
5557 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
5558
5559 * NEWS (2.3a+): Mention yesterday's state-removal change.
5560 (2.3a): Remove the %language entry, which was added after 2.3a.
5561 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
5562 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
5563 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
5564 tests/existing.at: Update copyright date.
5565
5566 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
5567
5568 If conflict resolution makes states unreachable, remove those states,
5569 report rules that are then unused, and don't report conflicts in those
5570 states.
5571 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
5572 New global function.
5573 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
5574 function.
5575 * src/main.c (main): After conflict resolution, remove the unreachable
5576 states and update all data structures that reference states by number.
5577 * src/state.c (state_new): Initialize each state's reachable member to
5578 false.
5579 (state_mark_reachable_states): New static function.
5580 (state_remove_unreachable_states): New global function.
5581 * src/state.h (struct state): Add member bool reachable.
5582 (state_remove_unreachable_states): Prototype.
5583 * tests/conflicts.at (Unreachable States After Conflict Resolution):
5584 New test case.
5585 * tests/existing.at (GNU pic Grammar): Update test case output now that
5586 an unused rule is discovered.
5587
5588 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
5589
5590 Minor code cleanup in parser table construction.
5591 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
5592 (new_itemsets, save_reductions): Update for rename to nitemset.
5593 * src/closure.c (nritemset): Rename to...
5594 (nitemset): ... this since the "r" appears to meaningless and isn't
5595 used in the comments.
5596 (closure): Update for rename.
5597 * src/closure.h (nritemset): Update extern to...
5598 (nitemset): ... this.
5599 * src/lalr.c (LA): Fix a typo in comments.
5600 * src/print.c (print_core): Update for rename to nitemset.
5601 * src/print_graph.c (print_graph): Likewise.
5602 * src/state.h: Fix some typos in header comments.
5603
5604 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
5605
5606 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
5607 still sticks to ASCII. Sorry!
5608
5609 * README-hacking: New file, taken mostly from coreutils, with changes
5610 for Bison. Contains much of the contents of:
5611 * README-cvs: Remove.
5612 * bootstrap: Sync from gnulib.
5613 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
5614 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
5615
5616 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
5617
5618 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
5619 Setzer.
5620 (Java Differences): Fix some typos.
5621 * THANKS: Add Sebastian Setzer.
5622
5623 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
5624
5625 * data/java.m4 (b4_single_class_if): Remove.
5626 (b4_abstract_if): Look at "%define abstract".
5627 (b4_lexer_if): New.
5628 (b4_union_name): Rename...
5629 (b4_yystype): ... to this. Map to "%define stype".
5630 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
5631 b4_maybe_throws): Fix quoting.
5632 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
5633 * data/lalr1.java (Lexer interface): Always define.
5634 (Lexer interface within parser class): Remove.
5635 (YYLexer class): New, used when "%code lexer" is present.
5636 (constructor): When "%code lexer" is used, pass %lex-param
5637 to the lexer constructor.
5638 (yylex, yyparse): Remove %lex-param from method invocations
5639 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
5640
5641 * doc/bison.texinfo (Java Bison Interface): Mention "%define
5642 abstract". Rename "%define union_name" to "%define stype".
5643 Rename method names according to previous patch.
5644 (Java Scanner Interface): Describe "%code lexer" instead of
5645 "%pure-parser" and "%define single_class".
5646 (Java Differences): Mention "%code lexer".
5647
5648 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
5649 Include scanner here, using macros from tests/local.at.
5650 (AT_DATA_CALC_Y): Remove final argument.
5651 (_AT_CHECK_JAVA_CALC): Likewise.
5652 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
5653 of %locations and %error-verbose.
5654 (main): Test with and without %lex-param.
5655 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
5656 (AT_BISON_OPTION_POPDEFS): Pop it.
5657
5658 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5659
5660 DJGPP spefic issue. Inhibit the use of disallowed characters for
5661 file name genertion on Win98, WinXP, etc. These are |<>":?*\
5662 and concern testsuite case 46.
5663 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
5664 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
5665 * djgpp/config.bat: Inhibit the use of disallowed characters.
5666
5667 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
5668
5669 Miscellaneous %define and %code cleanup.
5670 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
5671 values are interpreted.
5672 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
5673 documentation a little more.
5674 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
5675 muscle_percent_define_insert, muscle_percent_code_grow): New
5676 functions/macros.
5677 * src/muscle_tab.h (muscle_percent_define_insert,
5678 muscle_percent_code_grow): Prototype.
5679 * src/parse-gram.y (prologue_declaration): Use
5680 muscle_percent_define_insert and muscle_percent_code_grow when parsing
5681 %define and %code directives.
5682
5683 Make it easy to share %define boolean variables between the front-end
5684 and back-end. Though not used yet, this will be useful in the future.
5685 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
5686 Bison uses of names rather than just skeleton uses of names.
5687 (b4_percent_define_get, b4_percent_define_ifdef): Rename
5688 b4_percent_define_skeleton_variables(VARIABLE) to
5689 b4_percent_define_bison_variables(VARIABLE).
5690 (b4_percent_code_get, b4_percent_code_ifdef): Rename
5691 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
5692 b4_percent_code_bison_qualifiers(QUALIFIER).
5693 (b4_check_user_names_wrap): Update for renames.
5694 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
5695 muscle_percent_define_default): New functions mimicking
5696 b4_percent_define_flag_if and b4_percent_define_default.
5697
5698 For %define variables, report locations for invalid values and
5699 redefinitions.
5700 * data/bison.m4 (b4_percent_define_flag_if): Read
5701 b4_percent_define_loc(VARIABLE) to report the location of an invalid
5702 value for VARIABLE.
5703 (b4_percent_define_default): Save a special location in
5704 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
5705 must later be reported as invalid.
5706 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
5707 functions.
5708 (muscle_percent_define_insert): Record the location of VARIABLE in
5709 muscle percent_define_loc(VARIABLE), and use it to report the previous
5710 location for a redefinition.
5711 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
5712 (muscle_percent_define_default): Update like b4_percent_define_default.
5713 (muscle_grow_user_name_list): Rename to...
5714 (muscle_user_name_list_grow): ... this for consistency and use
5715 muscle_location_grow.
5716 * src/muscle_tab.h (muscle_location_grow): Prototype.
5717 * tests/input.at (%define errors): Update expected output.
5718 * tests/skeletons.at (%define boolean variables: invalid skeleton
5719 defaults): New test case.
5720
5721 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
5722
5723 * src/print.c (lookahead_set, state_default_rule): Remove.
5724 (print_reductions): Replace state_default_rule invocation with
5725 equivalent use of yydefact, which was computed in token_actions in
5726 tables.c.
5727 (print_results): Don't allocate lookahead_set.
5728
5729 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
5730
5731 * data/lalr1.java: Prefix all private members with yy.
5732
5733 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
5734
5735 Use YYFPRINTF instead of fprintf where appropriate. Reported by
5736 Sebastien Fricker at
5737 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
5738 * THANKS: Add Sebastien Fricker.
5739 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
5740 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
5741 accept a variable number of arguments.
5742
5743 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
5744
5745 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
5746
5747 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5748
5749 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
5750 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
5751 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
5752
5753 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
5754
5755 Undo my 2007-02-07 change, switching back to the c-strcase module
5756 introduced in the 2007-02-03 change. Bruno Haible reported that
5757 the 2007-02-07 change would be dangerous in Turkish if we add a
5758 language whose name contains "i", since "i" is not lowercase "I"
5759 in Turkish.
5760 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
5761 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
5762 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
5763 * m4/.cvsignore: Remove strcase.m4.
5764 * src/getargs.c: Revert 2007-02-07 change, as follows.
5765 Include c-strcase.h.
5766 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
5767
5768 2007-02-11 Bruno Haible <bruno@clisp.org>
5769
5770 Enable the Java related testsuite tests when the only Java compiler
5771 found is a gcj < 4.3. Discussed at
5772 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
5773 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
5774
5775 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
5776
5777 * data/Makefile.am: Update copyright date.
5778 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
5779 yypstate_new returns NULL.
5780 (yypstate_new): Return NULL if malloc does.
5781 * src/reader.c (packgram): Move translation of rule actions from the
5782 beginning of packgram to...
5783 (check_and_convert_grammar): ... here right before packgram is invoked
5784 so it's easier to write more complete comments, and remove redundant
5785 code.
5786
5787 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
5788
5789 As in semantic actions, make @$ in %initial-action, %destructor, and
5790 %printer imply %locations.
5791 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
5792 scanning @$.
5793 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
5794 (@$ in %initial-action implies %locations,
5795 @$ in %destructor implies %locations,
5796 @$ in %printer implies %locations): ... these new test cases.
5797
5798 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
5799
5800 Undo most of the 2007-02-03 change, switching to the strcase module
5801 now that gnulib strcase has been fixed.
5802 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
5803 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
5804 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
5805 * m4/.cvsignore: Add strcase.m4.
5806 * src/getargs.c: Revert 2007-02-03 change, as follows.
5807 Don't include c-strcase.h.
5808 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
5809 strcasecmp has "unspecified behavior" outside the POSIX locale,
5810 but it works fine in practice if at least one argument is ASCII,
5811 as is the case in Bison.
5812
5813 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
5814
5815 * tests/java.at: Skip tests if only one of javac/java is present.
5816 Reported by Joel E. Denny.
5817 * tests/atlocal.in: Adjust copyright years.
5818
5819 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
5820
5821 * data/lalr1.java (Stack): Work around old verifiers that disallow
5822 access to the private fields of an inner class, from the outer class.
5823 We can make Stack's fields public because user code doesn't have access
5824 to the instance of Stack used by parse(). Reported by Paul Eggert.
5825
5826 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
5827
5828 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
5829 the right spot for these files?
5830 * bootstrap.conf (gnulib_modules): Add c-strcase.
5831 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
5832 c-strncasecmp.c.
5833 * src/getargs.c: Include c-strcase.h.
5834 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
5835 to avoid unspecified behavior.
5836
5837 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
5838
5839 * doc/bison.texinfo (Decl Summary): Correct typo.
5840
5841 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
5842
5843 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
5844 Complain if the value does not match empty, "true" or "false".
5845 * data/c++.m4: Adjust default definitions of %define variables.
5846 * data/java.m4: Adjust default definitions of %define variables.
5847 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
5848 to above behavior.
5849 * tests/input.at (Boolean %define variables): Test new behavior.
5850
5851 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
5852
5853 * NEWS: Mention java.
5854 * TODO: Remove things that are done.
5855 * bootstrap.conf: Add javacomp-script and javaexec-script.
5856 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
5857
5858 * data/Makefile.am: Add new files.
5859 * data/java-skel.m4: New.
5860 * data/java.m4: New.
5861 * data/lalr1.java: New.
5862
5863 * doc/bison.texinfo: Put "A Complete C++ Example" under
5864 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
5865 under Other Languages.
5866
5867 * src/getargs.c (valid_languages): Add Java.
5868 * src/getargs.h (struct bison_language): Update size of string fields.
5869
5870 * tests/Makefile.am: Add java.at.
5871 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
5872 * tests/java.at: New.
5873 * tests/testsuite.at: Include it.
5874
5875 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
5876
5877 Clean up.
5878 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
5879 at_directive_argv arguments so these no longer have to be global
5880 variables. Also, update the implementation for the following changes.
5881 (fail_for_at_directive_too_many_args,
5882 fail_for_at_directive_too_few_args): Add at_directive_name argument.
5883 (at_directive_name): Remove as at_directive_argv[0] will be used for
5884 this now.
5885 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
5886 for the directive name.
5887 (at_directive_argc, at_directive_argv): Make these local within
5888 skel_lex instead of global.
5889 (INITIAL): Update directive start action for above changes.
5890 (SC_AT_DIRECTIVE_ARG): Rename to...
5891 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
5892 (SC_AT_DIRECTIVE_SKIP_WS): Update.
5893 (scan_skel): Move yylex_destroy to...
5894 (skel_scanner_free): ... here.
5895 * tests/skeletons.at (installed skeleton file name): Rename to...
5896 (installed skeleton file names): ... this.
5897
5898 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
5899
5900 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
5901 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
5902 Summary" not "Directives".
5903 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
5904 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
5905 since the former is now the more complete one.
5906 (Prologue Alternatives): Likewise and do the same for %defines.
5907 (Table of Symbols): Add summary of %code, add summary of %define, and
5908 move full %code documentation to...
5909 (Decl Summary): ... here for consistency with other entries in these
5910 sections.
5911 Move %define entry in order to keep this list alphabetized.
5912 Reword %define entry a little to put less emphasis on the skeleton
5913 concept, which most users shouldn't have to think about.
5914
5915 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
5916
5917 Adjust to recent gnulib changes.
5918 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
5919 Add string.h, string_.h, unistd_.h, wchar_.h.
5920 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
5921 * src/system.h: Don't include <stpcpy.h>; this is now done by
5922 <string.h>.
5923
5924 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
5925
5926 Simplify implementation of unqualified %code, implement macros for
5927 uniform treatment of boolean %define flags. Document %define.
5928 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
5929 b4_percent_code_ifdef): New.
5930 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
5931 * data/c++.m4: Define default value for global_tokens_and_yystype.
5932 * data/glr.cc: Likewise.
5933 * data/location.cc: Use b4_percent_define_flag_if.
5934
5935 * doc/bison.texinfo (Decl Summary): Document %define.
5936
5937 * src/parse-gram.y (Unqualified %code): Change muscle name to
5938 b4_percent_code().
5939 (content.opt): Default to empty.
5940
5941 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
5942
5943 Implement support for relative and absolute skeleton file names.
5944 Discussed starting at
5945 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
5946 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
5947 (Bison Options): Document in --skeleton entry.
5948 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
5949 full_skeleton can't necessarily hold all of pkgdatadir.
5950 If the specified skeleton file name contains a `/', don't prepend
5951 pkgdatadir.
5952 * src/parse-gram.y (prologue_declaration): If the specified skeleton
5953 file name contains a `/', prepend the grammar file directory.
5954 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
5955 * skeletons.at: New file.
5956 (relative skeleton file names): New test case.
5957 (installed skeleton file names): New test case.
5958 * tests/testsuite.at: Include skeletons.at.
5959
5960 * bootstrap: Update copyright to 2007.
5961
5962 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
5963
5964 * bootstrap: Remove occurrences of .#bootmp from the files.
5965
5966 2007-01-17 Akim Demaille <akim@epita.fr>
5967
5968 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
5969 nonterminals.
5970 Use per-type %printer.
5971
5972 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
5973
5974 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
5975 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5976 djgpp/config.site, src/files.c, src/files.h, src/main.c,
5977 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
5978 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
5979 tests/glr-regression.at, tests/input.at, tests/local.at,
5980 tests/output.at, tests/torture.at: Update copyright to 2007.
5981
5982 2007-01-16 Akim Demaille <akim@epita.fr>
5983
5984 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
5985 error code.
5986 (Calc++ Scanner): Exit with failure if we can't open the input
5987 file.
5988 Accept "-" standing for stdin.
5989 (Calc++ Top Level): Print the result only if the parsing was
5990 successful.
5991
5992 2007-01-16 Akim Demaille <akim@epita.fr>
5993
5994 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
5995
5996 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
5997 and Joel E. Denny <jdenny@ces.clemson.edu>
5998
5999 Clean up %define and %code implementation in M4 some. Most
6000 importantly, rename all related macros to be in the b4_percent_define
6001 and b4_percent_code namespaces. Also, complete support for `.' in
6002 %define variable names and %code qualifiers.
6003 * data/bison.m4 (b4_check_user_names): Check for special
6004 "SKELETON-NAMESPACE(name)" macros instead of using two nested
6005 m4_foreach loops.
6006 (b4_get_percent_define, b4_get_percent_code): Rename to...
6007 (b4_percent_define_get, b4_percent_code_get): ... these.
6008 Extend documentation with examples.
6009 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
6010 b4_percent_define_skeleton_variables and
6011 b4_percent_code_skeleton_qualifiers.
6012 Expect any value for the %define variable `foo' to be stored in the
6013 macro named `b4_percent_define(foo)'; expect any %code blocks for the
6014 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
6015 expect any unqualified %code blocks to be stored in a macro named
6016 `b4_percent_code_unqualified'.
6017 Use m4_indir so that %define variable names and %code qualifiers can
6018 contain `.', which is allowed by the grammar parser.
6019 (b4_percent_define_default): New macro to set a default value for a
6020 %define variable.
6021 (m4_wrap): Update wrapped code, and fix some underquoting.
6022 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
6023 Expect grammar uses of %define variables and %code qualifiers to be
6024 defined in b4_percent_define_user_variables and
6025 b4_percent_code_user_qualifiers.
6026 * data/c++.m4: Use b4_percent_define_default rather than
6027 m4_define_default. Fix some underquoting. Skeleton usage of %define
6028 variable define_location_comparison now implies skeleton usage of
6029 %define variable filename_type.
6030 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
6031 data/push.c, data/yacc.c: Update macro names.
6032 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
6033 muscle names.
6034
6035 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6036
6037 DJGPP specific issues.
6038
6039 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
6040 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
6041
6042 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
6043
6044 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
6045 run parsers in all tests so that Valgrind is invoked during
6046 maintainer-check-valgrind.
6047 (Duplicate representation of merged trees): Free all semantic values.
6048 (Duplicated user destructor for lookahead): Likewise.
6049
6050 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
6051
6052 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
6053 command-line prefix.
6054 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
6055 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
6056 miss Valgrind messages.
6057 (Exploding the Stack Size with Malloc): Likewise.
6058
6059 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
6060
6061 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
6062 locals. Reported by Juan Manuel Guerrero at
6063 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
6064 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
6065 Fix some indentation also.
6066 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
6067 explaining this issue.
6068
6069 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
6070 and Joel E. Denny <jdenny@ces.clemson.edu>
6071
6072 Simplify union and prologue handling, and escape union and lex/parse
6073 params with digraphs.
6074 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
6075 values to the empty string since these are no longer guaranteed
6076 initialized by the front-end.
6077 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
6078 braces around b4_user_stype since this is no longer done by the
6079 front-end.
6080 * src/files.c, src/files.h (pre_prologue_obstack,
6081 post_prologue_obstack): Remove.
6082 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
6083 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
6084 with digraphs. This fixes lex params and parse params.
6085 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
6086 * src/output.c (prepare): Remove muscle insertion of the prologues.
6087 (output): Remove freeing of pre_prologue_obstack and
6088 post_prologue_obstack.
6089 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
6090 than prologue_augment for prologue parsing so you don't need prologue
6091 obstacks.
6092 (grammar_declaration): For %union RHS, use `braceless' instead of
6093 "{...}" so that braces are already stripped and code is escaped with
6094 digraphs.
6095 * src/reader.c (prologue_augment): Remove.
6096 (reader): Remove initialization of pre_prologue_obstack and
6097 post_prologue_obstack.
6098 * src/reader.h (prologue_augment): Remove.
6099
6100 * data/c.m4: Remove stray parenthesis.
6101
6102 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
6103
6104 Remove quotes from variables names in %define directives and from
6105 qualifiers in %code directives, and restrict the characters that are
6106 allowed in them to M4-friendly ones. For %define, continue to support
6107 the quoted form as a deprecated feature. Discussed starting at
6108 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
6109 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
6110 %code.
6111 * doc/bison.texinfo (Prologue Alternatives): Update.
6112 (Decl Summary): In %defines entry, update mention of `%code requires'
6113 and `%code provides'.
6114 (C++ Location Values): Update %define uses.
6115 (Calc++ Parser Interface): Likewise.
6116 (Calc++ Parser): Likewise, and update `%code requires' uses.
6117 (Table of Symbols): Update %code documentation.
6118 * src/parse-gram.y (prologue_declaration): For %define variables, use
6119 `variable' instead of `STRING'.
6120 (grammar_declaration): For %code qualifiers, use `ID' instead of
6121 `STRING'.
6122 (variable): New nonterminal that takes an `ID' or a `STRING'.
6123 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
6124 and %define uses.
6125 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
6126 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
6127 (%define errors): Update %define uses.
6128
6129 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
6130
6131 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
6132 instead of muscle_insert for %define values so that M4-special
6133 characters are replaced with digraphs.
6134 * tests/input.at (%define errors): Extend to check weird values.
6135
6136 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
6137
6138 Instead of having skeletons declare all valid %define variables and
6139 %code qualifiers, provide macros that retrieve the associated values
6140 and build these lists automatically. Thus Bison will now warn when a
6141 variable or qualifier is not used by the skeleton in the current
6142 invocation regardless of whether it might sometimes be used by that
6143 skeleton in other invocations. Also, move all %define value macros to
6144 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
6145 form, which is replaced by %code.
6146 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
6147 (b4_check_user_names): ... this, and change the series of valid name
6148 arguments to a single list argument for names used in the skeleton
6149 similar to the existing list argument for names used in the grammar.
6150 Warn instead of complaining.
6151 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
6152 values and %code code, to format %code code properly, and to build
6153 lists of all %define variables and %code qualifiers used in the
6154 skeleton: b4_skeleton_percent_define_variables and
6155 b4_skeleton_percent_code_qualifiers.
6156 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
6157 Remove, and...
6158 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
6159 the skeleton names lists can finish building first. In place of
6160 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
6161 expect the lists b4_user_percent_define_variables and
6162 b4_user_percent_code_qualifiers.
6163 * data/c++.m4: Where setting default values for b4_parser_class_name,
6164 b4_location_type, b4_filename_type, b4_namespace, and
6165 b4_define_location_comparison, update their names to the
6166 b4_percent_define_ namespace.
6167 * data/glr.c: Don't use b4_check_percent_define_variables and
6168 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
6169 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
6170 (b4_parser_class_name, b4_namespace): Define these using
6171 b4_get_percent_define for parser_class_name and namespace.
6172 * data/location.cc: Use b4_get_percent_define.
6173 * data/push.c: Don't use b4_check_percent_define_variables and
6174 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
6175 * data/yacc.c: Likewise, and don't call m4_exit in
6176 b4_use_push_for_pull_if or m4_wrap code will never execute.
6177 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
6178 Rename to...
6179 (muscle_grow_user_name_list): ... this for consistency with the
6180 terminology used in bison.m4.
6181 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
6182 %define variable names, and rename muscle used_percent_define_variables
6183 to user_percent_define_variables.
6184 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
6185 user_percent_code_qualifiers.
6186 (content): Remove.
6187 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
6188 {CODE} form is no longer accepted.
6189 * tests/input.at (Reject bad %code qualifiers): Rename to...
6190 (Reject unused %code qualifiers): ... this, and update test output.
6191 (%define error): Update test output.
6192
6193 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
6194
6195 Check for unrecognized %define variables similar to checking for
6196 unrecognized %code qualifiers. Check for redefined %define variables.
6197 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
6198 generalizes...
6199 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
6200 (b4_check_percent_define_variables): New, also wraps it.
6201 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
6202 variables using b4_check_percent_define_variables.
6203 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
6204 all those exercised in the test suite and all those listed in the
6205 `Default values' section of c++.m4. Are there others?
6206 * data/push.c, data/yacc.c: Declare no valid %define variables.
6207 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
6208 similar to muscle_find, but it works even when the muscle stores a
6209 const value.
6210 (muscle_grow_used_name_list): New function for constructing the used
6211 name list muscles that b4_check_for_unrecognized_names requires.
6212 * src/parse-gram.y (prologue_declaration): Warn if a variable is
6213 %define'd more than once. Define the b4_used_percent_define_variables
6214 muscle with muscle_grow_used_name_list.
6215 (grammar_declaration): Abbreviate %code code with
6216 muscle_grow_used_name_list.
6217 * tests/input.at (%define errors): New.
6218
6219 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
6220
6221 Provide warn_at, complain_at, and fatal_at function callbacks to the
6222 skeletons, and use this for %code qualifier complaints.
6223 * data/bison.m4 (b4_error_at): New, invoked by...
6224 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
6225 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
6226 @fatal_at(...@) directives.
6227 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
6228 qualifiers in b4_used_percent_code_qualifiers and to use
6229 b4_complain_at.
6230 * src/location.c, src/location.h (boundary_set_from_string): New global
6231 function.
6232 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
6233 function.
6234 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
6235 to b4_used_percent_code_qualifiers.
6236 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
6237 function.
6238 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
6239 (lineno): Rename to...
6240 (out_lineno): ... this so I don't misunderstand it again.
6241 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
6242 here; these newlines are in the input but not the output file.
6243 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
6244 (at_directive_perform): ... this new static function, and add handling
6245 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
6246 directives.
6247 * tests/input.at (Reject bad %code qualifiers): Update test output with
6248 locations and extend.
6249
6250 * tests/output.at (Output file name: [, Output file name: ]): Remove
6251 bogus comment about these tests failing.
6252
6253 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
6254
6255 Clean up b4_check_percent_code_qualifiers a little.
6256 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
6257 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
6258 documentation and add examples.
6259 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
6260 qualifiers here.
6261
6262 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
6263
6264 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
6265 unreliable -- especially when they're hidden inside another macro.
6266 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
6267 data/c.m4: Remove m4_divert(-1).
6268 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
6269 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
6270 m4_divert_push(0) and m4_divert_pop(0).
6271 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
6272 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
6273 pushed and popped by m4sugar, should be first on the stack.
6274
6275 Provide warn, complain, and fatal function callbacks to the skeletons.
6276 This provides more flexibility than m4_fatal, improves the error
6277 message format, and captures messages for translation. Discussed
6278 starting at
6279 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
6280 * data/bison.m4 (b4_error): New, invoked by...
6281 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
6282 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
6283 directives. Because these M4 macros might be called when the current
6284 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
6285 the previous removal of uses of m4_divert, which caused trouble.
6286 (b4_check_percent_code_qualifiers): Use b4_complain instead of
6287 m4_fatal to report unrecognized %code qualifiers.
6288 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
6289 push parser requests.
6290 * data/glr.c: Use b4_complain instead of m4_fatal to report
6291 non-deterministic push parser requests.
6292 Update @output usage to @output(...@) form.
6293 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
6294 report missing %defines. Update @output usage to @output(...@) form.
6295 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
6296 @output(...@) form.
6297 * src/main.c (main): Invoke skel_scanner_free.
6298 * src/scan-skel.h (skel_scanner_free): Prototype new function.
6299 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
6300 obstack_for_string from flex-scanner.h.
6301 (YY_DECL): Use to declare skel_lex static.
6302 (decode_at_digraphs): Remove; now handled in the new
6303 SC_AT_DIRECTIVE_ARG start condition.
6304 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
6305 functions.
6306 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
6307 at_directive_argv): New static globals.
6308 (INITIAL): Use fail_for_invalid_at.
6309 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
6310 recognize the start of a generalized `@directive(...@)' form and
6311 start...
6312 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
6313 directive args (using the new obstack_for_string), to decode the
6314 contained @ diagraphs, and to perform the directive. It recognizes
6315 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
6316 @output(...@).
6317 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
6318 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
6319 `@,'.
6320 (scan_skel): Initialize obstack_for_string on the first call.
6321 (skel_scanner_free): New function to free obstack_for_string.
6322 * tests/input.at (Reject bad %code qualifiers): Update test output.
6323
6324 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
6325
6326 Consolidate the 4 prologue alternative directives (%code, %requires,
6327 %provides, and %code-top) into a single %code directive with an
6328 optional qualifier field. Discussed at
6329 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
6330 * NEWS (2.3a+): Rewrite the existing entry for the prologue
6331 alternatives.
6332 * doc/bison.texinfo (Prologue Alternatives): Update.
6333 (Decl Summary): Update to %code "requires" and %code "provides".
6334 (Calc++ Parser): Update to %code "requires".
6335 (Table of Symbols): Remove entries for %requires, %provides, and
6336 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
6337 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
6338 are replaced by b4_percent_code_provides and b4_percent_code_requires,
6339 which are skeleton-specific.
6340 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
6341 declare what %code qualifiers it supports and to complain if any other
6342 qualifiers were used in the grammar.
6343 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
6344 and b4_user_code([b4_percent_code_provides]) in place of
6345 b4_user_requires and b4_user_provides.
6346 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
6347 Add b4_user_code([b4_percent_code_top]) and
6348 b4_user_code([b4_percent_code]).
6349 Invoke b4_check_percent_code_qualifiers.
6350 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
6351 PERCENT_REQUIRES): Remove.
6352 (grammar_declaration): Remove RHS's for %code-top, %provides, and
6353 %requires. Rewrite the %code RHS as the unqualified form defining the
6354 muscle b4_percent_code. Add another RHS for the qualified %code form,
6355 which defines muscles of the form b4_percent_code_QUALIFIER and the
6356 b4_used_percent_code_qualifiers muscle.
6357 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
6358 PERCENT_REQUIRES): Remove.
6359 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
6360 %code "requires" and %code "provides".
6361 * tests/input.at (Reject bad %code qualifiers): New.
6362
6363 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
6364
6365 Use the new code_props interface for destructors and printers.
6366 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
6367 printer_location members, and change the type of the destructor and
6368 printer members to code_props.
6369 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
6370 symbol_printer_get, semantic_type_destructor_set,
6371 semantic_type_printer_set, default_tagged_destructor_set,
6372 default_tagless_destructor_set, default_tagged_printer_set,
6373 default_tagless_printer_set): Use code_props in arguments and return
6374 types in place of char const * and location.
6375 (symbol_destructor_location_get, symbol_printer_location_get): Remove
6376 since the locations are now contained in the return of
6377 symbol_destructor_get and symbol_printer_get.
6378 * src/output.c (symbol_destructors_output, symbol_printers_output):
6379 Replace with...
6380 (symbol_code_props_output): ... this to eliminate duplicate code.
6381 (output_skeleton): Update to use symbol_code_props_output.
6382 * src/reader.c (symbol_should_be_used): Update use of
6383 symbol_destructor_get.
6384 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
6385 Update uses of the various _destructor_set and _printer_set functions.
6386 * src/symtab.c: (default_tagged_destructor_location,
6387 default_tagless_destructor_location, default_tagged_printer_location,
6388 default_tagless_printer_location): Remove since we...
6389 (default_tagged_destructor, default_tagless_destructor,
6390 default_tagged_printer, default_tagless_printer): ... change the type
6391 of these to code_props.
6392 (symbol_new, semantic_type_new, symbol_destructor_set,
6393 semantic_type_destructor_set, symbol_destructor_get,
6394 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
6395 symbol_check_alias_consistency, default_tagged_destructor_set,
6396 default_tagless_destructor_set, default_tagged_printer_set,
6397 default_tagless_printer_set): Update.
6398 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
6399 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
6400 code_props members.
6401 (symbol_print): Use SYMBOL_CODE_PRINT.
6402
6403 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
6404
6405 Use the new code_props interface for rule actions.
6406 * src/symlist.h (symbol_list): Replace action, action_location, and
6407 used members with a code_props action_props member.
6408 * src/reader.c (symbol_should_be_used, grammar_rule_check,
6409 grammar_midrule_action, grammar_current_rule_merge_set,
6410 grammar_current_rule_symbol_append, packgram): Update.
6411 * src/scan-code.h (translate_rule_action): Remove, no longer used.
6412 * src/scan-code.l (handle_action_dollar): Update.
6413 (translate_rule_action): Remove, no longer used.
6414 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
6415
6416 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
6417
6418 Use the new code_props interface in parse-gram.y.
6419 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
6420 Update all uses of translate_* functions to use the new code_props
6421 interface and to use gram_scanner_last_string_free and
6422 code_scanner_last_string_free where possible.
6423 (grammar_declaration): symbol_list_destructor_set and
6424 symbol_list_printer_set now perform the translation, so don't do it
6425 here. Use gram_scanner_last_string_free where possible.
6426 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
6427 translate_code): Remove, no longer used.
6428 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
6429 symbol_list_printer_set): Perform code translation here rather than
6430 depending on the caller to do so.
6431
6432 * src/symlist.h (struct symbol_list): Correct some documentation typos.
6433 * src/scan-gram.h (gram_last_string): Remove declaration.
6434 * src/scan-gram.l (last_string): Declare it static.
6435
6436 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
6437
6438 Encapsulate code properties and related functionality for the various
6439 destructors, printers, and actions into a code_props structure and
6440 interface. This patch merely implements code_props in scan-code.h and
6441 scan-code.l. Future patches will rewrite other modules to use it.
6442 Discussed starting at
6443 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
6444 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
6445 consistently initialize const structs that have an empty location
6446 field.
6447 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
6448 to ensure consistency.
6449 * src/scan-code.h (code_props): New structure.
6450 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
6451 function, macro, and const global variable for initializing a
6452 code_props with no code.
6453 (code_props_plain_init, code_props_symbol_action_init,
6454 code_props_rule_action_init, code_props_translate_code): The rest of
6455 the new code_props functional interface. Among other things, the init
6456 functions set the code_props kind field so that
6457 code_props_translate_code will know whether to behave like
6458 translate_symbol_action, translate_rule_action, or translate_code.
6459 These old translate functions must remain until all other modules are
6460 updated to use the new code_props interface.
6461 (code_scanner_last_string_free): New function similar to
6462 gram_scanner_last_string_free.
6463 (code_scanner_free): Add documentation.
6464 * src/scan-code.l: Implement the new interface.
6465 (code_lex): Make it static, add a code_props* argument, and remove the
6466 rule argument.
6467 (last_string): New static global similar to the one in scan-gram.l.
6468 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
6469 instead of rule.
6470 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
6471 code_props since Bison may one day use this information for destructors
6472 and printers.
6473 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
6474 (handle_action_dollar): Use symbol_list_n_get and set used flag
6475 directly since symbol_list_n_used_set is removed.
6476 (translate_action): Add a code_props* argument and remove the rule,
6477 action, and location arguments. Pass the code_props* on to code_lex.
6478 (translate_rule_action, translate_symbol_action, translate_code):
6479 Rewrite as wrappers around the new code_props interface.
6480 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
6481 it would eventually need to break the encapsulation of code_props.
6482
6483 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
6484
6485 * etc/.cvsignore: New.
6486
6487 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
6488
6489 Add maintainer-push-check to run maintainer-check using push parsing in
6490 place of pull parsing where available.
6491 * Makefile.am (maintainer-push-check): New.
6492 * data/bison.m4 (b4_use_push_for_pull_if): New.
6493 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
6494 appropriately based on their existing values.
6495 (yypush_parse): Don't print push-parser-specific diagnostics if push
6496 parsing is being used in place of pull parsing.
6497 * data/yacc.c: If push parsing should replace pull parsing, redirect to
6498 push.c.
6499 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
6500 variable, and insert b4_use_push_for_pull_flag into muscles.
6501 * tests/Makefile.am (maintainer-push-check): New.
6502
6503 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
6504
6505 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
6506 (whether successful or failed) so that yypush_parse can be invoked
6507 again to start a new parse using the same yypstate.
6508 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
6509 check multiple yypull_parse invocations on the same yypstate. For pull
6510 mode, extend to check multiple yyparse invocations.
6511 (Exploding the Stack Size with Alloca): Extend to try with
6512 %push-pull-parser.
6513 (Exploding the Stack Size with Malloc): Likewise.
6514
6515 * tests/calc.at (Simple LALR Calculator): Don't specify
6516 %skeleton "push.c" since %push-pull-parser implies that now.
6517 * tests/headers.at (export YYLTYPE): Don't check for the push
6518 declarations. Otherwise, this test case can't be used to see if push
6519 mode can truly emulate pull mode.
6520 * tests/input.at (Torturing the Scanner): Likewise.
6521 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
6522 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
6523 AT_YACC_IF, which now includes the case of push mode since %skeleton
6524 need not be used for push mode. This will be more intuitive once
6525 push.c is renamed to yacc.c.
6526
6527 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
6528
6529 For push mode, convert yyparse from a macro to a function, invoke yylex
6530 instead of passing a yylexp argument to yypull_parse, and don't
6531 generate yypull_parse or yyparse unless %push-pull-parser is declared.
6532 Discussed starting at
6533 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
6534 * data/bison.m4 (b4_pull_if): New.
6535 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
6536 * data/push.c: Improve M4 quoting a little.
6537 (b4_generate_macro_args, b4_parenthesize): Remove.
6538 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
6539 any time a pull parser is requested.
6540 Don't #define this as a wrapper around yypull_parse. Instead, when
6541 both push and pull are requested, make it a function that does that
6542 same thing.
6543 (yypull_parse): If there's a b4_prefix, #define this to
6544 b4_prefix[pull_parse] when both push and pull are requested.
6545 Don't define this as a function unless both push and pull are
6546 requested.
6547 Remove the yylexp argument and hard-code yylex invocation instead.
6548 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
6549 %push-parser.
6550 * src/getargs.c (pull_parser): New global initialized to true.
6551 * getargs.h (pull_parser): extern it.
6552 * src/output.c (prepare): Insert pull_flag muscle.
6553 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
6554 (prologue_declaration): Set both push_parser and pull_parser = true for
6555 %push-pull-parser. Set push_parser = true and pull_parser = false for
6556 %push-parser.
6557 * src/scan-gram.l: Don't accept %push_parser as an alternative to
6558 %push-parser since there's no backward-compatibility concern here.
6559 Scan %push-pull-parser.
6560 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
6561 instead of %push-parser.
6562 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
6563 prototype it in the module that calls yyparse.
6564 * tests/input.at (Torturing the Scanner): Likewise.
6565 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
6566
6567 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
6568
6569 Update etc/bench.pl. Optimize push mode a little (the yyn change
6570 deserves most of the credit).
6571 * Makefile.am (SUBDIRS): Add etc subdirectory.
6572 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
6573 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
6574 yytoken, yyval, and yyloc declarations to...
6575 (yyparse or yypush_parse): ... here to improve performance. For
6576 yypush_parse invocations after the first, be sure to assign yyn its old
6577 value again.
6578 (yypstate_new): Don't bother initializing the yyresult field since the
6579 initial value isn't used.
6580 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
6581 remove the #define that, in push mode, set it to yyps->NAME.
6582 * etc/Makefile.am: New.
6583 * etc/bench.pl: Remove and build it instead from...
6584 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
6585 "tests/bison" from the build directory by default rather than just
6586 invoking "bison" from $PATH.
6587 (calc_grammar): Update push parser code: don't declare yylval globally,
6588 don't define yyparse_wrapper, and don't #define yyparse.
6589 (bench_grammar): Update to check all working combinations of yacc.c,
6590 push.c, impure, pure, pull, and push.
6591
6592 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
6593
6594 For push mode, add pull wrappers around yypush_parse.
6595 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
6596 (yypull_parse): New function wrapping yypush_parse.
6597 (yyparse): New #define wrapping yypull_parse.
6598 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
6599 is declared.
6600 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
6601 prototype yylex in the module that calls yyparse, and don't prototype
6602 yyparse there. Otherwise, the yyparse expansion won't compile.
6603 * tests/input.at (Torturing the Scanner): Likewise.
6604
6605 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
6606
6607 Enable push parsers to operate in impure mode. Thus, %push-parser no
6608 longer implies %pure-parser. The point of this change is to move
6609 towards being able to test the push parser code by running the entire
6610 test suite as if %push-parser had been declared.
6611 * data/push.c (yypush_parse): For impure mode, remove the
6612 yypushed_char, yypushed_val, and yypushed_loc arguments.
6613 Instead, declare these as local variables initialized to the global
6614 yychar, yylval, and yylloc.
6615 For the first yypush_parse invocation only, restore the initial values
6616 of these global variables when it's time to read a token since they
6617 have been overwritten.
6618 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
6619 %push-parser.
6620 * tests/calc.at (Simple LALR(1) Calculator): Always declare
6621 %pure-parser along with %push-parser since this test case was designed
6622 for pure push parsers.
6623 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
6624 (AT_YACC_OR_PUSH_IF): New.
6625 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
6626 add a note that it's still wrong for some cases (as it has been for a
6627 while).
6628 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
6629 %push-parser no longer implies %pure-parser.
6630
6631 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
6632
6633 Remove some unnecessary differences between the pull parser code and
6634 the push parser code. This patch enables yynerrs in push mode.
6635 * data/push.c: Reformat M4 a little.
6636 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
6637 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
6638 because push mode is on. Instead, if pure mode is on, move yynerrs
6639 to...
6640 (b4_declare_parser_state_variables): ... here.
6641 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
6642 to yyps->NAME so it can be used in yypush_parse.
6643 (yypush_parse): Don't omit uses of yynerrs in push mode.
6644
6645 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
6646
6647 Fix bug such that the first pushed token's value and location are
6648 sometimes overwritten (sometimes by %initial-action) before being used.
6649 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
6650 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
6651 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
6652 more closely mimic the pull parser logic.
6653 Don't copy the pushed token to yychar, yylval, and yylloc until it's
6654 time to read a token, which is after any initialization of yylval and
6655 yylloc.
6656 (gottoken): Rename label to...
6657 (yyread_pushed_token): ... for clarity and to avoid infringing on the
6658 user namespace.
6659
6660 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
6661
6662 Rearrange initialization of the parser state variables so that the
6663 skeleton doesn't have to have a copy for pull mode and another for push
6664 mode. This patch also fixes at least a bug such that yylloc was not
6665 initialized (with b4_location_initial_line and
6666 b4_location_initial_column) upon calling yypush_parse. However, that
6667 initialization now overwrites the first token's location;
6668 %initial-action assigning @$ already did the same thing, and both bugs
6669 will be fixed in a later patch.
6670 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
6671 (b4_declare_parser_state_variables): Remove initialization of yytoken,
6672 yyss, yyvs, yyls, and yystacksize.
6673 (yypstate_new): Remove initialization of some yypstate fields: yystate,
6674 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
6675 yylsp.
6676 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
6677 yyps->NAME so it can be used in yypush_parse.
6678 (yyparse or yypush_parse): For yypush_parse, don't print the
6679 "Starting parse" diagnostic for invocations after the first.
6680 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
6681 yypush_parse, only do it for the first invocation.
6682 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
6683 initialization to occur in yypush_parse but only on the first
6684 invocation.
6685
6686 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
6687
6688 * data/push.c: Add CPP guards around push parser declarations in both
6689 the header and the code file.
6690 In the code file, move the push parser declarations to the same place
6691 they appear in the header file.
6692 Clean up the M4 some, especially the inconsistent underquoting in
6693 some b4_c_function_def and b4_c_function_decl uses.
6694
6695 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
6696
6697 Encapsulate the push parser state variables into an M4 macro so the
6698 push skeleton doesn't have to list them again for pull mode's yyparse.
6699 For push mode, remove yypush_parse's local equivalents of these
6700 variables to eliminate unnecessary copying between the two sets at
6701 run-time. This patch also fixes at least a bug related to multiple
6702 %initial-action invocations in push mode.
6703 * data/push.c (b4_declare_parser_variables): Rename to...
6704 (b4_declare_scanner_communication_variables): ... this for clarity and
6705 update both uses.
6706 (b4_declare_yyparse_variables): Remove and move its contents to the one
6707 spot where it was invoked.
6708 (b4_declare_parser_state_variables): New macro containing the parser
6709 state variables required by push mode.
6710 (struct yypstate): Replace all fields but yynew with
6711 b4_declare_parser_state_variables.
6712 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
6713 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
6714 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
6715 (yyparse or yypush_parse): For yyparse in pull mode, replace local
6716 parser state variable declarations with
6717 b4_declare_parser_state_variables.
6718 Don't initialize parser state variables when calling yypush_parse since
6719 yypstate_new already does that.
6720 Invoke the user's initial action only upon the first yypush_parse
6721 invocation.
6722 Remove all code that copies between the local parser state variables
6723 and the yypstate.
6724
6725 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
6726
6727 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
6728 prevent a name collision in a future patch where these names will
6729 sometimes be #define'd.
6730 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
6731 since it no longer has the same name as the existing argument.
6732 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
6733
6734 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
6735 and Joel E. Denny <jdenny@ces.clemson.edu>
6736
6737 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
6738 that the argument is case-insensitive, and there's no `=' here.
6739 For the %skeleton entry, mention that %language is better.
6740 (Bison Options): Likewise for --language and --skeleton. Move the
6741 --skeleton entry so that the `Tuning the parser' section is sorted
6742 alphabetically on long options.
6743 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
6744 %language directive in detail here; cross-reference the %language
6745 documentation instead.
6746 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
6747 `%require "2.3b"' so that the example is always up-to-date.
6748 (Table of Symbols): Add entries for %language and %skeleton.
6749 * examples/extexi (normalize): Instead of replacing every %require
6750 argument with the current Bison version, just substitute for
6751 `@value{VERSION}'. This guarantees that we're testing what actually
6752 appears in the documentation.
6753 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
6754 rather than `@VERSION@'.
6755
6756 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
6757
6758 * NEWS: Reword the %language news a bit, and put it earlier.
6759
6760 * src/getargs.c (skeleton_arg): Last arg is now location const *.
6761 Rewrite to simplify the logic.
6762 (language_argmatch): Likewise.
6763 (program_name): We now own this var.
6764 * src/getargs.h (struct bison_language): Use char[] rather than
6765 const char *.
6766
6767 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
6768 Java is supported.
6769 * src/complain.c (program_name): Remove decl; no longer needed.
6770 * src/main.c (program_name): Remove; now belongs to getargs.
6771
6772 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
6773
6774 * NEWS: Document %language.
6775
6776 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
6777
6778 * data/c-skel.m4, data/c++-skel.m4: New files.
6779 * data/glr.c: Complain on push parsers.
6780
6781 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
6782 over %skeleton.
6783 (Decl Summary): Document %language and %skeleton.
6784 (Command line): Document -L.
6785
6786 * examples/extexi: Rewrite %require directive.
6787 * examples/calc++/Makefile.am: Pass VERSION to extexi.
6788
6789 * src/files.c (compute_exts_from_gc): Look in language structure
6790 for .y extension.
6791 (compute_file_name_parts): Check whether .tab should be added.
6792 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
6793 (language, skeleton_arg, language_argmatch): New.
6794 (long_options): Add --language.
6795 (getargs): Use skeleton_arg, add -L/--language.
6796 * src/getargs.h: Include location.h.
6797 (struct bison_language, language, skeleton_arg, language_argmatch): New.
6798 * src/output.c (prepare): Pick default skeleton from struct language.
6799 Don't dispatch C skeletons here.
6800 * src/parse-gram.y (PERCENT_LANGUAGE): New.
6801 (prologue_declaration): Add "%language" rule, use skeleton_arg.
6802 * src/scan-gram.l ("%language"): New rule.
6803
6804 * tests/calc.at: Test %skeleton and %language.
6805 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
6806 (AT_GLR_IF): Look for %skeleton "glr.cc".
6807 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
6808 (AT_YACC_IF): Reject %language.
6809
6810 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
6811
6812 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
6813 since it wasn't used; only the typedef name 'semantic_type' is needed.
6814 Also, omit trailing white space.
6815
6816 * bootstrap: Sync from coreutils.
6817 (gnulib_extra_files): Add build-aux/announce.gen.
6818 (slurp): Adjust .gitignore files like .cvsignore files.
6819 * build-aux/announce-gen: Remove from CVS, since bootstrap
6820 now creates this.
6821
6822 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
6823
6824 Make %push-parser imply %pure-parser. This fixes several bugs; see
6825 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
6826 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
6827 pure_parser = true.
6828 * data/push.c: Don't bother testing b4_push_if when deciding whether
6829 to expand b4_declare_parser_variables globally.
6830 (yypush_parse): Likewise in here.
6831
6832 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
6833 (yy_reduce_print): Reformat M4 for readability.
6834
6835 2006-12-15 Bob Rossi <bob@brasko.net>
6836 and Joel Denny <jdenny@ces.clemson.edu>
6837
6838 * data/push.c (yypstate): Add typedef, and update all uses of
6839 struct yypstate to just yypstate.
6840 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
6841
6842 2006-12-14 Bob Rossi <bob@brasko.net>
6843
6844 * data/push.c (yypush_parse): Declare prototype regardless of
6845 %locations option.
6846
6847 2006-12-14 Bob Rossi <bob@brasko.net>
6848
6849 * data/push.c (yyparse): Remove the prototype and the #define when in
6850 push-parser mode.
6851
6852 2006-12-13 Bob Rossi <bob@brasko.net>
6853
6854 * data/push.c (yypstate_init): Rename to...
6855 (yypstate_new): ... this and use b4_c_function_def.
6856 (yypstate_delete): New.
6857 (yypush_parse): Change parameters yynval and yynlloc to be const.
6858 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
6859 yypstate_delete functions.
6860
6861 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
6862
6863 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
6864 strange test case titles. Reported by Bob Rossi.
6865
6866 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
6867
6868 * TODO: Add pointer to Sylvain Schmitz's work on static detection
6869 of potential ambiguities in GLR grammers.
6870
6871 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
6872
6873 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
6874 `bison ', use m4_index instead of m4_substr since chopping up a string
6875 containing M4-special characters causes problems here.
6876
6877 Fix a couple of bugs related to special characters in user-specified
6878 file names, and make it easier for skeletons to compute output file
6879 names with the same file name prefix as Bison-computed output file
6880 names.
6881 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
6882 b4_parser_file_name and b4_spec_defines_file instead of
6883 @output_parser_name@ and @output_header_name@, which are now redundant.
6884 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
6885 b4_parser_file_name, b4_spec_defines_file, and the new
6886 @basename(FILENAME@) instead of @output_parser_name@ and
6887 @output_header_name@, which inappropriately escaped the file names as
6888 C string literals.
6889 * src/files.c (all_but_ext): Remove static qualifier.
6890 (compute_output_file_names): Move `free (all_but_ext)' to...
6891 (output_file_names_free): ... here since all_but_ext is needed later.
6892 * src/files.h (all_but_ext): Extern.
6893 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
6894 exactly what MUSCLE_INSERT_STRING used to do.
6895 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
6896 characters are escaped properly.
6897 * src/output.c (prepare): Define muscle file_name_all_but_ext as
6898 all_but_ext.
6899 For pkgdatadir muscle, maintain previous functionality by using
6900 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
6901 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
6902 digraphs would never be expanded. Hopefully no one has M4-special
6903 characters in his Bison installation path.
6904 * src/scan-skel.l: Don't parse @output_header_name@ and
6905 @output_parser_name@ anymore since they're now redundant.
6906 In @output, use decode_at_digraphs.
6907 Parse a new @basename command that invokes last_component.
6908 (decode_at_digraphs): New.
6909 (BASE_QPUTS): Remove unused.
6910 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
6911 (Output file name): New tests.
6912
6913 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
6914
6915 Warn about output files that are generated by the skeletons and that
6916 conflict with other output files.
6917 * data/glr.c: Don't generate the header file here when glr.cc does.
6918 * src/files.c (file_names, file_names_count): New static globals.
6919 (compute_output_file_names): Invoke output_file_name_check for files
6920 not generated by the skeletons and remove existing checks.
6921 (output_file_name_check): New function that warns about conflicting
6922 output file names.
6923 (output_file_names_free): Free file_names.
6924 * src/files.h (output_file_name_check): Declare.
6925 * src/scan-skel.l: Invoke output_file_name_check for files generated by
6926 the skeletons.
6927 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
6928 (Conflicting output files): New tests.
6929
6930 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6931
6932 * doc/bison.texinfo: Fix a couple of typos.
6933
6934 2006-12-08 Bob Rossi <bob@brasko.net>
6935
6936 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
6937 Rename to...
6938 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
6939 update all uses.
6940 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
6941 (yypush_parse): Rename yypvars argument to yyps and remove redundant
6942 local pv.
6943 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
6944 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
6945
6946 2006-12-07 Bob Rossi <bob@brasko.net>
6947 and Joel Denny <jdenny@ces.clemson.edu>
6948
6949 * data/push.c (yypvarsinit): Change return type from void* to struct
6950 yypvars*. No longer cast to void* on return.
6951 (struct yypvars): Remove yylen since it need not be remembered between
6952 yypushparse invocations.
6953 (yypushparse): Don't copy between yylen and pv->yylen.
6954
6955 2006-12-05 Bob Rossi <bob@brasko.net>
6956
6957 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
6958 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
6959 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
6960 (struct yypvars): Remove b4_declare_parser_variables.
6961 (yypvarsinit): Remove init code for removed variables.
6962 (global scope): Do not declare b4_declare_parser_variables if
6963 push or pure mode.
6964 (yypushparse): Add b4_declare_parser_variables.
6965 Init new local variables, and remove init code for removed
6966 yypvars variables.
6967 (yyparse): Delete.
6968 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
6969 and yyparse for other modes.
6970 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
6971 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
6972 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
6973 (AT_PURE_LEX_IF): True if pure or push parser.
6974
6975 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
6976
6977 Document Yacc prologue alternatives and default %destructor's and
6978 %printer's as experimental. Don't mention Java yet. Discussed at
6979 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
6980 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
6981 (2.3a): Annotate this entry to say the old forms of these features were
6982 also experimental.
6983 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
6984 Table of Symbols): Say they're experimental. Comment out any mention
6985 of Java (we'll want this back eventually).
6986
6987 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
6988
6989 Support a file name argument to %defines. Deprecate `=' in
6990 %file-prefix, %name-prefix, and %output. Discussed at
6991 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
6992 * NEWS (2.3a+): Mention.
6993 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
6994 form of %defines, and remove `=' from entries for %file-prefix,
6995 %name-prefix, and %output.
6996 * src/parse-gram.y (prologue_declaration): Implement.
6997 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
6998 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
6999 all but one occurrence of %name-prefix.
7000 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
7001 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
7002 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
7003 occurrence of each of %file-prefix and %output. Add check for %defines
7004 with argument.
7005 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
7006 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
7007 Remove the `=' from %output.
7008
7009 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
7010
7011 Don't escape $ in test case titles since Autoconf 2.61 now does that
7012 correctly.
7013 * tests/actions.at (Default %printer and %destructor are not for error
7014 or $undefined): Here.
7015 (Default %printer and %destructor are not for $accept): Here.
7016 * tests/input.at (Invalid $n and @n): Here.
7017
7018 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
7019
7020 Rename <!> to <>. Discussed starting at
7021 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
7022 * NEWS (2.3a+): Update.
7023 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
7024 Update.
7025 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
7026 * src/scan-gram.l (INITIAL): Implement.
7027 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
7028 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
7029 comment.
7030 * tests/actions.at (Default tagless %printer and %destructor,
7031 Default tagged and per-type %printer and %destructor,
7032 Default %printer and %destructor are not for error or $undefined,
7033 Default %printer and %destructor are not for $accept,
7034 Default %printer and %destructor for mid-rule values): Update.
7035 * tests/input.at (Default %printer and %destructor redeclared,
7036 Unused values with default %destructor): Update.
7037
7038 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
7039
7040 Don't let %prec take a nonterminal.
7041 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
7042 token.
7043 * tests/input.at (%prec takes a token): New test checking that %prec
7044 won't take a nonterminal.
7045
7046 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
7047
7048 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
7049 it was double-quoted.
7050 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
7051 grammar is maintained with Bison's highest standards.
7052 * src/getargs.c: Fix some typos in Doxygen comments.
7053
7054 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
7055
7056 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
7057 later. Reported by Paul Eggert in
7058 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
7059 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
7060 * src/scan-code.l (translate_action): Don't bother invoking
7061 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
7062 (code_scanner_free): Instead of invoking
7063 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
7064 which frees more.
7065 * src/scan-gram.l (gram_scanner_free): Likewise.
7066 * src/scan-skel.l (scan_skel): Likewise.
7067
7068 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
7069
7070 * src/files.c (tr): Change return type to void.
7071 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
7072 has been called previously for the same key.
7073 (muscle_find): Return storage instead of value so that
7074 --enable-gcc-warnings doesn't produce warnings that the return discards
7075 const. aver that the value and storage are the same since storage
7076 could potentially be NULL when value is not.
7077 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
7078 same as 0.
7079
7080 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
7081
7082 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
7083 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
7084 us a slightly cleaner distribution, and also works.
7085 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
7086 gnulib changes.
7087
7088 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
7089 and Paul Eggert <eggert@cs.ucla.edu>
7090
7091 Don't let Bison leak memory except when it complains.
7092 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
7093 (spec_defines_file, dir_prefix): Now char *, not const char *,
7094 since they are freed.
7095 * src/files.c: Likewise.
7096 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
7097 Likewise.
7098 (tr): Now operates in-place. All uses changed.
7099 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
7100 values.
7101 (compute_file_name_parts, compute_output_file_names): Don't store
7102 read-only data in variables that will be freed.
7103 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
7104 src_extension, and header_extension.
7105 (output_file_names_free): New public function to free
7106 spec_verbose_file, spec_graph_file, spec_defines_file,
7107 parser_file_name, and dir_prefix.
7108 * src/getargs.c (getargs): Don't store read-only data in variables that
7109 will be freed.
7110 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
7111 (which previously existed but was unused), and quotearg_free.
7112 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
7113 * src/muscle_tab.c: Likewise.
7114 (muscle_entry): Make the value char const *,
7115 and add a new storage member that is char * and can be freed.
7116 (muscle_entry_free): New private function.
7117 (muscle_init): Use it instead of free.
7118 (muscle_insert, muscle_grow): Update and use new storage member.
7119 (muscle_code_grow): Free the string passed to muscle_grow
7120 since it's not needed anymore.
7121 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
7122 add a new `char *code' member.
7123 ("{...}"): Declare semantic type as code.
7124 * src/scan-code.h (translate_rule_action):
7125 (translate_symbol_action, translate_code, translate_action): Return
7126 `char const *' rather than `char *' since external code should not free
7127 these strings.
7128 * src/scan-code.l: Likewise.
7129 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
7130 which is "{...}" in the parser.
7131 * tests/Makefile.am (maintainer-check-valgrind): Set
7132 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
7133 Valgrind.
7134 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
7135 complain.
7136 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
7137 expecting a non-zero exit status sets --leak-check=summary and
7138 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
7139 this case, and we don't want to hear about it.
7140
7141 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
7142
7143 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
7144 instead of from the template, to simplify configuration a bit.
7145 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
7146 and m4/wint_t.m4, as they are needed with the latest gnulib.
7147
7148 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
7149
7150 Disable unset/unused mid-rule value warnings by default, and recognize
7151 --warnings=midrule-values to enable them. Discussed starting at
7152 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
7153 * NEWS (2.3a+): Mention.
7154 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
7155 warnings): Add entry for midrule-values subargument.
7156 * src/reader.c (symbol_should_be_used): Don't return true just because
7157 the value is a set/used mid-rule value unless
7158 --warnings=midrule-values was specified.
7159 * tests/input.at (Unused values, Unused values before symbol
7160 declarations): Run tests with and without --warnings=midrule-values.
7161
7162 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
7163 than LIST_FREE directly.
7164
7165 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
7166
7167 Finish implementing --warnings=error, which should not be implied by
7168 --warnings=all (or by its synonyms -W and --warnings without
7169 subarguments).
7170 * src/complain.c (set_warning_issued): New function to report that
7171 warnings are being treated as errors and to record an error if so.
7172 Invoke...
7173 (warn_at, warn): ... here.
7174 * src/getargs.c (warnings_args, warnings_types): Reorder so that
7175 "error - warnings are errors" does not appear above "all - all of the
7176 above".
7177 (getargs): For -W and --warnings without subarguments, don't let
7178 FLAGS_ARGMATCH set warnings_error in warnings_flag.
7179 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
7180
7181 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
7182
7183 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
7184 empty subargument list. For example: `bison --warnings= parser.y'.
7185
7186 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
7187
7188 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
7189 the parser header file so that gcc doesn't warn.
7190
7191 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
7192
7193 Split the default %destructor/%printer into two kinds: <*> and <!>.
7194 Discussed starting at
7195 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
7196 * NEWS (2.3a+): Mention.
7197 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
7198 previous change today related to mid-rules.
7199 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
7200 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
7201 (TYPE_TAG_ANY): Add as <*>.
7202 (TYPE_TAG_NONE): Add as <!>.
7203 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
7204 for <*> and <!>.
7205 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
7206 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
7207 * src/symlist.c (symbol_list_default_new): Split into tagged and
7208 tagless versions.
7209 (symbol_list_destructor_set, symbol_list_printer_set): Split
7210 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
7211 SYMLIST_DEFAULT_TAGLESS.
7212 * src/symlist.h: Update symbol_list_default*_new prototypes.
7213 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
7214 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
7215 * src/symtab.c (default_destructor, default_destructor_location,
7216 default_printer, default_printer_location): Split each into tagged and
7217 tagless versions.
7218 (symbol_destructor_get, symbol_destructor_location_get,
7219 symbol_printer_get, symbol_printer_location_get): Implement tagged
7220 default and tagless default cases.
7221 (default_destructor_set, default_printer_set): Split each into tagged
7222 and tagless versions.
7223 * src/symtab.h: Update prototypes.
7224 * tests/actions.at (Default %printer and %destructor): Rename to...
7225 (Default tagless %printer and %destructor): ... this, and extend.
7226 (Per-type %printer and %destructor): Rename to...
7227 (Default tagged and per-type %printer and %destructor): ... this, and
7228 extend.
7229 (Default %printer and %destructor for user-defined end token): Extend.
7230 (Default %printer and %destructor are not for error or $undefined):
7231 Update.
7232 (Default %printer and %destructor are not for $accept): Update.
7233 (Default %printer and %destructor for mid-rule values): Extend.
7234 * tests/input.at (Default %printer and %destructor redeclared): Extend.
7235 (Unused values with default %destructor): Extend.
7236
7237 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
7238
7239 Don't apply the default %destructor/%printer to an unreferenced midrule
7240 value. Mentioned at
7241 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
7242 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
7243 like $@n instead of just @n so that the default %destructor/%printer
7244 logic doesn't see them as user-defined symbols.
7245 (symbol_is_dummy): Check for both forms of the name.
7246 * src/reader.c (packgram): Remove the `$' from each midrule symbol
7247 name for which the midrule value is referenced in any action.
7248 * tests/actions.at (Default %printer and %destructor for mid-rule
7249 values): New test.
7250 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
7251 for change to dummy symbol names.
7252
7253 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
7254
7255 Warn about unset midrule $$ if the corresponding $n is used.
7256 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
7257 $n usage.
7258 (packgram): Before invoking grammar_rule_check on any rule, make sure
7259 all actions have already been scanned in order to set `used' flags.
7260 Otherwise, checking that a midrule's $$ is set will not always work
7261 properly because the midrule check must forward-reference the midrule's
7262 parent rule.
7263 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
7264 warning.
7265
7266 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
7267
7268 More improvements to the documentation of the prologue alternatives:
7269 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
7270 Bison manual.
7271 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
7272 some text to clarify the relative importance of the new directives and
7273 to show how these directives may be viewed as code labels.
7274
7275 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
7276
7277 Similar to the recently removed %before-header, add %code-top as the
7278 alternative to the pre-prologue. Mentioned at
7279 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
7280 Also, let the prologue alternatives appear in the grammar section.
7281 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
7282 (prologue_declaration): Move the existing prologue alternatives to...
7283 (grammar_declaration): ... here and add %code-top.
7284 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
7285
7286 Clean up and extend documentation for the prologue alternatives.
7287 * NEWS (2.3a+): Describe prologue alternatives.
7288 * doc/bison.texinfo (Prologue): Move discussion of prologue
7289 alternatives to...
7290 (Prologue Alternatives): ... this new section, and extend it to discuss
7291 all 4 directives in detail.
7292 (Table of Symbols): Clean up discussion of prologue alternatives and
7293 add %code-top.
7294
7295 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7296
7297 DJGPP specific issues.
7298
7299 * djgpp/config.bat: config.hin has been moved to lib. Adjust
7300 config.bat accordingly.
7301 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
7302 * djgpp/config.site: Likewise.
7303
7304 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
7305
7306 Replace %*-header with %provides, %requires, %code. See discussion at
7307 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
7308
7309 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
7310 (b4_user_start_header): Remove.
7311 * data/glr.c: Use new macros instead of b4_*start_header
7312 and b4_*end_header.
7313 * data/glr.cc: Likewise.
7314 * data/lalr1.cc: Likewise.
7315 * data/push.c: Likewise.
7316 * data/yacc.c: Likewise.
7317
7318 * doc/bison.texinfo: Remove %before-header, rename
7319 %{start,end,after}-header to %requires, %provides, %code.
7320
7321 * src/parse-gram.y: Likewise (also rename token names accordingly).
7322 * src/scan-gram.l: Likewise.
7323 * tests/actions.at: Likewise.
7324
7325 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
7326
7327 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
7328 Problem reported by Joel E. Denny.
7329
7330 2006-10-14 Jim Meyering <jim@meyering.net>
7331
7332 (Sync from coreutils.)
7333 Work also when the working directory (with e.g. coreutils sources)
7334 is version controlled with git, rather than CVS.
7335 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
7336 rather than CVS.
7337 In messages and comments, say e.g., "checked-out sources",
7338 rather than "CVS sources".
7339 (version_controlled_file): New function. Work for git as well as
7340 for CVS. Don't use grep's -q option.
7341 (slurp): Call it here, in place of CVS-specific code.
7342
7343 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
7344
7345 Fix testsuite for ./configure --enable-gcc-warnings:
7346 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
7347 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
7348 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
7349 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
7350 * test/regression.at (Diagnostic that expects two alternatives):
7351 Likewise.
7352
7353 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
7354
7355 * bootstrap.conf (gnulib_modules): Add config-h.
7356 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
7357 worry about HAVE_CONFIG_H.
7358 * lib/abitset.c: Likewise.
7359 * lib/bitset.c: Likewise.
7360 * lib/bitset_stats.c: Likewise.
7361 * lib/bitsetv-print.c: Likewise.
7362 * lib/bitsetv.c: Likewise.
7363 * lib/ebitset.c: Likewise.
7364 * lib/get-errno.c: Likewise.
7365 * lib/lbitset.c: Likewise.
7366 * lib/subpipe.c: Likewise.
7367 * lib/timevar.c: Likewise.
7368 * lib/vbitset.c: Likewise.
7369 * lib/bitset.c: Include "bitset.h" first, to test interface.
7370 * lib/bitset_stats.c: Include "bitset_stats.h" first.
7371 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
7372 * lib/bitsetv.c: Include "bitsetv.h" first.
7373 * lib/get-errno.c: Include "get-errno.h" first.
7374 * m4/.cvsignore: Add config-h.m4.
7375 * tests/actions.at (Default %printer and %destructor for ...):
7376 Adjust expected line numbers in output to reflect removal of #if
7377 HAVE_CONFIG_H lines.
7378 * tests/glr-regression.at (Missed %merge type warnings when ...):
7379 Likewise.
7380 * tests/regression.at (Braced code in declaration in rules section):
7381 Likewise.
7382 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
7383 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
7384 Include <config.h> unconditionally.
7385
7386 * bootstrap: Sync from coreutils, as follows:
7387
7388 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
7389
7390 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
7391 variable was sometimes used without being initialized. This
7392 messed up the installation of the INSTALL file in some cases.
7393
7394 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
7395
7396 * bootstrap (usage, main program, symlink_to_gnulib): Add option
7397 --copy. Inspired by a suggestion from Bruno Haible.
7398
7399 2006-10-03 Jim Meyering <jim@meyering.net>
7400
7401 * bootstrap: Undo last change to this file, since now gnulib-tool
7402 sticks with the automake default in generating dependencies.
7403
7404 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
7405
7406 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
7407 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
7408
7409 * doc/bison.1: Add copyright notice.
7410
7411 * data/glr.c: Don't include <stdarg.h>; not used.
7412
7413 * NEWS: The -g and --graph options now output graphs in Graphviz
7414 DOT format, not VCG format.
7415 * doc/bison.1: Likewise.
7416 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
7417 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
7418 of this change in
7419 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
7420 * TODO: Remove Graphviz entry.
7421 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
7422 remove vcg.c, vcg.h, vcg_defaults.h.
7423 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
7424 * src/graphviz.c, src/graphviz.h: New files.
7425 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
7426 * src/files.h: Make comment more generic.
7427 * src/main.c (main): Likewise.
7428 * src/print_graph.h: Likewise.
7429 * src/getargs.c (usage): Make usage description more generic.
7430 * src/print_graph.c: Include graphviz.h rather than vcg.h.
7431 (static_graph, fgraph): Remove. All uses changed to pass
7432 arguments instead of sharing a static var.
7433 (print_core, print_actions, print_state, print_graph):
7434 Output graphviz format rather than VCG format.
7435 * tests/.cvsignore: Remove *.vcg; add *.dot.
7436 * tests/output.at: Expect *.dot files, not *.vcg files.
7437
7438 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
7439 accommodates the 2006-10-08 change.
7440
7441 2006-10-11 Bob Rossi <bob@brasko.net>
7442
7443 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
7444 (b4_yyssa, b4_yyerror_range): New macros.
7445 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
7446 (yypvarsinit): Remove init of removed fields.
7447 (yypushparse): Remove use of removed fields; use new macros instead.
7448
7449 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
7450
7451 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
7452 in a push parser. Reindent slightly to match yacc.c better.
7453
7454 2006-10-11 Bob Rossi <bob@brasko.net>
7455
7456 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
7457 yymsg_alloc fields.
7458 (yypvarsinit, yypushparse): Remove init of removed fields.
7459 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
7460
7461 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
7462
7463 * THANKS: Add Paolo Bonzini and Bob Rossi.
7464
7465 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
7466
7467 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
7468 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
7469 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
7470 b4_define_user_cde and uses): Remove.
7471 (b4_comment, b4_prefix, b4_sync_start): New.
7472 * data/bison.m4: New file, with most of the content removed from c.m4.
7473 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
7474 * src/output.c (output_skeleton): Pass bison.m4.
7475 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
7476 only if specified.
7477
7478 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
7479
7480 Fix test failure reported by Tom Lane in
7481 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
7482 and try to make such failures easier to catch in the future.
7483 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
7484 that's now the caller's responsibility.
7485 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
7486 Set yychar = YYEOF if it's negative.
7487 * tests/actions.at (yylex): Abort if asked to read past EOF.
7488 * tests/conflicts.at (yylex): Likewise.
7489 * tests/cxx-type.at (yylex): Likewise.
7490 * tests/glr-regression.at (yylex): Likewise.
7491 * tests/input.at (yylex): Likewise.
7492 * tests/regression.at (yylex): Likewise.
7493 * tests/torture.at (yylex): Likewise.
7494
7495 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
7496
7497 Fix problems with translating English-language diagnostics.
7498 * bootstrap: Fix bug introduced in recent bootstrap changes, with
7499 respect to bison-runtime pot generation. The YY_ stuff
7500 wasn't being captured.
7501 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
7502 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
7503 * runtime-po/POTFILES.in: Add data/push.c.
7504
7505 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
7506
7507 Merge bootstrap changes from coreutils.
7508
7509 2006-09-28 Jim Meyering <jim@meyering.net>
7510
7511 Automatically generated dependencies are important even
7512 when all of the sources in a directory come from gnulib.
7513 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
7514 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
7515
7516 2006-09-23 Jim Meyering <jim@meyering.net>
7517
7518 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
7519
7520 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
7521
7522 * bootstrap: Add support for --force.
7523 (usage): New function. Describe usage less tersely.
7524 (CVS_only_file): New var.
7525
7526 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
7527
7528 * data/push.c (YYPUSH_MORE): Make it an enum instead.
7529 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
7530 Adjust white space and comments to match GNU style better.
7531
7532 2006-09-20 Bob Rossi <bob@brasko.net>
7533
7534 * data/push.c (yyresult_get): Remove function.
7535 (YYPUSH_MORE): Add #define.
7536 (yypushparse): Modify return value.
7537
7538 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
7539
7540 * stamp-h.in: Remove; no longer needed.
7541 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
7542 Remove config.h, config.hin, intl (no longer created).
7543 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
7544 stamp-h1.
7545
7546 Sync bootstrap from coreutils, as follows:
7547
7548 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
7549
7550 * bootstrap (symlink_to_gnulib): New function.
7551 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
7552 to copies-of-gnulib.
7553 (cp_mark_as_generated, slurp, gnulib_files):
7554 Avoid making a copy if it's the same as the old version.
7555 (gnulib_files): Add support for this variable (used by Bison).
7556
7557 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
7558
7559 * src/getargs.c (usage): Rework to use conventions similar to
7560 coreutils, to make translation a bit easier and the code a bit
7561 smaller. Problem reported by Tim Van Holder.
7562
7563 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
7564
7565 Use some of gnulib's new modules, taken from coreutils.
7566
7567 * bootstrap: Sync from coreutils, except add support for gnulib_files.
7568 * bootstrap.conf: New file.
7569 (gnulib_modules): Add configmake, inttypes, unistd.
7570 (XGETTEXT_OPTIONS): Add complain, complain_at,
7571 fatal, fatal_at, warn, warn_at, unexpected_end.
7572 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
7573 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
7574 (gl_EARLY): Add.
7575 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
7576 (gl_INIT): Add
7577 (GNULIB_AUTOCONF_SNIPPET): Remove.
7578 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
7579 the pickiest.
7580 * lib/.cvsignore: Add inttypes_.h.
7581 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
7582 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
7583 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
7584 no-longer-necessary initializations.
7585 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
7586 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
7587 use the unistd module.
7588 * src/system.h: Likewise.
7589 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
7590 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
7591 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
7592 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
7593 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
7594 * src/system.h: Include inttypes.h unconditionally, now that we
7595 use the inttypes module. Don't bother to include stdint.h, since
7596 inttypes.h now does that for us.
7597 (LOCALEDIR): Remove, now that we use the configmake module.
7598 * src/getargs.c: Include configmake.h.
7599 * src/main.c: Likewise.
7600 * src/output.c: Likewise.
7601 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
7602 not from $abs_top_builddir, since config.h moved.
7603
7604
7605 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
7606 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
7607
7608 * src/parse-gram.y (symbol_declaration): Don't put statements
7609 before declarations; it's not portable to C89.
7610 * src/scan-code.l (handle_action_at): Likewise.
7611
7612 * src/scan-code.l: Always initialize braces_level; the old code
7613 left it uninitialized and therefore had undefined behavior.
7614
7615 Don't attempt to redefine 'assert', since it runs afoul of
7616 systems where standard headers (mistakenly) include <assert.h>.
7617 Instead, define and use our own alternative, called 'aver'.
7618 * src/reader.c: Don't include assert.h, since we no longer
7619 use assert.
7620 * src/scan-code.l: Likewise.
7621 * src/system.h (assert): Remove, replacing with....
7622 (aver): New function, taking a bool arg. All uses changed.
7623 * src/tables.c (pack_vector): Ensure that aver arg is bool,
7624 not merely an integer.
7625
7626 2006-09-15 Bob Rossi <bob@brasko.net>
7627
7628 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
7629 * data/c.m4 (YYPUSH): New.
7630 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
7631 * src/getargs.c (push_parser): New var.
7632 * src/getargs.h (push_parser): New declaration.
7633 * src/output.c (prepare): Add macro insertion of `push_flag'.
7634 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
7635 (prologue_declaration): Parse %push-parser.
7636 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
7637 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
7638 list of removed lines from the traces observed.
7639 (AT_CHECK_CALC_LALR): Added push parser tests.
7640
7641 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
7642
7643 * NEWS: Version 2.3a.
7644 * configure.ac (AC_INIT): Likewise.
7645
7646 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
7647 "#define YYSTYPE int" that caused "make maintainer-check" to fail
7648 due to header ordering dependencies. I don't know why the #define
7649 was there.
7650
7651 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
7652 runtime cost when YYDEBUG is not defined, and so that some tests
7653 that used to fail now work. Problem and initial suggestion by
7654 Paolo Bonzini.
7655 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
7656 * data/glr.cc (b4_parser_class_name):
7657 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
7658 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
7659 (yydebug_) [YYDEBUG]: New member.
7660 (yycdebug_): Now defined only if YYDEBUG.
7661 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
7662 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
7663 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
7664 if YYYDEBUG.
7665 (debug_stream, set_debug_stream, debug_level, set_debug_level):
7666 Define only if YYDEBUG.
7667 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
7668 set_debug_level.
7669 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
7670 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
7671 AT_CHECK_CALC_GLR_CC that are working now.
7672
7673 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
7674
7675 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
7676 We don't need them in glr.cc, and glr.c defines them.
7677 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
7678 assumes that defining it to anything is the same as defining
7679 it to 1. Problem reported by Paolo Bonzini.
7680
7681 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
7682
7683 * data/c.m4 (b4_null, b4_case): Define.
7684 * src/output.c (prepare_symbols): Use b4_null.
7685 (user_actions_output): Use b4_case.
7686
7687 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
7688
7689 * data/glr.c (b4_shared_declarations): Put start-header first,
7690 before any #includes that we generate, so that feature-test
7691 macros work. Problem reported by Michael Deutschmann in
7692 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
7693 * data/lalr1.cc: Likewise.
7694 * doc/bison.texinfo (Prologue): Document that feature-test macros
7695 should be defined before any Bison declarations.
7696 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
7697 that depend on location.hh after, not before, Bison decls, since
7698 we now include location.hh after the first user prologue.
7699
7700 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
7701 Sander Brandenburg in
7702 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
7703 Also, fix minor white space and comment issues.
7704 (Prologue): Mention that it's better to define feature-test macros
7705 before Bison declarations. Problem reported by Michael Deutschmann.
7706
7707 * README-cvs: Fix typo: "&" should be "&&". Problem reported
7708 by Jim Meyering.
7709 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
7710 This adjusts to recent gnulib changes.
7711
7712 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
7713
7714 Finish implementation of per-type %destructor/%printer. Discussed
7715 starting at
7716 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
7717 and
7718 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
7719 * NEWS (2.3+): Add a description of this feature to the default
7720 %destructor/%printer description.
7721 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
7722 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
7723 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
7724 list node contains a semantic type.
7725 * src/symtab.c, src/symtab.h: Extend with a table that associates
7726 semantic types with their %destructor's and %printer's.
7727 (semantic_type_from_uniqstr, semantic_type_get,
7728 semantic_type_destructor_set, semantic_type_printer_set): New functions
7729 composing the public interface of that table.
7730 (symbol_destructor_get, symbol_destructor_location_get,
7731 symbol_printer_get, symbol_printer_location_get): If there's no
7732 per-symbol %destructor/%printer, look up the per-type before trying
7733 the default.
7734 * tests/actions.at (Per-type %printer and %destructor): New test case.
7735 * tests/input.at (Default %printer and %destructor redeclared):
7736 Extend to check that multiple occurrences of %symbol-default in a
7737 single %destructor/%printer declaration is an error.
7738 (Per-type %printer and %destructor redeclared, Unused values with
7739 per-type %destructor): New test cases.
7740
7741 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
7742
7743 Require default %destructor/%printer to be declared using
7744 %symbol-default instead of an empty symbol list, and start working on
7745 new per-type %destructor/%printer. Discussed at
7746 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
7747 * NEWS (2.3+): Add %symbol-default to example.
7748 * bison.texinfo (Freeing Discarded Symbols): Likewise.
7749 (Table of Symbols): Add entry for %symbol-default.
7750 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
7751 (generic_symlist, generic_symlist_item): New nonterminals for creating
7752 a list in which each item is a symbol, semantic type, or
7753 %symbol-default.
7754 (grammar_declaration): Use generic_symlist in %destructor and %printer
7755 declarations instead of symbols.1 or an empty list.
7756 (symbol_declaration, precedence_declaration, symbols.1): Update actions
7757 for changes to symbol_list.
7758 * src/reader.c: Update for changes to symbol_list.
7759 * src/scan-code.l: Likewise.
7760 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
7761 * src/symlist.c, src/symlist.h: Extend such that a list node may
7762 represent a semantic type or a %symbol-default in addition to just an
7763 ordinary symbol. Add switched functions for setting %destructor's and
7764 %printer's.
7765 * tests/actions.at, tests/input.at: Add %symbol-default to all default
7766 %destructor/%printer declarations.
7767
7768 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
7769
7770 Whether the default %destructor/%printer applies to a particular symbol
7771 isn't a question of whether the user *declares* that symbol (in %token,
7772 for example). It's a question of whether the user by any means
7773 *defines* the symbol at all (by simply using a char token, for
7774 example). $end is defined by Bison whereas any other token with token
7775 number 0 is defined by the user. The error token is always defined by
7776 Bison regardless of whether the user declares it with %token, but we
7777 may one day let the user define error as a nonterminal instead.
7778 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
7779 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
7780 the meaning of "user-defined".
7781 * tests/actions.at (Default %printer and %destructor for user-declared
7782 end token): Rename to...
7783 (Default %printer and %destructor for user-defined end token): ...
7784 this.
7785
7786 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
7787 computation of whether to apply the default, don't maintain a list of
7788 every Bison-defined symbol. Instead, just check for a first character
7789 of '$', which a user symbol cannot have, and check for the error token.
7790
7791 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
7792
7793 Don't apply the default %destructor or %printer to the error token,
7794 $undefined, or $accept. This change fits the general rule that the
7795 default %destructor and %printer are only for user-declared symbols,
7796 and it solves several difficulties that are described in the new test
7797 cases listed below.
7798 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
7799 * tests/actions.at (Default %printer and %destructor are not for error
7800 or $undefined, Default %printer and %destructor are not for $accept):
7801 New test cases.
7802
7803 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
7804
7805 Allow %start after the first rule.
7806 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
7807 when parsing the first rule.
7808 (check_and_convert_grammar): Search for it here after all grammar
7809 declarations have been parsed. Skip midrules, which have dummy LHS
7810 nonterminals.
7811 * src/symtab.c (symbol_is_dummy): New function.
7812 * src/symtab.h (symbol_is_dummy): Declare it.
7813 * tests/input.at (%start after first rule): New test.
7814
7815 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
7816
7817 Redo some of the previous commit: add back the ability to use
7818 non-aliased/undeclared string literals since it might be useful to
7819 those declaring %token-table.
7820 * src/reader.c (check_and_convert_grammar): Undo changes in previous
7821 commit: don't worry about complaints from symbols_pack.
7822 * src/symtab.c (symbol_new, symbol_class_set,
7823 symbol_check_alias_consistency): Undo changes in previous commit: count
7824 each string literal as a new symbol and token, assign it a symbol
7825 number, and don't complain about non-aliased string literals.
7826 (symbols_pack): Since symbol_make_alias still does not decrement symbol
7827 and token counts but does still set aliased tokens to the same number,
7828 symbol_pack_processor now leaves empty slots in the symbols array.
7829 Remove those slots.
7830 * tests/regression.at (Undeclared string literal): Remove test case
7831 added in previous commit since non-aliased string literals are allowed
7832 again.
7833 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
7834 remove unnecessary string literal declarations.
7835 * tests/sets.at (Firsts): Likewise.
7836
7837 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
7838
7839 Don't allow an undeclared string literal, but allow a string literal to
7840 be used before its declaration.
7841 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
7842 symbols_pack complained.
7843 * src/symtab.c (symbol_new): Don't count a string literal as a new
7844 symbol.
7845 (symbol_class_set): Don't count a string literal as a new token, and
7846 don't assign it a symbol number since symbol_make_alias does that.
7847 (symbol_make_alias): It's not necessary to decrement the symbol and
7848 token counts anymore. Don't assume that an alias declaration occurs
7849 before any uses of the identifier or string, and thus don't assert that
7850 one of them has the highest symbol number so far.
7851 (symbol_check_alias_consistency): Complain if there's a string literal
7852 that wasn't declared as an alias.
7853 (symbols_pack): Bail if symbol_check_alias_consistency failed since
7854 symbol_pack asserts that every token has been assigned a symbol number
7855 although undeclared string literals have not.
7856 * tests/regression.at (String alias declared after use, Undeclared
7857 string literal): New test cases.
7858 (Characters Escapes, Web2c Actions): Declare string literals as
7859 aliases.
7860 * tests/sets.at (Firsts): Likewise.
7861
7862 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
7863
7864 In the grammar scanner, STRING_FINISH unclosed constructs and return
7865 them to the parser in order to improve error messages.
7866 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
7867 SC_BRACED_CODE, SC_PROLOGUE): Implement.
7868 * tests/input.at (Unclosed constructs): New test case.
7869 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
7870 seen.
7871
7872 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
7873 unused global.
7874
7875 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
7876
7877 Handle string aliases for character tokens correctly.
7878 * src/symtab.c (symbol_user_token_number_set): If the token has an
7879 alias, check and set its alias's user token number instead of its own,
7880 which is set to indicate the alias. Previously, every occurrence of
7881 the character token in the grammar overwrote that alias indicator with
7882 the character code.
7883 * tests/input.at (String aliases for character tokens): New test.
7884
7885 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
7886
7887 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
7888
7889 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
7890
7891 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
7892 to prevent failures when building on older platforms.
7893 Check for autopoint failure.
7894 Set XGETTEXT_OPTIONS to values that check for C format strings,
7895 so that translators are warned about them (this also helps
7896 prevent core dumps).
7897
7898 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
7899 function, since it simplifies our code a bit.
7900
7901 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
7902 rather than -W, so we don't get bogus warnings about sign comparisons.
7903 Add -Wpointer-arith, since that warning is useful (it reports code
7904 that does not conform to C89 and that some compilers reject).
7905 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
7906 since it's no longer needed.
7907
7908 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
7909
7910 Clean up scanners a bit.
7911 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
7912 definitions so gcc won't warn when obstack_for_string is unused.
7913 * src/scan-code.l: config.h and system.h are already #include'd by
7914 scan-code-c.c, so get rid of them here.
7915 * src/scan-gram.l: Likewise.
7916 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
7917 definitions rather than duplicating the rest of it.
7918 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
7919
7920 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
7921
7922 Suppress signed/unsigned comparison warnings for yycheck.
7923 * data/c.m4 (b4_safest_int_type): New macro.
7924 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
7925 a signed int type, cast it to b4_safest_int_type first.
7926 * data/yacc.c: Likewise.
7927 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
7928 also overwritten.
7929
7930 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
7931
7932 * doc/bison.texinfo: Fix some typos.
7933
7934 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
7935
7936 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
7937 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
7938
7939 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
7940 the latest gnulib does this a different way.
7941 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
7942 translation was patched, so stop omitting it.
7943
7944 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
7945
7946 Enable declaration of default %printer/%destructor. Make the parser
7947 use these for all user-declared grammar symbols for which the user does
7948 not declare a specific %printer/%destructor. Thus, the parser uses it
7949 for token 0 if the user declares it but not if Bison generates it as
7950 $end. Discussed starting at
7951 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
7952 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
7953 and
7954 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
7955 * NEWS (2.3+): Mention.
7956 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
7957 declare a %destructor for a mid-rule's semantic value. It's just
7958 impossible to declare one specific to it.
7959 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
7960 code. Describe default %destructor form.
7961 * src/parse-gram.y (grammar_declaration): Parse default
7962 %printer/%destructor declarations.
7963 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
7964 and symbol_destructor_location_get rather than accessing the destructor
7965 and destructor_location members of struct symbol.
7966 (symbol_printers_output): Likewise but for %printer's.
7967 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
7968 again.
7969 * src/symtab.c (default_destructor, default_destructor_location,
7970 default_printer, default_printer_location): New static global
7971 variables to record the default %destructor and %printer.
7972 (symbol_destructor_get, symbol_destructor_location_get,
7973 symbol_printer_get, symbol_printer_location_get): New functions to
7974 compute the appropriate %destructor and %printer for a symbol.
7975 (default_destructor_set, default_printer_set): New functions to set the
7976 default %destructor and %printer.
7977 * src/symtab.h: Prototype all those new functions.
7978 * tests/actions.at (Default %printer and %destructor): New test to
7979 check that the right %printer and %destructor are called, that they're
7980 not called for $end, and that $$ and @$ work correctly.
7981 (Default %printer and %destructor for user-declared end token): New
7982 test to check that the default %printer and %destructor are called for
7983 a user-declared end token.
7984 * tests/input.at (Default %printer and %destructor redeclared, Unused
7985 values with default %destructor): New tests to check related grammar
7986 warnings and errors.
7987
7988 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
7989
7990 Clean up handling of %destructor for the end token (token 0).
7991 Discussed starting at
7992 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
7993 and
7994 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
7995
7996 Make the skeletons consistent in how they pop the end token and invoke
7997 its %destructor.
7998 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
7999 state, which has token number 0, since this would invoke the
8000 %destructor for the end token.
8001 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
8002 until after shifting the end token, or else it won't be popped.
8003 * data/yacc.c (yyparse): Likewise.
8004
8005 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
8006 it's the end token. Upon termination, destroy an unshifted lookahead
8007 even when it's the end token.
8008 * data/lalr1.cc (yy::parser::parse): Likewise.
8009 * data/yacc.c (yyparse): Likewise.
8010
8011 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
8012 value warnings for the end token when the user gives the end token a
8013 %destructor.
8014
8015 * tests/actions.at (Printers and Destructors): Test all the above.
8016
8017 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
8018
8019 Update to latest gnulib and gettext versions.
8020 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
8021 Add fopen-safer.
8022 (gnulib_files): Add m4/warning.m4. Don't worry about files
8023 overwritten by autopoint.
8024 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
8025 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
8026 rejects them.
8027 Don't use autoreconf; instead, invoke autopoint etc. by hand,
8028 so that we can remove the intl files at a better time.
8029 (intl_files_to_remove): Remove aclocal.m4, since it gets
8030 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
8031 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
8032 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
8033 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
8034 Remove datarootdir hack; no longer needed.
8035 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
8036 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
8037 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
8038 strdup.h.
8039 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
8040 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
8041
8042 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
8043
8044 * bootstrap: Adjust to today's change to gnulib-tool by invoking
8045 it with --assume-autoconf='latest-stable'.
8046
8047 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
8048
8049 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
8050 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
8051 YYSTYPE' and `{'.
8052 * src/muscle_tab.h (muscle_grow): Replace the header comments with
8053 those from muscle_tab.c since the old ones are misleading.
8054
8055 2006-07-13 Akim Demaille <akim@epita.fr>
8056
8057 Support %define "KEY" {VALUE}.
8058 * src/scan-code.h, src/scan-code.l (translate_action)
8059 (translate_rule_action, translate_symbol_action, translate_code):
8060 Return char *, not const char *.
8061 * src/parse-gram.y (declaration): Rename as...
8062 (prologue_declaration): this.
8063 (string_content): Remove this nonterminal, use STRING.
8064 (braceless, content, content.opt): New nonterminal.
8065 Use them.
8066 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
8067 as value.
8068 * src/scan-gram.l (getargs.h): Don't include it.
8069
8070 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
8071
8072 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
8073 rather than a for-loop that declares a local bool variable. This
8074 should work around a compatibility problem with a Cray x1e C++
8075 compiler reported by Hung Nguyen in
8076 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
8077 The for-loop was introduced in the 2004-11-17 change but I don't
8078 know why it was needed.
8079
8080 2006-07-12 Akim Demaille <akim@epita.fr>
8081
8082 * data/c.m4: Comment changes.
8083
8084 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
8085
8086 * src/complain.c (error_message, ERROR_MESSAGE): New.
8087 To factor...
8088 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
8089 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
8090
8091 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
8092
8093 * NEWS: Instead of %union, you can define and use your own union type
8094 YYSTYPE if your grammar contains at least one <type> tag.
8095 Your YYSTYPE need not be a macro; it can be a typedef.
8096 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
8097 (Union Decl, Decl Summary): Document this.
8098 * data/glr.c (YYSTYPE): Implement this.
8099 * data/glr.cc (YYSTYPE): Likewise.
8100 * data/lalr1.cc (YYSTYPE): Likewise.
8101 * data/yacc.c (YYSTYPE): Likewise.
8102 * src/output.c (prepare): Output tag_seen_flag.
8103 * src/parse-gram.y (declaration, grammar_declaration):
8104 Use 'union_seen' rather than 'typed' to determine whether
8105 %union has been seen, since grammars can now be typed without
8106 %union.
8107 (symbol_declaration, type.opt, symbol_def):
8108 Keep track of whether a tag has been seen.
8109 * src/reader.c (union_seen, tag_seen): New vars.
8110 (typed): remove.
8111 * src/reader.h (union_seen, tag_seen, typed): Likewise.
8112 * src/scan-code.l (untyped_var_seen): New variable.
8113 (handle_action_dollar): Adjust to above changes.
8114 (handle_action_dollar, handle_action_at):
8115 Improve overflow checking for outlandish numbers.
8116 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
8117 avoid new diagnostics generated by above changes.
8118 * tests/regression.at (YYSTYPE typedef): Add test to check
8119 for type tags without %union.
8120
8121 * src/symlist.c (symbol_list_length): Return int, not unsigned
8122 int, since callers expect int. This may need to get revisited
8123 once we have proper integer overflow checking.
8124
8125 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
8126 object is now static.
8127
8128 * src/getargs.c (flags_argmatch): Return void, not int,
8129 to pacify ./configure --enable-gcc-warnings.
8130
8131 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
8132 since last_string is already defined to FLEX_PREFIX (last_string).
8133
8134 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
8135
8136 Implement --warnings/-W.
8137 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
8138 replaced by...
8139 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
8140 Adjust callers.
8141 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
8142 (warnings_args, warnings_types): New.
8143 (getargs, short_options, long_options): Accept -W/--warnings.
8144 Sort the options by alphabetical order, upper case letter right
8145 before its lower case.
8146
8147 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
8148
8149 Change %merge result type clash warnings to errors. Discussed at
8150 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
8151 * src/reader.c (record_merge_function_type): Use complain_at.
8152 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
8153 declared later): Update test case results.
8154
8155 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
8156
8157 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
8158 to be in alphabetical order.
8159 (trace_args): Spelling fixes.
8160
8161 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
8162
8163 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
8164 so they don't collide with user-defined macros.
8165 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
8166 this was never guaranteed, and now that we're using gnulib stdint,
8167 which defines int_fast16_t to long int, the problem is exposed.
8168
8169 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
8170
8171 * data/c.m4 (b4_basename): Simplify a bit, since we don't
8172 need the full POSIX semantics (and weren't implementing them
8173 anyway).
8174
8175 Adjust to Autoconf 2.60 and today's gnulib.
8176 * bootstrap (gnulib_modules): Add stdint.
8177 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
8178 no longer copies it.
8179 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
8180 since stdint needs the former and wcwidth (which is now required
8181 by mbswidth) needs the latter.
8182 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
8183 work around a compatibility glitch between gettext 0.14.6 and
8184 Autoconf 2.60.
8185 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
8186 Do not check for uintptr_t, since new stdint module does the right
8187 thing.
8188 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
8189 Add stdint.h, stdint_.h, wcwidth.h.
8190 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
8191 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
8192 stdint.m4, wchar_t.m4, wcwidth.m4.
8193 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
8194 usual order for ../lib/*.h files.
8195 (file_name_split): Use last_component, not base_name, to adjust
8196 to gnulib changes.
8197 * src/parse-gram.h: Include <strverscmp.h> in the usual order
8198 for ../lib/*.h files.
8199 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
8200 Define unconditionally, since we now assume the stdint module.
8201 * src/scan-skel.l: Include <dirname.h>.
8202 (BASE_QPUTS): Use last_component, not base_name.
8203 * src/system.h: Include <unlocked-io.h> in the usual order
8204 for ../lib/*.h files. Include <stdint.h> unconditionally,
8205 since we now use the stdint module.
8206 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
8207 HAVE_UINTPTR_T, since we now use the stdint module.
8208 (base_name): Remove decl, since files now include <dirname.h>
8209 to get the decl.
8210
8211 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
8212
8213 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
8214 New, default to 1.
8215 * data/yacc.c, data/glr.c, data/location.cc: Use them.
8216 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
8217 default.
8218 * tests/calc.at: Adjust.
8219
8220 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
8221
8222 * data/c.m4 (b4_basename): New.
8223 (b4_syncline): Also output the location of its invocation (from
8224 the skeleton).
8225 (b4_user_action, b4_define_user_action, b4_user_actions)
8226 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
8227 (b4_user_stype): New.
8228 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
8229
8230 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
8231
8232 In the grammar file, the first column is 1 not 0 on the first line as
8233 on every other line.
8234 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
8235 * tests/input.at (Torturing the Scanner): Update output.
8236
8237 * src/scan-gram.l (scanner_cursor): Declare it static.
8238
8239 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
8240
8241 In warnings, say "previous declaration" rather than "first
8242 declaration".
8243 * src/symtab.c (redeclaration): Do that here.
8244 * src/reader.c (record_merge_function_type): In the case of a result
8245 type clash, report the previous declaration rather than the very first
8246 one in the grammar file.
8247 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
8248 declared later): Add a third declaration to check this behavior.
8249 * tests/input.at (Incompatible Aliases): Update output.
8250
8251 2006-06-27 Akim Demaille <akim@epita.fr>
8252
8253 * doc/Doxyfile.in: New.
8254 * doc/Makefile.am: Use it.
8255 * src/lalr.h, src/symtab.h: Initial doxygenation.
8256
8257 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
8258
8259 Don't miss %merge result type warnings just because the LHS types are
8260 declared after the %merge. This continues the effort of the previous
8261 patch.
8262 * src/reader.c (get_merge_function): Don't set the merger type yet.
8263 (record_merge_function_type): New function for setting the merger type
8264 and checking for clashes.
8265 (grammar_current_rule_merge_set): Set the location of the %merge for
8266 the current rule.
8267 (packgram): Invoke record_merge_function_type for each rule now that
8268 all symbol type declarations have been parsed.
8269 * src/reader.h (merger_list.type_declaration_location): New member
8270 storing the location of the first %merge from which the type for this
8271 merging function was derived.
8272 * src/symlist.h (symbol_list.merger_declaration_location): New member
8273 storing the location of a rule's %merge, if any.
8274 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
8275 declared later): New test to catch the error fixed by the above patch.
8276
8277 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
8278
8279 Get action warnings (grammar_rule_check) right even when symbol
8280 declarations appear after the rules. Discussed at
8281 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
8282 and
8283 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
8284 Don't mistake the type of $$ in a midrule to be that of its parent
8285 rule's $$.
8286 * src/reader.c (grammar_current_rule_end): Don't invoke
8287 grammar_rule_check yet since not all symbol declarations may have been
8288 parsed yet.
8289 (grammar_midrule_action): Likewise.
8290 Don't record whether the midrule's $$ has been used yet since actions
8291 haven't been translated yet.
8292 Record the midrule's parent rule and its RHS index within the parent
8293 rule.
8294 (grammar_current_rule_action_append): Don't translate the action yet
8295 since not all symbol declarations may have been parsed yet and, thus,
8296 warnings about types for $$, $n, @$, and @n can't be reported yet.
8297 (packgram): Translate the action and invoke grammar_rule_check now that
8298 all symbol declarations have been parsed.
8299 * src/scan-code.l (handle_action_dollar): Now that this is invoked
8300 after parsing the entire grammar file, the symbol list here in the case
8301 of a midrule is actually the midrule's empty RHS, so reference its
8302 parent rule's RHS where necessary.
8303 On the other hand, now that you can already know it's a midrule, you
8304 aren't forced to think $$ has the same type as its parent rule's $$.
8305 (handle_action_at): In the case of a midrule, reference the parent rule
8306 where necessary.
8307 * src/symlist.c (symbol_list_new): Initialize new midrule-related
8308 members.
8309 (symbol_list_length): Now that this is invoked after all rules have
8310 been parsed, a NULL symbol (rather than a NULL symbol list node)
8311 terminates a rule. symbol_list_print already does this correctly.
8312 * src/symlist.h (symbol_list.midrule_parent_rule,
8313 symbol_list.midrule_parent_rhs_index): New members so that midrules can
8314 remember their relationships with their parents.
8315 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
8316 fixed by the above patch.
8317 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
8318 implementing...
8319 (Unused values): ... this old test case and...
8320 (Unused values before symbol declarations): ... this new test case.
8321 This one is the same as `Unused values' except that all symbol
8322 declarations appear after the rules in order to catch the rest of the
8323 errors fixed by the above patch.
8324
8325 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
8326
8327 More cleanup.
8328 * src/reader.c (current_rule): Declare it static since it's no longer
8329 used outside this file.
8330 (grammar_current_rule_action_append): Remove redundant arguments from
8331 translate_rule_action invocation.
8332 * src/reader.h (current_rule): Remove this unused extern.
8333 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
8334 * src/scan-code.l (translate_rule_action): Likewise.
8335
8336 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
8337
8338 Clean up yesterday's patch.
8339 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
8340 to...
8341 * src/reader.c (grammar_current_rule_action_append): ... here for
8342 consistency with grammar_current_rule_symbol_append.
8343 * tests/regression.at (Braced code in declaration in rules section):
8344 Make yyerror and yylex static as usual.
8345
8346 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
8347
8348 Fix bug that mistakes braced code in a declaration in the rules section
8349 to be a rule action. Mentioned at
8350 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
8351 * src/scan-gram.l: Move midrule action detection from the start of the
8352 scanning of any braced code to...
8353 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
8354 action. For readability, use $2 and @2 rather than the equivalent
8355 global variables.
8356 * tests/regression.at (Braced code in declaration in rules section):
8357 New test to catch the error fixed by the above patch.
8358
8359 Work on code readability some.
8360 * src/scan-code.l (current_rule): Get rid of this misleading and
8361 redundant declaration: it's actually extern'ed in reader.h.
8362 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
8363 translate_action): Add a rule argument and use it instead of the global
8364 current_rule.
8365 (translate_rule_action): This already receives current_rule through an
8366 argument, so pass it on to translate_action instead of assigning
8367 current_rule to current_rule.
8368 (translate_symbol_action, translate_code): Pass rule = NULL to
8369 translate_action.
8370
8371 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
8372
8373 Rename %before-definitions to %start-header and %after-definitions to
8374 %end-header. Don't use these declarations to separate pre-prologue
8375 blocks from post-prologue blocks. Add new order-independent
8376 declarations %before-header and %after-header as alternatives to the
8377 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
8378 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
8379 * NEWS (2.3+): Update for these changes.
8380 * data/glr.c (b4_before_definitions): Update to...
8381 (b4_start_header): ... this.
8382 (b4_after_definitions): Update to...
8383 (b4_end_header): ... this.
8384 * data/glr.cc: Likewise.
8385 * data/lalr1.cc: Likewise.
8386 * data/yacc.c: Likewise.
8387 * doc/bison.texinfo (The prologue): Update names, and replace remaining
8388 prologue blocks with %*-header declarations.
8389 (Calc++ Parser): Likewise.
8390 (Decl Summary): Update names.
8391 (Table of Symbols): Update description.
8392 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
8393 (PERCENT_END_HEADER): ... this.
8394 (PERCENT_BEFORE_DEFINITIONS): Update to...
8395 (PERCENT_START_HEADER): ... this.
8396 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
8397 (declaration): Update token names and m4 macro names.
8398 When parsing %end-header and %start-header, invoke translate_code
8399 before muscle_code_grow, and no longer set global booleans to remember
8400 whether these declarations have been seen.
8401 Parse new %after-header and %before-header.
8402 * src/reader.c (before_definitions, after_definitions): Remove.
8403 (prologue_augment): Accept a new bool argument to specify whether to
8404 augment the pre-prologue or post-prologue.
8405 * src/reader.h (before_definitions, after_definitions): Remove these
8406 extern's.
8407 (prologue_augment): Add new bool argument.
8408 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
8409 (PERCENT_END_HEADER): ... this.
8410 (PERCENT_BEFORE_DEFINITIONS): Update to...
8411 (PERCENT_START_HEADER): ... this.
8412 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
8413 * tests/actions.at (Printers and Destructors): Update names.
8414
8415 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
8416
8417 Add comparison operators for C++ location classes. Discussed at
8418 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
8419 * data/c++.m4 (b4_define_location_comparison): New boolean %define
8420 declaration indicating whether filename_type has an operator==. If
8421 filename_type is `std::string', it defaults to `1', `0' otherwise.
8422 * data/location.cc: Iff b4_define_location_comparison is `1', add
8423 operator== and operator!= for class position and for class location.
8424
8425 Some minor fixes.
8426 * src/scan-action.l: Remove unused file.
8427 * src/symtab.c (symbol_printer_set): Use printer_location not
8428 destructor_location.
8429 * src/symtab.h (struct symbol): Replace incorrect source comment for
8430 printer members.
8431 * tests/input.at (Incompatible Aliases): Update output with correct
8432 printer location.
8433
8434 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
8435
8436 Don't put the pre-prologue in the header file. For the yacc.c code
8437 file and the glr.c header and code files, move the pre-prologue before
8438 the token definitions. Add new %before-definitions and
8439 %after-definitions to declare code that will go in both the header file
8440 and code file. Discussed at
8441 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
8442 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
8443 and
8444 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
8445 * NEWS (2.3+): Describe these changes.
8446 * data/glr.c (b4_pre_prologue): Move from within to before...
8447 (b4_shared_declarations): ... this.
8448 Add new b4_before_definitions before b4_token_enums.
8449 Add new b4_after_definitions at the end.
8450 * data/glr.cc (b4_pre_prologue): Replace with...
8451 (b4_before_definitions): ... this in the header file.
8452 (b4_after_definitions): New near the end of the header file.
8453 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
8454 code file right before including the header file.
8455 (b4_before_definitions): New in the previous position of
8456 b4_pre_prologue in the header file.
8457 (b4_after_definitions): New near the end of the header file.
8458 * data/yacc.c: Clean up some m4 quoting especially in the header file.
8459 (b4_token_enums_defines): In the code file, move to right before
8460 YYSTYPE for consistency with the header file.
8461 (b4_before_definitions): New right before b4_token_enums_defines in
8462 both the header and code file.
8463 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
8464 header and code file.
8465 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
8466 of prologues for %union dependencies.
8467 (Decl Summary): In %defines description, mention the effect of
8468 %before-definitions and %after-definitions on the header file.
8469 (Calc++ Parser): Forward declare driver in a %before-definitions rather
8470 than in the pre-prologue so that make check succeeds.
8471 (Table of Symbols): Add entries for %before-definitions and
8472 %after-definitions.
8473 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
8474 %before-definitions.
8475 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
8476 (declaration): Parse those declarations and append to
8477 b4_before_definitions and b4_after_definitions, respectively.
8478 * src/reader.c (before_definitions, after_definitions): New bools to
8479 track whether those declarations have been seen.
8480 (prologue_augment): Add to the post-prologue if %union,
8481 %before-definitions, or %after-definitions has been seen.
8482 * src/reader.h (before_definitions, after_definitions): New extern's.
8483 * src/scan-gram.l: Scan the new declarations.
8484 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
8485 prologue block in a %before-definitions or a %after-definitions based
8486 on whether the %union is declared.
8487 * tests/regression.at (Early token definitions with --yacc, Early token
8488 definitions without --yacc): Move tests for token definitions into the
8489 post-prologue since token names are no longer defined in the
8490 pre-prologue.
8491
8492 2006-06-20 Akim Demaille <akim@epita.fr>
8493
8494 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
8495 (symbol_get): Use it.
8496 * src/parse-gram.y: Use it.
8497
8498 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
8499
8500 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
8501 build succeeds when configured with --enable-gcc-warnings.
8502
8503 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
8504
8505 * src/parse-gram.y (char_name): New function.
8506 (CHAR, STRING, string_content): For %printer, properly escape.
8507 (ID): Prefer fputs to fprintf.
8508 (id): Reindent to be consistent with other rules.
8509 Properly quote char.
8510
8511 The Translation Project changed its way of publishing translations
8512 to maintainers. I haven't received any responses to my request
8513 for supporting the old way, or for documenting the new way. I
8514 have modified 'bootstrap' to use screen scraping
8515 (in this case, HTML scraping). This is unreliable and inelegant,
8516 but I don't see any better way. Yuck.
8517 * bootstrap (TP_URL, WGET_COMMAND): New vars.
8518 (get_translations): New function, which uses HTML scraping to
8519 deduce locations of latest translations.
8520 Use this function to grab both bison and bison-runtime .po files.
8521 Don't bother priming the pump for the runtime-po domain any more,
8522 as it's now translated better than bison is.
8523
8524 2006-06-19 Akim Demaille <akim@epita.fr>
8525
8526 * src/scan-gram.l: No longer "parse" things after `%union' until
8527 `{'. Rather, return a single "%union" token.
8528 No longer make symbols: return strings, and leave the conversion
8529 to symbols to the parser.
8530 (SC_PRE_CODE, token_type): Remove.
8531 * src/parse-gram.y (%union): New field `character'.
8532 Sort tokens.
8533 (CHAR): New token.
8534 (ID, ID_COLON): Now that the scanner no longer makes them
8535 identifiers, adjust all uses to invoke symbol_get.
8536 (id_colon): New, wraps the conversion from string to symbol.
8537 (%union): Accept a possible union_name.
8538 (symbol): Now can be a char.
8539 * data/c.m4 (b4_union_name): Leave a default value.
8540 * data/glr.c, data/yacc.c: Use it.
8541
8542 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
8543
8544 For associating token numbers with token names for "yacc.c", don't use
8545 #define statements unless `--yacc' is specified; always use enum
8546 yytokentype. Most important discussions start at:
8547 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
8548 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
8549 and
8550 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
8551 * NEWS (2.3+): Mention.
8552 * data/c.m4 (b4_yacc_if): New.
8553 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
8554 token #define's.
8555 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
8556 on token name definitions.
8557 * src/getargs.c (usage): Capitalize `Yacc' in English.
8558 * src/output.c (prepare): Define b4_yacc_flag.
8559 * tests/regression.at (Early token definitions): Test that tokens names
8560 are defined before the pre-prologue not just before the post-prologue.
8561 Remove this test case and copy to...
8562 (Early token definitions with --yacc): ... this to test #define's.
8563 (Early token definitions without --yacc): ... and this to test enums.
8564
8565 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
8566
8567 * NEWS: Reword the post-2.3 change to not be so optimistic about
8568 removing the old "look-ahead" spelling.
8569 Update previous look-ahead/lookahead change reports.
8570 * REFERENCES: look-ahead -> lookahead (since that's
8571 what he actually wrote).
8572 * doc/refcard.tex: look ahead -> lookahead,
8573 look-ahead -> lookahead
8574
8575 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
8576
8577 For consistency, use `lookahead' instead of `look-ahead' or
8578 `look_ahead'. Discussed starting at
8579 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
8580 and then at
8581 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
8582 * NEWS: For the next release, note the change to `--report'.
8583 * TODO, doc/bison.1: Update English.
8584 * doc/bison.texinfo: Update English.
8585 (Understanding Your Parser, Bison Options): Document as
8586 `--report=lookahead' rather than `--report=look-ahead'.
8587 * src/conflicts.c: Update English in comments.
8588 (lookahead_set): Rename from look_ahead_set.
8589 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
8590 (resolve_sr_conflict): Rename local look_ahead_tokens to
8591 lookahead_tokens, and update other uses.
8592 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
8593 count_rr_conflicts, conflicts_free): Update uses.
8594 * src/getargs.c (report_args): Move "lookahead" before alternate
8595 spellings.
8596 (report_types): Update uses.
8597 (usage): For `--report' usage description, state `lookahead' spelling
8598 rather than `look-ahead'.
8599 * src/getargs.h (report.report_lookahead_tokens): Rename from
8600 report_look_ahead_tokens.
8601 * src/lalr.c: Update English in comments.
8602 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
8603 (state_lookahead_tokens_count): Rename from
8604 state_look_ahead_tokens_count.
8605 Rename local n_look_ahead_tokens to n_lookahead_tokens.
8606 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
8607 Rename local n_look_ahead_tokens to n_lookahead_tokens.
8608 Update other uses.
8609 Update English in output.
8610 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
8611 * src/print.c: Update English in comments.
8612 (lookahead_set): Rename from look_ahead_set.
8613 (print_reduction): Rename argument lookahead_token from
8614 look_ahead_token.
8615 (print_core, state_default_rule, print_reductions, print_results):
8616 Update uses.
8617 * src/print_graph.c: Update English in comments.
8618 (print_core): Update uses.
8619 * src/state.c: Update English in comments.
8620 (reductions_new): Update uses.
8621 (state_rule_lookahead_tokens_print): Rename from
8622 state_rule_look_ahead_tokens_print, and update other uses.
8623 * src/state.h: Update English in comments.
8624 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
8625 (state_rule_lookahead_tokens_print): Rename from
8626 state_rule_look_ahead_tokens_print.
8627 * src/tables.c: Update English in comments.
8628 (conflict_row, action_row): Update uses.
8629 * tests/glr-regression.at
8630 (Incorrect lookahead during deterministic GLR,
8631 Incorrect lookahead during nondeterministic GLR): Rename
8632 print_look_ahead to print_lookahead.
8633 * tests/torture.at: Update English in comments.
8634 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
8635 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
8636 (Many lookahead tokens): Update uses.
8637 * data/glr.c: Update English in comments.
8638 * lalr1.cc: Likewise.
8639 * yacc.c: Likewise.
8640 * src/conflicts.h: Likewise.
8641 * src/lalr.h: Likewise.
8642 * src/main.c: Likewise.
8643 * src/output.c: Likewise.
8644 * src/parse-gram.c: Likewise.
8645 * src/tables.h: Likewise.
8646 * tests/calc.at: Likewise.
8647
8648 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
8649
8650 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
8651
8652 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
8653
8654 * TODO: Add request from Nelson H. F. Beebe to be able to install
8655 Bison without installing the yacc script.
8656
8657 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
8658
8659 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
8660 and yytext if they're already #define'd.
8661 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
8662 * src/scan-code-c.c: ... here.
8663 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
8664 <config.h>.
8665
8666 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
8667
8668 Get Bison to build again when configured with --enable-gcc-warnings.
8669 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
8670 missing #include's.
8671 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
8672 loc argument as it shadows a global.
8673 * src/scan-gram.l: Remove stray comma that prevents boundary_set
8674 invocation.
8675
8676 * src/.cvsignore: Add scan-code.c.
8677
8678 2006-06-07 Akim Demaille <akim@epita.fr>
8679
8680 * src/scan-gram.l: Move the "add a trailing ; to actions" code
8681 to...
8682 * src/scan-code.l: here.
8683 * tests/input.at (Torturing the Scanner): Fix another location
8684 error.
8685
8686 2006-06-07 Akim Demaille <akim@epita.fr>
8687
8688 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
8689
8690 2006-06-06 Akim Demaille <akim@epita.fr>
8691
8692 Extract the parsing of user actions from the grammar scanner.
8693 As a consequence, the relation between the grammar scanner and
8694 parser is much simpler. We can also split "composite tokens" back
8695 into simple tokens.
8696 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
8697 * src/scan-gram.l (add_column_width, adjust_location): Move to and
8698 rename as...
8699 * src/location.h, src/location.c (add_column_width)
8700 (location_compute): these.
8701 Fix the column count: the initial column is 0.
8702 (location_print): Be robust to ending column being 0.
8703 * src/location.h (boundary_set): New.
8704 * src/main.c: Adjust to scanner_free being renamed as
8705 gram_scanner_free.
8706 * src/output.c: Include scan-code.h.
8707 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
8708 Use boundary_set.
8709 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
8710 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
8711 which is now, again, a separate token.
8712 Adjust all dependencies.
8713 Whereever actions with $ and @ are used, use translate_code.
8714 (action): Remove this nonterminal which is now useless.
8715 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
8716 (grammar_current_rule_action_append): Use translate_code.
8717 (packgram): Bound check ruleno, itemno, and rule_length.
8718 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
8719 (last_string, last_braced_code_loc, max_left_semantic_context)
8720 (scanner_initialize, scanner_free, scanner_last_string_free)
8721 (gram_out, gram_lineno, YY_DECL_): Move to...
8722 * src/scan-gram.h: this new file.
8723 (YY_DECL): Rename as...
8724 (GRAM_DECL): this.
8725 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
8726 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
8727 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
8728 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
8729 Move these declarations, and...
8730 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
8731 these to...
8732 * src/flex-scanner.h: this new file.
8733 * src/scan-gram.l (rule_length, rule_length_overflow)
8734 (increment_rule_length): Remove.
8735 (last_braced_code_loc): Rename as...
8736 (gram_last_braced_code_loc): this.
8737 Adjust to the changes of the parser.
8738 Move all the handling of $ and @ into...
8739 * src/scan-code.l: here.
8740 * src/scan-gram.l (handle_dollar, handle_at): Remove.
8741 (handle_action_dollar, handle_action_at): Move to...
8742 * src/scan-code.l: here.
8743 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
8744 scan-code.h, scan-code-c.c, scan-gram.h.
8745 (EXTRA_bison_SOURCES): Add scan-code.l.
8746 (BUILT_SOURCES): Add scan-code.c.
8747 (yacc): Be robust to white spaces.
8748
8749 * tests/conflicts.at, tests/input.at, tests/reduce.at,
8750 * tests/regression.at: Adjust the column numbers.
8751 * tests/regression.at: Adjust the error message.
8752
8753 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
8754
8755 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
8756 Use Akim's wording from
8757 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
8758
8759 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
8760
8761 Between Bison releases, manually append `+' to the previous Bison
8762 release number, and use that as a signal to automatically print the
8763 ChangeLog's CVS Id keyword from --version. Discussed starting at
8764 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
8765 * ChangeLog: Add Id header.
8766 * configure.ac (AC_INIT): Append `+' to `2.3'.
8767 * src/.cvsignore: Add revision.c.
8768 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
8769 (BUILT_SOURCES): Add revision.c.
8770 (revision.c): New target rule. This file defines a new global variable
8771 named revision. It initializes it with either the Id from ChangeLog
8772 or, if VERSION doesn't contain `+', with the empty string.
8773 * src/getargs.c (version): Print the value of revision.
8774 * src/revision.h: Extern revision.
8775
8776 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
8777
8778 * NEWS: Version 2.3.
8779 * configure.ac (AC_INIT): Likewise.
8780
8781 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
8782
8783 * data/glr.c (YYRECOVERING): Define to be a function-like macro
8784 with no arguments, not as an object-like macro. This is for
8785 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
8786 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
8787 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
8788 Document this.
8789
8790 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
8791
8792 * src/getargs.c (usage): Back out yesterday's modification of the
8793 --help output so that we don't have to wait for translation before
8794 releasing 2.3.
8795
8796 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
8797
8798 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
8799 Problem reported by Akim Demaille.
8800
8801 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
8802
8803 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
8804
8805 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
8806
8807 * data/yacc.c (yy_reduce_print): Omit trailing white space in
8808 generated source code. Problem reported by Frans Englich in
8809 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
8810
8811 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
8812
8813 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
8814 shell, not within 'make', so that 'make' by an ordinary builder
8815 (using GNU make) does not worry about configuring gzip. This also
8816 works around a bug reported independently by Keith Thompson and by
8817 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
8818 stderr rather than stdout, messing up the build logs.
8819
8820 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
8821
8822 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
8823 to make sure that YYID will never be unused. This fixes a 'make
8824 maintainer-check' failure caused by the recent changes to the 'Trivial
8825 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
8826 not used.
8827 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
8828
8829 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
8830
8831 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
8832 state before an empty RHS is always resolved here. Only the location
8833 of that state is guaranteed to be resolved, and that's enough. This
8834 fixes the remaining bug reported by Derek M. Jones in
8835 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
8836 * tests/glr-regression.at (Uninitialized location when reporting
8837 ambiguity): Test the above case.
8838 Also, the embedded comments in this test case claim it checks the case
8839 of an empty RHS that has inherited the initial location. However, the
8840 corresponding LHS was already resolved, so yyresolveLocations didn't
8841 actually have reason to modify it. Fix this by forcing
8842 nondeterministic operation at the beginning of the parse.
8843
8844 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
8845
8846 * data/c.m4 (b4_yy_symbol_print_generate):
8847 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
8848 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
8849 of the bugs reported today by Derek M Jones in
8850 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
8851 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
8852 defined to be a type name without parens or brackets.
8853 (Location Type): Similarly for YYLTYPE.
8854 * tests/regression.at (Trivial grammars): Put in a test for this
8855 bug that will be caught by 'make maintainer-check' (though not,
8856 alas, by 'make check' unless your compiler is picky).
8857
8858 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
8859
8860 * NEWS: Version 2.2.
8861 * configure.ac (AC_INIT): Likewise.
8862
8863 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
8864
8865 * data/glr.c (yyreportTree): Make room in yystates for the state
8866 preceding the RHS. This fixes the segmentation fault reported by Derek
8867 M. Jones in
8868 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
8869 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
8870 to the user. Reported for yyreportTree by Derek M. Jones later in the
8871 same thread.
8872 * THANKS: Add Derek M. Jones.
8873 Update my email address.
8874 Fix typo in Steve Murphy's name.
8875
8876 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
8877
8878 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
8879 checking against YYLAST that caused the parser to miss a potential
8880 alternative in its diagnostic.
8881 Problem reported by Maria Jose Moron Fernandez in
8882 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
8883 * data/lalr1.cc (yysyntax_error_): Likewise.
8884 * data/yacc.c (yysyntax_error): Likewise.
8885 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
8886 tokens, in case we run into an older C compiler.
8887 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
8888 Use them to check for the off-by-one error fixed above.
8889
8890 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
8891 YYSIZE_T, not size_t.
8892 * tests/regression.at (Trivial grammars): New test, to catch
8893 the error fixed by the above patch.
8894
8895 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8896
8897 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
8898 scheme.
8899 Reported by Steve Murphy.
8900
8901 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8902
8903 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
8904 * data/glr.cc: b4_location_flag is now b4_locations_flag.
8905
8906 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8907
8908 Implement --trace=m4.
8909 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
8910 * src/output.c (output_skeleton): When set, pass -dV to m4.
8911
8912 Factor the handling of flags in m4.
8913 * src/output.c (prepare): Rename the muscle names debug, defines,
8914 error_verbose to debug_flag, defines_flag, error_verbose_flag.
8915 * data/c.m4: Adjust.
8916 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
8917 Use b4_define_flag_if to define other b4_FLAG_if macros.
8918 (b4_location_if): As a consequence, rename as...
8919 (b4_locations_if): this, for consistency.
8920 Adjust all the skeletons.
8921
8922 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8923
8924 * etc/bench.pm: Shorten bench names.
8925
8926 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8927
8928 * src/output.h, src/output.c (error_verbose): Move to...
8929 * src/getargs.h, src/getargs.c: here.
8930 Sort the flags.
8931 Adjust dependencies.
8932
8933 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
8934
8935 * data/c.m4 (b4_copyright): Put the special exception for Bison
8936 skeletons here, so we don't have to put it in each skeleton. All
8937 uses changed. Suggested by Akim Demaille. Also, wrap the
8938 copyright notice, in case it is longer than 80 columns. Replace
8939 comma by newline after title.
8940
8941 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
8942
8943 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
8944 incompatibility, not a bug. Mention that it wasn't fixed as of
8945 flex 2.5.33.
8946
8947 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
8948
8949 * examples/extexi: Enforce the precedence of concatenation over
8950 >>.
8951 Reported by Tommy Nordgren.
8952
8953 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
8954
8955 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
8956 with the member "token".
8957 Reported by Martin Nylin.
8958
8959 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
8960
8961 * data/glr.c: Switch to Bison 2.2 special-exception language in
8962 the copyright notice. Use more-regular format for titles and
8963 copyright notices.
8964 * data/glr.cc: Likewise.
8965 * data/location.cc: Likewise.
8966 * data/yacc.cc: Likewise.
8967 * doc/bison.texinfo (Conditions): Document this.
8968 * NEWS: likewise. Upgrade version to 2.2.
8969
8970 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
8971
8972 * data/glr.cc: Remove dead code.
8973
8974 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
8975
8976 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
8977 that variable and the line breaks the bootstrap. Problem reported
8978 by Juan M. Guerrero.
8979
8980 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
8981
8982 * doc/bison.texinfo (Multiple start-symbols): New.
8983
8984 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
8985
8986 * etc/README, etc/bench.pl: New.
8987
8988 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
8989
8990 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
8991 rule.
8992 Reported by Mickael Labau.
8993 * tests/input.at (Torturing the Scanner): Test it.
8994
8995 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
8996
8997 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
8998 Problem reported by Bob Rossi.
8999
9000 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
9001
9002 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
9003 and didn't really work.
9004 For the index, use @ifnotinfo, not @iftex.
9005 Minor cleanups of spacing and terminology.
9006
9007 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
9008
9009 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
9010 of AT_NAME_PREFIX when %name-prefix is not used.
9011
9012 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
9013
9014 Apply --prefix to C++ skeletons too: they change the namespace.
9015 The test suite already exercize these cases.
9016 * data/c++.m4 (b4_namespace): New.
9017 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
9018 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
9019 * data/yacc.c, data/glr.c: Remove a useless `[]'.
9020 * doc/bison.texinfo: Document it.
9021 (Option Cross Key): Use @multitable in all formats. It looks
9022 nicer, even in TeX outputs.
9023 (Rules): Use the same code whatever the output type is.
9024 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
9025 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
9026 * tests/calc.at: Use it, instead of hard coding `yy'.
9027
9028 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
9029
9030 * TODO: Remove dead items.
9031
9032 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
9033
9034 * doc/FAQ: Remove, merged into...
9035 * doc/bison.texinfo (FAQ): this.
9036 * doc/Makefile.am (EXTRA_DIST): Adjust.
9037
9038 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
9039
9040 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
9041 even if empty.
9042 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
9043 * doc/bison.texinfo (Calc++ Scanner): Use it.
9044
9045 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
9046
9047 Fix two nits reported by twlevo, plus one more that I discovered.
9048
9049 * src/assoc.h (assoc_to_string): Give a name to the arg, as
9050 this is the usual Bison style.
9051 * src/location.h (location_print): Likewise.
9052
9053 * src/reader.h (token_name): Likewise.
9054
9055 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
9056
9057 Fix some nits reported by twlevo.
9058 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
9059 and "POSIX". Use more-modern syntax for URLs. Mention C++
9060 and ask for Java. Don't hardwire OS version numbers. Add
9061 copyright notice.
9062 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
9063 * src/conflicts.c (solved_conflicts_obstack): Now static.
9064
9065 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
9066
9067 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
9068 page. Say "you can use it" not "you may use it" as on the web page;
9069 we're describing capabilities not granting permission.
9070
9071 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
9072
9073 * data/glr.c (yyresolveLocations): Rename local variables to avoid
9074 shadowing warnings. Use usual patter for iterating through RHS.
9075 * tests/glr-regression.at
9076 (Uninitialized location when reporting ambiguity):
9077 Modify yylex so that it uses its argument, rather than trying
9078 to rely on ARGSUSED (which doesn't work for gcc with warnings).
9079 const char -> char const.
9080
9081 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
9082 Don't use tabs inside commands; it messes up 'ps'.
9083 Problem reported by twlevo.
9084
9085 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
9086
9087 * tests/glr-regression.at (Uninitialized location when reporting
9088 ambiguity): New test case.
9089 * data/glr.c (yyresolveLocations): New function, which uses
9090 YYLLOC_DEFAULT.
9091 (yyresolveValue): Invoke yyresolveLocations before reporting an
9092 ambiguity.
9093 * doc/bison.texinfo (Default Action for Locations): Note
9094 YYLLOC_DEFAULT's usage for ambiguity locations.
9095 (GLR Semantic Actions): Cross-reference those notes.
9096
9097 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
9098
9099 * tests/glr-regression.at (Leaked semantic values when reporting
9100 ambiguity): Remove unnecessary union and type declarations.
9101 (Leaked lookahead after nondeterministic parse syntax error): New test
9102 case.
9103 * data/glr.c (yyparse): Check for zero stacks remaining before
9104 attempting to shift the lookahead so that you don't lose it.
9105
9106 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
9107
9108 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
9109 * tests/glr-regression.at (Leaked semantic values when reporting
9110 ambiguity): New test case.
9111 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
9112 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
9113 now unnecessary yystackp parameter.
9114 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
9115 destructors can be called.
9116
9117 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
9118 in existing testcases.
9119
9120 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
9121
9122 Don't leak semantic values for parent RHS when a user action cuts the
9123 parser, and clean up related code a bit.
9124 * tests/glr-regression.at (Leaked merged semantic value if user action
9125 cuts parse): Rename to...
9126 (Leaked semantic values if user action cuts parse): ... this. Add check
9127 for leaked parent RHS values.
9128 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
9129 between an unresolved state (non-empty chain of semantic options) and
9130 an incomplete one (signaled by an empty chain).
9131 (yyresolveStates): Document the interface. Move all manipulation of a
9132 successfully or unsuccessfully resolved yyGLRState to...
9133 (yyresolveValue): ... here so that yyresolveValue always leaves a
9134 yyGLRState with consistent data and thus is easier to understand.
9135 Remove the yyvalp and yylocp parameters since they are always just
9136 taken from the yys parameter. When reporting a discarded merged value
9137 in debugging output, note that it is incompletely merged. Document the
9138 interface.
9139 (yyresolveAction): If resolving any of the RHS states fails, destroy
9140 them all rather than leaking them. Thus, as long as user actions are
9141 written to clean up the RHS correctly, yyresolveAction always cleans up
9142 the RHS of a semantic option. Document the interface.
9143
9144 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
9145
9146 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
9147 led to a segmentation fault in GNU Pascal. Problem reported
9148 by Waldek Hebisch.
9149
9150 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
9151
9152 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
9153 mid-rule action inside a nonterminal symbol in order to declare a
9154 destructor for its semantic value.
9155
9156 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
9157
9158 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
9159 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
9160 __cplusplus && ! defined _STDLIB_H && !
9161 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
9162 defined free))]: Include <stdlib.h> rather than rolling our own
9163 declarations of malloc and free, to avoid problems with
9164 incompatible declarations (using 'throw') C++'s stdlib.h. This
9165 should fix Debian bug 340012
9166 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
9167 reported by Guillaume Melquiond.
9168
9169 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
9170
9171 * NEWS: Clarify symbols versus types in unused-value warnings.
9172
9173 * configure.ac (AC_INIT): Bump version number.
9174
9175 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
9176
9177 * NEWS: Version 2.1a.
9178 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
9179 since C99 requires this.
9180
9181 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
9182
9183 * m4/c-working.m4: New file.
9184 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
9185
9186 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
9187
9188 * Makefile.maint: Merge from coreutils.
9189
9190 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
9191
9192 More portability fixes for problems summarized by Nelson H. F. Beebe.
9193
9194 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
9195 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
9196 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
9197 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
9198 messes up because C++ code is compiled in 32-bit mode but linked
9199 in 64-bit mode.
9200
9201 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
9202
9203 More portability fixes for problems summarized by Nelson H. F. Beebe.
9204
9205 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
9206 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
9207
9208 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
9209 nodist_PROGRAMS, since we don't need to actually compile the
9210 example if we're just doing a plain 'make'. This avoids bothering
9211 the installer unnecessarily about problems due to weird C++
9212 compilers.
9213
9214 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
9215
9216 More portability fixes for problems summarized by Nelson H. F. Beebe.
9217
9218 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
9219 than #include "...", and compile with -I'.'. The old method was
9220 not portable, according to Posix and the C standard, and it does
9221 not work with Sun C 5.7, where previous #line directives affect
9222 the working directory used in later #include "..." directives.
9223
9224 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9225
9226 Various DJGGP specific issues in /djgpp
9227
9228 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
9229
9230 More portability fixes for problems summarized by Nelson H. F. Beebe.
9231
9232 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
9233 '#include <map>' works and that you can apply ++ to iterators.
9234
9235 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
9236
9237 Work around portability problems summarized by Nelson H. F. Beebe in
9238 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
9239
9240 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
9241 that '#include <string>' works.
9242
9243 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
9244 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
9245 "warning: sorry: semantics of inline function static data `const
9246 unsigned char translate_table[262]' are wrong (you'll wind up with
9247 multiple copies)".
9248
9249 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
9250 or, xor to not_, and_, or_, and xor_, respectively. This works
9251 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
9252 random system header somewhere that includes the equivalent of
9253 <iso646.h>.
9254
9255 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
9256 -E" works; it apparently doesn't work with PathScale EKO Compiler
9257 Suite Version 2.0.
9258
9259 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
9260
9261 During deterministic GLR operation, user actions should be able to
9262 influence the parse by changing yychar. To make this easier to fix and
9263 to make glr.c easier to evolve in general, don't maintain yytoken in
9264 parallel with yychar; just compute yytoken when needed.
9265 * tests/glr-regression.at (Incorrect lookahead during deterministic
9266 GLR): Check that setting yychar in a user action has the intended
9267 effect.
9268 * data/glr.c (yyGLRStack): Remove yytokenp member.
9269 (yyclearin): Don't set *yytokenp.
9270 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
9271 yychar rather than *yytokenp to determine the current lookahead.
9272 Compute yytoken locally when needed.
9273 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
9274 point to.
9275
9276 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
9277 after `--report' documentation.
9278
9279 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
9280
9281 * src/parse-gram.y (grammar_declaration): Location of printer
9282 symbol is @1, not list->location. Bug reported by twlevo.
9283 * tests/input.at (Incompatible Aliases): Adjust to above change.
9284
9285 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
9286
9287 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
9288 all the test at once. This makes the output easier to read in the
9289 normal case.
9290
9291 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
9292 got from <http://bro-ids.org/download.html>. The bug is that
9293 when two actions appeared in succession, the second one was
9294 scanned before the first one was added to the grammar rule
9295 as a midrule action. Bison then output the incorrect warning
9296 "parse.y:905.17-906.36: warning: unused value: $3".
9297 * src/parse-gram.y (BRACED_CODE, action): These are no longer
9298 associated with a value.
9299 (rhs): Don't invoke grammar_current_rule_action_append.
9300 (action): Invoke it here instead.
9301 * src/reader.c (grammar_midrule_action): Now extern.
9302 (grammar_current_rule_action_append): Don't invoke
9303 grammar_midrule_action; that is now the scanner's job.
9304 * src/reader.h (last_string, last_braced_code_loc):
9305 (grammar_midrule_action): New decls.
9306 * src/scan-gram.l (last_string): Now extern, sigh.
9307 (last_braced_code_loc): New extern variable.
9308 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
9309 rule already has an action.
9310 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
9311 * tests/input.at (AT_CHECK_UNUSED_VALUES):
9312 Add some tests to check that the above changes fixed the bug.
9313
9314 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
9315
9316 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
9317 All used changed. Check whether the symbol has a destructor,
9318 not whether it is typed.
9319 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
9320 that the values are still reported as unused. All line numbers
9321 adjusted.
9322
9323 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
9324
9325 Work around a bug in bro 0.8, which underparenthesizes its
9326 definition of YYLLOC_DEFAULT.
9327 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
9328 their arguments.
9329 * data/lalr1.cc: Likewise.
9330 * data/yacc.cc: Likewise.
9331
9332 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
9333
9334 Work around a bug in Pike 7.0, and give the Pike folks a
9335 better way to override the usual int widths.
9336 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
9337 user can override the types.
9338 (short): #undef, to work around a bug in Pike 7.0.
9339 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
9340 (union yyalloc.yyss): Use yytype_int16 rather than short.
9341 All uses changed.
9342 (yysigned_char): Remove.
9343 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
9344 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
9345 * tests/regression.at (Web2c Actions): Adjust to above changes.
9346
9347 * src/reader.c (check_and_convert_grammar): New function.
9348 (reader): Close the input file even if something went wrong during
9349 parsing. Minor file descriptor leak reported by twlevo.
9350
9351 * src/assoc.c (assoc_to_string): Use a default: abort (); case
9352 to pacify gcc -Wswitch-default.
9353 * src/scan-gram.l (adjust_location): Use a default: break; case
9354 to pacify gcc -Wswitch-default.
9355 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
9356 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
9357 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
9358 Move these decls to scan-skel.l, since they don't need to be
9359 visible elsewhere.
9360 * src/scan-skel.l: Accept the above decls.
9361 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
9362 is used.
9363
9364 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
9365
9366 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
9367 since we don't want to insist on a version number at the start
9368 of the changelog every time.
9369 * Makefile.maint: Sync from coreutils a bit better.
9370 (sc_trailing_blank): Renamed from sc_trailing_space.
9371 All uses changed.
9372 (sc_no_if_have_config_h, sc_require_config_h):
9373 (sc_prohibit_assert_without_use): New rules.
9374 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
9375 (sc_dd_max_sym_length): Fix leading spaces in rule.
9376 (sc_system_h_headers): Prefix with @.
9377 (sc_useless_cpp_parens, m4-check): Output line numbers.
9378 (changelog-check): Allow version only in head.
9379 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
9380 satisfy new Makefile.maint rule.
9381 * data/glr.c: Likewise.
9382 * data/glr.cc: Likewise.
9383 * data/lalr1.cc: Likewise.
9384 * data/yacc.c: Likewise.
9385 * lib/ebitsetv.c: Likewise.
9386 * lib/lbitset.c: Likewise.
9387 * lib/subpipe.c: Likewise.
9388 * lib/timevar.c: Likewise.
9389 * src/system.h: Likewise.
9390 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
9391 * djgpp/Makefile.maint: Add copyright notice.
9392 * djgpp/README.in: Likewise.
9393 * djgpp/config.bat: Likewise.
9394 * djgpp/config.site: Likewise.
9395 * djgpp/config_h.sed: Likewise.
9396 * djgpp/djunpack.bat: Likewise.
9397 * djgpp/config.sed: Fix copyright notice to match standard format.
9398 * djgpp/subpipe.h: Likewise.
9399 * lib/bitsetv-print.c: Likewise.
9400 * lib/bitsetv.c: Likewise.
9401 * lib/subpipe.h: Likewise.
9402 * lib/timevar.c: Likewise.
9403 * lib/timevar.h: Likewise.
9404 * djgpp/subpipe.c: Use standard recipe for config.h.
9405 * lib/abitset.c: Likewise.
9406 * lib/bitset.c: Likewise.
9407 * lib/bitset_stats.c: Likewise.
9408 * lib/bitsetv-print.c: Likewise.
9409 * lib/bitsetv.c: Likewise.
9410 * lib/ebitsetv.c: Likewise.
9411 * lib/get-errno.c: Likewise.
9412 * lib/lbitset.c: Likewise.
9413 * lib/subpipe.c: Likewise.
9414 * lib/timevar.c: Likewise.
9415 * lib/vbitset.c: Likewise.
9416 * tests/local.at: Likewise.
9417 * src/scan-gram.l: Don't include verify.h, since system.h does
9418 that for us.
9419 * .x-sc_require_config_h: New file.
9420 * .x-sc_unmarked_diagnostics: New file.
9421
9422 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
9423
9424 Be a bit more systematic about using 'abort'.
9425 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
9426 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
9427 Put 'default: abort ();' before some other case, to satisfy older
9428 pedantic compilers.
9429 * lib/bitset_stats.c (bitset_stats_init): Likewise.
9430 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
9431 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
9432 * src/conflicts.c (resolve_sr_conflict): Likewise.
9433 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
9434 (get_decision_str, get_orientation_str, get_node_alignment_str):
9435 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
9436 (get_linestyle_str, get_arrowstyle_str): Likewise.
9437 * src/conflicts.c (resolve_sr_conflict):
9438 Use a default case rather than one for the one remaining enum
9439 value, to catch invalid enum values as well.
9440 * src/lalr.c (set_goto_map, map_goto):
9441 Prefer "assert (FOO);" to "if (!FOO) abort ();".
9442 * src/nullable.c (nullable_compute, token_definitions_output):
9443 Likewise.
9444 * src/reader.c (packgram, reader): Likewise.
9445 * src/state.c (transitions_to, state_new, state_reduction_find):
9446 Likewise.
9447 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
9448 (symbol_pack): Likewise.
9449 * src/tables.c (conflict_row, pack_vector): Likewise.
9450 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
9451 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
9452 * src/system.h: Don't include <assert.h>.
9453 (assert): New macro.
9454
9455 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
9456 (Destructor Decl, Parser Function, Pure Calling):
9457 Describe rules for braces inside C code more carefully.
9458
9459 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
9460
9461 Fix some porting glitches found by Nelson H. F. Beebe.
9462 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
9463 compilers that don't understand that abort () does not return.
9464 * src/state.c (transitions_to): Likewise.
9465 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
9466 that '#include <cstdlib>' works.
9467 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
9468 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
9469 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
9470 for the benefit of some pre-C99 compilers.
9471
9472 * bootstrap: Undo changes to gnulib files that autoreconf made.
9473
9474 Minor fixups to get 'make maintainer-check' to work.
9475 * configure.ac: Don't use -Wnested-externs, as it's incompatible
9476 with the new verify.h implementation.
9477 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
9478 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
9479 * data/yacc.c (YYUSE): Likewise.
9480 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
9481 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
9482 * src/parse-gram.y (declaration): Don't pass a string constant
9483 to a function that expects char *, since GCC might complain
9484 about the constant value.
9485 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
9486 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
9487 before #defining them.
9488 * tests/glr-regression.at
9489 (Incorrectly initialized location for empty right-hand side in GLR):
9490 In yyerror, use the msg arg.
9491 (Corrupted semantic options if user action cuts parse):
9492 (Incorrect lookahead during deterministic GLR):
9493 (Incorrect lookahead during nondeterministic GLR):
9494 Don't name a local var 'index'; it shadows string.h's 'index'.
9495
9496 2006-01-19 Akim Demaille <akim@epita.fr>
9497
9498 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
9499 location, not just parts of it.
9500
9501 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
9502
9503 * NEWS: Document the fact that multiple %unions are now allowed.
9504 * doc/bison.texinfo (Union Decl): Likewise.
9505 * TODO: This feature is now implemented, so remove it from
9506 the wishlist.
9507
9508 * Makefile.maint: Merge with coreutils Makefile.maint.
9509 (CVS_LIST): Use build-aux version if available.
9510 (VERSION_REGEXP): New macro.
9511 (syntax-check-rules): Add sc_no_if_have_config_h,
9512 sc_prohibit_assert_without_use, sc_require_config_h,
9513 sc_useless_cpp_parens.
9514 (sc_obsolete_symbols): Check for O_NDELAY.
9515 (sc_dd_max_sym_length): Track coreutils.
9516 (sc_unmarked_diagnostics): Look in all files, not just *.c.
9517 (sc_useless_cpp_parens): New rule.
9518 (news-date-check): Look for version or today's date.
9519 (changelog-check): Don't require version number near head.
9520 (copyright-check): Use current year instead of hardwiring 2005.
9521 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
9522 (announcement): Add --gpg-key-ID.
9523
9524 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
9525 with "file system".
9526
9527 Avoid undefined behavior that addressed just before the start of an
9528 array. Problem reported by twlevo.
9529 * src/reader.c (packgram): Prepend a new sentinel before ritem.
9530 * src/lalr.c (build_relations): Rely on new sentinel.
9531 * src/gram.c (gram_free): Adjust to new sentinel.
9532
9533 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
9534
9535 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
9536 yylookaheadNeeds. All uses updated.
9537 (yysplitStack): Rename local yynewLookaheadStatuses to
9538 yynewLookaheadNeeds.
9539 * data/glr-regression.at (Incorrect lookahead during nondeterministic
9540 GLR): In comments, change `lookahead status' to `lookahead need'.
9541
9542 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9543
9544 * data/glr.c (yysplitStack): A little stylistic rewrite.
9545
9546 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9547
9548 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
9549
9550 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
9551
9552 * doc/bison.texinfo: Fix some typos.
9553 (GLR Semantic Actions): New subsection discussing special
9554 considerations because GLR semantic actions might be deferred.
9555 (Actions): Mention look-ahead usage of yylval.
9556 (Actions and Locations): Mention look-ahead usage of yylloc.
9557 (Special Features for Use in Actions): Add YYEOF entry and mention it
9558 in the yychar entry.
9559 In the yychar entry, remove mention of the local yychar case (pure
9560 parser) since this is irrelevant information when writing semantic
9561 actions and since it's already discussed in `Table of Symbols' where
9562 yychar is otherwise described as an external variable.
9563 In the yychar entry, don't call it the `current' look-ahead since it
9564 isn't when semantic actions are deferred.
9565 In the yychar and yyclearin entries, add note about deferred semantic
9566 actions.
9567 Add yylloc and yylval entries discussing look-ahead usage.
9568 (Look-Ahead Tokens): When discussing yychar, don't call it the
9569 `current' look-ahead, and do mention yylval and yylloc.
9570 (Error Recovery): Cross-reference `Action Features' when mentioning
9571 yyclearin.
9572 (Table of Symbols): In the yychar entry, don't call it the `current'
9573 look-ahead.
9574 In the yylloc and yylval entries, mention look-ahead usage.
9575
9576 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
9577
9578 * tests/glr-regression.at: Update copyright year to 2006.
9579
9580 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
9581
9582 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
9583 use during nondeterministic operation to track which stacks have
9584 actually needed the current lookahead.
9585 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
9586 Allocate, deallocate, resize, and otherwise shuffle space for
9587 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
9588 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
9589 appropriately during nondeterministic operation.
9590 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
9591 members to store the current lookahead to be used by the deferred
9592 user action.
9593 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
9594 from which the RHS is taken. Set the lookahead members of the new
9595 yySemanticOption according to the lookahead status for stack yyk.
9596 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
9597 yyaddDeferredAction.
9598 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
9599 members of yySemanticOption before invoking yyuserAction, and then set
9600 them back to their current values afterward.
9601 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
9602 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
9603 * tests/glr-regression.at: Remove `.' from the ends of recent test case
9604 titles for consistency.
9605 (Leaked merged semantic value if user action cuts parse): In order to
9606 suppress lint warnings, use arguments in merge function, and assign
9607 char value < 128 in main.
9608 (Incorrect lookahead during deterministic GLR): New test case.
9609 (Incorrect lookahead during nondeterministic GLR): New test case.
9610
9611 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
9612
9613 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
9614 !yyvaluep as signal that no semantic value is available to print.
9615 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
9616 to print a semantic value.
9617
9618 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
9619
9620 * tests/glr-regression.at: For consistency with my newer test cases,
9621 don't thank myself.
9622
9623 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
9624
9625 * data/glr.c (yyresolveValue): When merging semantic options, if at
9626 least one user action succeeds but a later one cuts the parse, then
9627 destroy the semantic value before returning rather than leaking it.
9628 (yyresolveStates): If a user action cuts the parse and thus
9629 yyresolveValue fails, ignore the (unset) semantic value rather than
9630 corrupting the yyGLRState, and empty the semantic options list since
9631 the user actions should have called all necessary destructors.
9632 Simplify code with YYCHK.
9633 * tests/glr-regression.at (Corrupted semantic options if user action
9634 cuts parse): New test case.
9635 (Undesirable destructors if user action cuts parse): New test case.
9636 Before applying any of this patch, this test case never actually failed
9637 for me... but only because the corrupted semantic options usually
9638 masked this bug.
9639 (Leaked merged semantic value if user action cuts parse): New test
9640 case.
9641
9642 2006-01-05 Akim Demaille <akim@epita.fr>
9643
9644 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
9645
9646 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
9647
9648 * data/c.m4 (b4_c_modern): New macro, with a new provision for
9649 _MSC_VER. Problem reported by Cenzato Marco.
9650 (b4_c_function_def): Use it.
9651 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
9652 b4_c_modern.
9653 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
9654 than rolling our own.
9655
9656 2006-01-04 Akim Demaille <akim@epita.fr>
9657
9658 Also warn about non-used mid-rule values.
9659 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
9660 member.
9661 (symbol_list_new): Adjust.
9662 * src/reader.c (symbol_typed_p): New.
9663 (grammar_rule_check): Use it.
9664 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
9665 Check its rule.
9666 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
9667 Use it.
9668 * tests/actions.at (Exotic Dollars): Adjust.
9669
9670 2006-01-04 Akim Demaille <akim@epita.fr>
9671
9672 * src/reader.c (grammar_midrule_action): If $$ is set in a
9673 mid-rule, move the `used' bit to its lhs.
9674 * tests/input.at (Unused values): New.
9675 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
9676
9677 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
9678
9679 * doc/bison.texinfo (Bison Options): Say more accurately what
9680 --yacc does.
9681 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
9682 about declarations in the grammar when in Yacc mode, as POSIX does
9683 not require a diagnostic when the grammar uses extensions.
9684
9685 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
9686
9687 Warn about dubious constructions like "%token T T".
9688 Reported by twlevo.
9689 * src/symtab.h (struct symbol.declared): New member.
9690 * src/symtab.c (symbol_new): Initialize it to false.
9691 (symbol_class_set): New arg DECLARING, specifying whether
9692 this is a declaration that we want to warn about, if there
9693 is more than one of them. All uses changed.
9694
9695 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
9696 Allow multiple %union directives, whose contents concatenate.
9697 * src/parse-gram.y (grammar_declaration): Likewise.
9698 Use muscle_code_grow, so that we don't need stype_line any more.
9699 All uses changed.
9700
9701 * src/muscle_tab.c (muscle_grow): Fix comment.
9702
9703 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
9704 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
9705 Update copyright year to 2006.
9706
9707 2006-01-03 Akim Demaille <akim@epita.fr>
9708
9709 Have glr.cc pass (some of) the calc.at tests.
9710 * data/glr.cc (b4_parse_param_orig): New.
9711 (b4_parse_param): Improve its definition, and bound it more
9712 clearly in the skeleton.
9713 (b4_epilogue): Append, instead of prepending, in order to keep
9714 #line consistency.
9715 Simplify the generation of auxiliary functions: locations and
9716 purity are mandated.
9717 (b4_global_tokens_and_yystype): Honor it.
9718 * data/location.cc (c++.m4): Don't include it.
9719 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
9720 and AT_SKEL_CC_IF.
9721 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
9722 AT_LALR1_CC_IF.
9723 Be sure to initialize the first position's filename.
9724 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
9725 mandated anyway.
9726 (AT_CHECK_CALC_GLR_CC): New.
9727 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
9728
9729 2006-01-02 Akim Demaille <akim@epita.fr>
9730
9731 * src/output.c (output_skeleton): Don't hard wire the inclusion of
9732 c.m4.
9733 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
9734 * data/glr.cc: Do not include stack.hh.
9735
9736 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
9737
9738 * data/glr.c: Reformat whitespace with tabs.
9739 (b4_lpure_formals): Remove this unused m4 macro.
9740 * tests/cxx-type.at: Reformat whitespace with tabs.
9741 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
9742 since it's a member. Rename type to isNterm for clarity.
9743
9744 2005-12-29 Akim <akim@sulaco.local>
9745
9746 Let glr.cc catch up with symbol_value_print.
9747 * data/glr.cc (b4_yysymprint_generate): Replace by...
9748 (b4_yy_symbol_print_generate): this.
9749 (yy_symbol_print, yy_symbol_value_print): Declare them.
9750
9751 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
9752
9753 * src/location.h (boundary): Note that a line or column equal
9754 to INT_MAX indicates an overflow.
9755 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
9756 (rule_length_overflow, increment_rule_length, add_column_width):
9757 New functions.
9758 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
9759 (<SC_BRACED_CODE>"}"):
9760 Use increment_rule_length rather than incrementing it by hand.
9761 (adjust_location, handle_syncline): Diagnose overflow.
9762 (handle_action_dollar, handle_action_at):
9763 Fix bug with monstrosities like $-2147483648.
9764 Remove now-unnecessary checks.
9765 (scan_integer): Verify assumptions and remove now-unnecessary checks.
9766 (convert_ucn_to_byte): Verify assumptions.
9767 (handle_syncline): New arg LOC. All callers changed.
9768 Don't store through a value derived from char const * pointer.
9769
9770 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
9771 GCC warnings.
9772
9773 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
9774
9775 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
9776 Remove unnecessary forward static decls.
9777
9778 2005-12-27 Akim Demaille <akim@epita.fr>
9779
9780 * src/reader.c (grammar_current_rule_check): Also check that $$
9781 is used.
9782 Take the rule to check as argument, hence rename as...
9783 (grammar_rule_check): this.
9784 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
9785 Rename as...
9786 (grammar_rule_begin, grammar_rule_end): these, for consistency.
9787 (grammar_midrule_action, grammar_symbol_append): Now static.
9788 * tests/torture.at (input): Don't rely on the default action
9789 being always performed.
9790 * tests/calc.at: "Set" $$ even when the action is "cut" with
9791 YYERROR or other.
9792 * tests/actions.at (Exotic Dollars): Instead of using unused
9793 values, check that the warning is issued.
9794
9795 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
9796
9797 * NEWS: Improve wording for unused-value warnings.
9798
9799 2005-12-22 Akim Demaille <akim@epita.fr>
9800
9801 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
9802 (b4_yysymprint_generate): Rename as...
9803 (b4_yy_symbol_print_generate): this.
9804 Generate yy_symbol_print instead of yysymprint.
9805 Generate also yy_symbol_value_print, and use it.
9806
9807 2005-12-22 Akim Demaille <akim@epita.fr>
9808
9809 * NEWS: Warn about unused values.
9810 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
9811 a `used' member.
9812 (symbol_list_n_get, symbol_list_n_used_set): New.
9813 (symbol_list_n_type_name_get): Use symbol_list_n_get.
9814 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
9815 * src/reader.c (grammar_current_rule_check): Check that values are
9816 used.
9817 * src/symtab.c (symbol_print): Accept 0.
9818 * tests/existing.at: Remove the type information.
9819 Empty the actions.
9820 Remove useless actions (beware of mid-rule actions: perl -000
9821 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
9822 * tests/actions.at (Exotic Dollars): Use unused values.
9823 * tests/calc.at: Likewise.
9824 * tests/glr-regression.at (No users destructors if stack 0 deleted):
9825 Likewise.
9826
9827 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
9828 rule_useful_p.
9829
9830 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
9831
9832 Undo 2005-12-01 tentative license wording change. The wording is
9833 still being reviewed by the lawyers, and we don't want to wait for
9834 them before publishing a test release. For now, revert to the
9835 previous wording.
9836 * NEWS: Undo 2005-12-01 change.
9837 * data/glr.c: Revert to previous license wording.
9838 * data/glr.cc: Likewise.
9839 * data/lalr1.cc: Likewise.
9840 * data/location.cc: Likewise.
9841 * data/yacc.c: Likewise.
9842
9843 * NEWS: Reword %destructor vs YYABORT etc.
9844 * data/glr.c: Use American spacing, for consistency.
9845 * data/glr.cc: Likewise.
9846 * data/lalr1.cc: Likewise.
9847 * data/yacc.c: Likewise.
9848 * data/yacc.c: Reformat comments slightly.
9849 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
9850 for consistency. Fix some spelling errors and reword recently-included
9851 text slightly.
9852 * tests/cxx-type.at: Cast results of malloc, for C++.
9853
9854 2005-12-21 Joel E. Denny <address@hidden>
9855
9856 * tests/cxx-type.at: Construct a tree, count the parents of shared
9857 nodes, and free each node once and only once. Previously, the memory
9858 for semantic values was leaked instead.
9859
9860 2005-12-21 Joel E. Denny <address@hidden>
9861
9862 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
9863 (yylval, yylloc): If pure, #define to yystackp->yyval and
9864 yystackp->yyloc similar to yychar and yynerrs.
9865 (yyparse): If pure, remove local yylval and yylloc. Add local
9866 yystackp to accommodate pure definitions of yylval and yylloc.
9867 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
9868 yylvalp and yyllocp to &yylval and &yylloc.
9869 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
9870 namespace. Previously, nerrs and char were missing, but lval and lloc
9871 weren't necessary.
9872 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
9873 yylvalp and yyllocp parameters since, if pure, these are now always
9874 accessible through yystackp. If not pure, they are still accessible
9875 globally.
9876 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
9877 `if (YYID (N))' to pacify lint.
9878
9879 2005-12-21 Akim Demaille <akim@epita.fr>
9880
9881 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
9882 destroy the RHS symbols of a rule.
9883 * data/yacc.c (yylen): Initialize to 0.
9884 Keep its value to the number of items to possibly shift.
9885 In particular, a regular successful parse that ends on YYFINAL by
9886 a (internal) YYACCEPT must not have yylen != 0.
9887 (yyerrorlab, yyreturn): Pop the RHS.
9888 Reorder a bit to emphasize the `shifting' bits of code.
9889 (YYPOPSTACK): Now accept a number of items to pop.
9890 * data/lalr1.cc: Likewise.
9891 * data/glr.c: Formatting changes.
9892 Use goto instead of fall through.
9893 * doc/bison.texinfo (Destructor Decl): Complete.
9894
9895 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9896
9897 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
9898 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
9899 * djgpp/config.bat: Replace every occurence of the file name
9900 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
9901 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
9902 * djgpp/config.sed: Replace every occurence of the file name
9903 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
9904 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
9905 * djgpp/djunpack.bat: DJGPP specific file.
9906 * djgpp/fnchange.lst: DJGPP specific file.
9907 * djgpp/README.in: Add new information about how to unpack the bison
9908 source on MSDOS and other systems which have 8.3 file name restrictions
9909 using djunpack.bat and fnchange.lst.
9910
9911 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
9912
9913 * bootstrap (build_cvs_prefix): Remove; unused.
9914 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
9915 when getting gnulib.
9916
9917 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
9918
9919 * data/glr.c: Reorder typedef declarations for structs to match order
9920 of struct declarations.
9921 Rename yystack everywhere to yystackp except in yyparse where it's not
9922 a pointer.
9923 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
9924 consistency.
9925 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
9926 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
9927 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
9928 lint.
9929
9930 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
9931
9932 * tests/sets.at (Accept): Fix typos in regular expression used to
9933 sed out the final state number.
9934
9935 Work around portability problem on Solaris 10: flex-generated
9936 files include <stdio.h> before <config.h>, which messes up
9937 because the latter defines __EXTENSIONS__. Address the problem
9938 by creating two new little files that include <config.h> first,
9939 then include the flex-generated files. Rewrite everyone else
9940 to include <config.h> first, as well.
9941 * lib/timevar.c: Always include "config.h".
9942 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
9943 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
9944 (EXTRA_bison_SOURCES): New macro.
9945 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
9946 * src/system.h: Don't include config.h.
9947 * src/LR0.c: Include <config.h> first.
9948 * src/assoc.c: Likewise.
9949 * src/closure.c: Likewise.
9950 * src/complain.c: Likewise.
9951 * src/conflicts.c: Likewise.
9952 * src/derives.c: Likewise.
9953 * src/files.c: Likewise.
9954 * src/getargs.c: Likewise.
9955 * src/gram.c: Likewise.
9956 * src/lalr.c: Likewise.
9957 * src/location.c: Likewise.
9958 * src/main.c: Likewise.
9959 * src/muscle_tab.c: Likewise.
9960 * src/nullable.c: Likewise.
9961 * src/output.c: Likewise.
9962 * src/parse-gram.y: Likewise.
9963 * src/print.c: Likewise.
9964 * src/print_graph.c: Likewise.
9965 * src/reader.c: Likewise.
9966 * src/reduce.c: Likewise.
9967 * src/relation.c: Likewise.
9968 * src/state.c: Likewise.
9969 * src/symlist.c: Likewise.
9970 * src/symtab.c: Likewise.
9971 * src/tables.c: Likewise.
9972 * src/uniqstr.c: Likewise.
9973 * src/vcg.c: Likewise.
9974
9975 * src/parse-gram.y: Fix minor problems uncovered by lint.
9976 (current_lhs, current_lhs_location): Now static.
9977 (current_assoc): Remove unused variable.
9978
9979 Cleanups so that Bison-generated parsers have less lint.
9980 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
9981 Prepend /*ARGSUSED*/, for lint's sake.
9982 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
9983 definition if 'lint' is defined.
9984 (YYID): New macro (or function, if lint).
9985 All uses of /*CONSTCOND*/0 replaced by YYID(0).
9986 * data/yacc.c: Likewise.
9987 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
9988 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
9989 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
9990 is C++ only.
9991 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
9992 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
9993 Use YYID(0) rather than 0, for lint.
9994 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
9995 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
9996
9997 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
9998
9999 * tests/glr-regression.at
10000 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10001 Close memory leak reported by twlevo.
10002
10003 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
10004
10005 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
10006 all stacks.
10007 (yyparse): Iterate another stack in order to call user destructors.
10008 * tests/glr-regression.at (No users destructors if stack 0 deleted):
10009 New test case.
10010 (Duplicated user destructor for lookahead): This test now is expected
10011 to succeed.
10012
10013 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
10014
10015 * NEWS: Document the following change.
10016 * data/yacc.c: Say "parser skeleton" rather than "file", since
10017 it's no longer just a file.
10018 * data/glr.c: Grant a special exception for C GLR parsers, that
10019 reads like the already-existing exception for C LALR(1) parsers.
10020 * data/glr.cc: Likewise.
10021 * data/lalr1.cc: Likewise.
10022 * data/location.cc: Likewise.
10023 * data/yacc.c: Reword the "written by" statement to clarify that
10024 it was the parser skeleton, not the entire output file.
10025 * data/glr.c: Written by Paul Hilfinger.
10026 * data/glr.cc: Written by Akim Demaille.
10027 * data/lalr1.cc: Likewise.
10028
10029 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
10030
10031 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
10032 Fix typos in previous change that broke 'make check'.
10033 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
10034 supported in C.
10035 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
10036 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
10037 We can revert this once things settle down.
10038
10039 * src/conflicts.c (conflicts_print): Don't print file name twice
10040 when %expect fails because there were no conflicts.
10041 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
10042 change.
10043 * tests/conflicts.at (%expect not enough, %expect too much):
10044 (%expect with reduce conflicts): Adjust to new behavior.
10045
10046 2005-11-18 Akim Demaille <akim@epita.fr>
10047
10048 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
10049 errors.
10050 * NEWS: Document this.
10051 * doc/bison.texinfo (Expect Decl): Likewise.
10052
10053 2005-11-16 Akim Demaille <akim@epita.fr>
10054
10055 Generalize the display of semantic values and locations in traces.
10056 * data/glr.c (yy_reduce_print): Fix indices (again).
10057 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
10058 literal integers.
10059 * data/lalr1.cc (yyreduce_print): Rename as...
10060 (yy_reduce_print): this.
10061 Display values and locations.
10062 * data/yacc.c (yy_reduce_print): Likewise.
10063 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
10064 (yysymprint): Move higher to be visible from yy_reduce_print).
10065 (yyparse): Adjust.
10066 * tests/calc.at: Adjust the expected length of the traces.
10067
10068 2005-11-14 Akim Demaille <akim@epita.fr>
10069
10070 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
10071 from 1 to N, while values and location start at 0.
10072 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
10073
10074 2005-11-14 Akim Demaille <akim@epita.fr>
10075
10076 * data/glr.c (yy_reduce_print): Fix the $ number.
10077
10078 2005-11-14 Akim Demaille <akim@epita.fr>
10079
10080 "Use" parse parameters.
10081 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
10082 * data/glr.c, data/glr.cc: Use them.
10083 * data/glr.c (YYUSE): Have a C++ definition that supports
10084 non-pointer types.
10085
10086 2005-11-14 Akim Demaille <akim@epita.fr>
10087
10088 * data/glr.c (yyexpandGLRStack): Declare only if defined.
10089
10090 2005-11-14 Akim Demaille <akim@epita.fr>
10091
10092 * data/glr.cc: New.
10093 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
10094
10095 2005-11-12 Akim Demaille <akim@epita.fr>
10096
10097 Let position and location be PODs.
10098 * data/location.cc (position::initialize, location::initialize): New.
10099 (position::position, location::location): Define only if
10100 b4_location_constructors is defined.
10101 * data/lalr1.cc (b4_location_constructors): Define it for backward
10102 compatibility.
10103 * doc/bison.texinfo (Initial Action Decl): Use initialize.
10104
10105 2005-11-12 Akim Demaille <akim@epita.fr>
10106
10107 * data/lalr1.cc: Move the body of the ctor and dtor into the
10108 parser file (instead of the header).
10109 Wrap the implementations in a "namespace yy".
10110
10111 2005-11-12 Akim Demaille <akim@epita.fr>
10112
10113 Have glr.c include its header file when created.
10114 * data/glr.c (b4_shared_declarations): New.
10115 Output them verbatim in the parser if !%defines, otherwise
10116 output then in the header file, and include it instead.
10117
10118 2005-11-11 Akim Demaille <akim@epita.fr>
10119
10120 * data/glr.c: Comment changes.
10121
10122 2005-11-11 Akim Demaille <akim@epita.fr>
10123
10124 When yydebug, report semantic and location values for reductions.
10125 * data/glr.c (yy_reduce_print): Report the semantic values and the
10126 locations.
10127 (YY_REDUCE_PRINT): Adjust.
10128 (yyglrReduce): Use them.
10129 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
10130 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
10131 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
10132 traces.
10133
10134 2005-11-10 Akim Demaille <akim@epita.fr>
10135
10136 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
10137 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
10138 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
10139
10140 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
10141
10142 * m4/cxx.m4, examples/Makefile.am: Don't build
10143 examples/calc++ if no C++ compiler is available. (trivial change)
10144
10145 2005-11-09 Akim Demaille <akim@epita.fr>
10146
10147 * src/scan-skel.l: Use a couple of asserts.
10148
10149 2005-11-03 Akim Demaille <akim@epita.fr>
10150
10151 In some (weird) cases, the final state number is incorrect.
10152 Reported by Alexandre Duret-Lutz.
10153 * src/LR0.c (state_list_append): Remove the computation of
10154 final_state.
10155 (save_reductions): Do it here.
10156 (get_state): Alpha conversion.
10157 (generate_states): Use a for loop.
10158 * src/gram.h (item_number_is_rule_number)
10159 (item_number_is_symbol_number): New.
10160 * src/state.c: Use assert.
10161 * src/system.h: Include assert.h.
10162 * tests/sets.at (Accept): New.
10163
10164 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10165
10166 * data/glr.c (yyfill): Adjust comment.
10167 (yyresolveAction): Initialize default location properly
10168 for empty right-hand sides.
10169 (yydoAction): Ditto.
10170 Add comment explaining apparently dead code.
10171 * tests/glr-regression.at
10172 (Incorrectly initialized location for empty right-hand side in GLR):
10173 New test.
10174
10175 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
10176
10177 * bootstrap (cleanup_gnulib): New function. Use it to clean up
10178 gnulib when interrupted. This fixes some race conditions and
10179 works around some portability problems (one noted by Paul
10180 Hilfinger).
10181
10182 2005-10-22 Akim <akim@epita.fr>
10183
10184 * Makefile.cfg: Adjust to config -> build-aux.
10185 Reported by twledo.
10186
10187 2005-10-21 Akim Demaille <akim@epita.fr>
10188
10189 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
10190 the %parse-params.
10191 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
10192 * data/yacc.c (b4_Pure_if): Rename as...
10193 (b4_yacc_pure_if): this.
10194 (YY_SYMBOL_PRINT, yyparse): Adjust.
10195 * doc/bison.texinfo: Formatting changes.
10196
10197 2005-10-21 Akim Demaille <akim@epita.fr>
10198
10199 Finish the transition config -> build-aux.
10200 * configure.ac, Makefile.am: Use build-aux.
10201 * config/prev-version, config/announce-gen, config/Makefile.am:
10202 Move to...
10203 * build-aux/prev-version, build-aux/announce-gen,
10204 * build-aux/Makefile.am: here.
10205
10206 2005-10-14 Akim Demaille <akim@epita.fr>
10207
10208 * examples/calc++/test: Use set -x only when VERBOSE.
10209
10210 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
10211
10212 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
10213 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
10214
10215 2005-10-13 Akim Demaille <akim@epita.fr>
10216
10217 * src/scan-skel.l: Output the base name parts of the parser and
10218 header file names.
10219 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
10220 additional checks.
10221 Use this to exercise C++ outputs in subdirs.
10222 Reported by Oleg Smolsky.
10223
10224 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
10225
10226 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
10227 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
10228 Problem reported by John P. Hartmann.
10229 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
10230 already defined it.
10231
10232 2005-10-12 Akim Demaille <akim@epita.fr>
10233
10234 * src/parse-gram.y (version_check): Exit 63 to please missing
10235 (stands for "version mismatch).
10236 * tests/input.at, doc/bison.texinfo: Adjust.
10237
10238 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
10239
10240 Work around portability problems with Visual Age C compiler
10241 (xlc and xlC_r) reported by John P. Hartmann.
10242 * data/location.cc (initial_column, initial_line): Remove.
10243 All uses replaced by 0 and 1.
10244 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
10245 that xlc complains about.
10246 * src/scan-skel.l (skel_wrap): Likewise.
10247 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
10248 as __STDC__.
10249 * data/yacc.c (YYMODERN_C): New macro, which also looks at
10250 __STDC_VERSION__. Use it everywhere instead of looking at
10251 __STDC__ and __cplusplus.
10252
10253 2005-10-10 Akim Demaille <akim@epita.fr>
10254
10255 * examples/calc++/test: Be quiet unless VERBOSE.
10256
10257 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
10258
10259 * data/c.m4 (yydestruct, yysymprint):
10260 Use YYUSE instead of casting to void.
10261 * data/glr.c (YYUSE): New macro.
10262 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
10263 Use it instead of rolling our own.
10264 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
10265 (YYCHK1):
10266 Use /*CONSTCOND*/ to suppress lint warnings.
10267 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
10268 (YY_STACK_PRINT): Use 'false' not '0'.
10269 (YYUSE): New macro.
10270 (yysymprint_, yydestruct_): Use it instead of rolling our own.
10271 * data/yacc.c (YYUSE): New macro.
10272 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
10273 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
10274 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
10275
10276
10277 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
10278 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
10279
10280 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
10281
10282 Undo the parts of the unlocked-I/O change that substituted
10283 putc or puts for printf. This might hurt performance a bit,
10284 but some people prefer the printf style.
10285 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
10286 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
10287 All uses replaced by YYFPRINTF and YYDPRINTF.
10288 * data/yacc.c: Likewise.
10289 * lib/bitset.c (bitset_print): Likewise.
10290 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
10291 putc and puts.
10292 * lib/lbitset.c (debug_lbitset): Likewise.
10293 * src/closure.c (print_firsts, print_fderives): Likewise.
10294 * src/gram.c (grammar_dump): Likewise.
10295 * src/lalr.c (look_ahead_tokens_print): Likewise.
10296 * src/output.c (escaped_output): Likewise.
10297 (user_actions_output): Break apart two printfs.
10298 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
10299 * src/reduce.c (reduce_print): Likewise.
10300 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
10301 * src/system.h: Include unlocked-io.h rathe than stdio.h.
10302
10303 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
10304 Use assignments rather than casts-to-void to suppress
10305 unused-variable warnings. This pacifies 'lint'.
10306 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
10307 unused-variable warnings.
10308
10309 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
10310
10311 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
10312
10313 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
10314
10315 Use unlocked I/O for a minor performance improvement on hosts like
10316 GNU/Linux and Solaris that support unlocked I/O. The basic idea
10317 is to use the gnlib unlocked-io module, and to prefer putc and
10318 puts to printf when either will work (since the latter doesn't
10319 come in an unlocked flavor).
10320 * bootstrap (gnulib_modules): Add unlocked-io.
10321 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
10322 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
10323 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
10324 and similarly for puts and putc and printf.
10325 * data/yacc.c: Likewise.
10326 * lib/bitset.c (bitset_print): Likewise.
10327 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
10328 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
10329 to printf.
10330 * lib/lbitset.c (debug_lbitset): Likewise.
10331 * src/closure.c (print_firsts, print_fderives): Likewise.
10332 * src/gram.c (grammar_dump): Likewise.
10333 * src/lalr.c (look_ahead_tokens_print): Likewise.
10334 * src/output.c (escaped_output): Likewise.
10335 (user_actions_output): Coalesce two printfs.
10336 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
10337 * src/reduce.c (reduce_print): Likewise.
10338 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
10339 * src/system.h: Include unlocked-io.h rather than stdio.h.
10340
10341 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
10342 this confuses xgettext.
10343
10344 2005-10-02 Akim Demaille <akim@epita.fr>
10345
10346 * bootstrap (gnulib_modules): Add strverscmp.
10347 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
10348 * m4/.cvsignore: Add strverscmp.m4.
10349 * src/parse-gram.y (%require): New token, new rule.
10350 (version_check): New.
10351 * src/scan-gram.l (%require): Adjust.
10352 * tests/input.at (AT_REQUIRE): New.
10353 Use it.
10354 * doc/bison.texinfo (Require Decl): New.
10355 (Calc++ Parser): Use %require.
10356
10357 2005-10-02 Akim Demaille <akim@epita.fr>
10358
10359 * data/location.cc: New.
10360
10361 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
10362 Akim Demaille <akim@epita.fr>
10363
10364 Make sure -odir/foo.cc creates dir/location.hh etc.
10365 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
10366 (spec_file_prefix, spec_verbose_file, spec_graph_file)
10367 (spec_defines_file): Now const.
10368 (dir_prefix): New.
10369 (short_base_name): Remove.
10370 * src/files.c: Adjust.
10371 (dirname.h): Include.
10372 (base_name): Don't prototype it.
10373 (finput): Remove, duplicates gram_in.
10374 (full_base_name, short_base_name): Replace by...
10375 (all_but_ext, all_but_tab_ext): these.
10376 (compute_base_names): Rename as...
10377 (compute_file_name_parts): this.
10378 Update to compute the new variables, including dir_prefix.
10379 Adjust dependencies.
10380 * src/output.c (prepare): Output them.
10381 * src/reader.c: Adjust to use gram_in, not finput.
10382 * src/scan-skel.l (@dir_prefix@): New.
10383
10384 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
10385
10386 * lib/subpipe.c: New function end_of_output_subpipe() added
10387 to allow support for non-posix systems. This is a no-op function
10388 for posix systems.
10389
10390 * lib/subpipe.h: New function end_of_output_subpipe() added
10391 to allow support for non-posix systems. This is a no-op function
10392 for posix systems.
10393
10394 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
10395 handle the lack of pipe/fork functionality on non-posix systems.
10396
10397 * djgpp/Makefile.maint: DJGPP specific file.
10398
10399 * djgpp/README.in: DJGPP specific file.
10400
10401 * djgpp/config.bat: DJGPP specific configuration file.
10402
10403 * djgpp/config.sed: DJGPP specific configuration file.
10404
10405 * djgpp/config.site: DJGPP specific configuration file.
10406
10407 * djgpp/config_h.sed: DJGPP specific configuration file.
10408
10409 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
10410
10411 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
10412
10413 2005-10-02 Akim Demaille <akim@epita.fr>
10414
10415 * data/location.cc: New, extract from...
10416 * data/lalr1.cc: here.
10417 (location.hh): Include it after the user prologue, in case the
10418 filename type is defined by the user.
10419 Forward declation location and position before the pre-prologue.
10420 (yyresult_): Rename as...
10421 (yyresult): this, it's a local variable, not an attribute.
10422 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
10423
10424 2005-10-01 Akim Demaille <akim@epita.fr>
10425
10426 * examples/extexi: Restore the #line generation.
10427
10428 2005-09-30 Akim Demaille <akim@epita.fr>,
10429 Alexandre Duret-Lutz <adl@gnu.org>
10430
10431 Move the token type and YYSTYPE in the parser class.
10432 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
10433 (parser::token): New, from the moved free definition of tokens.
10434 (parser::semantic_value): Now a full definition instead of an
10435 indirection to YYSTYPE.
10436 (b4_post_prologue): No longer included in the header file, but
10437 in the implementation file.
10438 * doc/bison.texi (C+ Language Interface): Update.
10439 * src/parse-gram.y: Support unary %define.
10440 * tests/actions.at: Define global_tokens_and_yystype for backward
10441 compatibility until we update the tests.
10442 * tests/calc.at: Idem.
10443 (first_line, first_column, last_line, last_column): Define for lalr1.cc
10444 to simplify the code.
10445
10446 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
10447
10448 Port to SunOS 4.1.4, which lacks strtoul and strerror.
10449 Ah, the good old days! Problem reported by Peter Klein.
10450 * bootstrap (gnulib_modules): Add strerror, strtoul.
10451 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
10452 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
10453
10454 2005-09-29 Akim Demaille <akim@epita.fr>
10455
10456 * data/c.m4 (b4_error_verbose_if): New.
10457 * data/lalr1.cc: Use it.
10458 (YYERROR_VERBOSE_IF): Remove.
10459 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
10460 parser members, replaced by...
10461 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
10462 local variables.
10463 (yysyntax_error_): Takes the state number as argument.
10464 (yyreduce_print_): Use the argument yyrule, not the former
10465 attribute yyn_.
10466
10467 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
10468
10469 * bootstrap (gnulib_modules): Add verify.
10470 * lib/.cvsignore: Add verify.h.
10471 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
10472 * src/system.h (verify): Remove.
10473 Include verify.h instead.
10474 * src/tables.c (tables_generate): Use new API for 'verify'.
10475
10476 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
10477
10478 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
10479 local variables whose names begin with 'yy'.
10480 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
10481 Trivial changes from Joel E. Denny.
10482
10483 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
10484 it itself.
10485 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
10486 don't use alloca any more.
10487
10488 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
10489 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
10490 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
10491 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
10492 to match yacc.c, to test more hosts.
10493
10494 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
10495
10496 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
10497 doesn't affect behavior.
10498 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
10499 Solaris, AIX, MSC.
10500 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
10501 This works a bit better with glibc, if user code has already included
10502 stdlib.h.
10503 * doc/bison.texinfo (Bison Parser): Document that users can't
10504 arbitrarily use malloc and free for other purposes. Document
10505 that <alloca.h> and <malloc.h> might be included.
10506 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
10507 user must declare alloca.
10508
10509 * HACKING (release): Forwarn the Translation Project about
10510 stable releses.
10511
10512 2005-09-20 Akim Demaille <akim@epita.fr>
10513
10514 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
10515
10516 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
10517
10518 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
10519 (YYSTACK_ALLOC_MAXIMUM): Use it.
10520 (yysyntax_error): New function.
10521 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
10522 multiple syntax errors are reported, and alloca is being used.
10523 Instead, reallocate buffers twice as big each time, so that
10524 we waste at most half the allocated memory. Start with a small
10525 (128-byte) buffer that will suffice in most cases anyway.
10526 Use yysyntax_error to do most of the work.
10527
10528 * doc/bison.texinfo (Error Reporting, Table of Symbols):
10529 yynerrs is the number of errors reported, not the number of
10530 errors encountered.
10531
10532 * tests/glr-regression.at (Duplicated user destructor for lookahead):
10533 Mark it as expected to fail.
10534 Cast result of malloc; problem reported by twlevo@xs4all.nl.
10535 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
10536 Don't start user-code symbols with "yy", to avoid name space problems.
10537
10538 2005-09-19 Akim Demaille <akim@epita.fr>
10539
10540 Remove the traits, failed experiment.
10541 It never proved useful, and anyway because of the current
10542 definition, it was not possible to have several specialization of
10543 this traits, making it useless.
10544 * data/lalr1.cc (yy:traits): Remove.
10545 Inline its definitions in the parser class.
10546
10547 2005-09-19 Akim Demaille <akim@epita.fr>
10548
10549 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
10550 least Mac OSX with a /usr/local install of gettext.
10551
10552 2005-09-19 Akim Demaille <akim@epita.fr>
10553
10554 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
10555 and yytoken for similarity with the other skeletons.
10556
10557 2005-09-19 Akim Demaille <akim@epita.fr>
10558
10559 * NEWS, configure.ac: update version number to 2.1a.
10560
10561 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
10562
10563 * NEWS: Version 2.1.
10564
10565 * NEWS: Remove notice of yytname change, since it was never in an
10566 official release.
10567 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
10568 diagnostic.
10569 * src/output.c (prepare): Likewise.
10570 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
10571 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
10572 is not defined. This is an awful hack, but it's enough for now.
10573 All callers changed.
10574 * tests/glr-regression-at (make_value): Args are const pointers now,
10575 to avoid GCC warning.
10576 (Duplicated user destructor for lookahead): New test. Currently
10577 skipped. It fails on my host but I'm not sure it'll always fail.
10578
10579 2005-09-16 Akim Demaille <akim@epita.fr>
10580
10581 * src/symtab.h (struct symbol): Declare the printer and destructor
10582 as const, to avoid accidental calls to free.
10583 (symbol_destructor_set, symbol_printer_set): Adjust.
10584 * src/symtab.c: Adjust.
10585
10586 2005-09-16 Akim Demaille <akim@epita.fr>
10587
10588 * data/c.m4 (b4_token_enums): New.
10589 (b4_token_defines): Rename as...
10590 (b4_token_enums_defines): this.
10591 (b4_token_defines): New, output only the #defines.
10592 * data/yacc.c, data/glr.c: Adjust.
10593 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
10594 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
10595 as default values.
10596
10597 2005-09-16 Akim Demaille <akim@epita.fr>
10598
10599 * data/lalr1.cc (yylex_): Remove, inline its code.
10600 (yyreport_syntax_error_): Remove, replaced by...
10601 (yysyntax_error_): this which returns a string and leaves to the
10602 caller the call to the users' error function.
10603 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
10604 Move from members of the parser object...
10605 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
10606 to local variables of the parse function.
10607
10608 2005-09-16 Akim Demaille <akim@epita.fr>
10609
10610 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
10611 since it's in Bison's name space.
10612
10613 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
10614
10615 * data/glr.c (yyresolveValue): Add default case to pacify
10616 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
10617
10618 * NEWS: Document when yyparse started to return 2.
10619 * doc/bison.texinfo (Parser Function): Document when yyparse
10620 returns 2.
10621
10622 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
10623 (b4_filename_type): Renamed back from b4_file_name_type. All uses
10624 changed.
10625 (class position): file_name -> filename (reverting). All uses changed.
10626
10627 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
10628
10629 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
10630 do anything if $@ exists. This reverts part of the 2005-07-07
10631 patch.
10632
10633 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
10634
10635 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
10636 contains obsolete information and isn't worth distributing as a
10637 separate file anyway.
10638 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
10639 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
10640 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
10641 (yyparse): Abort if user code uses longjmp to throw an unexpected
10642 value.
10643
10644 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
10645
10646 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
10647 Suggested by twlevo@xs4all.nl.
10648
10649 * data/glr.c (YYCHK1): Do not assume YYE is in range.
10650 This avoids a diagnostic from gcc -Wswitch-enum.
10651 Problem reported by twlevo@xs4all.nl.
10652
10653 * doc/bison.texinfo: Don't use "filename", as per GNU coding
10654 standards. Use "file name" or "file" or "name", depending on
10655 the context.
10656 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
10657 not to hack/foo.tab.c.
10658 (Calc++ Top Level): 2nd arg of main is not const.
10659 * data/glr.c: b4_filename -> b4_file_name.
10660 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
10661 All uses changed.
10662 (class position): filename -> file_name. All uses changed.
10663 * data/yacc.c: b4_filename -> b4_file_name.
10664 * lib/bitset.h: filename -> file_name in local vars.
10665 * lib/bitset_stats.c: Likewise.
10666 * src/files.c: Likewise.
10667 * src/scan-skel.l ("@output ".*\n): Likewise.
10668 * src/files.c (file_name_split): Renamed from filename_split.
10669 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
10670
10671 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
10672
10673 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
10674 to accommodate latest gnulib.
10675
10676 * tests/glr-regression.at (Duplicate representation of merged trees):
10677 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
10678
10679 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
10680 needed.
10681
10682 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
10683
10684 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
10685 All uses changed. Invoke user destructor after an error during a
10686 split parse (trivial change from Joel E. Denny).
10687
10688 * tests/glr-regression.at
10689 (User destructor after an error during a split parse): New test case.
10690 Problem reported by Joel E. Denny in:
10691 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
10692
10693 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
10694
10695 * README-cvs: Give URLs for recommended tools.
10696 Mention Gzip version problem, and bootstrapping issues.
10697 Remove troubleshooting section, as it's somewhat obsolete.
10698
10699 * bootstrap (no_cache): New var, to accommodate different wget
10700 variants. Use it instead of '-C off'. Problem reported by
10701 twlevo@xs4all.nl.
10702
10703 * data/glr.c (yydestroyStackItem): New function.
10704 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
10705 debugging information. Problem reported by Joel E. Denny.
10706
10707 2005-08-25 Akim Demaille <akim@epita.fr>
10708
10709 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
10710
10711 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
10712
10713 * data/glr.c (yyrecoverSyntaxError, yyreturn):
10714 Don't invoke destructor on unresolved entries.
10715 * tests/glr-regression.at
10716 (User destructor for unresolved GLR semantic value): New test case.
10717 Problem reported by Joel E. Denny in:
10718 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
10719
10720 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
10721
10722 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
10723 Add strnlen.c.
10724 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
10725 lib-prefix.m4, po.m4.
10726
10727 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
10728 in yydestruct diagnostic, since it might not be an error.
10729 Problem reported by Joel Denny near end of
10730 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
10731 * data/lalr1.cc (yyerturn): Likewise.
10732 * data/yacc.c (yyreturn): Likewise.
10733 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
10734
10735 * src/files.c: Remove obsolete FIXME comment.
10736
10737 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
10738 with the other templates, and to fix bogus run-on messages such
10739 as the one reported at the end of
10740 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
10741 All callers changed to avoid the newline.
10742 (yyprocessOneStack): Output two lines rather than one, to accommodate
10743 the above change. This changes the debug output format slightly.
10744
10745 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
10746 reported by Joel E. Denny in
10747 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
10748 (trivial change).
10749 * tests/glr-regression.at (Duplicate representation of merged trees):
10750 New test, from Joel E. Denny in:
10751 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
10752 * THANKS: Add Joel E. Denny.
10753
10754 * configure.ac (AC_INIT): Bump to 2.0c.
10755
10756 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
10757
10758 * NEWS: Version 2.0b.
10759
10760 * Makefile.am (SUBDIRS): Put examples before tests, so that
10761 "make check" doesn't finish with "All 1 tests passed".
10762
10763 * tests/regression.at (Token definitions): Don't rely on
10764 AT_PARSER_CHECK for data that contains backslashes. It currently
10765 uses 'echo', and 'echo' isn't portable if its argument contains
10766 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
10767 that the byte '\0xff' is not printable in the C locale; it is,
10768 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
10769 not printable, so use '\0x81' to test.
10770
10771 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
10772 version of GCC, since the macro is used with non-GCC compilers.
10773
10774 Fix core dump reported by Pablo De Napoli in
10775 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
10776 * tests/regression.at (Invalid inputs with {}): New test.
10777 * src/parse-gram.y (token_name): Translate type before using
10778 it as an index.
10779
10780 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
10781 the user's name space. All uses changed to __attribute__
10782 ((__unused__)).
10783 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
10784 Add __attribute__ ((__noreturn__)).
10785
10786 * etc/clcommit: Remove. We weren't using it, and it failed
10787 "make maintainer-distcheck".
10788 * Makefile.maint: Merge from coreutils.
10789 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
10790 (syntax-check-rules): Change list of rules as described below.
10791 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
10792 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
10793 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
10794 (sc_trailing_space): New rules.
10795 (sc_xalloc_h_in_src): Remove.
10796 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
10797 (sc_space_tab, sc_error_exit_success, sc_changelog):
10798 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
10799 (makefile-check, po-check, author_mark_check):
10800 (makefile_path_separator_check, copyright-check):
10801 Use grep -n, to make it easier to find violations.
10802 Use CVS_LIST and CVS_LIST_EXCEPT.
10803 (header_regexp, h_re): Remove.
10804 (dd_c): New macro.
10805 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
10806 (my-distcheck): Use more-modern GCC flags.
10807 (signatures, %.asc): Remove.
10808 (rel-files, announcement): Remove signatures.
10809 Restore old updating code, even though we don't use it, so
10810 that we're the same as coreutils.
10811 (alpha, beta, major): Depend on news-date-check.
10812 Make the upload commands.
10813
10814 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
10815 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
10816 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
10817 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
10818 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
10819 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
10820 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
10821 * tests/sets.at: Likewise.
10822
10823 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
10824 we comment out the Autoconf version number.
10825 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
10826 it's error-prone and "make maintainer-distcheck" rejects it.
10827
10828 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
10829 Indent calls to "error" to pacify "make maintainer-distcheck",
10830 when the calls are not intended to be translated.
10831 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
10832
10833 * src/Makefile.am (DEFS): Use +=, to pacify
10834 "make maintainer-distcheck".
10835 (bison_SOURCES): Add scan-skel.h.
10836 (sc_tight_scope): New rule, from coreutils.
10837
10838 * src/files.c (src_extension, header_extension):
10839 Now static, not extern.
10840 * src/getargs.c (short_options): Likewise.
10841 * src/muscle_tab.c (muscle_table): Likewise.
10842 * src/parse-gram.y (current_class, current_type, current_prec):
10843 Likewise.
10844 * src/reader.c (grammar_end, previous_rule_end): Likewise.
10845 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
10846 * src/main.c (main): Cast bindtextdomain and textdomain calls to
10847 void, to avoid warning when NLS is disabled.
10848 * src/output.c: Include scan-skel.h.
10849 (scan_skel): Remove decl, since scan-skel.h does this.
10850 (output_skeleton):
10851 Indent calls to "error" to pacify "make maintainer-distcheck".
10852 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
10853 * src/reader.h (gram_end, gram_lineno): New decls to pacify
10854 "make maintainer-distcheck".
10855 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
10856 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
10857 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
10858 (skel_lex_destroy, scan_skel): Move these decls to...
10859 * src/scan-skel.h: New file.
10860 * src/uniqstr.c (uniqstr_assert):
10861 Indent calls to "error" to pacify "make maintainer-distcheck".
10862
10863 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
10864 not @VAR@.
10865
10866 * tests/torture.at: Revamp to avoid misuse of atoi that
10867 "make maintainer-distcheck" complained about.
10868
10869 * examples/extexi (message): Don't print a message more than once,
10870 and omit line-number decoration that makes Emacs compile think
10871 that informative messages are worth worrying about.
10872
10873 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
10874
10875 * configure.ac: Update version number.
10876
10877 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
10878 accidentally.
10879 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
10880 autogenerated by the maintainer.
10881 * examples/calc++/.cvsignore: Add *.yy.
10882
10883 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
10884 * lib/bitset_stats.c (bitset_stats_init): Likewise.
10885 * lib/bitsetv.c (bitsetv_alloc): Likewise.
10886
10887 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
10888
10889 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
10890 from maintainer-distcheck about casting the argument of 'free'.
10891
10892 * NEWS: Mention recent yytname changes.
10893 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
10894
10895 * bootstrap: For translations that have not yet been upgraded to
10896 the new runtime-po domain, prime the pump by extracting the
10897 relevant strings from the obsolete translations. This code can be
10898 removed once the bison-runtime domain has been translated by each
10899 team.
10900
10901 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
10902 now that token names are already quoted.
10903
10904 Fix problem reported by Anthony Heading.
10905 * data/glr.c (YYTOKEN_TABLE): New macro.
10906 (yytname): Define if YYTOKEN_TABLE.
10907 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
10908 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
10909 (YYERROR_VERBOSE): Define the same way the other skeletons do.
10910 * src/output.c (prepare_symbols): Output token_table_flag.
10911
10912 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
10913
10914 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
10915 again if the first call fails.
10916
10917 * data/glr.c (yytnamerr): New function.
10918 (yyreportSyntaxError): Use it to dequote most string literals.
10919 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
10920 with other skeletons. All uses changed.
10921 (yytnameerr_): New function.
10922 (yyreport_syntax_error): Use it to dequote most string literals.
10923 * data/yacc.c (yytnamerr): New function.
10924 (yyerrlab): Use it to decode most string literals.
10925 * doc/bison.texinfo (Decl Summary, Calling Convention):
10926 Clarify quoting convention of yytname.
10927 * src/output.c (prepare_symbols): Quote all names. This undoes
10928 the 2005-04-17 change, which is now accomplished (mostly) via
10929 changes in the parsers as described above.
10930 * tests/regression.at (Token definitions, Web2c Actions):
10931 Undo most 2005-04-17 change here, too.
10932
10933 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
10934
10935 Fix more problems reported by twlevo@xs4all.nl.
10936 * tests/cxx-type.at: Don't pipe output of ./types through sed to
10937 remove trailing spaces. This loses the exit status of ./types,
10938 and isn't needed since ./types shouldn't be emitting trailing
10939 spaces.
10940 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
10941 as the stack isn't valid in that case.
10942
10943 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
10944 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
10945 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
10946 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
10947 is used.
10948 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
10949 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
10950 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
10951 Likewise.
10952
10953 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
10954 overly-picky compilers that reject 'char *foo = "bar";'.
10955
10956 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
10957 to FILE * parameter, not to stderr. This fixes a typo introduced
10958 in the 2005-07-12 change.
10959
10960 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
10961 warnings from GCC 4.
10962
10963 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
10964 (yyglrShiftDefer, yysplitStack):
10965 Remove unused parameters b4_pure_formals. All uses changed.
10966 (yyglrShift): Remove unused parameters b4_user_formals.
10967 All uses changed.
10968 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
10969
10970 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
10971
10972 Destructor cleanups and regularization among the three skeletons.
10973 * NEWS: Document the behavior changes.
10974 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
10975 stack before failing, as the cleanup code will do it for us now.
10976 * data/lalr1.cc (yyerrlab): Likewise.
10977 * data/glr.c (yyparse): Pop everything off the stack before
10978 freeing it, so that destructors get called properly.
10979 * data/lalr1.cc (yyreturn): Likewise.
10980 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
10981 This is more consistent.
10982 * doc/bison.texinfo (Destructor Decl): Mention more reasons
10983 why destructors might be called. 1.875 -> 2.1.
10984 (Destructor Decl, Decl Summary, Table of Symbols):
10985 Some English-language cleanups for %destructor.
10986 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
10987 Add output line for destructor of start symbol.
10988 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
10989 because of that same extra output line.
10990
10991 * NEWS: Document minor wording changes in diagnostics of
10992 Bison-generated parsers.
10993 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
10994 Remove unused formals. All uses changed.
10995 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
10996 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
10997 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
10998 Rename yyoverflowab to yyexhaustedlab.
10999 When memory exhaustion occurs during syntax-error reporting,
11000 report it separately rather than in a single diagnostic; this
11001 eases translation.
11002 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
11003 (Memory Exhausted): Renamed from Parser Stack Overflow.
11004 Revamp wording slightly to prefer "memory exhaustion".
11005 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
11006
11007 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
11008
11009 Add i18n support to the GLR skeleton. Partially fix the C++
11010 skeleton; a C++ expert needs to finish this. Remove debugging
11011 msgids; there's little point to having them translated, since they
11012 can be understood only by someone who can read the
11013 (English-language) source code.
11014
11015 Generate runtime-po/bison-runtime.pot automatically, so that we
11016 don't have to worry about garbage getting in that file. We'll
11017 make sure after the next official release that old msgids don't
11018 get lost. See
11019 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
11020
11021 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
11022 Now auto-generated.
11023 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
11024 Fix typos in explanations of the runtime file.
11025 * bootstrap: Change gettext keyword from YYI18N to YY_.
11026 Use standard Makefile.in.in in runtime-po, since we'll arrange
11027 for backward-compatible bison-runtime.po files in a different way.
11028 * data/glr.c (YY_): New macro, from yacc.c.
11029 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
11030 Translate messages intended for users.
11031 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
11032 the wording in the other skeletons. We don't know that the memory
11033 is virtual.
11034 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
11035 Use same method that yacc.c uses.
11036 Don't translate debugging messages.
11037 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
11038 it doesn't work (yet), and requires C++ expertise to fix.
11039 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
11040 Move defn to a more logical place, to be consistent with other
11041 skeletons.
11042 Don't translate debugging messages.
11043 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
11044 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
11045 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
11046 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
11047
11048 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
11049 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
11050 void, not int.
11051 * tests/glr-regression.at (Badly Collapsed GLR States):
11052 Likewise.
11053 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
11054 yylex should return 0 at EOF rather than aborting.
11055
11056 Improve tests for stack overflow in GLR parser.
11057 Problem reported by twlevo@xs4all.nl.
11058 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
11059 All uses removed.
11060 (yyStackOverflow): Just longjmp, but with value 2 so that caller
11061 can handle the problem.
11062 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
11063 (yyparse): New local variable yyresult to record the result.
11064 Use result of setjmp to set it, rather than storing itinto
11065 struct.
11066 (yyDone): Remove label.
11067 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
11068 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
11069 if YYABORT is used).
11070 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
11071 yyparse status; put status > 1 into diagnostic.
11072 Check that status==2 works.
11073 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
11074 Use exit status 3 for failure to open (which shouldn't happen).
11075
11076 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
11077
11078 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
11079 1 on syntax error; just let yyparse do its thing.
11080 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
11081 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
11082 (Exploding the Stack Size with Alloca):
11083 (Exploding the Stack Size with Malloc):
11084 Expect exit status 2, not 1, since the parser is supposed to blow
11085 its stack. Problem reported by twlevo@xs4all.nl.
11086
11087 * data/glr.c (yyparse): Don't assume that the initial calls
11088 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
11089 Print a stack-overflow message and fail instead.
11090 Initialize the line-number information before creating the stack,
11091 so that the stack-overflow message can report line zero safely.
11092
11093 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
11094
11095 Fix problems reported by twlevo@xs4all.nl.
11096 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
11097 (yyuserMerge): Provide a default case if b4_mergers is empty.
11098 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
11099 * tests/glr-regression.at
11100 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
11101 Add casts to pacify C++ compilers.
11102 * tests/glr-regression.at (Improper merging of GLR delayed action
11103 sets): Declare yylex before using it.
11104 * tests/Makefile.am (maintainer-check-g++): Fix a stray
11105 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
11106 test for valgrind; valgrind is independent of g++.
11107 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
11108 for compatibility with POSIX 1003.1-2001 (if running coreutils).
11109 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
11110 Use a destructor, so that we can expand the stack. Change
11111 YYSTYPE to char * so that we can free it. Cast result of malloc.
11112
11113 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11114
11115 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
11116 a valgrind failure. Problem reported by twlevo@xs4all.nl.
11117
11118 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
11119
11120 * PACKAGING: New file, suggested by Bruno Haible and taken from
11121 similar wording in gettext's PACKAGING file.
11122 * NEWS: Mention PACKAGING.
11123 * Makefile.am (EXTRA_DIST): Add PACKAGING.
11124
11125 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
11126
11127 * NEWS: Document recent i18n improvements.
11128 * bootstrap: Get runtime translations into runtime-po.
11129 Create runtime-po files automatically, if possible.
11130 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
11131 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
11132 does not infringe on the user's name space.
11133 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
11134 * doc/bison.texinfo (Internationalization): Revamp the English
11135 and Texinfo syntax a bit, to try to make it clearer.
11136 (Bison Options, Option Cross Key): Mention --print-localedir.
11137 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
11138 YYENABLE_NLS. Quote a bit more.
11139 * runtime-po/.cvsignore: New file.
11140 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
11141 * runtime-po/Rules-quot: Remove; now created by bootstrap.
11142 * runtime-po/quot.sed: Likewise.
11143 * runtime-po/boldquot.sed: Likewise.
11144 * runtime-po/en@quot.header: Likewise.
11145 * runtime-po/en@boldquot.header: Likewise.
11146 * runtime-po/insert-header.sin: Likewise.
11147 * runtime-po/remove-potcdate.sin: Likewise.
11148 * runtime-po/Makevars: Likewise.
11149 * runtime-po/LINGUAS: Likewise.
11150 * runtime-po/de.po: Likewise; we will rely on the translation project
11151 to maintain this, so "bootstrap" should get it.
11152 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
11153 its value.
11154 * src/main.c (main): Bind the bison-runtime domain, too.
11155
11156 2005-07-12 Bruno Haible <bruno@clisp.org>
11157
11158 * data/yacc.c: Include <libintl.h> when NLS is enabled.
11159 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
11160 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
11161 * runtime-po: New directory.
11162 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
11163 $(DOMAIN).pot-update rule, so that old messages are never dropped.
11164 * runtime-po/Rules-quot: New file, copied from po/.
11165 * runtime-po/quot.sed: Likewise.
11166 * runtime-po/boldquot.sed: Likewise.
11167 * runtime-po/en@quot.header: Likewise.
11168 * runtime-po/en@boldquot.header: Likewise.
11169 * runtime-po/insert-header.sin: Likewise.
11170 * runtime-po/remove-potcdate.sin: Likewise.
11171 * runtime-po/Makevars: New file.
11172 * runtime-po/POTFILES.in: New file.
11173 * runtime-po/LINGUAS: New file.
11174 * runtime-po/bison-runtime.pot: New file.
11175 * runtime-po/de.po: New file.
11176 * m4/bison.m4: New file.
11177 * Makefile.am (SUBDIRS): Add runtime-po.
11178 (aclocaldir, aclocal_DATA): New variables.
11179 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
11180 Define aclocaldir.
11181 * src/getargs.c (usage): Document --print-localedir option.
11182 (PRINT_LOCALEDIR_OPTION): New enum item.
11183 (long_options): Add --print-localedir option.
11184 (getargs): Handle --print-localedir option.
11185 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
11186 (Internationalization): New section.
11187
11188 2005-07-12 Akim Demaille <akim@epita.fr>
11189
11190 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
11191 for consistency with the rest of the code.
11192 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
11193 Add separators.
11194
11195 2005-07-12 Akim Demaille <akim@epita.fr>
11196
11197 * src/parse-gram.y: Use %printer instead of YYPRINT.
11198
11199 2005-07-12 Akim Demaille <akim@epita.fr>
11200
11201 * src/symtab.h, src/symtab.c (symbol_print): New.
11202 * src/symlist.h, src/symlist.c (symbol_list_print): New.
11203 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
11204
11205 2005-07-12 Akim Demaille <akim@epita.fr>
11206
11207 * data/glr.c (b4_syncline): Fix (swap) the definitions of
11208 b4_at_dollar and b4_dollar_dollar.
11209
11210 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
11211
11212 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
11213 and Pennello's paper.
11214
11215 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
11216
11217 * data/yacc.c (yyparse): Undo previous patch. Instead,
11218 set yylsp[0] and yyvsp[0] only if the initial action
11219 sets yylloc and yylval, respectively.
11220
11221 * data/yacc.c (yyparse): In the initial action, set
11222 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
11223 This avoids the use of undefined variables if the initial
11224 action does not set yylloc and/or yylval.
11225
11226 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
11227
11228 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
11229 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
11230 Remove from CVS. These files are automatically generated.
11231 * examples/extexi: Clarify that this file is now part of Bison,
11232 not GNU M4, and that it works with any POSIX-compatible Awk.
11233 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
11234 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
11235 so that we also get calc++-parser.yy. Geneate it.
11236 Use $(AWK), not gawk, since any conforming Awk will do.
11237 Put comment before action, since older 'make' can't handle comment
11238 in action.
11239 $(BUILT_SOURCES): List all built sources, not just some of them.
11240 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
11241 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
11242 $($(calc_sources_generated)): Remove unnecessary test for existence
11243 of target. (This had a shell syntax error anyway; a stray "x".)
11244 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
11245 calc++-parser.yy.
11246 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
11247
11248 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
11249 implied by the other modules.
11250
11251 2005-07-06 Akim Demaille <akim@epita.fr>
11252
11253 Bind examples/calc++ to the package.
11254 * examples/calc++/Makefile: Remove, replaced by...
11255 * examples/calc++/Makefile.am: ... this new file.
11256 * examples/calc++/test: Remove input.
11257 * examples/calc++/compile: Remove.
11258 * examples/Makefile.am: New.
11259 * configure.ac, Makefile.am: Adjust.
11260 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
11261
11262 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
11263
11264 * data/glr.c (yyFail): Drastically simplify; since the format argument
11265 never had any % directives, we can simply pass it to yyerror.
11266 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
11267 be modified later, as that is the usual style in glr.c.
11268 Problems reported by Paul Hilfinger.
11269
11270 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
11271 and size overflow errors.
11272 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
11273 in case the user prolog sets feature-test macros like _GNU_SOURCE.
11274 (YYSIZEMAX): New macro.
11275 (yystpcpy): New function, taken from yacc.c.
11276 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
11277 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
11278 so that we don't have to maintain their signatures.
11279 (yyFail): Check for buffer overflow, by using vsnprintf rather
11280 than vsprintf. Allocate a bigger buffer if possible.
11281 Report an error if buffer allocation fails.
11282 (yyStackOverflow): New function.
11283 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
11284 the initialization was successful. It might fail if storage was
11285 exhausted.
11286 (yyexpandGLRStack): Add more checks for storage allocation failure.
11287 Use yyStackOverflow to report failures.
11288 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
11289 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
11290 Don't assume stack number fits in int.
11291 (yysplitStack): Check for storage allocation failure.
11292 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
11293 can print diagnostics on storage allocation failure. All callers
11294 changed.
11295 (yyresolveValue): Use yybool for boolean.
11296 (yyreportSyntaxError): Check for size-calculation overflow.
11297 This code is taken from yacc.c.
11298 (yyparse): Check for storage allocation errors when allocating
11299 the initial stack.
11300
11301 2005-07-05 Akim Demaille <akim@epita.fr>
11302
11303 Extract calc++ from the documentation.
11304 * doc/bison.texinfo (Calc++): Add the extraction marks.
11305 * examples/extexi: New, from the aborted GNU Programming 2E.
11306 Separate the different paragraph of a file with empty lines.
11307 * examples/Makefile: Use it to extract the whole calc++ example.
11308
11309 2005-06-24 Akim Demaille <akim@epita.fr>
11310
11311 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
11312 class typedefs.
11313
11314 2005-06-22 Akim Demaille <akim@epita.fr>
11315
11316 * doc/bison.texinfo (C++ Language Interface): First stab.
11317 (C++ Parsers): Remove.
11318
11319 2005-06-22 Akim Demaille <akim@epita.fr>
11320
11321 * data/lalr1.cc (yylex_): Honor %lex-param.
11322
11323 2005-06-22 Akim Demaille <akim@epita.fr>
11324
11325 Start a set of simple examples.
11326 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
11327 * examples/calc++/calc++-driver.hh,
11328 * examples/calc++/calc++-parser.yy,
11329 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
11330 * examples/calc++/compile, examples/calc++/test: New.
11331
11332 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
11333
11334 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
11335 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
11336 which stems from the 2005-05-27 patch.
11337
11338 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11339
11340 * data/glr.c: Modify treatment of unused parameters to permit use
11341 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
11342
11343 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
11344
11345 Fix infringement on user name space reported by Janos Zoltan Szabo.
11346 * data/yacc.c (yyparse): strlen -> yystrlen.
11347
11348 2005-05-30 Akim Demaille <akim@epita.fr>
11349
11350 * data/lalr1.cc (_): New.
11351 Translate the various messages.
11352
11353 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
11354
11355 Fix infringement on user name space reported by Bruno Haible.
11356 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
11357 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
11358 the user's name space.
11359 (alloca): Include <stdlib.h> to get it, if it's not built in.
11360 (YYMALLOC, YYFREE): Define only if needed.
11361 (malloc, free): Declare, but only if needed, as this infringes on
11362 the user name space.
11363
11364 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
11365
11366 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
11367 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
11368 with %d format.
11369 * lib/ebitset.c (min, max): Undef before defining.
11370 * lib/vbitset.c (min, max): Likewise.
11371 * lib/subpipe.c (create_subpipe): Save local variables in case
11372 vfork clobbers them.
11373
11374 2005-05-24 Bruno Haible <bruno@clisp.org>
11375
11376 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
11377 error message syntax used by gcc-4.0.
11378
11379 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
11380
11381 * README: Mention m4 1.4.3. Remove obsolete advice about
11382 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
11383
11384 * bootstrap: Remove workaround for problem I encountered with
11385 gettext 0.14.1; it seems to be fixed now.
11386
11387 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
11388
11389 * NEWS: Version 2.0a.
11390
11391 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
11392 the previous change.
11393
11394 Various maintainer cleanups.
11395 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
11396 conftest*, for benefit of CVS commands run at the same time as
11397 "configure". Add build-aux, since "bootstrap" now creates it and
11398 its subfiles.
11399 * Makefile.cfg (move_if_change): Remove.
11400 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
11401 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
11402 (po_repo, do-po-update, po-update, wget_files, get-targets):
11403 (config.guess-url_prefix, config.sub-url_prefix):
11404 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
11405 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
11406 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
11407 Remove.
11408 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
11409 this is now the recommended name.
11410 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
11411 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
11412 ylwrap. These files now go into build-aux.
11413 * config/move-if-change: Remove.
11414 * config/prev-version.txt: Bump from 1.75 to 2.0.
11415
11416 * bootstrap: Add stdio-safer, unistd-safer modules.
11417 Remove m4/glibc2.m4 (introduced by latest gnulib, but
11418 we don't need it).
11419 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
11420 fopen-safer.c, stdio-safer.h, unistd-safer.h.
11421 * lib/subpipe.c: Include "unistd-safer.h".
11422 (create_subpipe): Make sure all the newly-created
11423 file descriptors are > 2, so that diagnostics don't
11424 get sent down them (which might cause Bison to hang, in theory).
11425 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
11426 * src/files.c (xfopen): Use fopen_safer, not fopen.
11427
11428 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
11429 yesterday's yacc.c fix.
11430
11431 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
11432
11433 * data/glr.c, data/lalr1.cc: Update copyright date.
11434
11435 Fix a destructor bug reported by Wolfgang Spraul in
11436 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
11437 * data/yacc.c (yyabortlab): Don't call destructor, and
11438 don't set yychar to EMPTY.
11439 (yyoverflowlab): Don't call destructor.
11440 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
11441 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
11442 since we no longer output the message "discarding lookahead token
11443 end of input ()".
11444
11445 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11446
11447 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
11448 fix a small glitch in debugging output.
11449 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
11450 after YY_SYMBOL_PRINT where needed.
11451
11452 (struct yyGLRState): Add some comments.
11453 (struct yySemanticOption): Add some comments.
11454 (union yyGLRStackItem): Add comment.
11455
11456 (yymergeOptionSets): Correct this to properly perform the union,
11457 avoiding infinite reported by Michael Rosien.
11458 Update comment.
11459
11460 * tests/glr-regression.at: Add test for GLR merging error reported
11461 by M. Rosien.
11462
11463 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
11464
11465 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
11466 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
11467 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
11468 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
11469 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
11470 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
11471 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
11472 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
11473 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
11474 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
11475 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
11476 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
11477 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
11478 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
11479 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
11480 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
11481 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
11482 src/derives.h, src/files.c, src/files.h, src/getargs.c,
11483 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
11484 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
11485 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
11486 src/output.h, src/parse-gram.c, src/parse-gram.h,
11487 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
11488 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
11489 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
11490 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
11491 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
11492 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
11493 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
11494 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
11495 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
11496 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
11497 tests/reduce.at, tests/regression.at, tests/sets.at,
11498 tests/synclines.at, tests/testsuite.at, tests/torture.at:
11499 Update FSF postal mail address.
11500
11501 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
11502
11503 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
11504 Problem reported by Ralf Menzel.
11505
11506 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
11507
11508 * tests/actions.at: Test that stack overflow invokes destructors.
11509 From Marcus Holland-Moritz.
11510 * data/yacc.c (yyerrlab): Move the code that destroys the stack
11511 from here....
11512 (yyreturn): to here. That way, destructors are called properly
11513 even if the stack overflows, or the user calls YYACCEPT or
11514 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
11515 (yyoverflowlab): Destroy the lookahead.
11516
11517 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
11518
11519 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
11520
11521 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
11522
11523 * NEWS: Bison-generated C parsers no longer quote literal strings
11524 associated with tokens.
11525 * src/output.c (prepare_symbols): Don't escape strings,
11526 since users don't want to see C escapes.
11527 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
11528 in diagnostics.
11529 * tests/input.at (Torturing the Scanner): Likewise.
11530 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
11531
11532 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
11533
11534 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
11535 the data size is known to be too small and we can't increase it.
11536 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
11537
11538 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
11539
11540 * src/parse-gram.y: Include quotearg.h.
11541 (string_as_id): Quote $1 before using it as a key, since the
11542 lexer no longer quotes it for us.
11543 (string_content): Don't strip quotes, since lexer no longer
11544 quotes it for us.
11545 * src/scan-gram.l: Include quotearg.h.
11546 ("\""): Omit quote.
11547 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
11548 a key, since the rest of the lexer doesn't quote it.
11549 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
11550 * tests/regression.at (Token definitions): Check for backslashes
11551 in token strings.
11552
11553 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
11554 (YYSIZE_T): Define to unsigned long int when using an older compiler.
11555 (yyparse): Revamp code to generate long syntax error message, to
11556 make it easier to translate, and to avoid problems with arithmetic
11557 overflow. Change "virtual memory" to "memory" in diagnostic, since
11558 we don't know whether the memory is virtual.
11559
11560 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
11561
11562 * NEWS: Bison-generated C parsers now use the _ macro to
11563 translate strings.
11564 * data/yacc.c (_) [!defined _]: New macro.
11565 All English strings wrapped inside this macro.
11566 * doc/bison.texinfo (Bison Parser): Document _.
11567 * po/POTFILES.in: Include src/parse-gram.c, since it now
11568 includes translateable strings that parse-gram.y doesn't.
11569
11570 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
11571
11572 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
11573 reverting the 2004-10-11 change to this function.
11574 (symbol_check_alias_consistency): Don't call symbol_type_set
11575 if the type name is already correct.
11576 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
11577
11578 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
11579
11580 * tests/regression.at (Token definitions): Don't use a token named
11581 c, as that generates a "#define c ..." that runs afoul of buggy
11582 stdlib.h that uses the identifier c as a member of struct
11583 drand48_data. Problem reported by Horst Wente.
11584
11585 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
11586
11587 * bootstrap: Change translation URL from
11588 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
11589 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
11590 redirection glitches. Problem reported by twlevo@xs4all.nl.
11591
11592 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
11593
11594 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
11595 after operands; POSIX says this isn't portable for the c99 command.
11596
11597 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
11598
11599 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
11600 immediately if a data overrun has occurred; this may help us track
11601 down what may be a spurious failure on MacOS.
11602
11603 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
11604
11605 Respond to problems reported by twlevo@xs4all.nl.
11606
11607 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
11608
11609 * src/vcg.h: Comment fix.
11610 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
11611 (G_CMAX): Change to -1 instead of INT_MAX.
11612
11613 * data/yacc.c (yyparse): Omit spaces before #line.
11614
11615 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
11616
11617 * src/tables.c (state_number_to_vector_number): Put it inside an
11618 "#if 0", since it's not currently used. Problem reported by
11619 Roland McGrath.
11620
11621 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
11622
11623 * src/output.c (escaped_output): Renamed from
11624 escaped_file_name_output, since we now use it for symbol tags as
11625 well. All uses changed.
11626 (symbol_destructors_output, symbol_printers_output):
11627 Escape symbol tags too.
11628 Problem reported by Matyas Forstner in
11629 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
11630
11631 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
11632 not needed.
11633 * src/output.c (user_actions_output, token_definitions_output,
11634 symbol_destructors_output, symbol_printers_output): Likewise.
11635 * src/reader.c (prologue_augment): Likewise.
11636 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
11637
11638 * src/vcg.c (output_edge): Don't quote linestyle arg.
11639 Problem reported by twlevo@xs4all.nl.
11640
11641 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
11642
11643 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
11644 example, reported by Derek M Jones. Also, make the example even
11645 more outrageous, to better illustrate how bad the problem is.
11646
11647 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
11648
11649 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
11650 putsym. Typo reported by Sebastian Piping.
11651
11652 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
11653
11654 * doc/bison.texinfo (Language and Grammar): some -> same
11655 (Epilogue): int he -> in the
11656 Typos reported by Sebastian Piping via Justin Pence.
11657
11658 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
11659
11660 * tests/glr-regression.at (Improper handling of embedded actions
11661 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
11662 embedded actions and $-N in GLR parsers", work around an Autoconf bug
11663 with dollar signs in test names.
11664 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
11665 for a similar reason.
11666
11667 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
11668
11669 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
11670 wants to redefine G_VIEW.
11671
11672 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
11673
11674 * src/vcg.c (get_view_str): Remove case for normal_view.
11675 Problem reported by twlevo@xs4all.nl.
11676
11677 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
11678
11679 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
11680 Problem reported by twlevo@xs4all.nl.
11681
11682 * doc/bison.texinfo: Change @dircategory from "GNU programming
11683 tools" to "Software development". Requested by Richard Stallman
11684 via Karl Berry.
11685
11686 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
11687
11688 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
11689 Problem reported by twlevo@xs4all.nl.
11690
11691 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
11692
11693 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
11694 keyword; it's not needed with modern compilers, and it doesn't
11695 affect correctness with older compilers. Suggested by
11696 twlevo@xs4all.nl.
11697
11698 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
11699
11700 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
11701 gcc -Wswitch-default.
11702 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
11703 * data/yacc.c (yyparse): Likewise.
11704
11705 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
11706
11707 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
11708 already. Let config.h define any nonstandard values.
11709
11710 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
11711
11712 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
11713 for the benefit of slower hosts. Problem reported by
11714 Nelson H. F. Beebe.
11715
11716 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
11717
11718 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
11719 being defined and not used.
11720 * data/lalr1.cc (yyparse): Likewise.
11721 Use "if (false)" rather than "if (0)".
11722
11723 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
11724
11725 * TODO: Mention that we should allow NUL bytes in tokens.
11726
11727 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
11728
11729 * src/scan-skel.l (<<EOF>>): Don't close standard output.
11730 Problem reported by Hans Aberg.
11731
11732 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
11733
11734 * src/getargs.c (version): Happy new year; update overall
11735 program copyright date from 2004 to 2005.
11736
11737 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
11738 Problem reported by Hans Aberg.
11739 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
11740 (Output file names.): Add a test for the case when standard output
11741 is closed.
11742
11743 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
11744
11745 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
11746 to fix an oversight in the Bison 2.0 manual.
11747
11748 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
11749
11750 * NEWS: Version 2.0. Reformat the existing news items since
11751 1.875, so that related items are grouped together.
11752 * configure.ac (AC_INIT): Bump version to 2.0.
11753 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
11754
11755 * tests/torture.at (Exploding the Stack Size with Alloca): Set
11756 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
11757 otherwise, we're not testing alloca. Unfortunately there's no
11758 simple way to consult HAVE_ALLOCA here.
11759
11760 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
11761 for yymsg, too.
11762
11763 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
11764 hand. This avoids a warning about comparing int to size_t when
11765 GCC warnings are enabled.
11766
11767 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
11768
11769 * NEWS: Bison-generated parsers no longer default to using the
11770 alloca function (when available) to extend the parser stack, due
11771 to widespread problems in unchecked stack-overflow detection.
11772 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
11773 responsibility to set it to a positive value. This lets the user
11774 specify a value that is not a preprocessor constant.
11775 * data/yacc.c (YYMAXDEPTH): Likewise.
11776 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
11777 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
11778 to be a compile-time constant. However, explain the constraints on it.
11779 Also, explain the constraints on YYINITDEPTH.
11780 (Table of Symbols): Explain that alloca is no longer the default.
11781 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
11782 to 1.
11783
11784 * doc/bison.texinfo (Location Default Action): Mention that n must
11785 be zero when k is zero. Suggested by Frank Heckenbach.
11786
11787 2004-12-22 Akim Demaille <akim@epita.fr>
11788
11789 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
11790 (parser::state_type, parser::semantic_type, parser::location_type):
11791 Private, not public.
11792 (parser::parse): Return ints, not bool.
11793 Returning a bool introduces a problem: 0 corresponds to false, and
11794 it seems weird to return false on success. Returning true changes
11795 the conventions for yyparse.
11796 Alternatively we could return void and send an exception.
11797 There is no clear consensus (yet?).
11798 (state_stack, semantic_stack, location_stack): Rename as...
11799 (state_stack_type, semantic_stack_type, location_stack_type): these.
11800 Private, not public.
11801 * tests/c++.at: New.
11802 * tests/testsuite.at, tests/Makefile.am: Adjust.
11803
11804 2004-12-21 Akim Demaille <akim@epita.fr>
11805
11806 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
11807
11808 2004-12-21 Akim Demaille <akim@epita.fr>
11809
11810 Don't impose std::string for filenames.
11811
11812 * data/lalr1.cc (b4_filename_type): New.
11813 (position::filename): Use it.
11814 (parser.hh): Move the inclusion of stack.hh and location.hh below
11815 the user code, so that needed headers for the filename type can be
11816 included first.
11817 Forward declare them before the user code.
11818 * tests/Makefile.am (check-local, installcheck-local): Pass
11819 TESTSUITEFLAGS to the TESTSUITE.
11820
11821 2004-12-20 Akim Demaille <akim@epita.fr>
11822
11823 Use more STL like names: my_class instead of MyClass.
11824
11825 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
11826 (SemanticStack, SemanticType, StateStack, StateType)
11827 (TokenNumberType, Stack, Slice, Traits, Parser::location)
11828 (Parser::value): Rename as...
11829 (location_stack, location_type, rhs_number_type, semantic_stack)
11830 (semantic_type, state_stack, state_type, token_number_type, stack)
11831 (slice, traits, parser::yylloc, parser::yylval): these.
11832
11833 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
11834
11835 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
11836
11837 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
11838 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
11839
11840 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
11841
11842 Remove uses of 'short int' and 'unsigned short int'. This raises
11843 some arbitrary limits. It uses more memory but nowadays that's
11844 not much of an issue.
11845
11846 This change does not affect the generated parsers; that's a different
11847 task, as some users will want to conserve memory there.
11848
11849 Ideally we should use size_t to represent all object counts, and
11850 something like ptrdiff_t to represent signed differences of object
11851 counts; but that will require more code-cleanup than I have the
11852 time to do right now.
11853
11854 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
11855 Use size_t, not int or short int, to count objects.
11856 * src/closure.c (nritemset, closure): Likewise.
11857 * src/closure.h (nritemset, closure): Likewise.
11858 * src/nullable.c (nullable_compute): Likewise.
11859 * src/print.c (print_core): Likewise.
11860 * src/print_graph.c (print_core): Likewise.
11861 * src/state.c (state_compare, state_hash): Likewise.
11862 * src/state.h (struct state): Likewise.
11863 * src/tables.c (default_goto, goto_actions): Likewise.
11864
11865 * src/gram.h (rule_number, rule): Use int, not short int.
11866 * src/output.c (prepare_rules): Likewise.
11867 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
11868 errs, reductions): Likewise.
11869 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
11870 Likewise.
11871 * src/tables.c (vector_number, tally, action_number,
11872 ACTION_NUMBER_MINIMUM): Likewise.
11873 * src/output.c (muscle_insert_short_int_table): Remove.
11874
11875 2004-12-17 Akim Demaille <akim@epita.fr>
11876
11877 * data/lalr1.cc: Extensive Doxygenation.
11878 (error_): Rename as...
11879 (error): this, since it is visible to the user.
11880 Adjust callers.
11881 (Parser::message): Now an automatic variable from...
11882 (Parser::yyreport_syntax_error_): here.
11883 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
11884 Parser::error.
11885 * tests/input.at: Escape $.
11886
11887 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
11888
11889 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
11890 Parenthesize rhs to avoid obscure problems with mistakes like
11891 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
11892 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
11893 b4_rhs_location): Likewise.
11894 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
11895 b4_rhs_location): Likewise.
11896
11897 2004-12-16 Akim Demaille <akim@epita.fr>
11898
11899 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
11900 yacc.c: be sure to stay within yycheck_.
11901 * tests/actions.at: Re-enable C++ tests.
11902
11903 2004-12-16 Akim Demaille <akim@epita.fr>
11904
11905 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
11906 real.
11907
11908 2004-12-16 Akim Demaille <akim@epita.fr>
11909
11910 Use #define to handle the %name-prefix.
11911
11912 * data/glr.c, data/yacc.c: Comment changes.
11913 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
11914 so that one can refer to yylex in the parser file, and have it
11915 renamed, as is the case with other skeletons.
11916
11917 2004-12-16 Akim Demaille <akim@epita.fr>
11918
11919 Move lalr1.cc internals into yy*.
11920
11921 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
11922 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
11923 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
11924 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
11925 (empty_, final_, terror_, errcode_, ntokens_)
11926 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
11927 (looka_, ilooka_, error_range_, nerrs_):
11928 Rename as...
11929 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
11930 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
11931 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
11932 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
11933 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
11934 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
11935 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
11936 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
11937 these.
11938
11939 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
11940
11941 Fix some problems reported by twlevo at xs4all.
11942 * src/symtab.c (symbol_new): Report an error if the input grammar
11943 contains too many symbols. This is better than calling abort() later.
11944 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
11945 (struct node, struct graph):
11946 Rename member expand to stretch. All uses changed.
11947 (struct graph): Remove member layoutalgorithm. All uses removed.
11948 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
11949 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
11950 All uses changed.
11951 (N_STRETCH): Rename from N_EXPAND. All uses changed.
11952
11953 2004-12-15 Akim Demaille <akim@epita.fr>
11954
11955 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
11956 Add more Doxygen comments.
11957 (symprint_, stack_print_, reduce_print_, destruct_, pop)
11958 (report_syntax_error_, translate_): Rename as...
11959 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
11960 (yypop_, yyreport_syntax_error_, yytranslate_): this.
11961
11962 2004-12-15 Akim Demaille <akim@epita.fr>
11963
11964 * data/lalr1.cc (lex_): Rename as...
11965 (yylex_): this.
11966 Move the trace here.
11967 Take the %name-prefix into account.
11968 Reported by Alexandre Duret-Lutz.
11969
11970 2004-12-15 Akim Demaille <akim@epita.fr>
11971
11972 Simplify the C++ parser constructor.
11973
11974 * data/lalr1.cc (debug_): Rename as...
11975 (yydebug_): so that the parser's internals are always in the yy*
11976 pseudo namespace.
11977 Adjust uses.
11978 (b4_parse_param_decl): Remove the leading comma as it is now only
11979 called as unique argument list.
11980 (Parser::Parser): Remove the constructor accepting a location and
11981 an initial debugging level.
11982 Remove from the other ctor the argument for the debugging level.
11983 (debug_level_type, debug_level, set_debug_level): New.
11984
11985 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
11986 constructor calls.
11987
11988 2004-12-15 Akim Demaille <akim@epita.fr>
11989
11990 Remove b4_root related material: failure experiment
11991 (which goal was to allow to derive from a class).
11992
11993 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
11994 definitions and uses.
11995
11996 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
11997
11998 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
11999 not 2, since it's not portable to subtract 1 from the start of an
12000 array. The new item 0 is never set or used. All uses changed.
12001
12002 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
12003 the default definition of YYLLOC_DEFAULT. Problem reported
12004 by Frank Heckenbach.
12005
12006 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
12007
12008 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
12009 the normal case and one for the error case. Just use the
12010 first one uniformly. Problem reported by Frank Heckenbach.
12011 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
12012 use exactly the same macro in both places.
12013 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
12014 so that the normal-case YYRHSLOC works for the error case too.
12015 All uses changed.
12016 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
12017 (YYLLOC_DEFAULT): Use the same macro as glr.c.
12018 * doc/bison.texinfo (Location Default Action): Don't claim that
12019 we have an array of locations. Use the same macro for both glr
12020 and lalr parsers. Mention YYRHSLOC. Mention what happens when
12021 the index is 0.
12022
12023 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
12024
12025 * HACKING: Update email addresses to send announcements to.
12026
12027 * configure.ac (AC_INIT): Bump version to 1.875f.
12028
12029 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
12030
12031 * NEWS: Version 1.875e.
12032 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
12033
12034 * src/scan-skel.l: Include "complain.h", for "fatal".
12035
12036 * src/relation.h (relation_print, relation_digraph):
12037 Relation sizes are of type relation_node, not size_t (this is
12038 merely a doc fix, since the two types are equivalent).
12039 (relation_transpose): Relation sizes are of type relation_node,
12040 not int.
12041 * src/relation.c: Likewise.
12042 (top, infinity): Now of type relation_node, not int.
12043 (traverse, relation_transpose): Use relation_node, not int.
12044
12045 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
12046 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
12047 (yyparse): Remove unused local introduced in 2004-10-25 patch.
12048
12049 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
12050 specifying whether the test should be skipped. Use it tp
12051 specify that the [%defines %skeleton "lalr1.cc"] tests currently
12052 fail on some hosts, and should be skipped.
12053
12054 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
12055
12056 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
12057 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
12058 unless otherwise specified below.
12059
12060 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
12061 to allocate kernel_base, kernel_items, kernel_size, since
12062 they needn't be initialized to 0.
12063 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
12064 * src/closure.c (new_closure): Likewise, for itemset.
12065 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
12066 * src/lalr.c (set_goto_map): Likewise, for temp_map.
12067 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
12068 (build_relations): Likewise for edge, states1, includes.
12069 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
12070 * src/reader.c (packgram): Likewise, for ritem, rules.
12071 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
12072 * src/relation.c (relation_digraph): Likewise for VERTICES.
12073 (relation_transpose): Likewise for new_R, end_R.
12074 * src/symtab.c (symbols_token_translations_init): Likewise for
12075 token_translations.
12076 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
12077 (token_actions): Likewise for yydefact, actrow, conflrow,
12078 conflict_list.
12079 (save_column): Likewise for froms[symno], tos[symno].
12080 (goto_actions): Likewise for state_count.
12081 (pack_table): Likewise for base, pos, check.
12082 (tables_generate): Likewise for width.
12083
12084 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
12085 for initial core. Just have a separate core, so we needn't worry
12086 about whether kernel_size and kernel_base are initialized.
12087
12088 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
12089 kernel_size, kernel_items): Remove unnecessary initialization.
12090 * src/conflicts.c (conflicts): Likewise.
12091 * src/derives.c (derives): Likewise.
12092 * src/muscle_tablc (muscle_insert): Likewise.
12093 * src/relation.c (relation_digraph): Likewise.
12094 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
12095 conflrow, conflict_table, conflict_list, table, check):
12096 Likewise.
12097
12098 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
12099 This is because all callers pass unsigned int.
12100 * src/closure.h (new_closure): Likewise.
12101
12102 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
12103 (build_relations): Initialize includes[i] in all cases.
12104 * src/reader.c (packgram): Always initialize rules[ruleno].prec
12105 and rules[ruleno].precsym. Initialize members in order.
12106 * src/relation.c (relation_transpose): Always initialize new_R[i]
12107 and end_R[i].
12108 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
12109
12110 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
12111 conflict_list[0] was always 0, but now it isn't initialized.
12112
12113 * src/table.c (table_grow): When conflict_table grew, the grown
12114 area wasn't cleared. Fix this.
12115
12116 * lib/.cvsignore: Add strdup.c, strdup.h.
12117 * m4/.cvsignore: Add strdup.m4.
12118
12119 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
12120
12121 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
12122 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
12123 GOTO_NUMBER_MAXIMUM, since we occasionally compute
12124 ngotos + 1 without checking for overflow.
12125 (build_relations): Use END_NODE, not -1, to denote end of edges.
12126 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
12127 build_relations): Use goto_number, not int, for goto numbers.
12128 * src/tables.c (save_column, default_goto): Likewise.
12129
12130 2004-11-23 Akim Demaille <akim@epita.fr>
12131
12132 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
12133 of #defining from yystype.
12134 Don't typedef yystype, C++ does not need it.
12135 This lets it possible to forward declare it as union.
12136
12137 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
12138
12139 * bootstrap (gnulib_modules): Add extensions.
12140 Problem reported by Jim Meyering.
12141
12142 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
12143
12144 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
12145 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
12146 src/system.h, src/tables.c: XFREE -> free, to accommodate
12147 recent change to gnulib xalloc.h.
12148 Problem reported by Jim Meyering.
12149
12150 2004-11-17 Akim Demaille <akim@epita.fr>
12151
12152 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
12153
12154 2004-11-17 Akim Demaille <akim@epita.fr>,
12155 Alexandre Duret-Lutz <adl@gnu.org>
12156
12157 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
12158 changes.
12159 (YYCDEBUG): Adjust.
12160 Use it instead of cdebug_.
12161 (Parser::debug_stream, Parser::set_debug_stream): New.
12162 (Parser::symprint_): Define cdebug_ for temporary backward
12163 compatibility.
12164 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
12165 debug_stream ().
12166
12167 2004-11-17 Akim Demaille <akim@epita.fr>
12168
12169 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
12170 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
12171 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
12172 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
12173
12174 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
12175
12176 * data/glr.c (yyloc_default): Remove; not used.
12177 Problem reported by Frank Heckenbach.
12178
12179 2004-10-25 Akim Demaille <akim@epita.fr>
12180
12181 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
12182 Introduce another definition to address simple location arrays.
12183 (yyGLRStack): New member: yyerror_range.
12184 (yyrecoverSyntaxError, yyparse): Update it.
12185 (yyrecoverSyntaxError): Use it when shifting the error token to
12186 have an accurate range, equivalent to the one computed by both
12187 yacc.c and lalr1.cc.
12188 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
12189 that column numbers start at column 0, as per GNU Coding
12190 Standards, the others tests, and the doc.
12191 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
12192 Adjust to the above change (first column is 0).
12193 And adjust the location of the "<error>", now covering the whole
12194 line.
12195
12196 2004-10-22 Akim Demaille <akim@epita.fr>
12197 and Paul Eggert <eggert@cs.ucla.edu>
12198
12199 Remove some arbitrary limits on goto numbers and relations.
12200 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
12201 initial values, since they're never used.
12202 (set_goto_map): ngotos is now unsigned, so test for overflow
12203 by seeing whether it wraps around to zero.
12204 * src/lalr.h (goto_number): Now size_t, not short int.
12205 (GOTO_NUMBER_MAXIMUM): Remove.
12206 * src/relation.c (relation_print, traverse, relation_transpose):
12207 Check for END_NODE rather than looking at sign.
12208 * src/relation.h (END_NODE): New macro.
12209 (relation_node): Now size_t, not short int.
12210
12211 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
12212
12213 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
12214 keyword, not an identifier. Problem reported by Baron Schwartz in
12215 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
12216
12217 2004-10-11 Akim Demaille <akim@epita.fr>
12218
12219 * src/symtab.c (symbol_check_alias_consistency): Also check
12220 type names, destructors, and printers.
12221 Reported by Alexandre Duret-Lutz.
12222 Recode the handling of associativity and precedence in terms
12223 of symbol_precedence_set.
12224 Accept no redeclaration at all, not even equal to the previous
12225 value.
12226 (redeclaration): New.
12227 Use it to factor redeclaration complaints.
12228 (symbol_make_alias): Don't set the type of the alias, let
12229 symbol_check_alias_consistency do it as for other features.
12230 * src/symtab.h (symbol): Add new member prec_location, and
12231 type_location.
12232 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
12233 * tests/input.at (Incompatible Aliases): New.
12234
12235 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
12236
12237 .cvsignore fixes to accommodate gnulib changes,
12238 and the practice of naming build directories "_build".
12239 * .cvsignore: Add "_*". Sort.
12240 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
12241 * m4/.cvsignore: Add "*_gl.m4".
12242
12243 2004-10-06 Akim Demaille <akim@epita.fr>
12244
12245 * src/parse-gram.y (add_param): Fix the truncation of trailing
12246 spaces.
12247
12248 2004-10-05 Akim Demaille <akim@epita.fr>
12249
12250 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
12251 whether the reducion was empty or not. This leaves room to
12252 improve the use of YYLLOC_DEFAULT in such a case.
12253 lalr1.cc is still experimental, so changing this is acceptable.
12254 And finally, there are probably not many users who changed the
12255 handling of locations in GLR, so changing is admissible too.
12256
12257 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
12258 empty reduction, set @$ to an empty location ending the previously
12259 stacked symbol.
12260 Adjust uses to make sure the code is triggered on empty
12261 reductions.
12262 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
12263 expected output: empty reductions have empty locations.
12264
12265 2004-09-29 Akim Demaille <akim@epita.fr>
12266
12267 * data/lalr1.cc: Move towards a more standard C++ coding style
12268 for templates: Class < T > -> Class<T>.
12269
12270 2004-09-29 Akim Demaille <akim@epita.fr>
12271
12272 * data/lalr1.cc: Reinstall the former ctor, for sake of
12273 compatibility, but warn it will be removed.
12274 Move towards a more standard C++ coding style (i.e., type *var ->
12275 type* var).
12276
12277 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
12278
12279 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
12280 since it's less likely to work if NULs are involved in the future.
12281
12282 2004-09-27 Akim Demaille <akim@epita.fr>
12283
12284 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
12285
12286 2004-09-27 Akim Demaille <akim@epita.fr>
12287
12288 * data/lalr1.cc (b4_parse_param_decl_1): New.
12289 (b4_parse_param_decl): Use it to have different names between attribute
12290 and argument names.
12291 (b4_cc_constructor_call): Likewise.
12292
12293 2004-09-24 Akim Demaille <akim@epita.fr>
12294
12295 * src/parse-gram.y (add_param): Strip the leading and trailing
12296 blanks from a formal argument declaration.
12297 (YY_LOCATION_PRINT): New.
12298
12299 2004-09-24 Akim Demaille <akim@epita.fr>
12300
12301 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
12302 after the location.
12303
12304 2004-09-24 Akim Demaille <akim@epita.fr>
12305
12306 * doc/bison.texinfo (Table of Symbols): Sort.
12307
12308 2004-09-21 Akim Demaille <akim@epita.fr>
12309
12310 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
12311 the useless parentheses.
12312 Suggested by Paul Eggert.
12313
12314 2004-09-20 Akim Demaille <akim@epita.fr>
12315
12316 Let the initial-action act on the look-ahead, and use it for the
12317 "initial push" (corresponding to an hypothetical beginning-of-file).
12318 And let lalr1.cc honor %initial-action.
12319
12320 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
12321 example.
12322 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
12323 (Parser::Parser): Remove the ctor that used to initialize it.
12324 (Parser::parse): Like in the other skeletons, issue the "starting
12325 parse" message before any action.
12326 Honor %initial-action.
12327 Initialize the stacks with the lookahead.
12328 * data/yacc.c: Let $$ and @$ in %initial-action designate the
12329 look-ahead.
12330 Push them in the stacks.
12331 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
12332
12333 2004-09-20 Akim Demaille <akim@epita.fr>
12334
12335 * doc/bison.texinfo (Initial Action Decl): New.
12336
12337 2004-09-20 Akim Demaille <akim@epita.fr>
12338
12339 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
12340 clearer criterion to define it.
12341 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
12342 When reducing on an empty RHS, use the latest stacked location as
12343 location.
12344 yylloc is not always available.
12345 * data/glr.c: Likewise.
12346 Also, honor initial-actions.
12347
12348 2004-09-20 Akim Demaille <akim@epita.fr>
12349
12350 * data/yacc.c (YY_LOCATION_PRINT): New.
12351 Define when we know YYLTYPE's structure, i.e., when the default
12352 YYLLOC_DEFAULT is used.
12353 * data/c.m4 (b4_yysymprint_generate): Use it.
12354 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
12355 value of the result.
12356 (error_start_): Replace with...
12357 (error_range_): this location array.
12358 This allows to replace code relying on the implementation of
12359 locations by portable code.
12360 * data/yacc.c (yylerrsp): Replace with...
12361 (yyerror_range): this.
12362 Every time a token is popped, update yyerror_range[0], to have an
12363 accurate location for the error token.
12364 * data/glr.c (YY_LOCATION_PRINT): New.
12365 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
12366 deference a pointer.
12367 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
12368 report the location in %printers.
12369
12370 * src/scan-skel.l: Instead of abort, report error messages to ease
12371 understanding skeleton scanning failures.
12372
12373 2004-09-16 Akim Demaille <akim@epita.fr>
12374
12375 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
12376 (iterator, const_iterator): these, to be more in the C++ spirit.
12377 Also, return reverse iterators so that when displaying the stack
12378 we display its bottom first.
12379 (Parser::stack_print_, Parser::reduce_print_): Match the messages
12380 from yacc.c.
12381 We should probably use vector here though.
12382
12383 2004-09-16 Akim Demaille <akim@epita.fr>
12384
12385 Have more complete shift traces.
12386
12387 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
12388 to report Shifts instead of ad hoc YYDPRINTF invocations,
12389 including for the error token.
12390 * data/lalr1.cc (symprint_): Output the location.
12391 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
12392 output the location within the %printer.
12393 Activate GLR tests, at least to make sure they compile properly.
12394 They still don't pass though.
12395 * tests/calc.at: Adjust expect verbose output, since now "Entering
12396 state..." is on a different line than the "Shifting" message.
12397
12398 2004-09-08 Akim Demaille <akim@epita.fr>
12399
12400 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
12401 Bison directive from the Bison file to the invocation of this
12402 macro, so that these directives are passed to
12403 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
12404 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
12405 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
12406 the extra Bison directives instead of the whole series.
12407 Change the grammar so that there are recoverable errors, and
12408 unrecoverable errors. Now we can have the parser give up before
12409 consuming the whole input. As a result we now can observe that
12410 the lookahead is freed when needed.
12411 Change the parser source to parse argv[1] instead of a hard coded
12412 string.
12413 Simplify yylex, and give a value and location to EOF.
12414 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
12415 passed directives already coded in the file.
12416 Add some tests to check the location of "error".
12417 For some tests, the C++ parser is correct, and not yacc.c.
12418 For other tests, they provide different, but unsatisfying, values,
12419 so keep the C++ value so that at least one parser is "correct"
12420 according to the test suite.
12421 (Actions after errors): Remove, this is subsumed by the
12422 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
12423
12424 2004-09-06 Akim Demaille <akim@epita.fr>
12425
12426 * data/lalr1.cc: Adjust the indentation of the labels.
12427 (Parser::pop): New.
12428 Use it.
12429
12430 2004-09-06 Akim Demaille <akim@epita.fr>
12431
12432 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
12433 argument, an informative message.
12434 Call YY_SYMBOL_PRINT.
12435 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
12436 * data/lalr1.cc (destruct_): Likewise.
12437 In addition, no longer depend on b4_yysymprint_generate and
12438 b4_yydestruct_generate to generate these functions, do it "by
12439 hand".
12440
12441 2004-09-03 Akim Demaille <akim@epita.fr>
12442
12443 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
12444 invoked, yydestruct the lookahead.
12445 * tests/calc.at (Calculator $1): Update the expected lengths of
12446 traces: there is an added line for the discarded lookahead.
12447 * doc/bison.texinfo (Destructor Decl): Some rewording.
12448 Define "discarded" symbols.
12449
12450 2004-09-02 Akim Demaille <akim@epita.fr>
12451
12452 * data/lalr1.cc (translate_, destruct_): No reason to be static.
12453
12454 2004-09-02 Akim Demaille <akim@epita.fr>
12455
12456 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
12457 (YYDSYMPRINTF): Rename as...
12458 (YY_SYMBOL_PRINT): this.
12459 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
12460 two.
12461 Use it instead of direct symprint_ calls.
12462 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
12463 one.
12464
12465 2004-09-02 Akim Demaille <akim@epita.fr>
12466
12467 * data/lalr1.cc (b4_yysymprint_generate): New.
12468 (symprint_): New member function, defined when YYDEBUG.
12469 Use it consistently instead of token/nterm debugging output by
12470 hand.
12471 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
12472 %printer calls to use cdebug_ when using lalr1.cc.
12473
12474 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
12475
12476 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
12477 with #ifdef YYDEBUG.
12478
12479 2004-08-26 Akim Demaille <akim@epita.fr>
12480
12481 * doc/bison.texinfo (Implementing Loops): Rename as...
12482 (Implementing Gotos/Loops): this.
12483
12484 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
12485
12486 Adjust to latest gnulib.
12487 * bootstrap (gnulib_modules): Add xalloc-die.
12488 Set LC_ALL=C so that file names sort consistently.
12489 Prefer the gnulib copies of gettext.m4, glibc21.m4,
12490 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
12491 uintmax_t.m4, ulonglong.m4.
12492 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
12493 po.m4 since we are now using _gl.m4 instead.
12494
12495 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
12496
12497 * src/scan-action.l: Remove. Scanning of semantic actions is
12498 handled in scan-gram.l.
12499
12500 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
12501
12502 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
12503
12504 * src/location.h (struct): The file member is a uniqstr.
12505 (equal_boundaries): Use UNIQSTR_EQ for comparison.
12506
12507 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
12508
12509 Fix bug with non-%union parsers that have printers or destructors,
12510 which led to a Bison core dump. Reported by Peter Fales in
12511 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
12512
12513 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
12514 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
12515 not to our own type.
12516 * src/output.c (symbol_destructors_output, symbol_printers_output):
12517 Don't assume %union.
12518 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
12519 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
12520 UNION-FLAG. All callers changed.
12521 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
12522 Use type char, not unsigned int, when declaring an array of char;
12523 this lets us remove a cast.
12524 (Printers and Destructors): Add non-%union test cases.
12525
12526 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
12527
12528 * doc/bison.texinfo: Minor editorial changes, mostly to the new
12529 GLR writeups. E.g., avoid frenchspacing and the future tense,
12530 change "lookahead" to "look-ahead", and change "wrt" to "with
12531 respect to".
12532
12533 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12534
12535 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
12536 New sections, split off from the GLR Parsers section. Put the new
12537 Simple GLR Parser near the start of the GLR section, for clarity.
12538 Rewrite connective text.
12539
12540 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
12541
12542 * doc/bison.texinfo (Simple GLR Parsers): New section.
12543
12544 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
12545
12546 * NEWS, TODO, doc/bison.texinfo:
12547 Use "look-ahead" instead of "lookahead", to be consistent.
12548 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
12549 while we're fixing "look-ahead".
12550 * src/conflicts.c (shift_set): Renamed from shiftset.
12551 (look_ahead_set): Renamed from lookaheadset.
12552 * src/print.c: Likewise.
12553 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
12554 name for "lookahead".
12555 (report_types, usage): Likewise.
12556 * src/getargs.h (report_look_ahead_tokens): Renamed from
12557 report_lookaheads.
12558 * src/lalr.c (compute_look_ahead_tokens): Renamed from
12559 compute_lookaheads.
12560 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
12561 (look_ahead_tokens_print): Renamed from lookaheads_print.
12562 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
12563 state_rule_lookaheads_print.
12564 * src/state.h: Likewise.
12565 (reductions.look_ahead_tokens): Renamed from lookaheads.
12566 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
12567 AT_DATA_LOOKAHEADS_GRAMMAR.
12568
12569 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
12570
12571 * README: Update location of patched M4 distribution.
12572
12573 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
12574
12575 Don't assume the C++ compiler takes the same arguments as the C compiler
12576 (trivial change).
12577 * configure.ac (O0CXXFLAGS): New var.
12578 * tests/atlocal.in (CXXFLAGS): Use it.
12579
12580 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
12581
12582 Fix some "make check" problems with C++ reported by
12583 Albert Chin-A-Young for Tru64 C++ in this thread:
12584 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
12585
12586 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
12587 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
12588 Output to a .cc file for C++, not to a .c file.
12589 * tests/calc.at (AT_CHECK_CALC): Likewise.
12590 * tests/regression.at (AT_CHECK_DANCER): Likewise.
12591 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
12592
12593 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
12594
12595 * tests/calc.at, tests/actions.at: Workaround for SGI
12596 C++ compiler. (trivial change)
12597
12598 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
12599
12600 Spent a few hours checking out which prerequisite versions the
12601 current sources actually require. I went all the way back to
12602 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
12603 a seemingly endless set of combinations of versions more recent
12604 than that. The bottom line is that the current sources require
12605 fairly recent versions of the build tools, and it'll be some work
12606 to change this.
12607 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
12608 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
12609 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
12610 Add comments explaining why those particular versions are
12611 currently needed.
12612
12613 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
12614 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
12615 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
12616
12617 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
12618 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
12619
12620 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
12621
12622 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
12623 0.11.5. Suggested by Bruno Haible.
12624 * bootstrap: Remove gettext version checking.
12625
12626 * doc/bison.texinfo (Decl Summary): Also mention that %union
12627 can depend on prerequisite types. Problem reported by Tim
12628 Van Holder.
12629
12630 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
12631
12632 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
12633 * README-alpha: Don't tell people not to package this.
12634
12635 * bootstrap: Don't assume $(...) works; use `...` instead.
12636 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
12637 gettext better.
12638
12639 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
12640 put into the -d output file, and mention what to do if YYSTYPE is
12641 defined as a macro.
12642
12643 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
12644
12645 Undo change made earlier today: it caused autopoint to not bring
12646 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
12647 autopoint's.
12648
12649 * bootstrap: Check that gettext version matches what's in
12650 configure.ac. Warn users to ignore robots.txt ERROR 404.
12651 * bootstrap: Undo today's earlier change (logged below).
12652 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
12653
12654 The gettext version checking is causing more trouble than it's
12655 curing; remove it. Problem reported by Paul Hilfinger.
12656
12657 * bootstrap: Issue a warning that one can expect a message
12658 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
12659 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
12660
12661 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
12662
12663 Ensure that the C++ compiler used for testing actually works on a
12664 simple test program; if not, skip the C++-related tests. Problem
12665 reported by Vin Shelton in:
12666 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
12667
12668 * m4/cxx.m4: New file.
12669 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
12670 * tests/atlocal.in (BISON_CXX_WORKS): Add.
12671 * tests/local.at (AT_COMPILE_CXX): Use it.
12672
12673 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
12674
12675 * data/glr.c (yylloc): Output this macro even if locations are not
12676 being generated, as the GLR parser needs it even in that case.
12677 Problem reported by Troy A. Johnson
12678 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
12679
12680 * configure.ac (AC_INIT): Update to 1.875e.
12681
12682 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
12683
12684 * NEWS: Version 1.875d.
12685 * configure.ac (AC_INIT): Likewise.
12686 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
12687
12688 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
12689 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
12690 lalr1.cc runs afoul of the first, and the last two are no longer
12691 supported by GCC 3.4.0.
12692 * README: Mention GNU m4 1.4 or later; mention m4 patches.
12693 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
12694
12695 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
12696
12697 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
12698 unsigned int, for compatibility with latest gnulib hash module.
12699 * src/state.c (state_hash, state_hasher): Likewise.
12700 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
12701 * src/uniqstr.c (hash_uniqstr): Likewise.
12702
12703 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
12704
12705 * NEWS: Unescaped newlines are no longer allowed in char & strings.
12706
12707 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
12708 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
12709 character and string literals.
12710 (unexpected_end): New function.
12711 (unexpected_eof): Use it.
12712 (unexpected_newline): New function.
12713 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
12714 actions.
12715
12716 * NEWS: Document %expect-rr.
12717
12718 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
12719 Fix typo by replacing $1 with $option.
12720 Remove more 'intl'-related files.
12721 Don't DEFUN AM_INTL_SUBDIR twice.
12722
12723 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
12724 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
12725 strtoul.c.
12726 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
12727 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
12728 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
12729 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
12730 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
12731 * src/.cvsignore: Add *.output.
12732
12733 * src/parse-gram.y: Put copyright notice inside %{ %} so it
12734 gets copied to the output file.
12735
12736 2004-04-28 Paul Eggert <eggert@twinsun.com>
12737
12738 Get files from the gnulib and po repositories, instead of relying
12739 on them being in our CVS. Upgrade to latest versions of gnulib
12740 and Automake.
12741
12742 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
12743 * bootstrap: Bootstrap from gnulib and po repositories.
12744 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
12745 * README-cvs: Document these changes. Remove version numbers from
12746 mentions of build tools, since they change so often. Mention Flex.
12747
12748 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
12749 (gl_USE_SYSTEM_EXTENSIONS): Add.
12750 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
12751 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
12752 does this for us.
12753 (AC_ISC_POSIX): Remove; we no longer support this
12754 ancient OS, as it gets in the way of latest Autoconf & gnulib.
12755 (AC_HEADER_STDC): Remove: we now assume C89 or better.
12756 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
12757 Do not check for C89 headers, except for locale.h which is used
12758 by the Yacc library and must port to K&R hosts.
12759 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
12760 Do not check for C89 functions, except for setlocale which is
12761 used by the Yacc library.
12762 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
12763 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
12764 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
12765 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
12766 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
12767 AM_GNU_GETTEXT): Remove; now done by:
12768 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
12769 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
12770 for us.
12771
12772 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
12773 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
12774 Define to empty, as gnulib.mk will do the rest for us.
12775 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
12776 for us.
12777 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
12778 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
12779
12780 * src/files.c: Include gnulib's xstrndup.h.
12781
12782 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
12783 (REALLOC): Use xnrealloc, for likewise.
12784 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
12785 (strnlen, memrchr): Remove decls; functions no longer used.
12786 Include <stpcpy.h>.
12787
12788 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
12789 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
12790 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
12791 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
12792 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
12793 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
12794 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
12795 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
12796 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
12797 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
12798 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
12799 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
12800 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
12801 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
12802 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
12803 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
12804 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
12805 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
12806 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
12807 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
12808 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
12809 Remove, as these files are now generated automatically
12810 by bootstrap or automake.
12811
12812 * po/ChangeLog: Remove: all but one entry was a duplicate
12813 of this file, and I moved that 2000-11-02 entry here.
12814
12815 * config/.cvsignore: Add Makefile, depcomp, install-sh.
12816 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
12817 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
12818 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
12819 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
12820 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
12821 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
12822 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
12823 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
12824 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
12825 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
12826 xstrndup.h.
12827 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
12828 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
12829 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
12830 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
12831 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
12832 * src/.cvsignore: Remove *_.c.
12833
12834
12835 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
12836 support it. (The latest stable gzip doesn't.)
12837
12838 2004-04-27 Paul Eggert <eggert@twinsun.com>
12839
12840 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
12841 case, as stos_ is now used by destructors due to the 2004-02-09
12842 change.
12843
12844 Remove more K&R C support.
12845 * lib/libiberty.y (PARAMS): Remove. All uses removed.
12846 * lib/subpipe.c (errno): Remove decl.
12847 Include <stdlib.h> unconditionally.
12848 (EXIT_FAILURE): Remove macro.
12849 * src/complain.c (vfprintf, strerror): Remove.
12850 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
12851 unconditionally.
12852 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
12853 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
12854 (strchr, strspn, memchr): Remove decls.
12855 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
12856 unconditionally. Do not declare perror.
12857 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
12858 unconditionally.
12859
12860 * src/complain.c (_): Remove useless defn, as system.h defines this.
12861
12862 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
12863 with latest obstack.h.
12864 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
12865 to procedure types, as obstack.h now does that for us.
12866 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
12867
12868 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
12869 so that this include file can stand alone.
12870 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
12871 does this now. Include subpipe.h first after config.h, to
12872 test whether it can stand alone.
12873
12874 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
12875 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
12876 unused declaration.
12877
12878 * tests/synclines.at (%union synch line): Put a dummy member in
12879 the union, because empty unions aren't allowed in C. Caught
12880 by GCC 3.4.0.
12881
12882 2004-04-13 Jim Meyering <jim@meyering.net>
12883
12884 * src/conflicts.c (conflicts_print): Correct format string typo:
12885 use `%%' to produce literal `%'. (trivial change)
12886
12887 2004-03-30 Paul Eggert <eggert@twinsun.com>
12888
12889 * src/getargs.c (version): Update copyright year to 2004.
12890
12891 * data/c.m4 (b4_int_type): Use 'short int' rather than
12892 'short', and similarly for 'long', 'unsigned', etc.
12893 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
12894 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
12895 yy_yypstack, yydumpstack): Likewise.
12896 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
12897 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
12898 Likewise.
12899 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
12900 yy_stack_print, yyparse): Likewise.
12901 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
12902 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
12903 * lib/bitset.c (bitset_print): Likewise.
12904 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
12905 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12906 * lib/bitsetv.c (bitsetv_dump): Likewise.
12907 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
12908 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
12909 Likewise.
12910 * src/LR0.c (allocate_itemsets): Likewise.
12911 * src/gram.h (rule_number, rule): Likewise.
12912 * src/lalr.h (goto_number): Likewise.
12913 * src/nullable.c (nullable_compute): Likewise.
12914 * src/output.c (prepare_rules): Likewise.
12915 * src/relation.c (relation_print, relation_digraph): Likewise.
12916 * src/relation.h (relation_node): Likewise.
12917 * src/state.h (state_number, transitions, errs, reductions,
12918 struct state): Likewise.
12919 * src/symtab.h (symbol_number, struct symbol): Likewise.
12920 * src/tables.c (vector_number, tally, action_number,
12921 default_goto, goto_actions): Likewise.
12922 * tests/existing.at (GNU Cim Grammar): Likewise.
12923 * tests/regression.at (Web2c Actions): Likewise.
12924
12925 * src/output.c (muscle_insert_short_int_table): Renamed from
12926 muscle_insert_short_table. All uses changed.
12927
12928 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
12929
12930 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
12931 (declaration): Replace expected_conflicts with expected_sr_conflicts.
12932 Add %expect-rr rule.
12933
12934 * src/scan-gram.l: Recognize %expect-rr.
12935
12936 * src/conflicts.h (expected_sr_conflicts): Rename from
12937 expected_conflicts.
12938 (expected_rr_conflicts): Declare.
12939
12940 * src/conflicts.c (expected_sr_conflicts): Rename from
12941 expected_conflicts.
12942 (expected_rr_conflicts): Define.
12943 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
12944 for GLR parsers.
12945 Use expected_sr_conflicts in place of expected_conflicts.
12946 Warn if expected_rr_conflicts used in non-GLR parser.
12947
12948 * doc/bison.texinfo: Add documentation for %expect-rr.
12949
12950 2004-03-08 Paul Eggert <eggert@gnu.org>
12951
12952 Add support for hex token numbers. Suggested by Odd Arild Olsen in
12953 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
12954
12955 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
12956 in lalr1.cc.
12957 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
12958 * src/scan-gram.l (scan_integer): New function.
12959 ({int}): Use it.
12960 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
12961 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
12962 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
12963 Say "long int", not "long", for uniformity with GNU style.
12964
12965 2004-02-25 Paul Eggert <eggert@twinsun.com>
12966
12967 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
12968 compilers. This fixes a problem with Intel's C++ compiler being
12969 chatty, reported by Guido Trentalancia in
12970 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
12971
12972 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
12973
12974 Support %destructor and merge error locations in lalr1.cc.
12975
12976 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
12977 (Parser::stos_): Define unconditionally.
12978 (Parser::destruct_): New method. Generate its body with
12979 b4_yydestruct_generate.
12980 (Parser::error_start_): New attribute.
12981 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
12982 token which are discarded.
12983 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
12984 error_start_ when erroneous token are discarded.
12985 (Parser::parse) <yyerrlab1>: Compute the location of the error
12986 token so that it covers all the discarded tokens.
12987 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
12988 it can be called with `%skeleton "lalr1.cc"', and do that.
12989
12990 2004-02-02 Paul Eggert <eggert@twinsun.com>
12991
12992 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
12993 $(top_srcdir)/lib and ../lib. This fixes a bug reported
12994 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
12995 There's no need to mention top_builddir since Automake does that
12996 for us.
12997 (INCLUDES): Remove, as Automake says it's obsolescent.
12998 Contents migrated into AM_CPPFLAGS as described above.
12999 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
13000
13001 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
13002
13003 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
13004 (yyreportSyntaxError): Handle case where lookahead token is
13005 YYEMPTY.
13006
13007 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13008
13009 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
13010 resulting parsers are compilable with C++.
13011
13012 2003-12-23 Paul Eggert <eggert@twinsun.com>
13013
13014 * config/depcomp, config/install-sh: Sync with Automake 1.8.
13015 * src/output.c (output_skeleton): Rename local var.
13016 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
13017 Bison tokens, as this runs afoul of the 2003-10-07 change that
13018 disallowed NUL bytes in character constants or string literals.
13019
13020 * tests/local.at: Require Autoconf 2.59's Autotest.
13021 * tests/testsuite.at: Don't include local.at, since we now assume
13022 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
13023 including it.
13024 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
13025 multiple inclusion warnings.
13026
13027 2003-12-02 Akim Demaille <akim@epita.fr>
13028
13029 * doc/bison.texinfo (How Can I Reset the Parser): More about start
13030 conditions.
13031 From Bruno Haible.
13032
13033 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
13034
13035 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
13036
13037 2003-10-07 Paul Eggert <eggert@twinsun.com>
13038
13039 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
13040 if testsuite doesn't exist.
13041
13042 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
13043 literals, unfortunately.
13044 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
13045 Complain about NUL bytes in character constants or string literals.
13046
13047 2003-10-05 Paul Eggert <eggert@twinsun.com>
13048
13049 * NEWS: Don't document %no-default-prec, as it's still
13050 too experimental.
13051 * doc/bison.texinfo: Document %no-default-prec only if
13052 the defaultprec flag is set. Normally it's not.
13053
13054 2003-10-04 Paul Eggert <eggert@twinsun.com>
13055
13056 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
13057 non-modifiable lvalue, instead of a modifiable one.
13058 * doc/bison.texinfo (Actions): Document that $$ can
13059 be assigned to. Do not claim that $$ and $N are
13060 array element references: user code should not rely on this.
13061
13062 2003-10-01 Paul Eggert <eggert@twinsun.com>
13063
13064 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
13065 (grammar_declaration): Use it.
13066 * src/scan-gram.l: New token %no-default-prec.
13067 * tests/conflicts.at: Revamp tests to use %no-default-prec.
13068 * NEWS, doc/bison.texinfo: Document the above.
13069
13070 2003-10-01 Akim Demaille <akim@epita.fr>
13071
13072 VCG no longer supports long_straight_phase.
13073
13074 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
13075 * src/print_graph.c (print_graph): Adjust.
13076
13077 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
13078 and Paul Eggert <eggert@twinsun.com>
13079
13080 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
13081 Table of Symbols): Document %default-prec.
13082 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
13083 (grammar_declaration): Set default_prec on %default-prec.
13084 * src/scan-gram.l (%default-prec): New token.
13085 * src/reader.h (default_prec): New flag.
13086 * src/reader.c: Likewise.
13087 (packgram): Handle it.
13088 * tests/conflicts.at (%default-prec without %prec,
13089 %default-prec with %prec, %default-prec 1): New tests.
13090
13091 2003-09-30 Paul Eggert <eggert@twinsun.com>
13092
13093 * tests/testsuite.at: Include local.at, not input.at, fixing
13094 a typo in the 2003-08-25 patch.
13095
13096 2003-08-27 Akim Demaille <akim@epita.fr>
13097
13098 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
13099 GCC warnings.
13100
13101 2003-08-26 Akim Demaille <akim@epita.fr>
13102
13103 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
13104 "<\#" to avoid magic from Gnus when posting parts of this script.
13105
13106 2003-08-26 Akim Demaille <akim@epita.fr>
13107
13108 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
13109 (Parser::parse): here.
13110 Adjust: nerrs and errstatus is now replaced by...
13111 (Parser::nerrs_, Parser::errstatus_): New.
13112
13113 2003-08-25 Akim Demaille <akim@epita.fr>
13114
13115 * config/announce-gen, Makefile.cfg: New.
13116 * Makefile.am: Adjust.
13117 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
13118 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
13119
13120 2003-08-25 Akim Demaille <akim@epita.fr>
13121
13122 When reducing initial empty rules, Bison parser read an initial
13123 location that is not defined. This results in garbage, and that
13124 affects Bison's own parser. Therefore we need (i) to extend Bison
13125 to support a means to initialize this location, and (ii) to use
13126 this CVS Bison to fix CVS Bison's parser.
13127
13128 * src/reader.h, reader.c (epilogue_augment): Remove, replace
13129 with...
13130 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
13131 * src/parse-gram.y: Adjust.
13132 (%initial-action): New.
13133 (%error-verbose): Since we require CVS Bison, there is no reason
13134 not to use it.
13135 * src/scan-gram.l: Adjust.
13136 * src/Makefile.am (YACC): New, to make sure we use our own parser.
13137 * data/yacc.c (yyparse): Use b4_initial_action.
13138
13139 2003-08-25 Akim Demaille <akim@epita.fr>
13140
13141 * doc/bison.texinfo: Don't promote stdout for error messages.
13142
13143 2003-08-25 Akim Demaille <akim@epita.fr>
13144
13145 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
13146 From Alexandre Duret-Lutz.
13147
13148 2003-08-25 Akim Demaille <akim@epita.fr>
13149
13150 Version 1.875c.
13151
13152 2003-08-25 Akim Demaille <akim@epita.fr>
13153
13154 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
13155 Use them.
13156
13157 2003-08-25 Akim Demaille <akim@epita.fr>
13158
13159 * data/lalr1.cc (Parser::reduce_print_): New.
13160 Use it.
13161
13162 2003-08-25 Akim Demaille <akim@epita.fr>
13163
13164 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
13165 error recovery loops. This patch is based on
13166 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
13167 Also, augment the similarity between lalr1.cc and yacc.c.
13168 Note: the locations of error recovery rules are not correct yet.
13169
13170 * data/lalr1.cc: Comment changes to augment the similarity between
13171 lalr1.cc and yacc.c.
13172 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
13173 (yyerrlab1): Remove, but where it used to be (now the bottom part of
13174 yyerrlab), when hitting EOF, pop the whole stack here instead of
13175 merely falling thru the default error handling mechanism.
13176 (yyerrorlab): New label, with the old contents of YYERROR,
13177 plus the following change: pop the stack of rhs corresponding
13178 to the production that invoked YYERROR. That is how Yacc
13179 behaves (required by POSIX).
13180 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
13181 fail.
13182
13183 2003-08-25 Akim Demaille <akim@epita.fr>
13184
13185 Tune local.at so that people can "autom4te -l autotest calc.at -o
13186 calc" for instance, to extract a sub test suite.
13187
13188 * tests/testsuite.at: Move the initialization, Autotest version
13189 requirement, and AT_TESTED invocation into...
13190 * tests/local.at: here.
13191 * tests/testsuite.at: Include it for compatibility with Autoconf
13192 2.57.
13193 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
13194 be ignore.
13195
13196 2003-08-04 Paul Eggert <eggert@twinsun.com>
13197
13198 Rework code slightly to avoid gcc -Wtraditional warnings.
13199 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
13200 The returned value is now stored in *YY0. All callers changed.
13201 * src/output.c (merge_output): Adjust to the above change.
13202
13203 2003-07-26 Paul Eggert <eggert@twinsun.com>
13204
13205 * data/glr.c (YYASSERT): New macro.
13206 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
13207 yyresolveStates, yyprocessOneStack):
13208 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
13209 Derived from a suggestion by Frank Heckenbach.
13210
13211 2003-07-25 Paul Eggert <eggert@twinsun.com>
13212
13213 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
13214 for portability to K&R C (after ansi2knr, presumably). See
13215 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
13216 by Frank Heckenbach, though I have omitted the structure-initialization
13217 part of his glr-knr.diff patch since I recall that the Portable
13218 C Compiler didn't require that change.
13219
13220 Let the user specify how to allocate and free memory.
13221 Derived from a suggestion by Frank Heckenbach in
13222 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
13223 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
13224 All uses of free, malloc, realloc changed to use these macros,
13225 and unnecessary casts removed.
13226 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
13227
13228 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
13229
13230 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
13231 use s.empty() rather than s == "" to test for empty string; see
13232 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
13233 (trivial change)
13234
13235 2003-06-25 Akim Demaille <akim@epita.fr>
13236
13237 * config/depcomp, config/install-sh: Update from masters.
13238
13239 2003-06-20 Paul Eggert <eggert@twinsun.com>
13240
13241 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
13242 and return properly parenthesized result.
13243 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
13244 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
13245 Remove unnecessary parentheses from uses.
13246 * doc/bison.texinfo (Location Default Action): Describe the
13247 conventions for parentheses.
13248
13249 2003-06-19 Paul Eggert <eggert@twinsun.com>
13250
13251 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
13252 yyreportTree): Do not assume that size_t is the same width as int,
13253 when printing sizes. Print sizes using an unsigned format.
13254 Problem reported by Frank Heckenbach in
13255 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
13256
13257 Port to Forte Developer 7 C compiler.
13258 * data/glr.c (struct YYLTYPE): If locations are not being used,
13259 declare a single dummy member, as empty structs do not conform
13260 to the C standard.
13261 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
13262 the Forte Developer 7 C compiler complains that end-of-loop
13263 code is not reached.
13264
13265 2003-06-17 Paul Eggert <eggert@twinsun.com>
13266
13267 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
13268 avoid warnings from picky compilers about redefinition of PARAMS.
13269
13270 2003-06-17 Paul Eggert <eggert@twinsun.com>
13271
13272 Version 1.875b.
13273
13274 * NEWS: Document 1.875b.
13275
13276 * lib/bbitset.h: Do not include config.h; that's the includer's job.
13277 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
13278 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
13279 Don't use 'index' in comments, as it's a builtin fn on some hosts.
13280 * lib/bitset_stats.c: Include gettext.h unconditionally, as
13281 per recent gettext manual's suggestion.
13282 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
13283 Use prototypes, not old-style definitions.
13284 * lib/lbitset.c (lbitset_unused_clear): Likewise.
13285 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
13286 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
13287 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
13288 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
13289 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
13290 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
13291 vbitset_or_and_cmp, vbitset_copy): Likewise.
13292
13293 * lib/libiberty.h: Do not include config.h; that's the includer's job.
13294 Do not include <stdlib.h>.
13295 (PARAMS): Define unconditionally for C89.
13296 (ATTRIBUTE_NORETURN): Remove.
13297 (ATTRIBUTE_UNUSED): Define unconditionally.
13298
13299 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
13300 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
13301 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
13302 * lib/vbitset.c, lib/vbitset.h: New files.
13303 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
13304 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
13305 from libbitset.
13306
13307 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
13308 `How Can I Reset @code{yyparse}', since texinfo does not allow
13309 arbitrary @ in node names.
13310
13311 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
13312 shouldn't be needed according to the gettext 0.12.1 documentation
13313 but which seem to be needed anyway: codeset.m4 glibc21.m4
13314 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
13315 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
13316 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
13317
13318 * lib/.cvsignore: Add stdbool.h.
13319 * m4/.cvsignore: Add nls.m4, po.m4.
13320
13321 Upgrade to CVS gnulib.
13322 * stdbool_.h: File renamed from stdbool.h.in.
13323 * configure.ac (AM_STDBOOL_H): Invoke this instead of
13324 AC_HEADER_STDBOOL.
13325 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
13326 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
13327 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
13328 (MOSTLYCLEANFILES): New var.
13329 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
13330 (stdbool.h): New rule.
13331 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
13332 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
13333 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
13334 m4/quote.m4: Upgrade to today's gnulib.
13335
13336 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
13337 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
13338 the tests right now.
13339 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
13340 yyerror are declared before use; C99 requires this.
13341
13342 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13343
13344 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
13345 first.
13346 (yyrecoverSyntaxError): Correct the logic for setting and testing
13347 yyerrState.
13348 Correct comment on handling EOF.
13349 Allow states with only a default reduction, rather than failing
13350 (I can't quite reconstruct why these were not allowed before).
13351
13352 Fixes to avoid problem that $-N rules in GLR parsers can cause
13353 buffer overruns, corrupting state.
13354
13355 * src/output.c (prepare_rules): Output max_left_semantic_context
13356 definition.
13357 * src/reader.h (max_left_semantic_context): New variable declaration.
13358 * src/scan-gram.l (max_left_semantic_context): Define.
13359 (handle_action_dollar): Update max_left_semantic_context.
13360 * data/glr.c (YYMAXLEFT): New definition.
13361 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
13362 (yyresolveAction): Ditto.
13363
13364 Fixes to problems with location handling in GLR parsers reported by
13365 Frank Heckenbach (2003/06/05).
13366
13367 * data/glr.c (YYLTYPE): Make trivial if locations not used.
13368 (YYRHSLOC): Add parentheses, and define only if locations used.
13369 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
13370 locations not used.
13371 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
13372 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
13373
13374 * tests/cxx-type.at: Exercise location information; update tests
13375 to differentiate output with and without locations.
13376 Remove forward declarations of yylex and yyerror---caused errors
13377 because default YYLTYPE not yet defined.
13378 Change semantic actions to compute strings, rather than printing
13379 them directly (to test proper passing of semantics values). Change
13380 output to prefix notation and update test data and expected results.
13381 (yylex): Track locations.
13382 (stmtMerge): Return value rather than printing, and include arguments
13383 in value.
13384
13385 2003-06-03 Paul Eggert <eggert@twinsun.com>
13386
13387 Avoid warnings generated by GCC 2.95.4 when Bison is
13388 configured with --enable-gcc-warnings.
13389 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
13390 yy::]b4_parser_class_name[::translate_,
13391 yy::Stack::operator[] (unsigned),
13392 yy::Stack::operator[] (unsigned) const,
13393 yy::Slice::operator[] (unsigned),
13394 yy::Slice::operator[] (unsigned) const):
13395 Rename local vars to avoid warnings.
13396 * tests/glr-regression.at (Improper handling of embedded actions
13397 and $-N in GLR parsers): Remove unused local variable from yylex.
13398 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
13399 (void) as arg when not pure, since we now assume C89 when building
13400 Bison. Pacify GCC by using parameter.
13401
13402 2003-06-02 Paul Eggert <eggert@twinsun.com>
13403
13404 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
13405 yy::Location::lines, yy::Location::columns): Rename arguments
13406 to avoid shadowing; this removes a warning generated by GCC 3.3.
13407
13408 2003-06-01 Paul Eggert <eggert@twinsun.com>
13409
13410 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
13411 to g++, as GCC 3.3 complains if you do it.
13412 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
13413 everything that WARNING_CFLAGS has, except omit warnings
13414 not suitable for C++.
13415 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
13416 * tests/atlocal.in (CXXFLAGS): New var.
13417 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
13418
13419 Fix a GLR parser bug I reported in February; see
13420 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
13421 The problem was that GLR parsers did not conform to the C standard,
13422 because actions like { $1 = $2 + $3; } expanded to expressions
13423 that invoked YYFILL in separate subexpressions, and YYFILL assigned
13424 to a local variable. The C standard says that expressions
13425 like (var = f ()) + (var = f ()) have undefined behavior.
13426 Another problem was that GCC sometimes issues warnings that
13427 yyfill and its parameters are unused.
13428
13429 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
13430 as possibly unused.
13431 (yyfill): New function.
13432 (YYFILL): Use it.
13433 (yyuserAction): Change type of yynormal to bool, so that it matches
13434 the new yyfill signature. Mark it as possibly unused.
13435
13436
13437 Follow up on a bug I reported in February, where a Bison-generated
13438 parser can loop. Provide a test case and a fix for yacc.c. I
13439 don't have a fix for lalr1.cc or for glr.c, unfortunately.
13440 The original bug report is in:
13441 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
13442
13443 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
13444 macro's size was becoming unwieldy.
13445 (yyerrlab): Do not discard an empty lookahead symbol, as this
13446 might destroy garbage.
13447 (yyerrorlab): New label, with the old contents of YYERROR,
13448 plus the following change: pop the stack of rhs corresponding
13449 to the production that invoked YYERROR. That is how Yacc
13450 behaves, and POSIX requires this behavior.
13451 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
13452 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
13453 Define 'alarm' to do nothing if unistd.h is not available.
13454 Add a new rule "exp: '-' error;" to test the above change to
13455 data/yacc.c. Use 'alarm' to abort any test taking longer than
13456 10 seconds, as it's probably looping.
13457 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
13458 Also, the new yacc.c generates two fewer diagnostics for an
13459 existing test.
13460
13461 2003-05-24 Paul Eggert <eggert@twinsun.com>
13462
13463 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
13464 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
13465 This fixes a problem reported by John Bowman when the Compaq/HP
13466 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
13467 -ansi -Wall -gall).
13468 * data/yacc.c (union yyalloc): Likewise.
13469 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
13470
13471 Switch from 'int' to 'bool' where that makes sense.
13472
13473 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
13474 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
13475 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
13476 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
13477 Return or accept bool, not int. All callers changed.
13478 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
13479 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
13480 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
13481 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
13482 bitset_or_and_cmp_): Likewise.
13483 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
13484 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
13485 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
13486 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
13487 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
13488 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
13489 bitset_stats_or_and_cmp): Likewise.
13490 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
13491 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
13492 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
13493 ebitset_xor_cmp): Likewise.
13494 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
13495 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
13496 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
13497 lbitset_xor_cmp): Likewise.
13498 * lib/bbitset.h: Include <stdbool.h>.
13499 (struct bitset_vtable): The following members now return bool, not
13500 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
13501 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
13502 or_and_cmp).
13503 * src/conflicts.c (count_rr_conflicts): Likewise.
13504 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
13505 All uses changed.
13506 * lib/ebitset.c (ebitset_obstack_init): Likewise.
13507 * lib/lbitset.c (lbitset_obstack_init): Likewise.
13508 * src/getargs.c (debug_flag, defines_flag, locations_flag,
13509 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
13510 graph_flag): Likewise.
13511 * src/getargs.h (debug_flag, defines_flag, locations_flag,
13512 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
13513 graph_flag): Likewise.
13514 * src/output.c (error_verbose): Likewise.
13515 * src/output.h (error_verbose): Likewise.
13516 * src/reader.c (start_flag, typed): Likewise.
13517 * src/reader.h (typed): Likewise.
13518 * src/getargs.c (LOCATIONS_OPTION): New constant.
13519 (long_options, getargs): Use it.
13520 * src/lalr.c (build_relations): Use bool, not int.
13521 * src/nullable.c (nullable_compute): Likewise.
13522 * src/print.c (print_reductions): Likewise.
13523 * src/tables.c (action_row, pack_vector): Likewise.
13524 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
13525 * src/output.c (prepare): Use it.
13526 * src/output.c (token_definitions_output,
13527 symbol_destructors_output, symbol_destructors_output): Use string,
13528 not boolean integer, to keep track of whether to output separator.
13529 * src/print_graph.c (print_core): Likewise.
13530 * src/state.c (state_rule_lookaheads_print): Likewise.
13531
13532 * config/install-sh: Sync from automake 1.7.5.
13533
13534 2003-05-14 Paul Eggert <eggert@twinsun.com>
13535
13536 * src/parse-gram.y (rules_or_grammar_declaration): Require a
13537 semicolon after a grammar declaration, in the interest of possible
13538 future changes to the Bison input language.
13539 Do not allow a stray semicolon at the start of the grammar.
13540 (rhses.1): Allow one or more semicolons after any rule, including
13541 just before "|" as required by POSIX.
13542 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
13543 grammar.
13544
13545 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
13546
13547 %parse-param support for lalr1.cc.
13548
13549 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
13550 b4_cc_constructor_calls, b4_cc_constructor_call,
13551 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
13552 definitions.
13553 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
13554 parse-param arguments.
13555 (yy::b4_parser_class_name): Declare instance variables to
13556 hold parse-param arguments.
13557 * tests/calc.at: s/value/semantic_value/ because value clashes
13558 with a member of yy::b4_parser_class_name. Adjust C++ code
13559 to handle %parse-param. Enable %parse-param test in C++.
13560
13561 2003-05-12 Paul Eggert <eggert@twinsun.com>
13562
13563 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
13564 English a bit. Fix fclose typo. Change "const char" to "char
13565 const", and use ANSI C rather than K&R for "main". Suggest
13566 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
13567 and suggest yy_switch_to_buffer.
13568
13569 2003-05-05 Paul Eggert <eggert@twinsun.com>
13570
13571 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
13572 C89. This avoids a diagnostic on compilers that define __STDC__
13573 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
13574 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
13575
13576 2003-05-03 Paul Eggert <eggert@twinsun.com>
13577
13578 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
13579 Do not overrun array bounds.
13580 This should fix a bug reported today by Olatunji Oluwabukunmi in
13581 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
13582
13583 2003-04-29 Akim Demaille <akim@epita.fr>
13584
13585 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
13586 * src/getargs.c, src/getargs.h: here, as bool, not int.
13587 (nondeterministic_parser): New.
13588 * src/parse-gram.y, src/scan-gram.l: Support
13589 %nondeterministic-parser.
13590 * src/output.c (prepare): Use nondeterministic_parser instead
13591 of glr_parser where appropriate.
13592 * src/tables.c (conflict_row, action_row, save_row)
13593 (token_actions, token_actions, pack_vector): Ditto.
13594
13595 2003-04-29 Akim Demaille <akim@epita.fr>
13596
13597 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
13598
13599 2003-04-29 Akim Demaille <akim@epita.fr>
13600
13601 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
13602 with %pure-parser and %locations to exercise the patch from Yakov
13603 Markovitch below.
13604
13605 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
13606
13607 * data/yacc.c: (b4_lex_param): Corrected for the case where
13608 %lex-param is provided and %pure-parser isn't.
13609
13610 2003-04-27 Paul Eggert <eggert@twinsun.com>
13611
13612 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
13613 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
13614 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
13615 if it is not defined.
13616 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
13617
13618 2003-04-26 Paul Eggert <eggert@twinsun.com>
13619
13620 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
13621 Declare to be of type suitable for the ninf value itself, not of
13622 type suitable for the corresponding table, since the latter might
13623 be unsigned but the ninf value might be negative. This fixes a
13624 bug reported by Alexandre Duret-Lutz in
13625 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
13626
13627 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
13628 invokes it. We shouldn't invoke it twice because it will attempt
13629 to put error.o in the archive twice. This fixes a glitch reported
13630 by Martin Mokrejs in
13631 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
13632
13633 2003-04-21 Paul Eggert <eggert@twinsun.com>
13634
13635 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
13636 to gnulib.
13637
13638 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
13639
13640 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
13641 Fix obvious typo that results in uncompilable GLR parsers
13642 when both %pure-parser and %locations are used. (trivial change)
13643
13644 2003-04-17 Paul Eggert <eggert@twinsun.com>
13645
13646 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
13647 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
13648 Do not insert the expected token via unput, as this runs afoul
13649 of a POSIX-compatibility bug in flex 2.5.31.
13650 All uses changed to BEGIN the parent state,
13651 since we no longer insert the expected token via unput.
13652 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
13653 that is no longer emitted after the above change.
13654
13655 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
13656 the first one. This change is from Paul Hilfinger, and it fixes
13657 regression reported by Werner Lemberg in
13658 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
13659
13660 (resolve_sr_conflict): Don't invoke state_errs_set
13661 unless one or more tokens have been explicitly made errors.
13662 Otherwise, the above change causes Bison to abort.
13663
13664 * tests/existing.at (GNU pic Grammar): New test case, taken from
13665 Lemberg's email.
13666
13667 2003-03-31 Akim Demaille <akim@epita.fr>
13668
13669 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
13670
13671 2003-03-31 Akim Demaille <akim@epita.fr>
13672
13673 * src/output.c (prepare_symbols): Avoid trailing spaces in the
13674 output.
13675
13676 2003-03-31 Akim Demaille <akim@epita.fr>
13677
13678 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
13679 From Paul Hilfinger.
13680
13681 2003-03-29 Akim Demaille <akim@epita.fr>
13682
13683 * m4/error.m4: Do not put under dynamic conditions some code which
13684 expansion is under static control.
13685
13686 2003-03-29 Akim Demaille <akim@epita.fr>
13687
13688 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
13689
13690 2003-03-29 Akim Demaille <akim@epita.fr>
13691
13692 * doc/bison.texinfo (Strings are Destroyed): New.
13693
13694 2003-03-13 Paul Eggert <eggert@twinsun.com>
13695
13696 * .cvsignore: Add configure.lineno.
13697 * src/.cvsignore: Add yacc.
13698 * tests/.cvsignore: Add testsuite.log.
13699 * doc/fdl.texi: Sync with latest FSF version.
13700
13701 2003-03-12 Paul Eggert <eggert@twinsun.com>
13702
13703 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
13704 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
13705 cursor, instead of leaving it undefined. This fixes a bug
13706 reported by Tim Van Holder in
13707 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
13708 * tests/input.at (Torturing the Scanner): Test the scanner on
13709 an empty input file, which was Tim Van Holder's test case.
13710
13711 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
13712 <sys/resource.h> can be included, include sys/time.h and
13713 sys/times.h first, if available. This works around the SunOS
13714 4.1.4 porting bug reported by Bruce Becker in
13715 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
13716
13717 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
13718 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
13719 AC_HEADER_SYS_WAIT.
13720
13721 Merge changes from gnulib. This was prompted because the CVS
13722 snapshot didn't build on Solaris 7 due to strnlen problems.
13723
13724 These changes need to be merged back into gnulib:
13725 * lib/hash.c: Include <stdbool.h> unconditionally.
13726 * m4/onceonly.m4 (m4_quote): New macro.
13727 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
13728 Quote AC_FOREACH variable-expansions properly.
13729 The 2003-01-03 obstack.h change also needs merging.
13730 {end of changes requiring merging}
13731
13732 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
13733 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
13734 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
13735 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
13736 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
13737 New files, imported from gnulib.
13738 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
13739 above.
13740
13741 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
13742 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
13743 gnulib sources.
13744
13745 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
13746 Add.
13747 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
13748 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
13749 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
13750 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
13751 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
13752 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
13753 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
13754 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
13755 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
13756 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
13757 (jm_PREREQ_ARGMATCH): Remove.
13758 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
13759 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
13760
13761 * src/system.h: Include <stdbool.h> unconditionally.
13762
13763 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
13764 assuming at least C89 in the bitset code for some time now.
13765
13766 2003-03-03 Akim Demaille <akim@epita.fr>
13767
13768 * ro.po: New.
13769
13770 2003-03-02 Akim Demaille <akim@epita.fr>
13771
13772 * doc/bison.texinfo (Table of Symbols): Reactivate the
13773 documentation for %lex-param, and %parse-param.
13774
13775 2003-03-02 Akim Demaille <akim@epita.fr>
13776
13777 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
13778 generate verbose error messages.
13779 Use the number of tokens as an upper bound in yytname, as it
13780 cannot be a non terminal.
13781
13782 2003-03-02 Akim Demaille <akim@epita.fr>
13783
13784 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
13785 message.
13786
13787 2003-03-02 Akim Demaille <akim@epita.fr>
13788
13789 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
13790 Use them to exercise yycheck overrun.
13791 Based on Andrew Suffield's grammar.
13792
13793 2003-03-02 Akim Demaille <akim@epita.fr>
13794
13795 Create tests/local.at for Bison generic testing macros.
13796
13797 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
13798 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
13799 This new file.
13800 * tests/calc.at (AT_CHECK_CALC): Adjust.
13801 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
13802 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
13803 * tests/local.at: here.
13804 (AT_COMPILE_CXX): Tags the tests using it as c++.
13805 Ignore the test if CXX is not functional.
13806
13807 2003-03-01 Paul Eggert <eggert@twinsun.com>
13808
13809 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
13810 not loc->end, since loc->end might contain garbage and this leads
13811 to undefined behavior on some platforms.
13812 (id_loc, token_start): Use (IF_LINTed) initial values that do not
13813 depend on *loc, so that the reader doesn't give the the false
13814 impression that *loc is initialized.
13815 (<INITIAL>"%%"): Do not bother setting code_start, since its value
13816 does not survive the return.
13817
13818 2003-03-01 Akim Demaille <akim@epita.fr>
13819
13820 * src/scan-gram.l (code_start): Always initialize it when entering
13821 into yylex, as SC_EPILOGUE is activated *before* the corresponding
13822 yylex invocation. An alternative would be making it static, but
13823 then it starts with the second %%'s beginning, instead of its end.
13824
13825 2003-02-28 Paul Eggert <eggert@twinsun.com>
13826
13827 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
13828 around a UnixWare 7.1.1 porting bug reported by John Hughes in
13829 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
13830
13831 2003-02-26 Paul Eggert <eggert@twinsun.com>
13832
13833 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
13834 Remove Sequent/Pyramid discussion (nobody uses them any more).
13835 Merge VMS and MS-DOS discussion; these ports may well be dead
13836 but let's keep mentioning them for now. Put <> around email
13837 addresses. Add copyright notice.
13838
13839 2003-02-24 Paul Eggert <eggert@twinsun.com>
13840
13841 * data/glr.c (yy_reduce_print): yylineno -> yylno,
13842 to avoid collision with flex use of yylineno.
13843 Problem reported by Bruce Lilly in
13844 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
13845 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
13846 * data/yacc.c (yy_reduce_print): Likewise.
13847
13848 * config/depcomp: Sync with Automake 1.7.3.
13849
13850 2003-02-21 Akim Demaille <akim@epita.fr>
13851
13852 * data/lalr1.cc: Use temporary variables instead of casts to
13853 change integer types.
13854 Suggested by Paul Eggert.
13855
13856 2003-02-21 Akim Demaille <akim@epita.fr>
13857
13858 * doc/bison.texinfo: Use "location" consistently to refer to @n,
13859 to avoid confusions with lalr1.cc's notion of Position.
13860 Suggested by Paul Eggert.
13861
13862 2003-02-20 Akim Demaille <akim@epita.fr>
13863
13864 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
13865 before initial_columns.
13866 (location.hh): Use consistent variable names when defining the
13867 operator<<.
13868 Use "last" so that we subtract from Positions, not from unsigned.
13869
13870 2003-02-20 Akim Demaille <akim@epita.fr>
13871
13872 * data/lalr1.cc (position.hh): New subfile, including the extended
13873 and Doxygen'ed documentation of class Position.
13874 (location.hh): Use it.
13875 Document a` la Doxygen.
13876 With the help of Benoit Perrot.
13877
13878 2003-02-20 Akim Demaille <akim@epita.fr>
13879
13880 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
13881 AT_YACC_IF.
13882 Redefine AT_YYERROR_SEES_LOC_IF using it.
13883 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
13884 not defined.
13885 Don't use the location in yy::Parser::error_ and
13886 yy::Parser::print_ when not %locations.
13887 Activate more lalr1.cc tests.
13888
13889 2003-02-19 Akim Demaille <akim@epita.fr>
13890
13891 * data/lalr1.cc: When displaying a line number, be sure to make it
13892 an int.
13893
13894 2003-02-19 Akim Demaille <akim@epita.fr>
13895
13896 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
13897 Remove, useless.
13898 (YYABORT, YYACCEPT, YYERROR): New.
13899 * tests/calc.at: Renable the lalr1.cc test.
13900
13901 2003-02-19 Akim Demaille <akim@epita.fr>
13902
13903 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
13904 error recovery, mixing with/without pops and discarding of the
13905 lookahead.
13906 Exercise YYERROR.
13907 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
13908
13909 2003-02-17 Paul Eggert <eggert@twinsun.com>
13910
13911 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
13912 * tests/testsuite.at (AT_COMPILE): Use them.
13913 This fixes the testsuite problem reported by Robert Lentz in
13914 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
13915
13916 2003-02-12 Paul Eggert <eggert@twinsun.com>
13917
13918 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
13919 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
13920 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
13921 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
13922 Check for malloc failure, for consistency with yacc.c.
13923 (yytname_size): Remove, for consistency with yacc.c.
13924
13925 The bug still remains in data/lalr1.cc, as I didn't have time
13926 to fix it there.
13927
13928 2003-02-06 Akim Demaille <akim@epita.fr>
13929
13930 * configure.ac (GXX): Rename as...
13931 (CXX): this, to keep the original Autoconf semantics.
13932 Require 2.57.
13933 * data/lalr1.cc: Fix b4_copyright invocations.
13934 If YYDEBUG is not defined, don't depend upon name_ being defined.
13935 (location.hh): Include string and iostream.
13936 (Position::filename): New member.
13937 (Position::Position ()): New.
13938 (operator<< (Position)): New.
13939 (operator- (Position, int)): New.
13940 (Location::first, Location::last): Rename as...
13941 (Location::begin, Location::end): these, to mock the conventional
13942 iterator names.
13943 (operator<< (Location)): New.
13944 * tests/atlocal.in (CXX): New.
13945 * tests/testsuite.at (AT_COMPILE_CXX): New.
13946 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
13947 locations in a more synthetic way.
13948 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
13949 lalr1.cc is used.
13950 Adjust the C locations to match those from Emacs: first column is
13951 column 0.
13952 Change all the expected results.
13953 Conform to the GCS: simplify the locations when applicable.
13954 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
13955 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
13956 these CPP macros with the m4 macros new defined by...
13957 (AT_CHECK_PUSHDEFS): this, i.e.:
13958 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
13959 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
13960 New macros.
13961 (AT_CHECK_POPDEFS): Undefine them.
13962 (AT_CHECK_CALC_LALR1_CC): New.
13963 Use it for the first lalr1.cc test.
13964
13965 2003-02-04 Akim Demaille <akim@epita.fr>
13966
13967 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
13968 Location as is defined.
13969
13970 2003-02-04 Akim Demaille <akim@epita.fr>
13971
13972 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
13973 name_ being defined.
13974
13975 2003-02-03 Paul Eggert <eggert@twinsun.com>
13976
13977 * src/gram.h (start_symbol): Remove unused decl.
13978
13979 Use more-consistent naming conventions for local vars.
13980
13981 * src/derives.c (derives_compute): Change type of local var from
13982 int to rule_number.
13983 * src/gram.c (grammar_rules_partial_print): Likewise.
13984 * src/print.c (print_core): Likewise.
13985 * src/reduce.c (reduce_grammar_tables): Likewise.
13986
13987 * src/gram.c (grammar_dump): Change name of item_number *
13988 local var from r to rp.
13989 * src/nullable.c (nullable_compute): Likewise.
13990
13991 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
13992
13993 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
13994 for symbol or symbol_number var.
13995 * src/reader.c (grammar_start_symbol_set): Likewise.
13996 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
13997 Likewise.
13998 * src/state.c (transitions_to): Likewise.
13999 * src/state.h: Likewise.
14000 * src/tables.c (symbol_number_to_vector_number): Likewise.
14001
14002 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
14003 char * var.
14004
14005 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
14006 var.
14007
14008 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
14009 var.
14010
14011 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
14012 Use str, not s, for char * var. Use ch, not c, for character var.
14013 Use size for size var.
14014
14015 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
14016 char * var.
14017 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
14018 uniqstr var.
14019 * src/uniqstr.h: Likewise.
14020
14021 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
14022 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
14023 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
14024 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
14025 param to have same name as that of enum, so that we don't use
14026 "s" to stand for a non-state.
14027
14028 2003-02-02 Akim Demaille <akim@epita.fr>
14029
14030 * src/scan-skel.l: Scan more than one inert character per yylex
14031 invocation.
14032
14033 2003-02-01 Paul Eggert <eggert@twinsun.com>
14034
14035 Version 1.875a.
14036
14037 * po/LINGUAS: Add ms.
14038
14039 2003-01-30 Akim Demaille <akim@epita.fr>
14040
14041 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
14042
14043 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14044
14045 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
14046 of $1.
14047
14048 Changes in response to error report by S. Eken: GLR mode does not
14049 handle negative $ indices or $ indices in embedded rules correctly.
14050 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
14051
14052 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
14053 (b4_rhs_location): Ditto.
14054 (yyfill): New function to copy from stack tree into array
14055 incrementally.
14056 (yyuserAction): Modify to allow incremental move of semantic values
14057 to rhs array when in GLR mode.
14058 Define YYFILL to use in user-defined actions to fill semantic array
14059 as needed.
14060 Remove dummy use of yystack, as there is now a guaranteed use.
14061 (yydoAction): Modify to allow incremental move of semantic values
14062 to rhs array when in GLR mode.
14063 (yyresolveAction): Ditto.
14064 (yyglrShiftDefer): Update comment.
14065 (yyresolveStates): Use X == NULL for pointers, not !X.
14066 (yyglrReduce): Ditto.
14067 (yydoAction): Ditto
14068
14069 * tests/glr-regr1.at: Rename to ...
14070 * tests/glr-regression.at: Add new regression test for the problems
14071 described above (adapted from S. Eken).
14072 Update copyright notice.
14073 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
14074 * tests/Makefile.am: Ditto.
14075
14076 2003-01-28 Paul Eggert <eggert@twinsun.com>
14077
14078 * data/lalr1.cc: Do not use @output_header_name@ unless
14079 b4_defines_flag is set. This fixes two bugs reported by
14080 Tim Van Holder in
14081 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
14082 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
14083
14084 2003-01-21 Paul Eggert <eggert@twinsun.com>
14085
14086 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
14087 we don't need to worry about yyerrlab1 being reported as an
14088 "unused label" by non-GCC C compilers. The downside is that if
14089 locations are used then a couple of statements are duplicated each
14090 time YYERROR is invoked, but the upside is that the warnings
14091 should vanish.
14092 (yyerrlab1): Move code to YERROR.
14093 (yyerrlab2): Remove. Change uses back to yyerrlab1.
14094 This reverts some of the 2002-12-27 change.
14095
14096 2003-01-17 Paul Eggert <eggert@twinsun.com>
14097
14098 * src/output.c (symbol_printers_output): Fix typo that led
14099 to core dump. Problem reported by Antonio Rus in
14100 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
14101
14102 2003-01-13 Akim Demaille <akim@epita.fr>,
14103 Quoc Peyrot <chojin@lrde.epita.fr>,
14104 Robert Anisko <anisko_r@lrde.epita.fr>
14105
14106 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
14107 when the stacks contain one element, as the loop would otherwise
14108 free the last state, and then use the top state (the one we just
14109 popped). This means that the initial elements will not be freed
14110 explicitly, as is the case in yacc.c; it is not a problem, as
14111 these elements have fake values.
14112
14113 2003-01-11 Paul Eggert <eggert@twinsun.com>
14114
14115 * NEWS: %expect-violations are now just warnings, reverting
14116 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
14117 bootstrapping problem reported by Matthias Klose; see
14118 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
14119 * src/conflicts.c (conflicts_print): Likewise.
14120 * tests/conflicts.at (%expect not enough, %expect too much,
14121 %expect with reduce conflicts): Likewise.
14122 * doc/bison.texinfo (Expect Decl): Document this. Also mention
14123 that the warning is enabled if the number of conflicts changes
14124 (not necessarily increases).
14125
14126 * src/getargs.c (version): Update copyright year.
14127
14128 2003-01-09 Akim Demaille <akim@epita.fr>
14129
14130 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
14131
14132 2003-01-08 Paul Eggert <eggert@twinsun.com>
14133
14134 * Makefile.maint (WGETFLAGS):
14135 New macro, containing "-C off" to disable proxy caches.
14136 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
14137 (rel-check): Use $(WGET) instead of wget.
14138
14139 2003-01-06 Paul Eggert <eggert@twinsun.com>
14140
14141 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
14142 the GLR paper of Scott, Johnstone and Hussain.
14143
14144 2003-01-04 Paul Eggert <eggert@twinsun.com>
14145
14146 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
14147 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
14148 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
14149 (EXTRA_LIBRARIES): New var, for liby.a.
14150 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
14151 (EXTRA_SCRIPTS): New var, for yacc.
14152
14153 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
14154 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
14155 Problem reported by Nelson H. F. Beebe.
14156
14157 2003-01-03 Paul Eggert <eggert@twinsun.com>
14158
14159 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
14160 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
14161 when compiling Bison 1.875's `bitset bset = obstack_alloc
14162 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
14163
14164 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
14165 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
14166 grow to a huge size with typical invocation.
14167
14168 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
14169 Use the pattern recommended by Autoconf 2.57, except also protect
14170 against double-definition.
14171 * src/system.h: Likewise.
14172 Portability issues reported by Nelson H. F. Beebe.
14173
14174 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
14175 All uses changed. Provide a definition in both C and C++.
14176 (yytrue, yyfalse): Define even if defined (__cplusplus).
14177
14178 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
14179 Reported by Nelson H. F. Beebe.
14180
14181 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
14182
14183 2003-01-02 Paul Eggert <eggert@twinsun.com>
14184
14185 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
14186 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
14187 Bug reported by Nelson H. F. Beebe.
14188
14189 2003-01-01 Paul Eggert <eggert@twinsun.com>
14190
14191 * Version 1.875.
14192
14193 2002-12-30 Paul Eggert <eggert@twinsun.com>
14194
14195 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
14196 Moved here from...
14197 (<INITIAL>","): Here. This causes stray "," to be treated
14198 more uniformly.
14199
14200 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
14201 last brace in braced code when not in Yacc mode, for compatibility
14202 with Bison 1.35. This resurrects the 2001-12-15 patch to
14203 src/reader.c.
14204
14205 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
14206 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
14207
14208 2002-12-28 Paul Eggert <eggert@twinsun.com>
14209
14210 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
14211 that of SYM's type. This fixes Debian bug 168069, reported by
14212 Thomas Olsson.
14213
14214 2002-12-28 Paul Eggert <eggert@twinsun.com>
14215
14216 Version 1.75f.
14217
14218 Switch back to the Yacc style of conflict reports, undoing some
14219 of the 2002-07-30 change.
14220 * doc/bison.texinfo (Understanding): Use Yacc style for
14221 conflict reports. Also, use new way of locating rules.
14222 * src/conflicts.c (conflict_report):
14223 Renamed from conflict_report_yacc, removing the old
14224 'conflict_report'. Translate the entire conflict report at once,
14225 so that we don't assume that "," has the same interpretation in
14226 all languages.
14227 (conflicts_output): Use Yacc-style conflict report for each state,
14228 instead of our more-complicated style.
14229 (conflicts_print): Use Yacc-style conflict report, except print
14230 the input file name when not emulating Yacc.
14231 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
14232 Conflicted Reduction, %expect not enough, %expect too much,
14233 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
14234 * tests/existing.at (GNU Cim Grammar): Likewise.
14235 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
14236
14237 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
14238 fatal): Don't invoke fflush; it's not needed and it might even be
14239 harmful for stdout, as stdout might not be open.
14240 * src/reduce.c (reduce_print): Likewise.
14241
14242 2002-12-27 Paul Eggert <eggert@twinsun.com>
14243
14244 Fix a bug where error locations were not being recorded correctly.
14245 This problem was originally reported by Paul Hilfinger in
14246 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
14247
14248 * data/yacc.c (yyparse): New local var yylerrsp, to record the
14249 top of the location stack's error locations.
14250 (yyerrlab): Set it. When discarding a token, push its location
14251 onto yylerrsp so that we don't lose track of the error's end.
14252 (yyerrlab1): Now is only the target of YYERROR, so that we can
14253 properly record the location of the action that failed. For GCC
14254 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
14255 GCC warning about yyerrlab1 being unused if YYERROR is unused.
14256 (yyerrlab2): New label, which yyerrlab now falls through to.
14257 Compute the error's location by applying YYLLOC_DEFAULT to
14258 the locations of all the symbols that went into the error.
14259 * doc/bison.texinfo (Location Default Action): Mention that
14260 YYLLOC_DEFAULT is also invoked for syntax errors.
14261 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
14262 Error locations include the locations of all the tokens that were
14263 discarded, not just the last token.
14264
14265 2002-12-26 Paul Eggert <eggert@twinsun.com>
14266
14267 * src/files.c: Include quote.h.
14268 (compute_output_file_names): Warn if we detect conflicting
14269 outputs to the same file. This should catch the misunderstanding
14270 exemplified by Debian Bug 165349, reported by Bruce Stephens..
14271
14272 * src/conflicts.c (conflicts_print): If the user specifies
14273 "%expect N", report an error if there are any reduce/reduce
14274 conflicts. This is what the manual says should happen.
14275 This fixes Debian bug 130890, reported by Anthony DeRobertis.
14276 * tests/conflicts.at (%expect with reduce conflicts): New test.
14277
14278 Don't use m4_include on relative file names, as it doesn't work as
14279 desired if there happens to be a file with that name under ".".
14280
14281 * m4sugar/version.m4: Remove; it was included but it wasn't used.
14282 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
14283 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
14284 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
14285 * src/output.c (output_skeleton): Use full path names when
14286 specifying a file to include; don't rely on include path, as
14287 it's unreliable when the working file contains a file with
14288 that name.
14289
14290 2002-12-25 Paul Eggert <eggert@twinsun.com>
14291
14292 Remove obsolete references to bison.simple and bison.hairy.
14293 Problem mentioned by Aubin Mahe in
14294 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
14295 * data/glr.c: Comment fix.
14296 * doc/bison.1: Remove references. Also, mention "yacc".
14297
14298 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
14299 with -g option.
14300
14301 * src/parse-gram.y (declaration): Use enum "report_states" rather
14302 than its numeric value 1.
14303
14304 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
14305 opening a new one. This fixes Debian bug 165349, reported by
14306 Bruce Stephens.
14307
14308 2002-12-24 Paul Eggert <eggert@twinsun.com>
14309
14310 Version 1.75e.
14311
14312 * Makefile.maint (cvs-update): Don't assume that the shell
14313 supports $(...), as Solaris sh doesn't.
14314
14315 * src/parse-gram.y (lloc_default): Remove test for empty
14316 nonterminals at the end, since it didn't change the result.
14317
14318 2002-12-24 Paul Eggert <eggert@twinsun.com>
14319
14320 If the user does not define YYSTYPE as a macro, Bison now declares it
14321 using typedef instead of defining it as a macro. POSIX requires this.
14322 For consistency, YYLTYPE is also declared instead of defined.
14323
14324 %union directives can now have a tag before the `{', e.g., the
14325 directive `%union foo {...}' now generates the C code
14326 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
14327 The default union tag is `YYSTYPE', for compatibility with Solaris 9
14328 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
14329 instead of `yyltype'.
14330
14331 `yystype' and `yyltype' are now obsolescent macros instead of being
14332 typedefs or tags; they are no longer documented and will be
14333 withdrawn in a future release.
14334
14335 * data/glr.c (b4_location_type): Remove.
14336 (YYSTYPE): Renamed from yystype.
14337 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
14338 (struct YYLTYPE): Renamed from struct yyltype.
14339 (YYLTYPE): Renamed from yyltype.
14340 (yyltype, yystype): New (and obsolescent) macros,
14341 for backward compatibility.
14342 * data/yacc.c: Likewise.
14343
14344 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
14345 does not specify a union tag. This is for compatibility with
14346 Solaris 9 yacc.
14347
14348 * src/parse-gram.y (add_param): 2nd arg is now char * not char
14349 const *, since it is now modified by stripping surrounding { }.
14350 (current_braced_code): Remove.
14351 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
14352 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
14353 trailing " {...}". Now of type <chars>.
14354 (grammar_declaration): Adjust to bundled tokens.
14355 (code_content): Remove; stripping is now done by add_param.
14356 (print_token_value): Print contents of bundled tokens.
14357 (token_name): New function.
14358
14359 * src/reader.h (braced_code, current_braced_code): Remove.
14360 (token_name): New decl.
14361
14362 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
14363 token_type, not braced_code code_kind. All uses changed.
14364 (SC_PRE_CODE): New state, for scanning after a keyword that
14365 has (or usually has) an immediately-following braced code.
14366 (token_type): New local var, to keep track of which token type
14367 to return when scanning braced code.
14368 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
14369 <INITIAL>"%parse-param", <INITIAL>"%printer",
14370 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
14371 instead of returning a token type immediately.
14372 (<INITIAL>"{"): Set token type.
14373 (<SC_BRACED_CODE>"}"): Use it.
14374 (handle_action_dollar, handle_action_at): Now returns bool
14375 indicating success. Fail if ! current_rule; this prevents a core dump.
14376 (handle_symbol_code_dollar, handle_symbol_code_at):
14377 Remove; merge body into caller.
14378 (handle_dollar, handle_at): Complain in invalid contexts.
14379
14380 * NEWS, doc/bison.texinfo: Document the above.
14381 * NEWS: Fix years and program names in copyright notice.
14382
14383 2002-12-17 Paul Eggert <eggert@twinsun.com>
14384
14385 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
14386 Reporting, Table of Symbols): Omit mentions of %lex-param and
14387 %parse-param from the documentation for now.
14388
14389 2002-12-15 Paul Eggert <eggert@twinsun.com>
14390
14391 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
14392 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
14393 lookahead symbol, and which sets yychar in parser actions) and it
14394 disagreed with the Bison documentation. Bug
14395 reported by Andrew Walrond.
14396
14397 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
14398 as the caller now does that.
14399 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
14400 (YYEMPTY): Parenthesize right hand side, since others use it.
14401 (yyparse): Don't assume that our generated code is the only code
14402 that sets yychar.
14403
14404 2002-12-13 Paul Eggert <eggert@twinsun.com>
14405
14406 Version 1.75d.
14407
14408 POSIX requires a "yacc" command.
14409 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
14410 (MOSTLYCLEANFILES): Add yacc.
14411 (yacc): New rule.
14412 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
14413 as an alias for bison y.
14414
14415 * po/LINGUAS: Add da.
14416
14417 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
14418 problem with latest <getopt.h>.
14419 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
14420
14421 * doc/fdl.texi: Upgrade to 1.2.
14422 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
14423 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
14424 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
14425 gnulib.
14426 * config/install-sh: Sync with autotools.
14427
14428 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
14429 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
14430 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
14431 locations are requested.
14432 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
14433 locations are requested.
14434
14435 2002-12-12 Paul Eggert <eggert@twinsun.com>
14436
14437 Remove unportable casts and storage allocation tricks.
14438 While we're at it, remove almost all casts, since they
14439 usually aren't needed and are a sign of trouble.
14440
14441 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
14442
14443 * src/derives.c (derives_compute): Do not subtract NTOKENS from
14444 the pointer DSET returned by malloc; this isn't portable.
14445 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
14446 Similarly for DERIVES.
14447 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
14448 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
14449 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
14450
14451 * src/derives.c (derives_compute): Do not bother invoking
14452 int_of_rule_number, since rule numbers are integers.
14453
14454 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
14455 rather than XMALLOC (char, N).
14456
14457 * src/files.c (filename_split): Rewrite to avoid cast.
14458
14459 * src/gram.h (symbol_number_as_item_number,
14460 item_number_as_symbol_number, rule_number_as_item_number,
14461 item_number_as_rule_number):
14462 Now inline functions rather than macros, to avoid casts.
14463 * src/state.h (state_number_as_int): Likewise.
14464 * src/tables.c (state_number_to_vector_number,
14465 symbol_number_to_vector_number): Likewise.
14466
14467 * src/gram.h (int_of_rule_number): Remove; no longer used.
14468
14469 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
14470 since the resulting storage is always stored into.
14471
14472 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
14473 where it's needed.
14474
14475 * src/muscle_tab.c (muscle_m4_output):
14476 Now inline. Return bool, not int.
14477 * src/state.c (state_compare): Likewise.
14478 * src/symtab.c (symbol_check_defined,
14479 symbol_check_alias_consistency, symbol_pack, symbol_translation,
14480 hash_compare_symbol, hash_symbol):
14481 Likewise.
14482 * src/uniqstr.c (uniqstr_print): Likewise.
14483 * src/muscle_tab.c (muscle_m4_output_processor):
14484 New function, to avoid casts.
14485 * src/state.c (state_comparator, stage_hasher): Likewise.
14486 * src/symtab.c (symbol_check_defined_processor,
14487 symbol_check_alias_consistency_processor, symbol_pack_processor,
14488 symbol_translation_processor, hash_symbol_comparator,
14489 hash_symbol_hasher): Likewise.
14490 * src/uniqstr.c (uniqstr_print_processor): Likewise.
14491 * src/muscle_tab.c (muscles_m4_output):
14492 Use new functions instead of casting old functions unportably.
14493 * src/state.c (state_hash_new): Likewise.
14494 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
14495 symbols_token_translations_init):
14496 Likewise.
14497 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
14498
14499 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
14500 var instead of casting to long, to avoid casts.
14501 (prepare_states): Use MALLOC rather than alloca, so that we don't
14502 have to worry about alloca.
14503 * src/state.c (state_hash_lookup): Likewise.
14504
14505 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
14506 local var instead of casting to unsigned char, to avoid casts.
14507
14508 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
14509 STATE_ALLOC): Remove.
14510 (transitions_new, errs_new, reductions_new, state_new): Use malloc
14511 rather than calloc, and use offsetof to avoid allocating slightly
14512 too much storage.
14513 (state_new): Initialize all members.
14514
14515 * src/state.c (state_hash): Use unsigned accumulator, not signed.
14516
14517 * src/symtab.c (symbol_free): Remove; unused.
14518 (symbol_get): Remove cast in lhs of assignment.
14519 (symbols_do): Now static. Accept generic arguments, not
14520 hashing-related ones.
14521
14522 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
14523 (symbol_processor): Remove.
14524 (symbols_do): Remove decl; now static.
14525
14526 * src/system.h (alloca): Remove; decl no longer needed.
14527 (<stddef.h>): Include, for offsetof.
14528 (<inttypes.>, <stdint.h>): Include if available.
14529 (uintptr_t): New type, if system lacks it.
14530 (CALLOC, MALLOC, REALLOC): New macros.
14531 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
14532 new macros.
14533
14534 * src/tables.c (table_size): Now int, to pacify GCC.
14535 (table_grow, table_ninf_remap): Use signed table size.
14536 (save_row): Don't bother initializing locals when not needed.
14537 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
14538 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
14539
14540 * src/vcg.h: Correct misspellings.
14541
14542 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
14543
14544
14545 * src/getargs.c (getargs): Don't assume EOF == -1.
14546
14547 2002-12-09 Paul Eggert <eggert@twinsun.com>
14548
14549 Change identifier spellings to avoid collisions with names
14550 that are reserved by POSIX.
14551
14552 Don't use names ending in _t, since POSIX reserves them.
14553 For consistency, remove _e and _s endings -- they're weren't
14554 needed to remove ambiguity. All uses changed.
14555 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
14556 turn was just renamed from struniq_t.
14557 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
14558 which in turn was just renamed from struniq_processor_t.
14559 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
14560 in turn was renamed from hash_compare_struniq_t.
14561 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
14562 (state_list): Renamed from state_list_t.
14563 * src/assoc.h (assoc): Renamed from assoc_t.
14564 * src/conflicts.c (enum conflict_resolution): Renamed from
14565 enum conflict_resolution_e.
14566 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
14567 (rule_list): Renamed from rule_list_t.
14568 * src/getargs.h (enum trace): Renamed from enum trace_e.
14569 (enum report): Renamed from enum report_e.
14570 * src/gram.h (item_number): Renamed from item_number_t.
14571 (rule_number): Renamed from rule_number_t.
14572 (struct rule_s): Remove the "rule_s" part; not used.
14573 (rule): Renamed from rule_t.
14574 (rule_filter): Renamed from rule_filter_t.
14575 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
14576 (goto_list): Renamed from goto_list_t.
14577 * src/lalr.h (goto_number): Renamed from goto_number_t.
14578 * src/location.h (location): Renamed from location_t.
14579 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
14580 and moved here from:
14581 * src/muscle_tab.h (muscle_entry_t): here.
14582 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
14583 (rule_list): Renamed from rule_list_t.
14584 * src/print_graph.c (static_graph): Renamed from graph.
14585 * src/reader.h (braced_code): Renamed from braced_code_t.
14586 Remove brace_code_e tag.
14587 * src/relation.h (relation_node): Renamed from relation_node_t.
14588 (relation_nodes): Renamed from relation_nodes_t.
14589 (relation): Renamed from relation_t.
14590 * src/state.h (state_number): Renamed from state_number_t.
14591 (struct state): Renamed from struct state_s.
14592 (state): Renamed from state_t.
14593 (transitions): Renamed from transitions_t. Unused (and
14594 misspelled) transtion_s tag removed.
14595 (errs): Renamed from errs_t. Unused errs_s tag removed.
14596 (reductions): Renamed from reductions_t. Unused tag
14597 reductions_s removed.
14598 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
14599 (struct symbol_list): Renamed from struct symbol_list_s.
14600 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
14601 (struct symbol): Renamed from struct symbol_s.
14602 (symbol): Renamed from symbol_t.
14603 * src/tables.c (vector_number): Renamed from vector_number_t.
14604 (action_number): Renamed from action_t.
14605 * src/tables.h (base_number): Renamed from base_t.
14606 * src/vcg.h (enum color): Renamed from enum color_e.
14607 (enum textmode): Renamed from enum textmode_e.
14608 (enum shape): Renamed from enum shape_e.
14609 (struct colorentry): Renamed from struct colorentry_s.
14610 (struct classname): Renamed from struct classname_s.
14611 (struct infoname): Renamed from struct infoname_s.
14612 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
14613 (enum decision): Renamed from enum decision_e.
14614 (enum orientation): Renamed from enum orientation_e.
14615 (enum alignment): Renamed from enum alignment_e.
14616 (enum arrow_mode): Renamed from enum arrow_mode_e.
14617 (enum crossing_type): Renamed from enum crossing_type_e.
14618 (enum view): Renamed from enum view_e.
14619 (struct node): Renamed from struct node_s.
14620 (node): Renamed from node_t.
14621 (enum linestyle): Renamed from enum linestyle_e.
14622 (enum arrowstyle): Renamed from enum arrowstyle_e.
14623 (struct edge): Renamed from struct edge.
14624 (edge): Renamed from edge_t.
14625 (struct graph): Renamed from struct graph_s.
14626 (graph): Renamed from graph_t.
14627 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
14628 Rename value_t -> value.
14629 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
14630 value_t_as_yystype -> value_as_yystype.
14631
14632 Don't include <errno.h> in the mainstream code, since it
14633 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
14634 * lib/get-errno.c, lib/get-errno.h: New files.
14635 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
14636 get-errno.c.
14637 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
14638 * src/output.c (output_skeleton): Likewise.
14639 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
14640 instead of errno.
14641 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
14642 Likewise.
14643 (handle_action_dollar, handle_action_at): Likewise.
14644 * src/system.h: Do not include <errno.h>.
14645 (TAB_EXT): Renamed from EXT_TAB.
14646 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
14647
14648 Avoid str[a-z]*, since <string.h> reserves that name space.
14649 Change all instances of "struniq" in names to "uniqstr", and
14650 likewise for "STRUNIQ" and "UNIQSTR".
14651 * src/uniqstr.c: Renamed from src/struniq.c.
14652 * src/uniqstr.h: Renamed from src/struniq.h.
14653 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
14654 * src/files.c (strsuffix): Remove; unused.
14655 (concat2): Renamed from stringappend. Now static.
14656 * src/files.h (strsuffix, stringappend): Remove; unused.
14657 * src/parse-gram.y (<chars>): Renamed from <string>.
14658 (<uniqstr>): Renamed from <struniq>.
14659 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
14660 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
14661 (struct graph_s.expand): Renamed from struct graph_s.stretch.
14662 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
14663 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
14664 (N_EXPAND): Renamed from N_STRETCH.
14665
14666 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
14667 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
14668 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
14669 Remove; unused.
14670 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
14671 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
14672 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
14673 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
14674 (BASE_MAXIMUM): Renamed from BASE_MAX.
14675 (BASE_MINIMUM): Renamed from BASE_MIN.
14676 (ACTION_MAX): Remove; unused.
14677 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
14678 Unnecessary casts removed from above defines.
14679
14680
14681 Fix misspelling in names.
14682 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
14683 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
14684 G_NODE_ALIGNEMENT.
14685
14686
14687 * lib/timevar.c (timevar_report): Renamed from time_report,
14688 for consistency with other names.
14689 * lib/timevar.h (timevar_report): New decl.
14690 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
14691
14692
14693 Sort include-file uses.
14694
14695 Reorder all include files under src to be in the order "system.h".
14696 then the ../lib include files in angle brackets (alphabetized),
14697 then the . include files in double-quotes (alphabetized). Fix
14698 dependency breakages encountered in this process, as follows:
14699 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
14700 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
14701 * src/state.h: Include "symtab.h".
14702
14703 2002-12-08 Paul Eggert <eggert@twinsun.com>
14704
14705 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
14706 since this causes problems when __file__ contains character
14707 sequences like "@" that are treated specially by src/scan-skel.l.
14708 Instead, just use the file's basename. This fixes the bug
14709 reported by Martin Mokrejs in
14710 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
14711
14712 2002-12-06 Paul Eggert <eggert@twinsun.com>
14713
14714 Add support for rules that do not have trailing semicolons, as
14715 POSIX requires. Improve the quality of locations in Bison
14716 diagnostics.
14717
14718 * src/location.c: Include <quotearg.h>.
14719 (empty_location): Now const.
14720 (location_print): New function. Follow the recommendation of the
14721 GNU Coding Standards for locations that span file boundaries.
14722 * src/location.h: Do not include <quotearg.h>; no longer needed.
14723 (boundary): New type.
14724 (location_t): Use it. This allows locations to span file boundaries.
14725 All member uses changed: file -> start.file or end.file (as needed),
14726 first_line -> start.line, first_column -> start.column,
14727 last_line -> end.line, last_column -> end.column.
14728 (equal_boundaries): New function.
14729 (LOCATION_RESET, LOCATION_STEP): Remove.
14730 (LOCATION_PRINT): Remove. All callers changed to use location_print.
14731 (empty_location): Now const.
14732 (location_print): New decl.
14733 * src/parse-gram.y (lloc_default): New function, which handles
14734 empty locations more accurately.
14735 (YYLLOC_DEFAULT): Use it.
14736 (%token COLON): Remove.
14737 (%token ID_COLON): New token.
14738 (rules): Use it.
14739 (declarations, rules): Remove trailing semicolon.
14740 (declaration, rules_or_grammar_declaration):
14741 Allow empty (";") declaration.
14742 (symbol_def): Remove empty actions; no longer needed.
14743 (rules_or_grammar_declaration): Remove trailing semicolon.
14744 (semi_colon.opt): Remove.
14745 * src/reader.h: Include location.h.
14746 (scanner_cursor): New decl.
14747 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
14748 rolling our own.
14749 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
14750 of *loc.
14751 (STEP): Remove. No longer needed, now that adjust_location does
14752 the work. All uses removed.
14753 (scanner_cursor): New var.
14754 (adjust_location): Renamed from extend_location. It now sets
14755 *loc and adjusts the scanner cursor. All uses changed.
14756 Don't bother testing for CR.
14757 (handle_syncline): Remove location arg; now updates scanner cursor.
14758 All callers changed.
14759 (unexpected_end_of_file): Now accepts start boundary of token or
14760 comment, not location. All callers changed. Update scanner cursor,
14761 not the location.
14762 (SC_AFTER_IDENTIFIER): New state.
14763 (context_state): Renamed from c_context. All uses changed.
14764 (id_loc, code_start, token_start): New local vars.
14765 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
14766 processing of Yacc white space and equivalents here.
14767 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
14768 instead of returning ID immediately, since we need to search for
14769 a subsequent colon.
14770 (<INITIAL>"'", "\""): Save token_start.
14771 (<INITIAL>"%{", "{", "%%"): Save code_start.
14772 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
14773 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
14774 BEGIN context_state at end, not INITIAL.
14775 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
14776 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
14777 Return correct token start.
14778 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
14779 the start of a character, string or multiline comment is found.
14780 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
14781 Reduction): Adjust reported locations to match the more-precise
14782 results now expected.
14783 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
14784 * tests/reduce.at (Useless Rules, Reduced Automaton,
14785 Underivable Rules): Likewise.
14786 * tests/regression.at (Invalid inputs): No longer `expecting ";"
14787 or "|"' now that so many other tokens are allowed by the new grammar.
14788
14789 * src/complain.h (current_file): Remove duplicate decl;
14790 current_file is now owned by files.h.
14791 * src/complain.c, src/scan-gram.l: Include files.h.
14792
14793 2002-12-06 Paul Eggert <eggert@twinsun.com>
14794
14795 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
14796 promotes to int; it might be unsigned int.
14797 * data/yacc.c (yy_reduce_print): Likewise.
14798
14799 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
14800 be #defined in the prologue, not in the Bison declarations.
14801 This fixes Debian Bug 102878, reported by Shaul Karl.
14802
14803 2002-12-02 Paul Eggert <eggert@twinsun.com>
14804
14805 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
14806 * lib/strtoul.c: New file, from gnulib.
14807 This fixes a porting bug reported by Peter Klein in
14808 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
14809
14810 2002-11-30 Paul Eggert <eggert@twinsun.com>
14811
14812 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
14813 and put only a forward declaration in the prologue. This is for
14814 consistency with the other scanner helper functions.
14815
14816 Type clashes now generate warnings, not errors, since it
14817 appears that POSIX may allow some grammars with type clashes.
14818 * src/reader.c (grammar_current_rule_check): Warn about
14819 type clashes instead of complaining.
14820 * tests/input.at (Type Clashes): Expect warnings, not complaints.
14821
14822 Add Yacc library, since POSIX requires it.
14823 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
14824 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
14825 * lib/main.c, lib/yyerror.c: New files.
14826
14827 gram_error can be static; it need not be extern.
14828 * src/reader.h (gram_error): Remove decl.
14829 * src/parse-gram.y (gram_error): Now static. Add static decl.
14830 (print_token_value): Omit parameter names from forward decl,
14831 for consistency.
14832
14833 2002-11-29 Paul Eggert <eggert@twinsun.com>
14834
14835 * doc/bison.texinfo: Emphasize that yylex and yyerror must
14836 be declared before being used. E.g., one should typically
14837 declare them in the prologue. Use GNU coding style in examples.
14838 Put "const" consistently after the type it modifies. Mention
14839 that C99 supports "inline". Mention that yyerror traditionally
14840 returns "int".
14841
14842 %parse-param and %lex-param now take just one argument, the
14843 declaration; the argument name is deduced from the declaration.
14844
14845 * doc/bison.texinfo (Parser Function, Pure Calling, Error
14846 Reporting, Table of Symbols): Document this.
14847 * src/parse-gram.y (add_param): New function.
14848 (COMMA): Remove.
14849 (declaration): Implement new rule for %parse-param and %lex-param.
14850 * src/scan-gram.l: "," now elicits a warning, rather than being
14851 a token; this is more compatible with byacc.
14852 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
14853
14854 2002-11-27 Paul Eggert <eggert@twinsun.com>
14855
14856 Rename identifiers to avoid real and potential collisions.
14857
14858 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
14859 to avoid collision with lex macro described by Bruce Lilly in
14860 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
14861 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
14862 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
14863 * src/parse-gram.y (print_token_value): Renamed from yyprint.
14864 All uses changed.
14865 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
14866 The name "yycontrol" violates the name space rules, and this stuff
14867 wasn't being used anyway.
14868 (input): Remove action; this stuff wasn't being used.
14869 (gram_error): Rename local variable yylloc -> loc.
14870 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
14871 (YY_DECL): Don't use "yy" at start of local variables.
14872 All uses changed, e.g., yylloc -> loc.
14873 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
14874 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
14875 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
14876 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
14877
14878 * src/parse-gram.y (gram_error): loc is now const *.
14879 * src/reader.h (gram_error): Likewise.
14880
14881 2002-11-24 Paul Eggert <eggert@twinsun.com>
14882
14883 Version 1.75c.
14884
14885 * tests/actions.at (Actions after errors): Use an output format
14886 more similar to that of the Printers and Destructors test.
14887 Test the position of the ';' token too.
14888 (Printers and Destructors): Likewise.
14889 (Printers and Destructors: %glr-parser): Remove for now, to avoid
14890 unnecessarily alarming people when the test fails.
14891
14892 * data/yacc.c (yyerrlab1): Move this label down, so that the
14893 parser does not discard the lookahead token if the user code
14894 invokes YYERROR. This change is required for POSIX conformance.
14895
14896 * lib/error.c: Sync with gnulib.
14897
14898 2002-11-22 Paul Eggert <eggert@twinsun.com>
14899
14900 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
14901 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
14902 * lib/xmalloc.c: Likewise.
14903
14904 2002-11-20 Paul Eggert <eggert@twinsun.com>
14905
14906 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
14907
14908 2002-11-20 Paul Eggert <eggert@twinsun.com>
14909
14910 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
14911 should use `if (! x) abort ();' rather than `assert (x);', and
14912 anyway it's one less thing to worry about configuring.
14913
14914 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
14915 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
14916 and replace all instances of assert with abort.
14917 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
14918 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
14919
14920 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
14921 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
14922 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
14923 hash_find_entry, hash_rehash, hash_insert): Likewise.
14924 * src/conflicts.c (resolve_sr_conflict): Likewise.
14925 * src/lalr.c (set_goto_map, map_goto): Likewise.
14926 * src/nullable.c (nullable_compute): Likewise.
14927 * src/output.c (prepare_rules, token_definitions_output): Likewise.
14928 * src/reader.c (packgram, reader): Likewise.
14929 * src/state.c (state_new, state_free, state_transitions_set,
14930 state_reduction_find): Likewise.
14931 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
14932 symbol_pack): Likewise.
14933 * src/tables.c (conflict_row, pack_vector): Likewise.
14934 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
14935 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
14936 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
14937 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
14938
14939 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
14940 (ARGMATCH_CONSTRAINT): New macro.
14941 (ARGMATCH_ASSERT): Use it.
14942
14943 * src/system.h (verify): New macro.
14944 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
14945 rather than assert.
14946 * src/tables.c (tables_generate): Likewise.
14947
14948 * src/struniq.c (struniq_assert): Now returns void, and aborts
14949 if the assertion is false.
14950 (struniq_assert_p): Remove.
14951 * src/struniq.h: Likewise.
14952
14953 2002-11-18 Paul Eggert <eggert@twinsun.com>
14954
14955 * data/glr.c (yygetLRActions): Replace `yyindex' with
14956 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
14957 This fixes the regression with Sun ONE Studio 7 cc that I reported in
14958 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
14959
14960 2002-11-18 Akim Demaille <akim@epita.fr>
14961
14962 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
14963 space.
14964 From Tim Van Holder.
14965
14966 2002-11-17 Paul Eggert <eggert@twinsun.com>
14967
14968 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
14969 to "SyntaxError" for consistency with my 2002-11-15 change.
14970
14971 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
14972 not define to {}, since this breaks the common use of `YYDPRINTF
14973 ((...));' if a single statement is desired (e.g. before `else').
14974 Work around GCC warnings by surrounding corresponding calls with
14975 {} if needed.
14976 (yyhasResolvedValue): Remove unused function.
14977 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
14978 loop body.
14979 (yyreportSyntaxError): Renamed from yyreportParseError.
14980 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
14981 All uses changed.
14982 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
14983 extern when possible. Remove unused initializations.
14984
14985 2002-11-16 Akim Demaille <akim@epita.fr>
14986
14987 Augment the similarity between GLR and LALR traces.
14988
14989 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
14990 (YY_REDUCE_PRINT): New.
14991 (yyparse): Use them.
14992 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
14993 YYDPRINT here.
14994 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
14995 state reached after the reduction/recovery, since...
14996 (yyparse, yyprocessOneStack): Report the state we are entering in.
14997
14998 2002-11-16 Akim Demaille <akim@epita.fr>
14999
15000 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
15001 Add support for --trace=skeleton.
15002 * src/scan-skel.l: %option debug.
15003 Scan strings of non-@ or \n instead of character by character.
15004 (scan_skel): Handle trace_skeleton.
15005 (QPUTS): New.
15006 (@output_parser_name@, @output_header_name@): ``Restore'' their
15007 support (used to be M4 macros).
15008 * data/yacc.c: Quote larger chunks, a la glr.c.
15009 * data/lalr1.cc: Likewise.
15010 The header guards are no longer available, so use some other
15011 string than `YYLSP_NEEDED'.
15012
15013 2002-11-16 Akim Demaille <akim@epita.fr>
15014
15015 Make the ``Printers and Destructors'' test more verbose, taking
15016 `yacc.c''s behavior as (possibly wrong) reference.
15017
15018 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
15019 instead of fprint on stdout.
15020 Set and report the last_line of the symbols.
15021 Consistently display values and locations.
15022
15023 2002-11-16 Paul Eggert <eggert@twinsun.com>
15024
15025 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
15026
15027 2002-11-15 Paul Eggert <eggert@twinsun.com>
15028
15029 * tests/actions.at (Actions after errors): New test case.
15030
15031 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
15032 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
15033 tests/action.at, tests/calc.at, tests/conflicts.at,
15034 tests/cxx-type.at, tests/regression.at:
15035 "parse error" -> "syntax error" for POSIX compatibility.
15036 "parsing stack overflow..." -> "parser stack overflow" so
15037 that code matches Bison documentation.
15038
15039 2002-11-15 Akim Demaille <akim@epita.fr>
15040
15041 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
15042 take two BRACED_CODE, not two string_content.
15043 Free the scanner's obstack when we are done.
15044 (code_content): New.
15045 * tests/calc.at: Adjust.
15046 * doc/bison.texinfo: Adjust.
15047 Also, make sure to include the `,' for these declarations.
15048
15049 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
15050
15051 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
15052 definition; avoids potential autoreconf problems.
15053
15054 2002-11-15 Akim Demaille <akim@epita.fr>
15055
15056 Always check the value returned by yyparse.
15057
15058 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
15059 returned by yyparse.
15060 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
15061 Adjust calls.
15062 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
15063 returned by yyparse.
15064
15065 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15066
15067 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
15068 on input.at test.
15069
15070 2002-11-14 Paul Eggert <eggert@twinsun.com>
15071
15072 * src/output.c (output_skeleton): Call xfopen instead of
15073 duplicating xfopen's body.
15074
15075 Fix bugs reported by Nelson H. F. Beebe in
15076 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
15077
15078 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
15079 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
15080 Group compiler. Instead, use "$CC -E bar.c". Include the .h
15081 file twice in the grammar, as an extra check.
15082
15083 * tests/input.at (Torturing the Scanner): Surround the
15084 backslash-newline tests with "#if 0", to make it less likely that
15085 we'll run into compiler bugs. Bring back solitary \ inside
15086 comment, but add a closing comment to work around HP C bug. Don't
15087 test backslash-newline in C character constant.
15088
15089 2002-11-14 Akim Demaille <akim@epita.fr>
15090
15091 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
15092 status of the compiler.
15093 Calling `exit 1' is no longer needed.
15094 Reported by Nelson H. F. Beebe.
15095
15096 2002-11-14 Akim Demaille <akim@epita.fr>
15097
15098 * tests/atlocal.in (CPPFLAGS): We have config.h.
15099 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
15100 New.
15101 * tests/actions.at, tests/calc.at, tests/conflicts.at,
15102 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
15103 * tests/regression.at, tests/torture.at: Use them for all the
15104 grammars that are to be compiled.
15105 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
15106 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
15107 * doc/bison.texinfo (GLR Parsers): Document `inline'.
15108
15109 2002-11-14 Akim Demaille <akim@epita.fr>
15110
15111 * doc/bison.texinfo: Various formatting changes (alignments in
15112 samples, additional @group/@end group, GCS in samples.
15113 Use @deffn instead of simple @table to define the directives,
15114 macros, variables etc.
15115
15116 2002-11-13 Paul Eggert <eggert@twinsun.com>
15117
15118 Fix some bugs reported by Albert Chin-A-Young in
15119 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
15120
15121 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
15122 -o c"; the HP C compiler chatters during compilation.
15123 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
15124 * tests/headers.at (export YYLTYPE): Likewise.
15125
15126 * tests/input.at (Torturing the Scanner): Remove lines containing
15127 solitary backslashes, as they tickle a bug in the HP C compiler.
15128
15129 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
15130 comments, since they're not portable. Use GNU coding style.
15131
15132 2002-11-13 Akim Demaille <akim@epita.fr>
15133
15134 * data/yacc.c: Leave bigger chunks of quoted text.
15135 (YYDSYMPRINTF): New.
15136 Use it to report symbol activities.
15137 * data/glr.c (YYDSYMPRINTF): New.
15138 Use it.
15139
15140 2002-11-12 Paul Eggert <eggert@twinsun.com>
15141
15142 Version 1.75b.
15143
15144 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
15145 (yyglrReduce): Return yyok, not 0.
15146 This should avoid the enumerated-type warnings reported
15147 by Nelson H. F. Beebe in
15148 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
15149
15150 * lib/bbitset.h (BITSET_INLINE): Remove.
15151 * lib/bitset.h [! BITSET_INLINE]: Remove.
15152 (bitset_set, bitset_reset, bitset_test): Rename local vars
15153 to avoid shadowing warnings by GCC.
15154
15155 * data/glr.c (inline): Remove #define. It's the user's
15156 responsibility to #define it away, just like 'const'.
15157 This fixes one of the bugs reported by Nelson H. F. Beebe in
15158 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
15159
15160 * Makefile.maint (po-check): Scan .l and .y files instead of the
15161 .c and the .h files that they generate. This fixes the bug
15162 reported by Tim Van Holder in:
15163 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
15164 Look for N_ as well as for _. Try to avoid matching #define for
15165 N_ and _.
15166 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
15167 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
15168 * src/scan-gram.l: Revamp regular expressions so that " and '
15169 do not confuse xgettext.
15170
15171 * src/struniq.h (struniq_new): Do not declare the return type
15172 to be 'const'; this violates the C standard.
15173 * src/struniq.c (struniq_new): Likewise.
15174
15175 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
15176
15177 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
15178 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
15179 linker.
15180
15181 2002-11-12 Akim Demaille <akim@epita.fr>
15182
15183 * Makefile.maint: Sync with Autoconf:
15184 (local_updates): New.
15185
15186 2002-11-12 Akim Demaille <akim@epita.fr>
15187
15188 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
15189
15190 2002-11-12 Akim Demaille <akim@epita.fr>
15191
15192 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
15193 locations.
15194
15195 2002-11-12 Akim Demaille <akim@epita.fr>
15196
15197 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
15198 not yyvalue.
15199
15200 2002-11-12 Akim Demaille <akim@epita.fr>
15201
15202 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
15203 Use it to test the GLR parser.
15204
15205 2002-11-12 Akim Demaille <akim@epita.fr>
15206
15207 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
15208 defines it.
15209 * data/glr.c (yystos): New.
15210 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
15211 (YYDSYMPRINT): New.
15212 (yyval): Don't define it, it is handled via M4.
15213 (yyrecoverParseError): Free verbosely the discarded symbols.
15214 * data/yacc.c (yysymprint): Remove, rather...
15215 (b4_yysymprint_generate): invoke.
15216 * data/c.m4 (b4_yysymprint_generate): New.
15217 Accept pointers as arguments, as opposed to the version from
15218 yacc.c.
15219 (b4_yydestruct_generate): Likewise.
15220 * tests/cations.at (Printers and Destructors): Use Bison directives
15221 instead of CPP macros.
15222 Don't rely on internal details.
15223
15224 2002-11-12 Akim Demaille <akim@epita.fr>
15225
15226 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
15227 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
15228 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
15229 it against YYEMPTY and so forth), work on yytoken (i.e., set
15230 it to YYEMPTY etc.).
15231 (yydestruct): Replace with a b4_yydestruct_generate invocation.
15232 (b4_symbol_actions): Remove.
15233 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
15234 for 0, end-of-input.
15235
15236 2002-11-12 Akim Demaille <akim@epita.fr>
15237
15238 * doc/bison.texinfo (Destructor Decl): New.
15239
15240 2002-11-12 Akim Demaille <akim@epita.fr>
15241
15242 * src/tables.c (tables_generate): Use free for pointers that
15243 cannot be NULL, not XFREE.
15244 (pack_vector): Use assert, not fatal, for bound violations.
15245 * src/state.c (state_new): Likewise.
15246 * src/reader.c (reader): Likewise.
15247 * src/lalr.c (set_goto_map): Likewise.
15248 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
15249 the file name.
15250
15251 2002-11-12 Akim Demaille <akim@epita.fr>
15252
15253 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
15254 Restore.
15255 * src/scan-gram.l (last_string): Is global to the file, not to
15256 yylex.
15257 * src/parse-gram.y (input): Don't append the epilogue here,
15258 (epilogue.opt): do it here, and free the scanner's obstack.
15259 * src/reader.c (epilogue_set): Rename as...
15260 (epilogue_augment): this.
15261 * data/c.m4 (b4_epilogue): Defaults to empty.
15262
15263 2002-11-12 Akim Demaille <akim@epita.fr>
15264
15265 * src/getargs.c (long_options): Remove duplicates.
15266 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
15267 Remove.
15268 * doc/bison.rnh: Remove.
15269 * doc/bison.texinfo (VMS Invocation): Remove.
15270
15271 2002-11-12 Akim Demaille <akim@epita.fr>
15272
15273 * src/struniq.h, src/struniq.c (struniq_t): Is const.
15274 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
15275
15276 Use struniq for symbols.
15277
15278 * src/symtab.h (symbol_t): The tag member is a struniq.
15279 (symbol_type_set): Adjust.
15280 * src/symtab.c (symbol_new): Takes a struniq.
15281 (symbol_free): Don't free the tag member.
15282 (hash_compare_symbol_t, hash_symbol_t): Rename as...
15283 (hash_compare_symbol, hash_symbol): these.
15284 Use the fact that tags as struniqs.
15285 (symbol_get): Use struniq_new.
15286 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
15287 Returns a strniq.
15288 * src/reader.h (merger_list, grammar_currentmerge_set): The name
15289 and type members are struniqs.
15290 * src/reader.c (get_merge_function)
15291 (grammar_current_rule_merge_set): Adjust.
15292 (TYPE, current_type): Are struniq.
15293
15294 Use struniq for file names.
15295
15296 * src/files.h, src/files.c (infile): Split into...
15297 (grammar_file, current_file): these.
15298 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
15299 * src/reduce.c (reduce_print): Likewise.
15300 * src/getargs.c (getargs): Likewise.
15301 * src/complain.h, src/complain.c: Likewise.
15302 * src/main.c (main): Call struniqs_new early enough to use it for
15303 file names.
15304 Don't free the input file name.
15305
15306 2002-11-12 Akim Demaille <akim@epita.fr>
15307
15308 * src/symtab.c (symbol_free): Remove dead deactivated code:
15309 type_name are properly removed.
15310 Don't use XFREE to free items that cannot be NULL.
15311 * src/struniq.h, src/struniq.c: New.
15312 * src/main.c (main): Initialize/free struniqs.
15313 * src/parse-gram.y (%union): Add astruniq member.
15314 (yyprint): Adjust.
15315 * src/scan-gram.l (<{tag}>): Return a struniq.
15316 Free the obstack bit that used to store it.
15317 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
15318
15319 2002-11-11 Paul Eggert <eggert@twinsun.com>
15320
15321 Revamp to fix many (but not all) of the C- and M4-related quoting
15322 problems. Among other things, this fixes the Bison bug reported
15323 by Jan Hubicka when processing the Bash grammar; see:
15324 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
15325
15326 Use new @ escapes consistently. Represent brackets with @{ and @}
15327 rather than @<:@ and @:>@, since this works a bit better with dumb
15328 editors like vi. Represent @ with @@, since @ is now consistently
15329 an escape. Use @oline@ and @ofile@ rather than __oline__ and
15330 __ofile__, to avoid unexpected expansions. Similarly, use @output
15331 rather than #output.
15332
15333 * data/c.m4 (b4_copyright): Omit file name from comment, since
15334 the file name could contain "*/".
15335 (b4_synclines_flag): Don't quote the 2nd argument; it should already
15336 be quoted. All uses changed.
15337
15338 * data/glr.c: Use new @ escapes consistently.
15339 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
15340 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
15341 Remove, since they couldn't handle arbitrary characters in file
15342 names.
15343 * data/lalr1.cc: Likewise.
15344 * data/yacc.c: Likewise.
15345
15346 * src/files.c (output_infix): Remove; all uses removed.
15347 * src/files.h: Likewise.
15348
15349 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
15350 mishandled funny characters in file names, and anyway it isn't
15351 needed any more.
15352 * data/yacc.c: Likewise.
15353 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
15354
15355 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
15356 * data/yacc.c: Likewise.
15357
15358 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
15359 strings now.
15360 (muscle_init): Quote filename as a C string.
15361 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
15362 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
15363 * src/output.c (escaped_file_name_output): New function.
15364 (prepare_symbols): Quote tokens for M4.
15365 (prepare): Don't insert output_infix, output_prefix,
15366 output_parser_name, output_header_name; this is now down by scan-skel.
15367 Insert skeleton as a C string.
15368
15369 * src/output.c (user_actions_output, symbol_destructors_output,
15370 symbol_printers_output): Quote filenames for C and M4.
15371 * src/reader.c (prologue_augment, epilogue_set): Likewise.
15372
15373 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
15374 escapes other than \\ and \'; this simplifies the code.
15375 (<SC_STRING>): Likewise, for \\ and \".
15376 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
15377 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
15378 Use new escapes @{ and @} for [ and ].
15379
15380 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
15381 them with auto vars.
15382 Switch to new escape scheme, where @ is the escape character uniformly.
15383 Abort if a stray escape character is found. Avoid unbounded input
15384 buffer when parsing non-escaped text.
15385
15386 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
15387 __oline__, #output, $@, and @{ do not have unintended meanings.
15388
15389 2002-11-09 Paul Eggert <eggert@twinsun.com>
15390
15391 Fix the test failure due to GCC warnings described in
15392 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
15393 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
15394 evaluate to 0 if it's impossible for NINF to be in the respective
15395 table.
15396 (yygetLRActions, yyrecoverParseError): Use them.
15397
15398 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
15399 counted in the token inserted at end of file. Now takes
15400 location_t *, not location_t, so that the location can be
15401 adjusted. All uses changed.
15402
15403 * tests/regression.at (Invalid inputs): Adjust wording in
15404 diagnostic to match the new behavior.
15405
15406 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
15407 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
15408 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
15409 abort ();'. This reduces the runtime of the "Many lookaheads"
15410 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
15411 GCC 3.2.
15412
15413 2002-11-07 Paul Eggert <eggert@twinsun.com>
15414
15415 * src/parse-gram.y (CHARACTER): Remove unused token.
15416 All uses removed.
15417
15418 * src/scan-gram.l: Remove stack option. We no longer use the
15419 stack, since the stack was never deeper than 1; instead, use the
15420 new auto var c_context to record the stacked value.
15421
15422 Remove nounput option. At an unexpected end of file, we now unput
15423 the minimal input necessary to end cleanly; this simplifies the
15424 code.
15425
15426 Avoid unbounded token sizes where this is easy.
15427
15428 (unexpected_end_of_file): New function.
15429 Use it to systematize the error message on unexpected EOF.
15430 (last-string): Now auto, not static.
15431 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
15432 (scanner_last_string_free): Remove; not used.
15433 (percent_percent_count): Move decl to just before use.
15434 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
15435 not the (never otherwised-used) CHARACTER.
15436
15437 2002-11-07 Akim Demaille <akim@epita.fr>
15438
15439 Let yyerror always receive the msg as last argument, so that
15440 yyerror can be variadic.
15441
15442 * data/yacc.c (b4_yyerror_args): New.
15443 Use it when calling yyerror.
15444 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
15445 Use it when calling yyerror.
15446 * doc/bison.texinfo (Error Reporting): Adjust.
15447 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
15448 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
15449
15450 2002-11-06 Akim Demaille <akim@epita.fr>
15451
15452 #line should have quoted strings.
15453 Ideally, this should be done by m4_quotearg.
15454
15455 * src/scan-skel.l: Include quotearg.h.
15456 Quote __ofile__.
15457 * src/output.c (symbol_printers_output)
15458 (symbol_destructors_output): Quote the file name.
15459
15460 2002-11-06 Akim Demaille <akim@epita.fr>
15461
15462 * tests/regression.at (Invalid inputs): Adjust to the recent
15463 messages.
15464
15465 2002-11-06 Akim Demaille <akim@epita.fr>
15466
15467 Restore --no-lines.
15468 Reported by Jim Kent.
15469
15470 * data/c.m4 (b4_syncline): New.
15471 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
15472 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
15473 * src/output.c (user_actions_output): Likewise.
15474 (prepare): Define 'b4_synclines_flag'.
15475 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
15476
15477 2002-11-06 Akim Demaille <akim@epita.fr>
15478
15479 * src/main.c (main): Free `infile'.
15480 * src/scan-gram.l (handle_syncline): New.
15481 Recognize `#line'.
15482 * src/output.c (user_actions_output, symbol_destructors_output)
15483 (symbol_printers_output): Use the location's file name, not
15484 infile.
15485 * src/reader.c (prologue_augment, epilogue_set): Likewise.
15486
15487 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15488
15489 * src/tables.c (matching_state): Don't allow states to match if
15490 either has GLR conflict entries.
15491
15492 2002-11-05 Paul Eggert <eggert@twinsun.com>
15493
15494 * src/scan-gram.l: Use more accurate diagnostics, e.g.
15495 "integer out of range" rather than "invalid value".
15496 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
15497 accordingly.
15498
15499 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
15500 Also, remove one static variable in the scanner.
15501
15502 * src/scan-gram.l (braces_level): Now auto, not static.
15503 Initialize to zero if the compiler is being picky.
15504 (INITIAL): Clear braces_level instead of incrementing it.
15505 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
15506 as POSIX 1003.1-2001 requires.
15507 * src/system.h (IF_LINT): New macro, taken from coreutils.
15508 * configure.ac: Define "lint" if --enable-gcc-warnings.
15509
15510 2002-11-05 Akim Demaille <akim@epita.fr>
15511
15512 * src/scan-gram.l: When it starts with `%', complain about the
15513 whole directive, not just that `invalid character: %'.
15514
15515 2002-11-04 Akim Demaille <akim@epita.fr>
15516
15517 * Makefile.maint: Update from Autoconf.
15518 (update, cvs-update, po-update, do-po-update): New.
15519
15520 2002-11-04 Akim Demaille <akim@epita.fr>
15521
15522 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
15523 and yyerror.
15524 Have yyerror `use' its arguments.
15525 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
15526 returns true when location & yacc & pure & parse-param.
15527 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
15528
15529 2002-11-04 Akim Demaille <akim@epita.fr>
15530
15531 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
15532 clashes.
15533 * src/scan-gram.l: Use [\'] instead of ['] to pacify
15534 font-lock-mode.
15535 Use complain_at.
15536 Use quote, not quote_n since LOCATION_PRINT no longer uses the
15537 slot 0.
15538
15539 2002-11-03 Paul Eggert <eggert@twinsun.com>
15540
15541 * src/reader.c (get_merge_function, grammar_current_rule_check):
15542 Use consistent diagnostics for reporting type name clashes.
15543 Quote the types with <>, for consistency with Yacc.
15544 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
15545
15546 2002-11-03 Akim Demaille <akim@epita.fr>
15547
15548 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
15549 New.
15550 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
15551 (b4_parse_param): Remove.
15552 Use b4_identification.
15553 Propagate b4_pure_args where needed to pass them to yyerror.
15554 * data/glr.m4 (b4_parse_param): Remove.
15555 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
15556 (b4_lpure_formals): New.
15557 Use b4_identification.
15558 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
15559 b4_user_formals and b4_user_args.
15560 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
15561 (yyreportAmbiguity): When using a pure parser, also need
15562 the location, and the parse-params.
15563 Adjust callers.
15564 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
15565 When using a pure parser, also need the parse-params.
15566 Adjust callers.
15567 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
15568 (%pure-parser + %parse-param) LALR and GLR parsers.
15569 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
15570 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
15571 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
15572 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
15573 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
15574 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
15575 * doc/bison.texinfo: Untabify the whole file.
15576 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
15577 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
15578 (Error Reporting): Adjust to these new directives.
15579 Document %error-verbose, deprecate YYERROR_VERBOSE.
15580
15581 2002-11-03 Akim Demaille <akim@epita.fr>
15582
15583 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
15584 AT_CHECK_CALC_GLR invocations to use % directives, instead of
15585 command line options.
15586 * tests/cxx-type.at: Formatting changes.
15587
15588 2002-11-03 Paul Eggert <eggert@twinsun.com>
15589
15590 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
15591 to count columns correctly, and to check for invalid inputs.
15592
15593 Use mbsnwidth to count columns correctly. Account for tabs, too.
15594 Include mbswidth.h.
15595 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
15596 (extend_location): New function.
15597 (YY_LINES): Remove.
15598
15599 Handle CRLF in C code rather than in Lex code.
15600 (YY_INPUT): New macro.
15601 (no_cr_read): New function.
15602
15603 Scan UCNs, even though we don't fully handle them yet.
15604 (convert_ucn_to_byte): New function.
15605
15606 Handle backslash-newline correctly in C code.
15607 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
15608 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
15609 all uses changed.
15610 (tag, splice): New EREs. Do not allow NUL or newline in tags.
15611 Use {splice} wherever C allows backslash-newline.
15612 YY_STEP after space, newline, vertical-tab.
15613 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
15614
15615 (letter, id): Don't assume ASCII; e.g., spell out a-z.
15616
15617 ({int}, handle_action_dollar, handle_action_at): Check for integer
15618 overflow.
15619
15620 (YY_STEP): Omit trailing semicolon, so that it's more like C.
15621
15622 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
15623 as well as \000. Check for UCHAR_MAX, not 255.
15624 Allow \x with an arbitrary positive number of digits, as in C.
15625 Check for overflow here.
15626 Allow \? and UCNs, for compatibility with C.
15627
15628 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
15629 with quote slot used by complain_at.
15630
15631 * tests/input.at: Add tests for backslash-newline, m4 quotes
15632 in symbols, long literals, and funny escapes in strings.
15633
15634 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
15635 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
15636 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
15637 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
15638 * m4/mbswidth.m4: New file, from GNU coreutils.
15639
15640 * doc/bison.texinfo (Grammar Outline): Document // comments.
15641 (Symbols): Document that trigraphs have no special meaning in Bison,
15642 nor is backslash-newline allowed.
15643 (Actions): Document that trigraphs have no special meaning.
15644
15645 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
15646 no longer used.
15647
15648 2002-11-02 Paul Eggert <eggert@twinsun.com>
15649
15650 * src/reader.c: Don't include quote.h; not needed.
15651 (get_merge_function): Reword warning to be consistent with
15652 type clash diagnostic in grammar_current_rule_check.
15653
15654 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
15655 bug in trigraph handling.
15656
15657 * src/output.c (prepare_symbols): When printing token names,
15658 escape "[" as "@<:@" and likewise for "]".
15659
15660 * src/system.h (errno): Remove declaration, as we are now
15661 assuming C89 or better, and C89 guarantees errno.
15662
15663 2002-10-30 Paul Eggert <eggert@twinsun.com>
15664
15665 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
15666 Check for close failures.
15667 * src/files.h (xfclose): Return void, not int, since it always
15668 returned zero.
15669 * src/files.c (xfclose): Likewise. Report I/O error if ferror
15670 indicates one.
15671 * src/output.c (output_skeleton): Use xfclose rather than fclose
15672 and ferror. xfclose now checks ferror.
15673
15674 * data/glr.c (YYLEFTMOST_STATE): Remove.
15675 (yyreportTree): Use a stack-based leftmost state. This avoids
15676 our continuing battles with bogus warnings about initializers.
15677
15678 2002-10-30 Akim Demaille <akim@epita.fr>
15679
15680 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
15681 #if.
15682
15683 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15684
15685 * tests/glr-regr1.at: New test for reported regressions.
15686 * tests/testsuite.at: Add glr-regr1.at test.
15687 * tests/Makefile.am: Add glr-regr1.at test.
15688
15689 2002-10-24 Paul Eggert <eggert@twinsun.com>
15690
15691 Version 1.75a.
15692
15693 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
15694 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
15695 we use malloc. Don't assume 'A' through 'Z' are contiguous.
15696 Don't assume strdup exists; POSIX says its an XSI extension.
15697 Check for buffer overflow on input.
15698
15699 2002-10-24 Akim Demaille <akim@epita.fr>
15700
15701 * src/output.c (output_skeleton): Don't disable M4sugar comments
15702 too soon: it results in comments being expanded.
15703 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
15704 first output.
15705
15706 2002-10-24 Akim Demaille <akim@epita.fr>
15707
15708 * data/yacc.c (m4_int_type): New.
15709 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
15710 char' as only yacc.c wants K&R portability.
15711 * data/glr.c (yysigned_char): Remove.
15712 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
15713 Reported by Quoc Peyrot.
15714
15715 2002-10-23 Paul Eggert <eggert@twinsun.com>
15716
15717 * src/main.c (main): With --trace=time, report times even if a
15718 non-fatal error occurs. Formerly, the times were reported in some
15719 such cases but not in others.
15720 * src/reader.c (reader): Just return if a complaint has been issued,
15721 instead of exiting, so that 'main' can report times.
15722
15723 2002-10-22 Akim Demaille <akim@epita.fr>
15724
15725 * src/system.h: Include sys/types.
15726 Reported by Bert Deknuydt.
15727
15728 2002-10-23 Paul Eggert <eggert@twinsun.com>
15729
15730 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
15731 Suggested by Art Haas.
15732
15733 2002-10-22 Paul Eggert <eggert@twinsun.com>
15734
15735 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
15736 decl; not needed any more.
15737 * src/main.c (main): Use return to exit, undoing yesterday's change.
15738 The last OS that we could find where this wouldn't work is
15739 SunOS 3.5, and that's too old to worry about now.
15740
15741 * data/glr.c (struct yyltype): Define members even when not
15742 doing locations. This is more consistent with yacc.c, and it
15743 works around the following bug reports:
15744 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
15745 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
15746
15747 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
15748 @acronym consistently. Standardize on "Yacc" instead of "YACC",
15749 "Algol" instead of "ALGOL". Give a bit more history about BNF.
15750
15751 2002-10-22 Akim Demaille <akim@epita.fr>
15752
15753 * data/README: New.
15754
15755 2002-10-21 Paul Eggert <eggert@twinsun.com>
15756
15757 Be consistent about 'bool'; the old code used an enum in one
15758 module and an int in another, and this violates the C standard.
15759 * m4/stdbool.m4: New file, from coreutils 4.5.3.
15760 * configure.ac (AC_HEADER_STDBOOL): Add.
15761 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
15762 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
15763 * src/symtab.c (hash_compare_symbol_t): Likewise.
15764 * src/system.h (bool, false, true): Use a definition consistent
15765 with ../lib/hash.c. All uses changed.
15766
15767 * src/complain.c (warning_issued): Renamed from warn_message_count,
15768 so that we needn't worry about integer overflow (!).
15769 Now of type bool. All uses changed.
15770 (complaint_issued): Renamed from complain_message_count; likewise.
15771
15772 * src/main.c (main): Use exit to exit with failure.
15773
15774 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
15775 rather than 1 and 0.
15776 * src/main.c (main): Likewise.
15777 * src/getargs.c (getargs): Likewise.
15778 * src/reader.c (reader): Likewise.
15779
15780 * src/getarg.c (getargs): Remove duplicate code for
15781 "Try `bison --help'".
15782
15783 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
15784 What was that "2" for?
15785
15786 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
15787 * src/getargs.c (usage): Likewise.
15788
15789 * src/getargs.c (getargs): When there are too few operands, report
15790 the last one. When there are too many, report the first extra
15791 one. This is how diffutils does it.
15792
15793 2002-10-20 Paul Eggert <eggert@twinsun.com>
15794
15795 Remove K&R vestiges.
15796 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
15797 * src/complain.c (VA_START): Remove. Assume prototypes.
15798 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
15799 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
15800 fatal): Assume prototypes.
15801 * src/complain.h: Assume prototypes.
15802 * src/system.h (PARAMS): Remove.
15803 Include <limits.h> unconditionally, since it's guaranteeed even
15804 for a freestanding C89 compiler.
15805 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
15806 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
15807
15808 2002-10-20 Akim Demaille <akim@epita.fr>
15809
15810 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
15811 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
15812 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
15813 (yyresolveStates, yyresolveAction, yyresolveStack)
15814 (yyprocessOneStack): Use them.
15815 (yy_reduce_print): New.
15816 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
15817
15818 2002-10-20 Akim Demaille <akim@epita.fr>
15819
15820 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
15821 arguments and output `void'.
15822 (b4_c_function): Rename as...
15823 (b4_c_function_def): this.
15824 (b4_c_function_decl, b4_c_ansi_function_def)
15825 (b4_c_ansi_function_decl): New.
15826 Change the interpretation of the arguments: before `int, foo', now
15827 `int foo, foo'.
15828 * data/yacc.c (yyparse): Prototype and define thanks to these.
15829 Adjust b4_c_function_def uses.
15830 * data/glr.c (yyparse): Likewise, but ANSI only.
15831
15832 2002-10-20 Akim Demaille <akim@epita.fr>
15833
15834 * src/output.c (prepare): Move the definition of `tokens_number',
15835 `nterms_number', `undef_token_number', `user_token_number_max'
15836 to...
15837 (prepare_tokens): Here.
15838 (prepare_tokens): Rename as...
15839 (prepare_symbols): this.
15840 (prepare): Move the definition of `rules_number' to...
15841 (prepare_rules): here.
15842 (prepare): Move the definition of `last', `final_state_number',
15843 `states_number' to...
15844 (prepare_states): here.
15845 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
15846
15847 2002-10-20 Akim Demaille <akim@epita.fr>
15848
15849 * src/tables.h, src/tables.c, src/output.c: Comment changes.
15850
15851 2002-10-20 Akim Demaille <akim@epita.fr>
15852
15853 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
15854 * data/c.m4: here.
15855
15856 2002-10-20 Akim Demaille <akim@epita.fr>
15857
15858 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
15859 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
15860 `pair'.
15861 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
15862 `name' to...
15863 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
15864 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
15865 These.
15866
15867 2002-10-19 Paul Eggert <eggert@twinsun.com>
15868
15869 Do not create a temporary file, as that involves security and
15870 cleanup headaches. Instead, use a pair of pipes.
15871 Derived from a suggestion by Florian Krohm.
15872 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
15873 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
15874 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
15875 (BISON_PREREQ_SUBPIPE): Add.
15876 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
15877 Add subpipe.h, subpipe.c.
15878 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
15879 * po/POTFILES.in: Add lib/subpipe.c.
15880 * src/output.c: Include "subpipe.h".
15881 (m4_invoke): Remove decl.
15882 (scan_skel): New decl.
15883 (output_skeleton): Use pipe rather than temporary file for m4 input.
15884 Check that m4sugar.m4 is readable, to avoid deadlock.
15885 Check for pipe I/O error.
15886 * src/scan-skel.l (readpipe): Remove decl.
15887 (scan_skel): New function, to be used in place of m4_invoke.
15888 Read from stream rather than file.
15889
15890 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
15891 float, as this generates a warning on Solaris 8 + GCC 3.2 with
15892 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
15893 this generates a more-accurate value anyway.
15894
15895 * lib/timevar.c (timervar_accumulate): Rename locals to
15896 avoid confusion with similarly-named more-global.
15897 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
15898
15899 * src/output.c (prepare): Use xstrdup to convert char const *
15900 to char *, to avoid GCC warning.
15901
15902 2002-10-19 Akim Demaille <akim@epita.fr>
15903
15904 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
15905 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
15906 Use them to have `calc.y' ready for %pure-parser.
15907 * data/yacc.c (YYLEX): Pass a yylex return type to
15908 b4_c_function_call.
15909
15910 2002-10-19 Akim Demaille <akim@epita.fr>
15911
15912 Prototype support of %lex-param and %parse-param.
15913
15914 * src/parse-gram.y: Add the definition of the %lex-param and
15915 %parse-param tokens, plus their rules.
15916 Drop the `_' version of %glr-parser.
15917 Add the "," token.
15918 * src/scan-gram.l (INITIAL): Scan them.
15919 * src/muscle_tab.c: Comment changes.
15920 (muscle_insert, muscle_find): Rename `pair' as `probe'.
15921 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
15922 (muscle_entry_s): The `value' member is no longer const.
15923 Adjust all dependencies.
15924 * src/muscle_tab.c (muscle_init): Adjust: use
15925 MUSCLE_INSERT_STRING.
15926 Initialize the obstack earlier.
15927 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
15928 (muscle_pair_list_grow): New.
15929 * data/c.m4 (b4_c_function_call, b4_c_args): New.
15930 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
15931 * tests/calc.at: Use %locations, not --locations.
15932 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
15933
15934 2002-10-19 Akim Demaille <akim@epita.fr>
15935
15936 * src/getargs.c (usage): Take status as argument and exit
15937 accordingly.
15938 Report the traditional `Try ... --help' message when status != 0.
15939 (usage, version): Don't take a FILE * as arg, it is pointless.
15940 (getargs): When there is an incorrect number of arguments, make it
15941 an error, and report it GNUlically thanks to `usage ()'.
15942
15943 2002-10-18 Paul Eggert <eggert@twinsun.com>
15944
15945 * data/glr.c (yyreportParseError): Don't assume that sprintf
15946 yields the length of the printed string, as this is not true
15947 on SunOS 4.1.4. Reported by Peter Klein.
15948
15949 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
15950 * tests/conflicts.at (%nonassoc and eof): Likewise.
15951 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
15952
15953 2002-10-17 Akim Demaille <akim@epita.fr>
15954
15955 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
15956 * src/getargs.c (trace_types, trace_args): Adjust.
15957 * src/reader.c (grammar_current_rule_prec_set)
15958 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
15959 Standardize error messages.
15960 And s/@prec/%prec/!
15961 (reader): Use trace_flag to enable scanner/parser debugging,
15962 instead of an adhoc scheme.
15963 * src/scan-gram.l: Remove trailing debugging code.
15964
15965 2002-10-16 Paul Eggert <eggert@twinsun.com>
15966
15967 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
15968 MUSCLE_TAB_H.
15969
15970 * NEWS: Officially drop support for building Bison with K&R C,
15971 since it didn't work anyway and it's not worth worrying about.
15972 * Makefile.maint (wget_files): Remove ansi2knr.c.
15973 (ansi2knr.c-url_prefix): Remove.
15974 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
15975 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15976 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15977
15978 2002-10-15 Paul Eggert <eggert@twinsun.com>
15979
15980 Stop using the "enum_" trick for K&R-style function definitions;
15981 it confused me, and I was the author! Instead, assume that people
15982 who want to use K&R C compilers (when using these modules in GCC,
15983 perhaps?) will run ansi2knr.
15984
15985 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
15986 All uses of "enum_" changed to "enum ".
15987 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
15988 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
15989
15990 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
15991 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
15992 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
15993 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
15994 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
15995 abitset_not, abitset_ones, abitset_or, abitset_or_and,
15996 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
15997 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
15998 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
15999 Use function prototypes; this removes the need for declaring
16000 static functions simply to provide their prototypes.
16001 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
16002 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
16003 bitset_count_, bitset_create, bitset_dump, bitset_first,
16004 bitset_free, bitset_init, bitset_last, bitset_next,
16005 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
16006 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
16007 bitset_print, bitset_release_memory, bitset_toggle_,
16008 bitset_type_choose, bitset_type_get, bitset_type_name_get,
16009 debug_bitset): Likewise.
16010 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
16011 * lib/bitset_stats.c (bitset_log_histogram_print,
16012 bitset_percent_histogram_print, bitset_stats_and,
16013 bitset_stats_and_cmp, bitset_stats_and_or,
16014 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
16015 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
16016 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
16017 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
16018 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
16019 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
16020 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
16021 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
16022 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
16023 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
16024 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
16025 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
16026 bitset_stats_zero): Likewise.
16027 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
16028 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
16029 bitsetv_dump, debug_bitsetv): Likewise.
16030 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
16031 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
16032 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
16033 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
16034 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
16035 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
16036 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
16037 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
16038 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
16039 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
16040 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
16041 Likewise.
16042 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
16043 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
16044 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
16045 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
16046 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
16047 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
16048 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
16049 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
16050 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
16051 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
16052 lbitset_xor_cmp, lbitset_zero): Likewise.
16053
16054 2002-10-14 Akim Demaille <akim@epita.fr>
16055
16056 Version 1.75.
16057
16058 2002-10-14 Akim Demaille <akim@epita.fr>
16059
16060 * tests/Makefile.am (maintainer-check-posix): New.
16061
16062 2002-10-14 Akim Demaille <akim@epita.fr>
16063
16064 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
16065 member.
16066
16067 2002-10-14 Akim Demaille <akim@epita.fr>
16068
16069 * src/tables.c (table_ninf_remap): base -> tab.
16070 Reported by Matt Rosing.
16071
16072 2002-10-14 Paul Eggert <eggert@twinsun.com>
16073
16074 * tests/action.at, tests/calc.at, tests/conflicts.at,
16075 tests/cxx-type.at, tests/headers.at, tests/input.at,
16076 tests/regression.at, tests/synclines.at, tests/torture.at:
16077 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
16078 so that the tests still work even if POSIXLY_CORRECT is set.
16079 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
16080
16081 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
16082 for portability to K&R hosts. Fix typo: signed char is guaranteed
16083 only to 127, not to 128.
16084 * data/glr.c (yysigned_char): New type.
16085 * data/yacc.c (yysigned_char): Likewise.
16086 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
16087
16088 2002-10-13 Paul Eggert <eggert@twinsun.com>
16089
16090 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
16091 true due to limited range of data type" warning from GCC.
16092
16093 * data/c.m4 (b4_token_defines): Protect against double-inclusion
16094 by wrapping enum yytokentype's definition inside #ifndef
16095 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
16096
16097 2002-10-13 Akim Demaille <akim@epita.fr>
16098
16099 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
16100 Un yy- yyrhs to avoid the name clash with the global YYRHS.
16101
16102 2002-10-13 Akim Demaille <akim@epita.fr>
16103
16104 * Makefile.maint: Update from Autoconf 2.54.
16105 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
16106
16107 2002-10-13 Akim Demaille <akim@epita.fr>
16108
16109 * src/print.c (print_state): Separate the list of solved conflicts
16110 from the other items.
16111 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
16112
16113 2002-10-13 Akim Demaille <akim@epita.fr>
16114
16115 Let nondeterministic skeletons be usable with deterministic
16116 tables.
16117
16118 With the patch, GAWK compiled by GCC without -O2 passes its test
16119 suite using a GLR parser driven by LALR tables. It fails with -O2
16120 because `struct stat' gives two different answers on my machine:
16121 88 (definition of an auto var) and later 96 (memset on this var).
16122 Hence the stack is badly corrumpted. The headers inclusion is to
16123 blame: if I move the awk.h inclusion before GLR's system header
16124 inclusion, the two struct stat have the same size.
16125
16126 * src/tables.c (pack_table): Always create conflict_table.
16127 (token_actions): Always create conflict_list.
16128 * data/glr.c (YYFLAG): Remove, unused.
16129
16130 2002-10-13 Akim Demaille <akim@epita.fr>
16131
16132 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
16133 (O0FLAGS): New.
16134 (VALGRIND, GXX): New.
16135 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
16136 * tests/bison.in: Run $PREBISON a pre-command.
16137 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
16138 (maintainer-check-g++): New.
16139 * Makefile.am (maintainer-check): New.
16140
16141 2002-10-13 Akim Demaille <akim@epita.fr>
16142
16143 * data/glr.c: Formatting changes.
16144 Tweak some trace messages to match yacc.c's.
16145
16146 2002-10-13 Akim Demaille <akim@epita.fr>
16147
16148 GLR parsers sometimes raise parse errors instead of performing the
16149 default reduction.
16150 Reported by Charles-Henry de Boysson.
16151
16152 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
16153 check the length of the traces when %glr.
16154 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
16155 GLR's traces.
16156 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
16157 Test GLR parsers.
16158 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
16159 (yyltype): Remove the yy prefix from the member names.
16160 (yytable): Complete its comment.
16161 (yygetLRActions): Map error action number from YYTABLE from
16162 YYTABLE_NINF to 0.
16163 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
16164 (which was a bug: it should have been YYTABEL_NINF, and yet it was
16165 not satisfying as we could compare an YYACTION computed from
16166 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
16167 only value for error actions.
16168 (yyreportParseError): In verbose parse error messages, don't issue
16169 `error' in the list of expected tokens.
16170 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
16171 next action to perform to match glr.c's decoding.
16172 (yytable): Complete its comment.
16173
16174 2002-10-13 Paul Eggert <eggert@twinsun.com>
16175
16176 Fix problem reported by Henrik Grubbstroem in
16177 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
16178 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
16179 because the Bison parser reads the second action before reducing
16180 the first one.
16181 * src/scan-gram.l (rule_length): New static var.
16182 Use it to keep track of the rule length in the scanner, since
16183 we can't expect the parser to be in lock-step sync with the scanner.
16184 (handle_action_dollar, handle_action_at): Use this var.
16185 * tests/actions.at (Exotic Dollars): Test for the problem.
16186
16187 2002-10-12 Paul Eggert <eggert@twinsun.com>
16188
16189 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
16190 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
16191 Include <sys/time.h> when checking for clock_t and struct tms.
16192 Use same include order as source.
16193 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
16194 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
16195
16196 * lib/timevar.c: Update copyright date and clarify comments.
16197 (get_time) [IN_GCC]: Keep the GCC version for reference.
16198
16199 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
16200 GCC version as of today, then merge Bison's changes.
16201 Change "GCC" to "Bison" in copyright notice. timevar.def's
16202 author is Akim, so change that too.
16203
16204 * src/reader.c (grammar_current_rule_check):
16205 Don't worry about the default action if $$ is untyped.
16206 Prevents bogus warnings reported by Jim Gifford in
16207 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
16208
16209 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
16210 * data/glr.c, data/lalr1.cc, data/yacc.c:
16211 Output token definitions before the first part of user declarations.
16212 Fixes compatibility problem reported by Jim Gifford for kbd in
16213 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
16214
16215 2002-10-11 Paul Eggert <eggert@twinsun.com>
16216
16217 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
16218 (yyparse): here. This undoes some of the 2002-07-25 change.
16219 Compatibility problem reported by Ralf S. Engelschall with
16220 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
16221
16222 2002-10-11 Akim Demaille <akim@epita.fr>
16223
16224 * tests/regression.at Characters Escapes): New.
16225 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
16226 characters.
16227 Reported by Jan Nieuwenhuizen.
16228
16229 2002-10-11 Akim Demaille <akim@epita.fr>
16230
16231 * po/id.po: New.
16232
16233 2002-10-10 Paul Eggert <eggert@twinsun.com>
16234
16235 Portability fixes for bitsets; this also avoids several GCC
16236 warnings.
16237
16238 * lib/abitset.c: Include <stddef.h>, for offsetof.
16239 * lib/lbitset.c: Likewise.
16240
16241 * lib/abitset.c (abitset_bytes): Return a size that is aligned
16242 properly for vectors of objects. Do not assume that adding a
16243 header size to a multiple of a word size yields a value that is
16244 properly aligned for the whole union.
16245 * lib/bitsetv.c (bitsetv_alloc): Likewise.
16246
16247 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
16248 unique names for structures.
16249 * lib/ebitset.c (ebitset_bytes): Likewise.
16250 * lib/lbitset.c (lbitset_bytes): Likewise.
16251
16252 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
16253 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
16254 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
16255 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
16256 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
16257 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
16258 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
16259 to improve the type-checking that GCC can do.
16260 * lib/bitset.c (bitset_op4_cmp): Likewise.
16261 * lib/bitset_stats.c (bitset_stats_count,
16262 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
16263 bitset_stats_copy, bitset_stats_disjoint_p,
16264 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
16265 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
16266 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
16267 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
16268 bitset_stats_and_or_cmp, bitset_stats_andn_or,
16269 bitset_stats_andn_or_cmp, bitset_stats_or_and,
16270 bitset_stats_or_and_cmp): Likewise.
16271 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
16272 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
16273 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
16274 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
16275
16276 * lib/abitset.h: Include bitset.h, not bbitset.h.
16277 * lib/ebitset.h: Likewise.
16278 * lib/lbitset.h: Likewise.
16279
16280 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
16281 All instances of parameters of type enum bitset_opts are now of
16282 type enum_bitset_opts, to conform to the C Standard, and similarly
16283 for enum_bitset_type.
16284 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
16285 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
16286
16287 Do not use "struct bitset_struct" to mean different things in
16288 different modules. Not only is this confusing, it violates
16289 the C Standard, which requires that structure types in different
16290 modules must be compatible if one is to be passed to the other.
16291 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
16292 All instances of "struct bitset_struct *" replaced with "bitset".
16293 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
16294 (union bitset_union, struct abitset_struct, struct ebitset_struct,
16295 struct lbitset_struct, struct bitset_stats_struct): New types.
16296 All uses of struct bitset_struct changed to union bitset_union,
16297 etc.
16298 * lib/abitset.c (struct abitset_struct, abitset,
16299 struct bitset_struct): Remove.
16300 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
16301 struct bitset_struct): Remove.
16302 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
16303 bitset_struct): Remove.
16304 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
16305 Likewise.
16306
16307 Do not call a function of type T using a call that assumes the
16308 function is of a different type U. Standard C requires that a
16309 function must be called with a type that is compatible with its
16310 definition.
16311 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
16312 New decls.
16313 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
16314 New functions.
16315 * lib/ebitset.c (PFV): Remove.
16316 * lib/lbitset.c (PFV): Likewise.
16317 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
16318 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
16319 decls.
16320 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
16321 (ebitset_vtable): Use them.
16322 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
16323 lbitset_xor): New functions.
16324 (lbitset_vtable): Use them.
16325
16326 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
16327 Declare.
16328
16329 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
16330 GCC warning.
16331 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
16332 Use offsetof, for simplicity.
16333
16334 2002-10-06 Paul Eggert <eggert@twinsun.com>
16335
16336 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
16337 the same width as int. This reapplies a hunk of the 2002-08-12 patch
16338 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
16339 which was inadvertently undone by the 2002-09-30 patch.
16340 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
16341 the same width as int.
16342
16343 2002-10-04 Paul Eggert <eggert@twinsun.com>
16344
16345 Version 1.50.
16346
16347 * configure.ac (AC_INIT), NEWS: Increment version number.
16348
16349 * doc/bison.texinfo: Minor spelling, grammar, and white space
16350 fixes.
16351 (Symbols): Mention that any negative value returned from yylex
16352 signifies end-of-input. Warn about negative chars. Mention
16353 the portable Standard C character set.
16354
16355 The GNU coding standard says CFLAGS and YFLAGS are reserved
16356 for the installer to set.
16357 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
16358 * src/Makefile.am (AM_CFLAGS): Likewise.
16359 (AM_YFLAGS): Renamed from YFLAGS.
16360
16361 Fix some MAX and MIN problems.
16362 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
16363 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
16364 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
16365 * src/reader.c (reader): Use it.
16366
16367 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
16368 POSIX 1003.1-2001 has removed fgrep.
16369
16370 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
16371
16372 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
16373 interpreted as signed.
16374 * lib/ebitset.c (ebitset_list): Fix bug.
16375
16376 2002-10-01 Paul Eggert <eggert@twinsun.com>
16377
16378 More fixes for 64-bit hosts and large bitsets.
16379
16380 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
16381 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
16382 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
16383 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
16384 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
16385 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
16386 bitset_count_): Likewise.
16387 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
16388 bitset_first, bitset_last): Likewise.
16389 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
16390 bitset_stats_list_reverse, bitset_stats_size,
16391 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
16392 Likewise.
16393 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
16394 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
16395 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
16396 bitsetv_reflexive_transitive_closure): Likewise.
16397 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
16398 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
16399 Likewise.
16400 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
16401 Likewise.
16402
16403 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
16404 Use size_t, not unsigned int, to count bytes.
16405 * lib/abitset.h (abitset_bytes): Likewise.
16406 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
16407 Likewise.
16408 * lib/bitset.h (bitset_bytes): Likewise.
16409 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
16410 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
16411 * lib/bitsetv.c (bitsetv_alloc): Likewise.
16412 * lib/ebitset.c (ebitset_bytes): Likewise.
16413 * lib/ebitset.h (ebitset_bytes): Likewise.
16414 * lib/lbitset.c (lbitset_bytes): Likewise.
16415 * lib/lbitset.h (lbitset_bytes): Likewise.
16416
16417 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
16418 abitset_subset_p, abitset_disjoint_p, abitset_and,
16419 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
16420 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
16421 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
16422 abitset_or_and, abitset_or_and_cmp):
16423 Use bitset_windex instead of unsigned int.
16424 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
16425 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
16426 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
16427 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
16428 Likewise.
16429 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
16430
16431 * lib/bitset.c (bitset_print):
16432 Use proper printf formats for widths of integer types.
16433 * lib/bitset_stats.c (bitset_percent_histogram_print,
16434 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
16435 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
16436 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
16437 * lib/lbitset.c (lbitset_bytes): Likewise.
16438
16439 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
16440 BITSET_SIZE_MAX): New macros.
16441 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
16442 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
16443 to BITSET_WINDEX_MAX.
16444
16445 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
16446 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
16447 since we now return the bitset_bindex type (not int).
16448
16449 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
16450 when computing sizes.
16451 * lib/ebitset.c (ebitset_elts_grow): Likewise.
16452
16453 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
16454 and avoid cast to unsigned.
16455
16456 2002-09-30 Akim Demaille <akim@epita.fr>
16457
16458 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
16459 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
16460 Updates from Michael Hayes.
16461
16462 2002-09-30 Art Haas <ahaas@neosoft.com>
16463
16464 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
16465 invocations.
16466 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
16467 defined.
16468
16469 2002-09-27 Akim Demaille <akim@epita.fr>
16470
16471 Version 1.49c.
16472
16473 2002-09-27 Akim Demaille <akim@epita.fr>
16474
16475 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
16476 (Because of AC_LIBSOURCE).
16477
16478 2002-09-27 Akim Demaille <akim@epita.fr>
16479
16480 Playing with Autoscan.
16481
16482 * configure.ac: Remove the old LIBOBJ tweaks.
16483 (AC_REPLACE_FUNCS): Add strrchr and strtol.
16484 * lib/strrchr.c: New.
16485 * lib/strtol.c: New, from the Coreutils 4.5.1.
16486
16487 2002-09-27 Akim Demaille <akim@epita.fr>
16488
16489 Playing with Autoscan.
16490
16491 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
16492 * lib/Makefile.am (libbison_a_SOURCES): No longer include
16493 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
16494 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
16495 Coreutils 4.5.1.
16496
16497 2002-09-24 Akim Demaille <akim@epita.fr>
16498
16499 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
16500 (Frequently Asked Questions, Parser Stack Overflow): New.
16501
16502 2002-09-13 Akim Demaille <akim@epita.fr>
16503
16504 Playing with autoscan.
16505
16506 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
16507 * src/files.c (skeleton_find): Remove, unused.
16508 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
16509 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
16510
16511 2002-09-13 Akim Demaille <akim@epita.fr>
16512
16513 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
16514 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
16515
16516 2002-09-13 Akim Demaille <akim@epita.fr>
16517
16518 * configure.ac: Require 2.54.
16519 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
16520 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
16521 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
16522 Remove, provided by Autoconf macros.
16523
16524 2002-09-12 Akim Demaille <akim@epita.fr>
16525
16526 * m4/prereq.m4: Update, from Coreutils 4.5.1.
16527
16528 2002-09-12 Akim Demaille <akim@epita.fr>
16529
16530 * m4/prereq.m4: Update, from Fileutils 4.1.5.
16531 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
16532 Reported by Martin Mokrejs.
16533
16534 2002-09-10 Akim Demaille <akim@epita.fr>
16535
16536 * src/parse-gram.y: Associate a human readable string to each
16537 token type.
16538 * tests/regression.at (Invalid inputs): Adjust.
16539
16540 2002-09-10 Gary V. Vaughan <gary@gnu.org>
16541
16542 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
16543 with an Autoconf-2.5x style configure.ac.
16544
16545 2002-09-06 Paul Eggert <eggert@twinsun.com>
16546
16547 * doc/bison.texinfo (Conditions): Make explicit that the GPL
16548 exception applies only to yacc.c. This is a modification of a
16549 patch originally suggested by Akim Demaille.
16550
16551 2002-09-06 Akim Demaille <akim@epita.fr>
16552
16553 * data/c.m4 (b4_copyright): Move the GPL exception comment from
16554 here to...
16555 * data/yacc.c: here.
16556
16557 * data/lalr1.cc (struct yyltype): Don't define it, since we use
16558 LocationType.
16559 (b4_ltype): Default to yy::Location from location.hh.
16560
16561 2002-09-04 Jim Meyering <jim@meyering.net>
16562
16563 * data/yacc.c: Guard the declaration of yytoknum also with
16564 `#ifdef YYPRINT', so it is declared only when used.
16565
16566 2002-09-04 Akim Demaille <akim@epita.fr>
16567
16568 * configure.in: Rename as...
16569 * configure.ac: this.
16570 Bump to 1.49c.
16571
16572 2002-09-04 Akim Demaille <akim@epita.fr>
16573
16574 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
16575 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
16576 translate maintainer only messages.
16577
16578 2002-08-12 Paul Eggert <eggert@twinsun.com>
16579
16580 Version 1.49b.
16581
16582 * Makefile.am (SUBDIRS): Remove intl.
16583 (DISTCLEANFILES): Remove.
16584 * NEWS: Mention that GNU M4 is now required. Clarify what is
16585 meant by "larger grammars". Mention the pt_BR translation.
16586 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
16587 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
16588 Bump version from 0.11.2 to 0.11.5.
16589 (BISON_PREREQ_STAGE): Remove.
16590 (AM_GNU_GETTEXT): Use external gettext.
16591 (AC_OUTPUT): Remove intl/Makefile.
16592
16593 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
16594
16595 * data/glr.c: Include string.h, for strlen.
16596 (yyreportParseError): Use size_t for yysize.
16597 (yy_yypstack): No longer nested inside yypstates, as nested
16598 functions are not portable. Do not assume size_t is the
16599 same width as int.
16600 (yypstates): Do not assume that ptrdiff_t is the same width
16601 as int, and similarly for yyposn and YYINDEX.
16602
16603 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
16604
16605 * lib/Makefile.am (INCLUDES): Do not include from the intl
16606 directory, which has been removed.
16607 * src/Makefile.am (INCLUDES): Likewise.
16608
16609 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
16610 (bitsets_sources, additional_bitsets_sources, timevars_sources):
16611 New vars.
16612
16613 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
16614 * tests/Makefile.am (EXTRA_DIST): Likewise.
16615
16616 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
16617 Do not assume that bitset_windex is the same width as unsigned.
16618
16619 * lib/abitset.c (abitset_unused_clear): Do not assume that
16620 bitset_word is the same width as int.
16621 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
16622 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
16623 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
16624 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
16625 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
16626
16627 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
16628 portability to one's complement hosts!).
16629 * lib/ebitset.c (ebitset_op1): Likewise.
16630 * lib/lbitset.c (lbitset_op1): Likewise.
16631
16632 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
16633 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
16634 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
16635 Sync with fileutils.
16636 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
16637 lib/gettext.h: Sync with diffutils.
16638
16639 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
16640 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
16641
16642 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
16643 PROTOTYPES to check for prototypes, and "defined __STDC__" to
16644 check for void *.
16645
16646 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
16647 size_t; the old version tried to do this but casted improperly.
16648 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
16649 (bitset_test): Now returns int, not unsigned long.
16650
16651 * lib/bitset_stats.c: Include "gettext.h".
16652 (_): New macro.
16653 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
16654 name locals "index", as it generates unnecessary warnings on some
16655 hosts that have an "index" function.
16656
16657 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
16658 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
16659 they need translation.
16660 * src/LR0.c (state_list_append, new_itemsets, get_state,
16661 append_states, generate_states): Likewise.
16662 * src/assoc.c (assoc_to_string): Likewise.
16663 * src/closure.c (print_closure, set_firsts, closure): Likewise.
16664 * src/gram.c (grammar_dump): Likewise.
16665 * src/injections.c (injections_compute): Likewise.
16666 * src/lalr.c (lookaheads_print): Likewise.
16667 * src/relation.c (relation_transpose): Likewise.
16668 * src/scan-gram.l: Likewise.
16669 * src/tables.c (table_grow, pack_vector): Likewise.
16670
16671 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
16672 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
16673 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
16674 * m4/mbstate_t.m4: Sync with fileutils.
16675 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
16676
16677 * po/LINGUAS: Add pt_BR.
16678 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
16679 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
16680 lib/timevar.c.
16681 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
16682 manual recommends.
16683 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
16684
16685 * src/complain.c (strerror_r): Remove decl; not needed.
16686 (strerror): Use same pattern as ../lib/error.c.
16687
16688 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
16689
16690 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
16691
16692 * src/main.c (main): Cast result of bindtextdomain and textdomain
16693 to void, to avoid a GCC warning when --disable-nls is in effect.
16694
16695 * src/scan-gram.l: Use strings rather than escapes when possible,
16696 to minimize the number of warnings from xgettext.
16697 (handle_action_dollar, handle_action_at): Don't use isdigit,
16698 as it mishandles negative chars and it may not work as expected
16699 outside the C locale.
16700
16701 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
16702 this is a GCC extension and is not portable to other compilers.
16703
16704 * src/system.h (alloca): Use same pattern as ../lib/error.c.
16705 Do not include <ctype.h>; no longer needed.
16706 Do not include <malloc.h>; no longer needed (and generates
16707 warnings on OpenBSD 3.0).
16708
16709 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
16710 it's not portable.
16711
16712 * tests/regression.at: Do not use 'cc -c input.c -o input';
16713 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
16714
16715 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
16716 exit status as failure, not just exit status 1. Sun C exits
16717 with status 2 sometimes.
16718
16719 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
16720 Use it for the two large tests.
16721
16722 2002-08-02 Akim Demaille <akim@epita.fr>
16723
16724 * src/conflicts.c (conflicts_output): Don't output rules never
16725 reduced here, since anyway that computation doesn't work.
16726 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
16727 (rule_useless_p, rule_never_reduced_p): New.
16728 (grammar_rules_partial_print): Use a filter instead of a range.
16729 Display the title only if needed.
16730 (grammar_rules_print): Adjust.
16731 (grammar_rules_never_reduced_report): New.
16732 * src/tables.c (action_row): Move the computation of rules never
16733 reduced to...
16734 (token_actions): here.
16735 * src/main.c (main): Make the parser before making the report, so
16736 that rules never reduced are computed.
16737 Call grammar_rules_never_reduced_report.
16738 * src/print.c (print_results): Report rules never reduced.
16739 * tests/conflicts.at, tests/reduce.at: Adjust.
16740
16741 2002-08-01 Akim Demaille <akim@epita.fr>
16742
16743 Instead of attaching lookaheads and duplicating the rules being
16744 reduced by a state, attach the lookaheads to the reductions.
16745
16746 * src/state.h (state_t): Remove the `lookaheads',
16747 `lookaheads_rule' member.
16748 (reductions_t): Add a `lookaheads' member.
16749 Use a regular array for the `rules'.
16750 * src/state.c (reductions_new): Initialize the lookaheads member
16751 to 0.
16752 (state_rule_lookaheads_print): Adjust.
16753 * src/state.h, src/state.c (state_reductions_find): New.
16754 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
16755 (count_rr_conflicts): Adjust.
16756 * src/lalr.c (LArule): Remove.
16757 (add_lookback_edge): Adjust.
16758 (state_lookaheads_count): New.
16759 (states_lookaheads_initialize): Merge into...
16760 (initialize_LA): this.
16761 (lalr_free): Adjust.
16762 * src/main.c (main): Don't free nullable and derives too early: it
16763 is used by --verbose.
16764 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
16765
16766 2002-08-01 Akim Demaille <akim@epita.fr>
16767
16768 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
16769 `rule_number_t**'.
16770 (set_derives, free_derives): Rename as...
16771 (derives_compute, derives_free): this.
16772 Adjust all dependencies.
16773 * src/nullable.c (set_nullable, free_nullable): Rename as...
16774 (nullable_compute, nullable_free): these.
16775 (rule_list_t): Store rule_t *, not rule_number_t.
16776 * src/state.c (state_rule_lookaheads_print): Directly compare rule
16777 pointers, instead of their numbers.
16778 * src/main.c (main): Call nullable_free, and derives_free earlier,
16779 as they were lo longer used.
16780
16781 2002-08-01 Akim Demaille <akim@epita.fr>
16782
16783 * lib/timevar.c (get_time): Include children time.
16784 * src/lalr.h (LA, LArule): Don't export them: used with the
16785 state_t.
16786 * src/lalr.c (LA, LArule): Static.
16787 * src/lalr.h, src/lalr.c (lalr_free): New.
16788 * src/main.c (main): Call it.
16789 * src/tables.c (pack_vector): Check whether loc is >= to the
16790 table_size, not >.
16791 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
16792 (tables_generate): do it, since that's also it which allocates
16793 them.
16794 Don't free LA and LArule, main does.
16795
16796 2002-07-31 Akim Demaille <akim@epita.fr>
16797
16798 Separate parser tables computation and output.
16799
16800 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
16801 (conflict_list, conflict_list_cnt, table, check, table_ninf)
16802 (yydefgoto, yydefact, high): Move to...
16803 * src/tables.h, src/tables.c: here.
16804 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
16805 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
16806 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
16807 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
16808 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
16809 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
16810 (action_row, save_row, token_actions, save_column, default_goto)
16811 (goto_actions, sort_actions, matching_state, pack_vector)
16812 (table_ninf_remap, pack_table, prepare_actions): Move to...
16813 * src/tables.c: here.
16814 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
16815 * src/output.c (token_actions, output_base, output_conflicts)
16816 (output_check): Merge into...
16817 (prepare_actions): this.
16818 (actions_output): Rename as...
16819 (user_actions_output): this.
16820 * src/main.c (main): Call tables_generate and tables_free.
16821
16822 2002-07-31 Akim Demaille <akim@epita.fr>
16823
16824 Steal GCC's --time-report support.
16825
16826 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
16827 stolen/adjusted from GCC.
16828 * m4/stage.m4: Remove time related checks.
16829 * m4/timevar.m4: New.
16830 * configure.in: Adjust.
16831 * src/system.h: Adjust to using timevar.h.
16832 * src/getargs.h, src/getargs.c: Support trace_time for
16833 --trace=time.
16834 * src/main.c (stage): Remove.
16835 (main): Replace `stage' invocations with timevar calls.
16836 * src/output.c: Insert pertinent timevar calls.
16837
16838 2002-07-31 Akim Demaille <akim@epita.fr>
16839
16840 Let --trace have arguments.
16841
16842 * src/getargs.h (enum trace_e): New.
16843 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
16844 (long_options, short_options): --trace/-T takes an optional
16845 argument.
16846 Change all the uses of trace_flag to reflect the new flags.
16847 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
16848
16849 Strengthen `stage' portability.
16850
16851 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
16852 * configure.in: Use it.
16853 Don't check for malloc.h and sys/times.h.
16854 * src/system.h: Include them when appropriate.
16855 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
16856 times and struct tms are available.
16857
16858 2002-07-30 Akim Demaille <akim@epita.fr>
16859
16860 In verbose parse error message, don't report `error' as an
16861 expected token.
16862 * tests/actions.at (Printers and Destructors): Adjust.
16863 * tests/calc.at (Calculator $1): Adjust.
16864 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
16865 error message, do not report the parser accepts the error token in
16866 that state.
16867
16868 2002-07-30 Akim Demaille <akim@epita.fr>
16869
16870 Normalize conflict related messages.
16871
16872 * src/complain.h, src/complain.c (warn, complain): New.
16873 * src/conflicts.c (conflicts_print): Use them.
16874 (conflict_report_yacc): New, extracted from...
16875 (conflicts_print): here.
16876 * tests/conflicts.at, tests/existing.at: Adjust.
16877
16878 2002-07-30 Akim Demaille <akim@epita.fr>
16879
16880 Report rules which are never reduced by the parser: those hidden
16881 by conflicts.
16882
16883 * src/LR0.c (save_reductions): Don't make the final state too
16884 different: save its reduction (accept) instead of having a state
16885 without any action (no shift or goto, no reduce).
16886 Note: the final state is now a ``regular'' state, i.e., the
16887 parsers now contain `reduce 0' as default reduction.
16888 Nevertheless, since they decide to `accept' when yystate =
16889 final_state, they still will not reduce rule 0.
16890 * src/print.c (print_actions, print_reduction): Adjust.
16891 * src/output.c (action_row): Track reduced rules.
16892 (token_actions): Report rules never reduced.
16893 * tests/conflicts.at, tests/regression.at: Adjust.
16894
16895 2002-07-30 Akim Demaille <akim@epita.fr>
16896
16897 `stage' was accidently included in a previous patch.
16898 Initiate its autoconfiscation.
16899
16900 * configure.in: Look for malloc.h and sys/times.h.
16901 * src/main.c (stage): Adjust.
16902 Report only when trace_flag.
16903
16904 2002-07-29 Akim Demaille <akim@epita.fr>
16905
16906 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
16907 state_number_t.
16908 (errs_t): symbol_t*, not symbol_number_t.
16909 (reductions_t): rule_t*, not rule_number_t.
16910 (FOR_EACH_SHIFT): New.
16911 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
16912 * src/print.c, src/print_graph.c: Adjust.
16913
16914 2002-07-29 Akim Demaille <akim@epita.fr>
16915
16916 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
16917
16918 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
16919 (endtoken, accept): these.
16920 * src/reader.c (reader): Set endtoken's default tag to "$end".
16921 Set undeftoken's tag to "$undefined" instead of "$undefined.".
16922 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
16923 Adjust.
16924
16925 2002-07-29 Akim Demaille <akim@epita.fr>
16926
16927 * src/reduce.c (reduce_grammar): When the language is empty,
16928 complain about the start symbol, not the axiom.
16929 Use its location.
16930 * tests/reduce.at (Empty Language): New.
16931
16932 2002-07-26 Akim Demaille <akim@epita.fr>
16933
16934 * src/reader.h, src/reader.c (gram_error): ... can't get
16935 yycontrol without making too strong assumptions on the parser
16936 itself.
16937 * src/output.c (prepare_tokens): Use the real 0th value of
16938 token_translations instead of `0'.
16939 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
16940 visible here.
16941 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
16942 for the time being: %locations ought to provide it to yyerror.
16943
16944 2002-07-25 Akim Demaille <akim@epita.fr>
16945
16946 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
16947 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
16948 * tests/regression.at (Web2c Actions): Adjust.
16949
16950 2002-07-25 Akim Demaille <akim@epita.fr>
16951
16952 Stop storing rules from 1 to nrules + 1.
16953
16954 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
16955 * src/nullable.c, src/output.c, src/print.c, src/reader.c
16956 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
16957 Iterate from 0 to nrules.
16958 Use rule_number_as_item_number and item_number_as_rule_number.
16959 Adjust to `derive' now containing possibly 0.
16960 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
16961 Handle the `- 1' part in rule numbers from/to item numbers.
16962 * src/conflicts.c (log_resolution): Fix the message which reversed
16963 shift and reduce.
16964 * src/output.c (action_row): Initialize default_rule to -1.
16965 (token_actions): Adjust.
16966 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
16967 expected output.
16968 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
16969
16970 2002-07-25 Akim Demaille <akim@epita.fr>
16971
16972 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
16973 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
16974 (b4_c_knr_arg_decl): New.
16975 * data/yacc.c: Use it to define yysymprint, yydestruct, and
16976 yyreport_parse_error.
16977
16978 2002-07-25 Akim Demaille <akim@epita.fr>
16979
16980 * data/yacc.c (yyreport_parse_error): New, extracted from...
16981 (yyparse): here.
16982 (yydestruct, yysymprint): Move above yyparse.
16983 Be K&R compliant.
16984
16985 2002-07-25 Akim Demaille <akim@epita.fr>
16986
16987 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
16988 replace...
16989 (b4_sint_type, b4_uint_type): these.
16990 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
16991 * tests/regression.at (Web2c Actions): Adjust.
16992
16993 2002-07-25 Akim Demaille <akim@epita.fr>
16994
16995 * src/gram.h (TIEM_NUMBER_MAX): New.
16996 (item_number_of_rule_number, rule_number_of_item_number): Rename
16997 as...
16998 (rule_number_as_item_number, item_number_as_rule_number): these.
16999 Adjust dependencies.
17000 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
17001 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
17002 (symbol_number_to_vector_number): New.
17003 (order): Of vector_number_t* type.
17004 (base_t, BASE_MAX, BASE_MIN): New.
17005 (froms, tos, width, pos, check): Of base_t type.
17006 (action_number_t, ACTION_MIN, ACTION_MAX): New.
17007 (actrow): Of action_number_t type.
17008 (conflrow): Of unsigned int type.
17009 (table_ninf, base_ninf): New.
17010 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
17011 (muscle_insert_int_table, muscle_insert_base_table)
17012 (muscle_insert_rule_number_table): New.
17013 (prepare_tokens): Output `toknum' as int_table.
17014 (action_row): Returns a rule_number_t.
17015 Use ACTION_MIN, not SHRT_MIN.
17016 (token_actions): yydefact is rule_number_t*.
17017 (table_ninf_remap): New.
17018 (pack_table): Use it for `base' and `table'.
17019 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
17020 replaced with...
17021 (YYPACT_NINF, YYTABLE_NINF): these.
17022 (yypact, yytable): Compute their types instead of hard-coded
17023 `short'.
17024 * tests/regression.at (Web2c Actions): Adjust.
17025
17026 2002-07-19 Akim Demaille <akim@epita.fr>
17027
17028 * src/scan-gram.l (id): Can start with an underscore.
17029
17030 2002-07-16 Akim Demaille <akim@epita.fr>
17031
17032 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
17033 Adjust all former `associativity' dependencies.
17034 * src/symtab.c (symbol_new): Default associativity is `undef', not
17035 `right'.
17036 (symbol_check_alias_consistence): Adjust.
17037
17038 2002-07-09 Akim Demaille <akim@epita.fr>
17039
17040 * doc/bison.texinfo: Properly set the ``header'' part.
17041 Use @dircategory ``GNU programming tools'' as per Texinfo's
17042 documentation.
17043 Use @copying.
17044
17045 2002-07-09 Akim Demaille <akim@epita.fr>
17046
17047 * lib/quotearg.h: Protect against multiple inclusions.
17048 * src/location.h (location_t): Add a `file' member.
17049 (LOCATION_RESET, LOCATION_PRINT): Adjust.
17050 * src/complain.c (warn_at, complain_at, fatal_at): Drop
17051 `error_one_per_line' support.
17052
17053 2002-07-09 Akim Demaille <akim@epita.fr>
17054
17055 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
17056 * src/reader.c (lineno): Remove.
17057 Adjust all dependencies.
17058 (get_merge_function): Take a location and use complain_at.
17059 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
17060 * tests/regression.at (Invalid inputs, Mixing %token styles):
17061 Adjust.
17062
17063 2002-07-09 Akim Demaille <akim@epita.fr>
17064
17065 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
17066 recovery rule, and forbid extensions when --yacc.
17067 (gram_error): Use complain_at.
17068 * src/reader.c (reader): Exit if there were parse errors.
17069
17070 2002-07-09 Akim Demaille <akim@epita.fr>
17071
17072 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
17073 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
17074 Reported by R Blake <blakers@mac.com>.
17075
17076 2002-07-09 Akim Demaille <akim@epita.fr>
17077
17078 * data/yacc.c: Output the copyright notive in the header.
17079
17080 2002-07-03 Akim Demaille <akim@epita.fr>
17081
17082 * src/output.c (froms, tos): Are state_number_t.
17083 (save_column): sp, sp1, and sp2 are state_number_t.
17084 (prepare): Rename `final' as `final_state_number', `nnts' as
17085 `nterms_number', `nrules' as `rules_number', `nstates' as
17086 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
17087 unused.
17088 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
17089 * data/lalr1.cc (nsym_): Remove, unused.
17090
17091 2002-07-03 Akim Demaille <akim@epita.fr>
17092
17093 * src/lalr.h, src/lalr.c (goto_number_t): New.
17094 * src/lalr.c (goto_list_t): New.
17095 Propagate them.
17096 * src/nullable.c (rule_list_t): New.
17097 Propagate.
17098 * src/types.h: Remove.
17099
17100 2002-07-03 Akim Demaille <akim@epita.fr>
17101
17102 * src/closure.c (print_fderives): Use rule_rhs_print.
17103 * src/derives.c (print_derives): Use rule_rhs_print.
17104 (rule_list_t): New, replaces `shorts'.
17105 (set_derives): Add comments.
17106 * tests/sets.at (Nullable, Firsts): Adjust.
17107
17108 2002-07-03 Akim Demaille <akim@epita.fr>
17109
17110 * src/output.c (prepare_actions): Free `tally' and `width'.
17111 (prepare_actions): Allocate and free `order'.
17112 * src/symtab.c (symbols_free): Free `symbols'.
17113 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
17114 * src/output.c (m4_invoke): Move to...
17115 * src/scan-skel.l: here.
17116 (<<EOF>>): Close yyout, and free its name.
17117
17118 2002-07-03 Akim Demaille <akim@epita.fr>
17119
17120 Fix some memory leaks, and fix a bug: state 0 was examined twice.
17121
17122 * src/LR0.c (new_state): Merge into...
17123 (state_list_append): this.
17124 (new_states): Merge into...
17125 (generate_states): here.
17126 (set_states): Don't ensure a proper `errs' state member here, do it...
17127 * src/conflicts.c (conflicts_solve): here.
17128 * src/state.h, src/state.c: Comment changes.
17129 (state_t): Rename member `shifts' as `transitions'.
17130 Adjust all dependencies.
17131 (errs_new): For consistency, also take the values as argument.
17132 (errs_dup): Remove.
17133 (state_errs_set): New.
17134 (state_reductions_set, state_transitions_set): Assert that no
17135 previous value was assigned.
17136 (state_free): New.
17137 (states_free): Use it.
17138 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
17139 temporary storage: use `errs' and `nerrs' as elsewhere.
17140 (set_conflicts): Allocate and free this `errs'.
17141
17142 2002-07-02 Akim Demaille <akim@epita.fr>
17143
17144 * lib/libiberty.h: New.
17145 * lib: Update the bitset implementation from upstream.
17146 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
17147 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
17148 * src/main.c: Adjust bitset stats calls.
17149
17150 2002-07-01 Paul Eggert <eggert@twinsun.com>
17151
17152 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
17153 char, so that negative chars don't collide with $.
17154
17155 2002-06-30 Akim Demaille <akim@epita.fr>
17156
17157 Have the GLR tests be `warning' checked, and fix the warnings.
17158
17159 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
17160 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
17161 (yyremoveDeletes): `yyi' and `yyj' are size_t.
17162 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
17163 (yyaddDeferredAction): static.
17164 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
17165 (yyreportParseError): yyprefix is const.
17166 yytokenp is used only when verbose.
17167 (yy__GNUC__): Replace with __GNUC__.
17168 (yypdumpstack): yyi is size_t.
17169 (yypreference): Un-yy local variables and arguments, to avoid
17170 clashes with `yyr1'. Anyway, we are not in the user name space.
17171 (yytname_size): be an int, as is compared with ints.
17172 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
17173 Use them.
17174 * tests/cxx-gram.at: Use quotation to protect $1.
17175 Use AT_COMPILE to enable warnings hunts.
17176 Prototype yylex and yyerror.
17177 `Use' argc.
17178 Include `string.h', not `strings.h'.
17179 Produce and prototype stmtMerge only when used.
17180 yylex takes a location.
17181
17182 2002-06-30 Akim Demaille <akim@epita.fr>
17183
17184 We spend a lot of time in quotearg, in particular when --verbose.
17185
17186 * src/symtab.c (symbol_get): Store a quoted version of the key.
17187 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
17188 Adjust all callers.
17189
17190 2002-06-30 Akim Demaille <akim@epita.fr>
17191
17192 * src/state.h (reductions_t): Rename member `nreds' as num.
17193 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
17194 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
17195
17196 2002-06-30 Akim Demaille <akim@epita.fr>
17197
17198 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
17199 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
17200 (shifts_to): Rename as...
17201 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
17202 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
17203 (TRANSITION_IS_DISABLED, transitions_to): these.
17204
17205 2002-06-30 Akim Demaille <akim@epita.fr>
17206
17207 * src/print.c (print_shifts, print_gotos): Merge into...
17208 (print_transitions): this.
17209 (print_transitions, print_errs, print_reductions): Align the
17210 lookaheads columns.
17211 (print_core, print_transitions, print_errs, print_state,
17212 print_grammar): Output empty lines separator before, not after.
17213 (state_default_rule_compute): Rename as...
17214 (state_default_rule): this.
17215 * tests/conflicts.at (Defaulted Conflicted Reduction),
17216 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
17217 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
17218
17219 2002-06-30 Akim Demaille <akim@epita.fr>
17220
17221 Display items as we display rules.
17222
17223 * src/gram.h, src/gram.c (rule_lhs_print): New.
17224 * src/gram.c (grammar_rules_partial_print): Use it.
17225 * src/print.c (print_core): Likewise.
17226 * tests/conflicts.at (Defaulted Conflicted Reduction),
17227 (Unresolved SR Conflicts): Adjust.
17228 (Unresolved SR Conflicts): Adjust and rename as...
17229 (Resolved SR Conflicts): this, as was meant.
17230 * tests/regression.at (Web2c Report): Adjust.
17231
17232 2002-06-30 Akim Demaille <akim@epita.fr>
17233
17234 * src/print.c (state_default_rule_compute): New, extracted from...
17235 (print_reductions): here.
17236 Pessimize, but clarify the code.
17237 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
17238
17239 2002-06-30 Akim Demaille <akim@epita.fr>
17240
17241 * src/output.c (action_row): Let default_rule be always a rule
17242 number.
17243
17244 2002-06-30 Akim Demaille <akim@epita.fr>
17245
17246 * src/closure.c (print_firsts, print_fderives, closure):
17247 Use BITSET_EXECUTE.
17248 * src/lalr.c (lookaheads_print): Likewise.
17249 * src/state.c (state_rule_lookaheads_print): Likewise.
17250 * src/print_graph.c (print_core): Likewise.
17251 * src/print.c (print_reductions): Likewise.
17252 * src/output.c (action_row): Likewise.
17253 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
17254
17255 2002-06-30 Akim Demaille <akim@epita.fr>
17256
17257 * src/print_graph.c: Use report_flag.
17258
17259 2002-06-30 Akim Demaille <akim@epita.fr>
17260
17261 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
17262 to...
17263 * src/relation.h, src/relation.c (traverse, relation_digraph)
17264 (relation_print, relation_transpose): New.
17265
17266 2002-06-30 Akim Demaille <akim@epita.fr>
17267
17268 * src/state.h, src/state.c (shifts_to): New.
17269 * src/lalr.c (build_relations): Use it.
17270
17271 2002-06-30 Akim Demaille <akim@epita.fr>
17272
17273 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
17274 (item_number_of_rule_number, rule_number_of_item_number): New.
17275 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
17276 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
17277 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
17278 Propagate their use.
17279 Much remains to be done, in particular wrt `shorts' from types.h.
17280
17281 2002-06-30 Akim Demaille <akim@epita.fr>
17282
17283 * src/symtab.c (symbol_new): Initialize the `printer' member.
17284
17285 2002-06-30 Akim Demaille <akim@epita.fr>
17286
17287 * src/LR0.c (save_reductions): Remove, replaced by...
17288 * src/state.h, src/state.c (state_reductions_set): New.
17289 (reductions, errs): Rename as...
17290 (reductions_t, errs_t): these.
17291 Adjust all dependencies.
17292
17293 2002-06-30 Akim Demaille <akim@epita.fr>
17294
17295 * src/LR0.c (state_list_t, state_list_append): New.
17296 (first_state, last_state): Now symbol_list_t.
17297 (this_state): Remove.
17298 (new_itemsets, append_states, save_reductions): Take a state_t as
17299 argument.
17300 (set_states, generate_states): Adjust.
17301 (save_shifts): Remove, replaced by...
17302 * src/state.h, src/state.c (state_shifts_set): New.
17303 (shifts): Rename as...
17304 (shifts_t): this.
17305 Adjust all dependencies.
17306 * src/state.h (state_t): Remove the `next' member.
17307
17308 2002-06-30 Akim Demaille <akim@epita.fr>
17309
17310 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
17311 escaped in slot 0.
17312
17313 2002-06-30 Akim Demaille <akim@epita.fr>
17314
17315 Use hash.h for the state hash table.
17316
17317 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
17318 (allocate_storage): Use state_hash_new.
17319 (free_storage): Use state_hash_free.
17320 (new_state, get_state): Adjust.
17321 * src/lalr.h, src/lalr.c (states): Move to...
17322 * src/states.h (state_t): Remove the `link' member, no longer
17323 used.
17324 * src/states.h, src/states.c: here.
17325 (state_hash_new, state_hash_free, state_hash_lookup)
17326 (state_hash_insert, states_free): New.
17327 * src/states.c (state_table, state_compare, state_hash): New.
17328 * src/output.c (output_actions): Do not free states now, since we
17329 still need to know the final_state number in `prepare', called
17330 afterwards. Do it...
17331 * src/main.c (main): here: call states_free after `output'.
17332
17333 2002-06-30 Akim Demaille <akim@epita.fr>
17334
17335 * src/state.h, src/state.c (state_new): New, extracted from...
17336 * src/LR0.c (new_state): here.
17337 * src/state.h (STATE_ALLOC): Move to...
17338 * src/state.c: here.
17339 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
17340 * src/state.h, src/state.c: here.
17341
17342 2002-06-30 Akim Demaille <akim@epita.fr>
17343
17344 * src/reader.c (gensym): Rename as...
17345 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
17346 (getsym): Rename as...
17347 (symbol_get): this.
17348
17349 2002-06-30 Akim Demaille <akim@epita.fr>
17350
17351 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
17352 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
17353 * src/output.c, src/print.c, src/print_graph.c: Propagate.
17354 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
17355
17356 2002-06-30 Akim Demaille <akim@epita.fr>
17357
17358 Make the test suite pass with warnings checked.
17359
17360 * tests/actions.at (Printers and Destructors): Improve.
17361 Avoid unsigned vs. signed issues.
17362 * tests/calc.at: Don't exercise the scanner here, do it...
17363 * tests/input.at (Torturing the Scanner): here.
17364
17365 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17366
17367 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
17368 reorganize first lines parallel to yacc.c.
17369
17370 2002-06-28 Akim Demaille <akim@epita.fr>
17371
17372 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
17373 (b4_token_enum, b4_token_defines): New, factored from...
17374 * data/lalr1.cc, data/yacc.c, glr.c: here.
17375
17376 2002-06-28 Akim Demaille <akim@epita.fr>
17377
17378 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
17379 unused variables.
17380 * src/output.c (merger_output): static.
17381
17382 2002-06-28 Akim Demaille <akim@epita.fr>
17383
17384 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
17385 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
17386 pacify GCC.
17387 * src/output.c (save_row): Initialize all the variables to pacify GCC.
17388
17389 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17390
17391 Accumulated changelog for new GLR parsing features.
17392
17393 * src/conflicts.c (count_total_conflicts): Change name to
17394 conflicts_total_count.
17395 * src/conflicts.h: Ditto.
17396 * src/output.c (token_actions): Use the new name.
17397 (output_conflicts): Change conflp => conflict_list_heads, and
17398 confl => conflict_list for better readability.
17399 * data/glr.c: Use the new names.
17400 * NEWS: Add self to GLR announcement.
17401
17402 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
17403
17404 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
17405 Akim Demaille.
17406
17407 * data/bison.glr: Change name to glr.c
17408 * data/glr.c: Renamed from bison.glr.
17409 * data/Makefile.am: Add glr.c
17410
17411 * src/getargs.c:
17412
17413 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
17414 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
17415
17416 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17417
17418 * data/bison.glr: Be sure to restore the
17419 current #line when returning to the skeleton contents after having
17420 exposed the input file's #line.
17421
17422 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17423
17424 * data/bison.glr: Bring up to date with changes to bison.simple.
17425
17426 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17427
17428 * data/bison.glr: Correct definitions that use b4_prefix.
17429 Various reformatting.
17430 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
17431 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
17432 yytokenp argument; now part of stack.
17433 (yychar): Define to behave as documented.
17434 (yyclearin): Ditto.
17435
17436 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17437
17438 * src/reader.h: Add declaration for free_merger_functions.
17439
17440 * src/reader.c (merge_functions): New variable.
17441 (get_merge_function): New function.
17442 (free_merger_functions): New function.
17443 (readgram): Check for %prec that is not followed by a symbol.
17444 Handle %dprec and %merge declarations.
17445 (packgram): Initialize dprec and merger fields in rules array.
17446
17447 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
17448 conflict_list_cnt, conflict_list_free): New variables.
17449 (table_grow): Also grow conflict_table.
17450 (prepare_rules): Output dprec and merger tables.
17451 (conflict_row): New function.
17452 (action_row): Output conflict lists for GLR parser. Don't use
17453 default reduction in conflicted states for GLR parser so that there
17454 are spaces for the conflict lists.
17455 (save_row): Also save conflict information.
17456 (token_actions): Allocate conflict list.
17457 (merger_output): New function.
17458 (pack_vector): Pack conflict table, too.
17459 (output_conflicts): New function to output yyconflp and yyconfl.
17460 (output_check): Allocate conflict_tos.
17461 (output_actions): Output conflict tables, also.
17462 (output_skeleton): Output b4_mergers definition.
17463 (prepare): Output b4_max_rhs_length definition.
17464 Use 'bison.glr' as default skeleton for GLR parsers.
17465
17466 * src/gram.c (glr_parser): New flag.
17467 (grammar_free): Call free_merger_functions.
17468
17469 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
17470 all pairs of conflicting reductions, rather than just all tokens
17471 causing conflicts. Needed to size conflict tables.
17472 (conflicts_output): Modify call to count_rr_conflicts for new
17473 interface.
17474 (conflicts_print): Ditto.
17475 (count_total_conflicts): New function.
17476
17477 * src/reader.h (merger_list): New type.
17478 (merge_functions): New variable.
17479
17480 * src/lex.h (tok_dprec, tok_merge): New token types.
17481
17482 * src/gram.h (rule_s): Add dprec and merger fields.
17483 (glr_parser): New flag.
17484
17485 * src/conflicts.h (count_total_conflicts): New function.
17486
17487 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
17488
17489 * doc/bison.texinfo (Generalized LR Parsing): New section.
17490 (GLR Parsers): New section.
17491 (Language and Grammar): Mention GLR parsing.
17492 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
17493 Correct typo ("tge" -> "the").
17494
17495 * data/bison.glr: New skeleton for GLR parsing.
17496
17497 * tests/cxx-gram.at: New tests for GLR parsing.
17498
17499 * tests/testsuite.at: Include cxx-gram.at.
17500
17501 * tests/Makefile.am: Add cxx-gram.at.
17502
17503 * src/parse-gram.y:
17504
17505 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
17506
17507 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
17508
17509 2002-06-27 Akim Demaille <akim@epita.fr>
17510
17511 * src/options.h, src/options.c: Remove.
17512 * src/getargs.c (short_options, long_options): New.
17513
17514 2002-06-27 Akim Demaille <akim@epita.fr>
17515
17516 * data/bison.simple, data/bison.c++: Rename as...
17517 * data/yacc.c, data/lalr1.cc: these.
17518 * doc/bison.texinfo (Environment Variables): Remove.
17519
17520 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
17521
17522 * src/getargs.c (report_argmatch): Initialize strtok().
17523
17524 2002-06-20 Akim Demaille <akim@epita.fr>
17525
17526 * data/bison.simple (b4_symbol_actions): New, replaces...
17527 (b4_symbol_destructor, b4_symbol_printer): these.
17528 (yysymprint): Be sure to call YYPRINT only for tokens, and using
17529 user token numbers.
17530
17531 2002-06-20 Akim Demaille <akim@epita.fr>
17532
17533 * data/bison.simple (yydestructor): Rename as...
17534 (yydestruct): this.
17535
17536 2002-06-20 Akim Demaille <akim@epita.fr>
17537
17538 * src/symtab.h, src/symtab.c (symbol_type_set)
17539 (symbol_destructor_set, symbol_precedence_set): The location is
17540 the last argument.
17541 Adjust all callers.
17542
17543 2002-06-20 Akim Demaille <akim@epita.fr>
17544
17545 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
17546 internals.
17547 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
17548 Takes a location.
17549 * src/symtab.h, src/symtab.c (symbol_class_set)
17550 (symbol_user_token_number_set): Likewise.
17551 Adjust all callers.
17552 Promote complain_at.
17553 * tests/input.at (Type Clashes): Adjust.
17554
17555 2002-06-20 Akim Demaille <akim@epita.fr>
17556
17557 * data/bison.simple (YYLEX): Fix the declaration when
17558 %pure-parser.
17559
17560 2002-06-20 Akim Demaille <akim@epita.fr>
17561
17562 * data/bison.simple (yysymprint): Don't print the token number,
17563 just its name.
17564 * tests/actions.at (Destructors): Rename as...
17565 (Printers and Destructors): this.
17566 Also exercise %printer.
17567
17568 2002-06-20 Akim Demaille <akim@epita.fr>
17569
17570 * data/bison.simple (YYDSYMPRINT): New.
17571 Use it to remove many of the #if YYDEBUG/if (yydebug).
17572
17573 2002-06-20 Akim Demaille <akim@epita.fr>
17574
17575 * src/symtab.h, src/symtab.c (symbol_t): printer and
17576 printer_location are new members.
17577 (symbol_printer_set): New.
17578 * src/parse-gram.y (PERCENT_PRINTER): New token.
17579 Handle its associated rule.
17580 * src/scan-gram.l: Adjust.
17581 (handle_destructor_at, handle_destructor_dollar): Rename as...
17582 (handle_symbol_code_at, handle_symbol_code_dollar): these.
17583 * src/output.c (symbol_printers_output): New.
17584 (output_skeleton): Call it.
17585 * data/bison.simple (yysymprint): New. Cannot be named yyprint
17586 since there are already many grammar files with a user `yyprint'.
17587 Replace the calls to YYPRINT to calls to yysymprint.
17588 * tests/calc.at: Adjust.
17589 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
17590 taking advantage of parser very internal details (stack size!).
17591
17592 2002-06-20 Akim Demaille <akim@epita.fr>
17593
17594 * src/scan-gram.l: Complete the scanner with the missing patterns
17595 to pacify Flex.
17596 Use `quote' and `symbol_tag_get' where appropriate.
17597
17598 2002-06-19 Akim Demaille <akim@epita.fr>
17599
17600 * tests/actions.at (Destructors): Augment to test locations.
17601 * data/bison.simple (yydestructor): Pass it the current location
17602 if locations are enabled.
17603 Prototype only when __STDC__ or C++.
17604 Change the argument names to move into the yy name space: there is
17605 user code here.
17606
17607 2002-06-19 Akim Demaille <akim@epita.fr>
17608
17609 * data/bison.simple (b4_pure_if): New.
17610 Use it instead of #ifdef YYPURE.
17611
17612 2002-06-19 Akim Demaille <akim@epita.fr>
17613
17614 * data/bison.simple (b4_location_if): New.
17615 Use it instead of #ifdef YYLSP_NEEDED.
17616
17617 2002-06-19 Akim Demaille <akim@epita.fr>
17618
17619 Prepare @$ in %destructor, but currently don't bind it in the
17620 skeleton, as %location use is not cleaned up yet.
17621
17622 * src/scan-gram.l (handle_dollar, handle_destructor_at)
17623 (handle_action_at): New.
17624 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
17625 a braced_code_t and a location as additional arguments.
17626 (handle_destructor_dollar): Instead of requiring `b4_eval', just
17627 unquote one when outputting `b4_dollar_dollar'.
17628 Adjust callers.
17629 * data/bison.simple (b4_eval): Remove.
17630 (b4_symbol_destructor): Adjust.
17631 * tests/input.at (Invalid @n): Adjust.
17632
17633 2002-06-19 Zack Weinberg <zack@codesourcery.com>
17634
17635 * doc/bison.texinfo: Document ability to have multiple
17636 prologue sections.
17637
17638 2002-06-18 Akim Demaille <akim@epita.fr>
17639
17640 * src/files.c (compute_base_names): When computing the output file
17641 names from the input file name, strip the directory part.
17642
17643 2002-06-18 Akim Demaille <akim@epita.fr>
17644
17645 * data/bison.simple.new: Comment changes.
17646 Reported by Andreas Schwab.
17647
17648 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
17649
17650 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
17651 there are no `label `yyoverflowlab' defined but not used' warnings
17652 when yyoverflow is defined.
17653
17654 2002-06-18 Akim Demaille <akim@epita.fr>
17655
17656 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
17657 new member.
17658 (symbol_destructor_set): Adjust.
17659 * src/output.c (symbol_destructors_output): Output the destructor
17660 locations.
17661 Output the symbol name.
17662 * data/bison.simple (b4_symbol_destructor): Adjust.
17663
17664 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
17665 and Akim Demaille <akim@epita.fr>
17666
17667 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
17668 what's left on the stack when the error recovery hits EOF.
17669 * tests/actions.at (Destructors): Complete to exercise this case.
17670
17671 2002-06-17 Akim Demaille <akim@epita.fr>
17672
17673 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
17674 arguments is really empty, not only equal to `[]'.
17675 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
17676 member.
17677 (symbol_destructor_set): New.
17678 * src/output.c (symbol_destructors_output): New.
17679 * src/reader.h (brace_code_t, current_braced_code): New.
17680 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
17681 (handle_dollar): Rename as...
17682 (handle_action_dollar): this.
17683 (handle_destructor_dollar): New.
17684 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
17685 (grammar_declaration): Use it.
17686 * data/bison.simple (yystos): Is always defined.
17687 (yydestructor): New.
17688 * tests/actions.at (Destructors): New.
17689 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
17690
17691 2002-06-17 Akim Demaille <akim@epita.fr>
17692
17693 * src/symlist.h, src/symlist.c (symbol_list_length): New.
17694 * src/scan-gram.l (handle_dollar, handle_at): Compute the
17695 rule_length only when needed.
17696 * src/output.c (actions_output, token_definitions_output): Output
17697 the full M4 block.
17698 * src/symtab.c: Don't access directly to the symbol tag, use
17699 symbol_tag_get.
17700 * src/parse-gram.y: Use symbol_list_free.
17701
17702 2002-06-17 Akim Demaille <akim@epita.fr>
17703
17704 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
17705 (symbol_list_prepend, get_type_name): Move to...
17706 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
17707 (symbol_list_prepend, symbol_list_n_type_name_get): here.
17708 Adjust all callers.
17709 (symbol_list_free): New.
17710 * src/scan-gram.l (handle_dollar): Takes a location.
17711 * tests/input.at (Invalid $n): Adjust.
17712
17713 2002-06-17 Akim Demaille <akim@epita.fr>
17714
17715 * src/reader.h, src/reader.c (symbol_list_new): Export it.
17716 (symbol_list_prepend): New.
17717 * src/parse-gram.y (%union): `list' is a new member.
17718 (symbols.1): New, replaces...
17719 (terms_to_prec.1, nterms_to_type.1): these.
17720 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
17721 Take a location as additional argument.
17722 Adjust all callers.
17723
17724 2002-06-15 Akim Demaille <akim@epita.fr>
17725
17726 * src/parse-gram.y: Move %token in the declaration section so that
17727 we don't depend upon CVS Bison.
17728
17729 2002-06-15 Akim Demaille <akim@epita.fr>
17730
17731 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
17732 * src/print.c (print_core): Use it.
17733
17734 2002-06-15 Akim Demaille <akim@epita.fr>
17735
17736 * src/conflicts.c (log_resolution): Accept the rule involved in
17737 the sr conflicts instead of the lookahead number that points to
17738 that rule.
17739 (flush_reduce): Accept the current lookahead vector as argument,
17740 instead of the index in LA.
17741 (resolve_sr_conflict): Accept the current number of lookahead
17742 bitset to consider for the STATE, instead of the index in LA.
17743 (set_conflicts): Adjust.
17744 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
17745
17746 2002-06-15 Akim Demaille <akim@epita.fr>
17747
17748 * src/state.h (state_t): Replace the `lookaheadsp' member, a
17749 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
17750 Adjust all dependencies.
17751 * src/lalr.c (initialize_lookaheads): Split into...
17752 (states_lookaheads_count, states_lookaheads_initialize): these.
17753 (lalr): Adjust.
17754
17755 2002-06-15 Akim Demaille <akim@epita.fr>
17756
17757 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
17758 out of...
17759 (grammar_rules_print): here.
17760 * src/reduce.c (reduce_output): Use it.
17761 * tests/reduce.at (Useless Rules, Reduced Automaton)
17762 (Underivable Rules): Adjust.
17763
17764 2002-06-15 Akim Demaille <akim@epita.fr>
17765
17766 Copy BYacc's nice way to report the grammar.
17767
17768 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
17769 New.
17770 Don't print the rules' location, it is confusing and useless.
17771 (rule_print): Use grammar_rhs_print.
17772 * src/print.c (print_grammar): Use grammar_rules_print.
17773
17774 2002-06-15 Akim Demaille <akim@epita.fr>
17775
17776 Complete and rationalize `useless thing' warnings.
17777
17778 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
17779 (symbol_tag_print): New.
17780 Use them everywhere in place of accessing directly the tag member.
17781 * src/gram.h, src/gram.c (rule_print): New.
17782 Use it where a rule used to be printed `by hand'.
17783 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
17784 (reduce_grammar_tables): Report the useless rules.
17785 (reduce_print): Useless things are a warning, not an error.
17786 Report it as such.
17787 * tests/reduce.at (Useless Nonterminals, Useless Rules):
17788 (Reduced Automaton, Underivable Rules): Adjust.
17789 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
17790 * tests/conflicts.at (Unresolved SR Conflicts)
17791 (Solved SR Conflicts): Adjust.
17792
17793 2002-06-15 Akim Demaille <akim@epita.fr>
17794
17795 Let symbols have a location.
17796
17797 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
17798 (getsym): Adjust.
17799 Adjust all callers.
17800 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
17801 Use location_t, not int.
17802 * src/symtab.c (symbol_check_defined): Take advantage of the
17803 location.
17804 * tests/regression.at (Invalid inputs): Adjust.
17805
17806 2002-06-15 Akim Demaille <akim@epita.fr>
17807
17808 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
17809 (input): Don't try to initialize yylloc here, do it in the
17810 scanner.
17811 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
17812 * src/gram.h (rule_t): Change line and action_line into location
17813 and action_location, of location_t type.
17814 Adjust all dependencies.
17815 * src/location.h, src/location.c (empty_location): New.
17816 * src/reader.h, src/reader.c (grammar_start_symbol_set)
17817 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
17818 (grammar_current_rule_symbol_append)
17819 (grammar_current_rule_action_append): Expect a location as argument.
17820 * src/reader.c (grammar_midrule_action): Adjust to attach an
17821 action's location as dummy symbol location.
17822 * src/symtab.h, src/symtab.c (startsymbol_location): New.
17823 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
17824 the line numbers.
17825
17826 2002-06-14 Akim Demaille <akim@epita.fr>
17827
17828 Grammar declarations may be found in the grammar section.
17829
17830 * src/parse-gram.y (rules_or_grammar_declaration): New.
17831 (declarations): Each declaration may end with a semicolon, not
17832 just...
17833 (grammar_declaration): `"%union"'.
17834 (grammar): Branch to rules_or_grammar_declaration.
17835
17836 2002-06-14 Akim Demaille <akim@epita.fr>
17837
17838 * src/main.c (main): Invoke scanner_free.
17839
17840 2002-06-14 Akim Demaille <akim@epita.fr>
17841
17842 * src/output.c (m4_invoke): Extracted from...
17843 (output_skeleton): here.
17844 Free tempfile.
17845
17846 2002-06-14 Akim Demaille <akim@epita.fr>
17847
17848 * src/parse-gram.y (directives, directive, gram)
17849 (grammar_directives, precedence_directives, precedence_directive):
17850 Rename as...
17851 (declarations, declaration, grammar, grammar_declaration)
17852 (precedence_declaration, precedence_declarator): these.
17853 (symbol_declaration): New.
17854
17855 2002-06-14 Akim Demaille <akim@epita.fr>
17856
17857 * src/files.c (action_obstack): Remove, unused.
17858 (output_obstack): Remove it, and all its dependencies, as it is no
17859 longer needed.
17860 * src/reader.c (epilogue_set): Build the epilogue in the
17861 muscle_obstack.
17862 * src/output.h, src/output.c (muscle_obstack): Move to...
17863 * src/muscle_tab.h, src/muscle_tab.h: here.
17864 (muscle_init): Initialize muscle_obstack.
17865 (muscle_free): New.
17866 * src/main.c (main): Call it.
17867
17868 2002-06-14 Akim Demaille <akim@epita.fr>
17869
17870 * src/location.h: New, extracted from...
17871 * src/reader.h: here.
17872 * src/Makefile.am (noinst_HEADERS): Merge into
17873 (bison_SOURCES): this.
17874 Add location.h.
17875 * src/parse-gram.y: Use location_t instead of Bison's.
17876 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
17877 Use location_t instead of ints.
17878
17879 2002-06-14 Akim Demaille <akim@epita.fr>
17880
17881 * data/bison.simple, data/bison.c++: Be sure to restore the
17882 current #line when returning to the skeleton contents after having
17883 exposed the input file's #line.
17884
17885 2002-06-12 Akim Demaille <akim@epita.fr>
17886
17887 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
17888 eager.
17889 * tests/actions.at (Exotic Dollars): New.
17890
17891 2002-06-12 Akim Demaille <akim@epita.fr>
17892
17893 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
17894 ['"/] too eagerly.
17895 * tests/input.at (Torturing the Scanner): New.
17896
17897 2002-06-11 Akim Demaille <akim@epita.fr>
17898
17899 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
17900 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
17901 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
17902 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
17903 * src/reader.c (reader): Use it.
17904
17905 2002-06-11 Akim Demaille <akim@epita.fr>
17906
17907 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
17908 Adjust all callers.
17909 (scanner_last_string_free): New.
17910
17911 2002-06-11 Akim Demaille <akim@epita.fr>
17912
17913 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
17914 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
17915 (last_string, YY_OBS_FREE): New.
17916 Use them when returning an ID.
17917
17918 2002-06-11 Akim Demaille <akim@epita.fr>
17919
17920 Have Bison grammars parsed by a Bison grammar.
17921
17922 * src/reader.c, src/reader.h (prologue_augment): New.
17923 * src/reader.c (copy_definition): Remove.
17924
17925 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
17926 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
17927 (grammar_current_rule_prec_set, grammar_current_rule_check)
17928 (grammar_current_rule_symbol_append)
17929 (grammar_current_rule_action_append): Export.
17930 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
17931 (symbol_list_action_append): Remove.
17932 Hook the routines from reader.
17933 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
17934 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
17935
17936 * src/reader.c (read_declarations): Remove, unused.
17937
17938 * src/parse-gram.y: Handle the epilogue.
17939 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
17940 (grammar_start_symbol_set): this.
17941 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
17942 * src/reader.c (readgram): Remove, unused.
17943 (reader): Adjust to insert eoftoken and axiom where appropriate.
17944
17945 * src/reader.c (copy_dollar): Replace with...
17946 * src/scan-gram.h (handle_dollar): this.
17947 * src/parse-gram.y: Remove `%thong'.
17948
17949 * src/reader.c (copy_at): Replace with...
17950 * src/scan-gram.h (handle_at): this.
17951
17952 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
17953 New.
17954
17955 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
17956 time being.
17957
17958 * src/reader.h, src/reader.c (grammar_rule_end): New.
17959
17960 * src/parse.y (current_type, current_class): New.
17961 Implement `%nterm', `%token' support.
17962 Merge `%term' into `%token'.
17963 (string_as_id): New.
17964 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
17965 type name.
17966
17967 * src/parse-gram.y: Be sure to handle properly the beginning of
17968 rules.
17969
17970 * src/parse-gram.y: Handle %type.
17971 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
17972
17973 * src/parse-gram.y: More directives support.
17974 * src/options.c: No longer handle source directives.
17975
17976 * src/parse-gram.y: Fix %output.
17977
17978 * src/parse-gram.y: Handle %union.
17979 Use the prologue locations.
17980 * src/reader.c (parse_union_decl): Remove.
17981
17982 * src/reader.h, src/reader.c (epilogue_set): New.
17983 * src/parse-gram.y: Use it.
17984
17985 * data/bison.simple, data/bison.c++: b4_stype is now either not
17986 defined, then default to int, or to the contents of %union,
17987 without `union' itself.
17988 Adjust.
17989 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
17990
17991 * src/output.c (actions_output): Don't output braces, as they are
17992 already handled by the scanner.
17993
17994 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
17995 characters to themselves.
17996
17997 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
17998 that the epilogue has a proper #line.
17999
18000 * src/parse-gram.y: Handle precedence/associativity.
18001
18002 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
18003 a terminal.
18004 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
18005 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
18006 at all to define terminals that cannot be emitted.
18007
18008 * src/scan-gram.l: Escape M4 characters.
18009
18010 * src/scan-gram.l: Working properly with escapes in user
18011 strings/characters.
18012
18013 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
18014 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
18015 grammar.
18016 Use more modest sizes, as for the time being the parser does not
18017 release memory, and therefore the process swallows a huge amount
18018 of memory.
18019
18020 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
18021 stricter %token grammar.
18022
18023 * src/symtab.h (associativity): Add `undef_assoc'.
18024 (symbol_precedence_set): Do nothing when passed an undef_assoc.
18025 * src/symtab.c (symbol_check_alias_consistence): Adjust.
18026
18027 * tests/regression.at (Invalid %directive): Remove, as it is now
18028 meaningless.
18029 (Invalid inputs): Adjust to the new error messages.
18030 (Token definitions): The new grammar doesn't allow too many
18031 eccentricities.
18032
18033 * src/lex.h, src/lex.c: Remove.
18034 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
18035 (copy_character, copy_string2, copy_string, copy_identifier)
18036 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
18037 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
18038 (parse_action): Remove.
18039 * po/POTFILES.in: Adjust.
18040
18041 2002-06-11 Akim Demaille <akim@epita.fr>
18042
18043 * src/reader.c (parse_action): Don't store directly into the
18044 rule's action member: return the action as a string.
18045 Don't require `rule_length' as an argument: compute it.
18046 (grammar_current_rule_symbol_append)
18047 (grammar_current_rule_action_append): New, eved out from
18048 (readgram): here.
18049 Remove `action_flag', `rulelength', unused now.
18050
18051 2002-06-11 Akim Demaille <akim@epita.fr>
18052
18053 * src/reader.c (grammar_current_rule_prec_set).
18054 (grammar_current_rule_check): New, eved out from...
18055 (readgram): here.
18056 Remove `xaction', `first_rhs': useless.
18057 * tests/input.at (Type clashes): New.
18058 * tests/existing.at (GNU Cim Grammar): Adjust.
18059
18060 2002-06-11 Akim Demaille <akim@epita.fr>
18061
18062 * src/reader.c (grammar_midrule_action): New, Eved out from
18063 (readgram): here.
18064
18065 2002-06-11 Akim Demaille <akim@epita.fr>
18066
18067 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
18068 New.
18069 (readgram): Use them as replacement of inlined code, crule and
18070 crule1.
18071
18072 2002-06-11 Akim Demaille <akim@epita.fr>
18073
18074 * src/reader.c (grammar_end, grammar_symbol_append): New.
18075 (readgram): Use them.
18076 Make the use of `p' as local as possible.
18077
18078 2002-06-10 Akim Demaille <akim@epita.fr>
18079
18080 GCJ's parser requires the tokens to be defined before the prologue.
18081
18082 * data/bison.simple: Output the token definition before the user's
18083 prologue.
18084 * tests/regression.at (Braces parsing, Duplicate string)
18085 (Mixing %token styles): Check the output from bison.
18086 (Early token definitions): New.
18087
18088 2002-06-10 Akim Demaille <akim@epita.fr>
18089
18090 * src/symtab.c (symbol_user_token_number_set): Don't complain when
18091 assigning twice the same user number to a token, so that we can
18092 use it in...
18093 * src/lex.c (lex): here.
18094 Also use `symbol_class_set' instead of hand written code.
18095 * src/reader.c (parse_assoc_decl): Likewise.
18096
18097 2002-06-10 Akim Demaille <akim@epita.fr>
18098
18099 * src/symtab.c, src/symtab.c (symbol_class_set)
18100 (symbol_user_token_number_set): New.
18101 * src/reader.c (parse_token_decl): Use them.
18102 Use a switch instead of ifs.
18103 Use a single argument.
18104
18105 2002-06-10 Akim Demaille <akim@epita.fr>
18106
18107 Remove `%thong' support as it is undocumented, unused, duplicates
18108 `%token's job, and creates useless e-mail traffic with people who
18109 want to know what it is, why it is undocumented, unused, and
18110 duplicates `%token's job.
18111
18112 * src/reader.c (parse_thong_decl): Remove.
18113 * src/options.c (option_table): Remove "thong".
18114 * src/lex.h (tok_thong): Remove.
18115
18116 2002-06-10 Akim Demaille <akim@epita.fr>
18117
18118 * src/symtab.c, src/symtab.c (symbol_type_set)
18119 (symbol_precedence_set): New.
18120 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
18121 (value_components_used): Remove, unused.
18122
18123 2002-06-09 Akim Demaille <akim@epita.fr>
18124
18125 Move symbols handling code out of the reader.
18126
18127 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
18128 (axiom): Move to...
18129 * src/symtab.h, src/symtab.c: here.
18130
18131 * src/gram.c (start_symbol): Remove: use startsymbol->number.
18132 * src/reader.c (startval): Rename as...
18133 * src/symtab.h, src/symtab.c (startsymbol): this.
18134 * src/reader.c: Adjust.
18135
18136 * src/reader.c (symbol_check_defined, symbol_make_alias)
18137 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
18138 (token_translations_init)
18139 Move to...
18140 * src/symtab.c: here.
18141 * src/reader.c (packsymbols): Move to...
18142 * src/symtab.h, src/symtab.c (symbols_pack): here.
18143 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
18144 argument.
18145
18146 2002-06-03 Akim Demaille <akim@epita.fr>
18147
18148 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
18149 then statements.
18150
18151 2002-06-03 Akim Demaille <akim@epita.fr>
18152
18153 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
18154 structs with non literals.
18155 * src/scan-skel.l: never-interactive.
18156 * src/conflicts.c (enum conflict_resolution_e): No trailing
18157 comma.
18158 * src/getargs.c (usage): Split long literal strings.
18159 Reported by Hans Aberg.
18160
18161 2002-05-28 Akim Demaille <akim@epita.fr>
18162
18163 * data/bison.c++: Use C++ ostreams.
18164 (cdebug_): New member.
18165
18166 2002-05-28 Akim Demaille <akim@epita.fr>
18167
18168 * src/output.c (output_skeleton): Be sure to allocate enough room
18169 for `/' _and_ for `\0' in full_skeleton.
18170
18171 2002-05-28 Akim Demaille <akim@epita.fr>
18172
18173 * data/bison.c++: Catch up with bison.simple:
18174 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18175 and Paul Eggert <eggert@twinsun.com>: `error' handing.
18176 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
18177 and popping traces.
18178
18179 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18180
18181 * src/output.c (output_skeleton): Put an explicit path in front of
18182 the skeleton file name, rather than relying on the -I directory,
18183 to partially alleviate effects of having a skeleton file lying around
18184 in the current directory.
18185
18186 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18187
18188 * src/conflicts.c (log_resolution): Correct typo:
18189 obstack_printf should be obstack_fgrow1.
18190
18191 2002-05-26 Akim Demaille <akim@epita.fr>
18192
18193 * src/state.h (state_t): `solved_conflicts' is a new member.
18194 * src/LR0.c (new_state): Set it to 0.
18195 * src/conflicts.h, src/conflicts.c (print_conflicts)
18196 (free_conflicts, solve_conflicts): Rename as...
18197 (conflicts_print, conflicts_free, conflicts_solve): these.
18198 Adjust callers.
18199 * src/conflicts.c (enum conflict_resolution_e)
18200 (solved_conflicts_obstack): New, used by...
18201 (log_resolution): this.
18202 Adjust to attach the conflict resolution to each state.
18203 Complete the description with the precedence/associativity
18204 information.
18205 (resolve_sr_conflict): Adjust.
18206 * src/print.c (print_state): Output its solved_conflicts.
18207 * tests/conflicts.at (Unresolved SR Conflicts)
18208 (Solved SR Conflicts): Exercise --report=all.
18209
18210 2002-05-26 Akim Demaille <akim@epita.fr>
18211
18212 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
18213 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
18214 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
18215 (token_number_t, item_number_as_token_number)
18216 (token_number_as_item_number, muscle_insert_token_number_table):
18217 Rename as...
18218 (symbol_number_t, item_number_as_symbol_number)
18219 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
18220 these, since it is more appropriate.
18221
18222 2002-05-26 Akim Demaille <akim@epita.fr>
18223
18224 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
18225 `Error:' lines.
18226 * data/bison.simple (yystos) [YYDEBUG]: New.
18227 (yyparse) [YYDEBUG]: Display the symbols which are popped during
18228 error recovery.
18229 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
18230
18231 2002-05-25 Akim Demaille <akim@epita.fr>
18232
18233 * doc/bison.texinfo (Debugging): Split into...
18234 (Tracing): this new section, its former contents, and...
18235 (Understanding): this new section.
18236 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
18237 by...
18238 (report_flag): this.
18239 Adjust all dependencies.
18240 (report_args, report_types, report_argmatch): New.
18241 (usage, getargs): Report/support -r, --report.
18242 * src/options.h
18243 (struct option_table_struct): Rename as..,
18244 (struct option_table_s): this.
18245 Rename the `set_flag' member to `flag' to match with getopt_long's
18246 struct.
18247 * src/options.c (option_table): Split verbose into an entry for
18248 %verbose, and another for --verbose.
18249 Support --report/-r, so remove -r from the obsolete --raw.
18250 * src/print.c: Attach full item sets and lookaheads reports to
18251 report_flag instead of trace_flag.
18252 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
18253
18254 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18255 and Paul Eggert <eggert@twinsun.com>
18256
18257 * data/bison.simple (yyparse): Correct error handling to conform to
18258 POSIX and yacc. Specifically, after syntax error is discovered,
18259 do not reduce further before shifting the error token.
18260 Clean up the code a bit by removing the labels yyerrdefault,
18261 yyerrhandle, yyerrpop.
18262 * NEWS: Document the above.
18263
18264 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18265
18266 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
18267 type; it isn't always big enough, since it doesn't necessarily
18268 include non-terminals.
18269 (yytranslate): Expand definition of yy_token_number_type, so that
18270 the latter can be removed.
18271 (yy_token_number_type): Remove, only one use.
18272 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
18273 don't use TokenNumberType as element type.
18274
18275 * tests/regression.at: Modify expected output to agree with change
18276 to yyr1 and yytranslate.
18277
18278 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
18279
18280 * src/reader.c (parse_action): Use copy_character instead of
18281 obstack_1grow.
18282
18283 2002-05-13 Akim Demaille <akim@epita.fr>
18284
18285 * tests/regression.at (Token definitions): Prototype yylex and
18286 yyerror.
18287
18288 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18289
18290 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
18291 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
18292 32-bit arithmetic.
18293 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
18294
18295 2002-05-07 Akim Demaille <akim@epita.fr>
18296
18297 * tests/synclines.at: Be sure to prototype yylex and yyerror to
18298 avoid GCC warnings.
18299
18300 2002-05-07 Akim Demaille <akim@epita.fr>
18301
18302 Kill GCC warnings.
18303
18304 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
18305 over the RHS of each rule.
18306 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
18307 * src/state.h (state_t): Member `nitems' is unsigned short.
18308 * src/LR0.c (get_state): Adjust.
18309 * src/reader.c (packgram): Likewise.
18310 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
18311 `Type'.
18312 (muscle_insert_int_table): Remove, unused.
18313 (prepare_rules): Remove `max'.
18314
18315 2002-05-06 Akim Demaille <akim@epita.fr>
18316
18317 * src/closure.c (print_firsts): Display of the symbol tags.
18318 (bitmatrix_print): Move to...
18319 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
18320 here.
18321 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
18322
18323 2002-05-06 Akim Demaille <akim@epita.fr>
18324
18325 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
18326 hash_do_for_each.
18327
18328 2002-05-06 Akim Demaille <akim@epita.fr>
18329
18330 * src/LR0.c (new_state, get_state): Instead of using the global
18331 `kernel_size' and `kernel_base', have two new arguments:
18332 `core_size' and `core'.
18333 Adjust callers.
18334
18335 2002-05-06 Akim Demaille <akim@epita.fr>
18336
18337 * src/reader.c (packgram): No longer end `ritem' with a 0
18338 sentinel: it is not used.
18339
18340 2002-05-05 Akim Demaille <akim@epita.fr>
18341
18342 New experimental feature: display the lookaheads in the report and
18343 graph.
18344
18345 * src/print (print_core): When --trace-flag, display the rules
18346 lookaheads.
18347 * src/print_graph.c (print_core): Likewise.
18348 Swap the arguments.
18349 Adjust caller.
18350
18351 2002-05-05 Akim Demaille <akim@epita.fr>
18352
18353 * tests/torture.at (Many lookaheads): New test.
18354
18355 2002-05-05 Akim Demaille <akim@epita.fr>
18356
18357 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
18358 (GENERATE_MUSCLE_INSERT_TABLE): this.
18359 (output_int_table, output_unsigned_int_table, output_short_table)
18360 (output_token_number_table, output_item_number_table): Replace with...
18361 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
18362 (muscle_insert_short_table, muscle_insert_token_number_table)
18363 (muscle_insert_item_number_table): these.
18364 Adjust all callers.
18365 (prepare_tokens): Don't free `translations', since...
18366 * src/reader.h, src/reader.c (grammar_free): do it.
18367 Move to...
18368 * src/gram.h, src/gram.c (grammar_free): here.
18369 * data/bison.simple, data/bison.c++: b4_token_number_max is now
18370 b4_translate_max.
18371
18372 2002-05-05 Akim Demaille <akim@epita.fr>
18373
18374 * src/output.c (output_unsigned_int_table): New.
18375 (prepare_rules): `i' is unsigned.
18376 `prhs', `rline', `r2' are unsigned int.
18377 Rename muscle `rhs_number_max' as `rhs_max'.
18378 Output muscles `prhs_max', `rline_max', and `r2_max'.
18379 Free rline and r1.
18380 * data/bison.simple, data/bison.c++: Adjust to use these muscles
18381 to compute types instead of constant types.
18382 * tests/regression.at (Web2c Actions): Adjust.
18383
18384 2002-05-04 Akim Demaille <akim@epita.fr>
18385
18386 * src/symtab.h (SALIAS, SUNDEF): Rename as...
18387 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
18388 Adjust dependencies.
18389 * src/output.c (token_definitions_output): Be sure not to output a
18390 `#define 'a'' when fed with `%token 'a' "a"'.
18391 * tests/regression.at (Token definitions): New.
18392
18393 2002-05-03 Paul Eggert <eggert@twinsun.com>
18394
18395 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
18396 for K&R C.
18397
18398 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
18399
18400 * Makefile.am (SUBDIRS): Remove intl.
18401 (EXTRA_DIST): Add config/config.rpath.
18402
18403 2002-05-03 Akim Demaille <akim@epita.fr>
18404
18405 * data/bison.simple (m4_if): Don't output empty enums.
18406 And actually, output valid enum definitions :(.
18407
18408 2002-05-03 Akim Demaille <akim@epita.fr>
18409
18410 * configure.bat: Remove, completely obsolete.
18411 * Makefile.am (EXTRA_DIST): Adjust.
18412 Don't distribute config.rpath...
18413 * config/Makefile.am (EXTRA_DIST): Do it.
18414
18415 2002-05-03 Akim Demaille <akim@epita.fr>
18416
18417 * configure.in (GETTEXT_VERSION): New.
18418 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
18419
18420 2002-05-03 Akim Demaille <akim@epita.fr>
18421
18422 * data/bison.simple (b4_token_enum): New.
18423 (b4_token_defines): Use it to output tokens both as #define and
18424 enums.
18425 Suggested by Paul Eggert.
18426 * src/output.c (token_definitions_output): Don't output spurious
18427 white spaces.
18428
18429 2002-05-03 Akim Demaille <akim@epita.fr>
18430
18431 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
18432
18433 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
18434
18435 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
18436 Update the stack class, give a try to deque as the default container.
18437
18438 2002-05-02 Akim Demaille <akim@epita.fr>
18439
18440 * data/bison.simple (yyparse): Do not implement @$ = @1.
18441 (YYLLOC_DEFAULT): Adjust to do it.
18442 * doc/bison.texinfo (Location Default Action): Fix.
18443
18444 2002-05-02 Akim Demaille <akim@epita.fr>
18445
18446 * src/reader.c (parse_braces): Merge into...
18447 (parse_action): this.
18448
18449 2002-05-02 Akim Demaille <akim@epita.fr>
18450
18451 * configure.in (ALL_LINGUAS): Remove.
18452 * po/LINGUAS, hr.po: New.
18453
18454 2002-05-02 Akim Demaille <akim@epita.fr>
18455
18456 Remove the so called hairy (semantic) parsers.
18457
18458 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
18459 * src/gram.h, src/gram.c (semantic_parser): Remove.
18460 (rule_t): Remove the guard and guard_line members.
18461 * src/lex.h (token_t): remove tok_guard.
18462 * src/options.c (option_table): Remove %guard and %semantic_parser
18463 support.
18464 * src/output.c, src/output.h (guards_output): Remove.
18465 (prepare): Adjust.
18466 (token_definitions_output): Don't output the `T'
18467 tokens (???).
18468 (output_skeleton): Don't output the guards.
18469 * src/files.c, src/files.c (attrsfile): Remove.
18470 * src/reader.c (symbol_list): Remove the guard and guard_line
18471 members.
18472 Adjust dependencies.
18473 (parse_guard): Remove.
18474 * data/bison.hairy: Remove.
18475 * doc/bison.texinfo (Environment Variables): Remove occurrences of
18476 BISON_HAIRY.
18477
18478 2002-05-02 Akim Demaille <akim@epita.fr>
18479
18480 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
18481 (parse_guard): Rename the formal argument `stack_offset' as
18482 `rule_length', which is more readable.
18483 Adjust callers.
18484 (copy_at, copy_dollar): Instead of outputting the hard coded
18485 values of $$, $n and so forth, output invocation to b4_lhs_value,
18486 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
18487 Note: this patch partially drops `semantic-parser' support: it
18488 always does `rule_length - n', where semantic parsers ought to
18489 always use `-n'.
18490 * data/bison.simple, data/bison.c++ (b4_lhs_value)
18491 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
18492
18493 2002-05-02 Akim Demaille <akim@epita.fr>
18494
18495 * configure.in (AC_INIT): Bump to 1.49b.
18496 (AM_INIT_AUTOMAKE): Short invocation.
18497
18498 2002-05-02 Akim Demaille <akim@epita.fr>
18499
18500 Version 1.49a.
18501
18502 2002-05-01 Akim Demaille <akim@epita.fr>
18503
18504 * src/skeleton.h: Remove.
18505
18506 2002-05-01 Akim Demaille <akim@epita.fr>
18507
18508 * src/skeleton.h: Fix the #endif.
18509 Reported by Magnus Fromreide.
18510
18511 2002-04-26 Paul Eggert <eggert@twinsun.com>
18512
18513 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
18514 Define if we define YYSTYPE and YYLTYPE, respectively.
18515 (YYCOPY): Fix [] quoting problem in the non-GCC case.
18516
18517 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
18518
18519 * src/scan-skel.l: Postprocess quadrigraphs.
18520
18521 * src/reader.c (copy_character): New function, used to output
18522 single characters while replacing `[' and `]' with quadrigraphs, to
18523 avoid troubles with M4 quotes.
18524 (copy_comment): Output characters with copy_character.
18525 (read_additionnal_code): Likewise.
18526 (copy_string2): Likewise.
18527 (copy_definition): Likewise.
18528
18529 * tests/calc.at: Exercise M4 quoting.
18530
18531 2002-04-25 Akim Demaille <akim@epita.fr>
18532
18533 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
18534 between `!' and the command.
18535 Reported by Paul Eggert.
18536
18537 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
18538
18539 * tests/calc.at: Exercise prologue splitting.
18540
18541 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
18542 `b4_post_prologue' instead of `b4_prologue'.
18543
18544 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
18545 muscles.
18546 (output): Free pre_prologue_obstack and post_prologue_obstack.
18547 * src/files.h, src/files.c (attrs_obstack): Remove.
18548 (pre_prologue_obstack, post_prologue_obstack): New.
18549 * src/reader.c (copy_definition): Add a parameter to specify the
18550 obstack to fill, instead of using attrs_obstack unconditionally.
18551 (read_declarations): Pass pre_prologue_obstack to copy_definition if
18552 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
18553
18554 2002-04-23 Paul Eggert <eggert@twinsun.com>
18555
18556 * data/bison.simple: Remove unnecessary commentary and white
18557 space differences from 1_29-branch.
18558 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
18559
18560 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
18561 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
18562 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
18563 constructors or destructors.
18564
18565 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
18566
18567 2002-04-23 Akim Demaille <akim@epita.fr>
18568
18569 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
18570 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
18571 location with columns.
18572 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
18573 All reported by Paul Eggert.
18574
18575 2002-04-22 Akim Demaille <akim@epita.fr>
18576
18577 * src/reduce.c (dump_grammar): Move to...
18578 * src/gram.h, src/gram.c (grammar_dump): here.
18579 Be sure to separate long item numbers.
18580 Don't read the members of a rule's prec if its nil.
18581
18582 2002-04-22 Akim Demaille <akim@epita.fr>
18583
18584 * src/output.c (table_size, table_grow): New.
18585 (MAXTABLE): Remove, replace uses with table_size.
18586 (pack_vector): Instead of dying when the table is too big, grow it.
18587
18588 2002-04-22 Akim Demaille <akim@epita.fr>
18589
18590 * data/bison.simple (yyr1): Its type is that of a token number.
18591 * data/bison.c++ (r1_): Likewise.
18592 * tests/regression.at (Web2c Actions): Adjust.
18593
18594 2002-04-22 Akim Demaille <akim@epita.fr>
18595
18596 * src/reader.c (token_translations_init): 256 is now the default
18597 value for the error token, i.e., it will be assigned another
18598 number if the user assigned 256 to one of her tokens.
18599 (reader): Don't force 256 to error.
18600 * doc/bison.texinfo (Symbols): Adjust.
18601 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
18602 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
18603 etc. instead of 10, 20, 30 (which was used to `jump' over error
18604 (256) and undefined (2)).
18605
18606 2002-04-22 Akim Demaille <akim@epita.fr>
18607
18608 Propagate more token_number_t.
18609
18610 * src/gram.h (token_number_as_item_number)
18611 (item_number_as_token_number): New.
18612 * src/output.c (GENERATE_OUTPUT_TABLE): New.
18613 Use it to create output_item_number_table and
18614 output_token_number_table.
18615 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
18616 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
18617 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
18618 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
18619
18620 2002-04-22 Akim Demaille <akim@epita.fr>
18621
18622 * src/output.h, src/output.c (get_lines_number): Remove.
18623
18624 2002-04-19 Akim Demaille <akim@epita.fr>
18625
18626 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
18627 as Lex/Flex'.
18628 (Debugging): More details about enabling the debugging features.
18629 (Table of Symbols): Describe $$, $n, @$, and @n.
18630 Suggested by Tim Josling.
18631
18632 2002-04-19 Akim Demaille <akim@epita.fr>
18633
18634 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
18635
18636 2002-04-10 Akim Demaille <akim@epita.fr>
18637
18638 * src/system.h: Rely on HAVE_LIMITS_H.
18639 Suggested by Paul Eggert.
18640
18641 2002-04-09 Akim Demaille <akim@epita.fr>
18642
18643 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
18644 full stderr, and strip it according to the bison options, instead
18645 of composing the error message from different bits.
18646 This makes it easier to check for several error messages.
18647 Adjust all the invocations.
18648 Add an invocation exercising the error token.
18649 Add an invocation demonstrating a stupid error message.
18650 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
18651 Adjust the tests.
18652 Error message are for stderr, not stdout.
18653
18654 2002-04-09 Akim Demaille <akim@epita.fr>
18655
18656 * src/gram.h, src/gram.c (error_token_number): Remove, use
18657 errtoken->number.
18658 * src/reader.c (reader): Don't specify the user token number (2)
18659 for $undefined, as it uselessly prevents using it.
18660 * src/gram.h (token_number_t): Move to...
18661 * src/symtab.h: here.
18662 (state_t.number): Is a token_number_t.
18663 * src/print.c, src/reader.c: Use undeftoken->number instead of
18664 hard coded 2.
18665 (Even though this 2 is not the same as above: the number of the
18666 undeftoken remains being 2, it is its user token number which
18667 might not be 2).
18668 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
18669 `user_token_number_max'.
18670 Output `undef_token_number'.
18671 * data/bison.simple, data/bison.c++: Use them.
18672 Be sure to map invalid yylex return values to
18673 `undef_token_number'. This saves us from gratuitous SEGV.
18674
18675 * tests/conflicts.at (Solved SR Conflicts)
18676 (Unresolved SR Conflicts): Adjust.
18677 * tests/regression.at (Web2c Actions): Adjust.
18678
18679 2002-04-08 Akim Demaille <akim@epita.fr>
18680
18681 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
18682 Adding #line.
18683 Remove the duplicate `typedefs'.
18684 (RhsNumberType): Fix the declaration and various other typos.
18685 Use __ofile__.
18686 * data/bison.simple: Use __ofile__.
18687 * src/scan-skel.l: Handle __ofile__.
18688
18689 2002-04-08 Akim Demaille <akim@epita.fr>
18690
18691 * src/gram.h (item_number_t): New, the type of item numbers in
18692 RITEM. Note that it must be able to code symbol numbers as
18693 positive number, and the negation of rule numbers as negative
18694 numbers.
18695 Adjust all dependencies (pretty many).
18696 * src/reduce.c (rule): Remove this `short *' pointer: use
18697 item_number_t.
18698 * src/system.h (MINSHORT, MAXSHORT): Remove.
18699 Include `limits.h'.
18700 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
18701 (shortcpy): Remove.
18702 (MAXTABLE): Move to...
18703 * src/output.c (MAXTABLE): here.
18704 (prepare_rules): Use output_int_table to output rhs.
18705 * data/bison.simple, data/bison.c++: Adjust.
18706 * tests/torture.at (Big triangle): Move the limit from 254 to
18707 500.
18708 * tests/regression.at (Web2c Actions): Ajust.
18709
18710 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
18711 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
18712 passes, but produces negative #line number, once fixed, GCC is
18713 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
18714 C), it passes.
18715 * src/state.h (state_h): Code input lines on ints, not shorts.
18716
18717 2002-04-08 Akim Demaille <akim@epita.fr>
18718
18719 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
18720 and then the grammar.
18721
18722 2002-04-08 Akim Demaille <akim@epita.fr>
18723
18724 * src/system.h: No longer using strndup.
18725
18726 2002-04-07 Akim Demaille <akim@epita.fr>
18727
18728 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
18729 * src/output.c (output_table_data): Return the longest number.
18730 (prepare_tokens): Output `token_number_max').
18731 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
18732 New.
18733 Use them to define yy_token_number_type/TokenNumberType.
18734 Use this type for yytranslate.
18735 * tests/torture.at (Big triangle): Push the limit from 124 to
18736 253.
18737 * tests/regression.at (Web2c Actions): Adjust.
18738
18739 2002-04-07 Akim Demaille <akim@epita.fr>
18740
18741 * tests/torture.at (Big triangle): New.
18742 (GNU AWK Grammar, GNU Cim Grammar): Move to...
18743 * tests/existing.at: here.
18744
18745 2002-04-07 Akim Demaille <akim@epita.fr>
18746
18747 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
18748 nritems.
18749 Adjust dependencies.
18750
18751 2002-04-07 Akim Demaille <akim@epita.fr>
18752
18753 * src/reader.c: Normalize increments to prefix form.
18754
18755 2002-04-07 Akim Demaille <akim@epita.fr>
18756
18757 * src/reader.c, symtab.c: Remove debugging code.
18758
18759 2002-04-07 Akim Demaille <akim@epita.fr>
18760
18761 Rename all the `bucket's as `symbol_t'.
18762
18763 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
18764 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
18765 * src/symtab.c, src/symtab.h (bucket): Rename as...
18766 (symbol_t): this.
18767 (symbol_list_new, bucket_check_defined, bucket_make_alias)
18768 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
18769 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
18770 (buckets_new, buckets_free, buckets_do): Rename as...
18771 (symbol_list_new, symbol_check_defined, symbol_make_alias)
18772 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
18773 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
18774 (symbols_new, symbols_free, symbols_do): these.
18775
18776 2002-04-07 Akim Demaille <akim@epita.fr>
18777
18778 Use lib/hash for the symbol table.
18779
18780 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
18781 EOF.
18782 * src/lex.c (lex): Set the `number' member of new terminals.
18783 * src/reader.c (bucket_check_defined, bucket_make_alias)
18784 (bucket_check_alias_consistence, bucket_translation): New.
18785 (reader, grammar_free, readgram, token_translations_init)
18786 (packsymbols): Adjust.
18787 (reader): Number the predefined tokens.
18788 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
18789 for predefined tokens.
18790 * src/symtab.h (bucket): Remove all the hash table related
18791 members.
18792 * src/symtab.c (symtab): Replace by...
18793 (bucket_table): this.
18794 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
18795 (buckets_new, buckets_do): New.
18796
18797 2002-04-07 Akim Demaille <akim@epita.fr>
18798
18799 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
18800 (start_symbol, max_user_token_number, semantic_parser)
18801 (error_token_number): Initialize.
18802 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
18803 Initialize.
18804 (reader): Don't.
18805 (errtoken, eoftoken, undeftoken, axiom): Extern.
18806
18807 2002-04-07 Akim Demaille <akim@epita.fr>
18808
18809 * src/gram.h (rule_s): prec and precsym are now pointers
18810 to the bucket giving the priority/associativity.
18811 Member `associativity' removed: useless.
18812 * src/reduce.c, src/conflicts.c: Adjust.
18813
18814 2002-04-07 Akim Demaille <akim@epita.fr>
18815
18816 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
18817 Properly escape the symbols' TAG when outputting them.
18818
18819 2002-04-07 Akim Demaille <akim@epita.fr>
18820
18821 * src/lalr.h (LA): Is a bitsetv, not bitset*.
18822
18823 2002-04-07 Akim Demaille <akim@epita.fr>
18824
18825 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
18826 (LArule): this, which is an array to rule_t*.
18827 * src/print.c, src/conflicts.c: Adjust.
18828
18829 2002-04-07 Akim Demaille <akim@epita.fr>
18830
18831 * src/gram.h (rule_t): Rename `number' as `user_number'.
18832 `number' is a new member.
18833 Adjust dependencies.
18834 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
18835
18836 2002-04-07 Akim Demaille <akim@epita.fr>
18837
18838 As a result of the previous patch, it is no longer needed
18839 to reorder ritem itself.
18840
18841 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
18842
18843 2002-04-07 Akim Demaille <akim@epita.fr>
18844
18845 Be sure never to walk through RITEMS, but use only data related to
18846 the rules themselves. RITEMS should be banished.
18847
18848 * src/output.c (output_token_translations): Rename as...
18849 (prepare_tokens): this.
18850 In addition to `translate', prepare the muscles `tname' and
18851 `toknum', which were handled by...
18852 (output_rule_data): this.
18853 Remove, and move the remainder of its outputs into...
18854 (prepare_rules): this new routines, which also merges content from
18855 (output_gram): this.
18856 (prepare_rules): Be sure never to walk through RITEMS.
18857 (output_stos): Rename as...
18858 (prepare_stos): this.
18859 (output): Always invoke prepare_states, after all, just don't use it
18860 in the output if you don't need it.
18861
18862 2002-04-07 Akim Demaille <akim@epita.fr>
18863
18864 * src/LR0.c (new_state): Display `nstates' as the name of the
18865 newly created state.
18866 Adjust to initialize first_state and last_state if needed.
18867 Be sure to distinguish the initial from the final state.
18868 (new_states): Create the itemset of the initial state, and use
18869 new_state.
18870 * src/closure.c (closure): Now that the initial state has its
18871 items properly set, there is no need for a special case when
18872 creating `ruleset'.
18873
18874 As a result, now the rule 0, reducing to $axiom, is visible in the
18875 outputs. Adjust the test suite.
18876
18877 * tests/conflicts.at (Solved SR Conflicts)
18878 (Unresolved SR Conflicts): Adjust.
18879 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
18880 * tests/conflicts.at (S/R in initial): New.
18881
18882 2002-04-07 Akim Demaille <akim@epita.fr>
18883
18884 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
18885 the RHS of the rules.
18886 * src/output.c (output_gram): Likewise.
18887
18888 2002-04-07 Akim Demaille <akim@epita.fr>
18889
18890 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
18891 bucket.
18892 Adjust all dependencies.
18893 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
18894 `number' of the buckets too.
18895 * src/gram.h: Include `symtab.h'.
18896 (associativity): Move to...
18897 * src/symtab.h: here.
18898 No longer include `gram.h'.
18899
18900 2002-04-07 Akim Demaille <akim@epita.fr>
18901
18902 * src/gram.h, src/gram.c (rules_rhs_length): New.
18903 (ritem_longest_rhs): Use it.
18904 * src/gram.h (rule_t): `number' is a new member.
18905 * src/reader.c (packgram): Set it.
18906 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
18907 the end of `rules', and count them out of `nrules'.
18908 (reduce_output, dump_grammar): Adjust.
18909 * src/print.c (print_grammar): It is no longer needed to check for
18910 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
18911 * tests/reduce.at (Reduced Automaton): New test.
18912
18913 2002-04-07 Akim Demaille <akim@epita.fr>
18914
18915 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
18916 lacking `+ 1' to nrules, Bison reported as useless a token if it
18917 was used solely to set the precedence of the last rule...
18918
18919 2002-04-07 Akim Demaille <akim@epita.fr>
18920
18921 * data/bison.c++, data/bison.simple: Don't output the current file
18922 name in #line, to avoid useless diffs between two identical
18923 outputs under different names.
18924
18925 2002-04-07 Akim Demaille <akim@epita.fr>
18926
18927 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
18928 Normalize loops to using `< nrules + 1', not `<= nrules'.
18929
18930 2002-04-07 Akim Demaille <akim@epita.fr>
18931
18932 * TODO: Update.
18933
18934 2002-04-07 Akim Demaille <akim@epita.fr>
18935
18936 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
18937 bucket.value as bucket.number.
18938
18939 2002-04-07 Akim Demaille <akim@epita.fr>
18940
18941 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
18942 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
18943 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
18944 RHS, instead of being an index in RITEMS.
18945
18946 2002-04-04 Paul Eggert <eggert@twinsun.com>
18947
18948 * doc/bison.texinfo: Update copyright date.
18949 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
18950 (Symbols): Warn about running Bison in one character set,
18951 but compiling and/or running in an incompatible one.
18952 Warn about character code 256, too.
18953
18954 2002-04-03 Paul Eggert <eggert@twinsun.com>
18955
18956 * src/bison.data (YYSTACK_ALLOC): Depend on whether
18957 YYERROR_VERBOSE is nonzero, not whether it is defined.
18958
18959 Merge changes from bison-1_29-branch.
18960
18961 2002-03-20 Paul Eggert <eggert@twinsun.com>
18962
18963 Merge fixes from Debian bison_1.34-1.diff.
18964
18965 * configure.in (AC_PREREQ): 2.53.
18966
18967 2002-03-20 Akim Demaille <akim@epita.fr>
18968
18969 * src/conflicts.c (log_resolution): Argument `resolution' is const.
18970
18971 2002-03-19 Paul Eggert <eggert@twinsun.com>
18972
18973 * src/bison.simple (YYCOPY): New macro.
18974 (YYSTACK_RELOCATE): Use it.
18975 Remove Type arg; no longer needed. All callers changed.
18976 (yymemcpy): Remove; no longer needed.
18977
18978 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
18979 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
18980
18981 2002-03-19 Akim Demaille <akim@epita.fr>
18982
18983 Test and fix the #line outputs.
18984
18985 * tests/atlocal.at (GCC): New.
18986 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
18987 (Prologue synch line, %union synch line, Postprologue synch line)
18988 (Action synch line, Epilogue synch line): New tests.
18989 * src/reader.c (parse_union_decl): Define the muscle stype_line.
18990 * data/bison.simple, data/bison.c++: Use it.
18991
18992 2002-03-19 Akim Demaille <akim@epita.fr>
18993
18994 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
18995 (Solved SR Conflicts, %expect not enough, %expect right)
18996 (%expect too much): Move to...
18997 * tests/conflicts.at: this new file.
18998
18999 2002-03-19 Akim Demaille <akim@epita.fr>
19000
19001 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
19002 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
19003 that we can move to enums for instance.
19004 * src/output.c (token_definitions_output): Output a list of
19005 `token-name, token-number' instead of the #define.
19006 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
19007
19008 2002-03-14 Akim Demaille <akim@epita.fr>
19009
19010 Use Gettext 0.11.1.
19011
19012 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
19013
19014 * data/bison.c++: Make the user able to add members to the generated
19015 parser by subclassing.
19016
19017 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
19018
19019 * src/reader.c (read_additionnal_code): `c' should be an integer, not
19020 a character.
19021 Reported by Nicolas Tisserand and Nicolas Burrus.
19022
19023 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
19024
19025 * src/reader.c: Warn about lacking semi-colons, do not complain.
19026
19027 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
19028
19029 * data/bison.c++: Remove a debug line.
19030
19031 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
19032
19033 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
19034 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
19035 provide a default implementation.
19036
19037 2002-03-04 Akim Demaille <akim@epita.fr>
19038
19039 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
19040 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
19041 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
19042 * tests/semantic.at (Parsing Guards): Similarly.
19043 * src/reader.at (readgram): Complain if the last rule is not ended
19044 with a semi-colon.
19045
19046 2002-03-04 Akim Demaille <akim@epita.fr>
19047
19048 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
19049 * src/closure.c: here.
19050 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
19051 RTC.
19052 * src/warshall.h, src/warshall.c: Remove.
19053 * tests/sets.at (Broken Closure): Adjust.
19054
19055 2002-03-04 Akim Demaille <akim@epita.fr>
19056
19057 * src/output.c (output_skeleton): tempdir is const.
19058 bytes_read is unused.
19059
19060 2002-03-04 Akim Demaille <akim@epita.fr>
19061
19062 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
19063 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
19064 Update.
19065 From Michael Hayes.
19066
19067 2002-03-04 Akim Demaille <akim@epita.fr>
19068
19069 * src/closure.c (closure): `r' is unused.
19070
19071 2002-03-04 Akim Demaille <akim@epita.fr>
19072
19073 * tests/sets.at (Broken Closure): Add the ending `;'.
19074 * src/reader.at (readgram): Complain if a rule is not ended with a
19075 semi-colon.
19076
19077 2002-03-04 Akim Demaille <akim@epita.fr>
19078
19079 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
19080 (count_sr_conflicts): Use bitset_count.
19081 * src/reduce.c (inaccessable_symbols): Ditto.
19082 (bits_size): Remove.
19083 * src/warshall.h, src/warshall.c: Convert to bitsetv.
19084
19085 2002-03-04 Akim Demaille <akim@epita.fr>
19086
19087 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
19088 * src/reduce.c: Remove the `bitset_zero's following the
19089 `bitset_create's, as now it is performed by the latter.
19090
19091 2002-03-04 Akim Demaille <akim@epita.fr>
19092
19093 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
19094 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
19095 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
19096 latest sources from Michael.
19097
19098 2002-03-04 Akim Demaille <akim@epita.fr>
19099
19100 * src/output.c (output): Don't free the grammar.
19101 * src/reader.c (grammar_free): New.
19102 * src/main.c (main): Call it and don't free symtab here.
19103
19104 2002-03-04 Akim Demaille <akim@epita.fr>
19105
19106 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
19107 before returning.
19108 Reported by Benoit Perrot.
19109
19110 2002-03-04 Akim Demaille <akim@epita.fr>
19111
19112 Use bitset operations when possible, not loops over bits.
19113
19114 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
19115 bitset_or.
19116 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
19117 * src/reduce.c (useless_nonterminals): Formatting changes.
19118 * src/warshall.c (TC): Use bitset_or.
19119
19120 2002-03-04 Akim Demaille <akim@epita.fr>
19121
19122 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
19123 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
19124 Ditto.
19125
19126 2002-03-04 Akim Demaille <akim@epita.fr>
19127
19128 * src/lalr.c (F): Now a bitset*.
19129 Adjust all dependencies.
19130
19131 2002-03-04 Akim Demaille <akim@epita.fr>
19132
19133 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
19134 Adjust all dependencies.
19135
19136 2002-03-04 Akim Demaille <akim@epita.fr>
19137
19138 * src/L0.c, src/LR0.h (nstates): Be size_t.
19139 Adjust comparisons (signed vs unsigned).
19140 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
19141 bitset*.
19142 Adjust all dependencies.
19143
19144 2002-03-04 Akim Demaille <akim@epita.fr>
19145
19146 * src/closure.c (firsts): Now, also a bitset.
19147 Adjust all dependencies.
19148 (varsetsize): Remove, now unused.
19149 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
19150
19151 2002-03-04 Akim Demaille <akim@epita.fr>
19152
19153 * src/print.c: Convert to use bitset.h, not hand coded iterations
19154 over ints.
19155
19156 2002-03-04 Akim Demaille <akim@epita.fr>
19157
19158 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
19159
19160 2002-03-04 Akim Demaille <akim@epita.fr>
19161
19162 * src/closure.c (ruleset): Be a bitset.
19163 (rulesetsize): Remove.
19164
19165 2002-03-04 Akim Demaille <akim@epita.fr>
19166
19167 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
19168 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
19169 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
19170 * src/closure.c (fderives): Be an array of bitsets.
19171
19172 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
19173
19174 * data/bison.c++: Merge the two generated headers. Insert a copyright
19175 notice in each output file.
19176
19177 2002-02-28 Akim Demaille <akim@epita.fr>
19178
19179 * data/bison.c++: Copy the prologue of bison.simple to fetch
19180 useful M4 definitions, such as b4_header_guard.
19181
19182 2002-02-25 Akim Demaille <akim@epita.fr>
19183
19184 * src/getargs.c (version): Give the name of the authors, and use a
19185 translator friendly scheme for the bgr
19186 copyright notice.
19187
19188 2002-02-25 Akim Demaille <akim@epita.fr>
19189
19190 * src/output.c (header_output): Remove, now handled completely via
19191 M4.
19192
19193 2002-02-25 Akim Demaille <akim@epita.fr>
19194
19195 * m4/m4.m4: New, from CVS Autoconf.
19196 * configure.in: Invoke it.
19197 * src/output.c (output_skeleton): Use its result instead of the
19198 hard coded name.
19199
19200 2002-02-25 Akim Demaille <akim@epita.fr>
19201
19202 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
19203 Fileutils 4.1.5.
19204 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
19205 * src/output.c (output_skeleton): Use mkstemp to create a real
19206 temporary file.
19207 Move the filling of `skeleton' and its muscle to...
19208 (prepare): here.
19209 (output): Move the definition of the prologue muscle to...
19210 (prepare): here.
19211 * src/system.h (DEFAULT_TMPDIR): New.
19212
19213 2002-02-14 Paul Eggert <eggert@twinsun.com>
19214
19215 Remove the support for C++ namespace cleanliness; it was
19216 causing more problems than it was curing, since it didn't work
19217 properly on some nonstandard C++ compilers. This can wait
19218 for a proper C++ parser.
19219
19220 * NEWS: Document this.
19221 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
19222 of C++, as it's treated like C now.
19223 * src/bison.simple (YYSTD): Remove.
19224 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
19225 Treat C++ just like Standard C instead of trying to support
19226 namespace cleanliness.
19227
19228 2002-02-14 Akim Demaille <akim@epita.fr>
19229
19230 * tests/regression.at (else): Adjust to Andreas' change.
19231
19232 2002-02-14 Akim Demaille <akim@epita.fr>
19233
19234 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
19235
19236 2002-02-13 Andreas Schwab <schwab@suse.de>
19237
19238 * src/output.c (output_rule_data): Don't output NULL, it might
19239 not be defined yet.
19240
19241 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
19242
19243 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
19244 (Copyright notice): Update.
19245
19246 2002-02-11 Akim Demaille <akim@epita.fr>
19247
19248 * tests/regression.at (%nonassoc and eof): Don't include
19249 nonportable headers.
19250
19251 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
19252
19253 * data/bison.c++: Correct error recovery. Make the user able to
19254 initialize the starting location.
19255
19256 2002-02-07 Akim Demaille <akim@epita.fr>
19257
19258 * tests/input.at: New.
19259
19260 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
19261
19262 * data/bison.c++: Replace some direct m4 expansions by constants. Be
19263 more consistent when naming methods and variables. Put preprocessor
19264 directives around tables only needed for debugging.
19265
19266 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
19267
19268 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
19269 C++ parsers.
19270 (yy::b4_name::parse): Use print_.
19271
19272 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
19273
19274 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
19275
19276 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
19277
19278 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
19279 C++ parsers.
19280 (yy::b4_name::parse): Build verbose error messages, and use error_.
19281
19282 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
19283
19284 * data/bison.c++: Fix m4 quoting in comments.
19285
19286 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
19287
19288 * data/bison.c++: Adjust the parser code. Fix some muscles that were
19289 not expanded by m4.
19290
19291 2002-02-05 Akim Demaille <akim@epita.fr>
19292
19293 * data/bison.c++: Adjust to the M4 back end.
19294 More is certainly needed.
19295
19296 2002-02-05 Akim Demaille <akim@epita.fr>
19297
19298 Give a try to M4 as a back end.
19299
19300 * lib/readpipe.c: New, from wdiff.
19301 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
19302 BISON_HAIRY.
19303 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
19304 specific values. Now it is m4 that performs the lookup.
19305 * src/parse-skel.y: Remove.
19306 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
19307 * src/output.c (actions_output, guards_output)
19308 (token_definitions_output): No longer keeps track of the output
19309 line number, hence remove the second argument.
19310 (guards_output): Check against the guard member of a rule, not the
19311 action member.
19312 Adjust callers.
19313 (output_skeleton): Don't look for the skeleton location, let m4 do
19314 that.
19315 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
19316 file will be used.
19317 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
19318 (prepare): Given that for the time being changesyntax is not
19319 usable in M4, rename the muscles using `-' to `_'.
19320 Define `defines_flag', `output_parser_name' and `output_header_name'.
19321 * src/output.h (actions_output, guards_output)
19322 (token_definitions_output): Adjust prototypes.
19323 * src/scan-skel.l: Instead of scanning the skeletons, it now
19324 processes the output of m4: `__oline__' and `#output'.
19325 * data/bison.simple: Adjust to be used by M4(sugar).
19326 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
19327 to date.
19328 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
19329 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
19330 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
19331 shamelessly stolen from CVS Autoconf.
19332
19333 2002-02-05 Akim Demaille <akim@epita.fr>
19334
19335 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
19336 * configure.in: Check for the declarations of free and malloc.
19337 * src/muscle_tab.c: Adjust.
19338
19339 2002-02-05 Akim Demaille <akim@epita.fr>
19340
19341 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
19342 which have no values.
19343
19344 2002-02-05 Akim Demaille <akim@epita.fr>
19345
19346 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
19347 * data/: here.
19348
19349 2002-01-29 Paul Eggert <eggert@twinsun.com>
19350
19351 * src/bison.simple (YYSIZE_T): Do not define merely because
19352 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
19353 On some platforms, <alloca.h> does not declare YYSTD (size_t).
19354
19355 2002-01-27 Akim Demaille <akim@epita.fr>
19356
19357 Fix `%nonassoc and eof'.
19358
19359 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
19360 which were not properly copied! Replace
19361 memcpy (res->errs, src->errs, src->nerrs);
19362 with
19363 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
19364 !!!
19365 * tests/regression.at (%nonassoc and eof): Adjust to newest
19366 Autotest: `.' is not in the PATH.
19367
19368 2002-01-27 Akim Demaille <akim@epita.fr>
19369
19370 * tests/sets.at (AT_EXTRACT_SETS): New.
19371 (Nullable): Use it.
19372 (Firsts): New.
19373
19374 2002-01-26 Akim Demaille <akim@epita.fr>
19375
19376 * tests/actions.at, tests/calc.at, tests/headers.at,
19377 * tests/torture.at: Adjust to the newest Autotest which no longer
19378 forces `.' in the PATH.
19379
19380 2002-01-25 Akim Demaille <akim@epita.fr>
19381
19382 * tests/regression.at (%nonassoc and eof): New.
19383 Suggested by Robert Anisko.
19384
19385 2002-01-24 Akim Demaille <akim@epita.fr>
19386
19387 Bison dumps core when trying to complain about broken input files.
19388 Reported by Cris van Pelt.
19389
19390 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
19391 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
19392 into...
19393 (Invalid inputs): Strengthen: exercise parse_percent_token.
19394
19395 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
19396
19397 * src/Makefile.am: Add bison.c++.
19398 * src/bison.c++: New skeleton.
19399
19400 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
19401
19402 * po/it.po: New.
19403
19404 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
19405
19406 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
19407
19408 2002-01-20 Marc Autret <marc@gnu.org>
19409
19410 * src/files.c (compute_output_file_names): Fix
19411
19412 2002-01-20 Marc Autret <marc@gnu.org>
19413
19414 * tests/output.at: New test.
19415 * src/files.c (compute_base_names): Don't map extensions when
19416 the YACC flag is set, use defaults.
19417 Reported by Evgeny Stambulchik.
19418
19419 2002-01-20 Marc Autret <marc@gnu.org>
19420
19421 * src/system.h: Need to define __attribute__ away for non-GCC
19422 compilers as well (i.e., the vendor C compiler).
19423 Suggested by Albert Chin-A-Young.
19424
19425 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
19426
19427 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
19428 canonical definition.
19429 * src/system.h: Use the canonical definition for PARAMS (avoids
19430 a conflict with the macro from lib/hash.h).
19431
19432 2002-01-11 Akim Demaille <akim@epita.fr>
19433
19434 * configure.in: Use AC_FUNC_STRNLEN.
19435 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
19436
19437 2002-01-09 Akim Demaille <akim@epita.fr>
19438
19439 * src/files.c, src/files.h (output_infix): New.
19440 (tab_extension): Remove.
19441 (compute_base_names): Compute the former, drop the latter.
19442 * src/output.c (prepare): Insert the muscles `output-infix', and
19443 `output-suffix'.
19444 * src/parse-skel.y (string, string.1): New.
19445 (section.header): Use it.
19446 (section.yacc): Remove.
19447 (prefix): Remove too.
19448 * src/scan-skel.l: Adjust.
19449 * src/bison.simple, src/bison.hairy: Adjust.
19450
19451 2002-01-09 Akim Demaille <akim@epita.fr>
19452
19453 * configure.in (WERROR_CFLAGS): Compute it.
19454 * src/Makefile.am (CFLAGS): Pass it.
19455 * tests/atlocal.in (CFLAGS): Idem.
19456 * src/files.c: Fix a few warnings.
19457 (get_extension_index): Remove, unused.
19458
19459 2002-01-08 Akim Demaille <akim@epita.fr>
19460
19461 * src/getargs.c (AS_FILE_NAME): New.
19462 (getargs): Use it to convert DOSish file names.
19463 * src/files.c (base_name): Rename as full_base_name to avoid
19464 clashes with `base_name ()'.
19465 (filename_split): New.
19466 (compute_base_names): N-th rewrite, using filename_split.
19467
19468 2002-01-08 Akim Demaille <akim@epita.fr>
19469
19470 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
19471 New, stolen from the Fileutils 4.1.
19472 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
19473 * configure.in: Check for the presence of memrchr, and of its
19474 prototype.
19475
19476 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
19477
19478 * lib/hash.h (__P): Added definition for this macro.
19479 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
19480 BUILT_SOURCES, to ensure they are generated first.
19481 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
19482 %error-verbose to allow bootstrapping with bison 1.30x.
19483
19484 2002-01-06 Akim Demaille <akim@epita.fr>
19485
19486 * src/reader.c (parse_braces): Don't fetch the next char, the
19487 convention is to fetch on entry.
19488 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
19489 'switch' without a following semicolon.
19490 * tests/regression.at (braces parsing): New.
19491
19492 2002-01-06 Akim Demaille <akim@epita.fr>
19493
19494 Bison is dead wrong in its RR conflict reports.
19495
19496 * tests/torture.at (GNU Cim Grammar): New.
19497 * src/conflicts.c (count_rr_conflicts): Fix.
19498
19499 2002-01-06 Akim Demaille <akim@epita.fr>
19500
19501 Creating package.m4 from configure.ac causes too many problems.
19502
19503 * tests/Makefile.am (package.m4): Create it by hand,
19504 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
19505
19506 2002-01-06 Akim Demaille <akim@epita.fr>
19507
19508 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
19509 skeleton.h.
19510
19511 2002-01-04 Paul Eggert <eggert@twinsun.com>
19512
19513 * doc/bison.texinfo (Debugging):
19514 Remove YYSTDERR; it's no longer defined or used.
19515 Also, s/cstdio.h/cstdio/.
19516
19517 2002-01-03 Akim Demaille <akim@epita.fr>
19518
19519 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
19520
19521 2002-01-03 Akim Demaille <akim@epita.fr>
19522
19523 * src/parse-skel.y (process_skeleton): Don't bind the parser's
19524 tracing code to --trace, wait for a better --trace option, with
19525 args.
19526
19527 2002-01-03 Akim Demaille <akim@epita.fr>
19528
19529 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
19530 The ISO C++ standard is extremely clear about it: stderr is
19531 considered a macro, not a regular symbol (see table 94 `Header
19532 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
19533 Therefore std:: does not apply to it. It still does with fprintf.
19534 Also, s/cstdio.h/cstdio/.
19535
19536 2002-01-03 Akim Demaille <akim@epita.fr>
19537
19538 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
19539 for non system headers.
19540
19541 2002-01-02 Akim Demaille <akim@epita.fr>
19542
19543 Equip the skeleton chain with location tracking, runtime trace,
19544 pure parser and scanner.
19545
19546 * src/parse-skel.y: Request a pure parser, locations, and prefix
19547 renaming.
19548 (%union): Having several members with the same type does not help
19549 type mismatches, simplify.
19550 (YYPRINT, yyprint): New.
19551 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
19552 (skel_error): this.
19553 Handle locations.
19554 * src/scan-skel.l: Adjust to these changes.
19555 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
19556 (LOCATION_PRINT, skel_control_t): New.
19557
19558 2001-12-30 Akim Demaille <akim@epita.fr>
19559
19560 * src/parse-skel.y: Get rid of the shift/reduce conflict:
19561 replace `gb' with BLANKS.
19562 * src/scan-skel.l: Adjust.
19563
19564 2001-12-30 Akim Demaille <akim@epita.fr>
19565
19566 * src/system.h: We don't need nor want bcopy.
19567 Throw away MS-DOS crap: we don't need getpid.
19568 * configure.in: We don't need strndup. It was even causing
19569 problems: because Flex includes the headers *before* us,
19570 _GNU_SOURCE is not defined by config.h, and therefore strndup was
19571 not visible.
19572 * lib/xstrndup.c: New.
19573 * src/scan-skel.l: Use it.
19574 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
19575 * src/parse-skel.y: Use %directives instead of #defines.
19576
19577 2001-12-30 Akim Demaille <akim@epita.fr>
19578
19579 * src/skeleton.h: New.
19580 * src/output.c (output_parser, output_master_parser): Remove, dead
19581 code.
19582 * src/output.h (get_lines_number, actions_output, guards_output)
19583 (token_definitions_output): Prototype them.
19584 * src/parse-skel.y: Add the license notice.
19585 Include output.h and skeleton.h.
19586 (process_skeleton): Returns void, and takes a single parameter.
19587 * src/scan-skel.l: Add the license notice.
19588 Include skeleton.h.
19589 Don't use %option yylineno: it seems that then Flex imagines
19590 REJECT has been used, and therefore it won't reallocate its
19591 buffers (which makes no other sense to me than a bug). It results
19592 in warnings for `unused: yy_flex_realloc'.
19593
19594 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
19595
19596 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
19597 (MUSCLE_INSERT_PREFIX): ...to there.
19598 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
19599 (MUSCLE_INSERT_PREFIX): Move from here...
19600
19601 * src/bison.hairy: Add a section directive. Put braces around muscle
19602 names. This parser skeleton is still broken, but Bison should not
19603 choke on a bad muscle 'syntax'.
19604 * src/bison.simple: Add a section directive. Put braces around muscle
19605 names.
19606
19607 * src/files.h (strsuffix, stringappend): Add declarations.
19608 (tab_extension): Add declaration.
19609 (short_base_name): Add declaration.
19610
19611 * src/files.c (strsuffix, stringappend): No longer static. These
19612 functions are used in the skeleton parser.
19613 (tab_extension): New.
19614 (compute_base_names): Use the computations done in this function
19615 to guess if the generated parsers should have '.tab' in their
19616 names.
19617 (short_base_name): No longer static.
19618
19619 * src/output.c (output_skeleton): New.
19620 (output): Disable call to output_master_parser, and give a try to
19621 a new skeleton handling system.
19622 (guards_output, actions_output): No longer static.
19623 (token_definitions_output, get_lines_number): No longer static.
19624
19625 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
19626
19627 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
19628 parse-skel.y.
19629
19630 * src/parse-skel.y: New file.
19631 * src/scan-skel.l: New file.
19632
19633 2001-12-29 Akim Demaille <akim@epita.fr>
19634
19635 %name-prefix is broken.
19636
19637 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
19638 Adjust all dependencies.
19639 * tests/headers.at (export YYLTYPE): Strengthen this test: use
19640 %name-prefix.
19641
19642 Renaming yylval but not yylloc is not consistent. Now we do.
19643
19644 * src/bison.simple: Prefix yylloc if used.
19645 * doc/bison.texinfo (Decl Summary): Document that.
19646
19647 2001-12-29 Akim Demaille <akim@epita.fr>
19648
19649 * doc/bison.texinfo: Promote `%long-directive' over
19650 `%long_directive'.
19651 Remove all references to fixed-output-files, yacc is enough.
19652
19653 2001-12-29 Akim Demaille <akim@epita.fr>
19654
19655 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
19656 user prologue. These are defaults.
19657 * tests/actions.at (Mid-rule actions): Make sure the user can
19658 define YYDEBUG and YYERROR_VERBOSE.
19659
19660 2001-12-29 Akim Demaille <akim@epita.fr>
19661
19662 * src/output.c (header_output): Don't forget to export YYLTYPE and
19663 yylloc.
19664 * tests/headers.at (export YYLTYPE): New, make sure it does.
19665 * tests/regression.at (%union and --defines, Invalid CPP headers):
19666 Move to...
19667 * tests/headers.at: here.
19668
19669 2001-12-29 Akim Demaille <akim@epita.fr>
19670
19671 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
19672
19673 2001-12-29 Akim Demaille <akim@epita.fr>
19674
19675 * tests/actions.at (Mid-rule actions): Output on a single line
19676 instead of several.
19677
19678 2001-12-29 Akim Demaille <akim@epita.fr>
19679
19680 * doc/bison.texinfo: Formatting changes.
19681
19682 2001-12-29 Akim Demaille <akim@epita.fr>
19683
19684 Don't store the token defs in a muscle, just be ready to output it
19685 on command. Now possible via `symbols'. Fixes a memory leak.
19686
19687 * src/output.c (token_definitions_output): New.
19688 (output_parser, header_output): Use it.
19689 * src/reader.c (symbols_save): Remove.
19690
19691 2001-12-29 Akim Demaille <akim@epita.fr>
19692
19693 * src/bison.simple: Do not provide a default for YYSTYPE and
19694 YYLTYPE before the user's prologue. Otherwise it's hardly... a
19695 default.
19696
19697 2001-12-29 Akim Demaille <akim@epita.fr>
19698
19699 Mid-rule actions are simply... ignored!
19700
19701 * src/reader.c (readgram): Be sure to attach mid-rule actions to
19702 the empty-rule associated to the dummy symbol, not to the host
19703 rule.
19704 * tests/actions.at (Mid-rule actions): New.
19705
19706 2001-12-29 Akim Demaille <akim@epita.fr>
19707
19708 Memory leak.
19709
19710 * src/reader.c (reader): Free grammar.
19711
19712 2001-12-29 Akim Demaille <akim@epita.fr>
19713
19714 Memory leak.
19715
19716 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
19717 since it allocates it for each state, although only one is needed.
19718 (allocate_storage): Do it here.
19719
19720 2001-12-29 Akim Demaille <akim@epita.fr>
19721
19722 * src/options.h, src/options.c (create_long_option_table): Rename
19723 as...
19724 (long_option_table_new): this, with a clearer prototype.
19725 (percent_table): Remove, unused,
19726 * src/getargs.c (getargs): Adjust.
19727
19728 2001-12-29 Akim Demaille <akim@epita.fr>
19729
19730 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
19731 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
19732 as states.
19733
19734 2001-12-29 Akim Demaille <akim@epita.fr>
19735
19736 * src/lalr.c (build_relations): Rename `states' as `states1'.
19737 Sorry, I don't understand exactly what it is, no better name...
19738
19739 2001-12-29 Akim Demaille <akim@epita.fr>
19740
19741 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
19742 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
19743 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
19744 as rules.
19745
19746 2001-12-29 Akim Demaille <akim@epita.fr>
19747
19748 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
19749 ago.
19750
19751 2001-12-29 Akim Demaille <akim@epita.fr>
19752
19753 * src/reader.c, src/reader.h (user_toknums): Remove.
19754 Adjust all users to use symbols[i]->user_token_number.
19755
19756 2001-12-29 Akim Demaille <akim@epita.fr>
19757
19758 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
19759 Adjust all users to use symbols[i]->prec or ->assoc.
19760
19761 2001-12-29 Akim Demaille <akim@epita.fr>
19762
19763 * src/reader.c, src/reader.h (tags): Remove.
19764 Adjust all users to use symbols[i]->tag.
19765
19766 2001-12-29 Akim Demaille <akim@epita.fr>
19767
19768 * src/gram.h, src/gram.c (symbols): New, similar to state_table
19769 and rule_table.
19770 * src/reader.c (packsymbols): Fill this table.
19771 Drop sprec.
19772 * src/conflicts.c (resolve_sr_conflict): Adjust.
19773 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
19774 single table.
19775 Use symbols[i]->tag instead of tags[i].
19776
19777 2001-12-29 Akim Demaille <akim@epita.fr>
19778
19779 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
19780 In addition, put a comment in there, to replace...
19781 * tests/regression.at (%union and C comments): Remove.
19782
19783 2001-12-29 Akim Demaille <akim@epita.fr>
19784
19785 * tests/regression.at (Web2c Actions): Blindly move the actual
19786 output as expected output. The contents *seem* right to me, but I
19787 can't pretend reading perfectly parser tables... Nonetheless, all
19788 the other tests pass correctly, the table look OK, even though the
19789 presence of `$axiom' is to be noted: AFAICS it is useless (but
19790 harmless).
19791
19792 2001-12-29 Akim Demaille <akim@epita.fr>
19793
19794 * src/reader.c (readgram): Don't add the rule 0 if there were no
19795 rules read. In other words, add it _after_ having performed
19796 grammar sanity checks.
19797 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
19798
19799 2001-12-29 Akim Demaille <akim@epita.fr>
19800
19801 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
19802 visible, and some states have now a different number.
19803
19804 2001-12-29 Akim Demaille <akim@epita.fr>
19805
19806 * src/reader.c (readgram): Bind the initial rule's lineno to that
19807 of the first rule.
19808 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
19809 (Solved SR Conflicts): Adjust rule 0's line number.
19810
19811 2001-12-29 Akim Demaille <akim@epita.fr>
19812
19813 Fix the `GAWK Grammar' failure.
19814
19815 * src/LR0.c (final_state): Initialize to -1 so that we do compute
19816 the reductions of the first state which was mistakenly confused
19817 with the final state because precisely final_state was initialized
19818 to 0.
19819 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
19820 now noticed by Bison.
19821 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
19822 have a reduction on $default.
19823
19824 2001-12-29 Akim Demaille <akim@epita.fr>
19825
19826 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
19827 rule line numbers.
19828 * src/closure.c (print_closure): Likewise.
19829 * src/derives.c (print_derives): Likewise.
19830 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
19831 now.
19832
19833 2001-12-29 Akim Demaille <akim@epita.fr>
19834
19835 * src/lalr.c (lookaheads_print): New.
19836 (lalr): Call it when --trace-flag.
19837 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
19838 are dumped.
19839
19840 2001-12-29 Akim Demaille <akim@epita.fr>
19841
19842 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
19843 when walking through ritem, even via rule->rhs.
19844 * src/reduce.c (dump_grammar, useful_production, reduce_output)
19845 (useful_production, useless_nonterminals): Likewise.
19846 (reduce_grammar_tables): Likewise, plus update nritems.
19847 * src/nullable.c (set_nullable): Likewise.
19848 * src/lalr.c (build_relations): Likewise.
19849 * tests/sets.at (Nullable): Adjust.
19850 Fortunately, now, the $axiom is no longer nullable.
19851
19852 2001-12-29 Akim Demaille <akim@epita.fr>
19853
19854 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
19855 the 0-sentinel.
19856 * src/gram.c (ritem_longest_rhs): Likewise.
19857 * src/reduce.c (nonterminals_reduce): Likewise.
19858 * src/print_graph.c (print_graph): Likewise.
19859 * src/output.c (output_rule_data): Likewise.
19860 * src/nullable.c (set_nullable): Likewise.
19861
19862 2001-12-29 Akim Demaille <akim@epita.fr>
19863
19864 * src/output.c: Comment changes.
19865
19866 2001-12-27 Paul Eggert <eggert@twinsun.com>
19867
19868 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
19869 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
19870 Sparc, as they were causing more porting problems than the
19871 (minor) performance improvement was worth.
19872
19873 Also, catch up with 1.31's YYSTD.
19874
19875 2001-12-27 Akim Demaille <akim@epita.fr>
19876
19877 * src/output.c (output_gram): Rely on nritems, not the
19878 0-sentinel. See below.
19879 Use -1 as separator, not 0.
19880 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
19881 Rely on -1 as separator in yyrhs, instead of 0.
19882 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
19883 twice `Now at end of input', therefore there are two lines less to
19884 expect.
19885
19886 2001-12-27 Akim Demaille <akim@epita.fr>
19887
19888 * tests/regression.at (Unresolved SR Conflicts):
19889 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
19890 below.
19891
19892 2001-12-27 Akim Demaille <akim@epita.fr>
19893
19894 * src/LR0.c (new_state): Recognize the final state by the fact it
19895 is reached by eoftoken.
19896 (insert_start_shifting_state, insert_eof_shifting_state)
19897 (insert_accepting_state, augment_automaton): Remove, since now
19898 these states are automatically computed from the initial state.
19899 (generate_states): Adjust.
19900 * src/print.c: When reporting a rule number to the user, substract
19901 1, so that the axiom rule is rule 0, and the first user rule is 1.
19902 * src/reduce.c: Likewise.
19903 * src/print_graph.c (print_core): For the time being, just as for
19904 the report, depend upon --trace-flags to dump the full set of
19905 items.
19906 * src/reader.c (readgram): Once the grammar read, insert the rule
19907 0: `$axiom: START-SYMBOL $'.
19908 * tests/set.at: Adjust: rule 0 is now displayed, and since the
19909 number of the states has changed (the final state is no longer
19910 necessarily the last), catch up.
19911
19912 2001-12-27 Akim Demaille <akim@epita.fr>
19913
19914 Try to make the use of the eoftoken valid. Given that its value
19915 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
19916 is used instead of > 0 where appropriate, (ii), depend upon nritems
19917 instead of the 0-sentinel.
19918
19919 * src/gram.h, src/gram.c (nritems): New.
19920 Expected to be duplication of nitems, but for the time being...
19921 * src/reader.c (packgram): Assert nritems and nitems are equal.
19922 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
19923 * src/closure.c (print_closure, print_fderives): Likewise.
19924 * src/gram.c (ritem_print): Likewise.
19925 * src/print.c (print_core, print_grammar): Likewise.
19926 * src/print_graph.c: Likewise.
19927
19928 2001-12-27 Akim Demaille <akim@epita.fr>
19929
19930 * src/main.c (main): If there are complains after grammar
19931 reductions, then output the report anyway if requested, then die.
19932 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
19933 * src/reader.c (eoftoken): New.
19934 (parse_token_decl): If the token being defined has value `0', it
19935 is the eoftoken.
19936 (packsymbols): No longer hack `tags' to insert `$' by hand.
19937 Be sure to preserve the value of the eoftoken.
19938 (reader): Make sure eoftoken is defined.
19939 Initialize nsyms to 0: now eoftoken is created just like the others.
19940 * src/print.c (print_grammar): Don't special case the eof token.
19941 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
19942 lie anyway, albeit pleasant.
19943 * tests/calc.at: Exercise error messages with eoftoken.
19944 Change the grammar so that empty input is invalid.
19945 Adjust expectations.
19946 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
19947
19948 2001-12-27 Akim Demaille <akim@epita.fr>
19949
19950 * configure.in: Check the protos of strchr ans strspn.
19951 Replace strchr if needed.
19952 * src/system.h: Provide the protos of strchr, strspn and memchr if
19953 missing.
19954 * lib/strchr.c: New.
19955 * src/reader.c (symbols_save): Use strchr.
19956
19957 2001-12-27 Akim Demaille <akim@epita.fr>
19958
19959 * src/print.c, src/print_graph.c (escape): New.
19960 Use it to quote the TAGS outputs.
19961 * src/print_graph.c (print_state): Now errors are in red, and
19962 reductions in green.
19963 Prefer high to wide: output the state number on a line of its own.
19964
19965 2001-12-27 Akim Demaille <akim@epita.fr>
19966
19967 * src/state.h, src/state.c (reductions_new): New.
19968 * src/LR0.c (set_state_table): Let all the states have a
19969 `reductions', even if reduced to 0.
19970 (save_reductions): Adjust.
19971 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
19972 * src/print.c (print_reductions, print_actions): Adjust.
19973 * src/output.c (action_row): Adjust.
19974
19975 2001-12-27 Akim Demaille <akim@epita.fr>
19976
19977 * src/state.h, src/state.c (errs_new, errs_dup): New.
19978 * src/LR0.c (set_state_table): Let all the states have an errs,
19979 even if reduced to 0.
19980 * src/print.c (print_errs, print_reductions): Adjust.
19981 * src/output.c (output_actions, action_row): Adjust.
19982 * src/conflicts.c (resolve_sr_conflict): Adjust.
19983
19984 2001-12-27 Akim Demaille <akim@epita.fr>
19985
19986 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
19987
19988 2001-12-27 Akim Demaille <akim@epita.fr>
19989
19990 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
19991 * src/print.c: here.
19992 (lookaheadset, shiftset): New, used as additional storage by
19993 print_reductions.
19994 (print_results): Adjust.
19995 (print_shifts, print_gotos, print_errs): New, extracted from...
19996 (print_actions): here.
19997 * src/print_graph.c (print_actions): Remove dead code.
19998
19999 2001-12-27 Akim Demaille <akim@epita.fr>
20000
20001 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
20002 `$n' and `@n'.
20003
20004 2001-12-27 Akim Demaille <akim@epita.fr>
20005
20006 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
20007 (build_relations): Adjust.
20008
20009 2001-12-27 Akim Demaille <akim@epita.fr>
20010
20011 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
20012 duplication.
20013
20014 2001-12-27 Akim Demaille <akim@epita.fr>
20015
20016 * src/reader.c (packgram): Catch nitems overflows.
20017
20018 2001-12-27 Akim Demaille <akim@epita.fr>
20019
20020 * src/files.c, src/files.h (guard_obstack): Remove.
20021 * src/output.c (output): Adjust.
20022 * src/reader.c (parse_braces): New, factoring...
20023 (copy_action, copy_guard): these two which are renamed as...
20024 (parse_action, parse_guard): these.
20025 As a voluntary consequence, using braces around guards is now
20026 mandatory.
20027
20028 2001-12-27 Akim Demaille <akim@epita.fr>
20029
20030 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
20031 * src/reader.c (symbol_list): `guard' and `guard_line' are new
20032 members.
20033 (symbol_list_new): Adjust.
20034 (copy_action): action_line is the first line, not the last.
20035 (copy_guard): Just as for actions, store the `action' only, not
20036 the switch/case/break flesh.
20037 Don't parse the user action that might follow the guard, let...
20038 (readgram): do it, i.e., now, there can be an action after a
20039 guard.
20040 In other words the guard is just explicitly optional.
20041 (packgram): Adjust.
20042 * src/output.c (guards_output): New.
20043 (output_parser): Call it when needed.
20044 (output): Also free the guard and attrs obstacks.
20045 * src/files.c, src/files.h (obstack_save): Remove.
20046 (output_files): Remove.
20047 As a result, if one needs the former `.act' file, using an
20048 appropriate skeleton which requires actions and guards is now
20049 required.
20050 * src/main.c (main): Adjust.
20051 * tests/semantic.at: New.
20052 * tests/regression.at: Use `input.y' as input file name.
20053 Avoid 8+3 problems by requiring input.c when the test needs the
20054 parser.
20055
20056 2001-12-27 Akim Demaille <akim@epita.fr>
20057
20058 * src/reader.c (symbol_list_new): Be sure to initialize all the
20059 fields.
20060
20061 2001-12-27 Akim Demaille <akim@epita.fr>
20062
20063 All the hacks using a final pseudo state are now useless.
20064
20065 * src/LR0.c (set_state_table): state_table holds exactly nstates.
20066 * src/lalr.c (nLA): New.
20067 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
20068 instead of lookaheadsp from the pseudo state (nstate + 1).
20069
20070 2001-12-27 Akim Demaille <akim@epita.fr>
20071
20072 * src/output.c (action_row, token_actions): Use a state_t instead
20073 of a integer, and nlookaheads instead of the following state's
20074 lookaheadsp.
20075
20076 2001-12-27 Akim Demaille <akim@epita.fr>
20077
20078 * src/conflicts.c (log_resolution, flush_shift)
20079 (resolve_sr_conflict, set_conflicts, solve_conflicts)
20080 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
20081 (conflicts_print, print_reductions): Use a state_t instead of an
20082 integer when referring to a state.
20083 As much as possible, depend upon nlookaheads, instead of the
20084 `lookaheadsp' member of the following state (since lookaheads of
20085 successive states are successive, the difference between state n + 1
20086 and n served as the number of lookaheads for state n).
20087 * src/lalr.c (add_lookback_edge): Likewise.
20088 * src/print.c (print_core, print_actions, print_state)
20089 (print_results): Likewise.
20090 * src/print_graph.c (print_core, print_actions, print_state)
20091 (print_graph): Likewise.
20092 * src/conflicts.h: Adjust.
20093
20094 2001-12-27 Akim Demaille <akim@epita.fr>
20095
20096 * src/bison.hairy: Formatting/comment changes.
20097 ANSIfy.
20098 Remove `register' indications.
20099 Add plenty of `static'.
20100
20101 2001-12-27 Akim Demaille <akim@epita.fr>
20102
20103 * src/output.c (prepare): Drop the muscle `ntbase' which
20104 duplicates ntokens.
20105 * src/bison.simple: Formatting/comment changes.
20106 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
20107 is an undocumented synonym.
20108
20109 2001-12-22 Akim Demaille <akim@epita.fr>
20110
20111 * src/output.c (output_table_data): Change the prototype to use
20112 `int' for array ranges: some invocations do pass an int, not a
20113 short.
20114 Reported by Wayne Green.
20115
20116 2001-12-22 Akim Demaille <akim@epita.fr>
20117
20118 Some actions of web2c.y are improperly triggered.
20119 Reported by Mike Castle.
20120
20121 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
20122 * tests/regression.at (Web2c): Rename as...
20123 (Web2c Report): this.
20124 (Web2c Actions): New.
20125
20126 2001-12-22 Akim Demaille <akim@epita.fr>
20127
20128 Reductions in web2c.y are improperly reported.
20129 Reported by Mike Castle.
20130
20131 * src/conflicts.c (print_reductions): Fix.
20132 * tests/regression.at (Web2c): New.
20133
20134 2001-12-18 Akim Demaille <akim@epita.fr>
20135
20136 Some host fail on `assert (!"foo")', which expands to
20137 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
20138 Reported by Nelson Beebee.
20139
20140 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
20141 `#define it_succeeded 0' and `assert (it_succeeded)'.
20142
20143 2001-12-17 Marc Autret <autret_m@epita.fr>
20144
20145 * src/bison.simple: Don't hard code the skeleton line and filename.
20146 * src/output.c (output_parser): Rename 'line' as 'output_line'.
20147 New line counter 'skeleton_line' (skeleton-line muscle).
20148
20149 2001-12-17 Paul Eggert <eggert@twinsun.com>
20150
20151 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
20152 YYDEBUG must be defined to a nonzero value.
20153
20154 * src/bison.simple (yytname): Do not assume that the user defines
20155 YYDEBUG to a properly parenthesized expression.
20156
20157 2001-12-17 Akim Demaille <akim@epita.fr>
20158
20159 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
20160 nlookaheads is a new member.
20161 Adjust all users.
20162 * src/lalr.h (nlookaheads): Remove this orphan declaration.
20163 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
20164 state.
20165
20166 2001-12-17 Akim Demaille <akim@epita.fr>
20167
20168 * src/files.h, src/files.c (open_files, close_files): Remove.
20169 * src/main.c (main): Don't open/close files, nor invoke lex_free,
20170 let...
20171 * src/reader.c (reader): Do it.
20172
20173 2001-12-17 Akim Demaille <akim@epita.fr>
20174
20175 * src/conflicts.c (print_reductions): Formatting changes.
20176
20177 2001-12-17 Akim Demaille <akim@epita.fr>
20178
20179 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
20180 (flush_reduce): New.
20181 (resolve_sr_conflict): Adjust.
20182
20183 2001-12-17 Akim Demaille <akim@epita.fr>
20184
20185 * src/output.c (output_obstack): Be static and rename as...
20186 (format_obstack): this, to avoid any confusion with files.c's
20187 output_obstack.
20188 * src/reader.h (muscle_obstack): Move to...
20189 * src/output.h: here, since it's defined in output.c.
20190
20191 2001-12-17 Akim Demaille <akim@epita.fr>
20192
20193 * src/output.c (action_row, save_column, default_goto)
20194 (sort_actions, matching_state, pack_vector): Better variable
20195 locality.
20196
20197 2001-12-17 Akim Demaille <akim@epita.fr>
20198
20199 * src/output.c: Various formatting changes.
20200
20201 2001-12-17 Akim Demaille <akim@epita.fr>
20202
20203 * src/files.c (output_files): Free the output_obstack.
20204 * src/main.c (main): Call print and print_graph conditionally.
20205 * src/print.c (print): Work unconditionally.
20206 * src/print_graph.c (print_graph): Work unconditionally.
20207 * src/conflicts.c (log_resolution): Output only if verbose_flag.
20208
20209 2001-12-16 Marc Autret <autret_m@epita.fr>
20210
20211 * src/output.c (actions_output): Fix. When we use %no-lines,
20212 there is one less line per action.
20213
20214 2001-12-16 Marc Autret <autret_m@epita.fr>
20215
20216 * src/bison.simple: Remove a useless #line directive.
20217 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
20218 * src/output.c (get_lines_number): New.
20219 (output_parser): Adjust, now takes care about the lines of a
20220 output muscles.
20221 Fix line numbering.
20222 (actions_output): Computes the number of lines taken by actions.
20223 (output_master_parser): Insert new skeleton which is the name of
20224 the output parser file name.
20225
20226 2001-12-15 Marc Autret <autret_m@epita.fr>
20227
20228 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
20229
20230 2001-12-15 Marc Autret <autret_m@epita.fr>
20231
20232 * src/output.c (output_gram): Keep track of the hairy one.
20233
20234 2001-12-15 Akim Demaille <akim@epita.fr>
20235
20236 Make `make distcheck' work.
20237
20238 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
20239 system.h which uses libgettext.h.
20240
20241 2001-12-15 Akim Demaille <akim@epita.fr>
20242
20243 * src/nullable.c (set_nullable): Useless rules must be skipped,
20244 otherwise, since we range over their symbols, we might look at a
20245 nonterminal which no longer ``exists'', i.e., it is not counted in
20246 `nvars', hence we overflow our arrays.
20247
20248 2001-12-15 Akim Demaille <akim@epita.fr>
20249
20250 The header can also be produced directly, without any obstack!
20251 Yahoo!
20252
20253 * src/files.c, src/files.h (defines_obstack): Remove.
20254 (compute_header_macro): Global.
20255 (defines_obstack_save): Remove.
20256 * src/reader.c (parse_union_decl): No longer output to
20257 defines_obstack: its content can be found in the `stype' muscle
20258 anyway.
20259 (output_token_translations): Merge into...
20260 (symbols_output): this.
20261 Rename as...
20262 (symbols_save): this.
20263 (reader): Adjust.
20264 * src/output.c (header_output): New.
20265 (output): Call it.
20266
20267 2001-12-15 Akim Demaille <akim@epita.fr>
20268
20269 * src/reader.c (parse_union_decl): Instead of handling two obstack
20270 simultaneously, use one to define the `stype' muscle, and use the
20271 value of the latter to fill defines_obstack.
20272 (copy_comment): Remove.
20273 (copy_comment2): Work for a single obstack.
20274 Rename as...
20275 (copy_comment): this.
20276
20277 2001-12-15 Akim Demaille <akim@epita.fr>
20278
20279 * src/lex.c, src/lex.h (xgetc): No longer static.
20280 * src/reader.c (parse_union_decl): Revamp.
20281
20282 2001-12-15 Akim Demaille <akim@epita.fr>
20283
20284 Still making progress in separating Bison into (i) input, (ii)
20285 process, (iii) output: now we can directly output the parser file
20286 without using table_obstack at all.
20287
20288 * src/files.c, src/files.h (table_obstack): Bye bye.
20289 (parser_file_name): New.
20290 * src/files.c (compute_output_file_names): Compute it.
20291 * src/output.c (actions_output, output_parser)
20292 (output_master_parser): To a file instead of an obstack.
20293
20294 2001-12-15 Akim Demaille <akim@epita.fr>
20295
20296 Attach actions to rules, instead of pre-outputting them to
20297 actions_obstack.
20298
20299 * src/gram.h (rule_t): action and action_line are new members.
20300 * src/reader.c (symbol_list): Likewise.
20301 (copy_action): Save the actions within the rule.
20302 (packgram): Save them in rule_table.
20303 * src/output.c (actions_output): New.
20304 (output_parser): Use it on `%%actions'.
20305 (output_rule_data): Don't free rule_table.
20306 (output): Do it.
20307 (prepare): Don't save the `action' muscle.
20308 * src/bison.simple: s/%%action/%%actions/.
20309
20310 2001-12-15 Akim Demaille <akim@epita.fr>
20311
20312 * src/reader.c (copy_action): When --yacc, don't append a `;'
20313 to the user action: let it fail if lacking.
20314 Suggested by Arnold Robbins and Tom Tromey.
20315
20316 2001-12-14 Akim Demaille <akim@epita.fr>
20317
20318 * src/lex.c (literalchar): Simply return the char you decoded, non
20319 longer mess around with obstacks and int pointers.
20320 Adjust all callers.
20321
20322 2001-12-14 Akim Demaille <akim@epita.fr>
20323
20324 * src/lex.c (literalchar): Don't escape the special characters,
20325 just decode them, and keep them as char (before, eol was output as
20326 the 2 char string `\n' etc.).
20327 * src/output.c (output_rule_data): Use quotearg to output the
20328 token strings.
20329
20330 2001-12-13 Paul Eggert <eggert@twinsun.com>
20331
20332 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
20333 Do not infringe on the global user namespace when using C++.
20334 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
20335 All uses of `fprintf' and `stderr' changed.
20336
20337 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
20338
20339 2001-12-13 Akim Demaille <akim@epita.fr>
20340
20341 The computation of nullable is broken: it doesn't handle empty
20342 RHS's properly.
20343
20344 * tests/torture.at (GNU AWK Grammar): New.
20345 * tests/sets.at (Nullable): New.
20346 * src/nullable.c (set_nullable): Instead of blindly looping over
20347 `ritems', loop over the rules, and then over their rhs's.
20348
20349 Work around Autotest bugs.
20350
20351 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
20352 frame, because Autotest understand lines starting with a `+' as
20353 traces from the shell. Then, they are not processed properly.
20354 Admittedly an Autotest bug, but we don't have time to wait for
20355 Autotest to catch up.
20356 * tests/regression.at (Broken Closure): Adjust to the new table
20357 frames.
20358 Move to...
20359 * tests/sets.at: here.
20360
20361 2001-12-13 Akim Demaille <akim@epita.fr>
20362
20363 * src/closure.c (closure): Use nrules instead of playing tricks
20364 with BITS_PER_WORD.
20365
20366 2001-12-13 Akim Demaille <akim@epita.fr>
20367
20368 * src/print.c (print_actions): Output the handling of `$' as the
20369 traces do: shifting the token EOF. Before EOF was treated as a
20370 nonterminal.
20371 * tests/regression.at: Adjust some tests.
20372 * src/print_graph.c (print_core): Complete the set of items via
20373 closure. The next-to-final and final states are still unsatisfying,
20374 but that's to be addressed elsewhere.
20375 No longer output the rule numbers, but do output the state number.
20376 A single loop for the shifts + gotos is enough, but picked a
20377 distinct color for each.
20378 (print_graph): Initialize and finalize closure.
20379
20380 2001-12-13 Akim Demaille <akim@epita.fr>
20381
20382 * src/reader.c (readgram): Remove dead code, an strip useless
20383 braces.
20384 (get_type): Remove, unused.
20385
20386 2001-12-12 Akim Demaille <akim@epita.fr>
20387
20388 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
20389 on that of lib/error.c.
20390
20391 2001-12-12 Akim Demaille <akim@epita.fr>
20392
20393 Some hosts don't like `/' in includes.
20394
20395 * src/system.h: Include libgettext.h without qualifying the path.
20396 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
20397 $(top_srcdir).
20398
20399 2001-12-11 Marc Autret <autret_m@epita.fr>
20400
20401 * src/output.c (output_parser): Remove useless muscle.
20402
20403 2001-12-11 Marc Autret <autret_m@epita.fr>
20404
20405 * src/bison.simple: Remove #line just before %%epilogue. It
20406 is now handled in ...
20407 * src/reader.c (read_additionnal_code): Add the output of a
20408 #line for the epilogue.
20409
20410 2001-12-10 Marc Autret <autret_m@epita.fr>
20411
20412 * src/reader.c (copy_definition): Re-use CPP-outed code which
20413 replace precedent remove.
20414 * src/bison.simple: Remove #line before %%prologue because
20415 %%input-line is wrong at this time.
20416
20417 2001-12-10 Marc Autret <autret_m@epita.fr>
20418
20419 * src/reader.c (symbols_output): Clean up.
20420 * src/output.c (output_gram, output): Clean up.
20421
20422 2001-12-10 Akim Demaille <akim@epita.fr>
20423
20424 * src/lalr.c (initialize_lookaheads): New. Extracted from...
20425 * src/LR0.c (set_state_table): here.
20426 * src/lalr.c (lalr): Call it.
20427
20428 2001-12-10 Akim Demaille <akim@epita.fr>
20429
20430 * src/state.h (shifts): Remove the `number' member: shifts are
20431 attached to state, hence no longer need to be labelled with a
20432 state number.
20433
20434 2001-12-10 Akim Demaille <akim@epita.fr>
20435
20436 Now that states have a complete set of members, the linked list of
20437 shifts is useless: just fill directly the state's shifts member.
20438
20439 * src/state.h (shifts): Remove the `next' member.
20440 * src/LR0.c (first_state, last_state): Remove.
20441 Adjust the callers.
20442 (augment_automaton): Don't look for the shifts that must be added
20443 a shift on EOF: it is those of the state we looked for! But now,
20444 since shifts are attached, it is no longer needed to looking
20445 merely by its id: its number.
20446
20447 2001-12-10 Akim Demaille <akim@epita.fr>
20448
20449 * src/LR0.c (augment_automaton): Better variable locality.
20450 Remove an impossible branch: if there is a state corresponding to
20451 the start symbol being shifted, then there is shift for the start
20452 symbol from the initial state.
20453
20454 2001-12-10 Akim Demaille <akim@epita.fr>
20455
20456 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
20457 only when appropriate: when insert_start_shifting_state' is not
20458 invoked.
20459 * tests/regression.at (Rule Line Numbers): Adjust.
20460
20461 2001-12-10 Akim Demaille <akim@epita.fr>
20462
20463 * src/LR0.c (augment_automaton): Now that all states have shifts,
20464 merge the two cases addition shifts to the initial state.
20465
20466 2001-12-10 Akim Demaille <akim@epita.fr>
20467
20468 * src/lalr.c (set_state_table): Move to...
20469 * src/LR0.c: here.
20470 * src/lalr.c (lalr): Don't call it...
20471 * src/LR0.c (generate_states): do it.
20472 * src/LR0.h (first_state): Remove, only the table is used.
20473
20474 2001-12-10 Akim Demaille <akim@epita.fr>
20475
20476 * src/LR0.h (first_shift, first_reduction): Remove.
20477 * src/lalr.c: Don't use first_shift: find shifts through the
20478 states.
20479
20480 2001-12-10 Akim Demaille <akim@epita.fr>
20481
20482 * src/LR0.c: Attach shifts to states as soon as they are
20483 computed.
20484 * src/lalr.c (set_state_table): Instead of assigning shifts to
20485 state, just assert that the mapping was properly done.
20486
20487 2001-12-10 Akim Demaille <akim@epita.fr>
20488
20489 * src/LR0.c (insert_start_shift): Rename as...
20490 (insert_start_shifting_state): this.
20491 (insert_eof_shifting_state, insert_accepting_state): New.
20492 (augment_automaton): Adjust.
20493 Better locality of the variables.
20494 When looking if the start_symbol is shifted from the initial
20495 state, using `while (... symbol != start_symbol ...)' sounds
20496 better than `while (... symbol < start_symbol ...)': If fail
20497 to see how the order between symbols could be relevant!
20498
20499 2001-12-10 Akim Demaille <akim@epita.fr>
20500
20501 * src/getargs.h: Don't declare `spec_name_prefix' and
20502 `spec_file_prefix', declared by src/files.h.
20503 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
20504 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
20505 * src/output.c (prepare): Adjust.
20506 * src/reader.c (symbols_output): Likewise.
20507 * src/vmsgetargs.c: Vaguely adjust, but who cares?
20508
20509 2001-12-10 Akim Demaille <akim@epita.fr>
20510
20511 * src/muscle_tab.c (muscle_init): NULL is a better default than
20512 `"0"'.
20513
20514 2001-12-10 Akim Demaille <akim@epita.fr>
20515
20516 * src/reader.c (reader): Calling symbols_output once is enough.
20517
20518 2001-12-10 Akim Demaille <akim@epita.fr>
20519
20520 Now that states have a complete set of members, the linked list of
20521 reductions is useless: just fill directly the state's reductions
20522 member.
20523
20524 * src/state.h (struct reductions): Remove member `number' and
20525 `next'.
20526 * src/LR0.c (first_reduction, last_reduction): Remove.
20527 (save_reductions): Don't link the new reductions, store them in
20528 this_state.
20529 * src/lalr.c (set_state_table): No need to attach reductions to
20530 states, it's already done.
20531 * src/output.c (output_actions): No longer free the shifts, then
20532 the reductions, then the states: free all the states and their
20533 members.
20534
20535 2001-12-10 Akim Demaille <akim@epita.fr>
20536
20537 * src/options.c (OPTN, DRTV, BOTH): New.
20538 (option_table): Use them.
20539
20540 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
20541 the job of system.h.
20542 * src/options.c: Don't include stdio.h and xalloc.h for the same
20543 reasons.
20544
20545 2001-12-10 Akim Demaille <akim@epita.fr>
20546
20547 * src/output.c (output, prepare): Make sure the values of the
20548 muscles `action' and `prologue' are 0-terminated.
20549
20550 2001-12-10 Akim Demaille <akim@epita.fr>
20551
20552 Clean up GCC warnings.
20553
20554 * src/reader.c (copy_action): `buf' is not used.
20555 (parse_skel_decl): Be static.
20556 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
20557 * src/options.h (create_long_option_table): Have a real prototype.
20558 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
20559 (hash_delete_at): Return const void *.
20560 Adjust casts to preserve the const.
20561
20562 2001-12-10 Akim Demaille <akim@epita.fr>
20563
20564 * configure.in: Require 2.52g.
20565 M4 is not needed, but AUTOM4TE is.
20566 * m4/m4.m4: Remove.
20567 * tests/Makefile.am: Adjust.
20568
20569 2001-12-10 Akim Demaille <akim@epita.fr>
20570
20571 One structure for states is enough, even though theoretically
20572 there are LR(0) states and LALR(1) states.
20573
20574 * src/lalr.h (state_t): Remove.
20575 (state_table): Be state_t **, not state_t *.
20576 * src/state.h (core, CORE_ALLOC): Rename as...
20577 (state_t, STATE_ALLOC): this.
20578 Add the LALR(1) members: shifts, reductions, errs.
20579 * src/LR0.c (state_table): Rename as...
20580 (state_hash): this, to avoid name clashes with the global
20581 `state_table'.
20582 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
20583 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
20584
20585 2001-12-10 Akim Demaille <akim@epita.fr>
20586
20587 Bison dumps core on bash.y.
20588 Reported by Pascal Bart.
20589
20590 * src/warshall.c (bitmatrix_print): New.
20591 (TC): Use it.
20592 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
20593 j must be the outer loop.
20594 * tests/regression.at (Broken Closure): New.
20595
20596 2001-12-05 Akim Demaille <akim@epita.fr>
20597
20598 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
20599 its argument.
20600 Reported by Peter Hamorsky.
20601
20602 2001-12-05 Akim Demaille <akim@epita.fr>
20603
20604 * src/conflicts.c (err_table): Remove.
20605 (resolve_sr_conflict): Adjust.
20606 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
20607 Rename as...
20608 (state_t.reductions, state_t.shifts): this.
20609
20610 2001-12-05 Akim Demaille <akim@epita.fr>
20611
20612 * src/reduce.c (reduce_grammar_tables): No longer disable the
20613 removal of useless rules via CPP but via `if (0)', so that the
20614 compiler still check the code is valid.
20615 For instance, it should have noticed `rline' no longer exists: use
20616 the `line' member of rule_t.
20617 * src/gram.c (dummy, rline): Remove, unused.
20618
20619 2001-12-05 Akim Demaille <akim@epita.fr>
20620
20621 * src/output.c (pack_vector): Use assert, not berror.
20622 * src/main.c (berror): Remove, unused.
20623
20624 2001-12-05 Akim Demaille <akim@epita.fr>
20625
20626 New experimental feature: if --verbose --trace output all the
20627 items of a state, not only its kernel.
20628
20629 * src/print.c (print_core): If `trace_flag', then invoke closure
20630 before outputting the items of the state (print_core is no longer
20631 a correct name them).
20632 (print_results): Invoke new_closure/free_closure if needed.
20633
20634 2001-12-05 Akim Demaille <akim@epita.fr>
20635
20636 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
20637 * src/closure.c, src/closure.h (itemsetsize): Rename as...
20638 (nitemset): for consistency with the rest of the project.
20639
20640 2001-12-05 Akim Demaille <akim@epita.fr>
20641
20642 * src/closure.c (print_closure): Improve.
20643 (closure): Use it for printing input and output.
20644
20645 2001-12-05 Akim Demaille <akim@epita.fr>
20646
20647 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
20648 indexed by nonterminals.
20649
20650 2001-12-05 Akim Demaille <akim@epita.fr>
20651
20652 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
20653 what it was!).
20654 * src/warshall.h: Remove accidental duplication of the content.
20655
20656 2001-12-05 Akim Demaille <akim@epita.fr>
20657
20658 * src/closure.c (set_fderives): De-obfuscate.
20659
20660 2001-12-05 Akim Demaille <akim@epita.fr>
20661
20662 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
20663
20664 2001-12-05 Akim Demaille <akim@epita.fr>
20665
20666 * src/closure.c (set_firsts): De-obfuscate.
20667
20668 2001-12-05 Akim Demaille <akim@epita.fr>
20669
20670 * src/output.c (action_row): De-obfuscate
20671 using the good o' techniques: arrays not pointers, variable
20672 locality, BITISSET, RESETBIT etc.
20673
20674 2001-12-05 Akim Demaille <akim@epita.fr>
20675
20676 Pessimize the code to simplify it: from now on, all the states
20677 have a valid SHIFTS, which NSHIFTS is possibly 0.
20678
20679 * src/LR0.c (shifts_new): Be global and move to..
20680 * src/state.c, src/state.h: here.
20681 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
20682 * src/print_graph: Adjust.
20683
20684 2001-12-05 Akim Demaille <akim@epita.fr>
20685
20686 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
20687 * src/conflicts.c: Use it.
20688 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
20689 incorrectly ``simplified''.
20690
20691 2001-12-05 Akim Demaille <akim@epita.fr>
20692
20693 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
20694 using the good o' techniques: arrays not pointers, variable
20695 locality, BITISSET, RESETBIT etc.
20696
20697 2001-12-05 Akim Demaille <akim@epita.fr>
20698
20699 * src/state.h (SHIFT_SYMBOL): New.
20700 * src/conflicts.c: Use it to deobfuscate.
20701
20702 2001-12-05 Akim Demaille <akim@epita.fr>
20703
20704 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
20705 (print_reductions): De-obfuscate using the good o' techniques:
20706 arrays not pointers, variable locality, BITISSET.
20707
20708 2001-12-05 Akim Demaille <akim@epita.fr>
20709
20710 * src/conflicts.c (print_reductions): Arrays, not pointers.
20711 Use BITISSET.
20712
20713 2001-12-05 Akim Demaille <akim@epita.fr>
20714
20715 * src/conflicts.c (print_reductions): Pessimize, but clarify.
20716
20717 2001-12-05 Akim Demaille <akim@epita.fr>
20718
20719 * src/conflicts.c (print_reductions): Improve variable locality.
20720
20721 2001-12-05 Akim Demaille <akim@epita.fr>
20722
20723 * src/conflicts.c (print_reductions): Pessimize, but clarify.
20724
20725 2001-12-05 Akim Demaille <akim@epita.fr>
20726
20727 * src/conflicts.c (print_reductions): Improve variable locality.
20728
20729 2001-12-05 Akim Demaille <akim@epita.fr>
20730
20731 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
20732 * src/lalr.c: Use them.
20733
20734 2001-12-05 Akim Demaille <akim@epita.fr>
20735
20736 * src/LR0.c (augment_automaton): Formatting changes.
20737 Better variable locality.
20738
20739 2001-12-05 Akim Demaille <akim@epita.fr>
20740
20741 * src/lalr.c (matrix_print): New.
20742 (transpose): Use it.
20743 Use arrays instead of pointers.
20744
20745 2001-12-05 Akim Demaille <akim@epita.fr>
20746
20747 * src/lalr.c (maxrhs): Move to...
20748 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
20749 * src/lalr.c (build_relations): Adjust.
20750
20751 2001-12-05 Akim Demaille <akim@epita.fr>
20752
20753 * src/lalr.c (transpose): Free the memory allocated to the
20754 argument, as it is replaced by the results by the unique caller.
20755 (build_relations): Merely invoke transpose: it handles the memory
20756 deallocation.
20757 Improve variable locality.
20758 Avoid variables used as mere abbreviations.
20759 (compute_lookaheads): Use arrays instead of pointers.
20760
20761 2001-12-05 Akim Demaille <akim@epita.fr>
20762
20763 * src/lalr.c (initialize_F): Improve variable locality.
20764 Avoid variables used as mere abbreviations.
20765
20766 2001-12-05 Akim Demaille <akim@epita.fr>
20767
20768 * src/derives.c (print_derives): Display the ruleno.
20769 * src/lalr.c (initialize_F, transpose): Better variable locality
20770 to improve readability.
20771 Avoid variables used as mere abbreviations.
20772
20773 2001-12-05 Akim Demaille <akim@epita.fr>
20774
20775 * src/lalr.c (traverse): Use arrays instead of pointers.
20776
20777 2001-12-05 Akim Demaille <akim@epita.fr>
20778
20779 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
20780 the handling of squeue.
20781 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
20782
20783 2001-12-05 Akim Demaille <akim@epita.fr>
20784
20785 Because useless nonterminals are now kept alive (instead of being
20786 `destroyed'), we now sometimes examine them, and store information
20787 related to them. Hence we need to know their number, and adjust
20788 memory allocations.
20789
20790 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
20791 static.
20792 * src/LR0.c (allocate_itemsets): The memory allocated to
20793 `symbol_count' was used for two different purpose: once to count
20794 the number of occurrences of each symbol, and later reassigned to
20795 `shift_symbol', containing the symbol that can be shifted from a
20796 given state.
20797 Deobfuscate, i.e., allocate, use and free `symbol_count' here
20798 only, and...
20799 (new_itemsets): Allocate `shift_symbol' here.
20800 (allocate_itemsets): symbol_count includes useless nonterminals.
20801 Make room for them.
20802 (free_storage): Use `free', not `XFREE', for pointers that cannot
20803 be null.
20804
20805 2001-12-05 Akim Demaille <akim@epita.fr>
20806
20807 * src/nullable.c (set_nullable): Deobfuscate the handling of
20808 ritem.
20809 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
20810
20811 2001-12-05 Akim Demaille <akim@epita.fr>
20812
20813 * src/gram.c, src/gram.h (ritem_print): New.
20814 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
20815 (This useless function was defined only to work around VMS linkers
20816 that can't handle compilation units with variables only).
20817 * src/reduce.c (dump_grammar): Use it to trace the construction of
20818 ritem.
20819
20820 2001-12-04 Paul Eggert <eggert@twinsun.com>
20821
20822 * src/bison.simple (union yyalloc): Change member names
20823 to be the same as the stack names.
20824 (yyparse): yyptr is now union yyalloc *, not char *.
20825 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
20826 and may generate better code on some machines.
20827 (yystpcpy): Use prototype if __STDC__ is defined, not just
20828 if __cplusplus is defined.
20829
20830 2001-11-30 Akim Demaille <akim@epita.fr>
20831
20832 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
20833 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
20834 Gettext doesn't compile cleanly, and dies with -Werror.
20835 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
20836 Include WARNING_CFLAGS here.
20837 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
20838 before being defined.
20839
20840 2001-11-27 Paul Eggert <eggert@twinsun.com>
20841
20842 * lib/quotearg.h (quotearg_n, quotearg_n_style):
20843 First arg is int, not unsigned.
20844 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
20845 (SIZE_MAX, UINT_MAX): New macros.
20846 (quotearg_n_options): Abort if N is negative.
20847 Avoid overflow check on hosts where size_t is 64 bits and int
20848 is 32 bits, as overflow is impossible there.
20849 Fix off-by-one typo that caused unnecessary reallocation.
20850
20851 2001-11-29 Paul Eggert <eggert@twinsun.com>
20852
20853 Name space cleanup in generated parser.
20854
20855 * doc/bison.texinfo (Bison Parser): Discuss system headers
20856 and their effect on the user name space.
20857
20858 * src/bison.simple:
20859 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
20860 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
20861 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
20862
20863 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
20864 on user names when possible.
20865
20866 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
20867 Simplify test for whather <alloca.h> exists.
20868
20869 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
20870
20871 (<stdio.h>): Include if YYDEBUG.
20872
20873 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
20874 ! defined (yyoverflow) && ! defined (yymemcpy).
20875
20876 (yymemcpy, yyparse): Rename local variables as needed so that
20877 they all begin with 'yy'.
20878
20879 (yystrlen, yystpcpy): New functions.
20880
20881 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
20882 All uses changed.
20883
20884 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
20885 instead of relying on string.h functions. Use YYSTACK_ALLOC
20886 and YYSTACK_FREE instead of malloc and free.
20887
20888 2001-11-30 Akim Demaille <akim@epita.fr>
20889
20890 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
20891 before their first uses.
20892 (YYBISON, YYPURE): Move to the top of the output.
20893
20894 2001-11-30 Akim Demaille <akim@epita.fr>
20895
20896 * tests/reduce.at (Useless Nonterminals): Fix.
20897
20898 2001-11-30 Akim Demaille <akim@epita.fr>
20899
20900 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
20901 if body instead of `;' to pacify GCC's warnings.
20902
20903 2001-11-30 Akim Demaille <akim@epita.fr>
20904
20905 Instead of mapping the LHS of unused rules to -1, keep the LHS
20906 valid, but flag the rules as invalid.
20907
20908 * src/gram.h (rule_t): `useful' is a new member.
20909 * src/print.c (print_grammar): Adjust.
20910 * src/derives.c (set_derives): Likewise.
20911 * src/reader.c (packgram, reduce_output): Likewise.
20912 * src/reduce.c (reduce_grammar_tables): Likewise.
20913 * tests/reduce.at (Underivable Rules, Useless Rules): New.
20914
20915 2001-11-30 Akim Demaille <akim@epita.fr>
20916
20917 * src/reduce.c (reduce_output): Formatting changes.
20918 * src/print.c (print_results, print_grammar): Likewise.
20919 * tests/regression.at (Rule Line Numbers)
20920 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
20921
20922 2001-11-30 Akim Demaille <akim@epita.fr>
20923
20924 * src/reduce.c (nonterminals_reduce): Instead of throwing away
20925 useless nonterminals, move them at the end of the symbol arrays.
20926 (reduce_output): Adjust.
20927 * tests/reduce.at (Useless Nonterminals): Adjust.
20928
20929 2001-11-30 Akim Demaille <akim@epita.fr>
20930
20931 * src/reduce.c: Various comment/formatting changes.
20932 (nonterminals_reduce): New, extracted from...
20933 (reduce_grammar_tables): here.
20934 (reduce_grammar): Call nonterminals_reduce.
20935
20936 2001-11-29 Paul Eggert <eggert@twinsun.com>
20937
20938 * src/bison.simple (YYSTACK_REALLOC): Remove.
20939 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
20940 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
20941 New macros.
20942 (union yyalloc): New type.
20943 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
20944 an arbitrary restriction on hosts where size_t is wider than int.
20945
20946 (yyparse): Don't dump core if alloca or malloc fails; instead, report
20947 a parser stack overflow. Allocate just one block of memory for all
20948 three stacks, instead of allocating three blocks; this typically is
20949 faster and reduces fragmentation.
20950
20951 Do not limit the number of items in the stack to a value that fits
20952 in 'int', as this is an arbitrary limit on hosts with 64-bit
20953 size_t and 32-bit int.
20954
20955 2001-11-29 Marc Autret <autret_m@epita.fr>
20956
20957 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
20958 of defining YYERROR_VERBOSE.
20959 [AT_DATA]: $4 is now out of C declarations in the prologue.
20960
20961 2001-11-28 Marc Autret <autret_m@epita.fr>
20962
20963 * src/reader.c (parse_dquoted_param): New.
20964 (parse_skel_decl): Use it.
20965 * src/lex.h: Add its prototype.
20966 * src/lex.c (literalchar): Become not static.
20967
20968 2001-11-28 Marc Autret <autret_m@epita.fr>
20969
20970 * src/output.h: And put its extern declaration here.
20971 * src/output.c (error_verbose): Define here.
20972 (prepare): Echo name modification.
20973 * src/getargs.h: Clean its extern declaration.
20974 * src/getargs.c (error_verbose_flag): Remove.
20975 (getargs): Remove case 'e'.
20976 * src/options.c (option_table): 'error-verbose' is now seen as simple
20977 percent option.
20978 Include output.h.
20979
20980 * src/reader.c (read_declarations): Remove case tok_include.
20981 (parse_include_decl): Remove.
20982 * src/lex.h (token_t): Remove tok_include.
20983 * src/options.c (option_table): 'include' is now a simple command line
20984 option.
20985
20986 2001-11-28 Marc Autret <autret_m@epita.fr>
20987
20988 * src/bison.simple: Adjust muscle names.
20989 * src/muscle_tab.c (muscle_init): Also rename the muscles.
20990 * src/output.c (prepare): s/_/-/ for the muscles names.
20991 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
20992
20993 2001-11-28 Marc Autret <autret_m@epita.fr>
20994
20995 * src/bison.simple: Fix debug.
20996 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
20997
20998 2001-11-28 Akim Demaille <akim@epita.fr>
20999
21000 * src/LR0.c (shifts_new): New.
21001 (save_shifts, insert_start_shift, augment_automaton): Use it.
21002
21003 2001-11-28 Akim Demaille <akim@epita.fr>
21004
21005 * src/closure.c (closure): `b' and `ruleno' denote the same value:
21006 keep ruleno only.
21007
21008 2001-11-28 Akim Demaille <akim@epita.fr>
21009
21010 * src/closure.c (closure): Instead of looping over word in array
21011 then bits in words, loop over bits in array.
21012
21013 2001-11-28 Akim Demaille <akim@epita.fr>
21014
21015 * src/closure.c (closure): No longer optimize the special case
21016 where all the bits of `ruleset[r]' are set to 0, to make the code
21017 clearer.
21018
21019 2001-11-28 Akim Demaille <akim@epita.fr>
21020
21021 * src/closure.c (closure): `r' and `c' are new variables, used to
21022 de-obfuscate accesses to RULESET and CORE.
21023
21024 2001-11-28 Akim Demaille <akim@epita.fr>
21025
21026 * src/reduce.c (reduce_print): Use ngettext.
21027 (dump_grammar): Improve the trace accuracy.
21028
21029 2001-11-28 Akim Demaille <akim@epita.fr>
21030
21031 * src/reduce.c (dump_grammar): Don't translate trace messages.
21032
21033 2001-11-28 Akim Demaille <akim@epita.fr>
21034
21035 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
21036 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
21037 as all tags are free'ed afterwards.
21038 From Enrico Scholz.
21039
21040 2001-11-27 Paul Eggert <eggert@twinsun.com>
21041
21042 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
21043 use alloca when we didn't want to, and vice versa.
21044
21045 2001-11-27 Marc Autret <autret_m@epita.fr>
21046
21047 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
21048 initialization.
21049 * src/output.c (prepare): Remove its update.
21050
21051 2001-11-27 Marc Autret <autret_m@epita.fr>
21052
21053 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
21054 Use %error-verbose.
21055
21056 2001-11-27 Marc Autret <autret_m@epita.fr>
21057
21058 * src/bison.simple: Remove YYERROR_VERBOSE using.
21059 Use %%error_verbose.
21060 (yyparse): Likewise.
21061 * src/output.c (prepare): Give its final value.
21062 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
21063 * src/getargs.h: Add its extern declaration.
21064 * src/getargs.c (error_verbose_flag): New int.
21065 (getargs): Update to catch new case.
21066 * src/options.c (option_table): 'error-verbose' is a new option.
21067 (shortopts): Update.
21068
21069 2001-11-27 Akim Demaille <akim@epita.fr>
21070
21071 * src/system.h: Use intl/libgettext.h.
21072 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
21073
21074 2001-11-27 Akim Demaille <akim@epita.fr>
21075
21076 * tests/torture.at (Exploding the Stack Size with Malloc):
21077 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
21078
21079 2001-11-27 Akim Demaille <akim@epita.fr>
21080
21081 * src/files.c: Include error.h.
21082 Reported by Hans Aberg.
21083
21084 2001-11-26 Marc Autret <autret_m@epita.fr>
21085
21086 * src/reader.c (parse_include_decl): New, not yet implemented.
21087 (read_declarations): Add case tok_include.
21088 * src/getargs.h (include): Add its extern definition.
21089 * src/getargs.c (include): New const char *.
21090 (getargs): Add case '-I'.
21091 * src/options.c (option_table): Add include as command line and
21092 percent option.
21093 * src/lex.h (token_t): Add tok_include.
21094
21095 2001-11-26 Akim Demaille <akim@epita.fr>
21096
21097 * src/reader.c (readgram): Make sure rules for mid-rule actions
21098 have a lineno equal to that of their host rule.
21099 Reported by Hans Aberg.
21100 * tests/regression.at (Rule Line Numbers): New.
21101
21102 2001-11-26 Akim Demaille <akim@epita.fr>
21103
21104 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
21105 size_ts.
21106
21107 2001-11-26 Akim Demaille <akim@epita.fr>
21108
21109 * src/complain.c, src/complain.h (error): Remove, provided by
21110 lib/error.[ch].
21111
21112 2001-11-26 Akim Demaille <akim@epita.fr>
21113
21114 * src/reader.c (read_declarations): Don't abort on tok_illegal,
21115 issue an error message.
21116 * tests/regression.at (Invalid %directive): New.
21117 Reported by Hans Aberg.
21118
21119 2001-11-26 Akim Demaille <akim@epita.fr>
21120
21121 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
21122 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
21123
21124 2001-11-26 Akim Demaille <akim@epita.fr>
21125
21126 * src/conflicts.c (conflicts_print): Don't complain at all when
21127 there are no reduce/reduce conflicts, and as many shift/reduce
21128 conflicts as expected.
21129 * tests/regression.at (%expect right): Adjust.
21130
21131 2001-11-23 Akim Demaille <akim@epita.fr>
21132
21133 * lib/alloca.c: Update, from fileutils.
21134
21135 2001-11-23 Akim Demaille <akim@epita.fr>
21136
21137 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
21138
21139 2001-11-23 Akim Demaille <akim@epita.fr>
21140
21141 * src/system.h: Include alloca.h.
21142 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
21143
21144 2001-11-23 Akim Demaille <akim@epita.fr>
21145
21146 * src/print_graph.c (print_actions): Remove `rule', unused.
21147 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
21148 pacify GCC's signed < unsigned warnings.
21149 * src/closure.c (itemsetsize): Likewise.
21150 * src/reader.c (symbol_list_new): Static.
21151
21152 2001-11-23 Akim Demaille <akim@epita.fr>
21153
21154 Attaching lineno to buckets is stupid, since only one copy of each
21155 symbol is kept, only the line of the first occurrence is kept too.
21156
21157 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
21158 * src/reader.c (rline_allocated): Remove, unused.
21159 (symbol_list): Have a `line' member.
21160 (symbol_list_new): New.
21161 (readgram): Use it.
21162 * src/print.c (print_grammar): Output the rule line numbers.
21163 * tests/regression.at (Solved SR Conflicts)
21164 (Unresolved SR Conflicts): Adjust.
21165 Reported by Hans Aberg.
21166
21167 2001-11-22 Marc Autret <autret_m@epita.fr>
21168
21169 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
21170
21171 2001-11-22 Marc Autret <autret_m@epita.fr>
21172
21173 * src/muscle_tab.c (muscle_init): Remove initialization of
21174 skeleton muscle.
21175 * src/output.c (output_master_parser): Do it here.
21176
21177 2001-11-20 Akim Demaille <akim@epita.fr>
21178
21179 * po/sv.po: New.
21180 * configure.in (ALL_LINGUAS): Adjust.
21181 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
21182 longer contains strings to translate.
21183
21184 2001-11-19 Akim Demaille <akim@epita.fr>
21185
21186 * src/conflicts.c (conflicts_print): Add a missing \n.
21187
21188 2001-11-19 Akim Demaille <akim@epita.fr>
21189
21190 * src/nullable.c (nullable_print): New.
21191 (set_nullable): Call it when tracing.
21192 Better locality of variables.
21193
21194 2001-11-19 Akim Demaille <akim@epita.fr>
21195
21196 * src/print.c (print_actions): Better locality of variables.
21197
21198 2001-11-19 Akim Demaille <akim@epita.fr>
21199
21200 * src/derives.c (print_derives): Fix and enrich.
21201 * src/closure.c (print_fderives): Likewise.
21202
21203 2001-11-19 Akim Demaille <akim@epita.fr>
21204
21205 * src/closure.c (itemsetend): Remove, replaced with...
21206 (itemsetsize): new.
21207
21208 2001-11-19 Akim Demaille <akim@epita.fr>
21209
21210 * src/LR0.c (kernel_end): Remove, replaced with...
21211 (kernel_size): new.
21212
21213 2001-11-19 Akim Demaille <akim@epita.fr>
21214
21215 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
21216 to clarify.
21217
21218 2001-11-19 Akim Demaille <akim@epita.fr>
21219
21220 * src/closure.c (closure): Use arrays instead of pointers to clarify.
21221
21222 2001-11-19 Akim Demaille <akim@epita.fr>
21223
21224 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
21225 trace messages.
21226 * src/LR0.c: Likewise.
21227 (allocate_itemsets): Use arrays instead of pointers to clarify.
21228
21229 2001-11-19 Akim Demaille <akim@epita.fr>
21230
21231 * src/getargs.c (statistics_flag): Replace with...
21232 (trace_flag): New.
21233 (longopts): Accept --trace instead of --statistics.
21234 * src/getargs.h, src/options.c: Adjust.
21235 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
21236 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
21237
21238 2001-11-19 Akim Demaille <akim@epita.fr>
21239
21240 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
21241 pointers to clarify the code.
21242 (save_reductions, save_shifts): Factor common parts of alternatives.
21243
21244 2001-11-19 Akim Demaille <akim@epita.fr>
21245
21246 * src/LR0.c (new_state, get_state): Complete TRACE code.
21247 * src/closure.c: Include `reader.h' to get `tags', needed by the
21248 trace code.
21249 Rename the conditional DEBUG as TRACE.
21250 Output consistently TRACEs to stderr, not stdout.
21251 * src/derives.c: Likewise.
21252 * src/reduce.c: (inaccessable_symbols): Using if is better style
21253 than goto.
21254 Use `#if TRACE' instead of `#if 0' for tracing code.
21255
21256 2001-11-19 Akim Demaille <akim@epita.fr>
21257
21258 * src/system.h (LIST_FREE, shortcpy): New.
21259 * src/LR0.c: Use them.
21260 * src/output.c (free_itemsets, free_reductions, free_shifts):
21261 Remove, replaced by LIST_FREE.
21262
21263 2001-11-19 Akim Demaille <akim@epita.fr>
21264
21265 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
21266 (REDUCTIONS_ALLOC): New.
21267 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
21268 allocation.
21269
21270 2001-11-19 Akim Demaille <akim@epita.fr>
21271
21272 * src/LR0.c (new_state): Complete trace code.
21273 * src/nullable.c (set_nullable): Don't translate traces.
21274
21275 2001-11-19 Akim Demaille <akim@epita.fr>
21276
21277 * src/print_graph.c (print_core): Better locality of variables.
21278 * src/print.c (print_core): Likewise.
21279
21280 2001-11-19 Akim Demaille <akim@epita.fr>
21281
21282 * src/vcg.c: You do the output, so you are responsible of the
21283 handling of VCG syntax, in particular: use quotearg.
21284 * src/print_graph.c: Don't.
21285 (print_actions): Don't output the actions as part of the nodes,
21286 since that's the job of the edges.
21287 (print_state): Don't output by hand: fill the node description,
21288 and ask for its output.
21289
21290 2001-11-19 Akim Demaille <akim@epita.fr>
21291
21292 * src/bison.simple (yyparse): When verbosely reporting an error,
21293 no longer put additional quotes around token names.
21294 * tests/calc.at: Adjust.
21295
21296 2001-11-19 Akim Demaille <akim@epita.fr>
21297
21298 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
21299 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
21300 * src/output.c: Adjust.
21301
21302 2001-11-19 Akim Demaille <akim@epita.fr>
21303
21304 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
21305 (rule_t): this.
21306 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
21307
21308 2001-11-19 Akim Demaille <akim@epita.fr>
21309
21310 * src/gram.h (rule_t): New.
21311 (rule_table): New.
21312 (rrhs, rlhs): Remove, part of state_t.
21313 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
21314 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
21315 * src/reader.c, src/reduce.c: Adjust.
21316
21317 2001-11-19 Akim Demaille <akim@epita.fr>
21318
21319 * src/reader.c (symbols_output): New, extracted from...
21320 (packsymbols): Here.
21321 (reader): Call it.
21322
21323 2001-11-19 Akim Demaille <akim@epita.fr>
21324
21325 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
21326 (maxrhs): this new function.
21327
21328 2001-11-19 Akim Demaille <akim@epita.fr>
21329
21330 * src/lalr.c (F): New macro to access the variable F.
21331 Adjust.
21332
21333 2001-11-19 Akim Demaille <akim@epita.fr>
21334
21335 * src/lalr.h (LA): New macro to access the variable LA.
21336 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
21337 * src/lalr.c: Adjust.
21338
21339 2001-11-19 Akim Demaille <akim@epita.fr>
21340
21341 * src/lalr.c (initialize_LA): Only initialize LA. Let...
21342 (set_state_table): handle the `lookaheads' members.
21343
21344 2001-11-19 Akim Demaille <akim@epita.fr>
21345
21346 * src/lalr.h (lookaheads): Removed array, whose contents is now
21347 a member of...
21348 (state_t): this structure.
21349 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
21350 Adjust.
21351
21352 2001-11-19 Akim Demaille <akim@epita.fr>
21353
21354 * src/lalr.h (consistent): Removed array, whose contents is now
21355 a member of...
21356 (state_t): this structure.
21357 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
21358 Adjust.
21359
21360 2001-11-19 Akim Demaille <akim@epita.fr>
21361
21362 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
21363 contents are now members of...
21364 (state_t): this structure.
21365 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
21366 Adjust.
21367
21368 2001-11-19 Akim Demaille <akim@epita.fr>
21369
21370 * src/lalr.h (state_t): New.
21371 (state_table): Be a state_t * instead of a core **.
21372 (accessing_symbol): Remove, part of state_t.
21373 * src/lalr.c: Adjust.
21374 (set_accessing_symbol): Merge into...
21375 (set_state_table): this.
21376 * src/print_graph.c, src/conflicts.c: Adjust.
21377
21378 2001-11-14 Akim Demaille <akim@epita.fr>
21379
21380 * tests/calc.at, tests/output.at, tests/regression.at,
21381 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
21382 now the tests are run in private dirs, therefore AC_CLEANUP and
21383 family can be simplified to 0-ary.
21384 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
21385 use abs. path to find config.h.
21386 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
21387 stderr, there can be way too much random noise.
21388 Instead pass -Werror to GCC and rely on the exit status.
21389 Reported by Wolfram Wagner.
21390
21391 2001-11-14 Akim Demaille <akim@epita.fr>
21392
21393 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
21394 defined only if yyoverflow is defined, to avoid `warning: unused
21395 variable `yyvs1''.
21396 Reported by The Test Suite.
21397
21398 2001-11-14 Akim Demaille <akim@epita.fr>
21399
21400 * src/print.c: Include reduce.h.
21401 Reported by Hans Aberg.
21402
21403 2001-11-14 Akim Demaille <akim@epita.fr>
21404
21405 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
21406 Revert a previous patch: these are really const.
21407 * src/conflicts.c (conflict_report): Additional useless pair of
21408 braces to pacify GCC's warnings for `if () if () {} else {}'.
21409 * src/lex.c (parse_percent_token): Replace equal_offset with
21410 arg_offset.
21411 arg is const.
21412 Be sure to strdup `arg' when used, since there is no reason for
21413 token_buffer not to change.
21414
21415 2001-11-14 Akim Demaille <akim@epita.fr>
21416
21417 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
21418 definition.
21419 * src/main.c (main): Use them.
21420 Suggested by Hans Aberg.
21421
21422 2001-11-12 Akim Demaille <akim@epita.fr>
21423
21424 * src/system.h (ngettext): Now that we use ngettext, be sure to
21425 provide a default definition when NLS are not used.
21426
21427 2001-11-12 Akim Demaille <akim@epita.fr>
21428
21429 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
21430 Use @kbd to denote user input.
21431 (Language and Grammar): ANSIfy the example.
21432 Adjust its layout for info/notinfo.
21433 (Location Tracking Calc): Output error messages to stderr.
21434 Output locations in a more GNUtically correct way.
21435 Fix a couple of Englishos.
21436 Adjust @group/@end group pairs.
21437
21438 2001-11-12 Akim Demaille <akim@epita.fr>
21439
21440 %expect was not functioning at all.
21441
21442 * src/conflicts.c (expected_conflicts): Set to -1.
21443 (conflict_report): Use ngettext.
21444 (conflicts_print): Check %expect and make its violation an error.
21445 * doc/bison.texinfo (Expect Decl): Adjust.
21446 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
21447 * tests/regression.at (%expect not enough, %expect right)
21448 (%expect too much): New.
21449
21450 2001-11-12 Akim Demaille <akim@epita.fr>
21451
21452 * tests/regression.at (Conflicts): Rename as...
21453 (Unresolved SR Conflicts): this.
21454 (Solved SR Conflicts): New.
21455
21456 2001-11-12 Akim Demaille <akim@epita.fr>
21457
21458 * src/reduce.c (print_results): Rename as...
21459 (reduce_output): This.
21460 Output to OUT, passed as argument, instead of output_obstack.
21461 (dump_grammar): Likewise.
21462 (reduce_free): New.
21463 Also free V1.
21464 (reduce_grammar): No longer call reduce_output, since...
21465 * src/print.c (print_results): do it.
21466 * src/main.c (main): Call reduce_free;
21467
21468 2001-11-12 Akim Demaille <akim@epita.fr>
21469
21470 * src/conflicts.c (print_reductions): Accept OUT as argument.
21471 Output to it, not to output_obstack.
21472 * src/print.c (print_actions): Adjust.
21473
21474 2001-11-12 Akim Demaille <akim@epita.fr>
21475
21476 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
21477 the result instead of using...
21478 (src_total, rrc_total, src_count, rrc_count): Remove.
21479 (any_conflicts): Remove.
21480 (print_conflicts): Split into...
21481 (conflicts_print, conflicts_output): New.
21482 * src/conflicts.h: Adjust.
21483 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
21484 * src/print.c (print_grammar): Issue `\n' between two rules.
21485 * tests/regression.at (Conflicts): New.
21486 Reported by Tom Lane.
21487
21488 2001-11-12 Akim Demaille <akim@epita.fr>
21489
21490 * tests/regression.at (Invalid input): Remove, duplicate with
21491 ``Invalid input: 1''.
21492
21493 2001-11-12 Akim Demaille <akim@epita.fr>
21494
21495 * tests/torture.at (AT_DATA_STACK_TORTURE)
21496 (Exploding the Stack Size with Alloca)
21497 (Exploding the Stack Size with Malloc): New.
21498
21499 2001-11-12 Akim Demaille <akim@epita.fr>
21500
21501 * src/bison.simple (YYSTACK_REALLOC): New.
21502 (yyparse) [!yyoverflow]: Use it and free the old stack.
21503 Reported by Per Allansson.
21504
21505 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
21506
21507 * src/bison.simple: Define type yystype instead of YYSTYPE, and
21508 define CPP macro, which substitute YYSTYPE by yystype.
21509 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
21510 with yyltype/YYLTYPE. This allows inclusion of the generated
21511 header within the parser if the compiler, such as GGC, accepts
21512 multiple equivalent #defines.
21513 From Akim.
21514
21515 2001-11-05 Akim Demaille <akim@epita.fr>
21516
21517 * src/reader.c (symbols_output): New, extracted from...
21518 (packsymbols): here.
21519 (reader): Adjust.
21520
21521 2001-11-05 Akim Demaille <akim@epita.fr>
21522
21523 * src/lex.c (parse_percent_token): s/quotearg/quote/.
21524
21525 2001-11-05 Akim Demaille <akim@epita.fr>
21526
21527 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
21528 pattern.
21529
21530 2001-11-05 Akim Demaille <akim@epita.fr>
21531
21532 * src/options.h (struct option_table_struct): set_flags is void*.
21533 * src/options.c (longopts): Support `--output' and `%output'.
21534 (usage): Adjust.
21535 * src/lex.h (tok_setopt): Remove, replaced with...
21536 (tok_intopt, tok_stropt): these new guys.
21537 * src/lex.c (getopt.h): Not needed.
21538 (token_buffer, unlexed_token_buffer): Not const.
21539 (percent_table): Promote `-' over `_' in directive names.
21540 Active `%name-prefix', `file-prefix', and `output'.
21541 (parse_percent_token): Accept possible arguments to directives.
21542 Promote `-' over `_' in directive names.
21543
21544 2001-11-04 Akim Demaille <akim@epita.fr>
21545
21546 * doc/bison.texinfo (Decl Summary): Split the list into
21547 `directives for grammars' and `directives for bison'.
21548 Sort'em.
21549 Add description of `%name-prefix', `file-prefix', and `output'.
21550 Promote `-' over `_' in directive names.
21551 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
21552 Simplify the description of `--name-prefix'.
21553 Promote `-' over `_' in directive names.
21554 Promote `--output' over `--output-file'.
21555 Fix the description of `--defines'.
21556 * tests/output.at: Exercise %file-prefix and %output.
21557
21558 2001-11-02 Akim Demaille <akim@epita.fr>
21559
21560 * doc/refcard.tex: Update.
21561
21562 2001-11-02 Akim Demaille <akim@epita.fr>
21563
21564 * src/symtab.h (SUNDEF): New.
21565 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
21566 stand for `uninitialized', instead of 0.
21567 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
21568 * src/lex.c (lex): Adjust.
21569
21570 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
21571 Number it 0.
21572 Let yylex return it instead of a plain 0.
21573 Reported by Dick Streefland.
21574
21575 2001-11-02 Akim Demaille <akim@epita.fr>
21576
21577 * tests/regression.at (Mixing %token styles): New test.
21578
21579 2001-11-02 Akim Demaille <akim@epita.fr>
21580
21581 * src/reader.c (parse_thong_decl): Formatting changes.
21582 (token_translations_init): New, extracted from...
21583 (packsymbols): Here.
21584 Adjust.
21585
21586 2001-11-01 Akim Demaille <akim@epita.fr>
21587
21588 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
21589 Check that `9foo.y' produces correct cpp guards.
21590 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
21591 guards.
21592 Reported by Wwp.
21593
21594 2001-11-01 Akim Demaille <akim@epita.fr>
21595
21596 * tests/regression.at (Invalid input: 2): New.
21597 * src/lex.c (unlexed_token_buffer): New.
21598 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
21599 too.
21600 Reported by Wwp.
21601
21602 2001-11-01 Akim Demaille <akim@epita.fr>
21603
21604 * tests/calc.at: Catch up with 1.30.
21605 * configure.in: Bump to 1.49a.
21606 Adjust to newer Autotest.
21607
21608 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
21609
21610 * src/conflicts.c: Move global variables rrc_total and src_total ...
21611 (print_conflicts): here.
21612 * src/output.c (output): Free global variable user_toknums.
21613 * src/lex.c (token_obstack): Become static.
21614
21615 2001-10-18 Akim Demaille <akim@epita.fr>
21616
21617 * tests/atlocal.in (GCC): Add.
21618 * tests/calc.at: s/m4_match/m4_bmatch/.
21619 s/m4_patsubst/m4_bpatsubst/.
21620 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
21621 * configure.in: AC_SUBST(GCC).
21622
21623 2001-10-14 Marc Autret <autret_m@epita.fr>
21624
21625 * src/options.c (create_long_option_table): Fix.
21626
21627 2001-10-10 Akim Demaille <akim@epita.fr>
21628
21629 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
21630
21631 2001-10-04 Akim Demaille <akim@epita.fr>
21632
21633 * src/reader.c (parse_union_decl): Push the caracters in
21634 union_obstack, not attrs_obstack.
21635
21636 2001-10-04 Akim Demaille <akim@epita.fr>
21637
21638 Merge in the branch 1.29.
21639
21640 * src/reader.c (packsymbols): Use a temporary obstack for
21641 `%%tokendef', since output_stack is already used elsewhere.
21642
21643 2001-10-02 Akim Demaille <akim@epita.fr>
21644
21645 Bump 1.29d.
21646
21647 2001-10-02 Akim Demaille <akim@epita.fr>
21648
21649 Version 1.29c.
21650
21651 2001-10-02 Akim Demaille <akim@epita.fr>
21652
21653 * tests/regression.at (Invalid CPP headers): New.
21654 From Alexander Belopolsky.
21655 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
21656
21657 2001-10-02 Akim Demaille <akim@epita.fr>
21658
21659 * tests/regression.at (Invalid input): New.
21660 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
21661 Reported by Shura.
21662
21663 2001-10-02 Akim Demaille <akim@epita.fr>
21664
21665 * tests/calc.at: Now that --debug works, the tests must be adjusted.
21666
21667 2001-10-02 Akim Demaille <akim@epita.fr>
21668
21669 * src/output.c (output_parser): Assert `skeleton'.
21670 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
21671 systems.
21672 From Shura.
21673
21674 2001-10-01 Marc Autret <autret_m@epita.fr>
21675
21676 * src/lex.h: Echo modifications.
21677 * src/lex.c (unlex): Parameter is now token_t.
21678 From Hans Aberg.
21679
21680 2001-10-01 Marc Autret <autret_m@epita.fr>
21681
21682 * src/main.c: Include lex.h.
21683 From Hans Aberg.
21684
21685 2001-09-29 Akim Demaille <akim@epita.fr>
21686
21687 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
21688
21689 2001-09-28 Akim Demaille <akim@epita.fr>
21690
21691 * tests/testsuite.at: Update to newer Autotest.
21692 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
21693
21694 2001-09-27 Akim Demaille <akim@epita.fr>
21695
21696 Position independent wrapper.
21697
21698 * tests/bison: Remove.
21699 * tests/bison.in: New.
21700 * configure.in: Adjust.
21701
21702 2001-09-27 Paul Eggert <eggert@twinsun.com>
21703
21704 Port quotearg fixes from tar 1.13.24.
21705
21706 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
21707 tm to be declared.
21708 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
21709 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
21710
21711 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
21712 * m4/mbrtowc.m4: New file.
21713 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
21714 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
21715
21716 2001-09-27 Akim Demaille <akim@epita.fr>
21717
21718 Bump to 1.29c.
21719
21720 2001-09-27 Akim Demaille <akim@epita.fr>
21721
21722 Version 1.29b.
21723
21724 2001-09-25 Akim Demaille <akim@epita.fr>
21725
21726 * src/system.h: Include `xalloc.h'.
21727 Remove it from the C files.
21728 * src/files.c (output_files): Free the obstacks.
21729 * src/lex.c (init_lex): Rename as...
21730 (lex_init): this.
21731 (lex_free): New.
21732 * src/main.c (main): Use it.
21733
21734 2001-09-24 Marc Autret <autret_m@epita.fr>
21735
21736 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
21737 to output informations in fout (FILE*).
21738 (open_graph, close_graph): Likewise.
21739 (output_graph, output_edge, output_node): Likewise.
21740 * src/vcg.h: Update function prototypes.
21741 * src/print_graph.c (print_graph): Open output graph file.
21742 (print_actions): Adjust.
21743 * src/files.h: Remove extern declaration.
21744 * src/files.c: Remove graph_obstack declaration.
21745 (open_files): Remove graph_obstack initialization.
21746 (output_files): Remove graph_obstack saving.
21747
21748 2001-09-24 Marc Autret <autret_m@epita.fr>
21749
21750 * src/files.c (compute_output_file_names): Fix.
21751
21752 2001-09-24 Marc Autret <autret_m@epita.fr>,
21753 Akim Demaille <akim@epita.fr>
21754
21755 * src/reader.c (reader): Remove call to free_symtab ().
21756 * src/main.c (main): Call it here.
21757 Include symtab.h.
21758 * src/conflicts.c (initialize_conflicts): Rename as...
21759 (solve_conflicts): this.
21760 * src/print.c (print_core, print_actions, print_state)
21761 (print_grammar): Dump to a file instead a `output_obstack'.
21762 (print_results): Dump `output_obstack', and then proceed with the
21763 FILE *.
21764 * src/files.c (compute_output_file_names, close_files): New.
21765 (output_files): Adjust.
21766 * src/main.c (main): Adjust.
21767
21768 2001-09-23 Marc Autret <autret_m@epita.fr>
21769
21770 * src/files.c (compute_header_macro): Computes header macro name
21771 from spec_defines_file when given.
21772
21773 2001-09-23 Marc Autret <autret_m@epita.fr>
21774
21775 * src/files.c (output_files): Add default extensions.
21776
21777 2001-09-22 Akim Demaille <akim@epita.fr>
21778
21779 * src/conflicts.c (finalize_conflicts): Rename as...
21780 (free_conflicts): this.
21781
21782 2001-09-22 Akim Demaille <akim@epita.fr>
21783
21784 * src/gram.c (gram_free): Rename back as...
21785 (dummy): this.
21786 (output_token_translations): Free `token_translations'.
21787 * src/symtab.c (free_symtab): Free the tag field.
21788
21789 2001-09-22 Akim Demaille <akim@epita.fr>
21790
21791 Remove `translations' as it is always set to true.
21792
21793 * src/gram.h: Adjust.
21794 * src/reader.c (packsymbols, parse_token_decl): Adjust
21795 * src/print.c (print_grammar): Adjust.
21796 * src/output.c (output_token_translations): Adjust.
21797 * src/lex.c (lex): Adjust.
21798 * src/gram.c: Be sure the set pointers to NULL.
21799 (dummy): Rename as...
21800 (gram_free): this.
21801
21802 2001-09-22 Akim Demaille <akim@epita.fr>
21803
21804 * configure.in: Invoke AM_LIB_DMALLOC.
21805 * src/system.h: Use dmalloc.
21806 * src/LR0.c: Be sure to have pointers initialized to NULL.
21807 (allocate_itemsets): Allocate kernel_items only if needed.
21808
21809 2001-09-22 Akim Demaille <akim@epita.fr>
21810
21811 * configure.in: Bump to 1.29b.
21812 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
21813 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
21814 need xmalloc.c in calc.y.
21815 From Pascal Bart.
21816
21817 2001-09-21 Akim Demaille <akim@epita.fr>
21818
21819 Version 1.29a.
21820 * Makefile.maint, config/config.guess, config/config.sub,
21821 * config/missing: Update from masters.
21822 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
21823 upon package.m4.
21824 * configure.in (ALL_LINGUAS): Add `tr'.
21825
21826 2001-09-21 Akim Demaille <akim@epita.fr>
21827
21828 * tests/Makefile.am (package.m4): Move to...
21829 ($(srcdir)/$(TESTSUITE)): here.
21830
21831 2001-09-20 Akim Demaille <akim@epita.fr>
21832
21833 * src/complain.c: No longer try to be standalone: use system.h.
21834 Don't assume __STDC__ is defined to 1. Just test if it is defined.
21835 * src/complain.h: Likewise.
21836 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
21837 Remove the unused variable `n'.
21838 From Albert Chin-A-Young.
21839
21840 2001-09-18 Marc Autret <autret_m@epita.fr>
21841
21842 * doc/bison.1: Update.
21843 * doc/bison.texinfo (Bison Options): Update --defines and --graph
21844 descriptions.
21845 (Option Cross Key): Update.
21846 Add --graph.
21847
21848 2001-09-18 Marc Autret <autret_m@epita.fr>
21849
21850 * tests/regression.at: New test (comment in %union).
21851
21852 2001-09-18 Marc Autret <autret_m@epita.fr>
21853
21854 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
21855 do that.
21856 Reported by Keith Browne.
21857
21858 2001-09-18 Marc Autret <autret_m@epita.fr>
21859
21860 * tests/output.at: Add tests for --defines and --graph.
21861
21862 2001-09-18 Marc Autret <autret_m@epita.fr>
21863
21864 * tests/output.at: Removes tests of %{header,src}_extension features.
21865
21866 2001-09-18 Akim Demaille <akim@epita.fr>
21867
21868 * tests/Makefile.am (package.m4): New.
21869 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
21870 (_AT_CHECK_CALC_ERROR): Likewise.
21871 Factor the `, ' part of verbose error messages.
21872
21873 2001-09-18 Marc Autret <autret_m@epita.fr>
21874
21875 * src/getargs.c (longopts): Declare --defines and --graph as options
21876 with optional arguments.
21877 * src/files.h: Add extern declarations.
21878 * src/files.c (spec_graph_file, spec_defines_file): New.
21879 (output_files): Update.
21880 Remove CPP-outed code.
21881
21882 2001-09-18 Marc Autret <autret_m@epita.fr>
21883
21884 Turn off %{source,header}_extension feature.
21885
21886 * src/files.c (compute_exts_from_gf): Update.
21887 (compute_exts_from_src): Update.
21888 (output_files): CPP-out useless code.
21889 * src/files.h: Remove {header,source}_extension extern declarations.
21890 * src/reader.c (parse_dquoted_param): CPP-out.
21891 (parse_header_extension_decl): Remove.
21892 (parse_source_extension_decl): Remove.
21893 (read_declarations): Remove cases tok_{hdrext,srcext}.
21894 * src/lex.c (percent_table): Remove {header,source}_extension entries.
21895 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
21896
21897 2001-09-10 Akim Demaille <akim@epita.fr>
21898
21899 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
21900 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
21901 (AT_CHECK_OUTPUT): this.
21902 Merely check ls' exit status, its output is useless.
21903
21904 2001-09-10 Akim Demaille <akim@epita.fr>
21905
21906 * tests/calc.at: Use m4_match.
21907 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
21908
21909 2001-09-10 Marc Autret <autret_m@epita.fr>,
21910 Akim Demaille <akim@epita.fr>
21911
21912 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
21913 enum color_e.
21914 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
21915 to `normal'.
21916 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
21917 * src/lex.h: Adjust prototype.
21918 (token_t): Add `tok_undef'.
21919 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
21920 (parse_percent_token): Now returns token_t.
21921 Add default statement in switch.
21922 (lex): Separate `c' as an input variable, from the token_t result
21923 part.
21924 (unlexed): Is a token_t.
21925
21926 2001-09-10 Akim Demaille <akim@epita.fr>
21927
21928 * configure.in: Bump to 1.29a.
21929
21930 2001-09-07 Akim Demaille <akim@epita.fr>
21931
21932 Version 1.29.
21933
21934 2001-08-30 Akim Demaille <akim@epita.fr>
21935
21936 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
21937 * m4/atconfig.m4: Remove.
21938 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
21939 * tests/bison: New.
21940 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
21941 m4_if, m4_patsubst, and m4_regexp.
21942 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
21943 `input' file instead of echo.
21944
21945 2001-08-29 Akim Demaille <akim@epita.fr>
21946
21947 Bump to 1.28e.
21948
21949 2001-08-29 Akim Demaille <akim@epita.fr>
21950
21951 Version 1.28d.
21952
21953 2001-08-29 Paul Eggert <eggert@twinsun.com>
21954
21955 * src/bison.simple (yyparse): Don't take the address of an
21956 item before the start of an array, as that doesn't conform to
21957 the C Standard.
21958
21959 2001-08-29 Robert Anisko <anisko_r@epita.fr>
21960
21961 * doc/bison.texinfo (Location Tracking Calc): New node.
21962
21963 2001-08-29 Paul Eggert <eggert@twinsun.com>
21964
21965 * src/output.c (output): Do not define const, as this now
21966 causes more problems than it cures.
21967
21968 2001-08-29 Akim Demaille <akim@epita.fr>
21969
21970 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
21971 the nodes.
21972 Be sure to tag the `detailmenu'.
21973
21974 2001-08-29 Akim Demaille <akim@epita.fr>
21975
21976 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
21977 download in a tmp dir.
21978
21979 2001-08-28 Marc Autret <autret_m@epita.fr>
21980
21981 * config/depcomp: New file.
21982
21983 2001-08-28 Marc Autret <autret_m@epita.fr>
21984
21985 * doc/bison.1 (mandoc): Adjust.
21986 From Juan Manuel Guerrero.
21987
21988 2001-08-28 Marc Autret <autret_m@epita.fr>
21989
21990 * src/print_graph.c (print_state): Fix.
21991
21992 2001-08-27 Marc Autret <autret_m@epita.fr>
21993
21994 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
21995 char * members.
21996 Echo modifications to the functions prototypes.
21997 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
21998
21999 2001-08-27 Marc Autret <autret_m@epita.fr>
22000
22001 * src/vcg.c: Include `xalloc.h'.
22002 (add_colorentry): New.
22003 (add_classname): New.
22004 (add_infoname): New.
22005 * src/vcg.h: Add new prototypes.
22006
22007 2001-08-27 Akim Demaille <akim@epita.fr>
22008
22009 * Makefile.maint: Sync. again with CVS Autoconf.
22010
22011 2001-08-27 Akim Demaille <akim@epita.fr>
22012
22013 * Makefile.maint: Formatting changes.
22014 (po-update, cvs-update, update): New targets.
22015 (AMTAR): Remove.
22016
22017 2001-08-27 Akim Demaille <akim@epita.fr>
22018
22019 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
22020 * Makefile.maint: Sync. with CVS Autoconf.
22021
22022 2001-08-27 Marc Autret <autret_m@epita.fr>
22023
22024 * src/vcg.h (struct infoname_s): New.
22025 (struct colorentry_s): New.
22026 (graph_s): New fields {vertical,horizontal}_order in structure.
22027 Add `infoname' field.
22028 Add `colorentry' field;
22029 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
22030 (G_HORIZONTAL_ORDER): New.
22031 (G_INFONAME): New.
22032 (G_COLORENTRY): New.
22033 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
22034 Add output of `infoname'.
22035 Add output of `colorentry'.
22036
22037 2001-08-27 Marc Autret <autret_m@epita.fr>
22038
22039 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
22040 This one shadowed a global parameter.
22041
22042 2001-08-24 Marc Autret <autret_m@epita.fr>
22043
22044 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
22045 instead of `unsigned'.
22046 (print_state): Do not call obstack_object_size () in obstack_grow ()
22047 to avoid macro variables shadowing.
22048
22049 2001-08-23 Marc Autret <autret_m@epita.fr>
22050
22051 * src/lex.c (percent_table): Typo: s/naem/name/.
22052 Add graph option.
22053 Normalize new options declarations.
22054
22055 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
22056
22057 * tests/suite.at: Exercise %header_extension and %source_extension.
22058
22059 2001-08-16 Marc Autret <autret_m@epita.fr>
22060
22061 * src/reader.c (parse_dquoted_param): New.
22062 (parse_header_extension_decl): Use it.
22063 (parse_source_extension_decl): Likewise.
22064
22065 2001-08-16 Marc Autret <autret_m@epita.fr>
22066
22067 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
22068 (get_xxxx_str): Use assert () instead of complain ().
22069 Remove return invokations in default cases.
22070 (get_decision_str): Modify default behaviour. Remove second argument.
22071 Echo modifications on calls.
22072 (output_graph): Fix.
22073
22074 2001-08-16 Marc Autret <autret_m@epita.fr>
22075
22076 * src/getargs.c (usage): Update with ``-g, --graph''.
22077
22078 2001-08-16 Marc Autret <autret_m@epita.fr>
22079
22080 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
22081 (Option Cross Key): Likewise.
22082 * doc/bison.1: Update.
22083
22084 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
22085
22086 * src/output.c (output_master_parser): Don't finish action_obstack.
22087 (output_parser): Don't care about the muscle action, here.
22088 (prepare): Copy the action_obstack in the action muscle.
22089 (output): Free action_obstack.
22090
22091 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
22092
22093 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
22094 will contain `%union' declaration.
22095 (parse_union_decl): Delete #line directive output.
22096 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
22097 informations about %union.
22098 (parse_union_decl): Copy the union_obstack in the muscle stype.
22099 * src/bison.simple: Add new #line directive.
22100 Add typdef %%stype YYSTYPE.
22101
22102 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
22103
22104 * src/bison.simple: Add new `#line' directive.
22105
22106 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
22107
22108 * src/bison.simple: New `#line' directive.
22109 * src/output.c (output_parser): Support new dynamic muscle input_line.
22110
22111 2001-09-22 Marc Autret <autret_m@epita.fr>
22112
22113 * src/output.c (output_master_parser): New.
22114 (output_parser): Be more re-entrant.
22115
22116 2001-09-21 Marc Autret <autret_m@epita.fr>
22117
22118 * src/reader.c (copy_definition, parse_union_decl): Update and use
22119 `linef' muscle.
22120 (copy_action): Likewise.
22121 Use obstack_1grow ().
22122 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
22123
22124 2001-09-21 Marc Autret <autret_m@epita.fr>
22125
22126 * src/options.c (option_table): Adjust.
22127 * src/lex.c (parse_percent_token): Fix.
22128
22129 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
22130
22131 * src/options.c (symtab.h): Include it, need by lex.h.
22132
22133 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
22134
22135 * src/lex.c (parse_percent_token): Change type of variable `tx', which
22136 is now an option_table_struct*.
22137 (option_strcmp): New function option_strcmp.
22138 (parse_percent_token): Call option_strcmp.
22139 * src/getargs.c (xalloc.h, options.h): Include it.
22140 (getargs): Call create_long_option_table.
22141 (getargs): Free longopts at the end of the function.
22142 (shortopts): Move in options.c.
22143 * src/options.c (create_long_option_table): New function. Convert
22144 information from option_table to option structure.
22145 * src/reader.c (options.h): Include it.
22146
22147 * src/Makefile.am: Adjust.
22148 * src/options.c (option_table): Create from longopts and percent_table.
22149 * src/getargs.c (longopts): Delete.
22150 * src/lex.c (struct percent_table_struct): Delete.
22151 (percent_table): Delete.
22152 (options.h): Include it.
22153 * src/options.c: Create.
22154 * src/options.h: Create.
22155 Declare enum opt_access_e.
22156 Define struct option_table_struct.
22157
22158 2001-09-20 Marc Autret <autret_m@epita.fr>
22159
22160 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
22161 sections of Bison.
22162
22163 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
22164
22165 * src/bison.simple: s/%%filename/%%skeleton.
22166 * src/muscle_tab.c (getargs.h): Include it.
22167 (muscle_init): Insert new muscle skeleton.
22168
22169 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
22170
22171 * src/output.c (output_parser): Delete unused variable actions_dumped.
22172
22173 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
22174
22175 * src/output.c (output): Delete call to reader_output_yylsp.
22176 * src/reader.c (reader): Likewise.
22177 * src/reader.h: Delete declaration of reader_output_yylsp.
22178
22179 2001-09-02 Marc Autret <autret_m@epita.fr>
22180
22181 * src/reader.c: Include muscle_tab.h.
22182 (parse_union_decl): Update.
22183 (parse_macro_decl): Rename parse_muscle_decl.
22184 Update to use renamed functions and variable.
22185 (read_declarations, copy_action, read_additionnal_code, : Updated
22186 with correct variables and functions names.
22187 (packsymbols, reader): Likewise.
22188
22189 * src/reader.h (muscle_obstack): Extern declaration update.
22190
22191 * src/output.c: Include muscle_tab.h
22192 In all functions using macro_insert, change by using muscle_insert ().
22193 (macro_obstack): Rename muscle_obstack.
22194 Echo modifications in the whole file.
22195 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
22196 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
22197 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
22198
22199 * src/muscle_tab.h: Update double inclusion macros.
22200 (macro_entry_s): Rename muscle_entry_s.
22201 Update prototypes.
22202
22203 * src/muscle_tab.c: Include muscle_tab.h.
22204 Rename macro_tabble to muscle_table.
22205 (mhash1, mhash2, mcmp): Use muscle_entry.
22206 (macro_init): Rename muscle_init. Update.
22207 (macro_insert): Rename muscle_insert. Update.
22208 (macro_find): Rename muscle_find. Update.
22209
22210 * src/main.c: Include muscle_tab.h.
22211 (main): Call muscle_init ().
22212 * src/Makefile.am (bison_SOURCES): Echo modifications.
22213
22214 2001-09-02 Marc Autret <autret_m@epita.fr>
22215
22216 Now the files macro_tab.[ch] are named muscle_tab.[ch].
22217
22218 * src/muscle_tab.c, src/muscle_tab.h: Add files.
22219
22220 2001-09-02 Marc Autret <autret_m@epita.fr>
22221
22222 * src/macrotab.c, src/macrotab.h: Remove.
22223
22224 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
22225
22226 * src/reader.c (copy_guard): Use muscle to specify the `#line'
22227 filename.
22228
22229 2001-09-01 Marc Autret <autret_m@epita.fr>
22230
22231 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
22232 to an explicit value to activate the feature. We do it here.
22233
22234 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
22235
22236 * src/output.c (prepare): Delete the `filename' muscule insertion.
22237 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
22238 (parse_union_decl): Likewise.
22239 * src/macrotab.c (macro_init): Initialize filename by infile.
22240
22241 2001-08-31 Marc Autret <autret_m@epita.fr>
22242
22243 * src/bison.simple (YYLSP_NEEDED): New definition.
22244 * src/output.c (prepare): Add macro insertion of `locations_flag'
22245
22246 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
22247
22248 * src/output.c (prepare): Delete insertion of previous muscles,
22249 and insert the `prefix' muscles.
22250 * src/macrotab.c (macro_init): Likewise.
22251 (macro_init): Initialization prefix directive by `yy'.
22252 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
22253 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
22254 yylval, yydebug, yyerror, yynerrs and yyparse.
22255 New directive `#define' to substitute yydebug, ... with option
22256 name_prefix.
22257
22258 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
22259
22260 * src/main.c (main): Standardize.
22261 * src/output.c (output_table_data, output_parser): Likewise.
22262 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
22263
22264 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
22265
22266 * src/reader.c (read_additionnal_code): Rename %%user_code to
22267 %%epilogue.
22268 * src/output.c (output): Rename %%declarations to %%prologue.
22269 * src/bison.simple: Echo modifications.
22270
22271 2001-08-31 Marc Autret <autret_m@epita.fr>
22272
22273 * src/reader.c (readgram): CleanUp.
22274 (output_token_defines): Likewise.
22275 (packsymbols): Likewise.
22276 (reader): Likewise.
22277 * src/output.c (output): CPP-out useless code.
22278
22279 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
22280
22281 * src/reader.c (reader): Delete obsolete call to function
22282 output_trailers and output_headers.
22283 * src/output.h: Remove obsolete functions prototypes of output_headers
22284 and output_trailers.
22285
22286 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
22287
22288 * src/main.c: Include macrotab.h.
22289 * src/macrotab.h (macro_entry_s): Constify fields.
22290 Adjust functions prototypes.
22291 * src/macrotab.c (macro_insert): Constify key and value.
22292 (macro_find): Constify key.
22293 (macro_insert): Include 'xalloc.h'
22294 (macro_insert): Use XMALLOC.
22295 (macro_find): Constify return value.
22296 * src/output.c (output_table_data): Rename table to table_data.
22297 (output_parser): Constify macro_key, macro_value.
22298
22299 2001-08-30 Marc Autret <autret_m@epita.fr>
22300
22301 * src/reader.c (parse_skel_decl): New.
22302 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
22303 * src/lex.h (token_t): New token `tok_skel'.
22304 * src/lex.c (percent_table): Add skeleton option entry.
22305 Standardize.
22306
22307 2001-08-29 Marc Autret <autret_m@epita.fr>
22308
22309 * src/bison.simple: Add %%user_code directive at the end.
22310 * src/reader.c (read_additionnal_code): New.
22311 (reader): Use it.
22312 * src/output.c (output_program): Remove.
22313 (output): Update.
22314
22315 2001-08-28 Marc Autret <autret_m@epita.fr>
22316
22317 * src/output.c (output_actions): Clean up.
22318 (output_gram): CPP-out useless code.
22319 * src/reader.c (reader): Clean up, CPP-out useless code.
22320
22321 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
22322
22323 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
22324 directive.
22325 * src/bison.simple: Add `%%definitions'.
22326
22327 2001-08-28 Marc Autret <autret_m@epita.fr>
22328
22329 * config/depcomp: New file.
22330
22331 2001-08-27 Paul Eggert <eggert@twinsun.com>
22332
22333 * src/bison.simple (yyparse): Don't take the address of an
22334 item before the start of an array, as that doesn't conform to
22335 the C Standard.
22336
22337 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
22338
22339 * src/output.c (output): Remove the initialization of the macro
22340 obstack. It was done too late here.
22341
22342 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
22343 completely wrong.
22344 (reader): Initialize the macro obstack here, since we need it to grow
22345 '%define' directives.
22346
22347 * src/reader.h: Declare the macro obstack as extern.
22348
22349 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
22350
22351 * src/output.c (output_parser): Fix. Store single '%' characters in
22352 the output obstack instead of throwing them away.
22353
22354 2001-08-27 Akim Demaille <akim@epita.fr>
22355
22356 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
22357
22358 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22359
22360 * lib/Makefile.am: Adjust.
22361
22362 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22363
22364 * src/bison.simple: Update and add '%%' directives.
22365
22366 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22367
22368 * src/reader.c (reader): Remove calls to 'output_headers' and
22369 'output_trailers'. Remove some C output.
22370 (readgram): Disable a piece of code that was writing a default
22371 definition for 'YYSTYPE'.
22372 (reader_output_yylsp): Remove.
22373 (packsymbols): Output token defintions to a macro.
22374 (copy_definition): Disable C output.
22375
22376 * src/reader.c (parse_macro_decl): New function used to parse macro
22377 declarations.
22378 (copy_string2): Put the body of copy_string into this new function.
22379 Add a parameter to let the caller choose whether he wants to copy the
22380 string delimiters or not.
22381 (copy_string): Be a simple call to copy_string2 with the last argument
22382 bound to true.
22383 (read_declarations): Add case for macro definition.
22384 (copy_identifier): New.
22385 (parse_macro_decl): Read macro identifiers using copy_identifier
22386 rather than lex.
22387
22388 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22389
22390 * src/output.c (prepare): Add prefixed names.
22391 (output_parser): Output semantic actions.
22392 (output_parser): Fix bug on '%%line' directives.
22393
22394 * src/output.c (output_headers): Remove. The C code printed by this
22395 function should now be in the skeletons.
22396 (output_trailers): Remove.
22397 (output): Disable call to 'reader_output_yylsp'.
22398 (output_rule_data): Do not output tables to the table obstack.
22399
22400 * src/output.c: Remove some C dedicated output.
22401 Improve the use of macro and output obstacks.
22402 (output_defines): Remove.
22403
22404 * src/output.c (output_token_translations): Associate 'translate'
22405 table with a macro. No output to the table obstack.
22406 (output_gram): Same for 'rhs' and 'prhs'.
22407 (output_stos): Same for 'stos'.
22408 (output_rule_data): Same for 'r1' and 'r2'.
22409 (token_actions): Same for 'defact'.
22410 (goto_actions): Same for 'defgoto'.
22411 (output_base): Same for 'pact' and 'pgoto'.
22412 (output_table): Same for 'table'.
22413 (output_check): Same for 'check'.
22414
22415 * src/output.c (output_table_data): New function.
22416 (output_short_table): Remove.
22417 (output_short_or_char_table): Remove.
22418
22419 * src/output.c (output_parser): Replace most of the skeleton copy code
22420 with something new. Skeletons are now processed character by character
22421 rather than line by line, and Bison looks for '%%' macros. This is the
22422 first step in making Bison's output process (a lot) more flexible.
22423 (output_parser): Use the macro table.
22424
22425 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22426
22427 * src/main.c (main): Initialize the macro table.
22428
22429 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22430
22431 * src/lex.c (percent_table): Add tok_define.
22432 * src/lex.h: Add tok_define.
22433
22434 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22435
22436 * src/macrotab.c: New file.
22437 * src/macrotab.h: New file.
22438 * src/Makefile.am: Update.
22439
22440 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22441
22442 * lib/hash.c: New file.
22443 * lib/hash.h: New file.
22444 * lib/Makefile.am: Update.
22445
22446 2001-08-15 Akim Demaille <akim@epita.fr>
22447
22448 Version 1.28c.
22449
22450 2001-08-15 Marc Autret <autret_m@epita.fr>
22451
22452 * src/reader.c (readgram): Indent output macro YYSTYPE.
22453 (packsymbols): Likewise.
22454 (output_token_defines): Likewise.
22455 * src/files.c: Standardize.
22456 (compute_header_macro): New.
22457 (defines_obstack_save): New. Use compute_header_macro.
22458 (output_files): Update. Use defines_obstack_save.
22459
22460 2001-08-15 Akim Demaille <akim@epita.fr>
22461
22462 * doc/bison.texinfo (Table of Symbols): Document
22463 YYSTACK_USE_ALLOCA.
22464
22465 2001-08-15 Akim Demaille <akim@epita.fr>
22466
22467 * missing: Update from CVS Automake.
22468 * config/config.guess, config/config.sub, config/texinfo.tex:
22469 Update from gnu.org.
22470
22471 2001-08-15 Akim Demaille <akim@epita.fr>
22472
22473 * Makefile.maint: Sync with CVS Autoconf.
22474
22475 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
22476
22477 * doc/bison.texinfo: Include GNU Free Documentation License from
22478 `fdl.texi'.
22479 * doc/fdl.texi: Add to package.
22480
22481 2001-08-14 Marc Autret <autret_m@epita.fr>
22482
22483 Turn on %{source,header}_extension features.
22484
22485 * src/lex.c (percent_table): Un-CPP out header_extension and
22486 source_extension.
22487 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
22488 (compute_exts_from_src): Remove conditions. It restores priorities
22489 between options.
22490
22491 2001-08-14 Marc Autret <autret_m@epita.fr>
22492
22493 * src/files.c (compute_base_names): Add extensions computing when
22494 `--file-prefix' used.
22495 Standardize function calls.
22496
22497 2001-08-13 Marc Autret <autret_m@epita.fr>
22498
22499 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
22500 defining it (defined but null disables alloca).
22501
22502 2001-08-13 Marc Autret <autret_m@epita.fr>
22503
22504 * src/bison.simple (_yy_memcpy): CPP reformat.
22505
22506 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
22507
22508 * tests/atconfig.in (CPPFLAGS): Fix.
22509
22510 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
22511
22512 * doc/bison.texinfo: Include GNU General Public License from
22513 `gpl.texi'.
22514 * doc/gpl.texi: Add to package.
22515
22516 2001-08-10 Marc Autret <autret_m@epita.fr>
22517
22518 * src/print_graph.h: Fix.
22519 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
22520
22521 2001-08-10 Akim Demaille <akim@epita.fr>
22522
22523 * src/system.h: Provide default declarations for stpcpy, strndup,
22524 and strnlen.
22525
22526 2001-08-10 Robert Anisko <anisko_r@epita.fr>
22527
22528 * doc/bison.texinfo (Locations): Update @$ stuff.
22529
22530 2001-08-09 Robert Anisko <anisko_r@epita.fr>
22531
22532 * src/bison.simple (YYLLOC_DEFAULT): Update.
22533 (yyparse): Adjust.
22534
22535 2001-08-08 Marc Autret <autret_m@epita.fr>
22536
22537 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
22538 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
22539 Reported by Fabrice Bauzac.
22540
22541 2001-08-08 Marc Autret <autret_m@epita.fr>
22542
22543 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
22544 * src/vcg.c (output_node): Fix.
22545 * src/vcg.h: Cleanup.
22546 * src/print_graph.c: Add comments.
22547 (node_output_size): New global variable. Simplify the formatting of
22548 the VCG graph output.
22549 (print_actions): Unused code is now used. It notifies the final state
22550 and no action states in the VCG graph. It also give the reduce actions.
22551 The `shift and goto' edges are red and the `go to state' edges are
22552 blue.
22553 Get the current node name and node_obstack by argument.
22554 (node_obstack): New variable.
22555 (print_state): Manage node_obstack.
22556 (print_core): Use node_obstack given by argument.
22557 A node is not only computed here but in print_actions also.
22558 (print_graph): CPP out useless code instead of commenting it.
22559
22560 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
22561
22562 * tests/atconfig.in (CPPFLAGS): Fix.
22563
22564 2001-08-07 Akim Demaille <akim@epita.fr>
22565
22566 * src/print_graph.c (quote): New.
22567 (print_core): Use it.
22568
22569 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
22570
22571 * src/vcg.c (complain.h): Include it.
22572 Unepitaize `return' invocations.
22573 [NDEBUG] (main): Remove.
22574 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
22575 * src/files.c (open_files): Initialize graph_obstack.
22576 * src/print_graph.c (print_actions): CPP out useless code.
22577 (print_core): Don't output the last `\n' in labels.
22578 Use `quote'.
22579 * src/files.c (output_files): Output the VCG file.
22580 * src/main.c (main): Invoke print_graph ();
22581
22582 2001-08-06 Marc Autret <autret_m@epita.fr>
22583
22584 Automaton VCG graph output.
22585 Using option ``-g'' or long option ``--graph'', you can generate
22586 a gram_filename.vcg file containing a VCG description of the LALR (1)
22587 automaton of your grammar.
22588
22589 * src/main.c: Call to print_graph() function.
22590 * src/getargs.h: Update.
22591 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
22592 (graph_flag): New flag.
22593 (longopts): Update.
22594 (getargs): Add case `g'.
22595 * src/files.c (graph_obstack): New obstack struct.
22596 (open_files): Initialize new obstack.
22597 (output_files): Saves graph_obstack if required.
22598 * src/files.h (graph_obstack): New extern declaration.
22599 * src/Makefile.am: Add new source files.
22600
22601 2001-08-06 Marc Autret <autret_m@epita.fr>
22602
22603 * src/print_graph.c, src/print_graph.h (graph): New.
22604 * src/vcg.h: New file.
22605 * src/vcg.c: New file, VCG graph handling.
22606
22607 2001-08-06 Marc Autret <autret_m@epita.fr>
22608
22609 Add of %source_extension and %header_extension which specify
22610 the source or/and the header output file extension.
22611
22612 * src/files.c (compute_base_names): Remove initialisation of
22613 src_extension and header_extension.
22614 (compute_exts_from_gf): Update.
22615 (compute_exts_from_src): Update.
22616 (output_files): Update.
22617 * src/reader.c (parse_header_extension_decl): New.
22618 (parse_source_extension_decl): New.
22619 (read_declarations): New case statements for the new tokens.
22620 * src/lex.c (percent_table): Add entries for %source_extension
22621 and %header_extension.
22622 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
22623
22624 2001-08-06 Marc Autret <autret_m@epita.fr>
22625
22626 * configure.in: Bump to 1.28c.
22627 * doc/bison.texinfo: Texinfo thingies.
22628
22629 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
22630
22631 * tests/atconfig.in (CPPFLAGS): Add.
22632 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
22633
22634 2001-08-03 Akim Demaille <akim@epita.fr>
22635
22636 Version 1.28b.
22637
22638 2001-08-03 Akim Demaille <akim@epita.fr>
22639
22640 * tests/Makefile.am (check-local): Ship testsuite.
22641 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
22642 Include `string.h'.
22643
22644 2001-08-03 Akim Demaille <akim@epita.fr>
22645
22646 * configure.in: Try using -Wformat when compiling.
22647
22648 2001-08-03 Akim Demaille <akim@epita.fr>
22649
22650 * configure.in: Bump to 1.28b.
22651
22652 2001-08-03 Akim Demaille <akim@epita.fr>
22653
22654 * src/complain.c: Adjust strerror_r portability issues.
22655
22656 2001-08-03 Akim Demaille <akim@epita.fr>
22657
22658 Version 1.28a.
22659
22660 2001-08-03 Akim Demaille <akim@epita.fr>
22661
22662 * src/getargs.c, src/getarg.h (skeleton)): Constify.
22663 * src/lex.c (literalchar): Avoid name clashes on `buf'.
22664 * src/getargs.c: Include complain.h.
22665 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
22666 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
22667
22668 2001-08-03 Akim Demaille <akim@epita.fr>
22669
22670 * src/reader.c (readgram): Display hidden chars in error messages.
22671
22672 2001-08-03 Akim Demaille <akim@epita.fr>
22673
22674 Update to gettext 0.10.39.
22675
22676 2001-08-03 Akim Demaille <akim@epita.fr>
22677
22678 * lib/strspn.c: New.
22679
22680 2001-08-01 Marc Autret <autret_m@epita.fr>
22681
22682 * doc/bison.texinfo: Update.
22683 * doc/bison.1 (mandoc): Update.
22684 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
22685 * src/files.c: Support output files extensions computing.
22686 (src_extension): New static variable.
22687 (header_extension): New static variable.
22688 (tr): New function.
22689 (get_extension_index): New function, gets the index of an extension
22690 filename in a string.
22691 (compute_exts_from_gf): New function, computes extensions from the
22692 grammar file extension.
22693 (compute_exts_from_src): New functions, computes extensions from the
22694 C source file extension, file given by ``-o'' option.
22695 (compute_base_names): Update.
22696 (output_files): Update.
22697
22698 2001-08-01 Robert Anisko <anisko_r@epita.fr>
22699
22700 * doc/bison.texi: Document @$.
22701 (Locations): New section.
22702
22703 2001-07-18 Akim Demaille <akim@epita.fr>
22704
22705 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
22706 * config/prev-version.txt, config/move-if-change: New.
22707 * Makefile.am: Adjust.
22708
22709 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
22710
22711 * src/bison.simple (yyparse): Suppress warning `comparaison
22712 between signed and unsigned'.
22713
22714 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
22715
22716 * src/getargs.h (raw_flag): Remove.
22717 * src/getargs.c: Die on `-r'/`--raw'.
22718 * src/lex.c (parse_percent_token): Die on `%raw'.
22719 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
22720 * tests/calc.at: Suppress test with option `--raw'.
22721
22722 2001-07-14 Akim Demaille <akim@epita.fr>
22723
22724 * config/: New.
22725 * configure.in: Require Autoconf 2.50.
22726 Update to gettext 0.10.38.
22727
22728 2001-03-16 Akim Demaille <akim@epita.fr>
22729
22730 * doc/bison.texinfo: ANSIfy the examples.
22731
22732 2001-03-16 Akim Demaille <akim@epita.fr>
22733
22734 * getargs.c (skeleton): New variable.
22735 (longopts): --skeleton is a new option.
22736 (shortopts, getargs): -S is a new option.
22737 * getargs.h: Declare skeleton.
22738 * output.c (output_parser): Use it.
22739
22740 2001-03-16 Akim Demaille <akim@epita.fr>
22741
22742 * m4/strerror_r.m4: New.
22743 * m4/error.m4: Run AC_FUNC_STRERROR_R.
22744 * lib/error.h, lib/error.c: Update.
22745
22746 2001-03-16 Akim Demaille <akim@epita.fr>
22747
22748 * src/getargs.c (longopts): Clean up.
22749
22750 2001-02-21 Akim Demaille <akim@epita.fr>
22751
22752 * src/reader.c (gensym): `gensym_count' is your own.
22753 Use a static buf to create the symbol name, as token_buffer is no
22754 longer a buffer.
22755
22756 2001-02-08 Akim Demaille <akim@epita.fr>
22757
22758 * src/conflicts.c (conflict_report): Be sure not to append to res
22759 between two calls, which could happen if both first sprintf were
22760 skipped, but not the first cp += strlen.
22761
22762 2001-02-08 Akim Demaille <akim@epita.fr>
22763
22764 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
22765 New, from fileutils 4.0.37.
22766 * configure.in: Require Autoconf 2.49c. I took some time before
22767 making this decision. This is the only way out for portability
22768 issues in Bison, it would mean way too much duplicate effort to
22769 import in Bison features implemented in 2.49c since 2.13.
22770 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
22771
22772 2001-02-02 Akim Demaille <akim@epita.fr>
22773
22774 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
22775 * lib/xalloc.h, lib/xmalloc.c: Update.
22776
22777 2001-01-19 Akim Demaille <akim@epita.fr>
22778
22779 Get rid of the ad hoc handling of token_buffer in the scanner: use
22780 the obstacks.
22781
22782 * src/lex.c (token_obstack): New.
22783 (init_lex): Initialize it. No longer call...
22784 (grow_token_buffer): this. Remove it.
22785 Adjust all the places which used it to use the obstack.
22786
22787 2001-01-19 Akim Demaille <akim@epita.fr>
22788
22789 * src/lex.h: Rename all the tokens:
22790 s/\bENDFILE\b/tok_eof/g;
22791 s/\bIDENTIFIER\b/tok_identifier/g;
22792 etc.
22793 Let them be enums, not #define, to ease debugging.
22794 Adjust all the code.
22795
22796 2001-01-18 Akim Demaille <akim@epita.fr>
22797
22798 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
22799 * src/lex.c (maxtoken, grow_token_buffer): Static.
22800
22801 2001-01-18 Akim Demaille <akim@epita.fr>
22802
22803 Since we now use obstacks, more % directives can be enabled.
22804
22805 * src/lex.c (percent_table): Also accept `%yacc',
22806 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
22807 `%debug'.
22808 Handle the actions for `%semantic_parser' and `%pure_parser' here,
22809 instead of returning a token.
22810 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
22811 * src/reader.c (read_declarations): Adjust.
22812 * src/files.c (open_files): Don't call `compute_base_names', don't
22813 compute `attrsfile' since they depend upon data which might be
22814 *in* the input file now.
22815 (output_files): Do it here.
22816 * src/output.c (output_headers): Document the fact that this patch
22817 introduces a guaranteed SEGV for semantic parsers.
22818 * doc/bison.texinfo: Document them.
22819 * tests/suite.at: Exercise these %options.
22820
22821 2000-12-20 Akim Demaille <akim@epita.fr>
22822
22823 Also handle the output file (--verbose) with obstacks.
22824
22825 * files.c (foutput): Remove.
22826 (output_obstack): New.
22827 Adjust all dependencies.
22828 * src/conflicts.c: Return a string.
22829 * src/system.h (obstack_grow_string): Rename as...
22830 (obstack_sgrow): this. Be ready to work with non literals.
22831 (obstack_fgrow4): New.
22832
22833 2000-12-20 Akim Demaille <akim@epita.fr>
22834
22835 * src/files.c (open_files): Fix the computation of short_base_name
22836 in the case of `-o foo.tab.c'.
22837
22838 2000-12-20 Akim Demaille <akim@epita.fr>
22839
22840 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
22841 (copy_dollar): Now that everything uses obstacks, get rid of the
22842 FILE * parameters.
22843
22844 2000-12-20 Akim Demaille <akim@epita.fr>
22845
22846 * src/files.c (open_files): Actually the `.output' file is based
22847 on the short_base_name, not base_name.
22848 * tests/suite.at (Checking output file names): Adjust.
22849
22850 2000-12-20 Akim Demaille <akim@epita.fr>
22851
22852 * src/bison.s1: Remove, we now use directly...
22853 * src/bison.simple: this.
22854 * src/Makefile.am: Use pkgdata instead of data.
22855
22856 2000-12-20 Akim Demaille <akim@epita.fr>
22857
22858 * src/files.c (guard_obstack): New.
22859 (open_files): Initialize it.
22860 (output_files): Dump it...
22861 * src/files.h: Export it.
22862 * src/reader.c (copy_guard): Use it.
22863
22864 2000-12-19 Akim Demaille <akim@epita.fr>
22865
22866 * src/files.c (outfile, defsfile, actfile): Removed as global
22867 vars.
22868 (open_files): Don't compute them.
22869 (output_files): Adjust.
22870 (base_name, short_base_name): Be global.
22871 Adjust dependencies.
22872
22873 2000-12-19 Akim Demaille <akim@epita.fr>
22874
22875 * src/files.c (strsuffix): New.
22876 (stringappend): Be just like strcat but allocate.
22877 (base_names): Eve out from open_files.
22878 Try to simplify the rather hairy computation of base_name and
22879 short_base_name.
22880 (open_files): Use it.
22881 * tests/suite.at (Checking output file names): New test.
22882
22883 2000-12-19 Akim Demaille <akim@epita.fr>
22884
22885 * src/system.h (obstack_grow_literal_string): Rename as...
22886 (obstack_grow_string): this.
22887 * src/output.c (output_parser): Recognize `%% actions' instead of
22888 `$'.
22889 * src/bison.s1: s/$/%% actions/.
22890 * src/bison.hairy: Likewise.
22891
22892 2000-12-19 Akim Demaille <akim@epita.fr>
22893
22894 * src/output.c (output_parser): Compute the `#line' lines when
22895 there are.
22896 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
22897 Suggested by Hans Aberg.
22898
22899 2000-12-19 Akim Demaille <akim@epita.fr>
22900
22901 Let the handling of the skeleton files be local to the procedures
22902 that use it.
22903
22904 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
22905 longer static.
22906 (fparser, open_extra_files): Remove.
22907 (open_files, output_files): Don't take care of fparser.
22908 * src/files.h: Adjust.
22909 * src/output.c (output_parser): Open and close the file to the
22910 skeleton.
22911 * src/reader.c (read_declarations): When %semantic_parser, open
22912 fguard.
22913
22914 2000-12-19 Akim Demaille <akim@epita.fr>
22915
22916 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
22917 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
22918
22919 2000-12-19 Akim Demaille <akim@epita.fr>
22920
22921 * src/files.c (open_files): Yipee! We no longer need all the code
22922 looking for `/tmp' since we have no tmp file.
22923
22924 2000-12-19 Akim Demaille <akim@epita.fr>
22925
22926 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
22927 New macros.
22928 * src/files.c (open_files): Less dependency on MSDOS etc.
22929
22930 2000-12-14 Akim Demaille <akim@epita.fr>
22931
22932 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
22933 Provide a default definition.
22934 Use it when executing the default @ action.
22935 * src/reader.c (reader_output_yylsp): No longer include
22936 `timestamp' and `text' in the default YYLTYPE.
22937
22938 2000-12-12 Akim Demaille <akim@epita.fr>
22939
22940 * src/reader.c (copy_definition, parse_union_decl, copy_action)
22941 (copy_guard): Quote the file names.
22942 Reported by Laurent Mascherpa.
22943
22944 2000-12-12 Akim Demaille <akim@epita.fr>
22945
22946 * src/output.c (output_headers, output_program, output): Be sure
22947 to escape special characters when outputting filenames.
22948 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
22949 (output_headers): Don't depend on them, Use ACTSTR.
22950
22951 2000-11-17 Akim Demaille <akim@epita.fr>
22952
22953 * lib/obstack.h: Formatting changes.
22954 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
22955 prevents type checking.
22956 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
22957 cast the value to (void *): assigning a `foo *' to a `void *'
22958 variable is valid.
22959 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
22960 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
22961 append characters.
22962
22963 2000-11-17 Akim Demaille <akim@epita.fr>
22964
22965 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
22966 as...
22967 (suite.m4, regression.m4, calc.m4): these.
22968 * tests/atgeneral.m4: Update from CVS Autoconf.
22969
22970 2000-11-17 Akim Demaille <akim@epita.fr>
22971
22972 * tests/regression.m4 (%union and --defines): New test,
22973 demonstrating a current bug in the obstack implementation.
22974
22975 2000-11-17 Akim Demaille <akim@epita.fr>
22976
22977 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
22978 macros.
22979 Use them to declare the variables which are global or local to
22980 `yyparse'.
22981
22982 2000-11-17 Akim Demaille <akim@epita.fr>
22983
22984 * acconfig.h: Remove, no longer used.
22985
22986 2000-11-07 Akim Demaille <akim@epita.fr>
22987
22988 * src: s/Copyright (C)/Copyright/g.
22989
22990 2000-11-07 Akim Demaille <akim@epita.fr>
22991
22992 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
22993 defining.
22994 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
22995
22996 2000-11-07 Akim Demaille <akim@epita.fr>
22997
22998 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
22999 Merge in a single CPP if/else.
23000
23001 2000-11-07 Akim Demaille <akim@epita.fr>
23002
23003 * src/output.c (output): Remove useless variables.
23004 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
23005 argument `data' for consistency with the prototypes.
23006 Qualify it `const'.
23007 (obstack_copy, obstack_copy0): Rename the second argument as
23008 `address' for consistency. Qualify it `const'.
23009 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
23010 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
23011 `const' their input argument (`data' or `address').
23012 Adjust the corresponding macros to include `const' in casts.
23013
23014 2000-11-03 Akim Demaille <akim@epita.fr>
23015
23016 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
23017 s/PFILE1/BISON_HAIRY/.
23018 Adjust dependencies.
23019
23020 2000-11-03 Akim Demaille <akim@epita.fr>
23021
23022 For some reason, this was not applied.
23023
23024 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
23025 `unlink': it's no longer used.
23026
23027 2000-11-03 Akim Demaille <akim@epita.fr>
23028
23029 * src/files.c (skeleton_find): New function, eved out of...
23030 (open_files, open_extra_files): here.
23031
23032 2000-11-03 Akim Demaille <akim@epita.fr>
23033
23034 Don't use `atexit'.
23035
23036 * src/files.c (obstack_save): New function.
23037 (done): Rename as...
23038 (output_files): this.
23039 Use `obstack_save'.
23040 * src/main.c (main): Don't use `atexit' to register `done', since
23041 it no longer has to remove tmp files, just call `output_files'
23042 when there are no errors.
23043
23044 2000-11-02 Akim Demaille <akim@epita.fr>
23045
23046 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
23047 `unlink': it's no longer used.
23048 * src/files.h: Formatting changes.
23049
23050 2000-11-02 Akim Demaille <akim@epita.fr>
23051
23052 Remove the last uses of mktemp and unlink/delete.
23053
23054 * src/files.c (fdefines, ftable): Removed.
23055 (defines_ostack, table_obstack): New.
23056 Adjust dependencies of the former into uses of the latter.
23057 * src/output.c (output_short_or_char_table, output_short_table):
23058 Convert to using obstacks.
23059 * src/reader.c (copy_comment2): Accept one FILE * and two
23060 obstacks.
23061 (output_token_defines, reader_output_yylsp): Use obstacks.
23062 * src/system.h (obstack_fgrow3): New.
23063 * po/POTFILES.in: Adjust.
23064
23065 2000-11-01 Akim Demaille <akim@epita.fr>
23066
23067 Change each use of `fattrs' into a use of `attrs_obstack'.
23068
23069 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
23070 * src/files.c (fattrs): Remove.
23071 (attrs_obstack): New.
23072 Adjust all dependencies.
23073 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
23074
23075 2000-11-01 Akim Demaille <akim@epita.fr>
23076
23077 Introduce obstacks.
23078 Change each use of `faction' into a use of `action_obstack'.
23079
23080 * lib/obstack.h, lib/obstack.c: New files.
23081 * src/files.c (faction): Remove.
23082 (action_obstack): New.
23083 Adjust all dependencies.
23084
23085 2000-10-20 Akim Demaille <akim@epita.fr>
23086
23087 * lib/quote.h (PARAMS): New macro. Use it.
23088
23089 2000-10-16 Akim Demaille <akim@epita.fr>
23090
23091 * src/output.c (output_short_or_char_table): New function.
23092 (output_short_table, output_token_translations): Use it.
23093 (goto_actions): Use output_short_table.
23094
23095 2000-10-16 Akim Demaille <akim@epita.fr>
23096
23097 * src/symtab.c (bucket_new): New function.
23098 (getsym): Use it.
23099
23100 * src/output.c (output_short_table): New argument to display the
23101 comment associated with the table.
23102 Adjust dependencies.
23103 (output_gram): Use it.
23104 (output_rule_data): Nicer output layout for YYTNAME.
23105
23106 2000-10-16 Akim Demaille <akim@epita.fr>
23107
23108 * src/lex.c (read_typename): New function.
23109 (lex): Use it.
23110 * src/reader.c (copy_dollar): Likewise.
23111
23112 2000-10-16 Akim Demaille <akim@epita.fr>
23113
23114 * src/reader.c (copy_comment2): Expect the input stream to be on
23115 the `/' which is suspected to open a comment, instead of being
23116 called after `//' or `/*' was read.
23117 (copy_comment, copy_definition, parse_union_decl, copy_action)
23118 (copy_guard): Adjust.
23119
23120 2000-10-16 Akim Demaille <akim@epita.fr>
23121
23122 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
23123 `read_signed_integer'.
23124
23125 2000-10-16 Akim Demaille <akim@epita.fr>
23126
23127 * src/reader.c (copy_dollar): New function.
23128 (copy_guard, copy_action): Use it.
23129
23130 2000-10-16 Akim Demaille <akim@epita.fr>
23131
23132 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
23133 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
23134 New files, from Fileutils 4.0.27.
23135 * src/main.c (printable_version): Remove.
23136 * src/lex.c, src/reader.c: Use `quote'.
23137
23138 2000-10-04 Akim Demaille <akim@epita.fr>
23139
23140 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
23141
23142 2000-10-04 Akim Demaille <akim@epita.fr>
23143
23144 * doc/bison.texinfo: Various typos spotted by Neil Booth.
23145
23146 2000-10-04 Akim Demaille <akim@epita.fr>
23147
23148 When a literal string is used to define two different tokens,
23149 `bison -v' segfaults.
23150 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
23151
23152 * tests/regression.m4: New file.
23153 Include the core of the sample provided by Piotr Gackiewicz.
23154 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
23155 properly.
23156
23157 2000-10-04 Akim Demaille <akim@epita.fr>
23158
23159 * src/reader.c (parse_expect_decl): Keep `count' within the size
23160 of `buffer'.
23161 From Neil Booth.
23162
23163 2000-10-02 Paul Eggert <eggert@twinsun.com>
23164
23165 * bison.s1 (yyparse): Assign the default value
23166 unconditionally, to avoid a GCC warning and make the parser a
23167 tad smaller.
23168
23169 2000-10-02 Akim Demaille <akim@epita.fr>
23170
23171 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
23172 options.
23173
23174 2000-10-02 Akim Demaille <akim@epita.fr>
23175
23176 * src/derives.c, src/print.c, src/reduce.c: To ease the
23177 translation, move some `\n' out of the translated strings.
23178
23179 2000-10-02 Akim Demaille <akim@epita.fr>
23180
23181 The location tracking mechanism is precious for parse error
23182 messages. Nevertheless, it is enabled only when `@n' is used in
23183 the grammar, which is a different issue (you can use it in error
23184 message, but not in the grammar per se). Therefore, there should
23185 be another means to enable it.
23186
23187 * src/getargs.c (getargs): Support `--locations'.
23188 (usage): Report it.
23189 * src/getargs.h (locationsflag): Export it.
23190 * src/lex.c (percent_table): Support `%locations'.
23191 * src/reader.c (yylsp_needed): Remove this variable, now replaced
23192 with `locationsflag'.
23193 * doc/bison.texinfo: Document `--locations' and `%locations'.
23194 Sort the options.
23195 * tests/calc.m4: Test it.
23196
23197 For regularity of the names, replace each
23198 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
23199 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
23200 In addition replace each `flag' with `_flag'.
23201
23202 2000-10-02 Akim Demaille <akim@epita.fr>
23203
23204 Also test parse error messages, including with YYERROR_VERBOSE.
23205
23206 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
23207 associative).
23208 Use it to check the computations.
23209 Use it to check `nonassoc' is honored.
23210 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
23211 `--yyerror-verbose'.
23212 (_AT_CHECK_CALC): Adjust to this option.
23213 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
23214
23215 2000-10-02 Akim Demaille <akim@epita.fr>
23216
23217 Test also `--verbose', `--defines' and `--name-prefix'. Testing
23218 the latter demonstrates a flaw in the handling of non debugging
23219 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
23220 was used in order to simplify:
23221
23222 #if YYDEBUG
23223 if (yydebug)
23224 {
23225 ...
23226 }
23227 #endif
23228
23229 into
23230
23231 if (yydebug)
23232 {
23233 ...
23234 }
23235
23236 unfortunately this leads to a CPP conflict when
23237 `--name-prefix=foo' is used since it produces `#define yydebug
23238 foodebug'.
23239
23240 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
23241 (YYDPRINTF): New macro.
23242 Spread its use.
23243 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
23244 the bison options.
23245 Also test `--verbose', `--defines' and `--name-prefix'.
23246
23247 2000-10-02 Akim Demaille <akim@epita.fr>
23248
23249 Improve the readability of the produced parsers.
23250
23251 * src/bison.s1: Formatting changes.
23252 Improve the comment related to the `$' mark.
23253 (yydefault): Don't fall through to `yyresume': `goto' there.
23254 * src/output.c (output_parser): When the `$' is met, skip the end
23255 of its line.
23256 New variable, `number_of_dollar_signs', to check there's exactly
23257 one `$' in the parser skeleton.
23258
23259 2000-10-02 Akim Demaille <akim@epita.fr>
23260
23261 * lib/xstrdup.c: New file, from the fileutils.
23262 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
23263 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
23264 instead of strlen + xmalloc + strcpy.
23265 * src/symtab.c (copys): Remove, use xstrdup instead.
23266
23267 2000-10-02 Akim Demaille <akim@epita.fr>
23268
23269 * src/gram.h (associativity): New enum type which replaces the
23270 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
23271 `right_assoc', `left_assoc' and `non_assoc'.
23272 Adjust all dependencies.
23273 * src/reader.c: Formatting changes.
23274 (LTYPESTR): Don't define it, use it as a literal in
23275 `reader_output_yylsp'.
23276 * src/symtab.h (symbol_class): New enum type which replaces the
23277 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
23278 `sunknown', `stoken and `snterm'.
23279
23280 2000-10-02 Akim Demaille <akim@epita.fr>
23281
23282 * src/getargs.c (fixed_outfiles): Rename as...
23283 (yaccflag): for consistency and accuracy.
23284 Adjust dependencies.
23285
23286 2000-10-02 Akim Demaille <akim@epita.fr>
23287
23288 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
23289 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
23290 difficult and introduced a lot of core dump. It turns out that
23291 Bison used an implementation of `xmalloc' based on `calloc', and
23292 at various places it does depend upon the initialization to 0. I
23293 have not tried to isolate the pertinent places, and all the former
23294 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
23295 someone should address this issue.
23296
23297 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
23298 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
23299 files.
23300 Adjust dependencies.
23301 * src/warshall.h: New file.
23302 Propagate.
23303
23304 2000-10-02 Akim Demaille <akim@epita.fr>
23305
23306 Various anti-`extern in *.c' changes.
23307
23308 * src/system.h: Include `assert.h'.
23309
23310 2000-10-02 Akim Demaille <akim@epita.fr>
23311
23312 * src/state.h (nstates, final_state, first_state, first_shift)
23313 (first_reduction): Move their exportation from here...
23314 * src/LR0.h: to here.
23315 Adjust dependencies.
23316 * src/getargs.c (statisticsflag): New variable.
23317 Add support for `--statistics'.
23318 Adjust dependencies.
23319
23320 Remove a lot of now useless `extern' statements in most files.
23321
23322 2000-10-02 Akim Demaille <akim@epita.fr>
23323
23324 * src/LR0.h: New file.
23325 Propagate its use.
23326
23327 2000-10-02 Akim Demaille <akim@epita.fr>
23328
23329 * src/print.h: New file.
23330 Propagate its use.
23331 * src/print.c: Formatting and ordering changes.
23332 (verbose, terse): Replace with...
23333 (print_results): this new function.
23334 Adjust dependencies.
23335
23336 2000-10-02 Akim Demaille <akim@epita.fr>
23337
23338 * src/conflicts.c (conflict_report): New function.
23339 (conflict_log, verbose_conflict_log): Replace with...
23340 (print_conflicts): this function.
23341 Adjust dependencies.
23342 * src/conflicts.h: New file.
23343 Propagate its inclusion.
23344
23345 2000-10-02 Akim Demaille <akim@epita.fr>
23346
23347 * src/nullable.h: New file.
23348 Propagate its inclusion.
23349 * src/nullable.c: Formatting changes.
23350
23351 2000-10-02 Akim Demaille <akim@epita.fr>
23352
23353 * src/reduce.h: New file.
23354 Propagate its inclusion.
23355 * src/reduce.c: Topological sort and other formatting changes.
23356 (bool, TRUE, FALSE): Move their definition to...
23357 * src/system.h: here.
23358
23359 2000-10-02 Akim Demaille <akim@epita.fr>
23360
23361 * src/files.c: Formatting changes.
23362 (tryopen, tryclose, openfiles): Rename as...
23363 (xfopen, xfclose, open_files): this.
23364 (stringappend): static.
23365 * src/files.h: Complete the list of exported symbols.
23366 Propagate its use.
23367
23368 2000-10-02 Akim Demaille <akim@epita.fr>
23369
23370 * src/reader.h: New file.
23371 Propagate its use instead of tedious list of `extern' and
23372 prototypes.
23373 * src/reader.c: Formatting changes, topological sort,
23374 s/register//.
23375
23376 2000-10-02 Akim Demaille <akim@epita.fr>
23377
23378 * src/lex.h: Prototype `lex.c' exported functions.
23379 * src/reader.c: Adjust.
23380 * src/lex.c: Formatting changes.
23381 (safegetc): Rename as...
23382 (xgetc): this.
23383
23384 2000-10-02 Akim Demaille <akim@epita.fr>
23385
23386 * src/lalr.h: New file.
23387 Propagate its inclusion instead of prototypes and `extern'.
23388 * src/lalr.c: Formatting changes, topological sorting etc.
23389
23390 2000-10-02 Akim Demaille <akim@epita.fr>
23391
23392 * src/output.c (token_actions): Introduce a temporary array,
23393 YYDEFACT, that makes it possible for this function to use
23394 output_short_table.
23395
23396 2000-10-02 Akim Demaille <akim@epita.fr>
23397
23398 `user_toknums' is output as a `short[]' in `output.c', while it is
23399 defined as a `int[]' in `reader.c'. For consistency with the
23400 other output tables, `user_toknums' is now defined as a table of
23401 shorts.
23402
23403 * src/reader.c (user_toknums): Be a short table instead of an int
23404 table.
23405 Adjust dependencies.
23406
23407 Factor the short table outputs.
23408
23409 * src/output.c (output_short_table): New function.
23410 * src/output.c (output_gram, output_stos, output_rule_data)
23411 (output_base, output_table, output_check): Use it.
23412
23413 2000-10-02 Akim Demaille <akim@epita.fr>
23414
23415 * src/output.c (output): Topological sort of the functions, in
23416 order to get rid of the `static' prototypes.
23417 No longer use `register'.
23418 * src/output.h: New file.
23419 Propagate its inclusion in files explicitly prototyping functions
23420 from output.c.
23421
23422 2000-09-21 Akim Demaille <akim@epita.fr>
23423
23424 * src/atgeneral.m4: Update from Autoconf.
23425
23426 2000-09-21 Akim Demaille <akim@epita.fr>
23427
23428 * src/closure.h: New file.
23429 * src/closure.c: Formatting changes, topological sort over the
23430 functions, use of closure.h.
23431 (initialize_closure, finalize_closure): Rename as...
23432 (new_closure, free_closure): these. Adjust dependencies.
23433 * src/LR0.c: Formatting changes, topological sort, use of
23434 cloture.h.
23435 (initialize_states): Rename as...
23436 (new_states): this.
23437 * src/Makefile.am (noinst_HEADERS): Adjust.
23438
23439 2000-09-20 Akim Demaille <akim@epita.fr>
23440
23441 * src/acconfig.h: Don't protect config.h against multiple
23442 inclusion.
23443 Don't define PARAMS.
23444 * src/system.h: Define PARAMS.
23445 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
23446 purpose of config.h. system.h must not try to fix wrong
23447 definitions in config.h.
23448
23449 2000-09-20 Akim Demaille <akim@epita.fr>
23450
23451 * src/derives.h: New file.
23452 * src/main.c, src/derives.h: Use it.
23453 Formatting changes.
23454 * src/Makefile.am (noinst_HEADERS): Adjust.
23455
23456 2000-09-20 Akim Demaille <akim@epita.fr>
23457
23458 * tests/atgeneral.m4: Update from Autoconf.
23459 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
23460 (AT_CHECK_CALC): New macros.
23461 Use these macros to test bison with options `', `--raw',
23462 `--debug', `--yacc', `--yacc --debug'.
23463
23464 2000-09-19 Akim Demaille <akim@epita.fr>
23465
23466 * src/output.c: Formatting changes.
23467 * src/machine.h: Remove, leaving its contents in...
23468 * src/system.h: here.
23469 Include stdio.h.
23470 Adjust all dependencies on stdio.h and machine.h.
23471 * src/getargs.h: New file.
23472 Let all `extern' declarations about getargs.c be replaced with
23473 inclusion of `getargs.h'.
23474 * src/Makefile.am (noinst_HEADERS): Adjust.
23475
23476 * tests/calc.m4 (yyin): Be initialized in main, not on the global
23477 scope.
23478 (yyerror): Returns void, not int.
23479 * doc/bison.texinfo: Formatting changes.
23480
23481 2000-09-19 Akim Demaille <akim@epita.fr>
23482
23483 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
23484 portable.
23485
23486 2000-09-18 Akim Demaille <akim@epita.fr>
23487
23488 * configure.in: Append WARNING_CFLAGS to CFLAGS.
23489 * src/Makefile.am (INCLUDES): Don't.
23490 Be ready to fetch headers in lib/.
23491
23492 2000-09-18 Akim Demaille <akim@epita.fr>
23493
23494 * doc/bison.texinfo: Update the copyright.
23495 ANSIfy and GNUify the examples.
23496 Remove the old menu.
23497
23498 2000-09-18 Akim Demaille <akim@epita.fr>
23499
23500 First set of tests: use the `calc' example from the documentation.
23501
23502 * src/bison.s1 (yyparse): Condition the code using `yytname' which
23503 is defined only when YYDEBUG is.
23504 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
23505 * src/files.c (tryopen, tryclose): Formatting changes.
23506 Move to the top and be static.
23507 * src/reader.c (read_signed_integer): Likewise.
23508 * tests/calc.m4: New file.
23509 * Makefile.am, suite.m4: Adjust.
23510 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
23511
23512 2000-09-18 Akim Demaille <akim@epita.fr>
23513
23514 Add support for an Autotest test suite for Bison.
23515
23516 * m4/m4.m4, m4/atconfig.m4: New files.
23517 * m4/Makefile.am (EXTRA_DIST): Adjust.
23518 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
23519 files.
23520 * src/getargs.c: Display a more standard --version message.
23521 * src/reader.c (reader): Formatting changes.
23522 No longer depend upon VERSION_STRING.
23523 * configure.in: No longer use `dnl'.
23524 Set up the test suite and the new directory `tests/.
23525 (VERSION_STRING): Remove.
23526
23527 2000-04-14 Akim Demaille <akim@epita.fr>
23528
23529 * src/reader.c (copy_comment2): New function, same as former
23530 `copy_comment', but outputs into two FILE *.
23531 (copy_comment): Use it.
23532 (parse_union_decl): Use it.
23533 (get_type, parse_start_decl): Use the same `invalid' message.
23534 (parse_start_decl, parse_union_decl): Use the same `multiple'
23535 message.
23536 (parse_union_decl, copy_guard, copy_action): Use the same
23537 `unmatched' message.
23538 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
23539
23540 2000-03-31 Akim Demaille <akim@epita.fr>
23541
23542 * src/files.c (tryopen, tryclose): Move to the top.
23543 Be static.
23544
23545 2000-03-31 Akim Demaille <akim@epita.fr>
23546
23547 * src/main.c (main): Don't call `done', exit does it.
23548
23549 2000-03-31 Akim Demaille <akim@epita.fr>
23550
23551 * allocate.c: s/return (foo)/return foo/.
23552 * lalr.c: Likewise.
23553 * LR0.c: Likewise.
23554 * output.c: Likewise.
23555 * reader.c: Likewise.
23556 * symtab.c: Likewise.
23557 * vmsgetargs.c: Likewise.
23558
23559 2000-03-31 Akim Demaille <akim@epita.fr>
23560
23561 Clean up the error reporting functions.
23562
23563 * src/report.c: New file.
23564 * src/report.h: Likewise.
23565 * src/Makefile.am: Adjust.
23566 * m4/error.m4: New file.
23567 * m4/Makefile.am: Adjust.
23568 * configure.in (jm_PREREQ_ERROR): Call it.
23569 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
23570 Remove.
23571 (fatal, fatals): Remove. All callers use complain.c::fatal.
23572 (warn, warni, warns, warnss, warnss): Remove. All callers use
23573 complain.c::complain.
23574 (toomany): Remove, use fatal instead.
23575 * src/files.c (done): No argument, use complain_message_count.
23576 * src/main.c (main): Register `done' to `atexit'.
23577
23578 * src/getargs.c (usage): More `fputs', less `fprintf'.
23579
23580 2000-03-28 Akim Demaille <akim@epita.fr>
23581
23582 * lib/: New directory.
23583 * Makefile.am (SUBDIRS): Adjust.
23584 * configure.in: Adjust.
23585 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
23586 useless.
23587 * src/alloca.c: Moved to lib/.
23588 * src/getopt.c: Likewise.
23589 * src/getopt1.c: Likewise.
23590 * src/getopt.h: Likewise.
23591 * src/ansi2knr.c: Likewise.
23592 * src/ansi2knr.1: Likewise.
23593 * src/Makefile.am: Adjust.
23594 * lib/Makefile.am: New file.
23595
23596 2000-03-28 Akim Demaille <akim@epita.fr>
23597
23598 * src/getargs.c (usage): Refresh the help message.
23599
23600 2000-03-17 Akim Demaille <akim@epita.fr>
23601
23602 * src/getopt1.c: Updated from textutils 2.0e
23603 * src/getopt.c: Likewise.
23604 * src/getopt.h: Likewise.
23605
23606 2000-03-17 Akim Demaille <akim@epita.fr>
23607
23608 * src/Makefile.am (bison.simple): Fix the awk program: quote only
23609 the file name, not the whole `#line LINE FILE'.
23610
23611 2000-03-17 Akim Demaille <akim@epita.fr>
23612
23613 On syntax errors, report the token on which we choked.
23614
23615 * src/bison.s1 (yyparse): In the label yyerrlab, when
23616 YYERROR_VERBOSE, add yychar in msg.
23617
23618 2000-03-17 Akim Demaille <akim@epita.fr>
23619
23620 * src/reader.c (copy_at): New function.
23621 (copy_guard): Use it.
23622 (copy_action): Use it.
23623
23624 2000-03-17 Akim Demaille <akim@epita.fr>
23625
23626 Be kind to translators, save some useless translations.
23627
23628 * src/main.c (banner): New function.
23629 (fatal_banner): Use it.
23630 (warn_banner): Use it.
23631
23632 2000-03-17 Akim Demaille <akim@epita.fr>
23633
23634 * src/reader.c (copy_definition): Use copy_string and
23635 copy_comment. Removed now unused `match', `ended',
23636 `cplus_comment'.
23637 (copy_comment, copy_string): Moved, to be visible from
23638 copy_definition.
23639
23640 2000-03-17 Akim Demaille <akim@epita.fr>
23641
23642 * src/reader.c (copy_string): Declare `static inline'. No
23643 problems with inline, since it is checked by configure.
23644 (copy_comment): Likewise.
23645
23646 2000-03-17 Akim Demaille <akim@epita.fr>
23647
23648 * src/reader.c (packsymbols): Formatting changes.
23649
23650 2000-03-17 Akim Demaille <akim@epita.fr>
23651
23652 * src/reader.c (copy_comment): New function, factored out from:
23653 (copy_action): Use it. Removed now unused `match', `ended',
23654 `cplus_comment'.
23655 (copy_guard): Likewise.
23656
23657 2000-03-17 Akim Demaille <akim@epita.fr>
23658
23659 * src/reader.c (copy_string): New function, factored out from:
23660 (copy_action): Use it.
23661 (copy_guard): Likewise.
23662
23663 2000-03-17 Akim Demaille <akim@epita.fr>
23664
23665 Change the handling of @s so that they behave exactly like $s.
23666 There is now a pseudo variable @$ (readble and writable), location
23667 of the lhs of the rule (by default ranging from the location of
23668 the first symbol of the rhs, to the location of the last symbol,
23669 or, if the rhs is empty, YYLLOC).
23670
23671 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
23672 yyval.
23673 (yyparse): When providing a default semantic action, provide a
23674 default location action.
23675 (after the $): No longer change `*YYLSP', just stack YYLOC the
23676 same way you stack YYVAL.
23677 * src/reader.c (read_declarations): Use warns.
23678 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
23679 (copy_action, case '@'): Likewise.
23680 Use a standard error message, to save useless work from
23681 translators.
23682
23683 2000-03-17 Akim Demaille <akim@epita.fr>
23684
23685 * src/bison.s1: Formatting and cosmetics changes.
23686 * src/reader.c: Likewise.
23687 Update the Copyright notice.
23688
23689 2000-03-17 Akim Demaille <akim@epita.fr>
23690
23691 * src/bison.s1 (#line): All set to `#line' only, since the
23692 Makefile now handles them.
23693
23694 2000-03-16 Akim Demaille <akim@epita.fr>
23695
23696 * src/output.c (output_rule_data): Output the documentation of
23697 some of the tables.
23698 (Copyright notice): Update.
23699 Formatting changes.
23700
23701 2000-03-16 Akim Demaille <akim@epita.fr>
23702
23703 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
23704 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
23705 One `#if YYDEBUG' remains, since it uses variables which are
23706 defined only if `YYDEBUG != 0'.
23707
23708 2000-03-16 Akim Demaille <akim@epita.fr>
23709
23710 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
23711 and related variables so that the similarities are highlighted.
23712
23713 2000-03-16 Akim Demaille <akim@epita.fr>
23714
23715 * src/bison.s1: Properly indent CPP directives.
23716
23717 2000-03-16 Akim Demaille <akim@epita.fr>
23718
23719 * src/bison.s1: Properly indent the `alloca' CPP section.
23720
23721 2000-03-16 Akim Demaille <akim@epita.fr>
23722
23723 Do not hard code values of directories in `configure.in'.
23724 Update the `configure' tool chain.
23725
23726 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
23727 src/makefile.am.
23728 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
23729 (AC_OUTPUT): Add m4/Makefile.
23730 Bump to bison 1.28a, 1.29 has never been released.
23731 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
23732 handled via src/Makefile.am.
23733 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
23734 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
23735 autoheader.
23736 * Makefile.am (SUBDIRS): Add m4.
23737 (ACLOCAL_AM_FLAGS): New variable.
23738 (AUTOMAKE_OPTIONS): Add check-news.
23739 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
23740 the proper line number and file name.
23741 (DEFS): Propagate the location of bison library files and of the
23742 locale files.
23743 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
23744 builddir.
23745 * acinclude.m4: Remove, replaced by the directory m4.
23746 * m4/Makefile.am (EXTRA_DIST): New variable.
23747 * m4/gettext.m4: New file, from the fileutils.
23748 * m4/lcmessage.m4: Likewise
23749 * m4/progtest.m4: Likewise.
23750 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
23751
23752 2000-03-10 Akim Demaille <akim@epita.fr>
23753
23754 * src/closure.c:
23755 Formatting changes of various comments.
23756 Respect the GNU coding standards at various places.
23757 Don't use `_()' when no translation is needed.
23758
23759 1999-12-13 Jesse Thilo <jthilo@gnu.org>
23760
23761 * src/files.c:
23762 OS/2 honors TMPDIR environment variable.
23763
23764 1999-12-13 Jesse Thilo <jthilo@gnu.org>
23765
23766 * doc/bison.texinfo: Tweaked spelling and grammar.
23767 Updated ISBN.
23768 Removed reference to price of printed copy.
23769 Mention BISON_SIMPLE and BISON_HAIRY.
23770
23771 1999-12-13 Jesse Thilo <jthilo@gnu.org>
23772
23773 * configure.in, NEWS:
23774 Bison 1.29 released.
23775
23776 1999-10-27 Jesse Thilo <jthilo@gnu.org>
23777
23778 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
23779 Added reference card.
23780
23781 1999-07-26 Jesse Thilo <jthilo@gnu.org>
23782
23783 * po/ru.po: Added Russian translation.
23784
23785 1999-07-26 Jesse Thilo <jthilo@gnu.org>
23786
23787 * configure.in: Added Russian translation.
23788
23789 1999-07-06 Jesse Thilo <jthilo@gnu.org>
23790
23791 * configure.in, NEWS, README:
23792 Released version 1.28.
23793
23794 1999-06-14 Jesse Thilo <jthilo@gnu.org>
23795
23796 * src/system.h:
23797 Squashed redefinition warning on some systems.
23798
23799 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
23800 Have configure build version string instead of relying on ANSI string
23801 concatentation.
23802
23803 1999-06-14 Jesse Thilo <jthilo@gnu.org>
23804
23805 * po/POTFILES.in: Got rid of version.c.
23806
23807 1999-06-14 Jesse Thilo <jthilo@gnu.org>
23808
23809 * acconfig.h, configure.in:
23810 Have configure build version string instead of relying on ANSI string
23811 concatentation.
23812
23813 1999-06-08 Jesse Thilo <jthilo@gnu.org>
23814
23815 * doc/bison.1:
23816 Dropped mention of `+' for long-named options.
23817
23818 1999-05-30 Jesse Thilo <jthilo@gnu.org>
23819
23820 * src/files.c: Added <unistd.h> for unlink().
23821
23822 * src/Makefile.am, src/system.h:
23823 I18n fixes.
23824
23825 1999-05-30 Jesse Thilo <jthilo@gnu.org>
23826
23827 * README: Added a FAQ list.
23828
23829 * configure.in, acconfig.h:
23830 I18n fixes.
23831
23832 1999-05-30 Jesse Thilo <jthilo@gnu.org>
23833
23834 * doc/FAQ, doc/Makefile.am:
23835 Added a FAQ list.
23836
23837 1999-05-19 Jesse Thilo <jthilo@gnu.org>
23838
23839 * src/alloc.h, src/symtab.h, src/version.c:
23840 Protected inclusion of "config.h" with HAVE_CONFIG_H.
23841
23842 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23843
23844 * src/.cvsignore, src/Makefile.am:
23845 Reorganized: sources in `src', documentation in `doc'.
23846
23847 * src/lex.c (literalchar):
23848 fixed the code for escaping double quotes (thanks
23849 Jonathan Czisny.)
23850
23851 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23852
23853 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
23854 Adjusted paths to reflect directory reorganization.
23855
23856 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23857
23858 * doc/.cvsignore, doc/Makefile.am:
23859 Reorganized: sources in `src', documentation in `doc'.
23860
23861 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23862
23863 * configure.in:
23864 Updated AC_INIT file to reflect directory reorganization.
23865
23866 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
23867 Reorganized: sources in `src', documentation in `doc'.
23868
23869 1999-04-13 Jesse Thilo <jthilo@gnu.org>
23870
23871 * src/allocate.c:
23872 Don't declare calloc() and realloc() if not necessary.
23873
23874 1999-04-13 Jesse Thilo <jthilo@gnu.org>
23875
23876 * configure.in, acconfig.h, acinclude.m4:
23877 Don't declare calloc() and realloc() if not necessary.
23878
23879 1999-03-23 Jesse Thilo <jthilo@gnu.org>
23880
23881 * po/.cvsignore: Added i18n support.
23882
23883 1999-03-23 Jesse Thilo <jthilo@gnu.org>
23884
23885 * acconfig.h, configure.in, Makefile.am:
23886 Added i18n support.
23887
23888 1999-03-22 Jesse Thilo <jthilo@gnu.org>
23889
23890 * src/bison.s1: Fixed #line numbers.
23891
23892 1999-03-15 Jesse Thilo <jthilo@gnu.org>
23893
23894 * po/es.po, po/fr.po, po/nl.po, po/de.po:
23895 Added PO files from Translation Project.
23896
23897 1999-03-03 Jesse Thilo <jthilo@gnu.org>
23898
23899 * Makefile.am:
23900 Added support for non-ANSI compilers (ansi2knr).
23901
23902 1999-02-16 Jesse Thilo <jthilo@gnu.org>
23903
23904 * configure.in: Bumped version number to 1.27.
23905
23906 * Makefile.am:
23907 Added `bison.simple' to list of files removed by `make distclean'.
23908
23909 1999-02-12 Jesse Thilo <jthilo@gnu.org>
23910
23911 * src/files.c, src/files.h:
23912 Defined locations of parser files in config.h instead of Makefile.
23913
23914 1999-02-12 Jesse Thilo <jthilo@gnu.org>
23915
23916 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
23917 Defined locations of parser files in config.h instead of Makefile.
23918
23919 1999-02-09 Jesse Thilo <jthilo@gnu.org>
23920
23921 * Makefile.am:
23922 Removed inappropriate use of $< macro.
23923
23924 1999-02-05 Jesse Thilo <jthilo@gnu.org>
23925
23926 * po/Makefile.in.in, po/POTFILES.in:
23927 Add `po' directory skeleton.
23928
23929 1999-01-27 Jesse Thilo <jthilo@gnu.org>
23930
23931 * README: Document help-bison list.
23932
23933 * configure.in: Add check for mkstemp().
23934
23935 1999-01-20 Jesse Thilo <jthilo@gnu.org>
23936
23937 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
23938 Hush a few compiler warnings.
23939
23940 * src/files.c:
23941 Add tryclose(), which verifies that fclose was successful.
23942 Hush a couple of compiler warnings.
23943
23944 1999-01-20 Jesse Thilo <jthilo@gnu.org>
23945
23946 * Makefile.am, OChangeLog:
23947 ChangeLog is now automatically generated. Include the old version as
23948 OChangeLog.
23949
23950 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23951
23952 * 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:
23953 Update FSF address.
23954
23955 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23956
23957 * doc/bison.texinfo: Fix formatting glitch.
23958
23959 * doc/bison.texinfo: Update FSF address.
23960
23961 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23962
23963 * acconfig.h: Update FSF address.
23964
23965 1999-01-08 Jesse Thilo <jthilo@gnu.org>
23966
23967 * src/system.h:
23968 Don't define PACKAGE here, since config.h defines it.
23969
23970 1998-12-30 Jesse Thilo <jthilo@gnu.org>
23971
23972 * src/reader.c: Update copyright date.
23973
23974 * src/main.c:
23975 Ditch sprintf to statically-sized buffers in fatal/warn functions in
23976 favor of output directly to stderr (avoids buffer overruns).
23977
23978 * src/reader.c: Some checks for premature EOF.
23979
23980 * 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:
23981 Use prototypes if the compiler understands them.
23982
23983 * src/files.c: Honor TMPDIR on Unix hosts.
23984 Use prototypes if the compiler understands them.
23985
23986 * src/reader.c:
23987 Fix a couple of buffer overrun bugs.
23988 Use prototypes if the compiler understands them.
23989
23990 * src/system.h: Include unistd.h and ctype.h.
23991 Use #ifdef instead of #if for NLS symbols.
23992
23993 1998-12-30 Jesse Thilo <jthilo@gnu.org>
23994
23995 * doc/bison.texinfo:
23996 Delete comment "consider using @set for edition number, etc..." since
23997 we now are doing so.
23998
23999 1998-12-30 Jesse Thilo <jthilo@gnu.org>
24000
24001 * configure.in:
24002 Use prototypes if the compiler understands them.
24003
24004 * NEWS: Document 1.26 highlights.
24005
24006 * Makefile.am: Require Automake 1.3 or later.
24007
24008 * acconfig.h:
24009 Use prototypes if the compiler understands them.
24010
24011 1998-12-29 Jesse Thilo <jthilo@gnu.org>
24012
24013 * src/version.c:
24014 Use VERSION symbol from automake for version number.
24015
24016 1998-12-29 Jesse Thilo <jthilo@gnu.org>
24017
24018 * acconfig.h, configure.in, version.cin:
24019 Use VERSION symbol from automake for version number.
24020
24021 1998-11-28 Jesse Thilo <jthilo@gnu.org>
24022
24023 * Makefile.am:
24024 Distribute original version of simple parser (bison.s1), not built
24025 version (bison.simple).
24026
24027 1998-11-28 Jesse Thilo <jthilo@gnu.org>
24028
24029 * doc/bison.texinfo: Add info dir entry.
24030
24031 * doc/bison.texinfo:
24032 Let automake put version number into documentation.
24033
24034 1998-11-26 Jesse Thilo <jthilo@gnu.org>
24035
24036 * src/bison.cld, src/build.com, src/vmshlp.mar:
24037 Add non-RCS files from /gd/gnu/bison.
24038
24039 1998-11-26 Jesse Thilo <jthilo@gnu.org>
24040
24041 * doc/bison.1:
24042 Document the BISON_HAIRY and BISON_SIMPLE variables.
24043
24044 1998-11-25 Jesse Thilo <jthilo@gnu.org>
24045
24046 * src/version.c: Build version.c automatically.
24047
24048 * src/reader.c:
24049 Fix token numbering (used to start at 258, not 257).
24050
24051 * src/system.h: Include config.h.
24052
24053 * src/getargs.c: Update bug report address.
24054
24055 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
24056 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
24057
24058 1998-11-25 Jesse Thilo <jthilo@gnu.org>
24059
24060 * Makefile.am:
24061 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
24062
24063 * configure.in, version.cin:
24064 Build version.c automatically.
24065
24066 * AUTHORS: Add AUTHORS file.
24067
24068 * README: Update bug report address.
24069
24070 * bison.simple:
24071 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
24072
24073 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
24074 Add automake stuff.
24075
24076 1998-11-25 Jesse Thilo <jthilo@gnu.org>
24077
24078 * doc/bison.texinfo: Clean up some formatting.
24079
24080 1998-05-05 Richard Stallman <rms@gnu.org>
24081
24082 * doc/bison.texinfo:
24083 Explain better why to make a pure parser.
24084
24085 1998-01-05 Richard Stallman <rms@gnu.org>
24086
24087 * src/files.c (openfiles):
24088 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
24089 find a temporary directory, if possible. Do not unlink files while
24090 they are open.
24091
24092 1997-08-25 Richard Stallman <rms@gnu.org>
24093
24094 * src/reader.c (stack_offset;):
24095 Change some warni to warns.
24096
24097 * src/lex.c (literalchar): Use warns, not warni.
24098
24099 1997-06-28 Richard Stallman <rms@gnu.org>
24100
24101 * src/bison.s1: Add a Bison version comment.
24102
24103 * src/main.c (fatal, warn, berror):
24104 Use program_name.
24105
24106 1997-06-28 Richard Stallman <rms@gnu.org>
24107
24108 * Makefile.in (bison_version): New variable.
24109 (dist): Use that variable.
24110 (bison.s1): Substitute the Bison version into bison.simple.
24111
24112 * bison.simple: Add a Bison version comment.
24113
24114 1997-06-18 Richard Stallman <rms@gnu.org>
24115
24116 * src/main.c (fatal, warn, berror):
24117 Make error messages standard.
24118 (toomany): Improve error message text.
24119
24120 * 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:
24121 new.h renamed to alloc.h.
24122
24123 1997-06-18 Richard Stallman <rms@gnu.org>
24124
24125 * Makefile.in: new.h renamed to alloc.h.
24126
24127 1997-05-24 Richard Stallman <rms@gnu.org>
24128
24129 * src/lex.c (literalchar):
24130 Fix the code for escaping \, " and '.
24131
24132 (lex): Avoid trouble when there are many chars
24133 to discard in a char literal with just several chars in it.
24134
24135 1997-05-17 Richard Stallman <rms@gnu.org>
24136
24137 * src/bison.s1:
24138 Use malloc, if using alloca is troublesome.
24139 (YYSTACK_USE_ALLOCA): New flag macro.
24140 Define it for some systems and compilers.
24141 (YYSTACK_ALLOC): New macro.
24142 (yyparse): Use YYSTACK_ALLOC to allocate stack.
24143 If it was malloc'd, free it.
24144
24145 1997-05-17 Richard Stallman <rms@gnu.org>
24146
24147 * bison.simple:
24148 Use malloc, if using alloca is troublesome.
24149 (YYSTACK_USE_ALLOCA): New flag macro.
24150 Define it for some systems and compilers.
24151 (YYSTACK_ALLOC): New macro.
24152 (yyparse): Use YYSTACK_ALLOC to allocate stack.
24153 If it was malloc'd, free it.
24154
24155 1997-04-23 Richard Stallman <rms@gnu.org>
24156
24157 * src/bison.s1:
24158 (alloca) [__hpux]: Always define as __builtin_alloca.
24159
24160 1997-04-23 Richard Stallman <rms@gnu.org>
24161
24162 * bison.simple:
24163 (alloca) [__hpux]: Always define as __builtin_alloca.
24164
24165 1997-04-22 Richard Stallman <rms@gnu.org>
24166
24167 * src/bison.s1:
24168 [__hpux]: Include alloca.h (right for HPUX 10)
24169 instead of declaring alloca (right for HPUX 9).
24170
24171 * src/bison.s1 (__yy_memcpy):
24172 Declare arg `count' as unsigned int.
24173 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
24174
24175 1997-04-22 Richard Stallman <rms@gnu.org>
24176
24177 * bison.simple:
24178 [__hpux]: Include alloca.h (right for HPUX 10)
24179 instead of declaring alloca (right for HPUX 9).
24180
24181 * bison.simple (__yy_memcpy):
24182 Declare arg `count' as unsigned int.
24183 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
24184
24185 1997-01-03 Richard Stallman <rms@gnu.org>
24186
24187 * src/allocate.c: [__STDC__ or _MSC_VER]:
24188 Declare calloc and realloc to return void *.
24189
24190 1997-01-02 Richard Stallman <rms@gnu.org>
24191
24192 * src/system.h:
24193 [_MSC_VER]: Include stdlib.h and process.h.
24194 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
24195
24196 * src/main.c (main): Return FAILURE as a value.
24197 (printable_version): Declare arg as int, not char.
24198
24199 1997-01-02 Richard Stallman <rms@gnu.org>
24200
24201 * Makefile.in (dist):
24202 Explicitly check for symlinks, and copy them.
24203
24204 1996-12-19 Richard Stallman <rms@gnu.org>
24205
24206 * src/files.c:
24207 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
24208
24209 1996-12-18 Paul Eggert <eggert@gnu.org>
24210
24211 * src/bison.s1 (yyparse):
24212 If __GNUC__ and YYPARSE_PARAM are both defined,
24213 declare yyparse to have a void * argument.
24214
24215 1996-12-18 Paul Eggert <eggert@gnu.org>
24216
24217 * bison.simple (yyparse):
24218 If __GNUC__ and YYPARSE_PARAM are both defined,
24219 declare yyparse to have a void * argument.
24220
24221 1996-12-17 Richard Stallman <rms@gnu.org>
24222
24223 * src/reduce.c (nbits): Add some casts.
24224
24225 1996-08-12 Richard Stallman <rms@gnu.org>
24226
24227 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
24228
24229 1996-08-12 Richard Stallman <rms@gnu.org>
24230
24231 * bison.simple: Test _MSDOS as well as _MSDOS_.
24232
24233 1996-07-31 Richard Stallman <rms@gnu.org>
24234
24235 * src/bison.s1:
24236 [__sun && __i386]: Include alloca.h.
24237
24238 1996-07-31 Richard Stallman <rms@gnu.org>
24239
24240 * bison.simple:
24241 [__sun && __i386]: Include alloca.h.
24242
24243 1996-07-30 Richard Stallman <rms@gnu.org>
24244
24245 * src/bison.s1: Comment change.
24246
24247 * src/bison.s1: Test _MSDOS_, not MSDOS.
24248
24249 1996-07-30 Richard Stallman <rms@gnu.org>
24250
24251 * bison.simple: Comment change.
24252
24253 * bison.simple: Test _MSDOS_, not MSDOS.
24254
24255 1996-06-01 Richard Stallman <rms@gnu.org>
24256
24257 * 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:
24258 Insert `_' macro around many string constants.
24259
24260 * src/main.c:
24261 Insert `_' macro around many string constants.
24262
24263 (main): Call setlocale, bindtextdomain and textdomain.
24264
24265 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
24266 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
24267 [ENABLE_NLS]: Include libintl.h.
24268 [ENABLE_NLS] (gettext): Define.
24269 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
24270 (N_, PACKAGE, LOCALEDIR): New macros.
24271
24272 1996-06-01 Richard Stallman <rms@gnu.org>
24273
24274 * POTFILES.in: New file.
24275
24276 * Makefile.in (allocate.o):
24277 Define target explicitly.
24278
24279 * Makefile.in (CFLAGS): Set to @CFLAGS@.
24280 (LDFLAGS): Set to @LDFLAGS@.
24281 (configure): Run autoconf only if preceding `cd' succeeds.
24282 (bison.s1): Redirect output to temporary file then move the
24283 temporary to the target, rather than redirecting directly to bison.s1.
24284 (clean): Remove config.status and config.log.
24285 (distclean): Don't remove config.status here.
24286
24287 1996-05-12 Richard Stallman <rms@gnu.org>
24288
24289 * src/bison.s1:
24290 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
24291
24292 1996-05-12 Richard Stallman <rms@gnu.org>
24293
24294 * bison.simple:
24295 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
24296
24297 1996-05-11 Richard Stallman <rms@gnu.org>
24298
24299 * src/bison.s1 (__yy_memcpy):
24300 Really reorder the args, as was supposedly done on Feb 14 1995.
24301 (yyparse): Calls changed accordingly.
24302
24303 1996-05-11 Richard Stallman <rms@gnu.org>
24304
24305 * Makefile.in (dist): Don't use $(srcdir).
24306
24307 * bison.simple (__yy_memcpy):
24308 Really reorder the args, as was supposedly done on Feb 14 1995.
24309 (yyparse): Calls changed accordingly.
24310
24311 1996-01-27 Richard Stallman <rms@gnu.org>
24312
24313 * src/output.c (output_rule_data):
24314 Test YYERROR_VERBOSE in the conditional
24315 around the definition of ttyname.
24316
24317 1995-12-29 Richard Stallman <rms@gnu.org>
24318
24319 * src/bison.s1:
24320 Fix line numbers in #line commands.
24321
24322 1995-12-29 Richard Stallman <rms@gnu.org>
24323
24324 * bison.simple:
24325 Fix line numbers in #line commands.
24326
24327 1995-12-27 Richard Stallman <rms@gnu.org>
24328
24329 * src/bison.s1 (YYPARSE_PARAM_DECL):
24330 In C++, make it always null.
24331 (YYPARSE_PARAM_ARG): New macro.
24332 (yyparse): Use YYPARSE_PARAM_ARG.
24333
24334 1995-12-27 Richard Stallman <rms@gnu.org>
24335
24336 * bison.simple (YYPARSE_PARAM_DECL):
24337 In C++, make it always null.
24338 (YYPARSE_PARAM_ARG): New macro.
24339 (yyparse): Use YYPARSE_PARAM_ARG.
24340
24341 1995-11-29 Richard Stallman <rms@gnu.org>
24342
24343 * doc/bison.texinfo:
24344 Describe literal string tokens, %raw, %no_lines, %token_table.
24345
24346 1995-11-29 Daniel Hagerty <hag@gnu.org>
24347
24348 * doc/bison.texinfo: Fixed update date
24349
24350 1995-10-16 Richard Stallman <rms@gnu.org>
24351
24352 * src/version.c: Version 1.25.
24353
24354 1995-10-16 Richard Stallman <rms@gnu.org>
24355
24356 * NEWS: *** empty log message ***
24357
24358 1995-10-16 Richard Stallman <rms@gnu.org>
24359
24360 * doc/bison.1, doc/bison.rnh:
24361 Add new options.
24362
24363 1995-10-15 Richard Stallman <rms@gnu.org>
24364
24365 * src/vmsgetargs.c, src/getargs.c:
24366 Added -n, -k, and -raw switches.
24367 (noparserflag, toknumflag, rawtoknumflag): New variables.
24368
24369 * src/symtab.h (SALIAS):
24370 New #define for adding aliases to %token.
24371 (struct bucket): Added `alias' field.
24372
24373 * src/reduce.c (reduce_grammar):
24374 Revise error message.
24375 (print_notices): Remove final `.' from error message.
24376
24377 * src/reader.c (reader_output_yylsp):
24378 New function.
24379 (readgram): Use `#if 0' around code that accepted %command
24380 inside grammar rules: The documentation doesn't allow it,
24381 and it will fail since the %command processors scan for the next %.
24382 (parse_token_decl): Extended the %token
24383 declaration to allow a multi-character symbol as an alias.
24384 (parse_thong_decl): New function.
24385 (read_declarations): Added %thong declarations.
24386 (read_declarations): Handle NOOP to deal with allowing
24387 % declarations as another means to specify the flags.
24388 (readgram): Allow %prec prior to semantics embedded in a rule.
24389 (skip_to_char, read_declarations, copy_definition)
24390 (parse_token_decl, parse_start_decl, parse_type_decl)
24391 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
24392 (get_type_name, copy_guard, copy_action, readgram)
24393 (get_type, packsymbols): Revised most error messages.
24394 Changed `fatal' to `warnxxx' to avoid aborting for error.
24395 Revised and use multiple warnxxx functions to avoid using VARARGS1.
24396 (read_declarations): Improve the error message for
24397 an invalid character. Do not abort.
24398 (read_declarations, copy_guard, copy_action): Use
24399 printable_version to avoid unprintable characters in printed output.
24400 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
24401 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
24402 Allow the type of a non-terminal can be given
24403 more than once, as long as all specifications give the same type.
24404
24405 * src/output.c:
24406 (output_headers, output_trailers, output, output_gram)
24407 (output_rule_data): Implement noparserflag variable.
24408 Implement toknumflag variable.
24409 (output): Call reader_output_yylsp to output LTYPESTR.
24410
24411 * src/main.c (main):
24412 If reader sees an error, don't process the grammar.
24413 (fatals): Updated to not use VARARGS1.
24414 (printable_version, int_to_string, warn, warni, warns, warnss)
24415 (warnsss): New error reporting functions. Avoid abort for error.
24416
24417 * src/lex.h:
24418 Added THONG and NOOP for alias processing.
24419 Added SETOPT for the new code that allows setting options with %flags.
24420
24421 * src/lex.c:
24422 Include getopt.h. Add some extern decls.
24423 (safegetc): New function to deal with EOF gracefully.
24424 (literalchar); new function to deal with reading \ escapes.
24425 (lex): Use literalchar.
24426 (lex): Implemented "..." tokens.
24427 (literalchar, lex, parse_percent_token): Made tokenbuffer
24428 always contain the token. This includes growing the token
24429 buffer while reading an integer.
24430 (parse_percent_token): Replaced if-else statement with percent_table.
24431 (parse_percent_token): Added % declarations as another
24432 way to specify the flags -n, -l, and -r. Also added hooks for
24433 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
24434 major changes to files.c.
24435 (lex) Retain in the incoming stream a character following
24436 an incorrect '/'.
24437 (skip_white_space, lex): Revised most error messages
24438 and changed fatal to warn to avoid aborting.
24439 (percent_table): Added %thong declarations.
24440
24441 * src/gram.h: Comment changes.
24442
24443 * src/files.c (openfiles, open_extra_files, done):
24444 Add faction flag
24445 and actfile file. Handle noparserflag. Both for -n switch.
24446
24447 * src/conflicts.c (resolve_sr_conflict):
24448 Remove use of alloca.
24449
24450 1995-06-01 Jim Meyering <meyering@gnu.org>
24451
24452 * doc/bison.texinfo: *** empty log message ***
24453
24454 1995-05-06 Richard Stallman <rms@gnu.org>
24455
24456 * src/bison.s1: Comment change.
24457
24458 1995-05-06 Richard Stallman <rms@gnu.org>
24459
24460 * bison.simple: Comment change.
24461
24462 1995-05-03 Richard Stallman <rms@gnu.org>
24463
24464 * src/version.c: Version now 1.24.
24465
24466 * src/bison.s1: Change distribution terms.
24467
24468 * src/version.c: Version now 1.23.
24469
24470 1995-05-03 Richard Stallman <rms@gnu.org>
24471
24472 * doc/bison.texinfo:
24473 Rewrite "Conditions for Using Bison".
24474 Update version to 1.24.
24475
24476 1995-05-03 Richard Stallman <rms@gnu.org>
24477
24478 * bison.simple: Change distribution terms.
24479
24480 1995-02-23 Richard Stallman <rms@gnu.org>
24481
24482 * src/files.c: Test __VMS_POSIX as well as VMS.
24483
24484 1995-02-14 Jim Meyering <meyering@gnu.org>
24485
24486 * src/bison.s1 (__yy_memcpy):
24487 Renamed from __yy_bcopy to avoid
24488 confusion. Reverse FROM and TO arguments to be consistent with
24489 those of memcpy.
24490
24491 1995-02-14 Jim Meyering <meyering@gnu.org>
24492
24493 * bison.simple (__yy_memcpy):
24494 Renamed from __yy_bcopy to avoid
24495 confusion. Reverse FROM and TO arguments to be consistent with
24496 those of memcpy.
24497
24498 1994-11-10 David J. MacKenzie <djm@gnu.org>
24499
24500 * NEWS: reformat
24501
24502 * NEWS: New file.
24503
24504 * Makefile.in (DISTFILES): Include NEWS.
24505
24506 * Makefile.in (DISTFILES):
24507 Include install-sh, not install.sh.
24508
24509 * configure.in: Update to Autoconf v2 macro names.
24510
24511 1994-10-05 David J. MacKenzie <djm@gnu.org>
24512
24513 * Makefile.in: fix typo
24514
24515 * Makefile.in (prefix, exec_prefix):
24516 Let configure set them.
24517
24518 1994-09-28 David J. MacKenzie <djm@gnu.org>
24519
24520 * Makefile.in: Set datadir to $(prefix)/share.
24521
24522 1994-09-15 Richard Stallman <rms@gnu.org>
24523
24524 * src/bison.s1:
24525 Update copyright notice and GPL version.
24526
24527 1994-09-15 Richard Stallman <rms@gnu.org>
24528
24529 * bison.simple:
24530 Update copyright notice and GPL version.
24531
24532 1994-07-12 Richard Stallman <rms@gnu.org>
24533
24534 * src/reduce.c, src/reader.c:
24535 entered into RCS
24536
24537 1994-05-05 David J. MacKenzie <djm@gnu.org>
24538
24539 * Makefile.in: entered into RCS
24540
24541 1994-03-26 Richard Stallman <rms@gnu.org>
24542
24543 * src/bison.s1: entered into RCS
24544
24545 1994-03-26 Richard Stallman <rms@gnu.org>
24546
24547 * bison.simple: entered into RCS
24548
24549 1994-03-25 Richard Stallman <rms@gnu.org>
24550
24551 * src/main.c: entered into RCS
24552
24553 1994-03-24 Richard Stallman <rms@gnu.org>
24554
24555 * src/conflicts.c: entered into RCS
24556
24557 1994-01-02 Richard Stallman <rms@gnu.org>
24558
24559 * Makefile.in: *** empty log message ***
24560
24561 1993-11-21 Richard Stallman <rms@gnu.org>
24562
24563 * src/bison.s1: *** empty log message ***
24564
24565 1993-11-21 Richard Stallman <rms@gnu.org>
24566
24567 * doc/bison.texinfo: entered into RCS
24568
24569 * doc/bison.texinfo: *** empty log message ***
24570
24571 1993-11-21 Richard Stallman <rms@gnu.org>
24572
24573 * bison.simple: *** empty log message ***
24574
24575 1993-10-25 David J. MacKenzie <djm@gnu.org>
24576
24577 * doc/bison.texinfo: *** empty log message ***
24578
24579 1993-10-19 Richard Stallman <rms@gnu.org>
24580
24581 * src/bison.s1: *** empty log message ***
24582
24583 1993-10-19 Richard Stallman <rms@gnu.org>
24584
24585 * bison.simple: *** empty log message ***
24586
24587 1993-10-14 Richard Stallman <rms@gnu.org>
24588
24589 * src/bison.s1: *** empty log message ***
24590
24591 1993-10-14 Richard Stallman <rms@gnu.org>
24592
24593 * bison.simple: *** empty log message ***
24594
24595 1993-09-14 David J. MacKenzie <djm@gnu.org>
24596
24597 * doc/bison.texinfo: *** empty log message ***
24598
24599 1993-09-13 Noah Friedman <friedman@gnu.org>
24600
24601 * Makefile.in: *** empty log message ***
24602
24603 1993-09-10 Richard Stallman <rms@gnu.org>
24604
24605 * src/conflicts.c: *** empty log message ***
24606
24607 * src/system.h: entered into RCS
24608
24609 1993-09-10 Richard Stallman <rms@gnu.org>
24610
24611 * doc/bison.1: entered into RCS
24612
24613 1993-09-06 Noah Friedman <friedman@gnu.org>
24614
24615 * src/version.c: entered into RCS
24616
24617 1993-09-06 Noah Friedman <friedman@gnu.org>
24618
24619 * Makefile.in: *** empty log message ***
24620
24621 1993-07-30 David J. MacKenzie <djm@gnu.org>
24622
24623 * Makefile.in: *** empty log message ***
24624
24625 1993-07-24 Richard Stallman <rms@gnu.org>
24626
24627 * src/bison.s1: *** empty log message ***
24628
24629 1993-07-24 Richard Stallman <rms@gnu.org>
24630
24631 * bison.simple: *** empty log message ***
24632
24633 1993-07-08 David J. MacKenzie <djm@gnu.org>
24634
24635 * Makefile.in: *** empty log message ***
24636
24637 1993-07-04 Richard Stallman <rms@gnu.org>
24638
24639 * src/bison.s1: *** empty log message ***
24640
24641 1993-07-04 Richard Stallman <rms@gnu.org>
24642
24643 * bison.simple: *** empty log message ***
24644
24645 1993-06-26 David J. MacKenzie <djm@gnu.org>
24646
24647 * src/getargs.c: entered into RCS
24648
24649 1993-06-26 David J. MacKenzie <djm@gnu.org>
24650
24651 * doc/bison.texinfo: *** empty log message ***
24652
24653 * doc/bison.1: New file.
24654
24655 1993-06-25 Richard Stallman <rms@gnu.org>
24656
24657 * src/getargs.c: New file.
24658
24659 1993-06-16 Richard Stallman <rms@gnu.org>
24660
24661 * src/bison.s1: *** empty log message ***
24662
24663 1993-06-16 Richard Stallman <rms@gnu.org>
24664
24665 * bison.simple: *** empty log message ***
24666
24667 1993-06-03 Richard Stallman <rms@gnu.org>
24668
24669 * src/bison.s1: New file.
24670
24671 1993-06-03 Richard Stallman <rms@gnu.org>
24672
24673 * doc/bison.texinfo: *** empty log message ***
24674
24675 1993-06-03 Richard Stallman <rms@gnu.org>
24676
24677 * bison.simple: New file.
24678
24679 1993-05-19 Richard Stallman <rms@gnu.org>
24680
24681 * doc/bison.texinfo: New file.
24682
24683 1993-05-07 Noah Friedman <friedman@gnu.org>
24684
24685 * Makefile.in: *** empty log message ***
24686
24687 1993-04-28 Noah Friedman <friedman@gnu.org>
24688
24689 * src/reader.c: *** empty log message ***
24690
24691 1993-04-23 Noah Friedman <friedman@gnu.org>
24692
24693 * src/alloc.h: entered into RCS
24694
24695 1993-04-20 David J. MacKenzie <djm@gnu.org>
24696
24697 * src/version.c: *** empty log message ***
24698
24699 * src/files.c, src/allocate.c:
24700 entered into RCS
24701
24702 * src/reader.c: *** empty log message ***
24703
24704 * src/lex.c: entered into RCS
24705
24706 * src/conflicts.c: New file.
24707
24708 * src/symtab.c: entered into RCS
24709
24710 * src/alloc.h: New file.
24711
24712 * src/LR0.c: entered into RCS
24713
24714 1993-04-18 Noah Friedman <friedman@gnu.org>
24715
24716 * src/reader.c: New file.
24717
24718 * src/version.c: *** empty log message ***
24719
24720 1993-04-18 Noah Friedman <friedman@gnu.org>
24721
24722 * Makefile.in: *** empty log message ***
24723
24724 1993-04-17 Noah Friedman <friedman@gnu.org>
24725
24726 * Makefile.in: *** empty log message ***
24727
24728 1993-04-15 Richard Stallman <rms@gnu.org>
24729
24730 * src/main.c, src/files.c:
24731 New file.
24732
24733 1993-04-15 Noah Friedman <friedman@gnu.org>
24734
24735 * configure.in: entered into RCS
24736
24737 * configure.in: *** empty log message ***
24738
24739 * configure.in: New file.
24740
24741 1993-04-14 Richard Stallman <rms@gnu.org>
24742
24743 * Makefile.in: New file.
24744
24745 1993-04-13 Richard Stallman <rms@gnu.org>
24746
24747 * src/version.c: New file.
24748
24749 1993-03-25 Richard Stallman <rms@gnu.org>
24750
24751 * src/output.c: entered into RCS
24752
24753 1992-09-25 Richard Stallman <rms@gnu.org>
24754
24755 * configure.bat: entered into RCS
24756
24757 1992-06-22 Richard Stallman <rms@gnu.org>
24758
24759 * src/vmsgetargs.c: entered into RCS
24760
24761 1992-06-22 Richard Stallman <rms@gnu.org>
24762
24763 * doc/bison.rnh: entered into RCS
24764
24765 1992-04-20 David J. MacKenzie <djm@gnu.org>
24766
24767 * README: entered into RCS
24768
24769 1992-01-22 Richard Stallman <rms@gnu.org>
24770
24771 * src/machine.h: entered into RCS
24772
24773 1991-12-21 Richard Stallman <rms@gnu.org>
24774
24775 * src/lalr.c, src/closure.c:
24776 entered into RCS
24777
24778 1991-12-20 Richard Stallman <rms@gnu.org>
24779
24780 * src/state.h: entered into RCS
24781
24782 1991-12-18 Richard Stallman <rms@gnu.org>
24783
24784 * src/print.c, src/nullable.c, src/derives.c:
24785 entered into RCS
24786
24787 1991-11-03 David J. MacKenzie <djm@gnu.org>
24788
24789 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
24790 entered into RCS
24791
24792 1988-09-09 Richard Stallman <rms@gnu.org>
24793
24794 * src/bison.hairy: entered into RCS
24795
24796 1987-12-16 Richard Stallman <rms@gnu.org>
24797
24798 * REFERENCES: entered into RCS
24799
24800
24801 -----
24802
24803 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
24804 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
24805 2008, 2009 Free Software Foundation, Inc.
24806
24807 Copying and distribution of this file, with or without
24808 modification, are permitted provided the copyright notice and this
24809 notice are preserved.