]> git.saurik.com Git - bison.git/blame - ChangeLog
Add additional space after periods in NEWS.
[bison.git] / ChangeLog
CommitLineData
f840c05a
AR
12009-10-03 Alex Rozenman <rozenman@gmail.com>
2
3 Add additional space after periods in NEWS.
4 * NEWS (2.5): here.
5
17a407dc
JD
62009-09-29 Joel E. Denny <jdenny@clemson.edu>
7
8 Use the correct conversion specifier for size_t.
9 Reported by Jim Meyering.
10 * src/Sbitset.h (SBITSET__INDEX__CONVERSION_SPEC): New, "zu"
11 because Sbitset__Index is size_t.
12 * src/Sbitset.c (Sbitset__fprint): Use it instead of %d.
13
4b7a4c1b
JD
142009-09-27 Joel E. Denny <jdenny@clemson.edu>
15
16 tests: don't abuse AT_BISON_CHECK.
17 * tests/regression.at (parse-gram.y: LALR = IELR): Move
18 additional shell commands outside of AT_BISON_CHECK.
19
873ac263
JD
202009-09-26 Joel E. Denny <jdenny@clemson.edu>
21
22 tests: check that parse-gram.y's IELR and LALR are identical.
23 * tests/atlocal.in (abs_top_srcdir): New shell variable.
24 * tests/regression.at (parse-gram.y: LALR = IELR): New test
25 group.
26
232be91a
AD
272009-09-16 Akim Demaille <demaille@gostai.com>
28
29 doc: comment changes.
30 * doc/bison.texinfo: Comment changes.
31
c781580d
AD
322009-09-16 Akim Demaille <demaille@gostai.com>
33
34 doc: spell checking.
35 * doc/bison.texinfo: here.
36
348f5608
AR
372009-09-19 Alex Rozenman <rozenman@gmail.com>
38
39 Keep sub-messages aligned. Fix strings for translation.
f840c05a
AR
40 * src/location.h (location_print): Add return value.
41 * src/location.c (location_print): Return number of printed
348f5608 42 characters.
f840c05a
AR
43 * src/complain.h (complain_at_indent, warn_at_indent): Prototype
44 new functions.
45 * src/complain.cpp (indent_ptr): New static variable.
46 (error_message, complain_at_indent, warn_at_indent): Implement
47 the alignment mechanism.
48 * src/scan-code.l (parse_ref, show_sub_messages): Fix strings
49 for translations. Use new alignment mechanism.
50 * tests/named-ref.at: Adjust test-cases.
348f5608
AR
51 * NEWS (2.5): Add an announcement about named references.
52
d93b5f50
JD
532009-09-13 Joel E. Denny <jdenny@clemson.edu>
54
55 tests: clean up push.at test group titles.
56 * tests/push.at: Remove "Push Parsing: " from test group titles
57 because these are already under the banner "Push Parsing Tests".
58
4c56b131
AR
592009-09-12 Alex Rozenman <rozenman@gmail.com>
60
61 Provide an additional sub-message for clarity.
62 Add "symbol not found in production" error message when
63 an "invalid reference" is detected in named references
64 resolution.
65 * src/scan-code.l: Update "invalid reference" case.
66 * tests/named-ref.at: Adjust test-cases.
67
93d0103d
JD
682009-09-10 Joel E. Denny <jdenny@clemson.edu>
69
70 Clean up yacc.c a little.
71 * data/yacc.c: Clean up M4 for readability, and make output
72 whitespace more consistent. For the main parse function
73 comment, instead of saying "yyparse or yypush_parse", say either
74 "yyparse" or "yypush_parse" depending on which it actually is.
75
628be6c9
JD
762009-09-03 Joel E. Denny <jdenny@clemson.edu>
77
78 Complain about unused %define variables and %code qualifiers.
79 * NEWS (2.5): Document.
80 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
81 * doc/bison.texinfo (Decl Summary): Document complaint, and
82 improve %define documentation a little otherwise.
83 * tests/input.at (Reject unused %code qualifiers): Update.
84 (%define errors): Update.
85 (%define, --define, --force-define): Update.
86 (%define backward compatibility): Update.
87 (Unused %define api.pure): Update.
88 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
89
c842365a
JD
902009-09-03 Joel E. Denny <jdenny@clemson.edu>
91
92 Use aver not assert.
93 * src/output.c: Don't include assert.h.
94 (output_skeleton): Use aver not assert.
95 * src/system.h (aver): In documentation of why, add links to
96 Paul Eggert's explanations in the mailing lists.
97
14e568d7
AR
982009-09-05 Alex Rozenman <rozenman@gmail.com>
99
100 Use "Unresolved reference" error message when no symbols were found
101 in a symbolic reference resolution. Remove .expr and -expr from
102 the shown reference when the reference is unresolved.
103 * src/scan-code.l: Change the error message, adjust location columns,
104 rename variable "exact_mode" to "explicit_bracketing".
105 * tests/named-ref.at: Adjust existing tests and add a new one.
106
dac8cc0d
AD
1072009-09-03 Akim Demaille <demaille@gostai.com>
108
109 * NEWS (2.4.2): Add "Internationalization" item.
110
3710dd02
AD
1112009-09-03 Akim Demaille <demaille@gostai.com>
112
113 bootstrap: fix/improve find_tool.
114 * bootstrap (find_tool): Improve error messages.
115 Fix typo about find_tool_names.
116
9852b61c
JD
1172009-08-29 Joel E. Denny <jdenny@clemson.edu>
118
119 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
120 See
121 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
122 * src/scan-code.h (code_props_rule_action_init): Rename
123 named_ref arg to name so it doesn't shadow named_ref type. This
124 makes it consistent with the function definition in scan-code.l
125 anyway.
126
f37495f6
JD
1272009-08-28 Joel E. Denny <jdenny@clemson.edu>
128
129 %define: accept unquoted values.
130 * NEWS (2.5): Group all %define changes together, and document
131 this one. Remove quotes in IELR and canonical LR entry.
132 * doc/bison.texinfo: Remove quotes in most examples throughout.
133 (Decl Summary): Update %define documentation.
134 (Table of Symbols): Likewise.
135 * src/ielr.c (LrType): Update documentation.
136 * src/parse-gram.y (content.opt): Add production for ID.
5bf2bf7a 137 * tests/calc.at: Remove quotes in most tests.
f37495f6
JD
138 * tests/existing.at: Likewise.
139 * tests/input.at: Likewise.
140 * tests/local.at: Likewise.
141 * tests/push.at: Likewise.
142 * tests/reduce.at: Likewise.
143 * tests/torture.at: Likewise.
144
3a414bbf
JD
1452009-08-28 Joel E. Denny <jdenny@clemson.edu>
146
147 %define lr.type: make values lowercase IDs.
148 That is, "LALR" => "lalr", "IELR" => "ielr", and
149 "canonical LR" => "canonical-lr".
150 * NEWS (2.5): Update documentation.
151 * doc/bison.texinfo (Decl Summary): Likewise.
152 * src/ielr.c (ielr): Use new values.
153 * src/ielr.h (ielr): Update documentation.
154 * src/reader.c (prepare_percent_define_front_end_variables): Use
155 and validate new values.
156 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
157 grammars.
158 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
159
4bb975e1
EB
1602009-08-27 Eric Blake <ebb9@byu.net>
161
162 scan-gram: avoid portability trap with ctype usage.
163 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
164 Avoid compiler warning.
165
74baf5c9
JD
1662009-08-27 Joel E. Denny <jdenny@clemson.edu>
167
168 tests: use perl for printing special sequences to files.
169 And skip tests if perl is not available. This is better than
170 playing tricks with shell portability. Suggested by Akim
171 Demaille.
172 * tests/input.at (Bad character literals): Use it here for
173 omitting final newlines.
174 (Bad escapes in literals): Use it here for special characters.
175
d63e1279
JD
1762009-08-26 Joel E. Denny <jdenny@clemson.edu>
177
178 tests: show a use of %define lr.default-reductions "consistent"
179 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
180 prevents the omission of expected tokens for %error-verbose.
181
833d1720
AD
1822009-08-26 Akim Demaille <demaille@gostai.com>
183
184 tests: portability fix.
185 * tests/input.at (Bad escapes in literals): Don't expect "echo
186 '\0'" to output \ then 0.
187
e4bcae3c
JD
1882009-08-26 Joel E. Denny <jdenny@clemson.edu>
189
190 Actually handle the yytable zero value correctly this time.
191 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Don't
192 mention zero values in the YYTABLE comments.
193 * data/glr.c (yytable_value_is_error): Don't check for zero
194 value.
195 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
196 * data/yacc.c (yytable_value_is_error): Likewise.
197 * data/lalr1.java (yy_table_value_is_error_): Likewise.
198 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
199 * src/tables.h: In header comments, explain why it's useless to
200 check for a zero value in yytable.
201
d5eb0826
JD
2022009-08-25 Joel E. Denny <jdenny@clemson.edu>
203
204 More fixes related to last two patches.
205 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
206 defined.
207 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Fix
208 yytable comments: zero indicates syntax error not default
209 action.
210 * data/glr.c (yyis_pact_ninf): Rename to...
211 (yypact_value_is_default): ... this.
212 (yyisDefaultedState): Update for rename.
213 (yyis_table_ninf): Rename to...
214 (yytable_value_is_error): ... this, and check for value zero
215 besides just YYTABLE_NINF.
216 (yygetLRActions): Check for default value from yypact. It
217 appears that this check is always performed before this function
218 is invoked, and so adding the check here is probably redundant.
219 However, the code may evolve after this subtlety is forgotten.
220 Also, update for rename to yytable_value_is_error. Because that
221 macro now checks for zero, a different but equivalent branch of
222 the if-then-else here is evaluated.
223 (yyreportSyntaxError): Update for rename to
224 yytable_value_is_error. The zero condition was mishandled
225 before.
226 (yyrecoverSyntaxError): Update for renames. No behavioral
227 changes.
228 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
229 New function.
230 (yy_table_value_is_error_): New function.
231 (parse): Use new functions where possible. No behavioral
232 changes.
233 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
234 The zero condition was mishandled before.
235 * data/yacc.c (yyis_pact_ninf): Rename to...
236 (yypact_value_is_default): ... this.
237 (yyis_table_ninf): Rename to...
238 (yytable_value_is_error): ... this, and check for value zero
239 besides just YYTABLE_NINF.
240 (yysyntax_error): Update for rename to yytable_value_is_error.
241 The zero condition was mishandled before.
242 (yyparse): Update for renames. No behavioral changes.
243 * src/tables.h: Improve comments about yypact, yytable, etc.
244 more. Most importantly, say yytable value of zero means syntax
245 error not default action.
246
1fa30307
JD
2472009-08-25 Joel E. Denny <jdenny@clemson.edu>
248
249 Fix %error-verbose for conflicts resolved by %nonassoc.
250 * NEWS (2.5): Document.
251 * data/glr.c (yyreportSyntaxError): Fix this by checking
252 yyis_table_ninf.
253 * data/yacc.c (yysyntax_error): Likewise.
254 * data/lalr1.cc (yysyntax_error_): Fix this by checking
255 yytable_ninf_.
256 * data/lalr1.java (yysyntax_error): Likewise.
257 * tests/conflicts.at (%nonassoc and eof): Update expected output
258 and remove FIXME.
259
77373efa
JD
2602009-08-25 Joel E. Denny <jdenny@clemson.edu>
261
262 Some code and documentation improvements.
263 * data/c.m4 (b4_table_value_equals): New macro to capture
264 some repeated code.
265 * data/glr.c (yyis_pact_ninf): Use it here.
266 (yyis_table_ninf): Likewise.
267 (yyreportSyntaxError): Improve internal comments.
268 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
269 Use it everywhere possible.
270 (yyis_table_ninf): Likewise.
271 (yysyntax_error): Improve internal comments.
272 * data/lalr1.cc (yysyntax_error_): Likewise.
273 * data/lalr1.java (yysyntax_error): Likewise.
274 * src/tables.h: Improve comments about yypact, yytable, etc.
275
890ab17c
JD
2762009-08-21 Joel E. Denny <jdenny@clemson.edu>
277
278 Use locale when quoting.
279 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
280 quote rather than implementing quoting here.
281
c5196098
EB
2822009-08-20 Eric Blake <ebb9@byu.net>
283
aa50ba7b
EB
284 Make previous patch more robust.
285 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
286 argmatch.h.
287 (output_skeleton): Use it.
288 Suggested by Akim Demaille.
289
c5196098
EB
290 Import latest m4/m4.m4.
291 * submodules/autoconf: Update to autoconf 2.64.
292 * configure.ac (M4_GNU_OPTION): New define.
293 * src/output.c (output_skeleton): Use it to resolve FIXME.
294 * NEWS: Mention this.
295
39fb7e62
JD
2962009-08-19 Joel E. Denny <jdenny@clemson.edu>
297
298 Fix complaints about escape sequences.
299 Discussed starting at
300 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
301 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
302 For a \0 and similar escape sequences meaning the null
303 character, report an invalid escape sequence instead of an
304 invalid null character because the latter does not actually
305 appear in the user's input.
306 In all escape sequence complaints, don't escape the initial
307 backslash, and don't quote when the sequence appears at the end
308 of the complaint line unless there's whitespace that quotearg
309 won't escape.
310 Consistently say "invalid" not "unrecognized".
311 Consistently prefer "empty character literal" over "extra
312 characters in character literal" warning for invalid escape
313 sequences; that is, consistently discard those sequences.
314 * tests/input.at (Bad escapes in literals): New.
315
c33bc800
AD
3162009-08-19 Akim Demaille <demaille@gostai.com>
317
318 doc: fixes.
319 * doc/bison.texinfo: Fix minor Texinfo errors.
320
8fbbeba2
AD
3212009-08-19 Akim Demaille <demaille@gostai.com>
322
323 doc: %initial-action to initialize yylloc.
324 Reported by Bill Allombert.
325 * doc/bison.texinfo: Set fill-column to 76.
326 (Location Type): Document the use of %initial-action to initialize
327 yylloc.
328
1874a474
JD
3292009-08-18 Joel E. Denny <jdenny@clemson.edu>
330
331 maint: update for gnulib's recent update-copyright changes
332 * gnulib: Update.
333 * .x-update-copyright (COPYING): Add as it's no longer implied
334 when .x-update-copyright is present.
335 * cfg.mk (update-copyright-local): Remove, now ignored.
336 (update-copyright): Declare update-b4-copyright as a dependency.
337
f4bfd5a9
AD
3382009-08-17 Akim Demaille <demaille@gostai.com>
339
340 build: require gettext 0.17.
341
342 Suggested by Bruno Haible.
343 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
344 * configure.ac: require gettext 0.17 to ensure compatibility with
345 gnulib.
346
2509eba6
AD
3472009-08-17 Akim Demaille <demaille@gostai.com>
348
349 build: lower gettext requirements.
350
351 Bison was uselessly requiring the formatstring macros from
352 gettext, which resulted in mo files not being installed on systems
353 that perfectly supported Bison mo files. Lower the requirement.
354 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
355
aa50ba7b
EB
356 * configure.ac: Require need-ngettext instead of
357 need-formatstring-macros.
358 Reported by Martin Jabocs.
359 Suggested by Bruno Haible.
360 * INSTALL: Restructure.
361 (Internationalization): New.
2509eba6 362
314542f9
JD
3632009-08-14 Joel E. Denny <jdenny@clemson.edu>
364
365 maint: fix use of copyright year intervals.
366 * gnulib: Update.
367 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
368 as now recommended in gnulib/NEWS.
369 * build-aux/update-b4-copyright: Fix.
370 * cfg.mk (update-copyright-env): Configure update-copyright.
371
24985964
JD
3722009-08-13 Joel E. Denny <jdenny@clemson.edu>
373
374 Make it easier to write deterministic tests.
375 Continues Akim's work from his 2009-06-10 commits.
376 * src/reader.c (check_and_convert_grammar): Don't add any
377 symbols after the first symbols_do invocation.
378 * src/symtab.c (symbols_sorted): New static global.
379 (user_token_number_redeclaration): Update comments.
380 (symbol_from_uniqstr): If a new symbol is being created, assert
381 that symbols_sorted hasn't been allocated yet.
382 (symbols_free): Free symbols_sorted.
383 (symbols_cmp, symbols_cmp_qsort): New functions.
384 (symbols_do): Sort symbol_table into symbols_sorted on first
385 invocation.
386 * tests/input.at (Numbered tokens): Recombine tests now that the
387 output should be deterministic across multiple numbers.
388
47076da5
AD
3892009-08-12 Akim Demaille <demaille@gostai.com>
390
391 distcheck: fix.
392
aa50ba7b 393 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
47076da5 394
36dfe466
JD
3952009-08-10 Joel E. Denny <jdenny@clemson.edu>
396
397 * tests/Makefile.am (TESTSUITE_AT): Add named-refs.at.
398
07c0db18
JD
3992009-08-10 Joel E. Denny <jdenny@clemson.edu>
400
401 Miscellaneous code readability improvements.
402
403 * src/reader.c (reader): Move %define front-end variable
404 defaults and checking into...
405 (prepare_percent_define_front_end_variables): ... this new
406 function.
407
408 * src/scan-gram.l (INITIAL): For consistency with string
409 literals, don't store open quote on character literal. It's
410 discarded before returning anyway.
411 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
412 Make length test more readable, and make the character stored
413 for an empty literal more obvious while consistent with the
414 previous behavior.
415
416 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
417 USER_NUMBER_HAS_STRING_ALIAS throughout.
418 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
419 that is repeated in symtab.h. Improve argument names to make it
420 clear which side of the symbol-string alias pair is which.
421 (symbol_check_alias_consistency): Improve local variable names
422 for the same purpose.
423 * src/symtab.h (struct symbol): Make comments about aliases
424 clearer.
425 (symbol_make_alias): Improve comments and argument name.
426 * src/output.c (token_definitions_output): Update for rename to
427 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
428
1a323c2f
AR
4292009-08-08 Alex Rozenman <rozenman@gmail.com>
430
431 Convert "misleading reference" messages to warnings.
432 * src/scan-code.l: New function 'show_sub_messages', more
433 factoring.
434 * tests/named-ref.at: Adjust tests.
435
38609c34
JD
4362009-08-06 Joel E. Denny <jdenny@clemson.edu>
437
438 maint: run "make update-copyright"
439
642f240e
JD
4402009-08-06 Joel E. Denny <jdenny@clemson.edu>
441
442 maint: make update-b4-copyright easier to use
443 * build-aux/update-b4-copyright: In warnings, report line
444 numbers rather than character positions.
445 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
446 that update-copyright runs it.
447 * gnulib: Update.
448
d0caad01
JD
4492009-08-05 Joel E. Denny <jdenny@clemson.edu>
450
451 maint: clean up update-b4-copyright code
452 * build-aux/update-b4-copyright: Do not accept 2-digit
453 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
454 Don't accept a `[' in a b4_copyright argument.
455 Format code more consistently.
456 Don't assume b4*copyright never occurs.
457
ac2def56
JD
4582009-08-04 Joel E. Denny <jdenny@clemson.edu>
459
460 maint: automate b4_copyright updates.
461 * Makefile.am (update-b4-copyright): New target rule.
462 * build-aux/Makefile.am (EXTRA_DIST): Add update-b4-copyright.
463 * build-aux/update-b4-copyright: New.
464 * data/yacc.c: Remove stray characters around b4_copyright
465 invocations.
466
dbbb64f0
JD
4672009-08-04 Joel E. Denny <jdenny@clemson.edu>
468
469 maint: automate annual package-wide copyright-year update.
470 * .x-update-copyright: New.
471 * Makefile.am (EXTRA_DIST): Remove maint.mk.
472 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
473 update-copyright. Remove gnumakefile, which is implied by
474 maintainer-makefile.
475 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
476 * gnulib: Update.
477 * maint.mk: Remove, now copied from gnulib.
478 * examples/extexi: Add missing "(C)" in copyright statement so
479 update-copyright can recognize it.
480 * src/LR0.h: Likewise.
481 * src/print.h: Likewise.
482 * src/print_graph.h: Likewise.
483 * src/gram.c: Add missing comma in copyright statement.
484 * src/gram.h: Likewise.
485
bfa018d4
JD
4862009-08-04 Joel E. Denny <jdenny@clemson.edu>
487
488 Fix "make distcheck".
489 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
490 of just calc.stamp.
491
4521fcdf
JD
4922009-08-01 Joel E. Denny <jdenny@clemson.edu>
493
494 Pacify "gcc -Wunused" for the input function from Flex.
495 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
496 and later.
497 * src/scan-code.l: Add "%option noinput", which I cannot find in
498 the Flex manual, but which Flex has supported since at least as
499 far back as 2.5.4. However, if any of our developers still use
500 Flex 2.5.4, they'll need to stop configuring with
501 --enable-gcc-warnings because "%option noinput" didn't work
502 correctly until Flex 2.5.6.
503 * src/scan-gram.l: Likewise.
504 * src/scan-skel.l: Likewise.
505
992e874a
AR
5062009-07-31 Alex Rozenman <rozenman@gmail.com>
507
508 Fix --enable-gcc-warnings problems.
509 * src/reader.c: Adjust variable names.
510 * src/scan-code.l: Fix prototypes and adjust names.
511 * src/named-ref.c: Remove redundant "if".
512
a1ed2b71
JD
5132009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
514
515 Fix a --enable-gcc-warnings problem.
516 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
517 variable.
518
cbc6a70e 5192009-07-24 Alex Rozenman <rozenman@gmail.com>
1e20ad11
AR
520
521 Fix some memory leaks.
522 * src/named-ref.c: Add a pointer check (named_ref_free).
523 * src/scan-code.l: New function (variant_table_free). Called in
524 code_scanner_free.
525 * src/symlist.c: Call to named_ref_free (symbol_list_free).
526
ac9b0e95
JD
5272009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
528
529 Warn about character literals not of length one.
530 * NEWS (2.5): Document.
531 * src/scan-gram.l (INITIAL): Remove comment that we don't check
532 the length.
533 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
534 * tests/input.at (Bad character literals): New test group.
535
2de160e1
JD
5362009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
537
538 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
539
cba97506
JD
5402009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
541
542 Some M4 cleanup in the testsuite.
543 Suggested by Eric Blake at
544 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
545 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
546 complicate the code by distinguishing between a missing value
547 and an empty string value for an optional argument. This fix is
548 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
549 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
550 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
551 arguments are not needed because of the following changes.
552 Fix stale comments.
553 Bison developers should use GNU M4 and should not use
554 POSIXLY_CORRECT when building the test suite, so do not
555 complicate the code by avoiding $10 and above.
556 Do not quote an empty string value for an optional argument, and
557 do not distinguish between a missing value and an empty string
558 value.
559
62eb2d1b
JD
5602009-07-21 Joel E. Denny <jdenny@ces.clemson.edu>
561
562 * m4/m4.m4: Make it a sym link to submodules/autoconf/m4/m4.m4.
563
620b2e36
JD
5642009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
565
566 Revert unnecessary column realignment in --help output.
567 Reported by Akim Demaille at
568 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
569 * src/getargs.c (usage): Here.
570
cbc6a70e 5712009-07-04 Alex Rozenman <rozenman@gmail.com>
dad6544d
AR
572
573 Alphabetical order in src/Makefile.am.
574 * src/Makefile.am: Adjust.
575
cbc6a70e 5762009-07-04 Alex Rozenman <rozenman@gmail.com>
d5e8574b
AR
577
578 Style changes and factoring.
579 * src/named-ref.h: Add comments.
580 * src/parse-gram.y: Readability and style changes.
581 * src/reader.c: Factoring: assign_named_ref function.
582 * src/scan-code.l: Factoring and style changes. Rename
583 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
584 Use "unsigned" type for variant index. Improve readablity.
585 * src/scan-gram.l: Change error messages and add comments.
586 * src/symlist.h: symbol_list_null: New function decl.
587 * src/symlist.c: symbol_list_null: Implement here.
588 * tests/named-refs.at: Adjust for new error messages.
589
ae09ec85
EB
5902009-06-29 Eric Blake <ebb9@byu.net>
591
592 scan-code: avoid compiler warnings
593 * src/scan-code.l (parse_named_ref): Use correct specifiers.
594
80d653fd
AD
5952009-06-29 Akim Demaille <demaille@gostai.com>
596
597 build: avoid concurrent extraction of calc++.
598 * examples/calc++/Makefile.am (calc.stamp): New.
599 Depend on it to create the sources of calc++ so that concurrent
600 builds don't launch several "extexi" in parallel.
601 Not only this is inefficient, this also builds incorrect sources
602 with several extractions mixed together.
603
7685e2f7
AR
6042009-06-27 Alex Rozenman <rozenman@gmail.com>
605
606 Implement support for named symbol references.
607 * src/parse-gram.y: Add new syntax (named_ref.opt).
608 * src/reader.c: Store named refs in symbol lists.
609 * src/reader.h: New argument for symbol_append and
610 action_append functions.
611 * src/scan-code.h: Add new field (named_ref) into
612 code_props data structure. Keeps named ref of midrule
613 actions.
614 * src/scan-code.l: Support for named refs in semantic
615 action code. New function 'parse_named_ref'.
616 * src/scan-gram.l: Support bracketed id.
617 * src/symlist.c: Store named refs in symbol lists.
618 * src/symlist.h: New field in symbol list: named_ref.
619 * src/named-ref.h: New file, a struct for named_ref.
620 * src/named-ref.cp: New file, named_ref_new function.
621 * src/local.mk: Add two new files.
622 * tests/testsuite.at: Include new test group:
623 * tests/named-refs.at: this new file.
624
67f8cf51
AD
6252009-06-25 Akim Demaille <demaille@gostai.com>
626
627 hash: check insertion for memory exhaustion.
628 * src/uniqstr.c (uniqstr_new): New.
629
83b66ddd
AD
6302009-06-11 Akim Demaille <demaille@gostai.com>
631
632 style changes.
633 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
634 * src/print-xml.c: Style changes.
635 * tests/conflicts.at: Comment changes.
636
517cb0ad
AD
6372009-06-11 Akim Demaille <demaille@gostai.com>
638
639 xml: beware of user strings used to give a %prec to rules.
640 * tests/conflicts.at (%prec with user strings): New.
641 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
642 XML output.
643
75c7a52a
AD
6442009-06-11 Akim Demaille <demaille@gostai.com>
645
646 hash: check insertion for memory exhaustion.
647 * src/muscle-tab.c (muscle_insert, muscle_grow)
648 * src/state.c (state_hash_insert): Check the return value of
649 hash_insert.
650
66ed9753
AD
6512009-06-10 Akim Demaille <demaille@gostai.com>
652
653 deterministic test suite.
654 Some consistency checks on symbols are performed after all the
655 symbols were read, by an iteration over the symbol table. This
656 traversal is nondeterministic, which can be a problem for test
657 cases.
658 Avoid this.
659 Addresses another form of nondeterminism reported by Joel E. Denny.
660 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
661
662 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
663 test in two.
664 Use different file names for the three tests to make the
665 maintenance easier.
666
ed15d907
AD
6672009-06-10 Akim Demaille <demaille@gostai.com>
668
95d176ff
AD
669 deterministic user-token-number redeclaration errors.
670 Address nondeterminism reported by Joel E. Denny.
671 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
672
673 * src/uniqstr.h: Comment changes.
674 * src/location.h (boundary_cmp, location_cmp): New.
675 * src/symtab.c (user_token_number_redeclaration): New.
676 (symbol_translation): Use it.
677 * tests/input.at (Numbered tokens): Adjust the expected output.
678
6792009-05-25 Akim Demaille <demaille@gostai.com>
680
ed15d907 681 gnulib: update.
aa50ba7b
EB
682 * gnulib: Update to latest.
683 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
684 * m4/.gitignore: Regen.
685 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
686 Call xalloc_die on hash_insert failures.
687 Requested by the new __warn_unused_result__ attribute of
688 hash_insert.
ed15d907 689
e3a33f7c
JD
6902009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
691
692 Convert multiple variable definition warnings to complaints.
693 * NEWS (2.5): Add a new entry for that change.
694 * doc/bison.texinfo (Decl Summary): Update %define entry.
695 (Bison Options): Update -D/--define/-F/--force-define entry.
696 * src/muscle_tab.c (muscle_percent_define_insert): Implement.
697 * src/muscle_tab.h (muscle_percent_define_insert): Update
698 comments.
699 * tests/input.at (`%define errors'): Update.
700 (`%define, --define, --force-define'): Update.
701
34d41938
JD
7022009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
703
704 -F/--force-define and relative %define/-D/--define priorities.
705 * NEWS (2.5): Add documentation to -D/--define entry.
706 * build-aux/cross-options.pl: Hard-code association of
707 --force-define with %define.
708 * doc/bison.texinfo (Decl Summary): In %define entry,
709 cross-reference command-line options.
710 (Bison Options): Add documentation to -D/--define entry.
711 (Option Cross Key): Widen column for --force-define row.
712 * src/getargs.c (usage): Document -F/--force-define. Realign
713 options in output.
714 (short_options, long_options, getargs): Parse -F/--force-define,
715 and update muscle_percent_define_insert invocation.
716 * src/muscle_tab.h (muscle_percent_define_how): New enum type.
717 (muscle_percent_define_insert): Add argument with that type.
718 * src/muscle_tab.c (muscle_percent_define_insert): Implement
719 -F/--force-define behavior and priorities.
720 * src/parse-gram.y (prologue_declaration): Update
721 muscle_percent_define_insert invocations.
722 * tests/input.at (`%define, --define'): Rename to...
723 (`%define, --define, --force-define'): ... this and extend.
724
246c4efa
JD
7252009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
726
727 Update some comments to make sense for -D.
728 * data/bison.m4 (b4_check_user_names): In header comments, say
729 "user occurrence" instead of "grammar occurrence".
730 * src/muscle_tab.h (muscle_percent_define_insert): Likewise.
731 (muscle_percent_code_grow): Likewise just for consistency.
732
531683e7
JD
7332009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
734
735 * data/c++.m4: Update copyright year.
736
e7bfa8b7
JD
7372009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
738
739 * data/c++.m4 (b4_namespace_close): Simplify slightly.
740
8c221795
JD
7412009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
742
743 Handle a trailing `:' in a user-supplied C++ namespace better.
744 * data/c++.m4 (b4_namespace_close): Don't let it be printed
745 among the closing braces here. This fix might make the
746 generated code easier to debug, but otherwise it should be
747 insignificant because a trailing `:' is a C++ error already.
748
c8bf65f0
AD
7492009-05-19 Akim Demaille <demaille@gostai.com>
750
751 remove useless variable.
752 * src/getargs.c (skeleton_arg): Remove now useless variable.
753 Should help the compiler see that this printf-like call is sane.
754
7ac45a46
AD
7552009-05-11 Akim Demaille <demaille@gostai.com>
756
757 doc: use C++ headers.
758 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
759 headers.
760
601bdfab
AD
7612009-05-05 Akim Demaille <demaille@gostai.com>
762
763 fix hexadecimal token number support.
764 * src/scan-gram.l: Catch incorrect ids after hexadecimal numbers.
765
d19123e6
AD
7662009-05-05 Akim Demaille <demaille@gostai.com>
767
768 tests: check token numbers.
769 * tests/input.at (Numbered tokens): New.
770
ecdfea9a
AD
7712009-05-04 Akim Demaille <demaille@gostai.com>
772
773 bison: catch bad symbol names.
774 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
775 * tests/input.at: Adjust.
776
43e6aea5
AD
7772009-05-04 Akim Demaille <demaille@gostai.com>
778
779 space changes.
780 * src/scan-gram.l: Untabify to be robust to zealous editors.
781
c046698e
AD
7822009-05-04 Akim Demaille <demaille@gostai.com>
783
784 identifiers: dashes are letters.
785 Dashes can now start identifiers (symbols and directives).
b10dd689 786
c046698e
AD
787 * src/scan-gram.l ({letter}): Add dash.
788 ({id}): Remove it.
789 * tests/input.at (Symbols): Adjust.
790 Remove stray comment.
791 * tests/regression.at (Invalid inputs): Adjust error message.
792 * doc/bison.texinfo (Symbols): Update.
793
966aba65
JD
7942009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
795
796 Declare %code to be a permanent feature.
797 * NEWS (2.4.2): Here.
798 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
799 experimental.
800 (Decl Summary): Likewise.
801
812775a0
JD
8022009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
803
804 Convert underscores to dashes in some %define variable names.
805 For now, just api.push-pull and lr.keep-unreachable-states.
806 Maintain old names for backward compatibility.
807 * NEWS (2.5): Document.
808 * data/c.m4 (b4_identification): Update comment.
809 * data/yacc.c: Update access.
810 * doc/bison.texinfo: Update.
811 * etc/bench.pl.in (bench_grammar): Update use.
812 * src/files.c (tr): Move to...
813 * src/getargs.c, src/getargs.h (tr): ... here because I can't
814 think of a better place to expose it. My logic is that, for all
815 uses of tr so far, command-line arguments can be involved, and
816 getargs.h is already included.
817 * src/main.c (main): Update access.
818 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
819 variable names to new variable names before assigning value.
820 * src/reader.c (reader): Update setting default.
821 * tests/calc.at: Update uses.
822 * tests/conflicts.at (Unreachable States After Conflict
823 Resolution): Update use.
824 * tests/input.at (%define enum variables): Update use.
825 (%define backward compatibility): New test group.
826 * tests/push.at: Update uses.
827 * tests/reduce.at: Update uses.
828 * tests/torture.at: Update uses.
829
1c4aa81d
JD
8302009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
831
832 Set all front-end %define defaults in one place.
833 * src/main.c (main): Move lr.keep_unreachable_states default...
834 * src/reader.c (reader): ... to here.
835
1d0f55cc
JD
8362009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
837
838 Rename lr.default_reductions to lr.default-reductions.
839 * NEWS (2.5): Here.
840 * doc/bison.texinfo: Here.
841 * src/lalr.c (initialize_LA): Here.
842 * src/print.c (print_reductions): Here.
843 * src/reader.c (reader): Here.
844 * src/tables.c (action_row): Here.
845 * tests/input.at (%define enum variables): Here.
846 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
847
0b593457
JD
8482009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
849
850 Pacify ./configure --enable-gcc-warnings.
851 * tests/input.at (Symbols): Prototype yyerror and yylex.
852
0939aa2d
AD
8532009-04-21 Akim Demaille <demaille@gostai.com>
854
855 tests: check the use of dashes and periods in symbols.
856 * tests/input.at (Symbol): New test group.
857
0b593457 8582009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
ae618dcc
JD
859
860 Document how `%define "var" "value"' is not M4-friendly.
861 * src/parse-gram.y (variable): In comments here.
862
0b593457 8632009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
6789b8bd
JD
864
865 Add copyright updates missed during previous cherry pick.
866 * src/output.c: Here.
867 * src/parse-gram.y: Here.
868 * src/scan-gram.l: Here.
869
663ce7bb
AD
8702009-04-20 Akim Demaille <demaille@gostai.com>
871
872 variables: accept dashes.
873 * src/scan-gram.l ({id}): Also accept dashes after the initial
874 letter.
875 ({directive}): Use {id}.
876 * src/parse-gram.y: Comment and formatting changes.
877 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
878 symbols.
879 * src/complain.h, src/complain.c (yacc_at): New.
880 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
881 symbol names.
882 * src/output.c (token_definitions_output): Do not #define token
883 names with dashes.
884
379261b3
JD
8852009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
886
887 Clean up recent patches a little.
888 Reported by Akim Demaille.
889 * doc/bison.texinfo (Understanding): Fix typos.
890 * src/print.c (print_reductions): Don't use negated variable.
891
25029e16
JD
8922009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
893
894 List accepted values for a %define enum variable with an invalid value.
895 Suggested by Akim Demaille at
896 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
897 * data/bison.m4 (_b4_percent_define_check_values): Implement.
898 * src/muscle_tab.c (muscle_percent_define_check_values): Implement.
899 * tests/input.at (%define lr.default_reductions invalid values): Merge
900 into...
901 (%define enum variables): ... here, and update output.
902
620b5727
JD
9032009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
904
905 Rename "default rule" to "default reduction".
906 This includes changing variable names in code, changing
907 comments, and renaming %define lr.default_rules to %define
908 lr.default_reductions.
909 * NEWS (2.5): Update IELR documentation.
910 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c:
911 Adjust YYDEFACT and yydefact_ documentation.
912 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
913 and lr.type documentation. Make some other wording
914 improvements.
915 (Glossary): Adjust cross-references and Default Reduction
916 definition.
917 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
918 Remove a confusing comment pointed out by Akim Demaille.
919 (initialize_LA): Adjust code.
920 * src/print-xml.c (print_reductions): Adjust code.
921 * src/print.c (print_reductions): Adjust code.
922 * src/reader.c (reader): Adjust code.
923 * src/tables.c (action_row): Adjust code.
924 (token_actions): Adjust code.
925 * src/tables.h: Adjust YYDEFACT documentation.
926 * tests/input.at (%define lr.default_rules invalid values):
927 Rename test group to...
928 (%define lr.default_reductions invalid values): ... this, and
929 update grammar file and expected output.
930 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
931 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
932
34a6c2d1
JD
9332009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
934
935 Document %define lr.type and lr.default_rules.
936 * NEWS (2.5): Add an entry.
937 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
938 besides just LALR(1) and GLR(1).
939 * doc/bison.texinfo (Introduction): Likewise.
940 (Language and Grammar): Bison is no longer limited to LALR(1)
941 restrictions.
942 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
943 when trying to distinguish from GLR. Talk about LR(1) grammars
944 rather than LALR(1) grammars.
945 (Decl Summary): In %define api.push_pull entry, say it applies
946 to deterministic parsers in C rather than LALR(1) parsers in C.
947 Add lr.default_rules entry.
948 Add lr.type entry.
949 (Mystery Conflicts): Bison is no longer limited to LALR(1)
950 restrictions.
951 (Generalized LR Parsing): Same changes as for the previous GLR
952 section.
953 (Memory Management): Say deterministic rather than LALR(1).
954 (Understanding): Correct some bison output.
955 Index discussion of "accepting state".
956 Say deterministic rather than LALR(1).
957 (Bison Options): In --yacc entry, say deterministic rather than
958 LALR(1).
959 In --report, --graph, and --xml entries, just don't mention
960 LALR(1).
961 (C++ Parsers): Say deterministic rather than LALR(1).
962 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
963 (Glossary): Add Accepting State, Consistent State, Default Rule,
964 and IELR(1) definitions.
965 In Generalized LR (GLR) definition, make same changes as in
966 previous GLR sections.
967 In LALR(1) definition, say Bison uses LALR(1) by default rather
968 than implying Bison is limited to LALR(1).
969 (LocalWords): Add IELR.
970
f805dfcb
JD
9712009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
972
973 Finish implementing %define lr.type.
974 Its value can be "LALR", "IELR", or "canonical LR".
975 * lib/timevar.def (TV_IELR_PHASE1): New var.
976 (TV_IELR_PHASE2): New var.
977 (TV_IELR_PHASE3): New var.
978 (TV_IELR_PHASE4): New var.
979 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
980 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
981 Sbitset.h, ielr.h, and ielr.c.
982 * src/getargs.h, src/getargs.c (enum trace, trace_args,
983 trace_types): Add trace_ielr.
984 * src/lalr.h, src/lalr.c (ngotos): Export it.
985 (F): Rename to...
986 (goto_follows): ... this, update all uses, and export it.
987 (set_goto_map): Export it.
988 (map_goto): Export it.
989 (compute_lookahead_tokens): Don't free goto_follows yet. Now
990 handled in ielr.
991 (initialize_LA): Export it. Move lookback allocation to...
992 (lalr): ... here because, for canonical LR, initialize_LA must
993 be invoked but lookback and much of the rest of LALR isn't
994 needed.
995 * main.c (main): Instead of lalr, invoke ielr, which invokes
996 lalr.
997 * src/reader.c (reader): Default lr.type to "LALR".
998 Default lr.default_rules to "accepting" if lr.type is "canonical
999 LR". Leave the default as "all" otherwise.
1000 Check for a valid lr.type value.
1001 * src/state.h, src/state.c (struct state_list): Add state_list
1002 member.
1003 (state_new): Initialize state_list member to NULL.
1004 (state_new_isocore): New function, exported.
1005 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
1006 exercises all values of lr.type.
1007 (GNU AWK Grammar): Rename test group to...
1008 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
1009 AT_TEST_EXISTING_GRAMMAR.
1010 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
1011 (GNU pic Grammar): Rename test group to...
1012 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
1013 AT_TEST_EXISTING_GRAMMAR.
1014 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
1015 all values of lr.type.
1016 (Single State Split): New test groups using AT_TEST_LR_TYPE.
1017 (Lane Split): Likewise.
1018 (Complex Lane Split): Likewise.
1019 (Split During Added Lookahead Propagation): Likewise.
1020
166366b2
JD
10212009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1022
1023 Add new files for IELR and canonical LR implementation.
1024 * src/AnnotationList.c: New.
1025 * src/AnnotationList.h: New.
1026 * src/InadequacyList.c: New.
1027 * src/InadequacyList.h: New.
1028 * src/Sbitset.c: New.
1029 * src/Sbitset.h: New.
1030 * src/ielr.c: New.
1031 * src/ielr.h: New.
1032
03c07b03
JD
10332009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
1034
1035 Implement %define lr.default_rules.
1036 Its value describes the states that are permitted to contain
1037 default rules: "all", "consistent", or "accepting".
1038 * src/reader.c (reader): Default lr.default_rules to "all".
1039 Check for a valid lr.default_rules value.
1040 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
1041 is "accepting", then only mark the accepting state as
1042 consistent.
1043 (initialize_LA): Tell state_lookahead_tokens_count whether
1044 lr.default_rules is "accepting".
1045 * src/tables.c (action_row): If lr.default_rules is not "all",
1046 then disable default rules in inconsistent states.
1047 * src/print.c (print_reductions): Use this opportunity to
1048 perform some assertions about whether lr.default_rules was
1049 obeyed correctly.
1050 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
1051 helps with checking the parser tables for a grammar.
1052 * tests/input.at (%define lr.default_rules invalid values): New
1053 test group.
1054 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
1055 AT_TEST_TABLES_AND_PARSE.
1056 (`no %define lr.default_rules'): New test group generated by
1057 AT_TEST_LR_DEFAULT_RULES.
1058 (`%define lr.default_rules "all"'): Likewise.
1059 (`%define lr.default_rules "consistent"'): Likewise.
1060 (`%define lr.default_rules "accepting"'): Likewise.
1061
44c124a3
AD
10622009-04-20 Akim Demaille <demaille@gostai.com>
1063
1064 Consistently refer to Yacc, not YACC.
1065 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
1066
42660736
JD
10672009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
1068
1069 Pacify make maintainer-check-posix.
1070 * tests/input.at (%define, --define): Move bison command-line
1071 options before grammar file name.
1072
a2d05674
JD
10732009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
1074
1075 Document semicolon warnings.
1076 * NEWS (2.5): Here.
1077
c4fae1ef
AD
10782008-12-08 Akim Demaille <demaille@gostai.com>
1079
1080 Fix portability issue in the test suite.
1081 * tests/local.at (AT_MATCHES_CHECK): New.
1082 Based on Perl instead of Sed. Sed has too many portability
1083 pitfalls, not ever Sed is GNU Sed.
1084 * tests/actions.at (Fix user actions without a trailing semicolon):
1085 Use it.
1086
42f4393a
DJ
10872008-12-07 Di-an Jan <dianj@freeshell.org>
1088
1089 Implement the FIXME that ends an user action with a semicolon
1090 if it seems necessary.
1091 * src/scan-code.l (flex rules section): Flag cpp directive from
1092 any `#' to the first unescaped end-of-line. Semicolon is not
1093 needed after `;', `{', '}', or cpp directives and is needed after
1094 any other token (whitespaces and comments have no effect).
1095 * tests/actions.at (Fix user actions without a trailing semicolon):
1096 New test.
1097 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
1098 to make user actions complete statements.
1099 Adjust column numbers in error messages.
1100 * tests/regression.at (Fix user actions without a trailing semicolon):
1101 Remove. Covered by new test.
1102
bd5df716
AD
11032009-04-14 Akim Demaille <demaille@gostai.com>
1104
1105 doc: minor fixes.
1106 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
1107 (Table of Symbols): Remove duplicate entry for %debug.
1108
7ba0d59d
EB
11092009-04-10 Eric Blake <ebb9@byu.net>
1110
1111 submodules: update to latest
1112 * submodules/autoconf: Use latest upstream Autoconf.
1113
b4d71a96
EB
11142009-04-06 Eric Blake <ebb9@byu.net>
1115
1116 Work around autoconf 2.63b bug in testsuite.
1117 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
1118 autoconf bug related to # in test.
1119
4ecd3681
JD
11202009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
1121
1122 * NEWS (2.5): Describe new -D/--define feature.
1123
c65e5292
AD
11242008-11-10 Akim Demaille <demaille@gostai.com>
1125
1126 --trace=muscles
1127 * src/getargs.h, src/getargs.c (trace_muscle): New.
1128 (trace_types, trace_args): Support it.
1129 * src/output.c (output_skeleton): Use it.
1130
96002de2
AD
11312008-11-10 Akim Demaille <demaille@gostai.com>
1132
1133 muscles_output.
1134 * src/output.c (muscles_output): New, extracted from...
1135 (output_skeleton): here.
1136 Adjust.
1137
fadb13b5
AD
11382008-11-21 Akim Demaille <demaille@gostai.com>
1139
1140 Display the changes in cross-options.texi.
1141 * build-aux/cross-options.pl ($sep): New, to separate items.
1142 * doc/Makefile.am ($(srcdir)/cross-options.texi): Use diff to display
1143 the changes.
1144
72183df4
DJ
11452008-11-20 Di-an Jan <dianj@freeshell.org>
1146
1147 Improves options in the manual.
1148 * doc/bison.texinfo (-g, -x): Add space before argument.
1149 (Option Cross Key): Implement FIXME: listing directives also.
1150 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
1151 (Short Option): Special case -d. Put arguments inside @option.
fadb13b5 1152 (Bison Directive): Add column, automatically extracted from
72183df4
DJ
1153 src/scan-gram.l (actual name passed as the first argument)
1154 with special case for %define.
1155 * doc/Makefile.am (doc/cross-options.texi): Pass src/scan-gram.l
1156 to build-aux/cross-options.pl.
1157 * src/getargs.c (usage): Document limitations of cross-options.pl.
1158 * src/scan-gram.l: Likewise.
1159
e80b068c
AD
11602009-02-25 Akim Demaille <demaille@gostai.com>
1161
1162 Copyright years.
1163 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
1164
e3ee30b8
AD
11652008-12-08 Akim Demaille <demaille@gostai.com>
1166
1167 Install autoconf as a submodule to get m4sugar.
1168 * .gitmodules: Add submodules/autoconf.
1169 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
1170 submodules/autoconf.
1171
c4eb1e84
JD
11722008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1173
1174 Simplify last patch slightly.
1175 * src/getargs.c (getargs): Here.
1176
10fa0146
JD
11772008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1178
1179 Fix last warning from --enable-gcc-warnings.
1180 * src/getargs.c (getargs): Don't assign const address to non-const
1181 pointer.
1182
6f5be1ab
DJ
11832008-11-17 Di-an Jan <dianj@freeshell.org>
1184
1185 Handle --enable-gcc-warnings.
1186 * src/getargs.c (command_line_location): Set parameters to void.
1187
11c4e57d
AD
11882008-11-11 Akim Demaille <demaille@gostai.com>
1189
1190 AT_FULL_COMPILE.
1191 * tests/actions.at, tests/regression.at: Use it.
1192
e186a284
AD
11932008-11-07 Akim Demaille <demaille@gostai.com>
1194
1195 Pass command line location to skeleton_arg and language_argmatch.
1196 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
1197 The location argument is now mandatory.
1198 Adjust all dependencies.
1199 (getargs): Use command_line_location.
1200
e14c6831
AD
12012008-11-07 Akim Demaille <demaille@gostai.com>
1202
1203 -D, --define.
1204 * src/getargs.c (usage): Document -D.
1205 Fix help string for --locations.
1206 (command_line_location): New.
1207 (short_options, long_options, getargs): Support -D, --define.
1208 (getargs): Move -d support at the right place.
1209 * doc/bison.texinfo (Bison Options): Update.
1210 * tests/input.at (%define, --define): New.
1211
75c21b61
AD
12122008-11-07 Akim Demaille <demaille@gostai.com>
1213
1214 Initialize the muscle table before parsing the command line.
1215 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
1216 (getargs): Define file_name.
1217 * src/main.c (main): Initialize muscle_tab before calling
1218 getargs.
1219 * src/muscle_tab.c (muscle_init): No longer define file_name, as
1220 its value is not available yet.
1221
33d2a860
AD
12222008-11-09 Akim Demaille <demaille@gostai.com>
1223
1224 Require the generation of parse-gram.output.
1225 * src/Makefile.am (YACC): Pass --report=all.
1226
006faedf
JD
12272009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
1228
1229 * NEWS (2.5): New stub.
1230
ecd1b61c
JD
12312009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
1232
1233 Fix options documentation.
1234 * build-aux/cross-options.pl: As in --help output, write optional
1235 arguments as [=ARG] not =[ARG].
1236 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
1237
f67c4037
AD
12382008-11-07 Akim Demaille <demaille@gostai.com>
1239
1240 Fix --help.
1241 * src/getargs.c (usage): Fix help string for -W.
1242
0213d651
AD
12432008-11-07 Akim Demaille <demaille@gostai.com>
1244
1245 Handle more general types of option arguments.
1246 * build-aux/cross-options.pl: The argument ends at the first
1247 space, not the first non-symbol character.
1248 Use @var for each word appearing the argument description.
1249
c19178bf
JD
12502009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
1251
1252 Remove spurious initial empty lines.
1253 * data/location.cc: End the @output lines with an @.
1254
0d2b2ab0
AD
12552008-11-04 Akim Demaille <demaille@gostai.com>
1256
1257 Remove spurious initial empty lines.
1258 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
1259 * data/yacc.c: End the @output lines with an @.
1260
8ba62e3e
JD
12612009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
1262
1263 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
1264 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
1265 requirements for a correct m4 are stricter.
1266 * m4/m4.m4: Replace with Autoconf 2.63's m4/m4.m4.
1267 * configure.ac: Update to use AC_PROG_GNU_M4.
1268 Reported by Eric Blake.
1269
5bc993d9
JD
12702009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1271
1272 Help with updating web manual.
1273 * HACKING: Incorporate instructions from gnulib/doc/README.
1274 * bootstrap.conf (gnulib_modules): Add gendocs.
1275
580c075d
JD
12762009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1277
1278 Fix strange %define locations for default values.
1279 Reported by Akim Demaille at
1280 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
1281 and discussed again starting at
1282 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
1283 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
1284 because location information is bogus.
1285 Use angle brackets to delimit fake file name because square brackets
1286 look like underexpanded m4. Choose a better fake file name.
1287 Use negative line numbers.
1288 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
1289 * src/location.c (location_print): If line for a boundary is negative,
1290 only print that boundary's file name.
1291 * src/location.h: Document that.
1292 * tests/skeletons.at (%define Boolean variables: invalid skeleton
1293 defaults): Update output.
1294
5d3a1ecb
AD
12952008-11-07 Akim Demaille <demaille@gostai.com>
1296
1297 Locations without columns for command line arguments.
1298 * src/location.c (location_print): Don't display negative columns.
1299 * src/location.h: Document this.
1300
015e86a7
JD
13012009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
1302
1303 Add reminder about uploading public key to keys.gnupg.net.
1304 * HACKING (Release Procedure): Here.
1305
c1455bab
AD
13062009-03-31 Akim Demaille <demaille@gostai.com>
1307
1308 bootstrap: --help to stdout.
1309 * bootstrap (usage): Don't send --help to stderr.
1310 Use a here doc instead of a long string.
1311
2075a82a
AD
13122009-03-31 Akim Demaille <demaille@gostai.com>
1313
1314 bootstrap: README-hacking no longer exists
1315 * bootstrap (checkout_only_file): Set to HACKING.
1316
26fccd4d
AD
13172009-03-26 Akim Demaille <demaille@gostai.com>
1318
1319 doc: merge HACKING and README-hacking.
1320 Two files is confusing.
1321 Reported by Alexandre Duret-Lutz.
5bc993d9 1322
26fccd4d
AD
1323 * README-hacking: Merge into...
1324 * HACKING (Working from the repository): here.
1325
6469c4d7
AD
13262009-03-26 Akim Demaille <demaille@gostai.com>
1327
1328 doc: update README-hacking.
1329 * README-hacking: We now use git and git submodules.
1330 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
1331
b328890a
AD
13322009-03-26 Akim Demaille <demaille@gostai.com>
1333
1334 lalr1.cc: avoid GCC 4.3 warnings.
1335 GCC 4.3 now warns about "a || b && c" and asks for explicit
1336 parentheses.
1337 Reported by Alexandre Duret-Lutz.
1338 * data/location.cc: Update copyright years.
1339 (Position::operator==): Use parens to make precedence explicit.
1340 Compare lines and columns first, as they are more likely to be
1341 different, and they are faster to compare.
1342
f3079439
AD
13432009-03-26 Akim Demaille <demaille@gostai.com>
1344
1345 gnulib: update.
1346 * gnulib: Update to latest.
1347 * lib/Makefile.am (AM_CPPFLAGS): It is now defined by gnulib, so
1348 use +=.
1349
8defe11b
AD
13502009-01-08 Akim Demaille <demaille@gostai.com>
1351
1352 Fix grep portability issues.
1353 Grep on Solaris does not support -q.
1354 Reported by Summum Bonum.
5bc993d9 1355
8defe11b
AD
1356 * NEWS: Add a stub for 2.4.2.
1357 * THANKS: Add Summum Bonum.
1358 * tests/atlocal.in (EGREP): New.
1359 (CC, CXX, XSLTPROC): Make it possible to override them via
1360 envvars.
1361 * tests/java.at: Use $EGREP instead of egrep.
1362 Use AT_CHECK's ignore instead of grep's -q.
1363
41930e7a
JD
13642008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
1365
1366 Version 2.4.1.
1367 * NEWS: Set version and date.
1368 * lib/Makefile.am: Update copyright year.
1369 * tests/atlocal.in: Update copyright year.
1370
d07932ef
JD
13712008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
1372
1373 Semicolon feature removal is not about future language support.
1374 * NEWS: The semicolon feature is no longer active for newer languages,
1375 so don't claim that it causes trouble for them.
1376
0364b334
JD
13772008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
1378
1379 * gnulib: Update submodule to HEAD.
1380
876fd835
AD
13812008-12-09 Akim Demaille <demaille@gostai.com>
1382
1383 Update data/README.
1384 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
1385
bee1df15
EB
13862008-12-05 Eric Blake <ebb9@byu.net>
1387
1388 Build testsuite with newer autoconf.
1389 * tests/output.at (m4_expand): Don't override in newer autoconf,
1390 where the underlying implementation changed.
1391 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
1392 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
1393 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
1394 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
1395 since some of them contain unbalanced ')'.
1396
7e6d1e22
JD
13972008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
1398
1399 * NEWS: Clarify a little.
1400
a957d06c
JD
14012008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
1402
1403 * NEWS: Update for recent changes.
1404
462503f8
JD
14052008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
1406
1407 Fix unexpanded macros in GLR defines file.
1408 Reported by Csaba Raduly at
1409 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
1410 * THANKS (Csaba Raduly): Add.
1411 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
1412 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
1413 lexer in a separate module that includes the defines file.
1414 (AT_CHECK_CALC): Use AT_FULL_COMPILE and request compilation of lexer
1415 source.
1416 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
1417 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
1418 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
1419 (AT_DATA_SOURCE_PROLOGUE): New.
1420 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
1421 (AT_DATA_SOURCE): New.
1422 (AT_FULL_COMPILE): New, copied from master branch and extended to
1423 support an additional source file.
1424
bf151b75
JD
14252008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1426
1427 Don't let maintainer-*-check targets force a version update.
1428 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
1429 handled.
1430
f56274a8
DJ
14312008-11-17 Di-an Jan <dianj@freeshell.org>
1432
1433 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
1434 Align menus. Adjust word wrapping. Use node names for menu names.
1435 (Examples): Don't abbreviate node names.
1436 (LocalWords): Remove abbreviations.
1437 (Copying): Make description a sentence.
bf151b75 1438 (Java Action Features): Remove period to match the rest of menu.
f56274a8 1439
b5775a81
PB
14402008-11-11 Paolo Bonzini <bonzini@gnu.org>
1441
1442 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
1443 * configure.ac: Adjust usage.
1444 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
1445 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
1446 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
1447
7ed73f82
JD
14482008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
1449
1450 Don't add a semicolon to actions for %skeleton or %language.
1451 It breaks Java test cases as reported by Akim Demaille.
1452 * src/scan-code.l: Implement.
1453
4b1ebc49
JD
14542008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
1455
1456 Clean up %skeleton and %language priority implementation.
1457 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
1458 remove static qualifier because others will soon need to see it.
1459 (language_prio): Likewise.
1460 (getargs): Use command_line_prio rather than 0.
1461 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
1462 enum fields.
1463 (skeleton_prio): Extern it.
1464 (language_prio): Extern it.
1465 * src/parse-gram.y: Use grammar_prio rather than 1.
1466
738cde3e
AD
14672008-11-04 Akim Demaille <demaille@gostai.com>
1468
1469 * NEWS: Mention the trailing semicolon in action.
1470
d6fb461d
AD
14712008-11-04 Akim Demaille <demaille@gostai.com>
1472
1473 Reformat NEWS.
1474 * NEWS: Use more outline-mode markup.
1475 Suggested by Jim Meyering.
1476
14da0cdd
JD
14772008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
1478
1479 Fix user actions without a trailing semicolon.
1480 Reported by Sergei Steshenko at
1481 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
1482 * THANKS (Sergei Steshenko): Add.
1483 * src/scan-code.l (SC_RULE_ACTION): Fix it.
1484 * tests/regression.at (Fix user actions without a trailing semicolon):
1485 New test case.
1486
c9ba9e59
JD
14872008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
1488
1489 Initiate further development.
1490 * NEWS: Create an empty section for new entries.
1491 * gnulib: Update submodule to HEAD.
1492
bfb40910
JD
14932008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
1494
1495 * NEWS: Version 2.4.
1496
241fda7a
JD
14972008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
1498
1499 Prepare for next release.
1500 * NEWS: Briefly mention changes since 2.3b.
1501 * README: Say GNU m4 1.4.6, which we've been requiring in release
1502 announcements already, not 1.4.3, which breaks the build.
1503
ed4d67dc
JD
15042008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
1505
1506 Say %language is experimental.
1507 We're thinking of extending it's effect on output file naming. See the
1508 thread at
1509 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
1510 * NEWS: Say it's experimental.
1511 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
1512 recommend it over %skeleton for now.
1513 (Bison Options): Likewise.
1514 (C++ Bison Interface): Use %skeleton not %language.
1515 (Calc++ Parser): Use %skeleton not %language.
1516 * src/getargs.c (usage): Say it's experimental.
1517
e254a580
DJ
15182008-11-01 Di-an Jan <dianj@freeshell.org>
1519 Paolo Bonzini <bonzini@gnu.org>
1520
1521 Support all Java parser class modifiers.
1522 * data/java.m4 (b4_percent_define_get3): New.
1523 (b4_final_if, b4_strictfp_if): New.
1524 * data/lalr1.java (final, strictfp, extends, implements): Support.
1525 * doc/bison.texinfo (final, strictfp, extends, implements): Add
1526 documentation.
1527 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
1528 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
1529 (AT_CHECK_JAVA_GREP): New.
1530 (Java parser class modifiers): New test.
1531 (Java parser class extends and implements): New test.
1532
1533 Model exception propagation better with throws and lex_throws.
1534 * data/java.m4 (b4_list2): New.
1535 (throws): Change default.
1536 * data/lalr1.java (yyaction): Add throws.
1537 (parse): Add lex_throws in addition to throws.
1538 * doc/bison.texinfo (throws, lex_throws): Add documentation.
1539 * tests/java.at (Java throws specifications): New test.
1540
1541 Improve documentation for Java parsers.
1542 * doc/bison.texinfo (Java Parsers): Add subsections.
1543 Don't quote first argument of %define.
1544 (Java Bison Interface): Document output files. Move documentation
1545 of parser class and merge into Java Parser Interface. Document
1546 features that error out. Document directives with no effect.
1547 Move note about Javadoc higher.
1548 (Java Semantic Values): Explicitly mention stype.
1549 Document that generic types cannot be used.
1550 (Java Location Values): Use @deftypeivar. Document constructors.
1551 Correct return value for toString.
1552 (Java Parser Interface): List undocumented constants/fields.
1553 Move documentation of fields added by %parse-param closer to list
1554 of members. Document that token names are added as fields.
1555 Document constructors accurately. Remove error method.
1556 (Java Scanner Interface): Move note on %pure-parser to Java Bison
1557 Interface. Describe %code lexer and yylex accutately.
1558 Remove documentation that does not match the code.
1559 (Java Action Features): New.
1560 (Java Differences): Add reference. Add item on semantic values.
1561 Add note about @{ ... @}. Clarify %% epilogue placement.
1562 (Java Declarations Summary): New.
1563
1564 Fix Java skeleton.
1565 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
1566 (b4_remove_comma): Quote test argument.
1567 (b4_identification): Remove "bison" field.
1568 * tests/java.at (Java parser class and package names): New test.
1569 (Java %parse-param and %lex-param): New test.
1570 (Java stype, position_class and location_class): New test.
1571
f259e4e6
PB
15722008-10-31 Di-an Jan <dianj@freeshell.org>
1573
1574 * data/lalr1.jave: Update copyright years.
1575 (YYParser): Correct name of "generated from" file in Javadoc:
1576 use b4_file_name instead of @ofile@.
1577 (Location constructor): Correct Javadoc parameter name.
1578 (yylloc): Add missing opening m4 quote after b4_location_if.
1579 This removes a stray [ in the Javadoc of Lexer.getStartPos.
1580 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
1581 (YYParser constructor): Correct Javadoc parameter name.
1582
cae5057f
JD
15832008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
1584
1585 Always put auxiliary code files in the same dir as other output files.
1586 * src/files.c (compute_file_name_parts): When the user specifies
1587 --output but not --file-prefix, extract the directory prefix from the
1588 file prefix not from the grammar file name. This affects the location
1589 of files like location.hh generated by the C++ skeleton. The includes
1590 in the other output files require this fix.
1591 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
1592 for expected output files.
1593 (Output files): Add a test for the above.
1594
4af432ba
JD
15952008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
1596
1597 * gnulib: Update submodule to HEAD.
1598
e26d4e43
JD
15992008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
1600
1601 Update copyright year.
1602 * src/files.c: Here.
1603
c0ee9e21
DJ
16042008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
1605
1606 Don't overwrite the input file.
1607 * src/files.c (output_file_name_check): Fatal error if using input file
1608 for output.
1609 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
1610 argument.
1611 (Conflicting output files): Add test.
1612
482dc52f
AD
16132008-10-28 Akim Demaille <demaille@gostai.com>
1614
1615 Space changes.
1616 * data/lalr1.cc: Formatting changes.
1617
52cbbe84
AD
16182008-10-28 Akim Demaille <demaille@gostai.com>
1619
1620 Don't define debugging functions when !YYDEBUG.
1621 * data/lalr1.cc (debug_stream, set_debug_stream)
1622 (debug_level_type, debug_level, set_debug_level): Don't
1623 declare them when YYDEBUG is not defined.
1624 The implementation are already YYDEBUG-aware.
1625
0925d5bf
AD
16262008-10-28 Akim Demaille <demaille@gostai.com>
1627
1628 Prefer "continue" for empty loop bodies.
1629 * etc/bench.pl.in: Use "continue" instead of {}.
1630
cf98343c
AD
16312008-10-28 Akim Demaille <demaille@gostai.com>
1632
1633 Space and comments changes.
1634 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
1635 * data/c.m4, data/lalr1.cc: Space changes.
1636
9f467b7d
AD
16372008-10-28 Akim Demaille <demaille@gostai.com>
1638
1639 Make gnulib a submodule.
1640 * gnulib: New.
1641 * .gitmodules (gnulib): New.
1642
0f0e1ace
JD
16432008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
1644
1645 Fix yyerror_range for user-defined location type in C++. Reported by
1646 Georg Sauthoff at
1647 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
1648 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
1649 * THANKS (Georg Sauthoff): Add.
1650
548e2104
JD
16512008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
1652
1653 Update several administrative files mainly to facilitate releasing.
1654 * HACKING (Administrivia): Make the git-merge-changelog notes more
1655 helpful.
1656 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
1657 (Release Procedure): Update for git and add numerous details that were
1658 previously missing.
1659 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
1660 * maint.mk (announcement): Don't list bison as a bootstrap tool so
1661 that announcements don't claim we bootstrapped with whatever bison
1662 happened to be in PATH. Add flex as a bootstrap tool.
1663 * Makefile.maint: Remove, previously replaced by maint.mk.
1664 * Makefile.cfg: Remove, and migrate settings to...
1665 * cfg.mk: ... here for the sake of `make announcement'.
1666 * bootstrap.conf (gnulib_modules): Add announce-gen.
1667 * README: Say GNU Bison instead of just Bison. Suggested by Karl
1668 Berry.
1669
ddf17a6e
PB
16702008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
1671
1672 Small but important bugfixes for the Java skeleton.
1673 * data/lalr1.java (yyerror): Change Location to b4_location_type.
1674 (yy_symbol_print): Call toString on yyvaluep.
1675
e1145ad8
AD
16762008-08-29 Akim Demaille <demaille@gostai.com>
1677
1678 Clarify UPDATED use.
bee1df15 1679 * doc/bison.texinfo: It refers to the last edition of this file,
e1145ad8 1680 not to the release date of Bison.
bee1df15 1681 Reported by Joel E. Denny.
e1145ad8 1682
0df72d78
AD
16832008-08-29 Akim Demaille <demaille@gostai.com>
1684
1685 * README: Update FAQ pointer.
1686 Reported by Joel E. Denny.
1687
9a90b6bb
EB
16882008-08-27 Eric Blake <ebb9@byu.net>
1689
1690 Resync m4sugar from autoconf.
1691 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
1692 (m4_init): Adjust to latest m4.git changes.
1693 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
1694 effects.
1695 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
1696 (_m4_list_cmp): Reduce side effects.
1697
65015668
AD
16982008-08-27 Akim Demaille <demaille@gostai.com>
1699
1700 Check yyerrok in calc.at.
bee1df15
EB
1701 * tests/calc.at (calc.y): Use yyerrok on "( error )".
1702 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
1703 expected.
65015668 1704
98e26a92
AD
17052008-08-27 Akim Demaille <demaille@gostai.com>
1706
1707 Support yyerrok in lalr1.cc.
1708 YYBACKUP is still to import back into lalr1.cc.
bee1df15 1709 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
98e26a92 1710
86c0e784
JD
17112008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
1712
1713 For maintainer-check*, don't recompile for a $(VERSION) update.
1714 * cfg.mk: New file.
1715 (_is-dist-target): Override the one in GNUmakefile.
1716 * Makefile.am (EXTRA_DIST): Add cfg.mk.
1717
88511166
JD
17182008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
1719
1720 Update for recent change to gnulib.
1721 * src/parse-gram.y: Don't include strverscmp.h. It comes from
1722 string.h now.
1723
6bbb2ed5
EB
17242008-08-15 Eric Blake <ebb9@byu.net>
1725
d67c52e8
EB
1726 Remaining m4sugar merge from autoconf.
1727 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
1728 * data/m4sugar/foreach.m4: New file, copied from autoconf.
1729 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
1730 * src/output.c (output_skeleton): Tell m4 how to find it.
1731
6bbb2ed5
EB
1732 Partial m4sugar merge from autoconf: m4_map.
1733 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
1734 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
1735 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
1736 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
1737 for empty list.
1738 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
1739 Likewise.
1740 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
1741 declares it.
1742
8dce3875
JD
17432008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
1744
1745 Keep .version and PACKAGE_VERSION in sync.
1746 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
1747 dependency, and add comments justifying this in more detail. Discussed
1748 starting at
1749 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
1750
882a1fbf
EB
17512008-08-06 Eric Blake <ebb9@byu.net>
1752
a3764451
EB
1753 Partial m4sugar merge from autoconf: m4_shiftn.
1754 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
1755 (m4_shift2, m4_shift3): New macros.
1756 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
1757 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
1758 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
1759 * data/java.m4 (b4_remove_comma): Likewise.
1760
882a1fbf
EB
1761 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
1762 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
1763 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
1764 (m4_init): Consolidate wrapped text into single m4_wrap.
1765 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
1766 in wrapped text.
1767
a30e920d
EB
17682008-08-05 Eric Blake <ebb9@byu.net>
1769
dfcc5959
EB
1770 Partial m4sugar merge from autoconf: builtins, version.m4.
1771 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
1772 (m4_prepend): Remove, as it is unused and inherently quadratic,
1773 whereas m4_append is linear in newer m4.
1774 (m4_mkstemp): New builtin.
1775 (m4_symbols): Make rename conditional.
1776 (m4_version_prereq): Ensure fatal error if used in bison, which
1777 intentionally lacks version.m4.
1778
a30e920d
EB
1779 Fix comments in m4sugar.
1780 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
1781
445b7470
JD
17822008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
1783
1784 Update for recent .gitignore fix in Gnulib.
1785 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
1786 anchored .gitignore entries.
1787
a1e50014
JD
17882008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
1789
1790 Set gnu or gnits strictness.
1791 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
1792 development and gnits strictness for releases. Based on Eric Blake's
1793 suggestion at
1794 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
1795
d43f77e7
PB
17962008-07-31 Paolo Bonzini <bonzini@gnu.org>
1797
1798 * NEWS: Clarify documentation of %language.
1799
fee2ed87
PB
18002008-07-31 Paolo Bonzini <bonzini@gnu.org>
1801
1802 Support usage of git-merge-changelog.
1803 * .gitattributes: New.
1804 * HACKING: Document usage of git-merge-changelog.
1805 * bootstrap: Install git-merge-changelog entries in .git/config
1806 if appropriate.
1807
78029cd5
JD
18082008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
1809
1810 Remove remaining dependence on CVS Id keyword.
1811 * ChangeLog: For the sake of people still using CVS, don't use dollars
1812 when mentioning Id.
1813 * data/xslt/bison.xsl: Remove Id from header comments, where it was
1814 unusual anyway.
1815 * data/xslt/xml2dot.xsl: Likewise.
1816 * data/xslt/xml2text.xsl: Likewise.
1817 * data/xslt/xml2xhtml.xsl: Likewise.
1818 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
1819 * doc/Makefile.am (neutralize): Remove, no longer needed.
1820 (.x.1): Don't use neutralize.
1821 (edit): Don't substitute for ID.
1822 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
1823
c53d18b1
JD
18242008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
1825
1826 Fix dependence on computed configure variables.
1827 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
1828 $(top_srcdir)/configure.ac so that changes to computed variables, such
1829 as PACKAGE_VERSION, are seen.
1830 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
1831
5523ac79
JD
18322008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
1833
1834 Update copyright dates for recent changes.
1835 * Makefile.am: Here.
1836 * src/Makefile.am: Here.
1837 * src/reduce.c: Here.
1838 * tests/reduce.at: Here.
1839
8fa36911
JD
18402008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
1841
1842 Use git-version-gen for version names between releases.
1843 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
1844 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
1845 * .prev-version: New.
1846 * .version.in: Remove.
78029cd5 1847 * ChangeLog: Remove the Id previously used for capturing the CVS
8fa36911
JD
1848 revision.
1849 * GNUmakefile: Remove, now copied from Gnulib.
1850 * Makefile.am: Add code suggested by comments in
1851 build-aux/git-version-gen.
1852 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
1853 .prev-version, and .version.
1854 * NEWS (2.3b+): Rename to...
1855 (?.?): ... this because we're dropping the "+" version naming scheme,
1856 but, in general, we still can't be sure of our next release name.
1857 * bootstrap: Add a quick hack to remove from .gitignore the
1858 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
1859 entry. This should really be fixed in gnulib instead.
1860 * bootstrap.conf (gnulib_modules): Add gnumakefile.
1861 * configure.ac (AC_INIT): Set version name by invoking
1862 build-aux/git-version-gen.
1863 (AC_CONFIG_FILES): Remove .version, now generated by
1864 build-aux/git-version-gen.
1865 * maint.mk: New, copied from coreutils.
1866 * doc/.cvsignore (bison.1): Add.
1867 * doc/.gitignore (/bison.1): Add.
1868 * doc/bison.1: Remove, generated.
1869 * src/.cvsignore (revision.c): Remove.
1870 * src/.gitignore (/revision.c): Remove.
1871 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
1872 (BUILT_SOURCES): Remove revision.c.
1873 (revision.c): Remove.
1874 * src/getargs.c (version): Don't print revision after the VERSION.
1875 * src/revision.h: Remove.
1876
bcf07cb7
JD
18772008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
1878
1879 Fix untranslatable composition of sentences. Reported by Goran
1880 Uddeborg at
1881 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
1882 * THANKS (Goran Uddeborg): Add.
1883 * src/reduce.c (reduce_print): Report the number of nonterminals and
1884 rules useless in the grammar in separate sentences.
1885 * tests/reduce.at (Useless Rules): Update output.
1886 (Reduced Automaton): Likewise.
1887 (Underivable Rules): Likewise.
1888 (Empty Language): Likewise.
1889
9aacab9a
JD
18902008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
1891
1892 Fix some .gitignore and .cvsignore problems.
1893 * bootstrap (insert_sorted_if_absent): Replace all uses with...
1894 (insert_vc_ignore): ... this new function, which prepends `/' to all
1895 .gitignore entries before passing them to insert_sorted_if_absent.
1896 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
1897 .cvsignore files are maintained even though Bison developers run
1898 bootstrap while using Git.
1899 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
1900 unneeded by Bison.
1901 (gnulib): Add.
1902 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
1903 unneeded. Reported by Eric Blake.
1904 * lib/.gitignore (/*~): Add.
1905 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
1906 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
1907 Blake.
1908 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
1909
a9fc7990
JD
19102008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
1911
1912 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
1913 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
1914 * bootstrap.conf (gnulib_modules): Add unsetenv.
1915 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
1916 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
1917 (/setenv.m4): Add.
1918 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
1919 the first argument because it may become position-dependent, and unset
1920 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
1921 Add comments explaining these issues in more detail.
1922
0f1d6f10
JD
19232008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
1924
1925 Add .gitignore everywhere based on .cvsignore.
1926 * .gitignore: New.
1927 * build-aux/.gitignore: New.
1928 * data/.gitignore: New.
1929 * doc/.gitignore: New.
1930 * etc/.gitignore: New.
1931 * examples/.gitignore: New.
1932 * examples/calc++/.gitignore: New.
1933 * lib/.gitignore: New.
1934 * m4/.gitignore: New.
1935 * po/.gitignore: New.
1936 * runtime-po/.gitignore: New.
1937 * src/.gitignore: New.
1938 * tests/.gitignore: New.
1939
7bd1665a
JD
19402008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
1941
1942 * NEWS (2.3b+): New section, empty for now.
1943 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
1944
72c5b982
JD
19452008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
1946
1947 * NEWS (2.3b): Update release date since there has been a delay in
1948 getting the announcements and tarballs out.
1949
bd02cd5d
JD
19502008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
1951
1952 * NEWS: Version 2.3b.
1953 * configure.ac (AC_INIT): Likewise.
1954 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
1955
9126263e
JD
19562008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
1957
1958 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
1959 been doing it for years.
1960 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
1961 (Release Procedure): Add FIXME about make alpha being unmaintained.
1962
fa6aa7b3
JD
19632008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
1964
1965 * data/yacc.c: Reformat m4 a little for readability.
1966 * src/lalr.c (build_relations): Correct comment.
1967
d30b312d
JMG
19682008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1969
1970 DJGPP specific issue.
1971 * djgpp/config.sed: Fixes required to run configure scripts generated
1972 by autoconf 2.62.
1973
138d4cd9
JD
19742008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
1975
1976 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
1977 coordinator@translationproject.org.
1978
8f7e2e1f
JD
19792008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
1980
1981 * THANKS: Add Eric Blake.
1982
f55efa38
JD
19832008-04-23 Eric Blake <ebb9@byu.net>
1984
1985 Revert prior patch, by working around autoconf regression.
1986 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
1987 ("Output file name: ("): Uncomment test.
1988 ("Output file name: )"): Likewise.
1989 Based on an idea from Noah Misch.
1990
096c9f9d
JD
19912008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1992
1993 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
1994 2.61. Reported by Juan Manuel Guerrero at
1995 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
1996 * tests/output.at ("Output file name: ("): Comment out test case for
1997 now.
1998 ("Output file name: )"): Likewise.
1999
0f664b89
JD
20002008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2001
2002 * GNUmakefile: Update git-version-gen invocation so make dist
2003 succeeds.
2004
1cfe6375
JD
20052008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2006
2007 Update to the current gnulib CVS repository, and fix trigraph handling
2008 in Bison.
2009 * bootstrap: Update gnulib CVS repository URL.
2010 (symlink_to_dir): Encapsulate the code that guarantees the destination
2011 directory exists into...
2012 (check_dst_dir): ... this new function, and...
2013 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
2014 fail when copying files into lib/uniwidth/.
2015 * src/output.c (prepare_symbols): When writing yytname muscles, where
2016 symbol names will be encoded in C-string literals, tell quotearg to
2017 escape trigraphs. This used to be the default in gnulib.
2018 * tests/regression.at (Token definitions): Because of the change in
2019 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
2020 escapes trigraphs in symbol names. Thus, yytname no longer has
2021 trigraphs unnecessarily doubly escaped. Update test case output.
2022 Extend test case to be sure Bison's own error messages will no longer
2023 have trigraphs in symbol names unnecessarily escaped once.
2024
74c52fc8
JD
20252008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
2026
2027 Fix make dist infinite loop reported by Juan Manuel Guerrero at
2028 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
2029 * .cvsignore: Add .version.
2030 * .version.in: New.
2031 * bootstrap.conf (gnulib_modules): Add git-version-gen.
2032 * configure.ac (AC_CONFIG_FILES): Add .version.
2033 * build-aux/.cvsignore: Add git-version-gen.
2034
8e55b3aa
JD
20352008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
2036
2037 * NEWS (2.3a+): Mention that -g now takes an argument.
2038 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
2039 consistency. Update the -g and -x entries now that they take
2040 arguments. Use brackets to indicate optional arguments.
2041 * src/getargs.c (usage): Explain the relationship between arguments of
2042 long and short options more completely. Document --defines and -d
2043 separately since the former takes an argument but, for POSIX Yacc, the
2044 latter does not.
2045 (short_options): Let -W take an optional argument like --warnings.
8452fdd9 2046 (getargs): Sort cases.
8e55b3aa 2047
59c5ac72
AD
20482008-02-28 Akim Demaille <demaille@gostai.com>
2049
2050 * doc/bison.texinfo: Fix a few typos.
2051
118d4978
AD
20522008-02-28 Akim Demaille <akim@epita.fr>
2053
2054 * doc/bison.texinfo (Bison Options): Document -W.
2055 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
2056
7020f1e9
AD
20572008-02-28 Akim Demaille <akim@epita.fr>
2058
2059 * src/getargs.c (short_options): Split and sort for readability.
2060 -g and -x take optional arguments, just like their long options.
2061 * build-aux/cross-options.pl: Use /x to make the regexp easier to
2062 understand.
2063 Fix the handling of $opt which resulted in all the argument to be
2064 considered as optional.
2065
59da312b
JD
20662008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
2067
2068 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
2069 say its interface is experimental.
2070 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
2071 Java.
2072 (Bison Options): In the -L and --language entry, mention Java.
2073 (Java Bison Interface): Say the interface is experimental.
2074 * src/getargs.c (usage): Mention -L and --language.
2075
2076 * NEWS (2.3a+): Say the push parsing interface is experimental.
2077 * doc/bison.texinfo (Push Decl): Likewise.
2078 (Decl Summary): Likewise in the "%define api.push_pull" entry.
2079 (Push Parser Function): Likewise.
2080 (Pull Parser Function): Likewise.
2081 (Parser Create Function): Likewise.
2082 (Parser Delete Function): Likewise.
2083 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
2084 yypull_parse, and yypush_parse entries.
2085
2086 * NEWS (2.3a+): Mention XML support, and say the schema is
2087 experimental.
2088 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
2089 * src/getargs.c (usage): Say the XML schema is experimental.
2090
2091 * NEWS (2.3a+): Say option instead of flag.
2092
2bb3ebec
WP
20932008-02-21 Wojciech Polak <polak@gnu.org>
2094
2095 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
2096 text.
2097
333e670c
JD
20982008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
2099
2100 Fix impure push parser compile error reported by Bob Rossi at
2101 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
2102 * data/yacc.c: Clean up whitespace in the output a little.
2103 (yypstate_allocated): Define for impure push parsers regardless of
2104 whether the pull interface is also requested.
2105 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
2106 check impure push parsers without the pull interface.
2107
2108 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
2109 yyerror takes arguments specified by %parse-param while yypstate_new
2110 does not.
2111 * doc/bison.texinfo (Parser Create Function): Document that
2112 yypstate_new returns 0 for multiple impure parser instances.
2113 * tests/push.at (Push Parsing: Multiple impure instances): Update
2114 expected stderr output.
2115
798096e1
JD
21162008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
2117
2118 * runtime-po/POTFILES.in (push.c): Remove.
2119
9ca7f077
JD
21202008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
2121
2122 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
2123 * data/push.c: Rename to...
2124 * data/yacc.c: ... this, overwriting it.
2125 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
2126 `%push-pull-parser' -> `%define api.push_pull "both"'.
2127 Remove old yacc.c tests, and update push.c tests to yacc.c.
2128
42ee26bb
JD
21292008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
2130
2131 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
2132 `"%code top" blocks' instead of `%code "top" blocks'.
2133 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
2134 Clean up whitespace in the output a little.
2135
b1cc23c4
JD
21362008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
2137
2138 Fix documentation problems reported by Tim Josling at
2139 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
2140 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
2141 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
2142 integers. Explain the effect of literal string aliases on error
2143 messages. Copy token 0 documentation from the C++ skeleton
2144 documentation.
2145
ab7f29f8
JD
21462008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
2147
2148 Accept a token number in a %left, %right, or %nonassoc for POSIX
2149 conformance. Reported by Tim Josling at
2150 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
2151 * NEWS (2.3a+): Mention.
2152 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
2153 and code numbers are treated by precedence declarations.
2154 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
2155 of symbols.1.
2156 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
2157 of symbol.
2158 (symbol.prec): New, just like symbol but allows INT.
2159 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
2160 longer holds.
2161 * tests/regression.at (Token number in precedence declaration): New
2162 test case.
2163
a924ef36
JMG
21642008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2165
2166 DJGPP specific issues.
2167 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
2168 be changed. Copyright timestamp adjusted.
2169 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
2170 be changed. Copyright timestamp adjusted.
2171 * djgpp/config.site: Copyright timestamp adjusted.
2172 * djgpp/config_h.sed: Copyright timestamp adjusted.
2173 * djgpp/djunpack.bat: Copyright timestamp adjusted.
2174 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
2175 filename translation list.
2176 * djgpp/subpipe.c (init_subpipe): Check the environment variables
2177 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
2178 files shall be created. Before trying to use the temp dir where the
2179 environment variable points to check that the dir really exists. If
2180 not default to the cwd as temp dir. Copyright timestamp adjusted.
2181 * djgpp/subpipe.h: Copyright timestamp adjusted.
2182 * djgpp/testsuite.sed: Copyright timestamp adjusted.
2183
389c8cfd
PE
21842008-01-30 Paul Eggert <eggert@cs.ucla.edu>
2185
2186 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
2187
5d1cfef4
PE
21882008-01-09 Paul Eggert <eggert@cs.ucla.edu>
2189
2190 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
2191 Problem reported by Claudio Saavedra in
2192 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
2193
e2dcf996
WP
21942008-01-05 Wojciech Polak <polak@gnu.org>
2195
2196 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
2197 document's title with the input grammar file name.
2198
da730230
JD
21992007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
2200
2201 Automate regression testing of the XML/XSLT implementation. Discussed
2202 starting at
2203 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
2204 * configure.ac (XSLTPROC): New substitution.
2205 * Makefile.am (maintainer-xml-check): New phony target invoking...
2206 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
2207 invoking make maintainer-check with BISON_TEST_XML=1.
2208 * tests/atlocal.in (XSLTPROC): New.
2209 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
2210 not to report reachable memory when Bison is expected to have a
2211 non-zero exit status and (2) to compare XML/XSLT output with --graph
2212 and --report=all output for every working grammar when
2213 BISON_TEST_XML=1.
2214 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
2215 (AT_BISON_CHECK_XML): New.
2216 (AT_QUELL_VALGRIND): New.
2217 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
2218 (AT_CHECK): ... don't redefine this since this was the old way to
2219 quell Valgrind.
2220 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
2221 AT_BISON_CHECK invocations.
2222 * tests/c++.at: Likewise.
2223 * tests/calc.at: Likewise.
2224 * tests/conflicts.at: Likewise.
2225 * tests/cxx-type.at: Likewise.
2226 * tests/existing.at: Likewise.
2227 * tests/glr-regression.at: Likewise.
2228 * tests/headers.at: Likewise.
2229 * tests/input.at: Likewise.
2230 * tests/java.at: Likewise.
2231 * tests/output.at: Likewise.
2232 * tests/push.at: Likewise.
2233 * tests/reduce.at: Likewise.
2234 * tests/regression.at: Likewise.
2235 * tests/sets.at: Likewise.
2236 * tests/skeletons.at: Likewise.
2237 * tests/synclines.at: Likewise.
2238 * tests/torture.at: Likewise.
2239 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
2240 tends to hang xsltproc.
2241 (Big horizontal): Likewise.
2242
408476bc
JD
22432007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
2244
2245 In XML output, remove redundant class attribute on symbol element.
2246 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
2247 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
2248 look up a symbol to determine whether it's a nonterminal or terminal.
2249 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
2250 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
2251
2252 Add prec/assoc information to XML output.
2253 * src/gram.c (grammar_rules_print_xml): For each rule that has a
2254 %prec, add a percent_prec attribute.
2255 * src/print-xml.c (print_grammar): For each terminal that has a
2256 precedence or associativity, add a prec or assoc attribute.
2257 (xml_indent): New.
2258 (xml_puts): Use xml_indent.
2259 (xml_printf): Use xml_indent.
2260 * src/print-xml.h (xml_indent): Prototype.
2261
2262 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
2263 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
2264
d4a26c48
JD
22652007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
2266
2267 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
2268 (bison:ruleByNumber): ... this for clarity.
2269 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
2270 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
2271 (xsl:template match="reduction"): Update.
2272 (xsl:template match="item"): Update.
2273 (xsl:template match="reduction"): Update.
2274
2275 In the XML output, don't print the list of rules where symbols appear.
2276 Compute it in XSLT instead. Discussed at
2277 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
2278 * data/xslt/bison.xsl (bison:ruleByLhs): New.
2279 (bison:ruleByRhs): New.
2280 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
2281 bison:ruleByRhs.
2282 (xsl:template match="terminal/rule"): Remove.
2283 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
2284 bison:ruleByRhs.
2285 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
2286 Remove.
2287 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
2288 bison:ruleByRhs and mode="number-link" for rule template.
2289 (xsl:template match="terminal/rule"): Remove.
2290 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
2291 bison:ruleByRhs and mode="number-link" for rule template.
2292 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
2293 Rewrite as...
2294 (xsl:template match="rule" mode="number-link"): ... this.
2295 * src/print-xml.c (print_grammar): Don't print the list of rules.
2296
ef1b4273
JD
22972007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
2298
2299 Don't let --report affect XML output; always print all information.
2300 Discussed at
2301 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
2302 * src/conflicts.c (log_resolution): Implement.
2303 * src/print-xml.c (print_core): Implement.
2304 (print_state): Implement.
2305 (print_xml): Implement.
2306
2307 * NEWS (2.3a+): Fix quotes.
2308 * src/parse-gram.y (prologue_declaration): For consistency with -v,
2309 don't let %verbose clear the list specified by --report.
2310
0f6cd9e3
AD
23112007-11-26 Akim Demaille <akim@epita.fr>
2312
2313 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
2314
d80fb37a
JD
23152007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
2316
2317 In the XML output, list useless and unused symbols and rules with the
2318 useful ones and add a "usefulness" attribute. Discussed starting at
2319 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
2320 * src/gram.c (grammar_rules_partial_print_xml): Remove.
2321 (grammar_rules_print_xml): Print all rules instead of just those
2322 useful in the grammar, and add a "usefulness" attribute.
2323 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
2324 * src/print-xml.c (print_rules_useless_in_parser): Remove.
2325 (print_grammar): Print all nonterminals instead of just useful ones,
2326 and add a "usefulness" attribute to nonterminals and terminals.
2327 (print_xml): Don't print a separate "reductions" or
2328 "rules-useless-in-parser" element.
2329 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
2330 (reduce_xml): Remove.
2331 (reduce_token_unused_in_grammar): New.
2332 (reduce_nonterminal_useless_in_grammar): New.
2333 * src/reduce.h (reduce_xml): Remove prototype.
2334 (reduce_token_unused_in_grammar): Add prototype.
2335 (reduce_nonterminal_useless_in_grammar): Add prototype.
2336 * data/xslt/xml2text.xsl: Update for XML changes.
2337 * data/xslt/xml2xhtml.xsl: Update for XML changes.
2338 * tests/reduce.at (Useless Terminals): Update output.
2339 (Useless Rules): Update output.
2340 (Reduced Automaton): Update output.
2341
2342 Say "Terminals unused in grammar" instead of "Unused terminals".
2343 * NEWS (2.3a+): Update.
2344 * doc/bison.texinfo (Understanding): Update example output.
2345 * src/reduce.c (reduce_output): Implement.
2346 * data/xslt/xml2text.xsl: Implement.
2347 * data/xslt/xml2xhtml.xsl: Implement.
2348
1bb2bd75
JD
23492007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
2350
2351 Accept --report-file=FILE to override the default `.output' filename.
2352 * NEWS (2.3a+): Mention.
2353 * doc/bison.texinfo (Bison Options): Add an entry.
2354 * src/files.c (compute_output_file_names): Don't override
2355 spec_verbose_file if already set.
2356 * src/getargs.c (usage): Document --report-file.
2357 (REPORT_FILE_OPTION): New anonymous enum member.
2358 (long_options): Add entry for it.
2359 (getargs): Add case for it setting spec_verbose_file.
2360
2361 * build-aux/cross-options.pl: Don't record a short option just because
2362 there's an arg.
2363 * doc/.cvsignore: Add yacc.1.
2364
a005a9c4
AD
23652007-11-14 Akim Demaille <akim@epita.fr>
2366
2367 * doc/yacc.1.in: New.
2368 * configure.ac, doc/Makefile.am: Adjust.
2369 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
2370 config.h symbol.
2371 Use AC_SUBST for assignments too.
2372 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
2373
cff03fb2
JD
23742007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
2375
2376 * src/gram.c: Remove comments that duplicate comments in gram.h.
2377
2378 When reporting useless rules and nonterminals, say "useless in grammar"
2379 instead of "useless", and say "useless in parser" instead of "never
2380 reduced". Discussed starting at
2381 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
2382 * NEWS (2.3a+): Mention this change.
2383 * data/xslt/xml2text.xsl: Update output text and expected input XML
2384 element names to match changes below.
2385 * data/xslt/xml2xhtml.xsl: Likewise.
2386 (xsl:template match="bison-xml-report"): Add missing entry in Table of
2387 Contents: "Rules useless in parser due to conflicts".
2388 * doc/bison.texinfo (Decl Summary): Reword a little.
2389 (Understanding): Update example output for changes below.
2390 * src/gram.c: (rule_useful_p): Rename to...
2391 (rule_useful_in_grammar_p): ... this.
2392 (rule_useless_p): Rename to...
2393 (rule_useless_in_grammar_p): ... this.
2394 (rule_never_reduced_p): Rename to...
2395 (rule_useless_in_parser_p): ... this.
2396 (grammar_rules_print): Update for renames.
2397 (grammar_rules_print_xml): Update for renames.
2398 (grammar_rules_never_reduced_report): Rename to...
2399 (grammar_rules_useless_report): ... this since it is used for either
2400 kind of useless rule.
2401 * src/gram.h: Reword comments and update function names in prototypes.
2402 * src/main.c (main): Say "rule useless in parser due to conflicts".
2403 * src/print-xml.c (print_rules_never_reduced): Rename to...
2404 (print_rules_useless_in_parser): ... this, and rename output XML
2405 element "rules-never-reduced" to "rules-useless-in-parser".
2406 (print_xml): Update for rename.
2407 * src/print.c (print_results): Say "Rules useless in parser due to
2408 conflicts".
2409 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
2410 (nonterminals_reduce): Say "nonterminal useless in grammar".
2411 (reduce_output): Say "Nonterminals useless in grammar".
2412 Say "Rules useless in grammar".
2413 (reduce_xml): Rename output XML element "useless" to
2414 "useless-in-grammar".
2415 (reduce_print): Don't report the count of grammatically useless rules
2416 as "rules never reduced" just because %yacc is specified.
2417 In the correct report of this count, say nonterminal(s) and rule(s)
2418 "useless in grammar".
2419 * tests/conflicts.at (S/R in initial): Update expected output.
2420 (Defaulted Conflicted Reduction): Likewise.
2421 (Unreachable States After Conflict Resolution): Likewise.
2422 * tests/existing.at (GNU pic Grammar): Likewise.
2423 * tests/reduce.at (Useless Nonterminals): Likewise.
2424 (Useless Rules): Likewise.
2425 (Reduced Automaton): Likewise.
2426 (Underivable Rules): Likewise.
2427 (Empty Language): Likewise.
2428
66f0441d
JD
24292007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
2430
2431 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
2432 here document and before the EOF so that BSD's implementation of Bourne
2433 shell doesn't parse the delimiter as part of the here document.
2434 * doc/.cvsignore: Add cross-options.texi.
2435 * src/getargs.c (usage): Add a blank line after the warning categories.
2436
d0ee4105
PB
24372007-11-08 Paolo Bonzini <bonzini@gnu.org>
2438
2439 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
2440
e8b1fb9b
AD
24412007-11-05 Akim Demaille <akim@epita.fr>
2442
2443 Remove Id: from bison.1.
2444 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
2445 (perl -0777 -pi -e 's/\.PP\nId): New.
2446 (.x.1): Use it to ignore the version control revision.
2447
2f7a96b5
AD
24482007-11-05 Akim Demaille <demaille@gostai.com>
2449
2450 * build-aux/Makefile.am: Ship cross-options.pl.
2451 * doc/Makefile.am: Always refer to cross-options.texi with
2452 $(srcdir).
2453 (MAINTAINERCLEANFILES): Add it.
2454
f4101aa6
AD
24552007-11-04 Akim Demaille <demaille@gostai.com>
2456
2457 Generate the long/short option cross-table.
2458 * build-aux/cross-options.pl: New.
2459 * doc/Makefile.am (cross-options.texi): New.
2460 * doc/bison.texinfo: Use it.
2461
727a1401
AD
24622007-11-04 Akim Demaille <demaille@gostai.com>
2463
2464 Generate bison.1 using help2man.
2465 * doc/common.x, doc/bison.x: New.
2466 * doc/Makefile.am (bison.1, .x.1): New.
2467 The code is taken from autoconf-2.61/man/Makefile.am.
2468 * configure.ac: Look for help2man.
2469
6aeb9c57
AD
24702007-11-04 Akim Demaille <demaille@gostai.com>
2471
2472 Complete --help.
2473 * src/getargs.c (usage): Document -W, make it clear that -d,
2474 -g and -x have optional arguments.
2475
d7be4085
AD
24762007-11-04 Akim Demaille <demaille@gostai.com>
2477
2478 Find sha1sum when named gsha1sum.
2479 * bootstrap (find_tool): New.
2480 ($SHA1SUM): New.
2481
d9df47b6
JD
24822007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
2483
2484 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
2485 at
2486 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
2487 * NEWS (2.3a+): Mention.
2488 * data/bison.m4 (b4_pure_if): Don't define it here.
2489 * data/c.m4 (b4_identification): Depend on individual skeletons to
2490 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
2491 values of the %define variables api.pure or api.push_pull. Define
2492 YYPURE, YYPUSH, and YYPULL accordingly.
2493 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
2494 glr.cc has already defined b4_pure_flag.
2495 * data/push.c: Define b4_pure_if based on `%define api.pure'.
2496 Remove YYPUSH and YYPULL since they're back in b4_identification again.
42ee26bb 2497 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
d9df47b6
JD
2498 * doc/bison.texinfo (Pure Decl): Update.
2499 (Push Decl): Update.
2500 (Decl Summary): Add api.pure to %define entry.
2501 In %pure-parser entry, say it's deprecated and reference %define.
2502 (Pure Calling): Update.
2503 (Error Reporting): Update.
2504 (C++ Scanner Interface): Update.
2505 (How Can I Reset the Parser): Update.
2506 (Table of Symbols): In %pure-parser entry, say it's deprecated and
2507 reference %define.
2508 * src/getargs.c (pure_parser): Remove global variable.
2509 * src/getargs.h (pure_parser): Remove extern.
2510 * src/output.c (prepare): Don't define pure_flag muscle.
2511 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
2512 wrapper around `%define api.pure'.
2513 * tests/calc.at (Simple LALR Calculator): Update.
2514 (Simple GLR Calculator): Update.
2515 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
2516 Update.
2517 (GLR: Resolve ambiguity, pure, locations): Update.
2518 (GLR: Merge conflicting parses, pure, no locations): Update.
2519 (GLR: Merge conflicting parses, pure, locations): Update.
2520 * tests/glr-regression.at (Uninitialized location when reporting
2521 ambiguity): Update
2522 * tests/input.at (Unused %define api.pure): New test case.
2523 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
2524 AT_PURE_IF and AT_PURE_AND_LOC_IF.
2525 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
2526
c373bf8b
JD
25272007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
2528
2529 %define push_pull -> %define api.push_pull. Discussed starting at
2530 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
2531 * data/push.c: Expect the new name.
2532 * data/yacc.c: Likewise.
2533 * doc/bison.texinfo (Push Decl): Update.
2534 (Decl Summary): Update %define entry.
2535 (Push Parser Function): Update.
2536 (Pull Parser Function): Update.
2537 (Parser Create Function): Update.
2538 (Parser Delete Function): Update.
2539 * tests/calc.at (Simple LALR Calculator): Update.
2540 * tests/input.at (%define enum variables): Update.
2541 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
2542 (Push Parsing: Multiple impure instances): Update.
2543 (Push Parsing: Unsupported Skeletons): Update.
2544 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
2545 (Exploding the Stack Size with Malloc): Update.
2546
2547 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
2548 other entries some.
2549
32f19b6b
JD
25502007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
2551
2552 For the XML output's terminal element, rename @number to @token-number,
2553 and add @symbol-number. In the nonterminal element, rename @number to
2554 @symbol-number. Discussed starting at
2555 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
2556 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
2557 renames.
2558 (xsl:template match="nonterminal"): Likewise.
2559 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
2560 (xsl:template match="nonterminal"): Likewise.
2561 * src/print-xml.c (print_grammar): Implement.
2562
255a6b90
JD
25632007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2564
2565 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
2566 2007-10-11 change, the child elements here are items not rules.
408476bc 2567 (xsl:template match="item"): New.
255a6b90
JD
2568 (xsl:template match="rule"): Update for new reduced itemset.
2569 (xsl:template match="point"): Remove.
2570 (xsl:template match="empty"): For consistency with --graph, don't
2571 output "/* empty */".
2572 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
2573 line-wrap, don't pass a negative value as first-line-length since this
2574 won't work with the following changes.
2575 (xsl:template name="line-wrap"): Simplify slightly.
2576 (xsl:template name="ws-search"): Eliminate recursion.
2577 * src/print_graph.c (print_core): Don't print a reduction's lookahead
2578 set next to an item whose dot is not at the end of the RHS even if it
2579 happens to be associated with the same rule.
2580
88c78747
JD
25812007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
2582
31984206
JD
2583 Add %define lr.keep_unreachable_states.
2584 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
2585 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
2586 * src/main.c (main): Implement it.
2587 * tests/conflicts.at (Unreachable States After Conflict Resolution):
2588 Extend to test it, and fix a typo.
2589
25902007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
2591
2592 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
88c78747
JD
2593 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
2594 the example .output text.
2595 * tests/regression.at (Extra lookahead sets in report): Improve wording
2596 of comments.
2597
b7a70162
WP
25982007-10-17 Wojciech Polak <polak@gnu.org>
2599
2600 * src/print-xml.c (print_grammar): Renamed
2601 <terminal> and <nonterminal> attributes:
2602 "type" to "number" and "symbol" to "name".
2603 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
2604 Use new attribute names.
2605 (xsl:template match="nonterminal"): Likewise.
2606 * data/xslt/xml2xhtml.xsl: Likewise.
2607
a0de5091
JD
26082007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
2609
2610 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
2611 (Option Cross Key): Likewise.
2612
2613 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
2614 next to an item whose dot is not at the end of the RHS even if it
2615 happens to be associated with the same rule.
2616 * src/print.c (print_core): Likewise.
2617 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
2618 (Resolved SR Conflicts): Update output.
2619 * tests/regression.at (Extra lookahead sets in report): New test case.
2620
4c20d18d
WP
26212007-10-11 Wojciech Polak <polak@gnu.org>
2622
2623 * src/print-xml.c (print_core): Remove item set
2624 redundancy.
2625 * data/xslt/bison.xsl (bison:ruleNumber): New key.
2626 Improve processing time. Suggested by Joel E. Denny.
2627 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
2628 Write xsl:param "required" attribute as comment.
2629 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
2630 (xsl:template match="rule"): Support new reduced itemset.
2631 (xsl:template match="point"): Remove.
2632 * data/xslt/xml2xhtml.xsl: Likewise.
2633
f506ad1c
JD
26342007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
2635
2636 * src/getargs.c (version): Update copyright year.
2637
21f1b063
JD
26382007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
2639
2640 Make xml2dot.xsl and --graph produce the same output.
2641 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
2642 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
2643 escaped later.
2644 (xsl:template name="output-node"): Use the new escape template instead
2645 of the string-replace template directly.
2646 (xsl:template name="output-edge"): Likewise.
2647 (xsl:template name="escape"): New, escapes backslashes and newlines in
2648 addition to quotation marks.
2649 * src/graphviz.c (start_graph, output_node, output_edge): Add
2650 whitespace to output for legibility.
2651
2652 Make xml2text.xsl and --report produce the same output, and remove the
2653 XML "conflicts" element since a conflict summary is easily extracted
2654 from the automaton.
2655 * data/xslt/bison.xsl: New.
2656 (xsl:template match="state" mode="bison:count-conflicts): New.
2657 * data/xslt/xml2text.xsl: Import bison.xsl.
2658 (xsl:template match="bison-xml-report"): Instead of styling the
2659 "conflicts" element, style the "automaton" element with mode
2660 "conflicts". Unlike the former, the latter lists S/R and R/R
2661 conflicts for a state on the same line.
2662 (xsl:template match="conflicts"): Remove.
2663 (xsl:template match="conflict"): Remove.
2664 (xsl:template match="terminal"): Line-wrap the list of rules in which
2665 the terminal is used.
2666 (xsl:template match="nonterminal"): Likewise for nonterminals.
2667 (xsl:template match="automaton" mode="conflicts"): New.
2668 (xsl:template match="state" mode="conflicts"): New.
2669 (xsl:template name="line-wrap"): New.
2670 (xsl:template name="ws-search"): New.
2671 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
2672 (xsl:template match="bison-xml-report"): Instead of styling the
2673 "conflicts" element, style the "automaton" element with mode
2674 "conflicts."
2675 (xsl:template match="conflicts"): Remove.
2676 (xsl:template match="conflict"): Remove.
2677 (xsl:template match="automaton" mode="conflicts"): New.
2678 (xsl:template match="state" mode="conflicts): New.
2679 * src/conflicts.c (conflicts_output_xml): Remove.
2680 * src/conflicts.h (conflicts_output_xml): Remove prototype.
2681 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
2682 * src/print.c (print_grammar): Consistently wrap at the 66th column so
2683 the corresponding XSLT is easier. Also, never wrap between a word and
2684 the comma that follows it.
2685
793fbca5
JD
26862007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
2687
2688 Improve C++ namespace support. Discussed starting at
2689 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
2690 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
2691 b4_namespace_close): New macros that interpret the %define variable
2692 "namespace" so its value can contain "::" to indicate nested
2693 namespaces.
2694 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
2695 the above macros.
2696 * data/lalr1.cc (b4_namespace): Likewise.
2697 * data/location.cc (b4_namespace): Likewise.
2698 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
2699 inside a new table in the general %define entry. Document `%define
2700 namespace' there as well. Point the %name-prefix entry to it since it
2701 explains it more completely in the case of C++.
2702 (C++ Bison Interface): Mention `%define namespace' instead of
2703 %name-prefix.
2704 (Table of Symbols): Remove the `%define push_pull' entry. The %define
2705 entry suffices.
2706 * tests/c++.at (Relative namespace references): New test case.
2707 (Absolute namespace references): New test case.
2708 (Syntactically invalid namespace references): New test case.
2709 * tests/input.at (C++ namespace reference errors): New test case.
2710
35b8730d
JD
27112007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
2712
2713 Add syncline support and location accessor to internal %define
2714 interfaces.
2715 * data/bison.m4 (b4_percent_define_get_loc): New.
2716 (b4_percent_define_get_syncline): New.
2717 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
2718 (b4_percent_define_default): Record defining location as line 1 rather
2719 than 0 for the sake of synchronizing #line's, and define
2720 b4_percent_define_syncline(VARIABLE).
2721 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
2722 * src/muscle_tab.c (muscle_syncline_grow): New.
2723 (muscle_code_grow): Use muscle_syncline_grow.
2724 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
2725 define b4_percent_define_syncline(VARIABLE).
2726 (muscle_percent_define_get_loc): New.
2727 (muscle_percent_define_get_syncline): New.
2728 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
2729 remove some unused variables.
2730 (muscle_percent_define_default): Record defining location as line 1
2731 rather than 0 for the sake of synchronizing #line's, and define
2732 b4_percent_define_syncline(VARIABLE).
2733 (muscle_percent_define_check_values): Use
2734 muscle_percent_define_get_loc.
2735 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
2736 (muscle_percent_define_get_syncline): Prototype.
2737 * tests/skeletons.at (%define Boolean variables: invalid skeleton
2738 defaults): Update output for location change.
2739 (Complaining during macro argument expansion): Extend to test
2740 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
2741
7dc4a694
JD
27422007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
2743
2744 Fix some error-reporting macro bugs.
2745 * data/bison.m4 (b4_cat): New.
2746 (b4_error, b4_error_at): Use b4_cat to send error directives directly
2747 to stdout so they don't become arguments to other macros. Update
2748 comments and add examples.
2749 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
2750 add examples.
2751 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
2752 after printing the error directive so that M4 doesn't report subsequent
2753 problems that are induced by this problem.
2754 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
2755 instead of just in them. Recognize @\n in both places. Both expand to
2756 the empty string. Needed by b4_cat.
2757 * tests/skeletons.at (Complaining during macro argument expansion):
2758 New test case.
2759 (Fatal errors make M4 exit immediately): New test case.
2760
d4bd2295
JD
27612007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
2762
2763 Implement --print-datadir.
2764 * src/getargs.c (usage): Mention.
2765 (PRINT_DATADIR_OPTION): New anonymous enum member.
2766 (long_options): Add entry for it.
2767 (getargs): Add case for it calling compute_pkgdatadir.
2768 * src/output.c (output_skeleton): Encapsulate data directory
2769 computation from here...
2770 (prepare): ... and from here...
2771 (compute_pkgdatadir): ... into this new function.
2772 * src/output.h (compute_pkgdatadir): Prototype.
2773
34cdeddf
JD
27742007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
2775
2776 * src/print-xml.c (escape_bufs): New static global variable
2777 replacing...
2778 (xml_escape_n): ... the static local variable buf here.
2779 (print_xml): Free memory for escape_bufs.
2780 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
2781
d782395d
JD
27822007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
2783
2784 Replace `%push-parser' and `%push-pull-parser' with
2785 `%define push_pull "push"' and `%define push_pull "both"'.
2786 `%define push_pull "pull"' is the default.
2787 * doc/bison.texinfo (Push Decl, Push Parser Function,
2788 Pull Parser Function, Parser Create Function, Parser Delete Function):
2789 Update declarations.
2790 (Decl Summary, Table of Symbols): Replace %push-parser and
2791 %push-pull-parser entries with a %define push_pull entry.
2792 * data/bison.m4 (b4_percent_define_check_values): New macro.
2793 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
2794 definitions...
2795 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
2796 definitions...
2797 * data/push.c: ... to here and compute them from the value of the
2798 %define variable push_pull.
2799 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
2800 parsing requests here...
2801 * data/yacc.c: ... hack this to switch to push.c any time
2802 b4_use_push_pull_flag or the %define variable push_pull is set. This
2803 will go away when we mv push.c yacc.c.
2804 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
2805 push parsing is not supported since unused %define variables are
2806 reported anyway.
2807 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
2808 * src/muscle_tab.h (muscle_percent_define_check_values): Update
2809 comments for consistency with b4_percent_define_check_values.
2810 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
2811 muscles.
2812 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
2813 Remove.
2814 (prologue_declaration): Remove %push-parser and %push-pull-parser
2815 rules.
2816 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
2817 * tests/calc.at: Update declarations.
2818 * tests/input.at (%define enum variables): New test case.
2819 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
2820 declaration.
2821 (Push Parsing: Multiple impure instances): Update declaration.
2822 (Push Parsing: Unsupported Skeletons): New test case.
2823 * tests/torture.at (Exploding the Stack Size with Alloca): Update
2824 declaration.
2825 (Exploding the Stack Size with Malloc): Update declaration.
2826
3f999f78
WP
28272007-09-24 Wojciech Polak <polak@gnu.org>
2828
2829 Add XSLT transformations.
2830
2831 * data/xslt/xml2dot.xsl: Transform XML into DOT.
2832 * data/xslt/xml2text.xsl: Transform XML into plain text.
2833 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
2834 * data/Makefile.am (xsltdir): New variable.
2835 (dist_xslt_DATA): Add xslt/*.xsl files.
2836
a4f75309
PE
28372007-09-23 Paul Eggert <eggert@cs.ucla.edu>
2838
2839 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
2840 Problem reported by Wojciech Polak.
2841 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
2842 (xml_printf): Undo change I made on 21 September; that is,
2843 indent 2 spaces, not 1.
2844
ad5feac4
JD
28452007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
2846
2847 Pacify ./configure --enable-gcc-warnings.
2848 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
2849 `char const *' instead of `char *'.
2850 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
2851 local variable `sep'.
2852
41d7a5f2
PE
28532007-09-21 Paul Eggert <eggert@cs.ucla.edu>
2854
2855 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
2856 elsewhere.
2857 * src/print-xml.c: Prefer "const" after types; that's more consistent.
2858 (xml_printf): Indent just 1 space for level.
2859 (e_char, xlate_char): Remove.
2860 (xml_escape_string): Rewrite to avoid undefined behavior (used
2861 storage that was freed from the stack).
2862 (xml_escape_n): Don't bother checking for subscript error.
2863
3f999f78
WP
28642007-09-21 Wojciech Polak <polak@gnu.org>
2865
2866 Add Bison XML Automaton Report.
41d7a5f2
PE
2867
2868 Add support for an -x option to generate an XML report.
2869 It is not documented yet.
2870 * src/print-xml.c: New file.
2871 * src/print-xml.h: Likewise.
2872 * lib/timevar.def (TV_XML): New var.
2873 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
2874 * src/conflicts.c: Include print-xml.h.
2875 (solved_conflicts_xml_obstack): New var.
2876 (log_resolution, conflicts_solve, conflicts_free):
2877 Add support for XML report.
2878 (conflicts_output_val): New function.
2879 * src/conflicts.h (conflicts_output_val): New decl.
2880 * src/files.c (spec_xml_file): New var.
2881 (compute_output_file_names, output_file_names_free): Add XML support.
2882 * src/files.h (spec_xml_file): New decl.
2883 * src/getargs.c (xml_flag): New var.
2884 (usage, short_options, long_options, getargs): Add XML support.
2885 * src/getargs.h (xml_flag): New decl.
2886 * src/gram.c: Include print-xml.h.
2887 (rule_lhs_print_xml, rule_rhs_print_xml):
2888 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
2889 New functions.
2890 * src/gram.h: Declare external ones.
2891 * src/main.c: Include print-xml.h.
2892 (main): Add XML support.
2893 * src/reduce.c: Include print-xml.h.
2894 (reduce_xml): New function.
2895 * src/reduce.h: Declare it.
2896 * src/state.c: Include print-xml.h.
2897 (state_new): Add XML support.
2898 (state_rule_lookahead_tokens_print_xml): New function.
2899 * src/state.h: Declare it.
2900 (struct state): New member solved_conflicts_xml.
2901 * src/symtab.c (symbol_class_get_string): New function.
2902 * src/symtab.h: Declare it.
2903
6d8e724d
PE
29042007-09-21 Paul Eggert <eggert@cs.ucla.edu>
2905
2906 * GNUmakefile: Switch to coreutils's version.
2907 * bootstrap: Likewise.
2908 * Makefile.cfg: Adjust to new GNUmakefile.
2909 * README-hacking: Likewise.
2910
2911 Import from gnulib:
2912
2913 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
2914 Bruno Haible <bruno@clisp.org>
2915
2916 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
2917 and is a script that invokes bison. Tighten the code. Add comments.
2918
922bdd7f
JD
29192007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
2920
2921 Spell "boolean" as "Boolean". Reported by Akim Demaille.
2922 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
2923 * doc/bison.texinfo (Decl Summary): Fix.
2924 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
2925 * tests/input.at (Boolean %define variables): Update output.
2926 * tests/skeletons.at (%define boolean variables: invalid skeleton
2927 defaults): Rename to...
2928 (%define Boolean variables: invalid skeleton defaults): ... this and
2929 update output.
2930
1b17b01d
JD
29312007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
2932
2933 In impure push mode, don't allow more than one yypstate to be allocated
2934 since multiple impure parsers would corrupt yynerrs.
2935 * data/push.c (yypstate_allocated): New static global variable
2936 initialized to 0.
2937 (yypull_parse): If yypstate_new returns 0, don't report it as memory
2938 exhaustion if yypstate_allocated is 1, but still return 2.
2939 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
2940 already 1. Otherwise, set it to 1.
2941 (yypstate_delete): Set it to 0.
2942 * tests/push.at (Push Parsing: Multiple impure instances): New test
2943 case.
2944
9987d1b3
JD
29452007-08-17 Bob Rossi <bob@brasko.net>
2946
2947 * doc/bison.texinfo (Push Decl): Document the push parser.
2948 (Table of Symbols): Ditto.
2949 (Pure Decl): Ditto.
2950 (Decl Summary): Ditto.
2951 (Multiple Parsers, Push Parser Function, Pull Parser Function,
2952 Parser Create Function, Parser Delete Function):
2953 Add new push parser symbols.
2954 (Table of Symbols): Document push-parser, push-pull-parser,
2955 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
2956
f16b0819
PE
29572007-08-15 Paul Eggert <eggert@cs.ucla.edu>
2958
2959 Update to GPLv3.
2960 * doc/gpl-3.0.texi: New file.
2961 * doc/gpl.texi: Remove.
2962 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
2963 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
2964 * README-hacking, TODO, bootstrap, bootstrap.conf:
2965 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
2966 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
2967 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
2968 * data/lalr1.cc, data/lalr1.java, data/location.cc:
2969 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
2970 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
2971 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
2972 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
2973 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
2974 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
2975 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
2976 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
2977 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
2978 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
2979 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
2980 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
2981 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
2982 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
2983 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
2984 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
2985 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
2986 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
2987 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
2988 * src/complain.c, src/complain.h, src/conflicts.c:
2989 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
2990 * src/files.h, src/flex-scanner.h, src/getargs.c:
2991 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
2992 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
2993 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
2994 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
2995 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
2996 * src/print.c, src/print.h, src/print_graph.c:
2997 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
2998 * src/reduce.h, src/relation.c, src/relation.h:
2999 * src/revision.h, src/scan-code.h, src/scan-code.l:
3000 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
3001 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
3002 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
3003 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
3004 * tests/Makefile.am, tests/actions.at, tests/c++.at:
3005 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
3006 * tests/existing.at, tests/glr-regression.at:
3007 * tests/headers.at, tests/input.at, tests/java.at:
3008 * tests/local.at, tests/output.at, tests/push.at:
3009 * tests/reduce.at, tests/regression.at, tests/sets.at:
3010 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
3011 * tests/torture.at:
3012 Update to GPLv3.
3013
728c4be2
JD
30142007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
3015
3016 Get rid of broken %no-parser, -n, and --no-parser implementation and
3017 documentation.
3018 * TODO: Don't mention them.
3019 * doc/bison.1: Likewise.
3020 * doc/bison.texinfo (Decl Summary): Likewise.
3021 (Bison Options): Likewise.
3022 (Option Cross Key): Likewise.
3023 * src/getargs.c (no_parser_flag): Remove global variable.
3024 (usage): Don't print description of -n and --no-parser.
3025 (long_options): Remove --no-parser entry here.
3026 (getargs): Remove -n case in the switch here.
3027 * src/getargs.h (no_parser_flag): Remove extern.
3028 * tests/regression.at (Web2c Actions): Remove comment that mentions
3029 --no-parser.
3030
5d31a216
JD
30312007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
3032
3033 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
3034 name user variables starting with `yy'. Just pass NULL instead of a
3035 dummy local &yylval to yypush_parse.
3036 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
3037 starting with `yy'.
3038
a2ea208d
JD
30392007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
3040
3041 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
3042 true since it's then always used regardless of whether yyoverflow is
3043 defined. Reported by Christian Burger at
3044 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
3045 * THANKS: Add Christian Burger.
3046
91661ebb
JD
3047 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
3048 node names: say "Decl Summary" not "Bison Declaration Summary".
3049
cbd50549
JD
30502007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
3051
3052 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
3053 determine whether this function has already complained about an invalid
3054 value for a %define boolean variable, don't check whether Bison has
3055 ever examined the value. As written, the check was a tautology.
3056 Instead, record and check for this complaint using a separate muscle.
3057
eb1b0740
JD
30582007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3059
3060 Fix push parsing memory leak reported by Brandon Lucia at
3061 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
3062 * THANKS: Add Brandon Lucia.
3063 * data/push.c (yypstate_delete): Free the stack if it was reallocated
3064 but the parse never completed and thus freed it.
3065 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
3066 * tests/testsuite.at: Include push.at.
3067 * test/push.at: New.
3068 (Push Parsing: Memory Leak for Early Deletion): New test case.
3069
9d774aff
JD
30702007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
3071
3072 Improve handling of multiple S/R conflicts in the same state and of S/R
3073 conflicts involving multiple reductions.
3074 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
3075 set for a state here or Bison will abort if it is reassigned on a
3076 later conflicted reduction in the same state.
3077 Similarly, don't finalize and assign the solved conflicts report here
3078 or it will be lost if it is reassigned on a later conflicted reduction
3079 in the same state.
3080 (set_conflicts): Instead, assign them both here after all S/R conflicts
3081 in the state have been fully examined.
3082 * src/print.c (shift_set): Rename to...
3083 (no_reduce_set): ... this.
3084 (print_reductions): Update for rename, and add %nonassoc error action
3085 tokens to no_reduce_set so that, when printing the first remaining
3086 reduction on an error action token, the reduction is enclosed in
3087 brackets.
3088 (print_results): Update for rename.
3089 * tests/conflicts.at (Solved conflicts report for multiple reductions
3090 in a state): New test case.
3091 (%nonassoc error actions for multiple reductions in a state): New test
3092 case.
3093
3094 * src/main.c (main): Don't depend on C99 features.
3095
10159d2a
JD
30962007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
3097
3098 * build-aux/.cvsignore: Add compile.
b541ffdf
JD
3099 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
3100 uniwidth.
10159d2a 3101
953b3935
JD
31022007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
3103
3104 * bootstrap (slurp): Create target directories that don't exist.
3105 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
3106
6ce2d93a
JD
31072007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
3108
3109 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
3110 than item number.
3111 * closure.c (closure): Likewise.
3112 * state.h (reductions): Comment sorting of rules.
3113 (state): Comment sorting of items.
3114
ce3448d5
JD
31152007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
3116
3117 Fix C++ test cases after recent Gnulib changes. Discussed starting at
3118 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
3119 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
3120 definition in order to avoid Gnulib headers since we don't use config.h
3121 here.
3122 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
3123 rather than AT_DATA so that config.h is included.
3124
8a86eef0
JD
31252007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
3126
3127 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
3128 instead of fprintf. Guard these functions with #if YYDEBUG instead of
3129 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
3130 and so that YYFPRINTF is guaranteed to be defined here.
3131
b1a81613
JD
31322007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
3133
3134 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
3135 with...
3136 (muscle_percent_define_check_values): ... this more helpful function.
3137 Again, it's not used yet, but it will be.
3138 * src/muscle_tab.h: Likewise.
3139
71b61d4d
JD
3140 Improve some comments in parser table construction.
3141 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
3142 (generate_states): Don't mention ruleset, which is internal to closure.
3143 * src/closure.c (closure): Explain sorting of core and itemset, which
3144 is required for this function to behave correctly.
3145 * src/closure.h (closure): Mention sorting.
3146
2a6b783d
JD
31472007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
3148
3149 * src/lalr.c (state_lookahead_tokens_count): For code readability,
3150 move the check for disabled transitions to an aver since conflict
3151 resolution hasn't happened yet.
3152
3153 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
3154 labels a state as inconsistent just because it has error transitions.
3155 The original form of this check appeared in revision 1.1 of lalr.c,
3156 which was committed on 1991-12-21. Now (at least), changing the
3157 consistency label on such a state appears to have no useful effect in
3158 any of the places it is examined, which I enumerate below. The key
3159 point to understanding each item in this enumeration is that a state
3160 with an error transition is labelled consistent in the first place only
3161 if it has no rules, so the check cannot matter for states that have
3162 rules. (1) Labelling a state as inconsistent will cause set_conflicts
3163 to try to identify its conflicts, and a state must have *rules* to have
3164 conflicts. (2) Labelling a state as inconsistent will affect how
3165 action_row sets the default *rule* for the state. (3) Labelling a
3166 state as inconsistent will cause build_relations to add lookback edges
3167 to *rules* in that state.
3168 * src/state.h (struct state): Word the comment for member consistent
3169 more carefully.
3170
14462c2b
JD
31712007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3172
3173 Don't depend on C99 features.
3174 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
3175 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
3176 * src/reader.c (check_and_convert_grammar): Fix for-loop.
3177 * src/state.c (state_mark_reachable_states): Fix for-loop.
3178 (state_remove_unreachable_states): Fix for-loop.
3179
3180 Don't widen struct state with member reachable just to temporarily
3181 record reachability. Instead, use a local bitset.
3182 * src/state.h (struct state): Remove member.
3183 * src/state.c (state_new): Don't initialize it.
3184 (state_mark_reachable_states): Rename to...
3185 (state_record_reachable_states): ... this, and use bitset.
3186 (state_remove_unreachable_states): Use bitset.
3187
5a43d418
JD
31882007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
3189
3190 * src/Makefile.am (yacc): Quote target action commands properly so
3191 that the yacc script isn't corrupt. Reported by Hans Aberg at
3192 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
3193
0c650a20
JD
3194 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
3195 the case of pure parsers. Reported by Frans Englich at
3196 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
3197 * THANKS: Add Frans Englich.
3198
61fee93e
JD
3199 * NEWS (2.3a+): In the %code entry, reference section `Bison
3200 Declaration Summary' from the manual now since the %code summary has
3201 moved there.
3202 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
3203 in the rules section must be terminated by semicolons.
3204
f124d423
JD
32052007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
3206
3207 Extend the front-end API for %define variables to more completely
3208 mirror the back-end. This will be useful in the future.
3209 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
3210 Update comments to mention the new front-end counterparts of these
3211 macros.
3212 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
3213 for muscle_string_decode and muscle_location_decode.
3214 (muscle_string_decode): New static function.
3215 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
3216 (muscle_percent_define_get, muscle_percent_define_ifdef): New
3217 functions.
3218 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
3219 muscle_percent_define_get to mimic the b4_percent_define_flag_if
3220 implementation more closely.
3221 (muscle_percent_define_invalid_value): New function.
3222 * src/muscle_tab.h (muscle_percent_define_get,
3223 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
3224 Prototype.
3225
75ad86ee
JD
32262007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
3227
3228 * NEWS (2.3a+): Mention yesterday's state-removal change.
3229 (2.3a): Remove the %language entry, which was added after 2.3a.
3230 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
3231 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
3232 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
3233 tests/existing.at: Update copyright date.
3234
5967f0cf
JD
32352007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3236
3237 If conflict resolution makes states unreachable, remove those states,
3238 report rules that are then unused, and don't report conflicts in those
3239 states.
3240 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
3241 New global function.
3242 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
3243 function.
3244 * src/main.c (main): After conflict resolution, remove the unreachable
3245 states and update all data structures that reference states by number.
3246 * src/state.c (state_new): Initialize each state's reachable member to
3247 false.
3248 (state_mark_reachable_states): New static function.
3249 (state_remove_unreachable_states): New global function.
3250 * src/state.h (struct state): Add member bool reachable.
3251 (state_remove_unreachable_states): Prototype.
3252 * tests/conflicts.at (Unreachable States After Conflict Resolution):
3253 New test case.
3254 * tests/existing.at (GNU pic Grammar): Update test case output now that
3255 an unused rule is discovered.
3256
b09f4f48
JD
32572007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3258
3259 Minor code cleanup in parser table construction.
3260 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
3261 (new_itemsets, save_reductions): Update for rename to nitemset.
3262 * src/closure.c (nritemset): Rename to...
3263 (nitemset): ... this since the "r" appears to meaningless and isn't
3264 used in the comments.
3265 (closure): Update for rename.
3266 * src/closure.h (nritemset): Update extern to...
3267 (nitemset): ... this.
3268 * src/lalr.c (LA): Fix a typo in comments.
3269 * src/print.c (print_core): Update for rename to nitemset.
3270 * src/print_graph.c (print_graph): Likewise.
3271 * src/state.h: Fix some typos in header comments.
3272
bbb44d83
PE
32732007-04-04 Paul Eggert <eggert@cs.ucla.edu>
3274
9b33de72
PE
3275 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
3276 still sticks to ASCII. Sorry!
3277
bbb44d83
PE
3278 * README-hacking: New file, taken mostly from coreutils, with changes
3279 for Bison. Contains much of the contents of:
3280 * README-cvs: Remove.
3281 * bootstrap: Sync from gnulib.
3282 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
3283 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
3284
29553547
JD
32852007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
3286
3287 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
3288 Setzer.
3289 (Java Differences): Fix some typos.
3290 * THANKS: Add Sebastian Setzer.
3291
01b477c6
PB
32922007-03-07 Paolo Bonzini <bonzini@gnu.org>
3293
730739e4
AD
3294 * data/java.m4 (b4_single_class_if): Remove.
3295 (b4_abstract_if): Look at "%define abstract".
3296 (b4_lexer_if): New.
3297 (b4_union_name): Rename...
3298 (b4_yystype): ... to this. Map to "%define stype".
3299 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
3300 b4_maybe_throws): Fix quoting.
3301 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
3302 * data/lalr1.java (Lexer interface): Always define.
3303 (Lexer interface within parser class): Remove.
3304 (YYLexer class): New, used when "%code lexer" is present.
3305 (constructor): When "%code lexer" is used, pass %lex-param
3306 to the lexer constructor.
3307 (yylex, yyparse): Remove %lex-param from method invocations
3308 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
3309
3310 * doc/bison.texinfo (Java Bison Interface): Mention "%define
3311 abstract". Rename "%define union_name" to "%define stype".
3312 Rename method names according to previous patch.
3313 (Java Scanner Interface): Describe "%code lexer" instead of
3314 "%pure-parser" and "%define single_class".
3315 (Java Differences): Mention "%code lexer".
3316
3317 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
3318 Include scanner here, using macros from tests/local.at.
3319 (AT_DATA_CALC_Y): Remove final argument.
3320 (_AT_CHECK_JAVA_CALC): Likewise.
3321 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
3322 of %locations and %error-verbose.
3323 (main): Test with and without %lex-param.
3324 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
3325 (AT_BISON_OPTION_POPDEFS): Pop it.
01b477c6 3326
122bea3a
JMG
33272007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3328
3329 DJGPP spefic issue. Inhibit the use of disallowed characters for
3330 file name genertion on Win98, WinXP, etc. These are |<>":?*\
3331 and concern testsuite case 46.
3332 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
3333 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
3334 * djgpp/config.bat: Inhibit the use of disallowed characters.
3335
9611cfa2
JD
33362007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
3337
3338 Miscellaneous %define and %code cleanup.
3339 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
3340 values are interpreted.
3341 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
3342 documentation a little more.
3343 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
3344 muscle_percent_define_insert, muscle_percent_code_grow): New
3345 functions/macros.
3346 * src/muscle_tab.h (muscle_percent_define_insert,
3347 muscle_percent_code_grow): Prototype.
3348 * src/parse-gram.y (prologue_declaration): Use
3349 muscle_percent_define_insert and muscle_percent_code_grow when parsing
3350 %define and %code directives.
3351
3352 Make it easy to share %define boolean variables between the front-end
3353 and back-end. Though not used yet, this will be useful in the future.
3354 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
3355 Bison uses of names rather than just skeleton uses of names.
3356 (b4_percent_define_get, b4_percent_define_ifdef): Rename
3357 b4_percent_define_skeleton_variables(VARIABLE) to
3358 b4_percent_define_bison_variables(VARIABLE).
3359 (b4_percent_code_get, b4_percent_code_ifdef): Rename
3360 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
3361 b4_percent_code_bison_qualifiers(QUALIFIER).
3362 (b4_check_user_names_wrap): Update for renames.
3363 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
3364 muscle_percent_define_default): New functions mimicking
3365 b4_percent_define_flag_if and b4_percent_define_default.
3366
3367 For %define variables, report locations for invalid values and
bbb44d83 3368 redefinitions.
9611cfa2
JD
3369 * data/bison.m4 (b4_percent_define_flag_if): Read
3370 b4_percent_define_loc(VARIABLE) to report the location of an invalid
3371 value for VARIABLE.
3372 (b4_percent_define_default): Save a special location in
3373 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
3374 must later be reported as invalid.
3375 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
3376 functions.
3377 (muscle_percent_define_insert): Record the location of VARIABLE in
3378 muscle percent_define_loc(VARIABLE), and use it to report the previous
3379 location for a redefinition.
3380 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
3381 (muscle_percent_define_default): Update like b4_percent_define_default.
3382 (muscle_grow_user_name_list): Rename to...
3383 (muscle_user_name_list_grow): ... this for consistency and use
3384 muscle_location_grow.
3385 * src/muscle_tab.h (muscle_location_grow): Prototype.
3386 * tests/input.at (%define errors): Update expected output.
3387 * tests/skeletons.at (%define boolean variables: invalid skeleton
3388 defaults): New test case.
3389
0bf92491
JD
33902007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
3391
3392 * src/print.c (lookahead_set, state_default_rule): Remove.
3393 (print_reductions): Replace state_default_rule invocation with
3394 equivalent use of yydefact, which was computed in token_actions in
3395 tables.c.
3396 (print_results): Don't allocate lookahead_set.
3397
d3b12988
PB
33982007-02-27 Paolo Bonzini <bonzini@gnu.org>
3399
3400 * data/lalr1.java: Prefix all private members with yy.
3401
f57a7536
JD
34022007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
3403
3404 Use YYFPRINTF instead of fprintf where appropriate. Reported by
9b33de72 3405 Sebastien Fricker at
f57a7536 3406 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
9b33de72 3407 * THANKS: Add Sebastien Fricker.
f57a7536
JD
3408 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
3409 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
3410 accept a variable number of arguments.
3411
6404a5bf
JD
34122007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
3413
3414 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
3415
e4e09639
JMG
34162007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3417
3418 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
3419 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
3420 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
3421
d7e0a1a7
PE
34222007-02-11 Paul Eggert <eggert@cs.ucla.edu>
3423
3424 Undo my 2007-02-07 change, switching back to the c-strcase module
3425 introduced in the 2007-02-03 change. Bruno Haible reported that
3426 the 2007-02-07 change would be dangerous in Turkish if we add a
3427 language whose name contains "i", since "i" is not lowercase "I"
3428 in Turkish.
3429 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
3430 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
3431 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
3432 * m4/.cvsignore: Remove strcase.m4.
3433 * src/getargs.c: Revert 2007-02-07 change, as follows.
3434 Include c-strcase.h.
3435 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
3436
deee93a1
JD
34372007-02-11 Bruno Haible <bruno@clisp.org>
3438
3439 Enable the Java related testsuite tests when the only Java compiler
3440 found is a gcj < 4.3. Discussed at
3441 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
3442 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
3443
574add85
JD
34442007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
3445
3446 * data/Makefile.am: Update copyright date.
3447 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
3448 yypstate_new returns NULL.
3449 (yypstate_new): Return NULL if malloc does.
3450 * src/reader.c (packgram): Move translation of rule actions from the
3451 beginning of packgram to...
3452 (check_and_convert_grammar): ... here right before packgram is invoked
3453 so it's easier to write more complete comments, and remove redundant
3454 code.
3455
e785ccf7
JD
34562007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
3457
3458 As in semantic actions, make @$ in %initial-action, %destructor, and
3459 %printer imply %locations.
3460 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
3461 scanning @$.
3462 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
3463 (@$ in %initial-action implies %locations,
3464 @$ in %destructor implies %locations,
3465 @$ in %printer implies %locations): ... these new test cases.
3466
1cfe1ed7
PE
34672007-02-07 Paul Eggert <eggert@cs.ucla.edu>
3468
3469 Undo most of the 2007-02-03 change, switching to the strcase module
3470 now that gnulib strcase has been fixed.
3471 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
3472 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
3473 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
3474 * m4/.cvsignore: Add strcase.m4.
3475 * src/getargs.c: Revert 2007-02-03 change, as follows.
3476 Don't include c-strcase.h.
3477 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
3478 strcasecmp has "unspecified behavior" outside the POSIX locale,
3479 but it works fine in practice if at least one argument is ASCII,
3480 as is the case in Bison.
3481
0049ec86
PB
34822007-02-07 Paolo Bonzini <bonzini@gnu.org>
3483
3484 * tests/java.at: Skip tests if only one of javac/java is present.
3485 Reported by Joel E. Denny.
3486 * tests/atlocal.in: Adjust copyright years.
3487
34882007-02-05 Paolo Bonzini <bonzini@gnu.org>
3489
3490 * data/lalr1.java (Stack): Work around old verifiers that disallow
3491 access to the private fields of an inner class, from the outer class.
3492 We can make Stack's fields public because user code doesn't have access
3493 to the instance of Stack used by parse(). Reported by Paul Eggert.
3494
2c2b7220
PE
34952007-02-03 Paul Eggert <eggert@cs.ucla.edu>
3496
3497 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
3498 the right spot for these files?
3499 * bootstrap.conf (gnulib_modules): Add c-strcase.
3500 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
3501 c-strncasecmp.c.
3502 * src/getargs.c: Include c-strcase.h.
3503 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
3504 to avoid unspecified behavior.
3505
b2b81dae
JD
35062007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
3507
3508 * doc/bison.texinfo (Decl Summary): Correct typo.
3509
c1d19e10
PB
35102007-01-30 Paolo Bonzini <bonzini@gnu.org>
3511
3512 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
3513 Complain if the value does not match empty, "true" or "false".
3514 * data/c++.m4: Adjust default definitions of %define variables.
3515 * data/java.m4: Adjust default definitions of %define variables.
3516 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
3517 to above behavior.
3518 * tests/input.at (Boolean %define variables): Test new behavior.
3519
8405b70c
PB
35202007-01-29 Paolo Bonzini <bonzini@gnu.org>
3521
3522 * NEWS: Mention java.
3523 * TODO: Remove things that are done.
3524 * bootstrap.conf: Add javacomp-script and javaexec-script.
3525 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
3526
3527 * data/Makefile.am: Add new files.
3528 * data/java-skel.m4: New.
3529 * data/java.m4: New.
3530 * data/lalr1.java: New.
3531
3532 * doc/bison.texinfo: Put "A Complete C++ Example" under
3533 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
3534 under Other Languages.
3535
3536 * src/getargs.c (valid_languages): Add Java.
3537 * src/getargs.h (struct bison_language): Update size of string fields.
3538
3539 * tests/Makefile.am: Add java.at.
3540 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
3541 * tests/java.at: New.
3542 * tests/testsuite.at: Include it.
3543
3eb82471
JD
35442007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
3545
3546 Clean up.
3547 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
3548 at_directive_argv arguments so these no longer have to be global
3549 variables. Also, update the implementation for the following changes.
3550 (fail_for_at_directive_too_many_args,
3551 fail_for_at_directive_too_few_args): Add at_directive_name argument.
3552 (at_directive_name): Remove as at_directive_argv[0] will be used for
3553 this now.
3554 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
3555 for the directive name.
3556 (at_directive_argc, at_directive_argv): Make these local within
3557 skel_lex instead of global.
3558 (INITIAL): Update directive start action for above changes.
3559 (SC_AT_DIRECTIVE_ARG): Rename to...
3560 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
3561 (SC_AT_DIRECTIVE_SKIP_WS): Update.
3562 (scan_skel): Move yylex_destroy to...
3563 (skel_scanner_free): ... here.
3564 * tests/skeletons.at (installed skeleton file name): Rename to...
3565 (installed skeleton file names): ... this.
3566
148d66d8
JD
35672007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
3568
3569 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
3570 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
3571 Summary" not "Directives".
3572 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
3573 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
3574 since the former is now the more complete one.
3575 (Prologue Alternatives): Likewise and do the same for %defines.
3576 (Table of Symbols): Add summary of %code, add summary of %define, and
3577 move full %code documentation to...
3578 (Decl Summary): ... here for consistency with other entries in these
3579 sections.
3580 Move %define entry in order to keep this list alphabetized.
3581 Reword %define entry a little to put less emphasis on the skeleton
3582 concept, which most users shouldn't have to think about.
3583
665f0c24
PE
35842007-01-26 Paul Eggert <eggert@cs.ucla.edu>
3585
3586 Adjust to recent gnulib changes.
3587 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
3588 Add string.h, string_.h, unistd_.h, wchar_.h.
3589 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
3590 * src/system.h: Don't include <stpcpy.h>; this is now done by
3591 <string.h>.
3592
592d0b1e
PB
35932007-01-23 Paolo Bonzini <bonzini@gnu.org>
3594
3595 Simplify implementation of unqualified %code, implement macros for
3596 uniform treatment of boolean %define flags. Document %define.
3597 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
3598 b4_percent_code_ifdef): New.
3599 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
3600 * data/c++.m4: Define default value for global_tokens_and_yystype.
3601 * data/glr.cc: Likewise.
3602 * data/location.cc: Use b4_percent_define_flag_if.
3603
148d66d8 3604 * doc/bison.texinfo (Decl Summary): Document %define.
592d0b1e
PB
3605
3606 * src/parse-gram.y (Unqualified %code): Change muscle name to
3607 b4_percent_code().
3608 (content.opt): Default to empty.
3609
a7867f53
JD
36102007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
3611
3612 Implement support for relative and absolute skeleton file names.
3613 Discussed starting at
3614 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
3615 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
3616 (Bison Options): Document in --skeleton entry.
3617 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
3618 full_skeleton can't necessarily hold all of pkgdatadir.
3619 If the specified skeleton file name contains a `/', don't prepend
3620 pkgdatadir.
3621 * src/parse-gram.y (prologue_declaration): If the specified skeleton
3622 file name contains a `/', prepend the grammar file directory.
3623 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
3624 * skeletons.at: New file.
3625 (relative skeleton file names): New test case.
3626 (installed skeleton file names): New test case.
3627 * tests/testsuite.at: Include skeletons.at.
3628
3629 * bootstrap: Update copyright to 2007.
3630
830c9b18
PB
36312007-01-17 Paolo Bonzini <bonzini@gnu.org>
3632
3633 * bootstrap: Remove occurrences of .#bootmp from the files.
3634
a8c2e813
AD
36352007-01-17 Akim Demaille <akim@epita.fr>
3636
3637 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
3638 nonterminals.
3639 Use per-type %printer.
3640
279cabb6
JD
36412007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
3642
3643 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
3644 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
3645 djgpp/config.site, src/files.c, src/files.h, src/main.c,
3646 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
3647 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
3648 tests/glr-regression.at, tests/input.at, tests/local.at,
3649 tests/output.at, tests/torture.at: Update copyright to 2007.
3650
bb32f4f2
AD
36512007-01-16 Akim Demaille <akim@epita.fr>
3652
3653 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
3654 error code.
3655 (Calc++ Scanner): Exit with failure if we can't open the input
3656 file.
3657 Accept "-" standing for stdin.
3658 (Calc++ Top Level): Print the result only if the parsing was
3659 successful.
3660
7cff04b5
AD
36612007-01-16 Akim Demaille <akim@epita.fr>
3662
3663 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
3664
a4e25e1d
JD
36652007-01-15 Paolo Bonzini <bonzini@gnu.org>
3666 and Joel E. Denny <jdenny@ces.clemson.edu>
3667
3668 Clean up %define and %code implementation in M4 some. Most
3669 importantly, rename all related macros to be in the b4_percent_define
3670 and b4_percent_code namespaces. Also, complete support for `.' in
3671 %define variable names and %code qualifiers.
3672 * data/bison.m4 (b4_check_user_names): Check for special
3673 "SKELETON-NAMESPACE(name)" macros instead of using two nested
3674 m4_foreach loops.
3675 (b4_get_percent_define, b4_get_percent_code): Rename to...
3676 (b4_percent_define_get, b4_percent_code_get): ... these.
3677 Extend documentation with examples.
3678 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
3679 b4_percent_define_skeleton_variables and
3680 b4_percent_code_skeleton_qualifiers.
3681 Expect any value for the %define variable `foo' to be stored in the
3682 macro named `b4_percent_define(foo)'; expect any %code blocks for the
3683 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
3684 expect any unqualified %code blocks to be stored in a macro named
3685 `b4_percent_code_unqualified'.
3686 Use m4_indir so that %define variable names and %code qualifiers can
3687 contain `.', which is allowed by the grammar parser.
3688 (b4_percent_define_default): New macro to set a default value for a
3689 %define variable.
3690 (m4_wrap): Update wrapped code, and fix some underquoting.
3691 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
3692 Expect grammar uses of %define variables and %code qualifiers to be
3693 defined in b4_percent_define_user_variables and
3694 b4_percent_code_user_qualifiers.
3695 * data/c++.m4: Use b4_percent_define_default rather than
3696 m4_define_default. Fix some underquoting. Skeleton usage of %define
3697 variable define_location_comparison now implies skeleton usage of
3698 %define variable filename_type.
3699 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
3700 data/push.c, data/yacc.c: Update macro names.
3701 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
3702 muscle names.
3703
e37c665c
JMG
37042007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3705
3706 DJGPP specific issues.
3707
3708 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
3709 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
3710
7d2d521f
JD
37112007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
3712
3713 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
3714 run parsers in all tests so that Valgrind is invoked during
3715 maintainer-check-valgrind.
3716 (Duplicate representation of merged trees): Free all semantic values.
3717 (Duplicated user destructor for lookahead): Likewise.
3718
e0ac9b4b
JD
37192007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
3720
3721 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
3722 command-line prefix.
3723 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
3724 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
3725 miss Valgrind messages.
3726 (Exploding the Stack Size with Malloc): Likewise.
3727
78143faa
JD
37282007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
3729
3730 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
3731 locals. Reported by Juan Manuel Guerrero at
3732 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
3733 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
3734 Fix some indentation also.
3735 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
3736 explaining this issue.
3737
7ecec4dd
JD
37382007-01-09 Paolo Bonzini <bonzini@gnu.org>
3739 and Joel E. Denny <jdenny@ces.clemson.edu>
3740
3741 Simplify union and prologue handling, and escape union and lex/parse
3742 params with digraphs.
3743 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
3744 values to the empty string since these are no longer guaranteed
3745 initialized by the front-end.
3746 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
3747 braces around b4_user_stype since this is no longer done by the
3748 front-end.
3749 * src/files.c, src/files.h (pre_prologue_obstack,
3750 post_prologue_obstack): Remove.
3751 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
3752 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
3753 with digraphs. This fixes lex params and parse params.
3754 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
3755 * src/output.c (prepare): Remove muscle insertion of the prologues.
3756 (output): Remove freeing of pre_prologue_obstack and
3757 post_prologue_obstack.
3758 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
3759 than prologue_augment for prologue parsing so you don't need prologue
3760 obstacks.
5c80250c
JD
3761 (grammar_declaration): For %union RHS, use `braceless' instead of
3762 "{...}" so that braces are already stripped and code is escaped with
3763 digraphs.
7ecec4dd
JD
3764 * src/reader.c (prologue_augment): Remove.
3765 (reader): Remove initialization of pre_prologue_obstack and
3766 post_prologue_obstack.
3767 * src/reader.h (prologue_augment): Remove.
3768
3769 * data/c.m4: Remove stray parenthesis.
3770
16dc6a9e
JD
37712007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
3772
3773 Remove quotes from variables names in %define directives and from
3774 qualifiers in %code directives, and restrict the characters that are
3775 allowed in them to M4-friendly ones. For %define, continue to support
3776 the quoted form as a deprecated feature. Discussed starting at
3777 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
3778 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
3779 %code.
3780 * doc/bison.texinfo (Prologue Alternatives): Update.
91661ebb
JD
3781 (Decl Summary): In %defines entry, update mention of `%code requires'
3782 and `%code provides'.
16dc6a9e
JD
3783 (C++ Location Values): Update %define uses.
3784 (Calc++ Parser Interface): Likewise.
3785 (Calc++ Parser): Likewise, and update `%code requires' uses.
148d66d8 3786 (Table of Symbols): Update %code documentation.
16dc6a9e
JD
3787 * src/parse-gram.y (prologue_declaration): For %define variables, use
3788 `variable' instead of `STRING'.
3789 (grammar_declaration): For %code qualifiers, use `ID' instead of
3790 `STRING'.
3791 (variable): New nonterminal that takes an `ID' or a `STRING'.
3792 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
3793 and %define uses.
3794 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
3795 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
3796 (%define errors): Update %define uses.
3797
e9813cd4
JD
37982007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
3799
3800 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
3801 instead of muscle_insert for %define values so that M4-special
3802 characters are replaced with digraphs.
3803 * tests/input.at (%define errors): Extend to check weird values.
3804
6afc30cc
JD
38052007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
3806
3807 Instead of having skeletons declare all valid %define variables and
3808 %code qualifiers, provide macros that retrieve the associated values
3809 and build these lists automatically. Thus Bison will now warn when a
3810 variable or qualifier is not used by the skeleton in the current
3811 invocation regardless of whether it might sometimes be used by that
3812 skeleton in other invocations. Also, move all %define value macros to
3813 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
3814 form, which is replaced by %code.
3815 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
3816 (b4_check_user_names): ... this, and change the series of valid name
3817 arguments to a single list argument for names used in the skeleton
3818 similar to the existing list argument for names used in the grammar.
3819 Warn instead of complaining.
3820 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
3821 values and %code code, to format %code code properly, and to build
3822 lists of all %define variables and %code qualifiers used in the
3823 skeleton: b4_skeleton_percent_define_variables and
3824 b4_skeleton_percent_code_qualifiers.
3825 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
3826 Remove, and...
3827 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
3828 the skeleton names lists can finish building first. In place of
3829 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
3830 expect the lists b4_user_percent_define_variables and
3831 b4_user_percent_code_qualifiers.
3832 * data/c++.m4: Where setting default values for b4_parser_class_name,
3833 b4_location_type, b4_filename_type, b4_namespace, and
3834 b4_define_location_comparison, update their names to the
3835 b4_percent_define_ namespace.
3836 * data/glr.c: Don't use b4_check_percent_define_variables and
3837 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
3838 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
3839 (b4_parser_class_name, b4_namespace): Define these using
a4e25e1d 3840 b4_get_percent_define for parser_class_name and namespace.
6afc30cc
JD
3841 * data/location.cc: Use b4_get_percent_define.
3842 * data/push.c: Don't use b4_check_percent_define_variables and
3843 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
3844 * data/yacc.c: Likewise, and don't call m4_exit in
3845 b4_use_push_for_pull_if or m4_wrap code will never execute.
3846 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
3847 Rename to...
3848 (muscle_grow_user_name_list): ... this for consistency with the
3849 terminology used in bison.m4.
3850 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
3851 %define variable names, and rename muscle used_percent_define_variables
3852 to user_percent_define_variables.
3853 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
3854 user_percent_code_qualifiers.
3855 (content): Remove.
3856 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
3857 {CODE} form is no longer accepted.
3858 * tests/input.at (Reject bad %code qualifiers): Rename to...
3859 (Reject unused %code qualifiers): ... this, and update test output.
3860 (%define error): Update test output.
3861
7eb8a0bc
JD
38622007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
3863
3864 Check for unrecognized %define variables similar to checking for
3865 unrecognized %code qualifiers. Check for redefined %define variables.
3866 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
3867 generalizes...
3868 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
3869 (b4_check_percent_define_variables): New, also wraps it.
3870 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
3871 variables using b4_check_percent_define_variables.
3872 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
3873 all those exercised in the test suite and all those listed in the
3874 `Default values' section of c++.m4. Are there others?
3875 * data/push.c, data/yacc.c: Declare no valid %define variables.
3876 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
3877 similar to muscle_find, but it works even when the muscle stores a
3878 const value.
3879 (muscle_grow_used_name_list): New function for constructing the used
3880 name list muscles that b4_check_for_unrecognized_names requires.
3881 * src/parse-gram.y (prologue_declaration): Warn if a variable is
3882 %define'd more than once. Define the b4_used_percent_define_variables
3883 muscle with muscle_grow_used_name_list.
3884 (grammar_declaration): Abbreviate %code code with
3885 muscle_grow_used_name_list.
3886 * tests/input.at (%define errors): New.
3887
3fc65ead
JD
38882007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
3889
3890 Provide warn_at, complain_at, and fatal_at function callbacks to the
3891 skeletons, and use this for %code qualifier complaints.
3892 * data/bison.m4 (b4_error_at): New, invoked by...
3893 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
3894 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
3895 @fatal_at(...@) directives.
3896 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
3897 qualifiers in b4_used_percent_code_qualifiers and to use
3898 b4_complain_at.
3899 * src/location.c, src/location.h (boundary_set_from_string): New global
3900 function.
3901 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
3902 function.
3903 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
3904 to b4_used_percent_code_qualifiers.
3905 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
3906 function.
3907 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
3908 (lineno): Rename to...
3909 (out_lineno): ... this so I don't misunderstand it again.
3910 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
3911 here; these newlines are in the input but not the output file.
3912 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
3913 (at_directive_perform): ... this new static function, and add handling
3914 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
3915 directives.
3916 * tests/input.at (Reject bad %code qualifiers): Update test output with
3917 locations and extend.
3918
3919 * tests/output.at (Output file name: [, Output file name: ]): Remove
3920 bogus comment about these tests failing.
3921
1c7b7e1d
JD
39222007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
3923
3924 Clean up b4_check_percent_code_qualifiers a little.
3925 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
3926 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
3927 documentation and add examples.
3928 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
3929 qualifiers here.
3930
08af01c2
JD
39312007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
3932
3933 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
3934 unreliable -- especially when they're hidden inside another macro.
3935 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
3936 data/c.m4: Remove m4_divert(-1).
3937 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
3938 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
3939 m4_divert_push(0) and m4_divert_pop(0).
279cabb6 3940 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
08af01c2
JD
3941 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
3942 pushed and popped by m4sugar, should be first on the stack.
3943
3944 Provide warn, complain, and fatal function callbacks to the skeletons.
3945 This provides more flexibility than m4_fatal, improves the error
3946 message format, and captures messages for translation. Discussed
3947 starting at
3948 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
3949 * data/bison.m4 (b4_error): New, invoked by...
3950 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
3951 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
3952 directives. Because these M4 macros might be called when the current
3953 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
3954 the previous removal of uses of m4_divert, which caused trouble.
3955 (b4_check_percent_code_qualifiers): Use b4_complain instead of
3956 m4_fatal to report unrecognized %code qualifiers.
3957 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
3958 push parser requests.
3959 * data/glr.c: Use b4_complain instead of m4_fatal to report
3960 non-deterministic push parser requests.
3961 Update @output usage to @output(...@) form.
3962 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
3963 report missing %defines. Update @output usage to @output(...@) form.
3964 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
3965 @output(...@) form.
3966 * src/main.c (main): Invoke skel_scanner_free.
3967 * src/scan-skel.h (skel_scanner_free): Prototype new function.
3968 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
3969 obstack_for_string from flex-scanner.h.
3970 (YY_DECL): Use to declare skel_lex static.
3971 (decode_at_digraphs): Remove; now handled in the new
3972 SC_AT_DIRECTIVE_ARG start condition.
3973 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
3974 functions.
3975 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
3976 at_directive_argv): New static globals.
3977 (INITIAL): Use fail_for_invalid_at.
3978 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
3979 recognize the start of a generalized `@directive(...@)' form and
3980 start...
3981 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
3982 directive args (using the new obstack_for_string), to decode the
3983 contained @ diagraphs, and to perform the directive. It recognizes
3984 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
3985 @output(...@).
3986 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
3987 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
3988 `@,'.
3989 (scan_skel): Initialize obstack_for_string on the first call.
3990 (skel_scanner_free): New function to free obstack_for_string.
3991 * tests/input.at (Reject bad %code qualifiers): Update test output.
3992
8e0a5e9e
JD
39932007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
3994
3995 Consolidate the 4 prologue alternative directives (%code, %requires,
3996 %provides, and %code-top) into a single %code directive with an
3997 optional qualifier field. Discussed at
3998 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
3999 * NEWS (2.3a+): Rewrite the existing entry for the prologue
4000 alternatives.
4001 * doc/bison.texinfo (Prologue Alternatives): Update.
4002 (Decl Summary): Update to %code "requires" and %code "provides".
4003 (Calc++ Parser): Update to %code "requires".
148d66d8 4004 (Table of Symbols): Remove entries for %requires, %provides, and
8e0a5e9e
JD
4005 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
4006 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
4007 are replaced by b4_percent_code_provides and b4_percent_code_requires,
4008 which are skeleton-specific.
4009 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
4010 declare what %code qualifiers it supports and to complain if any other
4011 qualifiers were used in the grammar.
4012 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
4013 and b4_user_code([b4_percent_code_provides]) in place of
4014 b4_user_requires and b4_user_provides.
4015 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
4016 Add b4_user_code([b4_percent_code_top]) and
4017 b4_user_code([b4_percent_code]).
4018 Invoke b4_check_percent_code_qualifiers.
4019 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
4020 PERCENT_REQUIRES): Remove.
4021 (grammar_declaration): Remove RHS's for %code-top, %provides, and
4022 %requires. Rewrite the %code RHS as the unqualified form defining the
4023 muscle b4_percent_code. Add another RHS for the qualified %code form,
4024 which defines muscles of the form b4_percent_code_QUALIFIER and the
4025 b4_used_percent_code_qualifiers muscle.
4026 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
4027 PERCENT_REQUIRES): Remove.
4028 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
4029 %code "requires" and %code "provides".
4030 * tests/input.at (Reject bad %code qualifiers): New.
4031
95021767
JD
40322007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
4033
4034 Use the new code_props interface for destructors and printers.
4035 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
4036 printer_location members, and change the type of the destructor and
4037 printer members to code_props.
4038 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
4039 symbol_printer_get, semantic_type_destructor_set,
4040 semantic_type_printer_set, default_tagged_destructor_set,
4041 default_tagless_destructor_set, default_tagged_printer_set,
4042 default_tagless_printer_set): Use code_props in arguments and return
4043 types in place of char const * and location.
4044 (symbol_destructor_location_get, symbol_printer_location_get): Remove
4045 since the locations are now contained in the return of
4046 symbol_destructor_get and symbol_printer_get.
4047 * src/output.c (symbol_destructors_output, symbol_printers_output):
4048 Replace with...
4049 (symbol_code_props_output): ... this to eliminate duplicate code.
4050 (output_skeleton): Update to use symbol_code_props_output.
4051 * src/reader.c (symbol_should_be_used): Update use of
4052 symbol_destructor_get.
4053 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
4054 Update uses of the various _destructor_set and _printer_set functions.
4055 * src/symtab.c: (default_tagged_destructor_location,
4056 default_tagless_destructor_location, default_tagged_printer_location,
4057 default_tagless_printer_location): Remove since we...
4058 (default_tagged_destructor, default_tagless_destructor,
4059 default_tagged_printer, default_tagless_printer): ... change the type
4060 of these to code_props.
4061 (symbol_new, semantic_type_new, symbol_destructor_set,
4062 semantic_type_destructor_set, symbol_destructor_get,
4063 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
4064 symbol_check_alias_consistency, default_tagged_destructor_set,
4065 default_tagless_destructor_set, default_tagged_printer_set,
4066 default_tagless_printer_set): Update.
4067 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
4068 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
4069 code_props members.
4070 (symbol_print): Use SYMBOL_CODE_PRINT.
4071
f6857bbf
JD
40722007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
4073
4074 Use the new code_props interface for rule actions.
4075 * src/symlist.h (symbol_list): Replace action, action_location, and
4076 used members with a code_props action_props member.
4077 * src/reader.c (symbol_should_be_used, grammar_rule_check,
4078 grammar_midrule_action, grammar_current_rule_merge_set,
4079 grammar_current_rule_symbol_append, packgram): Update.
4080 * src/scan-code.h (translate_rule_action): Remove, no longer used.
4081 * src/scan-code.l (handle_action_dollar): Update.
4082 (translate_rule_action): Remove, no longer used.
4083 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
4084
7c0c6181
JD
40852007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
4086
4087 Use the new code_props interface in parse-gram.y.
4088 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
4089 Update all uses of translate_* functions to use the new code_props
4090 interface and to use gram_scanner_last_string_free and
4091 code_scanner_last_string_free where possible.
4092 (grammar_declaration): symbol_list_destructor_set and
4093 symbol_list_printer_set now perform the translation, so don't do it
4094 here. Use gram_scanner_last_string_free where possible.
4095 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
4096 translate_code): Remove, no longer used.
4097 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
4098 symbol_list_printer_set): Perform code translation here rather than
4099 depending on the caller to do so.
4100
4101 * src/symlist.h (struct symbol_list): Correct some documentation typos.
4102 * src/scan-gram.h (gram_last_string): Remove declaration.
4103 * src/scan-gram.l (last_string): Declare it static.
4104
28e52c0d
JD
41052007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
4106
4107 Encapsulate code properties and related functionality for the various
4108 destructors, printers, and actions into a code_props structure and
4109 interface. This patch merely implements code_props in scan-code.h and
4110 scan-code.l. Future patches will rewrite other modules to use it.
4111 Discussed starting at
4112 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
4113 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
4114 consistently initialize const structs that have an empty location
4115 field.
4116 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
4117 to ensure consistency.
4118 * src/scan-code.h (code_props): New structure.
4119 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
4120 function, macro, and const global variable for initializing a
4121 code_props with no code.
4122 (code_props_plain_init, code_props_symbol_action_init,
4123 code_props_rule_action_init, code_props_translate_code): The rest of
4124 the new code_props functional interface. Among other things, the init
4125 functions set the code_props kind field so that
4126 code_props_translate_code will know whether to behave like
4127 translate_symbol_action, translate_rule_action, or translate_code.
4128 These old translate functions must remain until all other modules are
4129 updated to use the new code_props interface.
4130 (code_scanner_last_string_free): New function similar to
4131 gram_scanner_last_string_free.
4132 (code_scanner_free): Add documentation.
4133 * src/scan-code.l: Implement the new interface.
4134 (code_lex): Make it static, add a code_props* argument, and remove the
4135 rule argument.
4136 (last_string): New static global similar to the one in scan-gram.l.
4137 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
4138 instead of rule.
4139 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
4140 code_props since Bison may one day use this information for destructors
4141 and printers.
4142 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
4143 (handle_action_dollar): Use symbol_list_n_get and set used flag
4144 directly since symbol_list_n_used_set is removed.
4145 (translate_action): Add a code_props* argument and remove the rule,
4146 action, and location arguments. Pass the code_props* on to code_lex.
4147 (translate_rule_action, translate_symbol_action, translate_code):
4148 Rewrite as wrappers around the new code_props interface.
4149 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
4150 it would eventually need to break the encapsulation of code_props.
4151
96034983
JD
41522007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
4153
4154 * etc/.cvsignore: New.
4155
945e396c
JD
41562007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
4157
4158 Add maintainer-push-check to run maintainer-check using push parsing in
4159 place of pull parsing where available.
4160 * Makefile.am (maintainer-push-check): New.
4161 * data/bison.m4 (b4_use_push_for_pull_if): New.
4162 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
4163 appropriately based on their existing values.
4164 (yypush_parse): Don't print push-parser-specific diagnostics if push
4165 parsing is being used in place of pull parsing.
4166 * data/yacc.c: If push parsing should replace pull parsing, redirect to
4167 push.c.
4168 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
4169 variable, and insert b4_use_push_for_pull_flag into muscles.
4170 * tests/Makefile.am (maintainer-push-check): New.
4171
7d596384
JD
41722006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
4173
4174 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
4175 (whether successful or failed) so that yypush_parse can be invoked
4176 again to start a new parse using the same yypstate.
4177 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
4178 check multiple yypull_parse invocations on the same yypstate. For pull
4179 mode, extend to check multiple yyparse invocations.
4180 (Exploding the Stack Size with Alloca): Extend to try with
4181 %push-pull-parser.
4182 (Exploding the Stack Size with Malloc): Likewise.
4183
4184 * tests/calc.at (Simple LALR Calculator): Don't specify
4185 %skeleton "push.c" since %push-pull-parser implies that now.
4186 * tests/headers.at (export YYLTYPE): Don't check for the push
4187 declarations. Otherwise, this test case can't be used to see if push
4188 mode can truly emulate pull mode.
4189 * tests/input.at (Torturing the Scanner): Likewise.
4190 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
4191 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
4192 AT_YACC_IF, which now includes the case of push mode since %skeleton
4193 need not be used for push mode. This will be more intuitive once
4194 push.c is renamed to yacc.c.
4195
7172e23e
JD
41962006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
4197
4198 For push mode, convert yyparse from a macro to a function, invoke yylex
4199 instead of passing a yylexp argument to yypull_parse, and don't
4200 generate yypull_parse or yyparse unless %push-pull-parser is declared.
4201 Discussed starting at
4202 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
4203 * data/bison.m4 (b4_pull_if): New.
4204 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
4205 * data/push.c: Improve M4 quoting a little.
4206 (b4_generate_macro_args, b4_parenthesize): Remove.
4207 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
4208 any time a pull parser is requested.
4209 Don't #define this as a wrapper around yypull_parse. Instead, when
4210 both push and pull are requested, make it a function that does that
4211 same thing.
4212 (yypull_parse): If there's a b4_prefix, #define this to
4213 b4_prefix[pull_parse] when both push and pull are requested.
4214 Don't define this as a function unless both push and pull are
4215 requested.
4216 Remove the yylexp argument and hard-code yylex invocation instead.
4217 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
4218 %push-parser.
4219 * src/getargs.c (pull_parser): New global initialized to true.
4220 * getargs.h (pull_parser): extern it.
4221 * src/output.c (prepare): Insert pull_flag muscle.
4222 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
4223 (prologue_declaration): Set both push_parser and pull_parser = true for
4224 %push-pull-parser. Set push_parser = true and pull_parser = false for
4225 %push-parser.
4226 * src/scan-gram.l: Don't accept %push_parser as an alternative to
4227 %push-parser since there's no backward-compatibility concern here.
4228 Scan %push-pull-parser.
4229 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
4230 instead of %push-parser.
4231 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
4232 prototype it in the module that calls yyparse.
4233 * tests/input.at (Torturing the Scanner): Likewise.
4234 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
4235
2e7944cb
JD
42362006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
4237
4238 Update etc/bench.pl. Optimize push mode a little (the yyn change
4239 deserves most of the credit).
4240 * Makefile.am (SUBDIRS): Add etc subdirectory.
4241 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
4242 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
4243 yytoken, yyval, and yyloc declarations to...
4244 (yyparse or yypush_parse): ... here to improve performance. For
4245 yypush_parse invocations after the first, be sure to assign yyn its old
4246 value again.
4247 (yypstate_new): Don't bother initializing the yyresult field since the
4248 initial value isn't used.
4249 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
4250 remove the #define that, in push mode, set it to yyps->NAME.
4251 * etc/Makefile.am: New.
4252 * etc/bench.pl: Remove and build it instead from...
4253 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
4254 "tests/bison" from the build directory by default rather than just
4255 invoking "bison" from $PATH.
4256 (calc_grammar): Update push parser code: don't declare yylval globally,
4257 don't define yyparse_wrapper, and don't #define yyparse.
4258 (bench_grammar): Update to check all working combinations of yacc.c,
4259 push.c, impure, pure, pull, and push.
4260
c3d50342
JD
42612006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
4262
4263 For push mode, add pull wrappers around yypush_parse.
4264 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
4265 (yypull_parse): New function wrapping yypush_parse.
4266 (yyparse): New #define wrapping yypull_parse.
4267 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
4268 is declared.
4269 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
4270 prototype yylex in the module that calls yyparse, and don't prototype
4271 yyparse there. Otherwise, the yyparse expansion won't compile.
4272 * tests/input.at (Torturing the Scanner): Likewise.
4273
94ebeba5
JD
42742006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
4275
4276 Enable push parsers to operate in impure mode. Thus, %push-parser no
4277 longer implies %pure-parser. The point of this change is to move
4278 towards being able to test the push parser code by running the entire
4279 test suite as if %push-parser had been declared.
4280 * data/push.c (yypush_parse): For impure mode, remove the
4281 yypushed_char, yypushed_val, and yypushed_loc arguments.
4282 Instead, declare these as local variables initialized to the global
4283 yychar, yylval, and yylloc.
4284 For the first yypush_parse invocation only, restore the initial values
4285 of these global variables when it's time to read a token since they
4286 have been overwritten.
4287 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
4288 %push-parser.
4289 * tests/calc.at (Simple LALR(1) Calculator): Always declare
4290 %pure-parser along with %push-parser since this test case was designed
4291 for pure push parsers.
4292 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
4293 (AT_YACC_OR_PUSH_IF): New.
4294 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
4295 add a note that it's still wrong for some cases (as it has been for a
4296 while).
4297 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
4298 %push-parser no longer implies %pure-parser.
4299
a0633178
JD
43002006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
4301
4302 Remove some unnecessary differences between the pull parser code and
4303 the push parser code. This patch enables yynerrs in push mode.
4304 * data/push.c: Reformat M4 a little.
4305 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
4306 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
4307 because push mode is on. Instead, if pure mode is on, move yynerrs
4308 to...
4309 (b4_declare_parser_state_variables): ... here.
4310 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
4311 to yyps->NAME so it can be used in yypush_parse.
4312 (yypush_parse): Don't omit uses of yynerrs in push mode.
4313
8646b6a3
JD
43142006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
4315
4316 Fix bug such that the first pushed token's value and location are
4317 sometimes overwritten (sometimes by %initial-action) before being used.
4318 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
4319 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
4320 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
4321 more closely mimic the pull parser logic.
4322 Don't copy the pushed token to yychar, yylval, and yylloc until it's
4323 time to read a token, which is after any initialization of yylval and
4324 yylloc.
4325 (gottoken): Rename label to...
4326 (yyread_pushed_token): ... for clarity and to avoid infringing on the
4327 user namespace.
4328
9baf4d74
JD
43292006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
4330
4331 Rearrange initialization of the parser state variables so that the
4332 skeleton doesn't have to have a copy for pull mode and another for push
4333 mode. This patch also fixes at least a bug such that yylloc was not
4334 initialized (with b4_location_initial_line and
4335 b4_location_initial_column) upon calling yypush_parse. However, that
4336 initialization now overwrites the first token's location;
4337 %initial-action assigning @$ already did the same thing, and both bugs
4338 will be fixed in a later patch.
4339 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
4340 (b4_declare_parser_state_variables): Remove initialization of yytoken,
4341 yyss, yyvs, yyls, and yystacksize.
4342 (yypstate_new): Remove initialization of some yypstate fields: yystate,
4343 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
4344 yylsp.
4345 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
4346 yyps->NAME so it can be used in yypush_parse.
4347 (yyparse or yypush_parse): For yypush_parse, don't print the
4348 "Starting parse" diagnostic for invocations after the first.
4349 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
4350 yypush_parse, only do it for the first invocation.
4351 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
4352 initialization to occur in yypush_parse but only on the first
4353 invocation.
4354
23522164
JD
43552006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
4356
4357 * data/push.c: Add CPP guards around push parser declarations in both
4358 the header and the code file.
4359 In the code file, move the push parser declarations to the same place
4360 they appear in the header file.
4361 Clean up the M4 some, especially the inconsistent underquoting in
4362 some b4_c_function_def and b4_c_function_decl uses.
4363
bb010fe5
JD
43642006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
4365
4366 Encapsulate the push parser state variables into an M4 macro so the
4367 push skeleton doesn't have to list them again for pull mode's yyparse.
4368 For push mode, remove yypush_parse's local equivalents of these
4369 variables to eliminate unnecessary copying between the two sets at
4370 run-time. This patch also fixes at least a bug related to multiple
4371 %initial-action invocations in push mode.
4372 * data/push.c (b4_declare_parser_variables): Rename to...
4373 (b4_declare_scanner_communication_variables): ... this for clarity and
4374 update both uses.
4375 (b4_declare_yyparse_variables): Remove and move its contents to the one
4376 spot where it was invoked.
4377 (b4_declare_parser_state_variables): New macro containing the parser
4378 state variables required by push mode.
4379 (struct yypstate): Replace all fields but yynew with
4380 b4_declare_parser_state_variables.
4381 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
4382 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
4383 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
4384 (yyparse or yypush_parse): For yyparse in pull mode, replace local
4385 parser state variable declarations with
4386 b4_declare_parser_state_variables.
4387 Don't initialize parser state variables when calling yypush_parse since
4388 yypstate_new already does that.
4389 Invoke the user's initial action only upon the first yypush_parse
4390 invocation.
4391 Remove all code that copies between the local parser state variables
4392 and the yypstate.
4393
2d212f8c
JD
43942006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
4395
4396 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
4397 prevent a name collision in a future patch where these names will
4398 sometimes be #define'd.
4399 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
4400 since it no longer has the same name as the existing argument.
4401 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
4402
e6e704dc
JD
44032006-12-19 Paolo Bonzini <bonzini@gnu.org>
4404 and Joel E. Denny <jdenny@ces.clemson.edu>
4405
4406 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
4407 that the argument is case-insensitive, and there's no `=' here.
4408 For the %skeleton entry, mention that %language is better.
4409 (Bison Options): Likewise for --language and --skeleton. Move the
4410 --skeleton entry so that the `Tuning the parser' section is sorted
4411 alphabetically on long options.
4412 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
4413 %language directive in detail here; cross-reference the %language
4414 documentation instead.
4415 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
4416 `%require "2.3b"' so that the example is always up-to-date.
148d66d8 4417 (Table of Symbols): Add entries for %language and %skeleton.
e6e704dc
JD
4418 * examples/extexi (normalize): Instead of replacing every %require
4419 argument with the current Bison version, just substitute for
4420 `@value{VERSION}'. This guarantees that we're testing what actually
4421 appears in the documentation.
4422 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
4423 rather than `@VERSION@'.
4424
0e021770
PE
44252006-12-18 Paul Eggert <eggert@cs.ucla.edu>
4426
fd575f05
PE
4427 * NEWS: Reword the %language news a bit, and put it earlier.
4428
0e021770
PE
4429 * src/getargs.c (skeleton_arg): Last arg is now location const *.
4430 Rewrite to simplify the logic.
4431 (language_argmatch): Likewise.
fd575f05
PE
4432 (program_name): We now own this var.
4433 * src/getargs.h (struct bison_language): Use char[] rather than
4434 const char *.
0e021770
PE
4435
4436 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
4437 Java is supported.
4438 * src/complain.c (program_name): Remove decl; no longer needed.
4439 * src/main.c (program_name): Remove; now belongs to getargs.
4440
44412006-12-18 Paolo Bonzini <bonzini@gnu.org>
4442
4443 * NEWS: Document %language.
4444
4445 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
4446
4447 * data/c-skel.m4, data/c++-skel.m4: New files.
4448 * data/glr.c: Complain on push parsers.
4449
4450 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
4451 over %skeleton.
148d66d8 4452 (Decl Summary): Document %language and %skeleton.
0e021770
PE
4453 (Command line): Document -L.
4454
4455 * examples/extexi: Rewrite %require directive.
4456 * examples/calc++/Makefile.am: Pass VERSION to extexi.
4457
4458 * src/files.c (compute_exts_from_gc): Look in language structure
4459 for .y extension.
4460 (compute_file_name_parts): Check whether .tab should be added.
4461 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
4462 (language, skeleton_arg, language_argmatch): New.
4463 (long_options): Add --language.
4464 (getargs): Use skeleton_arg, add -L/--language.
4465 * src/getargs.h: Include location.h.
4466 (struct bison_language, language, skeleton_arg, language_argmatch): New.
4467 * src/output.c (prepare): Pick default skeleton from struct language.
4468 Don't dispatch C skeletons here.
4469 * src/parse-gram.y (PERCENT_LANGUAGE): New.
4470 (prologue_declaration): Add "%language" rule, use skeleton_arg.
4471 * src/scan-gram.l ("%language"): New rule.
4472
4473 * tests/calc.at: Test %skeleton and %language.
4474 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
4475 (AT_GLR_IF): Look for %skeleton "glr.cc".
4476 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
4477 (AT_YACC_IF): Reject %language.
4478
5691bf57
PE
44792006-12-18 Paul Eggert <eggert@cs.ucla.edu>
4480
db06f0ce
PE
4481 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
4482 since it wasn't used; only the typedef name 'semantic_type' is needed.
4483 Also, omit trailing white space.
4484
5691bf57
PE
4485 * bootstrap: Sync from coreutils.
4486 (gnulib_extra_files): Add build-aux/announce.gen.
4487 (slurp): Adjust .gitignore files like .cvsignore files.
4488 * build-aux/announce-gen: Remove from CVS, since bootstrap
4489 now creates this.
4490
791934e4
JD
44912006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
4492
4493 Make %push-parser imply %pure-parser. This fixes several bugs; see
4494 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
4495 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
4496 pure_parser = true.
4497 * data/push.c: Don't bother testing b4_push_if when deciding whether
4498 to expand b4_declare_parser_variables globally.
4499 (yypush_parse): Likewise in here.
4500
4501 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
4502 (yy_reduce_print): Reformat M4 for readability.
4503
ee5abb37
JD
45042006-12-15 Bob Rossi <bob@brasko.net>
4505 and Joel Denny <jdenny@ces.clemson.edu>
4506
4507 * data/push.c (yypstate): Add typedef, and update all uses of
4508 struct yypstate to just yypstate.
4509 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
4510
16ca01f9
JD
45112006-12-14 Bob Rossi <bob@brasko.net>
4512
4513 * data/push.c (yypush_parse): Declare prototype regardless of
4514 %locations option.
4515
ab8e7e1a
JD
45162006-12-14 Bob Rossi <bob@brasko.net>
4517
4518 * data/push.c (yyparse): Remove the prototype and the #define when in
4519 push-parser mode.
4520
9bf32be3
JD
45212006-12-13 Bob Rossi <bob@brasko.net>
4522
4523 * data/push.c (yypstate_init): Rename to...
4524 (yypstate_new): ... this and use b4_c_function_def.
4525 (yypstate_delete): New.
4526 (yypush_parse): Change parameters yynval and yynlloc to be const.
4527 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
4528 yypstate_delete functions.
4529
f02e2948
JD
45302006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
4531
4532 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
4533 strange test case titles. Reported by Bob Rossi.
4534
38eb7751
PE
45352006-12-13 Paul Eggert <eggert@cs.ucla.edu>
4536
4537 * TODO: Add pointer to Sylvain Schmitz's work on static detection
4538 of potential ambiguities in GLR grammers.
4539
bd9d212b
JD
45402006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
4541
4542 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
4543 `bison ', use m4_index instead of m4_substr since chopping up a string
4544 containing M4-special characters causes problems here.
4545
4546 Fix a couple of bugs related to special characters in user-specified
4547 file names, and make it easier for skeletons to compute output file
4548 names with the same file name prefix as Bison-computed output file
4549 names.
4550 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
4551 b4_parser_file_name and b4_spec_defines_file instead of
4552 @output_parser_name@ and @output_header_name@, which are now redundant.
4553 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
4554 b4_parser_file_name, b4_spec_defines_file, and the new
4555 @basename(FILENAME@) instead of @output_parser_name@ and
4556 @output_header_name@, which inappropriately escaped the file names as
4557 C string literals.
4558 * src/files.c (all_but_ext): Remove static qualifier.
4559 (compute_output_file_names): Move `free (all_but_ext)' to...
4560 (output_file_names_free): ... here since all_but_ext is needed later.
4561 * src/files.h (all_but_ext): Extern.
4562 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
4563 exactly what MUSCLE_INSERT_STRING used to do.
4564 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
4565 characters are escaped properly.
4566 * src/output.c (prepare): Define muscle file_name_all_but_ext as
4567 all_but_ext.
4568 For pkgdatadir muscle, maintain previous functionality by using
4569 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
4570 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
4571 digraphs would never be expanded. Hopefully no one has M4-special
4572 characters in his Bison installation path.
4573 * src/scan-skel.l: Don't parse @output_header_name@ and
4574 @output_parser_name@ anymore since they're now redundant.
4575 In @output, use decode_at_digraphs.
4576 Parse a new @basename command that invokes last_component.
4577 (decode_at_digraphs): New.
4578 (BASE_QPUTS): Remove unused.
4579 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
4580 (Output file name): New tests.
4581
3f7ca628
JD
45822006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
4583
4584 Warn about output files that are generated by the skeletons and that
4585 conflict with other output files.
4586 * data/glr.c: Don't generate the header file here when glr.cc does.
4587 * src/files.c (file_names, file_names_count): New static globals.
4588 (compute_output_file_names): Invoke output_file_name_check for files
4589 not generated by the skeletons and remove existing checks.
4590 (output_file_name_check): New function that warns about conflicting
4591 output file names.
4592 (output_file_names_free): Free file_names.
4593 * src/files.h (output_file_name_check): Declare.
4594 * src/scan-skel.l: Invoke output_file_name_check for files generated by
4595 the skeletons.
4596 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
4597 (Conflicting output files): New tests.
4598
178e123e
PE
45992006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4600
4601 * doc/bison.texinfo: Fix a couple of typos.
4602
46032006-12-08 Bob Rossi <bob@brasko.net>
8def5cd0
JD
4604
4605 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
4606 Rename to...
4607 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
4608 update all uses.
4609 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
4610 (yypush_parse): Rename yypvars argument to yyps and remove redundant
4611 local pv.
4612 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
4613 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
4614
ea17f233
JD
46152006-12-07 Bob Rossi <bob@brasko.net>
4616 and Joel Denny <jdenny@ces.clemson.edu>
4617
4618 * data/push.c (yypvarsinit): Change return type from void* to struct
4619 yypvars*. No longer cast to void* on return.
4620 (struct yypvars): Remove yylen since it need not be remembered between
4621 yypushparse invocations.
4622 (yypushparse): Don't copy between yylen and pv->yylen.
4623
55a30bda
JD
46242006-12-05 Bob Rossi <bob@brasko.net>
4625
4626 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
4627 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
4628 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
4629 (struct yypvars): Remove b4_declare_parser_variables.
4630 (yypvarsinit): Remove init code for removed variables.
4631 (global scope): Do not declare b4_declare_parser_variables if
4632 push or pure mode.
4633 (yypushparse): Add b4_declare_parser_variables.
4634 Init new local variables, and remove init code for removed
4635 yypvars variables.
4636 (yyparse): Delete.
4637 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
4638 and yyparse for other modes.
4639 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
4640 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
4641 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
4642 (AT_PURE_LEX_IF): True if pure or push parser.
4643
85894313
JD
46442006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
4645
4646 Document Yacc prologue alternatives and default %destructor's and
4647 %printer's as experimental. Don't mention Java yet. Discussed at
4648 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
4649 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
4650 (2.3a): Annotate this entry to say the old forms of these features were
4651 also experimental.
4652 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
148d66d8 4653 Table of Symbols): Say they're experimental. Comment out any mention
85894313
JD
4654 of Java (we'll want this back eventually).
4655
02975b9a
JD
46562006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
4657
4658 Support a file name argument to %defines. Deprecate `=' in
4659 %file-prefix, %name-prefix, and %output. Discussed at
4660 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
4661 * NEWS (2.3a+): Mention.
148d66d8 4662 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
02975b9a
JD
4663 form of %defines, and remove `=' from entries for %file-prefix,
4664 %name-prefix, and %output.
4665 * src/parse-gram.y (prologue_declaration): Implement.
4666 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
4667 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
4668 all but one occurrence of %name-prefix.
4669 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
4670 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
4671 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
4672 occurrence of each of %file-prefix and %output. Add check for %defines
4673 with argument.
4674 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
4675 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
4676 Remove the `=' from %output.
4677
287b314e
JD
46782006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
4679
4680 Don't escape $ in test case titles since Autoconf 2.61 now does that
4681 correctly.
4682 * tests/actions.at (Default %printer and %destructor are not for error
4683 or $undefined): Here.
4684 (Default %printer and %destructor are not for $accept): Here.
4685 * tests/input.at (Invalid $n and @n): Here.
4686
3ebecc24
JD
46872006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
4688
4689 Rename <!> to <>. Discussed starting at
4690 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
4691 * NEWS (2.3a+): Update.
148d66d8 4692 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
3ebecc24
JD
4693 Update.
4694 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
4695 * src/scan-gram.l (INITIAL): Implement.
4696 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
4697 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
4698 comment.
4699 * tests/actions.at (Default tagless %printer and %destructor,
4700 Default tagged and per-type %printer and %destructor,
4701 Default %printer and %destructor are not for error or $undefined,
4702 Default %printer and %destructor are not for $accept,
4703 Default %printer and %destructor for mid-rule values): Update.
4704 * tests/input.at (Default %printer and %destructor redeclared,
4705 Unused values with default %destructor): Update.
4706
26b8a438
JD
47072006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
4708
4709 Don't let %prec take a nonterminal.
4710 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
4711 token.
4712 * tests/input.at (%prec takes a token): New test checking that %prec
4713 won't take a nonterminal.
4714
07c39ae9
JD
47152006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
4716
405d53b7
JD
4717 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
4718 it was double-quoted.
07c39ae9
JD
4719 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
4720 grammar is maintained with Bison's highest standards.
4721 * src/getargs.c: Fix some typos in Doxygen comments.
4722
580b8926
JD
47232006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
4724
4725 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
4726 later. Reported by Paul Eggert in
4727 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
4728 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
4729 * src/scan-code.l (translate_action): Don't bother invoking
4730 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
4731 (code_scanner_free): Instead of invoking
4732 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
4733 which frees more.
4734 * src/scan-gram.l (gram_scanner_free): Likewise.
4735 * src/scan-skel.l (scan_skel): Likewise.
4736
4502eadc
JD
47372006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
4738
4739 * src/files.c (tr): Change return type to void.
4740 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
4741 has been called previously for the same key.
4742 (muscle_find): Return storage instead of value so that
4743 --enable-gcc-warnings doesn't produce warnings that the return discards
4744 const. aver that the value and storage are the same since storage
4745 could potentially be NULL when value is not.
4746 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
4747 same as 0.
4748
7746c8f6
PE
47492006-11-08 Paul Eggert <eggert@cs.ucla.edu>
4750
4751 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
4752 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
4753 us a slightly cleaner distribution, and also works.
4754 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
4755 gnulib changes.
4756
eb095650
PE
47572006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
4758 and Paul Eggert <eggert@cs.ucla.edu>
4759
4760 Don't let Bison leak memory except when it complains.
4761 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
4762 (spec_defines_file, dir_prefix): Now char *, not const char *,
4763 since they are freed.
4764 * src/files.c: Likewise.
4765 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
4766 Likewise.
4767 (tr): Now operates in-place. All uses changed.
4768 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
4769 values.
4770 (compute_file_name_parts, compute_output_file_names): Don't store
4771 read-only data in variables that will be freed.
4772 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
4773 src_extension, and header_extension.
4774 (output_file_names_free): New public function to free
4775 spec_verbose_file, spec_graph_file, spec_defines_file,
4776 parser_file_name, and dir_prefix.
4777 * src/getargs.c (getargs): Don't store read-only data in variables that
4778 will be freed.
4779 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
4780 (which previously existed but was unused), and quotearg_free.
4781 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
4782 * src/muscle_tab.c: Likewise.
4783 (muscle_entry): Make the value char const *,
4784 and add a new storage member that is char * and can be freed.
4785 (muscle_entry_free): New private function.
4786 (muscle_init): Use it instead of free.
4787 (muscle_insert, muscle_grow): Update and use new storage member.
4788 (muscle_code_grow): Free the string passed to muscle_grow
4789 since it's not needed anymore.
4790 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
4791 add a new `char *code' member.
4792 ("{...}"): Declare semantic type as code.
4793 * src/scan-code.h (translate_rule_action):
4794 (translate_symbol_action, translate_code, translate_action): Return
4795 `char const *' rather than `char *' since external code should not free
4796 these strings.
4797 * src/scan-code.l: Likewise.
4798 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
4799 which is "{...}" in the parser.
4800 * tests/Makefile.am (maintainer-check-valgrind): Set
4801 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
4802 Valgrind.
4803 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
4804 complain.
4805 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
4806 expecting a non-zero exit status sets --leak-check=summary and
4807 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
4808 this case, and we don't want to hear about it.
4809
ac564be4
PE
48102006-11-08 Paul Eggert <eggert@cs.ucla.edu>
4811
4812 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
4813 instead of from the template, to simplify configuration a bit.
4814 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
4815 and m4/wint_t.m4, as they are needed with the latest gnulib.
4816
17bd8a73
JD
48172006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
4818
4819 Disable unset/unused mid-rule value warnings by default, and recognize
4820 --warnings=midrule-values to enable them. Discussed starting at
4821 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
4822 * NEWS (2.3a+): Mention.
4823 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
4824 warnings): Add entry for midrule-values subargument.
4825 * src/reader.c (symbol_should_be_used): Don't return true just because
4826 the value is a set/used mid-rule value unless
4827 --warnings=midrule-values was specified.
4828 * tests/input.at (Unused values, Unused values before symbol
4829 declarations): Run tests with and without --warnings=midrule-values.
4830
4831 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
4832 than LIST_FREE directly.
4833
89eb3c76
JD
48342006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
4835
4836 Finish implementing --warnings=error, which should not be implied by
4837 --warnings=all (or by its synonyms -W and --warnings without
4838 subarguments).
4839 * src/complain.c (set_warning_issued): New function to report that
4840 warnings are being treated as errors and to record an error if so.
4841 Invoke...
4842 (warn_at, warn): ... here.
4843 * src/getargs.c (warnings_args, warnings_types): Reorder so that
4844 "error - warnings are errors" does not appear above "all - all of the
4845 above".
4846 (getargs): For -W and --warnings without subarguments, don't let
4847 FLAGS_ARGMATCH set warnings_error in warnings_flag.
4848 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
4849
ba7560e2
JD
48502006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
4851
4852 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
4853 empty subargument list. For example: `bison --warnings= parser.y'.
4854
31283fc3
JD
48552006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
4856
4857 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
4858 the parser header file so that gcc doesn't warn.
4859
12e35840
JD
48602006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
4861
4862 Split the default %destructor/%printer into two kinds: <*> and <!>.
4863 Discussed starting at
4864 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
4865 * NEWS (2.3a+): Mention.
4866 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
4867 previous change today related to mid-rules.
148d66d8 4868 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
3ebecc24 4869 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
12e35840
JD
4870 (TYPE_TAG_ANY): Add as <*>.
4871 (TYPE_TAG_NONE): Add as <!>.
4872 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
4873 for <*> and <!>.
4874 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
4875 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
4876 * src/symlist.c (symbol_list_default_new): Split into tagged and
4877 tagless versions.
4878 (symbol_list_destructor_set, symbol_list_printer_set): Split
4879 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
4880 SYMLIST_DEFAULT_TAGLESS.
4881 * src/symlist.h: Update symbol_list_default*_new prototypes.
4882 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
4883 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
4884 * src/symtab.c (default_destructor, default_destructor_location,
4885 default_printer, default_printer_location): Split each into tagged and
4886 tagless versions.
4887 (symbol_destructor_get, symbol_destructor_location_get,
4888 symbol_printer_get, symbol_printer_location_get): Implement tagged
4889 default and tagless default cases.
4890 (default_destructor_set, default_printer_set): Split each into tagged
4891 and tagless versions.
4892 * src/symtab.h: Update prototypes.
4893 * tests/actions.at (Default %printer and %destructor): Rename to...
4894 (Default tagless %printer and %destructor): ... this, and extend.
4895 (Per-type %printer and %destructor): Rename to...
4896 (Default tagged and per-type %printer and %destructor): ... this, and
4897 extend.
4898 (Default %printer and %destructor for user-defined end token): Extend.
4899 (Default %printer and %destructor are not for error or $undefined):
4900 Update.
4901 (Default %printer and %destructor are not for $accept): Update.
4902 (Default %printer and %destructor for mid-rule values): Extend.
4903 * tests/input.at (Default %printer and %destructor redeclared): Extend.
4904 (Unused values with default %destructor): Extend.
4905
f91b1629
JD
49062006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
4907
4908 Don't apply the default %destructor/%printer to an unreferenced midrule
4909 value. Mentioned at
4910 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
4911 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
4912 like $@n instead of just @n so that the default %destructor/%printer
4913 logic doesn't see them as user-defined symbols.
4914 (symbol_is_dummy): Check for both forms of the name.
4915 * src/reader.c (packgram): Remove the `$' from each midrule symbol
4916 name for which the midrule value is referenced in any action.
4917 * tests/actions.at (Default %printer and %destructor for mid-rule
4918 values): New test.
4919 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
4920 for change to dummy symbol names.
4921
519d0004
JD
49222006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
4923
4924 Warn about unset midrule $$ if the corresponding $n is used.
4925 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
4926 $n usage.
4927 (packgram): Before invoking grammar_rule_check on any rule, make sure
4928 all actions have already been scanned in order to set `used' flags.
4929 Otherwise, checking that a midrule's $$ is set will not always work
4930 properly because the midrule check must forward-reference the midrule's
4931 parent rule.
4932 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
4933 warning.
4934
a501eca9
JD
49352006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
4936
4937 More improvements to the documentation of the prologue alternatives:
4938 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
4939 Bison manual.
4940 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
4941 some text to clarify the relative importance of the new directives and
4942 to show how these directives may be viewed as code labels.
4943
2cbe6b7f
JD
49442006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
4945
4946 Similar to the recently removed %before-header, add %code-top as the
4947 alternative to the pre-prologue. Mentioned at
4948 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
4949 Also, let the prologue alternatives appear in the grammar section.
4950 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
4951 (prologue_declaration): Move the existing prologue alternatives to...
4952 (grammar_declaration): ... here and add %code-top.
4953 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
4954
4955 Clean up and extend documentation for the prologue alternatives.
4956 * NEWS (2.3a+): Describe prologue alternatives.
4957 * doc/bison.texinfo (Prologue): Move discussion of prologue
4958 alternatives to...
4959 (Prologue Alternatives): ... this new section, and extend it to discuss
4960 all 4 directives in detail.
148d66d8
JD
4961 (Table of Symbols): Clean up discussion of prologue alternatives and
4962 add %code-top.
2cbe6b7f 4963
e557d3ea
JMG
49642006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4965
4966 DJGPP specific issues.
4967
4968 * djgpp/config.bat: config.hin has been moved to lib. Adjust
4969 config.bat accordingly.
4970 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
4971 * djgpp/config.site: Likewise.
4972
136a0f76
PB
49732006-10-16 Paolo Bonzini <bonzini@gnu.org>
4974
27bd5d67
PB
4975 Replace %*-header with %provides, %requires, %code. See discussion at
4976 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
4977
136a0f76
PB
4978 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
4979 (b4_user_start_header): Remove.
4980 * data/glr.c: Use new macros instead of b4_*start_header
4981 and b4_*end_header.
4982 * data/glr.cc: Likewise.
4983 * data/lalr1.cc: Likewise.
4984 * data/push.c: Likewise.
4985 * data/yacc.c: Likewise.
4986
4987 * doc/bison.texinfo: Remove %before-header, rename
4988 %{start,end,after}-header to %requires, %provides, %code.
4989
4990 * src/parse-gram.y: Likewise (also rename token names accordingly).
4991 * src/scan-gram.l: Likewise.
4992 * tests/actions.at: Likewise.
4993
10f429ef
PE
49942006-10-14 Paul Eggert <eggert@cs.ucla.edu>
4995
4996 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
4997 Problem reported by Joel E. Denny.
4998
49992006-10-14 Jim Meyering <jim@meyering.net>
5000
5001 (Sync from coreutils.)
5002 Work also when the working directory (with e.g. coreutils sources)
5003 is version controlled with git, rather than CVS.
5004 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
5005 rather than CVS.
5006 In messages and comments, say e.g., "checked-out sources",
5007 rather than "CVS sources".
5008 (version_controlled_file): New function. Work for git as well as
5009 for CVS. Don't use grep's -q option.
5010 (slurp): Call it here, in place of CVS-specific code.
5011
c4bd5bf7
JD
50122006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
5013
5014 Fix testsuite for ./configure --enable-gcc-warnings:
5015 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
5016 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
5017 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
5018 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
5019 * test/regression.at (Diagnostic that expects two alternatives):
5020 Likewise.
5021
46356ea4
PE
50222006-10-12 Paul Eggert <eggert@cs.ucla.edu>
5023
231ed89a
PE
5024 * bootstrap.conf (gnulib_modules): Add config-h.
5025 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
5026 worry about HAVE_CONFIG_H.
5027 * lib/abitset.c: Likewise.
5028 * lib/bitset.c: Likewise.
5029 * lib/bitset_stats.c: Likewise.
5030 * lib/bitsetv-print.c: Likewise.
5031 * lib/bitsetv.c: Likewise.
5032 * lib/ebitset.c: Likewise.
5033 * lib/get-errno.c: Likewise.
5034 * lib/lbitset.c: Likewise.
5035 * lib/subpipe.c: Likewise.
5036 * lib/timevar.c: Likewise.
5037 * lib/vbitset.c: Likewise.
5038 * lib/bitset.c: Include "bitset.h" first, to test interface.
5039 * lib/bitset_stats.c: Include "bitset_stats.h" first.
5040 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
5041 * lib/bitsetv.c: Include "bitsetv.h" first.
5042 * lib/get-errno.c: Include "get-errno.h" first.
5043 * m4/.cvsignore: Add config-h.m4.
5044 * tests/actions.at (Default %printer and %destructor for ...):
5045 Adjust expected line numbers in output to reflect removal of #if
5046 HAVE_CONFIG_H lines.
5047 * tests/glr-regression.at (Missed %merge type warnings when ...):
5048 Likewise.
5049 * tests/regression.at (Braced code in declaration in rules section):
5050 Likewise.
5051 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
5052 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
5053 Include <config.h> unconditionally.
5054
46356ea4
PE
5055 * bootstrap: Sync from coreutils, as follows:
5056
5057 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
5058
5059 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
5060 variable was sometimes used without being initialized. This
5061 messed up the installation of the INSTALL file in some cases.
5062
5063 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
5064
5065 * bootstrap (usage, main program, symlink_to_gnulib): Add option
5066 --copy. Inspired by a suggestion from Bruno Haible.
5067
5068 2006-10-03 Jim Meyering <jim@meyering.net>
5069
5070 * bootstrap: Undo last change to this file, since now gnulib-tool
5071 sticks with the automake default in generating dependencies.
5072
dd4bf078
PE
50732006-10-12 Paul Eggert <eggert@cs.ucla.edu>
5074
cf2a5f7c
PE
5075 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
5076 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
5077
5078 * doc/bison.1: Add copyright notice.
5079
5080 * data/glr.c: Don't include <stdarg.h>; not used.
5081
35fe0834
PE
5082 * NEWS: The -g and --graph options now output graphs in Graphviz
5083 DOT format, not VCG format.
5084 * doc/bison.1: Likewise.
5085 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
fcab4a2e
PE
5086 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
5087 of this change in
5088 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
35fe0834
PE
5089 * TODO: Remove Graphviz entry.
5090 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
5091 remove vcg.c, vcg.h, vcg_defaults.h.
5092 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
5093 * src/graphviz.c, src/graphviz.h: New files.
5094 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
5095 * src/files.h: Make comment more generic.
5096 * src/main.c (main): Likewise.
5097 * src/print_graph.h: Likewise.
5098 * src/getargs.c (usage): Make usage description more generic.
5099 * src/print_graph.c: Include graphviz.h rather than vcg.h.
5100 (static_graph, fgraph): Remove. All uses changed to pass
5101 arguments instead of sharing a static var.
5102 (print_core, print_actions, print_state, print_graph):
5103 Output graphviz format rather than VCG format.
5104 * tests/.cvsignore: Remove *.vcg; add *.dot.
5105 * tests/output.at: Expect *.dot files, not *.vcg files.
5106
dd4bf078
PE
5107 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
5108 accommodates the 2006-10-08 change.
5109
efdd7421
PE
51102006-10-11 Bob Rossi <bob@brasko.net>
5111
5112 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
5113 (b4_yyssa, b4_yyerror_range): New macros.
5114 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
5115 (yypvarsinit): Remove init of removed fields.
5116 (yypushparse): Remove use of removed fields; use new macros instead.
5117
96a1981a
PE
51182006-10-11 Paul Eggert <eggert@cs.ucla.edu>
5119
5120 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
5121 in a push parser. Reindent slightly to match yacc.c better.
5122
51232006-10-11 Bob Rossi <bob@brasko.net>
5124
46356ea4
PE
5125 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
5126 yymsg_alloc fields.
5127 (yypvarsinit, yypushparse): Remove init of removed fields.
5128 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
96a1981a 5129
c1630a8b
PE
51302006-10-09 Paul Eggert <eggert@cs.ucla.edu>
5131
5132 * THANKS: Add Paolo Bonzini and Bob Rossi.
5133
90b9908d
PB
51342006-10-08 Paolo Bonzini <bonzini@gnu.org>
5135
5136 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
5137 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
5138 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
5139 b4_define_user_cde and uses): Remove.
5140 (b4_comment, b4_prefix, b4_sync_start): New.
5141 * data/bison.m4: New file, with most of the content removed from c.m4.
5142 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
5143 * src/output.c (output_skeleton): Pass bison.m4.
5144 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
5145 only if specified.
5146
cf806753
PE
51472006-10-05 Paul Eggert <eggert@cs.ucla.edu>
5148
5149 Fix test failure reported by Tom Lane in
5150 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
5151 and try to make such failures easier to catch in the future.
5152 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
5153 that's now the caller's responsibility.
5154 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
5155 Set yychar = YYEOF if it's negative.
5156 * tests/actions.at (yylex): Abort if asked to read past EOF.
5157 * tests/conflicts.at (yylex): Likewise.
5158 * tests/cxx-type.at (yylex): Likewise.
5159 * tests/glr-regression.at (yylex): Likewise.
5160 * tests/input.at (yylex): Likewise.
5161 * tests/regression.at (yylex): Likewise.
5162 * tests/torture.at (yylex): Likewise.
5163
0e2f006a
PE
51642006-10-01 Paul Eggert <eggert@cs.ucla.edu>
5165
5166 Fix problems with translating English-language diagnostics.
5167 * bootstrap: Fix bug introduced in recent bootstrap changes, with
5168 respect to bison-runtime pot generation. The YY_ stuff
5169 wasn't being captured.
5170 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
5171 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
5172 * runtime-po/POTFILES.in: Add data/push.c.
5173
e3ddc1e3
PE
51742006-09-29 Paul Eggert <eggert@cs.ucla.edu>
5175
5176 Merge bootstrap changes from coreutils.
5177
5178 2006-09-28 Jim Meyering <jim@meyering.net>
5179
5180 Automatically generated dependencies are important even
5181 when all of the sources in a directory come from gnulib.
5182 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
5183 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
5184
5185 2006-09-23 Jim Meyering <jim@meyering.net>
5186
5187 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
5188
5189 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5190
5191 * bootstrap: Add support for --force.
5192 (usage): New function. Describe usage less tersely.
5193 (CVS_only_file): New var.
5194
01e972b3
PE
51952006-09-21 Paul Eggert <eggert@cs.ucla.edu>
5196
5197 * data/push.c (YYPUSH_MORE): Make it an enum instead.
5198 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
5199 Adjust white space and comments to match GNU style better.
5200
c63d3e90
PE
52012006-09-20 Bob Rossi <bob@brasko.net>
5202
5203 * data/push.c (yyresult_get): Remove function.
5204 (YYPUSH_MORE): Add #define.
5205 (yypushparse): Modify return value.
5206
e70f46d1
PE
52072006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5208
5209 * stamp-h.in: Remove; no longer needed.
5210 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
5211 Remove config.h, config.hin, intl (no longer created).
5212 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
5213 stamp-h1.
5214
5215 Sync bootstrap from coreutils, as follows:
5216
5217 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
5218
5219 * bootstrap (symlink_to_gnulib): New function.
5220 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
5221 to copies-of-gnulib.
5222 (cp_mark_as_generated, slurp, gnulib_files):
5223 Avoid making a copy if it's the same as the old version.
5224 (gnulib_files): Add support for this variable (used by Bison).
5225
a92be413
PE
52262006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5227
5228 * src/getargs.c (usage): Rework to use conventions similar to
5229 coreutils, to make translation a bit easier and the code a bit
5230 smaller. Problem reported by Tim Van Holder.
5231
4f82b42a
PE
52322006-09-15 Paul Eggert <eggert@cs.ucla.edu>
5233
3b2942e6
PE
5234 Use some of gnulib's new modules, taken from coreutils.
5235
5236 * bootstrap: Sync from coreutils, except add support for gnulib_files.
5237 * bootstrap.conf: New file.
5238 (gnulib_modules): Add configmake, inttypes, unistd.
5239 (XGETTEXT_OPTIONS): Add complain, complain_at,
5240 fatal, fatal_at, warn, warn_at, unexpected_end.
5241 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
5242 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
5243 (gl_EARLY): Add.
5244 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
5245 (gl_INIT): Add
5246 (GNULIB_AUTOCONF_SNIPPET): Remove.
5247 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
5248 the pickiest.
5249 * lib/.cvsignore: Add inttypes_.h.
5250 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
5251 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
5252 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
5253 no-longer-necessary initializations.
5254 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
5255 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
5256 use the unistd module.
5257 * src/system.h: Likewise.
5258 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
5259 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
5260 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
5261 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
5262 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
5263 * src/system.h: Include inttypes.h unconditionally, now that we
5264 use the inttypes module. Don't bother to include stdint.h, since
5265 inttypes.h now does that for us.
5266 (LOCALEDIR): Remove, now that we use the configmake module.
5267 * src/getargs.c: Include configmake.h.
5268 * src/main.c: Likewise.
5269 * src/output.c: Likewise.
5270 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
5271 not from $abs_top_builddir, since config.h moved.
5272
5273
4f82b42a
PE
5274 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
5275 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
5276
5277 * src/parse-gram.y (symbol_declaration): Don't put statements
5278 before declarations; it's not portable to C89.
5279 * src/scan-code.l (handle_action_at): Likewise.
5280
5281 * src/scan-code.l: Always initialize braces_level; the old code
5282 left it uninitialized and therefore had undefined behavior.
5283
5284 Don't attempt to redefine 'assert', since it runs afoul of
5285 systems where standard headers (mistakenly) include <assert.h>.
5286 Instead, define and use our own alternative, called 'aver'.
5287 * src/reader.c: Don't include assert.h, since we no longer
5288 use assert.
5289 * src/scan-code.l: Likewise.
5290 * src/system.h (assert): Remove, replacing with....
5291 (aver): New function, taking a bool arg. All uses changed.
5292 * src/tables.c (pack_vector): Ensure that aver arg is bool,
5293 not merely an integer.
5294
31c10e38
PE
52952006-09-15 Bob Rossi <bob@brasko.net>
5296
5297 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
5298 * data/c.m4 (YYPUSH): New.
5299 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
5300 * src/getargs.c (push_parser): New var.
5301 * src/getargs.h (push_parser): New declaration.
5302 * src/output.c (prepare): Add macro insertion of `push_flag'.
5303 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
5304 (prologue_declaration): Parse %push-parser.
5305 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
5306 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
5307 list of removed lines from the traces observed.
5308 (AT_CHECK_CALC_LALR): Added push parser tests.
5309
fa7b79c0
PE
53102006-09-13 Paul Eggert <eggert@cs.ucla.edu>
5311
21fe08ca
PE
5312 * NEWS: Version 2.3a.
5313 * configure.ac (AC_INIT): Likewise.
5314
e8ec4d9b
PE
5315 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
5316 "#define YYSTYPE int" that caused "make maintainer-check" to fail
5317 due to header ordering dependencies. I don't know why the #define
5318 was there.
5319
fa7b79c0
PE
5320 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
5321 runtime cost when YYDEBUG is not defined, and so that some tests
5322 that used to fail now work. Problem and initial suggestion by
5323 Paolo Bonzini.
5324 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
5325 * data/glr.cc (b4_parser_class_name):
5326 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
5327 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
5328 (yydebug_) [YYDEBUG]: New member.
5329 (yycdebug_): Now defined only if YYDEBUG.
5330 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
5331 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
5332 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
5333 if YYYDEBUG.
5334 (debug_stream, set_debug_stream, debug_level, set_debug_level):
5335 Define only if YYDEBUG.
5336 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
5337 set_debug_level.
5338 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
5339 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
5340 AT_CHECK_CALC_GLR_CC that are working now.
5341
4ec13d60
PE
53422006-09-12 Paul Eggert <eggert@cs.ucla.edu>
5343
5344 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
5345 We don't need them in glr.cc, and glr.c defines them.
5346 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
5347 assumes that defining it to anything is the same as defining
5348 it to 1. Problem reported by Paolo Bonzini.
5349
8e1687ae
PE
53502006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
5351
5352 * data/c.m4 (b4_null, b4_case): Define.
5353 * src/output.c (prepare_symbols): Use b4_null.
5354 (user_actions_output): Use b4_case.
5355
3dc5e96b
PE
53562006-09-11 Paul Eggert <eggert@cs.ucla.edu>
5357
aef3da86
PE
5358 * data/glr.c (b4_shared_declarations): Put start-header first,
5359 before any #includes that we generate, so that feature-test
5360 macros work. Problem reported by Michael Deutschmann in
5361 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
5362 * data/lalr1.cc: Likewise.
5363 * doc/bison.texinfo (Prologue): Document that feature-test macros
5364 should be defined before any Bison declarations.
5365 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
5366 that depend on location.hh after, not before, Bison decls, since
5367 we now include location.hh after the first user prologue.
5368
3dc5e96b
PE
5369 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
5370 Sander Brandenburg in
5371 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
5372 Also, fix minor white space and comment issues.
aef3da86
PE
5373 (Prologue): Mention that it's better to define feature-test macros
5374 before Bison declarations. Problem reported by Michael Deutschmann.
5375
5376 * README-cvs: Fix typo: "&" should be "&&". Problem reported
5377 by Jim Meyering.
5378 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
5379 This adjusts to recent gnulib changes.
3dc5e96b 5380
b2a0b7ca
JD
53812006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
5382
5383 Finish implementation of per-type %destructor/%printer. Discussed
5384 starting at
5385 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
5386 and
5387 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
5388 * NEWS (2.3+): Add a description of this feature to the default
5389 %destructor/%printer description.
5390 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
5391 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
5392 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
5393 list node contains a semantic type.
5394 * src/symtab.c, src/symtab.h: Extend with a table that associates
5395 semantic types with their %destructor's and %printer's.
5396 (semantic_type_from_uniqstr, semantic_type_get,
5397 semantic_type_destructor_set, semantic_type_printer_set): New functions
5398 composing the public interface of that table.
5399 (symbol_destructor_get, symbol_destructor_location_get,
5400 symbol_printer_get, symbol_printer_location_get): If there's no
5401 per-symbol %destructor/%printer, look up the per-type before trying
5402 the default.
5403 * tests/actions.at (Per-type %printer and %destructor): New test case.
5404 * tests/input.at (Default %printer and %destructor redeclared):
5405 Extend to check that multiple occurrences of %symbol-default in a
5406 single %destructor/%printer declaration is an error.
5407 (Per-type %printer and %destructor redeclared, Unused values with
5408 per-type %destructor): New test cases.
5409
3be03b13
JD
54102006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
5411
5412 Require default %destructor/%printer to be declared using
5413 %symbol-default instead of an empty symbol list, and start working on
5414 new per-type %destructor/%printer. Discussed at
5415 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
5416 * NEWS (2.3+): Add %symbol-default to example.
5417 * bison.texinfo (Freeing Discarded Symbols): Likewise.
148d66d8 5418 (Table of Symbols): Add entry for %symbol-default.
3be03b13
JD
5419 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
5420 (generic_symlist, generic_symlist_item): New nonterminals for creating
5421 a list in which each item is a symbol, semantic type, or
5422 %symbol-default.
5423 (grammar_declaration): Use generic_symlist in %destructor and %printer
5424 declarations instead of symbols.1 or an empty list.
5425 (symbol_declaration, precedence_declaration, symbols.1): Update actions
5426 for changes to symbol_list.
5427 * src/reader.c: Update for changes to symbol_list.
5428 * src/scan-code.l: Likewise.
5429 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
5430 * src/symlist.c, src/symlist.h: Extend such that a list node may
5431 represent a semantic type or a %symbol-default in addition to just an
5432 ordinary symbol. Add switched functions for setting %destructor's and
5433 %printer's.
5434 * tests/actions.at, tests/input.at: Add %symbol-default to all default
5435 %destructor/%printer declarations.
5436
3508ce36
JD
54372006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
5438
5439 Whether the default %destructor/%printer applies to a particular symbol
5440 isn't a question of whether the user *declares* that symbol (in %token,
5441 for example). It's a question of whether the user by any means
5442 *defines* the symbol at all (by simply using a char token, for
5443 example). $end is defined by Bison whereas any other token with token
5444 number 0 is defined by the user. The error token is always defined by
5445 Bison regardless of whether the user declares it with %token, but we
5446 may one day let the user define error as a nonterminal instead.
5447 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
5448 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
5449 the meaning of "user-defined".
5450 * tests/actions.at (Default %printer and %destructor for user-declared
5451 end token): Rename to...
5452 (Default %printer and %destructor for user-defined end token): ...
5453 this.
5454
5455 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
5456 computation of whether to apply the default, don't maintain a list of
5457 every Bison-defined symbol. Instead, just check for a first character
5458 of '$', which a user symbol cannot have, and check for the error token.
5459
9350499c
JD
54602006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
5461
5462 Don't apply the default %destructor or %printer to the error token,
5463 $undefined, or $accept. This change fits the general rule that the
5464 default %destructor and %printer are only for user-declared symbols,
5465 and it solves several difficulties that are described in the new test
5466 cases listed below.
5467 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
5468 * tests/actions.at (Default %printer and %destructor are not for error
5469 or $undefined, Default %printer and %destructor are not for $accept):
5470 New test cases.
5471
4d7370cb
JD
54722006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
5473
5474 Allow %start after the first rule.
5475 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
5476 when parsing the first rule.
5477 (check_and_convert_grammar): Search for it here after all grammar
5478 declarations have been parsed. Skip midrules, which have dummy LHS
5479 nonterminals.
5480 * src/symtab.c (symbol_is_dummy): New function.
5481 * src/symtab.h (symbol_is_dummy): Declare it.
5482 * tests/input.at (%start after first rule): New test.
5483
6d0ef4ec
JD
54842006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
5485
5486 Redo some of the previous commit: add back the ability to use
5487 non-aliased/undeclared string literals since it might be useful to
5488 those declaring %token-table.
5489 * src/reader.c (check_and_convert_grammar): Undo changes in previous
5490 commit: don't worry about complaints from symbols_pack.
5491 * src/symtab.c (symbol_new, symbol_class_set,
5492 symbol_check_alias_consistency): Undo changes in previous commit: count
5493 each string literal as a new symbol and token, assign it a symbol
5494 number, and don't complain about non-aliased string literals.
5495 (symbols_pack): Since symbol_make_alias still does not decrement symbol
5496 and token counts but does still set aliased tokens to the same number,
5497 symbol_pack_processor now leaves empty slots in the symbols array.
5498 Remove those slots.
5499 * tests/regression.at (Undeclared string literal): Remove test case
5500 added in previous commit since non-aliased string literals are allowed
5501 again.
5502 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
5503 remove unnecessary string literal declarations.
5504 * tests/sets.at (Firsts): Likewise.
5505
965537bc
JD
55062006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
5507
5508 Don't allow an undeclared string literal, but allow a string literal to
5509 be used before its declaration.
5510 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
5511 symbols_pack complained.
5512 * src/symtab.c (symbol_new): Don't count a string literal as a new
5513 symbol.
5514 (symbol_class_set): Don't count a string literal as a new token, and
5515 don't assign it a symbol number since symbol_make_alias does that.
5516 (symbol_make_alias): It's not necessary to decrement the symbol and
5517 token counts anymore. Don't assume that an alias declaration occurs
5518 before any uses of the identifier or string, and thus don't assert that
5519 one of them has the highest symbol number so far.
5520 (symbol_check_alias_consistency): Complain if there's a string literal
5521 that wasn't declared as an alias.
5522 (symbols_pack): Bail if symbol_check_alias_consistency failed since
5523 symbol_pack asserts that every token has been assigned a symbol number
5524 although undeclared string literals have not.
5525 * tests/regression.at (String alias declared after use, Undeclared
6d0ef4ec 5526 string literal): New test cases.
965537bc
JD
5527 (Characters Escapes, Web2c Actions): Declare string literals as
5528 aliases.
5529 * tests/sets.at (Firsts): Likewise.
5530
47aee066
JD
55312006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
5532
5533 In the grammar scanner, STRING_FINISH unclosed constructs and return
5534 them to the parser in order to improve error messages.
5535 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
5536 SC_BRACED_CODE, SC_PROLOGUE): Implement.
5537 * tests/input.at (Unclosed constructs): New test case.
5538 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
5539 seen.
5540
5541 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
5542 unused global.
5543
1f6b3679
JD
55442006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
5545
5546 Handle string aliases for character tokens correctly.
5547 * src/symtab.c (symbol_user_token_number_set): If the token has an
5548 alias, check and set its alias's user token number instead of its own,
5549 which is set to indicate the alias. Previously, every occurrence of
5550 the character token in the grammar overwrote that alias indicator with
5551 the character code.
5552 * tests/input.at (String aliases for character tokens): New test.
5553
219741d8
JD
55542006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
5555
5556 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
5557
11daa4e7
PE
55582006-08-11 Paul Eggert <eggert@cs.ucla.edu>
5559
5560 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
5561 to prevent failures when building on older platforms.
5562 Check for autopoint failure.
5563 Set XGETTEXT_OPTIONS to values that check for C format strings,
5564 so that translators are warned about them (this also helps
5565 prevent core dumps).
5566
5567 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
5568 function, since it simplifies our code a bit.
5569
5570 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
5571 rather than -W, so we don't get bogus warnings about sign comparisons.
5572 Add -Wpointer-arith, since that warning is useful (it reports code
5573 that does not conform to C89 and that some compilers reject).
5574 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
5575 since it's no longer needed.
5576
f9bfc42a
JD
55772006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
5578
5579 Clean up scanners a bit.
5580 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
5581 definitions so gcc won't warn when obstack_for_string is unused.
5582 * src/scan-code.l: config.h and system.h are already #include'd by
5583 scan-code-c.c, so get rid of them here.
5584 * src/scan-gram.l: Likewise.
5585 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
5586 definitions rather than duplicating the rest of it.
5587 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
5588
06e8700a
JD
55892006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
5590
5591 Suppress signed/unsigned comparison warnings for yycheck.
5592 * data/c.m4 (b4_safest_int_type): New macro.
5593 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
5594 a signed int type, cast it to b4_safest_int_type first.
5595 * data/yacc.c: Likewise.
5596 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
5597 also overwritten.
5598
9c437126
PE
55992006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
5600
5601 * doc/bison.texinfo: Fix some typos.
5602
284d8a13
PE
56032006-08-02 Paul Eggert <eggert@cs.ucla.edu>
5604
5605 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
5606 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
5607
5608 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
5609 the latest gnulib does this a different way.
5610 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
5611 translation was patched, so stop omitting it.
5612
ec5479ce
JD
56132006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
5614
5615 Enable declaration of default %printer/%destructor. Make the parser
5616 use these for all user-declared grammar symbols for which the user does
5617 not declare a specific %printer/%destructor. Thus, the parser uses it
5618 for token 0 if the user declares it but not if Bison generates it as
5619 $end. Discussed starting at
5620 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
5621 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
5622 and
5623 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
5624 * NEWS (2.3+): Mention.
5625 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
5626 declare a %destructor for a mid-rule's semantic value. It's just
5627 impossible to declare one specific to it.
5628 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
5629 code. Describe default %destructor form.
5630 * src/parse-gram.y (grammar_declaration): Parse default
5631 %printer/%destructor declarations.
5632 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
5633 and symbol_destructor_location_get rather than accessing the destructor
5634 and destructor_location members of struct symbol.
5635 (symbol_printers_output): Likewise but for %printer's.
5636 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
5637 again.
5638 * src/symtab.c (default_destructor, default_destructor_location,
5639 default_printer, default_printer_location): New static global
5640 variables to record the default %destructor and %printer.
5641 (symbol_destructor_get, symbol_destructor_location_get,
5642 symbol_printer_get, symbol_printer_location_get): New functions to
5643 compute the appropriate %destructor and %printer for a symbol.
5644 (default_destructor_set, default_printer_set): New functions to set the
5645 default %destructor and %printer.
5646 * src/symtab.h: Prototype all those new functions.
5647 * tests/actions.at (Default %printer and %destructor): New test to
5648 check that the right %printer and %destructor are called, that they're
5649 not called for $end, and that $$ and @$ work correctly.
5650 (Default %printer and %destructor for user-declared end token): New
5651 test to check that the default %printer and %destructor are called for
5652 a user-declared end token.
5653 * tests/input.at (Default %printer and %destructor redeclared, Unused
5654 values with default %destructor): New tests to check related grammar
5655 warnings and errors.
5656
868d2d96
JD
56572006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
5658
5659 Clean up handling of %destructor for the end token (token 0).
5660 Discussed starting at
5661 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
5662 and
5663 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
5664
5665 Make the skeletons consistent in how they pop the end token and invoke
5666 its %destructor.
5667 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
5668 state, which has token number 0, since this would invoke the
5669 %destructor for the end token.
5670 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
5671 until after shifting the end token, or else it won't be popped.
5672 * data/yacc.c (yyparse): Likewise.
5673
5674 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
5675 it's the end token. Upon termination, destroy an unshifted lookahead
5676 even when it's the end token.
5677 * data/lalr1.cc (yy::parser::parse): Likewise.
5678 * data/yacc.c (yyparse): Likewise.
5679
5680 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
5681 value warnings for the end token when the user gives the end token a
5682 %destructor.
5683
5684 * tests/actions.at (Printers and Destructors): Test all the above.
5685
62a9592d
PE
56862006-07-24 Paul Eggert <eggert@cs.ucla.edu>
5687
5688 Update to latest gnulib and gettext versions.
5689 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
5690 Add fopen-safer.
5691 (gnulib_files): Add m4/warning.m4. Don't worry about files
5692 overwritten by autopoint.
5693 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
5694 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
5695 rejects them.
5696 Don't use autoreconf; instead, invoke autopoint etc. by hand,
5697 so that we can remove the intl files at a better time.
5698 (intl_files_to_remove): Remove aclocal.m4, since it gets
5699 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
5700 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
5701 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
5702 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
5703 Remove datarootdir hack; no longer needed.
5704 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
5705 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
5706 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
5707 strdup.h.
5708 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
5709 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
5710
10d6970f
PE
57112006-07-20 Paul Eggert <eggert@cs.ucla.edu>
5712
5713 * bootstrap: Adjust to today's change to gnulib-tool by invoking
5714 it with --assume-autoconf='latest-stable'.
5715
50a33993
JD
57162006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
5717
5718 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
5719 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
5720 YYSTYPE' and `{'.
5721 * src/muscle_tab.h (muscle_grow): Replace the header comments with
5722 those from muscle_tab.c since the old ones are misleading.
5723
2ce4ed68
AD
57242006-07-13 Akim Demaille <akim@epita.fr>
5725
5726 Support %define "KEY" {VALUE}.
5727 * src/scan-code.h, src/scan-code.l (translate_action)
5728 (translate_rule_action, translate_symbol_action, translate_code):
5729 Return char *, not const char *.
5730 * src/parse-gram.y (declaration): Rename as...
5731 (prologue_declaration): this.
5732 (string_content): Remove this nonterminal, use STRING.
5733 (braceless, content, content.opt): New nonterminal.
5734 Use them.
5735 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
5736 as value.
5737 * src/scan-gram.l (getargs.h): Don't include it.
5738
db7e5eb5
PE
57392006-07-12 Paul Eggert <eggert@cs.ucla.edu>
5740
5741 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
5742 rather than a for-loop that declares a local bool variable. This
5743 should work around a compatibility problem with a Cray x1e C++
5744 compiler reported by Hung Nguyen in
5745 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
5746 The for-loop was introduced in the 2004-11-17 change but I don't
5747 know why it was needed.
5748
a5d80ba5
AD
57492006-07-12 Akim Demaille <akim@epita.fr>
5750
5751 * data/c.m4: Comment changes.
5752
23eb2a69
AD
57532006-07-10 Akim Demaille <akim@lrde.epita.fr>
5754
5755 * src/complain.c (error_message, ERROR_MESSAGE): New.
5756 To factor...
5757 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
5758 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
5759
ddc8ede1
PE
57602006-07-09 Paul Eggert <eggert@cs.ucla.edu>
5761
5762 * NEWS: Instead of %union, you can define and use your own union type
5763 YYSTYPE if your grammar contains at least one <type> tag.
5764 Your YYSTYPE need not be a macro; it can be a typedef.
5765 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
5766 (Union Decl, Decl Summary): Document this.
5767 * data/glr.c (YYSTYPE): Implement this.
5768 * data/glr.cc (YYSTYPE): Likewise.
5769 * data/lalr1.cc (YYSTYPE): Likewise.
5770 * data/yacc.c (YYSTYPE): Likewise.
5771 * src/output.c (prepare): Output tag_seen_flag.
5772 * src/parse-gram.y (declaration, grammar_declaration):
5773 Use 'union_seen' rather than 'typed' to determine whether
5774 %union has been seen, since grammars can now be typed without
5775 %union.
5776 (symbol_declaration, type.opt, symbol_def):
5777 Keep track of whether a tag has been seen.
5778 * src/reader.c (union_seen, tag_seen): New vars.
5779 (typed): remove.
5780 * src/reader.h (union_seen, tag_seen, typed): Likewise.
5781 * src/scan-code.l (untyped_var_seen): New variable.
5782 (handle_action_dollar): Adjust to above changes.
5783 (handle_action_dollar, handle_action_at):
5784 Improve overflow checking for outlandish numbers.
5785 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
5786 avoid new diagnostics generated by above changes.
5787 * tests/regression.at (YYSTYPE typedef): Add test to check
5788 for type tags without %union.
5789
5790 * src/symlist.c (symbol_list_length): Return int, not unsigned
5791 int, since callers expect int. This may need to get revisited
5792 once we have proper integer overflow checking.
5793
5794 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
5795 object is now static.
5796
5797 * src/getargs.c (flags_argmatch): Return void, not int,
5798 to pacify ./configure --enable-gcc-warnings.
5799
5800 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
5801 since last_string is already defined to FLEX_PREFIX (last_string).
5802
7b42569e
AD
58032006-07-09 Akim Demaille <akim@lrde.epita.fr>
5804
5805 Implement --warnings/-W.
5806 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
5807 replaced by...
5808 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
5809 Adjust callers.
5810 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
5811 (warnings_args, warnings_types): New.
5812 (getargs, short_options, long_options): Accept -W/--warnings.
5813 Sort the options by alphabetical order, upper case letter right
5814 before its lower case.
5815
3b452f4e
JD
58162006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
5817
5818 Change %merge result type clash warnings to errors. Discussed at
5819 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
5820 * src/reader.c (record_merge_function_type): Use complain_at.
5821 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
5822 declared later): Update test case results.
5823
b8a41559
AD
58242006-07-09 Akim Demaille <akim@lrde.epita.fr>
5825
5826 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
5827 to be in alphabetical order.
5828 (trace_args): Spelling fixes.
5829
cd9e1ba2
PE
58302006-07-09 Paul Eggert <eggert@cs.ucla.edu>
5831
5832 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
5833 so they don't collide with user-defined macros.
5834 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
5835 this was never guaranteed, and now that we're using gnulib stdint,
5836 which defines int_fast16_t to long int, the problem is exposed.
5837
cb48f191
PE
58382006-07-08 Paul Eggert <eggert@cs.ucla.edu>
5839
b8445a15
PE
5840 * data/c.m4 (b4_basename): Simplify a bit, since we don't
5841 need the full POSIX semantics (and weren't implementing them
5842 anyway).
5843
cb48f191
PE
5844 Adjust to Autoconf 2.60 and today's gnulib.
5845 * bootstrap (gnulib_modules): Add stdint.
5846 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
5847 no longer copies it.
5848 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
5849 since stdint needs the former and wcwidth (which is now required
5850 by mbswidth) needs the latter.
5851 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
5852 work around a compatibility glitch between gettext 0.14.6 and
5853 Autoconf 2.60.
5854 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
5855 Do not check for uintptr_t, since new stdint module does the right
5856 thing.
5857 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
5858 Add stdint.h, stdint_.h, wcwidth.h.
5859 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
5860 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
5861 stdint.m4, wchar_t.m4, wcwidth.m4.
5862 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
5863 usual order for ../lib/*.h files.
5864 (file_name_split): Use last_component, not base_name, to adjust
5865 to gnulib changes.
5866 * src/parse-gram.h: Include <strverscmp.h> in the usual order
5867 for ../lib/*.h files.
5868 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
5869 Define unconditionally, since we now assume the stdint module.
5870 * src/scan-skel.l: Include <dirname.h>.
5871 (BASE_QPUTS): Use last_component, not base_name.
5872 * src/system.h: Include <unlocked-io.h> in the usual order
5873 for ../lib/*.h files. Include <stdint.h> unconditionally,
5874 since we now use the stdint module.
5875 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
5876 HAVE_UINTPTR_T, since we now use the stdint module.
5877 (base_name): Remove decl, since files now include <dirname.h>
5878 to get the decl.
5879
cd48d21d
AD
58802006-07-08 Akim Demaille <akim@lrde.epita.fr>
5881
5882 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
5883 New, default to 1.
5884 * data/yacc.c, data/glr.c, data/location.cc: Use them.
5885 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
5886 default.
5887 * tests/calc.at: Adjust.
5888
8ec0a172
AD
58892006-07-08 Akim Demaille <akim@lrde.epita.fr>
5890
b8445a15 5891 * data/c.m4 (b4_basename): New.
8ec0a172
AD
5892 (b4_syncline): Also output the location of its invocation (from
5893 the skeleton).
5894 (b4_user_action, b4_define_user_action, b4_user_actions)
5895 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
5896 (b4_user_stype): New.
5897 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
5898
4a678af8
JD
58992006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
5900
5901 In the grammar file, the first column is 1 not 0 on the first line as
5902 on every other line.
5903 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
5904 * tests/input.at (Torturing the Scanner): Update output.
5905
5906 * src/scan-gram.l (scanner_cursor): Declare it static.
5907
dd60572a
JD
59082006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
5909
5910 In warnings, say "previous declaration" rather than "first
5911 declaration".
5912 * src/symtab.c (redeclaration): Do that here.
5913 * src/reader.c (record_merge_function_type): In the case of a result
5914 type clash, report the previous declaration rather than the very first
5915 one in the grammar file.
5916 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
5917 declared later): Add a third declaration to check this behavior.
5918 * tests/input.at (Incompatible Aliases): Update output.
5919
2073e1b6
AD
59202006-06-27 Akim Demaille <akim@epita.fr>
5921
5922 * doc/Doxyfile.in: New.
5923 * doc/Makefile.am: Use it.
5924 * src/lalr.h, src/symtab.h: Initial doxygenation.
5925
8ee5b538
JD
59262006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
5927
5928 Don't miss %merge result type warnings just because the LHS types are
fab044e6
JD
5929 declared after the %merge. This continues the effort of the previous
5930 patch.
8ee5b538
JD
5931 * src/reader.c (get_merge_function): Don't set the merger type yet.
5932 (record_merge_function_type): New function for setting the merger type
5933 and checking for clashes.
5934 (grammar_current_rule_merge_set): Set the location of the %merge for
5935 the current rule.
5936 (packgram): Invoke record_merge_function_type for each rule now that
5937 all symbol type declarations have been parsed.
5938 * src/reader.h (merger_list.type_declaration_location): New member
5939 storing the location of the first %merge from which the type for this
5940 merging function was derived.
5941 * src/symlist.h (symbol_list.merger_declaration_location): New member
5942 storing the location of a rule's %merge, if any.
5943 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
5944 declared later): New test to catch the error fixed by the above patch.
5945
ffa4ba3a
JD
59462006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
5947
5948 Get action warnings (grammar_rule_check) right even when symbol
fab044e6
JD
5949 declarations appear after the rules. Discussed at
5950 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
5951 and
5952 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
5953 Don't mistake the type of $$ in a midrule to be that of its parent
5954 rule's $$.
ffa4ba3a
JD
5955 * src/reader.c (grammar_current_rule_end): Don't invoke
5956 grammar_rule_check yet since not all symbol declarations may have been
5957 parsed yet.
5958 (grammar_midrule_action): Likewise.
5959 Don't record whether the midrule's $$ has been used yet since actions
5960 haven't been translated yet.
5961 Record the midrule's parent rule and its RHS index within the parent
5962 rule.
5963 (grammar_current_rule_action_append): Don't translate the action yet
5964 since not all symbol declarations may have been parsed yet and, thus,
5965 warnings about types for $$, $n, @$, and @n can't be reported yet.
5966 (packgram): Translate the action and invoke grammar_rule_check now that
5967 all symbol declarations have been parsed.
5968 * src/scan-code.l (handle_action_dollar): Now that this is invoked
5969 after parsing the entire grammar file, the symbol list here in the case
5970 of a midrule is actually the midrule's empty RHS, so reference its
5971 parent rule's RHS where necessary.
5972 On the other hand, now that you can already know it's a midrule, you
5973 aren't forced to think $$ has the same type as its parent rule's $$.
5974 (handle_action_at): In the case of a midrule, reference the parent rule
5975 where necessary.
5976 * src/symlist.c (symbol_list_new): Initialize new midrule-related
5977 members.
5978 (symbol_list_length): Now that this is invoked after all rules have
5979 been parsed, a NULL symbol (rather than a NULL symbol list node)
5980 terminates a rule. symbol_list_print already does this correctly.
5981 * src/symlist.h (symbol_list.midrule_parent_rule,
5982 symbol_list.midrule_parent_rhs_index): New members so that midrules can
5983 remember their relationships with their parents.
5984 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
5985 fixed by the above patch.
5986 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
5987 implementing...
5988 (Unused values): ... this old test case and...
5989 (Unused values before symbol declarations): ... this new test case.
5990 This one is the same as `Unused values' except that all symbol
5991 declarations appear after the rules in order to catch the rest of the
5992 errors fixed by the above patch.
5993
e256e17f
JD
59942006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
5995
300a1930
JD
5996 More cleanup.
5997 * src/reader.c (current_rule): Declare it static since it's no longer
5998 used outside this file.
5999 (grammar_current_rule_action_append): Remove redundant arguments from
6000 translate_rule_action invocation.
6001 * src/reader.h (current_rule): Remove this unused extern.
6002 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
6003 * src/scan-code.l (translate_rule_action): Likewise.
e256e17f 6004
381ecb06
JD
60052006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
6006
6007 Clean up yesterday's patch.
6008 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
6009 to...
6010 * src/reader.c (grammar_current_rule_action_append): ... here for
6011 consistency with grammar_current_rule_symbol_append.
6012 * tests/regression.at (Braced code in declaration in rules section):
6013 Make yyerror and yylex static as usual.
6014
4210cd0b
JD
60152006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
6016
6017 Fix bug that mistakes braced code in a declaration in the rules section
6018 to be a rule action. Mentioned at
6019 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
6020 * src/scan-gram.l: Move midrule action detection from the start of the
6021 scanning of any braced code to...
6022 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
6023 action. For readability, use $2 and @2 rather than the equivalent
6024 global variables.
6025 * tests/regression.at (Braced code in declaration in rules section):
6026 New test to catch the error fixed by the above patch.
6027
6028 Work on code readability some.
6029 * src/scan-code.l (current_rule): Get rid of this misleading and
6030 redundant declaration: it's actually extern'ed in reader.h.
6031 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
6032 translate_action): Add a rule argument and use it instead of the global
6033 current_rule.
6034 (translate_rule_action): This already receives current_rule through an
6035 argument, so pass it on to translate_action instead of assigning
6036 current_rule to current_rule.
6037 (translate_symbol_action, translate_code): Pass rule = NULL to
6038 translate_action.
6039
34f98f46
JD
60402006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
6041
6042 Rename %before-definitions to %start-header and %after-definitions to
6043 %end-header. Don't use these declarations to separate pre-prologue
6044 blocks from post-prologue blocks. Add new order-independent
6045 declarations %before-header and %after-header as alternatives to the
6046 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
6047 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
6048 * NEWS (2.3+): Update for these changes.
6049 * data/glr.c (b4_before_definitions): Update to...
6050 (b4_start_header): ... this.
6051 (b4_after_definitions): Update to...
6052 (b4_end_header): ... this.
6053 * data/glr.cc: Likewise.
6054 * data/lalr1.cc: Likewise.
6055 * data/yacc.c: Likewise.
6056 * doc/bison.texinfo (The prologue): Update names, and replace remaining
6057 prologue blocks with %*-header declarations.
6058 (Calc++ Parser): Likewise.
91661ebb 6059 (Decl Summary): Update names.
148d66d8 6060 (Table of Symbols): Update description.
34f98f46
JD
6061 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
6062 (PERCENT_END_HEADER): ... this.
6063 (PERCENT_BEFORE_DEFINITIONS): Update to...
6064 (PERCENT_START_HEADER): ... this.
6065 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
6066 (declaration): Update token names and m4 macro names.
6067 When parsing %end-header and %start-header, invoke translate_code
6068 before muscle_code_grow, and no longer set global booleans to remember
6069 whether these declarations have been seen.
6070 Parse new %after-header and %before-header.
6071 * src/reader.c (before_definitions, after_definitions): Remove.
6072 (prologue_augment): Accept a new bool argument to specify whether to
6073 augment the pre-prologue or post-prologue.
6074 * src/reader.h (before_definitions, after_definitions): Remove these
6075 extern's.
6076 (prologue_augment): Add new bool argument.
6077 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
6078 (PERCENT_END_HEADER): ... this.
6079 (PERCENT_BEFORE_DEFINITIONS): Update to...
6080 (PERCENT_START_HEADER): ... this.
6081 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
6082 * tests/actions.at (Printers and Destructors): Update names.
6083
31b2b07e
JD
60842006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
6085
6086 Add comparison operators for C++ location classes. Discussed at
6087 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
6088 * data/c++.m4 (b4_define_location_comparison): New boolean %define
6089 declaration indicating whether filename_type has an operator==. If
6090 filename_type is `std::string', it defaults to `1', `0' otherwise.
6091 * data/location.cc: Iff b4_define_location_comparison is `1', add
6092 operator== and operator!= for class position and for class location.
6093
6094 Some minor fixes.
6095 * src/scan-action.l: Remove unused file.
6096 * src/symtab.c (symbol_printer_set): Use printer_location not
6097 destructor_location.
6098 * src/symtab.h (struct symbol): Replace incorrect source comment for
6099 printer members.
6100 * tests/input.at (Incompatible Aliases): Update output with correct
6101 printer location.
6102
9bc0dd67
JD
61032006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
6104
6105 Don't put the pre-prologue in the header file. For the yacc.c code
6106 file and the glr.c header and code files, move the pre-prologue before
6107 the token definitions. Add new %before-definitions and
6108 %after-definitions to declare code that will go in both the header file
6109 and code file. Discussed at
6110 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
6111 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
6112 and
6113 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
6114 * NEWS (2.3+): Describe these changes.
6115 * data/glr.c (b4_pre_prologue): Move from within to before...
6116 (b4_shared_declarations): ... this.
6117 Add new b4_before_definitions before b4_token_enums.
6118 Add new b4_after_definitions at the end.
6119 * data/glr.cc (b4_pre_prologue): Replace with...
6120 (b4_before_definitions): ... this in the header file.
6121 (b4_after_definitions): New near the end of the header file.
6122 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
6123 code file right before including the header file.
6124 (b4_before_definitions): New in the previous position of
6125 b4_pre_prologue in the header file.
6126 (b4_after_definitions): New near the end of the header file.
6127 * data/yacc.c: Clean up some m4 quoting especially in the header file.
6128 (b4_token_enums_defines): In the code file, move to right before
6129 YYSTYPE for consistency with the header file.
6130 (b4_before_definitions): New right before b4_token_enums_defines in
6131 both the header and code file.
6132 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
6133 header and code file.
6134 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
6135 of prologues for %union dependencies.
91661ebb
JD
6136 (Decl Summary): In %defines description, mention the effect of
6137 %before-definitions and %after-definitions on the header file.
9bc0dd67
JD
6138 (Calc++ Parser): Forward declare driver in a %before-definitions rather
6139 than in the pre-prologue so that make check succeeds.
148d66d8 6140 (Table of Symbols): Add entries for %before-definitions and
9bc0dd67
JD
6141 %after-definitions.
6142 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
6143 %before-definitions.
6144 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
6145 (declaration): Parse those declarations and append to
6146 b4_before_definitions and b4_after_definitions, respectively.
6147 * src/reader.c (before_definitions, after_definitions): New bools to
6148 track whether those declarations have been seen.
6149 (prologue_augment): Add to the post-prologue if %union,
6150 %before-definitions, or %after-definitions has been seen.
6151 * src/reader.h (before_definitions, after_definitions): New extern's.
6152 * src/scan-gram.l: Scan the new declarations.
6153 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
6154 prologue block in a %before-definitions or a %after-definitions based
6155 on whether the %union is declared.
6156 * tests/regression.at (Early token definitions with --yacc, Early token
6157 definitions without --yacc): Move tests for token definitions into the
6158 post-prologue since token names are no longer defined in the
6159 pre-prologue.
6160
203b9274
AD
61612006-06-20 Akim Demaille <akim@epita.fr>
6162
6163 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
6164 (symbol_get): Use it.
6165 * src/parse-gram.y: Use it.
6166
a7ee59cf
JD
61672006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
6168
6169 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
6170 build succeeds when configured with --enable-gcc-warnings.
6171
5a2baae7
PE
61722006-06-19 Paul Eggert <eggert@cs.ucla.edu>
6173
33ad1a9c
PE
6174 * src/parse-gram.y (char_name): New function.
6175 (CHAR, STRING, string_content): For %printer, properly escape.
6176 (ID): Prefer fputs to fprintf.
6177 (id): Reindent to be consistent with other rules.
6178 Properly quote char.
6179
5a2baae7
PE
6180 The Translation Project changed its way of publishing translations
6181 to maintainers. I haven't received any responses to my request
6182 for supporting the old way, or for documenting the new way. I
6183 have modified 'bootstrap' to use screen scraping
6184 (in this case, HTML scraping). This is unreliable and inelegant,
6185 but I don't see any better way. Yuck.
6186 * bootstrap (TP_URL, WGET_COMMAND): New vars.
6187 (get_translations): New function, which uses HTML scraping to
6188 deduce locations of latest translations.
6189 Use this function to grab both bison and bison-runtime .po files.
6190 Don't bother priming the pump for the runtime-po domain any more,
6191 as it's now translated better than bison is.
6192
58d7a1a1
AD
61932006-06-19 Akim Demaille <akim@epita.fr>
6194
6195 * src/scan-gram.l: No longer "parse" things after `%union' until
6196 `{'. Rather, return a single "%union" token.
6197 No longer make symbols: return strings, and leave the conversion
6198 to symbols to the parser.
6199 (SC_PRE_CODE, token_type): Remove.
6200 * src/parse-gram.y (%union): New field `character'.
6201 Sort tokens.
6202 (CHAR): New token.
6203 (ID, ID_COLON): Now that the scanner no longer makes them
6204 identifiers, adjust all uses to invoke symbol_get.
6205 (id_colon): New, wraps the conversion from string to symbol.
6206 (%union): Accept a possible union_name.
6207 (symbol): Now can be a char.
6208 * data/c.m4 (b4_union_name): Leave a default value.
6209 * data/glr.c, data/yacc.c: Use it.
6210
b931235e
JD
62112006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
6212
6213 For associating token numbers with token names for "yacc.c", don't use
6214 #define statements unless `--yacc' is specified; always use enum
6215 yytokentype. Most important discussions start at:
6216 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
6217 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
6218 and
6219 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
6220 * NEWS (2.3+): Mention.
6221 * data/c.m4 (b4_yacc_if): New.
6222 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
6223 token #define's.
6224 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
6225 on token name definitions.
6226 * src/getargs.c (usage): Capitalize `Yacc' in English.
6227 * src/output.c (prepare): Define b4_yacc_flag.
6228 * tests/regression.at (Early token definitions): Test that tokens names
6229 are defined before the pre-prologue not just before the post-prologue.
6230 Remove this test case and copy to...
6231 (Early token definitions with --yacc): ... this to test #define's.
6232 (Early token definitions without --yacc): ... and this to test enums.
6233
9e6e7ed2
PE
62342006-06-11 Paul Eggert <eggert@cs.ucla.edu>
6235
6236 * NEWS: Reword the post-2.3 change to not be so optimistic about
6237 removing the old "look-ahead" spelling.
6238 Update previous look-ahead/lookahead change reports.
6239 * REFERENCES: look-ahead -> lookahead (since that's
6240 what he actually wrote).
6241 * doc/refcard.tex: look ahead -> lookahead,
6242 look-ahead -> lookahead
6243
742e4900
JD
62442006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
6245
6246 For consistency, use `lookahead' instead of `look-ahead' or
6247 `look_ahead'. Discussed starting at
6248 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
6249 and then at
6250 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
6251 * NEWS: For the next release, note the change to `--report'.
6252 * TODO, doc/bison.1: Update English.
6253 * doc/bison.texinfo: Update English.
6254 (Understanding Your Parser, Bison Options): Document as
6255 `--report=lookahead' rather than `--report=look-ahead'.
6256 * src/conflicts.c: Update English in comments.
6257 (lookahead_set): Rename from look_ahead_set.
6258 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
6259 (resolve_sr_conflict): Rename local look_ahead_tokens to
6260 lookahead_tokens, and update other uses.
6261 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
6262 count_rr_conflicts, conflicts_free): Update uses.
6263 * src/getargs.c (report_args): Move "lookahead" before alternate
6264 spellings.
6265 (report_types): Update uses.
6266 (usage): For `--report' usage description, state `lookahead' spelling
6267 rather than `look-ahead'.
6268 * src/getargs.h (report.report_lookahead_tokens): Rename from
6269 report_look_ahead_tokens.
6270 * src/lalr.c: Update English in comments.
6271 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
6272 (state_lookahead_tokens_count): Rename from
6273 state_look_ahead_tokens_count.
6274 Rename local n_look_ahead_tokens to n_lookahead_tokens.
6275 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
6276 Rename local n_look_ahead_tokens to n_lookahead_tokens.
6277 Update other uses.
6278 Update English in output.
6279 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
6280 * src/print.c: Update English in comments.
6281 (lookahead_set): Rename from look_ahead_set.
6282 (print_reduction): Rename argument lookahead_token from
6283 look_ahead_token.
6284 (print_core, state_default_rule, print_reductions, print_results):
6285 Update uses.
6286 * src/print_graph.c: Update English in comments.
6287 (print_core): Update uses.
6288 * src/state.c: Update English in comments.
6289 (reductions_new): Update uses.
6290 (state_rule_lookahead_tokens_print): Rename from
6291 state_rule_look_ahead_tokens_print, and update other uses.
6292 * src/state.h: Update English in comments.
6293 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
6294 (state_rule_lookahead_tokens_print): Rename from
6295 state_rule_look_ahead_tokens_print.
6296 * src/tables.c: Update English in comments.
6297 (conflict_row, action_row): Update uses.
6298 * tests/glr-regression.at
6299 (Incorrect lookahead during deterministic GLR,
6300 Incorrect lookahead during nondeterministic GLR): Rename
6301 print_look_ahead to print_lookahead.
6302 * tests/torture.at: Update English in comments.
6303 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
6304 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
6305 (Many lookahead tokens): Update uses.
6306 * data/glr.c: Update English in comments.
6307 * lalr1.cc: Likewise.
6308 * yacc.c: Likewise.
6309 * src/conflicts.h: Likewise.
6310 * src/lalr.h: Likewise.
6311 * src/main.c: Likewise.
6312 * src/output.c: Likewise.
6313 * src/parse-gram.c: Likewise.
6314 * src/tables.h: Likewise.
6315 * tests/calc.at: Likewise.
6316
3c40d0b5
JD
63172006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
6318
6319 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
6320
5d278082
PE
63212006-06-07 Paul Eggert <eggert@cs.ucla.edu>
6322
6323 * TODO: Add request from Nelson H. F. Beebe to be able to install
6324 Bison without installing the yacc script.
6325
9e668899
JD
63262006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
6327
6328 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
6329 and yytext if they're already #define'd.
6330 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
6331 * src/scan-code-c.c: ... here.
6332 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
6333 <config.h>.
6334
0c8e079f
JD
63352006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
6336
6337 Get Bison to build again when configured with --enable-gcc-warnings.
6338 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
6339 missing #include's.
6340 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
6341 loc argument as it shadows a global.
6342 * src/scan-gram.l: Remove stray comma that prevents boundary_set
6343 invocation.
6344
6345 * src/.cvsignore: Add scan-code.c.
6346
2346344a
AD
63472006-06-07 Akim Demaille <akim@epita.fr>
6348
6349 * src/scan-gram.l: Move the "add a trailing ; to actions" code
6350 to...
6351 * src/scan-code.l: here.
6352 * tests/input.at (Torturing the Scanner): Fix another location
6353 error.
6354
4862bdfd
AD
63552006-06-07 Akim Demaille <akim@epita.fr>
6356
6357 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
6358
e9071366
AD
63592006-06-06 Akim Demaille <akim@epita.fr>
6360
6361 Extract the parsing of user actions from the grammar scanner.
6362 As a consequence, the relation between the grammar scanner and
6363 parser is much simpler. We can also split "composite tokens" back
6364 into simple tokens.
6365 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
6366 * src/scan-gram.l (add_column_width, adjust_location): Move to and
6367 rename as...
6368 * src/location.h, src/location.c (add_column_width)
6369 (location_compute): these.
6370 Fix the column count: the initial column is 0.
6371 (location_print): Be robust to ending column being 0.
6372 * src/location.h (boundary_set): New.
6373 * src/main.c: Adjust to scanner_free being renamed as
6374 gram_scanner_free.
6375 * src/output.c: Include scan-code.h.
6376 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
6377 Use boundary_set.
6378 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
6379 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
6380 which is now, again, a separate token.
6381 Adjust all dependencies.
6382 Whereever actions with $ and @ are used, use translate_code.
6383 (action): Remove this nonterminal which is now useless.
6384 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
6385 (grammar_current_rule_action_append): Use translate_code.
6386 (packgram): Bound check ruleno, itemno, and rule_length.
6387 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
6388 (last_string, last_braced_code_loc, max_left_semantic_context)
6389 (scanner_initialize, scanner_free, scanner_last_string_free)
6390 (gram_out, gram_lineno, YY_DECL_): Move to...
6391 * src/scan-gram.h: this new file.
6392 (YY_DECL): Rename as...
6393 (GRAM_DECL): this.
6394 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
6395 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
6396 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
6397 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
6398 Move these declarations, and...
6399 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
6400 these to...
6401 * src/flex-scanner.h: this new file.
6402 * src/scan-gram.l (rule_length, rule_length_overflow)
6403 (increment_rule_length): Remove.
6404 (last_braced_code_loc): Rename as...
6405 (gram_last_braced_code_loc): this.
6406 Adjust to the changes of the parser.
6407 Move all the handling of $ and @ into...
6408 * src/scan-code.l: here.
6409 * src/scan-gram.l (handle_dollar, handle_at): Remove.
6410 (handle_action_dollar, handle_action_at): Move to...
6411 * src/scan-code.l: here.
6412 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
6413 scan-code.h, scan-code-c.c, scan-gram.h.
6414 (EXTRA_bison_SOURCES): Add scan-code.l.
6415 (BUILT_SOURCES): Add scan-code.c.
6416 (yacc): Be robust to white spaces.
6417
6418 * tests/conflicts.at, tests/input.at, tests/reduce.at,
6419 * tests/regression.at: Adjust the column numbers.
6420 * tests/regression.at: Adjust the error message.
7891a7c4 6421
184e42f0
JD
64222006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
6423
6424 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
6425 Use Akim's wording from
6426 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
6427
7891a7c4
JD
64282006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
6429
6430 Between Bison releases, manually append `+' to the previous Bison
6431 release number, and use that as a signal to automatically print the
6432 ChangeLog's CVS Id keyword from --version. Discussed starting at
6433 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
6434 * ChangeLog: Add Id header.
6435 * configure.ac (AC_INIT): Append `+' to `2.3'.
6436 * src/.cvsignore: Add revision.c.
6437 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
6438 (BUILT_SOURCES): Add revision.c.
6439 (revision.c): New target rule. This file defines a new global variable
6440 named revision. It initializes it with either the Id from ChangeLog
6441 or, if VERSION doesn't contain `+', with the empty string.
6442 * src/getargs.c (version): Print the value of revision.
6443 * src/revision.h: Extern revision.
6444
4ad3ed84
PE
64452006-06-05 Paul Eggert <eggert@cs.ucla.edu>
6446
6447 * NEWS: Version 2.3.
6448 * configure.ac (AC_INIT): Likewise.
6449
02103984
PE
64502006-05-30 Paul Eggert <eggert@cs.ucla.edu>
6451
6452 * data/glr.c (YYRECOVERING): Define to be a function-like macro
6453 with no arguments, not as an object-like macro. This is for
6454 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
6455 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
6456 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
6457 Document this.
6458
2c08afa5
JD
64592006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
6460
6461 * src/getargs.c (usage): Back out yesterday's modification of the
6462 --help output so that we don't have to wait for translation before
6463 releasing 2.3.
6464
6077da58
PE
64652006-05-29 Paul Eggert <eggert@cs.ucla.edu>
6466
6467 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
6468 Problem reported by Akim Demaille.
6469
2a26b6c2
JD
64702006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
6471
6472 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
6473
aefef0d6
PE
64742006-05-26 Paul Eggert <eggert@cs.ucla.edu>
6475
6476 * data/yacc.c (yy_reduce_print): Omit trailing white space in
6477 generated source code. Problem reported by Frans Englich in
6478 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
6479
fcd8e201
PE
64802006-05-22 Paul Eggert <eggert@cs.ucla.edu>
6481
6482 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
6483 shell, not within 'make', so that 'make' by an ordinary builder
6484 (using GNU make) does not worry about configuring gzip. This also
6485 works around a bug reported independently by Keith Thompson and by
6486 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
6487 stderr rather than stdout, messing up the build logs.
6488
7b5cdcbd
JD
64892006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
6490
6491 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
6492 to make sure that YYID will never be unused. This fixes a 'make
6493 maintainer-check' failure caused by the recent changes to the 'Trivial
6494 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
6495 not used.
6496 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
6497
5ad0a449
JD
64982006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
6499
6500 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
6501 state before an empty RHS is always resolved here. Only the location
6502 of that state is guaranteed to be resolved, and that's enough. This
6503 fixes the remaining bug reported by Derek M. Jones in
6504 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
6505 * tests/glr-regression.at (Uninitialized location when reporting
6506 ambiguity): Test the above case.
6507 Also, the embedded comments in this test case claim it checks the case
6508 of an empty RHS that has inherited the initial location. However, the
6509 corresponding LHS was already resolved, so yyresolveLocations didn't
6510 actually have reason to modify it. Fix this by forcing
6511 nondeterministic operation at the beginning of the parse.
6512
50cce58e
PE
65132006-05-20 Paul Eggert <eggert@cs.ucla.edu>
6514
6515 * data/c.m4 (b4_yy_symbol_print_generate):
6516 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
6517 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
6518 of the bugs reported today by Derek M Jones in
6519 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
6520 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
6521 defined to be a type name without parens or brackets.
6522 (Location Type): Similarly for YYLTYPE.
6523 * tests/regression.at (Trivial grammars): Put in a test for this
6524 bug that will be caught by 'make maintainer-check' (though not,
6525 alas, by 'make check' unless your compiler is picky).
6526
ab8d9dc5
PE
65272006-05-19 Paul Eggert <eggert@cs.ucla.edu>
6528
0d2c8934 6529 * NEWS: Version 2.2.
ab8d9dc5
PE
6530 * configure.ac (AC_INIT): Likewise.
6531
9138c575
JD
65322006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
6533
6534 * data/glr.c (yyreportTree): Make room in yystates for the state
6535 preceding the RHS. This fixes the segmentation fault reported by Derek
6536 M. Jones in
6537 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
6538 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
6539 to the user. Reported for yyreportTree by Derek M. Jones later in the
6540 same thread.
6541 * THANKS: Add Derek M. Jones.
6542 Update my email address.
6543 Fix typo in Steve Murphy's name.
6544
276f48df
PE
65452006-05-14 Paul Eggert <eggert@cs.ucla.edu>
6546
d6645148
PE
6547 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
6548 checking against YYLAST that caused the parser to miss a potential
6549 alternative in its diagnostic.
6550 Problem reported by Maria Jose Moron Fernandez in
6551 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
6552 * data/lalr1.cc (yysyntax_error_): Likewise.
6553 * data/yacc.c (yysyntax_error): Likewise.
6554 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
6555 tokens, in case we run into an older C compiler.
6556 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
6557 Use them to check for the off-by-one error fixed above.
6558
276f48df
PE
6559 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
6560 YYSIZE_T, not size_t.
6561 * tests/regression.at (Trivial grammars): New test, to catch
6562 the error fixed by the above patch.
6563
cd8b5791
AD
65642006-05-14 Akim Demaille <akim@lrde.epita.fr>
6565
6566 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
6567 scheme.
6568 Reported by Steve Murphy.
6569
34376418
AD
65702006-05-14 Akim Demaille <akim@lrde.epita.fr>
6571
6572 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
6573 * data/glr.cc: b4_location_flag is now b4_locations_flag.
6574
327afc7c
AD
65752006-05-14 Akim Demaille <akim@lrde.epita.fr>
6576
6577 Implement --trace=m4.
6578 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
6579 * src/output.c (output_skeleton): When set, pass -dV to m4.
6580
6581 Factor the handling of flags in m4.
6582 * src/output.c (prepare): Rename the muscle names debug, defines,
6583 error_verbose to debug_flag, defines_flag, error_verbose_flag.
6584 * data/c.m4: Adjust.
6585 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
6586 Use b4_define_flag_if to define other b4_FLAG_if macros.
6587 (b4_location_if): As a consequence, rename as...
6588 (b4_locations_if): this, for consistency.
6589 Adjust all the skeletons.
6590
ba9ecd19
AD
65912006-05-14 Akim Demaille <akim@lrde.epita.fr>
6592
6593 * etc/bench.pm: Shorten bench names.
6594
4e83ea15
AD
65952006-05-14 Akim Demaille <akim@lrde.epita.fr>
6596
6597 * src/output.h, src/output.c (error_verbose): Move to...
6598 * src/getargs.h, src/getargs.c: here.
6599 Sort the flags.
6600 Adjust dependencies.
6601
6e93d810
PE
66022006-05-13 Paul Eggert <eggert@cs.ucla.edu>
6603
6604 * data/c.m4 (b4_copyright): Put the special exception for Bison
6605 skeletons here, so we don't have to put it in each skeleton. All
b15296ff
PE
6606 uses changed. Suggested by Akim Demaille. Also, wrap the
6607 copyright notice, in case it is longer than 80 columns. Replace
6608 comma by newline after title.
6e93d810 6609
eaea13f5
PE
66102006-05-11 Paul Eggert <eggert@cs.ucla.edu>
6611
6612 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
6613 incompatibility, not a bug. Mention that it wasn't fixed as of
6614 flex 2.5.33.
6615
3cf084ec
AD
66162006-05-11 Akim Demaille <akim@lrde.epita.fr>
6617
6618 * examples/extexi: Enforce the precedence of concatenation over
6619 >>.
0a9f1c7d 6620 Reported by Tommy Nordgren.
3cf084ec 6621
32c96bd7
AD
66222006-05-11 Akim Demaille <akim@lrde.epita.fr>
6623
6624 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
6625 with the member "token".
f94705b2 6626 Reported by Martin Nylin.
32c96bd7 6627
eaea13f5
PE
66282006-05-08 Paul Eggert <eggert@cs.ucla.edu>
6629
6630 * data/glr.c: Switch to Bison 2.2 special-exception language in
6631 the copyright notice. Use more-regular format for titles and
6632 copyright notices.
6633 * data/glr.cc: Likewise.
6634 * data/location.cc: Likewise.
6635 * data/yacc.cc: Likewise.
6636 * doc/bison.texinfo (Conditions): Document this.
6637 * NEWS: likewise. Upgrade version to 2.2.
6638
6e2d1146
AD
66392006-04-27 Akim Demaille <akim@lrde.epita.fr>
6640
6641 * data/glr.cc: Remove dead code.
6642
47671055
PE
66432006-04-25 Paul Eggert <eggert@cs.ucla.edu>
6644
6645 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
6646 that variable and the line breaks the bootstrap. Problem reported
6647 by Juan M. Guerrero.
6648
ed2e6384
AD
66492006-04-24 Akim Demaille <akim@lrde.epita.fr>
6650
6651 * doc/bison.texinfo (Multiple start-symbols): New.
6652
3cedc2dc
AD
66532006-04-24 Akim Demaille <akim@lrde.epita.fr>
6654
6655 * etc/README, etc/bench.pl: New.
6656
b2ddc3f3
AD
66572006-04-03 Akim Demaille <akim@lrde.epita.fr>
6658
6659 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
6660 rule.
6661 Reported by Mickael Labau.
6662 * tests/input.at (Torturing the Scanner): Test it.
6663
91e3ac9a
PE
66642006-03-16 Paul Eggert <eggert@cs.ucla.edu>
6665
6666 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
6667 Problem reported by Bob Rossi.
6668
66692006-03-13 Paul Eggert <eggert@cs.ucla.edu>
6670
6671 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
6672 and didn't really work.
6673 For the index, use @ifnotinfo, not @iftex.
6674 Minor cleanups of spacing and terminology.
6675
5cf61e93
AD
66762006-03-12 Akim Demaille <akim@lrde.epita.fr>
6677
6678 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
6679 of AT_NAME_PREFIX when %name-prefix is not used.
6680
aa08666d
AD
66812006-03-12 Akim Demaille <akim@lrde.epita.fr>
6682
6683 Apply --prefix to C++ skeletons too: they change the namespace.
6684 The test suite already exercize these cases.
6685 * data/c++.m4 (b4_namespace): New.
6686 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
6687 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
6688 * data/yacc.c, data/glr.c: Remove a useless `[]'.
6689 * doc/bison.texinfo: Document it.
6690 (Option Cross Key): Use @multitable in all formats. It looks
6691 nicer, even in TeX outputs.
6692 (Rules): Use the same code whatever the output type is.
6693 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
6694 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
6695 * tests/calc.at: Use it, instead of hard coding `yy'.
91e3ac9a 6696
45567173
AD
66972006-03-10 Akim Demaille <akim@lrde.epita.fr>
6698
6699 * TODO: Remove dead items.
6700
e9d8f881 67012006-03-10 Akim Demaille <akim@lrde.epita.fr>
55ba27be
AD
6702
6703 * doc/FAQ: Remove, merged into...
6704 * doc/bison.texinfo (FAQ): this.
6705 * doc/Makefile.am (EXTRA_DIST): Adjust.
6706
c095d689
AD
67072006-03-10 Akim Demaille <akim@lrde.epita.fr>
6708
6709 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
6710 even if empty.
6711 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
6712 * doc/bison.texinfo (Calc++ Scanner): Use it.
6713
6e0f8287
PE
67142006-03-09 Paul Eggert <eggert@cs.ucla.edu>
6715
6716 Fix two nits reported by twlevo, plus one more that I discovered.
6717
6718 * src/assoc.h (assoc_to_string): Give a name to the arg, as
6719 this is the usual Bison style.
6720 * src/location.h (location_print): Likewise.
6721
6722 * src/reader.h (token_name): Likewise.
6723
d6b771c3
PE
67242006-03-08 Paul Eggert <eggert@cs.ucla.edu>
6725
6726 Fix some nits reported by twlevo.
6727 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
6728 and "POSIX". Use more-modern syntax for URLs. Mention C++
6729 and ask for Java. Don't hardwire OS version numbers. Add
6730 copyright notice.
6731 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
6732 * src/conflicts.c (solved_conflicts_obstack): Now static.
6733
1e137b71
JD
67342006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
6735
6736 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
6737 page. Say "you can use it" not "you may use it" as on the web page;
6738 we're describing capabilities not granting permission.
6739
73f2e47e
PE
67402006-03-06 Paul Eggert <eggert@cs.ucla.edu>
6741
6d05403d
PE
6742 * data/glr.c (yyresolveLocations): Rename local variables to avoid
6743 shadowing warnings. Use usual patter for iterating through RHS.
6744 * tests/glr-regression.at
6745 (Uninitialized location when reporting ambiguity):
6746 Modify yylex so that it uses its argument, rather than trying
6747 to rely on ARGSUSED (which doesn't work for gcc with warnings).
6748 const char -> char const.
6749
73f2e47e
PE
6750 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
6751 Don't use tabs inside commands; it messes up 'ps'.
6752 Problem reported by twlevo.
6753
8710fc41
JD
67542006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
6755
6756 * tests/glr-regression.at (Uninitialized location when reporting
6757 ambiguity): New test case.
6758 * data/glr.c (yyresolveLocations): New function, which uses
6759 YYLLOC_DEFAULT.
6760 (yyresolveValue): Invoke yyresolveLocations before reporting an
6761 ambiguity.
6762 * doc/bison.texinfo (Default Action for Locations): Note
6763 YYLLOC_DEFAULT's usage for ambiguity locations.
6764 (GLR Semantic Actions): Cross-reference those notes.
6765
ae952af2
JD
67662006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
6767
6768 * tests/glr-regression.at (Leaked semantic values when reporting
6769 ambiguity): Remove unnecessary union and type declarations.
6770 (Leaked lookahead after nondeterministic parse syntax error): New test
6771 case.
6772 * data/glr.c (yyparse): Check for zero stacks remaining before
6773 attempting to shift the lookahead so that you don't lose it.
6774
35ee866a
JD
67752006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
6776
6777 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
6778 * tests/glr-regression.at (Leaked semantic values when reporting
6779 ambiguity): New test case.
6780 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
6781 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
6782 now unnecessary yystackp parameter.
6783 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
6784 destructors can be called.
6785
6786 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
6787 in existing testcases.
6788
520181ab
JD
67892006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
6790
6791 Don't leak semantic values for parent RHS when a user action cuts the
6792 parser, and clean up related code a bit.
6793 * tests/glr-regression.at (Leaked merged semantic value if user action
35ee866a
JD
6794 cuts parse): Rename to...
6795 (Leaked semantic values if user action cuts parse): ... this. Add check
520181ab
JD
6796 for leaked parent RHS values.
6797 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
6798 between an unresolved state (non-empty chain of semantic options) and
6799 an incomplete one (signaled by an empty chain).
ae952af2 6800 (yyresolveStates): Document the interface. Move all manipulation of a
520181ab
JD
6801 successfully or unsuccessfully resolved yyGLRState to...
6802 (yyresolveValue): ... here so that yyresolveValue always leaves a
6803 yyGLRState with consistent data and thus is easier to understand.
6804 Remove the yyvalp and yylocp parameters since they are always just
6805 taken from the yys parameter. When reporting a discarded merged value
6806 in debugging output, note that it is incompletely merged. Document the
6807 interface.
6808 (yyresolveAction): If resolving any of the RHS states fails, destroy
6809 them all rather than leaking them. Thus, as long as user actions are
6810 written to clean up the RHS correctly, yyresolveAction always cleans up
6811 the RHS of a semantic option. Document the interface.
6812
18d9185c
PE
68132006-02-27 Paul Eggert <eggert@cs.ucla.edu>
6814
6815 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
6816 led to a segmentation fault in GNU Pascal. Problem reported
6817 by Waldek Hebisch.
6818
841a7737
JD
68192006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
6820
6821 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
6822 mid-rule action inside a nonterminal symbol in order to declare a
6823 destructor for its semantic value.
6824
fc3f467f
PE
68252006-02-16 Paul Eggert <eggert@cs.ucla.edu>
6826
6827 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
6828 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
6829 __cplusplus && ! defined _STDLIB_H && !
6830 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
6831 defined free))]: Include <stdlib.h> rather than rolling our own
6832 declarations of malloc and free, to avoid problems with
6833 incompatible declarations (using 'throw') C++'s stdlib.h. This
6834 should fix Debian bug 340012
6835 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
6836 reported by Guillaume Melquiond.
6837
a3af26dd
PE
68382006-02-13 Paul Eggert <eggert@cs.ucla.edu>
6839
4d7bc38c
PE
6840 * NEWS: Clarify symbols versus types in unused-value warnings.
6841
a3af26dd
PE
6842 * configure.ac (AC_INIT): Bump version number.
6843
4e26c69e
PE
68442006-02-13 Paul Eggert <eggert@cs.ucla.edu>
6845
6846 * NEWS: Version 2.1a.
6847 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
6848 since C99 requires this.
6849
498e897c
PE
68502006-02-11 Paul Eggert <eggert@cs.ucla.edu>
6851
6852 * m4/c-working.m4: New file.
6853 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
6854
57bb17ca
PE
68552006-02-10 Paul Eggert <eggert@cs.ucla.edu>
6856
6857 * Makefile.maint: Merge from coreutils.
6858
0be105dc
PE
68592006-02-09 Paul Eggert <eggert@cs.ucla.edu>
6860
6861 More portability fixes for problems summarized by Nelson H. F. Beebe.
6862
6863 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
6864 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
6865 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
6866 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
6867 messes up because C++ code is compiled in 32-bit mode but linked
6868 in 64-bit mode.
6869
6fc0c024
PE
68702006-02-08 Paul Eggert <eggert@cs.ucla.edu>
6871
6872 More portability fixes for problems summarized by Nelson H. F. Beebe.
6873
7870f699
PE
6874 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
6875 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
6876
6fc0c024
PE
6877 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
6878 nodist_PROGRAMS, since we don't need to actually compile the
6879 example if we're just doing a plain 'make'. This avoids bothering
6880 the installer unnecessarily about problems due to weird C++
6881 compilers.
6882
fe6c2fde
PE
68832006-02-06 Paul Eggert <eggert@cs.ucla.edu>
6884
6885 More portability fixes for problems summarized by Nelson H. F. Beebe.
6886
6887 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
6888 than #include "...", and compile with -I'.'. The old method was
6889 not portable, according to Posix and the C standard, and it does
6890 not work with Sun C 5.7, where previous #line directives affect
6891 the working directory used in later #include "..." directives.
6892
927b425b
JMG
68932006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6894
6895 Various DJGGP specific issues in /djgpp
6896
d9735e9e
PE
68972006-02-02 Paul Eggert <eggert@cs.ucla.edu>
6898
6899 More portability fixes for problems summarized by Nelson H. F. Beebe.
6900
6901 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
6902 '#include <map>' works and that you can apply ++ to iterators.
6903
5a6755af
PE
69042006-02-01 Paul Eggert <eggert@cs.ucla.edu>
6905
67a0dc4f
PE
6906 Work around portability problems summarized by Nelson H. F. Beebe in
6907 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
6908
8c86f0ef
PE
6909 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
6910 that '#include <string>' works.
6911
de35dd59
PE
6912 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
6913 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
6914 "warning: sorry: semantics of inline function static data `const
6915 unsigned char translate_table[262]' are wrong (you'll wind up with
6916 multiple copies)".
6917
67a0dc4f
PE
6918 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
6919 or, xor to not_, and_, or_, and xor_, respectively. This works
6920 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
6921 random system header somewhere that includes the equivalent of
6922 <iso646.h>.
6923
5a6755af
PE
6924 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
6925 -E" works; it apparently doesn't work with PathScale EKO Compiler
67a0dc4f 6926 Suite Version 2.0.
5a6755af 6927
3f001415
JD
69282006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
6929
6930 During deterministic GLR operation, user actions should be able to
6931 influence the parse by changing yychar. To make this easier to fix and
6932 to make glr.c easier to evolve in general, don't maintain yytoken in
6933 parallel with yychar; just compute yytoken when needed.
6934 * tests/glr-regression.at (Incorrect lookahead during deterministic
6935 GLR): Check that setting yychar in a user action has the intended
6936 effect.
6937 * data/glr.c (yyGLRStack): Remove yytokenp member.
6938 (yyclearin): Don't set *yytokenp.
6939 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
6940 yychar rather than *yytokenp to determine the current lookahead.
6941 Compute yytoken locally when needed.
6942 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
6943 point to.
6944
6945 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
6946 after `--report' documentation.
6947
e2a8c0f5
PE
69482006-01-30 Paul Eggert <eggert@cs.ucla.edu>
6949
6950 * src/parse-gram.y (grammar_declaration): Location of printer
6951 symbol is @1, not list->location. Bug reported by twlevo.
6952 * tests/input.at (Incompatible Aliases): Adjust to above change.
6953
6b702268
PE
69542006-01-29 Paul Eggert <eggert@cs.ucla.edu>
6955
27622431
PE
6956 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
6957 all the test at once. This makes the output easier to read in the
6958 normal case.
6959
6b702268
PE
6960 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
6961 got from <http://bro-ids.org/download.html>. The bug is that
6962 when two actions appeared in succession, the second one was
6963 scanned before the first one was added to the grammar rule
6964 as a midrule action. Bison then output the incorrect warning
6965 "parse.y:905.17-906.36: warning: unused value: $3".
6966 * src/parse-gram.y (BRACED_CODE, action): These are no longer
6967 associated with a value.
6968 (rhs): Don't invoke grammar_current_rule_action_append.
6969 (action): Invoke it here instead.
6970 * src/reader.c (grammar_midrule_action): Now extern.
6971 (grammar_current_rule_action_append): Don't invoke
6972 grammar_midrule_action; that is now the scanner's job.
6973 * src/reader.h (last_string, last_braced_code_loc):
6974 (grammar_midrule_action): New decls.
6975 * src/scan-gram.l (last_string): Now extern, sigh.
6976 (last_braced_code_loc): New extern variable.
6977 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
6978 rule already has an action.
6979 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
6980 * tests/input.at (AT_CHECK_UNUSED_VALUES):
6981 Add some tests to check that the above changes fixed the bug.
6982
d40ba6c2
PE
69832006-01-27 Paul Eggert <eggert@cs.ucla.edu>
6984
6985 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
6986 All used changed. Check whether the symbol has a destructor,
6987 not whether it is typed.
6988 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
6989 that the values are still reported as unused. All line numbers
6990 adjusted.
6991
401aace6
PE
69922006-01-23 Paul Eggert <eggert@cs.ucla.edu>
6993
6994 Work around a bug in bro 0.8, which underparenthesizes its
6995 definition of YYLLOC_DEFAULT.
6996 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
6997 their arguments.
6998 * data/lalr1.cc: Likewise.
6999 * data/yacc.cc: Likewise.
7000
06f01bc4
PE
70012006-01-22 Paul Eggert <eggert@cs.ucla.edu>
7002
401aace6
PE
7003 Work around a bug in Pike 7.0, and give the Pike folks a
7004 better way to override the usual int widths.
7005 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
7006 user can override the types.
7007 (short): #undef, to work around a bug in Pike 7.0.
7008 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
7009 (union yyalloc.yyss): Use yytype_int16 rather than short.
7010 All uses changed.
7011 (yysigned_char): Remove.
7012 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
7013 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
7014 * tests/regression.at (Web2c Actions): Adjust to above changes.
7015
7016 * src/reader.c (check_and_convert_grammar): New function.
7017 (reader): Close the input file even if something went wrong during
7018 parsing. Minor file descriptor leak reported by twlevo.
7019
06f01bc4
PE
7020 * src/assoc.c (assoc_to_string): Use a default: abort (); case
7021 to pacify gcc -Wswitch-default.
7022 * src/scan-gram.l (adjust_location): Use a default: break; case
7023 to pacify gcc -Wswitch-default.
7024 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
7025 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
7026 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
7027 Move these decls to scan-skel.l, since they don't need to be
7028 visible elsewhere.
7029 * src/scan-skel.l: Accept the above decls.
7030 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
7031 is used.
7032
02650b7f
PE
70332006-01-21 Paul Eggert <eggert@cs.ucla.edu>
7034
7035 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
7036 since we don't want to insist on a version number at the start
7037 of the changelog every time.
7038 * Makefile.maint: Sync from coreutils a bit better.
7039 (sc_trailing_blank): Renamed from sc_trailing_space.
7040 All uses changed.
7041 (sc_no_if_have_config_h, sc_require_config_h):
7042 (sc_prohibit_assert_without_use): New rules.
7043 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
7044 (sc_dd_max_sym_length): Fix leading spaces in rule.
7045 (sc_system_h_headers): Prefix with @.
7046 (sc_useless_cpp_parens, m4-check): Output line numbers.
7047 (changelog-check): Allow version only in head.
7048 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
7049 satisfy new Makefile.maint rule.
7050 * data/glr.c: Likewise.
7051 * data/glr.cc: Likewise.
7052 * data/lalr1.cc: Likewise.
7053 * data/yacc.c: Likewise.
7054 * lib/ebitsetv.c: Likewise.
7055 * lib/lbitset.c: Likewise.
7056 * lib/subpipe.c: Likewise.
7057 * lib/timevar.c: Likewise.
7058 * src/system.h: Likewise.
7059 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
7060 * djgpp/Makefile.maint: Add copyright notice.
7061 * djgpp/README.in: Likewise.
7062 * djgpp/config.bat: Likewise.
7063 * djgpp/config.site: Likewise.
7064 * djgpp/config_h.sed: Likewise.
7065 * djgpp/djunpack.bat: Likewise.
7066 * djgpp/config.sed: Fix copyright notice to match standard format.
7067 * djgpp/subpipe.h: Likewise.
7068 * lib/bitsetv-print.c: Likewise.
7069 * lib/bitsetv.c: Likewise.
7070 * lib/subpipe.h: Likewise.
7071 * lib/timevar.c: Likewise.
7072 * lib/timevar.h: Likewise.
7073 * djgpp/subpipe.c: Use standard recipe for config.h.
7074 * lib/abitset.c: Likewise.
7075 * lib/bitset.c: Likewise.
7076 * lib/bitset_stats.c: Likewise.
7077 * lib/bitsetv-print.c: Likewise.
7078 * lib/bitsetv.c: Likewise.
7079 * lib/ebitsetv.c: Likewise.
7080 * lib/get-errno.c: Likewise.
7081 * lib/lbitset.c: Likewise.
7082 * lib/subpipe.c: Likewise.
7083 * lib/timevar.c: Likewise.
7084 * lib/vbitset.c: Likewise.
7085 * tests/local.at: Likewise.
7086 * src/scan-gram.l: Don't include verify.h, since system.h does
7087 that for us.
7088 * .x-sc_require_config_h: New file.
7089 * .x-sc_unmarked_diagnostics: New file.
7090
287c78f6
PE
70912006-01-20 Paul Eggert <eggert@cs.ucla.edu>
7092
287c78f6
PE
7093 Be a bit more systematic about using 'abort'.
7094 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
7095 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
7096 Put 'default: abort ();' before some other case, to satisfy older
7097 pedantic compilers.
7098 * lib/bitset_stats.c (bitset_stats_init): Likewise.
7099 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
7100 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
7101 * src/conflicts.c (resolve_sr_conflict): Likewise.
68cae94e
PE
7102 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
7103 (get_decision_str, get_orientation_str, get_node_alignment_str):
7104 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
7105 (get_linestyle_str, get_arrowstyle_str): Likewise.
7106 * src/conflicts.c (resolve_sr_conflict):
7107 Use a default case rather than one for the one remaining enum
7108 value, to catch invalid enum values as well.
7109 * src/lalr.c (set_goto_map, map_goto):
7110 Prefer "assert (FOO);" to "if (!FOO) abort ();".
7111 * src/nullable.c (nullable_compute, token_definitions_output):
7112 Likewise.
7113 * src/reader.c (packgram, reader): Likewise.
7114 * src/state.c (transitions_to, state_new, state_reduction_find):
7115 Likewise.
7116 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
7117 (symbol_pack): Likewise.
7118 * src/tables.c (conflict_row, pack_vector): Likewise.
287c78f6
PE
7119 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
7120 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
68cae94e
PE
7121 * src/system.h: Don't include <assert.h>.
7122 (assert): New macro.
7123
7124 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
7125 (Destructor Decl, Parser Function, Pure Calling):
7126 Describe rules for braces inside C code more carefully.
287c78f6 7127
c66dfadd
PE
71282006-01-19 Paul Eggert <eggert@cs.ucla.edu>
7129
c21493b8
PE
7130 Fix some porting glitches found by Nelson H. F. Beebe.
7131 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
7132 compilers that don't understand that abort () does not return.
7133 * src/state.c (transitions_to): Likewise.
7134 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
7135 that '#include <cstdlib>' works.
7136 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
7137 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
7138 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
7139 for the benefit of some pre-C99 compilers.
7140
b6e3facf
PE
7141 * bootstrap: Undo changes to gnulib files that autoreconf made.
7142
c66dfadd
PE
7143 Minor fixups to get 'make maintainer-check' to work.
7144 * configure.ac: Don't use -Wnested-externs, as it's incompatible
7145 with the new verify.h implementation.
7146 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
7147 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
7148 * data/yacc.c (YYUSE): Likewise.
7149 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
7150 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
7151 * src/parse-gram.y (declaration): Don't pass a string constant
7152 to a function that expects char *, since GCC might complain
7153 about the constant value.
7154 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
7155 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
7156 before #defining them.
7157 * tests/glr-regression.at
7158 (Incorrectly initialized location for empty right-hand side in GLR):
7159 In yyerror, use the msg arg.
7160 (Corrupted semantic options if user action cuts parse):
7161 (Incorrect lookahead during deterministic GLR):
7162 (Incorrect lookahead during nondeterministic GLR):
7163 Don't name a local var 'index'; it shadows string.h's 'index'.
7164
ed94ef2a
AD
71652006-01-19 Akim Demaille <akim@epita.fr>
7166
7167 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
7168 location, not just parts of it.
7169
e9ad4aec
PE
71702006-01-18 Paul Eggert <eggert@cs.ucla.edu>
7171
d6ca7905
PE
7172 * NEWS: Document the fact that multiple %unions are now allowed.
7173 * doc/bison.texinfo (Union Decl): Likewise.
51cbef6f
PE
7174 * TODO: This feature is now implemented, so remove it from
7175 the wishlist.
d6ca7905 7176
ef1b70e0
PE
7177 * Makefile.maint: Merge with coreutils Makefile.maint.
7178 (CVS_LIST): Use build-aux version if available.
7179 (VERSION_REGEXP): New macro.
7180 (syntax-check-rules): Add sc_no_if_have_config_h,
7181 sc_prohibit_assert_without_use, sc_require_config_h,
7182 sc_useless_cpp_parens.
7183 (sc_obsolete_symbols): Check for O_NDELAY.
7184 (sc_dd_max_sym_length): Track coreutils.
7185 (sc_unmarked_diagnostics): Look in all files, not just *.c.
7186 (sc_useless_cpp_parens): New rule.
7187 (news-date-check): Look for version or today's date.
7188 (changelog-check): Don't require version number near head.
7189 (copyright-check): Use current year instead of hardwiring 2005.
7190 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
7191 (announcement): Add --gpg-key-ID.
7192
7193 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
7194 with "file system".
7195
2073ce56 7196 Avoid undefined behavior that addressed just before the start of an
e9ad4aec
PE
7197 array. Problem reported by twlevo.
7198 * src/reader.c (packgram): Prepend a new sentinel before ritem.
7199 * src/lalr.c (build_relations): Rely on new sentinel.
7200 * src/gram.c (gram_free): Adjust to new sentinel.
7201
b7691f15
JD
72022006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
7203
7204 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
7205 yylookaheadNeeds. All uses updated.
7206 (yysplitStack): Rename local yynewLookaheadStatuses to
7207 yynewLookaheadNeeds.
7208 * data/glr-regression.at (Incorrect lookahead during nondeterministic
7209 GLR): In comments, change `lookahead status' to `lookahead need'.
7210
ddee1b06
PH
72112006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7212
7213 * data/glr.c (yysplitStack): A little stylistic rewrite.
7214
12f4614d
PH
72152006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7216
7217 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
7218
32c29292
JD
72192006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
7220
7221 * doc/bison.texinfo: Fix some typos.
7222 (GLR Semantic Actions): New subsection discussing special
7223 considerations because GLR semantic actions might be deferred.
7224 (Actions): Mention look-ahead usage of yylval.
7225 (Actions and Locations): Mention look-ahead usage of yylloc.
7226 (Special Features for Use in Actions): Add YYEOF entry and mention it
7227 in the yychar entry.
7228 In the yychar entry, remove mention of the local yychar case (pure
7229 parser) since this is irrelevant information when writing semantic
148d66d8 7230 actions and since it's already discussed in `Table of Symbols' where
32c29292
JD
7231 yychar is otherwise described as an external variable.
7232 In the yychar entry, don't call it the `current' look-ahead since it
7233 isn't when semantic actions are deferred.
7234 In the yychar and yyclearin entries, add note about deferred semantic
7235 actions.
7236 Add yylloc and yylval entries discussing look-ahead usage.
7237 (Look-Ahead Tokens): When discussing yychar, don't call it the
7238 `current' look-ahead, and do mention yylval and yylloc.
7239 (Error Recovery): Cross-reference `Action Features' when mentioning
7240 yyclearin.
148d66d8 7241 (Table of Symbols): In the yychar entry, don't call it the `current'
32c29292
JD
7242 look-ahead.
7243 In the yylloc and yylval entries, mention look-ahead usage.
7244
de366a2f 72452006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2781dbd1
JD
7246
7247 * tests/glr-regression.at: Update copyright year to 2006.
7248
bf70fa87
JD
72492006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7250
7251 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
7252 use during nondeterministic operation to track which stacks have
7253 actually needed the current lookahead.
7254 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
7255 Allocate, deallocate, resize, and otherwise shuffle space for
7256 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
7257 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
7258 appropriately during nondeterministic operation.
7259 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
7260 members to store the current lookahead to be used by the deferred
7261 user action.
7262 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
7263 from which the RHS is taken. Set the lookahead members of the new
7264 yySemanticOption according to the lookahead status for stack yyk.
7265 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
7266 yyaddDeferredAction.
7267 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
7268 members of yySemanticOption before invoking yyuserAction, and then set
7269 them back to their current values afterward.
7270 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
7271 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
7272 * tests/glr-regression.at: Remove `.' from the ends of recent test case
7273 titles for consistency.
7274 (Leaked merged semantic value if user action cuts parse): In order to
7275 suppress lint warnings, use arguments in merge function, and assign
7276 char value < 128 in main.
7277 (Incorrect lookahead during deterministic GLR): New test case.
7278 (Incorrect lookahead during nondeterministic GLR): New test case.
7279
05449a2c
JD
72802006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7281
de366a2f 7282 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
05449a2c
JD
7283 !yyvaluep as signal that no semantic value is available to print.
7284 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
7285 to print a semantic value.
7286
4158e0a1 72872006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
fd2493f7 7288
4158e0a1
JD
7289 * tests/glr-regression.at: For consistency with my newer test cases,
7290 don't thank myself.
7291
d659304d
JD
72922006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
7293
7294 * data/glr.c (yyresolveValue): When merging semantic options, if at
7295 least one user action succeeds but a later one cuts the parse, then
7296 destroy the semantic value before returning rather than leaking it.
7297 (yyresolveStates): If a user action cuts the parse and thus
7298 yyresolveValue fails, ignore the (unset) semantic value rather than
7299 corrupting the yyGLRState, and empty the semantic options list since
7300 the user actions should have called all necessary destructors.
7301 Simplify code with YYCHK.
7302 * tests/glr-regression.at (Corrupted semantic options if user action
7303 cuts parse): New test case.
7304 (Undesirable destructors if user action cuts parse): New test case.
7305 Before applying any of this patch, this test case never actually failed
7306 for me... but only because the corrupted semantic options usually
7307 masked this bug.
7308 (Leaked merged semantic value if user action cuts parse): New test
7309 case.
7310
6ec2c0f2
AD
73112006-01-05 Akim Demaille <akim@epita.fr>
7312
7313 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
7314
1b9c21fb
PE
73152006-01-04 Paul Eggert <eggert@cs.ucla.edu>
7316
7317 * data/c.m4 (b4_c_modern): New macro, with a new provision for
7318 _MSC_VER. Problem reported by Cenzato Marco.
7319 (b4_c_function_def): Use it.
7320 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
7321 b4_c_modern.
7322 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
7323 than rolling our own.
7324
84866159
AD
73252006-01-04 Akim Demaille <akim@epita.fr>
7326
7327 Also warn about non-used mid-rule values.
7328 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
7329 member.
7330 (symbol_list_new): Adjust.
7331 * src/reader.c (symbol_typed_p): New.
7332 (grammar_rule_check): Use it.
7333 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
7334 Check its rule.
7335 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
7336 Use it.
7337 * tests/actions.at (Exotic Dollars): Adjust.
7338
378f4bd8
AD
73392006-01-04 Akim Demaille <akim@epita.fr>
7340
7341 * src/reader.c (grammar_midrule_action): If $$ is set in a
7342 mid-rule, move the `used' bit to its lhs.
7343 * tests/input.at (Unused values): New.
7344 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
7345
e2a21b6f
PE
73462006-01-03 Paul Eggert <eggert@cs.ucla.edu>
7347
54662697
PE
7348 * doc/bison.texinfo (Bison Options): Say more accurately what
7349 --yacc does.
7350 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
7351 about declarations in the grammar when in Yacc mode, as POSIX does
7352 not require a diagnostic when the grammar uses extensions.
7353
7354 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
7355
073f9288
PE
7356 Warn about dubious constructions like "%token T T".
7357 Reported by twlevo.
7358 * src/symtab.h (struct symbol.declared): New member.
7359 * src/symtab.c (symbol_new): Initialize it to false.
7360 (symbol_class_set): New arg DECLARING, specifying whether
7361 this is a declaration that we want to warn about, if there
7362 is more than one of them. All uses changed.
7363
1221b78a
PE
7364 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
7365 Allow multiple %union directives, whose contents concatenate.
7366 * src/parse-gram.y (grammar_declaration): Likewise.
7367 Use muscle_code_grow, so that we don't need stype_line any more.
7368 All uses changed.
7369
7370 * src/muscle_tab.c (muscle_grow): Fix comment.
7371
e2a21b6f
PE
7372 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
7373 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
7374 Update copyright year to 2006.
7375
8f7e3cf9
AD
73762006-01-03 Akim Demaille <akim@epita.fr>
7377
7378 Have glr.cc pass (some of) the calc.at tests.
7379 * data/glr.cc (b4_parse_param_orig): New.
7380 (b4_parse_param): Improve its definition, and bound it more
7381 clearly in the skeleton.
7382 (b4_epilogue): Append, instead of prepending, in order to keep
7383 #line consistency.
7384 Simplify the generation of auxiliary functions: locations and
7385 purity are mandated.
7386 (b4_global_tokens_and_yystype): Honor it.
7387 * data/location.cc (c++.m4): Don't include it.
7388 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
7389 and AT_SKEL_CC_IF.
7390 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
7391 AT_LALR1_CC_IF.
7392 Be sure to initialize the first position's filename.
7393 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
7394 mandated anyway.
7395 (AT_CHECK_CALC_GLR_CC): New.
7396 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
7397
3953ed88
AD
73982006-01-02 Akim Demaille <akim@epita.fr>
7399
7400 * src/output.c (output_skeleton): Don't hard wire the inclusion of
7401 c.m4.
0a96ba81 7402 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
3953ed88
AD
7403 * data/glr.cc: Do not include stack.hh.
7404
9ecafbbf
AD
74052006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
7406
7407 * data/glr.c: Reformat whitespace with tabs.
7408 (b4_lpure_formals): Remove this unused m4 macro.
7409 * tests/cxx-type.at: Reformat whitespace with tabs.
7410 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
7411 since it's a member. Rename type to isNterm for clarity.
7412
c4d497a0
AD
74132005-12-29 Akim <akim@sulaco.local>
7414
7415 Let glr.cc catch up with symbol_value_print.
7416 * data/glr.cc (b4_yysymprint_generate): Replace by...
7417 (b4_yy_symbol_print_generate): this.
7418 (yy_symbol_print, yy_symbol_value_print): Declare them.
7419
4517da37
PE
74202005-12-28 Paul Eggert <eggert@cs.ucla.edu>
7421
7422 * src/location.h (boundary): Note that a line or column equal
7423 to INT_MAX indicates an overflow.
7424 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
7425 (rule_length_overflow, increment_rule_length, add_column_width):
7426 New functions.
7427 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
7428 (<SC_BRACED_CODE>"}"):
7429 Use increment_rule_length rather than incrementing it by hand.
7430 (adjust_location, handle_syncline): Diagnose overflow.
7431 (handle_action_dollar, handle_action_at):
7432 Fix bug with monstrosities like $-2147483648.
7433 Remove now-unnecessary checks.
7434 (scan_integer): Verify assumptions and remove now-unnecessary checks.
7435 (convert_ucn_to_byte): Verify assumptions.
7436 (handle_syncline): New arg LOC. All callers changed.
7437 Don't store through a value derived from char const * pointer.
7438
7439 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
7440 GCC warnings.
7441
e3233bf6
PE
74422005-12-27 Paul Eggert <eggert@cs.ucla.edu>
7443
7444 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
7445 Remove unnecessary forward static decls.
7446
8f3596a6
AD
74472005-12-27 Akim Demaille <akim@epita.fr>
7448
7449 * src/reader.c (grammar_current_rule_check): Also check that $$
7450 is used.
7451 Take the rule to check as argument, hence rename as...
7452 (grammar_rule_check): this.
7453 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
7454 Rename as...
7455 (grammar_rule_begin, grammar_rule_end): these, for consistency.
7456 (grammar_midrule_action, grammar_symbol_append): Now static.
7457 * tests/torture.at (input): Don't rely on the default action
7458 being always performed.
7459 * tests/calc.at: "Set" $$ even when the action is "cut" with
7460 YYERROR or other.
7461 * tests/actions.at (Exotic Dollars): Instead of using unused
7462 values, check that the warning is issued.
7463
721be13c
PE
74642005-12-22 Paul Eggert <eggert@cs.ucla.edu>
7465
7466 * NEWS: Improve wording for unused-value warnings.
7467
a0af42fc
AD
74682005-12-22 Akim Demaille <akim@epita.fr>
7469
7470 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
7471 (b4_yysymprint_generate): Rename as...
7472 (b4_yy_symbol_print_generate): this.
7473 Generate yy_symbol_print instead of yysymprint.
7474 Generate also yy_symbol_value_print, and use it.
7475
affac613
AD
74762005-12-22 Akim Demaille <akim@epita.fr>
7477
721be13c 7478 * NEWS: Warn about unused values.
affac613
AD
7479 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
7480 a `used' member.
7481 (symbol_list_n_get, symbol_list_n_used_set): New.
7482 (symbol_list_n_type_name_get): Use symbol_list_n_get.
7483 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
7484 * src/reader.c (grammar_current_rule_check): Check that values are
7485 used.
7486 * src/symtab.c (symbol_print): Accept 0.
7487 * tests/existing.at: Remove the type information.
7488 Empty the actions.
7489 Remove useless actions (beware of mid-rule actions: perl -000
7490 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
7491 * tests/actions.at (Exotic Dollars): Use unused values.
7492 * tests/calc.at: Likewise.
7493 * tests/glr-regression.at (No users destructors if stack 0 deleted):
7494 Likewise.
7495
7496 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
7497 rule_useful_p.
7498
9d9b8b70
PE
74992005-12-21 Paul Eggert <eggert@cs.ucla.edu>
7500
8bb4c753
PE
7501 Undo 2005-12-01 tentative license wording change. The wording is
7502 still being reviewed by the lawyers, and we don't want to wait for
7503 them before publishing a test release. For now, revert to the
7504 previous wording.
7505 * NEWS: Undo 2005-12-01 change.
7506 * data/glr.c: Revert to previous license wording.
7507 * data/glr.cc: Likewise.
7508 * data/lalr1.cc: Likewise.
7509 * data/location.cc: Likewise.
7510 * data/yacc.c: Likewise.
7511
9d9b8b70
PE
7512 * NEWS: Reword %destructor vs YYABORT etc.
7513 * data/glr.c: Use American spacing, for consistency.
7514 * data/glr.cc: Likewise.
7515 * data/lalr1.cc: Likewise.
7516 * data/yacc.c: Likewise.
7517 * data/yacc.c: Reformat comments slightly.
7518 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
7519 for consistency. Fix some spelling errors and reword recently-included
7520 text slightly.
7521 * tests/cxx-type.at: Cast results of malloc, for C++.
7522
2c3b392a
AD
75232005-12-21 Joel E. Denny <address@hidden>
7524
7525 * tests/cxx-type.at: Construct a tree, count the parents of shared
7526 nodes, and free each node once and only once. Previously, the memory
7527 for semantic values was leaked instead.
7528
d6cff4dc
AD
75292005-12-21 Joel E. Denny <address@hidden>
7530
7531 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
7532 (yylval, yylloc): If pure, #define to yystackp->yyval and
7533 yystackp->yyloc similar to yychar and yynerrs.
7534 (yyparse): If pure, remove local yylval and yylloc. Add local
7535 yystackp to accommodate pure definitions of yylval and yylloc.
7536 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
7537 yylvalp and yyllocp to &yylval and &yylloc.
7538 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
7539 namespace. Previously, nerrs and char were missing, but lval and lloc
7540 weren't necessary.
7541 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
7542 yylvalp and yyllocp parameters since, if pure, these are now always
7543 accessible through yystackp. If not pure, they are still accessible
7544 globally.
7545 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
7546 `if (YYID (N))' to pacify lint.
7547
a85284cf
AD
75482005-12-21 Akim Demaille <akim@epita.fr>
7549
7550 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
7551 destroy the RHS symbols of a rule.
7552 * data/yacc.c (yylen): Initialize to 0.
7553 Keep its value to the number of items to possibly shift.
7554 In particular, a regular successful parse that ends on YYFINAL by
7555 a (internal) YYACCEPT must not have yylen != 0.
7556 (yyerrorlab, yyreturn): Pop the RHS.
7557 Reorder a bit to emphasize the `shifting' bits of code.
7558 (YYPOPSTACK): Now accept a number of items to pop.
7559 * data/lalr1.cc: Likewise.
7560 * data/glr.c: Formatting changes.
7561 Use goto instead of fall through.
7562 * doc/bison.texinfo (Destructor Decl): Complete.
7563
d508c281
JMG
75642005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7565
7566 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
7567 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
7568 * djgpp/config.bat: Replace every occurence of the file name
7569 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
7570 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
7571 * djgpp/config.sed: Replace every occurence of the file name
7572 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
7573 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
7574 * djgpp/djunpack.bat: DJGPP specific file.
7575 * djgpp/fnchange.lst: DJGPP specific file.
7576 * djgpp/README.in: Add new information about how to unpack the bison
7577 source on MSDOS and other systems which have 8.3 file name restrictions
7578 using djunpack.bat and fnchange.lst.
7579
3e7a2cd9
PE
75802005-12-12 Paul Eggert <eggert@cs.ucla.edu>
7581
7582 * bootstrap (build_cvs_prefix): Remove; unused.
7583 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
7584 when getting gnulib.
7585
75862005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
7587
7588 * data/glr.c: Reorder typedef declarations for structs to match order
7589 of struct declarations.
7590 Rename yystack everywhere to yystackp except in yyparse where it's not
7591 a pointer.
7592 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
7593 consistency.
7594 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
7595 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
7596 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
7597 lint.
7598
877519f8
PE
75992005-12-09 Paul Eggert <eggert@cs.ucla.edu>
7600
0eca5a39
PE
7601 * tests/sets.at (Accept): Fix typos in regular expression used to
7602 sed out the final state number.
7603
2cec9080
PE
7604 Work around portability problem on Solaris 10: flex-generated
7605 files include <stdio.h> before <config.h>, which messes up
7606 because the latter defines __EXTENSIONS__. Address the problem
7607 by creating two new little files that include <config.h> first,
7608 then include the flex-generated files. Rewrite everyone else
7609 to include <config.h> first, as well.
7610 * lib/timevar.c: Always include "config.h".
7611 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
7612 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
7613 (EXTRA_bison_SOURCES): New macro.
7614 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
7615 * src/system.h: Don't include config.h.
7616 * src/LR0.c: Include <config.h> first.
7617 * src/assoc.c: Likewise.
7618 * src/closure.c: Likewise.
7619 * src/complain.c: Likewise.
7620 * src/conflicts.c: Likewise.
7621 * src/derives.c: Likewise.
7622 * src/files.c: Likewise.
7623 * src/getargs.c: Likewise.
7624 * src/gram.c: Likewise.
7625 * src/lalr.c: Likewise.
7626 * src/location.c: Likewise.
7627 * src/main.c: Likewise.
7628 * src/muscle_tab.c: Likewise.
7629 * src/nullable.c: Likewise.
7630 * src/output.c: Likewise.
7631 * src/parse-gram.y: Likewise.
7632 * src/print.c: Likewise.
7633 * src/print_graph.c: Likewise.
7634 * src/reader.c: Likewise.
7635 * src/reduce.c: Likewise.
7636 * src/relation.c: Likewise.
7637 * src/state.c: Likewise.
7638 * src/symlist.c: Likewise.
7639 * src/symtab.c: Likewise.
7640 * src/tables.c: Likewise.
7641 * src/uniqstr.c: Likewise.
7642 * src/vcg.c: Likewise.
7643
877519f8
PE
7644 * src/parse-gram.y: Fix minor problems uncovered by lint.
7645 (current_lhs, current_lhs_location): Now static.
7646 (current_assoc): Remove unused variable.
7647
7648 Cleanups so that Bison-generated parsers have less lint.
7649 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
7650 Prepend /*ARGSUSED*/, for lint's sake.
7651 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
7652 definition if 'lint' is defined.
7653 (YYID): New macro (or function, if lint).
7654 All uses of /*CONSTCOND*/0 replaced by YYID(0).
7655 * data/yacc.c: Likewise.
7656 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
7657 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
7658 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
7659 is C++ only.
7660 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
7661 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
7662 Use YYID(0) rather than 0, for lint.
7663 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
7664 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
7665
f5228370
PE
76662005-12-07 Paul Eggert <eggert@cs.ucla.edu>
7667
7668 * tests/glr-regression.at
7669 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
7670 Close memory leak reported by twlevo.
7671
69ce078b
PE
76722005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
7673
6ff99711
PE
7674 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
7675 all stacks.
7676 (yyparse): Iterate another stack in order to call user destructors.
69ce078b
PE
7677 * tests/glr-regression.at (No users destructors if stack 0 deleted):
7678 New test case.
7679 (Duplicated user destructor for lookahead): This test now is expected
7680 to succeed.
7681
af3412cd
PE
76822005-12-01 Paul Eggert <eggert@cs.ucla.edu>
7683
32b5b719 7684 * NEWS: Document the following change.
af3412cd
PE
7685 * data/yacc.c: Say "parser skeleton" rather than "file", since
7686 it's no longer just a file.
7687 * data/glr.c: Grant a special exception for C GLR parsers, that
7688 reads like the already-existing exception for C LALR(1) parsers.
7689 * data/glr.cc: Likewise.
7690 * data/lalr1.cc: Likewise.
7691 * data/location.cc: Likewise.
7692 * data/yacc.c: Reword the "written by" statement to clarify that
7693 it was the parser skeleton, not the entire output file.
7694 * data/glr.c: Written by Paul Hilfinger.
7695 * data/glr.cc: Written by Akim Demaille.
7696 * data/lalr1.cc: Likewise.
7697
035aa4a0
PE
76982005-11-18 Paul Eggert <eggert@cs.ucla.edu>
7699
d9963c85
PE
7700 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
7701 Fix typos in previous change that broke 'make check'.
7702 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
7703 supported in C.
7704 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
7705 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
7706 We can revert this once things settle down.
7707
035aa4a0
PE
7708 * src/conflicts.c (conflicts_print): Don't print file name twice
7709 when %expect fails because there were no conflicts.
7710 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
7711 change.
7712 * tests/conflicts.at (%expect not enough, %expect too much):
7713 (%expect with reduce conflicts): Adjust to new behavior.
7714
77152005-11-18 Akim Demaille <akim@epita.fr>
7716
7717 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
7718 errors.
7719 * NEWS: Document this.
7720 * doc/bison.texinfo (Expect Decl): Likewise.
7721
d1ff7a7c
AD
77222005-11-16 Akim Demaille <akim@epita.fr>
7723
7724 Generalize the display of semantic values and locations in traces.
7725 * data/glr.c (yy_reduce_print): Fix indices (again).
7726 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
7727 literal integers.
7728 * data/lalr1.cc (yyreduce_print): Rename as...
7729 (yy_reduce_print): this.
7730 Display values and locations.
7731 * data/yacc.c (yy_reduce_print): Likewise.
7732 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
7733 (yysymprint): Move higher to be visible from yy_reduce_print).
7734 (yyparse): Adjust.
7735 * tests/calc.at: Adjust the expected length of the traces.
7736
6de5398d
AD
77372005-11-14 Akim Demaille <akim@epita.fr>
7738
7739 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
7740 from 1 to N, while values and location start at 0.
7741 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
7742
a1373f55
AD
77432005-11-14 Akim Demaille <akim@epita.fr>
7744
7745 * data/glr.c (yy_reduce_print): Fix the $ number.
7746
613d8952
AD
77472005-11-14 Akim Demaille <akim@epita.fr>
7748
7749 "Use" parse parameters.
7750 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
7751 * data/glr.c, data/glr.cc: Use them.
7752 * data/glr.c (YYUSE): Have a C++ definition that supports
7753 non-pointer types.
7754
b2741627
AD
77552005-11-14 Akim Demaille <akim@epita.fr>
7756
7757 * data/glr.c (yyexpandGLRStack): Declare only if defined.
7758
5059b5c8
AD
77592005-11-14 Akim Demaille <akim@epita.fr>
7760
42249483
AD
7761 * data/glr.cc: New.
7762 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
5059b5c8 7763
4626a15d
AD
77642005-11-12 Akim Demaille <akim@epita.fr>
7765
7766 Let position and location be PODs.
7767 * data/location.cc (position::initialize, location::initialize): New.
7768 (position::position, location::location): Define only if
7769 b4_location_constructors is defined.
7770 * data/lalr1.cc (b4_location_constructors): Define it for backward
7771 compatibility.
7772 * doc/bison.texinfo (Initial Action Decl): Use initialize.
7773
77742005-11-12 Akim Demaille <akim@epita.fr>
98ae9643
AD
7775
7776 * data/lalr1.cc: Move the body of the ctor and dtor into the
7777 parser file (instead of the header).
7778 Wrap the implementations in a "namespace yy".
7779
77802005-11-12 Akim Demaille <akim@epita.fr>
7781
7782 Have glr.c include its header file when created.
7783 * data/glr.c (b4_shared_declarations): New.
7784 Output them verbatim in the parser if !%defines, otherwise
7785 output then in the header file, and include it instead.
7786
1989d947
AD
77872005-11-11 Akim Demaille <akim@epita.fr>
7788
7789 * data/glr.c: Comment changes.
7790
77912005-11-11 Akim Demaille <akim@epita.fr>
62b08cfc
AD
7792
7793 When yydebug, report semantic and location values for reductions.
7794 * data/glr.c (yy_reduce_print): Report the semantic values and the
7795 locations.
7796 (YY_REDUCE_PRINT): Adjust.
7797 (yyglrReduce): Use them.
7798 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
7799 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
7800 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
7801 traces.
7802
02998094
AD
78032005-11-10 Akim Demaille <akim@epita.fr>
7804
7805 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
7806 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
7807 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
7808
5210672f
PE
78092005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
7810
7811 * m4/cxx.m4, examples/Makefile.am: Don't build
7812 examples/calc++ if no C++ compiler is available. (trivial change)
7813
a8991a1d
AD
78142005-11-09 Akim Demaille <akim@epita.fr>
7815
7816 * src/scan-skel.l: Use a couple of asserts.
7817
36b5e963
AD
78182005-11-03 Akim Demaille <akim@epita.fr>
7819
7820 In some (weird) cases, the final state number is incorrect.
7821 Reported by Alexandre Duret-Lutz.
7822 * src/LR0.c (state_list_append): Remove the computation of
7823 final_state.
7824 (save_reductions): Do it here.
7825 (get_state): Alpha conversion.
7826 (generate_states): Use a for loop.
7827 * src/gram.h (item_number_is_rule_number)
7828 (item_number_is_symbol_number): New.
7829 * src/state.c: Use assert.
7830 * src/system.h: Include assert.h.
7831 * tests/sets.at (Accept): New.
7832
44e7ead1
PH
78332005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7834
7835 * data/glr.c (yyfill): Adjust comment.
36b5e963 7836 (yyresolveAction): Initialize default location properly
44e7ead1
PH
7837 for empty right-hand sides.
7838 (yydoAction): Ditto.
7839 Add comment explaining apparently dead code.
36b5e963
AD
7840 * tests/glr-regression.at
7841 (Incorrectly initialized location for empty right-hand side in GLR):
44e7ead1 7842 New test.
36b5e963 7843
e10a80ee
PE
78442005-10-30 Paul Eggert <eggert@cs.ucla.edu>
7845
7846 * bootstrap (cleanup_gnulib): New function. Use it to clean up
7847 gnulib when interrupted. This fixes some race conditions and
7848 works around some portability problems (one noted by Paul
7849 Hilfinger).
7850
067b32ee
AD
78512005-10-22 Akim <akim@epita.fr>
7852
7853 * Makefile.cfg: Adjust to config -> build-aux.
7854 Reported by twledo.
7855
4b367315
AD
78562005-10-21 Akim Demaille <akim@epita.fr>
7857
7858 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
7859 the %parse-params.
7860 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
7861 * data/yacc.c (b4_Pure_if): Rename as...
7862 (b4_yacc_pure_if): this.
7863 (YY_SYMBOL_PRINT, yyparse): Adjust.
7864 * doc/bison.texinfo: Formatting changes.
7865
24cc23d9
AD
78662005-10-21 Akim Demaille <akim@epita.fr>
7867
7868 Finish the transition config -> build-aux.
7869 * configure.ac, Makefile.am: Use build-aux.
7870 * config/prev-version, config/announce-gen, config/Makefile.am:
7871 Move to...
7872 * build-aux/prev-version, build-aux/announce-gen,
7873 * build-aux/Makefile.am: here.
7874
d4476375
AD
78752005-10-14 Akim Demaille <akim@epita.fr>
7876
7877 * examples/calc++/test: Use set -x only when VERBOSE.
7878
302c0aee
PE
78792005-10-13 Paul Eggert <eggert@cs.ucla.edu>
7880
7881 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
7882 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
7883
7625ec2c
AD
78842005-10-13 Akim Demaille <akim@epita.fr>
7885
7886 * src/scan-skel.l: Output the base name parts of the parser and
7887 header file names.
302c0aee 7888 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
7625ec2c
AD
7889 additional checks.
7890 Use this to exercise C++ outputs in subdirs.
7891 Reported by Oleg Smolsky.
7892
ba0fe3c7
PE
78932005-10-12 Paul Eggert <eggert@cs.ucla.edu>
7894
7895 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
7896 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
7897 Problem reported by John P. Hartmann.
7898 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
7899 already defined it.
7900
9b8a5ce0
AD
79012005-10-12 Akim Demaille <akim@epita.fr>
7902
7903 * src/parse-gram.y (version_check): Exit 63 to please missing
7904 (stands for "version mismatch).
7905 * tests/input.at, doc/bison.texinfo: Adjust.
7906
4f6e011e
PE
79072005-10-10 Paul Eggert <eggert@cs.ucla.edu>
7908
7909 Work around portability problems with Visual Age C compiler
7910 (xlc and xlC_r) reported by John P. Hartmann.
7911 * data/location.cc (initial_column, initial_line): Remove.
7912 All uses replaced by 0 and 1.
7913 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
7914 that xlc complains about.
7915 * src/scan-skel.l (skel_wrap): Likewise.
4d7aa45e 7916 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
ba0fe3c7 7917 as __STDC__.
4d7aa45e
PE
7918 * data/yacc.c (YYMODERN_C): New macro, which also looks at
7919 __STDC_VERSION__. Use it everywhere instead of looking at
7920 __STDC__ and __cplusplus.
4f6e011e 7921
a1b3bf8c
AD
79222005-10-10 Akim Demaille <akim@epita.fr>
7923
7924 * examples/calc++/test: Be quiet unless VERBOSE.
7925
412e44aa
PE
79262005-10-05 Paul Eggert <eggert@cs.ucla.edu>
7927
2a4647a3
PE
7928 * data/c.m4 (yydestruct, yysymprint):
7929 Use YYUSE instead of casting to void.
7930 * data/glr.c (YYUSE): New macro.
7931 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
7932 Use it instead of rolling our own.
7933 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
7934 (YYCHK1):
7935 Use /*CONSTCOND*/ to suppress lint warnings.
7936 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
7937 (YY_STACK_PRINT): Use 'false' not '0'.
7938 (YYUSE): New macro.
7939 (yysymprint_, yydestruct_): Use it instead of rolling our own.
7940 * data/yacc.c (YYUSE): New macro.
7941 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
7942 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
7943 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
7944
7945
412e44aa
PE
7946 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
7947 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
7948
88c6637f
PE
79492005-10-04 Paul Eggert <eggert@cs.ucla.edu>
7950
2f4f028d
PE
7951 Undo the parts of the unlocked-I/O change that substituted
7952 putc or puts for printf. This might hurt performance a bit,
7953 but some people prefer the printf style.
7954 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
7955 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
7956 All uses replaced by YYFPRINTF and YYDPRINTF.
7957 * data/yacc.c: Likewise.
7958 * lib/bitset.c (bitset_print): Likewise.
7959 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
7960 putc and puts.
7961 * lib/lbitset.c (debug_lbitset): Likewise.
7962 * src/closure.c (print_firsts, print_fderives): Likewise.
7963 * src/gram.c (grammar_dump): Likewise.
7964 * src/lalr.c (look_ahead_tokens_print): Likewise.
7965 * src/output.c (escaped_output): Likewise.
7966 (user_actions_output): Break apart two printfs.
7967 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
7968 * src/reduce.c (reduce_print): Likewise.
7969 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
7970 * src/system.h: Include unlocked-io.h rathe than stdio.h.
7971
88c6637f
PE
7972 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
7973 Use assignments rather than casts-to-void to suppress
7974 unused-variable warnings. This pacifies 'lint'.
7975 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
7976 unused-variable warnings.
7977
fb32e373
JMG
79782005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7979
7980 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
7981
edb8f44f
PE
79822005-10-02 Paul Eggert <eggert@cs.ucla.edu>
7983
fb9c0b33
PE
7984 Use unlocked I/O for a minor performance improvement on hosts like
7985 GNU/Linux and Solaris that support unlocked I/O. The basic idea
7986 is to use the gnlib unlocked-io module, and to prefer putc and
7987 puts to printf when either will work (since the latter doesn't
7988 come in an unlocked flavor).
7989 * bootstrap (gnulib_modules): Add unlocked-io.
7990 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
7991 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
7992 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
7993 and similarly for puts and putc and printf.
7994 * data/yacc.c: Likewise.
7995 * lib/bitset.c (bitset_print): Likewise.
7996 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
7997 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
7998 to printf.
7999 * lib/lbitset.c (debug_lbitset): Likewise.
8000 * src/closure.c (print_firsts, print_fderives): Likewise.
8001 * src/gram.c (grammar_dump): Likewise.
8002 * src/lalr.c (look_ahead_tokens_print): Likewise.
8003 * src/output.c (escaped_output): Likewise.
8004 (user_actions_output): Coalesce two printfs.
2f4f028d 8005 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
fb9c0b33
PE
8006 * src/reduce.c (reduce_print): Likewise.
8007 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2f4f028d 8008 * src/system.h: Include unlocked-io.h rather than stdio.h.
fb9c0b33 8009
edb8f44f
PE
8010 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
8011 this confuses xgettext.
8012
b50d2359
AD
80132005-10-02 Akim Demaille <akim@epita.fr>
8014
8015 * bootstrap (gnulib_modules): Add strverscmp.
8016 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
8017 * m4/.cvsignore: Add strverscmp.m4.
8018 * src/parse-gram.y (%require): New token, new rule.
8019 (version_check): New.
8020 * src/scan-gram.l (%require): Adjust.
8021 * tests/input.at (AT_REQUIRE): New.
8022 Use it.
8023 * doc/bison.texinfo (Require Decl): New.
8024 (Calc++ Parser): Use %require.
8025
21667f64
AD
80262005-10-02 Akim Demaille <akim@epita.fr>
8027
8028 * data/location.cc: New.
8029
2b81e969
AD
80302005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
8031 Akim Demaille <akim@epita.fr>
8032
8033 Make sure -odir/foo.cc creates dir/location.hh etc.
8034 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
8035 (spec_file_prefix, spec_verbose_file, spec_graph_file)
8036 (spec_defines_file): Now const.
8037 (dir_prefix): New.
8038 (short_base_name): Remove.
8039 * src/files.c: Adjust.
8040 (dirname.h): Include.
8041 (base_name): Don't prototype it.
8042 (finput): Remove, duplicates gram_in.
8043 (full_base_name, short_base_name): Replace by...
8044 (all_but_ext, all_but_tab_ext): these.
8045 (compute_base_names): Rename as...
8046 (compute_file_name_parts): this.
8047 Update to compute the new variables, including dir_prefix.
8048 Adjust dependencies.
8049 * src/output.c (prepare): Output them.
8050 * src/reader.c: Adjust to use gram_in, not finput.
8051 * src/scan-skel.l (@dir_prefix@): New.
8052
ad6a9b97
JMG
80532005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8054
8055 * lib/subpipe.c: New function end_of_output_subpipe() added
8056 to allow support for non-posix systems. This is a no-op function
8057 for posix systems.
8058
8059 * lib/subpipe.h: New function end_of_output_subpipe() added
8060 to allow support for non-posix systems. This is a no-op function
8061 for posix systems.
8062
8063 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
8064 handle the lack of pipe/fork functionality on non-posix systems.
8065
8066 * djgpp/Makefile.maint: DJGPP specific file.
8067
8068 * djgpp/README.in: DJGPP specific file.
8069
8070 * djgpp/config.bat: DJGPP specific configuration file.
8071
8072 * djgpp/config.sed: DJGPP specific configuration file.
8073
8074 * djgpp/config.site: DJGPP specific configuration file.
8075
8076 * djgpp/config_h.sed: DJGPP specific configuration file.
8077
8078 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
8079
8080 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
8081
fc695704
AD
80822005-10-02 Akim Demaille <akim@epita.fr>
8083
8084 * data/location.cc: New, extract from...
8085 * data/lalr1.cc: here.
8086 (location.hh): Include it after the user prologue, in case the
8087 filename type is defined by the user.
8088 Forward declation location and position before the pre-prologue.
8089 (yyresult_): Rename as...
8090 (yyresult): this, it's a local variable, not an attribute.
8091 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
8092
80932005-10-01 Akim Demaille <akim@epita.fr>
5215c87f
AD
8094
8095 * examples/extexi: Restore the #line generation.
8096
fb9712a9
AD
80972005-09-30 Akim Demaille <akim@epita.fr>,
8098 Alexandre Duret-Lutz <adl@gnu.org>
8099
8100 Move the token type and YYSTYPE in the parser class.
8101 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
8102 (parser::token): New, from the moved free definition of tokens.
8103 (parser::semantic_value): Now a full definition instead of an
8104 indirection to YYSTYPE.
8105 (b4_post_prologue): No longer included in the header file, but
8106 in the implementation file.
8107 * doc/bison.texi (C+ Language Interface): Update.
8108 * src/parse-gram.y: Support unary %define.
8109 * tests/actions.at: Define global_tokens_and_yystype for backward
8110 compatibility until we update the tests.
8111 * tests/calc.at: Idem.
8112 (first_line, first_column, last_line, last_column): Define for lalr1.cc
8113 to simplify the code.
8114
55f0c7b1
PE
81152005-09-29 Paul Eggert <eggert@cs.ucla.edu>
8116
8117 Port to SunOS 4.1.4, which lacks strtoul and strerror.
8118 Ah, the good old days! Problem reported by Peter Klein.
8119 * bootstrap (gnulib_modules): Add strerror, strtoul.
8120 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
8121 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
8122
fb9712a9 81232005-09-29 Akim Demaille <akim@epita.fr>
d4fb5e3c
AD
8124
8125 * data/c.m4 (b4_error_verbose_if): New.
8126 * data/lalr1.cc: Use it.
8127 (YYERROR_VERBOSE_IF): Remove.
8128 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
8129 parser members, replaced by...
8130 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
8131 local variables.
8132 (yysyntax_error_): Takes the state number as argument.
8133 (yyreduce_print_): Use the argument yyrule, not the former
8134 attribute yyn_.
8135
8a6f72f3
PE
81362005-09-26 Paul Eggert <eggert@cs.ucla.edu>
8137
8138 * bootstrap (gnulib_modules): Add verify.
8139 * lib/.cvsignore: Add verify.h.
8140 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
8141 * src/system.h (verify): Remove.
8142 Include verify.h instead.
8143 * src/tables.c (tables_generate): Use new API for 'verify'.
8144
0d50976f
PE
81452005-09-21 Paul Eggert <eggert@cs.ucla.edu>
8146
ebc3737e
PE
8147 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
8148 local variables whose names begin with 'yy'.
8149 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
8150 Trivial changes from Joel E. Denny.
8151
0d50976f
PE
8152 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
8153 it itself.
8154 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
8155 don't use alloca any more.
8156
8157 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
8158 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
62c4328e 8159 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
0d50976f
PE
8160 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
8161 to match yacc.c, to test more hosts.
8162
a05b79df
PE
81632005-09-20 Paul Eggert <eggert@cs.ucla.edu>
8164
55289366
PE
8165 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
8166 doesn't affect behavior.
8167 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
8168 Solaris, AIX, MSC.
8169 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
8170 This works a bit better with glibc, if user code has already included
8171 stdlib.h.
8172 * doc/bison.texinfo (Bison Parser): Document that users can't
8173 arbitrarily use malloc and free for other purposes. Document
8174 that <alloca.h> and <malloc.h> might be included.
8175 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
8176 user must declare alloca.
8177
a05b79df
PE
8178 * HACKING (release): Forwarn the Translation Project about
8179 stable releses.
8180
3ab2ca22
AD
81812005-09-20 Akim Demaille <akim@epita.fr>
8182
8183 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
8184
a9739e7c
PE
81852005-09-19 Paul Eggert <eggert@cs.ucla.edu>
8186
a702593e
PE
8187 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
8188 (YYSTACK_ALLOC_MAXIMUM): Use it.
8189 (yysyntax_error): New function.
8190 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
8191 multiple syntax errors are reported, and alloca is being used.
8192 Instead, reallocate buffers twice as big each time, so that
8193 we waste at most half the allocated memory. Start with a small
8194 (128-byte) buffer that will suffice in most cases anyway.
8195 Use yysyntax_error to do most of the work.
8196
8197 * doc/bison.texinfo (Error Reporting, Table of Symbols):
8198 yynerrs is the number of errors reported, not the number of
8199 errors encountered.
8200
a9739e7c
PE
8201 * tests/glr-regression.at (Duplicated user destructor for lookahead):
8202 Mark it as expected to fail.
8203 Cast result of malloc; problem reported by twlevo@xs4all.nl.
8204 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
8205 Don't start user-code symbols with "yy", to avoid name space problems.
8206
f479c6c6
AD
82072005-09-19 Akim Demaille <akim@epita.fr>
8208
8209 Remove the traits, failed experiment.
8210 It never proved useful, and anyway because of the current
8211 definition, it was not possible to have several specialization of
8212 this traits, making it useless.
8213 * data/lalr1.cc (yy:traits): Remove.
8214 Inline its definitions in the parser class.
8215
e2586f82
AD
82162005-09-19 Akim Demaille <akim@epita.fr>
8217
8218 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
8219 least Mac OSX with a /usr/local install of gettext.
8220
2e8cf949
AD
82212005-09-19 Akim Demaille <akim@epita.fr>
8222
8223 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
8224 and yytoken for similarity with the other skeletons.
8225
c7fb0b90
AD
82262005-09-19 Akim Demaille <akim@epita.fr>
8227
4e26c69e 8228 * NEWS, configure.ac: update version number to 2.1a.
c7fb0b90 8229
1bd0deda
PE
82302005-09-16 Paul Eggert <eggert@cs.ucla.edu>
8231
8232 * NEWS: Version 2.1.
8233
8234 * NEWS: Remove notice of yytname change, since it was never in an
8235 official release.
8236 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
8237 diagnostic.
8238 * src/output.c (prepare): Likewise.
8239 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
8240 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
8241 is not defined. This is an awful hack, but it's enough for now.
8242 All callers changed.
8243 * tests/glr-regression-at (make_value): Args are const pointers now,
8244 to avoid GCC warning.
8245 (Duplicated user destructor for lookahead): New test. Currently
8246 skipped. It fails on my host but I'm not sure it'll always fail.
8247
82482005-09-16 Akim Demaille <akim@epita.fr>
c1432f65
AD
8249
8250 * src/symtab.h (struct symbol): Declare the printer and destructor
8251 as const, to avoid accidental calls to free.
8252 (symbol_destructor_set, symbol_printer_set): Adjust.
8253 * src/symtab.c: Adjust.
8254
1bd0deda 82552005-09-16 Akim Demaille <akim@epita.fr>
cf147260
AD
8256
8257 * data/c.m4 (b4_token_enums): New.
8258 (b4_token_defines): Rename as...
8259 (b4_token_enums_defines): this.
8260 (b4_token_defines): New, output only the #defines.
8261 * data/yacc.c, data/glr.c: Adjust.
8262 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
8263 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
8264 as default values.
8265
dbcdae2d
AD
82662005-09-16 Akim Demaille <akim@epita.fr>
8267
8268 * data/lalr1.cc (yylex_): Remove, inline its code.
8269 (yyreport_syntax_error_): Remove, replaced by...
8270 (yysyntax_error_): this which returns a string and leaves to the
8271 caller the call to the users' error function.
8272 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
8273 Move from members of the parser object...
8274 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
8275 to local variables of the parse function.
8276
70d8f291
AD
82772005-09-16 Akim Demaille <akim@epita.fr>
8278
8279 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
8280 since it's in Bison's name space.
8281
b47dbebe
PE
82822005-09-15 Paul Eggert <eggert@cs.ucla.edu>
8283
ae199bf1
PE
8284 * data/glr.c (yyresolveValue): Add default case to pacify
8285 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
8286
b47dbebe
PE
8287 * NEWS: Document when yyparse started to return 2.
8288 * doc/bison.texinfo (Parser Function): Document when yyparse
8289 returns 2.
8290
8291 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
8292 (b4_filename_type): Renamed back from b4_file_name_type. All uses
8293 changed.
8294 (class position): file_name -> filename (reverting). All uses changed.
8295
82962005-09-14 Paul Eggert <eggert@cs.ucla.edu>
8297
8298 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
8299 do anything if $@ exists. This reverts part of the 2005-07-07
8300 patch.
8301
00292f66
PE
83022005-09-11 Paul Eggert <eggert@cs.ucla.edu>
8303
8304 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
8305 contains obsolete information and isn't worth distributing as a
8306 separate file anyway.
8307 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
8308 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
8309 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
8310 (yyparse): Abort if user code uses longjmp to throw an unexpected
8311 value.
8312
a420f962
PE
83132005-09-09 Paul Eggert <eggert@cs.ucla.edu>
8314
00292f66
PE
8315 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
8316 Suggested by twlevo@xs4all.nl.
8317
127287e9
PE
8318 * data/glr.c (YYCHK1): Do not assume YYE is in range.
8319 This avoids a diagnostic from gcc -Wswitch-enum.
8320 Problem reported by twlevo@xs4all.nl.
8321
a420f962
PE
8322 * doc/bison.texinfo: Don't use "filename", as per GNU coding
8323 standards. Use "file name" or "file" or "name", depending on
8324 the context.
8325 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
8326 not to hack/foo.tab.c.
8327 (Calc++ Top Level): 2nd arg of main is not const.
48b16bbc
PE
8328 * data/glr.c: b4_filename -> b4_file_name.
8329 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
8330 All uses changed.
8331 (class position): filename -> file_name. All uses changed.
8332 * data/yacc.c: b4_filename -> b4_file_name.
8333 * lib/bitset.h: filename -> file_name in local vars.
8334 * lib/bitset_stats.c: Likewise.
8335 * src/files.c: Likewise.
8336 * src/scan-skel.l ("@output ".*\n): Likewise.
8337 * src/files.c (file_name_split): Renamed from filename_split.
8338 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
a420f962
PE
8339
83402005-09-08 Paul Eggert <eggert@cs.ucla.edu>
8341
8342 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
8343 to accommodate latest gnulib.
8344
8345 * tests/glr-regression.at (Duplicate representation of merged trees):
8346 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
8347
8348 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
8349 needed.
8350
42a6501d
PE
83512005-08-26 Paul Eggert <eggert@cs.ucla.edu>
8352
8353 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
8354 All uses changed. Invoke user destructor after an error during a
8355 split parse (trivial change from Joel E. Denny).
8356
8357 * tests/glr-regression.at
8358 (User destructor after an error during a split parse): New test case.
8359 Problem reported by Joel E. Denny in:
8360 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
8361
ef9a1faf
PE
83622005-08-25 Paul Eggert <eggert@cs.ucla.edu>
8363
5b4aaf78
PE
8364 * README-cvs: Give URLs for recommended tools.
8365 Mention Gzip version problem, and bootstrapping issues.
8366 Remove troubleshooting section, as it's somewhat obsolete.
8367
b5240ba5
PE
8368 * bootstrap (no_cache): New var, to accommodate different wget
8369 variants. Use it instead of '-C off'. Problem reported by
8370 twlevo@xs4all.nl.
8371
ef9a1faf
PE
8372 * data/glr.c (yydestroyStackItem): New function.
8373 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
8374 debugging information. Problem reported by Joel E. Denny.
8375
e6efa9da
AD
83762005-08-25 Akim Demaille <akim@epita.fr>
8377
8378 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
8379
adc90f13
PE
83802005-08-24 Paul Eggert <eggert@cs.ucla.edu>
8381
8382 * data/glr.c (yyrecoverSyntaxError, yyreturn):
8383 Don't invoke destructor on unresolved entries.
8384 * tests/glr-regression.at
8385 (User destructor for unresolved GLR semantic value): New test case.
8386 Problem reported by Joel E. Denny in:
8387 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
8388
f9315de5
PE
83892005-08-21 Paul Eggert <eggert@cs.ucla.edu>
8390
15d29c1f
PE
8391 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
8392 Add strnlen.c.
8393 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
8394 lib-prefix.m4, po.m4.
8395
dd5f2af2
PE
8396 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
8397 in yydestruct diagnostic, since it might not be an error.
8398 Problem reported by Joel Denny near end of
8399 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6250acbd 8400 * data/lalr1.cc (yyerturn): Likewise.
dd5f2af2
PE
8401 * data/yacc.c (yyreturn): Likewise.
8402 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
8403
8404 * src/files.c: Remove obsolete FIXME comment.
8405
8406 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
8407 with the other templates, and to fix bogus run-on messages such
8408 as the one reported at the end of
8409 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
8410 All callers changed to avoid the newline.
8411 (yyprocessOneStack): Output two lines rather than one, to accommodate
8412 the above change. This changes the debug output format slightly.
8413
f9315de5
PE
8414 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
8415 reported by Joel E. Denny in
8416 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
8417 (trivial change).
8418 * tests/glr-regression.at (Duplicate representation of merged trees):
8419 New test, from Joel E. Denny in:
8420 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
8421 * THANKS: Add Joel E. Denny.
8422
8423 * configure.ac (AC_INIT): Bump to 2.0c.
8424
04098407
PE
84252005-07-24 Paul Eggert <eggert@cs.ucla.edu>
8426
8427 * NEWS: Version 2.0b.
8428
ca5d2013
PE
8429 * Makefile.am (SUBDIRS): Put examples before tests, so that
8430 "make check" doesn't finish with "All 1 tests passed".
8431
3d54b576
PE
8432 * tests/regression.at (Token definitions): Don't rely on
8433 AT_PARSER_CHECK for data that contains backslashes. It currently
8434 uses 'echo', and 'echo' isn't portable if its argument contains
8435 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
8436 that the byte '\0xff' is not printable in the C locale; it is,
8437 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
8438 not printable, so use '\0x81' to test.
8439
d53ae497
PE
8440 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
8441 version of GCC, since the macro is used with non-GCC compilers.
8442
fc01665e
PE
8443 Fix core dump reported by Pablo De Napoli in
8444 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
8445 * tests/regression.at (Invalid inputs with {}): New test.
8446 * src/parse-gram.y (token_name): Translate type before using
8447 it as an index.
8448
04098407
PE
8449 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
8450 the user's name space. All uses changed to __attribute__
8451 ((__unused__)).
8452 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
8453 Add __attribute__ ((__noreturn__)).
8454
8455 * etc/clcommit: Remove. We weren't using it, and it failed
8456 "make maintainer-distcheck".
8457 * Makefile.maint: Merge from coreutils.
8458 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
8459 (syntax-check-rules): Change list of rules as described below.
8460 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
8461 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
8462 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
8463 (sc_trailing_space): New rules.
8464 (sc_xalloc_h_in_src): Remove.
8465 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
8466 (sc_space_tab, sc_error_exit_success, sc_changelog):
8467 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
8468 (makefile-check, po-check, author_mark_check):
8469 (makefile_path_separator_check, copyright-check):
8470 Use grep -n, to make it easier to find violations.
8471 Use CVS_LIST and CVS_LIST_EXCEPT.
8472 (header_regexp, h_re): Remove.
8473 (dd_c): New macro.
8474 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
8475 (my-distcheck): Use more-modern GCC flags.
8476 (signatures, %.asc): Remove.
8477 (rel-files, announcement): Remove signatures.
8478 Restore old updating code, even though we don't use it, so
8479 that we're the same as coreutils.
8480 (alpha, beta, major): Depend on news-date-check.
8481 Make the upload commands.
8482
8483 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
8484 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
8485 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
8486 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
8487 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
8488 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
8489 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
8490 * tests/sets.at: Likewise.
8491
8492 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
8493 we comment out the Autoconf version number.
8494 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
8495 it's error-prone and "make maintainer-distcheck" rejects it.
8496
8497 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
8498 Indent calls to "error" to pacify "make maintainer-distcheck",
8499 when the calls are not intended to be translated.
8500 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
8501
8502 * src/Makefile.am (DEFS): Use +=, to pacify
8503 "make maintainer-distcheck".
8504 (bison_SOURCES): Add scan-skel.h.
8505 (sc_tight_scope): New rule, from coreutils.
8506
8507 * src/files.c (src_extension, header_extension):
8508 Now static, not extern.
8509 * src/getargs.c (short_options): Likewise.
8510 * src/muscle_tab.c (muscle_table): Likewise.
8511 * src/parse-gram.y (current_class, current_type, current_prec):
8512 Likewise.
8513 * src/reader.c (grammar_end, previous_rule_end): Likewise.
8514 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
8515 * src/main.c (main): Cast bindtextdomain and textdomain calls to
8516 void, to avoid warning when NLS is disabled.
8517 * src/output.c: Include scan-skel.h.
8518 (scan_skel): Remove decl, since scan-skel.h does this.
8519 (output_skeleton):
8520 Indent calls to "error" to pacify "make maintainer-distcheck".
8521 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
8522 * src/reader.h (gram_end, gram_lineno): New decls to pacify
8523 "make maintainer-distcheck".
8524 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
8525 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
8526 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
8527 (skel_lex_destroy, scan_skel): Move these decls to...
8528 * src/scan-skel.h: New file.
8529 * src/uniqstr.c (uniqstr_assert):
8530 Indent calls to "error" to pacify "make maintainer-distcheck".
8531
8532 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
8533 not @VAR@.
8534
8535 * tests/torture.at: Revamp to avoid misuse of atoi that
8536 "make maintainer-distcheck" complained about.
8537
8538 * examples/extexi (message): Don't print a message more than once,
8539 and omit line-number decoration that makes Emacs compile think
8540 that informative messages are worth worrying about.
8541
85422005-07-22 Paul Eggert <eggert@cs.ucla.edu>
8543
8544 * configure.ac: Update version number.
8545
8546 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
8547 accidentally.
8548 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
8549 autogenerated by the maintainer.
8550 * examples/calc++/.cvsignore: Add *.yy.
8551
8552 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
8553 * lib/bitset_stats.c (bitset_stats_init): Likewise.
8554 * lib/bitsetv.c (bitsetv_alloc): Likewise.
8555
8556 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
8557
8558 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
8559 from maintainer-distcheck about casting the argument of 'free'.
8560
8561 * NEWS: Mention recent yytname changes.
8562 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
8563
8564 * bootstrap: For translations that have not yet been upgraded to
8565 the new runtime-po domain, prime the pump by extracting the
8566 relevant strings from the obsolete translations. This code can be
8567 removed once the bison-runtime domain has been translated by each
8568 team.
8569
8570 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
8571 now that token names are already quoted.
8572
8573 Fix problem reported by Anthony Heading.
8574 * data/glr.c (YYTOKEN_TABLE): New macro.
8575 (yytname): Define if YYTOKEN_TABLE.
8576 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
8577 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
8578 (YYERROR_VERBOSE): Define the same way the other skeletons do.
8579 * src/output.c (prepare_symbols): Output token_table_flag.
8580
0ffda363
PE
85812005-07-21 Paul Eggert <eggert@cs.ucla.edu>
8582
8583 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
8584 again if the first call fails.
8585
8586 * data/glr.c (yytnamerr): New function.
8587 (yyreportSyntaxError): Use it to dequote most string literals.
8588 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
8589 with other skeletons. All uses changed.
8590 (yytnameerr_): New function.
8591 (yyreport_syntax_error): Use it to dequote most string literals.
8592 * data/yacc.c (yytnamerr): New function.
8593 (yyerrlab): Use it to decode most string literals.
8594 * doc/bison.texinfo (Decl Summary, Calling Convention):
8595 Clarify quoting convention of yytname.
8596 * src/output.c (prepare_symbols): Quote all names. This undoes
8597 the 2005-04-17 change, which is now accomplished (mostly) via
8598 changes in the parsers as described above.
8599 * tests/regression.at (Token definitions, Web2c Actions):
8600 Undo most 2005-04-17 change here, too.
8601
86022005-07-20 Paul Eggert <eggert@cs.ucla.edu>
8603
8604 Fix more problems reported by twlevo@xs4all.nl.
8605 * tests/cxx-type.at: Don't pipe output of ./types through sed to
8606 remove trailing spaces. This loses the exit status of ./types,
8607 and isn't needed since ./types shouldn't be emitting trailing
8608 spaces.
8609 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
8610 as the stack isn't valid in that case.
8611
8612 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
8613 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
8614 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
8615 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
8616 is used.
8617 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
8618 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
8619 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
8620 Likewise.
8621
8622 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
8623 overly-picky compilers that reject 'char *foo = "bar";'.
8624
8625 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
8626 to FILE * parameter, not to stderr. This fixes a typo introduced
8627 in the 2005-07-12 change.
8628
8629 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
8630 warnings from GCC 4.
8631
8632 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
8633 (yyglrShiftDefer, yysplitStack):
8634 Remove unused parameters b4_pure_formals. All uses changed.
8635 (yyglrShift): Remove unused parameters b4_user_formals.
8636 All uses changed.
8637 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
8638
6100a9aa
PE
86392005-07-18 Paul Eggert <eggert@cs.ucla.edu>
8640
258b75ca
PE
8641 Destructor cleanups and regularization among the three skeletons.
8642 * NEWS: Document the behavior changes.
8643 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
8644 stack before failing, as the cleanup code will do it for us now.
8645 * data/lalr1.cc (yyerrlab): Likewise.
8646 * data/glr.c (yyparse): Pop everything off the stack before
8647 freeing it, so that destructors get called properly.
8648 * data/lalr1.cc (yyreturn): Likewise.
8649 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
8650 This is more consistent.
8651 * doc/bison.texinfo (Destructor Decl): Mention more reasons
8652 why destructors might be called. 1.875 -> 2.1.
8653 (Destructor Decl, Decl Summary, Table of Symbols):
8654 Some English-language cleanups for %destructor.
8655 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
8656 Add output line for destructor of start symbol.
8657 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
8658 because of that same extra output line.
8659
1a059451
PE
8660 * NEWS: Document minor wording changes in diagnostics of
8661 Bison-generated parsers.
8662 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
8663 Remove unused formals. All uses changed.
8664 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
8665 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
8666 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
8667 Rename yyoverflowab to yyexhaustedlab.
8668 When memory exhaustion occurs during syntax-error reporting,
8669 report it separately rather than in a single diagnostic; this
8670 eases translation.
8671 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
8672 (Memory Exhausted): Renamed from Parser Stack Overflow.
8673 Revamp wording slightly to prefer "memory exhaustion".
8674 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
8675
97460c78
PE
8676 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
8677
30757c8c
PE
8678 Add i18n support to the GLR skeleton. Partially fix the C++
8679 skeleton; a C++ expert needs to finish this. Remove debugging
8680 msgids; there's little point to having them translated, since they
8681 can be understood only by someone who can read the
8682 (English-language) source code.
8683
8684 Generate runtime-po/bison-runtime.pot automatically, so that we
8685 don't have to worry about garbage getting in that file. We'll
8686 make sure after the next official release that old msgids don't
8687 get lost. See
8688 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
8689
8690 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
8691 Now auto-generated.
8692 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
8693 Fix typos in explanations of the runtime file.
8694 * bootstrap: Change gettext keyword from YYI18N to YY_.
8695 Use standard Makefile.in.in in runtime-po, since we'll arrange
8696 for backward-compatible bison-runtime.po files in a different way.
8697 * data/glr.c (YY_): New macro, from yacc.c.
8698 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
8699 Translate messages intended for users.
8700 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
8701 the wording in the other skeletons. We don't know that the memory
8702 is virtual.
8703 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
8704 Use same method that yacc.c uses.
8705 Don't translate debugging messages.
8706 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
8707 it doesn't work (yet), and requires C++ expertise to fix.
8708 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
8709 Move defn to a more logical place, to be consistent with other
8710 skeletons.
8711 Don't translate debugging messages.
8712 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
8713 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
8714 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
8715 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
8716
ac8c5689
PE
8717 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
8718 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
8719 void, not int.
8720 * tests/glr-regression.at (Badly Collapsed GLR States):
8721 Likewise.
8722 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
8723 yylex should return 0 at EOF rather than aborting.
8724
6100a9aa
PE
8725 Improve tests for stack overflow in GLR parser.
8726 Problem reported by twlevo@xs4all.nl.
8727 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
8728 All uses removed.
8729 (yyStackOverflow): Just longjmp, but with value 2 so that caller
8730 can handle the problem.
8731 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
8732 (yyparse): New local variable yyresult to record the result.
8733 Use result of setjmp to set it, rather than storing itinto
8734 struct.
8735 (yyDone): Remove label.
8736 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
8737 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
8738 if YYABORT is used).
8739 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
8740 yyparse status; put status > 1 into diagnostic.
8741 Check that status==2 works.
8742 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
8743 Use exit status 3 for failure to open (which shouldn't happen).
8744
15f40952
PE
87452005-07-17 Paul Eggert <eggert@cs.ucla.edu>
8746
67fd79c4
PE
8747 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
8748 1 on syntax error; just let yyparse do its thing.
8749 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
8750 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
8751 (Exploding the Stack Size with Alloca):
8752 (Exploding the Stack Size with Malloc):
8753 Expect exit status 2, not 1, since the parser is supposed to blow
8754 its stack. Problem reported by twlevo@xs4all.nl.
8755
15f40952
PE
8756 * data/glr.c (yyparse): Don't assume that the initial calls
8757 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
8758 Print a stack-overflow message and fail instead.
8759 Initialize the line-number information before creating the stack,
8760 so that the stack-overflow message can report line zero safely.
8761
f32c66b5
PE
87622005-07-14 Paul Eggert <eggert@cs.ucla.edu>
8763
a22ff96f 8764 Fix problems reported by twlevo@xs4all.nl.
e2688cd9
PE
8765 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
8766 (yyuserMerge): Provide a default case if b4_mergers is empty.
8767 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
8768 * tests/glr-regression.at
8769 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
c70fdfcd 8770 Add casts to pacify C++ compilers.
1beb0b24
PE
8771 * tests/glr-regression.at (Improper merging of GLR delayed action
8772 sets): Declare yylex before using it.
f32c66b5 8773 * tests/Makefile.am (maintainer-check-g++): Fix a stray
a22ff96f
PE
8774 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
8775 test for valgrind; valgrind is independent of g++.
8776 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
8777 for compatibility with POSIX 1003.1-2001 (if running coreutils).
8778 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
8779 Use a destructor, so that we can expand the stack. Change
8780 YYSTYPE to char * so that we can free it. Cast result of malloc.
f32c66b5 8781
d741bd1b
PE
87822005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
8783
8784 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
8785 a valgrind failure. Problem reported by twlevo@xs4all.nl.
8786
0410a6e0
PE
87872005-07-13 Paul Eggert <eggert@cs.ucla.edu>
8788
8789 * PACKAGING: New file, suggested by Bruno Haible and taken from
8790 similar wording in gettext's PACKAGING file.
8791 * NEWS: Mention PACKAGING.
8792 * Makefile.am (EXTRA_DIST): Add PACKAGING.
8793
f7ab6a50
PE
87942005-07-12 Paul Eggert <eggert@cs.ucla.edu>
8795
baf785db 8796 * NEWS: Document recent i18n improvements.
f7ab6a50
PE
8797 * bootstrap: Get runtime translations into runtime-po.
8798 Create runtime-po files automatically, if possible.
8799 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
8800 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
8801 does not infringe on the user's name space.
8802 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
8803 * doc/bison.texinfo (Internationalization): Revamp the English
8804 and Texinfo syntax a bit, to try to make it clearer.
8805 (Bison Options, Option Cross Key): Mention --print-localedir.
8806 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
8807 YYENABLE_NLS. Quote a bit more.
8808 * runtime-po/.cvsignore: New file.
8809 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
8810 * runtime-po/Rules-quot: Remove; now created by bootstrap.
8811 * runtime-po/quot.sed: Likewise.
8812 * runtime-po/boldquot.sed: Likewise.
8813 * runtime-po/en@quot.header: Likewise.
8814 * runtime-po/en@boldquot.header: Likewise.
8815 * runtime-po/insert-header.sin: Likewise.
8816 * runtime-po/remove-potcdate.sin: Likewise.
8817 * runtime-po/Makevars: Likewise.
8818 * runtime-po/LINGUAS: Likewise.
8819 * runtime-po/de.po: Likewise; we will rely on the translation project
8820 to maintain this, so "bootstrap" should get it.
0410a6e0 8821 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
f7ab6a50
PE
8822 its value.
8823 * src/main.c (main): Bind the bison-runtime domain, too.
8824
88252005-07-12 Bruno Haible <bruno@clisp.org>
8826
8827 * data/yacc.c: Include <libintl.h> when NLS is enabled.
8828 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
8829 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
8830 * runtime-po: New directory.
8831 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
8832 $(DOMAIN).pot-update rule, so that old messages are never dropped.
8833 * runtime-po/Rules-quot: New file, copied from po/.
8834 * runtime-po/quot.sed: Likewise.
8835 * runtime-po/boldquot.sed: Likewise.
8836 * runtime-po/en@quot.header: Likewise.
8837 * runtime-po/en@boldquot.header: Likewise.
8838 * runtime-po/insert-header.sin: Likewise.
8839 * runtime-po/remove-potcdate.sin: Likewise.
8840 * runtime-po/Makevars: New file.
8841 * runtime-po/POTFILES.in: New file.
8842 * runtime-po/LINGUAS: New file.
8843 * runtime-po/bison-runtime.pot: New file.
8844 * runtime-po/de.po: New file.
8845 * m4/bison.m4: New file.
8846 * Makefile.am (SUBDIRS): Add runtime-po.
8847 (aclocaldir, aclocal_DATA): New variables.
8848 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
8849 Define aclocaldir.
8850 * src/getargs.c (usage): Document --print-localedir option.
8851 (PRINT_LOCALEDIR_OPTION): New enum item.
8852 (long_options): Add --print-localedir option.
8853 (getargs): Handle --print-localedir option.
8854 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
8855 (Internationalization): New section.
8856
22dda0f0
AD
88572005-07-12 Akim Demaille <akim@epita.fr>
8858
8859 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
8860 for consistency with the rest of the code.
8861 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
8862 Add separators.
8863
82b248ad
AD
88642005-07-12 Akim Demaille <akim@epita.fr>
8865
8866 * src/parse-gram.y: Use %printer instead of YYPRINT.
8867
fa0e9314
AD
88682005-07-12 Akim Demaille <akim@epita.fr>
8869
867a3e00
AD
8870 * src/symtab.h, src/symtab.c (symbol_print): New.
8871 * src/symlist.h, src/symlist.c (symbol_list_print): New.
8872 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
8873
88742005-07-12 Akim Demaille <akim@epita.fr>
8875
8876 * data/glr.c (b4_syncline): Fix (swap) the definitions of
fa0e9314
AD
8877 b4_at_dollar and b4_dollar_dollar.
8878
e054b190
PE
88792005-07-11 Paul Eggert <eggert@cs.ucla.edu>
8880
8881 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
8882 and Pennello's paper.
8883
34160ec4
PE
88842005-07-09 Paul Eggert <eggert@cs.ucla.edu>
8885
407d4a75
PE
8886 * data/yacc.c (yyparse): Undo previous patch. Instead,
8887 set yylsp[0] and yyvsp[0] only if the initial action
8888 sets yylloc and yylval, respectively.
8889
34160ec4
PE
8890 * data/yacc.c (yyparse): In the initial action, set
8891 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
8892 This avoids the use of undefined variables if the initial
8893 action does not set yylloc and/or yylval.
8894
c3d5a4a7
PE
88952005-07-07 Paul Eggert <eggert@cs.ucla.edu>
8896
b34d96c1
PE
8897 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
8898 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
8899 Remove from CVS. These files are automatically generated.
8900 * examples/extexi: Clarify that this file is now part of Bison,
8901 not GNU M4, and that it works with any POSIX-compatible Awk.
8902 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
8903 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
8904 so that we also get calc++-parser.yy. Geneate it.
8905 Use $(AWK), not gawk, since any conforming Awk will do.
8906 Put comment before action, since older 'make' can't handle comment
8907 in action.
8908 $(BUILT_SOURCES): List all built sources, not just some of them.
8909 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
8910 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
8911 $($(calc_sources_generated)): Remove unnecessary test for existence
8912 of target. (This had a shell syntax error anyway; a stray "x".)
8913 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
8914 calc++-parser.yy.
8915 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
8916
c3d5a4a7
PE
8917 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
8918 implied by the other modules.
8919
828c373b
AD
89202005-07-06 Akim Demaille <akim@epita.fr>
8921
8922 Bind examples/calc++ to the package.
8923 * examples/calc++/Makefile: Remove, replaced by...
8924 * examples/calc++/Makefile.am: ... this new file.
8925 * examples/calc++/test: Remove input.
8926 * examples/calc++/compile: Remove.
8927 * examples/Makefile.am: New.
8928 * configure.ac, Makefile.am: Adjust.
8929 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
8930
63cb01d6
PE
89312005-07-05 Paul Eggert <eggert@cs.ucla.edu>
8932
fd2df2ed
PE
8933 * data/glr.c (yyFail): Drastically simplify; since the format argument
8934 never had any % directives, we can simply pass it to yyerror.
8935 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
8936 be modified later, as that is the usual style in glr.c.
8937 Problems reported by Paul Hilfinger.
8938
63cb01d6
PE
8939 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
8940 and size overflow errors.
8941 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
8942 in case the user prolog sets feature-test macros like _GNU_SOURCE.
8943 (YYSIZEMAX): New macro.
8944 (yystpcpy): New function, taken from yacc.c.
8945 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
8946 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
8947 so that we don't have to maintain their signatures.
8948 (yyFail): Check for buffer overflow, by using vsnprintf rather
8949 than vsprintf. Allocate a bigger buffer if possible.
8950 Report an error if buffer allocation fails.
8951 (yyStackOverflow): New function.
8952 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
8953 the initialization was successful. It might fail if storage was
8954 exhausted.
8955 (yyexpandGLRStack): Add more checks for storage allocation failure.
8956 Use yyStackOverflow to report failures.
8957 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
8958 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
8959 Don't assume stack number fits in int.
8960 (yysplitStack): Check for storage allocation failure.
8961 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
8962 can print diagnostics on storage allocation failure. All callers
8963 changed.
8964 (yyresolveValue): Use yybool for boolean.
8965 (yyreportSyntaxError): Check for size-calculation overflow.
8966 This code is taken from yacc.c.
8967 (yyparse): Check for storage allocation errors when allocating
8968 the initial stack.
8969
1c59e0a1
AD
89702005-07-05 Akim Demaille <akim@epita.fr>
8971
8972 Extract calc++ from the documentation.
8973 * doc/bison.texinfo (Calc++): Add the extraction marks.
8974 * examples/extexi: New, from the aborted GNU Programming 2E.
8975 Separate the different paragraph of a file with empty lines.
8976 * examples/Makefile: Use it to extract the whole calc++ example.
8977
8a0adb01
AD
89782005-06-24 Akim Demaille <akim@epita.fr>
8979
8980 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
8981 class typedefs.
8982
12545799
AD
89832005-06-22 Akim Demaille <akim@epita.fr>
8984
8985 * doc/bison.texinfo (C++ Language Interface): First stab.
8986 (C++ Parsers): Remove.
8987
99be0235
AD
89882005-06-22 Akim Demaille <akim@epita.fr>
8989
8990 * data/lalr1.cc (yylex_): Honor %lex-param.
8991
0ffd4fd1
AD
89922005-06-22 Akim Demaille <akim@epita.fr>
8993
8994 Start a set of simple examples.
8995 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
8996 * examples/calc++/calc++-driver.hh,
8997 * examples/calc++/calc++-parser.yy,
8998 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
8999 * examples/calc++/compile, examples/calc++/test: New.
9000
0925ebb4
PE
90012005-06-09 Paul Eggert <eggert@cs.ucla.edu>
9002
9003 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
9004 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
9005 which stems from the 2005-05-27 patch.
9006
43d3b664
PH
90072005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9008
9009 * data/glr.c: Modify treatment of unused parameters to permit use
9010 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
9011
3062864d
PE
90122005-05-30 Paul Eggert <eggert@cs.ucla.edu>
9013
9014 Fix infringement on user name space reported by Janos Zoltan Szabo.
9015 * data/yacc.c (yyparse): strlen -> yystrlen.
9016
989b5b8e
AD
90172005-05-30 Akim Demaille <akim@epita.fr>
9018
9019 * data/lalr1.cc (_): New.
9020 Translate the various messages.
9021
bedf57f5
PE
90222005-05-27 Paul Eggert <eggert@cs.ucla.edu>
9023
9024 Fix infringement on user name space reported by Bruno Haible.
9025 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
9026 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
9027 the user's name space.
9028 (alloca): Include <stdlib.h> to get it, if it's not built in.
9029 (YYMALLOC, YYFREE): Define only if needed.
9030 (malloc, free): Declare, but only if needed, as this infringes on
9031 the user name space.
9032
4d1801f1
PE
90332005-05-25 Paul Eggert <eggert@cs.ucla.edu>
9034
9035 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
9036 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
9037 with %d format.
9038 * lib/ebitset.c (min, max): Undef before defining.
9039 * lib/vbitset.c (min, max): Likewise.
9040 * lib/subpipe.c (create_subpipe): Save local variables in case
9041 vfork clobbers them.
9042
90432005-05-24 Bruno Haible <bruno@clisp.org>
9044
9045 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
9046 error message syntax used by gcc-4.0.
9047
b94a9e1e
PE
90482005-05-23 Paul Eggert <eggert@cs.ucla.edu>
9049
85ac3861
PE
9050 * README: Mention m4 1.4.3. Remove obsolete advice about
9051 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
9052
b94a9e1e
PE
9053 * bootstrap: Remove workaround for problem I encountered with
9054 gettext 0.14.1; it seems to be fixed now.
9055
51c30d21
PE
90562005-05-22 Paul Eggert <eggert@cs.ucla.edu>
9057
009ce67d
PE
9058 * NEWS: Version 2.0a.
9059
f2a97c62
PE
9060 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
9061 the previous change.
9062
c8775f93
PE
9063 Various maintainer cleanups.
9064 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
9065 conftest*, for benefit of CVS commands run at the same time as
9066 "configure". Add build-aux, since "bootstrap" now creates it and
9067 its subfiles.
9068 * Makefile.cfg (move_if_change): Remove.
9069 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
9070 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
9071 (po_repo, do-po-update, po-update, wget_files, get-targets):
9072 (config.guess-url_prefix, config.sub-url_prefix):
9073 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
9074 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
9075 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
9076 Remove.
9077 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
9078 this is now the recommended name.
9079 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
9080 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
9081 ylwrap. These files now go into build-aux.
9082 * config/move-if-change: Remove.
9083 * config/prev-version.txt: Bump from 1.75 to 2.0.
9084
3ea5f0ec
PE
9085 * bootstrap: Add stdio-safer, unistd-safer modules.
9086 Remove m4/glibc2.m4 (introduced by latest gnulib, but
9087 we don't need it).
9088 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
9089 fopen-safer.c, stdio-safer.h, unistd-safer.h.
9090 * lib/subpipe.c: Include "unistd-safer.h".
9091 (create_subpipe): Make sure all the newly-created
9092 file descriptors are > 2, so that diagnostics don't
9093 get sent down them (which might cause Bison to hang, in theory).
9094 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
9095 * src/files.c (xfopen): Use fopen_safer, not fopen.
9096
51c30d21
PE
9097 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
9098 yesterday's yacc.c fix.
9099
cea1469d
PE
91002005-05-21 Paul Eggert <eggert@cs.ucla.edu>
9101
3ea5f0ec
PE
9102 * data/glr.c, data/lalr1.cc: Update copyright date.
9103
cea1469d
PE
9104 Fix a destructor bug reported by Wolfgang Spraul in
9105 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
9106 * data/yacc.c (yyabortlab): Don't call destructor, and
9107 don't set yychar to EMPTY.
9108 (yyoverflowlab): Don't call destructor.
9109 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
9110 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
9111 since we no longer output the message "discarding lookahead token
9112 end of input ()".
9113
5e6f62f2
PH
91142005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9115
9116 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
9117 fix a small glitch in debugging output.
9118 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
9119 after YY_SYMBOL_PRINT where needed.
9120
9121 (struct yyGLRState): Add some comments.
9122 (struct yySemanticOption): Add some comments.
9123 (union yyGLRStackItem): Add comment.
9124
9125 (yymergeOptionSets): Correct this to properly perform the union,
9126 avoiding infinite reported by Michael Rosien.
9127 Update comment.
9128
9129 * tests/glr-regression.at: Add test for GLR merging error reported
9130 by M. Rosien.
cea1469d 9131
0fb669f9
PE
91322005-05-13 Paul Eggert <eggert@cs.ucla.edu>
9133
9134 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
9135 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
9136 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
9137 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
9138 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
9139 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
9140 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
9141 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
9142 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
9143 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
9144 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
9145 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
9146 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
9147 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
9148 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
9149 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
9150 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
9151 src/derives.h, src/files.c, src/files.h, src/getargs.c,
9152 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
9153 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
9154 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
9155 src/output.h, src/parse-gram.c, src/parse-gram.h,
9156 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
9157 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
9158 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
9159 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
9160 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
9161 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
9162 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
9163 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
9164 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
9165 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
9166 tests/reduce.at, tests/regression.at, tests/sets.at,
9167 tests/synclines.at, tests/testsuite.at, tests/torture.at:
9168 Update FSF postal mail address.
9169
51f4735e
PE
91702005-05-11 Paul Eggert <eggert@cs.ucla.edu>
9171
9172 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
9173 Problem reported by Ralf Menzel.
9174
80ce3401
PE
91752005-05-01 Paul Eggert <eggert@cs.ucla.edu>
9176
9177 * tests/actions.at: Test that stack overflow invokes destructors.
9178 From Marcus Holland-Moritz.
9179 * data/yacc.c (yyerrlab): Move the code that destroys the stack
9180 from here....
9181 (yyreturn): to here. That way, destructors are called properly
9182 even if the stack overflows, or the user calls YYACCEPT or
9183 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
9184 (yyoverflowlab): Destroy the lookahead.
9185
91862005-04-24 Paul Eggert <eggert@cs.ucla.edu>
9187
9188 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
9189
72f000b0
PE
91902005-04-17 Paul Eggert <eggert@cs.ucla.edu>
9191
9192 * NEWS: Bison-generated C parsers no longer quote literal strings
9193 associated with tokens.
9194 * src/output.c (prepare_symbols): Don't escape strings,
9195 since users don't want to see C escapes.
9196 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
9197 in diagnostics.
c19683bb 9198 * tests/input.at (Torturing the Scanner): Likewise.
72f000b0
PE
9199 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
9200
1094323f
PE
92012005-04-16 Paul Eggert <eggert@cs.ucla.edu>
9202
9203 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
9204 the data size is known to be too small and we can't increase it.
9205 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
9206
ca407bdf
PE
92072005-04-15 Paul Eggert <eggert@cs.ucla.edu>
9208
9209 * src/parse-gram.y: Include quotearg.h.
9210 (string_as_id): Quote $1 before using it as a key, since the
9211 lexer no longer quotes it for us.
9212 (string_content): Don't strip quotes, since lexer no longer
9213 quotes it for us.
9214 * src/scan-gram.l: Include quotearg.h.
9215 ("\""): Omit quote.
9216 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
9217 a key, since the rest of the lexer doesn't quote it.
9218 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
9219 * tests/regression.at (Token definitions): Check for backslashes
9220 in token strings.
9221
9222 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
9223 (YYSIZE_T): Define to unsigned long int when using an older compiler.
9224 (yyparse): Revamp code to generate long syntax error message, to
9225 make it easier to translate, and to avoid problems with arithmetic
9226 overflow. Change "virtual memory" to "memory" in diagnostic, since
9227 we don't know whether the memory is virtual.
9228
1ce59070
PE
92292005-04-13 Paul Eggert <eggert@cs.ucla.edu>
9230
9231 * NEWS: Bison-generated C parsers now use the _ macro to
9232 translate strings.
9233 * data/yacc.c (_) [!defined _]: New macro.
9234 All English strings wrapped inside this macro.
9235 * doc/bison.texinfo (Bison Parser): Document _.
9236 * po/POTFILES.in: Include src/parse-gram.c, since it now
9237 includes translateable strings that parse-gram.y doesn't.
9238
a749a695
PE
92392005-04-12 Paul Eggert <eggert@cs.ucla.edu>
9240
9241 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
9242 reverting the 2004-10-11 change to this function.
9243 (symbol_check_alias_consistency): Don't call symbol_type_set
9244 if the type name is already correct.
9245 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
9246
8fb1053b
PE
92472005-03-25 Paul Eggert <eggert@cs.ucla.edu>
9248
9249 * tests/regression.at (Token definitions): Don't use a token named
9250 c, as that generates a "#define c ..." that runs afoul of buggy
9251 stdlib.h that uses the identifier c as a member of struct
9252 drand48_data. Problem reported by Horst Wente.
9253
ff498c4a
PE
92542005-03-21 Paul Eggert <eggert@cs.ucla.edu>
9255
9256 * bootstrap: Change translation URL from
9257 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
9258 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
9259 redirection glitches. Problem reported by twlevo@xs4all.nl.
9260
65211d70
PE
92612005-03-20 Paul Eggert <eggert@cs.ucla.edu>
9262
9263 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
9264 after operands; POSIX says this isn't portable for the c99 command.
9265
9577fb1f
PE
92662005-03-18 Paul Eggert <eggert@cs.ucla.edu>
9267
9268 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
9269 immediately if a data overrun has occurred; this may help us track
9270 down what may be a spurious failure on MacOS.
9271
78b178f7
PE
92722005-03-17 Paul Eggert <eggert@cs.ucla.edu>
9273
a2599d0f
PE
9274 Respond to problems reported by twlevo@xs4all.nl.
9275
9276 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
9277
78b178f7
PE
9278 * src/vcg.h: Comment fix.
9279 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
9280 (G_CMAX): Change to -1 instead of INT_MAX.
9281
9282 * data/yacc.c (yyparse): Omit spaces before #line.
78b178f7 9283
7296e729
PE
92842005-03-15 Paul Eggert <eggert@cs.ucla.edu>
9285
9286 * src/tables.c (state_number_to_vector_number): Put it inside an
9287 "#if 0", since it's not currently used. Problem reported by
9288 Roland McGrath.
9289
05ac60f3
PE
92902005-03-06 Paul Eggert <eggert@cs.ucla.edu>
9291
9292 * src/output.c (escaped_output): Renamed from
9293 escaped_file_name_output, since we now use it for symbol tags as
9294 well. All uses changed.
9295 (symbol_destructors_output, symbol_printers_output):
9296 Escape symbol tags too.
9297 Problem reported by Matyas Forstner in
9298 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
9299
9300 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
9301 not needed.
9302 * src/output.c (user_actions_output, token_definitions_output,
9303 symbol_destructors_output, symbol_printers_output): Likewise.
9304 * src/reader.c (prologue_augment): Likewise.
9305 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
9306
9307 * src/vcg.c (output_edge): Don't quote linestyle arg.
9308 Problem reported by twlevo@xs4all.nl.
9309
7eb453ac
PE
93102005-02-28 Paul Eggert <eggert@cs.ucla.edu>
9311
9312 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
9313 example, reported by Derek M Jones. Also, make the example even
9314 more outrageous, to better illustrate how bad the problem is.
9315
4c04c52a
PE
93162005-02-24 Paul Eggert <eggert@cs.ucla.edu>
9317
9318 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
9319 putsym. Typo reported by Sebastian Piping.
9320
a61e1620
PE
93212005-02-23 Paul Eggert <eggert@cs.ucla.edu>
9322
9323 * doc/bison.texinfo (Language and Grammar): some -> same
9324 (Epilogue): int he -> in the
9325 Typos reported by Sebastian Piping via Justin Pence.
9326
9ec93868
PE
93272005-02-07 Paul Eggert <eggert@cs.ucla.edu>
9328
9329 * tests/glr-regression.at (Improper handling of embedded actions
9330 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
9331 embedded actions and $-N in GLR parsers", work around an Autoconf bug
9332 with dollar signs in test names.
9333 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
9334 for a similar reason.
9335
73ce7e7e
PE
93362005-01-28 Paul Eggert <eggert@cs.ucla.edu>
9337
9338 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
9339 wants to redefine G_VIEW.
9340
2e72b98e
PE
93412005-01-27 Paul Eggert <eggert@cs.ucla.edu>
9342
9343 * src/vcg.c (get_view_str): Remove case for normal_view.
9344 Problem reported by twlevo@xs4all.nl.
9345
e0d634e5
PE
93462005-01-24 Paul Eggert <eggert@cs.ucla.edu>
9347
ccf830a4
PE
9348 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
9349 Problem reported by twlevo@xs4all.nl.
9350
e0d634e5
PE
9351 * doc/bison.texinfo: Change @dircategory from "GNU programming
9352 tools" to "Software development". Requested by Richard Stallman
9353 via Karl Berry.
9354
7bbc8cb0
PE
93552005-01-23 Paul Eggert <eggert@cs.ucla.edu>
9356
9357 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
9358 Problem reported by twlevo@xs4all.nl.
9359
08b770bc
PE
93602005-01-21 Paul Eggert <eggert@cs.ucla.edu>
9361
9362 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
9363 keyword; it's not needed with modern compilers, and it doesn't
9364 affect correctness with older compilers. Suggested by
9365 twlevo@xs4all.nl.
9366
95f22ad2
PE
93672005-01-17 Paul Eggert <eggert@cs.ucla.edu>
9368
9369 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
9370 gcc -Wswitch-default.
9371 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
9372 * data/yacc.c (yyparse): Likewise.
9373
d229d15c
PE
93742005-01-12 Paul Eggert <eggert@cs.ucla.edu>
9375
9376 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
9377 already. Let config.h define any nonstandard values.
9378
ecadd90f
PE
93792005-01-10 Paul Eggert <eggert@cs.ucla.edu>
9380
9381 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
9382 for the benefit of slower hosts. Problem reported by
9383 Nelson H. F. Beebe.
9384
213744b5
PE
93852005-01-07 Paul Eggert <eggert@cs.ucla.edu>
9386
9387 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
9388 being defined and not used.
9389 * data/lalr1.cc (yyparse): Likewise.
9390 Use "if (false)" rather than "if (0)".
9391
249d3236
PE
93922005-01-05 Paul Eggert <eggert@cs.ucla.edu>
9393
9394 * TODO: Mention that we should allow NUL bytes in tokens.
9395
987cc1fb
PE
93962005-01-02 Paul Eggert <eggert@cs.ucla.edu>
9397
9398 * src/scan-skel.l (<<EOF>>): Don't close standard output.
9399 Problem reported by Hans Aberg.
9400
08fe02d9
PE
94012005-01-01 Paul Eggert <eggert@cs.ucla.edu>
9402
9403 * src/getargs.c (version): Happy new year; update overall
9404 program copyright date from 2004 to 2005.
9405
9406 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
9407 Problem reported by Hans Aberg.
9408 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
9409 (Output file names.): Add a test for the case when standard output
9410 is closed.
9411
010c0266
PE
94122004-12-26 Paul Eggert <eggert@cs.ucla.edu>
9413
9414 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
9415 to fix an oversight in the Bison 2.0 manual.
9416
da12206a
PE
94172004-12-25 Paul Eggert <eggert@cs.ucla.edu>
9418
9419 * NEWS: Version 2.0. Reformat the existing news items since
9420 1.875, so that related items are grouped together.
3a4734aa 9421 * configure.ac (AC_INIT): Bump version to 2.0.
da12206a
PE
9422 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
9423
c935d934
PE
9424 * tests/torture.at (Exploding the Stack Size with Alloca): Set
9425 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
9426 otherwise, we're not testing alloca. Unfortunately there's no
9427 simple way to consult HAVE_ALLOCA here.
9428
da12206a
PE
9429 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
9430 for yymsg, too.
9431
9432 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
9433 hand. This avoids a warning about comparing int to size_t when
9434 GCC warnings are enabled.
9435
0a2c5137
PE
94362004-12-22 Paul Eggert <eggert@cs.ucla.edu>
9437
d7e14fc0
PE
9438 * NEWS: Bison-generated parsers no longer default to using the
9439 alloca function (when available) to extend the parser stack, due
9440 to widespread problems in unchecked stack-overflow detection.
9441 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
9442 responsibility to set it to a positive value. This lets the user
9443 specify a value that is not a preprocessor constant.
9444 * data/yacc.c (YYMAXDEPTH): Likewise.
9445 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
9446 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
9447 to be a compile-time constant. However, explain the constraints on it.
9448 Also, explain the constraints on YYINITDEPTH.
9449 (Table of Symbols): Explain that alloca is no longer the default.
9450 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
9451 to 1.
9452
0a2c5137
PE
9453 * doc/bison.texinfo (Location Default Action): Mention that n must
9454 be zero when k is zero. Suggested by Frank Heckenbach.
9455
e019c247
AD
94562004-12-22 Akim Demaille <akim@epita.fr>
9457
9458 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
9459 (parser::state_type, parser::semantic_type, parser::location_type):
9460 Private, not public.
9461 (parser::parse): Return ints, not bool.
9462 Returning a bool introduces a problem: 0 corresponds to false, and
9463 it seems weird to return false on success. Returning true changes
9464 the conventions for yyparse.
9465 Alternatively we could return void and send an exception.
9466 There is no clear consensus (yet?).
9467 (state_stack, semantic_stack, location_stack): Rename as...
9468 (state_stack_type, semantic_stack_type, location_stack_type): these.
9469 Private, not public.
9470 * tests/c++.at: New.
9471 * tests/testsuite.at, tests/Makefile.am: Adjust.
9472
72731bb7
AD
94732004-12-21 Akim Demaille <akim@epita.fr>
9474
9475 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
9476
9a0d8bec
AD
94772004-12-21 Akim Demaille <akim@epita.fr>
9478
9479 Don't impose std::string for filenames.
9480
9481 * data/lalr1.cc (b4_filename_type): New.
9482 (position::filename): Use it.
9483 (parser.hh): Move the inclusion of stack.hh and location.hh below
9484 the user code, so that needed headers for the filename type can be
9485 included first.
72731bb7
AD
9486 Forward declare them before the user code.
9487 * tests/Makefile.am (check-local, installcheck-local): Pass
9488 TESTSUITEFLAGS to the TESTSUITE.
9a0d8bec 9489
99880de5
AD
94902004-12-20 Akim Demaille <akim@epita.fr>
9491
9492 Use more STL like names: my_class instead of MyClass.
9493
9494 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
9495 (SemanticStack, SemanticType, StateStack, StateType)
9496 (TokenNumberType, Stack, Slice, Traits, Parser::location)
9497 (Parser::value): Rename as...
9498 (location_stack, location_type, rhs_number_type, semantic_stack)
9499 (semantic_type, state_stack, state_type, token_number_type, stack)
9500 (slice, traits, parser::yylloc, parser::yylval): these.
9501
9502 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
9503
9bec482e
PE
95042004-12-19 Paul Eggert <eggert@cs.ucla.edu>
9505
9506 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
9507 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
9508
f6fbd3da
PE
95092004-12-17 Paul Eggert <eggert@cs.ucla.edu>
9510
9511 Remove uses of 'short int' and 'unsigned short int'. This raises
9512 some arbitrary limits. It uses more memory but nowadays that's
9513 not much of an issue.
9514
9515 This change does not affect the generated parsers; that's a different
9516 task, as some users will want to conserve memory there.
9517
9518 Ideally we should use size_t to represent all object counts, and
9519 something like ptrdiff_t to represent signed differences of object
9520 counts; but that will require more code-cleanup than I have the
9521 time to do right now.
9522
9523 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
9524 Use size_t, not int or short int, to count objects.
9525 * src/closure.c (nritemset, closure): Likewise.
9526 * src/closure.h (nritemset, closure): Likewise.
9527 * src/nullable.c (nullable_compute): Likewise.
9528 * src/print.c (print_core): Likewise.
9529 * src/print_graph.c (print_core): Likewise.
9530 * src/state.c (state_compare, state_hash): Likewise.
9531 * src/state.h (struct state): Likewise.
9532 * src/tables.c (default_goto, goto_actions): Likewise.
9533
9534 * src/gram.h (rule_number, rule): Use int, not short int.
9535 * src/output.c (prepare_rules): Likewise.
9536 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
9537 errs, reductions): Likewise.
9538 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
9539 Likewise.
9540 * src/tables.c (vector_number, tally, action_number,
9541 ACTION_NUMBER_MINIMUM): Likewise.
9542 * src/output.c (muscle_insert_short_int_table): Remove.
9543
efeed023
AD
95442004-12-17 Akim Demaille <akim@epita.fr>
9545
9546 * data/lalr1.cc: Extensive Doxygenation.
9547 (error_): Rename as...
9548 (error): this, since it is visible to the user.
9549 Adjust callers.
9550 (Parser::message): Now an automatic variable from...
9551 (Parser::yyreport_syntax_error_): here.
9552 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
9553 Parser::error.
9554 * tests/input.at: Escape $.
9555
bc82c5a5
PE
95562004-12-16 Paul Eggert <eggert@cs.ucla.edu>
9557
9558 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
9559 Parenthesize rhs to avoid obscure problems with mistakes like
9560 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
9561 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
9562 b4_rhs_location): Likewise.
9563 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
9564 b4_rhs_location): Likewise.
9565
fd19f271
AD
95662004-12-16 Akim Demaille <akim@epita.fr>
9567
9568 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
9569 yacc.c: be sure to stay within yycheck_.
9570 * tests/actions.at: Re-enable C++ tests.
9571
10454ea4
AD
95722004-12-16 Akim Demaille <akim@epita.fr>
9573
9574 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
9575 real.
9576
c5b95ccf
AD
95772004-12-16 Akim Demaille <akim@epita.fr>
9578
9579 Use #define to handle the %name-prefix.
9580
9581 * data/glr.c, data/yacc.c: Comment changes.
9582 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
9583 so that one can refer to yylex in the parser file, and have it
9584 renamed, as is the case with other skeletons.
9585
617a8f12
AD
95862004-12-16 Akim Demaille <akim@epita.fr>
9587
9588 Move lalr1.cc internals into yy*.
9589
9590 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
9591 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
9592 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
9593 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
9594 (empty_, final_, terror_, errcode_, ntokens_)
9595 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
9596 (looka_, ilooka_, error_range_, nerrs_):
9597 Rename as...
9598 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
9599 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
9600 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
9601 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
9602 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
9603 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
9604 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
9605 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
9606 these.
9607
1e547e6e
PE
96082004-12-15 Paul Eggert <eggert@cs.ucla.edu>
9609
9610 Fix some problems reported by twlevo at xs4all.
9611 * src/symtab.c (symbol_new): Report an error if the input grammar
9612 contains too many symbols. This is better than calling abort() later.
9613 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
9614 (struct node, struct graph):
9615 Rename member expand to stretch. All uses changed.
9616 (struct graph): Remove member layoutalgorithm. All uses removed.
9617 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
9618 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
9619 All uses changed.
9620 (N_STRETCH): Rename from N_EXPAND. All uses changed.
9621
735d6bd4
AD
96222004-12-15 Akim Demaille <akim@epita.fr>
9623
9624 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
9625 Add more Doxygen comments.
9626 (symprint_, stack_print_, reduce_print_, destruct_, pop)
9627 (report_syntax_error_, translate_): Rename as...
9628 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
9629 (yypop_, yyreport_syntax_error_, yytranslate_): this.
9630
2e1f5829
AD
96312004-12-15 Akim Demaille <akim@epita.fr>
9632
9633 * data/lalr1.cc (lex_): Rename as...
9634 (yylex_): this.
9635 Move the trace here.
9636 Take the %name-prefix into account.
9637 Reported by Alexandre Duret-Lutz.
9638
a3cb6248
AD
96392004-12-15 Akim Demaille <akim@epita.fr>
9640
9641 Simplify the C++ parser constructor.
9642
9643 * data/lalr1.cc (debug_): Rename as...
9644 (yydebug_): so that the parser's internals are always in the yy*
9645 pseudo namespace.
9646 Adjust uses.
9647 (b4_parse_param_decl): Remove the leading comma as it is now only
9648 called as unique argument list.
9649 (Parser::Parser): Remove the constructor accepting a location and
9650 an initial debugging level.
9651 Remove from the other ctor the argument for the debugging level.
9652 (debug_level_type, debug_level, set_debug_level): New.
9653
9654 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
9655 constructor calls.
9656
07fed891
AD
96572004-12-15 Akim Demaille <akim@epita.fr>
9658
9659 Remove b4_root related material: failure experiment
a3cb6248 9660 (which goal was to allow to derive from a class).
07fed891
AD
9661
9662 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
9663 definitions and uses.
9664
e603eaa5
PE
96652004-12-14 Paul Eggert <eggert@cs.ucla.edu>
9666
9667 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
9668 not 2, since it's not portable to subtract 1 from the start of an
9669 array. The new item 0 is never set or used. All uses changed.
9670
9671 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
9672 the default definition of YYLLOC_DEFAULT. Problem reported
9673 by Frank Heckenbach.
9674
fafb007d
PE
96752004-12-12 Paul Eggert <eggert@cs.ucla.edu>
9676
9677 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
9678 the normal case and one for the error case. Just use the
9679 first one uniformly. Problem reported by Frank Heckenbach.
9680 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
9681 use exactly the same macro in both places.
9682 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
9683 so that the normal-case YYRHSLOC works for the error case too.
9684 All uses changed.
9685 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
9686 (YYLLOC_DEFAULT): Use the same macro as glr.c.
9687 * doc/bison.texinfo (Location Default Action): Don't claim that
9688 we have an array of locations. Use the same macro for both glr
9689 and lalr parsers. Mention YYRHSLOC. Mention what happens when
9690 the index is 0.
9691
48814dcd
PE
96922004-12-10 Paul Eggert <eggert@cs.ucla.edu>
9693
a4e1a53b
PE
9694 * HACKING: Update email addresses to send announcements to.
9695
48814dcd
PE
9696 * configure.ac (AC_INIT): Bump version to 1.875f.
9697
337116ba
PE
96982004-12-10 Paul Eggert <eggert@cs.ucla.edu>
9699
9700 * NEWS: Version 1.875e.
9701 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
9702
9703 * src/scan-skel.l: Include "complain.h", for "fatal".
9704
9705 * src/relation.h (relation_print, relation_digraph):
9706 Relation sizes are of type relation_node, not size_t (this is
9707 merely a doc fix, since the two types are equivalent).
9708 (relation_transpose): Relation sizes are of type relation_node,
9709 not int.
9710 * src/relation.c: Likewise.
9711 (top, infinity): Now of type relation_node, not int.
9712 (traverse, relation_transpose): Use relation_node, not int.
9713
9714 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
9715 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
9716 (yyparse): Remove unused local introduced in 2004-10-25 patch.
9717
9718 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
68b082af 9719 specifying whether the test should be skipped. Use it tp
337116ba 9720 specify that the [%defines %skeleton "lalr1.cc"] tests currently
68b082af 9721 fail on some hosts, and should be skipped.
337116ba 9722
da2a7671
PE
97232004-12-08 Paul Eggert <eggert@cs.ucla.edu>
9724
9725 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
9726 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
9727 unless otherwise specified below.
9728
9729 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
9730 to allocate kernel_base, kernel_items, kernel_size, since
9731 they needn't be initialized to 0.
9732 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
9733 * src/closure.c (new_closure): Likewise, for itemset.
9734 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
9735 * src/lalr.c (set_goto_map): Likewise, for temp_map.
9736 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
9737 (build_relations): Likewise for edge, states1, includes.
9738 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
9739 * src/reader.c (packgram): Likewise, for ritem, rules.
9740 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
9741 * src/relation.c (relation_digraph): Likewise for VERTICES.
9742 (relation_transpose): Likewise for new_R, end_R.
9743 * src/symtab.c (symbols_token_translations_init): Likewise for
9744 token_translations.
9745 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
9746 (token_actions): Likewise for yydefact, actrow, conflrow,
9747 conflict_list.
9748 (save_column): Likewise for froms[symno], tos[symno].
9749 (goto_actions): Likewise for state_count.
9750 (pack_table): Likewise for base, pos, check.
9751 (tables_generate): Likewise for width.
9752
9753 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
9754 for initial core. Just have a separate core, so we needn't worry
9755 about whether kernel_size and kernel_base are initialized.
9756
9757 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
9758 kernel_size, kernel_items): Remove unnecessary initialization.
9759 * src/conflicts.c (conflicts): Likewise.
9760 * src/derives.c (derives): Likewise.
9761 * src/muscle_tablc (muscle_insert): Likewise.
9762 * src/relation.c (relation_digraph): Likewise.
9763 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
9764 conflrow, conflict_table, conflict_list, table, check):
9765 Likewise.
9766
9767 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
9768 This is because all callers pass unsigned int.
9769 * src/closure.h (new_closure): Likewise.
9770
9771 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
9772 (build_relations): Initialize includes[i] in all cases.
9773 * src/reader.c (packgram): Always initialize rules[ruleno].prec
9774 and rules[ruleno].precsym. Initialize members in order.
9775 * src/relation.c (relation_transpose): Always initialize new_R[i]
9776 and end_R[i].
9777 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
9778
9779 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
9780 conflict_list[0] was always 0, but now it isn't initialized.
9781
9782 * src/table.c (table_grow): When conflict_table grew, the grown
9783 area wasn't cleared. Fix this.
9784
9785 * lib/.cvsignore: Add strdup.c, strdup.h.
9786 * m4/.cvsignore: Add strdup.m4.
9787
00baeeac
PE
97882004-12-07 Paul Eggert <eggert@cs.ucla.edu>
9789
9790 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
9791 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
9792 GOTO_NUMBER_MAXIMUM, since we occasionally compute
9793 ngotos + 1 without checking for overflow.
9794 (build_relations): Use END_NODE, not -1, to denote end of edges.
9795 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
9796 build_relations): Use goto_number, not int, for goto numbers.
9797 * src/tables.c (save_column, default_goto): Likewise.
9798
be3d9d42
AD
97992004-11-23 Akim Demaille <akim@epita.fr>
9800
9801 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
9802 of #defining from yystype.
9803 Don't typedef yystype, C++ does not need it.
9804 This lets it possible to forward declare it as union.
9805
78e526d5
PE
98062004-11-23 Paul Eggert <eggert@cs.ucla.edu>
9807
9808 * bootstrap (gnulib_modules): Add extensions.
9809 Problem reported by Jim Meyering.
9810
afbb696d
PE
98112004-11-22 Paul Eggert <eggert@cs.ucla.edu>
9812
9813 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
9814 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
9815 src/system.h, src/tables.c: XFREE -> free, to accommodate
9816 recent change to gnulib xalloc.h.
78e526d5 9817 Problem reported by Jim Meyering.
afbb696d 9818
c1f8f16a
AD
98192004-11-17 Akim Demaille <akim@epita.fr>
9820
9821 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
9822
db7e5eb5 98232004-11-17 Akim Demaille <akim@epita.fr>,
9a1e9989
AD
9824 Alexandre Duret-Lutz <adl@gnu.org>
9825
9826 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
9827 changes.
9828 (YYCDEBUG): Adjust.
9829 Use it instead of cdebug_.
9830 (Parser::debug_stream, Parser::set_debug_stream): New.
9831 (Parser::symprint_): Define cdebug_ for temporary backward
9832 compatibility.
9833 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
9834 debug_stream ().
9835
68e11668
AD
98362004-11-17 Akim Demaille <akim@epita.fr>
9837
9838 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
9839 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
9840 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
9841 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
9842
97cbc73e
PE
98432004-10-27 Paul Eggert <eggert@cs.ucla.edu>
9844
9845 * data/glr.c (yyloc_default): Remove; not used.
9846 Problem reported by Frank Heckenbach.
9847
e342c3be
AD
98482004-10-25 Akim Demaille <akim@epita.fr>
9849
9850 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
9851 Introduce another definition to address simple location arrays.
9852 (yyGLRStack): New member: yyerror_range.
9853 (yyrecoverSyntaxError, yyparse): Update it.
9854 (yyrecoverSyntaxError): Use it when shifting the error token to
9855 have an accurate range, equivalent to the one computed by both
9856 yacc.c and lalr1.cc.
9857 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
9858 that column numbers start at column 0, as per GNU Coding
9859 Standards, the others tests, and the doc.
9860 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
9861 Adjust to the above change (first column is 0).
9862 And adjust the location of the "<error>", now covering the whole
9863 line.
9864
93602feb 98652004-10-22 Akim Demaille <akim@epita.fr>
04098407 9866 and Paul Eggert <eggert@cs.ucla.edu>
93602feb
PE
9867
9868 Remove some arbitrary limits on goto numbers and relations.
9869 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
9870 initial values, since they're never used.
9871 (set_goto_map): ngotos is now unsigned, so test for overflow
9872 by seeing whether it wraps around to zero.
9873 * src/lalr.h (goto_number): Now size_t, not short int.
9874 (GOTO_NUMBER_MAXIMUM): Remove.
9875 * src/relation.c (relation_print, traverse, relation_transpose):
9876 Check for END_NODE rather than looking at sign.
9877 * src/relation.h (END_NODE): New macro.
9878 (relation_node): Now size_t, not short int.
9879
dba08b04
PE
98802004-10-22 Paul Eggert <eggert@cs.ucla.edu>
9881
9882 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
9883 keyword, not an identifier. Problem reported by Baron Schwartz in
9884 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
9885
df09ef2e
AD
98862004-10-11 Akim Demaille <akim@epita.fr>
9887
9888 * src/symtab.c (symbol_check_alias_consistency): Also check
9889 type names, destructors, and printers.
9890 Reported by Alexandre Duret-Lutz.
9891 Recode the handling of associativity and precedence in terms
9892 of symbol_precedence_set.
9893 Accept no redeclaration at all, not even equal to the previous
9894 value.
9895 (redeclaration): New.
9896 Use it to factor redeclaration complaints.
9897 (symbol_make_alias): Don't set the type of the alias, let
9898 symbol_check_alias_consistency do it as for other features.
9899 * src/symtab.h (symbol): Add new member prec_location, and
9900 type_location.
9901 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
9902 * tests/input.at (Incompatible Aliases): New.
9903
146bc99d
PE
99042004-10-09 Paul Eggert <eggert@cs.ucla.edu>
9905
9906 .cvsignore fixes to accommodate gnulib changes,
9907 and the practice of naming build directories "_build".
9908 * .cvsignore: Add "_*". Sort.
9909 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
9910 * m4/.cvsignore: Add "*_gl.m4".
9911
e503aa60
AD
99122004-10-06 Akim Demaille <akim@epita.fr>
9913
9914 * src/parse-gram.y (add_param): Fix the truncation of trailing
9915 spaces.
9916
b4a20338
AD
99172004-10-05 Akim Demaille <akim@epita.fr>
9918
9919 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
9920 whether the reducion was empty or not. This leaves room to
9921 improve the use of YYLLOC_DEFAULT in such a case.
9922 lalr1.cc is still experimental, so changing this is acceptable.
9923 And finally, there are probably not many users who changed the
9924 handling of locations in GLR, so changing is admissible too.
9925
9926 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
9927 empty reduction, set @$ to an empty location ending the previously
9928 stacked symbol.
9929 Adjust uses to make sure the code is triggered on empty
9930 reductions.
9931 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
9932 expected output: empty reductions have empty locations.
9933
f85a5e6f
AD
99342004-09-29 Akim Demaille <akim@epita.fr>
9935
9936 * data/lalr1.cc: Move towards a more standard C++ coding style
9937 for templates: Class < T > -> Class<T>.
9938
b203fc2c
AD
99392004-09-29 Akim Demaille <akim@epita.fr>
9940
9941 * data/lalr1.cc: Reinstall the former ctor, for sake of
9942 compatibility, but warn it will be removed.
9943 Move towards a more standard C++ coding style (i.e., type *var ->
9944 type* var).
9945
5b7e1e73
PE
99462004-09-27 Paul Eggert <eggert@cs.ucla.edu>
9947
3fee967f
PE
9948 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
9949 since it's less likely to work if NULs are involved in the future.
5b7e1e73 9950
0dcca5c2
AD
99512004-09-27 Akim Demaille <akim@epita.fr>
9952
9953 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
9954
6dde1c82
AD
99552004-09-27 Akim Demaille <akim@epita.fr>
9956
9957 * data/lalr1.cc (b4_parse_param_decl_1): New.
b203fc2c 9958 (b4_parse_param_decl): Use it to have different names between attribute
6dde1c82
AD
9959 and argument names.
9960 (b4_cc_constructor_call): Likewise.
9961
b233d555
AD
99622004-09-24 Akim Demaille <akim@epita.fr>
9963
9964 * src/parse-gram.y (add_param): Strip the leading and trailing
9965 blanks from a formal argument declaration.
9966 (YY_LOCATION_PRINT): New.
9967
619404e3
AD
99682004-09-24 Akim Demaille <akim@epita.fr>
9969
9970 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
9971 after the location.
9972
dd8d9022
AD
99732004-09-24 Akim Demaille <akim@epita.fr>
9974
9975 * doc/bison.texinfo (Table of Symbols): Sort.
9976
0092f063
AD
99772004-09-21 Akim Demaille <akim@epita.fr>
9978
9979 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
9980 the useless parentheses.
9981 Suggested by Paul Eggert.
9982
451364ed
AD
99832004-09-20 Akim Demaille <akim@epita.fr>
9984
9985 Let the initial-action act on the look-ahead, and use it for the
9986 "initial push" (corresponding to an hypothetical beginning-of-file).
9987 And let lalr1.cc honor %initial-action.
9988
9989 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
9990 example.
9991 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
9992 (Parser::Parser): Remove the ctor that used to initialize it.
9993 (Parser::parse): Like in the other skeletons, issue the "starting
9994 parse" message before any action.
9995 Honor %initial-action.
9996 Initialize the stacks with the lookahead.
9997 * data/yacc.c: Let $$ and @$ in %initial-action designate the
9998 look-ahead.
9999 Push them in the stacks.
10000 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
10001
18d192f0
AD
100022004-09-20 Akim Demaille <akim@epita.fr>
10003
10004 * doc/bison.texinfo (Initial Action Decl): New.
10005
b8458aa5
AD
100062004-09-20 Akim Demaille <akim@epita.fr>
10007
10008 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
10009 clearer criterion to define it.
10010 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
10011 When reducing on an empty RHS, use the latest stacked location as
10012 location.
10013 yylloc is not always available.
10014 * data/glr.c: Likewise.
10015 Also, honor initial-actions.
10016
3fc16193
AD
100172004-09-20 Akim Demaille <akim@epita.fr>
10018
10019 * data/yacc.c (YY_LOCATION_PRINT): New.
10020 Define when we know YYLTYPE's structure, i.e., when the default
10021 YYLLOC_DEFAULT is used.
10022 * data/c.m4 (b4_yysymprint_generate): Use it.
10023 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
10024 value of the result.
10025 (error_start_): Replace with...
10026 (error_range_): this location array.
10027 This allows to replace code relying on the implementation of
10028 locations by portable code.
10029 * data/yacc.c (yylerrsp): Replace with...
10030 (yyerror_range): this.
10031 Every time a token is popped, update yyerror_range[0], to have an
10032 accurate location for the error token.
10033 * data/glr.c (YY_LOCATION_PRINT): New.
10034 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
10035 deference a pointer.
10036 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
10037 report the location in %printers.
10038
10039 * src/scan-skel.l: Instead of abort, report error messages to ease
10040 understanding skeleton scanning failures.
10041
ecfe33e7
AD
100422004-09-16 Akim Demaille <akim@epita.fr>
10043
10044 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
10045 (iterator, const_iterator): these, to be more in the C++ spirit.
10046 Also, return reverse iterators so that when displaying the stack
10047 we display its bottom first.
10048 (Parser::stack_print_, Parser::reduce_print_): Match the messages
10049 from yacc.c.
10050 We should probably use vector here though.
10051
1576d44d
AD
100522004-09-16 Akim Demaille <akim@epita.fr>
10053
10054 Have more complete shift traces.
10055
10056 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
10057 to report Shifts instead of ad hoc YYDPRINTF invocations,
10058 including for the error token.
10059 * data/lalr1.cc (symprint_): Output the location.
10060 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
10061 output the location within the %printer.
10062 Activate GLR tests, at least to make sure they compile properly.
10063 They still don't pass though.
10064 * tests/calc.at: Adjust expect verbose output, since now "Entering
10065 state..." is on a different line than the "Shifting" message.
10066
9c66f418
AD
100672004-09-08 Akim Demaille <akim@epita.fr>
10068
10069 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
10070 Bison directive from the Bison file to the invocation of this
10071 macro, so that these directives are passed to
10072 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
10073 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
10074 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
10075 the extra Bison directives instead of the whole series.
10076 Change the grammar so that there are recoverable errors, and
10077 unrecoverable errors. Now we can have the parser give up before
10078 consuming the whole input. As a result we now can observe that
10079 the lookahead is freed when needed.
10080 Change the parser source to parse argv[1] instead of a hard coded
10081 string.
10082 Simplify yylex, and give a value and location to EOF.
10083 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
10084 passed directives already coded in the file.
10085 Add some tests to check the location of "error".
10086 For some tests, the C++ parser is correct, and not yacc.c.
10087 For other tests, they provide different, but unsatisfying, values,
10088 so keep the C++ value so that at least one parser is "correct"
10089 according to the test suite.
10090 (Actions after errors): Remove, this is subsumed by the
10091 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
10092
52d5733f
AD
100932004-09-06 Akim Demaille <akim@epita.fr>
10094
10095 * data/lalr1.cc: Adjust the indentation of the labels.
04098407 10096 (Parser::pop): New.
52d5733f
AD
10097 Use it.
10098
a0e68930
AD
100992004-09-06 Akim Demaille <akim@epita.fr>
10100
10101 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
10102 argument, an informative message.
10103 Call YY_SYMBOL_PRINT.
10104 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
10105 * data/lalr1.cc (destruct_): Likewise.
10106 In addition, no longer depend on b4_yysymprint_generate and
10107 b4_yydestruct_generate to generate these functions, do it "by
10108 hand".
10109
e757bb10
AD
101102004-09-03 Akim Demaille <akim@epita.fr>
10111
10112 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
10113 invoked, yydestruct the lookahead.
10114 * tests/calc.at (Calculator $1): Update the expected lengths of
10115 traces: there is an added line for the discarded lookahead.
10116 * doc/bison.texinfo (Destructor Decl): Some rewording.
10117 Define "discarded" symbols.
10118
0fe1f06d
AD
101192004-09-02 Akim Demaille <akim@epita.fr>
10120
10121 * data/lalr1.cc (translate_, destruct_): No reason to be static.
10122
284acc8b
AD
101232004-09-02 Akim Demaille <akim@epita.fr>
10124
10125 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
10126 (YYDSYMPRINTF): Rename as...
10127 (YY_SYMBOL_PRINT): this.
10128 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
10129 two.
10130 Use it instead of direct symprint_ calls.
10131 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
10132 one.
10133
a5eb1ed2
AD
101342004-09-02 Akim Demaille <akim@epita.fr>
10135
b7c72fe1
AD
10136 * data/lalr1.cc (b4_yysymprint_generate): New.
10137 (symprint_): New member function, defined when YYDEBUG.
10138 Use it consistently instead of token/nterm debugging output by
10139 hand.
a5eb1ed2
AD
10140 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
10141 %printer calls to use cdebug_ when using lalr1.cc.
10142
417141dd
AD
101432004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
10144
10145 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
10146 with #ifdef YYDEBUG.
10147
2fa09258
AD
101482004-08-26 Akim Demaille <akim@epita.fr>
10149
10150 * doc/bison.texinfo (Implementing Loops): Rename as...
10151 (Implementing Gotos/Loops): this.
10152
9378b508
PE
101532004-08-13 Paul Eggert <eggert@cs.ucla.edu>
10154
10155 Adjust to latest gnulib.
10156 * bootstrap (gnulib_modules): Add xalloc-die.
10157 Set LC_ALL=C so that file names sort consistently.
10158 Prefer the gnulib copies of gettext.m4, glibc21.m4,
10159 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
10160 uintmax_t.m4, ulonglong.m4.
10161 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
10162 po.m4 since we are now using _gl.m4 instead.
10163
87a8ad5c
PE
101642004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
10165
10166 * src/scan-action.l: Remove. Scanning of semantic actions is
10167 handled in scan-gram.l.
10168
dca81a78
PE
101692004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
10170
10171 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
10172
10173 * src/location.h (struct): The file member is a uniqstr.
10174 (equal_boundaries): Use UNIQSTR_EQ for comparison.
10175
c9cbf7c5
PE
101762004-07-22 Paul Eggert <eggert@cs.ucla.edu>
10177
10178 Fix bug with non-%union parsers that have printers or destructors,
10179 which led to a Bison core dump. Reported by Peter Fales in
10180 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
2fa09258 10181
c9cbf7c5
PE
10182 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
10183 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
10184 not to our own type.
10185 * src/output.c (symbol_destructors_output, symbol_printers_output):
10186 Don't assume %union.
10187 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
10188 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
10189 UNION-FLAG. All callers changed.
10190 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
10191 Use type char, not unsigned int, when declaring an array of char;
10192 this lets us remove a cast.
10193 (Printers and Destructors): Add non-%union test cases.
10194
fa7e68c3
PE
101952004-06-21 Paul Eggert <eggert@cs.ucla.edu>
10196
10197 * doc/bison.texinfo: Minor editorial changes, mostly to the new
10198 GLR writeups. E.g., avoid frenchspacing and the future tense,
10199 change "lookahead" to "look-ahead", and change "wrt" to "with
10200 respect to".
2fa09258 10201
fa7e68c3
PE
102022004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10203
10204 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
10205 New sections, split off from the GLR Parsers section. Put the new
10206 Simple GLR Parser near the start of the GLR section, for clarity.
10207 Rewrite connective text.
10208
99a9344e
PE
102092004-06-21 Frank Heckenbach <frank@g-n-u.de>
10210
10211 * doc/bison.texinfo (Simple GLR Parsers): New section.
10212
8dd162d3
PE
102132004-06-21 Paul Eggert <eggert@cs.ucla.edu>
10214
10215 * NEWS, TODO, doc/bison.texinfo:
10216 Use "look-ahead" instead of "lookahead", to be consistent.
10217 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
10218 while we're fixing "look-ahead".
10219 * src/conflicts.c (shift_set): Renamed from shiftset.
10220 (look_ahead_set): Renamed from lookaheadset.
10221 * src/print.c: Likewise.
10222 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
10223 name for "lookahead".
10224 (report_types, usage): Likewise.
10225 * src/getargs.h (report_look_ahead_tokens): Renamed from
10226 report_lookaheads.
10227 * src/lalr.c (compute_look_ahead_tokens): Renamed from
10228 compute_lookaheads.
10229 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
10230 (look_ahead_tokens_print): Renamed from lookaheads_print.
10231 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
10232 state_rule_lookaheads_print.
10233 * src/state.h: Likewise.
10234 (reductions.look_ahead_tokens): Renamed from lookaheads.
10235 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
10236 AT_DATA_LOOKAHEADS_GRAMMAR.
10237
57a90331
PE
102382004-06-03 Paul Eggert <eggert@cs.ucla.edu>
10239
10240 * README: Update location of patched M4 distribution.
10241
8ed3234a
PE
102422004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
10243
10244 Don't assume the C++ compiler takes the same arguments as the C compiler
10245 (trivial change).
10246 * configure.ac (O0CXXFLAGS): New var.
10247 * tests/atlocal.in (CXXFLAGS): Use it.
10248
07971983
PE
102492004-05-29 Paul Eggert <eggert@cs.ucla.edu>
10250
10251 Fix some "make check" problems with C++ reported by
10252 Albert Chin-A-Young for Tru64 C++ in this thread:
10253 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
10254
10255 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
10256 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
10257 Output to a .cc file for C++, not to a .c file.
10258 * tests/calc.at (AT_CHECK_CALC): Likewise.
10259 * tests/regression.at (AT_CHECK_DANCER): Likewise.
10260 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
10261
29058652
PE
102622004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
10263
10264 * tests/calc.at, tests/actions.at: Workaround for SGI
10265 C++ compiler. (trivial change)
10266
62cb8a99
PE
102672004-05-27 Paul Eggert <eggert@cs.ucla.edu>
10268
fd418816
PE
10269 Spent a few hours checking out which prerequisite versions the
10270 current sources actually require. I went all the way back to
10271 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
10272 a seemingly endless set of combinations of versions more recent
10273 than that. The bottom line is that the current sources require
10274 fairly recent versions of the build tools, and it'll be some work
10275 to change this.
10276 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
10277 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
10278 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
10279 Add comments explaining why those particular versions are
10280 currently needed.
2fa09258 10281
62cb8a99
PE
10282 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
10283 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
161a71f3 10284 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
62cb8a99
PE
10285
10286 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
10287 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
10288
caa52c10
PE
102892004-05-26 Paul Eggert <eggert@cs.ucla.edu>
10290
10291 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
10292 0.11.5. Suggested by Bruno Haible.
10293 * bootstrap: Remove gettext version checking.
10294
10295 * doc/bison.texinfo (Decl Summary): Also mention that %union
10296 can depend on prerequisite types. Problem reported by Tim
10297 Van Holder.
10298
4bfd5e4e
PE
102992004-05-25 Paul Eggert <eggert@cs.ucla.edu>
10300
2cef3017
PE
10301 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
10302 * README-alpha: Don't tell people not to package this.
10303
b9c85d5c
PE
10304 * bootstrap: Don't assume $(...) works; use `...` instead.
10305 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
10306 gettext better.
10307
4bfd5e4e
PE
10308 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
10309 put into the -d output file, and mention what to do if YYSTYPE is
10310 defined as a macro.
10311
6a36ff94
PE
103122004-05-24 Paul Eggert <eggert@cs.ucla.edu>
10313
6712933e
PE
10314 Undo change made earlier today: it caused autopoint to not bring
10315 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
10316 autopoint's.
10317
10318 * bootstrap: Check that gettext version matches what's in
10319 configure.ac. Warn users to ignore robots.txt ERROR 404.
10320 * bootstrap: Undo today's earlier change (logged below).
10321 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
b9c85d5c 10322
6a36ff94
PE
10323 The gettext version checking is causing more trouble than it's
10324 curing; remove it. Problem reported by Paul Hilfinger.
10325
10326 * bootstrap: Issue a warning that one can expect a message
10327 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
10328 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
10329
209ea708
PE
103302004-05-23 Paul Eggert <eggert@cs.ucla.edu>
10331
10332 Ensure that the C++ compiler used for testing actually works on a
10333 simple test program; if not, skip the C++-related tests. Problem
10334 reported by Vin Shelton in:
161a71f3 10335 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
209ea708
PE
10336
10337 * m4/cxx.m4: New file.
10338 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
10339 * tests/atlocal.in (BISON_CXX_WORKS): Add.
10340 * tests/local.at (AT_COMPILE_CXX): Use it.
10341
41ca2549
PE
103422004-05-21 Paul Eggert <eggert@cs.ucla.edu>
10343
383e69dc
PE
10344 * data/glr.c (yylloc): Output this macro even if locations are not
10345 being generated, as the GLR parser needs it even in that case.
10346 Problem reported by Troy A. Johnson
10347 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
10348
41ca2549
PE
10349 * configure.ac (AC_INIT): Update to 1.875e.
10350
e476c87d
PE
103512004-05-21 Paul Eggert <eggert@cs.ucla.edu>
10352
10353 * NEWS: Version 1.875d.
10354 * configure.ac (AC_INIT): Likewise.
10355 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
10356
10357 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
10358 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
10359 lalr1.cc runs afoul of the first, and the last two are no longer
10360 supported by GCC 3.4.0.
10361 * README: Mention GNU m4 1.4 or later; mention m4 patches.
10362 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
10363
233a88ad
PE
103642004-05-06 Paul Eggert <eggert@cs.ucla.edu>
10365
10366 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
10367 unsigned int, for compatibility with latest gnulib hash module.
10368 * src/state.c (state_hash, state_hasher): Likewise.
10369 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
10370 * src/uniqstr.c (hash_uniqstr): Likewise.
e476c87d 10371
12ffdd28
PE
103722004-05-03 Paul Eggert <eggert@cs.ucla.edu>
10373
10374 * NEWS: Unescaped newlines are no longer allowed in char & strings.
10375
10376 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
10377 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
10378 character and string literals.
10379 (unexpected_end): New function.
10380 (unexpected_eof): Use it.
10381 (unexpected_newline): New function.
10382 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
10383 actions.
e476c87d 10384
12ffdd28
PE
10385 * NEWS: Document %expect-rr.
10386
10387 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
10388 Fix typo by replacing $1 with $option.
10389 Remove more 'intl'-related files.
9668e2be 10390 Don't DEFUN AM_INTL_SUBDIR twice.
12ffdd28
PE
10391
10392 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
10393 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
10394 strtoul.c.
10395 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
10396 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
10397 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
10398 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
10399 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
10400 * src/.cvsignore: Add *.output.
10401
10402 * src/parse-gram.y: Put copyright notice inside %{ %} so it
10403 gets copied to the output file.
e476c87d 10404
1f65350a
PE
104052004-04-28 Paul Eggert <eggert@twinsun.com>
10406
10407 Get files from the gnulib and po repositories, instead of relying
10408 on them being in our CVS. Upgrade to latest versions of gnulib
10409 and Automake.
10410
10411 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
10412 * bootstrap: Bootstrap from gnulib and po repositories.
10413 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
10414 * README-cvs: Document these changes. Remove version numbers from
10415 mentions of build tools, since they change so often. Mention Flex.
10416
10417 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
10418 (gl_USE_SYSTEM_EXTENSIONS): Add.
12ffdd28
PE
10419 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
10420 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
1f65350a 10421 does this for us.
12ffdd28
PE
10422 (AC_ISC_POSIX): Remove; we no longer support this
10423 ancient OS, as it gets in the way of latest Autoconf & gnulib.
1f65350a
PE
10424 (AC_HEADER_STDC): Remove: we now assume C89 or better.
10425 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
10426 Do not check for C89 headers, except for locale.h which is used
10427 by the Yacc library and must port to K&R hosts.
10428 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
10429 Do not check for C89 functions, except for setlocale which is
10430 used by the Yacc library.
10431 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
10432 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
10433 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
10434 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
10435 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
10436 AM_GNU_GETTEXT): Remove; now done by:
10437 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
10438 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
10439 for us.
10440
10441 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
10442 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
10443 Define to empty, as gnulib.mk will do the rest for us.
10444 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
10445 for us.
10446 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
10447 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
10448
10449 * src/files.c: Include gnulib's xstrndup.h.
10450
10451 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
10452 (REALLOC): Use xnrealloc, for likewise.
10453 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
10454 (strnlen, memrchr): Remove decls; functions no longer used.
10455 Include <stpcpy.h>.
10456
10457 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
10458 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
10459 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
10460 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
10461 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
10462 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
10463 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
10464 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
10465 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
10466 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
10467 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
10468 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
10469 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
10470 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
10471 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
10472 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
10473 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
10474 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
10475 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
10476 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
10477 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
10478 Remove, as these files are now generated automatically
10479 by bootstrap or automake.
10480
10481 * po/ChangeLog: Remove: all but one entry was a duplicate
10482 of this file, and I moved that 2000-11-02 entry here.
10483
10484 * config/.cvsignore: Add Makefile, depcomp, install-sh.
10485 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
10486 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
10487 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
10488 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
10489 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
10490 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
10491 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
10492 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
10493 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
10494 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
10495 xstrndup.h.
10496 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
10497 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
10498 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
10499 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
10500 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
10501 * src/.cvsignore: Remove *_.c.
10502
10503
10504 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
10505 support it. (The latest stable gzip doesn't.)
10506
105072004-04-27 Paul Eggert <eggert@twinsun.com>
10508
10509 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
10510 case, as stos_ is now used by destructors due to the 2004-02-09
10511 change.
10512
10513 Remove more K&R C support.
10514 * lib/libiberty.y (PARAMS): Remove. All uses removed.
10515 * lib/subpipe.c (errno): Remove decl.
10516 Include <stdlib.h> unconditionally.
10517 (EXIT_FAILURE): Remove macro.
10518 * src/complain.c (vfprintf, strerror): Remove.
10519 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
10520 unconditionally.
10521 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
10522 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
10523 (strchr, strspn, memchr): Remove decls.
10524 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
10525 unconditionally. Do not declare perror.
10526 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
10527 unconditionally.
10528
10529 * src/complain.c (_): Remove useless defn, as system.h defines this.
10530
10531 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
10532 with latest obstack.h.
10533 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
10534 to procedure types, as obstack.h now does that for us.
10535 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
10536
10537 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
10538 so that this include file can stand alone.
10539 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
10540 does this now. Include subpipe.h first after config.h, to
10541 test whether it can stand alone.
10542
10543 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
10544 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
10545 unused declaration.
10546
10547 * tests/synclines.at (%union synch line): Put a dummy member in
10548 the union, because empty unions aren't allowed in C. Caught
10549 by GCC 3.4.0.
10550
4f16766c
PE
105512004-04-13 Jim Meyering <jim@meyering.net>
10552
10553 * src/conflicts.c (conflicts_print): Correct format string typo:
10554 use `%%' to produce literal `%'. (trivial change)
10555
779e7ceb
PE
105562004-03-30 Paul Eggert <eggert@twinsun.com>
10557
10558 * src/getargs.c (version): Update copyright year to 2004.
10559
10560 * data/c.m4 (b4_int_type): Use 'short int' rather than
10561 'short', and similarly for 'long', 'unsigned', etc.
10562 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
10563 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
10564 yy_yypstack, yydumpstack): Likewise.
10565 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
10566 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
10567 Likewise.
10568 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
10569 yy_stack_print, yyparse): Likewise.
10570 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
10571 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
10572 * lib/bitset.c (bitset_print): Likewise.
10573 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
10574 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
10575 * lib/bitsetv.c (bitsetv_dump): Likewise.
10576 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
10577 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
10578 Likewise.
10579 * src/LR0.c (allocate_itemsets): Likewise.
10580 * src/gram.h (rule_number, rule): Likewise.
10581 * src/lalr.h (goto_number): Likewise.
10582 * src/nullable.c (nullable_compute): Likewise.
10583 * src/output.c (prepare_rules): Likewise.
10584 * src/relation.c (relation_print, relation_digraph): Likewise.
10585 * src/relation.h (relation_node): Likewise.
10586 * src/state.h (state_number, transitions, errs, reductions,
10587 struct state): Likewise.
10588 * src/symtab.h (symbol_number, struct symbol): Likewise.
10589 * src/tables.c (vector_number, tally, action_number,
10590 default_goto, goto_actions): Likewise.
10591 * tests/existing.at (GNU Cim Grammar): Likewise.
10592 * tests/regression.at (Web2c Actions): Likewise.
10593
10594 * src/output.c (muscle_insert_short_int_table): Renamed from
10595 muscle_insert_short_table. All uses changed.
10596
d6328241
PH
105972004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10598
10599 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
10600 (declaration): Replace expected_conflicts with expected_sr_conflicts.
10601 Add %expect-rr rule.
4f16766c 10602
d6328241
PH
10603 * src/scan-gram.l: Recognize %expect-rr.
10604
4f16766c 10605 * src/conflicts.h (expected_sr_conflicts): Rename from
d6328241 10606 expected_conflicts.
4f16766c 10607 (expected_rr_conflicts): Declare.
d6328241
PH
10608
10609 * src/conflicts.c (expected_sr_conflicts): Rename from
10610 expected_conflicts.
10611 (expected_rr_conflicts): Define.
10612 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
10613 for GLR parsers.
10614 Use expected_sr_conflicts in place of expected_conflicts.
10615 Warn if expected_rr_conflicts used in non-GLR parser.
4f16766c 10616
d6328241 10617 * doc/bison.texinfo: Add documentation for %expect-rr.
4f16766c 10618
1452af69
PE
106192004-03-08 Paul Eggert <eggert@gnu.org>
10620
10621 Add support for hex token numbers. Suggested by Odd Arild Olsen in
161a71f3 10622 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
1452af69
PE
10623
10624 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
10625 in lalr1.cc.
10626 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
10627 * src/scan-gram.l (scan_integer): New function.
10628 ({int}): Use it.
10629 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
10630 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
10631 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
10632 Say "long int", not "long", for uniformity with GNU style.
10633
006d217d
PE
106342004-02-25 Paul Eggert <eggert@twinsun.com>
10635
10636 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
10637 compilers. This fixes a problem with Intel's C++ compiler being
10638 chatty, reported by Guido Trentalancia in
161a71f3 10639 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
006d217d 10640
c2729758
ADL
106412004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
10642
10643 Support %destructor and merge error locations in lalr1.cc.
10644
10645 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
10646 (Parser::stos_): Define unconditionally.
10647 (Parser::destruct_): New method. Generate its body with
10648 b4_yydestruct_generate.
10649 (Parser::error_start_): New attribute.
10650 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
10651 token which are discarded.
10652 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
10653 error_start_ when erroneous token are discarded.
10654 (Parser::parse) <yyerrlab1>: Compute the location of the error
10655 token so that it covers all the discarded tokens.
10656 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
10657 it can be called with `%skeleton "lalr1.cc"', and do that.
10658
dd0e0635
PE
106592004-02-02 Paul Eggert <eggert@twinsun.com>
10660
10661 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
10662 $(top_srcdir)/lib and ../lib. This fixes a bug reported
10663 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
10664 There's no need to mention top_builddir since Automake does that
10665 for us.
10666 (INCLUDES): Remove, as Automake says it's obsolescent.
10667 Contents migrated into AM_CPPFLAGS as described above.
10668 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
10669
106702004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10671
10672 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
10673 (yyreportSyntaxError): Handle case where lookahead token is
10674 YYEMPTY.
10675
be16239b
PH
106762004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10677
10678 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
10679 resulting parsers are compilable with C++.
10680
5fa90832
PE
106812003-12-23 Paul Eggert <eggert@twinsun.com>
10682
10683 * config/depcomp, config/install-sh: Sync with Automake 1.8.
10684 * src/output.c (output_skeleton): Rename local var.
10685 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
10686 Bison tokens, as this runs afoul of the 2003-10-07 change that
10687 disallowed NUL bytes in character constants or string literals.
10688
10689 * tests/local.at: Require Autoconf 2.59's Autotest.
10690 * tests/testsuite.at: Don't include local.at, since we now assume
10691 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
10692 including it.
10693 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
10694 multiple inclusion warnings.
dd0e0635 10695
b165c324
AD
106962003-12-02 Akim Demaille <akim@epita.fr>
10697
10698 * doc/bison.texinfo (How Can I Reset the Parser): More about start
10699 conditions.
10700 From Bruno Haible.
10701
26e06a21
ADL
107022003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
10703
10704 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
10705
92ac3705
PE
107062003-10-07 Paul Eggert <eggert@twinsun.com>
10707
6a5ecb38
PE
10708 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
10709 if testsuite doesn't exist.
10710
92ac3705
PE
10711 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
10712 literals, unfortunately.
10713 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
10714 Complain about NUL bytes in character constants or string literals.
10715
91d2c560
PE
107162003-10-05 Paul Eggert <eggert@twinsun.com>
10717
10718 * NEWS: Don't document %no-default-prec, as it's still
10719 too experimental.
10720 * doc/bison.texinfo: Document %no-default-prec only if
10721 the defaultprec flag is set. Normally it's not.
10722
0cc3da3a
PE
107232003-10-04 Paul Eggert <eggert@twinsun.com>
10724
10725 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
10726 non-modifiable lvalue, instead of a modifiable one.
10727 * doc/bison.texinfo (Actions): Document that $$ can
10728 be assigned to. Do not claim that $$ and $N are
10729 array element references: user code should not rely on this.
10730
22fccf95
PE
107312003-10-01 Paul Eggert <eggert@twinsun.com>
10732
10733 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
10734 (grammar_declaration): Use it.
10735 * src/scan-gram.l: New token %no-default-prec.
10736 * tests/conflicts.at: Revamp tests to use %no-default-prec.
10737 * NEWS, doc/bison.texinfo: Document the above.
10738
fc8f2965
AD
107392003-10-01 Akim Demaille <akim@epita.fr>
10740
10741 VCG no longer supports long_straight_phase.
10742
10743 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
10744 * src/print_graph.c (print_graph): Adjust.
10745
39a06c25
PE
107462003-09-30 Frank Heckenbach <frank@g-n-u.de>
10747 and Paul Eggert <eggert@twinsun.com>
10748
10749 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
10750 Table of Symbols): Document %default-prec.
10751 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
10752 (grammar_declaration): Set default_prec on %default-prec.
10753 * src/scan-gram.l (%default-prec): New token.
10754 * src/reader.h (default_prec): New flag.
10755 * src/reader.c: Likewise.
10756 (packgram): Handle it.
10757 * tests/conflicts.at (%default-prec without %prec,
10758 %default-prec with %prec, %default-prec 1): New tests.
fc8f2965 10759
39a06c25
PE
107602003-09-30 Paul Eggert <eggert@twinsun.com>
10761
10762 * tests/testsuite.at: Include local.at, not input.at, fixing
10763 a typo in the 2003-08-25 patch.
10764
62b6aef9
AD
107652003-08-27 Akim Demaille <akim@epita.fr>
10766
10767 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
10768 GCC warnings.
10769
89e1cc61
AD
107702003-08-26 Akim Demaille <akim@epita.fr>
10771
10772 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
10773 "<\#" to avoid magic from Gnus when posting parts of this script.
10774
a08460b0
AD
107752003-08-26 Akim Demaille <akim@epita.fr>
10776
10777 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
10778 (Parser::parse): here.
10779 Adjust: nerrs and errstatus is now replaced by...
10780 (Parser::nerrs_, Parser::errstatus_): New.
10781
603f1cfd
AD
107822003-08-25 Akim Demaille <akim@epita.fr>
10783
10784 * config/announce-gen, Makefile.cfg: New.
10785 * Makefile.am: Adjust.
10786 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
10787 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
10788
cd3684cf
AD
107892003-08-25 Akim Demaille <akim@epita.fr>
10790
10791 When reducing initial empty rules, Bison parser read an initial
10792 location that is not defined. This results in garbage, and that
10793 affects Bison's own parser. Therefore we need (i) to extend Bison
10794 to support a means to initialize this location, and (ii) to use
10795 this CVS Bison to fix CVS Bison's parser.
10796
10797 * src/reader.h, reader.c (epilogue_augment): Remove, replace
10798 with...
10799 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
10800 * src/parse-gram.y: Adjust.
10801 (%initial-action): New.
10802 (%error-verbose): Since we require CVS Bison, there is no reason
10803 not to use it.
10804 * src/scan-gram.l: Adjust.
10805 * src/Makefile.am (YACC): New, to make sure we use our own parser.
10806 * data/yacc.c (yyparse): Use b4_initial_action.
10807
4e03e201
AD
108082003-08-25 Akim Demaille <akim@epita.fr>
10809
10810 * doc/bison.texinfo: Don't promote stdout for error messages.
10811
8c182d05
AD
108122003-08-25 Akim Demaille <akim@epita.fr>
10813
10814 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
10815 From Alexandre Duret-Lutz.
10816
6a60c4cf
PE
108172003-08-25 Akim Demaille <akim@epita.fr>
10818
10819 Version 1.875c.
10820
25f66e1a
AD
108212003-08-25 Akim Demaille <akim@epita.fr>
10822
10823 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
10824 Use them.
10825
5348bfbe
AD
108262003-08-25 Akim Demaille <akim@epita.fr>
10827
10828 * data/lalr1.cc (Parser::reduce_print_): New.
10829 Use it.
10830
47301314
AD
108312003-08-25 Akim Demaille <akim@epita.fr>
10832
10833 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
10834 error recovery loops. This patch is based on
161a71f3 10835 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
47301314
AD
10836 Also, augment the similarity between lalr1.cc and yacc.c.
10837 Note: the locations of error recovery rules are not correct yet.
10838
10839 * data/lalr1.cc: Comment changes to augment the similarity between
10840 lalr1.cc and yacc.c.
10841 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
10842 (yyerrlab1): Remove, but where it used to be (now the bottom part of
10843 yyerrlab), when hitting EOF, pop the whole stack here instead of
10844 merely falling thru the default error handling mechanism.
10845 (yyerrorlab): New label, with the old contents of YYERROR,
10846 plus the following change: pop the stack of rhs corresponding
10847 to the production that invoked YYERROR. That is how Yacc
10848 behaves (required by POSIX).
10849 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
10850 fail.
10851
1f7a61ff
AD
108522003-08-25 Akim Demaille <akim@epita.fr>
10853
10854 Tune local.at so that people can "autom4te -l autotest calc.at -o
10855 calc" for instance, to extract a sub test suite.
10856
10857 * tests/testsuite.at: Move the initialization, Autotest version
10858 requirement, and AT_TESTED invocation into...
10859 * tests/local.at: here.
10860 * tests/testsuite.at: Include it for compatibility with Autoconf
10861 2.57.
10862 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
10863 be ignore.
10864
327b5b56
PE
108652003-08-04 Paul Eggert <eggert@twinsun.com>
10866
10867 Rework code slightly to avoid gcc -Wtraditional warnings.
10868 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
10869 The returned value is now stored in *YY0. All callers changed.
10870 * src/output.c (merge_output): Adjust to the above change.
10871
0051e3ed
PE
108722003-07-26 Paul Eggert <eggert@twinsun.com>
10873
10874 * data/glr.c (YYASSERT): New macro.
10875 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
10876 yyresolveStates, yyprocessOneStack):
10877 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
10878 Derived from a suggestion by Frank Heckenbach.
1f7a61ff 10879
137437c6
PE
108802003-07-25 Paul Eggert <eggert@twinsun.com>
10881
5b620e06
PE
10882 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
10883 for portability to K&R C (after ansi2knr, presumably). See
161a71f3 10884 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
5b620e06
PE
10885 by Frank Heckenbach, though I have omitted the structure-initialization
10886 part of his glr-knr.diff patch since I recall that the Portable
10887 C Compiler didn't require that change.
10888
137437c6
PE
10889 Let the user specify how to allocate and free memory.
10890 Derived from a suggestion by Frank Heckenbach in
161a71f3 10891 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
137437c6
PE
10892 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
10893 All uses of free, malloc, realloc changed to use these macros,
10894 and unnecessary casts removed.
10895 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
10896
ddb85ca5
PE
108972003-07-06 Matthias Mann <MatthiasMann@gmx.de>
10898
10899 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
10900 use s.empty() rather than s == "" to test for empty string; see
161a71f3 10901 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
ddb85ca5
PE
10902 (trivial change)
10903
39910e09
AD
109042003-06-25 Akim Demaille <akim@epita.fr>
10905
10906 * config/depcomp, config/install-sh: Update from masters.
10907
0ae99356
PE
109082003-06-20 Paul Eggert <eggert@twinsun.com>
10909
10910 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
10911 and return properly parenthesized result.
10912 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
10913 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
10914 Remove unnecessary parentheses from uses.
10915 * doc/bison.texinfo (Location Default Action): Describe the
10916 conventions for parentheses.
10917
cd05d13c
PE
109182003-06-19 Paul Eggert <eggert@twinsun.com>
10919
81fd08ca
PE
10920 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
10921 yyreportTree): Do not assume that size_t is the same width as int,
10922 when printing sizes. Print sizes using an unsigned format.
10923 Problem reported by Frank Heckenbach in
161a71f3 10924 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
4dcf140b 10925
cd05d13c
PE
10926 Port to Forte Developer 7 C compiler.
10927 * data/glr.c (struct YYLTYPE): If locations are not being used,
10928 declare a single dummy member, as empty structs do not conform
10929 to the C standard.
10930 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
10931 the Forte Developer 7 C compiler complains that end-of-loop
10932 code is not reached.
10933
4dcf140b
PE
109342003-06-17 Paul Eggert <eggert@twinsun.com>
10935
10936 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
10937 avoid warnings from picky compilers about redefinition of PARAMS.
10938
8dd76bee
PE
109392003-06-17 Paul Eggert <eggert@twinsun.com>
10940
10941 Version 1.875b.
10942
10943 * NEWS: Document 1.875b.
10944
10945 * lib/bbitset.h: Do not include config.h; that's the includer's job.
10946 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
10947 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
10948 Don't use 'index' in comments, as it's a builtin fn on some hosts.
10949 * lib/bitset_stats.c: Include gettext.h unconditionally, as
10950 per recent gettext manual's suggestion.
10951 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
10952 Use prototypes, not old-style definitions.
10953 * lib/lbitset.c (lbitset_unused_clear): Likewise.
10954 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
10955 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
10956 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
10957 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
10958 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
10959 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
10960 vbitset_or_and_cmp, vbitset_copy): Likewise.
10961
10962 * lib/libiberty.h: Do not include config.h; that's the includer's job.
10963 Do not include <stdlib.h>.
10964 (PARAMS): Define unconditionally for C89.
10965 (ATTRIBUTE_NORETURN): Remove.
10966 (ATTRIBUTE_UNUSED): Define unconditionally.
10967
10968 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
161a71f3 10969 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
8dd76bee
PE
10970 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
10971 * lib/vbitset.c, lib/vbitset.h: New files.
10972 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
10973 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
10974 from libbitset.
10975
10976 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
10977 `How Can I Reset @code{yyparse}', since texinfo does not allow
10978 arbitrary @ in node names.
10979
10980 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
10981 shouldn't be needed according to the gettext 0.12.1 documentation
10982 but which seem to be needed anyway: codeset.m4 glibc21.m4
f8e8262e 10983 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8dd76bee 10984 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
f8e8262e 10985 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
cd05d13c 10986
8dd76bee
PE
10987 * lib/.cvsignore: Add stdbool.h.
10988 * m4/.cvsignore: Add nls.m4, po.m4.
10989
10990 Upgrade to CVS gnulib.
10991 * stdbool_.h: File renamed from stdbool.h.in.
10992 * configure.ac (AM_STDBOOL_H): Invoke this instead of
10993 AC_HEADER_STDBOOL.
10994 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
10995 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
10996 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
10997 (MOSTLYCLEANFILES): New var.
10998 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
10999 (stdbool.h): New rule.
11000 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
11001 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
11002 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
11003 m4/quote.m4: Upgrade to today's gnulib.
11004
11005 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
11006 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
11007 the tests right now.
11008 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
11009 yyerror are declared before use; C99 requires this.
11010
25005f6a
PH
110112003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11012
11013 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
11014 first.
11015 (yyrecoverSyntaxError): Correct the logic for setting and testing
11016 yyerrState.
11017 Correct comment on handling EOF.
11018 Allow states with only a default reduction, rather than failing
8dd76bee 11019 (I can't quite reconstruct why these were not allowed before).
25005f6a 11020
137437c6 11021 Fixes to avoid problem that $-N rules in GLR parsers can cause
25005f6a 11022 buffer overruns, corrupting state.
8dd76bee
PE
11023
11024 * src/output.c (prepare_rules): Output max_left_semantic_context
25005f6a
PH
11025 definition.
11026 * src/reader.h (max_left_semantic_context): New variable declaration.
11027 * src/scan-gram.l (max_left_semantic_context): Define.
11028 (handle_action_dollar): Update max_left_semantic_context.
11029 * data/glr.c (YYMAXLEFT): New definition.
11030 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
11031 (yyresolveAction): Ditto.
11032
11033 Fixes to problems with location handling in GLR parsers reported by
11034 Frank Heckenbach (2003/06/05).
11035
11036 * data/glr.c (YYLTYPE): Make trivial if locations not used.
11037 (YYRHSLOC): Add parentheses, and define only if locations used.
11038 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
11039 locations not used.
11040 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
11041 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8dd76bee 11042
25005f6a
PH
11043 * tests/cxx-type.at: Exercise location information; update tests
11044 to differentiate output with and without locations.
8dd76bee 11045 Remove forward declarations of yylex and yyerror---caused errors
25005f6a
PH
11046 because default YYLTYPE not yet defined.
11047 Change semantic actions to compute strings, rather than printing
11048 them directly (to test proper passing of semantics values). Change
11049 output to prefix notation and update test data and expected results.
11050 (yylex): Track locations.
11051 (stmtMerge): Return value rather than printing, and include arguments
11052 in value.
8dd76bee 11053
711f40b7
PE
110542003-06-03 Paul Eggert <eggert@twinsun.com>
11055
11056 Avoid warnings generated by GCC 2.95.4 when Bison is
11057 configured with --enable-gcc-warnings.
11058 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
11059 yy::]b4_parser_class_name[::translate_,
11060 yy::Stack::operator[] (unsigned),
11061 yy::Stack::operator[] (unsigned) const,
11062 yy::Slice::operator[] (unsigned),
11063 yy::Slice::operator[] (unsigned) const):
11064 Rename local vars to avoid warnings.
11065 * tests/glr-regression.at (Improper handling of embedded actions
11066 and $-N in GLR parsers): Remove unused local variable from yylex.
11067 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
11068 (void) as arg when not pure, since we now assume C89 when building
11069 Bison. Pacify GCC by using parameter.
11070
ac695f7d
PE
110712003-06-02 Paul Eggert <eggert@twinsun.com>
11072
11073 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
11074 yy::Location::lines, yy::Location::columns): Rename arguments
11075 to avoid shadowing; this removes a warning generated by GCC 3.3.
11076
26ec81e0
PE
110772003-06-01 Paul Eggert <eggert@twinsun.com>
11078
11079 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
11080 to g++, as GCC 3.3 complains if you do it.
11081 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
11082 everything that WARNING_CFLAGS has, except omit warnings
11083 not suitable for C++.
11084 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
11085 * tests/atlocal.in (CXXFLAGS): New var.
11086 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
11087
11088 Fix a GLR parser bug I reported in February; see
161a71f3 11089 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
26ec81e0
PE
11090 The problem was that GLR parsers did not conform to the C standard,
11091 because actions like { $1 = $2 + $3; } expanded to expressions
11092 that invoked YYFILL in separate subexpressions, and YYFILL assigned
11093 to a local variable. The C standard says that expressions
11094 like (var = f ()) + (var = f ()) have undefined behavior.
11095 Another problem was that GCC sometimes issues warnings that
11096 yyfill and its parameters are unused.
11097
11098 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
11099 as possibly unused.
11100 (yyfill): New function.
11101 (YYFILL): Use it.
11102 (yyuserAction): Change type of yynormal to bool, so that it matches
11103 the new yyfill signature. Mark it as possibly unused.
11104
11105
11106 Follow up on a bug I reported in February, where a Bison-generated
11107 parser can loop. Provide a test case and a fix for yacc.c. I
11108 don't have a fix for lalr1.cc or for glr.c, unfortunately.
11109 The original bug report is in:
161a71f3 11110 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
26ec81e0
PE
11111
11112 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
11113 macro's size was becoming unwieldy.
11114 (yyerrlab): Do not discard an empty lookahead symbol, as this
11115 might destroy garbage.
11116 (yyerrorlab): New label, with the old contents of YYERROR,
11117 plus the following change: pop the stack of rhs corresponding
11118 to the production that invoked YYERROR. That is how Yacc
11119 behaves, and POSIX requires this behavior.
11120 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
11121 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
11122 Define 'alarm' to do nothing if unistd.h is not available.
11123 Add a new rule "exp: '-' error;" to test the above change to
11124 data/yacc.c. Use 'alarm' to abort any test taking longer than
11125 10 seconds, as it's probably looping.
11126 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
11127 Also, the new yacc.c generates two fewer diagnostics for an
11128 existing test.
11129
d0829076
PE
111302003-05-24 Paul Eggert <eggert@twinsun.com>
11131
c6ae27df
PE
11132 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
11133 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
11134 This fixes a problem reported by John Bowman when the Compaq/HP
11135 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
11136 -ansi -Wall -gall).
11137 * data/yacc.c (union yyalloc): Likewise.
11138 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
26ec81e0 11139
d0829076
PE
11140 Switch from 'int' to 'bool' where that makes sense.
11141
11142 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
11143 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
11144 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
11145 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
11146 Return or accept bool, not int. All callers changed.
11147 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
11148 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
11149 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
11150 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
11151 bitset_or_and_cmp_): Likewise.
11152 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
11153 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
11154 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
11155 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
11156 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
11157 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
11158 bitset_stats_or_and_cmp): Likewise.
11159 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
11160 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
11161 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
11162 ebitset_xor_cmp): Likewise.
11163 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
11164 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
11165 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
11166 lbitset_xor_cmp): Likewise.
11167 * lib/bbitset.h: Include <stdbool.h>.
11168 (struct bitset_vtable): The following members now return bool, not
11169 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
11170 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
11171 or_and_cmp).
11172 * src/conflicts.c (count_rr_conflicts): Likewise.
11173 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
11174 All uses changed.
11175 * lib/ebitset.c (ebitset_obstack_init): Likewise.
11176 * lib/lbitset.c (lbitset_obstack_init): Likewise.
11177 * src/getargs.c (debug_flag, defines_flag, locations_flag,
11178 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
11179 graph_flag): Likewise.
11180 * src/getargs.h (debug_flag, defines_flag, locations_flag,
11181 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
11182 graph_flag): Likewise.
11183 * src/output.c (error_verbose): Likewise.
11184 * src/output.h (error_verbose): Likewise.
11185 * src/reader.c (start_flag, typed): Likewise.
11186 * src/reader.h (typed): Likewise.
11187 * src/getargs.c (LOCATIONS_OPTION): New constant.
11188 (long_options, getargs): Use it.
11189 * src/lalr.c (build_relations): Use bool, not int.
11190 * src/nullable.c (nullable_compute): Likewise.
11191 * src/print.c (print_reductions): Likewise.
11192 * src/tables.c (action_row, pack_vector): Likewise.
11193 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
11194 * src/output.c (prepare): Use it.
11195 * src/output.c (token_definitions_output,
11196 symbol_destructors_output, symbol_destructors_output): Use string,
11197 not boolean integer, to keep track of whether to output separator.
11198 * src/print_graph.c (print_core): Likewise.
11199 * src/state.c (state_rule_lookaheads_print): Likewise.
11200
11201 * config/install-sh: Sync from automake 1.7.5.
11202
6b2584b7
PE
112032003-05-14 Paul Eggert <eggert@twinsun.com>
11204
11205 * src/parse-gram.y (rules_or_grammar_declaration): Require a
11206 semicolon after a grammar declaration, in the interest of possible
11207 future changes to the Bison input language.
11208 Do not allow a stray semicolon at the start of the grammar.
11209 (rhses.1): Allow one or more semicolons after any rule, including
11210 just before "|" as required by POSIX.
11211 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
11212 grammar.
11213
caf37a36
ADL
112142003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
11215
11216 %parse-param support for lalr1.cc.
11217
11218 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
11219 b4_cc_constructor_calls, b4_cc_constructor_call,
11220 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
11221 definitions.
11222 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
11223 parse-param arguments.
11224 (yy::b4_parser_class_name): Declare instance variables to
11225 hold parse-param arguments.
11226 * tests/calc.at: s/value/semantic_value/ because value clashes
11227 with a member of yy::b4_parser_class_name. Adjust C++ code
11228 to handle %parse-param. Enable %parse-param test in C++.
11229
3ab37077
PE
112302003-05-12 Paul Eggert <eggert@twinsun.com>
11231
11232 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
11233 English a bit. Fix fclose typo. Change "const char" to "char
11234 const", and use ANSI C rather than K&R for "main". Suggest
11235 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
11236 and suggest yy_switch_to_buffer.
11237
112382003-05-05 Paul Eggert <eggert@twinsun.com>
163ab321
PE
11239
11240 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
11241 C89. This avoids a diagnostic on compilers that define __STDC__
11242 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
161a71f3 11243 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
163ab321 11244
e743727f
PE
112452003-05-03 Paul Eggert <eggert@twinsun.com>
11246
11247 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
11248 Do not overrun array bounds.
11249 This should fix a bug reported today by Olatunji Oluwabukunmi in
161a71f3 11250 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
e743727f 11251
916708d5
AD
112522003-04-29 Akim Demaille <akim@epita.fr>
11253
11254 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
11255 * src/getargs.c, src/getargs.h: here, as bool, not int.
11256 (nondeterministic_parser): New.
11257 * src/parse-gram.y, src/scan-gram.l: Support
11258 %nondeterministic-parser.
11259 * src/output.c (prepare): Use nondeterministic_parser instead
11260 of glr_parser where appropriate.
11261 * src/tables.c (conflict_row, action_row, save_row)
11262 (token_actions, token_actions, pack_vector): Ditto.
11263
a06ea4aa
AD
112642003-04-29 Akim Demaille <akim@epita.fr>
11265
11266 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
11267
211074ca
AD
112682003-04-29 Akim Demaille <akim@epita.fr>
11269
11270 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
11271 with %pure-parser and %locations to exercise the patch from Yakov
11272 Markovitch below.
11273
6175ffe3
PE
112742003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
11275
11276 * data/yacc.c: (b4_lex_param): Corrected for the case where
11277 %lex-param is provided and %pure-parser isn't.
11278
b1e95857
PE
112792003-04-27 Paul Eggert <eggert@twinsun.com>
11280
11281 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
161a71f3 11282 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
b1e95857
PE
11283 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
11284 if it is not defined.
11285 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
11286
acda9df6
PE
112872003-04-26 Paul Eggert <eggert@twinsun.com>
11288
3470c57b
PE
11289 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
11290 Declare to be of type suitable for the ninf value itself, not of
11291 type suitable for the corresponding table, since the latter might
11292 be unsigned but the ninf value might be negative. This fixes a
11293 bug reported by Alexandre Duret-Lutz in
161a71f3 11294 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
3470c57b 11295
acda9df6
PE
11296 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
11297 invokes it. We shouldn't invoke it twice because it will attempt
11298 to put error.o in the archive twice. This fixes a glitch reported
11299 by Martin Mokrejs in
161a71f3 11300 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
acda9df6 11301
b5250f26
PE
113022003-04-21 Paul Eggert <eggert@twinsun.com>
11303
11304 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
11305 to gnulib.
11306
089ac0f1
PE
113072003-04-21 Yakov Markovitch <Markovitch@iso.ru>
11308
11309 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
11310 Fix obvious typo that results in uncompilable GLR parsers
11311 when both %pure-parser and %locations are used. (trivial change)
11312
5ededac6
PE
113132003-04-17 Paul Eggert <eggert@twinsun.com>
11314
1b8f2fff
PE
11315 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
11316 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
11317 Do not insert the expected token via unput, as this runs afoul
11318 of a POSIX-compatibility bug in flex 2.5.31.
11319 All uses changed to BEGIN the parent state,
11320 since we no longer insert the expected token via unput.
11321 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
11322 that is no longer emitted after the above change.
11323
5ededac6
PE
11324 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
11325 the first one. This change is from Paul Hilfinger, and it fixes
11326 regression reported by Werner Lemberg in
161a71f3 11327 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5ededac6
PE
11328
11329 (resolve_sr_conflict): Don't invoke state_errs_set
11330 unless one or more tokens have been explicitly made errors.
11331 Otherwise, the above change causes Bison to abort.
11332
11333 * tests/existing.at (GNU pic Grammar): New test case, taken from
11334 Lemberg's email.
11335
b8be9132
AD
113362003-03-31 Akim Demaille <akim@epita.fr>
11337
11338 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
11339
d423d460
AD
113402003-03-31 Akim Demaille <akim@epita.fr>
11341
11342 * src/output.c (prepare_symbols): Avoid trailing spaces in the
11343 output.
11344
c7e441b4
AD
113452003-03-31 Akim Demaille <akim@epita.fr>
11346
11347 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
11348 From Paul Hilfinger.
11349
231897ad
AD
113502003-03-29 Akim Demaille <akim@epita.fr>
11351
11352 * m4/error.m4: Do not put under dynamic conditions some code which
11353 expansion is under static control.
11354
5b066063
AD
113552003-03-29 Akim Demaille <akim@epita.fr>
11356
11357 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
11358
22a74fec
AD
113592003-03-29 Akim Demaille <akim@epita.fr>
11360
11361 * doc/bison.texinfo (Strings are Destroyed): New.
11362
0eee27e7
PE
113632003-03-13 Paul Eggert <eggert@twinsun.com>
11364
11365 * .cvsignore: Add configure.lineno.
11366 * src/.cvsignore: Add yacc.
11367 * tests/.cvsignore: Add testsuite.log.
11368 * doc/fdl.texi: Sync with latest FSF version.
11369
f61aad93
PE
113702003-03-12 Paul Eggert <eggert@twinsun.com>
11371
537636c7
PE
11372 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
11373 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
11374 cursor, instead of leaving it undefined. This fixes a bug
11375 reported by Tim Van Holder in
161a71f3 11376 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
537636c7
PE
11377 * tests/input.at (Torturing the Scanner): Test the scanner on
11378 an empty input file, which was Tim Van Holder's test case.
11379
11380 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
11381 <sys/resource.h> can be included, include sys/time.h and
11382 sys/times.h first, if available. This works around the SunOS
11383 4.1.4 porting bug reported by Bruce Becker in
161a71f3 11384 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
537636c7
PE
11385
11386 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
11387 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
11388 AC_HEADER_SYS_WAIT.
11389
f61aad93
PE
11390 Merge changes from gnulib. This was prompted because the CVS
11391 snapshot didn't build on Solaris 7 due to strnlen problems.
11392
11393 These changes need to be merged back into gnulib:
11394 * lib/hash.c: Include <stdbool.h> unconditionally.
11395 * m4/onceonly.m4 (m4_quote): New macro.
11396 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
11397 Quote AC_FOREACH variable-expansions properly.
11398 The 2003-01-03 obstack.h change also needs merging.
11399 {end of changes requiring merging}
5b066063 11400
f61aad93
PE
11401 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
11402 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
11403 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
11404 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
11405 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
11406 New files, imported from gnulib.
11407 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
11408 above.
11409
11410 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
11411 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
11412 gnulib sources.
11413
11414 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
11415 Add.
11416 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
11417 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
11418 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
11419 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
11420 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
11421 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
11422 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
11423 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
11424 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
11425 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
11426 (jm_PREREQ_ARGMATCH): Remove.
11427 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
11428 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
11429
11430 * src/system.h: Include <stdbool.h> unconditionally.
11431
11432 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
11433 assuming at least C89 in the bitset code for some time now.
11434
d2ffe116
AD
114352003-03-03 Akim Demaille <akim@epita.fr>
11436
11437 * ro.po: New.
11438
052826fd
AD
114392003-03-02 Akim Demaille <akim@epita.fr>
11440
11441 * doc/bison.texinfo (Table of Symbols): Reactivate the
11442 documentation for %lex-param, and %parse-param.
11443
c4749565
AD
114442003-03-02 Akim Demaille <akim@epita.fr>
11445
11446 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
11447 generate verbose error messages.
11448 Use the number of tokens as an upper bound in yytname, as it
11449 cannot be a non terminal.
11450
d5286af1
AD
114512003-03-02 Akim Demaille <akim@epita.fr>
11452
11453 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
11454 message.
11455
22e304a6
AD
114562003-03-02 Akim Demaille <akim@epita.fr>
11457
22e304a6
AD
11458 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
11459 Use them to exercise yycheck overrun.
11460 Based on Andrew Suffield's grammar.
11461
67a25fed
AD
114622003-03-02 Akim Demaille <akim@epita.fr>
11463
11464 Create tests/local.at for Bison generic testing macros.
11465
11466 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
11467 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
11468 This new file.
11469 * tests/calc.at (AT_CHECK_CALC): Adjust.
11470 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
11471 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
11472 * tests/local.at: here.
11473 (AT_COMPILE_CXX): Tags the tests using it as c++.
11474 Ignore the test if CXX is not functional.
11475
9c2b381f
PE
114762003-03-01 Paul Eggert <eggert@twinsun.com>
11477
11478 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
11479 not loc->end, since loc->end might contain garbage and this leads
11480 to undefined behavior on some platforms.
11481 (id_loc, token_start): Use (IF_LINTed) initial values that do not
11482 depend on *loc, so that the reader doesn't give the the false
11483 impression that *loc is initialized.
11484 (<INITIAL>"%%"): Do not bother setting code_start, since its value
11485 does not survive the return.
11486
0433ba88
AD
114872003-03-01 Akim Demaille <akim@epita.fr>
11488
11489 * src/scan-gram.l (code_start): Always initialize it when entering
11490 into yylex, as SC_EPILOGUE is activated *before* the corresponding
11491 yylex invocation. An alternative would be making it static, but
11492 then it starts with the second %%'s beginning, instead of its end.
11493
b305ea69
PE
114942003-02-28 Paul Eggert <eggert@twinsun.com>
11495
11496 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
11497 around a UnixWare 7.1.1 porting bug reported by John Hughes in
161a71f3 11498 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
b305ea69 11499
c3d25e01
PE
115002003-02-26 Paul Eggert <eggert@twinsun.com>
11501
11502 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
11503 Remove Sequent/Pyramid discussion (nobody uses them any more).
11504 Merge VMS and MS-DOS discussion; these ports may well be dead
11505 but let's keep mentioning them for now. Put <> around email
11506 addresses. Add copyright notice.
11507
c267ffbc
PE
115082003-02-24 Paul Eggert <eggert@twinsun.com>
11509
11510 * data/glr.c (yy_reduce_print): yylineno -> yylno,
11511 to avoid collision with flex use of yylineno.
11512 Problem reported by Bruce Lilly in
161a71f3 11513 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
c267ffbc
PE
11514 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
11515 * data/yacc.c (yy_reduce_print): Likewise.
11516
11517 * config/depcomp: Sync with Automake 1.7.3.
11518
f939fc12
AD
115192003-02-21 Akim Demaille <akim@epita.fr>
11520
11521 * data/lalr1.cc: Use temporary variables instead of casts to
11522 change integer types.
11523 Suggested by Paul Eggert.
11524
95923bd6
AD
115252003-02-21 Akim Demaille <akim@epita.fr>
11526
11527 * doc/bison.texinfo: Use "location" consistently to refer to @n,
11528 to avoid confusions with lalr1.cc's notion of Position.
11529 Suggested by Paul Eggert.
11530
2cdc240e
AD
115312003-02-20 Akim Demaille <akim@epita.fr>
11532
11533 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
11534 before initial_columns.
11535 (location.hh): Use consistent variable names when defining the
11536 operator<<.
11537 Use "last" so that we subtract from Positions, not from unsigned.
11538
5d003116
AD
115392003-02-20 Akim Demaille <akim@epita.fr>
11540
11541 * data/lalr1.cc (position.hh): New subfile, including the extended
11542 and Doxygen'ed documentation of class Position.
11543 (location.hh): Use it.
11544 Document a` la Doxygen.
ba1ecc07 11545 With the help of Benoit Perrot.
5d003116 11546
d02b25f9
AD
115472003-02-20 Akim Demaille <akim@epita.fr>
11548
11549 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
11550 AT_YACC_IF.
11551 Redefine AT_YYERROR_SEES_LOC_IF using it.
11552 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
11553 not defined.
11554 Don't use the location in yy::Parser::error_ and
11555 yy::Parser::print_ when not %locations.
11556 Activate more lalr1.cc tests.
11557
0d1c3a04
AD
115582003-02-19 Akim Demaille <akim@epita.fr>
11559
11560 * data/lalr1.cc: When displaying a line number, be sure to make it
11561 an int.
11562
60a777aa
AD
115632003-02-19 Akim Demaille <akim@epita.fr>
11564
11565 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
11566 Remove, useless.
11567 (YYABORT, YYACCEPT, YYERROR): New.
11568 * tests/calc.at: Renable the lalr1.cc test.
11569
0b86fc41
AD
115702003-02-19 Akim Demaille <akim@epita.fr>
11571
11572 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
11573 error recovery, mixing with/without pops and discarding of the
11574 lookahead.
11575 Exercise YYERROR.
11576 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
11577
da99a5dc
PE
115782003-02-17 Paul Eggert <eggert@twinsun.com>
11579
11580 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
11581 * tests/testsuite.at (AT_COMPILE): Use them.
11582 This fixes the testsuite problem reported by Robert Lentz in
161a71f3 11583 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
da99a5dc 11584
93b8c255
PE
115852003-02-12 Paul Eggert <eggert@twinsun.com>
11586
11587 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
11588 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
161a71f3 11589 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
93b8c255
PE
11590 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
11591 Check for malloc failure, for consistency with yacc.c.
11592 (yytname_size): Remove, for consistency with yacc.c.
11593
11594 The bug still remains in data/lalr1.cc, as I didn't have time
11595 to fix it there.
11596
7548fed2
AD
115972003-02-06 Akim Demaille <akim@epita.fr>
11598
11599 * configure.ac (GXX): Rename as...
11600 (CXX): this, to keep the original Autoconf semantics.
11601 Require 2.57.
11602 * data/lalr1.cc: Fix b4_copyright invocations.
11603 If YYDEBUG is not defined, don't depend upon name_ being defined.
11604 (location.hh): Include string and iostream.
11605 (Position::filename): New member.
11606 (Position::Position ()): New.
11607 (operator<< (Position)): New.
11608 (operator- (Position, int)): New.
11609 (Location::first, Location::last): Rename as...
11610 (Location::begin, Location::end): these, to mock the conventional
11611 iterator names.
11612 (operator<< (Location)): New.
11613 * tests/atlocal.in (CXX): New.
11614 * tests/testsuite.at (AT_COMPILE_CXX): New.
11615 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
11616 locations in a more synthetic way.
11617 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
11618 lalr1.cc is used.
11619 Adjust the C locations to match those from Emacs: first column is
11620 column 0.
11621 Change all the expected results.
11622 Conform to the GCS: simplify the locations when applicable.
11623 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
11624 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
11625 these CPP macros with the m4 macros new defined by...
11626 (AT_CHECK_PUSHDEFS): this, i.e.:
11627 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
d02b25f9 11628 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7548fed2
AD
11629 New macros.
11630 (AT_CHECK_POPDEFS): Undefine them.
11631 (AT_CHECK_CALC_LALR1_CC): New.
11632 Use it for the first lalr1.cc test.
11633
43a176ef
AD
116342003-02-04 Akim Demaille <akim@epita.fr>
11635
11636 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
11637 Location as is defined.
11638
fc049e9c
AD
116392003-02-04 Akim Demaille <akim@epita.fr>
11640
11641 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
11642 name_ being defined.
11643
a737b216
PE
116442003-02-03 Paul Eggert <eggert@twinsun.com>
11645
11646 * src/gram.h (start_symbol): Remove unused decl.
11647
11648 Use more-consistent naming conventions for local vars.
11649
11650 * src/derives.c (derives_compute): Change type of local var from
11651 int to rule_number.
11652 * src/gram.c (grammar_rules_partial_print): Likewise.
11653 * src/print.c (print_core): Likewise.
11654 * src/reduce.c (reduce_grammar_tables): Likewise.
11655
11656 * src/gram.c (grammar_dump): Change name of item_number *
11657 local var from r to rp.
11658 * src/nullable.c (nullable_compute): Likewise.
11659
11660 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
11661
11662 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
11663 for symbol or symbol_number var.
11664 * src/reader.c (grammar_start_symbol_set): Likewise.
11665 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
11666 Likewise.
11667 * src/state.c (transitions_to): Likewise.
11668 * src/state.h: Likewise.
11669 * src/tables.c (symbol_number_to_vector_number): Likewise.
11670
11671 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
11672 char * var.
11673
11674 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
11675 var.
11676
11677 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
11678 var.
11679
11680 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
11681 Use str, not s, for char * var. Use ch, not c, for character var.
11682 Use size for size var.
11683
11684 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
11685 char * var.
11686 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
11687 uniqstr var.
11688 * src/uniqstr.h: Likewise.
11689
11690 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
11691 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
11692 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
11693 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
11694 param to have same name as that of enum, so that we don't use
11695 "s" to stand for a non-state.
11696
68e93ad5
AD
116972003-02-02 Akim Demaille <akim@epita.fr>
11698
11699 * src/scan-skel.l: Scan more than one inert character per yylex
11700 invocation.
11701
92898986
PE
117022003-02-01 Paul Eggert <eggert@twinsun.com>
11703
11704 Version 1.875a.
11705
1d9d5d71
PE
11706 * po/LINGUAS: Add ms.
11707
0435d061
AD
117082003-01-30 Akim Demaille <akim@epita.fr>
11709
11710 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
11711
6029a57f
PH
117122003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11713
11714 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
11715 of $1.
0435d061
AD
11716
11717 Changes in response to error report by S. Eken: GLR mode does not
6029a57f 11718 handle negative $ indices or $ indices in embedded rules correctly.
161a71f3 11719 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
0435d061 11720
6029a57f
PH
11721 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
11722 (b4_rhs_location): Ditto.
0435d061 11723 (yyfill): New function to copy from stack tree into array
6029a57f 11724 incrementally.
0435d061
AD
11725 (yyuserAction): Modify to allow incremental move of semantic values
11726 to rhs array when in GLR mode.
11727 Define YYFILL to use in user-defined actions to fill semantic array
6029a57f
PH
11728 as needed.
11729 Remove dummy use of yystack, as there is now a guaranteed use.
11730 (yydoAction): Modify to allow incremental move of semantic values
11731 to rhs array when in GLR mode.
11732 (yyresolveAction): Ditto.
11733 (yyglrShiftDefer): Update comment.
0435d061 11734 (yyresolveStates): Use X == NULL for pointers, not !X.
6029a57f
PH
11735 (yyglrReduce): Ditto.
11736 (yydoAction): Ditto
0435d061 11737
6029a57f
PH
11738 * tests/glr-regr1.at: Rename to ...
11739 * tests/glr-regression.at: Add new regression test for the problems
11740 described above (adapted from S. Eken).
11741 Update copyright notice.
11742 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
11743 * tests/Makefile.am: Ditto.
11744
6cee6297
PE
117452003-01-28 Paul Eggert <eggert@twinsun.com>
11746
11747 * data/lalr1.cc: Do not use @output_header_name@ unless
11748 b4_defines_flag is set. This fixes two bugs reported by
11749 Tim Van Holder in
161a71f3
PE
11750 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
11751 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
6cee6297 11752
b2a836b5
PE
117532003-01-21 Paul Eggert <eggert@twinsun.com>
11754
11755 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
11756 we don't need to worry about yyerrlab1 being reported as an
11757 "unused label" by non-GCC C compilers. The downside is that if
11758 locations are used then a couple of statements are duplicated each
11759 time YYERROR is invoked, but the upside is that the warnings
11760 should vanish.
11761 (yyerrlab1): Move code to YERROR.
11762 (yyerrlab2): Remove. Change uses back to yyerrlab1.
11763 This reverts some of the 2002-12-27 change.
11764
4196b931
PE
117652003-01-17 Paul Eggert <eggert@twinsun.com>
11766
11767 * src/output.c (symbol_printers_output): Fix typo that led
11768 to core dump. Problem reported by Antonio Rus in
161a71f3 11769 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
4196b931 11770
3ae831b4
AD
117712003-01-13 Akim Demaille <akim@epita.fr>,
11772 Quoc Peyrot <chojin@lrde.epita.fr>,
11773 Robert Anisko <anisko_r@lrde.epita.fr>
11774
11775 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
11776 when the stacks contain one element, as the loop would otherwise
11777 free the last state, and then use the top state (the one we just
11778 popped). This means that the initial elements will not be freed
11779 explicitly, as is the case in yacc.c; it is not a problem, as
11780 these elements have fake values.
11781
e3aa65c5
PE
117822003-01-11 Paul Eggert <eggert@twinsun.com>
11783
11784 * NEWS: %expect-violations are now just warnings, reverting
11785 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
11786 bootstrapping problem reported by Matthias Klose; see
161a71f3 11787 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
e3aa65c5
PE
11788 * src/conflicts.c (conflicts_print): Likewise.
11789 * tests/conflicts.at (%expect not enough, %expect too much,
11790 %expect with reduce conflicts): Likewise.
11791 * doc/bison.texinfo (Expect Decl): Document this. Also mention
11792 that the warning is enabled if the number of conflicts changes
11793 (not necessarily increases).
11794
11795 * src/getargs.c (version): Update copyright year.
11796
f0057011
AD
117972003-01-09 Akim Demaille <akim@epita.fr>
11798
11799 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
11800
1ee6d2a0
PE
118012003-01-08 Paul Eggert <eggert@twinsun.com>
11802
11803 * Makefile.maint (WGETFLAGS):
11804 New macro, containing "-C off" to disable proxy caches.
11805 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
11806 (rel-check): Use $(WGET) instead of wget.
11807
d4fd77c4
PE
118082003-01-06 Paul Eggert <eggert@twinsun.com>
11809
11810 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
11811 the GLR paper of Scott, Johnstone and Hussain.
11812
464c6927
PE
118132003-01-04 Paul Eggert <eggert@twinsun.com>
11814
d600ee67
PE
11815 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
11816 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
11817 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
11818 (EXTRA_LIBRARIES): New var, for liby.a.
11819 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
11820 (EXTRA_SCRIPTS): New var, for yacc.
11821
464c6927
PE
11822 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
11823 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
11824 Problem reported by Nelson H. F. Beebe.
11825
118262003-01-03 Paul Eggert <eggert@twinsun.com>
11827
11828 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
11829 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
11830 when compiling Bison 1.875's `bitset bset = obstack_alloc
11831 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
11832
11833 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
11834 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
11835 grow to a huge size with typical invocation.
d600ee67 11836
464c6927
PE
11837 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
11838 Use the pattern recommended by Autoconf 2.57, except also protect
11839 against double-definition.
11840 * src/system.h: Likewise.
11841 Portability issues reported by Nelson H. F. Beebe.
d600ee67 11842
464c6927
PE
11843 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
11844 All uses changed. Provide a definition in both C and C++.
11845 (yytrue, yyfalse): Define even if defined (__cplusplus).
11846
11847 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
11848 Reported by Nelson H. F. Beebe.
d600ee67 11849
464c6927
PE
11850 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
11851
0f42c7d5
PE
118522003-01-02 Paul Eggert <eggert@twinsun.com>
11853
11854 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
11855 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
11856 Bug reported by Nelson H. F. Beebe.
11857
dc546b0f
PE
118582003-01-01 Paul Eggert <eggert@twinsun.com>
11859
11860 * Version 1.875.
11861
2c09b6a7
PE
118622002-12-30 Paul Eggert <eggert@twinsun.com>
11863
11864 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
11865 Moved here from...
11866 (<INITIAL>","): Here. This causes stray "," to be treated
11867 more uniformly.
11868
dc546b0f 11869 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2c09b6a7
PE
11870 last brace in braced code when not in Yacc mode, for compatibility
11871 with Bison 1.35. This resurrects the 2001-12-15 patch to
11872 src/reader.c.
11873
11874 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
11875 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
11876
535c0f63
PE
118772002-12-28 Paul Eggert <eggert@twinsun.com>
11878
11879 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
11880 that of SYM's type. This fixes Debian bug 168069, reported by
11881 Thomas Olsson.
d600ee67 11882
963fcc17
PE
118832002-12-28 Paul Eggert <eggert@twinsun.com>
11884
11885 Version 1.75f.
11886
11887 Switch back to the Yacc style of conflict reports, undoing some
11888 of the 2002-07-30 change.
11889 * doc/bison.texinfo (Understanding): Use Yacc style for
11890 conflict reports. Also, use new way of locating rules.
11891 * src/conflicts.c (conflict_report):
11892 Renamed from conflict_report_yacc, removing the old
11893 'conflict_report'. Translate the entire conflict report at once,
11894 so that we don't assume that "," has the same interpretation in
11895 all languages.
11896 (conflicts_output): Use Yacc-style conflict report for each state,
11897 instead of our more-complicated style.
11898 (conflicts_print): Use Yacc-style conflict report, except print
11899 the input file name when not emulating Yacc.
11900 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
11901 Conflicted Reduction, %expect not enough, %expect too much,
11902 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
11903 * tests/existing.at (GNU Cim Grammar): Likewise.
11904 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
11905
11906 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
11907 fatal): Don't invoke fflush; it's not needed and it might even be
11908 harmful for stdout, as stdout might not be open.
11909 * src/reduce.c (reduce_print): Likewise.
11910
b1efe548
PE
119112002-12-27 Paul Eggert <eggert@twinsun.com>
11912
11913 Fix a bug where error locations were not being recorded correctly.
11914 This problem was originally reported by Paul Hilfinger in
161a71f3 11915 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
b1efe548
PE
11916
11917 * data/yacc.c (yyparse): New local var yylerrsp, to record the
11918 top of the location stack's error locations.
11919 (yyerrlab): Set it. When discarding a token, push its location
11920 onto yylerrsp so that we don't lose track of the error's end.
11921 (yyerrlab1): Now is only the target of YYERROR, so that we can
11922 properly record the location of the action that failed. For GCC
11923 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
11924 GCC warning about yyerrlab1 being unused if YYERROR is unused.
11925 (yyerrlab2): New label, which yyerrlab now falls through to.
11926 Compute the error's location by applying YYLLOC_DEFAULT to
11927 the locations of all the symbols that went into the error.
11928 * doc/bison.texinfo (Location Default Action): Mention that
11929 YYLLOC_DEFAULT is also invoked for syntax errors.
11930 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
11931 Error locations include the locations of all the tokens that were
11932 discarded, not just the last token.
d600ee67 11933
983c5c2c
PE
119342002-12-26 Paul Eggert <eggert@twinsun.com>
11935
b1efe548
PE
11936 * src/files.c: Include quote.h.
11937 (compute_output_file_names): Warn if we detect conflicting
11938 outputs to the same file. This should catch the misunderstanding
11939 exemplified by Debian Bug 165349, reported by Bruce Stephens..
11940
11941 * src/conflicts.c (conflicts_print): If the user specifies
11942 "%expect N", report an error if there are any reduce/reduce
11943 conflicts. This is what the manual says should happen.
11944 This fixes Debian bug 130890, reported by Anthony DeRobertis.
11945 * tests/conflicts.at (%expect with reduce conflicts): New test.
11946
983c5c2c
PE
11947 Don't use m4_include on relative file names, as it doesn't work as
11948 desired if there happens to be a file with that name under ".".
d600ee67 11949
983c5c2c
PE
11950 * m4sugar/version.m4: Remove; it was included but it wasn't used.
11951 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
11952 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
11953 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
11954 * src/output.c (output_skeleton): Use full path names when
11955 specifying a file to include; don't rely on include path, as
11956 it's unreliable when the working file contains a file with
11957 that name.
d600ee67 11958
983c5c2c
PE
119592002-12-25 Paul Eggert <eggert@twinsun.com>
11960
11961 Remove obsolete references to bison.simple and bison.hairy.
11962 Problem mentioned by Aubin Mahe in
161a71f3 11963 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
983c5c2c
PE
11964 * data/glr.c: Comment fix.
11965 * doc/bison.1: Remove references. Also, mention "yacc".
11966
11967 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
11968 with -g option.
11969
11970 * src/parse-gram.y (declaration): Use enum "report_states" rather
11971 than its numeric value 1.
11972
11973 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
11974 opening a new one. This fixes Debian bug 165349, reported by
11975 Bruce Stephens.
11976
23f2d9dc
PE
119772002-12-24 Paul Eggert <eggert@twinsun.com>
11978
11979 Version 1.75e.
11980
11981 * Makefile.maint (cvs-update): Don't assume that the shell
11982 supports $(...), as Solaris sh doesn't.
11983
11984 * src/parse-gram.y (lloc_default): Remove test for empty
11985 nonterminals at the end, since it didn't change the result.
11986
119872002-12-24 Paul Eggert <eggert@twinsun.com>
33167b8b
PE
11988
11989 If the user does not define YYSTYPE as a macro, Bison now declares it
11990 using typedef instead of defining it as a macro. POSIX requires this.
11991 For consistency, YYLTYPE is also declared instead of defined.
11992
11993 %union directives can now have a tag before the `{', e.g., the
11994 directive `%union foo {...}' now generates the C code
11995 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
11996 The default union tag is `YYSTYPE', for compatibility with Solaris 9
11997 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
11998 instead of `yyltype'.
11999
12000 `yystype' and `yyltype' are now obsolescent macros instead of being
12001 typedefs or tags; they are no longer documented and will be
12002 withdrawn in a future release.
12003
12004 * data/glr.c (b4_location_type): Remove.
12005 (YYSTYPE): Renamed from yystype.
12006 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
12007 (struct YYLTYPE): Renamed from struct yyltype.
12008 (YYLTYPE): Renamed from yyltype.
12009 (yyltype, yystype): New (and obsolescent) macros,
12010 for backward compatibility.
12011 * data/yacc.c: Likewise.
12012
12013 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
12014 does not specify a union tag. This is for compatibility with
12015 Solaris 9 yacc.
12016
12017 * src/parse-gram.y (add_param): 2nd arg is now char * not char
12018 const *, since it is now modified by stripping surrounding { }.
12019 (current_braced_code): Remove.
12020 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
12021 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
12022 trailing " {...}". Now of type <chars>.
12023 (grammar_declaration): Adjust to bundled tokens.
12024 (code_content): Remove; stripping is now done by add_param.
12025 (print_token_value): Print contents of bundled tokens.
12026 (token_name): New function.
12027
12028 * src/reader.h (braced_code, current_braced_code): Remove.
12029 (token_name): New decl.
12030
12031 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
12032 token_type, not braced_code code_kind. All uses changed.
12033 (SC_PRE_CODE): New state, for scanning after a keyword that
12034 has (or usually has) an immediately-following braced code.
12035 (token_type): New local var, to keep track of which token type
12036 to return when scanning braced code.
12037 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
dc546b0f 12038 <INITIAL>"%parse-param", <INITIAL>"%printer",
33167b8b
PE
12039 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
12040 instead of returning a token type immediately.
12041 (<INITIAL>"{"): Set token type.
12042 (<SC_BRACED_CODE>"}"): Use it.
12043 (handle_action_dollar, handle_action_at): Now returns bool
12044 indicating success. Fail if ! current_rule; this prevents a core dump.
12045 (handle_symbol_code_dollar, handle_symbol_code_at):
12046 Remove; merge body into caller.
12047 (handle_dollar, handle_at): Complain in invalid contexts.
12048
12049 * NEWS, doc/bison.texinfo: Document the above.
12050 * NEWS: Fix years and program names in copyright notice.
12051
879ca4f8
PE
120522002-12-17 Paul Eggert <eggert@twinsun.com>
12053
12054 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
12055 Reporting, Table of Symbols): Omit mentions of %lex-param and
12056 %parse-param from the documentation for now.
12057
1c5fe69d
PE
120582002-12-15 Paul Eggert <eggert@twinsun.com>
12059
12060 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
12061 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
12062 lookahead symbol, and which sets yychar in parser actions) and it
7ea9026a
PE
12063 disagreed with the Bison documentation. Bug
12064 reported by Andrew Walrond.
d600ee67 12065
1c5fe69d
PE
12066 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
12067 as the caller now does that.
12068 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
12069 (YYEMPTY): Parenthesize right hand side, since others use it.
12070 (yyparse): Don't assume that our generated code is the only code
12071 that sets yychar.
12072
d1de5372
PE
120732002-12-13 Paul Eggert <eggert@twinsun.com>
12074
12075 Version 1.75d.
12076
12077 POSIX requires a "yacc" command.
12078 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
12079 (MOSTLYCLEANFILES): Add yacc.
12080 (yacc): New rule.
1c5fe69d 12081 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
d1de5372
PE
12082 as an alias for bison y.
12083
12084 * po/LINGUAS: Add da.
d600ee67 12085
d1de5372
PE
12086 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
12087 problem with latest <getopt.h>.
12088 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
12089
12090 * doc/fdl.texi: Upgrade to 1.2.
12091 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
12092 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
12093 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
12094 gnulib.
12095 * config/install-sh: Sync with autotools.
12096
12097 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
161a71f3 12098 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
d1de5372
PE
12099 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
12100 locations are requested.
12101 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
12102 locations are requested.
12103
d0f3fe23
PE
121042002-12-12 Paul Eggert <eggert@twinsun.com>
12105
12106 Remove unportable casts and storage allocation tricks.
12107 While we're at it, remove almost all casts, since they
12108 usually aren't needed and are a sign of trouble.
12109
12110 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
12111
12112 * src/derives.c (derives_compute): Do not subtract NTOKENS from
12113 the pointer DSET returned by malloc; this isn't portable.
12114 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
12115 Similarly for DERIVES.
12116 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
12117 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
12118 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
12119
12120 * src/derives.c (derives_compute): Do not bother invoking
12121 int_of_rule_number, since rule numbers are integers.
12122
12123 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
12124 rather than XMALLOC (char, N).
12125
12126 * src/files.c (filename_split): Rewrite to avoid cast.
12127
12128 * src/gram.h (symbol_number_as_item_number,
12129 item_number_as_symbol_number, rule_number_as_item_number,
12130 item_number_as_rule_number):
12131 Now inline functions rather than macros, to avoid casts.
12132 * src/state.h (state_number_as_int): Likewise.
12133 * src/tables.c (state_number_to_vector_number,
12134 symbol_number_to_vector_number): Likewise.
12135
12136 * src/gram.h (int_of_rule_number): Remove; no longer used.
12137
12138 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
12139 since the resulting storage is always stored into.
12140
12141 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
12142 where it's needed.
12143
12144 * src/muscle_tab.c (muscle_m4_output):
12145 Now inline. Return bool, not int.
12146 * src/state.c (state_compare): Likewise.
12147 * src/symtab.c (symbol_check_defined,
12148 symbol_check_alias_consistency, symbol_pack, symbol_translation,
12149 hash_compare_symbol, hash_symbol):
12150 Likewise.
12151 * src/uniqstr.c (uniqstr_print): Likewise.
12152 * src/muscle_tab.c (muscle_m4_output_processor):
12153 New function, to avoid casts.
12154 * src/state.c (state_comparator, stage_hasher): Likewise.
12155 * src/symtab.c (symbol_check_defined_processor,
12156 symbol_check_alias_consistency_processor, symbol_pack_processor,
12157 symbol_translation_processor, hash_symbol_comparator,
12158 hash_symbol_hasher): Likewise.
12159 * src/uniqstr.c (uniqstr_print_processor): Likewise.
12160 * src/muscle_tab.c (muscles_m4_output):
12161 Use new functions instead of casting old functions unportably.
12162 * src/state.c (state_hash_new): Likewise.
12163 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
12164 symbols_token_translations_init):
12165 Likewise.
12166 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
12167
12168 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
12169 var instead of casting to long, to avoid casts.
12170 (prepare_states): Use MALLOC rather than alloca, so that we don't
12171 have to worry about alloca.
12172 * src/state.c (state_hash_lookup): Likewise.
12173
12174 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
12175 local var instead of casting to unsigned char, to avoid casts.
12176
12177 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
12178 STATE_ALLOC): Remove.
12179 (transitions_new, errs_new, reductions_new, state_new): Use malloc
12180 rather than calloc, and use offsetof to avoid allocating slightly
12181 too much storage.
12182 (state_new): Initialize all members.
12183
12184 * src/state.c (state_hash): Use unsigned accumulator, not signed.
12185
12186 * src/symtab.c (symbol_free): Remove; unused.
12187 (symbol_get): Remove cast in lhs of assignment.
12188 (symbols_do): Now static. Accept generic arguments, not
12189 hashing-related ones.
12190
12191 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
12192 (symbol_processor): Remove.
12193 (symbols_do): Remove decl; now static.
12194
12195 * src/system.h (alloca): Remove; decl no longer needed.
12196 (<stddef.h>): Include, for offsetof.
12197 (<inttypes.>, <stdint.h>): Include if available.
12198 (uintptr_t): New type, if system lacks it.
12199 (CALLOC, MALLOC, REALLOC): New macros.
12200 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
12201 new macros.
12202
12203 * src/tables.c (table_size): Now int, to pacify GCC.
12204 (table_grow, table_ninf_remap): Use signed table size.
12205 (save_row): Don't bother initializing locals when not needed.
12206 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
12207 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
12208
12209 * src/vcg.h: Correct misspellings.
12210
12211 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
12212
12213
12214 * src/getargs.c (getargs): Don't assume EOF == -1.
12215
26b4a969
PE
122162002-12-09 Paul Eggert <eggert@twinsun.com>
12217
12218 Change identifier spellings to avoid collisions with names
12219 that are reserved by POSIX.
12220
12221 Don't use names ending in _t, since POSIX reserves them.
12222 For consistency, remove _e and _s endings -- they're weren't
12223 needed to remove ambiguity. All uses changed.
12224 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
12225 turn was just renamed from struniq_t.
12226 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
12227 which in turn was just renamed from struniq_processor_t.
12228 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
12229 in turn was renamed from hash_compare_struniq_t.
12230 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
12231 (state_list): Renamed from state_list_t.
12232 * src/assoc.h (assoc): Renamed from assoc_t.
12233 * src/conflicts.c (enum conflict_resolution): Renamed from
12234 enum conflict_resolution_e.
12235 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
12236 (rule_list): Renamed from rule_list_t.
12237 * src/getargs.h (enum trace): Renamed from enum trace_e.
12238 (enum report): Renamed from enum report_e.
12239 * src/gram.h (item_number): Renamed from item_number_t.
12240 (rule_number): Renamed from rule_number_t.
12241 (struct rule_s): Remove the "rule_s" part; not used.
12242 (rule): Renamed from rule_t.
12243 (rule_filter): Renamed from rule_filter_t.
12244 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
12245 (goto_list): Renamed from goto_list_t.
12246 * src/lalr.h (goto_number): Renamed from goto_number_t.
12247 * src/location.h (location): Renamed from location_t.
12248 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
12249 and moved here from:
12250 * src/muscle_tab.h (muscle_entry_t): here.
12251 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
12252 (rule_list): Renamed from rule_list_t.
12253 * src/print_graph.c (static_graph): Renamed from graph.
12254 * src/reader.h (braced_code): Renamed from braced_code_t.
12255 Remove brace_code_e tag.
12256 * src/relation.h (relation_node): Renamed from relation_node_t.
12257 (relation_nodes): Renamed from relation_nodes_t.
12258 (relation): Renamed from relation_t.
12259 * src/state.h (state_number): Renamed from state_number_t.
12260 (struct state): Renamed from struct state_s.
12261 (state): Renamed from state_t.
12262 (transitions): Renamed from transitions_t. Unused (and
12263 misspelled) transtion_s tag removed.
12264 (errs): Renamed from errs_t. Unused errs_s tag removed.
12265 (reductions): Renamed from reductions_t. Unused tag
12266 reductions_s removed.
12267 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
12268 (struct symbol_list): Renamed from struct symbol_list_s.
12269 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
12270 (struct symbol): Renamed from struct symbol_s.
12271 (symbol): Renamed from symbol_t.
12272 * src/tables.c (vector_number): Renamed from vector_number_t.
12273 (action_number): Renamed from action_t.
12274 * src/tables.h (base_number): Renamed from base_t.
12275 * src/vcg.h (enum color): Renamed from enum color_e.
12276 (enum textmode): Renamed from enum textmode_e.
12277 (enum shape): Renamed from enum shape_e.
12278 (struct colorentry): Renamed from struct colorentry_s.
12279 (struct classname): Renamed from struct classname_s.
12280 (struct infoname): Renamed from struct infoname_s.
12281 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
12282 (enum decision): Renamed from enum decision_e.
12283 (enum orientation): Renamed from enum orientation_e.
12284 (enum alignment): Renamed from enum alignment_e.
12285 (enum arrow_mode): Renamed from enum arrow_mode_e.
12286 (enum crossing_type): Renamed from enum crossing_type_e.
12287 (enum view): Renamed from enum view_e.
12288 (struct node): Renamed from struct node_s.
12289 (node): Renamed from node_t.
12290 (enum linestyle): Renamed from enum linestyle_e.
12291 (enum arrowstyle): Renamed from enum arrowstyle_e.
12292 (struct edge): Renamed from struct edge.
12293 (edge): Renamed from edge_t.
12294 (struct graph): Renamed from struct graph_s.
12295 (graph): Renamed from graph_t.
12296 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
12297 Rename value_t -> value.
12298 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
12299 value_t_as_yystype -> value_as_yystype.
12300
12301 Don't include <errno.h> in the mainstream code, since it
12302 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
12303 * lib/get-errno.c, lib/get-errno.h: New files.
12304 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
12305 get-errno.c.
12306 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
12307 * src/output.c (output_skeleton): Likewise.
12308 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
12309 instead of errno.
12310 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
12311 Likewise.
12312 (handle_action_dollar, handle_action_at): Likewise.
12313 * src/system.h: Do not include <errno.h>.
12314 (TAB_EXT): Renamed from EXT_TAB.
12315 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
12316
12317 Avoid str[a-z]*, since <string.h> reserves that name space.
12318 Change all instances of "struniq" in names to "uniqstr", and
12319 likewise for "STRUNIQ" and "UNIQSTR".
12320 * src/uniqstr.c: Renamed from src/struniq.c.
12321 * src/uniqstr.h: Renamed from src/struniq.h.
12322 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
12323 * src/files.c (strsuffix): Remove; unused.
12324 (concat2): Renamed from stringappend. Now static.
12325 * src/files.h (strsuffix, stringappend): Remove; unused.
12326 * src/parse-gram.y (<chars>): Renamed from <string>.
12327 (<uniqstr>): Renamed from <struniq>.
12328 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
12329 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
12330 (struct graph_s.expand): Renamed from struct graph_s.stretch.
12331 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
12332 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
12333 (N_EXPAND): Renamed from N_STRETCH.
12334
12335 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
12336 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
12337 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
12338 Remove; unused.
12339 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
12340 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
12341 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
12342 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
12343 (BASE_MAXIMUM): Renamed from BASE_MAX.
12344 (BASE_MINIMUM): Renamed from BASE_MIN.
12345 (ACTION_MAX): Remove; unused.
12346 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
12347 Unnecessary casts removed from above defines.
12348
12349
12350 Fix misspelling in names.
12351 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
12352 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
12353 G_NODE_ALIGNEMENT.
12354
12355
12356 * lib/timevar.c (timevar_report): Renamed from time_report,
12357 for consistency with other names.
12358 * lib/timevar.h (timevar_report): New decl.
12359 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
12360
12361
12362 Sort include-file uses.
12363
12364 Reorder all include files under src to be in the order "system.h".
12365 then the ../lib include files in angle brackets (alphabetized),
12366 then the . include files in double-quotes (alphabetized). Fix
12367 dependency breakages encountered in this process, as follows:
12368 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
12369 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
12370 * src/state.h: Include "symtab.h".
12371
996b1c7e
PE
123722002-12-08 Paul Eggert <eggert@twinsun.com>
12373
12374 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
12375 since this causes problems when __file__ contains character
12376 sequences like "@" that are treated specially by src/scan-skel.l.
12377 Instead, just use the file's basename. This fixes the bug
12378 reported by Martin Mokrejs in
161a71f3 12379 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
996b1c7e 12380
e19c4e5d
PE
123812002-12-06 Paul Eggert <eggert@twinsun.com>
12382
12383 Add support for rules that do not have trailing semicolons, as
12384 POSIX requires. Improve the quality of locations in Bison
12385 diagnostics.
26b4a969 12386
e19c4e5d
PE
12387 * src/location.c: Include <quotearg.h>.
12388 (empty_location): Now const.
12389 (location_print): New function. Follow the recommendation of the
12390 GNU Coding Standards for locations that span file boundaries.
12391 * src/location.h: Do not include <quotearg.h>; no longer needed.
12392 (boundary): New type.
12393 (location_t): Use it. This allows locations to span file boundaries.
12394 All member uses changed: file -> start.file or end.file (as needed),
12395 first_line -> start.line, first_column -> start.column,
12396 last_line -> end.line, last_column -> end.column.
12397 (equal_boundaries): New function.
12398 (LOCATION_RESET, LOCATION_STEP): Remove.
12399 (LOCATION_PRINT): Remove. All callers changed to use location_print.
12400 (empty_location): Now const.
12401 (location_print): New decl.
12402 * src/parse-gram.y (lloc_default): New function, which handles
12403 empty locations more accurately.
12404 (YYLLOC_DEFAULT): Use it.
12405 (%token COLON): Remove.
12406 (%token ID_COLON): New token.
26b4a969 12407 (rules): Use it.
e19c4e5d
PE
12408 (declarations, rules): Remove trailing semicolon.
12409 (declaration, rules_or_grammar_declaration):
12410 Allow empty (";") declaration.
12411 (symbol_def): Remove empty actions; no longer needed.
12412 (rules_or_grammar_declaration): Remove trailing semicolon.
12413 (semi_colon.opt): Remove.
12414 * src/reader.h: Include location.h.
12415 (scanner_cursor): New decl.
12416 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
12417 rolling our own.
12418 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
12419 of *loc.
12420 (STEP): Remove. No longer needed, now that adjust_location does
12421 the work. All uses removed.
12422 (scanner_cursor): New var.
12423 (adjust_location): Renamed from extend_location. It now sets
12424 *loc and adjusts the scanner cursor. All uses changed.
12425 Don't bother testing for CR.
12426 (handle_syncline): Remove location arg; now updates scanner cursor.
12427 All callers changed.
12428 (unexpected_end_of_file): Now accepts start boundary of token or
12429 comment, not location. All callers changed. Update scanner cursor,
12430 not the location.
12431 (SC_AFTER_IDENTIFIER): New state.
12432 (context_state): Renamed from c_context. All uses changed.
12433 (id_loc, code_start, token_start): New local vars.
12434 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
12435 processing of Yacc white space and equivalents here.
12436 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
12437 instead of returning ID immediately, since we need to search for
12438 a subsequent colon.
12439 (<INITIAL>"'", "\""): Save token_start.
12440 (<INITIAL>"%{", "{", "%%"): Save code_start.
12441 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
12442 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
12443 BEGIN context_state at end, not INITIAL.
12444 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
12445 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
12446 Return correct token start.
12447 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
12448 the start of a character, string or multiline comment is found.
12449 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
12450 Reduction): Adjust reported locations to match the more-precise
12451 results now expected.
12452 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
12453 * tests/reduce.at (Useless Rules, Reduced Automaton,
12454 Underivable Rules): Likewise.
12455 * tests/regression.at (Invalid inputs): No longer `expecting ";"
12456 or "|"' now that so many other tokens are allowed by the new grammar.
12457
12458 * src/complain.h (current_file): Remove duplicate decl;
12459 current_file is now owned by files.h.
12460 * src/complain.c, src/scan-gram.l: Include files.h.
12461
124622002-12-06 Paul Eggert <eggert@twinsun.com>
26b4a969 12463
e19c4e5d
PE
12464 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
12465 promotes to int; it might be unsigned int.
12466 * data/yacc.c (yy_reduce_print): Likewise.
12467
12468 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
12469 be #defined in the prologue, not in the Bison declarations.
12470 This fixes Debian Bug 102878, reported by Shaul Karl.
26b4a969 12471
b64755e3
PE
124722002-12-02 Paul Eggert <eggert@twinsun.com>
12473
12474 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
12475 * lib/strtoul.c: New file, from gnulib.
12476 This fixes a porting bug reported by Peter Klein in
161a71f3 12477 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
b64755e3 12478
6e746484
PE
124792002-11-30 Paul Eggert <eggert@twinsun.com>
12480
b64755e3
PE
12481 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
12482 and put only a forward declaration in the prologue. This is for
12483 consistency with the other scanner helper functions.
12484
6ba55592
PE
12485 Type clashes now generate warnings, not errors, since it
12486 appears that POSIX may allow some grammars with type clashes.
12487 * src/reader.c (grammar_current_rule_check): Warn about
12488 type clashes instead of complaining.
12489 * tests/input.at (Type Clashes): Expect warnings, not complaints.
12490
6e746484
PE
12491 Add Yacc library, since POSIX requires it.
12492 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
12493 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
12494 * lib/main.c, lib/yyerror.c: New files.
12495
12496 gram_error can be static; it need not be extern.
12497 * src/reader.h (gram_error): Remove decl.
12498 * src/parse-gram.y (gram_error): Now static. Add static decl.
12499 (print_token_value): Omit parameter names from forward decl,
12500 for consistency.
12501
88510f9c
PE
125022002-11-29 Paul Eggert <eggert@twinsun.com>
12503
6e746484
PE
12504 * doc/bison.texinfo: Emphasize that yylex and yyerror must
12505 be declared before being used. E.g., one should typically
12506 declare them in the prologue. Use GNU coding style in examples.
12507 Put "const" consistently after the type it modifies. Mention
12508 that C99 supports "inline". Mention that yyerror traditionally
12509 returns "int".
12510
88510f9c
PE
12511 %parse-param and %lex-param now take just one argument, the
12512 declaration; the argument name is deduced from the declaration.
12513
12514 * doc/bison.texinfo (Parser Function, Pure Calling, Error
12515 Reporting, Table of Symbols): Document this.
12516 * src/parse-gram.y (add_param): New function.
12517 (COMMA): Remove.
12518 (declaration): Implement new rule for %parse-param and %lex-param.
12519 * src/scan-gram.l: "," now elicits a warning, rather than being
12520 a token; this is more compatible with byacc.
12521 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
12522
bb92250c
PE
125232002-11-27 Paul Eggert <eggert@twinsun.com>
12524
12525 Rename identifiers to avoid real and potential collisions.
12526
12527 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
12528 to avoid collision with lex macro described by Bruce Lilly in
161a71f3 12529 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
bb92250c
PE
12530 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
12531 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
12532 * src/parse-gram.y (print_token_value): Renamed from yyprint.
12533 All uses changed.
12534 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
12535 The name "yycontrol" violates the name space rules, and this stuff
12536 wasn't being used anyway.
12537 (input): Remove action; this stuff wasn't being used.
12538 (gram_error): Rename local variable yylloc -> loc.
12539 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
12540 (YY_DECL): Don't use "yy" at start of local variables.
12541 All uses changed, e.g., yylloc -> loc.
12542 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
12543 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
12544 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
12545 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
12546
12547 * src/parse-gram.y (gram_error): loc is now const *.
12548 * src/reader.h (gram_error): Likewise.
12549
3af4feb2
PE
125502002-11-24 Paul Eggert <eggert@twinsun.com>
12551
12552 Version 1.75c.
12553
12554 * tests/actions.at (Actions after errors): Use an output format
12555 more similar to that of the Printers and Destructors test.
12556 Test the position of the ';' token too.
12557 (Printers and Destructors): Likewise.
12558 (Printers and Destructors: %glr-parser): Remove for now, to avoid
12559 unnecessarily alarming people when the test fails.
12560
12561 * data/yacc.c (yyerrlab1): Move this label down, so that the
12562 parser does not discard the lookahead token if the user code
12563 invokes YYERROR. This change is required for POSIX conformance.
12564
12565 * lib/error.c: Sync with gnulib.
12566
125672002-11-22 Paul Eggert <eggert@twinsun.com>
12568
12569 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
12570 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
12571 * lib/xmalloc.c: Likewise.
26b4a969 12572
58004308
PE
125732002-11-20 Paul Eggert <eggert@twinsun.com>
12574
12575 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
12576
125772002-11-20 Paul Eggert <eggert@twinsun.com>
26b4a969 12578
58004308
PE
12579 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
12580 should use `if (! x) abort ();' rather than `assert (x);', and
12581 anyway it's one less thing to worry about configuring.
12582
12583 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
12584 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
12585 and replace all instances of assert with abort.
12586 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
12587 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
12588
12589 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
12590 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
12591 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
12592 hash_find_entry, hash_rehash, hash_insert): Likewise.
12593 * src/conflicts.c (resolve_sr_conflict): Likewise.
12594 * src/lalr.c (set_goto_map, map_goto): Likewise.
12595 * src/nullable.c (nullable_compute): Likewise.
12596 * src/output.c (prepare_rules, token_definitions_output): Likewise.
12597 * src/reader.c (packgram, reader): Likewise.
12598 * src/state.c (state_new, state_free, state_transitions_set,
12599 state_reduction_find): Likewise.
12600 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
12601 symbol_pack): Likewise.
12602 * src/tables.c (conflict_row, pack_vector): Likewise.
12603 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
12604 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
12605 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
12606 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
12607
12608 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
12609 (ARGMATCH_CONSTRAINT): New macro.
12610 (ARGMATCH_ASSERT): Use it.
12611
12612 * src/system.h (verify): New macro.
12613 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
12614 rather than assert.
12615 * src/tables.c (tables_generate): Likewise.
12616
12617 * src/struniq.c (struniq_assert): Now returns void, and aborts
12618 if the assertion is false.
12619 (struniq_assert_p): Remove.
12620 * src/struniq.h: Likewise.
12621
76ae8198
PE
126222002-11-18 Paul Eggert <eggert@twinsun.com>
12623
12624 * data/glr.c (yygetLRActions): Replace `yyindex' with
12625 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
12626 This fixes the regression with Sun ONE Studio 7 cc that I reported in
161a71f3 12627 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
76ae8198 12628
d3c4e709
AD
126292002-11-18 Akim Demaille <akim@epita.fr>
12630
12631 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
12632 space.
12633 From Tim Van Holder.
12634
8d8a7238
PE
126352002-11-17 Paul Eggert <eggert@twinsun.com>
12636
12637 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
12638 to "SyntaxError" for consistency with my 2002-11-15 change.
12639
12640 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
12641 not define to {}, since this breaks the common use of `YYDPRINTF
12642 ((...));' if a single statement is desired (e.g. before `else').
12643 Work around GCC warnings by surrounding corresponding calls with
12644 {} if needed.
12645 (yyhasResolvedValue): Remove unused function.
12646 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
12647 loop body.
12648 (yyreportSyntaxError): Renamed from yyreportParseError.
12649 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
12650 All uses changed.
12651 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
12652 extern when possible. Remove unused initializations.
12653
b0937b22
AD
126542002-11-16 Akim Demaille <akim@epita.fr>
12655
12656 Augment the similarity between GLR and LALR traces.
12657
12658 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
12659 (YY_REDUCE_PRINT): New.
12660 (yyparse): Use them.
12661 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
12662 YYDPRINT here.
12663 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
12664 state reached after the reduction/recovery, since...
12665 (yyparse, yyprocessOneStack): Report the state we are entering in.
12666
c5e3e510
AD
126672002-11-16 Akim Demaille <akim@epita.fr>
12668
12669 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
12670 Add support for --trace=skeleton.
12671 * src/scan-skel.l: %option debug.
12672 Scan strings of non-@ or \n instead of character by character.
12673 (scan_skel): Handle trace_skeleton.
12674 (QPUTS): New.
12675 (@output_parser_name@, @output_header_name@): ``Restore'' their
12676 support (used to be M4 macros).
12677 * data/yacc.c: Quote larger chunks, a la glr.c.
12678 * data/lalr1.cc: Likewise.
12679 The header guards are no longer available, so use some other
12680 string than `YYLSP_NEEDED'.
12681
4c6cc1db
AD
126822002-11-16 Akim Demaille <akim@epita.fr>
12683
12684 Make the ``Printers and Destructors'' test more verbose, taking
12685 `yacc.c''s behavior as (possibly wrong) reference.
12686
12687 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
12688 instead of fprint on stdout.
12689 Set and report the last_line of the symbols.
12690 Consistently display values and locations.
12691
6d9e8019
PE
126922002-11-16 Paul Eggert <eggert@twinsun.com>
12693
12694 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
12695
6e649e65
PE
126962002-11-15 Paul Eggert <eggert@twinsun.com>
12697
b25d88f6
PE
12698 * tests/actions.at (Actions after errors): New test case.
12699
6e649e65
PE
12700 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
12701 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
12702 tests/action.at, tests/calc.at, tests/conflicts.at,
12703 tests/cxx-type.at, tests/regression.at:
12704 "parse error" -> "syntax error" for POSIX compatibility.
12705 "parsing stack overflow..." -> "parser stack overflow" so
12706 that code matches Bison documentation.
12707
0f39aab9
AD
127082002-11-15 Akim Demaille <akim@epita.fr>
12709
12710 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
12711 take two BRACED_CODE, not two string_content.
12712 Free the scanner's obstack when we are done.
12713 (code_content): New.
12714 * tests/calc.at: Adjust.
12715 * doc/bison.texinfo: Adjust.
12716 Also, make sure to include the `,' for these declarations.
12717
761c1926
AD
127182002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
12719
12720 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
12721 definition; avoids potential autoreconf problems.
12722
b0f98b10
AD
127232002-11-15 Akim Demaille <akim@epita.fr>
12724
12725 Always check the value returned by yyparse.
12726
12727 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
12728 returned by yyparse.
12729 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
12730 Adjust calls.
12731 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
12732 returned by yyparse.
12733
970785f1
PH
127342002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12735
12736 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
12737 on input.at test.
12738
8fcc7db1
PE
127392002-11-14 Paul Eggert <eggert@twinsun.com>
12740
7ec1b48e
PE
12741 * src/output.c (output_skeleton): Call xfopen instead of
12742 duplicating xfopen's body.
12743
cfff7583 12744 Fix bugs reported by Nelson H. F. Beebe in
161a71f3 12745 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
cfff7583 12746
8fcc7db1
PE
12747 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
12748 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
12749 Group compiler. Instead, use "$CC -E bar.c". Include the .h
12750 file twice in the grammar, as an extra check.
12751
12752 * tests/input.at (Torturing the Scanner): Surround the
12753 backslash-newline tests with "#if 0", to make it less likely that
12754 we'll run into compiler bugs. Bring back solitary \ inside
12755 comment, but add a closing comment to work around HP C bug. Don't
e3aa65c5 12756 test backslash-newline in C character constant.
8fcc7db1 12757
4e8d992c
AD
127582002-11-14 Akim Demaille <akim@epita.fr>
12759
12760 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
12761 status of the compiler.
f32b346d 12762 Calling `exit 1' is no longer needed.
4e8d992c
AD
12763 Reported by Nelson H. F. Beebe.
12764
9501dc6e
AD
127652002-11-14 Akim Demaille <akim@epita.fr>
12766
12767 * tests/atlocal.in (CPPFLAGS): We have config.h.
12768 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
12769 New.
12770 * tests/actions.at, tests/calc.at, tests/conflicts.at,
12771 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
12772 * tests/regression.at, tests/torture.at: Use them for all the
12773 grammars that are to be compiled.
12774 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
12775 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
12776 * doc/bison.texinfo (GLR Parsers): Document `inline'.
12777
18b519c0
AD
127782002-11-14 Akim Demaille <akim@epita.fr>
12779
12780 * doc/bison.texinfo: Various formatting changes (alignments in
12781 samples, additional @group/@end group, GCS in samples.
12782 Use @deffn instead of simple @table to define the directives,
12783 macros, variables etc.
12784
9a86cdb9
PE
127852002-11-13 Paul Eggert <eggert@twinsun.com>
12786
daa33def 12787 Fix some bugs reported by Albert Chin-A-Young in
161a71f3 12788 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
18b519c0 12789
daa33def 12790 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8fcc7db1 12791 -o c"; the HP C compiler chatters during compilation.
daa33def
PE
12792 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
12793 * tests/headers.at (export YYLTYPE): Likewise.
12794
12795 * tests/input.at (Torturing the Scanner): Remove lines containing
8fcc7db1 12796 solitary backslashes, as they tickle a bug in the HP C compiler.
daa33def 12797
9a86cdb9
PE
12798 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
12799 comments, since they're not portable. Use GNU coding style.
12800
9c1e26bd
AD
128012002-11-13 Akim Demaille <akim@epita.fr>
12802
12803 * data/yacc.c: Leave bigger chunks of quoted text.
12804 (YYDSYMPRINTF): New.
12805 Use it to report symbol activities.
12806 * data/glr.c (YYDSYMPRINTF): New.
12807 Use it.
12808
87f721cc
PE
128092002-11-12 Paul Eggert <eggert@twinsun.com>
12810
12811 Version 1.75b.
12812
12813 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
12814 (yyglrReduce): Return yyok, not 0.
12815 This should avoid the enumerated-type warnings reported
464c6927 12816 by Nelson H. F. Beebe in
161a71f3 12817 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
87f721cc
PE
12818
12819 * lib/bbitset.h (BITSET_INLINE): Remove.
12820 * lib/bitset.h [! BITSET_INLINE]: Remove.
12821 (bitset_set, bitset_reset, bitset_test): Rename local vars
12822 to avoid shadowing warnings by GCC.
12823
12824 * data/glr.c (inline): Remove #define. It's the user's
12825 responsibility to #define it away, just like 'const'.
464c6927 12826 This fixes one of the bugs reported by Nelson H. F. Beebe in
161a71f3 12827 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
18b519c0 12828
87f721cc
PE
12829 * Makefile.maint (po-check): Scan .l and .y files instead of the
12830 .c and the .h files that they generate. This fixes the bug
12831 reported by Tim Van Holder in:
161a71f3 12832 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
87f721cc
PE
12833 Look for N_ as well as for _. Try to avoid matching #define for
12834 N_ and _.
12835 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
12836 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
12837 * src/scan-gram.l: Revamp regular expressions so that " and '
12838 do not confuse xgettext.
12839
12840 * src/struniq.h (struniq_new): Do not declare the return type
12841 to be 'const'; this violates the C standard.
12842 * src/struniq.c (struniq_new): Likewise.
12843
be14ade5
AD
128442002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
12845
12846 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
12847 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
12848 linker.
12849
05291fbc
AD
128502002-11-12 Akim Demaille <akim@epita.fr>
12851
12852 * Makefile.maint: Sync with Autoconf:
12853 (local_updates): New.
12854
1f5fd52e
AD
128552002-11-12 Akim Demaille <akim@epita.fr>
12856
12857 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
12858
283f1e64
AD
128592002-11-12 Akim Demaille <akim@epita.fr>
12860
12861 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
12862 locations.
12863
886b69d1
AD
128642002-11-12 Akim Demaille <akim@epita.fr>
12865
12866 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
12867 not yyvalue.
12868
3df37415
AD
128692002-11-12 Akim Demaille <akim@epita.fr>
12870
12871 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
12872 Use it to test the GLR parser.
12873
7bd6c77e
AD
128742002-11-12 Akim Demaille <akim@epita.fr>
12875
12876 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
12877 defines it.
12878 * data/glr.c (yystos): New.
12879 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
12880 (YYDSYMPRINT): New.
12881 (yyval): Don't define it, it is handled via M4.
12882 (yyrecoverParseError): Free verbosely the discarded symbols.
12883 * data/yacc.c (yysymprint): Remove, rather...
12884 (b4_yysymprint_generate): invoke.
12885 * data/c.m4 (b4_yysymprint_generate): New.
12886 Accept pointers as arguments, as opposed to the version from
12887 yacc.c.
12888 (b4_yydestruct_generate): Likewise.
12889 * tests/cations.at (Printers and Destructors): Use Bison directives
12890 instead of CPP macros.
12891 Don't rely on internal details.
12892
b0400cc6
AD
128932002-11-12 Akim Demaille <akim@epita.fr>
12894
12895 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
12896 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
12897 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
12898 it against YYEMPTY and so forth), work on yytoken (i.e., set
12899 it to YYEMPTY etc.).
12900 (yydestruct): Replace with a b4_yydestruct_generate invocation.
12901 (b4_symbol_actions): Remove.
12902 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
12903 for 0, end-of-input.
12904
72f889cc
AD
129052002-11-12 Akim Demaille <akim@epita.fr>
12906
12907 * doc/bison.texinfo (Destructor Decl): New.
12908
b1ae9233
AD
129092002-11-12 Akim Demaille <akim@epita.fr>
12910
12911 * src/tables.c (tables_generate): Use free for pointers that
12912 cannot be NULL, not XFREE.
12913 (pack_vector): Use assert, not fatal, for bound violations.
12914 * src/state.c (state_new): Likewise.
12915 * src/reader.c (reader): Likewise.
12916 * src/lalr.c (set_goto_map): Likewise.
72f889cc 12917 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
b1ae9233
AD
12918 the file name.
12919
7ec2d4cd
AD
129202002-11-12 Akim Demaille <akim@epita.fr>
12921
12922 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
12923 Restore.
12924 * src/scan-gram.l (last_string): Is global to the file, not to
12925 yylex.
12926 * src/parse-gram.y (input): Don't append the epilogue here,
12927 (epilogue.opt): do it here, and free the scanner's obstack.
12928 * src/reader.c (epilogue_set): Rename as...
12929 (epilogue_augment): this.
12930 * data/c.m4 (b4_epilogue): Defaults to empty.
12931
573a6cd3
AD
129322002-11-12 Akim Demaille <akim@epita.fr>
12933
12934 * src/getargs.c (long_options): Remove duplicates.
12935 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
12936 Remove.
12937 * doc/bison.rnh: Remove.
12938 * doc/bison.texinfo (VMS Invocation): Remove.
12939
95612cfa
AD
129402002-11-12 Akim Demaille <akim@epita.fr>
12941
12942 * src/struniq.h, src/struniq.c (struniq_t): Is const.
12943 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
12944
12945 Use struniq for symbols.
12946
12947 * src/symtab.h (symbol_t): The tag member is a struniq.
12948 (symbol_type_set): Adjust.
12949 * src/symtab.c (symbol_new): Takes a struniq.
12950 (symbol_free): Don't free the tag member.
12951 (hash_compare_symbol_t, hash_symbol_t): Rename as...
12952 (hash_compare_symbol, hash_symbol): these.
12953 Use the fact that tags as struniqs.
12954 (symbol_get): Use struniq_new.
12955 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
12956 Returns a strniq.
12957 * src/reader.h (merger_list, grammar_currentmerge_set): The name
12958 and type members are struniqs.
12959 * src/reader.c (get_merge_function)
12960 (grammar_current_rule_merge_set): Adjust.
12961 (TYPE, current_type): Are struniq.
12962
12963 Use struniq for file names.
12964
12965 * src/files.h, src/files.c (infile): Split into...
12966 (grammar_file, current_file): these.
12967 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
12968 * src/reduce.c (reduce_print): Likewise.
12969 * src/getargs.c (getargs): Likewise.
12970 * src/complain.h, src/complain.c: Likewise.
12971 * src/main.c (main): Call struniqs_new early enough to use it for
12972 file names.
12973 Don't free the input file name.
12974
3e6656f9
AD
129752002-11-12 Akim Demaille <akim@epita.fr>
12976
12977 * src/symtab.c (symbol_free): Remove dead deactivated code:
12978 type_name are properly removed.
12979 Don't use XFREE to free items that cannot be NULL.
12980 * src/struniq.h, src/struniq.c: New.
12981 * src/main.c (main): Initialize/free struniqs.
12982 * src/parse-gram.y (%union): Add astruniq member.
12983 (yyprint): Adjust.
12984 * src/scan-gram.l (<{tag}>): Return a struniq.
12985 Free the obstack bit that used to store it.
12986 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
12987
7672019c
PE
129882002-11-11 Paul Eggert <eggert@twinsun.com>
12989
12990 Revamp to fix many (but not all) of the C- and M4-related quoting
12991 problems. Among other things, this fixes the Bison bug reported
12992 by Jan Hubicka when processing the Bash grammar; see:
161a71f3 12993 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7672019c
PE
12994
12995 Use new @ escapes consistently. Represent brackets with @{ and @}
12996 rather than @<:@ and @:>@, since this works a bit better with dumb
12997 editors like vi. Represent @ with @@, since @ is now consistently
12998 an escape. Use @oline@ and @ofile@ rather than __oline__ and
12999 __ofile__, to avoid unexpected expansions. Similarly, use @output
13000 rather than #output.
13001
13002 * data/c.m4 (b4_copyright): Omit file name from comment, since
13003 the file name could contain "*/".
13004 (b4_synclines_flag): Don't quote the 2nd argument; it should already
13005 be quoted. All uses changed.
13006
13007 * data/glr.c: Use new @ escapes consistently.
13008 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
13009 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
13010 Remove, since they couldn't handle arbitrary characters in file
13011 names.
13012 * data/lalr1.cc: Likewise.
13013 * data/yacc.c: Likewise.
13014
13015 * src/files.c (output_infix): Remove; all uses removed.
13016 * src/files.h: Likewise.
13017
13018 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
13019 mishandled funny characters in file names, and anyway it isn't
13020 needed any more.
13021 * data/yacc.c: Likewise.
13022 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
13023
13024 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
13025 * data/yacc.c: Likewise.
13026
13027 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
13028 strings now.
13029 (muscle_init): Quote filename as a C string.
13030 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
13031 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
13032 * src/output.c (escaped_file_name_output): New function.
13033 (prepare_symbols): Quote tokens for M4.
13034 (prepare): Don't insert output_infix, output_prefix,
13035 output_parser_name, output_header_name; this is now down by scan-skel.
13036 Insert skeleton as a C string.
13037
13038 * src/output.c (user_actions_output, symbol_destructors_output,
13039 symbol_printers_output): Quote filenames for C and M4.
13040 * src/reader.c (prologue_augment, epilogue_set): Likewise.
13041
13042 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
13043 escapes other than \\ and \'; this simplifies the code.
13044 (<SC_STRING>): Likewise, for \\ and \".
13045 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
13046 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
13047 Use new escapes @{ and @} for [ and ].
13048
13049 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
13050 them with auto vars.
13051 Switch to new escape scheme, where @ is the escape character uniformly.
13052 Abort if a stray escape character is found. Avoid unbounded input
13053 buffer when parsing non-escaped text.
13054
13055 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
13056 __oline__, #output, $@, and @{ do not have unintended meanings.
13057
acea4f3b
PE
130582002-11-09 Paul Eggert <eggert@twinsun.com>
13059
13060 Fix the test failure due to GCC warnings described in
161a71f3 13061 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
acea4f3b
PE
13062 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
13063 evaluate to 0 if it's impossible for NINF to be in the respective
13064 table.
13065 (yygetLRActions, yyrecoverParseError): Use them.
13066
13067 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
13068 counted in the token inserted at end of file. Now takes
13069 location_t *, not location_t, so that the location can be
13070 adjusted. All uses changed.
13071
13072 * tests/regression.at (Invalid inputs): Adjust wording in
13073 diagnostic to match the new behavior.
13074
13075 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
13076 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
13077 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
13078 abort ();'. This reduces the runtime of the "Many lookaheads"
13079 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
13080 GCC 3.2.
13081
20ef1ad5
PE
130822002-11-07 Paul Eggert <eggert@twinsun.com>
13083
13084 * src/parse-gram.y (CHARACTER): Remove unused token.
13085 All uses removed.
13086
13087 * src/scan-gram.l: Remove stack option. We no longer use the
13088 stack, since the stack was never deeper than 1; instead, use the
13089 new auto var c_context to record the stacked value.
13090
13091 Remove nounput option. At an unexpected end of file, we now unput
13092 the minimal input necessary to end cleanly; this simplifies the
13093 code.
13094
13095 Avoid unbounded token sizes where this is easy.
13096
13097 (unexpected_end_of_file): New function.
13098 Use it to systematize the error message on unexpected EOF.
13099 (last-string): Now auto, not static.
13100 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
13101 (scanner_last_string_free): Remove; not used.
13102 (percent_percent_count): Move decl to just before use.
13103 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
13104 not the (never otherwised-used) CHARACTER.
13105
93724f13
AD
131062002-11-07 Akim Demaille <akim@epita.fr>
13107
13108 Let yyerror always receive the msg as last argument, so that
13109 yyerror can be variadic.
13110
13111 * data/yacc.c (b4_yyerror_args): New.
13112 Use it when calling yyerror.
13113 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
13114 Use it when calling yyerror.
13115 * doc/bison.texinfo (Error Reporting): Adjust.
13116 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
13117 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
13118
6e40b4eb
AD
131192002-11-06 Akim Demaille <akim@epita.fr>
13120
13121 #line should have quoted strings.
13122 Ideally, this should be done by m4_quotearg.
13123
13124 * src/scan-skel.l: Include quotearg.h.
13125 Quote __ofile__.
13126 * src/output.c (symbol_printers_output)
13127 (symbol_destructors_output): Quote the file name.
13128
2dfbfc12
AD
131292002-11-06 Akim Demaille <akim@epita.fr>
13130
13131 * tests/regression.at (Invalid inputs): Adjust to the recent
13132 messages.
13133
437c2d80
AD
131342002-11-06 Akim Demaille <akim@epita.fr>
13135
13136 Restore --no-lines.
13137 Reported by Jim Kent.
13138
13139 * data/c.m4 (b4_syncline): New.
13140 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
13141 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
13142 * src/output.c (user_actions_output): Likewise.
13143 (prepare): Define 'b4_synclines_flag'.
2dfbfc12 13144 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
437c2d80 13145
900c5db5
AD
131462002-11-06 Akim Demaille <akim@epita.fr>
13147
13148 * src/main.c (main): Free `infile'.
13149 * src/scan-gram.l (handle_syncline): New.
13150 Recognize `#line'.
13151 * src/output.c (user_actions_output, symbol_destructors_output)
13152 (symbol_printers_output): Use the location's file name, not
13153 infile.
13154 * src/reader.c (prologue_augment, epilogue_set): Likewise.
13155
e183b123 131562002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
51b4a04c 13157
e183b123 13158 * src/tables.c (matching_state): Don't allow states to match if
51b4a04c 13159 either has GLR conflict entries.
e183b123 13160
193eb6b7
PE
131612002-11-05 Paul Eggert <eggert@twinsun.com>
13162
e183b123
PE
13163 * src/scan-gram.l: Use more accurate diagnostics, e.g.
13164 "integer out of range" rather than "invalid value".
13165 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
13166 accordingly.
13167
193eb6b7
PE
13168 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
13169 Also, remove one static variable in the scanner.
13170
13171 * src/scan-gram.l (braces_level): Now auto, not static.
13172 Initialize to zero if the compiler is being picky.
13173 (INITIAL): Clear braces_level instead of incrementing it.
13174 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
13175 as POSIX 1003.1-2001 requires.
13176 * src/system.h (IF_LINT): New macro, taken from coreutils.
13177 * configure.ac: Define "lint" if --enable-gcc-warnings.
13178
29c01725
AD
131792002-11-05 Akim Demaille <akim@epita.fr>
13180
13181 * src/scan-gram.l: When it starts with `%', complain about the
13182 whole directive, not just that `invalid character: %'.
13183
8aeac3ca
AD
131842002-11-04 Akim Demaille <akim@epita.fr>
13185
13186 * Makefile.maint: Update from Autoconf.
13187 (update, cvs-update, po-update, do-po-update): New.
13188
793a58bb
AD
131892002-11-04 Akim Demaille <akim@epita.fr>
13190
13191 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
13192 and yyerror.
13193 Have yyerror `use' its arguments.
13194 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
13195 returns true when location & yacc & pure & parse-param.
13196 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
13197
c4d720cd
AD
131982002-11-04 Akim Demaille <akim@epita.fr>
13199
13200 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
13201 clashes.
13202 * src/scan-gram.l: Use [\'] instead of ['] to pacify
13203 font-lock-mode.
13204 Use complain_at.
13205 Use quote, not quote_n since LOCATION_PRINT no longer uses the
13206 slot 0.
13207
613a0dc5
PE
132082002-11-03 Paul Eggert <eggert@twinsun.com>
13209
13210 * src/reader.c (get_merge_function, grammar_current_rule_check):
13211 Use consistent diagnostics for reporting type name clashes.
13212 Quote the types with <>, for consistency with Yacc.
13213 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
13214
2a8d363a
AD
132152002-11-03 Akim Demaille <akim@epita.fr>
13216
13217 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
13218 New.
13219 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
13220 (b4_parse_param): Remove.
13221 Use b4_identification.
13222 Propagate b4_pure_args where needed to pass them to yyerror.
13223 * data/glr.m4 (b4_parse_param): Remove.
13224 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
13225 (b4_lpure_formals): New.
13226 Use b4_identification.
13227 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
13228 b4_user_formals and b4_user_args.
13229 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
13230 (yyreportAmbiguity): When using a pure parser, also need
13231 the location, and the parse-params.
13232 Adjust callers.
13233 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
13234 When using a pure parser, also need the parse-params.
13235 Adjust callers.
13236 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
13237 (%pure-parser + %parse-param) LALR and GLR parsers.
13238 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
13239 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
13240 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
13241 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
13242 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
13243 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
13244 * doc/bison.texinfo: Untabify the whole file.
13245 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
13246 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
13247 (Error Reporting): Adjust to these new directives.
13248 Document %error-verbose, deprecate YYERROR_VERBOSE.
13249
9e32add8
AD
132502002-11-03 Akim Demaille <akim@epita.fr>
13251
13252 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
13253 AT_CHECK_CALC_GLR invocations to use % directives, instead of
13254 command line options.
13255 * tests/cxx-type.at: Formatting changes.
13256
b02d90a5
PE
132572002-11-03 Paul Eggert <eggert@twinsun.com>
13258
13259 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
13260 to count columns correctly, and to check for invalid inputs.
9e32add8 13261
b02d90a5
PE
13262 Use mbsnwidth to count columns correctly. Account for tabs, too.
13263 Include mbswidth.h.
13264 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
13265 (extend_location): New function.
13266 (YY_LINES): Remove.
13267
13268 Handle CRLF in C code rather than in Lex code.
13269 (YY_INPUT): New macro.
13270 (no_cr_read): New function.
13271
13272 Scan UCNs, even though we don't fully handle them yet.
13273 (convert_ucn_to_byte): New function.
13274
13275 Handle backslash-newline correctly in C code.
13276 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
13277 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
13278 all uses changed.
13279 (tag, splice): New EREs. Do not allow NUL or newline in tags.
13280 Use {splice} wherever C allows backslash-newline.
13281 YY_STEP after space, newline, vertical-tab.
13282 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9e32add8 13283
b02d90a5
PE
13284 (letter, id): Don't assume ASCII; e.g., spell out a-z.
13285
13286 ({int}, handle_action_dollar, handle_action_at): Check for integer
13287 overflow.
9e32add8 13288
b02d90a5
PE
13289 (YY_STEP): Omit trailing semicolon, so that it's more like C.
13290
13291 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
13292 as well as \000. Check for UCHAR_MAX, not 255.
13293 Allow \x with an arbitrary positive number of digits, as in C.
13294 Check for overflow here.
13295 Allow \? and UCNs, for compatibility with C.
13296
13297 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
13298 with quote slot used by complain_at.
13299
13300 * tests/input.at: Add tests for backslash-newline, m4 quotes
13301 in symbols, long literals, and funny escapes in strings.
13302
13303 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
13304 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
13305 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
13306 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
13307 * m4/mbswidth.m4: New file, from GNU coreutils.
13308
13309 * doc/bison.texinfo (Grammar Outline): Document // comments.
13310 (Symbols): Document that trigraphs have no special meaning in Bison,
13311 nor is backslash-newline allowed.
13312 (Actions): Document that trigraphs have no special meaning.
13313
13314 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
13315 no longer used.
13316
133172002-11-02 Paul Eggert <eggert@twinsun.com>
13318
13319 * src/reader.c: Don't include quote.h; not needed.
13320 (get_merge_function): Reword warning to be consistent with
13321 type clash diagnostic in grammar_current_rule_check.
13322
13323 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
13324 bug in trigraph handling.
13325
13326 * src/output.c (prepare_symbols): When printing token names,
13327 escape "[" as "@<:@" and likewise for "]".
13328
13329 * src/system.h (errno): Remove declaration, as we are now
13330 assuming C89 or better, and C89 guarantees errno.
13331
762b212b
PE
133322002-10-30 Paul Eggert <eggert@twinsun.com>
13333
13334 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
13335 Check for close failures.
13336 * src/files.h (xfclose): Return void, not int, since it always
13337 returned zero.
13338 * src/files.c (xfclose): Likewise. Report I/O error if ferror
13339 indicates one.
13340 * src/output.c (output_skeleton): Use xfclose rather than fclose
13341 and ferror. xfclose now checks ferror.
13342
13343 * data/glr.c (YYLEFTMOST_STATE): Remove.
13344 (yyreportTree): Use a stack-based leftmost state. This avoids
13345 our continuing battles with bogus warnings about initializers.
13346
56100c60
AD
133472002-10-30 Akim Demaille <akim@epita.fr>
13348
13349 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
13350 #if.
13351
51b4a04c
PH
133522002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13353
13354 * tests/glr-regr1.at: New test for reported regressions.
13355 * tests/testsuite.at: Add glr-regr1.at test.
13356 * tests/Makefile.am: Add glr-regr1.at test.
e183b123 13357
bf1ebda2
PE
133582002-10-24 Paul Eggert <eggert@twinsun.com>
13359
5c16c6b1
PE
13360 Version 1.75a.
13361
bf1ebda2
PE
13362 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
13363 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
13364 we use malloc. Don't assume 'A' through 'Z' are contiguous.
13365 Don't assume strdup exists; POSIX says its an XSI extension.
13366 Check for buffer overflow on input.
13367
b526ee61
AD
133682002-10-24 Akim Demaille <akim@epita.fr>
13369
13370 * src/output.c (output_skeleton): Don't disable M4sugar comments
13371 too soon: it results in comments being expanded.
13372 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
13373 first output.
13374
f1886bb2
AD
133752002-10-24 Akim Demaille <akim@epita.fr>
13376
13377 * data/yacc.c (m4_int_type): New.
13378 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
13379 char' as only yacc.c wants K&R portability.
13380 * data/glr.c (yysigned_char): Remove.
13381 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
13382 Reported by Quoc Peyrot.
13383
c5576256
PE
133842002-10-23 Paul Eggert <eggert@twinsun.com>
13385
13386 * src/main.c (main): With --trace=time, report times even if a
13387 non-fatal error occurs. Formerly, the times were reported in some
13388 such cases but not in others.
13389 * src/reader.c (reader): Just return if a complaint has been issued,
13390 instead of exiting, so that 'main' can report times.
13391
27b0ffea
AD
133922002-10-22 Akim Demaille <akim@epita.fr>
13393
13394 * src/system.h: Include sys/types.
13395 Reported by Bert Deknuydt.
13396
223a7883
PE
133972002-10-23 Paul Eggert <eggert@twinsun.com>
13398
13399 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
13400 Suggested by Art Haas.
13401
134022002-10-22 Paul Eggert <eggert@twinsun.com>
13403
13404 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
13405 decl; not needed any more.
13406 * src/main.c (main): Use return to exit, undoing yesterday's change.
13407 The last OS that we could find where this wouldn't work is
13408 SunOS 3.5, and that's too old to worry about now.
13409
13410 * data/glr.c (struct yyltype): Define members even when not
13411 doing locations. This is more consistent with yacc.c, and it
13412 works around the following bug reports:
161a71f3
PE
13413 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
13414 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
27b0ffea 13415
223a7883
PE
13416 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
13417 @acronym consistently. Standardize on "Yacc" instead of "YACC",
13418 "Algol" instead of "ALGOL". Give a bit more history about BNF.
13419
8b76775a
AD
134202002-10-22 Akim Demaille <akim@epita.fr>
13421
13422 * data/README: New.
13423
6db10d14
PE
134242002-10-21 Paul Eggert <eggert@twinsun.com>
13425
13426 Be consistent about 'bool'; the old code used an enum in one
13427 module and an int in another, and this violates the C standard.
13428 * m4/stdbool.m4: New file, from coreutils 4.5.3.
13429 * configure.ac (AC_HEADER_STDBOOL): Add.
13430 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
13431 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
13432 * src/symtab.c (hash_compare_symbol_t): Likewise.
13433 * src/system.h (bool, false, true): Use a definition consistent
13434 with ../lib/hash.c. All uses changed.
13435
13436 * src/complain.c (warning_issued): Renamed from warn_message_count,
13437 so that we needn't worry about integer overflow (!).
13438 Now of type bool. All uses changed.
13439 (complaint_issued): Renamed from complain_message_count; likewise.
13440
13441 * src/main.c (main): Use exit to exit with failure.
27b0ffea 13442
6db10d14
PE
13443 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
13444 rather than 1 and 0.
13445 * src/main.c (main): Likewise.
13446 * src/getargs.c (getargs): Likewise.
13447 * src/reader.c (reader): Likewise.
13448
13449 * src/getarg.c (getargs): Remove duplicate code for
13450 "Try `bison --help'".
13451
13452 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
13453 What was that "2" for?
13454
13455 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
13456 * src/getargs.c (usage): Likewise.
13457
13458 * src/getargs.c (getargs): When there are too few operands, report
13459 the last one. When there are too many, report the first extra
13460 one. This is how diffutils does it.
13461
92a060fd
PE
134622002-10-20 Paul Eggert <eggert@twinsun.com>
13463
13464 Remove K&R vestiges.
13465 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
13466 * src/complain.c (VA_START): Remove. Assume prototypes.
13467 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
13468 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
13469 fatal): Assume prototypes.
13470 * src/complain.h: Assume prototypes.
13471 * src/system.h (PARAMS): Remove.
13472 Include <limits.h> unconditionally, since it's guaranteeed even
13473 for a freestanding C89 compiler.
13474 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
13475 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8b76775a 13476
e7cb57c0
AD
134772002-10-20 Akim Demaille <akim@epita.fr>
13478
13479 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
13480 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
13481 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
13482 (yyresolveStates, yyresolveAction, yyresolveStack)
13483 (yyprocessOneStack): Use them.
13484 (yy_reduce_print): New.
13485 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
13486
0245f82d
AD
134872002-10-20 Akim Demaille <akim@epita.fr>
13488
13489 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
13490 arguments and output `void'.
13491 (b4_c_function): Rename as...
13492 (b4_c_function_def): this.
13493 (b4_c_function_decl, b4_c_ansi_function_def)
13494 (b4_c_ansi_function_decl): New.
13495 Change the interpretation of the arguments: before `int, foo', now
13496 `int foo, foo'.
13497 * data/yacc.c (yyparse): Prototype and define thanks to these.
13498 Adjust b4_c_function_def uses.
13499 * data/glr.c (yyparse): Likewise, but ANSI only.
13500
39912f52
AD
135012002-10-20 Akim Demaille <akim@epita.fr>
13502
13503 * src/output.c (prepare): Move the definition of `tokens_number',
13504 `nterms_number', `undef_token_number', `user_token_number_max'
13505 to...
13506 (prepare_tokens): Here.
13507 (prepare_tokens): Rename as...
13508 (prepare_symbols): this.
13509 (prepare): Move the definition of `rules_number' to...
13510 (prepare_rules): here.
13511 (prepare): Move the definition of `last', `final_state_number',
13512 `states_number' to...
13513 (prepare_states): here.
13514 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
13515
20c1e2ad
AD
135162002-10-20 Akim Demaille <akim@epita.fr>
13517
13518 * src/tables.h, src/tables.c, src/output.c: Comment changes.
13519
21964f43
AD
135202002-10-20 Akim Demaille <akim@epita.fr>
13521
13522 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
13523 * data/c.m4: here.
13524
66d30cd4
AD
135252002-10-20 Akim Demaille <akim@epita.fr>
13526
13527 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
13528 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
13529 `pair'.
13530 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
13531 `name' to...
13532 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
13533 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
13534 These.
13535
95f2c9fe
PE
135362002-10-19 Paul Eggert <eggert@twinsun.com>
13537
13538 Do not create a temporary file, as that involves security and
13539 cleanup headaches. Instead, use a pair of pipes.
13540 Derived from a suggestion by Florian Krohm.
13541 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
13542 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
13543 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
13544 (BISON_PREREQ_SUBPIPE): Add.
13545 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
13546 Add subpipe.h, subpipe.c.
13547 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
13548 * po/POTFILES.in: Add lib/subpipe.c.
13549 * src/output.c: Include "subpipe.h".
13550 (m4_invoke): Remove decl.
13551 (scan_skel): New decl.
13552 (output_skeleton): Use pipe rather than temporary file for m4 input.
13553 Check that m4sugar.m4 is readable, to avoid deadlock.
13554 Check for pipe I/O error.
13555 * src/scan-skel.l (readpipe): Remove decl.
13556 (scan_skel): New function, to be used in place of m4_invoke.
13557 Read from stream rather than file.
66d30cd4 13558
95f2c9fe
PE
13559 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
13560 float, as this generates a warning on Solaris 8 + GCC 3.2 with
13561 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
13562 this generates a more-accurate value anyway.
13563
13564 * lib/timevar.c (timervar_accumulate): Rename locals to
13565 avoid confusion with similarly-named more-global.
13566 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
13567
13568 * src/output.c (prepare): Use xstrdup to convert char const *
13569 to char *, to avoid GCC warning.
13570
c19988b7
AD
135712002-10-19 Akim Demaille <akim@epita.fr>
13572
13573 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
13574 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
13575 Use them to have `calc.y' ready for %pure-parser.
13576 * data/yacc.c (YYLEX): Pass a yylex return type to
13577 b4_c_function_call.
13578
ae7453f2
AD
135792002-10-19 Akim Demaille <akim@epita.fr>
13580
13581 Prototype support of %lex-param and %parse-param.
13582
13583 * src/parse-gram.y: Add the definition of the %lex-param and
13584 %parse-param tokens, plus their rules.
13585 Drop the `_' version of %glr-parser.
13586 Add the "," token.
13587 * src/scan-gram.l (INITIAL): Scan them.
13588 * src/muscle_tab.c: Comment changes.
13589 (muscle_insert, muscle_find): Rename `pair' as `probe'.
13590 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
13591 (muscle_entry_s): The `value' member is no longer const.
13592 Adjust all dependencies.
13593 * src/muscle_tab.c (muscle_init): Adjust: use
13594 MUSCLE_INSERT_STRING.
13595 Initialize the obstack earlier.
13596 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
13597 (muscle_pair_list_grow): New.
13598 * data/c.m4 (b4_c_function_call, b4_c_args): New.
13599 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
13600 * tests/calc.at: Use %locations, not --locations.
13601 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
13602
0e575721
AD
136032002-10-19 Akim Demaille <akim@epita.fr>
13604
13605 * src/getargs.c (usage): Take status as argument and exit
13606 accordingly.
13607 Report the traditional `Try ... --help' message when status != 0.
13608 (usage, version): Don't take a FILE * as arg, it is pointless.
13609 (getargs): When there is an incorrect number of arguments, make it
13610 an error, and report it GNUlically thanks to `usage ()'.
13611
724ce7f5
PE
136122002-10-18 Paul Eggert <eggert@twinsun.com>
13613
3a781eb2
PE
13614 * data/glr.c (yyreportParseError): Don't assume that sprintf
13615 yields the length of the printed string, as this is not true
13616 on SunOS 4.1.4. Reported by Peter Klein.
13617
724ce7f5
PE
13618 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
13619 * tests/conflicts.at (%nonassoc and eof): Likewise.
13620 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
13621
473d0a75
AD
136222002-10-17 Akim Demaille <akim@epita.fr>
13623
13624 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
13625 * src/getargs.c (trace_types, trace_args): Adjust.
13626 * src/reader.c (grammar_current_rule_prec_set)
13627 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
13628 Standardize error messages.
13629 And s/@prec/%prec/!
13630 (reader): Use trace_flag to enable scanner/parser debugging,
13631 instead of an adhoc scheme.
13632 * src/scan-gram.l: Remove trailing debugging code.
13633
e76d2469
PE
136342002-10-16 Paul Eggert <eggert@twinsun.com>
13635
93e2236a
PE
13636 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
13637 MUSCLE_TAB_H.
13638
e76d2469
PE
13639 * NEWS: Officially drop support for building Bison with K&R C,
13640 since it didn't work anyway and it's not worth worrying about.
13641 * Makefile.maint (wget_files): Remove ansi2knr.c.
13642 (ansi2knr.c-url_prefix): Remove.
13643 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
13644 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
13645 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
13646
5bd1c419
PE
136472002-10-15 Paul Eggert <eggert@twinsun.com>
13648
13649 Stop using the "enum_" trick for K&R-style function definitions;
13650 it confused me, and I was the author! Instead, assume that people
13651 who want to use K&R C compilers (when using these modules in GCC,
13652 perhaps?) will run ansi2knr.
13653
13654 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
13655 All uses of "enum_" changed to "enum ".
13656 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
13657 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 13658
5bd1c419
PE
13659 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
13660 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
13661 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
13662 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
13663 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
13664 abitset_not, abitset_ones, abitset_or, abitset_or_and,
13665 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
13666 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
13667 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
13668 Use function prototypes; this removes the need for declaring
13669 static functions simply to provide their prototypes.
13670 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
13671 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
13672 bitset_count_, bitset_create, bitset_dump, bitset_first,
13673 bitset_free, bitset_init, bitset_last, bitset_next,
13674 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
13675 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
13676 bitset_print, bitset_release_memory, bitset_toggle_,
13677 bitset_type_choose, bitset_type_get, bitset_type_name_get,
13678 debug_bitset): Likewise.
13679 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
13680 * lib/bitset_stats.c (bitset_log_histogram_print,
13681 bitset_percent_histogram_print, bitset_stats_and,
13682 bitset_stats_and_cmp, bitset_stats_and_or,
13683 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
13684 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
13685 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
13686 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
13687 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
13688 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
13689 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
13690 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
13691 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
13692 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
13693 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
13694 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
13695 bitset_stats_zero): Likewise.
13696 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
13697 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
13698 bitsetv_dump, debug_bitsetv): Likewise.
13699 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
13700 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
13701 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
13702 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
13703 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
13704 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
13705 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
13706 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
13707 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
13708 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
13709 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
13710 Likewise.
13711 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
13712 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
13713 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
13714 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
13715 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
13716 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
13717 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
13718 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
13719 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
13720 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
13721 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 13722
ae26e1f0
AD
137232002-10-14 Akim Demaille <akim@epita.fr>
13724
13725 Version 1.75.
13726
d43baf71
AD
137272002-10-14 Akim Demaille <akim@epita.fr>
13728
13729 * tests/Makefile.am (maintainer-check-posix): New.
13730
7ebc83e3
AD
137312002-10-14 Akim Demaille <akim@epita.fr>
13732
13733 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
13734 member.
13735
05846dae
AD
137362002-10-14 Akim Demaille <akim@epita.fr>
13737
13738 * src/tables.c (table_ninf_remap): base -> tab.
13739 Reported by Matt Rosing.
13740
1318e37d
PE
137412002-10-14 Paul Eggert <eggert@twinsun.com>
13742
447fbb17
PE
13743 * tests/action.at, tests/calc.at, tests/conflicts.at,
13744 tests/cxx-type.at, tests/headers.at, tests/input.at,
13745 tests/regression.at, tests/synclines.at, tests/torture.at:
13746 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
13747 so that the tests still work even if POSIXLY_CORRECT is set.
13748 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 13749
1318e37d
PE
13750 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
13751 for portability to K&R hosts. Fix typo: signed char is guaranteed
13752 only to 127, not to 128.
13753 * data/glr.c (yysigned_char): New type.
13754 * data/yacc.c (yysigned_char): Likewise.
13755 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
13756
cc0f0794
PE
137572002-10-13 Paul Eggert <eggert@twinsun.com>
13758
5038f418
PE
13759 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
13760 true due to limited range of data type" warning from GCC.
13761
cc0f0794
PE
13762 * data/c.m4 (b4_token_defines): Protect against double-inclusion
13763 by wrapping enum yytokentype's definition inside #ifndef
13764 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
13765
6fed0802
AD
137662002-10-13 Akim Demaille <akim@epita.fr>
13767
13768 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
13769 Un yy- yyrhs to avoid the name clash with the global YYRHS.
13770
32f0598d
AD
137712002-10-13 Akim Demaille <akim@epita.fr>
13772
13773 * Makefile.maint: Update from Autoconf 2.54.
13774 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
13775
7ea9a33f
AD
137762002-10-13 Akim Demaille <akim@epita.fr>
13777
13778 * src/print.c (print_state): Separate the list of solved conflicts
13779 from the other items.
13780 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
13781
ea99527d
AD
137822002-10-13 Akim Demaille <akim@epita.fr>
13783
13784 Let nondeterministic skeletons be usable with deterministic
13785 tables.
13786
13787 With the patch, GAWK compiled by GCC without -O2 passes its test
13788 suite using a GLR parser driven by LALR tables. It fails with -O2
13789 because `struct stat' gives two different answers on my machine:
13790 88 (definition of an auto var) and later 96 (memset on this var).
13791 Hence the stack is badly corrumpted. The headers inclusion is to
13792 blame: if I move the awk.h inclusion before GLR's system header
13793 inclusion, the two struct stat have the same size.
13794
13795 * src/tables.c (pack_table): Always create conflict_table.
13796 (token_actions): Always create conflict_list.
13797 * data/glr.c (YYFLAG): Remove, unused.
13798
f377f69f
AD
137992002-10-13 Akim Demaille <akim@epita.fr>
13800
13801 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
13802 (O0FLAGS): New.
13803 (VALGRIND, GXX): New.
13804 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
13805 * tests/bison.in: Run $PREBISON a pre-command.
13806 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
13807 (maintainer-check-g++): New.
13808 * Makefile.am (maintainer-check): New.
13809
2a1fe6ed
AD
138102002-10-13 Akim Demaille <akim@epita.fr>
13811
13812 * data/glr.c: Formatting changes.
13813 Tweak some trace messages to match yacc.c's.
13814
f50adbbd
AD
138152002-10-13 Akim Demaille <akim@epita.fr>
13816
13817 GLR parsers sometimes raise parse errors instead of performing the
13818 default reduction.
13819 Reported by Charles-Henry de Boysson.
13820
13821 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
ba0fe3c7 13822 check the length of the traces when %glr.
f50adbbd
AD
13823 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
13824 GLR's traces.
13825 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
13826 Test GLR parsers.
13827 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
13828 (yyltype): Remove the yy prefix from the member names.
13829 (yytable): Complete its comment.
13830 (yygetLRActions): Map error action number from YYTABLE from
13831 YYTABLE_NINF to 0.
13832 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
13833 (which was a bug: it should have been YYTABEL_NINF, and yet it was
13834 not satisfying as we could compare an YYACTION computed from
13835 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
13836 only value for error actions.
13837 (yyreportParseError): In verbose parse error messages, don't issue
13838 `error' in the list of expected tokens.
13839 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
13840 next action to perform to match glr.c's decoding.
13841 (yytable): Complete its comment.
13842
bcbad5b9
PE
138432002-10-13 Paul Eggert <eggert@twinsun.com>
13844
13845 Fix problem reported by Henrik Grubbstroem in
161a71f3 13846 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
bcbad5b9
PE
13847 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
13848 because the Bison parser reads the second action before reducing
13849 the first one.
13850 * src/scan-gram.l (rule_length): New static var.
13851 Use it to keep track of the rule length in the scanner, since
13852 we can't expect the parser to be in lock-step sync with the scanner.
13853 (handle_action_dollar, handle_action_at): Use this var.
13854 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 13855
14904b89
PE
138562002-10-12 Paul Eggert <eggert@twinsun.com>
13857
1fe611e5
PE
13858 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
13859 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
13860 Include <sys/time.h> when checking for clock_t and struct tms.
13861 Use same include order as source.
13862 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
161a71f3 13863 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
05846dae 13864
1fe611e5
PE
13865 * lib/timevar.c: Update copyright date and clarify comments.
13866 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 13867
1fe611e5
PE
13868 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
13869 GCC version as of today, then merge Bison's changes.
13870 Change "GCC" to "Bison" in copyright notice. timevar.def's
13871 author is Akim, so change that too.
13872
98194095
PE
13873 * src/reader.c (grammar_current_rule_check):
13874 Don't worry about the default action if $$ is untyped.
13875 Prevents bogus warnings reported by Jim Gifford in
161a71f3 13876 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
98194095 13877
14904b89
PE
13878 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
13879 * data/glr.c, data/lalr1.cc, data/yacc.c:
13880 Output token definitions before the first part of user declarations.
13881 Fixes compatibility problem reported by Jim Gifford for kbd in
161a71f3 13882 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14904b89 13883
ff6dca18
PE
138842002-10-11 Paul Eggert <eggert@twinsun.com>
13885
13886 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
13887 (yyparse): here. This undoes some of the 2002-07-25 change.
13888 Compatibility problem reported by Ralf S. Engelschall with
13889 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
13890
eb714592
AD
138912002-10-11 Akim Demaille <akim@epita.fr>
13892
13893 * tests/regression.at Characters Escapes): New.
13894 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
13895 characters.
13896 Reported by Jan Nieuwenhuizen.
13897
b7195100
AD
138982002-10-11 Akim Demaille <akim@epita.fr>
13899
13900 * po/id.po: New.
13901
f28a0f2d
PE
139022002-10-10 Paul Eggert <eggert@twinsun.com>
13903
13904 Portability fixes for bitsets; this also avoids several GCC
13905 warnings.
13906
13907 * lib/abitset.c: Include <stddef.h>, for offsetof.
13908 * lib/lbitset.c: Likewise.
13909
13910 * lib/abitset.c (abitset_bytes): Return a size that is aligned
13911 properly for vectors of objects. Do not assume that adding a
13912 header size to a multiple of a word size yields a value that is
13913 properly aligned for the whole union.
13914 * lib/bitsetv.c (bitsetv_alloc): Likewise.
13915
13916 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
13917 unique names for structures.
13918 * lib/ebitset.c (ebitset_bytes): Likewise.
13919 * lib/lbitset.c (lbitset_bytes): Likewise.
13920
13921 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
13922 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
13923 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
13924 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
13925 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
13926 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
13927 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
13928 to improve the type-checking that GCC can do.
13929 * lib/bitset.c (bitset_op4_cmp): Likewise.
13930 * lib/bitset_stats.c (bitset_stats_count,
13931 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
13932 bitset_stats_copy, bitset_stats_disjoint_p,
13933 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
13934 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
13935 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
13936 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
13937 bitset_stats_and_or_cmp, bitset_stats_andn_or,
13938 bitset_stats_andn_or_cmp, bitset_stats_or_and,
13939 bitset_stats_or_and_cmp): Likewise.
13940 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
13941 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
13942 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
13943 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
13944
13945 * lib/abitset.h: Include bitset.h, not bbitset.h.
13946 * lib/ebitset.h: Likewise.
13947 * lib/lbitset.h: Likewise.
13948
13949 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
13950 All instances of parameters of type enum bitset_opts are now of
13951 type enum_bitset_opts, to conform to the C Standard, and similarly
13952 for enum_bitset_type.
13953 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
13954 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
13955
13956 Do not use "struct bitset_struct" to mean different things in
13957 different modules. Not only is this confusing, it violates
13958 the C Standard, which requires that structure types in different
13959 modules must be compatible if one is to be passed to the other.
13960 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
13961 All instances of "struct bitset_struct *" replaced with "bitset".
13962 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
13963 (union bitset_union, struct abitset_struct, struct ebitset_struct,
13964 struct lbitset_struct, struct bitset_stats_struct): New types.
13965 All uses of struct bitset_struct changed to union bitset_union,
13966 etc.
ba0fe3c7 13967 * lib/abitset.c (struct abitset_struct, abitset,
f28a0f2d
PE
13968 struct bitset_struct): Remove.
13969 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
13970 struct bitset_struct): Remove.
13971 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
13972 bitset_struct): Remove.
13973 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
13974 Likewise.
13975
13976 Do not call a function of type T using a call that assumes the
13977 function is of a different type U. Standard C requires that a
13978 function must be called with a type that is compatible with its
13979 definition.
13980 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
13981 New decls.
13982 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
13983 New functions.
13984 * lib/ebitset.c (PFV): Remove.
13985 * lib/lbitset.c (PFV): Likewise.
13986 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
13987 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
13988 decls.
13989 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
13990 (ebitset_vtable): Use them.
13991 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
13992 lbitset_xor): New functions.
13993 (lbitset_vtable): Use them.
13994
13995 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
13996 Declare.
13997
13998 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
13999 GCC warning.
14000 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
14001 Use offsetof, for simplicity.
14002
6fbe4984
PE
140032002-10-06 Paul Eggert <eggert@twinsun.com>
14004
14005 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
14006 the same width as int. This reapplies a hunk of the 2002-08-12 patch
161a71f3 14007 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6fbe4984
PE
14008 which was inadvertently undone by the 2002-09-30 patch.
14009 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
14010 the same width as int.
14011
420f93c8
PE
140122002-10-04 Paul Eggert <eggert@twinsun.com>
14013
14014 Version 1.50.
14015
14016 * configure.ac (AC_INIT), NEWS: Increment version number.
14017
14018 * doc/bison.texinfo: Minor spelling, grammar, and white space
14019 fixes.
14020 (Symbols): Mention that any negative value returned from yylex
14021 signifies end-of-input. Warn about negative chars. Mention
14022 the portable Standard C character set.
14023
14024 The GNU coding standard says CFLAGS and YFLAGS are reserved
14025 for the installer to set.
14026 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
14027 * src/Makefile.am (AM_CFLAGS): Likewise.
14028 (AM_YFLAGS): Renamed from YFLAGS.
14029
14030 Fix some MAX and MIN problems.
14031 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
14032 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
14033 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
14034 * src/reader.c (reader): Use it.
14035
14036 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
14037 POSIX 1003.1-2001 has removed fgrep.
14038
140392002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
14040
14041 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
14042 interpreted as signed.
14043 * lib/ebitset.c (ebitset_list): Fix bug.
14044
ff68026d
PE
140452002-10-01 Paul Eggert <eggert@twinsun.com>
14046
14047 More fixes for 64-bit hosts and large bitsets.
14048
14049 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
14050 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
14051 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
14052 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
14053 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
14054 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
14055 bitset_count_): Likewise.
14056 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
14057 bitset_first, bitset_last): Likewise.
14058 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
14059 bitset_stats_list_reverse, bitset_stats_size,
14060 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
14061 Likewise.
14062 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14063 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
14064 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
14065 bitsetv_reflexive_transitive_closure): Likewise.
14066 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
14067 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
14068 Likewise.
14069 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
14070 Likewise.
420f93c8 14071
ff68026d
PE
14072 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
14073 Use size_t, not unsigned int, to count bytes.
14074 * lib/abitset.h (abitset_bytes): Likewise.
14075 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
14076 Likewise.
14077 * lib/bitset.h (bitset_bytes): Likewise.
14078 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
14079 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
14080 * lib/bitsetv.c (bitsetv_alloc): Likewise.
14081 * lib/ebitset.c (ebitset_bytes): Likewise.
14082 * lib/ebitset.h (ebitset_bytes): Likewise.
14083 * lib/lbitset.c (lbitset_bytes): Likewise.
14084 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 14085
ff68026d
PE
14086 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
14087 abitset_subset_p, abitset_disjoint_p, abitset_and,
14088 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
14089 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
14090 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
14091 abitset_or_and, abitset_or_and_cmp):
14092 Use bitset_windex instead of unsigned int.
14093 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
14094 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
14095 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
14096 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
14097 Likewise.
14098 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 14099
ff68026d
PE
14100 * lib/bitset.c (bitset_print):
14101 Use proper printf formats for widths of integer types.
14102 * lib/bitset_stats.c (bitset_percent_histogram_print,
14103 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
14104 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14105 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
14106 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 14107
ff68026d
PE
14108 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
14109 BITSET_SIZE_MAX): New macros.
14110 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
14111 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
14112 to BITSET_WINDEX_MAX.
14113
14114 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
14115 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
14116 since we now return the bitset_bindex type (not int).
14117
14118 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
14119 when computing sizes.
14120 * lib/ebitset.c (ebitset_elts_grow): Likewise.
14121
14122 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
14123 and avoid cast to unsigned.
14124
6aa452a6
AD
141252002-09-30 Akim Demaille <akim@epita.fr>
14126
14127 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
14128 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
14129 Updates from Michael Hayes.
14130
927f7817
AD
141312002-09-30 Art Haas <ahaas@neosoft.com>
14132
14133 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
14134 invocations.
14135 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
14136 defined.
14137
9738f41e
AD
141382002-09-27 Akim Demaille <akim@epita.fr>
14139
14140 Version 1.49c.
14141
a5c75d7f
AD
141422002-09-27 Akim Demaille <akim@epita.fr>
14143
14144 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
14145 (Because of AC_LIBSOURCE).
14146
8280e179
AD
141472002-09-27 Akim Demaille <akim@epita.fr>
14148
14149 Playing with Autoscan.
14150
14151 * configure.ac: Remove the old LIBOBJ tweaks.
14152 (AC_REPLACE_FUNCS): Add strrchr and strtol.
14153 * lib/strrchr.c: New.
14154 * lib/strtol.c: New, from the Coreutils 4.5.1.
14155
ae64af35
AD
141562002-09-27 Akim Demaille <akim@epita.fr>
14157
14158 Playing with Autoscan.
14159
14160 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
14161 * lib/Makefile.am (libbison_a_SOURCES): No longer include
14162 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
14163 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
14164 Coreutils 4.5.1.
14165
d1a1114f
AD
141662002-09-24 Akim Demaille <akim@epita.fr>
14167
14168 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
14169 (Frequently Asked Questions, Parser Stack Overflow): New.
14170
b906441c
AD
141712002-09-13 Akim Demaille <akim@epita.fr>
14172
14173 Playing with autoscan.
14174
14175 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
14176 * src/files.c (skeleton_find): Remove, unused.
14177 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
14178 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
14179
bd701811
AD
141802002-09-13 Akim Demaille <akim@epita.fr>
14181
14182 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
14183 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
14184
e0a13e7b
AD
141852002-09-13 Akim Demaille <akim@epita.fr>
14186
14187 * configure.ac: Require 2.54.
14188 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
14189 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
14190 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
14191 Remove, provided by Autoconf macros.
14192
c97011bf
AD
141932002-09-12 Akim Demaille <akim@epita.fr>
14194
14195 * m4/prereq.m4: Update, from Coreutils 4.5.1.
14196
d862b1be
AD
141972002-09-12 Akim Demaille <akim@epita.fr>
14198
14199 * m4/prereq.m4: Update, from Fileutils 4.1.5.
14200 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
14201 Reported by Martin Mokrejs.
14202
3d38c03a
AD
142032002-09-10 Akim Demaille <akim@epita.fr>
14204
14205 * src/parse-gram.y: Associate a human readable string to each
14206 token type.
14207 * tests/regression.at (Invalid inputs): Adjust.
14208
b6347355
AD
142092002-09-10 Gary V. Vaughan <gary@gnu.org>
14210
14211 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
14212 with an Autoconf-2.5x style configure.ac.
14213
09ba4ab2
PE
142142002-09-06 Paul Eggert <eggert@twinsun.com>
14215
14216 * doc/bison.texinfo (Conditions): Make explicit that the GPL
14217 exception applies only to yacc.c. This is a modification of a
14218 patch originally suggested by Akim Demaille.
14219
21846f69
AD
142202002-09-06 Akim Demaille <akim@epita.fr>
14221
09ba4ab2
PE
14222 * data/c.m4 (b4_copyright): Move the GPL exception comment from
14223 here to...
14224 * data/yacc.c: here.
14225
21846f69
AD
14226 * data/lalr1.cc (struct yyltype): Don't define it, since we use
14227 LocationType.
14228 (b4_ltype): Default to yy::Location from location.hh.
14229
c0ad8bf3
AD
142302002-09-04 Jim Meyering <jim@meyering.net>
14231
14232 * data/yacc.c: Guard the declaration of yytoknum also with
14233 `#ifdef YYPRINT', so it is declared only when used.
14234
3a93251e
AD
142352002-09-04 Akim Demaille <akim@epita.fr>
14236
14237 * configure.in: Rename as...
14238 * configure.ac: this.
14239 Bump to 1.49c.
14240
427c0dda
AD
142412002-09-04 Akim Demaille <akim@epita.fr>
14242
14243 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
14244 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
14245 translate maintainer only messages.
14246
6a254321
PE
142472002-08-12 Paul Eggert <eggert@twinsun.com>
14248
645e30d1
PE
14249 Version 1.49b.
14250
6a254321
PE
14251 * Makefile.am (SUBDIRS): Remove intl.
14252 (DISTCLEANFILES): Remove.
14253 * NEWS: Mention that GNU M4 is now required. Clarify what is
14254 meant by "larger grammars". Mention the pt_BR translation.
14255 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
14256 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
14257 Bump version from 0.11.2 to 0.11.5.
14258 (BISON_PREREQ_STAGE): Remove.
14259 (AM_GNU_GETTEXT): Use external gettext.
14260 (AC_OUTPUT): Remove intl/Makefile.
14261
14262 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
14263
14264 * data/glr.c: Include string.h, for strlen.
14265 (yyreportParseError): Use size_t for yysize.
14266 (yy_yypstack): No longer nested inside yypstates, as nested
14267 functions are not portable. Do not assume size_t is the
14268 same width as int.
14269 (yypstates): Do not assume that ptrdiff_t is the same width
14270 as int, and similarly for yyposn and YYINDEX.
14271
14272 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
14273
14274 * lib/Makefile.am (INCLUDES): Do not include from the intl
14275 directory, which has been removed.
14276 * src/Makefile.am (INCLUDES): Likewise.
14277
14278 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
14279 (bitsets_sources, additional_bitsets_sources, timevars_sources):
14280 New vars.
14281
14282 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
14283 * tests/Makefile.am (EXTRA_DIST): Likewise.
14284
14285 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
14286 Do not assume that bitset_windex is the same width as unsigned.
14287
14288 * lib/abitset.c (abitset_unused_clear): Do not assume that
14289 bitset_word is the same width as int.
14290 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
14291 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
14292 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
14293 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
14294 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
14295
14296 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
14297 portability to one's complement hosts!).
14298 * lib/ebitset.c (ebitset_op1): Likewise.
14299 * lib/lbitset.c (lbitset_op1): Likewise.
14300
14301 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
14302 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
14303 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
14304 Sync with fileutils.
14305 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
14306 lib/gettext.h: Sync with diffutils.
14307
14308 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
14309 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
14310
14311 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
14312 PROTOTYPES to check for prototypes, and "defined __STDC__" to
14313 check for void *.
14314
14315 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
14316 size_t; the old version tried to do this but casted improperly.
14317 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
14318 (bitset_test): Now returns int, not unsigned long.
14319
14320 * lib/bitset_stats.c: Include "gettext.h".
14321 (_): New macro.
14322 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
14323 name locals "index", as it generates unnecessary warnings on some
14324 hosts that have an "index" function.
14325
14326 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
14327 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
14328 they need translation.
14329 * src/LR0.c (state_list_append, new_itemsets, get_state,
14330 append_states, generate_states): Likewise.
14331 * src/assoc.c (assoc_to_string): Likewise.
14332 * src/closure.c (print_closure, set_firsts, closure): Likewise.
14333 * src/gram.c (grammar_dump): Likewise.
14334 * src/injections.c (injections_compute): Likewise.
14335 * src/lalr.c (lookaheads_print): Likewise.
14336 * src/relation.c (relation_transpose): Likewise.
14337 * src/scan-gram.l: Likewise.
14338 * src/tables.c (table_grow, pack_vector): Likewise.
14339
14340 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
14341 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
14342 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
14343 * m4/mbstate_t.m4: Sync with fileutils.
14344 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
14345
14346 * po/LINGUAS: Add pt_BR.
14347 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
14348 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
14349 lib/timevar.c.
14350 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
14351 manual recommends.
14352 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
14353
14354 * src/complain.c (strerror_r): Remove decl; not needed.
14355 (strerror): Use same pattern as ../lib/error.c.
14356
14357 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
14358
14359 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
14360
14361 * src/main.c (main): Cast result of bindtextdomain and textdomain
14362 to void, to avoid a GCC warning when --disable-nls is in effect.
14363
14364 * src/scan-gram.l: Use strings rather than escapes when possible,
14365 to minimize the number of warnings from xgettext.
14366 (handle_action_dollar, handle_action_at): Don't use isdigit,
14367 as it mishandles negative chars and it may not work as expected
14368 outside the C locale.
14369
14370 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
14371 this is a GCC extension and is not portable to other compilers.
14372
14373 * src/system.h (alloca): Use same pattern as ../lib/error.c.
14374 Do not include <ctype.h>; no longer needed.
14375 Do not include <malloc.h>; no longer needed (and generates
14376 warnings on OpenBSD 3.0).
14377
14378 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
14379 it's not portable.
14380
14381 * tests/regression.at: Do not use 'cc -c input.c -o input';
14382 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
14383
14384 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
14385 exit status as failure, not just exit status 1. Sun C exits
14386 with status 2 sometimes.
14387
14388 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
14389 Use it for the two large tests.
14390
c8f002c7
AD
143912002-08-02 Akim Demaille <akim@epita.fr>
14392
14393 * src/conflicts.c (conflicts_output): Don't output rules never
14394 reduced here, since anyway that computation doesn't work.
14395 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
14396 (rule_useless_p, rule_never_reduced_p): New.
14397 (grammar_rules_partial_print): Use a filter instead of a range.
14398 Display the title only if needed.
14399 (grammar_rules_print): Adjust.
14400 (grammar_rules_never_reduced_report): New.
14401 * src/tables.c (action_row): Move the computation of rules never
14402 reduced to...
14403 (token_actions): here.
14404 * src/main.c (main): Make the parser before making the report, so
14405 that rules never reduced are computed.
14406 Call grammar_rules_never_reduced_report.
14407 * src/print.c (print_results): Report rules never reduced.
14408 * tests/conflicts.at, tests/reduce.at: Adjust.
14409
cd08e51e
AD
144102002-08-01 Akim Demaille <akim@epita.fr>
14411
14412 Instead of attaching lookaheads and duplicating the rules being
14413 reduced by a state, attach the lookaheads to the reductions.
14414
14415 * src/state.h (state_t): Remove the `lookaheads',
14416 `lookaheads_rule' member.
14417 (reductions_t): Add a `lookaheads' member.
14418 Use a regular array for the `rules'.
14419 * src/state.c (reductions_new): Initialize the lookaheads member
14420 to 0.
14421 (state_rule_lookaheads_print): Adjust.
14422 * src/state.h, src/state.c (state_reductions_find): New.
14423 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
14424 (count_rr_conflicts): Adjust.
14425 * src/lalr.c (LArule): Remove.
14426 (add_lookback_edge): Adjust.
14427 (state_lookaheads_count): New.
14428 (states_lookaheads_initialize): Merge into...
14429 (initialize_LA): this.
14430 (lalr_free): Adjust.
14431 * src/main.c (main): Don't free nullable and derives too early: it
14432 is used by --verbose.
14433 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
14434
bb0027a9
AD
144352002-08-01 Akim Demaille <akim@epita.fr>
14436
14437 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
14438 `rule_number_t**'.
14439 (set_derives, free_derives): Rename as...
14440 (derives_compute, derives_free): this.
14441 Adjust all dependencies.
14442 * src/nullable.c (set_nullable, free_nullable): Rename as...
14443 (nullable_compute, nullable_free): these.
14444 (rule_list_t): Store rule_t *, not rule_number_t.
14445 * src/state.c (state_rule_lookaheads_print): Directly compare rule
14446 pointers, instead of their numbers.
14447 * src/main.c (main): Call nullable_free, and derives_free earlier,
14448 as they were lo longer used.
14449
3325ddc4
AD
144502002-08-01 Akim Demaille <akim@epita.fr>
14451
14452 * lib/timevar.c (get_time): Include children time.
14453 * src/lalr.h (LA, LArule): Don't export them: used with the
14454 state_t.
14455 * src/lalr.c (LA, LArule): Static.
14456 * src/lalr.h, src/lalr.c (lalr_free): New.
14457 * src/main.c (main): Call it.
14458 * src/tables.c (pack_vector): Check whether loc is >= to the
14459 table_size, not >.
14460 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
14461 (tables_generate): do it, since that's also it which allocates
14462 them.
14463 Don't free LA and LArule, main does.
14464
c6f1a33c
AD
144652002-07-31 Akim Demaille <akim@epita.fr>
14466
14467 Separate parser tables computation and output.
14468
14469 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
14470 (conflict_list, conflict_list_cnt, table, check, table_ninf)
14471 (yydefgoto, yydefact, high): Move to...
14472 * src/tables.h, src/tables.c: here.
14473 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
14474 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
14475 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
14476 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
14477 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
14478 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
14479 (action_row, save_row, token_actions, save_column, default_goto)
14480 (goto_actions, sort_actions, matching_state, pack_vector)
14481 (table_ninf_remap, pack_table, prepare_actions): Move to...
14482 * src/tables.c: here.
14483 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
14484 * src/output.c (token_actions, output_base, output_conflicts)
14485 (output_check): Merge into...
14486 (prepare_actions): this.
14487 (actions_output): Rename as...
14488 (user_actions_output): this.
14489 * src/main.c (main): Call tables_generate and tables_free.
14490
1509d42f
AD
144912002-07-31 Akim Demaille <akim@epita.fr>
14492
14493 Steal GCC's --time-report support.
14494
14495 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
14496 stolen/adjusted from GCC.
14497 * m4/stage.m4: Remove time related checks.
14498 * m4/timevar.m4: New.
14499 * configure.in: Adjust.
14500 * src/system.h: Adjust to using timevar.h.
14501 * src/getargs.h, src/getargs.c: Support trace_time for
14502 --trace=time.
14503 * src/main.c (stage): Remove.
14504 (main): Replace `stage' invocations with timevar calls.
14505 * src/output.c: Insert pertinent timevar calls.
14506
273a74fa
AD
145072002-07-31 Akim Demaille <akim@epita.fr>
14508
14509 Let --trace have arguments.
14510
14511 * src/getargs.h (enum trace_e): New.
14512 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
14513 (long_options, short_options): --trace/-T takes an optional
14514 argument.
14515 Change all the uses of trace_flag to reflect the new flags.
14516 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
14517
14518 Strengthen `stage' portability.
14519
14520 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
14521 * configure.in: Use it.
14522 Don't check for malloc.h and sys/times.h.
14523 * src/system.h: Include them when appropriate.
14524 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
14525 times and struct tms are available.
14526
217598da
AD
145272002-07-30 Akim Demaille <akim@epita.fr>
14528
14529 In verbose parse error message, don't report `error' as an
14530 expected token.
14531 * tests/actions.at (Printers and Destructors): Adjust.
14532 * tests/calc.at (Calculator $1): Adjust.
14533 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
14534 error message, do not report the parser accepts the error token in
14535 that state.
14536
52489d44
AD
145372002-07-30 Akim Demaille <akim@epita.fr>
14538
14539 Normalize conflict related messages.
14540
14541 * src/complain.h, src/complain.c (warn, complain): New.
14542 * src/conflicts.c (conflicts_print): Use them.
14543 (conflict_report_yacc): New, extracted from...
14544 (conflicts_print): here.
14545 * tests/conflicts.at, tests/existing.at: Adjust.
14546
e8832397
AD
145472002-07-30 Akim Demaille <akim@epita.fr>
14548
14549 Report rules which are never reduced by the parser: those hidden
14550 by conflicts.
14551
14552 * src/LR0.c (save_reductions): Don't make the final state too
14553 different: save its reduction (accept) instead of having a state
14554 without any action (no shift or goto, no reduce).
14555 Note: the final state is now a ``regular'' state, i.e., the
14556 parsers now contain `reduce 0' as default reduction.
14557 Nevertheless, since they decide to `accept' when yystate =
14558 final_state, they still will not reduce rule 0.
14559 * src/print.c (print_actions, print_reduction): Adjust.
14560 * src/output.c (action_row): Track reduced rules.
14561 (token_actions): Report rules never reduced.
14562 * tests/conflicts.at, tests/regression.at: Adjust.
14563
caf23d24
AD
145642002-07-30 Akim Demaille <akim@epita.fr>
14565
14566 `stage' was accidently included in a previous patch.
14567 Initiate its autoconfiscation.
14568
14569 * configure.in: Look for malloc.h and sys/times.h.
14570 * src/main.c (stage): Adjust.
14571 Report only when trace_flag.
14572
640748ee
AD
145732002-07-29 Akim Demaille <akim@epita.fr>
14574
14575 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
14576 state_number_t.
14577 (errs_t): symbol_t*, not symbol_number_t.
14578 (reductions_t): rule_t*, not rule_number_t.
14579 (FOR_EACH_SHIFT): New.
14580 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
14581 * src/print.c, src/print_graph.c: Adjust.
14582
88bce5a2
AD
145832002-07-29 Akim Demaille <akim@epita.fr>
14584
14585 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
14586
14587 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
14588 (endtoken, accept): these.
14589 * src/reader.c (reader): Set endtoken's default tag to "$end".
14590 Set undeftoken's tag to "$undefined" instead of "$undefined.".
14591 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
14592 Adjust.
14593
1bfb97db
AD
145942002-07-29 Akim Demaille <akim@epita.fr>
14595
14596 * src/reduce.c (reduce_grammar): When the language is empty,
14597 complain about the start symbol, not the axiom.
14598 Use its location.
14599 * tests/reduce.at (Empty Language): New.
14600
fc5734fe
AD
146012002-07-26 Akim Demaille <akim@epita.fr>
14602
14603 * src/reader.h, src/reader.c (gram_error): ... can't get
14604 yycontrol without making too strong assumptions on the parser
14605 itself.
14606 * src/output.c (prepare_tokens): Use the real 0th value of
14607 token_translations instead of `0'.
14608 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
14609 visible here.
14610 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
14611 for the time being: %locations ought to provide it to yyerror.
14612
3650b4b8
AD
146132002-07-25 Akim Demaille <akim@epita.fr>
14614
14615 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
14616 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
14617 * tests/regression.at (Web2c Actions): Adjust.
14618
4b3d3a8e
AD
146192002-07-25 Akim Demaille <akim@epita.fr>
14620
14621 Stop storing rules from 1 to nrules + 1.
14622
14623 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
14624 * src/nullable.c, src/output.c, src/print.c, src/reader.c
14625 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
14626 Iterate from 0 to nrules.
14627 Use rule_number_as_item_number and item_number_as_rule_number.
14628 Adjust to `derive' now containing possibly 0.
14629 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
14630 Handle the `- 1' part in rule numbers from/to item numbers.
14631 * src/conflicts.c (log_resolution): Fix the message which reversed
14632 shift and reduce.
14633 * src/output.c (action_row): Initialize default_rule to -1.
14634 (token_actions): Adjust.
14635 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
14636 expected output.
14637 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
14638
4a2a22f4
AD
146392002-07-25 Akim Demaille <akim@epita.fr>
14640
14641 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
14642 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
14643 (b4_c_knr_arg_decl): New.
14644 * data/yacc.c: Use it to define yysymprint, yydestruct, and
14645 yyreport_parse_error.
14646
b8df3223
AD
146472002-07-25 Akim Demaille <akim@epita.fr>
14648
14649 * data/yacc.c (yyreport_parse_error): New, extracted from...
14650 (yyparse): here.
14651 (yydestruct, yysymprint): Move above yyparse.
14652 Be K&R compliant.
14653
a762e609
AD
146542002-07-25 Akim Demaille <akim@epita.fr>
14655
14656 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
14657 replace...
14658 (b4_sint_type, b4_uint_type): these.
14659 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
14660 * tests/regression.at (Web2c Actions): Adjust.
14661
12b0043a
AD
146622002-07-25 Akim Demaille <akim@epita.fr>
14663
14664 * src/gram.h (TIEM_NUMBER_MAX): New.
14665 (item_number_of_rule_number, rule_number_of_item_number): Rename
14666 as...
14667 (rule_number_as_item_number, item_number_as_rule_number): these.
14668 Adjust dependencies.
14669 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
14670 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
14671 (symbol_number_to_vector_number): New.
14672 (order): Of vector_number_t* type.
14673 (base_t, BASE_MAX, BASE_MIN): New.
14674 (froms, tos, width, pos, check): Of base_t type.
14675 (action_number_t, ACTION_MIN, ACTION_MAX): New.
14676 (actrow): Of action_number_t type.
14677 (conflrow): Of unsigned int type.
14678 (table_ninf, base_ninf): New.
14679 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
14680 (muscle_insert_int_table, muscle_insert_base_table)
14681 (muscle_insert_rule_number_table): New.
14682 (prepare_tokens): Output `toknum' as int_table.
14683 (action_row): Returns a rule_number_t.
14684 Use ACTION_MIN, not SHRT_MIN.
14685 (token_actions): yydefact is rule_number_t*.
14686 (table_ninf_remap): New.
14687 (pack_table): Use it for `base' and `table'.
14688 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
14689 replaced with...
14690 (YYPACT_NINF, YYTABLE_NINF): these.
14691 (yypact, yytable): Compute their types instead of hard-coded
14692 `short'.
14693 * tests/regression.at (Web2c Actions): Adjust.
14694
5dde258a
AD
146952002-07-19 Akim Demaille <akim@epita.fr>
14696
14697 * src/scan-gram.l (id): Can start with an underscore.
14698
a945ec39
AD
146992002-07-16 Akim Demaille <akim@epita.fr>
14700
14701 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
14702 Adjust all former `associativity' dependencies.
14703 * src/symtab.c (symbol_new): Default associativity is `undef', not
14704 `right'.
14705 (symbol_check_alias_consistence): Adjust.
14706
fae437e8
AD
147072002-07-09 Akim Demaille <akim@epita.fr>
14708
14709 * doc/bison.texinfo: Properly set the ``header'' part.
14710 Use @dircategory ``GNU programming tools'' as per Texinfo's
14711 documentation.
14712 Use @copying.
14713
1a715ef2
AD
147142002-07-09 Akim Demaille <akim@epita.fr>
14715
14716 * lib/quotearg.h: Protect against multiple inclusions.
14717 * src/location.h (location_t): Add a `file' member.
14718 (LOCATION_RESET, LOCATION_PRINT): Adjust.
14719 * src/complain.c (warn_at, complain_at, fatal_at): Drop
14720 `error_one_per_line' support.
14721
a5d50994
AD
147222002-07-09 Akim Demaille <akim@epita.fr>
14723
14724 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
14725 * src/reader.c (lineno): Remove.
14726 Adjust all dependencies.
14727 (get_merge_function): Take a location and use complain_at.
14728 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
14729 * tests/regression.at (Invalid inputs, Mixing %token styles):
14730 Adjust.
14731
b275314e
AD
147322002-07-09 Akim Demaille <akim@epita.fr>
14733
14734 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
14735 recovery rule, and forbid extensions when --yacc.
14736 (gram_error): Use complain_at.
14737 * src/reader.c (reader): Exit if there were parse errors.
14738
865b9df1
AD
147392002-07-09 Akim Demaille <akim@epita.fr>
14740
14741 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
14742 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
14743 Reported by R Blake <blakers@mac.com>.
14744
c76e14da
AD
147452002-07-09 Akim Demaille <akim@epita.fr>
14746
14747 * data/yacc.c: Output the copyright notive in the header.
14748
7db2ed2d
AD
147492002-07-03 Akim Demaille <akim@epita.fr>
14750
14751 * src/output.c (froms, tos): Are state_number_t.
14752 (save_column): sp, sp1, and sp2 are state_number_t.
14753 (prepare): Rename `final' as `final_state_number', `nnts' as
14754 `nterms_number', `nrules' as `rules_number', `nstates' as
14755 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
14756 unused.
14757 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
14758 * data/lalr1.cc (nsym_): Remove, unused.
14759
e68e0410
AD
147602002-07-03 Akim Demaille <akim@epita.fr>
14761
14762 * src/lalr.h, src/lalr.c (goto_number_t): New.
14763 * src/lalr.c (goto_list_t): New.
14764 Propagate them.
14765 * src/nullable.c (rule_list_t): New.
14766 Propagate.
14767 * src/types.h: Remove.
14768
e1a4f3a4
AD
147692002-07-03 Akim Demaille <akim@epita.fr>
14770
14771 * src/closure.c (print_fderives): Use rule_rhs_print.
14772 * src/derives.c (print_derives): Use rule_rhs_print.
14773 (rule_list_t): New, replaces `shorts'.
14774 (set_derives): Add comments.
14775 * tests/sets.at (Nullable, Firsts): Adjust.
14776
536545f3
AD
147772002-07-03 Akim Demaille <akim@epita.fr>
14778
14779 * src/output.c (prepare_actions): Free `tally' and `width'.
14780 (prepare_actions): Allocate and free `order'.
14781 * src/symtab.c (symbols_free): Free `symbols'.
14782 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
14783 * src/output.c (m4_invoke): Move to...
14784 * src/scan-skel.l: here.
14785 (<<EOF>>): Close yyout, and free its name.
14786
8b752b00
AD
147872002-07-03 Akim Demaille <akim@epita.fr>
14788
14789 Fix some memory leaks, and fix a bug: state 0 was examined twice.
14790
14791 * src/LR0.c (new_state): Merge into...
14792 (state_list_append): this.
14793 (new_states): Merge into...
14794 (generate_states): here.
14795 (set_states): Don't ensure a proper `errs' state member here, do it...
14796 * src/conflicts.c (conflicts_solve): here.
14797 * src/state.h, src/state.c: Comment changes.
14798 (state_t): Rename member `shifts' as `transitions'.
14799 Adjust all dependencies.
14800 (errs_new): For consistency, also take the values as argument.
14801 (errs_dup): Remove.
14802 (state_errs_set): New.
14803 (state_reductions_set, state_transitions_set): Assert that no
14804 previous value was assigned.
14805 (state_free): New.
14806 (states_free): Use it.
14807 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
14808 temporary storage: use `errs' and `nerrs' as elsewhere.
14809 (set_conflicts): Allocate and free this `errs'.
14810
613f5e1a
AD
148112002-07-02 Akim Demaille <akim@epita.fr>
14812
14813 * lib/libiberty.h: New.
14814 * lib: Update the bitset implementation from upstream.
14815 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
14816 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
14817 * src/main.c: Adjust bitset stats calls.
14818
26e0cadc
PE
148192002-07-01 Paul Eggert <eggert@twinsun.com>
14820
14821 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
14822 char, so that negative chars don't collide with $.
14823
1154cced
AD
148242002-06-30 Akim Demaille <akim@epita.fr>
14825
14826 Have the GLR tests be `warning' checked, and fix the warnings.
14827
14828 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
14829 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
14830 (yyremoveDeletes): `yyi' and `yyj' are size_t.
14831 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
14832 (yyaddDeferredAction): static.
14833 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
14834 (yyreportParseError): yyprefix is const.
14835 yytokenp is used only when verbose.
14836 (yy__GNUC__): Replace with __GNUC__.
14837 (yypdumpstack): yyi is size_t.
14838 (yypreference): Un-yy local variables and arguments, to avoid
14839 clashes with `yyr1'. Anyway, we are not in the user name space.
14840 (yytname_size): be an int, as is compared with ints.
14841 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
14842 Use them.
14843 * tests/cxx-gram.at: Use quotation to protect $1.
14844 Use AT_COMPILE to enable warnings hunts.
14845 Prototype yylex and yyerror.
14846 `Use' argc.
14847 Include `string.h', not `strings.h'.
14848 Produce and prototype stmtMerge only when used.
14849 yylex takes a location.
14850
97650f4e
AD
148512002-06-30 Akim Demaille <akim@epita.fr>
14852
14853 We spend a lot of time in quotearg, in particular when --verbose.
14854
14855 * src/symtab.c (symbol_get): Store a quoted version of the key.
14856 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
14857 Adjust all callers.
14858
d2576365
AD
148592002-06-30 Akim Demaille <akim@epita.fr>
14860
14861 * src/state.h (reductions_t): Rename member `nreds' as num.
14862 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
14863 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
14864
ccaf65bc
AD
148652002-06-30 Akim Demaille <akim@epita.fr>
14866
14867 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
14868 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
14869 (shifts_to): Rename as...
14870 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
14871 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
14872 (TRANSITION_IS_DISABLED, transitions_to): these.
14873
87675353
AD
148742002-06-30 Akim Demaille <akim@epita.fr>
14875
14876 * src/print.c (print_shifts, print_gotos): Merge into...
14877 (print_transitions): this.
14878 (print_transitions, print_errs, print_reductions): Align the
14879 lookaheads columns.
14880 (print_core, print_transitions, print_errs, print_state,
14881 print_grammar): Output empty lines separator before, not after.
14882 (state_default_rule_compute): Rename as...
14883 (state_default_rule): this.
14884 * tests/conflicts.at (Defaulted Conflicted Reduction),
14885 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
14886 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
14887
ce4ccb4b
AD
148882002-06-30 Akim Demaille <akim@epita.fr>
14889
14890 Display items as we display rules.
14891
14892 * src/gram.h, src/gram.c (rule_lhs_print): New.
14893 * src/gram.c (grammar_rules_partial_print): Use it.
14894 * src/print.c (print_core): Likewise.
14895 * tests/conflicts.at (Defaulted Conflicted Reduction),
14896 (Unresolved SR Conflicts): Adjust.
14897 (Unresolved SR Conflicts): Adjust and rename as...
14898 (Resolved SR Conflicts): this, as was meant.
14899 * tests/regression.at (Web2c Report): Adjust.
14900
bc933ef1
AD
149012002-06-30 Akim Demaille <akim@epita.fr>
14902
14903 * src/print.c (state_default_rule_compute): New, extracted from...
14904 (print_reductions): here.
14905 Pessimize, but clarify the code.
14906 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
14907
53d4308d
AD
149082002-06-30 Akim Demaille <akim@epita.fr>
14909
14910 * src/output.c (action_row): Let default_rule be always a rule
14911 number.
14912
574fb2d5
AD
149132002-06-30 Akim Demaille <akim@epita.fr>
14914
14915 * src/closure.c (print_firsts, print_fderives, closure):
14916 Use BITSET_EXECUTE.
14917 * src/lalr.c (lookaheads_print): Likewise.
14918 * src/state.c (state_rule_lookaheads_print): Likewise.
14919 * src/print_graph.c (print_core): Likewise.
14920 * src/print.c (print_reductions): Likewise.
14921 * src/output.c (action_row): Likewise.
14922 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
14923
05811fd7
AD
149242002-06-30 Akim Demaille <akim@epita.fr>
14925
14926 * src/print_graph.c: Use report_flag.
14927
0e4d5753
AD
149282002-06-30 Akim Demaille <akim@epita.fr>
14929
14930 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
14931 to...
14932 * src/relation.h, src/relation.c (traverse, relation_digraph)
14933 (relation_print, relation_transpose): New.
14934
24c7d800
AD
149352002-06-30 Akim Demaille <akim@epita.fr>
14936
14937 * src/state.h, src/state.c (shifts_to): New.
14938 * src/lalr.c (build_relations): Use it.
14939
9222837b
AD
149402002-06-30 Akim Demaille <akim@epita.fr>
14941
14942 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
14943 (item_number_of_rule_number, rule_number_of_item_number): New.
14944 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
14945 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
14946 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
14947 Propagate their use.
14948 Much remains to be done, in particular wrt `shorts' from types.h.
14949
260008e5
AD
149502002-06-30 Akim Demaille <akim@epita.fr>
14951
14952 * src/symtab.c (symbol_new): Initialize the `printer' member.
14953
8a731ca8
AD
149542002-06-30 Akim Demaille <akim@epita.fr>
14955
14956 * src/LR0.c (save_reductions): Remove, replaced by...
14957 * src/state.h, src/state.c (state_reductions_set): New.
14958 (reductions, errs): Rename as...
14959 (reductions_t, errs_t): these.
14960 Adjust all dependencies.
14961
32e1e0a4
AD
149622002-06-30 Akim Demaille <akim@epita.fr>
14963
14964 * src/LR0.c (state_list_t, state_list_append): New.
14965 (first_state, last_state): Now symbol_list_t.
14966 (this_state): Remove.
14967 (new_itemsets, append_states, save_reductions): Take a state_t as
14968 argument.
14969 (set_states, generate_states): Adjust.
14970 (save_shifts): Remove, replaced by...
14971 * src/state.h, src/state.c (state_shifts_set): New.
14972 (shifts): Rename as...
14973 (shifts_t): this.
14974 Adjust all dependencies.
14975 * src/state.h (state_t): Remove the `next' member.
14976
e5fb6710
AD
149772002-06-30 Akim Demaille <akim@epita.fr>
14978
14979 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
14980 escaped in slot 0.
14981
c7ca99d4
AD
149822002-06-30 Akim Demaille <akim@epita.fr>
14983
14984 Use hash.h for the state hash table.
14985
14986 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
14987 (allocate_storage): Use state_hash_new.
14988 (free_storage): Use state_hash_free.
14989 (new_state, get_state): Adjust.
14990 * src/lalr.h, src/lalr.c (states): Move to...
14991 * src/states.h (state_t): Remove the `link' member, no longer
14992 used.
14993 * src/states.h, src/states.c: here.
14994 (state_hash_new, state_hash_free, state_hash_lookup)
14995 (state_hash_insert, states_free): New.
14996 * src/states.c (state_table, state_compare, state_hash): New.
14997 * src/output.c (output_actions): Do not free states now, since we
14998 still need to know the final_state number in `prepare', called
14999 afterwards. Do it...
15000 * src/main.c (main): here: call states_free after `output'.
15001
df0e7316
AD
150022002-06-30 Akim Demaille <akim@epita.fr>
15003
15004 * src/state.h, src/state.c (state_new): New, extracted from...
15005 * src/LR0.c (new_state): here.
15006 * src/state.h (STATE_ALLOC): Move to...
15007 * src/state.c: here.
15008 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
15009 * src/state.h, src/state.c: here.
15010
39f41916
AD
150112002-06-30 Akim Demaille <akim@epita.fr>
15012
15013 * src/reader.c (gensym): Rename as...
15014 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
15015 (getsym): Rename as...
15016 (symbol_get): this.
15017
d57650a5
AD
150182002-06-30 Akim Demaille <akim@epita.fr>
15019
15020 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
15021 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
15022 * src/output.c, src/print.c, src/print_graph.c: Propagate.
15023 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
15024
5a08f1ce
AD
150252002-06-30 Akim Demaille <akim@epita.fr>
15026
15027 Make the test suite pass with warnings checked.
15028
15029 * tests/actions.at (Printers and Destructors): Improve.
15030 Avoid unsigned vs. signed issues.
15031 * tests/calc.at: Don't exercise the scanner here, do it...
15032 * tests/input.at (Torturing the Scanner): here.
15033
720623af
PH
150342002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15035
88e7e941 15036 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
15037 reorganize first lines parallel to yacc.c.
15038
fb8135fa
AD
150392002-06-28 Akim Demaille <akim@epita.fr>
15040
15041 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
15042 (b4_token_enum, b4_token_defines): New, factored from...
15043 * data/lalr1.cc, data/yacc.c, glr.c: here.
15044
41442480
AD
150452002-06-28 Akim Demaille <akim@epita.fr>
15046
15047 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
15048 unused variables.
15049 * src/output.c (merger_output): static.
15050
e0e5bf84
AD
150512002-06-28 Akim Demaille <akim@epita.fr>
15052
ba0fe3c7 15053 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
e0e5bf84
AD
15054 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
15055 pacify GCC.
15056 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 15057
676385e2
PH
150582002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15059
15060 Accumulated changelog for new GLR parsing features.
15061
6a254321 15062 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
15063 conflicts_total_count.
15064 * src/conflicts.h: Ditto.
15065 * src/output.c (token_actions): Use the new name.
15066 (output_conflicts): Change conflp => conflict_list_heads, and
15067 confl => conflict_list for better readability.
15068 * data/glr.c: Use the new names.
15069 * NEWS: Add self to GLR announcement.
e0e5bf84 15070
676385e2
PH
15071 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
15072
15073 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
15074 Akim Demaille.
15075
15076 * data/bison.glr: Change name to glr.c
15077 * data/glr.c: Renamed from bison.glr.
15078 * data/Makefile.am: Add glr.c
e0e5bf84
AD
15079
15080 * src/getargs.c:
15081
676385e2 15082 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
ba0fe3c7 15083 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 15084
676385e2
PH
15085 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15086
15087 * data/bison.glr: Be sure to restore the
15088 current #line when returning to the skeleton contents after having
15089 exposed the input file's #line.
15090
15091 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15092
15093 * data/bison.glr: Bring up to date with changes to bison.simple.
15094
15095 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15096
15097 * data/bison.glr: Correct definitions that use b4_prefix.
15098 Various reformatting.
15099 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
15100 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
15101 yytokenp argument; now part of stack.
15102 (yychar): Define to behave as documented.
15103 (yyclearin): Ditto.
e0e5bf84 15104
676385e2
PH
15105 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15106
15107 * src/reader.h: Add declaration for free_merger_functions.
15108
15109 * src/reader.c (merge_functions): New variable.
15110 (get_merge_function): New function.
15111 (free_merger_functions): New function.
15112 (readgram): Check for %prec that is not followed by a symbol.
15113 Handle %dprec and %merge declarations.
15114 (packgram): Initialize dprec and merger fields in rules array.
15115
15116 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
15117 conflict_list_cnt, conflict_list_free): New variables.
15118 (table_grow): Also grow conflict_table.
e0e5bf84 15119 (prepare_rules): Output dprec and merger tables.
676385e2 15120 (conflict_row): New function.
e0e5bf84 15121 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
15122 default reduction in conflicted states for GLR parser so that there
15123 are spaces for the conflict lists.
15124 (save_row): Also save conflict information.
15125 (token_actions): Allocate conflict list.
15126 (merger_output): New function.
15127 (pack_vector): Pack conflict table, too.
15128 (output_conflicts): New function to output yyconflp and yyconfl.
15129 (output_check): Allocate conflict_tos.
15130 (output_actions): Output conflict tables, also.
15131 (output_skeleton): Output b4_mergers definition.
15132 (prepare): Output b4_max_rhs_length definition.
15133 Use 'bison.glr' as default skeleton for GLR parsers.
15134
15135 * src/gram.c (glr_parser): New flag.
15136 (grammar_free): Call free_merger_functions.
15137
15138 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
15139 all pairs of conflicting reductions, rather than just all tokens
15140 causing conflicts. Needed to size conflict tables.
e0e5bf84 15141 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
15142 interface.
15143 (conflicts_print): Ditto.
15144 (count_total_conflicts): New function.
15145
15146 * src/reader.h (merger_list): New type.
15147 (merge_functions): New variable.
15148
15149 * src/lex.h (tok_dprec, tok_merge): New token types.
15150
15151 * src/gram.h (rule_s): Add dprec and merger fields.
15152 (glr_parser): New flag.
15153
15154 * src/conflicts.h (count_total_conflicts): New function.
15155
15156 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
15157
15158 * doc/bison.texinfo (Generalized LR Parsing): New section.
15159 (GLR Parsers): New section.
15160 (Language and Grammar): Mention GLR parsing.
15161 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
15162 Correct typo ("tge" -> "the").
15163
15164 * data/bison.glr: New skeleton for GLR parsing.
15165
15166 * tests/cxx-gram.at: New tests for GLR parsing.
15167
15168 * tests/testsuite.at: Include cxx-gram.at.
15169
15170 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 15171
676385e2
PH
15172 * src/parse-gram.y:
15173
15174 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
15175
15176 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 15177
b5480d74 151782002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
15179
15180 * src/options.h, src/options.c: Remove.
15181 * src/getargs.c (short_options, long_options): New.
15182
60491a94
AD
151832002-06-27 Akim Demaille <akim@epita.fr>
15184
15185 * data/bison.simple, data/bison.c++: Rename as...
15186 * data/yacc.c, data/lalr1.cc: these.
15187 * doc/bison.texinfo (Environment Variables): Remove.
15188
9be0c25b
AD
151892002-06-25 Raja R Harinath <harinath@cs.umn.edu>
15190
15191 * src/getargs.c (report_argmatch): Initialize strtok().
15192
1ae72863
AD
151932002-06-20 Akim Demaille <akim@epita.fr>
15194
15195 * data/bison.simple (b4_symbol_actions): New, replaces...
15196 (b4_symbol_destructor, b4_symbol_printer): these.
15197 (yysymprint): Be sure to call YYPRINT only for tokens, and using
15198 user token numbers.
15199
87542d29
AD
152002002-06-20 Akim Demaille <akim@epita.fr>
15201
15202 * data/bison.simple (yydestructor): Rename as...
15203 (yydestruct): this.
15204
1a31ed21
AD
152052002-06-20 Akim Demaille <akim@epita.fr>
15206
15207 * src/symtab.h, src/symtab.c (symbol_type_set)
15208 (symbol_destructor_set, symbol_precedence_set): The location is
15209 the last argument.
15210 Adjust all callers.
15211
e776192e
AD
152122002-06-20 Akim Demaille <akim@epita.fr>
15213
15214 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
15215 internals.
15216 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
15217 Takes a location.
15218 * src/symtab.h, src/symtab.c (symbol_class_set)
15219 (symbol_user_token_number_set): Likewise.
15220 Adjust all callers.
15221 Promote complain_at.
15222 * tests/input.at (Type Clashes): Adjust.
15223
5c1180b3
AD
152242002-06-20 Akim Demaille <akim@epita.fr>
15225
15226 * data/bison.simple (YYLEX): Fix the declaration when
15227 %pure-parser.
15228
e3170060
AD
152292002-06-20 Akim Demaille <akim@epita.fr>
15230
15231 * data/bison.simple (yysymprint): Don't print the token number,
15232 just its name.
15233 * tests/actions.at (Destructors): Rename as...
15234 (Printers and Destructors): this.
15235 Also exercise %printer.
15236
253862fd
AD
152372002-06-20 Akim Demaille <akim@epita.fr>
15238
15239 * data/bison.simple (YYDSYMPRINT): New.
15240 Use it to remove many of the #if YYDEBUG/if (yydebug).
15241
366eea36
AD
152422002-06-20 Akim Demaille <akim@epita.fr>
15243
15244 * src/symtab.h, src/symtab.c (symbol_t): printer and
15245 printer_location are new members.
15246 (symbol_printer_set): New.
15247 * src/parse-gram.y (PERCENT_PRINTER): New token.
15248 Handle its associated rule.
15249 * src/scan-gram.l: Adjust.
15250 (handle_destructor_at, handle_destructor_dollar): Rename as...
15251 (handle_symbol_code_at, handle_symbol_code_dollar): these.
15252 * src/output.c (symbol_printers_output): New.
15253 (output_skeleton): Call it.
15254 * data/bison.simple (yysymprint): New. Cannot be named yyprint
15255 since there are already many grammar files with a user `yyprint'.
15256 Replace the calls to YYPRINT to calls to yysymprint.
15257 * tests/calc.at: Adjust.
15258 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
15259 taking advantage of parser very internal details (stack size!).
15260
4f25ebb0
AD
152612002-06-20 Akim Demaille <akim@epita.fr>
15262
15263 * src/scan-gram.l: Complete the scanner with the missing patterns
15264 to pacify Flex.
15265 Use `quote' and `symbol_tag_get' where appropriate.
15266
93b68a0e
AD
152672002-06-19 Akim Demaille <akim@epita.fr>
15268
15269 * tests/actions.at (Destructors): Augment to test locations.
15270 * data/bison.simple (yydestructor): Pass it the current location
15271 if locations are enabled.
15272 Prototype only when __STDC__ or C++.
15273 Change the argument names to move into the yy name space: there is
15274 user code here.
15275
58612f1d
AD
152762002-06-19 Akim Demaille <akim@epita.fr>
15277
74310291
AD
15278 * data/bison.simple (b4_pure_if): New.
15279 Use it instead of #ifdef YYPURE.
15280
152812002-06-19 Akim Demaille <akim@epita.fr>
15282
15283 * data/bison.simple (b4_location_if): New.
58612f1d
AD
15284 Use it instead of #ifdef YYLSP_NEEDED.
15285
f25bfb75
AD
152862002-06-19 Akim Demaille <akim@epita.fr>
15287
15288 Prepare @$ in %destructor, but currently don't bind it in the
15289 skeleton, as %location use is not cleaned up yet.
15290
15291 * src/scan-gram.l (handle_dollar, handle_destructor_at)
15292 (handle_action_at): New.
15293 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
15294 a braced_code_t and a location as additional arguments.
15295 (handle_destructor_dollar): Instead of requiring `b4_eval', just
15296 unquote one when outputting `b4_dollar_dollar'.
15297 Adjust callers.
15298 * data/bison.simple (b4_eval): Remove.
15299 (b4_symbol_destructor): Adjust.
15300 * tests/input.at (Invalid @n): Adjust.
15301
c732d2c6
AD
153022002-06-19 Zack Weinberg <zack@codesourcery.com>
15303
15304 * doc/bison.texinfo: Document ability to have multiple
15305 prologue sections.
15306
8c165d89
AD
153072002-06-18 Akim Demaille <akim@epita.fr>
15308
15309 * src/files.c (compute_base_names): When computing the output file
15310 names from the input file name, strip the directory part.
15311
ca98bf57
AD
153122002-06-18 Akim Demaille <akim@epita.fr>
15313
15314 * data/bison.simple.new: Comment changes.
15315 Reported by Andreas Schwab.
15316
0bfb02ff
AD
153172002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
15318
15319 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
15320 there are no `label `yyoverflowlab' defined but not used' warnings
15321 when yyoverflow is defined.
15322
24c0aad7
AD
153232002-06-18 Akim Demaille <akim@epita.fr>
15324
15325 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
15326 new member.
15327 (symbol_destructor_set): Adjust.
15328 * src/output.c (symbol_destructors_output): Output the destructor
15329 locations.
15330 Output the symbol name.
15331 * data/bison.simple (b4_symbol_destructor): Adjust.
15332
5719c109
AD
153332002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
15334 and Akim Demaille <akim@epita.fr>
15335
15336 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
15337 what's left on the stack when the error recovery hits EOF.
15338 * tests/actions.at (Destructors): Complete to exercise this case.
15339
9280d3ef
AD
153402002-06-17 Akim Demaille <akim@epita.fr>
15341
15342 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
15343 arguments is really empty, not only equal to `[]'.
15344 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
15345 member.
15346 (symbol_destructor_set): New.
15347 * src/output.c (symbol_destructors_output): New.
15348 * src/reader.h (brace_code_t, current_braced_code): New.
15349 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
15350 (handle_dollar): Rename as...
15351 (handle_action_dollar): this.
15352 (handle_destructor_dollar): New.
15353 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
15354 (grammar_declaration): Use it.
15355 * data/bison.simple (yystos): Is always defined.
15356 (yydestructor): New.
15357 * tests/actions.at (Destructors): New.
15358 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
15359
dafdc66f
AD
153602002-06-17 Akim Demaille <akim@epita.fr>
15361
15362 * src/symlist.h, src/symlist.c (symbol_list_length): New.
15363 * src/scan-gram.l (handle_dollar, handle_at): Compute the
15364 rule_length only when needed.
15365 * src/output.c (actions_output, token_definitions_output): Output
15366 the full M4 block.
15367 * src/symtab.c: Don't access directly to the symbol tag, use
15368 symbol_tag_get.
15369 * src/parse-gram.y: Use symbol_list_free.
15370
56c47203
AD
153712002-06-17 Akim Demaille <akim@epita.fr>
15372
15373 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
15374 (symbol_list_prepend, get_type_name): Move to...
15375 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
15376 (symbol_list_prepend, symbol_list_n_type_name_get): here.
15377 Adjust all callers.
15378 (symbol_list_free): New.
15379 * src/scan-gram.l (handle_dollar): Takes a location.
15380 * tests/input.at (Invalid $n): Adjust.
15381
1e0bab92
AD
153822002-06-17 Akim Demaille <akim@epita.fr>
15383
15384 * src/reader.h, src/reader.c (symbol_list_new): Export it.
15385 (symbol_list_prepend): New.
15386 * src/parse-gram.y (%union): `list' is a new member.
15387 (symbols.1): New, replaces...
15388 (terms_to_prec.1, nterms_to_type.1): these.
15389 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
15390 Take a location as additional argument.
15391 Adjust all callers.
15392
04e60654
AD
153932002-06-15 Akim Demaille <akim@epita.fr>
15394
15395 * src/parse-gram.y: Move %token in the declaration section so that
15396 we don't depend upon CVS Bison.
15397
10e5b8bd
AD
153982002-06-15 Akim Demaille <akim@epita.fr>
15399
15400 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
15401 * src/print.c (print_core): Use it.
15402
9801d40c
AD
154032002-06-15 Akim Demaille <akim@epita.fr>
15404
15405 * src/conflicts.c (log_resolution): Accept the rule involved in
15406 the sr conflicts instead of the lookahead number that points to
15407 that rule.
15408 (flush_reduce): Accept the current lookahead vector as argument,
15409 instead of the index in LA.
15410 (resolve_sr_conflict): Accept the current number of lookahead
15411 bitset to consider for the STATE, instead of the index in LA.
15412 (set_conflicts): Adjust.
15413 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
15414
c0263492
AD
154152002-06-15 Akim Demaille <akim@epita.fr>
15416
15417 * src/state.h (state_t): Replace the `lookaheadsp' member, a
15418 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
15419 Adjust all dependencies.
15420 * src/lalr.c (initialize_lookaheads): Split into...
15421 (states_lookaheads_count, states_lookaheads_initialize): these.
15422 (lalr): Adjust.
15423
9757c359
AD
154242002-06-15 Akim Demaille <akim@epita.fr>
15425
15426 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
15427 out of...
15428 (grammar_rules_print): here.
15429 * src/reduce.c (reduce_output): Use it.
15430 * tests/reduce.at (Useless Rules, Reduced Automaton)
15431 (Underivable Rules): Adjust.
15432
6b98e4b5
AD
154332002-06-15 Akim Demaille <akim@epita.fr>
15434
15435 Copy BYacc's nice way to report the grammar.
15436
15437 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
15438 New.
15439 Don't print the rules' location, it is confusing and useless.
15440 (rule_print): Use grammar_rhs_print.
15441 * src/print.c (print_grammar): Use grammar_rules_print.
15442
6b98e4b5
AD
154432002-06-15 Akim Demaille <akim@epita.fr>
15444
15445 Complete and rationalize `useless thing' warnings.
15446
15447 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
15448 (symbol_tag_print): New.
15449 Use them everywhere in place of accessing directly the tag member.
15450 * src/gram.h, src/gram.c (rule_print): New.
15451 Use it where a rule used to be printed `by hand'.
15452 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
15453 (reduce_grammar_tables): Report the useless rules.
15454 (reduce_print): Useless things are a warning, not an error.
15455 Report it as such.
15456 * tests/reduce.at (Useless Nonterminals, Useless Rules):
15457 (Reduced Automaton, Underivable Rules): Adjust.
15458 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
15459 * tests/conflicts.at (Unresolved SR Conflicts)
15460 (Solved SR Conflicts): Adjust.
15461
ee000ba4
AD
154622002-06-15 Akim Demaille <akim@epita.fr>
15463
15464 Let symbols have a location.
15465
15466 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
15467 (getsym): Adjust.
15468 Adjust all callers.
15469 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
15470 Use location_t, not int.
15471 * src/symtab.c (symbol_check_defined): Take advantage of the
15472 location.
15473 * tests/regression.at (Invalid inputs): Adjust.
15474
8efe435c
AD
154752002-06-15 Akim Demaille <akim@epita.fr>
15476
15477 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
15478 (input): Don't try to initialize yylloc here, do it in the
15479 scanner.
15480 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
15481 * src/gram.h (rule_t): Change line and action_line into location
15482 and action_location, of location_t type.
15483 Adjust all dependencies.
15484 * src/location.h, src/location.c (empty_location): New.
15485 * src/reader.h, src/reader.c (grammar_start_symbol_set)
15486 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
15487 (grammar_current_rule_symbol_append)
15488 (grammar_current_rule_action_append): Expect a location as argument.
15489 * src/reader.c (grammar_midrule_action): Adjust to attach an
15490 action's location as dummy symbol location.
15491 * src/symtab.h, src/symtab.c (startsymbol_location): New.
15492 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
15493 the line numbers.
15494
1921f1d7
AD
154952002-06-14 Akim Demaille <akim@epita.fr>
15496
15497 Grammar declarations may be found in the grammar section.
15498
15499 * src/parse-gram.y (rules_or_grammar_declaration): New.
15500 (declarations): Each declaration may end with a semicolon, not
15501 just...
15502 (grammar_declaration): `"%union"'.
15503 (grammar): Branch to rules_or_grammar_declaration.
15504
4515534c
AD
155052002-06-14 Akim Demaille <akim@epita.fr>
15506
15507 * src/main.c (main): Invoke scanner_free.
15508
f958596b
AD
155092002-06-14 Akim Demaille <akim@epita.fr>
15510
15511 * src/output.c (m4_invoke): Extracted from...
15512 (output_skeleton): here.
15513 Free tempfile.
15514
2c569025
AD
155152002-06-14 Akim Demaille <akim@epita.fr>
15516
15517 * src/parse-gram.y (directives, directive, gram)
15518 (grammar_directives, precedence_directives, precedence_directive):
15519 Rename as...
15520 (declarations, declaration, grammar, grammar_declaration)
15521 (precedence_declaration, precedence_declarator): these.
15522 (symbol_declaration): New.
15523
592e8d4d
AD
155242002-06-14 Akim Demaille <akim@epita.fr>
15525
15526 * src/files.c (action_obstack): Remove, unused.
15527 (output_obstack): Remove it, and all its dependencies, as it is no
15528 longer needed.
15529 * src/reader.c (epilogue_set): Build the epilogue in the
15530 muscle_obstack.
15531 * src/output.h, src/output.c (muscle_obstack): Move to...
15532 * src/muscle_tab.h, src/muscle_tab.h: here.
15533 (muscle_init): Initialize muscle_obstack.
15534 (muscle_free): New.
15535 * src/main.c (main): Call it.
15536
0c15323d
AD
155372002-06-14 Akim Demaille <akim@epita.fr>
15538
15539 * src/location.h: New, extracted from...
15540 * src/reader.h: here.
15541 * src/Makefile.am (noinst_HEADERS): Merge into
15542 (bison_SOURCES): this.
15543 Add location.h.
15544 * src/parse-gram.y: Use location_t instead of Bison's.
15545 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
15546 Use location_t instead of ints.
15547
e96c9728
AD
155482002-06-14 Akim Demaille <akim@epita.fr>
15549
15550 * data/bison.simple, data/bison.c++: Be sure to restore the
15551 current #line when returning to the skeleton contents after having
15552 exposed the input file's #line.
15553
75d1fe16
AD
155542002-06-12 Akim Demaille <akim@epita.fr>
15555
15556 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
15557 eager.
15558 * tests/actions.at (Exotic Dollars): New.
15559
6c35d22c
AD
155602002-06-12 Akim Demaille <akim@epita.fr>
15561
15562 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
15563 ['"/] too eagerly.
15564 * tests/input.at (Torturing the Scanner): New.
15565
1d6412ad
AD
155662002-06-11 Akim Demaille <akim@epita.fr>
15567
15568 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
15569 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
15570 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
15571 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
15572 * src/reader.c (reader): Use it.
15573
4cdb01db
AD
155742002-06-11 Akim Demaille <akim@epita.fr>
15575
15576 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
15577 Adjust all callers.
15578 (scanner_last_string_free): New.
15579
44995b2e
AD
155802002-06-11 Akim Demaille <akim@epita.fr>
15581
15582 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
15583 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
15584 (last_string, YY_OBS_FREE): New.
15585 Use them when returning an ID.
15586
e9955c83
AD
155872002-06-11 Akim Demaille <akim@epita.fr>
15588
15589 Have Bison grammars parsed by a Bison grammar.
15590
15591 * src/reader.c, src/reader.h (prologue_augment): New.
15592 * src/reader.c (copy_definition): Remove.
15593
15594 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
15595 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
15596 (grammar_current_rule_prec_set, grammar_current_rule_check)
15597 (grammar_current_rule_symbol_append)
15598 (grammar_current_rule_action_append): Export.
15599 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
15600 (symbol_list_action_append): Remove.
15601 Hook the routines from reader.
15602 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
15603 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
15604
15605 * src/reader.c (read_declarations): Remove, unused.
15606
15607 * src/parse-gram.y: Handle the epilogue.
15608 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
15609 (grammar_start_symbol_set): this.
15610 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
15611 * src/reader.c (readgram): Remove, unused.
15612 (reader): Adjust to insert eoftoken and axiom where appropriate.
15613
15614 * src/reader.c (copy_dollar): Replace with...
15615 * src/scan-gram.h (handle_dollar): this.
15616 * src/parse-gram.y: Remove `%thong'.
15617
15618 * src/reader.c (copy_at): Replace with...
15619 * src/scan-gram.h (handle_at): this.
15620
15621 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
15622 New.
15623
15624 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
15625 time being.
15626
15627 * src/reader.h, src/reader.c (grammar_rule_end): New.
15628
15629 * src/parse.y (current_type, current_class): New.
15630 Implement `%nterm', `%token' support.
15631 Merge `%term' into `%token'.
15632 (string_as_id): New.
15633 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
15634 type name.
15635
15636 * src/parse-gram.y: Be sure to handle properly the beginning of
15637 rules.
15638
15639 * src/parse-gram.y: Handle %type.
15640 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
15641
15642 * src/parse-gram.y: More directives support.
15643 * src/options.c: No longer handle source directives.
15644
15645 * src/parse-gram.y: Fix %output.
15646
15647 * src/parse-gram.y: Handle %union.
15648 Use the prologue locations.
15649 * src/reader.c (parse_union_decl): Remove.
15650
15651 * src/reader.h, src/reader.c (epilogue_set): New.
15652 * src/parse-gram.y: Use it.
15653
15654 * data/bison.simple, data/bison.c++: b4_stype is now either not
15655 defined, then default to int, or to the contents of %union,
15656 without `union' itself.
15657 Adjust.
15658 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
15659
15660 * src/output.c (actions_output): Don't output braces, as they are
15661 already handled by the scanner.
15662
15663 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
15664 characters to themselves.
15665
15666 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
15667 that the epilogue has a proper #line.
15668
15669 * src/parse-gram.y: Handle precedence/associativity.
15670
15671 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
15672 a terminal.
15673 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
15674 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
15675 at all to define terminals that cannot be emitted.
15676
15677 * src/scan-gram.l: Escape M4 characters.
15678
15679 * src/scan-gram.l: Working properly with escapes in user
15680 strings/characters.
15681
15682 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
15683 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
15684 grammar.
15685 Use more modest sizes, as for the time being the parser does not
15686 release memory, and therefore the process swallows a huge amount
15687 of memory.
15688
15689 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
15690 stricter %token grammar.
15691
15692 * src/symtab.h (associativity): Add `undef_assoc'.
15693 (symbol_precedence_set): Do nothing when passed an undef_assoc.
15694 * src/symtab.c (symbol_check_alias_consistence): Adjust.
15695
15696 * tests/regression.at (Invalid %directive): Remove, as it is now
15697 meaningless.
15698 (Invalid inputs): Adjust to the new error messages.
15699 (Token definitions): The new grammar doesn't allow too many
15700 eccentricities.
15701
15702 * src/lex.h, src/lex.c: Remove.
15703 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
15704 (copy_character, copy_string2, copy_string, copy_identifier)
15705 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
15706 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
15707 (parse_action): Remove.
15708 * po/POTFILES.in: Adjust.
15709
2e047461
AD
157102002-06-11 Akim Demaille <akim@epita.fr>
15711
cd05d13c 15712 * src/reader.c (parse_action): Don't store directly into the
2e047461
AD
15713 rule's action member: return the action as a string.
15714 Don't require `rule_length' as an argument: compute it.
15715 (grammar_current_rule_symbol_append)
15716 (grammar_current_rule_action_append): New, eved out from
15717 (readgram): here.
15718 Remove `action_flag', `rulelength', unused now.
15719
9af3fbce
AD
157202002-06-11 Akim Demaille <akim@epita.fr>
15721
15722 * src/reader.c (grammar_current_rule_prec_set).
15723 (grammar_current_rule_check): New, eved out from...
15724 (readgram): here.
15725 Remove `xaction', `first_rhs': useless.
15726 * tests/input.at (Type clashes): New.
15727 * tests/existing.at (GNU Cim Grammar): Adjust.
15728
1485e106
AD
157292002-06-11 Akim Demaille <akim@epita.fr>
15730
15731 * src/reader.c (grammar_midrule_action): New, Eved out from
15732 (readgram): here.
15733
da4160c3
AD
157342002-06-11 Akim Demaille <akim@epita.fr>
15735
15736 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
15737 New.
15738 (readgram): Use them as replacement of inlined code, crule and
15739 crule1.
15740
f6d0f937
AD
157412002-06-11 Akim Demaille <akim@epita.fr>
15742
15743 * src/reader.c (grammar_end, grammar_symbol_append): New.
15744 (readgram): Use them.
15745 Make the use of `p' as local as possible.
15746
69078d4b
AD
157472002-06-10 Akim Demaille <akim@epita.fr>
15748
15749 GCJ's parser requires the tokens to be defined before the prologue.
15750
15751 * data/bison.simple: Output the token definition before the user's
15752 prologue.
15753 * tests/regression.at (Braces parsing, Duplicate string)
15754 (Mixing %token styles): Check the output from bison.
15755 (Early token definitions): New.
15756
5e424082
AD
157572002-06-10 Akim Demaille <akim@epita.fr>
15758
15759 * src/symtab.c (symbol_user_token_number_set): Don't complain when
15760 assigning twice the same user number to a token, so that we can
15761 use it in...
15762 * src/lex.c (lex): here.
15763 Also use `symbol_class_set' instead of hand written code.
15764 * src/reader.c (parse_assoc_decl): Likewise.
15765
44536b35
AD
157662002-06-10 Akim Demaille <akim@epita.fr>
15767
15768 * src/symtab.c, src/symtab.c (symbol_class_set)
15769 (symbol_user_token_number_set): New.
15770 * src/reader.c (parse_token_decl): Use them.
15771 Use a switch instead of ifs.
15772 Use a single argument.
15773
8b9f2372
AD
157742002-06-10 Akim Demaille <akim@epita.fr>
15775
15776 Remove `%thong' support as it is undocumented, unused, duplicates
15777 `%token's job, and creates useless e-mail traffic with people who
15778 want to know what it is, why it is undocumented, unused, and
15779 duplicates `%token's job.
15780
15781 * src/reader.c (parse_thong_decl): Remove.
15782 * src/options.c (option_table): Remove "thong".
15783 * src/lex.h (tok_thong): Remove.
15784
3ae2b51f
AD
157852002-06-10 Akim Demaille <akim@epita.fr>
15786
15787 * src/symtab.c, src/symtab.c (symbol_type_set)
15788 (symbol_precedence_set): New.
15789 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
15790 (value_components_used): Remove, unused.
15791
2f1afb73
AD
157922002-06-09 Akim Demaille <akim@epita.fr>
15793
15794 Move symbols handling code out of the reader.
15795
15796 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
15797 (axiom): Move to...
15798 * src/symtab.h, src/symtab.c: here.
15799
15800 * src/gram.c (start_symbol): Remove: use startsymbol->number.
15801 * src/reader.c (startval): Rename as...
15802 * src/symtab.h, src/symtab.c (startsymbol): this.
15803 * src/reader.c: Adjust.
15804
15805 * src/reader.c (symbol_check_defined, symbol_make_alias)
15806 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
15807 (token_translations_init)
15808 Move to...
15809 * src/symtab.c: here.
15810 * src/reader.c (packsymbols): Move to...
15811 * src/symtab.h, src/symtab.c (symbols_pack): here.
15812 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
15813 argument.
15814
e9bca3ad
AD
158152002-06-03 Akim Demaille <akim@epita.fr>
15816
15817 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
15818 then statements.
15819
86eff183
AD
158202002-06-03 Akim Demaille <akim@epita.fr>
15821
15822 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
15823 structs with non literals.
15824 * src/scan-skel.l: never-interactive.
15825 * src/conflicts.c (enum conflict_resolution_e): No trailing
15826 comma.
15827 * src/getargs.c (usage): Split long literal strings.
15828 Reported by Hans Aberg.
15829
717be197
AD
158302002-05-28 Akim Demaille <akim@epita.fr>
15831
15832 * data/bison.c++: Use C++ ostreams.
15833 (cdebug_): New member.
15834
670ddffd
AD
158352002-05-28 Akim Demaille <akim@epita.fr>
15836
15837 * src/output.c (output_skeleton): Be sure to allocate enough room
15838 for `/' _and_ for `\0' in full_skeleton.
15839
769b430f
AD
158402002-05-28 Akim Demaille <akim@epita.fr>
15841
15842 * data/bison.c++: Catch up with bison.simple:
15843 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15844 and Paul Eggert <eggert@twinsun.com>: `error' handing.
15845 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
15846 and popping traces.
15847
7067cb36
PH
158482002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15849
15850 * src/output.c (output_skeleton): Put an explicit path in front of
15851 the skeleton file name, rather than relying on the -I directory,
15852 to partially alleviate effects of having a skeleton file lying around
15853 in the current directory.
769b430f 15854
4a713ec2
PH
158552002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15856
769b430f 15857 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
15858 obstack_printf should be obstack_fgrow1.
15859
b408954b
AD
158602002-05-26 Akim Demaille <akim@epita.fr>
15861
15862 * src/state.h (state_t): `solved_conflicts' is a new member.
15863 * src/LR0.c (new_state): Set it to 0.
15864 * src/conflicts.h, src/conflicts.c (print_conflicts)
15865 (free_conflicts, solve_conflicts): Rename as...
15866 (conflicts_print, conflicts_free, conflicts_solve): these.
15867 Adjust callers.
15868 * src/conflicts.c (enum conflict_resolution_e)
15869 (solved_conflicts_obstack): New, used by...
15870 (log_resolution): this.
15871 Adjust to attach the conflict resolution to each state.
15872 Complete the description with the precedence/associativity
15873 information.
15874 (resolve_sr_conflict): Adjust.
15875 * src/print.c (print_state): Output its solved_conflicts.
15876 * tests/conflicts.at (Unresolved SR Conflicts)
15877 (Solved SR Conflicts): Exercise --report=all.
15878
a49aecd5
AD
158792002-05-26 Akim Demaille <akim@epita.fr>
15880
15881 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
15882 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
15883 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
15884 (token_number_t, item_number_as_token_number)
15885 (token_number_as_item_number, muscle_insert_token_number_table):
15886 Rename as...
15887 (symbol_number_t, item_number_as_symbol_number)
15888 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
15889 these, since it is more appropriate.
15890
5504898e
AD
158912002-05-26 Akim Demaille <akim@epita.fr>
15892
15893 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
15894 `Error:' lines.
15895 * data/bison.simple (yystos) [YYDEBUG]: New.
15896 (yyparse) [YYDEBUG]: Display the symbols which are popped during
15897 error recovery.
15898 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
15899
ec3bc396
AD
159002002-05-25 Akim Demaille <akim@epita.fr>
15901
15902 * doc/bison.texinfo (Debugging): Split into...
15903 (Tracing): this new section, its former contents, and...
15904 (Understanding): this new section.
15905 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
15906 by...
15907 (report_flag): this.
15908 Adjust all dependencies.
15909 (report_args, report_types, report_argmatch): New.
15910 (usage, getargs): Report/support -r, --report.
15911 * src/options.h
15912 (struct option_table_struct): Rename as..,
15913 (struct option_table_s): this.
15914 Rename the `set_flag' member to `flag' to match with getopt_long's
15915 struct.
15916 * src/options.c (option_table): Split verbose into an entry for
15917 %verbose, and another for --verbose.
15918 Support --report/-r, so remove -r from the obsolete --raw.
15919 * src/print.c: Attach full item sets and lookaheads reports to
15920 report_flag instead of trace_flag.
15921 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
15922
78df8250
PE
159232002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15924 and Paul Eggert <eggert@twinsun.com>
769b430f 15925
78df8250
PE
15926 * data/bison.simple (yyparse): Correct error handling to conform to
15927 POSIX and yacc. Specifically, after syntax error is discovered,
15928 do not reduce further before shifting the error token.
15929 Clean up the code a bit by removing the labels yyerrdefault,
15930 yyerrhandle, yyerrpop.
15931 * NEWS: Document the above.
15932
c0c9ea05
PH
159332002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15934
15935 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
15936 type; it isn't always big enough, since it doesn't necessarily
15937 include non-terminals.
769b430f 15938 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
15939 the latter can be removed.
15940 (yy_token_number_type): Remove, only one use.
15941 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
15942 don't use TokenNumberType as element type.
769b430f 15943
c0c9ea05
PH
15944 * tests/regression.at: Modify expected output to agree with change
15945 to yyr1 and yytranslate.
769b430f 15946
6390a83f
FK
159472002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
15948
15949 * src/reader.c (parse_action): Use copy_character instead of
15950 obstack_1grow.
15951
db7c8e9a
AD
159522002-05-13 Akim Demaille <akim@epita.fr>
15953
15954 * tests/regression.at (Token definitions): Prototype yylex and
15955 yyerror.
15956
fcc61800
PH
159572002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15958
158c687b 15959 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
15960 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
15961 32-bit arithmetic.
15962 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
15963
5683e9b2
AD
159642002-05-07 Akim Demaille <akim@epita.fr>
15965
15966 * tests/synclines.at: Be sure to prototype yylex and yyerror to
15967 avoid GCC warnings.
15968
0c2d3f4c
AD
159692002-05-07 Akim Demaille <akim@epita.fr>
15970
15971 Kill GCC warnings.
15972
15973 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
15974 over the RHS of each rule.
15975 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
15976 * src/state.h (state_t): Member `nitems' is unsigned short.
15977 * src/LR0.c (get_state): Adjust.
15978 * src/reader.c (packgram): Likewise.
15979 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
15980 `Type'.
15981 (muscle_insert_int_table): Remove, unused.
15982 (prepare_rules): Remove `max'.
15983
1565b720
AD
159842002-05-06 Akim Demaille <akim@epita.fr>
15985
15986 * src/closure.c (print_firsts): Display of the symbol tags.
15987 (bitmatrix_print): Move to...
15988 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
15989 here.
15990 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
15991
cfaee611
AD
159922002-05-06 Akim Demaille <akim@epita.fr>
15993
15994 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
15995 hash_do_for_each.
15996
458be8e0
AD
159972002-05-06 Akim Demaille <akim@epita.fr>
15998
15999 * src/LR0.c (new_state, get_state): Instead of using the global
16000 `kernel_size' and `kernel_base', have two new arguments:
16001 `core_size' and `core'.
16002 Adjust callers.
16003
a900a624
AD
160042002-05-06 Akim Demaille <akim@epita.fr>
16005
16006 * src/reader.c (packgram): No longer end `ritem' with a 0
16007 sentinel: it is not used.
16008
d4e7d3a1
AD
160092002-05-05 Akim Demaille <akim@epita.fr>
16010
16011 New experimental feature: display the lookaheads in the report and
16012 graph.
16013
16014 * src/print (print_core): When --trace-flag, display the rules
16015 lookaheads.
16016 * src/print_graph.c (print_core): Likewise.
16017 Swap the arguments.
16018 Adjust caller.
16019
39ceb25b
AD
160202002-05-05 Akim Demaille <akim@epita.fr>
16021
16022 * tests/torture.at (Many lookaheads): New test.
16023
5372019f
AD
160242002-05-05 Akim Demaille <akim@epita.fr>
16025
16026 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
16027 (GENERATE_MUSCLE_INSERT_TABLE): this.
16028 (output_int_table, output_unsigned_int_table, output_short_table)
16029 (output_token_number_table, output_item_number_table): Replace with...
16030 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
16031 (muscle_insert_short_table, muscle_insert_token_number_table)
16032 (muscle_insert_item_number_table): these.
16033 Adjust all callers.
16034 (prepare_tokens): Don't free `translations', since...
16035 * src/reader.h, src/reader.c (grammar_free): do it.
16036 Move to...
16037 * src/gram.h, src/gram.c (grammar_free): here.
16038 * data/bison.simple, data/bison.c++: b4_token_number_max is now
16039 b4_translate_max.
16040
5df5f6d5
AD
160412002-05-05 Akim Demaille <akim@epita.fr>
16042
16043 * src/output.c (output_unsigned_int_table): New.
16044 (prepare_rules): `i' is unsigned.
16045 `prhs', `rline', `r2' are unsigned int.
16046 Rename muscle `rhs_number_max' as `rhs_max'.
16047 Output muscles `prhs_max', `rline_max', and `r2_max'.
16048 Free rline and r1.
16049 * data/bison.simple, data/bison.c++: Adjust to use these muscles
16050 to compute types instead of constant types.
16051 * tests/regression.at (Web2c Actions): Adjust.
16052
b87f8b21
AD
160532002-05-04 Akim Demaille <akim@epita.fr>
16054
16055 * src/symtab.h (SALIAS, SUNDEF): Rename as...
16056 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
16057 Adjust dependencies.
16058 * src/output.c (token_definitions_output): Be sure not to output a
16059 `#define 'a'' when fed with `%token 'a' "a"'.
16060 * tests/regression.at (Token definitions): New.
16061
8bb936e4
PE
160622002-05-03 Paul Eggert <eggert@twinsun.com>
16063
16064 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
16065 for K&R C.
16066
160672002-05-03 gettextize <bug-gnu-gettext@gnu.org>
16068
16069 * Makefile.am (SUBDIRS): Remove intl.
16070 (EXTRA_DIST): Add config/config.rpath.
16071
53c71a12
AD
160722002-05-03 Akim Demaille <akim@epita.fr>
16073
16074 * data/bison.simple (m4_if): Don't output empty enums.
16075 And actually, output valid enum definitions :(.
16076
289dd0cf
AD
160772002-05-03 Akim Demaille <akim@epita.fr>
16078
16079 * configure.bat: Remove, completely obsolete.
16080 * Makefile.am (EXTRA_DIST): Adjust.
16081 Don't distribute config.rpath...
16082 * config/Makefile.am (EXTRA_DIST): Do it.
16083
db85e524
AD
160842002-05-03 Akim Demaille <akim@epita.fr>
16085
16086 * configure.in (GETTEXT_VERSION): New.
16087 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
16088
83ccf991
AD
160892002-05-03 Akim Demaille <akim@epita.fr>
16090
16091 * data/bison.simple (b4_token_enum): New.
16092 (b4_token_defines): Use it to output tokens both as #define and
16093 enums.
16094 Suggested by Paul Eggert.
16095 * src/output.c (token_definitions_output): Don't output spurious
16096 white spaces.
16097
1f418995
AD
160982002-05-03 Akim Demaille <akim@epita.fr>
16099
16100 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
16101
45119f04
RA
161022002-05-02 Robert Anisko <robert@lrde.epita.fr>
16103
16104 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
16105 Update the stack class, give a try to deque as the default container.
16106
b2d52318
AD
161072002-05-02 Akim Demaille <akim@epita.fr>
16108
16109 * data/bison.simple (yyparse): Do not implement @$ = @1.
16110 (YYLLOC_DEFAULT): Adjust to do it.
16111 * doc/bison.texinfo (Location Default Action): Fix.
16112
3a8b4109
AD
161132002-05-02 Akim Demaille <akim@epita.fr>
16114
16115 * src/reader.c (parse_braces): Merge into...
16116 (parse_action): this.
16117
84614e13
AD
161182002-05-02 Akim Demaille <akim@epita.fr>
16119
16120 * configure.in (ALL_LINGUAS): Remove.
16121 * po/LINGUAS, hr.po: New.
16122
fdbcd8e2
AD
161232002-05-02 Akim Demaille <akim@epita.fr>
16124
16125 Remove the so called hairy (semantic) parsers.
16126
16127 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
16128 * src/gram.h, src/gram.c (semantic_parser): Remove.
16129 (rule_t): Remove the guard and guard_line members.
16130 * src/lex.h (token_t): remove tok_guard.
16131 * src/options.c (option_table): Remove %guard and %semantic_parser
16132 support.
16133 * src/output.c, src/output.h (guards_output): Remove.
16134 (prepare): Adjust.
16135 (token_definitions_output): Don't output the `T'
16136 tokens (???).
16137 (output_skeleton): Don't output the guards.
16138 * src/files.c, src/files.c (attrsfile): Remove.
16139 * src/reader.c (symbol_list): Remove the guard and guard_line
16140 members.
16141 Adjust dependencies.
16142 (parse_guard): Remove.
16143 * data/bison.hairy: Remove.
16144 * doc/bison.texinfo (Environment Variables): Remove occurrences of
16145 BISON_HAIRY.
16146
82b6cb3f
AD
161472002-05-02 Akim Demaille <akim@epita.fr>
16148
16149 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
16150 (parse_guard): Rename the formal argument `stack_offset' as
16151 `rule_length', which is more readable.
16152 Adjust callers.
16153 (copy_at, copy_dollar): Instead of outputting the hard coded
16154 values of $$, $n and so forth, output invocation to b4_lhs_value,
16155 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
16156 Note: this patch partially drops `semantic-parser' support: it
16157 always does `rule_length - n', where semantic parsers ought to
16158 always use `-n'.
82b6cb3f
AD
16159 * data/bison.simple, data/bison.c++ (b4_lhs_value)
16160 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
16161
6cbfbcc5
AD
161622002-05-02 Akim Demaille <akim@epita.fr>
16163
16164 * configure.in (AC_INIT): Bump to 1.49b.
16165 (AM_INIT_AUTOMAKE): Short invocation.
16166
b8548114
AD
161672002-05-02 Akim Demaille <akim@epita.fr>
16168
16169 Version 1.49a.
16170
c20cd1fa
AD
161712002-05-01 Akim Demaille <akim@epita.fr>
16172
16173 * src/skeleton.h: Remove.
16174
8a9566d4
AD
161752002-05-01 Akim Demaille <akim@epita.fr>
16176
16177 * src/skeleton.h: Fix the #endif.
16178 Reported by Magnus Fromreide.
16179
8c6d399a
PE
161802002-04-26 Paul Eggert <eggert@twinsun.com>
16181
16182 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
16183 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 16184 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 16185
2b7ed18a
RA
161862002-04-25 Robert Anisko <robert@lrde.epita.fr>
16187
16188 * src/scan-skel.l: Postprocess quadrigraphs.
16189
16190 * src/reader.c (copy_character): New function, used to output
16191 single characters while replacing `[' and `]' with quadrigraphs, to
16192 avoid troubles with M4 quotes.
16193 (copy_comment): Output characters with copy_character.
16194 (read_additionnal_code): Likewise.
16195 (copy_string2): Likewise.
16196 (copy_definition): Likewise.
16197
16198 * tests/calc.at: Exercise M4 quoting.
16199
34a89c50
AD
162002002-04-25 Akim Demaille <akim@epita.fr>
16201
16202 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
16203 between `!' and the command.
16204 Reported by Paul Eggert.
16205
0dd1580a
RA
162062002-04-24 Robert Anisko <robert@lrde.epita.fr>
16207
16208 * tests/calc.at: Exercise prologue splitting.
16209
16210 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
16211 `b4_post_prologue' instead of `b4_prologue'.
16212
16213 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
16214 muscles.
16215 (output): Free pre_prologue_obstack and post_prologue_obstack.
16216 * src/files.h, src/files.c (attrs_obstack): Remove.
16217 (pre_prologue_obstack, post_prologue_obstack): New.
16218 * src/reader.c (copy_definition): Add a parameter to specify the
16219 obstack to fill, instead of using attrs_obstack unconditionally.
16220 (read_declarations): Pass pre_prologue_obstack to copy_definition if
16221 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
16222
83c1796f
PE
162232002-04-23 Paul Eggert <eggert@twinsun.com>
16224
16225 * data/bison.simple: Remove unnecessary commentary and white
16226 space differences from 1_29-branch.
16227 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
16228
16229 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
16230 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
16231 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
16232 constructors or destructors.
16233
16234 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
16235
1207eeac
AD
162362002-04-23 Akim Demaille <akim@epita.fr>
16237
16238 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
16239 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
16240 location with columns.
16241 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
16242 All reported by Paul Eggert.
16243
78ab8f67
AD
162442002-04-22 Akim Demaille <akim@epita.fr>
16245
16246 * src/reduce.c (dump_grammar): Move to...
16247 * src/gram.h, src/gram.c (grammar_dump): here.
16248 Be sure to separate long item numbers.
16249 Don't read the members of a rule's prec if its nil.
16250
133c20e2
AD
162512002-04-22 Akim Demaille <akim@epita.fr>
16252
16253 * src/output.c (table_size, table_grow): New.
16254 (MAXTABLE): Remove, replace uses with table_size.
16255 (pack_vector): Instead of dying when the table is too big, grow it.
16256
9515e8a7
AD
162572002-04-22 Akim Demaille <akim@epita.fr>
16258
16259 * data/bison.simple (yyr1): Its type is that of a token number.
16260 * data/bison.c++ (r1_): Likewise.
16261 * tests/regression.at (Web2c Actions): Adjust.
16262
23c5a174
AD
162632002-04-22 Akim Demaille <akim@epita.fr>
16264
16265 * src/reader.c (token_translations_init): 256 is now the default
16266 value for the error token, i.e., it will be assigned another
16267 number if the user assigned 256 to one of her tokens.
16268 (reader): Don't force 256 to error.
16269 * doc/bison.texinfo (Symbols): Adjust.
16270 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
16271 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
16272 etc. instead of 10, 20, 30 (which was used to `jump' over error
16273 (256) and undefined (2)).
16274
5fbb0954
AD
162752002-04-22 Akim Demaille <akim@epita.fr>
16276
16277 Propagate more token_number_t.
16278
16279 * src/gram.h (token_number_as_item_number)
16280 (item_number_as_token_number): New.
16281 * src/output.c (GENERATE_OUTPUT_TABLE): New.
16282 Use it to create output_item_number_table and
16283 output_token_number_table.
16284 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
16285 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
16286 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
16287 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
16288
4f940944
AD
162892002-04-22 Akim Demaille <akim@epita.fr>
16290
16291 * src/output.h, src/output.c (get_lines_number): Remove.
16292
3ded9a63
AD
162932002-04-19 Akim Demaille <akim@epita.fr>
16294
16295 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
16296 as Lex/Flex'.
16297 (Debugging): More details about enabling the debugging features.
16298 (Table of Symbols): Describe $$, $n, @$, and @n.
16299 Suggested by Tim Josling.
16300
e0c471a9
AD
163012002-04-19 Akim Demaille <akim@epita.fr>
16302
16303 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
16304
fecc10cd
AD
163052002-04-10 Akim Demaille <akim@epita.fr>
16306
16307 * src/system.h: Rely on HAVE_LIMITS_H.
16308 Suggested by Paul Eggert.
16309
51dec47b
AD
163102002-04-09 Akim Demaille <akim@epita.fr>
16311
16312 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
16313 full stderr, and strip it according to the bison options, instead
16314 of composing the error message from different bits.
16315 This makes it easier to check for several error messages.
16316 Adjust all the invocations.
16317 Add an invocation exercising the error token.
16318 Add an invocation demonstrating a stupid error message.
16319 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
16320 Adjust the tests.
16321 Error message are for stderr, not stdout.
16322
007a50a4
AD
163232002-04-09 Akim Demaille <akim@epita.fr>
16324
16325 * src/gram.h, src/gram.c (error_token_number): Remove, use
16326 errtoken->number.
16327 * src/reader.c (reader): Don't specify the user token number (2)
16328 for $undefined, as it uselessly prevents using it.
16329 * src/gram.h (token_number_t): Move to...
16330 * src/symtab.h: here.
16331 (state_t.number): Is a token_number_t.
16332 * src/print.c, src/reader.c: Use undeftoken->number instead of
16333 hard coded 2.
16334 (Even though this 2 is not the same as above: the number of the
16335 undeftoken remains being 2, it is its user token number which
16336 might not be 2).
16337 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
16338 `user_token_number_max'.
16339 Output `undef_token_number'.
16340 * data/bison.simple, data/bison.c++: Use them.
16341 Be sure to map invalid yylex return values to
16342 `undef_token_number'. This saves us from gratuitous SEGV.
16343
16344 * tests/conflicts.at (Solved SR Conflicts)
16345 (Unresolved SR Conflicts): Adjust.
16346 * tests/regression.at (Web2c Actions): Adjust.
16347
06446ccf
AD
163482002-04-08 Akim Demaille <akim@epita.fr>
16349
16350 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
16351 Adding #line.
16352 Remove the duplicate `typedefs'.
16353 (RhsNumberType): Fix the declaration and various other typos.
16354 Use __ofile__.
16355 * data/bison.simple: Use __ofile__.
16356 * src/scan-skel.l: Handle __ofile__.
16357
62a3e4f0
AD
163582002-04-08 Akim Demaille <akim@epita.fr>
16359
16360 * src/gram.h (item_number_t): New, the type of item numbers in
16361 RITEM. Note that it must be able to code symbol numbers as
16362 positive number, and the negation of rule numbers as negative
16363 numbers.
16364 Adjust all dependencies (pretty many).
16365 * src/reduce.c (rule): Remove this `short *' pointer: use
16366 item_number_t.
16367 * src/system.h (MINSHORT, MAXSHORT): Remove.
16368 Include `limits.h'.
16369 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
16370 (shortcpy): Remove.
16371 (MAXTABLE): Move to...
16372 * src/output.c (MAXTABLE): here.
16373 (prepare_rules): Use output_int_table to output rhs.
16374 * data/bison.simple, data/bison.c++: Adjust.
16375 * tests/torture.at (Big triangle): Move the limit from 254 to
16376 500.
16377 * tests/regression.at (Web2c Actions): Ajust.
16378
16379 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
16380 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
16381 passes, but produces negative #line number, once fixed, GCC is
16382 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
16383 C), it passes.
16384 * src/state.h (state_h): Code input lines on ints, not shorts.
16385
bb88b0fc
AD
163862002-04-08 Akim Demaille <akim@epita.fr>
16387
16388 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
16389 and then the grammar.
16390
9a636f47
AD
163912002-04-08 Akim Demaille <akim@epita.fr>
16392
16393 * src/system.h: No longer using strndup.
16394
680e8701
AD
163952002-04-07 Akim Demaille <akim@epita.fr>
16396
16397 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
16398 * src/output.c (output_table_data): Return the longest number.
16399 (prepare_tokens): Output `token_number_max').
16400 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
16401 New.
16402 Use them to define yy_token_number_type/TokenNumberType.
16403 Use this type for yytranslate.
16404 * tests/torture.at (Big triangle): Push the limit from 124 to
16405 253.
16406 * tests/regression.at (Web2c Actions): Adjust.
16407
817e9f41
AD
164082002-04-07 Akim Demaille <akim@epita.fr>
16409
16410 * tests/torture.at (Big triangle): New.
16411 (GNU AWK Grammar, GNU Cim Grammar): Move to...
16412 * tests/existing.at: here.
16413
5123689b
AD
164142002-04-07 Akim Demaille <akim@epita.fr>
16415
16416 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
16417 nritems.
16418 Adjust dependencies.
16419
f3849179
AD
164202002-04-07 Akim Demaille <akim@epita.fr>
16421
16422 * src/reader.c: Normalize increments to prefix form.
16423
bd02036a
AD
164242002-04-07 Akim Demaille <akim@epita.fr>
16425
16426 * src/reader.c, symtab.c: Remove debugging code.
16427
db8837cb
AD
164282002-04-07 Akim Demaille <akim@epita.fr>
16429
16430 Rename all the `bucket's as `symbol_t'.
16431
16432 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
16433 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
16434 * src/symtab.c, src/symtab.h (bucket): Rename as...
16435 (symbol_t): this.
16436 (symbol_list_new, bucket_check_defined, bucket_make_alias)
16437 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
16438 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
16439 (buckets_new, buckets_free, buckets_do): Rename as...
16440 (symbol_list_new, symbol_check_defined, symbol_make_alias)
16441 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
16442 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
16443 (symbols_new, symbols_free, symbols_do): these.
16444
72a23c97
AD
164452002-04-07 Akim Demaille <akim@epita.fr>
16446
16447 Use lib/hash for the symbol table.
16448
16449 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
16450 EOF.
16451 * src/lex.c (lex): Set the `number' member of new terminals.
16452 * src/reader.c (bucket_check_defined, bucket_make_alias)
16453 (bucket_check_alias_consistence, bucket_translation): New.
16454 (reader, grammar_free, readgram, token_translations_init)
16455 (packsymbols): Adjust.
16456 (reader): Number the predefined tokens.
16457 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
16458 for predefined tokens.
16459 * src/symtab.h (bucket): Remove all the hash table related
16460 members.
16461 * src/symtab.c (symtab): Replace by...
16462 (bucket_table): this.
16463 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
16464 (buckets_new, buckets_do): New.
16465
280a38c3
AD
164662002-04-07 Akim Demaille <akim@epita.fr>
16467
16468 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
16469 (start_symbol, max_user_token_number, semantic_parser)
16470 (error_token_number): Initialize.
16471 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
16472 Initialize.
16473 (reader): Don't.
16474 (errtoken, eoftoken, undeftoken, axiom): Extern.
16475
03b31c0c
AD
164762002-04-07 Akim Demaille <akim@epita.fr>
16477
16478 * src/gram.h (rule_s): prec and precsym are now pointers
16479 to the bucket giving the priority/associativity.
16480 Member `associativity' removed: useless.
16481 * src/reduce.c, src/conflicts.c: Adjust.
16482
8b3df748
AD
164832002-04-07 Akim Demaille <akim@epita.fr>
16484
16485 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
16486 Properly escape the symbols' TAG when outputting them.
16487
e601aa1d
AD
164882002-04-07 Akim Demaille <akim@epita.fr>
16489
16490 * src/lalr.h (LA): Is a bitsetv, not bitset*.
16491
b0299a2e
AD
164922002-04-07 Akim Demaille <akim@epita.fr>
16493
16494 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
16495 (LArule): this, which is an array to rule_t*.
16496 * src/print.c, src/conflicts.c: Adjust.
16497
d7e1f00c
AD
164982002-04-07 Akim Demaille <akim@epita.fr>
16499
16500 * src/gram.h (rule_t): Rename `number' as `user_number'.
16501 `number' is a new member.
16502 Adjust dependencies.
16503 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
16504
cc9305dd
AD
165052002-04-07 Akim Demaille <akim@epita.fr>
16506
16507 As a result of the previous patch, it is no longer needed
16508 to reorder ritem itself.
16509
16510 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
16511
b0940840
AD
165122002-04-07 Akim Demaille <akim@epita.fr>
16513
16514 Be sure never to walk through RITEMS, but use only data related to
16515 the rules themselves. RITEMS should be banished.
16516
16517 * src/output.c (output_token_translations): Rename as...
16518 (prepare_tokens): this.
16519 In addition to `translate', prepare the muscles `tname' and
16520 `toknum', which were handled by...
16521 (output_rule_data): this.
16522 Remove, and move the remainder of its outputs into...
16523 (prepare_rules): this new routines, which also merges content from
16524 (output_gram): this.
16525 (prepare_rules): Be sure never to walk through RITEMS.
16526 (output_stos): Rename as...
16527 (prepare_stos): this.
16528 (output): Always invoke prepare_states, after all, just don't use it
16529 in the output if you don't need it.
16530
643a5994
AD
165312002-04-07 Akim Demaille <akim@epita.fr>
16532
16533 * src/LR0.c (new_state): Display `nstates' as the name of the
16534 newly created state.
16535 Adjust to initialize first_state and last_state if needed.
16536 Be sure to distinguish the initial from the final state.
16537 (new_states): Create the itemset of the initial state, and use
16538 new_state.
16539 * src/closure.c (closure): Now that the initial state has its
16540 items properly set, there is no need for a special case when
16541 creating `ruleset'.
16542
16543 As a result, now the rule 0, reducing to $axiom, is visible in the
16544 outputs. Adjust the test suite.
16545
16546 * tests/conflicts.at (Solved SR Conflicts)
16547 (Unresolved SR Conflicts): Adjust.
16548 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
16549 * tests/conflicts.at (S/R in initial): New.
16550
b4c4ccc2
AD
165512002-04-07 Akim Demaille <akim@epita.fr>
16552
16553 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
16554 the RHS of the rules.
16555 * src/output.c (output_gram): Likewise.
16556
bba97eb2
AD
165572002-04-07 Akim Demaille <akim@epita.fr>
16558
16559 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
16560 bucket.
16561 Adjust all dependencies.
16562 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
16563 `number' of the buckets too.
16564 * src/gram.h: Include `symtab.h'.
16565 (associativity): Move to...
16566 * src/symtab.h: here.
16567 No longer include `gram.h'.
16568
c3b407f4
AD
165692002-04-07 Akim Demaille <akim@epita.fr>
16570
16571 * src/gram.h, src/gram.c (rules_rhs_length): New.
16572 (ritem_longest_rhs): Use it.
16573 * src/gram.h (rule_t): `number' is a new member.
16574 * src/reader.c (packgram): Set it.
16575 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
16576 the end of `rules', and count them out of `nrules'.
16577 (reduce_output, dump_grammar): Adjust.
16578 * src/print.c (print_grammar): It is no longer needed to check for
16579 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
16580 * tests/reduce.at (Reduced Automaton): New test.
16581
11652ab3
AD
165822002-04-07 Akim Demaille <akim@epita.fr>
16583
16584 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
16585 lacking `+ 1' to nrules, Bison reported as useless a token if it
16586 was used solely to set the precedence of the last rule...
16587
26b23c1a
AD
165882002-04-07 Akim Demaille <akim@epita.fr>
16589
16590 * data/bison.c++, data/bison.simple: Don't output the current file
16591 name in #line, to avoid useless diffs between two identical
16592 outputs under different names.
16593
18bcecb0
AD
165942002-04-07 Akim Demaille <akim@epita.fr>
16595
16596 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
16597 Normalize loops to using `< nrules + 1', not `<= nrules'.
16598
fa770c86
AD
165992002-04-07 Akim Demaille <akim@epita.fr>
16600
16601 * TODO: Update.
16602
d9b739c3
AD
166032002-04-07 Akim Demaille <akim@epita.fr>
16604
16605 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
16606 bucket.value as bucket.number.
16607
99013900
AD
166082002-04-07 Akim Demaille <akim@epita.fr>
16609
16610 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
16611 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
16612 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
16613 RHS, instead of being an index in RITEMS.
16614
e966383b
PE
166152002-04-04 Paul Eggert <eggert@twinsun.com>
16616
16617 * doc/bison.texinfo: Update copyright date.
16618 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
16619 (Symbols): Warn about running Bison in one character set,
16620 but compiling and/or running in an incompatible one.
16621 Warn about character code 256, too.
16622
166232002-04-03 Paul Eggert <eggert@twinsun.com>
16624
16625 * src/bison.data (YYSTACK_ALLOC): Depend on whether
16626 YYERROR_VERBOSE is nonzero, not whether it is defined.
16627
16628 Merge changes from bison-1_29-branch.
c307773e 16629
8d6c48b9
PE
166302002-03-20 Paul Eggert <eggert@twinsun.com>
16631
16632 Merge fixes from Debian bison_1.34-1.diff.
16633
16634 * configure.in (AC_PREREQ): 2.53.
16635
e53c6322
AD
166362002-03-20 Akim Demaille <akim@epita.fr>
16637
16638 * src/conflicts.c (log_resolution): Argument `resolution' is const.
16639
9ffbeca7
PE
166402002-03-19 Paul Eggert <eggert@twinsun.com>
16641
21db0b2a
PE
16642 * src/bison.simple (YYCOPY): New macro.
16643 (YYSTACK_RELOCATE): Use it.
16644 Remove Type arg; no longer needed. All callers changed.
16645 (yymemcpy): Remove; no longer needed.
16646
9ffbeca7
PE
16647 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
16648 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
16649
642cb8f8
AD
166502002-03-19 Akim Demaille <akim@epita.fr>
16651
16652 Test and fix the #line outputs.
16653
16654 * tests/atlocal.at (GCC): New.
16655 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
0ffd4fd1 16656 (Prologue synch line, %union synch line, Postprologue synch line)
642cb8f8
AD
16657 (Action synch line, Epilogue synch line): New tests.
16658 * src/reader.c (parse_union_decl): Define the muscle stype_line.
16659 * data/bison.simple, data/bison.c++: Use it.
16660
3c31a486
AD
166612002-03-19 Akim Demaille <akim@epita.fr>
16662
16663 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
16664 (Solved SR Conflicts, %expect not enough, %expect right)
16665 (%expect too much): Move to...
16666 * tests/conflicts.at: this new file.
16667
0d8bed56
AD
166682002-03-19 Akim Demaille <akim@epita.fr>
16669
16670 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
16671 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
16672 that we can move to enums for instance.
16673 * src/output.c (token_definitions_output): Output a list of
16674 `token-name, token-number' instead of the #define.
16675 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
16676
9208d17f
AD
166772002-03-14 Akim Demaille <akim@epita.fr>
16678
16679 Use Gettext 0.11.1.
16680
af27eacb
RA
166812002-03-09 Robert Anisko <robert@lrde.epita.fr>
16682
16683 * data/bison.c++: Make the user able to add members to the generated
16684 parser by subclassing.
16685
9101a310
RA
166862002-03-05 Robert Anisko <robert@lrde.epita.fr>
16687
16688 * src/reader.c (read_additionnal_code): `c' should be an integer, not
16689 a character.
16690 Reported by Nicolas Tisserand and Nicolas Burrus.
16691
fff9bf0b
RA
166922002-03-04 Robert Anisko <robert@lrde.epita.fr>
16693
16694 * src/reader.c: Warn about lacking semi-colons, do not complain.
16695
64dba31e
RA
166962002-03-04 Robert Anisko <robert@lrde.epita.fr>
16697
16698 * data/bison.c++: Remove a debug line.
16699
374f5a14
RA
167002002-03-04 Robert Anisko <robert@lrde.epita.fr>
16701
16702 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
16703 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
16704 provide a default implementation.
16705
bfcf1f3a
AD
167062002-03-04 Akim Demaille <akim@epita.fr>
16707
16708 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
16709 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
16710 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
16711 * tests/semantic.at (Parsing Guards): Similarly.
16712 * src/reader.at (readgram): Complain if the last rule is not ended
16713 with a semi-colon.
16714
65ccf9fc
AD
167152002-03-04 Akim Demaille <akim@epita.fr>
16716
16717 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
16718 * src/closure.c: here.
16719 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
16720 RTC.
16721 * src/warshall.h, src/warshall.c: Remove.
16722 * tests/sets.at (Broken Closure): Adjust.
16723
d0039cbc
AD
167242002-03-04 Akim Demaille <akim@epita.fr>
16725
16726 * src/output.c (output_skeleton): tempdir is const.
16727 bytes_read is unused.
16728
345cea78
AD
167292002-03-04 Akim Demaille <akim@epita.fr>
16730
16731 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
16732 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
16733 Update.
16734 From Michael Hayes.
16735
564801f7
AD
167362002-03-04 Akim Demaille <akim@epita.fr>
16737
16738 * src/closure.c (closure): `r' is unused.
16739
e5352bc7
AD
167402002-03-04 Akim Demaille <akim@epita.fr>
16741
16742 * tests/sets.at (Broken Closure): Add the ending `;'.
16743 * src/reader.at (readgram): Complain if a rule is not ended with a
16744 semi-colon.
16745
914feea9
AD
167462002-03-04 Akim Demaille <akim@epita.fr>
16747
16748 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
16749 (count_sr_conflicts): Use bitset_count.
16750 * src/reduce.c (inaccessable_symbols): Ditto.
16751 (bits_size): Remove.
16752 * src/warshall.h, src/warshall.c: Convert to bitsetv.
16753
f0250de6
AD
167542002-03-04 Akim Demaille <akim@epita.fr>
16755
16756 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
16757 * src/reduce.c: Remove the `bitset_zero's following the
16758 `bitset_create's, as now it is performed by the latter.
16759
ef017502
AD
167602002-03-04 Akim Demaille <akim@epita.fr>
16761
16762 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
16763 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
16764 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
16765 latest sources from Michael.
16766
76514394
AD
167672002-03-04 Akim Demaille <akim@epita.fr>
16768
16769 * src/output.c (output): Don't free the grammar.
16770 * src/reader.c (grammar_free): New.
16771 * src/main.c (main): Call it and don't free symtab here.
16772
55024580
AD
167732002-03-04 Akim Demaille <akim@epita.fr>
16774
16775 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
16776 before returning.
16777 Reported by Benoit Perrot.
16778
f9abaa2c
AD
167792002-03-04 Akim Demaille <akim@epita.fr>
16780
16781 Use bitset operations when possible, not loops over bits.
16782
16783 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
16784 bitset_or.
16785 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
16786 * src/reduce.c (useless_nonterminals): Formatting changes.
16787 * src/warshall.c (TC): Use bitset_or.
16788
0e721e75
AD
167892002-03-04 Akim Demaille <akim@epita.fr>
16790
16791 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
16792 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
16793 Ditto.
16794
0fb1ffb1
AD
167952002-03-04 Akim Demaille <akim@epita.fr>
16796
16797 * src/lalr.c (F): Now a bitset*.
16798 Adjust all dependencies.
16799
b86796bf
AD
168002002-03-04 Akim Demaille <akim@epita.fr>
16801
16802 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
16803 Adjust all dependencies.
16804
602bbf31
AD
168052002-03-04 Akim Demaille <akim@epita.fr>
16806
16807 * src/L0.c, src/LR0.h (nstates): Be size_t.
16808 Adjust comparisons (signed vs unsigned).
16809 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
16810 bitset*.
16811 Adjust all dependencies.
16812
d8a0245c
AD
168132002-03-04 Akim Demaille <akim@epita.fr>
16814
16815 * src/closure.c (firsts): Now, also a bitset.
16816 Adjust all dependencies.
16817 (varsetsize): Remove, now unused.
16818 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
16819
34ba9743
AD
168202002-03-04 Akim Demaille <akim@epita.fr>
16821
16822 * src/print.c: Convert to use bitset.h, not hand coded iterations
16823 over ints.
16824
ed86e78c
AD
168252002-03-04 Akim Demaille <akim@epita.fr>
16826
16827 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
16828
dfdb1797
AD
168292002-03-04 Akim Demaille <akim@epita.fr>
16830
16831 * src/closure.c (ruleset): Be a bitset.
16832 (rulesetsize): Remove.
16833
7086e707
AD
168342002-03-04 Akim Demaille <akim@epita.fr>
16835
16836 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
16837 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
16838 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
16839 * src/closure.c (fderives): Be an array of bitsets.
16840
98254360
RA
168412002-02-28 Robert Anisko <robert@lrde.epita.fr>
16842
16843 * data/bison.c++: Merge the two generated headers. Insert a copyright
16844 notice in each output file.
16845
a75c057f
AD
168462002-02-28 Akim Demaille <akim@epita.fr>
16847
16848 * data/bison.c++: Copy the prologue of bison.simple to fetch
16849 useful M4 definitions, such as b4_header_guard.
16850
06b00abc
AD
168512002-02-25 Akim Demaille <akim@epita.fr>
16852
16853 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
16854 translator friendly scheme for the bgr
16855 copyright notice.
06b00abc 16856
70e7d534
AD
168572002-02-25 Akim Demaille <akim@epita.fr>
16858
16859 * src/output.c (header_output): Remove, now handled completely via
16860 M4.
16861
abe017f6
AD
168622002-02-25 Akim Demaille <akim@epita.fr>
16863
16864 * m4/m4.m4: New, from CVS Autoconf.
16865 * configure.in: Invoke it.
16866 * src/output.c (output_skeleton): Use its result instead of the
16867 hard coded name.
16868
381fb12e
AD
168692002-02-25 Akim Demaille <akim@epita.fr>
16870
16871 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
16872 Fileutils 4.1.5.
16873 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
16874 * src/output.c (output_skeleton): Use mkstemp to create a real
16875 temporary file.
16876 Move the filling of `skeleton' and its muscle to...
16877 (prepare): here.
16878 (output): Move the definition of the prologue muscle to...
16879 (prepare): here.
16880 * src/system.h (DEFAULT_TMPDIR): New.
16881
6f38107f
PE
168822002-02-14 Paul Eggert <eggert@twinsun.com>
16883
16884 Remove the support for C++ namespace cleanliness; it was
16885 causing more problems than it was curing, since it didn't work
16886 properly on some nonstandard C++ compilers. This can wait
16887 for a proper C++ parser.
16888
16889 * NEWS: Document this.
16890 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
16891 of C++, as it's treated like C now.
16892 * src/bison.simple (YYSTD): Remove.
16893 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
16894 Treat C++ just like Standard C instead of trying to support
16895 namespace cleanliness.
16896
80cce3da
AD
168972002-02-14 Akim Demaille <akim@epita.fr>
16898
16899 * tests/regression.at (else): Adjust to Andreas' change.
16900
842e8679
AD
169012002-02-14 Akim Demaille <akim@epita.fr>
16902
16903 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
16904
4bda3f10
AD
169052002-02-13 Andreas Schwab <schwab@suse.de>
16906
16907 * src/output.c (output_rule_data): Don't output NULL, it might
16908 not be defined yet.
16909
4162fa07 169102002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 16911
4162fa07
RA
16912 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
16913 (Copyright notice): Update.
b418ecd8 16914
bd16a5dc
AD
169152002-02-11 Akim Demaille <akim@epita.fr>
16916
16917 * tests/regression.at (%nonassoc and eof): Don't include
16918 nonportable headers.
16919
8d69a1a3
RA
169202002-02-08 Robert Anisko <robert@lrde.epita.fr>
16921
16922 * data/bison.c++: Correct error recovery. Make the user able to
16923 initialize the starting location.
16924
9b2d0677
AD
169252002-02-07 Akim Demaille <akim@epita.fr>
16926
16927 * tests/input.at: New.
16928
69e2658b
RA
169292002-02-07 Robert Anisko <robert@lrde.epita.fr>
16930
16931 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 16932 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
16933 directives around tables only needed for debugging.
16934
4aacc3a7
RA
169352002-02-07 Robert Anisko <robert@lrde.epita.fr>
16936
16937 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
16938 C++ parsers.
16939 (yy::b4_name::parse): Use print_.
16940
762a801e
RA
169412002-02-07 Robert Anisko <robert@lrde.epita.fr>
16942
16943 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
16944
4bb2bc3f
RA
169452002-02-07 Robert Anisko <robert@lrde.epita.fr>
16946
16947 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
16948 C++ parsers.
16949 (yy::b4_name::parse): Build verbose error messages, and use error_.
16950
6b45a3ca
RA
169512002-02-06 Robert Anisko <robert@lrde.epita.fr>
16952
16953 * data/bison.c++: Fix m4 quoting in comments.
16954
50997c6e
RA
169552002-02-06 Robert Anisko <robert@lrde.epita.fr>
16956
16957 * data/bison.c++: Adjust the parser code. Fix some muscles that were
16958 not expanded by m4.
16959
3f3eed27
AD
169602002-02-05 Akim Demaille <akim@epita.fr>
16961
16962 * data/bison.c++: Adjust to the M4 back end.
16963 More is certainly needed.
16964
be2a1a68
AD
169652002-02-05 Akim Demaille <akim@epita.fr>
16966
16967 Give a try to M4 as a back end.
16968
16969 * lib/readpipe.c: New, from wdiff.
16970 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
16971 BISON_HAIRY.
16972 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
16973 specific values. Now it is m4 that performs the lookup.
16974 * src/parse-skel.y: Remove.
16975 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
16976 * src/output.c (actions_output, guards_output)
16977 (token_definitions_output): No longer keeps track of the output
16978 line number, hence remove the second argument.
16979 (guards_output): Check against the guard member of a rule, not the
16980 action member.
16981 Adjust callers.
16982 (output_skeleton): Don't look for the skeleton location, let m4 do
16983 that.
16984 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
16985 file will be used.
16986 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
16987 (prepare): Given that for the time being changesyntax is not
16988 usable in M4, rename the muscles using `-' to `_'.
16989 Define `defines_flag', `output_parser_name' and `output_header_name'.
16990 * src/output.h (actions_output, guards_output)
16991 (token_definitions_output): Adjust prototypes.
16992 * src/scan-skel.l: Instead of scanning the skeletons, it now
16993 processes the output of m4: `__oline__' and `#output'.
16994 * data/bison.simple: Adjust to be used by M4(sugar).
16995 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
16996 to date.
16997 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
16998 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
16999 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
17000 shamelessly stolen from CVS Autoconf.
17001
beda758b
AD
170022002-02-05 Akim Demaille <akim@epita.fr>
17003
17004 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
17005 * configure.in: Check for the declarations of free and malloc.
17006 * src/muscle_tab.c: Adjust.
17007
5ece6d43
AD
170082002-02-05 Akim Demaille <akim@epita.fr>
17009
17010 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
17011 which have no values.
17012
5bb18f9a
AD
170132002-02-05 Akim Demaille <akim@epita.fr>
17014
17015 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
17016 * data/: here.
17017
894dd62e
PE
170182002-01-29 Paul Eggert <eggert@twinsun.com>
17019
17020 * src/bison.simple (YYSIZE_T): Do not define merely because
17021 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
17022 On some platforms, <alloca.h> does not declare YYSTD (size_t).
17023
82841af7
AD
170242002-01-27 Akim Demaille <akim@epita.fr>
17025
17026 Fix `%nonassoc and eof'.
17027
17028 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
17029 which were not properly copied! Replace
17030 memcpy (res->errs, src->errs, src->nerrs);
17031 with
17032 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
17033 !!!
17034 * tests/regression.at (%nonassoc and eof): Adjust to newest
17035 Autotest: `.' is not in the PATH.
17036
318b76e9
AD
170372002-01-27 Akim Demaille <akim@epita.fr>
17038
17039 * tests/sets.at (AT_EXTRACT_SETS): New.
17040 (Nullable): Use it.
17041 (Firsts): New.
17042
30d2f3d5
AD
170432002-01-26 Akim Demaille <akim@epita.fr>
17044
17045 * tests/actions.at, tests/calc.at, tests/headers.at,
17046 * tests/torture.at: Adjust to the newest Autotest which no longer
17047 forces `.' in the PATH.
17048
30f8c395
AD
170492002-01-25 Akim Demaille <akim@epita.fr>
17050
17051 * tests/regression.at (%nonassoc and eof): New.
17052 Suggested by Robert Anisko.
17053
29ae55f1
AD
170542002-01-24 Akim Demaille <akim@epita.fr>
17055
17056 Bison dumps core when trying to complain about broken input files.
17057 Reported by Cris van Pelt.
17058
17059 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
17060 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
17061 into...
17062 (Invalid inputs): Strengthen: exercise parse_percent_token.
17063
2b548aa6
RA
170642002-01-24 Robert Anisko <robert.anisko@epita.fr>
17065
17066 * src/Makefile.am: Add bison.c++.
17067 * src/bison.c++: New skeleton.
17068
bb0146c2
AD
170692002-01-21 Paolo Bonzini <bonzini@gnu.org>
17070
17071 * po/it.po: New.
17072
bec30531
AD
170732002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
17074
17075 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
17076
fc6edc45
MA
170772002-01-20 Marc Autret <marc@gnu.org>
17078
17079 * src/files.c (compute_output_file_names): Fix
17080
5e5d5415
MA
170812002-01-20 Marc Autret <marc@gnu.org>
17082
17083 * tests/output.at: New test.
17084 * src/files.c (compute_base_names): Don't map extensions when
17085 the YACC flag is set, use defaults.
17086 Reported by Evgeny Stambulchik.
17087
44ea3fbd
MA
170882002-01-20 Marc Autret <marc@gnu.org>
17089
ba0fe3c7
PE
17090 * src/system.h: Need to define __attribute__ away for non-GCC
17091 compilers as well (i.e., the vendor C compiler).
44ea3fbd
MA
17092 Suggested by Albert Chin-A-Young.
17093
338963d1
TVH
170942002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
17095
17096 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
17097 canonical definition.
17098 * src/system.h: Use the canonical definition for PARAMS (avoids
17099 a conflict with the macro from lib/hash.h).
17100
c57b2479
AD
171012002-01-11 Akim Demaille <akim@epita.fr>
17102
17103 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 17104 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 17105
b85810ae
AD
171062002-01-09 Akim Demaille <akim@epita.fr>
17107
17108 * src/files.c, src/files.h (output_infix): New.
17109 (tab_extension): Remove.
17110 (compute_base_names): Compute the former, drop the latter.
17111 * src/output.c (prepare): Insert the muscles `output-infix', and
17112 `output-suffix'.
17113 * src/parse-skel.y (string, string.1): New.
17114 (section.header): Use it.
17115 (section.yacc): Remove.
17116 (prefix): Remove too.
17117 * src/scan-skel.l: Adjust.
17118 * src/bison.simple, src/bison.hairy: Adjust.
17119
cae60122
AD
171202002-01-09 Akim Demaille <akim@epita.fr>
17121
17122 * configure.in (WERROR_CFLAGS): Compute it.
17123 * src/Makefile.am (CFLAGS): Pass it.
17124 * tests/atlocal.in (CFLAGS): Idem.
17125 * src/files.c: Fix a few warnings.
17126 (get_extension_index): Remove, unused.
17127
ae404801
AD
171282002-01-08 Akim Demaille <akim@epita.fr>
17129
17130 * src/getargs.c (AS_FILE_NAME): New.
17131 (getargs): Use it to convert DOSish file names.
17132 * src/files.c (base_name): Rename as full_base_name to avoid
17133 clashes with `base_name ()'.
17134 (filename_split): New.
17135 (compute_base_names): N-th rewrite, using filename_split.
17136
22312b71
AD
171372002-01-08 Akim Demaille <akim@epita.fr>
17138
17139 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
17140 New, stolen from the Fileutils 4.1.
17141 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
17142 * configure.in: Check for the presence of memrchr, and of its
17143 prototype.
17144
a67cef01
TVH
171452002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
17146
17147 * lib/hash.h (__P): Added definition for this macro.
17148 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
17149 BUILT_SOURCES, to ensure they are generated first.
17150 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
17151 %error-verbose to allow bootstrapping with bison 1.30x.
17152
2b25d624
AD
171532002-01-06 Akim Demaille <akim@epita.fr>
17154
17155 * src/reader.c (parse_braces): Don't fetch the next char, the
17156 convention is to fetch on entry.
17157 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
17158 'switch' without a following semicolon.
17159 * tests/regression.at (braces parsing): New.
17160
3460813b
AD
171612002-01-06 Akim Demaille <akim@epita.fr>
17162
17163 Bison is dead wrong in its RR conflict reports.
17164
17165 * tests/torture.at (GNU Cim Grammar): New.
17166 * src/conflicts.c (count_rr_conflicts): Fix.
17167
73784c64
AD
171682002-01-06 Akim Demaille <akim@epita.fr>
17169
17170 Creating package.m4 from configure.ac causes too many problems.
17171
17172 * tests/Makefile.am (package.m4): Create it by hand,
17173 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
17174
25d81090
AD
171752002-01-06 Akim Demaille <akim@epita.fr>
17176
17177 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
17178 skeleton.h.
17179
a9b8959e
PE
171802002-01-04 Paul Eggert <eggert@twinsun.com>
17181
17182 * doc/bison.texinfo (Debugging):
17183 Remove YYSTDERR; it's no longer defined or used.
17184 Also, s/cstdio.h/cstdio/.
17185
25d81090
AD
171862002-01-03 Akim Demaille <akim@epita.fr>
17187
17188 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
17189
1109455c
AD
171902002-01-03 Akim Demaille <akim@epita.fr>
17191
17192 * src/parse-skel.y (process_skeleton): Don't bind the parser's
17193 tracing code to --trace, wait for a better --trace option, with
17194 args.
17195
7ea5e977
AD
171962002-01-03 Akim Demaille <akim@epita.fr>
17197
17198 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
17199 The ISO C++ standard is extremely clear about it: stderr is
17200 considered a macro, not a regular symbol (see table 94 `Header
17201 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
17202 Therefore std:: does not apply to it. It still does with fprintf.
17203 Also, s/cstdio.h/cstdio/.
17204
fab5b110
AD
172052002-01-03 Akim Demaille <akim@epita.fr>
17206
17207 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
17208 for non system headers.
17209
aed7fd9b
AD
172102002-01-02 Akim Demaille <akim@epita.fr>
17211
17212 Equip the skeleton chain with location tracking, runtime trace,
17213 pure parser and scanner.
17214
17215 * src/parse-skel.y: Request a pure parser, locations, and prefix
17216 renaming.
17217 (%union): Having several members with the same type does not help
17218 type mismatches, simplify.
17219 (YYPRINT, yyprint): New.
17220 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
17221 (skel_error): this.
17222 Handle locations.
17223 * src/scan-skel.l: Adjust to these changes.
17224 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
17225 (LOCATION_PRINT, skel_control_t): New.
17226
24fad99e
AD
172272001-12-30 Akim Demaille <akim@epita.fr>
17228
17229 * src/parse-skel.y: Get rid of the shift/reduce conflict:
17230 replace `gb' with BLANKS.
17231 * src/scan-skel.l: Adjust.
17232
a4b36db4
AD
172332001-12-30 Akim Demaille <akim@epita.fr>
17234
17235 * src/system.h: We don't need nor want bcopy.
17236 Throw away MS-DOS crap: we don't need getpid.
17237 * configure.in: We don't need strndup. It was even causing
17238 problems: because Flex includes the headers *before* us,
17239 _GNU_SOURCE is not defined by config.h, and therefore strndup was
17240 not visible.
17241 * lib/xstrndup.c: New.
17242 * src/scan-skel.l: Use it.
17243 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
17244 * src/parse-skel.y: Use %directives instead of #defines.
17245
1239777d
AD
172462001-12-30 Akim Demaille <akim@epita.fr>
17247
17248 * src/skeleton.h: New.
17249 * src/output.c (output_parser, output_master_parser): Remove, dead
17250 code.
17251 * src/output.h (get_lines_number, actions_output, guards_output)
17252 (token_definitions_output): Prototype them.
17253 * src/parse-skel.y: Add the license notice.
17254 Include output.h and skeleton.h.
17255 (process_skeleton): Returns void, and takes a single parameter.
17256 * src/scan-skel.l: Add the license notice.
17257 Include skeleton.h.
17258 Don't use %option yylineno: it seems that then Flex imagines
17259 REJECT has been used, and therefore it won't reallocate its
17260 buffers (which makes no other sense to me than a bug). It results
17261 in warnings for `unused: yy_flex_realloc'.
17262
9b3add5b
RA
172632001-12-30 Robert Anisko <robert.anisko@epita.fr>
17264
17265 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
17266 (MUSCLE_INSERT_PREFIX): ...to there.
17267 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
17268 (MUSCLE_INSERT_PREFIX): Move from here...
17269
17270 * src/bison.hairy: Add a section directive. Put braces around muscle
17271 names. This parser skeleton is still broken, but Bison should not
17272 choke on a bad muscle 'syntax'.
17273 * src/bison.simple: Add a section directive. Put braces around muscle
17274 names.
17275
17276 * src/files.h (strsuffix, stringappend): Add declarations.
17277 (tab_extension): Add declaration.
17278 (short_base_name): Add declaration.
17279
17280 * src/files.c (strsuffix, stringappend): No longer static. These
17281 functions are used in the skeleton parser.
17282 (tab_extension): New.
17283 (compute_base_names): Use the computations done in this function
fab5b110 17284 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
17285 names.
17286 (short_base_name): No longer static.
17287
17288 * src/output.c (output_skeleton): New.
17289 (output): Disable call to output_master_parser, and give a try to
17290 a new skeleton handling system.
17291 (guards_output, actions_output): No longer static.
17292 (token_definitions_output, get_lines_number): No longer static.
17293
17294 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
17295
fab5b110 17296 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
17297 parse-skel.y.
17298
17299 * src/parse-skel.y: New file.
17300 * src/scan-skel.l: New file.
17301
b5b61c61
AD
173022001-12-29 Akim Demaille <akim@epita.fr>
17303
17304 %name-prefix is broken.
17305
17306 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
17307 Adjust all dependencies.
17308 * tests/headers.at (export YYLTYPE): Strengthen this test: use
17309 %name-prefix.
17310
17311 Renaming yylval but not yylloc is not consistent. Now we do.
17312
17313 * src/bison.simple: Prefix yylloc if used.
17314 * doc/bison.texinfo (Decl Summary): Document that.
17315
8c9a50be
AD
173162001-12-29 Akim Demaille <akim@epita.fr>
17317
17318 * doc/bison.texinfo: Promote `%long-directive' over
17319 `%long_directive'.
17320 Remove all references to fixed-output-files, yacc is enough.
17321
d99361e6
AD
173222001-12-29 Akim Demaille <akim@epita.fr>
17323
17324 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
17325 user prologue. These are defaults.
17326 * tests/actions.at (Mid-rule actions): Make sure the user can
17327 define YYDEBUG and YYERROR_VERBOSE.
17328
b9cecb91
AD
173292001-12-29 Akim Demaille <akim@epita.fr>
17330
17331 * src/output.c (header_output): Don't forget to export YYLTYPE and
17332 yylloc.
17333 * tests/headers.at (export YYLTYPE): New, make sure it does.
17334 * tests/regression.at (%union and --defines, Invalid CPP headers):
17335 Move to...
17336 * tests/headers.at: here.
17337
aea13e97
AD
173382001-12-29 Akim Demaille <akim@epita.fr>
17339
17340 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
17341
931394cb
AD
173422001-12-29 Akim Demaille <akim@epita.fr>
17343
17344 * tests/actions.at (Mid-rule actions): Output on a single line
17345 instead of several.
17346
704a47c4
AD
173472001-12-29 Akim Demaille <akim@epita.fr>
17348
17349 * doc/bison.texinfo: Formatting changes.
17350
091e20bb
AD
173512001-12-29 Akim Demaille <akim@epita.fr>
17352
17353 Don't store the token defs in a muscle, just be ready to output it
17354 on command. Now possible via `symbols'. Fixes a memory leak.
17355
17356 * src/output.c (token_definitions_output): New.
17357 (output_parser, header_output): Use it.
17358 * src/reader.c (symbols_save): Remove.
17359
cce71710
AD
173602001-12-29 Akim Demaille <akim@epita.fr>
17361
17362 * src/bison.simple: Do not provide a default for YYSTYPE and
17363 YYLTYPE before the user's prologue. Otherwise it's hardly... a
17364 default.
17365
82c035a8
AD
173662001-12-29 Akim Demaille <akim@epita.fr>
17367
17368 Mid-rule actions are simply... ignored!
17369
17370 * src/reader.c (readgram): Be sure to attach mid-rule actions to
17371 the empty-rule associated to the dummy symbol, not to the host
17372 rule.
17373 * tests/actions.at (Mid-rule actions): New.
17374
8419d367
AD
173752001-12-29 Akim Demaille <akim@epita.fr>
17376
17377 Memory leak.
17378
17379 * src/reader.c (reader): Free grammar.
17380
375d5806
AD
173812001-12-29 Akim Demaille <akim@epita.fr>
17382
17383 Memory leak.
17384
17385 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
17386 since it allocates it for each state, although only one is needed.
17387 (allocate_storage): Do it here.
17388
f51cb8ff
AD
173892001-12-29 Akim Demaille <akim@epita.fr>
17390
17391 * src/options.h, src/options.c (create_long_option_table): Rename
17392 as...
17393 (long_option_table_new): this, with a clearer prototype.
17394 (percent_table): Remove, unused,
17395 * src/getargs.c (getargs): Adjust.
17396
29e88316
AD
173972001-12-29 Akim Demaille <akim@epita.fr>
17398
17399 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
17400 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
17401 as states.
17402
b9f71f19
AD
174032001-12-29 Akim Demaille <akim@epita.fr>
17404
17405 * src/lalr.c (build_relations): Rename `states' as `states1'.
17406 Sorry, I don't understand exactly what it is, no better name...
17407
1a2b5d37
AD
174082001-12-29 Akim Demaille <akim@epita.fr>
17409
17410 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
17411 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
17412 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
17413 as rules.
17414
1cca533e
AD
174152001-12-29 Akim Demaille <akim@epita.fr>
17416
17417 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
17418 ago.
17419
c03ae966
AD
174202001-12-29 Akim Demaille <akim@epita.fr>
17421
17422 * src/reader.c, src/reader.h (user_toknums): Remove.
17423 Adjust all users to use symbols[i]->user_token_number.
17424
5a670b1e
AD
174252001-12-29 Akim Demaille <akim@epita.fr>
17426
17427 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
17428 Adjust all users to use symbols[i]->prec or ->assoc.
17429
ad949da9
AD
174302001-12-29 Akim Demaille <akim@epita.fr>
17431
17432 * src/reader.c, src/reader.h (tags): Remove.
17433 Adjust all users to use symbols[i]->tag.
17434
0e78e603
AD
174352001-12-29 Akim Demaille <akim@epita.fr>
17436
17437 * src/gram.h, src/gram.c (symbols): New, similar to state_table
17438 and rule_table.
17439 * src/reader.c (packsymbols): Fill this table.
17440 Drop sprec.
17441 * src/conflicts.c (resolve_sr_conflict): Adjust.
17442 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
17443 single table.
17444 Use symbols[i]->tag instead of tags[i].
17445
213e640e
AD
174462001-12-29 Akim Demaille <akim@epita.fr>
17447
17448 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
17449 In addition, put a comment in there, to replace...
17450 * tests/regression.at (%union and C comments): Remove.
17451
e7b8bef1
AD
174522001-12-29 Akim Demaille <akim@epita.fr>
17453
17454 * tests/regression.at (Web2c Actions): Blindly move the actual
17455 output as expected output. The contents *seem* right to me, but I
17456 can't pretend reading perfectly parser tables... Nonetheless, all
17457 the other tests pass correctly, the table look OK, even though the
17458 presence of `$axiom' is to be noted: AFAICS it is useless (but
17459 harmless).
17460
b68e7744
AD
174612001-12-29 Akim Demaille <akim@epita.fr>
17462
17463 * src/reader.c (readgram): Don't add the rule 0 if there were no
17464 rules read. In other words, add it _after_ having performed
17465 grammar sanity checks.
17466 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
17467
78d5bae9
AD
174682001-12-29 Akim Demaille <akim@epita.fr>
17469
17470 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
17471 visible, and some states have now a different number.
17472
ff442794
AD
174732001-12-29 Akim Demaille <akim@epita.fr>
17474
17475 * src/reader.c (readgram): Bind the initial rule's lineno to that
17476 of the first rule.
17477 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
17478 (Solved SR Conflicts): Adjust rule 0's line number.
17479
610ab194
AD
174802001-12-29 Akim Demaille <akim@epita.fr>
17481
17482 Fix the `GAWK Grammar' failure.
17483
17484 * src/LR0.c (final_state): Initialize to -1 so that we do compute
17485 the reductions of the first state which was mistakenly confused
17486 with the final state because precisely final_state was initialized
17487 to 0.
17488 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
17489 now noticed by Bison.
17490 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
17491 have a reduction on $default.
17492
29d29c8f
AD
174932001-12-29 Akim Demaille <akim@epita.fr>
17494
17495 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
17496 rule line numbers.
17497 * src/closure.c (print_closure): Likewise.
17498 * src/derives.c (print_derives): Likewise.
17499 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
17500 now.
17501
7c6b64d0
AD
175022001-12-29 Akim Demaille <akim@epita.fr>
17503
17504 * src/lalr.c (lookaheads_print): New.
17505 (lalr): Call it when --trace-flag.
17506 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
17507 are dumped.
17508
3d4daee3
AD
175092001-12-29 Akim Demaille <akim@epita.fr>
17510
17511 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
17512 when walking through ritem, even via rule->rhs.
17513 * src/reduce.c (dump_grammar, useful_production, reduce_output)
17514 (useful_production, useless_nonterminals): Likewise.
17515 (reduce_grammar_tables): Likewise, plus update nritems.
17516 * src/nullable.c (set_nullable): Likewise.
17517 * src/lalr.c (build_relations): Likewise.
17518 * tests/sets.at (Nullable): Adjust.
17519 Fortunately, now, the $axiom is no longer nullable.
17520
9e7f6bbd
AD
175212001-12-29 Akim Demaille <akim@epita.fr>
17522
17523 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
17524 the 0-sentinel.
17525 * src/gram.c (ritem_longest_rhs): Likewise.
17526 * src/reduce.c (nonterminals_reduce): Likewise.
17527 * src/print_graph.c (print_graph): Likewise.
17528 * src/output.c (output_rule_data): Likewise.
17529 * src/nullable.c (set_nullable): Likewise.
17530
255ef638
AD
175312001-12-29 Akim Demaille <akim@epita.fr>
17532
17533 * src/output.c: Comment changes.
17534
0d8a7363
AD
175352001-12-27 Paul Eggert <eggert@twinsun.com>
17536
17537 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
17538 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
17539 Sparc, as they were causing more porting problems than the
17540 (minor) performance improvement was worth.
17541
17542 Also, catch up with 1.31's YYSTD.
17543
3db472b9
AD
175442001-12-27 Akim Demaille <akim@epita.fr>
17545
17546 * src/output.c (output_gram): Rely on nritems, not the
17547 0-sentinel. See below.
17548 Use -1 as separator, not 0.
17549 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
17550 Rely on -1 as separator in yyrhs, instead of 0.
17551 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
17552 twice `Now at end of input', therefore there are two lines less to
17553 expect.
17554
b365aa05
AD
175552001-12-27 Akim Demaille <akim@epita.fr>
17556
17557 * tests/regression.at (Unresolved SR Conflicts):
17558 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
17559 below.
17560
30171f79
AD
175612001-12-27 Akim Demaille <akim@epita.fr>
17562
17563 * src/LR0.c (new_state): Recognize the final state by the fact it
17564 is reached by eoftoken.
17565 (insert_start_shifting_state, insert_eof_shifting_state)
17566 (insert_accepting_state, augment_automaton): Remove, since now
17567 these states are automatically computed from the initial state.
17568 (generate_states): Adjust.
17569 * src/print.c: When reporting a rule number to the user, substract
17570 1, so that the axiom rule is rule 0, and the first user rule is 1.
17571 * src/reduce.c: Likewise.
17572 * src/print_graph.c (print_core): For the time being, just as for
17573 the report, depend upon --trace-flags to dump the full set of
17574 items.
17575 * src/reader.c (readgram): Once the grammar read, insert the rule
17576 0: `$axiom: START-SYMBOL $'.
17577 * tests/set.at: Adjust: rule 0 is now displayed, and since the
17578 number of the states has changed (the final state is no longer
17579 necessarily the last), catch up.
17580
75142d45
AD
175812001-12-27 Akim Demaille <akim@epita.fr>
17582
17583 Try to make the use of the eoftoken valid. Given that its value
17584 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
17585 is used instead of > 0 where appropriate, (ii), depend upon nritems
17586 instead of the 0-sentinel.
17587
17588 * src/gram.h, src/gram.c (nritems): New.
17589 Expected to be duplication of nitems, but for the time being...
17590 * src/reader.c (packgram): Assert nritems and nitems are equal.
17591 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
17592 * src/closure.c (print_closure, print_fderives): Likewise.
17593 * src/gram.c (ritem_print): Likewise.
17594 * src/print.c (print_core, print_grammar): Likewise.
17595 * src/print_graph.c: Likewise.
17596
b7c49edf
AD
175972001-12-27 Akim Demaille <akim@epita.fr>
17598
17599 * src/main.c (main): If there are complains after grammar
17600 reductions, then output the report anyway if requested, then die.
17601 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
17602 * src/reader.c (eoftoken): New.
17603 (parse_token_decl): If the token being defined has value `0', it
17604 is the eoftoken.
17605 (packsymbols): No longer hack `tags' to insert `$' by hand.
17606 Be sure to preserve the value of the eoftoken.
17607 (reader): Make sure eoftoken is defined.
17608 Initialize nsyms to 0: now eoftoken is created just like the others.
17609 * src/print.c (print_grammar): Don't special case the eof token.
17610 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
17611 lie anyway, albeit pleasant.
17612 * tests/calc.at: Exercise error messages with eoftoken.
17613 Change the grammar so that empty input is invalid.
17614 Adjust expectations.
17615 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
17616
ec2da99f
AD
176172001-12-27 Akim Demaille <akim@epita.fr>
17618
17619 * configure.in: Check the protos of strchr ans strspn.
17620 Replace strchr if needed.
17621 * src/system.h: Provide the protos of strchr, strspn and memchr if
17622 missing.
17623 * lib/strchr.c: New.
17624 * src/reader.c (symbols_save): Use strchr.
17625
8adfa272
AD
176262001-12-27 Akim Demaille <akim@epita.fr>
17627
17628 * src/print.c, src/print_graph.c (escape): New.
17629 Use it to quote the TAGS outputs.
17630 * src/print_graph.c (print_state): Now errors are in red, and
17631 reductions in green.
17632 Prefer high to wide: output the state number on a line of its own.
17633
80dac38c
AD
176342001-12-27 Akim Demaille <akim@epita.fr>
17635
17636 * src/state.h, src/state.c (reductions_new): New.
17637 * src/LR0.c (set_state_table): Let all the states have a
17638 `reductions', even if reduced to 0.
17639 (save_reductions): Adjust.
17640 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
17641 * src/print.c (print_reductions, print_actions): Adjust.
17642 * src/output.c (action_row): Adjust.
17643
2cec70b9
AD
176442001-12-27 Akim Demaille <akim@epita.fr>
17645
17646 * src/state.h, src/state.c (errs_new, errs_dup): New.
17647 * src/LR0.c (set_state_table): Let all the states have an errs,
17648 even if reduced to 0.
17649 * src/print.c (print_errs, print_reductions): Adjust.
17650 * src/output.c (output_actions, action_row): Adjust.
17651 * src/conflicts.c (resolve_sr_conflict): Adjust.
17652
13ca549a
AD
176532001-12-27 Akim Demaille <akim@epita.fr>
17654
17655 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
17656
5092aba5
AD
176572001-12-27 Akim Demaille <akim@epita.fr>
17658
17659 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
17660 * src/print.c: here.
17661 (lookaheadset, shiftset): New, used as additional storage by
17662 print_reductions.
17663 (print_results): Adjust.
17664 (print_shifts, print_gotos, print_errs): New, extracted from...
17665 (print_actions): here.
17666 * src/print_graph.c (print_actions): Remove dead code.
17667
11e2beca
AD
176682001-12-27 Akim Demaille <akim@epita.fr>
17669
17670 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
17671 `$n' and `@n'.
17672
dac3c910
AD
176732001-12-27 Akim Demaille <akim@epita.fr>
17674
17675 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
17676 (build_relations): Adjust.
17677
d0b0fefa
AD
176782001-12-27 Akim Demaille <akim@epita.fr>
17679
17680 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
17681 duplication.
17682
adc8c848
AD
176832001-12-27 Akim Demaille <akim@epita.fr>
17684
17685 * src/reader.c (packgram): Catch nitems overflows.
17686
14d293ac
AD
176872001-12-27 Akim Demaille <akim@epita.fr>
17688
17689 * src/files.c, src/files.h (guard_obstack): Remove.
17690 * src/output.c (output): Adjust.
17691 * src/reader.c (parse_braces): New, factoring...
17692 (copy_action, copy_guard): these two which are renamed as...
17693 (parse_action, parse_guard): these.
17694 As a voluntary consequence, using braces around guards is now
17695 mandatory.
17696
f499b062
AD
176972001-12-27 Akim Demaille <akim@epita.fr>
17698
17699 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
17700 * src/reader.c (symbol_list): `guard' and `guard_line' are new
17701 members.
17702 (symbol_list_new): Adjust.
17703 (copy_action): action_line is the first line, not the last.
17704 (copy_guard): Just as for actions, store the `action' only, not
17705 the switch/case/break flesh.
17706 Don't parse the user action that might follow the guard, let...
17707 (readgram): do it, i.e., now, there can be an action after a
17708 guard.
17709 In other words the guard is just explicitly optional.
17710 (packgram): Adjust.
17711 * src/output.c (guards_output): New.
17712 (output_parser): Call it when needed.
17713 (output): Also free the guard and attrs obstacks.
17714 * src/files.c, src/files.h (obstack_save): Remove.
17715 (output_files): Remove.
17716 As a result, if one needs the former `.act' file, using an
17717 appropriate skeleton which requires actions and guards is now
17718 required.
17719 * src/main.c (main): Adjust.
17720 * tests/semantic.at: New.
17721 * tests/regression.at: Use `input.y' as input file name.
17722 Avoid 8+3 problems by requiring input.c when the test needs the
17723 parser.
17724
d945f5cd
AD
177252001-12-27 Akim Demaille <akim@epita.fr>
17726
17727 * src/reader.c (symbol_list_new): Be sure to initialize all the
17728 fields.
17729
d200e455
AD
177302001-12-27 Akim Demaille <akim@epita.fr>
17731
17732 All the hacks using a final pseudo state are now useless.
17733
17734 * src/LR0.c (set_state_table): state_table holds exactly nstates.
17735 * src/lalr.c (nLA): New.
17736 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
17737 instead of lookaheadsp from the pseudo state (nstate + 1).
17738
f9507c28
AD
177392001-12-27 Akim Demaille <akim@epita.fr>
17740
17741 * src/output.c (action_row, token_actions): Use a state_t instead
17742 of a integer, and nlookaheads instead of the following state's
17743 lookaheadsp.
17744
065fbd27
AD
177452001-12-27 Akim Demaille <akim@epita.fr>
17746
17747 * src/conflicts.c (log_resolution, flush_shift)
17748 (resolve_sr_conflict, set_conflicts, solve_conflicts)
17749 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
17750 (conflicts_print, print_reductions): Use a state_t instead of an
17751 integer when referring to a state.
17752 As much as possible, depend upon nlookaheads, instead of the
17753 `lookaheadsp' member of the following state (since lookaheads of
17754 successive states are successive, the difference between state n + 1
17755 and n served as the number of lookaheads for state n).
17756 * src/lalr.c (add_lookback_edge): Likewise.
17757 * src/print.c (print_core, print_actions, print_state)
17758 (print_results): Likewise.
17759 * src/print_graph.c (print_core, print_actions, print_state)
17760 (print_graph): Likewise.
17761 * src/conflicts.h: Adjust.
17762
1b177bd7
AD
177632001-12-27 Akim Demaille <akim@epita.fr>
17764
17765 * src/bison.hairy: Formatting/comment changes.
17766 ANSIfy.
17767 Remove `register' indications.
17768 Add plenty of `static'.
17769
7742ddeb
AD
177702001-12-27 Akim Demaille <akim@epita.fr>
17771
17772 * src/output.c (prepare): Drop the muscle `ntbase' which
17773 duplicates ntokens.
17774 * src/bison.simple: Formatting/comment changes.
17775 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
17776 is an undocumented synonym.
17777
1fa14068
AD
177782001-12-22 Akim Demaille <akim@epita.fr>
17779
17780 * src/output.c (output_table_data): Change the prototype to use
17781 `int' for array ranges: some invocations do pass an int, not a
17782 short.
17783 Reported by Wayne Green.
17784
b9752825
AD
177852001-12-22 Akim Demaille <akim@epita.fr>
17786
17787 Some actions of web2c.y are improperly triggered.
17788 Reported by Mike Castle.
17789
17790 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
17791 * tests/regression.at (Web2c): Rename as...
17792 (Web2c Report): this.
17793 (Web2c Actions): New.
17794
776209d6
AD
177952001-12-22 Akim Demaille <akim@epita.fr>
17796
17797 Reductions in web2c.y are improperly reported.
17798 Reported by Mike Castle.
17799
17800 * src/conflicts.c (print_reductions): Fix.
17801 * tests/regression.at (Web2c): New.
17802
275fc3ad
AD
178032001-12-18 Akim Demaille <akim@epita.fr>
17804
17805 Some host fail on `assert (!"foo")', which expands to
17806 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
17807 Reported by Nelson Beebee.
17808
17809 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
17810 `#define it_succeeded 0' and `assert (it_succeeded)'.
17811
897668ee
MA
178122001-12-17 Marc Autret <autret_m@epita.fr>
17813
17814 * src/bison.simple: Don't hard code the skeleton line and filename.
17815 * src/output.c (output_parser): Rename 'line' as 'output_line'.
17816 New line counter 'skeleton_line' (skeleton-line muscle).
17817
ab3399e0
PE
178182001-12-17 Paul Eggert <eggert@twinsun.com>
17819
17820 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
17821 YYDEBUG must be defined to a nonzero value.
17822
17823 * src/bison.simple (yytname): Do not assume that the user defines
17824 YYDEBUG to a properly parenthesized expression.
17825
3877f72b
AD
178262001-12-17 Akim Demaille <akim@epita.fr>
17827
17828 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
17829 nlookaheads is a new member.
17830 Adjust all users.
17831 * src/lalr.h (nlookaheads): Remove this orphan declaration.
17832 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
17833 state.
776209d6 17834
331dbc1b
AD
178352001-12-17 Akim Demaille <akim@epita.fr>
17836
17837 * src/files.h, src/files.c (open_files, close_files): Remove.
17838 * src/main.c (main): Don't open/close files, nor invoke lex_free,
17839 let...
17840 * src/reader.c (reader): Do it.
776209d6 17841
be750e4c
AD
178422001-12-17 Akim Demaille <akim@epita.fr>
17843
17844 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 17845
709ae8c6
AD
178462001-12-17 Akim Demaille <akim@epita.fr>
17847
17848 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
17849 (flush_reduce): New.
17850 (resolve_sr_conflict): Adjust.
776209d6 17851
f87685c3
AD
178522001-12-17 Akim Demaille <akim@epita.fr>
17853
17854 * src/output.c (output_obstack): Be static and rename as...
17855 (format_obstack): this, to avoid any confusion with files.c's
17856 output_obstack.
17857 * src/reader.h (muscle_obstack): Move to...
17858 * src/output.h: here, since it's defined in output.c.
17859
837491d8
AD
178602001-12-17 Akim Demaille <akim@epita.fr>
17861
17862 * src/output.c (action_row, save_column, default_goto)
17863 (sort_actions, matching_state, pack_vector): Better variable
17864 locality.
17865
796d61fb
AD
178662001-12-17 Akim Demaille <akim@epita.fr>
17867
17868 * src/output.c: Various formatting changes.
776209d6 17869
64d15509
AD
178702001-12-17 Akim Demaille <akim@epita.fr>
17871
17872 * src/files.c (output_files): Free the output_obstack.
17873 * src/main.c (main): Call print and print_graph conditionally.
17874 * src/print.c (print): Work unconditionally.
17875 * src/print_graph.c (print_graph): Work unconditionally.
17876 * src/conflicts.c (log_resolution): Output only if verbose_flag.
17877
fbc8ecb7
MA
178782001-12-16 Marc Autret <autret_m@epita.fr>
17879
17880 * src/output.c (actions_output): Fix. When we use %no-lines,
17881 there is one less line per action.
17882
f0440388
MA
178832001-12-16 Marc Autret <autret_m@epita.fr>
17884
17885 * src/bison.simple: Remove a useless #line directive.
17886 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
17887 * src/output.c (get_lines_number): New.
776209d6 17888 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
17889 output muscles.
17890 Fix line numbering.
17891 (actions_output): Computes the number of lines taken by actions.
17892 (output_master_parser): Insert new skeleton which is the name of
17893 the output parser file name.
17894
a79986b8
MA
178952001-12-15 Marc Autret <autret_m@epita.fr>
17896
17897 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
17898
4ec8e00f
MA
178992001-12-15 Marc Autret <autret_m@epita.fr>
17900
17901 * src/output.c (output_gram): Keep track of the hairy one.
17902
1a4648ff
AD
179032001-12-15 Akim Demaille <akim@epita.fr>
17904
17905 Make `make distcheck' work.
17906
17907 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
17908 system.h which uses libgettext.h.
17909
9c2c67e6
AD
179102001-12-15 Akim Demaille <akim@epita.fr>
17911
17912 * src/nullable.c (set_nullable): Useless rules must be skipped,
17913 otherwise, since we range over their symbols, we might look at a
17914 nonterminal which no longer ``exists'', i.e., it is not counted in
17915 `nvars', hence we overflow our arrays.
17916
93ede233
AD
179172001-12-15 Akim Demaille <akim@epita.fr>
17918
17919 The header can also be produced directly, without any obstack!
17920 Yahoo!
17921
17922 * src/files.c, src/files.h (defines_obstack): Remove.
17923 (compute_header_macro): Global.
17924 (defines_obstack_save): Remove.
17925 * src/reader.c (parse_union_decl): No longer output to
17926 defines_obstack: its content can be found in the `stype' muscle
17927 anyway.
17928 (output_token_translations): Merge into...
17929 (symbols_output): this.
17930 Rename as...
17931 (symbols_save): this.
17932 (reader): Adjust.
17933 * src/output.c (header_output): New.
17934 (output): Call it.
17935
2666f928
AD
179362001-12-15 Akim Demaille <akim@epita.fr>
17937
17938 * src/reader.c (parse_union_decl): Instead of handling two obstack
17939 simultaneously, use one to define the `stype' muscle, and use the
17940 value of the latter to fill defines_obstack.
17941 (copy_comment): Remove.
17942 (copy_comment2): Work for a single obstack.
17943 Rename as...
17944 (copy_comment): this.
17945
428046f8
AD
179462001-12-15 Akim Demaille <akim@epita.fr>
17947
17948 * src/lex.c, src/lex.h (xgetc): No longer static.
17949 * src/reader.c (parse_union_decl): Revamp.
17950
ea52d706
AD
179512001-12-15 Akim Demaille <akim@epita.fr>
17952
17953 Still making progress in separating Bison into (i) input, (ii)
17954 process, (iii) output: now we can directly output the parser file
17955 without using table_obstack at all.
17956
17957 * src/files.c, src/files.h (table_obstack): Bye bye.
17958 (parser_file_name): New.
17959 * src/files.c (compute_output_file_names): Compute it.
17960 * src/output.c (actions_output, output_parser)
17961 (output_master_parser): To a file instead of an obstack.
17962
3f96f4dc
AD
179632001-12-15 Akim Demaille <akim@epita.fr>
17964
17965 Attach actions to rules, instead of pre-outputting them to
17966 actions_obstack.
17967
17968 * src/gram.h (rule_t): action and action_line are new members.
17969 * src/reader.c (symbol_list): Likewise.
17970 (copy_action): Save the actions within the rule.
17971 (packgram): Save them in rule_table.
17972 * src/output.c (actions_output): New.
17973 (output_parser): Use it on `%%actions'.
17974 (output_rule_data): Don't free rule_table.
17975 (output): Do it.
17976 (prepare): Don't save the `action' muscle.
17977 * src/bison.simple: s/%%action/%%actions/.
17978
51576fb3
AD
179792001-12-15 Akim Demaille <akim@epita.fr>
17980
17981 * src/reader.c (copy_action): When --yacc, don't append a `;'
17982 to the user action: let it fail if lacking.
dee049eb 17983 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 17984
2648a72d
AD
179852001-12-14 Akim Demaille <akim@epita.fr>
17986
17987 * src/lex.c (literalchar): Simply return the char you decoded, non
17988 longer mess around with obstacks and int pointers.
17989 Adjust all callers.
17990
92790e5b
AD
179912001-12-14 Akim Demaille <akim@epita.fr>
17992
17993 * src/lex.c (literalchar): Don't escape the special characters,
17994 just decode them, and keep them as char (before, eol was output as
17995 the 2 char string `\n' etc.).
17996 * src/output.c (output_rule_data): Use quotearg to output the
17997 token strings.
17998
927c1557
PE
179992001-12-13 Paul Eggert <eggert@twinsun.com>
18000
18001 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
18002 Do not infringe on the global user namespace when using C++.
18003 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
18004 All uses of `fprintf' and `stderr' changed.
18005
18006 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
18007
ed8e1f68
AD
180082001-12-13 Akim Demaille <akim@epita.fr>
18009
18010 The computation of nullable is broken: it doesn't handle empty
18011 RHS's properly.
18012
18013 * tests/torture.at (GNU AWK Grammar): New.
18014 * tests/sets.at (Nullable): New.
18015 * src/nullable.c (set_nullable): Instead of blindly looping over
18016 `ritems', loop over the rules, and then over their rhs's.
18017
18018 Work around Autotest bugs.
18019
18020 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
18021 frame, because Autotest understand lines starting with a `+' as
18022 traces from the shell. Then, they are not processed properly.
18023 Admittedly an Autotest bug, but we don't have time to wait for
18024 Autotest to catch up.
18025 * tests/regression.at (Broken Closure): Adjust to the new table
18026 frames.
18027 Move to...
18028 * tests/sets.at: here.
18029
cb581495
AD
180302001-12-13 Akim Demaille <akim@epita.fr>
18031
18032 * src/closure.c (closure): Use nrules instead of playing tricks
18033 with BITS_PER_WORD.
18034
2e729273
AD
180352001-12-13 Akim Demaille <akim@epita.fr>
18036
18037 * src/print.c (print_actions): Output the handling of `$' as the
18038 traces do: shifting the token EOF. Before EOF was treated as a
18039 nonterminal.
18040 * tests/regression.at: Adjust some tests.
18041 * src/print_graph.c (print_core): Complete the set of items via
18042 closure. The next-to-final and final states are still unsatisfying,
18043 but that's to be addressed elsewhere.
18044 No longer output the rule numbers, but do output the state number.
18045 A single loop for the shifts + gotos is enough, but picked a
18046 distinct color for each.
18047 (print_graph): Initialize and finalize closure.
18048
107f7dfb
AD
180492001-12-13 Akim Demaille <akim@epita.fr>
18050
18051 * src/reader.c (readgram): Remove dead code, an strip useless
18052 braces.
18053 (get_type): Remove, unused.
18054
9b53a24f
AD
180552001-12-12 Akim Demaille <akim@epita.fr>
18056
18057 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
18058 on that of lib/error.c.
18059
dbfb6dcd
AD
180602001-12-12 Akim Demaille <akim@epita.fr>
18061
18062 Some hosts don't like `/' in includes.
18063
18064 * src/system.h: Include libgettext.h without qualifying the path.
18065 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
18066 $(top_srcdir).
18067
c25fb648
MA
180682001-12-11 Marc Autret <autret_m@epita.fr>
18069
18070 * src/output.c (output_parser): Remove useless muscle.
18071
710ddc4f
MA
180722001-12-11 Marc Autret <autret_m@epita.fr>
18073
18074 * src/bison.simple: Remove #line just before %%epilogue. It
18075 is now handled in ...
18076 * src/reader.c (read_additionnal_code): Add the output of a
18077 #line for the epilogue.
18078
e83d80b8
MA
180792001-12-10 Marc Autret <autret_m@epita.fr>
18080
927c1557 18081 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
18082 replace precedent remove.
18083 * src/bison.simple: Remove #line before %%prologue because
18084 %%input-line is wrong at this time.
18085
971d5158
MA
180862001-12-10 Marc Autret <autret_m@epita.fr>
18087
18088 * src/reader.c (symbols_output): Clean up.
927c1557 18089 * src/output.c (output_gram, output): Clean up.
971d5158 18090
5edafffd
AD
180912001-12-10 Akim Demaille <akim@epita.fr>
18092
18093 * src/lalr.c (initialize_lookaheads): New. Extracted from...
18094 * src/LR0.c (set_state_table): here.
18095 * src/lalr.c (lalr): Call it.
18096
0279f8e9
AD
180972001-12-10 Akim Demaille <akim@epita.fr>
18098
18099 * src/state.h (shifts): Remove the `number' member: shifts are
18100 attached to state, hence no longer need to be labelled with a
18101 state number.
18102
190c4f5f
AD
181032001-12-10 Akim Demaille <akim@epita.fr>
18104
18105 Now that states have a complete set of members, the linked list of
18106 shifts is useless: just fill directly the state's shifts member.
18107
18108 * src/state.h (shifts): Remove the `next' member.
18109 * src/LR0.c (first_state, last_state): Remove.
18110 Adjust the callers.
18111 (augment_automaton): Don't look for the shifts that must be added
18112 a shift on EOF: it is those of the state we looked for! But now,
18113 since shifts are attached, it is no longer needed to looking
18114 merely by its id: its number.
18115
2a73b93d
AD
181162001-12-10 Akim Demaille <akim@epita.fr>
18117
18118 * src/LR0.c (augment_automaton): Better variable locality.
18119 Remove an impossible branch: if there is a state corresponding to
18120 the start symbol being shifted, then there is shift for the start
18121 symbol from the initial state.
18122
74392f6a
AD
181232001-12-10 Akim Demaille <akim@epita.fr>
18124
18125 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
18126 only when appropriate: when insert_start_shifting_state' is not
18127 invoked.
18128 * tests/regression.at (Rule Line Numbers): Adjust.
18129
37c82725
AD
181302001-12-10 Akim Demaille <akim@epita.fr>
18131
18132 * src/LR0.c (augment_automaton): Now that all states have shifts,
18133 merge the two cases addition shifts to the initial state.
18134
6a164e0c
AD
181352001-12-10 Akim Demaille <akim@epita.fr>
18136
18137 * src/lalr.c (set_state_table): Move to...
18138 * src/LR0.c: here.
18139 * src/lalr.c (lalr): Don't call it...
18140 * src/LR0.c (generate_states): do it.
18141 * src/LR0.h (first_state): Remove, only the table is used.
18142
7215de24
AD
181432001-12-10 Akim Demaille <akim@epita.fr>
18144
18145 * src/LR0.h (first_shift, first_reduction): Remove.
18146 * src/lalr.c: Don't use first_shift: find shifts through the
18147 states.
18148
80e25d4d
AD
181492001-12-10 Akim Demaille <akim@epita.fr>
18150
18151 * src/LR0.c: Attach shifts to states as soon as they are
18152 computed.
18153 * src/lalr.c (set_state_table): Instead of assigning shifts to
18154 state, just assert that the mapping was properly done.
18155
0ab3728b
AD
181562001-12-10 Akim Demaille <akim@epita.fr>
18157
18158 * src/LR0.c (insert_start_shift): Rename as...
18159 (insert_start_shifting_state): this.
18160 (insert_eof_shifting_state, insert_accepting_state): New.
18161 (augment_automaton): Adjust.
18162 Better locality of the variables.
18163 When looking if the start_symbol is shifted from the initial
18164 state, using `while (... symbol != start_symbol ...)' sounds
18165 better than `while (... symbol < start_symbol ...)': If fail
18166 to see how the order between symbols could be relevant!
18167
78af9bbc
AD
181682001-12-10 Akim Demaille <akim@epita.fr>
18169
18170 * src/getargs.h: Don't declare `spec_name_prefix' and
18171 `spec_file_prefix', declared by src/files.h.
18172 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
18173 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
18174 * src/output.c (prepare): Adjust.
18175 * src/reader.c (symbols_output): Likewise.
18176 * src/vmsgetargs.c: Vaguely adjust, but who cares?
18177
bdef2a41
AD
181782001-12-10 Akim Demaille <akim@epita.fr>
18179
18180 * src/muscle_tab.c (muscle_init): NULL is a better default than
18181 `"0"'.
18182
3735969c
AD
181832001-12-10 Akim Demaille <akim@epita.fr>
18184
18185 * src/reader.c (reader): Calling symbols_output once is enough.
18186
49701457
AD
181872001-12-10 Akim Demaille <akim@epita.fr>
18188
18189 Now that states have a complete set of members, the linked list of
18190 reductions is useless: just fill directly the state's reductions
18191 member.
18192
18193 * src/state.h (struct reductions): Remove member `number' and
18194 `next'.
18195 * src/LR0.c (first_reduction, last_reduction): Remove.
18196 (save_reductions): Don't link the new reductions, store them in
18197 this_state.
18198 * src/lalr.c (set_state_table): No need to attach reductions to
18199 states, it's already done.
18200 * src/output.c (output_actions): No longer free the shifts, then
18201 the reductions, then the states: free all the states and their
18202 members.
18203
0edad749
AD
182042001-12-10 Akim Demaille <akim@epita.fr>
18205
18206 * src/options.c (OPTN, DRTV, BOTH): New.
18207 (option_table): Use them.
18208
0edad749
AD
18209 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
18210 the job of system.h.
18211 * src/options.c: Don't include stdio.h and xalloc.h for the same
18212 reasons.
18213
5449dd0f
AD
182142001-12-10 Akim Demaille <akim@epita.fr>
18215
18216 * src/output.c (output, prepare): Make sure the values of the
18217 muscles `action' and `prologue' are 0-terminated.
18218
a870c567
AD
182192001-12-10 Akim Demaille <akim@epita.fr>
18220
18221 Clean up GCC warnings.
18222
18223 * src/reader.c (copy_action): `buf' is not used.
18224 (parse_skel_decl): Be static.
18225 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
18226 * src/options.h (create_long_option_table): Have a real prototype.
18227 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
18228 (hash_delete_at): Return const void *.
18229 Adjust casts to preserve the const.
18230
80df8768
AD
182312001-12-10 Akim Demaille <akim@epita.fr>
18232
18233 * configure.in: Require 2.52g.
18234 M4 is not needed, but AUTOM4TE is.
18235 * m4/m4.m4: Remove.
18236 * tests/Makefile.am: Adjust.
18237
f693ad14
AD
182382001-12-10 Akim Demaille <akim@epita.fr>
18239
18240 One structure for states is enough, even though theoretically
18241 there are LR(0) states and LALR(1) states.
18242
18243 * src/lalr.h (state_t): Remove.
18244 (state_table): Be state_t **, not state_t *.
18245 * src/state.h (core, CORE_ALLOC): Rename as...
18246 (state_t, STATE_ALLOC): this.
18247 Add the LALR(1) members: shifts, reductions, errs.
18248 * src/LR0.c (state_table): Rename as...
18249 (state_hash): this, to avoid name clashes with the global
18250 `state_table'.
18251 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
18252 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
18253
74ffbcb6
AD
182542001-12-10 Akim Demaille <akim@epita.fr>
18255
18256 Bison dumps core on bash.y.
18257 Reported by Pascal Bart.
18258
18259 * src/warshall.c (bitmatrix_print): New.
18260 (TC): Use it.
ba0fe3c7 18261 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
74ffbcb6
AD
18262 j must be the outer loop.
18263 * tests/regression.at (Broken Closure): New.
18264
07708e19
AD
182652001-12-05 Akim Demaille <akim@epita.fr>
18266
18267 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
18268 its argument.
ba1ecc07 18269 Reported by Peter Hamorsky.
07708e19 18270
92b16366
AD
182712001-12-05 Akim Demaille <akim@epita.fr>
18272
18273 * src/conflicts.c (err_table): Remove.
18274 (resolve_sr_conflict): Adjust.
18275 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
18276 Rename as...
18277 (state_t.reductions, state_t.shifts): this.
18278
076ab033
AD
182792001-12-05 Akim Demaille <akim@epita.fr>
18280
18281 * src/reduce.c (reduce_grammar_tables): No longer disable the
18282 removal of useless rules via CPP but via `if (0)', so that the
18283 compiler still check the code is valid.
18284 For instance, it should have noticed `rline' no longer exists: use
18285 the `line' member of rule_t.
18286 * src/gram.c (dummy, rline): Remove, unused.
18287
3843c413
AD
182882001-12-05 Akim Demaille <akim@epita.fr>
18289
18290 * src/output.c (pack_vector): Use assert, not berror.
18291 * src/main.c (berror): Remove, unused.
18292
43168960
AD
182932001-12-05 Akim Demaille <akim@epita.fr>
18294
18295 New experimental feature: if --verbose --trace output all the
18296 items of a state, not only its kernel.
18297
18298 * src/print.c (print_core): If `trace_flag', then invoke closure
18299 before outputting the items of the state (print_core is no longer
18300 a correct name them).
18301 (print_results): Invoke new_closure/free_closure if needed.
18302
b2872512
AD
183032001-12-05 Akim Demaille <akim@epita.fr>
18304
18305 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
18306 * src/closure.c, src/closure.h (itemsetsize): Rename as...
18307 (nitemset): for consistency with the rest of the project.
18308
23cbcc6c
AD
183092001-12-05 Akim Demaille <akim@epita.fr>
18310
18311 * src/closure.c (print_closure): Improve.
18312 (closure): Use it for printing input and output.
18313
03ec521c
AD
183142001-12-05 Akim Demaille <akim@epita.fr>
18315
18316 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
18317 indexed by nonterminals.
18318
3a7456dd
AD
183192001-12-05 Akim Demaille <akim@epita.fr>
18320
18321 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
18322 what it was!).
18323 * src/warshall.h: Remove accidental duplication of the content.
18324
1cbcf2e7
AD
183252001-12-05 Akim Demaille <akim@epita.fr>
18326
18327 * src/closure.c (set_fderives): De-obfuscate.
18328
84182270
AD
183292001-12-05 Akim Demaille <akim@epita.fr>
18330
18331 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
18332
3f6f053c
AD
183332001-12-05 Akim Demaille <akim@epita.fr>
18334
18335 * src/closure.c (set_firsts): De-obfuscate.
18336
7a5350ba
AD
183372001-12-05 Akim Demaille <akim@epita.fr>
18338
18339 * src/output.c (action_row): De-obfuscate
18340 using the good o' techniques: arrays not pointers, variable
18341 locality, BITISSET, RESETBIT etc.
18342
d954473d
AD
183432001-12-05 Akim Demaille <akim@epita.fr>
18344
18345 Pessimize the code to simplify it: from now on, all the states
18346 have a valid SHIFTS, which NSHIFTS is possibly 0.
18347
18348 * src/LR0.c (shifts_new): Be global and move to..
18349 * src/state.c, src/state.h: here.
18350 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
18351 * src/print_graph: Adjust.
18352
9839bbe5
AD
183532001-12-05 Akim Demaille <akim@epita.fr>
18354
18355 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
18356 * src/conflicts.c: Use it.
18357 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
18358 incorrectly ``simplified''.
18359
9f136c07
AD
183602001-12-05 Akim Demaille <akim@epita.fr>
18361
18362 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
18363 using the good o' techniques: arrays not pointers, variable
18364 locality, BITISSET, RESETBIT etc.
18365
b608206e
AD
183662001-12-05 Akim Demaille <akim@epita.fr>
18367
18368 * src/state.h (SHIFT_SYMBOL): New.
18369 * src/conflicts.c: Use it to deobfuscate.
18370
52afa962
AD
183712001-12-05 Akim Demaille <akim@epita.fr>
18372
18373 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
18374 (print_reductions): De-obfuscate using the good o' techniques:
18375 arrays not pointers, variable locality, BITISSET.
18376
e74dc321
AD
183772001-12-05 Akim Demaille <akim@epita.fr>
18378
18379 * src/conflicts.c (print_reductions): Arrays, not pointers.
18380 Use BITISSET.
18381
768fca83
AD
183822001-12-05 Akim Demaille <akim@epita.fr>
18383
18384 * src/conflicts.c (print_reductions): Pessimize, but clarify.
18385
a17e599f
AD
183862001-12-05 Akim Demaille <akim@epita.fr>
18387
18388 * src/conflicts.c (print_reductions): Improve variable locality.
18389
a04bc341
AD
183902001-12-05 Akim Demaille <akim@epita.fr>
18391
18392 * src/conflicts.c (print_reductions): Pessimize, but clarify.
18393
c8ea038e
AD
183942001-12-05 Akim Demaille <akim@epita.fr>
18395
18396 * src/conflicts.c (print_reductions): Improve variable locality.
18397
aa2aab3c
AD
183982001-12-05 Akim Demaille <akim@epita.fr>
18399
18400 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
18401 * src/lalr.c: Use them.
18402
b178c8cc
AD
184032001-12-05 Akim Demaille <akim@epita.fr>
18404
18405 * src/LR0.c (augment_automaton): Formatting changes.
18406 Better variable locality.
18407
f67d13aa
AD
184082001-12-05 Akim Demaille <akim@epita.fr>
18409
18410 * src/lalr.c (matrix_print): New.
18411 (transpose): Use it.
18412 Use arrays instead of pointers.
18413
c2713865
AD
184142001-12-05 Akim Demaille <akim@epita.fr>
18415
18416 * src/lalr.c (maxrhs): Move to...
18417 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
18418 * src/lalr.c (build_relations): Adjust.
18419
9887c18a
AD
184202001-12-05 Akim Demaille <akim@epita.fr>
18421
18422 * src/lalr.c (transpose): Free the memory allocated to the
18423 argument, as it is replaced by the results by the unique caller.
18424 (build_relations): Merely invoke transpose: it handles the memory
18425 deallocation.
18426 Improve variable locality.
18427 Avoid variables used as mere abbreviations.
18428 (compute_lookaheads): Use arrays instead of pointers.
18429
4d4f699c
AD
184302001-12-05 Akim Demaille <akim@epita.fr>
18431
18432 * src/lalr.c (initialize_F): Improve variable locality.
18433 Avoid variables used as mere abbreviations.
18434
80a69750
AD
184352001-12-05 Akim Demaille <akim@epita.fr>
18436
18437 * src/derives.c (print_derives): Display the ruleno.
18438 * src/lalr.c (initialize_F, transpose): Better variable locality
18439 to improve readability.
18440 Avoid variables used as mere abbreviations.
18441
fe961097
AD
184422001-12-05 Akim Demaille <akim@epita.fr>
18443
18444 * src/lalr.c (traverse): Use arrays instead of pointers.
18445
e3e4e814
AD
184462001-12-05 Akim Demaille <akim@epita.fr>
18447
18448 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
18449 the handling of squeue.
18450 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
18451
630e182b
AD
184522001-12-05 Akim Demaille <akim@epita.fr>
18453
18454 Because useless nonterminals are now kept alive (instead of being
18455 `destroyed'), we now sometimes examine them, and store information
18456 related to them. Hence we need to know their number, and adjust
18457 memory allocations.
18458
18459 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
18460 static.
18461 * src/LR0.c (allocate_itemsets): The memory allocated to
18462 `symbol_count' was used for two different purpose: once to count
18463 the number of occurrences of each symbol, and later reassigned to
18464 `shift_symbol', containing the symbol that can be shifted from a
18465 given state.
18466 Deobfuscate, i.e., allocate, use and free `symbol_count' here
18467 only, and...
18468 (new_itemsets): Allocate `shift_symbol' here.
18469 (allocate_itemsets): symbol_count includes useless nonterminals.
18470 Make room for them.
18471 (free_storage): Use `free', not `XFREE', for pointers that cannot
18472 be null.
18473
81b51460
AD
184742001-12-05 Akim Demaille <akim@epita.fr>
18475
18476 * src/nullable.c (set_nullable): Deobfuscate the handling of
18477 ritem.
18478 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
18479
3067fbef
AD
184802001-12-05 Akim Demaille <akim@epita.fr>
18481
18482 * src/gram.c, src/gram.h (ritem_print): New.
18483 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
18484 (This useless function was defined only to work around VMS linkers
18485 that can't handle compilation units with variables only).
18486 * src/reduce.c (dump_grammar): Use it to trace the construction of
18487 ritem.
18488
c2bea5f9
PE
184892001-12-04 Paul Eggert <eggert@twinsun.com>
18490
7d27c823
PE
18491 * src/bison.simple (union yyalloc): Change member names
18492 to be the same as the stack names.
18493 (yyparse): yyptr is now union yyalloc *, not char *.
18494 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
18495 and may generate better code on some machines.
c2bea5f9
PE
18496 (yystpcpy): Use prototype if __STDC__ is defined, not just
18497 if __cplusplus is defined.
35687a9d 18498
2c8a9dfa
AD
184992001-11-30 Akim Demaille <akim@epita.fr>
18500
18501 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
18502 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
18503 Gettext doesn't compile cleanly, and dies with -Werror.
18504 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
18505 Include WARNING_CFLAGS here.
18506 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
18507 before being defined.
18508
f4e421e6
AD
185092001-11-27 Paul Eggert <eggert@twinsun.com>
18510
18511 * lib/quotearg.h (quotearg_n, quotearg_n_style):
18512 First arg is int, not unsigned.
18513 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
18514 (SIZE_MAX, UINT_MAX): New macros.
18515 (quotearg_n_options): Abort if N is negative.
18516 Avoid overflow check on hosts where size_t is 64 bits and int
18517 is 32 bits, as overflow is impossible there.
18518 Fix off-by-one typo that caused unnecessary reallocation.
18519
7093d0f5
AD
185202001-11-29 Paul Eggert <eggert@twinsun.com>
18521
18522 Name space cleanup in generated parser.
18523
18524 * doc/bison.texinfo (Bison Parser): Discuss system headers
18525 and their effect on the user name space.
18526
18527 * src/bison.simple:
18528 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
18529 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
18530 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
18531
18532 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
18533 on user names when possible.
18534
18535 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
18536 Simplify test for whather <alloca.h> exists.
18537
18538 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
18539
18540 (<stdio.h>): Include if YYDEBUG.
18541
18542 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
18543 ! defined (yyoverflow) && ! defined (yymemcpy).
18544
18545 (yymemcpy, yyparse): Rename local variables as needed so that
18546 they all begin with 'yy'.
18547
18548 (yystrlen, yystpcpy): New functions.
18549
18550 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
18551 All uses changed.
18552
18553 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
18554 instead of relying on string.h functions. Use YYSTACK_ALLOC
18555 and YYSTACK_FREE instead of malloc and free.
18556
fd51e5ff
AD
185572001-11-30 Akim Demaille <akim@epita.fr>
18558
18559 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
18560 before their first uses.
18561 (YYBISON, YYPURE): Move to the top of the output.
18562
7d13ff5f
AD
185632001-11-30 Akim Demaille <akim@epita.fr>
18564
18565 * tests/reduce.at (Useless Nonterminals): Fix.
18566
892a3995
AD
185672001-11-30 Akim Demaille <akim@epita.fr>
18568
18569 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
18570 if body instead of `;' to pacify GCC's warnings.
18571
68f1e3ed
AD
185722001-11-30 Akim Demaille <akim@epita.fr>
18573
18574 Instead of mapping the LHS of unused rules to -1, keep the LHS
18575 valid, but flag the rules as invalid.
18576
18577 * src/gram.h (rule_t): `useful' is a new member.
18578 * src/print.c (print_grammar): Adjust.
18579 * src/derives.c (set_derives): Likewise.
18580 * src/reader.c (packgram, reduce_output): Likewise.
18581 * src/reduce.c (reduce_grammar_tables): Likewise.
18582 * tests/reduce.at (Underivable Rules, Useless Rules): New.
18583
d2d1b42b
AD
185842001-11-30 Akim Demaille <akim@epita.fr>
18585
18586 * src/reduce.c (reduce_output): Formatting changes.
18587 * src/print.c (print_results, print_grammar): Likewise.
18588 * tests/regression.at (Rule Line Numbers)
18589 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
18590
760b53a8
AD
185912001-11-30 Akim Demaille <akim@epita.fr>
18592
18593 * src/reduce.c (nonterminals_reduce): Instead of throwing away
18594 useless nonterminals, move them at the end of the symbol arrays.
18595 (reduce_output): Adjust.
18596 * tests/reduce.at (Useless Nonterminals): Adjust.
18597
00238958
AD
185982001-11-30 Akim Demaille <akim@epita.fr>
18599
18600 * src/reduce.c: Various comment/formatting changes.
18601 (nonterminals_reduce): New, extracted from...
18602 (reduce_grammar_tables): here.
18603 (reduce_grammar): Call nonterminals_reduce.
18604
396452de
PE
186052001-11-29 Paul Eggert <eggert@twinsun.com>
18606
18607 * src/bison.simple (YYSTACK_REALLOC): Remove.
18608 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
18609 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
18610 New macros.
18611 (union yyalloc): New type.
18612 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
18613 an arbitrary restriction on hosts where size_t is wider than int.
18614
18615 (yyparse): Don't dump core if alloca or malloc fails; instead, report
18616 a parser stack overflow. Allocate just one block of memory for all
18617 three stacks, instead of allocating three blocks; this typically is
18618 faster and reduces fragmentation.
18619
18620 Do not limit the number of items in the stack to a value that fits
18621 in 'int', as this is an arbitrary limit on hosts with 64-bit
18622 size_t and 32-bit int.
18623
147e184c
MA
186242001-11-29 Marc Autret <autret_m@epita.fr>
18625
18626 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
18627 of defining YYERROR_VERBOSE.
18628 [AT_DATA]: $4 is now out of C declarations in the prologue.
18629
426cf563
MA
186302001-11-28 Marc Autret <autret_m@epita.fr>
18631
18632 * src/reader.c (parse_dquoted_param): New.
18633 (parse_skel_decl): Use it.
18634 * src/lex.h: Add its prototype.
18635 * src/lex.c (literalchar): Become not static.
18636
c7925b99
MA
186372001-11-28 Marc Autret <autret_m@epita.fr>
18638
18639 * src/output.h: And put its extern declaration here.
18640 * src/output.c (error_verbose): Define here.
18641 (prepare): Echo name modification.
18642 * src/getargs.h: Clean its extern declaration.
18643 * src/getargs.c (error_verbose_flag): Remove.
18644 (getargs): Remove case 'e'.
18645 * src/options.c (option_table): 'error-verbose' is now seen as simple
18646 percent option.
18647 Include output.h.
18648
18649 * src/reader.c (read_declarations): Remove case tok_include.
18650 (parse_include_decl): Remove.
18651 * src/lex.h (token_t): Remove tok_include.
18652 * src/options.c (option_table): 'include' is now a simple command line
18653 option.
18654
5b5d1929
MA
186552001-11-28 Marc Autret <autret_m@epita.fr>
18656
18657 * src/bison.simple: Adjust muscle names.
18658 * src/muscle_tab.c (muscle_init): Also rename the muscles.
18659 * src/output.c (prepare): s/_/-/ for the muscles names.
18660 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
18661
8850be4b
MA
186622001-11-28 Marc Autret <autret_m@epita.fr>
18663
18664 * src/bison.simple: Fix debug.
18665 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
18666
4a38e613
AD
186672001-11-28 Akim Demaille <akim@epita.fr>
18668
18669 * src/LR0.c (shifts_new): New.
18670 (save_shifts, insert_start_shift, augment_automaton): Use it.
18671
4b35e1c1
AD
186722001-11-28 Akim Demaille <akim@epita.fr>
18673
18674 * src/closure.c (closure): `b' and `ruleno' denote the same value:
18675 keep ruleno only.
18676
d2b04478
AD
186772001-11-28 Akim Demaille <akim@epita.fr>
18678
18679 * src/closure.c (closure): Instead of looping over word in array
18680 then bits in words, loop over bits in array.
18681
2c4c30aa
AD
186822001-11-28 Akim Demaille <akim@epita.fr>
18683
18684 * src/closure.c (closure): No longer optimize the special case
18685 where all the bits of `ruleset[r]' are set to 0, to make the code
18686 clearer.
18687
576890b7
AD
186882001-11-28 Akim Demaille <akim@epita.fr>
18689
18690 * src/closure.c (closure): `r' and `c' are new variables, used to
18691 de-obfuscate accesses to RULESET and CORE.
18692
cb487d7d
AD
186932001-11-28 Akim Demaille <akim@epita.fr>
18694
18695 * src/reduce.c (reduce_print): Use ngettext.
18696 (dump_grammar): Improve the trace accuracy.
18697
6013d43f
AD
186982001-11-28 Akim Demaille <akim@epita.fr>
18699
18700 * src/reduce.c (dump_grammar): Don't translate trace messages.
18701
cb4956ee
AD
187022001-11-28 Akim Demaille <akim@epita.fr>
18703
18704 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
18705 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
18706 as all tags are free'ed afterwards.
18707 From Enrico Scholz.
18708
648185ab
PE
187092001-11-27 Paul Eggert <eggert@twinsun.com>
18710
18711 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
18712 use alloca when we didn't want to, and vice versa.
18713
68254a03
MA
187142001-11-27 Marc Autret <autret_m@epita.fr>
18715
9113b58f
AD
18716 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
18717 initialization.
68254a03
MA
18718 * src/output.c (prepare): Remove its update.
18719
04d843a2
MA
187202001-11-27 Marc Autret <autret_m@epita.fr>
18721
18722 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
18723 Use %error-verbose.
18724
d2079671 187252001-11-27 Marc Autret <autret_m@epita.fr>
eeeb962b
MA
18726
18727 * src/bison.simple: Remove YYERROR_VERBOSE using.
18728 Use %%error_verbose.
18729 (yyparse): Likewise.
18730 * src/output.c (prepare): Give its final value.
18731 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
18732 * src/getargs.h: Add its extern declaration.
18733 * src/getargs.c (error_verbose_flag): New int.
18734 (getargs): Update to catch new case.
18735 * src/options.c (option_table): 'error-verbose' is a new option.
18736 (shortopts): Update.
18737
e0327bc8
AD
187382001-11-27 Akim Demaille <akim@epita.fr>
18739
18740 * src/system.h: Use intl/libgettext.h.
18741 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
18742
000f1a3c
AD
187432001-11-27 Akim Demaille <akim@epita.fr>
18744
18745 * tests/torture.at (Exploding the Stack Size with Malloc):
18746 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
18747
26cfe0be
AD
187482001-11-27 Akim Demaille <akim@epita.fr>
18749
18750 * src/files.c: Include error.h.
18751 Reported by Hans Aberg.
18752
f6bd5427
MA
187532001-11-26 Marc Autret <autret_m@epita.fr>
18754
d2079671 18755 * src/reader.c (parse_include_decl): New, not yet implemented.
f6bd5427
MA
18756 (read_declarations): Add case tok_include.
18757 * src/getargs.h (include): Add its extern definition.
18758 * src/getargs.c (include): New const char *.
18759 (getargs): Add case '-I'.
18760 * src/options.c (option_table): Add include as command line and
18761 percent option.
18762 * src/lex.h (token_t): Add tok_include.
18763
2ca209c1
AD
187642001-11-26 Akim Demaille <akim@epita.fr>
18765
18766 * src/reader.c (readgram): Make sure rules for mid-rule actions
18767 have a lineno equal to that of their host rule.
18768 Reported by Hans Aberg.
18769 * tests/regression.at (Rule Line Numbers): New.
18770
0e41b407
AD
187712001-11-26 Akim Demaille <akim@epita.fr>
18772
18773 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
18774 size_ts.
18775
187762001-11-26 Akim Demaille <akim@epita.fr>
18777
18778 * src/complain.c, src/complain.h (error): Remove, provided by
18779 lib/error.[ch].
18780
e0c40012
AD
187812001-11-26 Akim Demaille <akim@epita.fr>
18782
18783 * src/reader.c (read_declarations): Don't abort on tok_illegal,
18784 issue an error message.
18785 * tests/regression.at (Invalid %directive): New.
18786 Reported by Hans Aberg.
18787
5e147124
AD
187882001-11-26 Akim Demaille <akim@epita.fr>
18789
18790 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
18791 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
18792
a034c8b8
AD
187932001-11-26 Akim Demaille <akim@epita.fr>
18794
18795 * src/conflicts.c (conflicts_print): Don't complain at all when
18796 there are no reduce/reduce conflicts, and as many shift/reduce
18797 conflicts as expected.
18798 * tests/regression.at (%expect right): Adjust.
18799
c64a20f3
AD
188002001-11-23 Akim Demaille <akim@epita.fr>
18801
18802 * lib/alloca.c: Update, from fileutils.
18803
5b0d29bb
AD
188042001-11-23 Akim Demaille <akim@epita.fr>
18805
18806 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
18807
722c4bfe
AD
188082001-11-23 Akim Demaille <akim@epita.fr>
18809
18810 * src/system.h: Include alloca.h.
18811 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
18812
6255b435
AD
188132001-11-23 Akim Demaille <akim@epita.fr>
18814
18815 * src/print_graph.c (print_actions): Remove `rule', unused.
18816 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
18817 pacify GCC's signed < unsigned warnings.
18818 * src/closure.c (itemsetsize): Likewise.
18819 * src/reader.c (symbol_list_new): Static.
18820
b29b2ed5
AD
188212001-11-23 Akim Demaille <akim@epita.fr>
18822
18823 Attaching lineno to buckets is stupid, since only one copy of each
18824 symbol is kept, only the line of the first occurrence is kept too.
18825
18826 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
18827 * src/reader.c (rline_allocated): Remove, unused.
18828 (symbol_list): Have a `line' member.
18829 (symbol_list_new): New.
18830 (readgram): Use it.
18831 * src/print.c (print_grammar): Output the rule line numbers.
18832 * tests/regression.at (Solved SR Conflicts)
18833 (Unresolved SR Conflicts): Adjust.
18834 Reported by Hans Aberg.
18835
a81b1d4a
MA
188362001-11-22 Marc Autret <autret_m@epita.fr>
18837
18838 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
18839
c1ecb3c1
MA
188402001-11-22 Marc Autret <autret_m@epita.fr>
18841
18842 * src/muscle_tab.c (muscle_init): Remove initialization of
18843 skeleton muscle.
18844 * src/output.c (output_master_parser): Do it here.
18845
fbe01355
AD
188462001-11-20 Akim Demaille <akim@epita.fr>
18847
18848 * po/sv.po: New.
18849 * configure.in (ALL_LINGUAS): Adjust.
18850 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
18851 longer contains strings to translate.
18852
81e895c0
AD
188532001-11-19 Akim Demaille <akim@epita.fr>
18854
18855 * src/conflicts.c (conflicts_print): Add a missing \n.
18856
6bb1878b
AD
188572001-11-19 Akim Demaille <akim@epita.fr>
18858
18859 * src/nullable.c (nullable_print): New.
18860 (set_nullable): Call it when tracing.
18861 Better locality of variables.
18862
d9ec2d07
AD
188632001-11-19 Akim Demaille <akim@epita.fr>
18864
18865 * src/print.c (print_actions): Better locality of variables.
18866
720e5c1b
AD
188672001-11-19 Akim Demaille <akim@epita.fr>
18868
18869 * src/derives.c (print_derives): Fix and enrich.
18870 * src/closure.c (print_fderives): Likewise.
18871
fb908786
AD
188722001-11-19 Akim Demaille <akim@epita.fr>
18873
18874 * src/closure.c (itemsetend): Remove, replaced with...
18875 (itemsetsize): new.
18876
125ecb56
AD
188772001-11-19 Akim Demaille <akim@epita.fr>
18878
18879 * src/LR0.c (kernel_end): Remove, replaced with...
18880 (kernel_size): new.
18881
d8cf039f
AD
188822001-11-19 Akim Demaille <akim@epita.fr>
18883
18884 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
18885 to clarify.
18886
7bec0760
AD
188872001-11-19 Akim Demaille <akim@epita.fr>
18888
18889 * src/closure.c (closure): Use arrays instead of pointers to clarify.
18890
c87d4863
AD
188912001-11-19 Akim Demaille <akim@epita.fr>
18892
18893 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
18894 trace messages.
18895 * src/LR0.c: Likewise.
18896 (allocate_itemsets): Use arrays instead of pointers to clarify.
18897
9bfe901c
AD
188982001-11-19 Akim Demaille <akim@epita.fr>
18899
18900 * src/getargs.c (statistics_flag): Replace with...
18901 (trace_flag): New.
18902 (longopts): Accept --trace instead of --statistics.
18903 * src/getargs.h, src/options.c: Adjust.
18904 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
18905 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
18906
97db7bd4
AD
189072001-11-19 Akim Demaille <akim@epita.fr>
18908
cc72668c 18909 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
97db7bd4
AD
18910 pointers to clarify the code.
18911 (save_reductions, save_shifts): Factor common parts of alternatives.
18912
2c5f66ed
AD
189132001-11-19 Akim Demaille <akim@epita.fr>
18914
18915 * src/LR0.c (new_state, get_state): Complete TRACE code.
18916 * src/closure.c: Include `reader.h' to get `tags', needed by the
18917 trace code.
18918 Rename the conditional DEBUG as TRACE.
18919 Output consistently TRACEs to stderr, not stdout.
18920 * src/derives.c: Likewise.
18921 * src/reduce.c: (inaccessable_symbols): Using if is better style
18922 than goto.
18923 Use `#if TRACE' instead of `#if 0' for tracing code.
18924
300f275f
AD
189252001-11-19 Akim Demaille <akim@epita.fr>
18926
18927 * src/system.h (LIST_FREE, shortcpy): New.
18928 * src/LR0.c: Use them.
18929 * src/output.c (free_itemsets, free_reductions, free_shifts):
18930 Remove, replaced by LIST_FREE.
18931
f59c437a
AD
189322001-11-19 Akim Demaille <akim@epita.fr>
18933
18934 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
18935 (REDUCTIONS_ALLOC): New.
18936 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
18937 allocation.
18938
6986fd9e
AD
189392001-11-19 Akim Demaille <akim@epita.fr>
18940
18941 * src/LR0.c (new_state): Complete trace code.
18942 * src/nullable.c (set_nullable): Don't translate traces.
18943
4bc30f78
AD
189442001-11-19 Akim Demaille <akim@epita.fr>
18945
18946 * src/print_graph.c (print_core): Better locality of variables.
18947 * src/print.c (print_core): Likewise.
18948
08a946e0
AD
189492001-11-19 Akim Demaille <akim@epita.fr>
18950
18951 * src/vcg.c: You do the output, so you are responsible of the
18952 handling of VCG syntax, in particular: use quotearg.
18953 * src/print_graph.c: Don't.
18954 (print_actions): Don't output the actions as part of the nodes,
18955 since that's the job of the edges.
18956 (print_state): Don't output by hand: fill the node description,
9bfe901c 18957 and ask for its output.
08a946e0 18958
f0473484
AD
189592001-11-19 Akim Demaille <akim@epita.fr>
18960
cc72668c
AD
18961 * src/bison.simple (yyparse): When verbosely reporting an error,
18962 no longer put additional quotes around token names.
f0473484
AD
18963 * tests/calc.at: Adjust.
18964
e41dc700
AD
189652001-11-19 Akim Demaille <akim@epita.fr>
18966
18967 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
18968 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
18969 * src/output.c: Adjust.
18970
652a871c
AD
189712001-11-19 Akim Demaille <akim@epita.fr>
18972
18973 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
18974 (rule_t): this.
18975 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
18976
b2ed6e58
AD
189772001-11-19 Akim Demaille <akim@epita.fr>
18978
18979 * src/gram.h (rule_t): New.
18980 (rule_table): New.
18981 (rrhs, rlhs): Remove, part of state_t.
18982 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
18983 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
18984 * src/reader.c, src/reduce.c: Adjust.
18985
edad7067
AD
189862001-11-19 Akim Demaille <akim@epita.fr>
18987
18988 * src/reader.c (symbols_output): New, extracted from...
18989 (packsymbols): Here.
18990 (reader): Call it.
18991
3feec034
AD
189922001-11-19 Akim Demaille <akim@epita.fr>
18993
18994 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
18995 (maxrhs): this new function.
18996
ddcd5fdf
AD
189972001-11-19 Akim Demaille <akim@epita.fr>
18998
cc72668c 18999 * src/lalr.c (F): New macro to access the variable F.
ddcd5fdf
AD
19000 Adjust.
19001
bb527fc2
AD
190022001-11-19 Akim Demaille <akim@epita.fr>
19003
cc72668c 19004 * src/lalr.h (LA): New macro to access the variable LA.
bb527fc2
AD
19005 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19006 * src/lalr.c: Adjust.
19007
a845a697
AD
190082001-11-19 Akim Demaille <akim@epita.fr>
19009
19010 * src/lalr.c (initialize_LA): Only initialize LA. Let...
19011 (set_state_table): handle the `lookaheads' members.
19012
f004bf6a
AD
190132001-11-19 Akim Demaille <akim@epita.fr>
19014
cc72668c
AD
19015 * src/lalr.h (lookaheads): Removed array, whose contents is now
19016 a member of...
f004bf6a
AD
19017 (state_t): this structure.
19018 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19019 Adjust.
19020
de326cc0
AD
190212001-11-19 Akim Demaille <akim@epita.fr>
19022
cc72668c
AD
19023 * src/lalr.h (consistent): Removed array, whose contents is now
19024 a member of...
de326cc0
AD
19025 (state_t): this structure.
19026 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19027 Adjust.
19028
90b4416b
AD
190292001-11-19 Akim Demaille <akim@epita.fr>
19030
cc72668c
AD
19031 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
19032 contents are now members of...
90b4416b
AD
19033 (state_t): this structure.
19034 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19035 Adjust.
19036
9703cc49
AD
190372001-11-19 Akim Demaille <akim@epita.fr>
19038
19039 * src/lalr.h (state_t): New.
19040 (state_table): Be a state_t * instead of a core **.
19041 (accessing_symbol): Remove, part of state_t.
19042 * src/lalr.c: Adjust.
19043 (set_accessing_symbol): Merge into...
19044 (set_state_table): this.
19045 * src/print_graph.c, src/conflicts.c: Adjust.
19046
d803322e
AD
190472001-11-14 Akim Demaille <akim@epita.fr>
19048
19049 * tests/calc.at, tests/output.at, tests/regression.at,
19050 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
19051 now the tests are run in private dirs, therefore AC_CLEANUP and
19052 family can be simplified to 0-ary.
19053 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
19054 use abs. path to find config.h.
19055 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
19056 stderr, there can be way too much random noise.
19057 Instead pass -Werror to GCC and rely on the exit status.
19058 Reported by Wolfram Wagner.
19059
3d76b07d
AD
190602001-11-14 Akim Demaille <akim@epita.fr>
19061
19062 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
19063 defined only if yyoverflow is defined, to avoid `warning: unused
19064 variable `yyvs1''.
19065 Reported by The Test Suite.
19066
09b503c8
AD
190672001-11-14 Akim Demaille <akim@epita.fr>
19068
19069 * src/print.c: Include reduce.h.
19070 Reported by Hans Aberg.
19071
190722001-11-14 Akim Demaille <akim@epita.fr>
19073
19074 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
19075 Revert a previous patch: these are really const.
19076 * src/conflicts.c (conflict_report): Additional useless pair of
19077 braces to pacify GCC's warnings for `if () if () {} else {}'.
19078 * src/lex.c (parse_percent_token): Replace equal_offset with
19079 arg_offset.
19080 arg is const.
19081 Be sure to strdup `arg' when used, since there is no reason for
19082 token_buffer not to change.
19083
0f37a994
AD
190842001-11-14 Akim Demaille <akim@epita.fr>
19085
19086 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
19087 definition.
19088 * src/main.c (main): Use them.
19089 Suggested by Hans Aberg.
19090
d39d93b8
AD
190912001-11-12 Akim Demaille <akim@epita.fr>
19092
19093 * src/system.h (ngettext): Now that we use ngettext, be sure to
19094 provide a default definition when NLS are not used.
19095
9edcd895
AD
190962001-11-12 Akim Demaille <akim@epita.fr>
19097
19098 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
19099 Use @kbd to denote user input.
19100 (Language and Grammar): ANSIfy the example.
19101 Adjust its layout for info/notinfo.
19102 (Location Tracking Calc): Output error messages to stderr.
19103 Output locations in a more GNUtically correct way.
19104 Fix a couple of Englishos.
19105 Adjust @group/@end group pairs.
19106
7da99ede
AD
191072001-11-12 Akim Demaille <akim@epita.fr>
19108
e3aa65c5 19109 %expect was not functioning at all.
7da99ede
AD
19110
19111 * src/conflicts.c (expected_conflicts): Set to -1.
19112 (conflict_report): Use ngettext.
19113 (conflicts_print): Check %expect and make its violation an error.
19114 * doc/bison.texinfo (Expect Decl): Adjust.
19115 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
19116 * tests/regression.at (%expect not enough, %expect right)
19117 (%expect too much): New.
19118
ba9dda1a
AD
191192001-11-12 Akim Demaille <akim@epita.fr>
19120
19121 * tests/regression.at (Conflicts): Rename as...
19122 (Unresolved SR Conflicts): this.
19123 (Solved SR Conflicts): New.
19124
337c5bd1
AD
191252001-11-12 Akim Demaille <akim@epita.fr>
19126
19127 * src/reduce.c (print_results): Rename as...
19128 (reduce_output): This.
19129 Output to OUT, passed as argument, instead of output_obstack.
19130 (dump_grammar): Likewise.
19131 (reduce_free): New.
19132 Also free V1.
19133 (reduce_grammar): No longer call reduce_output, since...
19134 * src/print.c (print_results): do it.
19135 * src/main.c (main): Call reduce_free;
19136
c73a41af
AD
191372001-11-12 Akim Demaille <akim@epita.fr>
19138
19139 * src/conflicts.c (print_reductions): Accept OUT as argument.
19140 Output to it, not to output_obstack.
19141 * src/print.c (print_actions): Adjust.
19142
0df87bb6
AD
191432001-11-12 Akim Demaille <akim@epita.fr>
19144
19145 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
19146 the result instead of using...
19147 (src_total, rrc_total, src_count, rrc_count): Remove.
19148 (any_conflicts): Remove.
19149 (print_conflicts): Split into...
19150 (conflicts_print, conflicts_output): New.
19151 * src/conflicts.h: Adjust.
19152 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
0f37a994 19153 * src/print.c (print_grammar): Issue `\n' between two rules.
0df87bb6
AD
19154 * tests/regression.at (Conflicts): New.
19155 Reported by Tom Lane.
19156
e4d3d4de
AD
191572001-11-12 Akim Demaille <akim@epita.fr>
19158
19159 * tests/regression.at (Invalid input): Remove, duplicate with
19160 ``Invalid input: 1''.
19161
6d7d248e
AD
191622001-11-12 Akim Demaille <akim@epita.fr>
19163
19164 * tests/torture.at (AT_DATA_STACK_TORTURE)
19165 (Exploding the Stack Size with Alloca)
19166 (Exploding the Stack Size with Malloc): New.
19167
e9e4c321
AD
191682001-11-12 Akim Demaille <akim@epita.fr>
19169
19170 * src/bison.simple (YYSTACK_REALLOC): New.
19171 (yyparse) [!yyoverflow]: Use it and free the old stack.
0f37a994 19172 Reported by Per Allansson.
e9e4c321 19173
5f7e0832
AD
191742001-11-12 Pascal Bart <pascal.bart@epita.fr>
19175
19176 * src/bison.simple: Define type yystype instead of YYSTYPE, and
19177 define CPP macro, which substitute YYSTYPE by yystype.
19178 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
19179 with yyltype/YYLTYPE. This allows inclusion of the generated
19180 header within the parser if the compiler, such as GGC, accepts
19181 multiple equivalent #defines.
19182 From Akim.
19183
e3f1699f
AD
191842001-11-05 Akim Demaille <akim@epita.fr>
19185
19186 * src/reader.c (symbols_output): New, extracted from...
19187 (packsymbols): here.
19188 (reader): Adjust.
19189
65be0866
AD
191902001-11-05 Akim Demaille <akim@epita.fr>
19191
19192 * src/lex.c (parse_percent_token): s/quotearg/quote/.
19193
e4d910bf
AD
191942001-11-05 Akim Demaille <akim@epita.fr>
19195
19196 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
19197 pattern.
19198
951366c1
AD
191992001-11-05 Akim Demaille <akim@epita.fr>
19200
19201 * src/options.h (struct option_table_struct): set_flags is void*.
19202 * src/options.c (longopts): Support `--output' and `%output'.
19203 (usage): Adjust.
19204 * src/lex.h (tok_setopt): Remove, replaced with...
19205 (tok_intopt, tok_stropt): these new guys.
19206 * src/lex.c (getopt.h): Not needed.
19207 (token_buffer, unlexed_token_buffer): Not const.
19208 (percent_table): Promote `-' over `_' in directive names.
19209 Active `%name-prefix', `file-prefix', and `output'.
19210 (parse_percent_token): Accept possible arguments to directives.
19211 Promote `-' over `_' in directive names.
19212
d8988b2f
AD
192132001-11-04 Akim Demaille <akim@epita.fr>
19214
19215 * doc/bison.texinfo (Decl Summary): Split the list into
19216 `directives for grammars' and `directives for bison'.
19217 Sort'em.
19218 Add description of `%name-prefix', `file-prefix', and `output'.
19219 Promote `-' over `_' in directive names.
19220 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
19221 Simplify the description of `--name-prefix'.
19222 Promote `-' over `_' in directive names.
19223 Promote `--output' over `--output-file'.
19224 Fix the description of `--defines'.
19225 * tests/output.at: Exercise %file-prefix and %output.
19226
6468d18e
AD
192272001-11-02 Akim Demaille <akim@epita.fr>
19228
19229 * doc/refcard.tex: Update.
19230
6b7e85b9
AD
192312001-11-02 Akim Demaille <akim@epita.fr>
19232
19233 * src/symtab.h (SUNDEF): New.
19234 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
19235 stand for `uninitialized', instead of 0.
19236 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
19237 * src/lex.c (lex): Adjust.
19238
19239 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
19240 Number it 0.
19241 Let yylex return it instead of a plain 0.
19242 Reported by Dick Streefland.
19243
cd5aafcf
AD
192442001-11-02 Akim Demaille <akim@epita.fr>
19245
19246 * tests/regression.at (Mixing %token styles): New test.
19247
037ca2f1
AD
192482001-11-02 Akim Demaille <akim@epita.fr>
19249
19250 * src/reader.c (parse_thong_decl): Formatting changes.
19251 (token_translations_init): New, extracted from...
19252 (packsymbols): Here.
19253 Adjust.
19254
270a173c
AD
192552001-11-01 Akim Demaille <akim@epita.fr>
19256
19257 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
19258 Check that `9foo.y' produces correct cpp guards.
19259 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
19260 guards.
19261 Reported by Wwp.
19262
561f9a30
AD
192632001-11-01 Akim Demaille <akim@epita.fr>
19264
19265 * tests/regression.at (Invalid input: 2): New.
19266 * src/lex.c (unlexed_token_buffer): New.
19267 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
19268 too.
19269 Reported by Wwp.
19270
f987e9d2
AD
192712001-11-01 Akim Demaille <akim@epita.fr>
19272
19273 * tests/calc.at: Catch up with 1.30.
19274 * configure.in: Bump to 1.49a.
19275 Adjust to newer Autotest.
19276
0846f581
PB
192772001-10-19 Pascal Bart <pascal.bart@epita.fr>
19278
19279 * src/conflicts.c: Move global variables rrc_total and src_total ...
19280 (print_conflicts): here.
19281 * src/output.c (output): Free global variable user_toknums.
19282 * src/lex.c (token_obstack): Become static.
19283
3c1a79b3
AD
192842001-10-18 Akim Demaille <akim@epita.fr>
19285
19286 * tests/atlocal.in (GCC): Add.
19287 * tests/calc.at: s/m4_match/m4_bmatch/.
19288 s/m4_patsubst/m4_bpatsubst/.
19289 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
19290 * configure.in: AC_SUBST(GCC).
19291
5d52e7d0
MA
192922001-10-14 Marc Autret <autret_m@epita.fr>
19293
19294 * src/options.c (create_long_option_table): Fix.
19295
631aa1d3
AD
192962001-10-10 Akim Demaille <akim@epita.fr>
19297
19298 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
19299
f6ec6d13
AD
193002001-10-04 Akim Demaille <akim@epita.fr>
19301
19302 * src/reader.c (parse_union_decl): Push the caracters in
19303 union_obstack, not attrs_obstack.
19304
342b8b6e
AD
193052001-10-04 Akim Demaille <akim@epita.fr>
19306
19307 Merge in the branch 1.29.
19308
19309 * src/reader.c (packsymbols): Use a temporary obstack for
19310 `%%tokendef', since output_stack is already used elsewhere.
19311
19312 2001-10-02 Akim Demaille <akim@epita.fr>
19313
19314 Bump 1.29d.
19315
19316 2001-10-02 Akim Demaille <akim@epita.fr>
19317
19318 Version 1.29c.
19319
19320 2001-10-02 Akim Demaille <akim@epita.fr>
19321
19322 * tests/regression.at (Invalid CPP headers): New.
19323 From Alexander Belopolsky.
19324 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
19325
19326 2001-10-02 Akim Demaille <akim@epita.fr>
19327
19328 * tests/regression.at (Invalid input): New.
19329 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
19330 Reported by Shura.
19331
19332 2001-10-02 Akim Demaille <akim@epita.fr>
19333
19334 * tests/calc.at: Now that --debug works, the tests must be adjusted.
19335
19336 2001-10-02 Akim Demaille <akim@epita.fr>
19337
19338 * src/output.c (output_parser): Assert `skeleton'.
19339 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
19340 systems.
19341 From Shura.
19342
19343 2001-10-01 Marc Autret <autret_m@epita.fr>
19344
19345 * src/lex.h: Echo modifications.
19346 * src/lex.c (unlex): Parameter is now token_t.
19347 From Hans Aberg.
19348
19349 2001-10-01 Marc Autret <autret_m@epita.fr>
19350
19351 * src/main.c: Include lex.h.
19352 From Hans Aberg.
19353
19354 2001-09-29 Akim Demaille <akim@epita.fr>
19355
19356 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
19357
19358 2001-09-28 Akim Demaille <akim@epita.fr>
19359
19360 * tests/testsuite.at: Update to newer Autotest.
19361 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
19362
19363 2001-09-27 Akim Demaille <akim@epita.fr>
19364
19365 Position independent wrapper.
19366
19367 * tests/bison: Remove.
19368 * tests/bison.in: New.
19369 * configure.in: Adjust.
19370
19371 2001-09-27 Paul Eggert <eggert@twinsun.com>
19372
19373 Port quotearg fixes from tar 1.13.24.
19374
19375 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
19376 tm to be declared.
19377 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
19378 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
19379
19380 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
19381 * m4/mbrtowc.m4: New file.
19382 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
19383 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
19384
19385 2001-09-27 Akim Demaille <akim@epita.fr>
19386
19387 Bump to 1.29c.
19388
19389 2001-09-27 Akim Demaille <akim@epita.fr>
19390
19391 Version 1.29b.
19392
19393 2001-09-25 Akim Demaille <akim@epita.fr>
19394
19395 * src/system.h: Include `xalloc.h'.
19396 Remove it from the C files.
19397 * src/files.c (output_files): Free the obstacks.
19398 * src/lex.c (init_lex): Rename as...
19399 (lex_init): this.
19400 (lex_free): New.
19401 * src/main.c (main): Use it.
19402
19403 2001-09-24 Marc Autret <autret_m@epita.fr>
19404
19405 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
19406 to output informations in fout (FILE*).
19407 (open_graph, close_graph): Likewise.
19408 (output_graph, output_edge, output_node): Likewise.
19409 * src/vcg.h: Update function prototypes.
19410 * src/print_graph.c (print_graph): Open output graph file.
19411 (print_actions): Adjust.
19412 * src/files.h: Remove extern declaration.
19413 * src/files.c: Remove graph_obstack declaration.
19414 (open_files): Remove graph_obstack initialization.
19415 (output_files): Remove graph_obstack saving.
19416
19417 2001-09-24 Marc Autret <autret_m@epita.fr>
19418
19419 * src/files.c (compute_output_file_names): Fix.
19420
19421 2001-09-24 Marc Autret <autret_m@epita.fr>,
19422 Akim Demaille <akim@epita.fr>
19423
19424 * src/reader.c (reader): Remove call to free_symtab ().
19425 * src/main.c (main): Call it here.
19426 Include symtab.h.
19427 * src/conflicts.c (initialize_conflicts): Rename as...
19428 (solve_conflicts): this.
19429 * src/print.c (print_core, print_actions, print_state)
19430 (print_grammar): Dump to a file instead a `output_obstack'.
19431 (print_results): Dump `output_obstack', and then proceed with the
19432 FILE *.
19433 * src/files.c (compute_output_file_names, close_files): New.
19434 (output_files): Adjust.
19435 * src/main.c (main): Adjust.
19436
19437 2001-09-23 Marc Autret <autret_m@epita.fr>
19438
19439 * src/files.c (compute_header_macro): Computes header macro name
19440 from spec_defines_file when given.
19441
19442 2001-09-23 Marc Autret <autret_m@epita.fr>
19443
19444 * src/files.c (output_files): Add default extensions.
19445
19446 2001-09-22 Akim Demaille <akim@epita.fr>
19447
19448 * src/conflicts.c (finalize_conflicts): Rename as...
19449 (free_conflicts): this.
19450
19451 2001-09-22 Akim Demaille <akim@epita.fr>
19452
19453 * src/gram.c (gram_free): Rename back as...
19454 (dummy): this.
19455 (output_token_translations): Free `token_translations'.
19456 * src/symtab.c (free_symtab): Free the tag field.
19457
19458 2001-09-22 Akim Demaille <akim@epita.fr>
19459
19460 Remove `translations' as it is always set to true.
19461
19462 * src/gram.h: Adjust.
19463 * src/reader.c (packsymbols, parse_token_decl): Adjust
19464 * src/print.c (print_grammar): Adjust.
19465 * src/output.c (output_token_translations): Adjust.
19466 * src/lex.c (lex): Adjust.
19467 * src/gram.c: Be sure the set pointers to NULL.
19468 (dummy): Rename as...
19469 (gram_free): this.
19470
19471 2001-09-22 Akim Demaille <akim@epita.fr>
19472
19473 * configure.in: Invoke AM_LIB_DMALLOC.
19474 * src/system.h: Use dmalloc.
19475 * src/LR0.c: Be sure to have pointers initialized to NULL.
19476 (allocate_itemsets): Allocate kernel_items only if needed.
19477
19478 2001-09-22 Akim Demaille <akim@epita.fr>
19479
19480 * configure.in: Bump to 1.29b.
19481 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
19482 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
19483 need xmalloc.c in calc.y.
19484 From Pascal Bart.
19485
19486 2001-09-21 Akim Demaille <akim@epita.fr>
19487
19488 Version 1.29a.
19489 * Makefile.maint, config/config.guess, config/config.sub,
19490 * config/missing: Update from masters.
19491 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
19492 upon package.m4.
19493 * configure.in (ALL_LINGUAS): Add `tr'.
19494
19495 2001-09-21 Akim Demaille <akim@epita.fr>
19496
19497 * tests/Makefile.am (package.m4): Move to...
19498 ($(srcdir)/$(TESTSUITE)): here.
19499
19500 2001-09-20 Akim Demaille <akim@epita.fr>
19501
19502 * src/complain.c: No longer try to be standalone: use system.h.
19503 Don't assume __STDC__ is defined to 1. Just test if it is defined.
19504 * src/complain.h: Likewise.
19505 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
19506 Remove the unused variable `n'.
19507 From Albert Chin-A-Young.
19508
19509 2001-09-18 Marc Autret <autret_m@epita.fr>
19510
19511 * doc/bison.1: Update.
19512 * doc/bison.texinfo (Bison Options): Update --defines and --graph
19513 descriptions.
19514 (Option Cross Key): Update.
19515 Add --graph.
19516
19517 2001-09-18 Marc Autret <autret_m@epita.fr>
19518
19519 * tests/regression.at: New test (comment in %union).
19520
19521 2001-09-18 Marc Autret <autret_m@epita.fr>
19522
19523 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
19524 do that.
19525 Reported by Keith Browne.
19526
19527 2001-09-18 Marc Autret <autret_m@epita.fr>
19528
19529 * tests/output.at: Add tests for --defines and --graph.
19530
19531 2001-09-18 Marc Autret <autret_m@epita.fr>
19532
19533 * tests/output.at: Removes tests of %{header,src}_extension features.
19534
19535 2001-09-18 Akim Demaille <akim@epita.fr>
19536
19537 * tests/Makefile.am (package.m4): New.
19538 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
19539 (_AT_CHECK_CALC_ERROR): Likewise.
19540 Factor the `, ' part of verbose error messages.
19541
19542 2001-09-18 Marc Autret <autret_m@epita.fr>
19543
19544 * src/getargs.c (longopts): Declare --defines and --graph as options
19545 with optional arguments.
19546 * src/files.h: Add extern declarations.
19547 * src/files.c (spec_graph_file, spec_defines_file): New.
19548 (output_files): Update.
19549 Remove CPP-outed code.
19550
19551 2001-09-18 Marc Autret <autret_m@epita.fr>
19552
19553 Turn off %{source,header}_extension feature.
19554
19555 * src/files.c (compute_exts_from_gf): Update.
19556 (compute_exts_from_src): Update.
19557 (output_files): CPP-out useless code.
19558 * src/files.h: Remove {header,source}_extension extern declarations.
19559 * src/reader.c (parse_dquoted_param): CPP-out.
19560 (parse_header_extension_decl): Remove.
19561 (parse_source_extension_decl): Remove.
19562 (read_declarations): Remove cases tok_{hdrext,srcext}.
19563 * src/lex.c (percent_table): Remove {header,source}_extension entries.
19564 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
19565
19566 2001-09-10 Akim Demaille <akim@epita.fr>
19567
19568 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
19569 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
19570 (AT_CHECK_OUTPUT): this.
19571 Merely check ls' exit status, its output is useless.
19572
19573 2001-09-10 Akim Demaille <akim@epita.fr>
19574
19575 * tests/calc.at: Use m4_match.
19576 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
19577
19578 2001-09-10 Marc Autret <autret_m@epita.fr>,
19579 Akim Demaille <akim@epita.fr>
19580
19581 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
19582 enum color_e.
19583 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
19584 to `normal'.
19585 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
19586 * src/lex.h: Adjust prototype.
19587 (token_t): Add `tok_undef'.
19588 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
19589 (parse_percent_token): Now returns token_t.
19590 Add default statement in switch.
19591 (lex): Separate `c' as an input variable, from the token_t result
19592 part.
19593 (unlexed): Is a token_t.
19594
19595 2001-09-10 Akim Demaille <akim@epita.fr>
19596
19597 * configure.in: Bump to 1.29a.
19598
19599 2001-09-07 Akim Demaille <akim@epita.fr>
19600
19601 Version 1.29.
19602
19603 2001-08-30 Akim Demaille <akim@epita.fr>
19604
19605 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
19606 * m4/atconfig.m4: Remove.
19607 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
19608 * tests/bison: New.
19609 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
19610 m4_if, m4_patsubst, and m4_regexp.
19611 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
19612 `input' file instead of echo.
19613
19614 2001-08-29 Akim Demaille <akim@epita.fr>
19615
19616 Bump to 1.28e.
19617
19618 2001-08-29 Akim Demaille <akim@epita.fr>
19619
19620 Version 1.28d.
19621
19622 2001-08-29 Paul Eggert <eggert@twinsun.com>
19623
19624 * src/bison.simple (yyparse): Don't take the address of an
19625 item before the start of an array, as that doesn't conform to
19626 the C Standard.
19627
19628 2001-08-29 Robert Anisko <anisko_r@epita.fr>
19629
19630 * doc/bison.texinfo (Location Tracking Calc): New node.
19631
19632 2001-08-29 Paul Eggert <eggert@twinsun.com>
19633
19634 * src/output.c (output): Do not define const, as this now
19635 causes more problems than it cures.
19636
19637 2001-08-29 Akim Demaille <akim@epita.fr>
19638
19639 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
19640 the nodes.
19641 Be sure to tag the `detailmenu'.
19642
19643 2001-08-29 Akim Demaille <akim@epita.fr>
19644
19645 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
19646 download in a tmp dir.
19647
19648 2001-08-28 Marc Autret <autret_m@epita.fr>
19649
19650 * config/depcomp: New file.
19651
19652 2001-08-28 Marc Autret <autret_m@epita.fr>
19653
19654 * doc/bison.1 (mandoc): Adjust.
19655 From Juan Manuel Guerrero.
19656
19657 2001-08-28 Marc Autret <autret_m@epita.fr>
19658
19659 * src/print_graph.c (print_state): Fix.
19660
19661 2001-08-27 Marc Autret <autret_m@epita.fr>
19662
19663 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
19664 char * members.
19665 Echo modifications to the functions prototypes.
19666 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
19667
19668 2001-08-27 Marc Autret <autret_m@epita.fr>
19669
19670 * src/vcg.c: Include `xalloc.h'.
19671 (add_colorentry): New.
19672 (add_classname): New.
19673 (add_infoname): New.
19674 * src/vcg.h: Add new prototypes.
19675
19676 2001-08-27 Akim Demaille <akim@epita.fr>
19677
19678 * Makefile.maint: Sync. again with CVS Autoconf.
19679
19680 2001-08-27 Akim Demaille <akim@epita.fr>
19681
19682 * Makefile.maint: Formatting changes.
19683 (po-update, cvs-update, update): New targets.
19684 (AMTAR): Remove.
19685
19686 2001-08-27 Akim Demaille <akim@epita.fr>
19687
19688 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
19689 * Makefile.maint: Sync. with CVS Autoconf.
19690
19691 2001-08-27 Marc Autret <autret_m@epita.fr>
19692
19693 * src/vcg.h (struct infoname_s): New.
19694 (struct colorentry_s): New.
19695 (graph_s): New fields {vertical,horizontal}_order in structure.
19696 Add `infoname' field.
19697 Add `colorentry' field;
19698 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
19699 (G_HORIZONTAL_ORDER): New.
19700 (G_INFONAME): New.
19701 (G_COLORENTRY): New.
19702 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
19703 Add output of `infoname'.
19704 Add output of `colorentry'.
19705
19706 2001-08-27 Marc Autret <autret_m@epita.fr>
19707
19708 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
19709 This one shadowed a global parameter.
19710
19711 2001-08-24 Marc Autret <autret_m@epita.fr>
19712
19713 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
19714 instead of `unsigned'.
19715 (print_state): Do not call obstack_object_size () in obstack_grow ()
19716 to avoid macro variables shadowing.
19717
19718 2001-08-23 Marc Autret <autret_m@epita.fr>
19719
19720 * src/lex.c (percent_table): Typo: s/naem/name/.
19721 Add graph option.
19722 Normalize new options declarations.
19723
19724 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
19725
19726 * tests/suite.at: Exercise %header_extension and %source_extension.
19727
19728 2001-08-16 Marc Autret <autret_m@epita.fr>
19729
19730 * src/reader.c (parse_dquoted_param): New.
19731 (parse_header_extension_decl): Use it.
19732 (parse_source_extension_decl): Likewise.
19733
19734 2001-08-16 Marc Autret <autret_m@epita.fr>
19735
19736 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
19737 (get_xxxx_str): Use assert () instead of complain ().
19738 Remove return invokations in default cases.
19739 (get_decision_str): Modify default behaviour. Remove second argument.
19740 Echo modifications on calls.
19741 (output_graph): Fix.
19742
19743 2001-08-16 Marc Autret <autret_m@epita.fr>
19744
19745 * src/getargs.c (usage): Update with ``-g, --graph''.
19746
19747 2001-08-16 Marc Autret <autret_m@epita.fr>
19748
19749 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
19750 (Option Cross Key): Likewise.
19751 * doc/bison.1: Update.
19752
1c8c2190
PB
197532001-09-25 Pascal Bart <pascal.bart@epita.fr>
19754
19755 * src/output.c (output_master_parser): Don't finish action_obstack.
19756 (output_parser): Don't care about the muscle action, here.
19757 (prepare): Copy the action_obstack in the action muscle.
19758 (output): Free action_obstack.
19759
180d45ba
PB
197602001-09-23 Pascal Bart <pascal.bart@epita.fr>
19761
19762 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
19763 will contain `%union' declaration.
19764 (parse_union_decl): Delete #line directive output.
19765 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
19766 informations about %union.
19767 (parse_union_decl): Copy the union_obstack in the muscle stype.
19768 * src/bison.simple: Add new #line directive.
19769 Add typdef %%stype YYSTYPE.
19770
c51d1a19
PB
197712001-09-23 Pascal Bart <pascal.bart@epita.fr>
19772
19773 * src/bison.simple: Add new `#line' directive.
19774
6f9344da
PB
197752001-09-22 Pascal Bart <pascal.bart@epita.fr>
19776
19777 * src/bison.simple: New `#line' directive.
19778 * src/output.c (output_parser): Support new dynamic muscle input_line.
19779
652def80
MA
197802001-09-22 Marc Autret <autret_m@epita.fr>
19781
19782 * src/output.c (output_master_parser): New.
19783 (output_parser): Be more re-entrant.
19784
25b222fa
MA
197852001-09-21 Marc Autret <autret_m@epita.fr>
19786
19787 * src/reader.c (copy_definition, parse_union_decl): Update and use
19788 `linef' muscle.
19789 (copy_action): Likewise.
19790 Use obstack_1grow ().
19791 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
19792
6bc35ae5
MA
197932001-09-21 Marc Autret <autret_m@epita.fr>
19794
19795 * src/options.c (option_table): Adjust.
19796 * src/lex.c (parse_percent_token): Fix.
19797
c0629aa1
PB
197982001-09-20 Pascal Bart <pascal.bart@epita.fr>
19799
19800 * src/options.c (symtab.h): Include it, need by lex.h.
342b8b6e 19801
82b6d266
PB
198022001-09-20 Pascal Bart <pascal.bart@epita.fr>
19803
19804 * src/lex.c (parse_percent_token): Change type of variable `tx', which
19805 is now an option_table_struct*.
19806 (option_strcmp): New function option_strcmp.
19807 (parse_percent_token): Call option_strcmp.
19808 * src/getargs.c (xalloc.h, options.h): Include it.
19809 (getargs): Call create_long_option_table.
19810 (getargs): Free longopts at the end of the function.
19811 (shortopts): Move in options.c.
19812 * src/options.c (create_long_option_table): New function. Convert
19813 information from option_table to option structure.
19814 * src/reader.c (options.h): Include it.
19815
19816 * src/Makefile.am: Adjust.
19817 * src/options.c (option_table): Create from longopts and percent_table.
19818 * src/getargs.c (longopts): Delete.
19819 * src/lex.c (struct percent_table_struct): Delete.
19820 (percent_table): Delete.
19821 (options.h): Include it.
19822 * src/options.c: Create.
19823 * src/options.h: Create.
19824 Declare enum opt_access_e.
19825 Define struct option_table_struct.
19826
75f5aaea
MA
198272001-09-20 Marc Autret <autret_m@epita.fr>
19828
19829 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
19830 sections of Bison.
19831
f508cb0a
PB
198322001-09-19 Pascal Bart <pascal.bart@epita.fr>
19833
19834 * src/bison.simple: s/%%filename/%%skeleton.
19835 * src/muscle_tab.c (getargs.h): Include it.
19836 (muscle_init): Insert new muscle skeleton.
19837
13105fc1
PB
198382001-09-18 Pascal Bart <pascal.bart@epita.fr>
19839
19840 * src/output.c (output_parser): Delete unused variable actions_dumped.
19841
b0c4483e
PB
198422001-09-07 Pascal Bart <pascal.bart@epita.fr>
19843
19844 * src/output.c (output): Delete call to reader_output_yylsp.
19845 * src/reader.c (reader): Likewise.
ba0fe3c7 19846 * src/reader.h: Delete declaration of reader_output_yylsp.
342b8b6e 19847
11d82f03
MA
198482001-09-02 Marc Autret <autret_m@epita.fr>
19849
19850 * src/reader.c: Include muscle_tab.h.
19851 (parse_union_decl): Update.
19852 (parse_macro_decl): Rename parse_muscle_decl.
19853 Update to use renamed functions and variable.
19854 (read_declarations, copy_action, read_additionnal_code, : Updated
19855 with correct variables and functions names.
19856 (packsymbols, reader): Likewise.
342b8b6e 19857
11d82f03 19858 * src/reader.h (muscle_obstack): Extern declaration update.
342b8b6e 19859
11d82f03
MA
19860 * src/output.c: Include muscle_tab.h
19861 In all functions using macro_insert, change by using muscle_insert ().
19862 (macro_obstack): Rename muscle_obstack.
19863 Echo modifications in the whole file.
19864 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
19865 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
19866 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
19867
19868 * src/muscle_tab.h: Update double inclusion macros.
19869 (macro_entry_s): Rename muscle_entry_s.
19870 Update prototypes.
342b8b6e 19871
11d82f03
MA
19872 * src/muscle_tab.c: Include muscle_tab.h.
19873 Rename macro_tabble to muscle_table.
19874 (mhash1, mhash2, mcmp): Use muscle_entry.
19875 (macro_init): Rename muscle_init. Update.
19876 (macro_insert): Rename muscle_insert. Update.
19877 (macro_find): Rename muscle_find. Update.
19878
19879 * src/main.c: Include muscle_tab.h.
19880 (main): Call muscle_init ().
19881 * src/Makefile.am (bison_SOURCES): Echo modifications.
19882
93a37297
MA
198832001-09-02 Marc Autret <autret_m@epita.fr>
19884
f753cd62 19885 Now the files macro_tab.[ch] are named muscle_tab.[ch].
342b8b6e 19886
f753cd62
MA
19887 * src/muscle_tab.c, src/muscle_tab.h: Add files.
19888
198892001-09-02 Marc Autret <autret_m@epita.fr>
19890
19891 * src/macrotab.c, src/macrotab.h: Remove.
93a37297 19892
682d48cd
PB
198932001-09-01 Pascal Bart <pascal.bart@epita.fr>
19894
342b8b6e 19895 * src/reader.c (copy_guard): Use muscle to specify the `#line'
682d48cd
PB
19896 filename.
19897
087c8fda
MA
198982001-09-01 Marc Autret <autret_m@epita.fr>
19899
19900 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
19901 to an explicit value to activate the feature. We do it here.
19902
dda680cb
PB
199032001-08-31 Pascal Bart <pascal.bart@epita.fr>
19904
19905 * src/output.c (prepare): Delete the `filename' muscule insertion.
19906 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
19907 (parse_union_decl): Likewise.
19908 * src/macrotab.c (macro_init): Initialize filename by infile.
19909
9e644e64
MA
199102001-08-31 Marc Autret <autret_m@epita.fr>
19911
19912 * src/bison.simple (YYLSP_NEEDED): New definition.
19913 * src/output.c (prepare): Add macro insertion of `locations_flag'
19914
17da6427
PB
199152001-08-31 Pascal Bart <pascal.bart@epita.fr>
19916
19917 * src/output.c (prepare): Delete insertion of previous muscles,
19918 and insert the `prefix' muscles.
19919 * src/macrotab.c (macro_init): Likewise.
19920 (macro_init): Initialization prefix directive by `yy'.
342b8b6e 19921 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17da6427
PB
19922 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
19923 yylval, yydebug, yyerror, yynerrs and yyparse.
342b8b6e 19924 New directive `#define' to substitute yydebug, ... with option
17da6427
PB
19925 name_prefix.
19926
e8cb70b9
PB
199272001-08-31 Pascal Bart <pascal.bart@epita.fr>
19928
19929 * src/main.c (main): Standardize.
19930 * src/output.c (output_table_data, output_parser): Likewise.
19931 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
19932
63c2d5de
MA
199332001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
19934
342b8b6e 19935 * src/reader.c (read_additionnal_code): Rename %%user_code to
63c2d5de
MA
19936 %%epilogue.
19937 * src/output.c (output): Rename %%declarations to %%prologue.
19938 * src/bison.simple: Echo modifications.
342b8b6e 19939
d8cb5183
MA
199402001-08-31 Marc Autret <autret_m@epita.fr>
19941
19942 * src/reader.c (readgram): CleanUp.
19943 (output_token_defines): Likewise.
19944 (packsymbols): Likewise.
19945 (reader): Likewise.
19946 * src/output.c (output): CPP-out useless code.
19947
6c686258
PB
199482001-08-31 Pascal Bart <pascal.bart@epita.fr>
19949
342b8b6e 19950 * src/reader.c (reader): Delete obsolete call to function
6c686258
PB
19951 output_trailers and output_headers.
19952 * src/output.h: Remove obsolete functions prototypes of output_headers
19953 and output_trailers.
19954
8f451ef7
PB
199552001-08-30 Pascal Bart <pascal.bart@epita.fr>
19956
19957 * src/main.c: Include macrotab.h.
342b8b6e 19958 * src/macrotab.h (macro_entry_s): Constify fields.
8f451ef7
PB
19959 Adjust functions prototypes.
19960 * src/macrotab.c (macro_insert): Constify key and value.
19961 (macro_find): Constify key.
19962 (macro_insert): Include 'xalloc.h'
19963 (macro_insert): Use XMALLOC.
19964 (macro_find): Constify return value.
19965 * src/output.c (output_table_data): Rename table to table_data.
19966 (output_parser): Constify macro_key, macro_value.
19967
997b6fd0 199682001-08-30 Marc Autret <autret_m@epita.fr>
2ba3b73c
MA
19969
19970 * src/reader.c (parse_skel_decl): New.
342b8b6e 19971 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2ba3b73c
MA
19972 * src/lex.h (token_t): New token `tok_skel'.
19973 * src/lex.c (percent_table): Add skeleton option entry.
19974 Standardize.
19975
ff48177d
MA
199762001-08-29 Marc Autret <autret_m@epita.fr>
19977
19978 * src/bison.simple: Add %%user_code directive at the end.
19979 * src/reader.c (read_additionnal_code): New.
19980 (reader): Use it.
19981 * src/output.c (output_program): Remove.
19982 (output): Update.
19983
b33160bf
MA
199842001-08-28 Marc Autret <autret_m@epita.fr>
19985
19986 * src/output.c (output_actions): Clean up.
4e5caae2 19987 (output_gram): CPP-out useless code.
b33160bf
MA
19988 * src/reader.c (reader): Clean up, CPP-out useless code.
19989
d1a2daf7
PB
199902001-08-28 Pascal Bart <pascal.bart@epita.fr>
19991
342b8b6e 19992 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
535c0e75 19993 directive.
d1a2daf7
PB
19994 * src/bison.simple: Add `%%definitions'.
19995
2b763dfe
MA
199962001-08-28 Marc Autret <autret_m@epita.fr>
19997
19998 * config/depcomp: New file.
19999
f1a87ef6
PE
200002001-08-27 Paul Eggert <eggert@twinsun.com>
20001
20002 * src/bison.simple (yyparse): Don't take the address of an
20003 item before the start of an array, as that doesn't conform to
20004 the C Standard.
20005
82e236e2
RA
200062001-08-27 Robert Anisko <robert.anisko@epita.fr>
20007
f1a87ef6 20008 * src/output.c (output): Remove the initialization of the macro
82e236e2
RA
20009 obstack. It was done too late here.
20010
20011 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
20012 completely wrong.
20013 (reader): Initialize the macro obstack here, since we need it to grow
20014 '%define' directives.
20015
20016 * src/reader.h: Declare the macro obstack as extern.
20017
b0cfa28a
RA
200182001-08-27 Robert Anisko <robert.anisko@epita.fr>
20019
20020 * src/output.c (output_parser): Fix. Store single '%' characters in
20021 the output obstack instead of throwing them away.
20022
6fc74234
AD
200232001-08-27 Akim Demaille <akim@epita.fr>
20024
20025 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
20026
9c76d118
RA
200272001-08-25 Robert Anisko <robert.anisko@epita.fr>
20028
20029 * lib/Makefile.am: Adjust.
20030
a8289c62
RA
200312001-08-25 Robert Anisko <robert.anisko@epita.fr>
20032
20033 * src/bison.simple: Update and add '%%' directives.
20034
b6610515
RA
200352001-08-25 Robert Anisko <robert.anisko@epita.fr>
20036
20037 * src/reader.c (reader): Remove calls to 'output_headers' and
20038 'output_trailers'. Remove some C output.
20039 (readgram): Disable a piece of code that was writing a default
20040 definition for 'YYSTYPE'.
20041 (reader_output_yylsp): Remove.
20042 (packsymbols): Output token defintions to a macro.
20043 (copy_definition): Disable C output.
6fc74234 20044
b6610515
RA
20045 * src/reader.c (parse_macro_decl): New function used to parse macro
20046 declarations.
20047 (copy_string2): Put the body of copy_string into this new function.
20048 Add a parameter to let the caller choose whether he wants to copy the
20049 string delimiters or not.
20050 (copy_string): Be a simple call to copy_string2 with the last argument
20051 bound to true.
20052 (read_declarations): Add case for macro definition.
20053 (copy_identifier): New.
6fc74234 20054 (parse_macro_decl): Read macro identifiers using copy_identifier
b6610515
RA
20055 rather than lex.
20056
26f609ff
RA
200572001-08-25 Robert Anisko <robert.anisko@epita.fr>
20058
20059 * src/output.c (prepare): Add prefixed names.
20060 (output_parser): Output semantic actions.
20061 (output_parser): Fix bug on '%%line' directives.
6fc74234 20062
26f609ff
RA
20063 * src/output.c (output_headers): Remove. The C code printed by this
20064 function should now be in the skeletons.
20065 (output_trailers): Remove.
20066 (output): Disable call to 'reader_output_yylsp'.
20067 (output_rule_data): Do not output tables to the table obstack.
20068
20069 * src/output.c: Remove some C dedicated output.
20070 Improve the use of macro and output obstacks.
20071 (output_defines): Remove.
6fc74234 20072
26f609ff
RA
20073 * src/output.c (output_token_translations): Associate 'translate'
20074 table with a macro. No output to the table obstack.
20075 (output_gram): Same for 'rhs' and 'prhs'.
20076 (output_stos): Same for 'stos'.
20077 (output_rule_data): Same for 'r1' and 'r2'.
20078 (token_actions): Same for 'defact'.
20079 (goto_actions): Same for 'defgoto'.
20080 (output_base): Same for 'pact' and 'pgoto'.
20081 (output_table): Same for 'table'.
20082 (output_check): Same for 'check'.
6fc74234 20083
26f609ff
RA
20084 * src/output.c (output_table_data): New function.
20085 (output_short_table): Remove.
20086 (output_short_or_char_table): Remove.
6fc74234 20087
26f609ff
RA
20088 * src/output.c (output_parser): Replace most of the skeleton copy code
20089 with something new. Skeletons are now processed character by character
20090 rather than line by line, and Bison looks for '%%' macros. This is the
20091 first step in making Bison's output process (a lot) more flexible.
20092 (output_parser): Use the macro table.
20093
6f43b113
RA
200942001-08-25 Robert Anisko <robert.anisko@epita.fr>
20095
20096 * src/main.c (main): Initialize the macro table.
20097
dd3127cf
RA
200982001-08-25 Robert Anisko <robert.anisko@epita.fr>
20099
20100 * src/lex.c (percent_table): Add tok_define.
20101 * src/lex.h: Add tok_define.
20102
aa321494
RA
201032001-08-25 Robert Anisko <robert.anisko@epita.fr>
20104
20105 * src/macrotab.c: New file.
20106 * src/macrotab.h: New file.
20107 * src/Makefile.am: Update.
20108
68bd3b6b
RA
201092001-08-25 Robert Anisko <robert.anisko@epita.fr>
20110
20111 * lib/hash.c: New file.
20112 * lib/hash.h: New file.
20113 * lib/Makefile.am: Update.
20114
45f8dd1e
AD
201152001-08-15 Akim Demaille <akim@epita.fr>
20116
20117 Version 1.28c.
20118
40a64a7a 201192001-08-15 Marc Autret <autret_m@epita.fr>
0b8afb77
AD
20120
20121 * src/reader.c (readgram): Indent output macro YYSTYPE.
20122 (packsymbols): Likewise.
20123 (output_token_defines): Likewise.
20124 * src/files.c: Standardize.
20125 (compute_header_macro): New.
20126 (defines_obstack_save): New. Use compute_header_macro.
20127 (output_files): Update. Use defines_obstack_save.
20128
f9a8293a
AD
201292001-08-15 Akim Demaille <akim@epita.fr>
20130
20131 * doc/bison.texinfo (Table of Symbols): Document
20132 YYSTACK_USE_ALLOCA.
20133
150ca7a7
AD
201342001-08-15 Akim Demaille <akim@epita.fr>
20135
20136 * missing: Update from CVS Automake.
20137 * config/config.guess, config/config.sub, config/texinfo.tex:
20138 Update from gnu.org.
20139
69b5cec4
AD
201402001-08-15 Akim Demaille <akim@epita.fr>
20141
20142 * Makefile.maint: Sync with CVS Autoconf.
20143
f2b5126e
PB
201442001-08-14 Pascal Bart <pascal.bart@epita.fr>
20145
69b5cec4 20146 * doc/bison.texinfo: Include GNU Free Documentation License from
f2b5126e
PB
20147 `fdl.texi'.
20148 * doc/fdl.texi: Add to package.
20149
4ecbf796
MA
201502001-08-14 Marc Autret <autret_m@epita.fr>
20151
20152 Turn on %{source,header}_extension features.
20153
69b5cec4 20154 * src/lex.c (percent_table): Un-CPP out header_extension and
4ecbf796
MA
20155 source_extension.
20156 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
69b5cec4 20157 (compute_exts_from_src): Remove conditions. It restores priorities
4ecbf796
MA
20158 between options.
20159
95fb5662
MA
201602001-08-14 Marc Autret <autret_m@epita.fr>
20161
20162 * src/files.c (compute_base_names): Add extensions computing when
20163 `--file-prefix' used.
20164 Standardize function calls.
20165
78d09da9
MA
201662001-08-13 Marc Autret <autret_m@epita.fr>
20167
69b5cec4 20168 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
78d09da9
MA
20169 defining it (defined but null disables alloca).
20170
5a009f2c
MA
201712001-08-13 Marc Autret <autret_m@epita.fr>
20172
20173 * src/bison.simple (_yy_memcpy): CPP reformat.
20174
1e41465a
PB
201752001-08-13 Pascal Bart <pascal.bart@epita.fr>
20176
20177 * tests/atconfig.in (CPPFLAGS): Fix.
20178
c67a198d
PB
201792001-08-10 Pascal Bart <pascal.bart@epita.fr>
20180
79282c6c 20181 * doc/bison.texinfo: Include GNU General Public License from
c67a198d
PB
20182 `gpl.texi'.
20183 * doc/gpl.texi: Add to package.
20184
09a6de7e
MA
201852001-08-10 Marc Autret <autret_m@epita.fr>
20186
20187 * src/print_graph.h: Fix.
20188 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
20189
b77b9ee0
AD
201902001-08-10 Akim Demaille <akim@epita.fr>
20191
20192 * src/system.h: Provide default declarations for stpcpy, strndup,
20193 and strnlen.
20194
3e259915
MA
201952001-08-10 Robert Anisko <anisko_r@epita.fr>
20196
20197 * doc/bison.texinfo (Locations): Update @$ stuff.
20198
ca96bc2d
MA
201992001-08-09 Robert Anisko <anisko_r@epita.fr>
20200
20201 * src/bison.simple (YYLLOC_DEFAULT): Update.
20202 (yyparse): Adjust.
20203
fdc6758b
MA
202042001-08-08 Marc Autret <autret_m@epita.fr>
20205
b77b9ee0 20206 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
fdc6758b
MA
20207 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
20208 Reported by Fabrice Bauzac.
957d4dbf 20209
600cad3b
MA
202102001-08-08 Marc Autret <autret_m@epita.fr>
20211
20212 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
20213 * src/vcg.c (output_node): Fix.
20214 * src/vcg.h: Cleanup.
20215 * src/print_graph.c: Add comments.
b77b9ee0 20216 (node_output_size): New global variable. Simplify the formatting of
600cad3b 20217 the VCG graph output.
b77b9ee0 20218 (print_actions): Unused code is now used. It notifies the final state
600cad3b 20219 and no action states in the VCG graph. It also give the reduce actions.
b77b9ee0 20220 The `shift and goto' edges are red and the `go to state' edges are
600cad3b
MA
20221 blue.
20222 Get the current node name and node_obstack by argument.
20223 (node_obstack): New variable.
20224 (print_state): Manage node_obstack.
20225 (print_core): Use node_obstack given by argument.
20226 A node is not only computed here but in print_actions also.
20227 (print_graph): CPP out useless code instead of commenting it.
20228
976e528f
AD
202292001-08-07 Pascal Bart <pascal.bart@epita.fr>
20230
20231 * tests/atconfig.in (CPPFLAGS): Fix.
20232
20e8e5ca
AD
202332001-08-07 Akim Demaille <akim@epita.fr>
20234
20235 * src/print_graph.c (quote): New.
20236 (print_core): Use it.
20237
957d4dbf 202382001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3e3da797 20239
3e3da797
AD
20240 * src/vcg.c (complain.h): Include it.
20241 Unepitaize `return' invocations.
c4b66126 20242 [NDEBUG] (main): Remove.
79282c6c 20243 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
c4b66126
AD
20244 * src/files.c (open_files): Initialize graph_obstack.
20245 * src/print_graph.c (print_actions): CPP out useless code.
20246 (print_core): Don't output the last `\n' in labels.
20247 Use `quote'.
20248 * src/files.c (output_files): Output the VCG file.
20249 * src/main.c (main): Invoke print_graph ();
3e3da797 20250
957d4dbf 202512001-08-06 Marc Autret <autret_m@epita.fr>
22c2cbc0
AD
20252
20253 Automaton VCG graph output.
20254 Using option ``-g'' or long option ``--graph'', you can generate
20255 a gram_filename.vcg file containing a VCG description of the LALR (1)
20256 automaton of your grammar.
20257
20258 * src/main.c: Call to print_graph() function.
20259 * src/getargs.h: Update.
20260 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
20261 (graph_flag): New flag.
20262 (longopts): Update.
20263 (getargs): Add case `g'.
20264 * src/files.c (graph_obstack): New obstack struct.
20265 (open_files): Initialize new obstack.
20266 (output_files): Saves graph_obstack if required.
20267 * src/files.h (graph_obstack): New extern declaration.
20268 * src/Makefile.am: Add new source files.
20269
927c1557 202702001-08-06 Marc Autret <autret_m@epita.fr>
ce4d5ce0
AD
20271
20272 * src/print_graph.c, src/print_graph.h (graph): New.
20273 * src/vcg.h: New file.
20274 * src/vcg.c: New file, VCG graph handling.
20275
7333d403
AD
202762001-08-06 Marc Autret <autret_m@epita.fr>
20277
20278 Add of %source_extension and %header_extension which specify
20279 the source or/and the header output file extension.
20280
20281 * src/files.c (compute_base_names): Remove initialisation of
20282 src_extension and header_extension.
20283 (compute_exts_from_gf): Update.
20284 (compute_exts_from_src): Update.
20285 (output_files): Update.
20286 * src/reader.c (parse_header_extension_decl): New.
20287 (parse_source_extension_decl): New.
20288 (read_declarations): New case statements for the new tokens.
20289 * src/lex.c (percent_table): Add entries for %source_extension
20290 and %header_extension.
20291 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
20292
84163231
AD
202932001-08-06 Marc Autret <autret_m@epita.fr>
20294
20295 * configure.in: Bump to 1.28c.
20296 * doc/bison.texinfo: Texinfo thingies.
20297
8303fc42
AD
202982001-08-04 Pascal Bart <pascal.bart@epita.fr>
20299
20300 * tests/atconfig.in (CPPFLAGS): Add.
20301 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
20302
70a84437
AD
203032001-08-03 Akim Demaille <akim@epita.fr>
20304
20305 Version 1.28b.
20306
2ce10144
AD
203072001-08-03 Akim Demaille <akim@epita.fr>
20308
20309 * tests/Makefile.am (check-local): Ship testsuite.
20310 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
20311 Include `string.h'.
20312
1e3e4bc1
AD
203132001-08-03 Akim Demaille <akim@epita.fr>
20314
20315 * configure.in: Try using -Wformat when compiling.
20316
42b45b7f
AD
203172001-08-03 Akim Demaille <akim@epita.fr>
20318
20319 * configure.in: Bump to 1.28b.
20320
8f13fe33
AD
203212001-08-03 Akim Demaille <akim@epita.fr>
20322
20323 * src/complain.c: Adjust strerror_r portability issues.
20324
b37ba92c
AD
203252001-08-03 Akim Demaille <akim@epita.fr>
20326
20327 Version 1.28a.
20328
b0ce6046
AD
203292001-08-03 Akim Demaille <akim@epita.fr>
20330
20331 * src/getargs.c, src/getarg.h (skeleton)): Constify.
20332 * src/lex.c (literalchar): Avoid name clashes on `buf'.
20333 * src/getargs.c: Include complain.h.
20334 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
20335 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
20336
d01c415b
AD
203372001-08-03 Akim Demaille <akim@epita.fr>
20338
20339 * src/reader.c (readgram): Display hidden chars in error messages.
20340
459dd1a6
AD
203412001-08-03 Akim Demaille <akim@epita.fr>
20342
20343 Update to gettext 0.10.39.
20344
53b74c0c
AD
203452001-08-03 Akim Demaille <akim@epita.fr>
20346
20347 * lib/strspn.c: New.
20348
234a3be3
AD
203492001-08-01 Marc Autret <autret_m@epita.fr>
20350
20351 * doc/bison.texinfo: Update.
20352 * doc/bison.1 (mandoc): Update.
20353 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
20354 * src/files.c: Support output files extensions computing.
20355 (src_extension): New static variable.
20356 (header_extension): New static variable.
20357 (tr): New function.
20358 (get_extension_index): New function, gets the index of an extension
20359 filename in a string.
20360 (compute_exts_from_gf): New function, computes extensions from the
20361 grammar file extension.
20362 (compute_exts_from_src): New functions, computes extensions from the
20363 C source file extension, file given by ``-o'' option.
20364 (compute_base_names): Update.
20365 (output_files): Update.
20366
847bf1f5
AD
203672001-08-01 Robert Anisko <anisko_r@epita.fr>
20368
d995fee7 20369 * doc/bison.texi: Document @$.
847bf1f5
AD
20370 (Locations): New section.
20371
d074a105
AD
203722001-07-18 Akim Demaille <akim@epita.fr>
20373
20374 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
20375 * config/prev-version.txt, config/move-if-change: New.
20376 * Makefile.am: Adjust.
20377
3419715d
AD
203782001-07-08 Pascal Bart <pascal.bart@epita.fr>
20379
20380 * src/bison.simple (yyparse): Suppress warning `comparaison
20381 between signed and unsigned'.
20382
62ab6972
AD
203832001-07-05 Pascal Bart <pascal.bart@epita.fr>
20384
20385 * src/getargs.h (raw_flag): Remove.
20386 * src/getargs.c: Die on `-r'/`--raw'.
20387 * src/lex.c (parse_percent_token): Die on `%raw'.
20388 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
20389 * tests/calc.at: Suppress test with option `--raw'.
20390
1e24cc5b
AD
203912001-07-14 Akim Demaille <akim@epita.fr>
20392
20393 * config/: New.
20394 * configure.in: Require Autoconf 2.50.
20395 Update to gettext 0.10.38.
20396
32dfccf8
AD
203972001-03-16 Akim Demaille <akim@epita.fr>
20398
20399 * doc/bison.texinfo: ANSIfy the examples.
20400
cd5bd6ac
AD
204012001-03-16 Akim Demaille <akim@epita.fr>
20402
20403 * getargs.c (skeleton): New variable.
20404 (longopts): --skeleton is a new option.
20405 (shortopts, getargs): -S is a new option.
20406 * getargs.h: Declare skeleton.
20407 * output.c (output_parser): Use it.
20408
5141b016
AD
204092001-03-16 Akim Demaille <akim@epita.fr>
20410
20411 * m4/strerror_r.m4: New.
20412 * m4/error.m4: Run AC_FUNC_STRERROR_R.
20413 * lib/error.h, lib/error.c: Update.
20414
447992b9
AD
204152001-03-16 Akim Demaille <akim@epita.fr>
20416
20417 * src/getargs.c (longopts): Clean up.
20418
274d42ce
AD
204192001-02-21 Akim Demaille <akim@epita.fr>
20420
20421 * src/reader.c (gensym): `gensym_count' is your own.
20422 Use a static buf to create the symbol name, as token_buffer is no
20423 longer a buffer.
20424
22c821f3
AD
204252001-02-08 Akim Demaille <akim@epita.fr>
20426
20427 * src/conflicts.c (conflict_report): Be sure not to append to res
20428 between two calls, which could happen if both first sprintf were
20429 skipped, but not the first cp += strlen.
20430
18569462
AD
204312001-02-08 Akim Demaille <akim@epita.fr>
20432
20433 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
20434 New, from fileutils 4.0.37.
20435 * configure.in: Require Autoconf 2.49c. I took some time before
20436 making this decision. This is the only way out for portability
20437 issues in Bison, it would mean way too much duplicate effort to
20438 import in Bison features implemented in 2.49c since 2.13.
20439 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
20440
0d8f3c8a
AD
204412001-02-02 Akim Demaille <akim@epita.fr>
20442
20443 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
66075dcf 20444 * lib/xalloc.h, lib/xmalloc.c: Update.
0d8f3c8a 20445
f17bcd1f
AD
204462001-01-19 Akim Demaille <akim@epita.fr>
20447
20448 Get rid of the ad hoc handling of token_buffer in the scanner: use
20449 the obstacks.
20450
20451 * src/lex.c (token_obstack): New.
20452 (init_lex): Initialize it. No longer call...
20453 (grow_token_buffer): this. Remove it.
20454 Adjust all the places which used it to use the obstack.
20455
511e79b3
AD
204562001-01-19 Akim Demaille <akim@epita.fr>
20457
20458 * src/lex.h: Rename all the tokens:
20459 s/\bENDFILE\b/tok_eof/g;
20460 s/\bIDENTIFIER\b/tok_identifier/g;
20461 etc.
20462 Let them be enums, not #define, to ease debugging.
20463 Adjust all the code.
20464
0d6508ef
AD
204652001-01-18 Akim Demaille <akim@epita.fr>
20466
20467 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
20468 * src/lex.c (maxtoken, grow_token_buffer): Static.
20469
6deb4447
AD
204702001-01-18 Akim Demaille <akim@epita.fr>
20471
20472 Since we now use obstacks, more % directives can be enabled.
20473
20474 * src/lex.c (percent_table): Also accept `%yacc',
20475 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
20476 `%debug'.
20477 Handle the actions for `%semantic_parser' and `%pure_parser' here,
20478 instead of returning a token.
20479 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
20480 * src/reader.c (read_declarations): Adjust.
20481 * src/files.c (open_files): Don't call `compute_base_names', don't
20482 compute `attrsfile' since they depend upon data which might be
20483 *in* the input file now.
20484 (output_files): Do it here.
20485 * src/output.c (output_headers): Document the fact that this patch
20486 introduces a guaranteed SEGV for semantic parsers.
20487 * doc/bison.texinfo: Document them.
20488 * tests/suite.at: Exercise these %options.
20489
ff4423cc
AD
204902000-12-20 Akim Demaille <akim@epita.fr>
20491
20492 Also handle the output file (--verbose) with obstacks.
20493
20494 * files.c (foutput): Remove.
20495 (output_obstack): New.
20496 Adjust all dependencies.
20497 * src/conflicts.c: Return a string.
20498 * src/system.h (obstack_grow_string): Rename as...
20499 (obstack_sgrow): this. Be ready to work with non literals.
20500 (obstack_fgrow4): New.
20501
956dba3a
AD
205022000-12-20 Akim Demaille <akim@epita.fr>
20503
20504 * src/files.c (open_files): Fix the computation of short_base_name
20505 in the case of `-o foo.tab.c'.
20506
337bab46
AD
205072000-12-20 Akim Demaille <akim@epita.fr>
20508
20509 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
20510 (copy_dollar): Now that everything uses obstacks, get rid of the
20511 FILE * parameters.
20512
5d3214b8
AD
205132000-12-20 Akim Demaille <akim@epita.fr>
20514
20515 * src/files.c (open_files): Actually the `.output' file is based
20516 on the short_base_name, not base_name.
20517 * tests/suite.at (Checking output file names): Adjust.
20518
29092a57
AD
205192000-12-20 Akim Demaille <akim@epita.fr>
20520
20521 * src/bison.s1: Remove, we now use directly...
20522 * src/bison.simple: this.
20523 * src/Makefile.am: Use pkgdata instead of data.
20524
ea5607fd
AD
205252000-12-20 Akim Demaille <akim@epita.fr>
20526
20527 * src/files.c (guard_obstack): New.
20528 (open_files): Initialize it.
20529 (output_files): Dump it...
20530 * src/files.h: Export it.
20531 * src/reader.c (copy_guard): Use it.
20532
27110317
AD
205332000-12-19 Akim Demaille <akim@epita.fr>
20534
20535 * src/files.c (outfile, defsfile, actfile): Removed as global
20536 vars.
20537 (open_files): Don't compute them.
20538 (output_files): Adjust.
20539 (base_name, short_base_name): Be global.
20540 Adjust dependencies.
20541
19c50364
AD
205422000-12-19 Akim Demaille <akim@epita.fr>
20543
20544 * src/files.c (strsuffix): New.
20545 (stringappend): Be just like strcat but allocate.
20546 (base_names): Eve out from open_files.
20547 Try to simplify the rather hairy computation of base_name and
20548 short_base_name.
20549 (open_files): Use it.
20550 * tests/suite.at (Checking output file names): New test.
20551
573c1d9f
AD
205522000-12-19 Akim Demaille <akim@epita.fr>
20553
20554 * src/system.h (obstack_grow_literal_string): Rename as...
20555 (obstack_grow_string): this.
20556 * src/output.c (output_parser): Recognize `%% actions' instead of
20557 `$'.
20558 * src/bison.s1: s/$/%% actions/.
20559 * src/bison.hairy: Likewise.
20560
ef7ddedd
AD
205612000-12-19 Akim Demaille <akim@epita.fr>
20562
20563 * src/output.c (output_parser): Compute the `#line' lines when
20564 there are.
20565 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
20566 Suggested by Hans Aberg.
20567
ff61dabd
AD
205682000-12-19 Akim Demaille <akim@epita.fr>
20569
20570 Let the handling of the skeleton files be local to the procedures
20571 that use it.
20572
20573 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
20574 longer static.
20575 (fparser, open_extra_files): Remove.
20576 (open_files, output_files): Don't take care of fparser.
20577 * src/files.h: Adjust.
20578 * src/output.c (output_parser): Open and close the file to the
20579 skeleton.
20580 * src/reader.c (read_declarations): When %semantic_parser, open
20581 fguard.
20582
55b96341
AD
205832000-12-19 Akim Demaille <akim@epita.fr>
20584
20585 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
20586 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
20587
358c15b7
AD
205882000-12-19 Akim Demaille <akim@epita.fr>
20589
20590 * src/files.c (open_files): Yipee! We no longer need all the code
20591 looking for `/tmp' since we have no tmp file.
20592
7de3329e
AD
205932000-12-19 Akim Demaille <akim@epita.fr>
20594
20595 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
20596 New macros.
20597 * src/files.c (open_files): Less dependency on MSDOS etc.
20598
3abcd459
AD
205992000-12-14 Akim Demaille <akim@epita.fr>
20600
20601 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
20602 Provide a default definition.
20603 Use it when executing the default @ action.
20604 * src/reader.c (reader_output_yylsp): No longer include
20605 `timestamp' and `text' in the default YYLTYPE.
20606
2a91a95e
AD
206072000-12-12 Akim Demaille <akim@epita.fr>
20608
20609 * src/reader.c (copy_definition, parse_union_decl, copy_action)
20610 (copy_guard): Quote the file names.
20611 Reported by Laurent Mascherpa.
20612
14d3eb9b
AD
206132000-12-12 Akim Demaille <akim@epita.fr>
20614
20615 * src/output.c (output_headers, output_program, output): Be sure
20616 to escape special characters when outputting filenames.
20617 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
20618 (output_headers): Don't depend on them, Use ACTSTR.
20619
d7045ec6
AD
206202000-11-17 Akim Demaille <akim@epita.fr>
20621
20622 * lib/obstack.h: Formatting changes.
20623 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
20624 prevents type checking.
20625 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
20626 cast the value to (void *): assigning a `foo *' to a `void *'
20627 variable is valid.
20628 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
20629 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
20630 append characters.
20631
6fd54b73
AD
206322000-11-17 Akim Demaille <akim@epita.fr>
20633
20634 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
20635 as...
20636 (suite.m4, regression.m4, calc.m4): these.
20637 * tests/atgeneral.m4: Update from CVS Autoconf.
20638
4c50eae6
AD
206392000-11-17 Akim Demaille <akim@epita.fr>
20640
20641 * tests/regression.m4 (%union and --defines): New test,
20642 demonstrating a current bug in the obstack implementation.
20643
a35f64ea
AD
206442000-11-17 Akim Demaille <akim@epita.fr>
20645
20646 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
20647 macros.
20648 Use them to declare the variables which are global or local to
20649 `yyparse'.
20650
7de23534
AD
206512000-11-17 Akim Demaille <akim@epita.fr>
20652
20653 * acconfig.h: Remove, no longer used.
20654
aa7815f5
AD
206552000-11-07 Akim Demaille <akim@epita.fr>
20656
20657 * src: s/Copyright (C)/Copyright/g.
20658
5af1f549
AD
206592000-11-07 Akim Demaille <akim@epita.fr>
20660
20661 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
20662 defining.
20663 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
20664
553e2b22
AD
206652000-11-07 Akim Demaille <akim@epita.fr>
20666
20667 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
20668 Merge in a single CPP if/else.
20669
8a4f41d6
AD
206702000-11-07 Akim Demaille <akim@epita.fr>
20671
20672 * src/output.c (output): Remove useless variables.
20673 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
20674 argument `data' for consistency with the prototypes.
20675 Qualify it `const'.
20676 (obstack_copy, obstack_copy0): Rename the second argument as
20677 `address' for consistency. Qualify it `const'.
20678 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
20679 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
20680 `const' their input argument (`data' or `address').
20681 Adjust the corresponding macros to include `const' in casts.
20682
095a3fb5
AD
206832000-11-03 Akim Demaille <akim@epita.fr>
20684
20685 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
20686 s/PFILE1/BISON_HAIRY/.
20687 Adjust dependencies.
20688
d1cdce7c
AD
206892000-11-03 Akim Demaille <akim@epita.fr>
20690
090c5ebf 20691 For some reason, this was not applied.
d1cdce7c
AD
20692
20693 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
20694 `unlink': it's no longer used.
20695
9311529b
AD
206962000-11-03 Akim Demaille <akim@epita.fr>
20697
20698 * src/files.c (skeleton_find): New function, eved out of...
20699 (open_files, open_extra_files): here.
20700
d8880f69
AD
207012000-11-03 Akim Demaille <akim@epita.fr>
20702
20703 Don't use `atexit'.
20704
20705 * src/files.c (obstack_save): New function.
20706 (done): Rename as...
20707 (output_files): this.
20708 Use `obstack_save'.
20709 * src/main.c (main): Don't use `atexit' to register `done', since
20710 it no longer has to remove tmp files, just call `output_files'
20711 when there are no errors.
20712
0dbb648e
AD
207132000-11-02 Akim Demaille <akim@epita.fr>
20714
20715 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
20716 `unlink': it's no longer used.
20717 * src/files.h: Formatting changes.
20718
896fe5c1
AD
207192000-11-02 Akim Demaille <akim@epita.fr>
20720
20721 Remove the last uses of mktemp and unlink/delete.
20722
20723 * src/files.c (fdefines, ftable): Removed.
20724 (defines_ostack, table_obstack): New.
20725 Adjust dependencies of the former into uses of the latter.
20726 * src/output.c (output_short_or_char_table, output_short_table):
20727 Convert to using obstacks.
20728 * src/reader.c (copy_comment2): Accept one FILE * and two
20729 obstacks.
20730 (output_token_defines, reader_output_yylsp): Use obstacks.
20731 * src/system.h (obstack_fgrow3): New.
1f65350a 20732 * po/POTFILES.in: Adjust.
896fe5c1 20733
dd60faec
AD
207342000-11-01 Akim Demaille <akim@epita.fr>
20735
20736 Change each use of `fattrs' into a use of `attrs_obstack'.
20737
20738 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
20739 * src/files.c (fattrs): Remove.
20740 (attrs_obstack): New.
20741 Adjust all dependencies.
20742 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
20743
8c7ebe49
AD
207442000-11-01 Akim Demaille <akim@epita.fr>
20745
20746 Introduce obstacks.
20747 Change each use of `faction' into a use of `action_obstack'.
20748
20749 * lib/obstack.h, lib/obstack.c: New files.
20750 * src/files.c (faction): Remove.
20751 (action_obstack): New.
20752 Adjust all dependencies.
20753
77aee789
AD
207542000-10-20 Akim Demaille <akim@epita.fr>
20755
20756 * lib/quote.h (PARAMS): New macro. Use it.
20757
43591cec
AD
207582000-10-16 Akim Demaille <akim@epita.fr>
20759
20760 * src/output.c (output_short_or_char_table): New function.
20761 (output_short_table, output_token_translations): Use it.
20762 (goto_actions): Use output_short_table.
20763
1e9798d5
AD
207642000-10-16 Akim Demaille <akim@epita.fr>
20765
20766 * src/symtab.c (bucket_new): New function.
20767 (getsym): Use it.
20768
20769 * src/output.c (output_short_table): New argument to display the
20770 comment associated with the table.
20771 Adjust dependencies.
20772 (output_gram): Use it.
20773 (output_rule_data): Nicer output layout for YYTNAME.
20774
f282676b
AD
207752000-10-16 Akim Demaille <akim@epita.fr>
20776
20777 * src/lex.c (read_typename): New function.
20778 (lex): Use it.
20779 * src/reader.c (copy_dollar): Likewise.
20780
550a72a3
AD
207812000-10-16 Akim Demaille <akim@epita.fr>
20782
20783 * src/reader.c (copy_comment2): Expect the input stream to be on
20784 the `/' which is suspected to open a comment, instead of being
20785 called after `//' or `/*' was read.
20786 (copy_comment, copy_definition, parse_union_decl, copy_action)
20787 (copy_guard): Adjust.
20788
131e2fef
AD
207892000-10-16 Akim Demaille <akim@epita.fr>
20790
20791 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
20792 `read_signed_integer'.
20793
79282c5a
AD
207942000-10-16 Akim Demaille <akim@epita.fr>
20795
20796 * src/reader.c (copy_dollar): New function.
20797 (copy_guard, copy_action): Use it.
20798
ff4a34be
AD
207992000-10-16 Akim Demaille <akim@epita.fr>
20800
20801 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
20802 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
20803 New files, from Fileutils 4.0.27.
20804 * src/main.c (printable_version): Remove.
20805 * src/lex.c, src/reader.c: Use `quote'.
20806
208072000-10-04 Akim Demaille <akim@epita.fr>
20808
20809 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
20810
14ded682
AD
208112000-10-04 Akim Demaille <akim@epita.fr>
20812
20813 * doc/bison.texinfo: Various typos spotted by Neil Booth.
20814
8e03724b
AD
208152000-10-04 Akim Demaille <akim@epita.fr>
20816
20817 When a literal string is used to define two different tokens,
20818 `bison -v' segfaults.
20819 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
20820
20821 * tests/regression.m4: New file.
20822 Include the core of the sample provided by Piotr Gackiewicz.
20823 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
20824 properly.
20825
a9e64249
AD
208262000-10-04 Akim Demaille <akim@epita.fr>
20827
20828 * src/reader.c (parse_expect_decl): Keep `count' within the size
20829 of `buffer'.
20830 From Neil Booth.
20831
da9abf43
AD
208322000-10-02 Paul Eggert <eggert@twinsun.com>
20833
20834 * bison.s1 (yyparse): Assign the default value
20835 unconditionally, to avoid a GCC warning and make the parser a
20836 tad smaller.
20837
c33638bb
AD
208382000-10-02 Akim Demaille <akim@epita.fr>
20839
20840 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
20841 options.
20842
444c570a
AD
208432000-10-02 Akim Demaille <akim@epita.fr>
20844
20845 * src/derives.c, src/print.c, src/reduce.c: To ease the
20846 translation, move some `\n' out of the translated strings.
20847
89cab50d
AD
208482000-10-02 Akim Demaille <akim@epita.fr>
20849
20850 The location tracking mechanism is precious for parse error
20851 messages. Nevertheless, it is enabled only when `@n' is used in
20852 the grammar, which is a different issue (you can use it in error
20853 message, but not in the grammar per se). Therefore, there should
20854 be another means to enable it.
20855
20856 * src/getargs.c (getargs): Support `--locations'.
20857 (usage): Report it.
20858 * src/getargs.h (locationsflag): Export it.
20859 * src/lex.c (percent_table): Support `%locations'.
20860 * src/reader.c (yylsp_needed): Remove this variable, now replaced
20861 with `locationsflag'.
20862 * doc/bison.texinfo: Document `--locations' and `%locations'.
20863 Sort the options.
20864 * tests/calc.m4: Test it.
20865
20866 For regularity of the names, replace each
20867 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
20868 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
20869 In addition replace each `flag' with `_flag'.
20870
d6c2cba0
AD
208712000-10-02 Akim Demaille <akim@epita.fr>
20872
20873 Also test parse error messages, including with YYERROR_VERBOSE.
20874
20875 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
20876 associative).
20877 Use it to check the computations.
20878 Use it to check `nonassoc' is honored.
20879 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
20880 `--yyerror-verbose'.
20881 (_AT_CHECK_CALC): Adjust to this option.
20882 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
20883
5a35a6cb
AD
208842000-10-02 Akim Demaille <akim@epita.fr>
20885
20886 Test also `--verbose', `--defines' and `--name-prefix'. Testing
20887 the latter demonstrates a flaw in the handling of non debugging
20888 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
20889 was used in order to simplify:
20890
20891 #if YYDEBUG
20892 if (yydebug)
20893 {
20894 ...
20895 }
20896 #endif
20897
20898 into
20899
20900 if (yydebug)
20901 {
20902 ...
20903 }
20904
20905 unfortunately this leads to a CPP conflict when
20906 `--name-prefix=foo' is used since it produces `#define yydebug
20907 foodebug'.
20908
20909 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
20910 (YYDPRINTF): New macro.
20911 Spread its use.
20912 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
20913 the bison options.
20914 Also test `--verbose', `--defines' and `--name-prefix'.
20915
71da9eea
AD
209162000-10-02 Akim Demaille <akim@epita.fr>
20917
20918 Improve the readability of the produced parsers.
20919
20920 * src/bison.s1: Formatting changes.
20921 Improve the comment related to the `$' mark.
20922 (yydefault): Don't fall through to `yyresume': `goto' there.
20923 * src/output.c (output_parser): When the `$' is met, skip the end
20924 of its line.
20925 New variable, `number_of_dollar_signs', to check there's exactly
20926 one `$' in the parser skeleton.
20927
95e36146
AD
209282000-10-02 Akim Demaille <akim@epita.fr>
20929
20930 * lib/xstrdup.c: New file, from the fileutils.
20931 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
20932 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
20933 instead of strlen + xmalloc + strcpy.
20934 * src/symtab.c (copys): Remove, use xstrdup instead.
20935
d7020c20
AD
209362000-10-02 Akim Demaille <akim@epita.fr>
20937
20938 * src/gram.h (associativity): New enum type which replaces the
20939 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
20940 `right_assoc', `left_assoc' and `non_assoc'.
20941 Adjust all dependencies.
20942 * src/reader.c: Formatting changes.
20943 (LTYPESTR): Don't define it, use it as a literal in
20944 `reader_output_yylsp'.
20945 * src/symtab.h (symbol_class): New enum type which replaces the
20946 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
20947 `sunknown', `stoken and `snterm'.
20948
1916f98e
AD
209492000-10-02 Akim Demaille <akim@epita.fr>
20950
20951 * src/getargs.c (fixed_outfiles): Rename as...
20952 (yaccflag): for consistency and accuracy.
20953 Adjust dependencies.
20954
d7913476
AD
209552000-10-02 Akim Demaille <akim@epita.fr>
20956
20957 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
20958 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
20959 difficult and introduced a lot of core dump. It turns out that
20960 Bison used an implementation of `xmalloc' based on `calloc', and
20961 at various places it does depend upon the initialization to 0. I
20962 have not tried to isolate the pertinent places, and all the former
20963 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
20964 someone should address this issue.
20965
20966 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
20967 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
20968 files.
20969 Adjust dependencies.
20970 * src/warshall.h: New file.
20971 Propagate.
20972
340ef489
AD
209732000-10-02 Akim Demaille <akim@epita.fr>
20974
20975 Various anti-`extern in *.c' changes.
20976
20977 * src/system.h: Include `assert.h'.
20978
b2ca4022
AD
209792000-10-02 Akim Demaille <akim@epita.fr>
20980
20981 * src/state.h (nstates, final_state, first_state, first_shift)
20982 (first_reduction): Move their exportation from here...
20983 * src/LR0.h: to here.
20984 Adjust dependencies.
20985 * src/getargs.c (statisticsflag): New variable.
20986 Add support for `--statistics'.
20987 Adjust dependencies.
20988
20989 Remove a lot of now useless `extern' statements in most files.
20990
403b315b
AD
209912000-10-02 Akim Demaille <akim@epita.fr>
20992
20993 * src/LR0.h: New file.
20994 Propagate its use.
20995
07a58c13
AD
209962000-10-02 Akim Demaille <akim@epita.fr>
20997
20998 * src/print.h: New file.
20999 Propagate its use.
21000 * src/print.c: Formatting and ordering changes.
21001 (verbose, terse): Replace with...
21002 (print_results): this new function.
21003 Adjust dependencies.
21004
0619caf0
AD
210052000-10-02 Akim Demaille <akim@epita.fr>
21006
21007 * src/conflicts.c (conflict_report): New function.
21008 (conflict_log, verbose_conflict_log): Replace with...
21009 (print_conflicts): this function.
21010 Adjust dependencies.
21011 * src/conflicts.h: New file.
21012 Propagate its inclusion.
21013
3519ec76
AD
210142000-10-02 Akim Demaille <akim@epita.fr>
21015
21016 * src/nullable.h: New file.
21017 Propagate its inclusion.
21018 * src/nullable.c: Formatting changes.
21019
015acc48
AD
210202000-10-02 Akim Demaille <akim@epita.fr>
21021
21022 * src/reduce.h: New file.
21023 Propagate its inclusion.
21024 * src/reduce.c: Topological sort and other formatting changes.
21025 (bool, TRUE, FALSE): Move their definition to...
21026 * src/system.h: here.
21027
8963a27b
AD
210282000-10-02 Akim Demaille <akim@epita.fr>
21029
21030 * src/files.c: Formatting changes.
21031 (tryopen, tryclose, openfiles): Rename as...
21032 (xfopen, xfclose, open_files): this.
21033 (stringappend): static.
21034 * src/files.h: Complete the list of exported symbols.
21035 Propagate its use.
21036
a70083a3
AD
210372000-10-02 Akim Demaille <akim@epita.fr>
21038
21039 * src/reader.h: New file.
21040 Propagate its use instead of tedious list of `extern' and
21041 prototypes.
21042 * src/reader.c: Formatting changes, topological sort,
21043 s/register//.
21044
abadc117
AD
210452000-10-02 Akim Demaille <akim@epita.fr>
21046
21047 * src/lex.h: Prototype `lex.c' exported functions.
21048 * src/reader.c: Adjust.
21049 * src/lex.c: Formatting changes.
21050 (safegetc): Rename as...
21051 (xgetc): this.
21052
720d742f
AD
210532000-10-02 Akim Demaille <akim@epita.fr>
21054
21055 * src/lalr.h: New file.
21056 Propagate its inclusion instead of prototypes and `extern'.
21057 * src/lalr.c: Formatting changes, topological sorting etc.
21058
f2acea59
AD
210592000-10-02 Akim Demaille <akim@epita.fr>
21060
21061 * src/output.c (token_actions): Introduce a temporary array,
21062 YYDEFACT, that makes it possible for this function to use
21063 output_short_table.
21064
d019d655
AD
210652000-10-02 Akim Demaille <akim@epita.fr>
21066
21067 `user_toknums' is output as a `short[]' in `output.c', while it is
21068 defined as a `int[]' in `reader.c'. For consistency with the
21069 other output tables, `user_toknums' is now defined as a table of
21070 shorts.
21071
21072 * src/reader.c (user_toknums): Be a short table instead of an int
21073 table.
21074 Adjust dependencies.
21075
21076 Factor the short table outputs.
21077
21078 * src/output.c (output_short_table): New function.
21079 * src/output.c (output_gram, output_stos, output_rule_data)
21080 (output_base, output_table, output_check): Use it.
21081
6c89f1c1
AD
210822000-10-02 Akim Demaille <akim@epita.fr>
21083
21084 * src/output.c (output): Topological sort of the functions, in
21085 order to get rid of the `static' prototypes.
21086 No longer use `register'.
21087 * src/output.h: New file.
21088 Propagate its inclusion in files explicitly prototyping functions
21089 from output.c.
21090
d9efd181
AD
210912000-09-21 Akim Demaille <akim@epita.fr>
21092
21093 * src/atgeneral.m4: Update from Autoconf.
21094
c29240e7 210952000-09-21 Akim Demaille <akim@epita.fr>
2fa6973e
AD
21096
21097 * src/closure.h: New file.
21098 * src/closure.c: Formatting changes, topological sort over the
21099 functions, use of closure.h.
21100 (initialize_closure, finalize_closure): Rename as...
21101 (new_closure, free_closure): these. Adjust dependencies.
21102 * src/LR0.c: Formatting changes, topological sort, use of
21103 cloture.h.
21104 (initialize_states): Rename as...
21105 (new_states): this.
21106 * src/Makefile.am (noinst_HEADERS): Adjust.
21107
499daa50
AD
211082000-09-20 Akim Demaille <akim@epita.fr>
21109
21110 * src/acconfig.h: Don't protect config.h against multiple
21111 inclusion.
21112 Don't define PARAMS.
21113 * src/system.h: Define PARAMS.
21114 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
21115 purpose of config.h. system.h must not try to fix wrong
21116 definitions in config.h.
21117
cc84fd5d
AD
211182000-09-20 Akim Demaille <akim@epita.fr>
21119
21120 * src/derives.h: New file.
21121 * src/main.c, src/derives.h: Use it.
21122 Formatting changes.
21123 * src/Makefile.am (noinst_HEADERS): Adjust.
21124
db5b3a89
AD
211252000-09-20 Akim Demaille <akim@epita.fr>
21126
21127 * tests/atgeneral.m4: Update from Autoconf.
21128 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
21129 (AT_CHECK_CALC): New macros.
21130 Use these macros to test bison with options `', `--raw',
21131 `--debug', `--yacc', `--yacc --debug'.
21132
ceed8467
AD
211332000-09-19 Akim Demaille <akim@epita.fr>
21134
21135 * src/output.c: Formatting changes.
21136 * src/machine.h: Remove, leaving its contents in...
21137 * src/system.h: here.
21138 Include stdio.h.
21139 Adjust all dependencies on stdio.h and machine.h.
21140 * src/getargs.h: New file.
21141 Let all `extern' declarations about getargs.c be replaced with
21142 inclusion of `getargs.h'.
21143 * src/Makefile.am (noinst_HEADERS): Adjust.
21144
21145 * tests/calc.m4 (yyin): Be initialized in main, not on the global
21146 scope.
21147 (yyerror): Returns void, not int.
21148 * doc/bison.texinfo: Formatting changes.
21149
05a1d24b
AD
211502000-09-19 Akim Demaille <akim@epita.fr>
21151
21152 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
21153 portable.
21154
cbd25751
AD
211552000-09-18 Akim Demaille <akim@epita.fr>
21156
21157 * configure.in: Append WARNING_CFLAGS to CFLAGS.
21158 * src/Makefile.am (INCLUDES): Don't.
21159 Be ready to fetch headers in lib/.
21160
13863333
AD
211612000-09-18 Akim Demaille <akim@epita.fr>
21162
21163 * doc/bison.texinfo: Update the copyright.
21164 ANSIfy and GNUify the examples.
21165 Remove the old menu.
21166
0d533154
AD
211672000-09-18 Akim Demaille <akim@epita.fr>
21168
21169 First set of tests: use the `calc' example from the documentation.
21170
21171 * src/bison.s1 (yyparse): Condition the code using `yytname' which
21172 is defined only when YYDEBUG is.
21173 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
21174 * src/files.c (tryopen, tryclose): Formatting changes.
21175 Move to the top and be static.
21176 * src/reader.c (read_signed_integer): Likewise.
21177 * tests/calc.m4: New file.
21178 * Makefile.am, suite.m4: Adjust.
21179 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
21180
e79137ac
AD
211812000-09-18 Akim Demaille <akim@epita.fr>
21182
21183 Add support for an Autotest test suite for Bison.
21184
21185 * m4/m4.m4, m4/atconfig.m4: New files.
21186 * m4/Makefile.am (EXTRA_DIST): Adjust.
21187 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
21188 files.
21189 * src/getargs.c: Display a more standard --version message.
21190 * src/reader.c (reader): Formatting changes.
21191 No longer depend upon VERSION_STRING.
21192 * configure.in: No longer use `dnl'.
21193 Set up the test suite and the new directory `tests/.
21194 (VERSION_STRING): Remove.
21195
27821bff
AD
211962000-04-14 Akim Demaille <akim@epita.fr>
21197
21198 * src/reader.c (copy_comment2): New function, same as former
21199 `copy_comment', but outputs into two FILE *.
21200 (copy_comment): Use it.
21201 (parse_union_decl): Use it.
21202 (get_type, parse_start_decl): Use the same `invalid' message.
21203 (parse_start_decl, parse_union_decl): Use the same `multiple'
21204 message.
21205 (parse_union_decl, copy_guard, copy_action): Use the same
21206 `unmatched' message.
21207 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
21208
cfe5fbc0
AD
212092000-03-31 Akim Demaille <akim@epita.fr>
21210
21211 * src/files.c (tryopen, tryclose): Move to the top.
21212 Be static.
21213
cb7db13e
AD
212142000-03-31 Akim Demaille <akim@epita.fr>
21215
21216 * src/main.c (main): Don't call `done', exit does it.
21217
a0f6b076
AD
212182000-03-31 Akim Demaille <akim@epita.fr>
21219
36281465
AD
21220 * allocate.c: s/return (foo)/return foo/.
21221 * lalr.c: Likewise.
21222 * LR0.c: Likewise.
21223 * output.c: Likewise.
21224 * reader.c: Likewise.
21225 * symtab.c: Likewise.
21226 * vmsgetargs.c: Likewise.
21227
212282000-03-31 Akim Demaille <akim@epita.fr>
21229
21230 Clean up the error reporting functions.
a0f6b076
AD
21231
21232 * src/report.c: New file.
21233 * src/report.h: Likewise.
21234 * src/Makefile.am: Adjust.
21235 * m4/error.m4: New file.
21236 * m4/Makefile.am: Adjust.
21237 * configure.in (jm_PREREQ_ERROR): Call it.
21238 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
21239 Remove.
21240 (fatal, fatals): Remove. All callers use complain.c::fatal.
21241 (warn, warni, warns, warnss, warnss): Remove. All callers use
21242 complain.c::complain.
21243 (toomany): Remove, use fatal instead.
21244 * src/files.c (done): No argument, use complain_message_count.
21245 * src/main.c (main): Register `done' to `atexit'.
21246
21247 * src/getargs.c (usage): More `fputs', less `fprintf'.
21248
18539825
AD
212492000-03-28 Akim Demaille <akim@epita.fr>
21250
21251 * lib/: New directory.
21252 * Makefile.am (SUBDIRS): Adjust.
21253 * configure.in: Adjust.
21254 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
21255 useless.
21256 * src/alloca.c: Moved to lib/.
21257 * src/getopt.c: Likewise.
21258 * src/getopt1.c: Likewise.
21259 * src/getopt.h: Likewise.
21260 * src/ansi2knr.c: Likewise.
21261 * src/ansi2knr.1: Likewise.
21262 * src/Makefile.am: Adjust.
21263 * lib/Makefile.am: New file.
21264
9f306f2a
AD
212652000-03-28 Akim Demaille <akim@epita.fr>
21266
21267 * src/getargs.c (usage): Refresh the help message.
21268
0ba347b6
AD
212692000-03-17 Akim Demaille <akim@epita.fr>
21270
21271 * src/getopt1.c: Updated from textutils 2.0e
21272 * src/getopt.c: Likewise.
21273 * src/getopt.h: Likewise.
21274
dbe7f271
AD
212752000-03-17 Akim Demaille <akim@epita.fr>
21276
21277 * src/Makefile.am (bison.simple): Fix the awk program: quote only
21278 the file name, not the whole `#line LINE FILE'.
21279
75bbe78d
AD
212802000-03-17 Akim Demaille <akim@epita.fr>
21281
21282 On syntax errors, report the token on which we choked.
21283
aa5fd0ee
AD
21284 * src/bison.s1 (yyparse): In the label yyerrlab, when
21285 YYERROR_VERBOSE, add yychar in msg.
75bbe78d 21286
7b306f52
AD
212872000-03-17 Akim Demaille <akim@epita.fr>
21288
aa5fd0ee 21289 * src/reader.c (copy_at): New function.
7b306f52
AD
21290 (copy_guard): Use it.
21291 (copy_action): Use it.
21292
e87b5700
AD
212932000-03-17 Akim Demaille <akim@epita.fr>
21294
21295 Be kind to translators, save some useless translations.
21296
aa5fd0ee 21297 * src/main.c (banner): New function.
e87b5700
AD
21298 (fatal_banner): Use it.
21299 (warn_banner): Use it.
21300
ae3c3164
AD
213012000-03-17 Akim Demaille <akim@epita.fr>
21302
aa5fd0ee
AD
21303 * src/reader.c (copy_definition): Use copy_string and
21304 copy_comment. Removed now unused `match', `ended',
21305 `cplus_comment'.
ae3c3164
AD
21306 (copy_comment, copy_string): Moved, to be visible from
21307 copy_definition.
21308
4dc58e7c
AD
213092000-03-17 Akim Demaille <akim@epita.fr>
21310
aa5fd0ee
AD
21311 * src/reader.c (copy_string): Declare `static inline'. No
21312 problems with inline, since it is checked by configure.
4dc58e7c
AD
21313 (copy_comment): Likewise.
21314
0a6384c4
AD
213152000-03-17 Akim Demaille <akim@epita.fr>
21316
aa5fd0ee 21317 * src/reader.c (packsymbols): Formatting changes.
0a6384c4 21318
3cef001a
AD
213192000-03-17 Akim Demaille <akim@epita.fr>
21320
aa5fd0ee 21321 * src/reader.c (copy_comment): New function, factored out from:
3cef001a
AD
21322 (copy_action): Use it. Removed now unused `match', `ended',
21323 `cplus_comment'.
21324 (copy_guard): Likewise.
21325
ca36d2ef
AD
213262000-03-17 Akim Demaille <akim@epita.fr>
21327
aa5fd0ee 21328 * src/reader.c (copy_string): New function, factored out from:
ca36d2ef
AD
21329 (copy_action): Use it.
21330 (copy_guard): Likewise.
21331
6666f98f
AD
213322000-03-17 Akim Demaille <akim@epita.fr>
21333
21334 Change the handling of @s so that they behave exactly like $s.
21335 There is now a pseudo variable @$ (readble and writable), location
21336 of the lhs of the rule (by default ranging from the location of
21337 the first symbol of the rhs, to the location of the last symbol,
21338 or, if the rhs is empty, YYLLOC).
21339
21340 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
21341 yyval.
21342 (yyparse): When providing a default semantic action, provide a
21343 default location action.
21344 (after the $): No longer change `*YYLSP', just stack YYLOC the
21345 same way you stack YYVAL.
21346 * src/reader.c (read_declarations): Use warns.
21347 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
21348 (copy_action, case '@'): Likewise.
21349 Use a standard error message, to save useless work from
21350 translators.
21351
41aca2e0
AD
213522000-03-17 Akim Demaille <akim@epita.fr>
21353
aa5fd0ee
AD
21354 * src/bison.s1: Formatting and cosmetics changes.
21355 * src/reader.c: Likewise.
41aca2e0
AD
21356 Update the Copyright notice.
21357
dc08c1d5
AD
213582000-03-17 Akim Demaille <akim@epita.fr>
21359
aa5fd0ee
AD
21360 * src/bison.s1 (#line): All set to `#line' only, since the
21361 Makefile now handles them.
dc08c1d5 21362
9ee3c97b
AD
213632000-03-16 Akim Demaille <akim@epita.fr>
21364
21365 * src/output.c (output_rule_data): Output the documentation of
21366 some of the tables.
21367 (Copyright notice): Update.
21368 Formatting changes.
21369
0de741ca
AD
213702000-03-16 Akim Demaille <akim@epita.fr>
21371
21372 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
21373 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
21374 One `#if YYDEBUG' remains, since it uses variables which are
21375 defined only if `YYDEBUG != 0'.
21376
bb10be54
AD
213772000-03-16 Akim Demaille <akim@epita.fr>
21378
21379 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
21380 and related variables so that the similarities are highlighted.
21381
b07b484a
AD
213822000-03-16 Akim Demaille <akim@epita.fr>
21383
21384 * src/bison.s1: Properly indent CPP directives.
21385
361f60b3
AD
213862000-03-16 Akim Demaille <akim@epita.fr>
21387
21388 * src/bison.s1: Properly indent the `alloca' CPP section.
21389
8c44d3ec
AD
213902000-03-16 Akim Demaille <akim@epita.fr>
21391
21392 Do not hard code values of directories in `configure.in'.
21393 Update the `configure' tool chain.
21394
21395 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
21396 src/makefile.am.
21397 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
21398 (AC_OUTPUT): Add m4/Makefile.
21399 Bump to bison 1.28a, 1.29 has never been released.
21400 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
21401 handled via src/Makefile.am.
21402 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
21403 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
21404 autoheader.
21405 * Makefile.am (SUBDIRS): Add m4.
21406 (ACLOCAL_AM_FLAGS): New variable.
21407 (AUTOMAKE_OPTIONS): Add check-news.
21408 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
21409 the proper line number and file name.
21410 (DEFS): Propagate the location of bison library files and of the
21411 locale files.
21412 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
21413 builddir.
21414 * acinclude.m4: Remove, replaced by the directory m4.
21415 * m4/Makefile.am (EXTRA_DIST): New variable.
21416 * m4/gettext.m4: New file, from the fileutils.
21417 * m4/lcmessage.m4: Likewise
21418 * m4/progtest.m4: Likewise.
21419 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
21420
f95997e7
AD
214212000-03-10 Akim Demaille <akim@epita.fr>
21422
21423 * src/closure.c:
21424 Formatting changes of various comments.
21425 Respect the GNU coding standards at various places.
21426 Don't use `_()' when no translation is needed.
21427
214281999-12-13 Jesse Thilo <jthilo@gnu.org>
21429
21430 * src/files.c:
21431 OS/2 honors TMPDIR environment variable.
21432
214331999-12-13 Jesse Thilo <jthilo@gnu.org>
21434
21435 * doc/bison.texinfo: Tweaked spelling and grammar.
21436 Updated ISBN.
21437 Removed reference to price of printed copy.
21438 Mention BISON_SIMPLE and BISON_HAIRY.
21439
214401999-12-13 Jesse Thilo <jthilo@gnu.org>
21441
21442 * configure.in, NEWS:
21443 Bison 1.29 released.
21444
214451999-10-27 Jesse Thilo <jthilo@gnu.org>
21446
21447 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
21448 Added reference card.
21449
214501999-07-26 Jesse Thilo <jthilo@gnu.org>
21451
21452 * po/ru.po: Added Russian translation.
21453
214541999-07-26 Jesse Thilo <jthilo@gnu.org>
21455
21456 * configure.in: Added Russian translation.
21457
214581999-07-06 Jesse Thilo <jthilo@gnu.org>
21459
21460 * configure.in, NEWS, README:
21461 Released version 1.28.
21462
214631999-06-14 Jesse Thilo <jthilo@gnu.org>
21464
21465 * src/system.h:
21466 Squashed redefinition warning on some systems.
21467
21468 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
21469 Have configure build version string instead of relying on ANSI string
21470 concatentation.
21471
214721999-06-14 Jesse Thilo <jthilo@gnu.org>
21473
21474 * po/POTFILES.in: Got rid of version.c.
21475
214761999-06-14 Jesse Thilo <jthilo@gnu.org>
21477
21478 * acconfig.h, configure.in:
21479 Have configure build version string instead of relying on ANSI string
21480 concatentation.
21481
214821999-06-08 Jesse Thilo <jthilo@gnu.org>
21483
21484 * doc/bison.1:
21485 Dropped mention of `+' for long-named options.
21486
214871999-05-30 Jesse Thilo <jthilo@gnu.org>
21488
21489 * src/files.c: Added <unistd.h> for unlink().
21490
21491 * src/Makefile.am, src/system.h:
21492 I18n fixes.
21493
214941999-05-30 Jesse Thilo <jthilo@gnu.org>
21495
21496 * README: Added a FAQ list.
21497
21498 * configure.in, acconfig.h:
21499 I18n fixes.
21500
215011999-05-30 Jesse Thilo <jthilo@gnu.org>
21502
21503 * doc/FAQ, doc/Makefile.am:
21504 Added a FAQ list.
21505
215061999-05-19 Jesse Thilo <jthilo@gnu.org>
21507
21508 * src/alloc.h, src/symtab.h, src/version.c:
21509 Protected inclusion of "config.h" with HAVE_CONFIG_H.
21510
215111999-04-18 Jesse Thilo <jthilo@gnu.org>
21512
21513 * src/.cvsignore, src/Makefile.am:
21514 Reorganized: sources in `src', documentation in `doc'.
21515
21516 * src/lex.c (literalchar):
21517 fixed the code for escaping double quotes (thanks
21518 Jonathan Czisny.)
21519
215201999-04-18 Jesse Thilo <jthilo@gnu.org>
21521
21522 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
21523 Adjusted paths to reflect directory reorganization.
21524
215251999-04-18 Jesse Thilo <jthilo@gnu.org>
21526
21527 * doc/.cvsignore, doc/Makefile.am:
21528 Reorganized: sources in `src', documentation in `doc'.
21529
215301999-04-18 Jesse Thilo <jthilo@gnu.org>
21531
21532 * configure.in:
21533 Updated AC_INIT file to reflect directory reorganization.
21534
21535 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
21536 Reorganized: sources in `src', documentation in `doc'.
21537
215381999-04-13 Jesse Thilo <jthilo@gnu.org>
21539
21540 * src/allocate.c:
21541 Don't declare calloc() and realloc() if not necessary.
21542
215431999-04-13 Jesse Thilo <jthilo@gnu.org>
21544
21545 * configure.in, acconfig.h, acinclude.m4:
21546 Don't declare calloc() and realloc() if not necessary.
21547
215481999-03-23 Jesse Thilo <jthilo@gnu.org>
21549
21550 * po/.cvsignore: Added i18n support.
21551
215521999-03-23 Jesse Thilo <jthilo@gnu.org>
21553
21554 * acconfig.h, configure.in, Makefile.am:
21555 Added i18n support.
21556
215571999-03-22 Jesse Thilo <jthilo@gnu.org>
21558
21559 * src/bison.s1: Fixed #line numbers.
21560
215611999-03-15 Jesse Thilo <jthilo@gnu.org>
21562
21563 * po/es.po, po/fr.po, po/nl.po, po/de.po:
21564 Added PO files from Translation Project.
21565
215661999-03-03 Jesse Thilo <jthilo@gnu.org>
21567
21568 * Makefile.am:
21569 Added support for non-ANSI compilers (ansi2knr).
21570
215711999-02-16 Jesse Thilo <jthilo@gnu.org>
21572
21573 * configure.in: Bumped version number to 1.27.
21574
21575 * Makefile.am:
21576 Added `bison.simple' to list of files removed by `make distclean'.
21577
215781999-02-12 Jesse Thilo <jthilo@gnu.org>
21579
21580 * src/files.c, src/files.h:
21581 Defined locations of parser files in config.h instead of Makefile.
21582
215831999-02-12 Jesse Thilo <jthilo@gnu.org>
21584
21585 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
21586 Defined locations of parser files in config.h instead of Makefile.
21587
215881999-02-09 Jesse Thilo <jthilo@gnu.org>
21589
21590 * Makefile.am:
21591 Removed inappropriate use of $< macro.
21592
215931999-02-05 Jesse Thilo <jthilo@gnu.org>
21594
21595 * po/Makefile.in.in, po/POTFILES.in:
21596 Add `po' directory skeleton.
21597
215981999-01-27 Jesse Thilo <jthilo@gnu.org>
21599
21600 * README: Document help-bison list.
21601
21602 * configure.in: Add check for mkstemp().
21603
216041999-01-20 Jesse Thilo <jthilo@gnu.org>
21605
21606 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
21607 Hush a few compiler warnings.
21608
21609 * src/files.c:
21610 Add tryclose(), which verifies that fclose was successful.
21611 Hush a couple of compiler warnings.
21612
216131999-01-20 Jesse Thilo <jthilo@gnu.org>
21614
21615 * Makefile.am, OChangeLog:
21616 ChangeLog is now automatically generated. Include the old version as
21617 OChangeLog.
21618
216191999-01-14 Jesse Thilo <jthilo@gnu.org>
21620
21621 * 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:
21622 Update FSF address.
21623
216241999-01-14 Jesse Thilo <jthilo@gnu.org>
21625
21626 * doc/bison.texinfo: Fix formatting glitch.
21627
21628 * doc/bison.texinfo: Update FSF address.
21629
216301999-01-14 Jesse Thilo <jthilo@gnu.org>
21631
21632 * acconfig.h: Update FSF address.
21633
216341999-01-08 Jesse Thilo <jthilo@gnu.org>
21635
21636 * src/system.h:
21637 Don't define PACKAGE here, since config.h defines it.
21638
216391998-12-30 Jesse Thilo <jthilo@gnu.org>
21640
21641 * src/reader.c: Update copyright date.
21642
21643 * src/main.c:
21644 Ditch sprintf to statically-sized buffers in fatal/warn functions in
21645 favor of output directly to stderr (avoids buffer overruns).
21646
21647 * src/reader.c: Some checks for premature EOF.
21648
21649 * 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:
21650 Use prototypes if the compiler understands them.
21651
21652 * src/files.c: Honor TMPDIR on Unix hosts.
21653 Use prototypes if the compiler understands them.
21654
21655 * src/reader.c:
21656 Fix a couple of buffer overrun bugs.
21657 Use prototypes if the compiler understands them.
21658
21659 * src/system.h: Include unistd.h and ctype.h.
21660 Use #ifdef instead of #if for NLS symbols.
21661
216621998-12-30 Jesse Thilo <jthilo@gnu.org>
21663
21664 * doc/bison.texinfo:
21665 Delete comment "consider using @set for edition number, etc..." since
21666 we now are doing so.
21667
216681998-12-30 Jesse Thilo <jthilo@gnu.org>
21669
21670 * configure.in:
21671 Use prototypes if the compiler understands them.
21672
21673 * NEWS: Document 1.26 highlights.
21674
21675 * Makefile.am: Require Automake 1.3 or later.
21676
21677 * acconfig.h:
21678 Use prototypes if the compiler understands them.
21679
216801998-12-29 Jesse Thilo <jthilo@gnu.org>
21681
21682 * src/version.c:
21683 Use VERSION symbol from automake for version number.
21684
216851998-12-29 Jesse Thilo <jthilo@gnu.org>
21686
21687 * acconfig.h, configure.in, version.cin:
21688 Use VERSION symbol from automake for version number.
21689
216901998-11-28 Jesse Thilo <jthilo@gnu.org>
21691
21692 * Makefile.am:
21693 Distribute original version of simple parser (bison.s1), not built
21694 version (bison.simple).
21695
216961998-11-28 Jesse Thilo <jthilo@gnu.org>
21697
21698 * doc/bison.texinfo: Add info dir entry.
21699
21700 * doc/bison.texinfo:
21701 Let automake put version number into documentation.
21702
217031998-11-26 Jesse Thilo <jthilo@gnu.org>
21704
21705 * src/bison.cld, src/build.com, src/vmshlp.mar:
21706 Add non-RCS files from /gd/gnu/bison.
21707
217081998-11-26 Jesse Thilo <jthilo@gnu.org>
21709
21710 * doc/bison.1:
21711 Document the BISON_HAIRY and BISON_SIMPLE variables.
21712
217131998-11-25 Jesse Thilo <jthilo@gnu.org>
21714
21715 * src/version.c: Build version.c automatically.
21716
21717 * src/reader.c:
21718 Fix token numbering (used to start at 258, not 257).
21719
21720 * src/system.h: Include config.h.
21721
21722 * src/getargs.c: Update bug report address.
21723
21724 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
21725 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
21726
217271998-11-25 Jesse Thilo <jthilo@gnu.org>
21728
21729 * Makefile.am:
21730 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
21731
21732 * configure.in, version.cin:
21733 Build version.c automatically.
21734
21735 * AUTHORS: Add AUTHORS file.
21736
21737 * README: Update bug report address.
21738
21739 * bison.simple:
21740 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
21741
21742 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
21743 Add automake stuff.
21744
217451998-11-25 Jesse Thilo <jthilo@gnu.org>
21746
21747 * doc/bison.texinfo: Clean up some formatting.
21748
217491998-05-05 Richard Stallman <rms@gnu.org>
21750
21751 * doc/bison.texinfo:
21752 Explain better why to make a pure parser.
21753
217541998-01-05 Richard Stallman <rms@gnu.org>
21755
21756 * src/files.c (openfiles):
21757 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
21758 find a temporary directory, if possible. Do not unlink files while
21759 they are open.
21760
217611997-08-25 Richard Stallman <rms@gnu.org>
21762
21763 * src/reader.c (stack_offset;):
21764 Change some warni to warns.
21765
21766 * src/lex.c (literalchar): Use warns, not warni.
21767
217681997-06-28 Richard Stallman <rms@gnu.org>
21769
21770 * src/bison.s1: Add a Bison version comment.
21771
21772 * src/main.c (fatal, warn, berror):
21773 Use program_name.
21774
217751997-06-28 Richard Stallman <rms@gnu.org>
21776
21777 * Makefile.in (bison_version): New variable.
21778 (dist): Use that variable.
21779 (bison.s1): Substitute the Bison version into bison.simple.
21780
21781 * bison.simple: Add a Bison version comment.
21782
217831997-06-18 Richard Stallman <rms@gnu.org>
21784
21785 * src/main.c (fatal, warn, berror):
21786 Make error messages standard.
21787 (toomany): Improve error message text.
21788
21789 * 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:
21790 new.h renamed to alloc.h.
21791
217921997-06-18 Richard Stallman <rms@gnu.org>
21793
21794 * Makefile.in: new.h renamed to alloc.h.
21795
217961997-05-24 Richard Stallman <rms@gnu.org>
21797
21798 * src/lex.c (literalchar):
21799 Fix the code for escaping \, " and '.
21800
21801 (lex): Avoid trouble when there are many chars
21802 to discard in a char literal with just several chars in it.
21803
218041997-05-17 Richard Stallman <rms@gnu.org>
21805
21806 * src/bison.s1:
21807 Use malloc, if using alloca is troublesome.
21808 (YYSTACK_USE_ALLOCA): New flag macro.
21809 Define it for some systems and compilers.
21810 (YYSTACK_ALLOC): New macro.
21811 (yyparse): Use YYSTACK_ALLOC to allocate stack.
21812 If it was malloc'd, free it.
21813
218141997-05-17 Richard Stallman <rms@gnu.org>
21815
21816 * bison.simple:
21817 Use malloc, if using alloca is troublesome.
21818 (YYSTACK_USE_ALLOCA): New flag macro.
21819 Define it for some systems and compilers.
21820 (YYSTACK_ALLOC): New macro.
21821 (yyparse): Use YYSTACK_ALLOC to allocate stack.
21822 If it was malloc'd, free it.
21823
218241997-04-23 Richard Stallman <rms@gnu.org>
21825
21826 * src/bison.s1:
21827 (alloca) [__hpux]: Always define as __builtin_alloca.
21828
218291997-04-23 Richard Stallman <rms@gnu.org>
21830
21831 * bison.simple:
21832 (alloca) [__hpux]: Always define as __builtin_alloca.
21833
218341997-04-22 Richard Stallman <rms@gnu.org>
21835
21836 * src/bison.s1:
21837 [__hpux]: Include alloca.h (right for HPUX 10)
21838 instead of declaring alloca (right for HPUX 9).
21839
21840 * src/bison.s1 (__yy_memcpy):
21841 Declare arg `count' as unsigned int.
21842 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
21843
218441997-04-22 Richard Stallman <rms@gnu.org>
21845
21846 * bison.simple:
21847 [__hpux]: Include alloca.h (right for HPUX 10)
21848 instead of declaring alloca (right for HPUX 9).
21849
21850 * bison.simple (__yy_memcpy):
21851 Declare arg `count' as unsigned int.
21852 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
21853
218541997-01-03 Richard Stallman <rms@gnu.org>
21855
21856 * src/allocate.c: [__STDC__ or _MSC_VER]:
21857 Declare calloc and realloc to return void *.
21858
218591997-01-02 Richard Stallman <rms@gnu.org>
21860
21861 * src/system.h:
21862 [_MSC_VER]: Include stdlib.h and process.h.
21863 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
21864
21865 * src/main.c (main): Return FAILURE as a value.
21866 (printable_version): Declare arg as int, not char.
21867
218681997-01-02 Richard Stallman <rms@gnu.org>
21869
21870 * Makefile.in (dist):
21871 Explicitly check for symlinks, and copy them.
21872
218731996-12-19 Richard Stallman <rms@gnu.org>
21874
21875 * src/files.c:
21876 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
21877
218781996-12-18 Paul Eggert <eggert@gnu.org>
21879
21880 * src/bison.s1 (yyparse):
21881 If __GNUC__ and YYPARSE_PARAM are both defined,
21882 declare yyparse to have a void * argument.
21883
218841996-12-18 Paul Eggert <eggert@gnu.org>
21885
21886 * bison.simple (yyparse):
21887 If __GNUC__ and YYPARSE_PARAM are both defined,
21888 declare yyparse to have a void * argument.
21889
218901996-12-17 Richard Stallman <rms@gnu.org>
21891
21892 * src/reduce.c (nbits): Add some casts.
21893
218941996-08-12 Richard Stallman <rms@gnu.org>
21895
21896 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
21897
218981996-08-12 Richard Stallman <rms@gnu.org>
21899
21900 * bison.simple: Test _MSDOS as well as _MSDOS_.
21901
219021996-07-31 Richard Stallman <rms@gnu.org>
21903
21904 * src/bison.s1:
21905 [__sun && __i386]: Include alloca.h.
21906
219071996-07-31 Richard Stallman <rms@gnu.org>
21908
21909 * bison.simple:
21910 [__sun && __i386]: Include alloca.h.
21911
219121996-07-30 Richard Stallman <rms@gnu.org>
21913
21914 * src/bison.s1: Comment change.
21915
21916 * src/bison.s1: Test _MSDOS_, not MSDOS.
21917
219181996-07-30 Richard Stallman <rms@gnu.org>
21919
21920 * bison.simple: Comment change.
21921
21922 * bison.simple: Test _MSDOS_, not MSDOS.
21923
219241996-06-01 Richard Stallman <rms@gnu.org>
21925
21926 * 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:
21927 Insert `_' macro around many string constants.
21928
21929 * src/main.c:
21930 Insert `_' macro around many string constants.
21931
21932 (main): Call setlocale, bindtextdomain and textdomain.
21933
21934 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
21935 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
21936 [ENABLE_NLS]: Include libintl.h.
21937 [ENABLE_NLS] (gettext): Define.
21938 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
21939 (N_, PACKAGE, LOCALEDIR): New macros.
21940
219411996-06-01 Richard Stallman <rms@gnu.org>
21942
21943 * POTFILES.in: New file.
21944
21945 * Makefile.in (allocate.o):
21946 Define target explicitly.
21947
21948 * Makefile.in (CFLAGS): Set to @CFLAGS@.
21949 (LDFLAGS): Set to @LDFLAGS@.
21950 (configure): Run autoconf only if preceding `cd' succeeds.
21951 (bison.s1): Redirect output to temporary file then move the
21952 temporary to the target, rather than redirecting directly to bison.s1.
21953 (clean): Remove config.status and config.log.
21954 (distclean): Don't remove config.status here.
21955
219561996-05-12 Richard Stallman <rms@gnu.org>
21957
21958 * src/bison.s1:
21959 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
21960
219611996-05-12 Richard Stallman <rms@gnu.org>
21962
21963 * bison.simple:
21964 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
21965
219661996-05-11 Richard Stallman <rms@gnu.org>
21967
21968 * src/bison.s1 (__yy_memcpy):
21969 Really reorder the args, as was supposedly done on Feb 14 1995.
21970 (yyparse): Calls changed accordingly.
21971
219721996-05-11 Richard Stallman <rms@gnu.org>
21973
21974 * Makefile.in (dist): Don't use $(srcdir).
21975
21976 * bison.simple (__yy_memcpy):
21977 Really reorder the args, as was supposedly done on Feb 14 1995.
21978 (yyparse): Calls changed accordingly.
21979
219801996-01-27 Richard Stallman <rms@gnu.org>
21981
21982 * src/output.c (output_rule_data):
21983 Test YYERROR_VERBOSE in the conditional
21984 around the definition of ttyname.
21985
219861995-12-29 Richard Stallman <rms@gnu.org>
21987
21988 * src/bison.s1:
21989 Fix line numbers in #line commands.
21990
219911995-12-29 Richard Stallman <rms@gnu.org>
21992
21993 * bison.simple:
21994 Fix line numbers in #line commands.
21995
219961995-12-27 Richard Stallman <rms@gnu.org>
21997
21998 * src/bison.s1 (YYPARSE_PARAM_DECL):
21999 In C++, make it always null.
22000 (YYPARSE_PARAM_ARG): New macro.
22001 (yyparse): Use YYPARSE_PARAM_ARG.
22002
220031995-12-27 Richard Stallman <rms@gnu.org>
22004
22005 * bison.simple (YYPARSE_PARAM_DECL):
22006 In C++, make it always null.
22007 (YYPARSE_PARAM_ARG): New macro.
22008 (yyparse): Use YYPARSE_PARAM_ARG.
22009
220101995-11-29 Richard Stallman <rms@gnu.org>
22011
22012 * doc/bison.texinfo:
22013 Describe literal string tokens, %raw, %no_lines, %token_table.
22014
220151995-11-29 Daniel Hagerty <hag@gnu.org>
22016
22017 * doc/bison.texinfo: Fixed update date
22018
220191995-10-16 Richard Stallman <rms@gnu.org>
22020
22021 * src/version.c: Version 1.25.
22022
220231995-10-16 Richard Stallman <rms@gnu.org>
22024
22025 * NEWS: *** empty log message ***
22026
220271995-10-16 Richard Stallman <rms@gnu.org>
22028
22029 * doc/bison.1, doc/bison.rnh:
22030 Add new options.
22031
220321995-10-15 Richard Stallman <rms@gnu.org>
22033
22034 * src/vmsgetargs.c, src/getargs.c:
22035 Added -n, -k, and -raw switches.
22036 (noparserflag, toknumflag, rawtoknumflag): New variables.
22037
22038 * src/symtab.h (SALIAS):
22039 New #define for adding aliases to %token.
22040 (struct bucket): Added `alias' field.
22041
22042 * src/reduce.c (reduce_grammar):
22043 Revise error message.
22044 (print_notices): Remove final `.' from error message.
22045
22046 * src/reader.c (reader_output_yylsp):
22047 New function.
22048 (readgram): Use `#if 0' around code that accepted %command
22049 inside grammar rules: The documentation doesn't allow it,
22050 and it will fail since the %command processors scan for the next %.
22051 (parse_token_decl): Extended the %token
22052 declaration to allow a multi-character symbol as an alias.
22053 (parse_thong_decl): New function.
22054 (read_declarations): Added %thong declarations.
22055 (read_declarations): Handle NOOP to deal with allowing
22056 % declarations as another means to specify the flags.
22057 (readgram): Allow %prec prior to semantics embedded in a rule.
22058 (skip_to_char, read_declarations, copy_definition)
22059 (parse_token_decl, parse_start_decl, parse_type_decl)
22060 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
22061 (get_type_name, copy_guard, copy_action, readgram)
22062 (get_type, packsymbols): Revised most error messages.
22063 Changed `fatal' to `warnxxx' to avoid aborting for error.
22064 Revised and use multiple warnxxx functions to avoid using VARARGS1.
22065 (read_declarations): Improve the error message for
22066 an invalid character. Do not abort.
22067 (read_declarations, copy_guard, copy_action): Use
22068 printable_version to avoid unprintable characters in printed output.
22069 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
22070 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
22071 Allow the type of a non-terminal can be given
22072 more than once, as long as all specifications give the same type.
22073
22074 * src/output.c:
22075 (output_headers, output_trailers, output, output_gram)
22076 (output_rule_data): Implement noparserflag variable.
22077 Implement toknumflag variable.
22078 (output): Call reader_output_yylsp to output LTYPESTR.
22079
22080 * src/main.c (main):
22081 If reader sees an error, don't process the grammar.
22082 (fatals): Updated to not use VARARGS1.
22083 (printable_version, int_to_string, warn, warni, warns, warnss)
22084 (warnsss): New error reporting functions. Avoid abort for error.
22085
22086 * src/lex.h:
22087 Added THONG and NOOP for alias processing.
22088 Added SETOPT for the new code that allows setting options with %flags.
22089
22090 * src/lex.c:
22091 Include getopt.h. Add some extern decls.
22092 (safegetc): New function to deal with EOF gracefully.
22093 (literalchar); new function to deal with reading \ escapes.
22094 (lex): Use literalchar.
22095 (lex): Implemented "..." tokens.
22096 (literalchar, lex, parse_percent_token): Made tokenbuffer
22097 always contain the token. This includes growing the token
22098 buffer while reading an integer.
22099 (parse_percent_token): Replaced if-else statement with percent_table.
22100 (parse_percent_token): Added % declarations as another
22101 way to specify the flags -n, -l, and -r. Also added hooks for
22102 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
22103 major changes to files.c.
22104 (lex) Retain in the incoming stream a character following
22105 an incorrect '/'.
22106 (skip_white_space, lex): Revised most error messages
22107 and changed fatal to warn to avoid aborting.
22108 (percent_table): Added %thong declarations.
22109
22110 * src/gram.h: Comment changes.
22111
22112 * src/files.c (openfiles, open_extra_files, done):
22113 Add faction flag
22114 and actfile file. Handle noparserflag. Both for -n switch.
22115
22116 * src/conflicts.c (resolve_sr_conflict):
22117 Remove use of alloca.
22118
221191995-06-01 Jim Meyering <meyering@gnu.org>
22120
22121 * doc/bison.texinfo: *** empty log message ***
22122
221231995-05-06 Richard Stallman <rms@gnu.org>
22124
22125 * src/bison.s1: Comment change.
22126
221271995-05-06 Richard Stallman <rms@gnu.org>
22128
22129 * bison.simple: Comment change.
22130
221311995-05-03 Richard Stallman <rms@gnu.org>
22132
22133 * src/version.c: Version now 1.24.
22134
22135 * src/bison.s1: Change distribution terms.
22136
22137 * src/version.c: Version now 1.23.
22138
221391995-05-03 Richard Stallman <rms@gnu.org>
22140
22141 * doc/bison.texinfo:
22142 Rewrite "Conditions for Using Bison".
22143 Update version to 1.24.
22144
221451995-05-03 Richard Stallman <rms@gnu.org>
22146
22147 * bison.simple: Change distribution terms.
22148
221491995-02-23 Richard Stallman <rms@gnu.org>
22150
22151 * src/files.c: Test __VMS_POSIX as well as VMS.
22152
221531995-02-14 Jim Meyering <meyering@gnu.org>
22154
22155 * src/bison.s1 (__yy_memcpy):
22156 Renamed from __yy_bcopy to avoid
22157 confusion. Reverse FROM and TO arguments to be consistent with
22158 those of memcpy.
22159
221601995-02-14 Jim Meyering <meyering@gnu.org>
22161
22162 * bison.simple (__yy_memcpy):
22163 Renamed from __yy_bcopy to avoid
22164 confusion. Reverse FROM and TO arguments to be consistent with
22165 those of memcpy.
22166
221671994-11-10 David J. MacKenzie <djm@gnu.org>
22168
22169 * NEWS: reformat
22170
22171 * NEWS: New file.
22172
22173 * Makefile.in (DISTFILES): Include NEWS.
22174
22175 * Makefile.in (DISTFILES):
22176 Include install-sh, not install.sh.
22177
22178 * configure.in: Update to Autoconf v2 macro names.
22179
221801994-10-05 David J. MacKenzie <djm@gnu.org>
22181
22182 * Makefile.in: fix typo
22183
22184 * Makefile.in (prefix, exec_prefix):
22185 Let configure set them.
22186
221871994-09-28 David J. MacKenzie <djm@gnu.org>
22188
22189 * Makefile.in: Set datadir to $(prefix)/share.
22190
221911994-09-15 Richard Stallman <rms@gnu.org>
22192
22193 * src/bison.s1:
22194 Update copyright notice and GPL version.
22195
221961994-09-15 Richard Stallman <rms@gnu.org>
22197
22198 * bison.simple:
22199 Update copyright notice and GPL version.
22200
222011994-07-12 Richard Stallman <rms@gnu.org>
22202
22203 * src/reduce.c, src/reader.c:
22204 entered into RCS
22205
222061994-05-05 David J. MacKenzie <djm@gnu.org>
22207
22208 * Makefile.in: entered into RCS
22209
222101994-03-26 Richard Stallman <rms@gnu.org>
22211
22212 * src/bison.s1: entered into RCS
22213
222141994-03-26 Richard Stallman <rms@gnu.org>
22215
22216 * bison.simple: entered into RCS
22217
222181994-03-25 Richard Stallman <rms@gnu.org>
22219
22220 * src/main.c: entered into RCS
22221
222221994-03-24 Richard Stallman <rms@gnu.org>
22223
22224 * src/conflicts.c: entered into RCS
22225
222261994-01-02 Richard Stallman <rms@gnu.org>
22227
22228 * Makefile.in: *** empty log message ***
22229
222301993-11-21 Richard Stallman <rms@gnu.org>
22231
22232 * src/bison.s1: *** empty log message ***
22233
222341993-11-21 Richard Stallman <rms@gnu.org>
22235
22236 * doc/bison.texinfo: entered into RCS
22237
22238 * doc/bison.texinfo: *** empty log message ***
22239
222401993-11-21 Richard Stallman <rms@gnu.org>
22241
22242 * bison.simple: *** empty log message ***
22243
222441993-10-25 David J. MacKenzie <djm@gnu.org>
22245
22246 * doc/bison.texinfo: *** empty log message ***
22247
222481993-10-19 Richard Stallman <rms@gnu.org>
22249
22250 * src/bison.s1: *** empty log message ***
22251
222521993-10-19 Richard Stallman <rms@gnu.org>
22253
22254 * bison.simple: *** empty log message ***
22255
222561993-10-14 Richard Stallman <rms@gnu.org>
22257
22258 * src/bison.s1: *** empty log message ***
22259
222601993-10-14 Richard Stallman <rms@gnu.org>
22261
22262 * bison.simple: *** empty log message ***
22263
222641993-09-14 David J. MacKenzie <djm@gnu.org>
22265
22266 * doc/bison.texinfo: *** empty log message ***
22267
222681993-09-13 Noah Friedman <friedman@gnu.org>
22269
22270 * Makefile.in: *** empty log message ***
22271
222721993-09-10 Richard Stallman <rms@gnu.org>
22273
22274 * src/conflicts.c: *** empty log message ***
22275
22276 * src/system.h: entered into RCS
22277
222781993-09-10 Richard Stallman <rms@gnu.org>
22279
22280 * doc/bison.1: entered into RCS
22281
222821993-09-06 Noah Friedman <friedman@gnu.org>
22283
22284 * src/version.c: entered into RCS
22285
222861993-09-06 Noah Friedman <friedman@gnu.org>
22287
22288 * Makefile.in: *** empty log message ***
22289
222901993-07-30 David J. MacKenzie <djm@gnu.org>
22291
22292 * Makefile.in: *** empty log message ***
22293
222941993-07-24 Richard Stallman <rms@gnu.org>
22295
22296 * src/bison.s1: *** empty log message ***
22297
222981993-07-24 Richard Stallman <rms@gnu.org>
22299
22300 * bison.simple: *** empty log message ***
22301
223021993-07-08 David J. MacKenzie <djm@gnu.org>
22303
22304 * Makefile.in: *** empty log message ***
22305
223061993-07-04 Richard Stallman <rms@gnu.org>
22307
22308 * src/bison.s1: *** empty log message ***
22309
223101993-07-04 Richard Stallman <rms@gnu.org>
22311
22312 * bison.simple: *** empty log message ***
22313
223141993-06-26 David J. MacKenzie <djm@gnu.org>
22315
22316 * src/getargs.c: entered into RCS
22317
223181993-06-26 David J. MacKenzie <djm@gnu.org>
22319
22320 * doc/bison.texinfo: *** empty log message ***
22321
22322 * doc/bison.1: New file.
22323
223241993-06-25 Richard Stallman <rms@gnu.org>
22325
22326 * src/getargs.c: New file.
22327
223281993-06-16 Richard Stallman <rms@gnu.org>
22329
22330 * src/bison.s1: *** empty log message ***
22331
223321993-06-16 Richard Stallman <rms@gnu.org>
22333
22334 * bison.simple: *** empty log message ***
22335
223361993-06-03 Richard Stallman <rms@gnu.org>
22337
22338 * src/bison.s1: New file.
22339
223401993-06-03 Richard Stallman <rms@gnu.org>
22341
22342 * doc/bison.texinfo: *** empty log message ***
22343
223441993-06-03 Richard Stallman <rms@gnu.org>
22345
22346 * bison.simple: New file.
22347
223481993-05-19 Richard Stallman <rms@gnu.org>
22349
22350 * doc/bison.texinfo: New file.
22351
223521993-05-07 Noah Friedman <friedman@gnu.org>
22353
22354 * Makefile.in: *** empty log message ***
22355
223561993-04-28 Noah Friedman <friedman@gnu.org>
22357
22358 * src/reader.c: *** empty log message ***
22359
223601993-04-23 Noah Friedman <friedman@gnu.org>
22361
22362 * src/alloc.h: entered into RCS
22363
223641993-04-20 David J. MacKenzie <djm@gnu.org>
22365
22366 * src/version.c: *** empty log message ***
22367
22368 * src/files.c, src/allocate.c:
22369 entered into RCS
22370
22371 * src/reader.c: *** empty log message ***
22372
22373 * src/lex.c: entered into RCS
22374
22375 * src/conflicts.c: New file.
22376
22377 * src/symtab.c: entered into RCS
22378
22379 * src/alloc.h: New file.
22380
22381 * src/LR0.c: entered into RCS
22382
223831993-04-18 Noah Friedman <friedman@gnu.org>
22384
22385 * src/reader.c: New file.
22386
22387 * src/version.c: *** empty log message ***
22388
223891993-04-18 Noah Friedman <friedman@gnu.org>
22390
22391 * Makefile.in: *** empty log message ***
22392
223931993-04-17 Noah Friedman <friedman@gnu.org>
22394
22395 * Makefile.in: *** empty log message ***
22396
223971993-04-15 Richard Stallman <rms@gnu.org>
22398
22399 * src/main.c, src/files.c:
22400 New file.
22401
224021993-04-15 Noah Friedman <friedman@gnu.org>
22403
22404 * configure.in: entered into RCS
22405
22406 * configure.in: *** empty log message ***
22407
22408 * configure.in: New file.
22409
224101993-04-14 Richard Stallman <rms@gnu.org>
22411
22412 * Makefile.in: New file.
22413
224141993-04-13 Richard Stallman <rms@gnu.org>
22415
22416 * src/version.c: New file.
22417
224181993-03-25 Richard Stallman <rms@gnu.org>
22419
22420 * src/output.c: entered into RCS
22421
224221992-09-25 Richard Stallman <rms@gnu.org>
22423
22424 * configure.bat: entered into RCS
22425
224261992-06-22 Richard Stallman <rms@gnu.org>
22427
22428 * src/vmsgetargs.c: entered into RCS
22429
224301992-06-22 Richard Stallman <rms@gnu.org>
22431
22432 * doc/bison.rnh: entered into RCS
22433
224341992-04-20 David J. MacKenzie <djm@gnu.org>
22435
22436 * README: entered into RCS
22437
224381992-01-22 Richard Stallman <rms@gnu.org>
22439
22440 * src/machine.h: entered into RCS
22441
224421991-12-21 Richard Stallman <rms@gnu.org>
22443
22444 * src/lalr.c, src/closure.c:
22445 entered into RCS
22446
224471991-12-20 Richard Stallman <rms@gnu.org>
22448
22449 * src/state.h: entered into RCS
22450
224511991-12-18 Richard Stallman <rms@gnu.org>
22452
22453 * src/print.c, src/nullable.c, src/derives.c:
22454 entered into RCS
22455
224561991-11-03 David J. MacKenzie <djm@gnu.org>
22457
22458 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
22459 entered into RCS
22460
224611988-09-09 Richard Stallman <rms@gnu.org>
22462
22463 * src/bison.hairy: entered into RCS
22464
224651987-12-16 Richard Stallman <rms@gnu.org>
22466
22467 * REFERENCES: entered into RCS
dc546b0f 22468
f294a2c2 22469
04098407 22470 -----
f294a2c2 22471
04098407 22472 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
f490771b
JD
22473 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
22474 2007, 2008, 2009 Free Software Foundation, Inc.
f294a2c2 22475
04098407
PE
22476 Copying and distribution of this file, with or without
22477 modification, are permitted provided the copyright notice and this
22478 notice are preserved.