]> git.saurik.com Git - bison.git/blame - ChangeLog
Keep sub-messages aligned. Fix strings for translation.
[bison.git] / ChangeLog
CommitLineData
348f5608
AR
12009-09-19 Alex Rozenman <rozenman@gmail.com>
2
3 Keep sub-messages aligned. Fix strings for translation.
4 * src/location.h: (location_print): Add return value.
5 * src/location.c: (location_print): Return number of printed
6 characters.
7 * src/complain.h: Two new functions (complain_at_indent,
8 warn_at_indent).
9 * src/complain.cpp: Implement the alignment mechanism. Add new
10 static variable (indent_ptr). Use and update it (error_message,
11 complain_at_indent, warn_at_indent).
12 * src/scan-code.l: Fix strings for translations. Use new *_indent
13 functions (parse_ref, show_sub_messages).
14 * tests/named-ref.at: Adjust testcases.
15 * NEWS (2.5): Add an announcement about named references.
16
d93b5f50
JD
172009-09-13 Joel E. Denny <jdenny@clemson.edu>
18
19 tests: clean up push.at test group titles.
20 * tests/push.at: Remove "Push Parsing: " from test group titles
21 because these are already under the banner "Push Parsing Tests".
22
4c56b131
AR
232009-09-12 Alex Rozenman <rozenman@gmail.com>
24
25 Provide an additional sub-message for clarity.
26 Add "symbol not found in production" error message when
27 an "invalid reference" is detected in named references
28 resolution.
29 * src/scan-code.l: Update "invalid reference" case.
30 * tests/named-ref.at: Adjust test-cases.
31
93d0103d
JD
322009-09-10 Joel E. Denny <jdenny@clemson.edu>
33
34 Clean up yacc.c a little.
35 * data/yacc.c: Clean up M4 for readability, and make output
36 whitespace more consistent. For the main parse function
37 comment, instead of saying "yyparse or yypush_parse", say either
38 "yyparse" or "yypush_parse" depending on which it actually is.
39
628be6c9
JD
402009-09-03 Joel E. Denny <jdenny@clemson.edu>
41
42 Complain about unused %define variables and %code qualifiers.
43 * NEWS (2.5): Document.
44 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
45 * doc/bison.texinfo (Decl Summary): Document complaint, and
46 improve %define documentation a little otherwise.
47 * tests/input.at (Reject unused %code qualifiers): Update.
48 (%define errors): Update.
49 (%define, --define, --force-define): Update.
50 (%define backward compatibility): Update.
51 (Unused %define api.pure): Update.
52 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
53
c842365a
JD
542009-09-03 Joel E. Denny <jdenny@clemson.edu>
55
56 Use aver not assert.
57 * src/output.c: Don't include assert.h.
58 (output_skeleton): Use aver not assert.
59 * src/system.h (aver): In documentation of why, add links to
60 Paul Eggert's explanations in the mailing lists.
61
14e568d7
AR
622009-09-05 Alex Rozenman <rozenman@gmail.com>
63
64 Use "Unresolved reference" error message when no symbols were found
65 in a symbolic reference resolution. Remove .expr and -expr from
66 the shown reference when the reference is unresolved.
67 * src/scan-code.l: Change the error message, adjust location columns,
68 rename variable "exact_mode" to "explicit_bracketing".
69 * tests/named-ref.at: Adjust existing tests and add a new one.
70
dac8cc0d
AD
712009-09-03 Akim Demaille <demaille@gostai.com>
72
73 * NEWS (2.4.2): Add "Internationalization" item.
74
3710dd02
AD
752009-09-03 Akim Demaille <demaille@gostai.com>
76
77 bootstrap: fix/improve find_tool.
78 * bootstrap (find_tool): Improve error messages.
79 Fix typo about find_tool_names.
80
9852b61c
JD
812009-08-29 Joel E. Denny <jdenny@clemson.edu>
82
83 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
84 See
85 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
86 * src/scan-code.h (code_props_rule_action_init): Rename
87 named_ref arg to name so it doesn't shadow named_ref type. This
88 makes it consistent with the function definition in scan-code.l
89 anyway.
90
f37495f6
JD
912009-08-28 Joel E. Denny <jdenny@clemson.edu>
92
93 %define: accept unquoted values.
94 * NEWS (2.5): Group all %define changes together, and document
95 this one. Remove quotes in IELR and canonical LR entry.
96 * doc/bison.texinfo: Remove quotes in most examples throughout.
97 (Decl Summary): Update %define documentation.
98 (Table of Symbols): Likewise.
99 * src/ielr.c (LrType): Update documentation.
100 * src/parse-gram.y (content.opt): Add production for ID.
5bf2bf7a 101 * tests/calc.at: Remove quotes in most tests.
f37495f6
JD
102 * tests/existing.at: Likewise.
103 * tests/input.at: Likewise.
104 * tests/local.at: Likewise.
105 * tests/push.at: Likewise.
106 * tests/reduce.at: Likewise.
107 * tests/torture.at: Likewise.
108
3a414bbf
JD
1092009-08-28 Joel E. Denny <jdenny@clemson.edu>
110
111 %define lr.type: make values lowercase IDs.
112 That is, "LALR" => "lalr", "IELR" => "ielr", and
113 "canonical LR" => "canonical-lr".
114 * NEWS (2.5): Update documentation.
115 * doc/bison.texinfo (Decl Summary): Likewise.
116 * src/ielr.c (ielr): Use new values.
117 * src/ielr.h (ielr): Update documentation.
118 * src/reader.c (prepare_percent_define_front_end_variables): Use
119 and validate new values.
120 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
121 grammars.
122 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
123
4bb975e1
EB
1242009-08-27 Eric Blake <ebb9@byu.net>
125
126 scan-gram: avoid portability trap with ctype usage.
127 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
128 Avoid compiler warning.
129
74baf5c9
JD
1302009-08-27 Joel E. Denny <jdenny@clemson.edu>
131
132 tests: use perl for printing special sequences to files.
133 And skip tests if perl is not available. This is better than
134 playing tricks with shell portability. Suggested by Akim
135 Demaille.
136 * tests/input.at (Bad character literals): Use it here for
137 omitting final newlines.
138 (Bad escapes in literals): Use it here for special characters.
139
d63e1279
JD
1402009-08-26 Joel E. Denny <jdenny@clemson.edu>
141
142 tests: show a use of %define lr.default-reductions "consistent"
143 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
144 prevents the omission of expected tokens for %error-verbose.
145
833d1720
AD
1462009-08-26 Akim Demaille <demaille@gostai.com>
147
148 tests: portability fix.
149 * tests/input.at (Bad escapes in literals): Don't expect "echo
150 '\0'" to output \ then 0.
151
e4bcae3c
JD
1522009-08-26 Joel E. Denny <jdenny@clemson.edu>
153
154 Actually handle the yytable zero value correctly this time.
155 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Don't
156 mention zero values in the YYTABLE comments.
157 * data/glr.c (yytable_value_is_error): Don't check for zero
158 value.
159 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
160 * data/yacc.c (yytable_value_is_error): Likewise.
161 * data/lalr1.java (yy_table_value_is_error_): Likewise.
162 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
163 * src/tables.h: In header comments, explain why it's useless to
164 check for a zero value in yytable.
165
d5eb0826
JD
1662009-08-25 Joel E. Denny <jdenny@clemson.edu>
167
168 More fixes related to last two patches.
169 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
170 defined.
171 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Fix
172 yytable comments: zero indicates syntax error not default
173 action.
174 * data/glr.c (yyis_pact_ninf): Rename to...
175 (yypact_value_is_default): ... this.
176 (yyisDefaultedState): Update for rename.
177 (yyis_table_ninf): Rename to...
178 (yytable_value_is_error): ... this, and check for value zero
179 besides just YYTABLE_NINF.
180 (yygetLRActions): Check for default value from yypact. It
181 appears that this check is always performed before this function
182 is invoked, and so adding the check here is probably redundant.
183 However, the code may evolve after this subtlety is forgotten.
184 Also, update for rename to yytable_value_is_error. Because that
185 macro now checks for zero, a different but equivalent branch of
186 the if-then-else here is evaluated.
187 (yyreportSyntaxError): Update for rename to
188 yytable_value_is_error. The zero condition was mishandled
189 before.
190 (yyrecoverSyntaxError): Update for renames. No behavioral
191 changes.
192 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
193 New function.
194 (yy_table_value_is_error_): New function.
195 (parse): Use new functions where possible. No behavioral
196 changes.
197 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
198 The zero condition was mishandled before.
199 * data/yacc.c (yyis_pact_ninf): Rename to...
200 (yypact_value_is_default): ... this.
201 (yyis_table_ninf): Rename to...
202 (yytable_value_is_error): ... this, and check for value zero
203 besides just YYTABLE_NINF.
204 (yysyntax_error): Update for rename to yytable_value_is_error.
205 The zero condition was mishandled before.
206 (yyparse): Update for renames. No behavioral changes.
207 * src/tables.h: Improve comments about yypact, yytable, etc.
208 more. Most importantly, say yytable value of zero means syntax
209 error not default action.
210
1fa30307
JD
2112009-08-25 Joel E. Denny <jdenny@clemson.edu>
212
213 Fix %error-verbose for conflicts resolved by %nonassoc.
214 * NEWS (2.5): Document.
215 * data/glr.c (yyreportSyntaxError): Fix this by checking
216 yyis_table_ninf.
217 * data/yacc.c (yysyntax_error): Likewise.
218 * data/lalr1.cc (yysyntax_error_): Fix this by checking
219 yytable_ninf_.
220 * data/lalr1.java (yysyntax_error): Likewise.
221 * tests/conflicts.at (%nonassoc and eof): Update expected output
222 and remove FIXME.
223
77373efa
JD
2242009-08-25 Joel E. Denny <jdenny@clemson.edu>
225
226 Some code and documentation improvements.
227 * data/c.m4 (b4_table_value_equals): New macro to capture
228 some repeated code.
229 * data/glr.c (yyis_pact_ninf): Use it here.
230 (yyis_table_ninf): Likewise.
231 (yyreportSyntaxError): Improve internal comments.
232 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
233 Use it everywhere possible.
234 (yyis_table_ninf): Likewise.
235 (yysyntax_error): Improve internal comments.
236 * data/lalr1.cc (yysyntax_error_): Likewise.
237 * data/lalr1.java (yysyntax_error): Likewise.
238 * src/tables.h: Improve comments about yypact, yytable, etc.
239
890ab17c
JD
2402009-08-21 Joel E. Denny <jdenny@clemson.edu>
241
242 Use locale when quoting.
243 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
244 quote rather than implementing quoting here.
245
c5196098
EB
2462009-08-20 Eric Blake <ebb9@byu.net>
247
aa50ba7b
EB
248 Make previous patch more robust.
249 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
250 argmatch.h.
251 (output_skeleton): Use it.
252 Suggested by Akim Demaille.
253
c5196098
EB
254 Import latest m4/m4.m4.
255 * submodules/autoconf: Update to autoconf 2.64.
256 * configure.ac (M4_GNU_OPTION): New define.
257 * src/output.c (output_skeleton): Use it to resolve FIXME.
258 * NEWS: Mention this.
259
39fb7e62
JD
2602009-08-19 Joel E. Denny <jdenny@clemson.edu>
261
262 Fix complaints about escape sequences.
263 Discussed starting at
264 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
265 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
266 For a \0 and similar escape sequences meaning the null
267 character, report an invalid escape sequence instead of an
268 invalid null character because the latter does not actually
269 appear in the user's input.
270 In all escape sequence complaints, don't escape the initial
271 backslash, and don't quote when the sequence appears at the end
272 of the complaint line unless there's whitespace that quotearg
273 won't escape.
274 Consistently say "invalid" not "unrecognized".
275 Consistently prefer "empty character literal" over "extra
276 characters in character literal" warning for invalid escape
277 sequences; that is, consistently discard those sequences.
278 * tests/input.at (Bad escapes in literals): New.
279
c33bc800
AD
2802009-08-19 Akim Demaille <demaille@gostai.com>
281
282 doc: fixes.
283 * doc/bison.texinfo: Fix minor Texinfo errors.
284
8fbbeba2
AD
2852009-08-19 Akim Demaille <demaille@gostai.com>
286
287 doc: %initial-action to initialize yylloc.
288 Reported by Bill Allombert.
289 * doc/bison.texinfo: Set fill-column to 76.
290 (Location Type): Document the use of %initial-action to initialize
291 yylloc.
292
1874a474
JD
2932009-08-18 Joel E. Denny <jdenny@clemson.edu>
294
295 maint: update for gnulib's recent update-copyright changes
296 * gnulib: Update.
297 * .x-update-copyright (COPYING): Add as it's no longer implied
298 when .x-update-copyright is present.
299 * cfg.mk (update-copyright-local): Remove, now ignored.
300 (update-copyright): Declare update-b4-copyright as a dependency.
301
f4bfd5a9
AD
3022009-08-17 Akim Demaille <demaille@gostai.com>
303
304 build: require gettext 0.17.
305
306 Suggested by Bruno Haible.
307 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
308 * configure.ac: require gettext 0.17 to ensure compatibility with
309 gnulib.
310
2509eba6
AD
3112009-08-17 Akim Demaille <demaille@gostai.com>
312
313 build: lower gettext requirements.
314
315 Bison was uselessly requiring the formatstring macros from
316 gettext, which resulted in mo files not being installed on systems
317 that perfectly supported Bison mo files. Lower the requirement.
318 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
319
aa50ba7b
EB
320 * configure.ac: Require need-ngettext instead of
321 need-formatstring-macros.
322 Reported by Martin Jabocs.
323 Suggested by Bruno Haible.
324 * INSTALL: Restructure.
325 (Internationalization): New.
2509eba6 326
314542f9
JD
3272009-08-14 Joel E. Denny <jdenny@clemson.edu>
328
329 maint: fix use of copyright year intervals.
330 * gnulib: Update.
331 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
332 as now recommended in gnulib/NEWS.
333 * build-aux/update-b4-copyright: Fix.
334 * cfg.mk (update-copyright-env): Configure update-copyright.
335
24985964
JD
3362009-08-13 Joel E. Denny <jdenny@clemson.edu>
337
338 Make it easier to write deterministic tests.
339 Continues Akim's work from his 2009-06-10 commits.
340 * src/reader.c (check_and_convert_grammar): Don't add any
341 symbols after the first symbols_do invocation.
342 * src/symtab.c (symbols_sorted): New static global.
343 (user_token_number_redeclaration): Update comments.
344 (symbol_from_uniqstr): If a new symbol is being created, assert
345 that symbols_sorted hasn't been allocated yet.
346 (symbols_free): Free symbols_sorted.
347 (symbols_cmp, symbols_cmp_qsort): New functions.
348 (symbols_do): Sort symbol_table into symbols_sorted on first
349 invocation.
350 * tests/input.at (Numbered tokens): Recombine tests now that the
351 output should be deterministic across multiple numbers.
352
47076da5
AD
3532009-08-12 Akim Demaille <demaille@gostai.com>
354
355 distcheck: fix.
356
aa50ba7b 357 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
47076da5 358
36dfe466
JD
3592009-08-10 Joel E. Denny <jdenny@clemson.edu>
360
361 * tests/Makefile.am (TESTSUITE_AT): Add named-refs.at.
362
07c0db18
JD
3632009-08-10 Joel E. Denny <jdenny@clemson.edu>
364
365 Miscellaneous code readability improvements.
366
367 * src/reader.c (reader): Move %define front-end variable
368 defaults and checking into...
369 (prepare_percent_define_front_end_variables): ... this new
370 function.
371
372 * src/scan-gram.l (INITIAL): For consistency with string
373 literals, don't store open quote on character literal. It's
374 discarded before returning anyway.
375 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
376 Make length test more readable, and make the character stored
377 for an empty literal more obvious while consistent with the
378 previous behavior.
379
380 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
381 USER_NUMBER_HAS_STRING_ALIAS throughout.
382 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
383 that is repeated in symtab.h. Improve argument names to make it
384 clear which side of the symbol-string alias pair is which.
385 (symbol_check_alias_consistency): Improve local variable names
386 for the same purpose.
387 * src/symtab.h (struct symbol): Make comments about aliases
388 clearer.
389 (symbol_make_alias): Improve comments and argument name.
390 * src/output.c (token_definitions_output): Update for rename to
391 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
392
1a323c2f
AR
3932009-08-08 Alex Rozenman <rozenman@gmail.com>
394
395 Convert "misleading reference" messages to warnings.
396 * src/scan-code.l: New function 'show_sub_messages', more
397 factoring.
398 * tests/named-ref.at: Adjust tests.
399
38609c34
JD
4002009-08-06 Joel E. Denny <jdenny@clemson.edu>
401
402 maint: run "make update-copyright"
403
642f240e
JD
4042009-08-06 Joel E. Denny <jdenny@clemson.edu>
405
406 maint: make update-b4-copyright easier to use
407 * build-aux/update-b4-copyright: In warnings, report line
408 numbers rather than character positions.
409 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
410 that update-copyright runs it.
411 * gnulib: Update.
412
d0caad01
JD
4132009-08-05 Joel E. Denny <jdenny@clemson.edu>
414
415 maint: clean up update-b4-copyright code
416 * build-aux/update-b4-copyright: Do not accept 2-digit
417 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
418 Don't accept a `[' in a b4_copyright argument.
419 Format code more consistently.
420 Don't assume b4*copyright never occurs.
421
ac2def56
JD
4222009-08-04 Joel E. Denny <jdenny@clemson.edu>
423
424 maint: automate b4_copyright updates.
425 * Makefile.am (update-b4-copyright): New target rule.
426 * build-aux/Makefile.am (EXTRA_DIST): Add update-b4-copyright.
427 * build-aux/update-b4-copyright: New.
428 * data/yacc.c: Remove stray characters around b4_copyright
429 invocations.
430
dbbb64f0
JD
4312009-08-04 Joel E. Denny <jdenny@clemson.edu>
432
433 maint: automate annual package-wide copyright-year update.
434 * .x-update-copyright: New.
435 * Makefile.am (EXTRA_DIST): Remove maint.mk.
436 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
437 update-copyright. Remove gnumakefile, which is implied by
438 maintainer-makefile.
439 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
440 * gnulib: Update.
441 * maint.mk: Remove, now copied from gnulib.
442 * examples/extexi: Add missing "(C)" in copyright statement so
443 update-copyright can recognize it.
444 * src/LR0.h: Likewise.
445 * src/print.h: Likewise.
446 * src/print_graph.h: Likewise.
447 * src/gram.c: Add missing comma in copyright statement.
448 * src/gram.h: Likewise.
449
bfa018d4
JD
4502009-08-04 Joel E. Denny <jdenny@clemson.edu>
451
452 Fix "make distcheck".
453 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
454 of just calc.stamp.
455
4521fcdf
JD
4562009-08-01 Joel E. Denny <jdenny@clemson.edu>
457
458 Pacify "gcc -Wunused" for the input function from Flex.
459 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
460 and later.
461 * src/scan-code.l: Add "%option noinput", which I cannot find in
462 the Flex manual, but which Flex has supported since at least as
463 far back as 2.5.4. However, if any of our developers still use
464 Flex 2.5.4, they'll need to stop configuring with
465 --enable-gcc-warnings because "%option noinput" didn't work
466 correctly until Flex 2.5.6.
467 * src/scan-gram.l: Likewise.
468 * src/scan-skel.l: Likewise.
469
992e874a
AR
4702009-07-31 Alex Rozenman <rozenman@gmail.com>
471
472 Fix --enable-gcc-warnings problems.
473 * src/reader.c: Adjust variable names.
474 * src/scan-code.l: Fix prototypes and adjust names.
475 * src/named-ref.c: Remove redundant "if".
476
a1ed2b71
JD
4772009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
478
479 Fix a --enable-gcc-warnings problem.
480 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
481 variable.
482
cbc6a70e 4832009-07-24 Alex Rozenman <rozenman@gmail.com>
1e20ad11
AR
484
485 Fix some memory leaks.
486 * src/named-ref.c: Add a pointer check (named_ref_free).
487 * src/scan-code.l: New function (variant_table_free). Called in
488 code_scanner_free.
489 * src/symlist.c: Call to named_ref_free (symbol_list_free).
490
ac9b0e95
JD
4912009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
492
493 Warn about character literals not of length one.
494 * NEWS (2.5): Document.
495 * src/scan-gram.l (INITIAL): Remove comment that we don't check
496 the length.
497 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
498 * tests/input.at (Bad character literals): New test group.
499
2de160e1
JD
5002009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
501
502 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
503
cba97506
JD
5042009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
505
506 Some M4 cleanup in the testsuite.
507 Suggested by Eric Blake at
508 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
509 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
510 complicate the code by distinguishing between a missing value
511 and an empty string value for an optional argument. This fix is
512 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
513 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
514 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
515 arguments are not needed because of the following changes.
516 Fix stale comments.
517 Bison developers should use GNU M4 and should not use
518 POSIXLY_CORRECT when building the test suite, so do not
519 complicate the code by avoiding $10 and above.
520 Do not quote an empty string value for an optional argument, and
521 do not distinguish between a missing value and an empty string
522 value.
523
62eb2d1b
JD
5242009-07-21 Joel E. Denny <jdenny@ces.clemson.edu>
525
526 * m4/m4.m4: Make it a sym link to submodules/autoconf/m4/m4.m4.
527
620b2e36
JD
5282009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
529
530 Revert unnecessary column realignment in --help output.
531 Reported by Akim Demaille at
532 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
533 * src/getargs.c (usage): Here.
534
cbc6a70e 5352009-07-04 Alex Rozenman <rozenman@gmail.com>
dad6544d
AR
536
537 Alphabetical order in src/Makefile.am.
538 * src/Makefile.am: Adjust.
539
cbc6a70e 5402009-07-04 Alex Rozenman <rozenman@gmail.com>
d5e8574b
AR
541
542 Style changes and factoring.
543 * src/named-ref.h: Add comments.
544 * src/parse-gram.y: Readability and style changes.
545 * src/reader.c: Factoring: assign_named_ref function.
546 * src/scan-code.l: Factoring and style changes. Rename
547 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
548 Use "unsigned" type for variant index. Improve readablity.
549 * src/scan-gram.l: Change error messages and add comments.
550 * src/symlist.h: symbol_list_null: New function decl.
551 * src/symlist.c: symbol_list_null: Implement here.
552 * tests/named-refs.at: Adjust for new error messages.
553
ae09ec85
EB
5542009-06-29 Eric Blake <ebb9@byu.net>
555
556 scan-code: avoid compiler warnings
557 * src/scan-code.l (parse_named_ref): Use correct specifiers.
558
80d653fd
AD
5592009-06-29 Akim Demaille <demaille@gostai.com>
560
561 build: avoid concurrent extraction of calc++.
562 * examples/calc++/Makefile.am (calc.stamp): New.
563 Depend on it to create the sources of calc++ so that concurrent
564 builds don't launch several "extexi" in parallel.
565 Not only this is inefficient, this also builds incorrect sources
566 with several extractions mixed together.
567
7685e2f7
AR
5682009-06-27 Alex Rozenman <rozenman@gmail.com>
569
570 Implement support for named symbol references.
571 * src/parse-gram.y: Add new syntax (named_ref.opt).
572 * src/reader.c: Store named refs in symbol lists.
573 * src/reader.h: New argument for symbol_append and
574 action_append functions.
575 * src/scan-code.h: Add new field (named_ref) into
576 code_props data structure. Keeps named ref of midrule
577 actions.
578 * src/scan-code.l: Support for named refs in semantic
579 action code. New function 'parse_named_ref'.
580 * src/scan-gram.l: Support bracketed id.
581 * src/symlist.c: Store named refs in symbol lists.
582 * src/symlist.h: New field in symbol list: named_ref.
583 * src/named-ref.h: New file, a struct for named_ref.
584 * src/named-ref.cp: New file, named_ref_new function.
585 * src/local.mk: Add two new files.
586 * tests/testsuite.at: Include new test group:
587 * tests/named-refs.at: this new file.
588
67f8cf51
AD
5892009-06-25 Akim Demaille <demaille@gostai.com>
590
591 hash: check insertion for memory exhaustion.
592 * src/uniqstr.c (uniqstr_new): New.
593
83b66ddd
AD
5942009-06-11 Akim Demaille <demaille@gostai.com>
595
596 style changes.
597 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
598 * src/print-xml.c: Style changes.
599 * tests/conflicts.at: Comment changes.
600
517cb0ad
AD
6012009-06-11 Akim Demaille <demaille@gostai.com>
602
603 xml: beware of user strings used to give a %prec to rules.
604 * tests/conflicts.at (%prec with user strings): New.
605 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
606 XML output.
607
75c7a52a
AD
6082009-06-11 Akim Demaille <demaille@gostai.com>
609
610 hash: check insertion for memory exhaustion.
611 * src/muscle-tab.c (muscle_insert, muscle_grow)
612 * src/state.c (state_hash_insert): Check the return value of
613 hash_insert.
614
66ed9753
AD
6152009-06-10 Akim Demaille <demaille@gostai.com>
616
617 deterministic test suite.
618 Some consistency checks on symbols are performed after all the
619 symbols were read, by an iteration over the symbol table. This
620 traversal is nondeterministic, which can be a problem for test
621 cases.
622 Avoid this.
623 Addresses another form of nondeterminism reported by Joel E. Denny.
624 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
625
626 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
627 test in two.
628 Use different file names for the three tests to make the
629 maintenance easier.
630
ed15d907
AD
6312009-06-10 Akim Demaille <demaille@gostai.com>
632
95d176ff
AD
633 deterministic user-token-number redeclaration errors.
634 Address nondeterminism reported by Joel E. Denny.
635 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
636
637 * src/uniqstr.h: Comment changes.
638 * src/location.h (boundary_cmp, location_cmp): New.
639 * src/symtab.c (user_token_number_redeclaration): New.
640 (symbol_translation): Use it.
641 * tests/input.at (Numbered tokens): Adjust the expected output.
642
6432009-05-25 Akim Demaille <demaille@gostai.com>
644
ed15d907 645 gnulib: update.
aa50ba7b
EB
646 * gnulib: Update to latest.
647 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
648 * m4/.gitignore: Regen.
649 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
650 Call xalloc_die on hash_insert failures.
651 Requested by the new __warn_unused_result__ attribute of
652 hash_insert.
ed15d907 653
e3a33f7c
JD
6542009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
655
656 Convert multiple variable definition warnings to complaints.
657 * NEWS (2.5): Add a new entry for that change.
658 * doc/bison.texinfo (Decl Summary): Update %define entry.
659 (Bison Options): Update -D/--define/-F/--force-define entry.
660 * src/muscle_tab.c (muscle_percent_define_insert): Implement.
661 * src/muscle_tab.h (muscle_percent_define_insert): Update
662 comments.
663 * tests/input.at (`%define errors'): Update.
664 (`%define, --define, --force-define'): Update.
665
34d41938
JD
6662009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
667
668 -F/--force-define and relative %define/-D/--define priorities.
669 * NEWS (2.5): Add documentation to -D/--define entry.
670 * build-aux/cross-options.pl: Hard-code association of
671 --force-define with %define.
672 * doc/bison.texinfo (Decl Summary): In %define entry,
673 cross-reference command-line options.
674 (Bison Options): Add documentation to -D/--define entry.
675 (Option Cross Key): Widen column for --force-define row.
676 * src/getargs.c (usage): Document -F/--force-define. Realign
677 options in output.
678 (short_options, long_options, getargs): Parse -F/--force-define,
679 and update muscle_percent_define_insert invocation.
680 * src/muscle_tab.h (muscle_percent_define_how): New enum type.
681 (muscle_percent_define_insert): Add argument with that type.
682 * src/muscle_tab.c (muscle_percent_define_insert): Implement
683 -F/--force-define behavior and priorities.
684 * src/parse-gram.y (prologue_declaration): Update
685 muscle_percent_define_insert invocations.
686 * tests/input.at (`%define, --define'): Rename to...
687 (`%define, --define, --force-define'): ... this and extend.
688
246c4efa
JD
6892009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
690
691 Update some comments to make sense for -D.
692 * data/bison.m4 (b4_check_user_names): In header comments, say
693 "user occurrence" instead of "grammar occurrence".
694 * src/muscle_tab.h (muscle_percent_define_insert): Likewise.
695 (muscle_percent_code_grow): Likewise just for consistency.
696
531683e7
JD
6972009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
698
699 * data/c++.m4: Update copyright year.
700
e7bfa8b7
JD
7012009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
702
703 * data/c++.m4 (b4_namespace_close): Simplify slightly.
704
8c221795
JD
7052009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
706
707 Handle a trailing `:' in a user-supplied C++ namespace better.
708 * data/c++.m4 (b4_namespace_close): Don't let it be printed
709 among the closing braces here. This fix might make the
710 generated code easier to debug, but otherwise it should be
711 insignificant because a trailing `:' is a C++ error already.
712
c8bf65f0
AD
7132009-05-19 Akim Demaille <demaille@gostai.com>
714
715 remove useless variable.
716 * src/getargs.c (skeleton_arg): Remove now useless variable.
717 Should help the compiler see that this printf-like call is sane.
718
7ac45a46
AD
7192009-05-11 Akim Demaille <demaille@gostai.com>
720
721 doc: use C++ headers.
722 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
723 headers.
724
601bdfab
AD
7252009-05-05 Akim Demaille <demaille@gostai.com>
726
727 fix hexadecimal token number support.
728 * src/scan-gram.l: Catch incorrect ids after hexadecimal numbers.
729
d19123e6
AD
7302009-05-05 Akim Demaille <demaille@gostai.com>
731
732 tests: check token numbers.
733 * tests/input.at (Numbered tokens): New.
734
ecdfea9a
AD
7352009-05-04 Akim Demaille <demaille@gostai.com>
736
737 bison: catch bad symbol names.
738 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
739 * tests/input.at: Adjust.
740
43e6aea5
AD
7412009-05-04 Akim Demaille <demaille@gostai.com>
742
743 space changes.
744 * src/scan-gram.l: Untabify to be robust to zealous editors.
745
c046698e
AD
7462009-05-04 Akim Demaille <demaille@gostai.com>
747
748 identifiers: dashes are letters.
749 Dashes can now start identifiers (symbols and directives).
b10dd689 750
c046698e
AD
751 * src/scan-gram.l ({letter}): Add dash.
752 ({id}): Remove it.
753 * tests/input.at (Symbols): Adjust.
754 Remove stray comment.
755 * tests/regression.at (Invalid inputs): Adjust error message.
756 * doc/bison.texinfo (Symbols): Update.
757
966aba65
JD
7582009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
759
760 Declare %code to be a permanent feature.
761 * NEWS (2.4.2): Here.
762 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
763 experimental.
764 (Decl Summary): Likewise.
765
812775a0
JD
7662009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
767
768 Convert underscores to dashes in some %define variable names.
769 For now, just api.push-pull and lr.keep-unreachable-states.
770 Maintain old names for backward compatibility.
771 * NEWS (2.5): Document.
772 * data/c.m4 (b4_identification): Update comment.
773 * data/yacc.c: Update access.
774 * doc/bison.texinfo: Update.
775 * etc/bench.pl.in (bench_grammar): Update use.
776 * src/files.c (tr): Move to...
777 * src/getargs.c, src/getargs.h (tr): ... here because I can't
778 think of a better place to expose it. My logic is that, for all
779 uses of tr so far, command-line arguments can be involved, and
780 getargs.h is already included.
781 * src/main.c (main): Update access.
782 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
783 variable names to new variable names before assigning value.
784 * src/reader.c (reader): Update setting default.
785 * tests/calc.at: Update uses.
786 * tests/conflicts.at (Unreachable States After Conflict
787 Resolution): Update use.
788 * tests/input.at (%define enum variables): Update use.
789 (%define backward compatibility): New test group.
790 * tests/push.at: Update uses.
791 * tests/reduce.at: Update uses.
792 * tests/torture.at: Update uses.
793
1c4aa81d
JD
7942009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
795
796 Set all front-end %define defaults in one place.
797 * src/main.c (main): Move lr.keep_unreachable_states default...
798 * src/reader.c (reader): ... to here.
799
1d0f55cc
JD
8002009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
801
802 Rename lr.default_reductions to lr.default-reductions.
803 * NEWS (2.5): Here.
804 * doc/bison.texinfo: Here.
805 * src/lalr.c (initialize_LA): Here.
806 * src/print.c (print_reductions): Here.
807 * src/reader.c (reader): Here.
808 * src/tables.c (action_row): Here.
809 * tests/input.at (%define enum variables): Here.
810 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
811
0b593457
JD
8122009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
813
814 Pacify ./configure --enable-gcc-warnings.
815 * tests/input.at (Symbols): Prototype yyerror and yylex.
816
0939aa2d
AD
8172009-04-21 Akim Demaille <demaille@gostai.com>
818
819 tests: check the use of dashes and periods in symbols.
820 * tests/input.at (Symbol): New test group.
821
0b593457 8222009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
ae618dcc
JD
823
824 Document how `%define "var" "value"' is not M4-friendly.
825 * src/parse-gram.y (variable): In comments here.
826
0b593457 8272009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
6789b8bd
JD
828
829 Add copyright updates missed during previous cherry pick.
830 * src/output.c: Here.
831 * src/parse-gram.y: Here.
832 * src/scan-gram.l: Here.
833
663ce7bb
AD
8342009-04-20 Akim Demaille <demaille@gostai.com>
835
836 variables: accept dashes.
837 * src/scan-gram.l ({id}): Also accept dashes after the initial
838 letter.
839 ({directive}): Use {id}.
840 * src/parse-gram.y: Comment and formatting changes.
841 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
842 symbols.
843 * src/complain.h, src/complain.c (yacc_at): New.
844 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
845 symbol names.
846 * src/output.c (token_definitions_output): Do not #define token
847 names with dashes.
848
379261b3
JD
8492009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
850
851 Clean up recent patches a little.
852 Reported by Akim Demaille.
853 * doc/bison.texinfo (Understanding): Fix typos.
854 * src/print.c (print_reductions): Don't use negated variable.
855
25029e16
JD
8562009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
857
858 List accepted values for a %define enum variable with an invalid value.
859 Suggested by Akim Demaille at
860 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
861 * data/bison.m4 (_b4_percent_define_check_values): Implement.
862 * src/muscle_tab.c (muscle_percent_define_check_values): Implement.
863 * tests/input.at (%define lr.default_reductions invalid values): Merge
864 into...
865 (%define enum variables): ... here, and update output.
866
620b5727
JD
8672009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
868
869 Rename "default rule" to "default reduction".
870 This includes changing variable names in code, changing
871 comments, and renaming %define lr.default_rules to %define
872 lr.default_reductions.
873 * NEWS (2.5): Update IELR documentation.
874 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c:
875 Adjust YYDEFACT and yydefact_ documentation.
876 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
877 and lr.type documentation. Make some other wording
878 improvements.
879 (Glossary): Adjust cross-references and Default Reduction
880 definition.
881 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
882 Remove a confusing comment pointed out by Akim Demaille.
883 (initialize_LA): Adjust code.
884 * src/print-xml.c (print_reductions): Adjust code.
885 * src/print.c (print_reductions): Adjust code.
886 * src/reader.c (reader): Adjust code.
887 * src/tables.c (action_row): Adjust code.
888 (token_actions): Adjust code.
889 * src/tables.h: Adjust YYDEFACT documentation.
890 * tests/input.at (%define lr.default_rules invalid values):
891 Rename test group to...
892 (%define lr.default_reductions invalid values): ... this, and
893 update grammar file and expected output.
894 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
895 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
896
34a6c2d1
JD
8972009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
898
899 Document %define lr.type and lr.default_rules.
900 * NEWS (2.5): Add an entry.
901 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
902 besides just LALR(1) and GLR(1).
903 * doc/bison.texinfo (Introduction): Likewise.
904 (Language and Grammar): Bison is no longer limited to LALR(1)
905 restrictions.
906 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
907 when trying to distinguish from GLR. Talk about LR(1) grammars
908 rather than LALR(1) grammars.
909 (Decl Summary): In %define api.push_pull entry, say it applies
910 to deterministic parsers in C rather than LALR(1) parsers in C.
911 Add lr.default_rules entry.
912 Add lr.type entry.
913 (Mystery Conflicts): Bison is no longer limited to LALR(1)
914 restrictions.
915 (Generalized LR Parsing): Same changes as for the previous GLR
916 section.
917 (Memory Management): Say deterministic rather than LALR(1).
918 (Understanding): Correct some bison output.
919 Index discussion of "accepting state".
920 Say deterministic rather than LALR(1).
921 (Bison Options): In --yacc entry, say deterministic rather than
922 LALR(1).
923 In --report, --graph, and --xml entries, just don't mention
924 LALR(1).
925 (C++ Parsers): Say deterministic rather than LALR(1).
926 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
927 (Glossary): Add Accepting State, Consistent State, Default Rule,
928 and IELR(1) definitions.
929 In Generalized LR (GLR) definition, make same changes as in
930 previous GLR sections.
931 In LALR(1) definition, say Bison uses LALR(1) by default rather
932 than implying Bison is limited to LALR(1).
933 (LocalWords): Add IELR.
934
f805dfcb
JD
9352009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
936
937 Finish implementing %define lr.type.
938 Its value can be "LALR", "IELR", or "canonical LR".
939 * lib/timevar.def (TV_IELR_PHASE1): New var.
940 (TV_IELR_PHASE2): New var.
941 (TV_IELR_PHASE3): New var.
942 (TV_IELR_PHASE4): New var.
943 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
944 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
945 Sbitset.h, ielr.h, and ielr.c.
946 * src/getargs.h, src/getargs.c (enum trace, trace_args,
947 trace_types): Add trace_ielr.
948 * src/lalr.h, src/lalr.c (ngotos): Export it.
949 (F): Rename to...
950 (goto_follows): ... this, update all uses, and export it.
951 (set_goto_map): Export it.
952 (map_goto): Export it.
953 (compute_lookahead_tokens): Don't free goto_follows yet. Now
954 handled in ielr.
955 (initialize_LA): Export it. Move lookback allocation to...
956 (lalr): ... here because, for canonical LR, initialize_LA must
957 be invoked but lookback and much of the rest of LALR isn't
958 needed.
959 * main.c (main): Instead of lalr, invoke ielr, which invokes
960 lalr.
961 * src/reader.c (reader): Default lr.type to "LALR".
962 Default lr.default_rules to "accepting" if lr.type is "canonical
963 LR". Leave the default as "all" otherwise.
964 Check for a valid lr.type value.
965 * src/state.h, src/state.c (struct state_list): Add state_list
966 member.
967 (state_new): Initialize state_list member to NULL.
968 (state_new_isocore): New function, exported.
969 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
970 exercises all values of lr.type.
971 (GNU AWK Grammar): Rename test group to...
972 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
973 AT_TEST_EXISTING_GRAMMAR.
974 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
975 (GNU pic Grammar): Rename test group to...
976 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
977 AT_TEST_EXISTING_GRAMMAR.
978 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
979 all values of lr.type.
980 (Single State Split): New test groups using AT_TEST_LR_TYPE.
981 (Lane Split): Likewise.
982 (Complex Lane Split): Likewise.
983 (Split During Added Lookahead Propagation): Likewise.
984
166366b2
JD
9852009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
986
987 Add new files for IELR and canonical LR implementation.
988 * src/AnnotationList.c: New.
989 * src/AnnotationList.h: New.
990 * src/InadequacyList.c: New.
991 * src/InadequacyList.h: New.
992 * src/Sbitset.c: New.
993 * src/Sbitset.h: New.
994 * src/ielr.c: New.
995 * src/ielr.h: New.
996
03c07b03
JD
9972009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
998
999 Implement %define lr.default_rules.
1000 Its value describes the states that are permitted to contain
1001 default rules: "all", "consistent", or "accepting".
1002 * src/reader.c (reader): Default lr.default_rules to "all".
1003 Check for a valid lr.default_rules value.
1004 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
1005 is "accepting", then only mark the accepting state as
1006 consistent.
1007 (initialize_LA): Tell state_lookahead_tokens_count whether
1008 lr.default_rules is "accepting".
1009 * src/tables.c (action_row): If lr.default_rules is not "all",
1010 then disable default rules in inconsistent states.
1011 * src/print.c (print_reductions): Use this opportunity to
1012 perform some assertions about whether lr.default_rules was
1013 obeyed correctly.
1014 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
1015 helps with checking the parser tables for a grammar.
1016 * tests/input.at (%define lr.default_rules invalid values): New
1017 test group.
1018 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
1019 AT_TEST_TABLES_AND_PARSE.
1020 (`no %define lr.default_rules'): New test group generated by
1021 AT_TEST_LR_DEFAULT_RULES.
1022 (`%define lr.default_rules "all"'): Likewise.
1023 (`%define lr.default_rules "consistent"'): Likewise.
1024 (`%define lr.default_rules "accepting"'): Likewise.
1025
44c124a3
AD
10262009-04-20 Akim Demaille <demaille@gostai.com>
1027
1028 Consistently refer to Yacc, not YACC.
1029 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
1030
42660736
JD
10312009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
1032
1033 Pacify make maintainer-check-posix.
1034 * tests/input.at (%define, --define): Move bison command-line
1035 options before grammar file name.
1036
a2d05674
JD
10372009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
1038
1039 Document semicolon warnings.
1040 * NEWS (2.5): Here.
1041
c4fae1ef
AD
10422008-12-08 Akim Demaille <demaille@gostai.com>
1043
1044 Fix portability issue in the test suite.
1045 * tests/local.at (AT_MATCHES_CHECK): New.
1046 Based on Perl instead of Sed. Sed has too many portability
1047 pitfalls, not ever Sed is GNU Sed.
1048 * tests/actions.at (Fix user actions without a trailing semicolon):
1049 Use it.
1050
42f4393a
DJ
10512008-12-07 Di-an Jan <dianj@freeshell.org>
1052
1053 Implement the FIXME that ends an user action with a semicolon
1054 if it seems necessary.
1055 * src/scan-code.l (flex rules section): Flag cpp directive from
1056 any `#' to the first unescaped end-of-line. Semicolon is not
1057 needed after `;', `{', '}', or cpp directives and is needed after
1058 any other token (whitespaces and comments have no effect).
1059 * tests/actions.at (Fix user actions without a trailing semicolon):
1060 New test.
1061 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
1062 to make user actions complete statements.
1063 Adjust column numbers in error messages.
1064 * tests/regression.at (Fix user actions without a trailing semicolon):
1065 Remove. Covered by new test.
1066
bd5df716
AD
10672009-04-14 Akim Demaille <demaille@gostai.com>
1068
1069 doc: minor fixes.
1070 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
1071 (Table of Symbols): Remove duplicate entry for %debug.
1072
7ba0d59d
EB
10732009-04-10 Eric Blake <ebb9@byu.net>
1074
1075 submodules: update to latest
1076 * submodules/autoconf: Use latest upstream Autoconf.
1077
b4d71a96
EB
10782009-04-06 Eric Blake <ebb9@byu.net>
1079
1080 Work around autoconf 2.63b bug in testsuite.
1081 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
1082 autoconf bug related to # in test.
1083
4ecd3681
JD
10842009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
1085
1086 * NEWS (2.5): Describe new -D/--define feature.
1087
c65e5292
AD
10882008-11-10 Akim Demaille <demaille@gostai.com>
1089
1090 --trace=muscles
1091 * src/getargs.h, src/getargs.c (trace_muscle): New.
1092 (trace_types, trace_args): Support it.
1093 * src/output.c (output_skeleton): Use it.
1094
96002de2
AD
10952008-11-10 Akim Demaille <demaille@gostai.com>
1096
1097 muscles_output.
1098 * src/output.c (muscles_output): New, extracted from...
1099 (output_skeleton): here.
1100 Adjust.
1101
fadb13b5
AD
11022008-11-21 Akim Demaille <demaille@gostai.com>
1103
1104 Display the changes in cross-options.texi.
1105 * build-aux/cross-options.pl ($sep): New, to separate items.
1106 * doc/Makefile.am ($(srcdir)/cross-options.texi): Use diff to display
1107 the changes.
1108
72183df4
DJ
11092008-11-20 Di-an Jan <dianj@freeshell.org>
1110
1111 Improves options in the manual.
1112 * doc/bison.texinfo (-g, -x): Add space before argument.
1113 (Option Cross Key): Implement FIXME: listing directives also.
1114 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
1115 (Short Option): Special case -d. Put arguments inside @option.
fadb13b5 1116 (Bison Directive): Add column, automatically extracted from
72183df4
DJ
1117 src/scan-gram.l (actual name passed as the first argument)
1118 with special case for %define.
1119 * doc/Makefile.am (doc/cross-options.texi): Pass src/scan-gram.l
1120 to build-aux/cross-options.pl.
1121 * src/getargs.c (usage): Document limitations of cross-options.pl.
1122 * src/scan-gram.l: Likewise.
1123
e80b068c
AD
11242009-02-25 Akim Demaille <demaille@gostai.com>
1125
1126 Copyright years.
1127 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
1128
e3ee30b8
AD
11292008-12-08 Akim Demaille <demaille@gostai.com>
1130
1131 Install autoconf as a submodule to get m4sugar.
1132 * .gitmodules: Add submodules/autoconf.
1133 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
1134 submodules/autoconf.
1135
c4eb1e84
JD
11362008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1137
1138 Simplify last patch slightly.
1139 * src/getargs.c (getargs): Here.
1140
10fa0146
JD
11412008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1142
1143 Fix last warning from --enable-gcc-warnings.
1144 * src/getargs.c (getargs): Don't assign const address to non-const
1145 pointer.
1146
6f5be1ab
DJ
11472008-11-17 Di-an Jan <dianj@freeshell.org>
1148
1149 Handle --enable-gcc-warnings.
1150 * src/getargs.c (command_line_location): Set parameters to void.
1151
11c4e57d
AD
11522008-11-11 Akim Demaille <demaille@gostai.com>
1153
1154 AT_FULL_COMPILE.
1155 * tests/actions.at, tests/regression.at: Use it.
1156
e186a284
AD
11572008-11-07 Akim Demaille <demaille@gostai.com>
1158
1159 Pass command line location to skeleton_arg and language_argmatch.
1160 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
1161 The location argument is now mandatory.
1162 Adjust all dependencies.
1163 (getargs): Use command_line_location.
1164
e14c6831
AD
11652008-11-07 Akim Demaille <demaille@gostai.com>
1166
1167 -D, --define.
1168 * src/getargs.c (usage): Document -D.
1169 Fix help string for --locations.
1170 (command_line_location): New.
1171 (short_options, long_options, getargs): Support -D, --define.
1172 (getargs): Move -d support at the right place.
1173 * doc/bison.texinfo (Bison Options): Update.
1174 * tests/input.at (%define, --define): New.
1175
75c21b61
AD
11762008-11-07 Akim Demaille <demaille@gostai.com>
1177
1178 Initialize the muscle table before parsing the command line.
1179 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
1180 (getargs): Define file_name.
1181 * src/main.c (main): Initialize muscle_tab before calling
1182 getargs.
1183 * src/muscle_tab.c (muscle_init): No longer define file_name, as
1184 its value is not available yet.
1185
33d2a860
AD
11862008-11-09 Akim Demaille <demaille@gostai.com>
1187
1188 Require the generation of parse-gram.output.
1189 * src/Makefile.am (YACC): Pass --report=all.
1190
006faedf
JD
11912009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
1192
1193 * NEWS (2.5): New stub.
1194
ecd1b61c
JD
11952009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
1196
1197 Fix options documentation.
1198 * build-aux/cross-options.pl: As in --help output, write optional
1199 arguments as [=ARG] not =[ARG].
1200 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
1201
f67c4037
AD
12022008-11-07 Akim Demaille <demaille@gostai.com>
1203
1204 Fix --help.
1205 * src/getargs.c (usage): Fix help string for -W.
1206
0213d651
AD
12072008-11-07 Akim Demaille <demaille@gostai.com>
1208
1209 Handle more general types of option arguments.
1210 * build-aux/cross-options.pl: The argument ends at the first
1211 space, not the first non-symbol character.
1212 Use @var for each word appearing the argument description.
1213
c19178bf
JD
12142009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
1215
1216 Remove spurious initial empty lines.
1217 * data/location.cc: End the @output lines with an @.
1218
0d2b2ab0
AD
12192008-11-04 Akim Demaille <demaille@gostai.com>
1220
1221 Remove spurious initial empty lines.
1222 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
1223 * data/yacc.c: End the @output lines with an @.
1224
8ba62e3e
JD
12252009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
1226
1227 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
1228 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
1229 requirements for a correct m4 are stricter.
1230 * m4/m4.m4: Replace with Autoconf 2.63's m4/m4.m4.
1231 * configure.ac: Update to use AC_PROG_GNU_M4.
1232 Reported by Eric Blake.
1233
5bc993d9
JD
12342009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1235
1236 Help with updating web manual.
1237 * HACKING: Incorporate instructions from gnulib/doc/README.
1238 * bootstrap.conf (gnulib_modules): Add gendocs.
1239
580c075d
JD
12402009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1241
1242 Fix strange %define locations for default values.
1243 Reported by Akim Demaille at
1244 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
1245 and discussed again starting at
1246 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
1247 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
1248 because location information is bogus.
1249 Use angle brackets to delimit fake file name because square brackets
1250 look like underexpanded m4. Choose a better fake file name.
1251 Use negative line numbers.
1252 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
1253 * src/location.c (location_print): If line for a boundary is negative,
1254 only print that boundary's file name.
1255 * src/location.h: Document that.
1256 * tests/skeletons.at (%define Boolean variables: invalid skeleton
1257 defaults): Update output.
1258
5d3a1ecb
AD
12592008-11-07 Akim Demaille <demaille@gostai.com>
1260
1261 Locations without columns for command line arguments.
1262 * src/location.c (location_print): Don't display negative columns.
1263 * src/location.h: Document this.
1264
015e86a7
JD
12652009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
1266
1267 Add reminder about uploading public key to keys.gnupg.net.
1268 * HACKING (Release Procedure): Here.
1269
c1455bab
AD
12702009-03-31 Akim Demaille <demaille@gostai.com>
1271
1272 bootstrap: --help to stdout.
1273 * bootstrap (usage): Don't send --help to stderr.
1274 Use a here doc instead of a long string.
1275
2075a82a
AD
12762009-03-31 Akim Demaille <demaille@gostai.com>
1277
1278 bootstrap: README-hacking no longer exists
1279 * bootstrap (checkout_only_file): Set to HACKING.
1280
26fccd4d
AD
12812009-03-26 Akim Demaille <demaille@gostai.com>
1282
1283 doc: merge HACKING and README-hacking.
1284 Two files is confusing.
1285 Reported by Alexandre Duret-Lutz.
5bc993d9 1286
26fccd4d
AD
1287 * README-hacking: Merge into...
1288 * HACKING (Working from the repository): here.
1289
6469c4d7
AD
12902009-03-26 Akim Demaille <demaille@gostai.com>
1291
1292 doc: update README-hacking.
1293 * README-hacking: We now use git and git submodules.
1294 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
1295
b328890a
AD
12962009-03-26 Akim Demaille <demaille@gostai.com>
1297
1298 lalr1.cc: avoid GCC 4.3 warnings.
1299 GCC 4.3 now warns about "a || b && c" and asks for explicit
1300 parentheses.
1301 Reported by Alexandre Duret-Lutz.
1302 * data/location.cc: Update copyright years.
1303 (Position::operator==): Use parens to make precedence explicit.
1304 Compare lines and columns first, as they are more likely to be
1305 different, and they are faster to compare.
1306
f3079439
AD
13072009-03-26 Akim Demaille <demaille@gostai.com>
1308
1309 gnulib: update.
1310 * gnulib: Update to latest.
1311 * lib/Makefile.am (AM_CPPFLAGS): It is now defined by gnulib, so
1312 use +=.
1313
8defe11b
AD
13142009-01-08 Akim Demaille <demaille@gostai.com>
1315
1316 Fix grep portability issues.
1317 Grep on Solaris does not support -q.
1318 Reported by Summum Bonum.
5bc993d9 1319
8defe11b
AD
1320 * NEWS: Add a stub for 2.4.2.
1321 * THANKS: Add Summum Bonum.
1322 * tests/atlocal.in (EGREP): New.
1323 (CC, CXX, XSLTPROC): Make it possible to override them via
1324 envvars.
1325 * tests/java.at: Use $EGREP instead of egrep.
1326 Use AT_CHECK's ignore instead of grep's -q.
1327
41930e7a
JD
13282008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
1329
1330 Version 2.4.1.
1331 * NEWS: Set version and date.
1332 * lib/Makefile.am: Update copyright year.
1333 * tests/atlocal.in: Update copyright year.
1334
d07932ef
JD
13352008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
1336
1337 Semicolon feature removal is not about future language support.
1338 * NEWS: The semicolon feature is no longer active for newer languages,
1339 so don't claim that it causes trouble for them.
1340
0364b334
JD
13412008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
1342
1343 * gnulib: Update submodule to HEAD.
1344
876fd835
AD
13452008-12-09 Akim Demaille <demaille@gostai.com>
1346
1347 Update data/README.
1348 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
1349
bee1df15
EB
13502008-12-05 Eric Blake <ebb9@byu.net>
1351
1352 Build testsuite with newer autoconf.
1353 * tests/output.at (m4_expand): Don't override in newer autoconf,
1354 where the underlying implementation changed.
1355 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
1356 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
1357 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
1358 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
1359 since some of them contain unbalanced ')'.
1360
7e6d1e22
JD
13612008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
1362
1363 * NEWS: Clarify a little.
1364
a957d06c
JD
13652008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
1366
1367 * NEWS: Update for recent changes.
1368
462503f8
JD
13692008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
1370
1371 Fix unexpanded macros in GLR defines file.
1372 Reported by Csaba Raduly at
1373 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
1374 * THANKS (Csaba Raduly): Add.
1375 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
1376 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
1377 lexer in a separate module that includes the defines file.
1378 (AT_CHECK_CALC): Use AT_FULL_COMPILE and request compilation of lexer
1379 source.
1380 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
1381 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
1382 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
1383 (AT_DATA_SOURCE_PROLOGUE): New.
1384 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
1385 (AT_DATA_SOURCE): New.
1386 (AT_FULL_COMPILE): New, copied from master branch and extended to
1387 support an additional source file.
1388
bf151b75
JD
13892008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1390
1391 Don't let maintainer-*-check targets force a version update.
1392 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
1393 handled.
1394
f56274a8
DJ
13952008-11-17 Di-an Jan <dianj@freeshell.org>
1396
1397 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
1398 Align menus. Adjust word wrapping. Use node names for menu names.
1399 (Examples): Don't abbreviate node names.
1400 (LocalWords): Remove abbreviations.
1401 (Copying): Make description a sentence.
bf151b75 1402 (Java Action Features): Remove period to match the rest of menu.
f56274a8 1403
b5775a81
PB
14042008-11-11 Paolo Bonzini <bonzini@gnu.org>
1405
1406 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
1407 * configure.ac: Adjust usage.
1408 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
1409 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
1410 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
1411
7ed73f82
JD
14122008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
1413
1414 Don't add a semicolon to actions for %skeleton or %language.
1415 It breaks Java test cases as reported by Akim Demaille.
1416 * src/scan-code.l: Implement.
1417
4b1ebc49
JD
14182008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
1419
1420 Clean up %skeleton and %language priority implementation.
1421 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
1422 remove static qualifier because others will soon need to see it.
1423 (language_prio): Likewise.
1424 (getargs): Use command_line_prio rather than 0.
1425 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
1426 enum fields.
1427 (skeleton_prio): Extern it.
1428 (language_prio): Extern it.
1429 * src/parse-gram.y: Use grammar_prio rather than 1.
1430
738cde3e
AD
14312008-11-04 Akim Demaille <demaille@gostai.com>
1432
1433 * NEWS: Mention the trailing semicolon in action.
1434
d6fb461d
AD
14352008-11-04 Akim Demaille <demaille@gostai.com>
1436
1437 Reformat NEWS.
1438 * NEWS: Use more outline-mode markup.
1439 Suggested by Jim Meyering.
1440
14da0cdd
JD
14412008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
1442
1443 Fix user actions without a trailing semicolon.
1444 Reported by Sergei Steshenko at
1445 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
1446 * THANKS (Sergei Steshenko): Add.
1447 * src/scan-code.l (SC_RULE_ACTION): Fix it.
1448 * tests/regression.at (Fix user actions without a trailing semicolon):
1449 New test case.
1450
c9ba9e59
JD
14512008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
1452
1453 Initiate further development.
1454 * NEWS: Create an empty section for new entries.
1455 * gnulib: Update submodule to HEAD.
1456
bfb40910
JD
14572008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
1458
1459 * NEWS: Version 2.4.
1460
241fda7a
JD
14612008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
1462
1463 Prepare for next release.
1464 * NEWS: Briefly mention changes since 2.3b.
1465 * README: Say GNU m4 1.4.6, which we've been requiring in release
1466 announcements already, not 1.4.3, which breaks the build.
1467
ed4d67dc
JD
14682008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
1469
1470 Say %language is experimental.
1471 We're thinking of extending it's effect on output file naming. See the
1472 thread at
1473 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
1474 * NEWS: Say it's experimental.
1475 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
1476 recommend it over %skeleton for now.
1477 (Bison Options): Likewise.
1478 (C++ Bison Interface): Use %skeleton not %language.
1479 (Calc++ Parser): Use %skeleton not %language.
1480 * src/getargs.c (usage): Say it's experimental.
1481
e254a580
DJ
14822008-11-01 Di-an Jan <dianj@freeshell.org>
1483 Paolo Bonzini <bonzini@gnu.org>
1484
1485 Support all Java parser class modifiers.
1486 * data/java.m4 (b4_percent_define_get3): New.
1487 (b4_final_if, b4_strictfp_if): New.
1488 * data/lalr1.java (final, strictfp, extends, implements): Support.
1489 * doc/bison.texinfo (final, strictfp, extends, implements): Add
1490 documentation.
1491 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
1492 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
1493 (AT_CHECK_JAVA_GREP): New.
1494 (Java parser class modifiers): New test.
1495 (Java parser class extends and implements): New test.
1496
1497 Model exception propagation better with throws and lex_throws.
1498 * data/java.m4 (b4_list2): New.
1499 (throws): Change default.
1500 * data/lalr1.java (yyaction): Add throws.
1501 (parse): Add lex_throws in addition to throws.
1502 * doc/bison.texinfo (throws, lex_throws): Add documentation.
1503 * tests/java.at (Java throws specifications): New test.
1504
1505 Improve documentation for Java parsers.
1506 * doc/bison.texinfo (Java Parsers): Add subsections.
1507 Don't quote first argument of %define.
1508 (Java Bison Interface): Document output files. Move documentation
1509 of parser class and merge into Java Parser Interface. Document
1510 features that error out. Document directives with no effect.
1511 Move note about Javadoc higher.
1512 (Java Semantic Values): Explicitly mention stype.
1513 Document that generic types cannot be used.
1514 (Java Location Values): Use @deftypeivar. Document constructors.
1515 Correct return value for toString.
1516 (Java Parser Interface): List undocumented constants/fields.
1517 Move documentation of fields added by %parse-param closer to list
1518 of members. Document that token names are added as fields.
1519 Document constructors accurately. Remove error method.
1520 (Java Scanner Interface): Move note on %pure-parser to Java Bison
1521 Interface. Describe %code lexer and yylex accutately.
1522 Remove documentation that does not match the code.
1523 (Java Action Features): New.
1524 (Java Differences): Add reference. Add item on semantic values.
1525 Add note about @{ ... @}. Clarify %% epilogue placement.
1526 (Java Declarations Summary): New.
1527
1528 Fix Java skeleton.
1529 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
1530 (b4_remove_comma): Quote test argument.
1531 (b4_identification): Remove "bison" field.
1532 * tests/java.at (Java parser class and package names): New test.
1533 (Java %parse-param and %lex-param): New test.
1534 (Java stype, position_class and location_class): New test.
1535
f259e4e6
PB
15362008-10-31 Di-an Jan <dianj@freeshell.org>
1537
1538 * data/lalr1.jave: Update copyright years.
1539 (YYParser): Correct name of "generated from" file in Javadoc:
1540 use b4_file_name instead of @ofile@.
1541 (Location constructor): Correct Javadoc parameter name.
1542 (yylloc): Add missing opening m4 quote after b4_location_if.
1543 This removes a stray [ in the Javadoc of Lexer.getStartPos.
1544 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
1545 (YYParser constructor): Correct Javadoc parameter name.
1546
cae5057f
JD
15472008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
1548
1549 Always put auxiliary code files in the same dir as other output files.
1550 * src/files.c (compute_file_name_parts): When the user specifies
1551 --output but not --file-prefix, extract the directory prefix from the
1552 file prefix not from the grammar file name. This affects the location
1553 of files like location.hh generated by the C++ skeleton. The includes
1554 in the other output files require this fix.
1555 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
1556 for expected output files.
1557 (Output files): Add a test for the above.
1558
4af432ba
JD
15592008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
1560
1561 * gnulib: Update submodule to HEAD.
1562
e26d4e43
JD
15632008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
1564
1565 Update copyright year.
1566 * src/files.c: Here.
1567
c0ee9e21
DJ
15682008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
1569
1570 Don't overwrite the input file.
1571 * src/files.c (output_file_name_check): Fatal error if using input file
1572 for output.
1573 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
1574 argument.
1575 (Conflicting output files): Add test.
1576
482dc52f
AD
15772008-10-28 Akim Demaille <demaille@gostai.com>
1578
1579 Space changes.
1580 * data/lalr1.cc: Formatting changes.
1581
52cbbe84
AD
15822008-10-28 Akim Demaille <demaille@gostai.com>
1583
1584 Don't define debugging functions when !YYDEBUG.
1585 * data/lalr1.cc (debug_stream, set_debug_stream)
1586 (debug_level_type, debug_level, set_debug_level): Don't
1587 declare them when YYDEBUG is not defined.
1588 The implementation are already YYDEBUG-aware.
1589
0925d5bf
AD
15902008-10-28 Akim Demaille <demaille@gostai.com>
1591
1592 Prefer "continue" for empty loop bodies.
1593 * etc/bench.pl.in: Use "continue" instead of {}.
1594
cf98343c
AD
15952008-10-28 Akim Demaille <demaille@gostai.com>
1596
1597 Space and comments changes.
1598 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
1599 * data/c.m4, data/lalr1.cc: Space changes.
1600
9f467b7d
AD
16012008-10-28 Akim Demaille <demaille@gostai.com>
1602
1603 Make gnulib a submodule.
1604 * gnulib: New.
1605 * .gitmodules (gnulib): New.
1606
0f0e1ace
JD
16072008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
1608
1609 Fix yyerror_range for user-defined location type in C++. Reported by
1610 Georg Sauthoff at
1611 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
1612 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
1613 * THANKS (Georg Sauthoff): Add.
1614
548e2104
JD
16152008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
1616
1617 Update several administrative files mainly to facilitate releasing.
1618 * HACKING (Administrivia): Make the git-merge-changelog notes more
1619 helpful.
1620 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
1621 (Release Procedure): Update for git and add numerous details that were
1622 previously missing.
1623 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
1624 * maint.mk (announcement): Don't list bison as a bootstrap tool so
1625 that announcements don't claim we bootstrapped with whatever bison
1626 happened to be in PATH. Add flex as a bootstrap tool.
1627 * Makefile.maint: Remove, previously replaced by maint.mk.
1628 * Makefile.cfg: Remove, and migrate settings to...
1629 * cfg.mk: ... here for the sake of `make announcement'.
1630 * bootstrap.conf (gnulib_modules): Add announce-gen.
1631 * README: Say GNU Bison instead of just Bison. Suggested by Karl
1632 Berry.
1633
ddf17a6e
PB
16342008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
1635
1636 Small but important bugfixes for the Java skeleton.
1637 * data/lalr1.java (yyerror): Change Location to b4_location_type.
1638 (yy_symbol_print): Call toString on yyvaluep.
1639
e1145ad8
AD
16402008-08-29 Akim Demaille <demaille@gostai.com>
1641
1642 Clarify UPDATED use.
bee1df15 1643 * doc/bison.texinfo: It refers to the last edition of this file,
e1145ad8 1644 not to the release date of Bison.
bee1df15 1645 Reported by Joel E. Denny.
e1145ad8 1646
0df72d78
AD
16472008-08-29 Akim Demaille <demaille@gostai.com>
1648
1649 * README: Update FAQ pointer.
1650 Reported by Joel E. Denny.
1651
9a90b6bb
EB
16522008-08-27 Eric Blake <ebb9@byu.net>
1653
1654 Resync m4sugar from autoconf.
1655 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
1656 (m4_init): Adjust to latest m4.git changes.
1657 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
1658 effects.
1659 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
1660 (_m4_list_cmp): Reduce side effects.
1661
65015668
AD
16622008-08-27 Akim Demaille <demaille@gostai.com>
1663
1664 Check yyerrok in calc.at.
bee1df15
EB
1665 * tests/calc.at (calc.y): Use yyerrok on "( error )".
1666 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
1667 expected.
65015668 1668
98e26a92
AD
16692008-08-27 Akim Demaille <demaille@gostai.com>
1670
1671 Support yyerrok in lalr1.cc.
1672 YYBACKUP is still to import back into lalr1.cc.
bee1df15 1673 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
98e26a92 1674
86c0e784
JD
16752008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
1676
1677 For maintainer-check*, don't recompile for a $(VERSION) update.
1678 * cfg.mk: New file.
1679 (_is-dist-target): Override the one in GNUmakefile.
1680 * Makefile.am (EXTRA_DIST): Add cfg.mk.
1681
88511166
JD
16822008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
1683
1684 Update for recent change to gnulib.
1685 * src/parse-gram.y: Don't include strverscmp.h. It comes from
1686 string.h now.
1687
6bbb2ed5
EB
16882008-08-15 Eric Blake <ebb9@byu.net>
1689
d67c52e8
EB
1690 Remaining m4sugar merge from autoconf.
1691 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
1692 * data/m4sugar/foreach.m4: New file, copied from autoconf.
1693 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
1694 * src/output.c (output_skeleton): Tell m4 how to find it.
1695
6bbb2ed5
EB
1696 Partial m4sugar merge from autoconf: m4_map.
1697 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
1698 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
1699 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
1700 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
1701 for empty list.
1702 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
1703 Likewise.
1704 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
1705 declares it.
1706
8dce3875
JD
17072008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
1708
1709 Keep .version and PACKAGE_VERSION in sync.
1710 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
1711 dependency, and add comments justifying this in more detail. Discussed
1712 starting at
1713 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
1714
882a1fbf
EB
17152008-08-06 Eric Blake <ebb9@byu.net>
1716
a3764451
EB
1717 Partial m4sugar merge from autoconf: m4_shiftn.
1718 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
1719 (m4_shift2, m4_shift3): New macros.
1720 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
1721 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
1722 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
1723 * data/java.m4 (b4_remove_comma): Likewise.
1724
882a1fbf
EB
1725 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
1726 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
1727 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
1728 (m4_init): Consolidate wrapped text into single m4_wrap.
1729 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
1730 in wrapped text.
1731
a30e920d
EB
17322008-08-05 Eric Blake <ebb9@byu.net>
1733
dfcc5959
EB
1734 Partial m4sugar merge from autoconf: builtins, version.m4.
1735 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
1736 (m4_prepend): Remove, as it is unused and inherently quadratic,
1737 whereas m4_append is linear in newer m4.
1738 (m4_mkstemp): New builtin.
1739 (m4_symbols): Make rename conditional.
1740 (m4_version_prereq): Ensure fatal error if used in bison, which
1741 intentionally lacks version.m4.
1742
a30e920d
EB
1743 Fix comments in m4sugar.
1744 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
1745
445b7470
JD
17462008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
1747
1748 Update for recent .gitignore fix in Gnulib.
1749 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
1750 anchored .gitignore entries.
1751
a1e50014
JD
17522008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
1753
1754 Set gnu or gnits strictness.
1755 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
1756 development and gnits strictness for releases. Based on Eric Blake's
1757 suggestion at
1758 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
1759
d43f77e7
PB
17602008-07-31 Paolo Bonzini <bonzini@gnu.org>
1761
1762 * NEWS: Clarify documentation of %language.
1763
fee2ed87
PB
17642008-07-31 Paolo Bonzini <bonzini@gnu.org>
1765
1766 Support usage of git-merge-changelog.
1767 * .gitattributes: New.
1768 * HACKING: Document usage of git-merge-changelog.
1769 * bootstrap: Install git-merge-changelog entries in .git/config
1770 if appropriate.
1771
78029cd5
JD
17722008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
1773
1774 Remove remaining dependence on CVS Id keyword.
1775 * ChangeLog: For the sake of people still using CVS, don't use dollars
1776 when mentioning Id.
1777 * data/xslt/bison.xsl: Remove Id from header comments, where it was
1778 unusual anyway.
1779 * data/xslt/xml2dot.xsl: Likewise.
1780 * data/xslt/xml2text.xsl: Likewise.
1781 * data/xslt/xml2xhtml.xsl: Likewise.
1782 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
1783 * doc/Makefile.am (neutralize): Remove, no longer needed.
1784 (.x.1): Don't use neutralize.
1785 (edit): Don't substitute for ID.
1786 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
1787
c53d18b1
JD
17882008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
1789
1790 Fix dependence on computed configure variables.
1791 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
1792 $(top_srcdir)/configure.ac so that changes to computed variables, such
1793 as PACKAGE_VERSION, are seen.
1794 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
1795
5523ac79
JD
17962008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
1797
1798 Update copyright dates for recent changes.
1799 * Makefile.am: Here.
1800 * src/Makefile.am: Here.
1801 * src/reduce.c: Here.
1802 * tests/reduce.at: Here.
1803
8fa36911
JD
18042008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
1805
1806 Use git-version-gen for version names between releases.
1807 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
1808 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
1809 * .prev-version: New.
1810 * .version.in: Remove.
78029cd5 1811 * ChangeLog: Remove the Id previously used for capturing the CVS
8fa36911
JD
1812 revision.
1813 * GNUmakefile: Remove, now copied from Gnulib.
1814 * Makefile.am: Add code suggested by comments in
1815 build-aux/git-version-gen.
1816 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
1817 .prev-version, and .version.
1818 * NEWS (2.3b+): Rename to...
1819 (?.?): ... this because we're dropping the "+" version naming scheme,
1820 but, in general, we still can't be sure of our next release name.
1821 * bootstrap: Add a quick hack to remove from .gitignore the
1822 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
1823 entry. This should really be fixed in gnulib instead.
1824 * bootstrap.conf (gnulib_modules): Add gnumakefile.
1825 * configure.ac (AC_INIT): Set version name by invoking
1826 build-aux/git-version-gen.
1827 (AC_CONFIG_FILES): Remove .version, now generated by
1828 build-aux/git-version-gen.
1829 * maint.mk: New, copied from coreutils.
1830 * doc/.cvsignore (bison.1): Add.
1831 * doc/.gitignore (/bison.1): Add.
1832 * doc/bison.1: Remove, generated.
1833 * src/.cvsignore (revision.c): Remove.
1834 * src/.gitignore (/revision.c): Remove.
1835 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
1836 (BUILT_SOURCES): Remove revision.c.
1837 (revision.c): Remove.
1838 * src/getargs.c (version): Don't print revision after the VERSION.
1839 * src/revision.h: Remove.
1840
bcf07cb7
JD
18412008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
1842
1843 Fix untranslatable composition of sentences. Reported by Goran
1844 Uddeborg at
1845 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
1846 * THANKS (Goran Uddeborg): Add.
1847 * src/reduce.c (reduce_print): Report the number of nonterminals and
1848 rules useless in the grammar in separate sentences.
1849 * tests/reduce.at (Useless Rules): Update output.
1850 (Reduced Automaton): Likewise.
1851 (Underivable Rules): Likewise.
1852 (Empty Language): Likewise.
1853
9aacab9a
JD
18542008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
1855
1856 Fix some .gitignore and .cvsignore problems.
1857 * bootstrap (insert_sorted_if_absent): Replace all uses with...
1858 (insert_vc_ignore): ... this new function, which prepends `/' to all
1859 .gitignore entries before passing them to insert_sorted_if_absent.
1860 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
1861 .cvsignore files are maintained even though Bison developers run
1862 bootstrap while using Git.
1863 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
1864 unneeded by Bison.
1865 (gnulib): Add.
1866 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
1867 unneeded. Reported by Eric Blake.
1868 * lib/.gitignore (/*~): Add.
1869 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
1870 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
1871 Blake.
1872 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
1873
a9fc7990
JD
18742008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
1875
1876 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
1877 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
1878 * bootstrap.conf (gnulib_modules): Add unsetenv.
1879 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
1880 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
1881 (/setenv.m4): Add.
1882 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
1883 the first argument because it may become position-dependent, and unset
1884 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
1885 Add comments explaining these issues in more detail.
1886
0f1d6f10
JD
18872008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
1888
1889 Add .gitignore everywhere based on .cvsignore.
1890 * .gitignore: New.
1891 * build-aux/.gitignore: New.
1892 * data/.gitignore: New.
1893 * doc/.gitignore: New.
1894 * etc/.gitignore: New.
1895 * examples/.gitignore: New.
1896 * examples/calc++/.gitignore: New.
1897 * lib/.gitignore: New.
1898 * m4/.gitignore: New.
1899 * po/.gitignore: New.
1900 * runtime-po/.gitignore: New.
1901 * src/.gitignore: New.
1902 * tests/.gitignore: New.
1903
7bd1665a
JD
19042008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
1905
1906 * NEWS (2.3b+): New section, empty for now.
1907 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
1908
72c5b982
JD
19092008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
1910
1911 * NEWS (2.3b): Update release date since there has been a delay in
1912 getting the announcements and tarballs out.
1913
bd02cd5d
JD
19142008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
1915
1916 * NEWS: Version 2.3b.
1917 * configure.ac (AC_INIT): Likewise.
1918 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
1919
9126263e
JD
19202008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
1921
1922 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
1923 been doing it for years.
1924 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
1925 (Release Procedure): Add FIXME about make alpha being unmaintained.
1926
fa6aa7b3
JD
19272008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
1928
1929 * data/yacc.c: Reformat m4 a little for readability.
1930 * src/lalr.c (build_relations): Correct comment.
1931
d30b312d
JMG
19322008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1933
1934 DJGPP specific issue.
1935 * djgpp/config.sed: Fixes required to run configure scripts generated
1936 by autoconf 2.62.
1937
138d4cd9
JD
19382008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
1939
1940 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
1941 coordinator@translationproject.org.
1942
8f7e2e1f
JD
19432008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
1944
1945 * THANKS: Add Eric Blake.
1946
f55efa38
JD
19472008-04-23 Eric Blake <ebb9@byu.net>
1948
1949 Revert prior patch, by working around autoconf regression.
1950 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
1951 ("Output file name: ("): Uncomment test.
1952 ("Output file name: )"): Likewise.
1953 Based on an idea from Noah Misch.
1954
096c9f9d
JD
19552008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1956
1957 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
1958 2.61. Reported by Juan Manuel Guerrero at
1959 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
1960 * tests/output.at ("Output file name: ("): Comment out test case for
1961 now.
1962 ("Output file name: )"): Likewise.
1963
0f664b89
JD
19642008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1965
1966 * GNUmakefile: Update git-version-gen invocation so make dist
1967 succeeds.
1968
1cfe6375
JD
19692008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1970
1971 Update to the current gnulib CVS repository, and fix trigraph handling
1972 in Bison.
1973 * bootstrap: Update gnulib CVS repository URL.
1974 (symlink_to_dir): Encapsulate the code that guarantees the destination
1975 directory exists into...
1976 (check_dst_dir): ... this new function, and...
1977 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
1978 fail when copying files into lib/uniwidth/.
1979 * src/output.c (prepare_symbols): When writing yytname muscles, where
1980 symbol names will be encoded in C-string literals, tell quotearg to
1981 escape trigraphs. This used to be the default in gnulib.
1982 * tests/regression.at (Token definitions): Because of the change in
1983 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
1984 escapes trigraphs in symbol names. Thus, yytname no longer has
1985 trigraphs unnecessarily doubly escaped. Update test case output.
1986 Extend test case to be sure Bison's own error messages will no longer
1987 have trigraphs in symbol names unnecessarily escaped once.
1988
74c52fc8
JD
19892008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
1990
1991 Fix make dist infinite loop reported by Juan Manuel Guerrero at
1992 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
1993 * .cvsignore: Add .version.
1994 * .version.in: New.
1995 * bootstrap.conf (gnulib_modules): Add git-version-gen.
1996 * configure.ac (AC_CONFIG_FILES): Add .version.
1997 * build-aux/.cvsignore: Add git-version-gen.
1998
8e55b3aa
JD
19992008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
2000
2001 * NEWS (2.3a+): Mention that -g now takes an argument.
2002 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
2003 consistency. Update the -g and -x entries now that they take
2004 arguments. Use brackets to indicate optional arguments.
2005 * src/getargs.c (usage): Explain the relationship between arguments of
2006 long and short options more completely. Document --defines and -d
2007 separately since the former takes an argument but, for POSIX Yacc, the
2008 latter does not.
2009 (short_options): Let -W take an optional argument like --warnings.
8452fdd9 2010 (getargs): Sort cases.
8e55b3aa 2011
59c5ac72
AD
20122008-02-28 Akim Demaille <demaille@gostai.com>
2013
2014 * doc/bison.texinfo: Fix a few typos.
2015
118d4978
AD
20162008-02-28 Akim Demaille <akim@epita.fr>
2017
2018 * doc/bison.texinfo (Bison Options): Document -W.
2019 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
2020
7020f1e9
AD
20212008-02-28 Akim Demaille <akim@epita.fr>
2022
2023 * src/getargs.c (short_options): Split and sort for readability.
2024 -g and -x take optional arguments, just like their long options.
2025 * build-aux/cross-options.pl: Use /x to make the regexp easier to
2026 understand.
2027 Fix the handling of $opt which resulted in all the argument to be
2028 considered as optional.
2029
59da312b
JD
20302008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
2031
2032 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
2033 say its interface is experimental.
2034 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
2035 Java.
2036 (Bison Options): In the -L and --language entry, mention Java.
2037 (Java Bison Interface): Say the interface is experimental.
2038 * src/getargs.c (usage): Mention -L and --language.
2039
2040 * NEWS (2.3a+): Say the push parsing interface is experimental.
2041 * doc/bison.texinfo (Push Decl): Likewise.
2042 (Decl Summary): Likewise in the "%define api.push_pull" entry.
2043 (Push Parser Function): Likewise.
2044 (Pull Parser Function): Likewise.
2045 (Parser Create Function): Likewise.
2046 (Parser Delete Function): Likewise.
2047 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
2048 yypull_parse, and yypush_parse entries.
2049
2050 * NEWS (2.3a+): Mention XML support, and say the schema is
2051 experimental.
2052 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
2053 * src/getargs.c (usage): Say the XML schema is experimental.
2054
2055 * NEWS (2.3a+): Say option instead of flag.
2056
2bb3ebec
WP
20572008-02-21 Wojciech Polak <polak@gnu.org>
2058
2059 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
2060 text.
2061
333e670c
JD
20622008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
2063
2064 Fix impure push parser compile error reported by Bob Rossi at
2065 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
2066 * data/yacc.c: Clean up whitespace in the output a little.
2067 (yypstate_allocated): Define for impure push parsers regardless of
2068 whether the pull interface is also requested.
2069 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
2070 check impure push parsers without the pull interface.
2071
2072 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
2073 yyerror takes arguments specified by %parse-param while yypstate_new
2074 does not.
2075 * doc/bison.texinfo (Parser Create Function): Document that
2076 yypstate_new returns 0 for multiple impure parser instances.
2077 * tests/push.at (Push Parsing: Multiple impure instances): Update
2078 expected stderr output.
2079
798096e1
JD
20802008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
2081
2082 * runtime-po/POTFILES.in (push.c): Remove.
2083
9ca7f077
JD
20842008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
2085
2086 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
2087 * data/push.c: Rename to...
2088 * data/yacc.c: ... this, overwriting it.
2089 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
2090 `%push-pull-parser' -> `%define api.push_pull "both"'.
2091 Remove old yacc.c tests, and update push.c tests to yacc.c.
2092
42ee26bb
JD
20932008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
2094
2095 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
2096 `"%code top" blocks' instead of `%code "top" blocks'.
2097 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
2098 Clean up whitespace in the output a little.
2099
b1cc23c4
JD
21002008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
2101
2102 Fix documentation problems reported by Tim Josling at
2103 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
2104 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
2105 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
2106 integers. Explain the effect of literal string aliases on error
2107 messages. Copy token 0 documentation from the C++ skeleton
2108 documentation.
2109
ab7f29f8
JD
21102008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
2111
2112 Accept a token number in a %left, %right, or %nonassoc for POSIX
2113 conformance. Reported by Tim Josling at
2114 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
2115 * NEWS (2.3a+): Mention.
2116 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
2117 and code numbers are treated by precedence declarations.
2118 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
2119 of symbols.1.
2120 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
2121 of symbol.
2122 (symbol.prec): New, just like symbol but allows INT.
2123 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
2124 longer holds.
2125 * tests/regression.at (Token number in precedence declaration): New
2126 test case.
2127
a924ef36
JMG
21282008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2129
2130 DJGPP specific issues.
2131 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
2132 be changed. Copyright timestamp adjusted.
2133 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
2134 be changed. Copyright timestamp adjusted.
2135 * djgpp/config.site: Copyright timestamp adjusted.
2136 * djgpp/config_h.sed: Copyright timestamp adjusted.
2137 * djgpp/djunpack.bat: Copyright timestamp adjusted.
2138 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
2139 filename translation list.
2140 * djgpp/subpipe.c (init_subpipe): Check the environment variables
2141 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
2142 files shall be created. Before trying to use the temp dir where the
2143 environment variable points to check that the dir really exists. If
2144 not default to the cwd as temp dir. Copyright timestamp adjusted.
2145 * djgpp/subpipe.h: Copyright timestamp adjusted.
2146 * djgpp/testsuite.sed: Copyright timestamp adjusted.
2147
389c8cfd
PE
21482008-01-30 Paul Eggert <eggert@cs.ucla.edu>
2149
2150 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
2151
5d1cfef4
PE
21522008-01-09 Paul Eggert <eggert@cs.ucla.edu>
2153
2154 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
2155 Problem reported by Claudio Saavedra in
2156 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
2157
e2dcf996
WP
21582008-01-05 Wojciech Polak <polak@gnu.org>
2159
2160 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
2161 document's title with the input grammar file name.
2162
da730230
JD
21632007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
2164
2165 Automate regression testing of the XML/XSLT implementation. Discussed
2166 starting at
2167 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
2168 * configure.ac (XSLTPROC): New substitution.
2169 * Makefile.am (maintainer-xml-check): New phony target invoking...
2170 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
2171 invoking make maintainer-check with BISON_TEST_XML=1.
2172 * tests/atlocal.in (XSLTPROC): New.
2173 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
2174 not to report reachable memory when Bison is expected to have a
2175 non-zero exit status and (2) to compare XML/XSLT output with --graph
2176 and --report=all output for every working grammar when
2177 BISON_TEST_XML=1.
2178 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
2179 (AT_BISON_CHECK_XML): New.
2180 (AT_QUELL_VALGRIND): New.
2181 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
2182 (AT_CHECK): ... don't redefine this since this was the old way to
2183 quell Valgrind.
2184 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
2185 AT_BISON_CHECK invocations.
2186 * tests/c++.at: Likewise.
2187 * tests/calc.at: Likewise.
2188 * tests/conflicts.at: Likewise.
2189 * tests/cxx-type.at: Likewise.
2190 * tests/existing.at: Likewise.
2191 * tests/glr-regression.at: Likewise.
2192 * tests/headers.at: Likewise.
2193 * tests/input.at: Likewise.
2194 * tests/java.at: Likewise.
2195 * tests/output.at: Likewise.
2196 * tests/push.at: Likewise.
2197 * tests/reduce.at: Likewise.
2198 * tests/regression.at: Likewise.
2199 * tests/sets.at: Likewise.
2200 * tests/skeletons.at: Likewise.
2201 * tests/synclines.at: Likewise.
2202 * tests/torture.at: Likewise.
2203 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
2204 tends to hang xsltproc.
2205 (Big horizontal): Likewise.
2206
408476bc
JD
22072007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
2208
2209 In XML output, remove redundant class attribute on symbol element.
2210 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
2211 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
2212 look up a symbol to determine whether it's a nonterminal or terminal.
2213 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
2214 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
2215
2216 Add prec/assoc information to XML output.
2217 * src/gram.c (grammar_rules_print_xml): For each rule that has a
2218 %prec, add a percent_prec attribute.
2219 * src/print-xml.c (print_grammar): For each terminal that has a
2220 precedence or associativity, add a prec or assoc attribute.
2221 (xml_indent): New.
2222 (xml_puts): Use xml_indent.
2223 (xml_printf): Use xml_indent.
2224 * src/print-xml.h (xml_indent): Prototype.
2225
2226 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
2227 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
2228
d4a26c48
JD
22292007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
2230
2231 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
2232 (bison:ruleByNumber): ... this for clarity.
2233 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
2234 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
2235 (xsl:template match="reduction"): Update.
2236 (xsl:template match="item"): Update.
2237 (xsl:template match="reduction"): Update.
2238
2239 In the XML output, don't print the list of rules where symbols appear.
2240 Compute it in XSLT instead. Discussed at
2241 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
2242 * data/xslt/bison.xsl (bison:ruleByLhs): New.
2243 (bison:ruleByRhs): New.
2244 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
2245 bison:ruleByRhs.
2246 (xsl:template match="terminal/rule"): Remove.
2247 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
2248 bison:ruleByRhs.
2249 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
2250 Remove.
2251 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
2252 bison:ruleByRhs and mode="number-link" for rule template.
2253 (xsl:template match="terminal/rule"): Remove.
2254 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
2255 bison:ruleByRhs and mode="number-link" for rule template.
2256 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
2257 Rewrite as...
2258 (xsl:template match="rule" mode="number-link"): ... this.
2259 * src/print-xml.c (print_grammar): Don't print the list of rules.
2260
ef1b4273
JD
22612007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
2262
2263 Don't let --report affect XML output; always print all information.
2264 Discussed at
2265 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
2266 * src/conflicts.c (log_resolution): Implement.
2267 * src/print-xml.c (print_core): Implement.
2268 (print_state): Implement.
2269 (print_xml): Implement.
2270
2271 * NEWS (2.3a+): Fix quotes.
2272 * src/parse-gram.y (prologue_declaration): For consistency with -v,
2273 don't let %verbose clear the list specified by --report.
2274
0f6cd9e3
AD
22752007-11-26 Akim Demaille <akim@epita.fr>
2276
2277 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
2278
d80fb37a
JD
22792007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
2280
2281 In the XML output, list useless and unused symbols and rules with the
2282 useful ones and add a "usefulness" attribute. Discussed starting at
2283 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
2284 * src/gram.c (grammar_rules_partial_print_xml): Remove.
2285 (grammar_rules_print_xml): Print all rules instead of just those
2286 useful in the grammar, and add a "usefulness" attribute.
2287 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
2288 * src/print-xml.c (print_rules_useless_in_parser): Remove.
2289 (print_grammar): Print all nonterminals instead of just useful ones,
2290 and add a "usefulness" attribute to nonterminals and terminals.
2291 (print_xml): Don't print a separate "reductions" or
2292 "rules-useless-in-parser" element.
2293 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
2294 (reduce_xml): Remove.
2295 (reduce_token_unused_in_grammar): New.
2296 (reduce_nonterminal_useless_in_grammar): New.
2297 * src/reduce.h (reduce_xml): Remove prototype.
2298 (reduce_token_unused_in_grammar): Add prototype.
2299 (reduce_nonterminal_useless_in_grammar): Add prototype.
2300 * data/xslt/xml2text.xsl: Update for XML changes.
2301 * data/xslt/xml2xhtml.xsl: Update for XML changes.
2302 * tests/reduce.at (Useless Terminals): Update output.
2303 (Useless Rules): Update output.
2304 (Reduced Automaton): Update output.
2305
2306 Say "Terminals unused in grammar" instead of "Unused terminals".
2307 * NEWS (2.3a+): Update.
2308 * doc/bison.texinfo (Understanding): Update example output.
2309 * src/reduce.c (reduce_output): Implement.
2310 * data/xslt/xml2text.xsl: Implement.
2311 * data/xslt/xml2xhtml.xsl: Implement.
2312
1bb2bd75
JD
23132007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
2314
2315 Accept --report-file=FILE to override the default `.output' filename.
2316 * NEWS (2.3a+): Mention.
2317 * doc/bison.texinfo (Bison Options): Add an entry.
2318 * src/files.c (compute_output_file_names): Don't override
2319 spec_verbose_file if already set.
2320 * src/getargs.c (usage): Document --report-file.
2321 (REPORT_FILE_OPTION): New anonymous enum member.
2322 (long_options): Add entry for it.
2323 (getargs): Add case for it setting spec_verbose_file.
2324
2325 * build-aux/cross-options.pl: Don't record a short option just because
2326 there's an arg.
2327 * doc/.cvsignore: Add yacc.1.
2328
a005a9c4
AD
23292007-11-14 Akim Demaille <akim@epita.fr>
2330
2331 * doc/yacc.1.in: New.
2332 * configure.ac, doc/Makefile.am: Adjust.
2333 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
2334 config.h symbol.
2335 Use AC_SUBST for assignments too.
2336 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
2337
cff03fb2
JD
23382007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
2339
2340 * src/gram.c: Remove comments that duplicate comments in gram.h.
2341
2342 When reporting useless rules and nonterminals, say "useless in grammar"
2343 instead of "useless", and say "useless in parser" instead of "never
2344 reduced". Discussed starting at
2345 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
2346 * NEWS (2.3a+): Mention this change.
2347 * data/xslt/xml2text.xsl: Update output text and expected input XML
2348 element names to match changes below.
2349 * data/xslt/xml2xhtml.xsl: Likewise.
2350 (xsl:template match="bison-xml-report"): Add missing entry in Table of
2351 Contents: "Rules useless in parser due to conflicts".
2352 * doc/bison.texinfo (Decl Summary): Reword a little.
2353 (Understanding): Update example output for changes below.
2354 * src/gram.c: (rule_useful_p): Rename to...
2355 (rule_useful_in_grammar_p): ... this.
2356 (rule_useless_p): Rename to...
2357 (rule_useless_in_grammar_p): ... this.
2358 (rule_never_reduced_p): Rename to...
2359 (rule_useless_in_parser_p): ... this.
2360 (grammar_rules_print): Update for renames.
2361 (grammar_rules_print_xml): Update for renames.
2362 (grammar_rules_never_reduced_report): Rename to...
2363 (grammar_rules_useless_report): ... this since it is used for either
2364 kind of useless rule.
2365 * src/gram.h: Reword comments and update function names in prototypes.
2366 * src/main.c (main): Say "rule useless in parser due to conflicts".
2367 * src/print-xml.c (print_rules_never_reduced): Rename to...
2368 (print_rules_useless_in_parser): ... this, and rename output XML
2369 element "rules-never-reduced" to "rules-useless-in-parser".
2370 (print_xml): Update for rename.
2371 * src/print.c (print_results): Say "Rules useless in parser due to
2372 conflicts".
2373 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
2374 (nonterminals_reduce): Say "nonterminal useless in grammar".
2375 (reduce_output): Say "Nonterminals useless in grammar".
2376 Say "Rules useless in grammar".
2377 (reduce_xml): Rename output XML element "useless" to
2378 "useless-in-grammar".
2379 (reduce_print): Don't report the count of grammatically useless rules
2380 as "rules never reduced" just because %yacc is specified.
2381 In the correct report of this count, say nonterminal(s) and rule(s)
2382 "useless in grammar".
2383 * tests/conflicts.at (S/R in initial): Update expected output.
2384 (Defaulted Conflicted Reduction): Likewise.
2385 (Unreachable States After Conflict Resolution): Likewise.
2386 * tests/existing.at (GNU pic Grammar): Likewise.
2387 * tests/reduce.at (Useless Nonterminals): Likewise.
2388 (Useless Rules): Likewise.
2389 (Reduced Automaton): Likewise.
2390 (Underivable Rules): Likewise.
2391 (Empty Language): Likewise.
2392
66f0441d
JD
23932007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
2394
2395 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
2396 here document and before the EOF so that BSD's implementation of Bourne
2397 shell doesn't parse the delimiter as part of the here document.
2398 * doc/.cvsignore: Add cross-options.texi.
2399 * src/getargs.c (usage): Add a blank line after the warning categories.
2400
d0ee4105
PB
24012007-11-08 Paolo Bonzini <bonzini@gnu.org>
2402
2403 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
2404
e8b1fb9b
AD
24052007-11-05 Akim Demaille <akim@epita.fr>
2406
2407 Remove Id: from bison.1.
2408 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
2409 (perl -0777 -pi -e 's/\.PP\nId): New.
2410 (.x.1): Use it to ignore the version control revision.
2411
2f7a96b5
AD
24122007-11-05 Akim Demaille <demaille@gostai.com>
2413
2414 * build-aux/Makefile.am: Ship cross-options.pl.
2415 * doc/Makefile.am: Always refer to cross-options.texi with
2416 $(srcdir).
2417 (MAINTAINERCLEANFILES): Add it.
2418
f4101aa6
AD
24192007-11-04 Akim Demaille <demaille@gostai.com>
2420
2421 Generate the long/short option cross-table.
2422 * build-aux/cross-options.pl: New.
2423 * doc/Makefile.am (cross-options.texi): New.
2424 * doc/bison.texinfo: Use it.
2425
727a1401
AD
24262007-11-04 Akim Demaille <demaille@gostai.com>
2427
2428 Generate bison.1 using help2man.
2429 * doc/common.x, doc/bison.x: New.
2430 * doc/Makefile.am (bison.1, .x.1): New.
2431 The code is taken from autoconf-2.61/man/Makefile.am.
2432 * configure.ac: Look for help2man.
2433
6aeb9c57
AD
24342007-11-04 Akim Demaille <demaille@gostai.com>
2435
2436 Complete --help.
2437 * src/getargs.c (usage): Document -W, make it clear that -d,
2438 -g and -x have optional arguments.
2439
d7be4085
AD
24402007-11-04 Akim Demaille <demaille@gostai.com>
2441
2442 Find sha1sum when named gsha1sum.
2443 * bootstrap (find_tool): New.
2444 ($SHA1SUM): New.
2445
d9df47b6
JD
24462007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
2447
2448 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
2449 at
2450 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
2451 * NEWS (2.3a+): Mention.
2452 * data/bison.m4 (b4_pure_if): Don't define it here.
2453 * data/c.m4 (b4_identification): Depend on individual skeletons to
2454 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
2455 values of the %define variables api.pure or api.push_pull. Define
2456 YYPURE, YYPUSH, and YYPULL accordingly.
2457 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
2458 glr.cc has already defined b4_pure_flag.
2459 * data/push.c: Define b4_pure_if based on `%define api.pure'.
2460 Remove YYPUSH and YYPULL since they're back in b4_identification again.
42ee26bb 2461 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
d9df47b6
JD
2462 * doc/bison.texinfo (Pure Decl): Update.
2463 (Push Decl): Update.
2464 (Decl Summary): Add api.pure to %define entry.
2465 In %pure-parser entry, say it's deprecated and reference %define.
2466 (Pure Calling): Update.
2467 (Error Reporting): Update.
2468 (C++ Scanner Interface): Update.
2469 (How Can I Reset the Parser): Update.
2470 (Table of Symbols): In %pure-parser entry, say it's deprecated and
2471 reference %define.
2472 * src/getargs.c (pure_parser): Remove global variable.
2473 * src/getargs.h (pure_parser): Remove extern.
2474 * src/output.c (prepare): Don't define pure_flag muscle.
2475 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
2476 wrapper around `%define api.pure'.
2477 * tests/calc.at (Simple LALR Calculator): Update.
2478 (Simple GLR Calculator): Update.
2479 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
2480 Update.
2481 (GLR: Resolve ambiguity, pure, locations): Update.
2482 (GLR: Merge conflicting parses, pure, no locations): Update.
2483 (GLR: Merge conflicting parses, pure, locations): Update.
2484 * tests/glr-regression.at (Uninitialized location when reporting
2485 ambiguity): Update
2486 * tests/input.at (Unused %define api.pure): New test case.
2487 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
2488 AT_PURE_IF and AT_PURE_AND_LOC_IF.
2489 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
2490
c373bf8b
JD
24912007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
2492
2493 %define push_pull -> %define api.push_pull. Discussed starting at
2494 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
2495 * data/push.c: Expect the new name.
2496 * data/yacc.c: Likewise.
2497 * doc/bison.texinfo (Push Decl): Update.
2498 (Decl Summary): Update %define entry.
2499 (Push Parser Function): Update.
2500 (Pull Parser Function): Update.
2501 (Parser Create Function): Update.
2502 (Parser Delete Function): Update.
2503 * tests/calc.at (Simple LALR Calculator): Update.
2504 * tests/input.at (%define enum variables): Update.
2505 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
2506 (Push Parsing: Multiple impure instances): Update.
2507 (Push Parsing: Unsupported Skeletons): Update.
2508 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
2509 (Exploding the Stack Size with Malloc): Update.
2510
2511 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
2512 other entries some.
2513
32f19b6b
JD
25142007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
2515
2516 For the XML output's terminal element, rename @number to @token-number,
2517 and add @symbol-number. In the nonterminal element, rename @number to
2518 @symbol-number. Discussed starting at
2519 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
2520 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
2521 renames.
2522 (xsl:template match="nonterminal"): Likewise.
2523 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
2524 (xsl:template match="nonterminal"): Likewise.
2525 * src/print-xml.c (print_grammar): Implement.
2526
255a6b90
JD
25272007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2528
2529 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
2530 2007-10-11 change, the child elements here are items not rules.
408476bc 2531 (xsl:template match="item"): New.
255a6b90
JD
2532 (xsl:template match="rule"): Update for new reduced itemset.
2533 (xsl:template match="point"): Remove.
2534 (xsl:template match="empty"): For consistency with --graph, don't
2535 output "/* empty */".
2536 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
2537 line-wrap, don't pass a negative value as first-line-length since this
2538 won't work with the following changes.
2539 (xsl:template name="line-wrap"): Simplify slightly.
2540 (xsl:template name="ws-search"): Eliminate recursion.
2541 * src/print_graph.c (print_core): Don't print a reduction's lookahead
2542 set next to an item whose dot is not at the end of the RHS even if it
2543 happens to be associated with the same rule.
2544
88c78747
JD
25452007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
2546
31984206
JD
2547 Add %define lr.keep_unreachable_states.
2548 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
2549 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
2550 * src/main.c (main): Implement it.
2551 * tests/conflicts.at (Unreachable States After Conflict Resolution):
2552 Extend to test it, and fix a typo.
2553
25542007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
2555
2556 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
88c78747
JD
2557 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
2558 the example .output text.
2559 * tests/regression.at (Extra lookahead sets in report): Improve wording
2560 of comments.
2561
b7a70162
WP
25622007-10-17 Wojciech Polak <polak@gnu.org>
2563
2564 * src/print-xml.c (print_grammar): Renamed
2565 <terminal> and <nonterminal> attributes:
2566 "type" to "number" and "symbol" to "name".
2567 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
2568 Use new attribute names.
2569 (xsl:template match="nonterminal"): Likewise.
2570 * data/xslt/xml2xhtml.xsl: Likewise.
2571
a0de5091
JD
25722007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
2573
2574 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
2575 (Option Cross Key): Likewise.
2576
2577 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
2578 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 * src/print.c (print_core): Likewise.
2581 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
2582 (Resolved SR Conflicts): Update output.
2583 * tests/regression.at (Extra lookahead sets in report): New test case.
2584
4c20d18d
WP
25852007-10-11 Wojciech Polak <polak@gnu.org>
2586
2587 * src/print-xml.c (print_core): Remove item set
2588 redundancy.
2589 * data/xslt/bison.xsl (bison:ruleNumber): New key.
2590 Improve processing time. Suggested by Joel E. Denny.
2591 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
2592 Write xsl:param "required" attribute as comment.
2593 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
2594 (xsl:template match="rule"): Support new reduced itemset.
2595 (xsl:template match="point"): Remove.
2596 * data/xslt/xml2xhtml.xsl: Likewise.
2597
f506ad1c
JD
25982007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
2599
2600 * src/getargs.c (version): Update copyright year.
2601
21f1b063
JD
26022007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
2603
2604 Make xml2dot.xsl and --graph produce the same output.
2605 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
2606 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
2607 escaped later.
2608 (xsl:template name="output-node"): Use the new escape template instead
2609 of the string-replace template directly.
2610 (xsl:template name="output-edge"): Likewise.
2611 (xsl:template name="escape"): New, escapes backslashes and newlines in
2612 addition to quotation marks.
2613 * src/graphviz.c (start_graph, output_node, output_edge): Add
2614 whitespace to output for legibility.
2615
2616 Make xml2text.xsl and --report produce the same output, and remove the
2617 XML "conflicts" element since a conflict summary is easily extracted
2618 from the automaton.
2619 * data/xslt/bison.xsl: New.
2620 (xsl:template match="state" mode="bison:count-conflicts): New.
2621 * data/xslt/xml2text.xsl: Import bison.xsl.
2622 (xsl:template match="bison-xml-report"): Instead of styling the
2623 "conflicts" element, style the "automaton" element with mode
2624 "conflicts". Unlike the former, the latter lists S/R and R/R
2625 conflicts for a state on the same line.
2626 (xsl:template match="conflicts"): Remove.
2627 (xsl:template match="conflict"): Remove.
2628 (xsl:template match="terminal"): Line-wrap the list of rules in which
2629 the terminal is used.
2630 (xsl:template match="nonterminal"): Likewise for nonterminals.
2631 (xsl:template match="automaton" mode="conflicts"): New.
2632 (xsl:template match="state" mode="conflicts"): New.
2633 (xsl:template name="line-wrap"): New.
2634 (xsl:template name="ws-search"): New.
2635 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
2636 (xsl:template match="bison-xml-report"): Instead of styling the
2637 "conflicts" element, style the "automaton" element with mode
2638 "conflicts."
2639 (xsl:template match="conflicts"): Remove.
2640 (xsl:template match="conflict"): Remove.
2641 (xsl:template match="automaton" mode="conflicts"): New.
2642 (xsl:template match="state" mode="conflicts): New.
2643 * src/conflicts.c (conflicts_output_xml): Remove.
2644 * src/conflicts.h (conflicts_output_xml): Remove prototype.
2645 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
2646 * src/print.c (print_grammar): Consistently wrap at the 66th column so
2647 the corresponding XSLT is easier. Also, never wrap between a word and
2648 the comma that follows it.
2649
793fbca5
JD
26502007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
2651
2652 Improve C++ namespace support. Discussed starting at
2653 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
2654 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
2655 b4_namespace_close): New macros that interpret the %define variable
2656 "namespace" so its value can contain "::" to indicate nested
2657 namespaces.
2658 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
2659 the above macros.
2660 * data/lalr1.cc (b4_namespace): Likewise.
2661 * data/location.cc (b4_namespace): Likewise.
2662 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
2663 inside a new table in the general %define entry. Document `%define
2664 namespace' there as well. Point the %name-prefix entry to it since it
2665 explains it more completely in the case of C++.
2666 (C++ Bison Interface): Mention `%define namespace' instead of
2667 %name-prefix.
2668 (Table of Symbols): Remove the `%define push_pull' entry. The %define
2669 entry suffices.
2670 * tests/c++.at (Relative namespace references): New test case.
2671 (Absolute namespace references): New test case.
2672 (Syntactically invalid namespace references): New test case.
2673 * tests/input.at (C++ namespace reference errors): New test case.
2674
35b8730d
JD
26752007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
2676
2677 Add syncline support and location accessor to internal %define
2678 interfaces.
2679 * data/bison.m4 (b4_percent_define_get_loc): New.
2680 (b4_percent_define_get_syncline): New.
2681 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
2682 (b4_percent_define_default): Record defining location as line 1 rather
2683 than 0 for the sake of synchronizing #line's, and define
2684 b4_percent_define_syncline(VARIABLE).
2685 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
2686 * src/muscle_tab.c (muscle_syncline_grow): New.
2687 (muscle_code_grow): Use muscle_syncline_grow.
2688 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
2689 define b4_percent_define_syncline(VARIABLE).
2690 (muscle_percent_define_get_loc): New.
2691 (muscle_percent_define_get_syncline): New.
2692 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
2693 remove some unused variables.
2694 (muscle_percent_define_default): Record defining location as line 1
2695 rather than 0 for the sake of synchronizing #line's, and define
2696 b4_percent_define_syncline(VARIABLE).
2697 (muscle_percent_define_check_values): Use
2698 muscle_percent_define_get_loc.
2699 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
2700 (muscle_percent_define_get_syncline): Prototype.
2701 * tests/skeletons.at (%define Boolean variables: invalid skeleton
2702 defaults): Update output for location change.
2703 (Complaining during macro argument expansion): Extend to test
2704 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
2705
7dc4a694
JD
27062007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
2707
2708 Fix some error-reporting macro bugs.
2709 * data/bison.m4 (b4_cat): New.
2710 (b4_error, b4_error_at): Use b4_cat to send error directives directly
2711 to stdout so they don't become arguments to other macros. Update
2712 comments and add examples.
2713 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
2714 add examples.
2715 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
2716 after printing the error directive so that M4 doesn't report subsequent
2717 problems that are induced by this problem.
2718 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
2719 instead of just in them. Recognize @\n in both places. Both expand to
2720 the empty string. Needed by b4_cat.
2721 * tests/skeletons.at (Complaining during macro argument expansion):
2722 New test case.
2723 (Fatal errors make M4 exit immediately): New test case.
2724
d4bd2295
JD
27252007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
2726
2727 Implement --print-datadir.
2728 * src/getargs.c (usage): Mention.
2729 (PRINT_DATADIR_OPTION): New anonymous enum member.
2730 (long_options): Add entry for it.
2731 (getargs): Add case for it calling compute_pkgdatadir.
2732 * src/output.c (output_skeleton): Encapsulate data directory
2733 computation from here...
2734 (prepare): ... and from here...
2735 (compute_pkgdatadir): ... into this new function.
2736 * src/output.h (compute_pkgdatadir): Prototype.
2737
34cdeddf
JD
27382007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
2739
2740 * src/print-xml.c (escape_bufs): New static global variable
2741 replacing...
2742 (xml_escape_n): ... the static local variable buf here.
2743 (print_xml): Free memory for escape_bufs.
2744 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
2745
d782395d
JD
27462007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
2747
2748 Replace `%push-parser' and `%push-pull-parser' with
2749 `%define push_pull "push"' and `%define push_pull "both"'.
2750 `%define push_pull "pull"' is the default.
2751 * doc/bison.texinfo (Push Decl, Push Parser Function,
2752 Pull Parser Function, Parser Create Function, Parser Delete Function):
2753 Update declarations.
2754 (Decl Summary, Table of Symbols): Replace %push-parser and
2755 %push-pull-parser entries with a %define push_pull entry.
2756 * data/bison.m4 (b4_percent_define_check_values): New macro.
2757 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
2758 definitions...
2759 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
2760 definitions...
2761 * data/push.c: ... to here and compute them from the value of the
2762 %define variable push_pull.
2763 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
2764 parsing requests here...
2765 * data/yacc.c: ... hack this to switch to push.c any time
2766 b4_use_push_pull_flag or the %define variable push_pull is set. This
2767 will go away when we mv push.c yacc.c.
2768 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
2769 push parsing is not supported since unused %define variables are
2770 reported anyway.
2771 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
2772 * src/muscle_tab.h (muscle_percent_define_check_values): Update
2773 comments for consistency with b4_percent_define_check_values.
2774 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
2775 muscles.
2776 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
2777 Remove.
2778 (prologue_declaration): Remove %push-parser and %push-pull-parser
2779 rules.
2780 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
2781 * tests/calc.at: Update declarations.
2782 * tests/input.at (%define enum variables): New test case.
2783 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
2784 declaration.
2785 (Push Parsing: Multiple impure instances): Update declaration.
2786 (Push Parsing: Unsupported Skeletons): New test case.
2787 * tests/torture.at (Exploding the Stack Size with Alloca): Update
2788 declaration.
2789 (Exploding the Stack Size with Malloc): Update declaration.
2790
3f999f78
WP
27912007-09-24 Wojciech Polak <polak@gnu.org>
2792
2793 Add XSLT transformations.
2794
2795 * data/xslt/xml2dot.xsl: Transform XML into DOT.
2796 * data/xslt/xml2text.xsl: Transform XML into plain text.
2797 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
2798 * data/Makefile.am (xsltdir): New variable.
2799 (dist_xslt_DATA): Add xslt/*.xsl files.
2800
a4f75309
PE
28012007-09-23 Paul Eggert <eggert@cs.ucla.edu>
2802
2803 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
2804 Problem reported by Wojciech Polak.
2805 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
2806 (xml_printf): Undo change I made on 21 September; that is,
2807 indent 2 spaces, not 1.
2808
ad5feac4
JD
28092007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
2810
2811 Pacify ./configure --enable-gcc-warnings.
2812 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
2813 `char const *' instead of `char *'.
2814 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
2815 local variable `sep'.
2816
41d7a5f2
PE
28172007-09-21 Paul Eggert <eggert@cs.ucla.edu>
2818
2819 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
2820 elsewhere.
2821 * src/print-xml.c: Prefer "const" after types; that's more consistent.
2822 (xml_printf): Indent just 1 space for level.
2823 (e_char, xlate_char): Remove.
2824 (xml_escape_string): Rewrite to avoid undefined behavior (used
2825 storage that was freed from the stack).
2826 (xml_escape_n): Don't bother checking for subscript error.
2827
3f999f78
WP
28282007-09-21 Wojciech Polak <polak@gnu.org>
2829
2830 Add Bison XML Automaton Report.
41d7a5f2
PE
2831
2832 Add support for an -x option to generate an XML report.
2833 It is not documented yet.
2834 * src/print-xml.c: New file.
2835 * src/print-xml.h: Likewise.
2836 * lib/timevar.def (TV_XML): New var.
2837 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
2838 * src/conflicts.c: Include print-xml.h.
2839 (solved_conflicts_xml_obstack): New var.
2840 (log_resolution, conflicts_solve, conflicts_free):
2841 Add support for XML report.
2842 (conflicts_output_val): New function.
2843 * src/conflicts.h (conflicts_output_val): New decl.
2844 * src/files.c (spec_xml_file): New var.
2845 (compute_output_file_names, output_file_names_free): Add XML support.
2846 * src/files.h (spec_xml_file): New decl.
2847 * src/getargs.c (xml_flag): New var.
2848 (usage, short_options, long_options, getargs): Add XML support.
2849 * src/getargs.h (xml_flag): New decl.
2850 * src/gram.c: Include print-xml.h.
2851 (rule_lhs_print_xml, rule_rhs_print_xml):
2852 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
2853 New functions.
2854 * src/gram.h: Declare external ones.
2855 * src/main.c: Include print-xml.h.
2856 (main): Add XML support.
2857 * src/reduce.c: Include print-xml.h.
2858 (reduce_xml): New function.
2859 * src/reduce.h: Declare it.
2860 * src/state.c: Include print-xml.h.
2861 (state_new): Add XML support.
2862 (state_rule_lookahead_tokens_print_xml): New function.
2863 * src/state.h: Declare it.
2864 (struct state): New member solved_conflicts_xml.
2865 * src/symtab.c (symbol_class_get_string): New function.
2866 * src/symtab.h: Declare it.
2867
6d8e724d
PE
28682007-09-21 Paul Eggert <eggert@cs.ucla.edu>
2869
2870 * GNUmakefile: Switch to coreutils's version.
2871 * bootstrap: Likewise.
2872 * Makefile.cfg: Adjust to new GNUmakefile.
2873 * README-hacking: Likewise.
2874
2875 Import from gnulib:
2876
2877 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
2878 Bruno Haible <bruno@clisp.org>
2879
2880 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
2881 and is a script that invokes bison. Tighten the code. Add comments.
2882
922bdd7f
JD
28832007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
2884
2885 Spell "boolean" as "Boolean". Reported by Akim Demaille.
2886 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
2887 * doc/bison.texinfo (Decl Summary): Fix.
2888 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
2889 * tests/input.at (Boolean %define variables): Update output.
2890 * tests/skeletons.at (%define boolean variables: invalid skeleton
2891 defaults): Rename to...
2892 (%define Boolean variables: invalid skeleton defaults): ... this and
2893 update output.
2894
1b17b01d
JD
28952007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
2896
2897 In impure push mode, don't allow more than one yypstate to be allocated
2898 since multiple impure parsers would corrupt yynerrs.
2899 * data/push.c (yypstate_allocated): New static global variable
2900 initialized to 0.
2901 (yypull_parse): If yypstate_new returns 0, don't report it as memory
2902 exhaustion if yypstate_allocated is 1, but still return 2.
2903 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
2904 already 1. Otherwise, set it to 1.
2905 (yypstate_delete): Set it to 0.
2906 * tests/push.at (Push Parsing: Multiple impure instances): New test
2907 case.
2908
9987d1b3
JD
29092007-08-17 Bob Rossi <bob@brasko.net>
2910
2911 * doc/bison.texinfo (Push Decl): Document the push parser.
2912 (Table of Symbols): Ditto.
2913 (Pure Decl): Ditto.
2914 (Decl Summary): Ditto.
2915 (Multiple Parsers, Push Parser Function, Pull Parser Function,
2916 Parser Create Function, Parser Delete Function):
2917 Add new push parser symbols.
2918 (Table of Symbols): Document push-parser, push-pull-parser,
2919 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
2920
f16b0819
PE
29212007-08-15 Paul Eggert <eggert@cs.ucla.edu>
2922
2923 Update to GPLv3.
2924 * doc/gpl-3.0.texi: New file.
2925 * doc/gpl.texi: Remove.
2926 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
2927 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
2928 * README-hacking, TODO, bootstrap, bootstrap.conf:
2929 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
2930 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
2931 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
2932 * data/lalr1.cc, data/lalr1.java, data/location.cc:
2933 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
2934 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
2935 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
2936 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
2937 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
2938 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
2939 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
2940 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
2941 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
2942 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
2943 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
2944 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
2945 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
2946 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
2947 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
2948 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
2949 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
2950 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
2951 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
2952 * src/complain.c, src/complain.h, src/conflicts.c:
2953 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
2954 * src/files.h, src/flex-scanner.h, src/getargs.c:
2955 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
2956 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
2957 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
2958 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
2959 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
2960 * src/print.c, src/print.h, src/print_graph.c:
2961 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
2962 * src/reduce.h, src/relation.c, src/relation.h:
2963 * src/revision.h, src/scan-code.h, src/scan-code.l:
2964 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
2965 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
2966 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
2967 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
2968 * tests/Makefile.am, tests/actions.at, tests/c++.at:
2969 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
2970 * tests/existing.at, tests/glr-regression.at:
2971 * tests/headers.at, tests/input.at, tests/java.at:
2972 * tests/local.at, tests/output.at, tests/push.at:
2973 * tests/reduce.at, tests/regression.at, tests/sets.at:
2974 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
2975 * tests/torture.at:
2976 Update to GPLv3.
2977
728c4be2
JD
29782007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
2979
2980 Get rid of broken %no-parser, -n, and --no-parser implementation and
2981 documentation.
2982 * TODO: Don't mention them.
2983 * doc/bison.1: Likewise.
2984 * doc/bison.texinfo (Decl Summary): Likewise.
2985 (Bison Options): Likewise.
2986 (Option Cross Key): Likewise.
2987 * src/getargs.c (no_parser_flag): Remove global variable.
2988 (usage): Don't print description of -n and --no-parser.
2989 (long_options): Remove --no-parser entry here.
2990 (getargs): Remove -n case in the switch here.
2991 * src/getargs.h (no_parser_flag): Remove extern.
2992 * tests/regression.at (Web2c Actions): Remove comment that mentions
2993 --no-parser.
2994
5d31a216
JD
29952007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
2996
2997 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
2998 name user variables starting with `yy'. Just pass NULL instead of a
2999 dummy local &yylval to yypush_parse.
3000 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
3001 starting with `yy'.
3002
a2ea208d
JD
30032007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
3004
3005 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
3006 true since it's then always used regardless of whether yyoverflow is
3007 defined. Reported by Christian Burger at
3008 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
3009 * THANKS: Add Christian Burger.
3010
91661ebb
JD
3011 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
3012 node names: say "Decl Summary" not "Bison Declaration Summary".
3013
cbd50549
JD
30142007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
3015
3016 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
3017 determine whether this function has already complained about an invalid
3018 value for a %define boolean variable, don't check whether Bison has
3019 ever examined the value. As written, the check was a tautology.
3020 Instead, record and check for this complaint using a separate muscle.
3021
eb1b0740
JD
30222007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3023
3024 Fix push parsing memory leak reported by Brandon Lucia at
3025 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
3026 * THANKS: Add Brandon Lucia.
3027 * data/push.c (yypstate_delete): Free the stack if it was reallocated
3028 but the parse never completed and thus freed it.
3029 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
3030 * tests/testsuite.at: Include push.at.
3031 * test/push.at: New.
3032 (Push Parsing: Memory Leak for Early Deletion): New test case.
3033
9d774aff
JD
30342007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
3035
3036 Improve handling of multiple S/R conflicts in the same state and of S/R
3037 conflicts involving multiple reductions.
3038 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
3039 set for a state here or Bison will abort if it is reassigned on a
3040 later conflicted reduction in the same state.
3041 Similarly, don't finalize and assign the solved conflicts report here
3042 or it will be lost if it is reassigned on a later conflicted reduction
3043 in the same state.
3044 (set_conflicts): Instead, assign them both here after all S/R conflicts
3045 in the state have been fully examined.
3046 * src/print.c (shift_set): Rename to...
3047 (no_reduce_set): ... this.
3048 (print_reductions): Update for rename, and add %nonassoc error action
3049 tokens to no_reduce_set so that, when printing the first remaining
3050 reduction on an error action token, the reduction is enclosed in
3051 brackets.
3052 (print_results): Update for rename.
3053 * tests/conflicts.at (Solved conflicts report for multiple reductions
3054 in a state): New test case.
3055 (%nonassoc error actions for multiple reductions in a state): New test
3056 case.
3057
3058 * src/main.c (main): Don't depend on C99 features.
3059
10159d2a
JD
30602007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
3061
3062 * build-aux/.cvsignore: Add compile.
b541ffdf
JD
3063 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
3064 uniwidth.
10159d2a 3065
953b3935
JD
30662007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
3067
3068 * bootstrap (slurp): Create target directories that don't exist.
3069 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
3070
6ce2d93a
JD
30712007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
3072
3073 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
3074 than item number.
3075 * closure.c (closure): Likewise.
3076 * state.h (reductions): Comment sorting of rules.
3077 (state): Comment sorting of items.
3078
ce3448d5
JD
30792007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
3080
3081 Fix C++ test cases after recent Gnulib changes. Discussed starting at
3082 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
3083 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
3084 definition in order to avoid Gnulib headers since we don't use config.h
3085 here.
3086 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
3087 rather than AT_DATA so that config.h is included.
3088
8a86eef0
JD
30892007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
3090
3091 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
3092 instead of fprintf. Guard these functions with #if YYDEBUG instead of
3093 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
3094 and so that YYFPRINTF is guaranteed to be defined here.
3095
b1a81613
JD
30962007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
3097
3098 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
3099 with...
3100 (muscle_percent_define_check_values): ... this more helpful function.
3101 Again, it's not used yet, but it will be.
3102 * src/muscle_tab.h: Likewise.
3103
71b61d4d
JD
3104 Improve some comments in parser table construction.
3105 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
3106 (generate_states): Don't mention ruleset, which is internal to closure.
3107 * src/closure.c (closure): Explain sorting of core and itemset, which
3108 is required for this function to behave correctly.
3109 * src/closure.h (closure): Mention sorting.
3110
2a6b783d
JD
31112007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
3112
3113 * src/lalr.c (state_lookahead_tokens_count): For code readability,
3114 move the check for disabled transitions to an aver since conflict
3115 resolution hasn't happened yet.
3116
3117 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
3118 labels a state as inconsistent just because it has error transitions.
3119 The original form of this check appeared in revision 1.1 of lalr.c,
3120 which was committed on 1991-12-21. Now (at least), changing the
3121 consistency label on such a state appears to have no useful effect in
3122 any of the places it is examined, which I enumerate below. The key
3123 point to understanding each item in this enumeration is that a state
3124 with an error transition is labelled consistent in the first place only
3125 if it has no rules, so the check cannot matter for states that have
3126 rules. (1) Labelling a state as inconsistent will cause set_conflicts
3127 to try to identify its conflicts, and a state must have *rules* to have
3128 conflicts. (2) Labelling a state as inconsistent will affect how
3129 action_row sets the default *rule* for the state. (3) Labelling a
3130 state as inconsistent will cause build_relations to add lookback edges
3131 to *rules* in that state.
3132 * src/state.h (struct state): Word the comment for member consistent
3133 more carefully.
3134
14462c2b
JD
31352007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3136
3137 Don't depend on C99 features.
3138 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
3139 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
3140 * src/reader.c (check_and_convert_grammar): Fix for-loop.
3141 * src/state.c (state_mark_reachable_states): Fix for-loop.
3142 (state_remove_unreachable_states): Fix for-loop.
3143
3144 Don't widen struct state with member reachable just to temporarily
3145 record reachability. Instead, use a local bitset.
3146 * src/state.h (struct state): Remove member.
3147 * src/state.c (state_new): Don't initialize it.
3148 (state_mark_reachable_states): Rename to...
3149 (state_record_reachable_states): ... this, and use bitset.
3150 (state_remove_unreachable_states): Use bitset.
3151
5a43d418
JD
31522007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
3153
3154 * src/Makefile.am (yacc): Quote target action commands properly so
3155 that the yacc script isn't corrupt. Reported by Hans Aberg at
3156 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
3157
0c650a20
JD
3158 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
3159 the case of pure parsers. Reported by Frans Englich at
3160 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
3161 * THANKS: Add Frans Englich.
3162
61fee93e
JD
3163 * NEWS (2.3a+): In the %code entry, reference section `Bison
3164 Declaration Summary' from the manual now since the %code summary has
3165 moved there.
3166 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
3167 in the rules section must be terminated by semicolons.
3168
f124d423
JD
31692007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
3170
3171 Extend the front-end API for %define variables to more completely
3172 mirror the back-end. This will be useful in the future.
3173 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
3174 Update comments to mention the new front-end counterparts of these
3175 macros.
3176 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
3177 for muscle_string_decode and muscle_location_decode.
3178 (muscle_string_decode): New static function.
3179 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
3180 (muscle_percent_define_get, muscle_percent_define_ifdef): New
3181 functions.
3182 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
3183 muscle_percent_define_get to mimic the b4_percent_define_flag_if
3184 implementation more closely.
3185 (muscle_percent_define_invalid_value): New function.
3186 * src/muscle_tab.h (muscle_percent_define_get,
3187 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
3188 Prototype.
3189
75ad86ee
JD
31902007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
3191
3192 * NEWS (2.3a+): Mention yesterday's state-removal change.
3193 (2.3a): Remove the %language entry, which was added after 2.3a.
3194 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
3195 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
3196 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
3197 tests/existing.at: Update copyright date.
3198
5967f0cf
JD
31992007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3200
3201 If conflict resolution makes states unreachable, remove those states,
3202 report rules that are then unused, and don't report conflicts in those
3203 states.
3204 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
3205 New global function.
3206 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
3207 function.
3208 * src/main.c (main): After conflict resolution, remove the unreachable
3209 states and update all data structures that reference states by number.
3210 * src/state.c (state_new): Initialize each state's reachable member to
3211 false.
3212 (state_mark_reachable_states): New static function.
3213 (state_remove_unreachable_states): New global function.
3214 * src/state.h (struct state): Add member bool reachable.
3215 (state_remove_unreachable_states): Prototype.
3216 * tests/conflicts.at (Unreachable States After Conflict Resolution):
3217 New test case.
3218 * tests/existing.at (GNU pic Grammar): Update test case output now that
3219 an unused rule is discovered.
3220
b09f4f48
JD
32212007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3222
3223 Minor code cleanup in parser table construction.
3224 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
3225 (new_itemsets, save_reductions): Update for rename to nitemset.
3226 * src/closure.c (nritemset): Rename to...
3227 (nitemset): ... this since the "r" appears to meaningless and isn't
3228 used in the comments.
3229 (closure): Update for rename.
3230 * src/closure.h (nritemset): Update extern to...
3231 (nitemset): ... this.
3232 * src/lalr.c (LA): Fix a typo in comments.
3233 * src/print.c (print_core): Update for rename to nitemset.
3234 * src/print_graph.c (print_graph): Likewise.
3235 * src/state.h: Fix some typos in header comments.
3236
bbb44d83
PE
32372007-04-04 Paul Eggert <eggert@cs.ucla.edu>
3238
9b33de72
PE
3239 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
3240 still sticks to ASCII. Sorry!
3241
bbb44d83
PE
3242 * README-hacking: New file, taken mostly from coreutils, with changes
3243 for Bison. Contains much of the contents of:
3244 * README-cvs: Remove.
3245 * bootstrap: Sync from gnulib.
3246 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
3247 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
3248
29553547
JD
32492007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
3250
3251 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
3252 Setzer.
3253 (Java Differences): Fix some typos.
3254 * THANKS: Add Sebastian Setzer.
3255
01b477c6
PB
32562007-03-07 Paolo Bonzini <bonzini@gnu.org>
3257
730739e4
AD
3258 * data/java.m4 (b4_single_class_if): Remove.
3259 (b4_abstract_if): Look at "%define abstract".
3260 (b4_lexer_if): New.
3261 (b4_union_name): Rename...
3262 (b4_yystype): ... to this. Map to "%define stype".
3263 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
3264 b4_maybe_throws): Fix quoting.
3265 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
3266 * data/lalr1.java (Lexer interface): Always define.
3267 (Lexer interface within parser class): Remove.
3268 (YYLexer class): New, used when "%code lexer" is present.
3269 (constructor): When "%code lexer" is used, pass %lex-param
3270 to the lexer constructor.
3271 (yylex, yyparse): Remove %lex-param from method invocations
3272 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
3273
3274 * doc/bison.texinfo (Java Bison Interface): Mention "%define
3275 abstract". Rename "%define union_name" to "%define stype".
3276 Rename method names according to previous patch.
3277 (Java Scanner Interface): Describe "%code lexer" instead of
3278 "%pure-parser" and "%define single_class".
3279 (Java Differences): Mention "%code lexer".
3280
3281 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
3282 Include scanner here, using macros from tests/local.at.
3283 (AT_DATA_CALC_Y): Remove final argument.
3284 (_AT_CHECK_JAVA_CALC): Likewise.
3285 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
3286 of %locations and %error-verbose.
3287 (main): Test with and without %lex-param.
3288 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
3289 (AT_BISON_OPTION_POPDEFS): Pop it.
01b477c6 3290
122bea3a
JMG
32912007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3292
3293 DJGPP spefic issue. Inhibit the use of disallowed characters for
3294 file name genertion on Win98, WinXP, etc. These are |<>":?*\
3295 and concern testsuite case 46.
3296 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
3297 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
3298 * djgpp/config.bat: Inhibit the use of disallowed characters.
3299
9611cfa2
JD
33002007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
3301
3302 Miscellaneous %define and %code cleanup.
3303 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
3304 values are interpreted.
3305 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
3306 documentation a little more.
3307 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
3308 muscle_percent_define_insert, muscle_percent_code_grow): New
3309 functions/macros.
3310 * src/muscle_tab.h (muscle_percent_define_insert,
3311 muscle_percent_code_grow): Prototype.
3312 * src/parse-gram.y (prologue_declaration): Use
3313 muscle_percent_define_insert and muscle_percent_code_grow when parsing
3314 %define and %code directives.
3315
3316 Make it easy to share %define boolean variables between the front-end
3317 and back-end. Though not used yet, this will be useful in the future.
3318 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
3319 Bison uses of names rather than just skeleton uses of names.
3320 (b4_percent_define_get, b4_percent_define_ifdef): Rename
3321 b4_percent_define_skeleton_variables(VARIABLE) to
3322 b4_percent_define_bison_variables(VARIABLE).
3323 (b4_percent_code_get, b4_percent_code_ifdef): Rename
3324 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
3325 b4_percent_code_bison_qualifiers(QUALIFIER).
3326 (b4_check_user_names_wrap): Update for renames.
3327 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
3328 muscle_percent_define_default): New functions mimicking
3329 b4_percent_define_flag_if and b4_percent_define_default.
3330
3331 For %define variables, report locations for invalid values and
bbb44d83 3332 redefinitions.
9611cfa2
JD
3333 * data/bison.m4 (b4_percent_define_flag_if): Read
3334 b4_percent_define_loc(VARIABLE) to report the location of an invalid
3335 value for VARIABLE.
3336 (b4_percent_define_default): Save a special location in
3337 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
3338 must later be reported as invalid.
3339 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
3340 functions.
3341 (muscle_percent_define_insert): Record the location of VARIABLE in
3342 muscle percent_define_loc(VARIABLE), and use it to report the previous
3343 location for a redefinition.
3344 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
3345 (muscle_percent_define_default): Update like b4_percent_define_default.
3346 (muscle_grow_user_name_list): Rename to...
3347 (muscle_user_name_list_grow): ... this for consistency and use
3348 muscle_location_grow.
3349 * src/muscle_tab.h (muscle_location_grow): Prototype.
3350 * tests/input.at (%define errors): Update expected output.
3351 * tests/skeletons.at (%define boolean variables: invalid skeleton
3352 defaults): New test case.
3353
0bf92491
JD
33542007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
3355
3356 * src/print.c (lookahead_set, state_default_rule): Remove.
3357 (print_reductions): Replace state_default_rule invocation with
3358 equivalent use of yydefact, which was computed in token_actions in
3359 tables.c.
3360 (print_results): Don't allocate lookahead_set.
3361
d3b12988
PB
33622007-02-27 Paolo Bonzini <bonzini@gnu.org>
3363
3364 * data/lalr1.java: Prefix all private members with yy.
3365
f57a7536
JD
33662007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
3367
3368 Use YYFPRINTF instead of fprintf where appropriate. Reported by
9b33de72 3369 Sebastien Fricker at
f57a7536 3370 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
9b33de72 3371 * THANKS: Add Sebastien Fricker.
f57a7536
JD
3372 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
3373 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
3374 accept a variable number of arguments.
3375
6404a5bf
JD
33762007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
3377
3378 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
3379
e4e09639
JMG
33802007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3381
3382 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
3383 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
3384 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
3385
d7e0a1a7
PE
33862007-02-11 Paul Eggert <eggert@cs.ucla.edu>
3387
3388 Undo my 2007-02-07 change, switching back to the c-strcase module
3389 introduced in the 2007-02-03 change. Bruno Haible reported that
3390 the 2007-02-07 change would be dangerous in Turkish if we add a
3391 language whose name contains "i", since "i" is not lowercase "I"
3392 in Turkish.
3393 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
3394 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
3395 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
3396 * m4/.cvsignore: Remove strcase.m4.
3397 * src/getargs.c: Revert 2007-02-07 change, as follows.
3398 Include c-strcase.h.
3399 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
3400
deee93a1
JD
34012007-02-11 Bruno Haible <bruno@clisp.org>
3402
3403 Enable the Java related testsuite tests when the only Java compiler
3404 found is a gcj < 4.3. Discussed at
3405 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
3406 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
3407
574add85
JD
34082007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
3409
3410 * data/Makefile.am: Update copyright date.
3411 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
3412 yypstate_new returns NULL.
3413 (yypstate_new): Return NULL if malloc does.
3414 * src/reader.c (packgram): Move translation of rule actions from the
3415 beginning of packgram to...
3416 (check_and_convert_grammar): ... here right before packgram is invoked
3417 so it's easier to write more complete comments, and remove redundant
3418 code.
3419
e785ccf7
JD
34202007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
3421
3422 As in semantic actions, make @$ in %initial-action, %destructor, and
3423 %printer imply %locations.
3424 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
3425 scanning @$.
3426 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
3427 (@$ in %initial-action implies %locations,
3428 @$ in %destructor implies %locations,
3429 @$ in %printer implies %locations): ... these new test cases.
3430
1cfe1ed7
PE
34312007-02-07 Paul Eggert <eggert@cs.ucla.edu>
3432
3433 Undo most of the 2007-02-03 change, switching to the strcase module
3434 now that gnulib strcase has been fixed.
3435 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
3436 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
3437 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
3438 * m4/.cvsignore: Add strcase.m4.
3439 * src/getargs.c: Revert 2007-02-03 change, as follows.
3440 Don't include c-strcase.h.
3441 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
3442 strcasecmp has "unspecified behavior" outside the POSIX locale,
3443 but it works fine in practice if at least one argument is ASCII,
3444 as is the case in Bison.
3445
0049ec86
PB
34462007-02-07 Paolo Bonzini <bonzini@gnu.org>
3447
3448 * tests/java.at: Skip tests if only one of javac/java is present.
3449 Reported by Joel E. Denny.
3450 * tests/atlocal.in: Adjust copyright years.
3451
34522007-02-05 Paolo Bonzini <bonzini@gnu.org>
3453
3454 * data/lalr1.java (Stack): Work around old verifiers that disallow
3455 access to the private fields of an inner class, from the outer class.
3456 We can make Stack's fields public because user code doesn't have access
3457 to the instance of Stack used by parse(). Reported by Paul Eggert.
3458
2c2b7220
PE
34592007-02-03 Paul Eggert <eggert@cs.ucla.edu>
3460
3461 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
3462 the right spot for these files?
3463 * bootstrap.conf (gnulib_modules): Add c-strcase.
3464 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
3465 c-strncasecmp.c.
3466 * src/getargs.c: Include c-strcase.h.
3467 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
3468 to avoid unspecified behavior.
3469
b2b81dae
JD
34702007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
3471
3472 * doc/bison.texinfo (Decl Summary): Correct typo.
3473
c1d19e10
PB
34742007-01-30 Paolo Bonzini <bonzini@gnu.org>
3475
3476 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
3477 Complain if the value does not match empty, "true" or "false".
3478 * data/c++.m4: Adjust default definitions of %define variables.
3479 * data/java.m4: Adjust default definitions of %define variables.
3480 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
3481 to above behavior.
3482 * tests/input.at (Boolean %define variables): Test new behavior.
3483
8405b70c
PB
34842007-01-29 Paolo Bonzini <bonzini@gnu.org>
3485
3486 * NEWS: Mention java.
3487 * TODO: Remove things that are done.
3488 * bootstrap.conf: Add javacomp-script and javaexec-script.
3489 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
3490
3491 * data/Makefile.am: Add new files.
3492 * data/java-skel.m4: New.
3493 * data/java.m4: New.
3494 * data/lalr1.java: New.
3495
3496 * doc/bison.texinfo: Put "A Complete C++ Example" under
3497 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
3498 under Other Languages.
3499
3500 * src/getargs.c (valid_languages): Add Java.
3501 * src/getargs.h (struct bison_language): Update size of string fields.
3502
3503 * tests/Makefile.am: Add java.at.
3504 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
3505 * tests/java.at: New.
3506 * tests/testsuite.at: Include it.
3507
3eb82471
JD
35082007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
3509
3510 Clean up.
3511 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
3512 at_directive_argv arguments so these no longer have to be global
3513 variables. Also, update the implementation for the following changes.
3514 (fail_for_at_directive_too_many_args,
3515 fail_for_at_directive_too_few_args): Add at_directive_name argument.
3516 (at_directive_name): Remove as at_directive_argv[0] will be used for
3517 this now.
3518 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
3519 for the directive name.
3520 (at_directive_argc, at_directive_argv): Make these local within
3521 skel_lex instead of global.
3522 (INITIAL): Update directive start action for above changes.
3523 (SC_AT_DIRECTIVE_ARG): Rename to...
3524 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
3525 (SC_AT_DIRECTIVE_SKIP_WS): Update.
3526 (scan_skel): Move yylex_destroy to...
3527 (skel_scanner_free): ... here.
3528 * tests/skeletons.at (installed skeleton file name): Rename to...
3529 (installed skeleton file names): ... this.
3530
148d66d8
JD
35312007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
3532
3533 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
3534 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
3535 Summary" not "Directives".
3536 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
3537 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
3538 since the former is now the more complete one.
3539 (Prologue Alternatives): Likewise and do the same for %defines.
3540 (Table of Symbols): Add summary of %code, add summary of %define, and
3541 move full %code documentation to...
3542 (Decl Summary): ... here for consistency with other entries in these
3543 sections.
3544 Move %define entry in order to keep this list alphabetized.
3545 Reword %define entry a little to put less emphasis on the skeleton
3546 concept, which most users shouldn't have to think about.
3547
665f0c24
PE
35482007-01-26 Paul Eggert <eggert@cs.ucla.edu>
3549
3550 Adjust to recent gnulib changes.
3551 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
3552 Add string.h, string_.h, unistd_.h, wchar_.h.
3553 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
3554 * src/system.h: Don't include <stpcpy.h>; this is now done by
3555 <string.h>.
3556
592d0b1e
PB
35572007-01-23 Paolo Bonzini <bonzini@gnu.org>
3558
3559 Simplify implementation of unqualified %code, implement macros for
3560 uniform treatment of boolean %define flags. Document %define.
3561 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
3562 b4_percent_code_ifdef): New.
3563 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
3564 * data/c++.m4: Define default value for global_tokens_and_yystype.
3565 * data/glr.cc: Likewise.
3566 * data/location.cc: Use b4_percent_define_flag_if.
3567
148d66d8 3568 * doc/bison.texinfo (Decl Summary): Document %define.
592d0b1e
PB
3569
3570 * src/parse-gram.y (Unqualified %code): Change muscle name to
3571 b4_percent_code().
3572 (content.opt): Default to empty.
3573
a7867f53
JD
35742007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
3575
3576 Implement support for relative and absolute skeleton file names.
3577 Discussed starting at
3578 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
3579 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
3580 (Bison Options): Document in --skeleton entry.
3581 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
3582 full_skeleton can't necessarily hold all of pkgdatadir.
3583 If the specified skeleton file name contains a `/', don't prepend
3584 pkgdatadir.
3585 * src/parse-gram.y (prologue_declaration): If the specified skeleton
3586 file name contains a `/', prepend the grammar file directory.
3587 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
3588 * skeletons.at: New file.
3589 (relative skeleton file names): New test case.
3590 (installed skeleton file names): New test case.
3591 * tests/testsuite.at: Include skeletons.at.
3592
3593 * bootstrap: Update copyright to 2007.
3594
830c9b18
PB
35952007-01-17 Paolo Bonzini <bonzini@gnu.org>
3596
3597 * bootstrap: Remove occurrences of .#bootmp from the files.
3598
a8c2e813
AD
35992007-01-17 Akim Demaille <akim@epita.fr>
3600
3601 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
3602 nonterminals.
3603 Use per-type %printer.
3604
279cabb6
JD
36052007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
3606
3607 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
3608 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
3609 djgpp/config.site, src/files.c, src/files.h, src/main.c,
3610 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
3611 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
3612 tests/glr-regression.at, tests/input.at, tests/local.at,
3613 tests/output.at, tests/torture.at: Update copyright to 2007.
3614
bb32f4f2
AD
36152007-01-16 Akim Demaille <akim@epita.fr>
3616
3617 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
3618 error code.
3619 (Calc++ Scanner): Exit with failure if we can't open the input
3620 file.
3621 Accept "-" standing for stdin.
3622 (Calc++ Top Level): Print the result only if the parsing was
3623 successful.
3624
7cff04b5
AD
36252007-01-16 Akim Demaille <akim@epita.fr>
3626
3627 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
3628
a4e25e1d
JD
36292007-01-15 Paolo Bonzini <bonzini@gnu.org>
3630 and Joel E. Denny <jdenny@ces.clemson.edu>
3631
3632 Clean up %define and %code implementation in M4 some. Most
3633 importantly, rename all related macros to be in the b4_percent_define
3634 and b4_percent_code namespaces. Also, complete support for `.' in
3635 %define variable names and %code qualifiers.
3636 * data/bison.m4 (b4_check_user_names): Check for special
3637 "SKELETON-NAMESPACE(name)" macros instead of using two nested
3638 m4_foreach loops.
3639 (b4_get_percent_define, b4_get_percent_code): Rename to...
3640 (b4_percent_define_get, b4_percent_code_get): ... these.
3641 Extend documentation with examples.
3642 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
3643 b4_percent_define_skeleton_variables and
3644 b4_percent_code_skeleton_qualifiers.
3645 Expect any value for the %define variable `foo' to be stored in the
3646 macro named `b4_percent_define(foo)'; expect any %code blocks for the
3647 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
3648 expect any unqualified %code blocks to be stored in a macro named
3649 `b4_percent_code_unqualified'.
3650 Use m4_indir so that %define variable names and %code qualifiers can
3651 contain `.', which is allowed by the grammar parser.
3652 (b4_percent_define_default): New macro to set a default value for a
3653 %define variable.
3654 (m4_wrap): Update wrapped code, and fix some underquoting.
3655 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
3656 Expect grammar uses of %define variables and %code qualifiers to be
3657 defined in b4_percent_define_user_variables and
3658 b4_percent_code_user_qualifiers.
3659 * data/c++.m4: Use b4_percent_define_default rather than
3660 m4_define_default. Fix some underquoting. Skeleton usage of %define
3661 variable define_location_comparison now implies skeleton usage of
3662 %define variable filename_type.
3663 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
3664 data/push.c, data/yacc.c: Update macro names.
3665 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
3666 muscle names.
3667
e37c665c
JMG
36682007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3669
3670 DJGPP specific issues.
3671
3672 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
3673 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
3674
7d2d521f
JD
36752007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
3676
3677 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
3678 run parsers in all tests so that Valgrind is invoked during
3679 maintainer-check-valgrind.
3680 (Duplicate representation of merged trees): Free all semantic values.
3681 (Duplicated user destructor for lookahead): Likewise.
3682
e0ac9b4b
JD
36832007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
3684
3685 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
3686 command-line prefix.
3687 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
3688 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
3689 miss Valgrind messages.
3690 (Exploding the Stack Size with Malloc): Likewise.
3691
78143faa
JD
36922007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
3693
3694 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
3695 locals. Reported by Juan Manuel Guerrero at
3696 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
3697 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
3698 Fix some indentation also.
3699 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
3700 explaining this issue.
3701
7ecec4dd
JD
37022007-01-09 Paolo Bonzini <bonzini@gnu.org>
3703 and Joel E. Denny <jdenny@ces.clemson.edu>
3704
3705 Simplify union and prologue handling, and escape union and lex/parse
3706 params with digraphs.
3707 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
3708 values to the empty string since these are no longer guaranteed
3709 initialized by the front-end.
3710 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
3711 braces around b4_user_stype since this is no longer done by the
3712 front-end.
3713 * src/files.c, src/files.h (pre_prologue_obstack,
3714 post_prologue_obstack): Remove.
3715 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
3716 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
3717 with digraphs. This fixes lex params and parse params.
3718 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
3719 * src/output.c (prepare): Remove muscle insertion of the prologues.
3720 (output): Remove freeing of pre_prologue_obstack and
3721 post_prologue_obstack.
3722 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
3723 than prologue_augment for prologue parsing so you don't need prologue
3724 obstacks.
5c80250c
JD
3725 (grammar_declaration): For %union RHS, use `braceless' instead of
3726 "{...}" so that braces are already stripped and code is escaped with
3727 digraphs.
7ecec4dd
JD
3728 * src/reader.c (prologue_augment): Remove.
3729 (reader): Remove initialization of pre_prologue_obstack and
3730 post_prologue_obstack.
3731 * src/reader.h (prologue_augment): Remove.
3732
3733 * data/c.m4: Remove stray parenthesis.
3734
16dc6a9e
JD
37352007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
3736
3737 Remove quotes from variables names in %define directives and from
3738 qualifiers in %code directives, and restrict the characters that are
3739 allowed in them to M4-friendly ones. For %define, continue to support
3740 the quoted form as a deprecated feature. Discussed starting at
3741 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
3742 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
3743 %code.
3744 * doc/bison.texinfo (Prologue Alternatives): Update.
91661ebb
JD
3745 (Decl Summary): In %defines entry, update mention of `%code requires'
3746 and `%code provides'.
16dc6a9e
JD
3747 (C++ Location Values): Update %define uses.
3748 (Calc++ Parser Interface): Likewise.
3749 (Calc++ Parser): Likewise, and update `%code requires' uses.
148d66d8 3750 (Table of Symbols): Update %code documentation.
16dc6a9e
JD
3751 * src/parse-gram.y (prologue_declaration): For %define variables, use
3752 `variable' instead of `STRING'.
3753 (grammar_declaration): For %code qualifiers, use `ID' instead of
3754 `STRING'.
3755 (variable): New nonterminal that takes an `ID' or a `STRING'.
3756 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
3757 and %define uses.
3758 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
3759 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
3760 (%define errors): Update %define uses.
3761
e9813cd4
JD
37622007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
3763
3764 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
3765 instead of muscle_insert for %define values so that M4-special
3766 characters are replaced with digraphs.
3767 * tests/input.at (%define errors): Extend to check weird values.
3768
6afc30cc
JD
37692007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
3770
3771 Instead of having skeletons declare all valid %define variables and
3772 %code qualifiers, provide macros that retrieve the associated values
3773 and build these lists automatically. Thus Bison will now warn when a
3774 variable or qualifier is not used by the skeleton in the current
3775 invocation regardless of whether it might sometimes be used by that
3776 skeleton in other invocations. Also, move all %define value macros to
3777 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
3778 form, which is replaced by %code.
3779 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
3780 (b4_check_user_names): ... this, and change the series of valid name
3781 arguments to a single list argument for names used in the skeleton
3782 similar to the existing list argument for names used in the grammar.
3783 Warn instead of complaining.
3784 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
3785 values and %code code, to format %code code properly, and to build
3786 lists of all %define variables and %code qualifiers used in the
3787 skeleton: b4_skeleton_percent_define_variables and
3788 b4_skeleton_percent_code_qualifiers.
3789 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
3790 Remove, and...
3791 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
3792 the skeleton names lists can finish building first. In place of
3793 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
3794 expect the lists b4_user_percent_define_variables and
3795 b4_user_percent_code_qualifiers.
3796 * data/c++.m4: Where setting default values for b4_parser_class_name,
3797 b4_location_type, b4_filename_type, b4_namespace, and
3798 b4_define_location_comparison, update their names to the
3799 b4_percent_define_ namespace.
3800 * data/glr.c: Don't use b4_check_percent_define_variables and
3801 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
3802 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
3803 (b4_parser_class_name, b4_namespace): Define these using
a4e25e1d 3804 b4_get_percent_define for parser_class_name and namespace.
6afc30cc
JD
3805 * data/location.cc: Use b4_get_percent_define.
3806 * data/push.c: Don't use b4_check_percent_define_variables and
3807 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
3808 * data/yacc.c: Likewise, and don't call m4_exit in
3809 b4_use_push_for_pull_if or m4_wrap code will never execute.
3810 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
3811 Rename to...
3812 (muscle_grow_user_name_list): ... this for consistency with the
3813 terminology used in bison.m4.
3814 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
3815 %define variable names, and rename muscle used_percent_define_variables
3816 to user_percent_define_variables.
3817 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
3818 user_percent_code_qualifiers.
3819 (content): Remove.
3820 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
3821 {CODE} form is no longer accepted.
3822 * tests/input.at (Reject bad %code qualifiers): Rename to...
3823 (Reject unused %code qualifiers): ... this, and update test output.
3824 (%define error): Update test output.
3825
7eb8a0bc
JD
38262007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
3827
3828 Check for unrecognized %define variables similar to checking for
3829 unrecognized %code qualifiers. Check for redefined %define variables.
3830 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
3831 generalizes...
3832 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
3833 (b4_check_percent_define_variables): New, also wraps it.
3834 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
3835 variables using b4_check_percent_define_variables.
3836 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
3837 all those exercised in the test suite and all those listed in the
3838 `Default values' section of c++.m4. Are there others?
3839 * data/push.c, data/yacc.c: Declare no valid %define variables.
3840 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
3841 similar to muscle_find, but it works even when the muscle stores a
3842 const value.
3843 (muscle_grow_used_name_list): New function for constructing the used
3844 name list muscles that b4_check_for_unrecognized_names requires.
3845 * src/parse-gram.y (prologue_declaration): Warn if a variable is
3846 %define'd more than once. Define the b4_used_percent_define_variables
3847 muscle with muscle_grow_used_name_list.
3848 (grammar_declaration): Abbreviate %code code with
3849 muscle_grow_used_name_list.
3850 * tests/input.at (%define errors): New.
3851
3fc65ead
JD
38522007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
3853
3854 Provide warn_at, complain_at, and fatal_at function callbacks to the
3855 skeletons, and use this for %code qualifier complaints.
3856 * data/bison.m4 (b4_error_at): New, invoked by...
3857 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
3858 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
3859 @fatal_at(...@) directives.
3860 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
3861 qualifiers in b4_used_percent_code_qualifiers and to use
3862 b4_complain_at.
3863 * src/location.c, src/location.h (boundary_set_from_string): New global
3864 function.
3865 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
3866 function.
3867 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
3868 to b4_used_percent_code_qualifiers.
3869 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
3870 function.
3871 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
3872 (lineno): Rename to...
3873 (out_lineno): ... this so I don't misunderstand it again.
3874 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
3875 here; these newlines are in the input but not the output file.
3876 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
3877 (at_directive_perform): ... this new static function, and add handling
3878 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
3879 directives.
3880 * tests/input.at (Reject bad %code qualifiers): Update test output with
3881 locations and extend.
3882
3883 * tests/output.at (Output file name: [, Output file name: ]): Remove
3884 bogus comment about these tests failing.
3885
1c7b7e1d
JD
38862007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
3887
3888 Clean up b4_check_percent_code_qualifiers a little.
3889 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
3890 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
3891 documentation and add examples.
3892 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
3893 qualifiers here.
3894
08af01c2
JD
38952007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
3896
3897 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
3898 unreliable -- especially when they're hidden inside another macro.
3899 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
3900 data/c.m4: Remove m4_divert(-1).
3901 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
3902 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
3903 m4_divert_push(0) and m4_divert_pop(0).
279cabb6 3904 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
08af01c2
JD
3905 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
3906 pushed and popped by m4sugar, should be first on the stack.
3907
3908 Provide warn, complain, and fatal function callbacks to the skeletons.
3909 This provides more flexibility than m4_fatal, improves the error
3910 message format, and captures messages for translation. Discussed
3911 starting at
3912 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
3913 * data/bison.m4 (b4_error): New, invoked by...
3914 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
3915 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
3916 directives. Because these M4 macros might be called when the current
3917 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
3918 the previous removal of uses of m4_divert, which caused trouble.
3919 (b4_check_percent_code_qualifiers): Use b4_complain instead of
3920 m4_fatal to report unrecognized %code qualifiers.
3921 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
3922 push parser requests.
3923 * data/glr.c: Use b4_complain instead of m4_fatal to report
3924 non-deterministic push parser requests.
3925 Update @output usage to @output(...@) form.
3926 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
3927 report missing %defines. Update @output usage to @output(...@) form.
3928 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
3929 @output(...@) form.
3930 * src/main.c (main): Invoke skel_scanner_free.
3931 * src/scan-skel.h (skel_scanner_free): Prototype new function.
3932 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
3933 obstack_for_string from flex-scanner.h.
3934 (YY_DECL): Use to declare skel_lex static.
3935 (decode_at_digraphs): Remove; now handled in the new
3936 SC_AT_DIRECTIVE_ARG start condition.
3937 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
3938 functions.
3939 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
3940 at_directive_argv): New static globals.
3941 (INITIAL): Use fail_for_invalid_at.
3942 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
3943 recognize the start of a generalized `@directive(...@)' form and
3944 start...
3945 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
3946 directive args (using the new obstack_for_string), to decode the
3947 contained @ diagraphs, and to perform the directive. It recognizes
3948 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
3949 @output(...@).
3950 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
3951 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
3952 `@,'.
3953 (scan_skel): Initialize obstack_for_string on the first call.
3954 (skel_scanner_free): New function to free obstack_for_string.
3955 * tests/input.at (Reject bad %code qualifiers): Update test output.
3956
8e0a5e9e
JD
39572007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
3958
3959 Consolidate the 4 prologue alternative directives (%code, %requires,
3960 %provides, and %code-top) into a single %code directive with an
3961 optional qualifier field. Discussed at
3962 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
3963 * NEWS (2.3a+): Rewrite the existing entry for the prologue
3964 alternatives.
3965 * doc/bison.texinfo (Prologue Alternatives): Update.
3966 (Decl Summary): Update to %code "requires" and %code "provides".
3967 (Calc++ Parser): Update to %code "requires".
148d66d8 3968 (Table of Symbols): Remove entries for %requires, %provides, and
8e0a5e9e
JD
3969 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
3970 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
3971 are replaced by b4_percent_code_provides and b4_percent_code_requires,
3972 which are skeleton-specific.
3973 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
3974 declare what %code qualifiers it supports and to complain if any other
3975 qualifiers were used in the grammar.
3976 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
3977 and b4_user_code([b4_percent_code_provides]) in place of
3978 b4_user_requires and b4_user_provides.
3979 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
3980 Add b4_user_code([b4_percent_code_top]) and
3981 b4_user_code([b4_percent_code]).
3982 Invoke b4_check_percent_code_qualifiers.
3983 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
3984 PERCENT_REQUIRES): Remove.
3985 (grammar_declaration): Remove RHS's for %code-top, %provides, and
3986 %requires. Rewrite the %code RHS as the unqualified form defining the
3987 muscle b4_percent_code. Add another RHS for the qualified %code form,
3988 which defines muscles of the form b4_percent_code_QUALIFIER and the
3989 b4_used_percent_code_qualifiers muscle.
3990 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
3991 PERCENT_REQUIRES): Remove.
3992 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
3993 %code "requires" and %code "provides".
3994 * tests/input.at (Reject bad %code qualifiers): New.
3995
95021767
JD
39962007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
3997
3998 Use the new code_props interface for destructors and printers.
3999 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
4000 printer_location members, and change the type of the destructor and
4001 printer members to code_props.
4002 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
4003 symbol_printer_get, semantic_type_destructor_set,
4004 semantic_type_printer_set, default_tagged_destructor_set,
4005 default_tagless_destructor_set, default_tagged_printer_set,
4006 default_tagless_printer_set): Use code_props in arguments and return
4007 types in place of char const * and location.
4008 (symbol_destructor_location_get, symbol_printer_location_get): Remove
4009 since the locations are now contained in the return of
4010 symbol_destructor_get and symbol_printer_get.
4011 * src/output.c (symbol_destructors_output, symbol_printers_output):
4012 Replace with...
4013 (symbol_code_props_output): ... this to eliminate duplicate code.
4014 (output_skeleton): Update to use symbol_code_props_output.
4015 * src/reader.c (symbol_should_be_used): Update use of
4016 symbol_destructor_get.
4017 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
4018 Update uses of the various _destructor_set and _printer_set functions.
4019 * src/symtab.c: (default_tagged_destructor_location,
4020 default_tagless_destructor_location, default_tagged_printer_location,
4021 default_tagless_printer_location): Remove since we...
4022 (default_tagged_destructor, default_tagless_destructor,
4023 default_tagged_printer, default_tagless_printer): ... change the type
4024 of these to code_props.
4025 (symbol_new, semantic_type_new, symbol_destructor_set,
4026 semantic_type_destructor_set, symbol_destructor_get,
4027 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
4028 symbol_check_alias_consistency, default_tagged_destructor_set,
4029 default_tagless_destructor_set, default_tagged_printer_set,
4030 default_tagless_printer_set): Update.
4031 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
4032 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
4033 code_props members.
4034 (symbol_print): Use SYMBOL_CODE_PRINT.
4035
f6857bbf
JD
40362007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
4037
4038 Use the new code_props interface for rule actions.
4039 * src/symlist.h (symbol_list): Replace action, action_location, and
4040 used members with a code_props action_props member.
4041 * src/reader.c (symbol_should_be_used, grammar_rule_check,
4042 grammar_midrule_action, grammar_current_rule_merge_set,
4043 grammar_current_rule_symbol_append, packgram): Update.
4044 * src/scan-code.h (translate_rule_action): Remove, no longer used.
4045 * src/scan-code.l (handle_action_dollar): Update.
4046 (translate_rule_action): Remove, no longer used.
4047 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
4048
7c0c6181
JD
40492007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
4050
4051 Use the new code_props interface in parse-gram.y.
4052 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
4053 Update all uses of translate_* functions to use the new code_props
4054 interface and to use gram_scanner_last_string_free and
4055 code_scanner_last_string_free where possible.
4056 (grammar_declaration): symbol_list_destructor_set and
4057 symbol_list_printer_set now perform the translation, so don't do it
4058 here. Use gram_scanner_last_string_free where possible.
4059 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
4060 translate_code): Remove, no longer used.
4061 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
4062 symbol_list_printer_set): Perform code translation here rather than
4063 depending on the caller to do so.
4064
4065 * src/symlist.h (struct symbol_list): Correct some documentation typos.
4066 * src/scan-gram.h (gram_last_string): Remove declaration.
4067 * src/scan-gram.l (last_string): Declare it static.
4068
28e52c0d
JD
40692007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
4070
4071 Encapsulate code properties and related functionality for the various
4072 destructors, printers, and actions into a code_props structure and
4073 interface. This patch merely implements code_props in scan-code.h and
4074 scan-code.l. Future patches will rewrite other modules to use it.
4075 Discussed starting at
4076 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
4077 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
4078 consistently initialize const structs that have an empty location
4079 field.
4080 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
4081 to ensure consistency.
4082 * src/scan-code.h (code_props): New structure.
4083 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
4084 function, macro, and const global variable for initializing a
4085 code_props with no code.
4086 (code_props_plain_init, code_props_symbol_action_init,
4087 code_props_rule_action_init, code_props_translate_code): The rest of
4088 the new code_props functional interface. Among other things, the init
4089 functions set the code_props kind field so that
4090 code_props_translate_code will know whether to behave like
4091 translate_symbol_action, translate_rule_action, or translate_code.
4092 These old translate functions must remain until all other modules are
4093 updated to use the new code_props interface.
4094 (code_scanner_last_string_free): New function similar to
4095 gram_scanner_last_string_free.
4096 (code_scanner_free): Add documentation.
4097 * src/scan-code.l: Implement the new interface.
4098 (code_lex): Make it static, add a code_props* argument, and remove the
4099 rule argument.
4100 (last_string): New static global similar to the one in scan-gram.l.
4101 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
4102 instead of rule.
4103 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
4104 code_props since Bison may one day use this information for destructors
4105 and printers.
4106 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
4107 (handle_action_dollar): Use symbol_list_n_get and set used flag
4108 directly since symbol_list_n_used_set is removed.
4109 (translate_action): Add a code_props* argument and remove the rule,
4110 action, and location arguments. Pass the code_props* on to code_lex.
4111 (translate_rule_action, translate_symbol_action, translate_code):
4112 Rewrite as wrappers around the new code_props interface.
4113 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
4114 it would eventually need to break the encapsulation of code_props.
4115
96034983
JD
41162007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
4117
4118 * etc/.cvsignore: New.
4119
945e396c
JD
41202007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
4121
4122 Add maintainer-push-check to run maintainer-check using push parsing in
4123 place of pull parsing where available.
4124 * Makefile.am (maintainer-push-check): New.
4125 * data/bison.m4 (b4_use_push_for_pull_if): New.
4126 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
4127 appropriately based on their existing values.
4128 (yypush_parse): Don't print push-parser-specific diagnostics if push
4129 parsing is being used in place of pull parsing.
4130 * data/yacc.c: If push parsing should replace pull parsing, redirect to
4131 push.c.
4132 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
4133 variable, and insert b4_use_push_for_pull_flag into muscles.
4134 * tests/Makefile.am (maintainer-push-check): New.
4135
7d596384
JD
41362006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
4137
4138 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
4139 (whether successful or failed) so that yypush_parse can be invoked
4140 again to start a new parse using the same yypstate.
4141 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
4142 check multiple yypull_parse invocations on the same yypstate. For pull
4143 mode, extend to check multiple yyparse invocations.
4144 (Exploding the Stack Size with Alloca): Extend to try with
4145 %push-pull-parser.
4146 (Exploding the Stack Size with Malloc): Likewise.
4147
4148 * tests/calc.at (Simple LALR Calculator): Don't specify
4149 %skeleton "push.c" since %push-pull-parser implies that now.
4150 * tests/headers.at (export YYLTYPE): Don't check for the push
4151 declarations. Otherwise, this test case can't be used to see if push
4152 mode can truly emulate pull mode.
4153 * tests/input.at (Torturing the Scanner): Likewise.
4154 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
4155 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
4156 AT_YACC_IF, which now includes the case of push mode since %skeleton
4157 need not be used for push mode. This will be more intuitive once
4158 push.c is renamed to yacc.c.
4159
7172e23e
JD
41602006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
4161
4162 For push mode, convert yyparse from a macro to a function, invoke yylex
4163 instead of passing a yylexp argument to yypull_parse, and don't
4164 generate yypull_parse or yyparse unless %push-pull-parser is declared.
4165 Discussed starting at
4166 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
4167 * data/bison.m4 (b4_pull_if): New.
4168 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
4169 * data/push.c: Improve M4 quoting a little.
4170 (b4_generate_macro_args, b4_parenthesize): Remove.
4171 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
4172 any time a pull parser is requested.
4173 Don't #define this as a wrapper around yypull_parse. Instead, when
4174 both push and pull are requested, make it a function that does that
4175 same thing.
4176 (yypull_parse): If there's a b4_prefix, #define this to
4177 b4_prefix[pull_parse] when both push and pull are requested.
4178 Don't define this as a function unless both push and pull are
4179 requested.
4180 Remove the yylexp argument and hard-code yylex invocation instead.
4181 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
4182 %push-parser.
4183 * src/getargs.c (pull_parser): New global initialized to true.
4184 * getargs.h (pull_parser): extern it.
4185 * src/output.c (prepare): Insert pull_flag muscle.
4186 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
4187 (prologue_declaration): Set both push_parser and pull_parser = true for
4188 %push-pull-parser. Set push_parser = true and pull_parser = false for
4189 %push-parser.
4190 * src/scan-gram.l: Don't accept %push_parser as an alternative to
4191 %push-parser since there's no backward-compatibility concern here.
4192 Scan %push-pull-parser.
4193 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
4194 instead of %push-parser.
4195 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
4196 prototype it in the module that calls yyparse.
4197 * tests/input.at (Torturing the Scanner): Likewise.
4198 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
4199
2e7944cb
JD
42002006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
4201
4202 Update etc/bench.pl. Optimize push mode a little (the yyn change
4203 deserves most of the credit).
4204 * Makefile.am (SUBDIRS): Add etc subdirectory.
4205 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
4206 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
4207 yytoken, yyval, and yyloc declarations to...
4208 (yyparse or yypush_parse): ... here to improve performance. For
4209 yypush_parse invocations after the first, be sure to assign yyn its old
4210 value again.
4211 (yypstate_new): Don't bother initializing the yyresult field since the
4212 initial value isn't used.
4213 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
4214 remove the #define that, in push mode, set it to yyps->NAME.
4215 * etc/Makefile.am: New.
4216 * etc/bench.pl: Remove and build it instead from...
4217 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
4218 "tests/bison" from the build directory by default rather than just
4219 invoking "bison" from $PATH.
4220 (calc_grammar): Update push parser code: don't declare yylval globally,
4221 don't define yyparse_wrapper, and don't #define yyparse.
4222 (bench_grammar): Update to check all working combinations of yacc.c,
4223 push.c, impure, pure, pull, and push.
4224
c3d50342
JD
42252006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
4226
4227 For push mode, add pull wrappers around yypush_parse.
4228 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
4229 (yypull_parse): New function wrapping yypush_parse.
4230 (yyparse): New #define wrapping yypull_parse.
4231 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
4232 is declared.
4233 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
4234 prototype yylex in the module that calls yyparse, and don't prototype
4235 yyparse there. Otherwise, the yyparse expansion won't compile.
4236 * tests/input.at (Torturing the Scanner): Likewise.
4237
94ebeba5
JD
42382006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
4239
4240 Enable push parsers to operate in impure mode. Thus, %push-parser no
4241 longer implies %pure-parser. The point of this change is to move
4242 towards being able to test the push parser code by running the entire
4243 test suite as if %push-parser had been declared.
4244 * data/push.c (yypush_parse): For impure mode, remove the
4245 yypushed_char, yypushed_val, and yypushed_loc arguments.
4246 Instead, declare these as local variables initialized to the global
4247 yychar, yylval, and yylloc.
4248 For the first yypush_parse invocation only, restore the initial values
4249 of these global variables when it's time to read a token since they
4250 have been overwritten.
4251 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
4252 %push-parser.
4253 * tests/calc.at (Simple LALR(1) Calculator): Always declare
4254 %pure-parser along with %push-parser since this test case was designed
4255 for pure push parsers.
4256 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
4257 (AT_YACC_OR_PUSH_IF): New.
4258 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
4259 add a note that it's still wrong for some cases (as it has been for a
4260 while).
4261 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
4262 %push-parser no longer implies %pure-parser.
4263
a0633178
JD
42642006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
4265
4266 Remove some unnecessary differences between the pull parser code and
4267 the push parser code. This patch enables yynerrs in push mode.
4268 * data/push.c: Reformat M4 a little.
4269 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
4270 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
4271 because push mode is on. Instead, if pure mode is on, move yynerrs
4272 to...
4273 (b4_declare_parser_state_variables): ... here.
4274 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
4275 to yyps->NAME so it can be used in yypush_parse.
4276 (yypush_parse): Don't omit uses of yynerrs in push mode.
4277
8646b6a3
JD
42782006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
4279
4280 Fix bug such that the first pushed token's value and location are
4281 sometimes overwritten (sometimes by %initial-action) before being used.
4282 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
4283 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
4284 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
4285 more closely mimic the pull parser logic.
4286 Don't copy the pushed token to yychar, yylval, and yylloc until it's
4287 time to read a token, which is after any initialization of yylval and
4288 yylloc.
4289 (gottoken): Rename label to...
4290 (yyread_pushed_token): ... for clarity and to avoid infringing on the
4291 user namespace.
4292
9baf4d74
JD
42932006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
4294
4295 Rearrange initialization of the parser state variables so that the
4296 skeleton doesn't have to have a copy for pull mode and another for push
4297 mode. This patch also fixes at least a bug such that yylloc was not
4298 initialized (with b4_location_initial_line and
4299 b4_location_initial_column) upon calling yypush_parse. However, that
4300 initialization now overwrites the first token's location;
4301 %initial-action assigning @$ already did the same thing, and both bugs
4302 will be fixed in a later patch.
4303 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
4304 (b4_declare_parser_state_variables): Remove initialization of yytoken,
4305 yyss, yyvs, yyls, and yystacksize.
4306 (yypstate_new): Remove initialization of some yypstate fields: yystate,
4307 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
4308 yylsp.
4309 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
4310 yyps->NAME so it can be used in yypush_parse.
4311 (yyparse or yypush_parse): For yypush_parse, don't print the
4312 "Starting parse" diagnostic for invocations after the first.
4313 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
4314 yypush_parse, only do it for the first invocation.
4315 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
4316 initialization to occur in yypush_parse but only on the first
4317 invocation.
4318
23522164
JD
43192006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
4320
4321 * data/push.c: Add CPP guards around push parser declarations in both
4322 the header and the code file.
4323 In the code file, move the push parser declarations to the same place
4324 they appear in the header file.
4325 Clean up the M4 some, especially the inconsistent underquoting in
4326 some b4_c_function_def and b4_c_function_decl uses.
4327
bb010fe5
JD
43282006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
4329
4330 Encapsulate the push parser state variables into an M4 macro so the
4331 push skeleton doesn't have to list them again for pull mode's yyparse.
4332 For push mode, remove yypush_parse's local equivalents of these
4333 variables to eliminate unnecessary copying between the two sets at
4334 run-time. This patch also fixes at least a bug related to multiple
4335 %initial-action invocations in push mode.
4336 * data/push.c (b4_declare_parser_variables): Rename to...
4337 (b4_declare_scanner_communication_variables): ... this for clarity and
4338 update both uses.
4339 (b4_declare_yyparse_variables): Remove and move its contents to the one
4340 spot where it was invoked.
4341 (b4_declare_parser_state_variables): New macro containing the parser
4342 state variables required by push mode.
4343 (struct yypstate): Replace all fields but yynew with
4344 b4_declare_parser_state_variables.
4345 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
4346 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
4347 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
4348 (yyparse or yypush_parse): For yyparse in pull mode, replace local
4349 parser state variable declarations with
4350 b4_declare_parser_state_variables.
4351 Don't initialize parser state variables when calling yypush_parse since
4352 yypstate_new already does that.
4353 Invoke the user's initial action only upon the first yypush_parse
4354 invocation.
4355 Remove all code that copies between the local parser state variables
4356 and the yypstate.
4357
2d212f8c
JD
43582006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
4359
4360 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
4361 prevent a name collision in a future patch where these names will
4362 sometimes be #define'd.
4363 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
4364 since it no longer has the same name as the existing argument.
4365 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
4366
e6e704dc
JD
43672006-12-19 Paolo Bonzini <bonzini@gnu.org>
4368 and Joel E. Denny <jdenny@ces.clemson.edu>
4369
4370 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
4371 that the argument is case-insensitive, and there's no `=' here.
4372 For the %skeleton entry, mention that %language is better.
4373 (Bison Options): Likewise for --language and --skeleton. Move the
4374 --skeleton entry so that the `Tuning the parser' section is sorted
4375 alphabetically on long options.
4376 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
4377 %language directive in detail here; cross-reference the %language
4378 documentation instead.
4379 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
4380 `%require "2.3b"' so that the example is always up-to-date.
148d66d8 4381 (Table of Symbols): Add entries for %language and %skeleton.
e6e704dc
JD
4382 * examples/extexi (normalize): Instead of replacing every %require
4383 argument with the current Bison version, just substitute for
4384 `@value{VERSION}'. This guarantees that we're testing what actually
4385 appears in the documentation.
4386 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
4387 rather than `@VERSION@'.
4388
0e021770
PE
43892006-12-18 Paul Eggert <eggert@cs.ucla.edu>
4390
fd575f05
PE
4391 * NEWS: Reword the %language news a bit, and put it earlier.
4392
0e021770
PE
4393 * src/getargs.c (skeleton_arg): Last arg is now location const *.
4394 Rewrite to simplify the logic.
4395 (language_argmatch): Likewise.
fd575f05
PE
4396 (program_name): We now own this var.
4397 * src/getargs.h (struct bison_language): Use char[] rather than
4398 const char *.
0e021770
PE
4399
4400 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
4401 Java is supported.
4402 * src/complain.c (program_name): Remove decl; no longer needed.
4403 * src/main.c (program_name): Remove; now belongs to getargs.
4404
44052006-12-18 Paolo Bonzini <bonzini@gnu.org>
4406
4407 * NEWS: Document %language.
4408
4409 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
4410
4411 * data/c-skel.m4, data/c++-skel.m4: New files.
4412 * data/glr.c: Complain on push parsers.
4413
4414 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
4415 over %skeleton.
148d66d8 4416 (Decl Summary): Document %language and %skeleton.
0e021770
PE
4417 (Command line): Document -L.
4418
4419 * examples/extexi: Rewrite %require directive.
4420 * examples/calc++/Makefile.am: Pass VERSION to extexi.
4421
4422 * src/files.c (compute_exts_from_gc): Look in language structure
4423 for .y extension.
4424 (compute_file_name_parts): Check whether .tab should be added.
4425 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
4426 (language, skeleton_arg, language_argmatch): New.
4427 (long_options): Add --language.
4428 (getargs): Use skeleton_arg, add -L/--language.
4429 * src/getargs.h: Include location.h.
4430 (struct bison_language, language, skeleton_arg, language_argmatch): New.
4431 * src/output.c (prepare): Pick default skeleton from struct language.
4432 Don't dispatch C skeletons here.
4433 * src/parse-gram.y (PERCENT_LANGUAGE): New.
4434 (prologue_declaration): Add "%language" rule, use skeleton_arg.
4435 * src/scan-gram.l ("%language"): New rule.
4436
4437 * tests/calc.at: Test %skeleton and %language.
4438 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
4439 (AT_GLR_IF): Look for %skeleton "glr.cc".
4440 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
4441 (AT_YACC_IF): Reject %language.
4442
5691bf57
PE
44432006-12-18 Paul Eggert <eggert@cs.ucla.edu>
4444
db06f0ce
PE
4445 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
4446 since it wasn't used; only the typedef name 'semantic_type' is needed.
4447 Also, omit trailing white space.
4448
5691bf57
PE
4449 * bootstrap: Sync from coreutils.
4450 (gnulib_extra_files): Add build-aux/announce.gen.
4451 (slurp): Adjust .gitignore files like .cvsignore files.
4452 * build-aux/announce-gen: Remove from CVS, since bootstrap
4453 now creates this.
4454
791934e4
JD
44552006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
4456
4457 Make %push-parser imply %pure-parser. This fixes several bugs; see
4458 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
4459 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
4460 pure_parser = true.
4461 * data/push.c: Don't bother testing b4_push_if when deciding whether
4462 to expand b4_declare_parser_variables globally.
4463 (yypush_parse): Likewise in here.
4464
4465 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
4466 (yy_reduce_print): Reformat M4 for readability.
4467
ee5abb37
JD
44682006-12-15 Bob Rossi <bob@brasko.net>
4469 and Joel Denny <jdenny@ces.clemson.edu>
4470
4471 * data/push.c (yypstate): Add typedef, and update all uses of
4472 struct yypstate to just yypstate.
4473 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
4474
16ca01f9
JD
44752006-12-14 Bob Rossi <bob@brasko.net>
4476
4477 * data/push.c (yypush_parse): Declare prototype regardless of
4478 %locations option.
4479
ab8e7e1a
JD
44802006-12-14 Bob Rossi <bob@brasko.net>
4481
4482 * data/push.c (yyparse): Remove the prototype and the #define when in
4483 push-parser mode.
4484
9bf32be3
JD
44852006-12-13 Bob Rossi <bob@brasko.net>
4486
4487 * data/push.c (yypstate_init): Rename to...
4488 (yypstate_new): ... this and use b4_c_function_def.
4489 (yypstate_delete): New.
4490 (yypush_parse): Change parameters yynval and yynlloc to be const.
4491 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
4492 yypstate_delete functions.
4493
f02e2948
JD
44942006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
4495
4496 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
4497 strange test case titles. Reported by Bob Rossi.
4498
38eb7751
PE
44992006-12-13 Paul Eggert <eggert@cs.ucla.edu>
4500
4501 * TODO: Add pointer to Sylvain Schmitz's work on static detection
4502 of potential ambiguities in GLR grammers.
4503
bd9d212b
JD
45042006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
4505
4506 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
4507 `bison ', use m4_index instead of m4_substr since chopping up a string
4508 containing M4-special characters causes problems here.
4509
4510 Fix a couple of bugs related to special characters in user-specified
4511 file names, and make it easier for skeletons to compute output file
4512 names with the same file name prefix as Bison-computed output file
4513 names.
4514 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
4515 b4_parser_file_name and b4_spec_defines_file instead of
4516 @output_parser_name@ and @output_header_name@, which are now redundant.
4517 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
4518 b4_parser_file_name, b4_spec_defines_file, and the new
4519 @basename(FILENAME@) instead of @output_parser_name@ and
4520 @output_header_name@, which inappropriately escaped the file names as
4521 C string literals.
4522 * src/files.c (all_but_ext): Remove static qualifier.
4523 (compute_output_file_names): Move `free (all_but_ext)' to...
4524 (output_file_names_free): ... here since all_but_ext is needed later.
4525 * src/files.h (all_but_ext): Extern.
4526 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
4527 exactly what MUSCLE_INSERT_STRING used to do.
4528 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
4529 characters are escaped properly.
4530 * src/output.c (prepare): Define muscle file_name_all_but_ext as
4531 all_but_ext.
4532 For pkgdatadir muscle, maintain previous functionality by using
4533 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
4534 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
4535 digraphs would never be expanded. Hopefully no one has M4-special
4536 characters in his Bison installation path.
4537 * src/scan-skel.l: Don't parse @output_header_name@ and
4538 @output_parser_name@ anymore since they're now redundant.
4539 In @output, use decode_at_digraphs.
4540 Parse a new @basename command that invokes last_component.
4541 (decode_at_digraphs): New.
4542 (BASE_QPUTS): Remove unused.
4543 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
4544 (Output file name): New tests.
4545
3f7ca628
JD
45462006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
4547
4548 Warn about output files that are generated by the skeletons and that
4549 conflict with other output files.
4550 * data/glr.c: Don't generate the header file here when glr.cc does.
4551 * src/files.c (file_names, file_names_count): New static globals.
4552 (compute_output_file_names): Invoke output_file_name_check for files
4553 not generated by the skeletons and remove existing checks.
4554 (output_file_name_check): New function that warns about conflicting
4555 output file names.
4556 (output_file_names_free): Free file_names.
4557 * src/files.h (output_file_name_check): Declare.
4558 * src/scan-skel.l: Invoke output_file_name_check for files generated by
4559 the skeletons.
4560 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
4561 (Conflicting output files): New tests.
4562
178e123e
PE
45632006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4564
4565 * doc/bison.texinfo: Fix a couple of typos.
4566
45672006-12-08 Bob Rossi <bob@brasko.net>
8def5cd0
JD
4568
4569 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
4570 Rename to...
4571 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
4572 update all uses.
4573 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
4574 (yypush_parse): Rename yypvars argument to yyps and remove redundant
4575 local pv.
4576 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
4577 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
4578
ea17f233
JD
45792006-12-07 Bob Rossi <bob@brasko.net>
4580 and Joel Denny <jdenny@ces.clemson.edu>
4581
4582 * data/push.c (yypvarsinit): Change return type from void* to struct
4583 yypvars*. No longer cast to void* on return.
4584 (struct yypvars): Remove yylen since it need not be remembered between
4585 yypushparse invocations.
4586 (yypushparse): Don't copy between yylen and pv->yylen.
4587
55a30bda
JD
45882006-12-05 Bob Rossi <bob@brasko.net>
4589
4590 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
4591 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
4592 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
4593 (struct yypvars): Remove b4_declare_parser_variables.
4594 (yypvarsinit): Remove init code for removed variables.
4595 (global scope): Do not declare b4_declare_parser_variables if
4596 push or pure mode.
4597 (yypushparse): Add b4_declare_parser_variables.
4598 Init new local variables, and remove init code for removed
4599 yypvars variables.
4600 (yyparse): Delete.
4601 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
4602 and yyparse for other modes.
4603 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
4604 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
4605 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
4606 (AT_PURE_LEX_IF): True if pure or push parser.
4607
85894313
JD
46082006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
4609
4610 Document Yacc prologue alternatives and default %destructor's and
4611 %printer's as experimental. Don't mention Java yet. Discussed at
4612 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
4613 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
4614 (2.3a): Annotate this entry to say the old forms of these features were
4615 also experimental.
4616 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
148d66d8 4617 Table of Symbols): Say they're experimental. Comment out any mention
85894313
JD
4618 of Java (we'll want this back eventually).
4619
02975b9a
JD
46202006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
4621
4622 Support a file name argument to %defines. Deprecate `=' in
4623 %file-prefix, %name-prefix, and %output. Discussed at
4624 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
4625 * NEWS (2.3a+): Mention.
148d66d8 4626 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
02975b9a
JD
4627 form of %defines, and remove `=' from entries for %file-prefix,
4628 %name-prefix, and %output.
4629 * src/parse-gram.y (prologue_declaration): Implement.
4630 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
4631 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
4632 all but one occurrence of %name-prefix.
4633 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
4634 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
4635 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
4636 occurrence of each of %file-prefix and %output. Add check for %defines
4637 with argument.
4638 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
4639 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
4640 Remove the `=' from %output.
4641
287b314e
JD
46422006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
4643
4644 Don't escape $ in test case titles since Autoconf 2.61 now does that
4645 correctly.
4646 * tests/actions.at (Default %printer and %destructor are not for error
4647 or $undefined): Here.
4648 (Default %printer and %destructor are not for $accept): Here.
4649 * tests/input.at (Invalid $n and @n): Here.
4650
3ebecc24
JD
46512006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
4652
4653 Rename <!> to <>. Discussed starting at
4654 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
4655 * NEWS (2.3a+): Update.
148d66d8 4656 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
3ebecc24
JD
4657 Update.
4658 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
4659 * src/scan-gram.l (INITIAL): Implement.
4660 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
4661 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
4662 comment.
4663 * tests/actions.at (Default tagless %printer and %destructor,
4664 Default tagged and per-type %printer and %destructor,
4665 Default %printer and %destructor are not for error or $undefined,
4666 Default %printer and %destructor are not for $accept,
4667 Default %printer and %destructor for mid-rule values): Update.
4668 * tests/input.at (Default %printer and %destructor redeclared,
4669 Unused values with default %destructor): Update.
4670
26b8a438
JD
46712006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
4672
4673 Don't let %prec take a nonterminal.
4674 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
4675 token.
4676 * tests/input.at (%prec takes a token): New test checking that %prec
4677 won't take a nonterminal.
4678
07c39ae9
JD
46792006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
4680
405d53b7
JD
4681 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
4682 it was double-quoted.
07c39ae9
JD
4683 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
4684 grammar is maintained with Bison's highest standards.
4685 * src/getargs.c: Fix some typos in Doxygen comments.
4686
580b8926
JD
46872006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
4688
4689 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
4690 later. Reported by Paul Eggert in
4691 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
4692 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
4693 * src/scan-code.l (translate_action): Don't bother invoking
4694 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
4695 (code_scanner_free): Instead of invoking
4696 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
4697 which frees more.
4698 * src/scan-gram.l (gram_scanner_free): Likewise.
4699 * src/scan-skel.l (scan_skel): Likewise.
4700
4502eadc
JD
47012006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
4702
4703 * src/files.c (tr): Change return type to void.
4704 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
4705 has been called previously for the same key.
4706 (muscle_find): Return storage instead of value so that
4707 --enable-gcc-warnings doesn't produce warnings that the return discards
4708 const. aver that the value and storage are the same since storage
4709 could potentially be NULL when value is not.
4710 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
4711 same as 0.
4712
7746c8f6
PE
47132006-11-08 Paul Eggert <eggert@cs.ucla.edu>
4714
4715 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
4716 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
4717 us a slightly cleaner distribution, and also works.
4718 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
4719 gnulib changes.
4720
eb095650
PE
47212006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
4722 and Paul Eggert <eggert@cs.ucla.edu>
4723
4724 Don't let Bison leak memory except when it complains.
4725 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
4726 (spec_defines_file, dir_prefix): Now char *, not const char *,
4727 since they are freed.
4728 * src/files.c: Likewise.
4729 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
4730 Likewise.
4731 (tr): Now operates in-place. All uses changed.
4732 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
4733 values.
4734 (compute_file_name_parts, compute_output_file_names): Don't store
4735 read-only data in variables that will be freed.
4736 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
4737 src_extension, and header_extension.
4738 (output_file_names_free): New public function to free
4739 spec_verbose_file, spec_graph_file, spec_defines_file,
4740 parser_file_name, and dir_prefix.
4741 * src/getargs.c (getargs): Don't store read-only data in variables that
4742 will be freed.
4743 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
4744 (which previously existed but was unused), and quotearg_free.
4745 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
4746 * src/muscle_tab.c: Likewise.
4747 (muscle_entry): Make the value char const *,
4748 and add a new storage member that is char * and can be freed.
4749 (muscle_entry_free): New private function.
4750 (muscle_init): Use it instead of free.
4751 (muscle_insert, muscle_grow): Update and use new storage member.
4752 (muscle_code_grow): Free the string passed to muscle_grow
4753 since it's not needed anymore.
4754 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
4755 add a new `char *code' member.
4756 ("{...}"): Declare semantic type as code.
4757 * src/scan-code.h (translate_rule_action):
4758 (translate_symbol_action, translate_code, translate_action): Return
4759 `char const *' rather than `char *' since external code should not free
4760 these strings.
4761 * src/scan-code.l: Likewise.
4762 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
4763 which is "{...}" in the parser.
4764 * tests/Makefile.am (maintainer-check-valgrind): Set
4765 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
4766 Valgrind.
4767 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
4768 complain.
4769 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
4770 expecting a non-zero exit status sets --leak-check=summary and
4771 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
4772 this case, and we don't want to hear about it.
4773
ac564be4
PE
47742006-11-08 Paul Eggert <eggert@cs.ucla.edu>
4775
4776 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
4777 instead of from the template, to simplify configuration a bit.
4778 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
4779 and m4/wint_t.m4, as they are needed with the latest gnulib.
4780
17bd8a73
JD
47812006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
4782
4783 Disable unset/unused mid-rule value warnings by default, and recognize
4784 --warnings=midrule-values to enable them. Discussed starting at
4785 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
4786 * NEWS (2.3a+): Mention.
4787 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
4788 warnings): Add entry for midrule-values subargument.
4789 * src/reader.c (symbol_should_be_used): Don't return true just because
4790 the value is a set/used mid-rule value unless
4791 --warnings=midrule-values was specified.
4792 * tests/input.at (Unused values, Unused values before symbol
4793 declarations): Run tests with and without --warnings=midrule-values.
4794
4795 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
4796 than LIST_FREE directly.
4797
89eb3c76
JD
47982006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
4799
4800 Finish implementing --warnings=error, which should not be implied by
4801 --warnings=all (or by its synonyms -W and --warnings without
4802 subarguments).
4803 * src/complain.c (set_warning_issued): New function to report that
4804 warnings are being treated as errors and to record an error if so.
4805 Invoke...
4806 (warn_at, warn): ... here.
4807 * src/getargs.c (warnings_args, warnings_types): Reorder so that
4808 "error - warnings are errors" does not appear above "all - all of the
4809 above".
4810 (getargs): For -W and --warnings without subarguments, don't let
4811 FLAGS_ARGMATCH set warnings_error in warnings_flag.
4812 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
4813
ba7560e2
JD
48142006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
4815
4816 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
4817 empty subargument list. For example: `bison --warnings= parser.y'.
4818
31283fc3
JD
48192006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
4820
4821 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
4822 the parser header file so that gcc doesn't warn.
4823
12e35840
JD
48242006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
4825
4826 Split the default %destructor/%printer into two kinds: <*> and <!>.
4827 Discussed starting at
4828 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
4829 * NEWS (2.3a+): Mention.
4830 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
4831 previous change today related to mid-rules.
148d66d8 4832 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
3ebecc24 4833 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
12e35840
JD
4834 (TYPE_TAG_ANY): Add as <*>.
4835 (TYPE_TAG_NONE): Add as <!>.
4836 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
4837 for <*> and <!>.
4838 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
4839 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
4840 * src/symlist.c (symbol_list_default_new): Split into tagged and
4841 tagless versions.
4842 (symbol_list_destructor_set, symbol_list_printer_set): Split
4843 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
4844 SYMLIST_DEFAULT_TAGLESS.
4845 * src/symlist.h: Update symbol_list_default*_new prototypes.
4846 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
4847 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
4848 * src/symtab.c (default_destructor, default_destructor_location,
4849 default_printer, default_printer_location): Split each into tagged and
4850 tagless versions.
4851 (symbol_destructor_get, symbol_destructor_location_get,
4852 symbol_printer_get, symbol_printer_location_get): Implement tagged
4853 default and tagless default cases.
4854 (default_destructor_set, default_printer_set): Split each into tagged
4855 and tagless versions.
4856 * src/symtab.h: Update prototypes.
4857 * tests/actions.at (Default %printer and %destructor): Rename to...
4858 (Default tagless %printer and %destructor): ... this, and extend.
4859 (Per-type %printer and %destructor): Rename to...
4860 (Default tagged and per-type %printer and %destructor): ... this, and
4861 extend.
4862 (Default %printer and %destructor for user-defined end token): Extend.
4863 (Default %printer and %destructor are not for error or $undefined):
4864 Update.
4865 (Default %printer and %destructor are not for $accept): Update.
4866 (Default %printer and %destructor for mid-rule values): Extend.
4867 * tests/input.at (Default %printer and %destructor redeclared): Extend.
4868 (Unused values with default %destructor): Extend.
4869
f91b1629
JD
48702006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
4871
4872 Don't apply the default %destructor/%printer to an unreferenced midrule
4873 value. Mentioned at
4874 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
4875 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
4876 like $@n instead of just @n so that the default %destructor/%printer
4877 logic doesn't see them as user-defined symbols.
4878 (symbol_is_dummy): Check for both forms of the name.
4879 * src/reader.c (packgram): Remove the `$' from each midrule symbol
4880 name for which the midrule value is referenced in any action.
4881 * tests/actions.at (Default %printer and %destructor for mid-rule
4882 values): New test.
4883 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
4884 for change to dummy symbol names.
4885
519d0004
JD
48862006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
4887
4888 Warn about unset midrule $$ if the corresponding $n is used.
4889 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
4890 $n usage.
4891 (packgram): Before invoking grammar_rule_check on any rule, make sure
4892 all actions have already been scanned in order to set `used' flags.
4893 Otherwise, checking that a midrule's $$ is set will not always work
4894 properly because the midrule check must forward-reference the midrule's
4895 parent rule.
4896 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
4897 warning.
4898
a501eca9
JD
48992006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
4900
4901 More improvements to the documentation of the prologue alternatives:
4902 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
4903 Bison manual.
4904 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
4905 some text to clarify the relative importance of the new directives and
4906 to show how these directives may be viewed as code labels.
4907
2cbe6b7f
JD
49082006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
4909
4910 Similar to the recently removed %before-header, add %code-top as the
4911 alternative to the pre-prologue. Mentioned at
4912 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
4913 Also, let the prologue alternatives appear in the grammar section.
4914 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
4915 (prologue_declaration): Move the existing prologue alternatives to...
4916 (grammar_declaration): ... here and add %code-top.
4917 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
4918
4919 Clean up and extend documentation for the prologue alternatives.
4920 * NEWS (2.3a+): Describe prologue alternatives.
4921 * doc/bison.texinfo (Prologue): Move discussion of prologue
4922 alternatives to...
4923 (Prologue Alternatives): ... this new section, and extend it to discuss
4924 all 4 directives in detail.
148d66d8
JD
4925 (Table of Symbols): Clean up discussion of prologue alternatives and
4926 add %code-top.
2cbe6b7f 4927
e557d3ea
JMG
49282006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4929
4930 DJGPP specific issues.
4931
4932 * djgpp/config.bat: config.hin has been moved to lib. Adjust
4933 config.bat accordingly.
4934 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
4935 * djgpp/config.site: Likewise.
4936
136a0f76
PB
49372006-10-16 Paolo Bonzini <bonzini@gnu.org>
4938
27bd5d67
PB
4939 Replace %*-header with %provides, %requires, %code. See discussion at
4940 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
4941
136a0f76
PB
4942 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
4943 (b4_user_start_header): Remove.
4944 * data/glr.c: Use new macros instead of b4_*start_header
4945 and b4_*end_header.
4946 * data/glr.cc: Likewise.
4947 * data/lalr1.cc: Likewise.
4948 * data/push.c: Likewise.
4949 * data/yacc.c: Likewise.
4950
4951 * doc/bison.texinfo: Remove %before-header, rename
4952 %{start,end,after}-header to %requires, %provides, %code.
4953
4954 * src/parse-gram.y: Likewise (also rename token names accordingly).
4955 * src/scan-gram.l: Likewise.
4956 * tests/actions.at: Likewise.
4957
10f429ef
PE
49582006-10-14 Paul Eggert <eggert@cs.ucla.edu>
4959
4960 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
4961 Problem reported by Joel E. Denny.
4962
49632006-10-14 Jim Meyering <jim@meyering.net>
4964
4965 (Sync from coreutils.)
4966 Work also when the working directory (with e.g. coreutils sources)
4967 is version controlled with git, rather than CVS.
4968 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
4969 rather than CVS.
4970 In messages and comments, say e.g., "checked-out sources",
4971 rather than "CVS sources".
4972 (version_controlled_file): New function. Work for git as well as
4973 for CVS. Don't use grep's -q option.
4974 (slurp): Call it here, in place of CVS-specific code.
4975
c4bd5bf7
JD
49762006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
4977
4978 Fix testsuite for ./configure --enable-gcc-warnings:
4979 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
4980 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
4981 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
4982 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
4983 * test/regression.at (Diagnostic that expects two alternatives):
4984 Likewise.
4985
46356ea4
PE
49862006-10-12 Paul Eggert <eggert@cs.ucla.edu>
4987
231ed89a
PE
4988 * bootstrap.conf (gnulib_modules): Add config-h.
4989 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
4990 worry about HAVE_CONFIG_H.
4991 * lib/abitset.c: Likewise.
4992 * lib/bitset.c: Likewise.
4993 * lib/bitset_stats.c: Likewise.
4994 * lib/bitsetv-print.c: Likewise.
4995 * lib/bitsetv.c: Likewise.
4996 * lib/ebitset.c: Likewise.
4997 * lib/get-errno.c: Likewise.
4998 * lib/lbitset.c: Likewise.
4999 * lib/subpipe.c: Likewise.
5000 * lib/timevar.c: Likewise.
5001 * lib/vbitset.c: Likewise.
5002 * lib/bitset.c: Include "bitset.h" first, to test interface.
5003 * lib/bitset_stats.c: Include "bitset_stats.h" first.
5004 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
5005 * lib/bitsetv.c: Include "bitsetv.h" first.
5006 * lib/get-errno.c: Include "get-errno.h" first.
5007 * m4/.cvsignore: Add config-h.m4.
5008 * tests/actions.at (Default %printer and %destructor for ...):
5009 Adjust expected line numbers in output to reflect removal of #if
5010 HAVE_CONFIG_H lines.
5011 * tests/glr-regression.at (Missed %merge type warnings when ...):
5012 Likewise.
5013 * tests/regression.at (Braced code in declaration in rules section):
5014 Likewise.
5015 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
5016 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
5017 Include <config.h> unconditionally.
5018
46356ea4
PE
5019 * bootstrap: Sync from coreutils, as follows:
5020
5021 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
5022
5023 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
5024 variable was sometimes used without being initialized. This
5025 messed up the installation of the INSTALL file in some cases.
5026
5027 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
5028
5029 * bootstrap (usage, main program, symlink_to_gnulib): Add option
5030 --copy. Inspired by a suggestion from Bruno Haible.
5031
5032 2006-10-03 Jim Meyering <jim@meyering.net>
5033
5034 * bootstrap: Undo last change to this file, since now gnulib-tool
5035 sticks with the automake default in generating dependencies.
5036
dd4bf078
PE
50372006-10-12 Paul Eggert <eggert@cs.ucla.edu>
5038
cf2a5f7c
PE
5039 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
5040 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
5041
5042 * doc/bison.1: Add copyright notice.
5043
5044 * data/glr.c: Don't include <stdarg.h>; not used.
5045
35fe0834
PE
5046 * NEWS: The -g and --graph options now output graphs in Graphviz
5047 DOT format, not VCG format.
5048 * doc/bison.1: Likewise.
5049 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
fcab4a2e
PE
5050 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
5051 of this change in
5052 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
35fe0834
PE
5053 * TODO: Remove Graphviz entry.
5054 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
5055 remove vcg.c, vcg.h, vcg_defaults.h.
5056 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
5057 * src/graphviz.c, src/graphviz.h: New files.
5058 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
5059 * src/files.h: Make comment more generic.
5060 * src/main.c (main): Likewise.
5061 * src/print_graph.h: Likewise.
5062 * src/getargs.c (usage): Make usage description more generic.
5063 * src/print_graph.c: Include graphviz.h rather than vcg.h.
5064 (static_graph, fgraph): Remove. All uses changed to pass
5065 arguments instead of sharing a static var.
5066 (print_core, print_actions, print_state, print_graph):
5067 Output graphviz format rather than VCG format.
5068 * tests/.cvsignore: Remove *.vcg; add *.dot.
5069 * tests/output.at: Expect *.dot files, not *.vcg files.
5070
dd4bf078
PE
5071 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
5072 accommodates the 2006-10-08 change.
5073
efdd7421
PE
50742006-10-11 Bob Rossi <bob@brasko.net>
5075
5076 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
5077 (b4_yyssa, b4_yyerror_range): New macros.
5078 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
5079 (yypvarsinit): Remove init of removed fields.
5080 (yypushparse): Remove use of removed fields; use new macros instead.
5081
96a1981a
PE
50822006-10-11 Paul Eggert <eggert@cs.ucla.edu>
5083
5084 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
5085 in a push parser. Reindent slightly to match yacc.c better.
5086
50872006-10-11 Bob Rossi <bob@brasko.net>
5088
46356ea4
PE
5089 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
5090 yymsg_alloc fields.
5091 (yypvarsinit, yypushparse): Remove init of removed fields.
5092 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
96a1981a 5093
c1630a8b
PE
50942006-10-09 Paul Eggert <eggert@cs.ucla.edu>
5095
5096 * THANKS: Add Paolo Bonzini and Bob Rossi.
5097
90b9908d
PB
50982006-10-08 Paolo Bonzini <bonzini@gnu.org>
5099
5100 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
5101 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
5102 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
5103 b4_define_user_cde and uses): Remove.
5104 (b4_comment, b4_prefix, b4_sync_start): New.
5105 * data/bison.m4: New file, with most of the content removed from c.m4.
5106 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
5107 * src/output.c (output_skeleton): Pass bison.m4.
5108 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
5109 only if specified.
5110
cf806753
PE
51112006-10-05 Paul Eggert <eggert@cs.ucla.edu>
5112
5113 Fix test failure reported by Tom Lane in
5114 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
5115 and try to make such failures easier to catch in the future.
5116 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
5117 that's now the caller's responsibility.
5118 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
5119 Set yychar = YYEOF if it's negative.
5120 * tests/actions.at (yylex): Abort if asked to read past EOF.
5121 * tests/conflicts.at (yylex): Likewise.
5122 * tests/cxx-type.at (yylex): Likewise.
5123 * tests/glr-regression.at (yylex): Likewise.
5124 * tests/input.at (yylex): Likewise.
5125 * tests/regression.at (yylex): Likewise.
5126 * tests/torture.at (yylex): Likewise.
5127
0e2f006a
PE
51282006-10-01 Paul Eggert <eggert@cs.ucla.edu>
5129
5130 Fix problems with translating English-language diagnostics.
5131 * bootstrap: Fix bug introduced in recent bootstrap changes, with
5132 respect to bison-runtime pot generation. The YY_ stuff
5133 wasn't being captured.
5134 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
5135 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
5136 * runtime-po/POTFILES.in: Add data/push.c.
5137
e3ddc1e3
PE
51382006-09-29 Paul Eggert <eggert@cs.ucla.edu>
5139
5140 Merge bootstrap changes from coreutils.
5141
5142 2006-09-28 Jim Meyering <jim@meyering.net>
5143
5144 Automatically generated dependencies are important even
5145 when all of the sources in a directory come from gnulib.
5146 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
5147 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
5148
5149 2006-09-23 Jim Meyering <jim@meyering.net>
5150
5151 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
5152
5153 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5154
5155 * bootstrap: Add support for --force.
5156 (usage): New function. Describe usage less tersely.
5157 (CVS_only_file): New var.
5158
01e972b3
PE
51592006-09-21 Paul Eggert <eggert@cs.ucla.edu>
5160
5161 * data/push.c (YYPUSH_MORE): Make it an enum instead.
5162 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
5163 Adjust white space and comments to match GNU style better.
5164
c63d3e90
PE
51652006-09-20 Bob Rossi <bob@brasko.net>
5166
5167 * data/push.c (yyresult_get): Remove function.
5168 (YYPUSH_MORE): Add #define.
5169 (yypushparse): Modify return value.
5170
e70f46d1
PE
51712006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5172
5173 * stamp-h.in: Remove; no longer needed.
5174 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
5175 Remove config.h, config.hin, intl (no longer created).
5176 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
5177 stamp-h1.
5178
5179 Sync bootstrap from coreutils, as follows:
5180
5181 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
5182
5183 * bootstrap (symlink_to_gnulib): New function.
5184 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
5185 to copies-of-gnulib.
5186 (cp_mark_as_generated, slurp, gnulib_files):
5187 Avoid making a copy if it's the same as the old version.
5188 (gnulib_files): Add support for this variable (used by Bison).
5189
a92be413
PE
51902006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5191
5192 * src/getargs.c (usage): Rework to use conventions similar to
5193 coreutils, to make translation a bit easier and the code a bit
5194 smaller. Problem reported by Tim Van Holder.
5195
4f82b42a
PE
51962006-09-15 Paul Eggert <eggert@cs.ucla.edu>
5197
3b2942e6
PE
5198 Use some of gnulib's new modules, taken from coreutils.
5199
5200 * bootstrap: Sync from coreutils, except add support for gnulib_files.
5201 * bootstrap.conf: New file.
5202 (gnulib_modules): Add configmake, inttypes, unistd.
5203 (XGETTEXT_OPTIONS): Add complain, complain_at,
5204 fatal, fatal_at, warn, warn_at, unexpected_end.
5205 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
5206 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
5207 (gl_EARLY): Add.
5208 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
5209 (gl_INIT): Add
5210 (GNULIB_AUTOCONF_SNIPPET): Remove.
5211 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
5212 the pickiest.
5213 * lib/.cvsignore: Add inttypes_.h.
5214 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
5215 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
5216 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
5217 no-longer-necessary initializations.
5218 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
5219 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
5220 use the unistd module.
5221 * src/system.h: Likewise.
5222 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
5223 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
5224 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
5225 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
5226 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
5227 * src/system.h: Include inttypes.h unconditionally, now that we
5228 use the inttypes module. Don't bother to include stdint.h, since
5229 inttypes.h now does that for us.
5230 (LOCALEDIR): Remove, now that we use the configmake module.
5231 * src/getargs.c: Include configmake.h.
5232 * src/main.c: Likewise.
5233 * src/output.c: Likewise.
5234 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
5235 not from $abs_top_builddir, since config.h moved.
5236
5237
4f82b42a
PE
5238 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
5239 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
5240
5241 * src/parse-gram.y (symbol_declaration): Don't put statements
5242 before declarations; it's not portable to C89.
5243 * src/scan-code.l (handle_action_at): Likewise.
5244
5245 * src/scan-code.l: Always initialize braces_level; the old code
5246 left it uninitialized and therefore had undefined behavior.
5247
5248 Don't attempt to redefine 'assert', since it runs afoul of
5249 systems where standard headers (mistakenly) include <assert.h>.
5250 Instead, define and use our own alternative, called 'aver'.
5251 * src/reader.c: Don't include assert.h, since we no longer
5252 use assert.
5253 * src/scan-code.l: Likewise.
5254 * src/system.h (assert): Remove, replacing with....
5255 (aver): New function, taking a bool arg. All uses changed.
5256 * src/tables.c (pack_vector): Ensure that aver arg is bool,
5257 not merely an integer.
5258
31c10e38
PE
52592006-09-15 Bob Rossi <bob@brasko.net>
5260
5261 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
5262 * data/c.m4 (YYPUSH): New.
5263 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
5264 * src/getargs.c (push_parser): New var.
5265 * src/getargs.h (push_parser): New declaration.
5266 * src/output.c (prepare): Add macro insertion of `push_flag'.
5267 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
5268 (prologue_declaration): Parse %push-parser.
5269 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
5270 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
5271 list of removed lines from the traces observed.
5272 (AT_CHECK_CALC_LALR): Added push parser tests.
5273
fa7b79c0
PE
52742006-09-13 Paul Eggert <eggert@cs.ucla.edu>
5275
21fe08ca
PE
5276 * NEWS: Version 2.3a.
5277 * configure.ac (AC_INIT): Likewise.
5278
e8ec4d9b
PE
5279 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
5280 "#define YYSTYPE int" that caused "make maintainer-check" to fail
5281 due to header ordering dependencies. I don't know why the #define
5282 was there.
5283
fa7b79c0
PE
5284 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
5285 runtime cost when YYDEBUG is not defined, and so that some tests
5286 that used to fail now work. Problem and initial suggestion by
5287 Paolo Bonzini.
5288 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
5289 * data/glr.cc (b4_parser_class_name):
5290 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
5291 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
5292 (yydebug_) [YYDEBUG]: New member.
5293 (yycdebug_): Now defined only if YYDEBUG.
5294 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
5295 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
5296 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
5297 if YYYDEBUG.
5298 (debug_stream, set_debug_stream, debug_level, set_debug_level):
5299 Define only if YYDEBUG.
5300 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
5301 set_debug_level.
5302 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
5303 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
5304 AT_CHECK_CALC_GLR_CC that are working now.
5305
4ec13d60
PE
53062006-09-12 Paul Eggert <eggert@cs.ucla.edu>
5307
5308 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
5309 We don't need them in glr.cc, and glr.c defines them.
5310 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
5311 assumes that defining it to anything is the same as defining
5312 it to 1. Problem reported by Paolo Bonzini.
5313
8e1687ae
PE
53142006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
5315
5316 * data/c.m4 (b4_null, b4_case): Define.
5317 * src/output.c (prepare_symbols): Use b4_null.
5318 (user_actions_output): Use b4_case.
5319
3dc5e96b
PE
53202006-09-11 Paul Eggert <eggert@cs.ucla.edu>
5321
aef3da86
PE
5322 * data/glr.c (b4_shared_declarations): Put start-header first,
5323 before any #includes that we generate, so that feature-test
5324 macros work. Problem reported by Michael Deutschmann in
5325 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
5326 * data/lalr1.cc: Likewise.
5327 * doc/bison.texinfo (Prologue): Document that feature-test macros
5328 should be defined before any Bison declarations.
5329 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
5330 that depend on location.hh after, not before, Bison decls, since
5331 we now include location.hh after the first user prologue.
5332
3dc5e96b
PE
5333 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
5334 Sander Brandenburg in
5335 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
5336 Also, fix minor white space and comment issues.
aef3da86
PE
5337 (Prologue): Mention that it's better to define feature-test macros
5338 before Bison declarations. Problem reported by Michael Deutschmann.
5339
5340 * README-cvs: Fix typo: "&" should be "&&". Problem reported
5341 by Jim Meyering.
5342 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
5343 This adjusts to recent gnulib changes.
3dc5e96b 5344
b2a0b7ca
JD
53452006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
5346
5347 Finish implementation of per-type %destructor/%printer. Discussed
5348 starting at
5349 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
5350 and
5351 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
5352 * NEWS (2.3+): Add a description of this feature to the default
5353 %destructor/%printer description.
5354 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
5355 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
5356 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
5357 list node contains a semantic type.
5358 * src/symtab.c, src/symtab.h: Extend with a table that associates
5359 semantic types with their %destructor's and %printer's.
5360 (semantic_type_from_uniqstr, semantic_type_get,
5361 semantic_type_destructor_set, semantic_type_printer_set): New functions
5362 composing the public interface of that table.
5363 (symbol_destructor_get, symbol_destructor_location_get,
5364 symbol_printer_get, symbol_printer_location_get): If there's no
5365 per-symbol %destructor/%printer, look up the per-type before trying
5366 the default.
5367 * tests/actions.at (Per-type %printer and %destructor): New test case.
5368 * tests/input.at (Default %printer and %destructor redeclared):
5369 Extend to check that multiple occurrences of %symbol-default in a
5370 single %destructor/%printer declaration is an error.
5371 (Per-type %printer and %destructor redeclared, Unused values with
5372 per-type %destructor): New test cases.
5373
3be03b13
JD
53742006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
5375
5376 Require default %destructor/%printer to be declared using
5377 %symbol-default instead of an empty symbol list, and start working on
5378 new per-type %destructor/%printer. Discussed at
5379 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
5380 * NEWS (2.3+): Add %symbol-default to example.
5381 * bison.texinfo (Freeing Discarded Symbols): Likewise.
148d66d8 5382 (Table of Symbols): Add entry for %symbol-default.
3be03b13
JD
5383 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
5384 (generic_symlist, generic_symlist_item): New nonterminals for creating
5385 a list in which each item is a symbol, semantic type, or
5386 %symbol-default.
5387 (grammar_declaration): Use generic_symlist in %destructor and %printer
5388 declarations instead of symbols.1 or an empty list.
5389 (symbol_declaration, precedence_declaration, symbols.1): Update actions
5390 for changes to symbol_list.
5391 * src/reader.c: Update for changes to symbol_list.
5392 * src/scan-code.l: Likewise.
5393 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
5394 * src/symlist.c, src/symlist.h: Extend such that a list node may
5395 represent a semantic type or a %symbol-default in addition to just an
5396 ordinary symbol. Add switched functions for setting %destructor's and
5397 %printer's.
5398 * tests/actions.at, tests/input.at: Add %symbol-default to all default
5399 %destructor/%printer declarations.
5400
3508ce36
JD
54012006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
5402
5403 Whether the default %destructor/%printer applies to a particular symbol
5404 isn't a question of whether the user *declares* that symbol (in %token,
5405 for example). It's a question of whether the user by any means
5406 *defines* the symbol at all (by simply using a char token, for
5407 example). $end is defined by Bison whereas any other token with token
5408 number 0 is defined by the user. The error token is always defined by
5409 Bison regardless of whether the user declares it with %token, but we
5410 may one day let the user define error as a nonterminal instead.
5411 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
5412 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
5413 the meaning of "user-defined".
5414 * tests/actions.at (Default %printer and %destructor for user-declared
5415 end token): Rename to...
5416 (Default %printer and %destructor for user-defined end token): ...
5417 this.
5418
5419 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
5420 computation of whether to apply the default, don't maintain a list of
5421 every Bison-defined symbol. Instead, just check for a first character
5422 of '$', which a user symbol cannot have, and check for the error token.
5423
9350499c
JD
54242006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
5425
5426 Don't apply the default %destructor or %printer to the error token,
5427 $undefined, or $accept. This change fits the general rule that the
5428 default %destructor and %printer are only for user-declared symbols,
5429 and it solves several difficulties that are described in the new test
5430 cases listed below.
5431 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
5432 * tests/actions.at (Default %printer and %destructor are not for error
5433 or $undefined, Default %printer and %destructor are not for $accept):
5434 New test cases.
5435
4d7370cb
JD
54362006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
5437
5438 Allow %start after the first rule.
5439 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
5440 when parsing the first rule.
5441 (check_and_convert_grammar): Search for it here after all grammar
5442 declarations have been parsed. Skip midrules, which have dummy LHS
5443 nonterminals.
5444 * src/symtab.c (symbol_is_dummy): New function.
5445 * src/symtab.h (symbol_is_dummy): Declare it.
5446 * tests/input.at (%start after first rule): New test.
5447
6d0ef4ec
JD
54482006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
5449
5450 Redo some of the previous commit: add back the ability to use
5451 non-aliased/undeclared string literals since it might be useful to
5452 those declaring %token-table.
5453 * src/reader.c (check_and_convert_grammar): Undo changes in previous
5454 commit: don't worry about complaints from symbols_pack.
5455 * src/symtab.c (symbol_new, symbol_class_set,
5456 symbol_check_alias_consistency): Undo changes in previous commit: count
5457 each string literal as a new symbol and token, assign it a symbol
5458 number, and don't complain about non-aliased string literals.
5459 (symbols_pack): Since symbol_make_alias still does not decrement symbol
5460 and token counts but does still set aliased tokens to the same number,
5461 symbol_pack_processor now leaves empty slots in the symbols array.
5462 Remove those slots.
5463 * tests/regression.at (Undeclared string literal): Remove test case
5464 added in previous commit since non-aliased string literals are allowed
5465 again.
5466 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
5467 remove unnecessary string literal declarations.
5468 * tests/sets.at (Firsts): Likewise.
5469
965537bc
JD
54702006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
5471
5472 Don't allow an undeclared string literal, but allow a string literal to
5473 be used before its declaration.
5474 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
5475 symbols_pack complained.
5476 * src/symtab.c (symbol_new): Don't count a string literal as a new
5477 symbol.
5478 (symbol_class_set): Don't count a string literal as a new token, and
5479 don't assign it a symbol number since symbol_make_alias does that.
5480 (symbol_make_alias): It's not necessary to decrement the symbol and
5481 token counts anymore. Don't assume that an alias declaration occurs
5482 before any uses of the identifier or string, and thus don't assert that
5483 one of them has the highest symbol number so far.
5484 (symbol_check_alias_consistency): Complain if there's a string literal
5485 that wasn't declared as an alias.
5486 (symbols_pack): Bail if symbol_check_alias_consistency failed since
5487 symbol_pack asserts that every token has been assigned a symbol number
5488 although undeclared string literals have not.
5489 * tests/regression.at (String alias declared after use, Undeclared
6d0ef4ec 5490 string literal): New test cases.
965537bc
JD
5491 (Characters Escapes, Web2c Actions): Declare string literals as
5492 aliases.
5493 * tests/sets.at (Firsts): Likewise.
5494
47aee066
JD
54952006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
5496
5497 In the grammar scanner, STRING_FINISH unclosed constructs and return
5498 them to the parser in order to improve error messages.
5499 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
5500 SC_BRACED_CODE, SC_PROLOGUE): Implement.
5501 * tests/input.at (Unclosed constructs): New test case.
5502 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
5503 seen.
5504
5505 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
5506 unused global.
5507
1f6b3679
JD
55082006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
5509
5510 Handle string aliases for character tokens correctly.
5511 * src/symtab.c (symbol_user_token_number_set): If the token has an
5512 alias, check and set its alias's user token number instead of its own,
5513 which is set to indicate the alias. Previously, every occurrence of
5514 the character token in the grammar overwrote that alias indicator with
5515 the character code.
5516 * tests/input.at (String aliases for character tokens): New test.
5517
219741d8
JD
55182006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
5519
5520 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
5521
11daa4e7
PE
55222006-08-11 Paul Eggert <eggert@cs.ucla.edu>
5523
5524 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
5525 to prevent failures when building on older platforms.
5526 Check for autopoint failure.
5527 Set XGETTEXT_OPTIONS to values that check for C format strings,
5528 so that translators are warned about them (this also helps
5529 prevent core dumps).
5530
5531 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
5532 function, since it simplifies our code a bit.
5533
5534 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
5535 rather than -W, so we don't get bogus warnings about sign comparisons.
5536 Add -Wpointer-arith, since that warning is useful (it reports code
5537 that does not conform to C89 and that some compilers reject).
5538 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
5539 since it's no longer needed.
5540
f9bfc42a
JD
55412006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
5542
5543 Clean up scanners a bit.
5544 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
5545 definitions so gcc won't warn when obstack_for_string is unused.
5546 * src/scan-code.l: config.h and system.h are already #include'd by
5547 scan-code-c.c, so get rid of them here.
5548 * src/scan-gram.l: Likewise.
5549 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
5550 definitions rather than duplicating the rest of it.
5551 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
5552
06e8700a
JD
55532006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
5554
5555 Suppress signed/unsigned comparison warnings for yycheck.
5556 * data/c.m4 (b4_safest_int_type): New macro.
5557 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
5558 a signed int type, cast it to b4_safest_int_type first.
5559 * data/yacc.c: Likewise.
5560 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
5561 also overwritten.
5562
9c437126
PE
55632006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
5564
5565 * doc/bison.texinfo: Fix some typos.
5566
284d8a13
PE
55672006-08-02 Paul Eggert <eggert@cs.ucla.edu>
5568
5569 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
5570 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
5571
5572 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
5573 the latest gnulib does this a different way.
5574 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
5575 translation was patched, so stop omitting it.
5576
ec5479ce
JD
55772006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
5578
5579 Enable declaration of default %printer/%destructor. Make the parser
5580 use these for all user-declared grammar symbols for which the user does
5581 not declare a specific %printer/%destructor. Thus, the parser uses it
5582 for token 0 if the user declares it but not if Bison generates it as
5583 $end. Discussed starting at
5584 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
5585 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
5586 and
5587 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
5588 * NEWS (2.3+): Mention.
5589 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
5590 declare a %destructor for a mid-rule's semantic value. It's just
5591 impossible to declare one specific to it.
5592 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
5593 code. Describe default %destructor form.
5594 * src/parse-gram.y (grammar_declaration): Parse default
5595 %printer/%destructor declarations.
5596 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
5597 and symbol_destructor_location_get rather than accessing the destructor
5598 and destructor_location members of struct symbol.
5599 (symbol_printers_output): Likewise but for %printer's.
5600 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
5601 again.
5602 * src/symtab.c (default_destructor, default_destructor_location,
5603 default_printer, default_printer_location): New static global
5604 variables to record the default %destructor and %printer.
5605 (symbol_destructor_get, symbol_destructor_location_get,
5606 symbol_printer_get, symbol_printer_location_get): New functions to
5607 compute the appropriate %destructor and %printer for a symbol.
5608 (default_destructor_set, default_printer_set): New functions to set the
5609 default %destructor and %printer.
5610 * src/symtab.h: Prototype all those new functions.
5611 * tests/actions.at (Default %printer and %destructor): New test to
5612 check that the right %printer and %destructor are called, that they're
5613 not called for $end, and that $$ and @$ work correctly.
5614 (Default %printer and %destructor for user-declared end token): New
5615 test to check that the default %printer and %destructor are called for
5616 a user-declared end token.
5617 * tests/input.at (Default %printer and %destructor redeclared, Unused
5618 values with default %destructor): New tests to check related grammar
5619 warnings and errors.
5620
868d2d96
JD
56212006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
5622
5623 Clean up handling of %destructor for the end token (token 0).
5624 Discussed starting at
5625 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
5626 and
5627 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
5628
5629 Make the skeletons consistent in how they pop the end token and invoke
5630 its %destructor.
5631 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
5632 state, which has token number 0, since this would invoke the
5633 %destructor for the end token.
5634 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
5635 until after shifting the end token, or else it won't be popped.
5636 * data/yacc.c (yyparse): Likewise.
5637
5638 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
5639 it's the end token. Upon termination, destroy an unshifted lookahead
5640 even when it's the end token.
5641 * data/lalr1.cc (yy::parser::parse): Likewise.
5642 * data/yacc.c (yyparse): Likewise.
5643
5644 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
5645 value warnings for the end token when the user gives the end token a
5646 %destructor.
5647
5648 * tests/actions.at (Printers and Destructors): Test all the above.
5649
62a9592d
PE
56502006-07-24 Paul Eggert <eggert@cs.ucla.edu>
5651
5652 Update to latest gnulib and gettext versions.
5653 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
5654 Add fopen-safer.
5655 (gnulib_files): Add m4/warning.m4. Don't worry about files
5656 overwritten by autopoint.
5657 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
5658 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
5659 rejects them.
5660 Don't use autoreconf; instead, invoke autopoint etc. by hand,
5661 so that we can remove the intl files at a better time.
5662 (intl_files_to_remove): Remove aclocal.m4, since it gets
5663 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
5664 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
5665 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
5666 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
5667 Remove datarootdir hack; no longer needed.
5668 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
5669 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
5670 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
5671 strdup.h.
5672 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
5673 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
5674
10d6970f
PE
56752006-07-20 Paul Eggert <eggert@cs.ucla.edu>
5676
5677 * bootstrap: Adjust to today's change to gnulib-tool by invoking
5678 it with --assume-autoconf='latest-stable'.
5679
50a33993
JD
56802006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
5681
5682 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
5683 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
5684 YYSTYPE' and `{'.
5685 * src/muscle_tab.h (muscle_grow): Replace the header comments with
5686 those from muscle_tab.c since the old ones are misleading.
5687
2ce4ed68
AD
56882006-07-13 Akim Demaille <akim@epita.fr>
5689
5690 Support %define "KEY" {VALUE}.
5691 * src/scan-code.h, src/scan-code.l (translate_action)
5692 (translate_rule_action, translate_symbol_action, translate_code):
5693 Return char *, not const char *.
5694 * src/parse-gram.y (declaration): Rename as...
5695 (prologue_declaration): this.
5696 (string_content): Remove this nonterminal, use STRING.
5697 (braceless, content, content.opt): New nonterminal.
5698 Use them.
5699 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
5700 as value.
5701 * src/scan-gram.l (getargs.h): Don't include it.
5702
db7e5eb5
PE
57032006-07-12 Paul Eggert <eggert@cs.ucla.edu>
5704
5705 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
5706 rather than a for-loop that declares a local bool variable. This
5707 should work around a compatibility problem with a Cray x1e C++
5708 compiler reported by Hung Nguyen in
5709 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
5710 The for-loop was introduced in the 2004-11-17 change but I don't
5711 know why it was needed.
5712
a5d80ba5
AD
57132006-07-12 Akim Demaille <akim@epita.fr>
5714
5715 * data/c.m4: Comment changes.
5716
23eb2a69
AD
57172006-07-10 Akim Demaille <akim@lrde.epita.fr>
5718
5719 * src/complain.c (error_message, ERROR_MESSAGE): New.
5720 To factor...
5721 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
5722 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
5723
ddc8ede1
PE
57242006-07-09 Paul Eggert <eggert@cs.ucla.edu>
5725
5726 * NEWS: Instead of %union, you can define and use your own union type
5727 YYSTYPE if your grammar contains at least one <type> tag.
5728 Your YYSTYPE need not be a macro; it can be a typedef.
5729 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
5730 (Union Decl, Decl Summary): Document this.
5731 * data/glr.c (YYSTYPE): Implement this.
5732 * data/glr.cc (YYSTYPE): Likewise.
5733 * data/lalr1.cc (YYSTYPE): Likewise.
5734 * data/yacc.c (YYSTYPE): Likewise.
5735 * src/output.c (prepare): Output tag_seen_flag.
5736 * src/parse-gram.y (declaration, grammar_declaration):
5737 Use 'union_seen' rather than 'typed' to determine whether
5738 %union has been seen, since grammars can now be typed without
5739 %union.
5740 (symbol_declaration, type.opt, symbol_def):
5741 Keep track of whether a tag has been seen.
5742 * src/reader.c (union_seen, tag_seen): New vars.
5743 (typed): remove.
5744 * src/reader.h (union_seen, tag_seen, typed): Likewise.
5745 * src/scan-code.l (untyped_var_seen): New variable.
5746 (handle_action_dollar): Adjust to above changes.
5747 (handle_action_dollar, handle_action_at):
5748 Improve overflow checking for outlandish numbers.
5749 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
5750 avoid new diagnostics generated by above changes.
5751 * tests/regression.at (YYSTYPE typedef): Add test to check
5752 for type tags without %union.
5753
5754 * src/symlist.c (symbol_list_length): Return int, not unsigned
5755 int, since callers expect int. This may need to get revisited
5756 once we have proper integer overflow checking.
5757
5758 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
5759 object is now static.
5760
5761 * src/getargs.c (flags_argmatch): Return void, not int,
5762 to pacify ./configure --enable-gcc-warnings.
5763
5764 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
5765 since last_string is already defined to FLEX_PREFIX (last_string).
5766
7b42569e
AD
57672006-07-09 Akim Demaille <akim@lrde.epita.fr>
5768
5769 Implement --warnings/-W.
5770 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
5771 replaced by...
5772 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
5773 Adjust callers.
5774 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
5775 (warnings_args, warnings_types): New.
5776 (getargs, short_options, long_options): Accept -W/--warnings.
5777 Sort the options by alphabetical order, upper case letter right
5778 before its lower case.
5779
3b452f4e
JD
57802006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
5781
5782 Change %merge result type clash warnings to errors. Discussed at
5783 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
5784 * src/reader.c (record_merge_function_type): Use complain_at.
5785 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
5786 declared later): Update test case results.
5787
b8a41559
AD
57882006-07-09 Akim Demaille <akim@lrde.epita.fr>
5789
5790 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
5791 to be in alphabetical order.
5792 (trace_args): Spelling fixes.
5793
cd9e1ba2
PE
57942006-07-09 Paul Eggert <eggert@cs.ucla.edu>
5795
5796 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
5797 so they don't collide with user-defined macros.
5798 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
5799 this was never guaranteed, and now that we're using gnulib stdint,
5800 which defines int_fast16_t to long int, the problem is exposed.
5801
cb48f191
PE
58022006-07-08 Paul Eggert <eggert@cs.ucla.edu>
5803
b8445a15
PE
5804 * data/c.m4 (b4_basename): Simplify a bit, since we don't
5805 need the full POSIX semantics (and weren't implementing them
5806 anyway).
5807
cb48f191
PE
5808 Adjust to Autoconf 2.60 and today's gnulib.
5809 * bootstrap (gnulib_modules): Add stdint.
5810 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
5811 no longer copies it.
5812 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
5813 since stdint needs the former and wcwidth (which is now required
5814 by mbswidth) needs the latter.
5815 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
5816 work around a compatibility glitch between gettext 0.14.6 and
5817 Autoconf 2.60.
5818 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
5819 Do not check for uintptr_t, since new stdint module does the right
5820 thing.
5821 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
5822 Add stdint.h, stdint_.h, wcwidth.h.
5823 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
5824 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
5825 stdint.m4, wchar_t.m4, wcwidth.m4.
5826 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
5827 usual order for ../lib/*.h files.
5828 (file_name_split): Use last_component, not base_name, to adjust
5829 to gnulib changes.
5830 * src/parse-gram.h: Include <strverscmp.h> in the usual order
5831 for ../lib/*.h files.
5832 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
5833 Define unconditionally, since we now assume the stdint module.
5834 * src/scan-skel.l: Include <dirname.h>.
5835 (BASE_QPUTS): Use last_component, not base_name.
5836 * src/system.h: Include <unlocked-io.h> in the usual order
5837 for ../lib/*.h files. Include <stdint.h> unconditionally,
5838 since we now use the stdint module.
5839 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
5840 HAVE_UINTPTR_T, since we now use the stdint module.
5841 (base_name): Remove decl, since files now include <dirname.h>
5842 to get the decl.
5843
cd48d21d
AD
58442006-07-08 Akim Demaille <akim@lrde.epita.fr>
5845
5846 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
5847 New, default to 1.
5848 * data/yacc.c, data/glr.c, data/location.cc: Use them.
5849 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
5850 default.
5851 * tests/calc.at: Adjust.
5852
8ec0a172
AD
58532006-07-08 Akim Demaille <akim@lrde.epita.fr>
5854
b8445a15 5855 * data/c.m4 (b4_basename): New.
8ec0a172
AD
5856 (b4_syncline): Also output the location of its invocation (from
5857 the skeleton).
5858 (b4_user_action, b4_define_user_action, b4_user_actions)
5859 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
5860 (b4_user_stype): New.
5861 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
5862
4a678af8
JD
58632006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
5864
5865 In the grammar file, the first column is 1 not 0 on the first line as
5866 on every other line.
5867 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
5868 * tests/input.at (Torturing the Scanner): Update output.
5869
5870 * src/scan-gram.l (scanner_cursor): Declare it static.
5871
dd60572a
JD
58722006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
5873
5874 In warnings, say "previous declaration" rather than "first
5875 declaration".
5876 * src/symtab.c (redeclaration): Do that here.
5877 * src/reader.c (record_merge_function_type): In the case of a result
5878 type clash, report the previous declaration rather than the very first
5879 one in the grammar file.
5880 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
5881 declared later): Add a third declaration to check this behavior.
5882 * tests/input.at (Incompatible Aliases): Update output.
5883
2073e1b6
AD
58842006-06-27 Akim Demaille <akim@epita.fr>
5885
5886 * doc/Doxyfile.in: New.
5887 * doc/Makefile.am: Use it.
5888 * src/lalr.h, src/symtab.h: Initial doxygenation.
5889
8ee5b538
JD
58902006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
5891
5892 Don't miss %merge result type warnings just because the LHS types are
fab044e6
JD
5893 declared after the %merge. This continues the effort of the previous
5894 patch.
8ee5b538
JD
5895 * src/reader.c (get_merge_function): Don't set the merger type yet.
5896 (record_merge_function_type): New function for setting the merger type
5897 and checking for clashes.
5898 (grammar_current_rule_merge_set): Set the location of the %merge for
5899 the current rule.
5900 (packgram): Invoke record_merge_function_type for each rule now that
5901 all symbol type declarations have been parsed.
5902 * src/reader.h (merger_list.type_declaration_location): New member
5903 storing the location of the first %merge from which the type for this
5904 merging function was derived.
5905 * src/symlist.h (symbol_list.merger_declaration_location): New member
5906 storing the location of a rule's %merge, if any.
5907 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
5908 declared later): New test to catch the error fixed by the above patch.
5909
ffa4ba3a
JD
59102006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
5911
5912 Get action warnings (grammar_rule_check) right even when symbol
fab044e6
JD
5913 declarations appear after the rules. Discussed at
5914 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
5915 and
5916 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
5917 Don't mistake the type of $$ in a midrule to be that of its parent
5918 rule's $$.
ffa4ba3a
JD
5919 * src/reader.c (grammar_current_rule_end): Don't invoke
5920 grammar_rule_check yet since not all symbol declarations may have been
5921 parsed yet.
5922 (grammar_midrule_action): Likewise.
5923 Don't record whether the midrule's $$ has been used yet since actions
5924 haven't been translated yet.
5925 Record the midrule's parent rule and its RHS index within the parent
5926 rule.
5927 (grammar_current_rule_action_append): Don't translate the action yet
5928 since not all symbol declarations may have been parsed yet and, thus,
5929 warnings about types for $$, $n, @$, and @n can't be reported yet.
5930 (packgram): Translate the action and invoke grammar_rule_check now that
5931 all symbol declarations have been parsed.
5932 * src/scan-code.l (handle_action_dollar): Now that this is invoked
5933 after parsing the entire grammar file, the symbol list here in the case
5934 of a midrule is actually the midrule's empty RHS, so reference its
5935 parent rule's RHS where necessary.
5936 On the other hand, now that you can already know it's a midrule, you
5937 aren't forced to think $$ has the same type as its parent rule's $$.
5938 (handle_action_at): In the case of a midrule, reference the parent rule
5939 where necessary.
5940 * src/symlist.c (symbol_list_new): Initialize new midrule-related
5941 members.
5942 (symbol_list_length): Now that this is invoked after all rules have
5943 been parsed, a NULL symbol (rather than a NULL symbol list node)
5944 terminates a rule. symbol_list_print already does this correctly.
5945 * src/symlist.h (symbol_list.midrule_parent_rule,
5946 symbol_list.midrule_parent_rhs_index): New members so that midrules can
5947 remember their relationships with their parents.
5948 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
5949 fixed by the above patch.
5950 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
5951 implementing...
5952 (Unused values): ... this old test case and...
5953 (Unused values before symbol declarations): ... this new test case.
5954 This one is the same as `Unused values' except that all symbol
5955 declarations appear after the rules in order to catch the rest of the
5956 errors fixed by the above patch.
5957
e256e17f
JD
59582006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
5959
300a1930
JD
5960 More cleanup.
5961 * src/reader.c (current_rule): Declare it static since it's no longer
5962 used outside this file.
5963 (grammar_current_rule_action_append): Remove redundant arguments from
5964 translate_rule_action invocation.
5965 * src/reader.h (current_rule): Remove this unused extern.
5966 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
5967 * src/scan-code.l (translate_rule_action): Likewise.
e256e17f 5968
381ecb06
JD
59692006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
5970
5971 Clean up yesterday's patch.
5972 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
5973 to...
5974 * src/reader.c (grammar_current_rule_action_append): ... here for
5975 consistency with grammar_current_rule_symbol_append.
5976 * tests/regression.at (Braced code in declaration in rules section):
5977 Make yyerror and yylex static as usual.
5978
4210cd0b
JD
59792006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
5980
5981 Fix bug that mistakes braced code in a declaration in the rules section
5982 to be a rule action. Mentioned at
5983 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
5984 * src/scan-gram.l: Move midrule action detection from the start of the
5985 scanning of any braced code to...
5986 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
5987 action. For readability, use $2 and @2 rather than the equivalent
5988 global variables.
5989 * tests/regression.at (Braced code in declaration in rules section):
5990 New test to catch the error fixed by the above patch.
5991
5992 Work on code readability some.
5993 * src/scan-code.l (current_rule): Get rid of this misleading and
5994 redundant declaration: it's actually extern'ed in reader.h.
5995 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
5996 translate_action): Add a rule argument and use it instead of the global
5997 current_rule.
5998 (translate_rule_action): This already receives current_rule through an
5999 argument, so pass it on to translate_action instead of assigning
6000 current_rule to current_rule.
6001 (translate_symbol_action, translate_code): Pass rule = NULL to
6002 translate_action.
6003
34f98f46
JD
60042006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
6005
6006 Rename %before-definitions to %start-header and %after-definitions to
6007 %end-header. Don't use these declarations to separate pre-prologue
6008 blocks from post-prologue blocks. Add new order-independent
6009 declarations %before-header and %after-header as alternatives to the
6010 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
6011 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
6012 * NEWS (2.3+): Update for these changes.
6013 * data/glr.c (b4_before_definitions): Update to...
6014 (b4_start_header): ... this.
6015 (b4_after_definitions): Update to...
6016 (b4_end_header): ... this.
6017 * data/glr.cc: Likewise.
6018 * data/lalr1.cc: Likewise.
6019 * data/yacc.c: Likewise.
6020 * doc/bison.texinfo (The prologue): Update names, and replace remaining
6021 prologue blocks with %*-header declarations.
6022 (Calc++ Parser): Likewise.
91661ebb 6023 (Decl Summary): Update names.
148d66d8 6024 (Table of Symbols): Update description.
34f98f46
JD
6025 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
6026 (PERCENT_END_HEADER): ... this.
6027 (PERCENT_BEFORE_DEFINITIONS): Update to...
6028 (PERCENT_START_HEADER): ... this.
6029 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
6030 (declaration): Update token names and m4 macro names.
6031 When parsing %end-header and %start-header, invoke translate_code
6032 before muscle_code_grow, and no longer set global booleans to remember
6033 whether these declarations have been seen.
6034 Parse new %after-header and %before-header.
6035 * src/reader.c (before_definitions, after_definitions): Remove.
6036 (prologue_augment): Accept a new bool argument to specify whether to
6037 augment the pre-prologue or post-prologue.
6038 * src/reader.h (before_definitions, after_definitions): Remove these
6039 extern's.
6040 (prologue_augment): Add new bool argument.
6041 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
6042 (PERCENT_END_HEADER): ... this.
6043 (PERCENT_BEFORE_DEFINITIONS): Update to...
6044 (PERCENT_START_HEADER): ... this.
6045 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
6046 * tests/actions.at (Printers and Destructors): Update names.
6047
31b2b07e
JD
60482006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
6049
6050 Add comparison operators for C++ location classes. Discussed at
6051 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
6052 * data/c++.m4 (b4_define_location_comparison): New boolean %define
6053 declaration indicating whether filename_type has an operator==. If
6054 filename_type is `std::string', it defaults to `1', `0' otherwise.
6055 * data/location.cc: Iff b4_define_location_comparison is `1', add
6056 operator== and operator!= for class position and for class location.
6057
6058 Some minor fixes.
6059 * src/scan-action.l: Remove unused file.
6060 * src/symtab.c (symbol_printer_set): Use printer_location not
6061 destructor_location.
6062 * src/symtab.h (struct symbol): Replace incorrect source comment for
6063 printer members.
6064 * tests/input.at (Incompatible Aliases): Update output with correct
6065 printer location.
6066
9bc0dd67
JD
60672006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
6068
6069 Don't put the pre-prologue in the header file. For the yacc.c code
6070 file and the glr.c header and code files, move the pre-prologue before
6071 the token definitions. Add new %before-definitions and
6072 %after-definitions to declare code that will go in both the header file
6073 and code file. Discussed at
6074 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
6075 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
6076 and
6077 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
6078 * NEWS (2.3+): Describe these changes.
6079 * data/glr.c (b4_pre_prologue): Move from within to before...
6080 (b4_shared_declarations): ... this.
6081 Add new b4_before_definitions before b4_token_enums.
6082 Add new b4_after_definitions at the end.
6083 * data/glr.cc (b4_pre_prologue): Replace with...
6084 (b4_before_definitions): ... this in the header file.
6085 (b4_after_definitions): New near the end of the header file.
6086 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
6087 code file right before including the header file.
6088 (b4_before_definitions): New in the previous position of
6089 b4_pre_prologue in the header file.
6090 (b4_after_definitions): New near the end of the header file.
6091 * data/yacc.c: Clean up some m4 quoting especially in the header file.
6092 (b4_token_enums_defines): In the code file, move to right before
6093 YYSTYPE for consistency with the header file.
6094 (b4_before_definitions): New right before b4_token_enums_defines in
6095 both the header and code file.
6096 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
6097 header and code file.
6098 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
6099 of prologues for %union dependencies.
91661ebb
JD
6100 (Decl Summary): In %defines description, mention the effect of
6101 %before-definitions and %after-definitions on the header file.
9bc0dd67
JD
6102 (Calc++ Parser): Forward declare driver in a %before-definitions rather
6103 than in the pre-prologue so that make check succeeds.
148d66d8 6104 (Table of Symbols): Add entries for %before-definitions and
9bc0dd67
JD
6105 %after-definitions.
6106 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
6107 %before-definitions.
6108 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
6109 (declaration): Parse those declarations and append to
6110 b4_before_definitions and b4_after_definitions, respectively.
6111 * src/reader.c (before_definitions, after_definitions): New bools to
6112 track whether those declarations have been seen.
6113 (prologue_augment): Add to the post-prologue if %union,
6114 %before-definitions, or %after-definitions has been seen.
6115 * src/reader.h (before_definitions, after_definitions): New extern's.
6116 * src/scan-gram.l: Scan the new declarations.
6117 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
6118 prologue block in a %before-definitions or a %after-definitions based
6119 on whether the %union is declared.
6120 * tests/regression.at (Early token definitions with --yacc, Early token
6121 definitions without --yacc): Move tests for token definitions into the
6122 post-prologue since token names are no longer defined in the
6123 pre-prologue.
6124
203b9274
AD
61252006-06-20 Akim Demaille <akim@epita.fr>
6126
6127 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
6128 (symbol_get): Use it.
6129 * src/parse-gram.y: Use it.
6130
a7ee59cf
JD
61312006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
6132
6133 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
6134 build succeeds when configured with --enable-gcc-warnings.
6135
5a2baae7
PE
61362006-06-19 Paul Eggert <eggert@cs.ucla.edu>
6137
33ad1a9c
PE
6138 * src/parse-gram.y (char_name): New function.
6139 (CHAR, STRING, string_content): For %printer, properly escape.
6140 (ID): Prefer fputs to fprintf.
6141 (id): Reindent to be consistent with other rules.
6142 Properly quote char.
6143
5a2baae7
PE
6144 The Translation Project changed its way of publishing translations
6145 to maintainers. I haven't received any responses to my request
6146 for supporting the old way, or for documenting the new way. I
6147 have modified 'bootstrap' to use screen scraping
6148 (in this case, HTML scraping). This is unreliable and inelegant,
6149 but I don't see any better way. Yuck.
6150 * bootstrap (TP_URL, WGET_COMMAND): New vars.
6151 (get_translations): New function, which uses HTML scraping to
6152 deduce locations of latest translations.
6153 Use this function to grab both bison and bison-runtime .po files.
6154 Don't bother priming the pump for the runtime-po domain any more,
6155 as it's now translated better than bison is.
6156
58d7a1a1
AD
61572006-06-19 Akim Demaille <akim@epita.fr>
6158
6159 * src/scan-gram.l: No longer "parse" things after `%union' until
6160 `{'. Rather, return a single "%union" token.
6161 No longer make symbols: return strings, and leave the conversion
6162 to symbols to the parser.
6163 (SC_PRE_CODE, token_type): Remove.
6164 * src/parse-gram.y (%union): New field `character'.
6165 Sort tokens.
6166 (CHAR): New token.
6167 (ID, ID_COLON): Now that the scanner no longer makes them
6168 identifiers, adjust all uses to invoke symbol_get.
6169 (id_colon): New, wraps the conversion from string to symbol.
6170 (%union): Accept a possible union_name.
6171 (symbol): Now can be a char.
6172 * data/c.m4 (b4_union_name): Leave a default value.
6173 * data/glr.c, data/yacc.c: Use it.
6174
b931235e
JD
61752006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
6176
6177 For associating token numbers with token names for "yacc.c", don't use
6178 #define statements unless `--yacc' is specified; always use enum
6179 yytokentype. Most important discussions start at:
6180 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
6181 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
6182 and
6183 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
6184 * NEWS (2.3+): Mention.
6185 * data/c.m4 (b4_yacc_if): New.
6186 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
6187 token #define's.
6188 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
6189 on token name definitions.
6190 * src/getargs.c (usage): Capitalize `Yacc' in English.
6191 * src/output.c (prepare): Define b4_yacc_flag.
6192 * tests/regression.at (Early token definitions): Test that tokens names
6193 are defined before the pre-prologue not just before the post-prologue.
6194 Remove this test case and copy to...
6195 (Early token definitions with --yacc): ... this to test #define's.
6196 (Early token definitions without --yacc): ... and this to test enums.
6197
9e6e7ed2
PE
61982006-06-11 Paul Eggert <eggert@cs.ucla.edu>
6199
6200 * NEWS: Reword the post-2.3 change to not be so optimistic about
6201 removing the old "look-ahead" spelling.
6202 Update previous look-ahead/lookahead change reports.
6203 * REFERENCES: look-ahead -> lookahead (since that's
6204 what he actually wrote).
6205 * doc/refcard.tex: look ahead -> lookahead,
6206 look-ahead -> lookahead
6207
742e4900
JD
62082006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
6209
6210 For consistency, use `lookahead' instead of `look-ahead' or
6211 `look_ahead'. Discussed starting at
6212 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
6213 and then at
6214 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
6215 * NEWS: For the next release, note the change to `--report'.
6216 * TODO, doc/bison.1: Update English.
6217 * doc/bison.texinfo: Update English.
6218 (Understanding Your Parser, Bison Options): Document as
6219 `--report=lookahead' rather than `--report=look-ahead'.
6220 * src/conflicts.c: Update English in comments.
6221 (lookahead_set): Rename from look_ahead_set.
6222 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
6223 (resolve_sr_conflict): Rename local look_ahead_tokens to
6224 lookahead_tokens, and update other uses.
6225 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
6226 count_rr_conflicts, conflicts_free): Update uses.
6227 * src/getargs.c (report_args): Move "lookahead" before alternate
6228 spellings.
6229 (report_types): Update uses.
6230 (usage): For `--report' usage description, state `lookahead' spelling
6231 rather than `look-ahead'.
6232 * src/getargs.h (report.report_lookahead_tokens): Rename from
6233 report_look_ahead_tokens.
6234 * src/lalr.c: Update English in comments.
6235 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
6236 (state_lookahead_tokens_count): Rename from
6237 state_look_ahead_tokens_count.
6238 Rename local n_look_ahead_tokens to n_lookahead_tokens.
6239 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
6240 Rename local n_look_ahead_tokens to n_lookahead_tokens.
6241 Update other uses.
6242 Update English in output.
6243 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
6244 * src/print.c: Update English in comments.
6245 (lookahead_set): Rename from look_ahead_set.
6246 (print_reduction): Rename argument lookahead_token from
6247 look_ahead_token.
6248 (print_core, state_default_rule, print_reductions, print_results):
6249 Update uses.
6250 * src/print_graph.c: Update English in comments.
6251 (print_core): Update uses.
6252 * src/state.c: Update English in comments.
6253 (reductions_new): Update uses.
6254 (state_rule_lookahead_tokens_print): Rename from
6255 state_rule_look_ahead_tokens_print, and update other uses.
6256 * src/state.h: Update English in comments.
6257 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
6258 (state_rule_lookahead_tokens_print): Rename from
6259 state_rule_look_ahead_tokens_print.
6260 * src/tables.c: Update English in comments.
6261 (conflict_row, action_row): Update uses.
6262 * tests/glr-regression.at
6263 (Incorrect lookahead during deterministic GLR,
6264 Incorrect lookahead during nondeterministic GLR): Rename
6265 print_look_ahead to print_lookahead.
6266 * tests/torture.at: Update English in comments.
6267 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
6268 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
6269 (Many lookahead tokens): Update uses.
6270 * data/glr.c: Update English in comments.
6271 * lalr1.cc: Likewise.
6272 * yacc.c: Likewise.
6273 * src/conflicts.h: Likewise.
6274 * src/lalr.h: Likewise.
6275 * src/main.c: Likewise.
6276 * src/output.c: Likewise.
6277 * src/parse-gram.c: Likewise.
6278 * src/tables.h: Likewise.
6279 * tests/calc.at: Likewise.
6280
3c40d0b5
JD
62812006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
6282
6283 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
6284
5d278082
PE
62852006-06-07 Paul Eggert <eggert@cs.ucla.edu>
6286
6287 * TODO: Add request from Nelson H. F. Beebe to be able to install
6288 Bison without installing the yacc script.
6289
9e668899
JD
62902006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
6291
6292 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
6293 and yytext if they're already #define'd.
6294 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
6295 * src/scan-code-c.c: ... here.
6296 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
6297 <config.h>.
6298
0c8e079f
JD
62992006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
6300
6301 Get Bison to build again when configured with --enable-gcc-warnings.
6302 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
6303 missing #include's.
6304 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
6305 loc argument as it shadows a global.
6306 * src/scan-gram.l: Remove stray comma that prevents boundary_set
6307 invocation.
6308
6309 * src/.cvsignore: Add scan-code.c.
6310
2346344a
AD
63112006-06-07 Akim Demaille <akim@epita.fr>
6312
6313 * src/scan-gram.l: Move the "add a trailing ; to actions" code
6314 to...
6315 * src/scan-code.l: here.
6316 * tests/input.at (Torturing the Scanner): Fix another location
6317 error.
6318
4862bdfd
AD
63192006-06-07 Akim Demaille <akim@epita.fr>
6320
6321 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
6322
e9071366
AD
63232006-06-06 Akim Demaille <akim@epita.fr>
6324
6325 Extract the parsing of user actions from the grammar scanner.
6326 As a consequence, the relation between the grammar scanner and
6327 parser is much simpler. We can also split "composite tokens" back
6328 into simple tokens.
6329 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
6330 * src/scan-gram.l (add_column_width, adjust_location): Move to and
6331 rename as...
6332 * src/location.h, src/location.c (add_column_width)
6333 (location_compute): these.
6334 Fix the column count: the initial column is 0.
6335 (location_print): Be robust to ending column being 0.
6336 * src/location.h (boundary_set): New.
6337 * src/main.c: Adjust to scanner_free being renamed as
6338 gram_scanner_free.
6339 * src/output.c: Include scan-code.h.
6340 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
6341 Use boundary_set.
6342 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
6343 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
6344 which is now, again, a separate token.
6345 Adjust all dependencies.
6346 Whereever actions with $ and @ are used, use translate_code.
6347 (action): Remove this nonterminal which is now useless.
6348 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
6349 (grammar_current_rule_action_append): Use translate_code.
6350 (packgram): Bound check ruleno, itemno, and rule_length.
6351 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
6352 (last_string, last_braced_code_loc, max_left_semantic_context)
6353 (scanner_initialize, scanner_free, scanner_last_string_free)
6354 (gram_out, gram_lineno, YY_DECL_): Move to...
6355 * src/scan-gram.h: this new file.
6356 (YY_DECL): Rename as...
6357 (GRAM_DECL): this.
6358 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
6359 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
6360 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
6361 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
6362 Move these declarations, and...
6363 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
6364 these to...
6365 * src/flex-scanner.h: this new file.
6366 * src/scan-gram.l (rule_length, rule_length_overflow)
6367 (increment_rule_length): Remove.
6368 (last_braced_code_loc): Rename as...
6369 (gram_last_braced_code_loc): this.
6370 Adjust to the changes of the parser.
6371 Move all the handling of $ and @ into...
6372 * src/scan-code.l: here.
6373 * src/scan-gram.l (handle_dollar, handle_at): Remove.
6374 (handle_action_dollar, handle_action_at): Move to...
6375 * src/scan-code.l: here.
6376 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
6377 scan-code.h, scan-code-c.c, scan-gram.h.
6378 (EXTRA_bison_SOURCES): Add scan-code.l.
6379 (BUILT_SOURCES): Add scan-code.c.
6380 (yacc): Be robust to white spaces.
6381
6382 * tests/conflicts.at, tests/input.at, tests/reduce.at,
6383 * tests/regression.at: Adjust the column numbers.
6384 * tests/regression.at: Adjust the error message.
7891a7c4 6385
184e42f0
JD
63862006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
6387
6388 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
6389 Use Akim's wording from
6390 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
6391
7891a7c4
JD
63922006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
6393
6394 Between Bison releases, manually append `+' to the previous Bison
6395 release number, and use that as a signal to automatically print the
6396 ChangeLog's CVS Id keyword from --version. Discussed starting at
6397 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
6398 * ChangeLog: Add Id header.
6399 * configure.ac (AC_INIT): Append `+' to `2.3'.
6400 * src/.cvsignore: Add revision.c.
6401 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
6402 (BUILT_SOURCES): Add revision.c.
6403 (revision.c): New target rule. This file defines a new global variable
6404 named revision. It initializes it with either the Id from ChangeLog
6405 or, if VERSION doesn't contain `+', with the empty string.
6406 * src/getargs.c (version): Print the value of revision.
6407 * src/revision.h: Extern revision.
6408
4ad3ed84
PE
64092006-06-05 Paul Eggert <eggert@cs.ucla.edu>
6410
6411 * NEWS: Version 2.3.
6412 * configure.ac (AC_INIT): Likewise.
6413
02103984
PE
64142006-05-30 Paul Eggert <eggert@cs.ucla.edu>
6415
6416 * data/glr.c (YYRECOVERING): Define to be a function-like macro
6417 with no arguments, not as an object-like macro. This is for
6418 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
6419 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
6420 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
6421 Document this.
6422
2c08afa5
JD
64232006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
6424
6425 * src/getargs.c (usage): Back out yesterday's modification of the
6426 --help output so that we don't have to wait for translation before
6427 releasing 2.3.
6428
6077da58
PE
64292006-05-29 Paul Eggert <eggert@cs.ucla.edu>
6430
6431 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
6432 Problem reported by Akim Demaille.
6433
2a26b6c2
JD
64342006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
6435
6436 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
6437
aefef0d6
PE
64382006-05-26 Paul Eggert <eggert@cs.ucla.edu>
6439
6440 * data/yacc.c (yy_reduce_print): Omit trailing white space in
6441 generated source code. Problem reported by Frans Englich in
6442 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
6443
fcd8e201
PE
64442006-05-22 Paul Eggert <eggert@cs.ucla.edu>
6445
6446 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
6447 shell, not within 'make', so that 'make' by an ordinary builder
6448 (using GNU make) does not worry about configuring gzip. This also
6449 works around a bug reported independently by Keith Thompson and by
6450 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
6451 stderr rather than stdout, messing up the build logs.
6452
7b5cdcbd
JD
64532006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
6454
6455 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
6456 to make sure that YYID will never be unused. This fixes a 'make
6457 maintainer-check' failure caused by the recent changes to the 'Trivial
6458 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
6459 not used.
6460 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
6461
5ad0a449
JD
64622006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
6463
6464 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
6465 state before an empty RHS is always resolved here. Only the location
6466 of that state is guaranteed to be resolved, and that's enough. This
6467 fixes the remaining bug reported by Derek M. Jones in
6468 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
6469 * tests/glr-regression.at (Uninitialized location when reporting
6470 ambiguity): Test the above case.
6471 Also, the embedded comments in this test case claim it checks the case
6472 of an empty RHS that has inherited the initial location. However, the
6473 corresponding LHS was already resolved, so yyresolveLocations didn't
6474 actually have reason to modify it. Fix this by forcing
6475 nondeterministic operation at the beginning of the parse.
6476
50cce58e
PE
64772006-05-20 Paul Eggert <eggert@cs.ucla.edu>
6478
6479 * data/c.m4 (b4_yy_symbol_print_generate):
6480 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
6481 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
6482 of the bugs reported today by Derek M Jones in
6483 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
6484 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
6485 defined to be a type name without parens or brackets.
6486 (Location Type): Similarly for YYLTYPE.
6487 * tests/regression.at (Trivial grammars): Put in a test for this
6488 bug that will be caught by 'make maintainer-check' (though not,
6489 alas, by 'make check' unless your compiler is picky).
6490
ab8d9dc5
PE
64912006-05-19 Paul Eggert <eggert@cs.ucla.edu>
6492
0d2c8934 6493 * NEWS: Version 2.2.
ab8d9dc5
PE
6494 * configure.ac (AC_INIT): Likewise.
6495
9138c575
JD
64962006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
6497
6498 * data/glr.c (yyreportTree): Make room in yystates for the state
6499 preceding the RHS. This fixes the segmentation fault reported by Derek
6500 M. Jones in
6501 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
6502 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
6503 to the user. Reported for yyreportTree by Derek M. Jones later in the
6504 same thread.
6505 * THANKS: Add Derek M. Jones.
6506 Update my email address.
6507 Fix typo in Steve Murphy's name.
6508
276f48df
PE
65092006-05-14 Paul Eggert <eggert@cs.ucla.edu>
6510
d6645148
PE
6511 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
6512 checking against YYLAST that caused the parser to miss a potential
6513 alternative in its diagnostic.
6514 Problem reported by Maria Jose Moron Fernandez in
6515 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
6516 * data/lalr1.cc (yysyntax_error_): Likewise.
6517 * data/yacc.c (yysyntax_error): Likewise.
6518 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
6519 tokens, in case we run into an older C compiler.
6520 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
6521 Use them to check for the off-by-one error fixed above.
6522
276f48df
PE
6523 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
6524 YYSIZE_T, not size_t.
6525 * tests/regression.at (Trivial grammars): New test, to catch
6526 the error fixed by the above patch.
6527
cd8b5791
AD
65282006-05-14 Akim Demaille <akim@lrde.epita.fr>
6529
6530 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
6531 scheme.
6532 Reported by Steve Murphy.
6533
34376418
AD
65342006-05-14 Akim Demaille <akim@lrde.epita.fr>
6535
6536 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
6537 * data/glr.cc: b4_location_flag is now b4_locations_flag.
6538
327afc7c
AD
65392006-05-14 Akim Demaille <akim@lrde.epita.fr>
6540
6541 Implement --trace=m4.
6542 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
6543 * src/output.c (output_skeleton): When set, pass -dV to m4.
6544
6545 Factor the handling of flags in m4.
6546 * src/output.c (prepare): Rename the muscle names debug, defines,
6547 error_verbose to debug_flag, defines_flag, error_verbose_flag.
6548 * data/c.m4: Adjust.
6549 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
6550 Use b4_define_flag_if to define other b4_FLAG_if macros.
6551 (b4_location_if): As a consequence, rename as...
6552 (b4_locations_if): this, for consistency.
6553 Adjust all the skeletons.
6554
ba9ecd19
AD
65552006-05-14 Akim Demaille <akim@lrde.epita.fr>
6556
6557 * etc/bench.pm: Shorten bench names.
6558
4e83ea15
AD
65592006-05-14 Akim Demaille <akim@lrde.epita.fr>
6560
6561 * src/output.h, src/output.c (error_verbose): Move to...
6562 * src/getargs.h, src/getargs.c: here.
6563 Sort the flags.
6564 Adjust dependencies.
6565
6e93d810
PE
65662006-05-13 Paul Eggert <eggert@cs.ucla.edu>
6567
6568 * data/c.m4 (b4_copyright): Put the special exception for Bison
6569 skeletons here, so we don't have to put it in each skeleton. All
b15296ff
PE
6570 uses changed. Suggested by Akim Demaille. Also, wrap the
6571 copyright notice, in case it is longer than 80 columns. Replace
6572 comma by newline after title.
6e93d810 6573
eaea13f5
PE
65742006-05-11 Paul Eggert <eggert@cs.ucla.edu>
6575
6576 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
6577 incompatibility, not a bug. Mention that it wasn't fixed as of
6578 flex 2.5.33.
6579
3cf084ec
AD
65802006-05-11 Akim Demaille <akim@lrde.epita.fr>
6581
6582 * examples/extexi: Enforce the precedence of concatenation over
6583 >>.
0a9f1c7d 6584 Reported by Tommy Nordgren.
3cf084ec 6585
32c96bd7
AD
65862006-05-11 Akim Demaille <akim@lrde.epita.fr>
6587
6588 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
6589 with the member "token".
f94705b2 6590 Reported by Martin Nylin.
32c96bd7 6591
eaea13f5
PE
65922006-05-08 Paul Eggert <eggert@cs.ucla.edu>
6593
6594 * data/glr.c: Switch to Bison 2.2 special-exception language in
6595 the copyright notice. Use more-regular format for titles and
6596 copyright notices.
6597 * data/glr.cc: Likewise.
6598 * data/location.cc: Likewise.
6599 * data/yacc.cc: Likewise.
6600 * doc/bison.texinfo (Conditions): Document this.
6601 * NEWS: likewise. Upgrade version to 2.2.
6602
6e2d1146
AD
66032006-04-27 Akim Demaille <akim@lrde.epita.fr>
6604
6605 * data/glr.cc: Remove dead code.
6606
47671055
PE
66072006-04-25 Paul Eggert <eggert@cs.ucla.edu>
6608
6609 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
6610 that variable and the line breaks the bootstrap. Problem reported
6611 by Juan M. Guerrero.
6612
ed2e6384
AD
66132006-04-24 Akim Demaille <akim@lrde.epita.fr>
6614
6615 * doc/bison.texinfo (Multiple start-symbols): New.
6616
3cedc2dc
AD
66172006-04-24 Akim Demaille <akim@lrde.epita.fr>
6618
6619 * etc/README, etc/bench.pl: New.
6620
b2ddc3f3
AD
66212006-04-03 Akim Demaille <akim@lrde.epita.fr>
6622
6623 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
6624 rule.
6625 Reported by Mickael Labau.
6626 * tests/input.at (Torturing the Scanner): Test it.
6627
91e3ac9a
PE
66282006-03-16 Paul Eggert <eggert@cs.ucla.edu>
6629
6630 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
6631 Problem reported by Bob Rossi.
6632
66332006-03-13 Paul Eggert <eggert@cs.ucla.edu>
6634
6635 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
6636 and didn't really work.
6637 For the index, use @ifnotinfo, not @iftex.
6638 Minor cleanups of spacing and terminology.
6639
5cf61e93
AD
66402006-03-12 Akim Demaille <akim@lrde.epita.fr>
6641
6642 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
6643 of AT_NAME_PREFIX when %name-prefix is not used.
6644
aa08666d
AD
66452006-03-12 Akim Demaille <akim@lrde.epita.fr>
6646
6647 Apply --prefix to C++ skeletons too: they change the namespace.
6648 The test suite already exercize these cases.
6649 * data/c++.m4 (b4_namespace): New.
6650 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
6651 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
6652 * data/yacc.c, data/glr.c: Remove a useless `[]'.
6653 * doc/bison.texinfo: Document it.
6654 (Option Cross Key): Use @multitable in all formats. It looks
6655 nicer, even in TeX outputs.
6656 (Rules): Use the same code whatever the output type is.
6657 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
6658 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
6659 * tests/calc.at: Use it, instead of hard coding `yy'.
91e3ac9a 6660
45567173
AD
66612006-03-10 Akim Demaille <akim@lrde.epita.fr>
6662
6663 * TODO: Remove dead items.
6664
e9d8f881 66652006-03-10 Akim Demaille <akim@lrde.epita.fr>
55ba27be
AD
6666
6667 * doc/FAQ: Remove, merged into...
6668 * doc/bison.texinfo (FAQ): this.
6669 * doc/Makefile.am (EXTRA_DIST): Adjust.
6670
c095d689
AD
66712006-03-10 Akim Demaille <akim@lrde.epita.fr>
6672
6673 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
6674 even if empty.
6675 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
6676 * doc/bison.texinfo (Calc++ Scanner): Use it.
6677
6e0f8287
PE
66782006-03-09 Paul Eggert <eggert@cs.ucla.edu>
6679
6680 Fix two nits reported by twlevo, plus one more that I discovered.
6681
6682 * src/assoc.h (assoc_to_string): Give a name to the arg, as
6683 this is the usual Bison style.
6684 * src/location.h (location_print): Likewise.
6685
6686 * src/reader.h (token_name): Likewise.
6687
d6b771c3
PE
66882006-03-08 Paul Eggert <eggert@cs.ucla.edu>
6689
6690 Fix some nits reported by twlevo.
6691 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
6692 and "POSIX". Use more-modern syntax for URLs. Mention C++
6693 and ask for Java. Don't hardwire OS version numbers. Add
6694 copyright notice.
6695 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
6696 * src/conflicts.c (solved_conflicts_obstack): Now static.
6697
1e137b71
JD
66982006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
6699
6700 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
6701 page. Say "you can use it" not "you may use it" as on the web page;
6702 we're describing capabilities not granting permission.
6703
73f2e47e
PE
67042006-03-06 Paul Eggert <eggert@cs.ucla.edu>
6705
6d05403d
PE
6706 * data/glr.c (yyresolveLocations): Rename local variables to avoid
6707 shadowing warnings. Use usual patter for iterating through RHS.
6708 * tests/glr-regression.at
6709 (Uninitialized location when reporting ambiguity):
6710 Modify yylex so that it uses its argument, rather than trying
6711 to rely on ARGSUSED (which doesn't work for gcc with warnings).
6712 const char -> char const.
6713
73f2e47e
PE
6714 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
6715 Don't use tabs inside commands; it messes up 'ps'.
6716 Problem reported by twlevo.
6717
8710fc41
JD
67182006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
6719
6720 * tests/glr-regression.at (Uninitialized location when reporting
6721 ambiguity): New test case.
6722 * data/glr.c (yyresolveLocations): New function, which uses
6723 YYLLOC_DEFAULT.
6724 (yyresolveValue): Invoke yyresolveLocations before reporting an
6725 ambiguity.
6726 * doc/bison.texinfo (Default Action for Locations): Note
6727 YYLLOC_DEFAULT's usage for ambiguity locations.
6728 (GLR Semantic Actions): Cross-reference those notes.
6729
ae952af2
JD
67302006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
6731
6732 * tests/glr-regression.at (Leaked semantic values when reporting
6733 ambiguity): Remove unnecessary union and type declarations.
6734 (Leaked lookahead after nondeterministic parse syntax error): New test
6735 case.
6736 * data/glr.c (yyparse): Check for zero stacks remaining before
6737 attempting to shift the lookahead so that you don't lose it.
6738
35ee866a
JD
67392006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
6740
6741 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
6742 * tests/glr-regression.at (Leaked semantic values when reporting
6743 ambiguity): New test case.
6744 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
6745 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
6746 now unnecessary yystackp parameter.
6747 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
6748 destructors can be called.
6749
6750 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
6751 in existing testcases.
6752
520181ab
JD
67532006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
6754
6755 Don't leak semantic values for parent RHS when a user action cuts the
6756 parser, and clean up related code a bit.
6757 * tests/glr-regression.at (Leaked merged semantic value if user action
35ee866a
JD
6758 cuts parse): Rename to...
6759 (Leaked semantic values if user action cuts parse): ... this. Add check
520181ab
JD
6760 for leaked parent RHS values.
6761 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
6762 between an unresolved state (non-empty chain of semantic options) and
6763 an incomplete one (signaled by an empty chain).
ae952af2 6764 (yyresolveStates): Document the interface. Move all manipulation of a
520181ab
JD
6765 successfully or unsuccessfully resolved yyGLRState to...
6766 (yyresolveValue): ... here so that yyresolveValue always leaves a
6767 yyGLRState with consistent data and thus is easier to understand.
6768 Remove the yyvalp and yylocp parameters since they are always just
6769 taken from the yys parameter. When reporting a discarded merged value
6770 in debugging output, note that it is incompletely merged. Document the
6771 interface.
6772 (yyresolveAction): If resolving any of the RHS states fails, destroy
6773 them all rather than leaking them. Thus, as long as user actions are
6774 written to clean up the RHS correctly, yyresolveAction always cleans up
6775 the RHS of a semantic option. Document the interface.
6776
18d9185c
PE
67772006-02-27 Paul Eggert <eggert@cs.ucla.edu>
6778
6779 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
6780 led to a segmentation fault in GNU Pascal. Problem reported
6781 by Waldek Hebisch.
6782
841a7737
JD
67832006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
6784
6785 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
6786 mid-rule action inside a nonterminal symbol in order to declare a
6787 destructor for its semantic value.
6788
fc3f467f
PE
67892006-02-16 Paul Eggert <eggert@cs.ucla.edu>
6790
6791 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
6792 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
6793 __cplusplus && ! defined _STDLIB_H && !
6794 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
6795 defined free))]: Include <stdlib.h> rather than rolling our own
6796 declarations of malloc and free, to avoid problems with
6797 incompatible declarations (using 'throw') C++'s stdlib.h. This
6798 should fix Debian bug 340012
6799 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
6800 reported by Guillaume Melquiond.
6801
a3af26dd
PE
68022006-02-13 Paul Eggert <eggert@cs.ucla.edu>
6803
4d7bc38c
PE
6804 * NEWS: Clarify symbols versus types in unused-value warnings.
6805
a3af26dd
PE
6806 * configure.ac (AC_INIT): Bump version number.
6807
4e26c69e
PE
68082006-02-13 Paul Eggert <eggert@cs.ucla.edu>
6809
6810 * NEWS: Version 2.1a.
6811 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
6812 since C99 requires this.
6813
498e897c
PE
68142006-02-11 Paul Eggert <eggert@cs.ucla.edu>
6815
6816 * m4/c-working.m4: New file.
6817 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
6818
57bb17ca
PE
68192006-02-10 Paul Eggert <eggert@cs.ucla.edu>
6820
6821 * Makefile.maint: Merge from coreutils.
6822
0be105dc
PE
68232006-02-09 Paul Eggert <eggert@cs.ucla.edu>
6824
6825 More portability fixes for problems summarized by Nelson H. F. Beebe.
6826
6827 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
6828 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
6829 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
6830 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
6831 messes up because C++ code is compiled in 32-bit mode but linked
6832 in 64-bit mode.
6833
6fc0c024
PE
68342006-02-08 Paul Eggert <eggert@cs.ucla.edu>
6835
6836 More portability fixes for problems summarized by Nelson H. F. Beebe.
6837
7870f699
PE
6838 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
6839 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
6840
6fc0c024
PE
6841 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
6842 nodist_PROGRAMS, since we don't need to actually compile the
6843 example if we're just doing a plain 'make'. This avoids bothering
6844 the installer unnecessarily about problems due to weird C++
6845 compilers.
6846
fe6c2fde
PE
68472006-02-06 Paul Eggert <eggert@cs.ucla.edu>
6848
6849 More portability fixes for problems summarized by Nelson H. F. Beebe.
6850
6851 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
6852 than #include "...", and compile with -I'.'. The old method was
6853 not portable, according to Posix and the C standard, and it does
6854 not work with Sun C 5.7, where previous #line directives affect
6855 the working directory used in later #include "..." directives.
6856
927b425b
JMG
68572006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6858
6859 Various DJGGP specific issues in /djgpp
6860
d9735e9e
PE
68612006-02-02 Paul Eggert <eggert@cs.ucla.edu>
6862
6863 More portability fixes for problems summarized by Nelson H. F. Beebe.
6864
6865 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
6866 '#include <map>' works and that you can apply ++ to iterators.
6867
5a6755af
PE
68682006-02-01 Paul Eggert <eggert@cs.ucla.edu>
6869
67a0dc4f
PE
6870 Work around portability problems summarized by Nelson H. F. Beebe in
6871 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
6872
8c86f0ef
PE
6873 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
6874 that '#include <string>' works.
6875
de35dd59
PE
6876 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
6877 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
6878 "warning: sorry: semantics of inline function static data `const
6879 unsigned char translate_table[262]' are wrong (you'll wind up with
6880 multiple copies)".
6881
67a0dc4f
PE
6882 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
6883 or, xor to not_, and_, or_, and xor_, respectively. This works
6884 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
6885 random system header somewhere that includes the equivalent of
6886 <iso646.h>.
6887
5a6755af
PE
6888 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
6889 -E" works; it apparently doesn't work with PathScale EKO Compiler
67a0dc4f 6890 Suite Version 2.0.
5a6755af 6891
3f001415
JD
68922006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
6893
6894 During deterministic GLR operation, user actions should be able to
6895 influence the parse by changing yychar. To make this easier to fix and
6896 to make glr.c easier to evolve in general, don't maintain yytoken in
6897 parallel with yychar; just compute yytoken when needed.
6898 * tests/glr-regression.at (Incorrect lookahead during deterministic
6899 GLR): Check that setting yychar in a user action has the intended
6900 effect.
6901 * data/glr.c (yyGLRStack): Remove yytokenp member.
6902 (yyclearin): Don't set *yytokenp.
6903 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
6904 yychar rather than *yytokenp to determine the current lookahead.
6905 Compute yytoken locally when needed.
6906 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
6907 point to.
6908
6909 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
6910 after `--report' documentation.
6911
e2a8c0f5
PE
69122006-01-30 Paul Eggert <eggert@cs.ucla.edu>
6913
6914 * src/parse-gram.y (grammar_declaration): Location of printer
6915 symbol is @1, not list->location. Bug reported by twlevo.
6916 * tests/input.at (Incompatible Aliases): Adjust to above change.
6917
6b702268
PE
69182006-01-29 Paul Eggert <eggert@cs.ucla.edu>
6919
27622431
PE
6920 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
6921 all the test at once. This makes the output easier to read in the
6922 normal case.
6923
6b702268
PE
6924 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
6925 got from <http://bro-ids.org/download.html>. The bug is that
6926 when two actions appeared in succession, the second one was
6927 scanned before the first one was added to the grammar rule
6928 as a midrule action. Bison then output the incorrect warning
6929 "parse.y:905.17-906.36: warning: unused value: $3".
6930 * src/parse-gram.y (BRACED_CODE, action): These are no longer
6931 associated with a value.
6932 (rhs): Don't invoke grammar_current_rule_action_append.
6933 (action): Invoke it here instead.
6934 * src/reader.c (grammar_midrule_action): Now extern.
6935 (grammar_current_rule_action_append): Don't invoke
6936 grammar_midrule_action; that is now the scanner's job.
6937 * src/reader.h (last_string, last_braced_code_loc):
6938 (grammar_midrule_action): New decls.
6939 * src/scan-gram.l (last_string): Now extern, sigh.
6940 (last_braced_code_loc): New extern variable.
6941 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
6942 rule already has an action.
6943 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
6944 * tests/input.at (AT_CHECK_UNUSED_VALUES):
6945 Add some tests to check that the above changes fixed the bug.
6946
d40ba6c2
PE
69472006-01-27 Paul Eggert <eggert@cs.ucla.edu>
6948
6949 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
6950 All used changed. Check whether the symbol has a destructor,
6951 not whether it is typed.
6952 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
6953 that the values are still reported as unused. All line numbers
6954 adjusted.
6955
401aace6
PE
69562006-01-23 Paul Eggert <eggert@cs.ucla.edu>
6957
6958 Work around a bug in bro 0.8, which underparenthesizes its
6959 definition of YYLLOC_DEFAULT.
6960 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
6961 their arguments.
6962 * data/lalr1.cc: Likewise.
6963 * data/yacc.cc: Likewise.
6964
06f01bc4
PE
69652006-01-22 Paul Eggert <eggert@cs.ucla.edu>
6966
401aace6
PE
6967 Work around a bug in Pike 7.0, and give the Pike folks a
6968 better way to override the usual int widths.
6969 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
6970 user can override the types.
6971 (short): #undef, to work around a bug in Pike 7.0.
6972 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
6973 (union yyalloc.yyss): Use yytype_int16 rather than short.
6974 All uses changed.
6975 (yysigned_char): Remove.
6976 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
6977 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
6978 * tests/regression.at (Web2c Actions): Adjust to above changes.
6979
6980 * src/reader.c (check_and_convert_grammar): New function.
6981 (reader): Close the input file even if something went wrong during
6982 parsing. Minor file descriptor leak reported by twlevo.
6983
06f01bc4
PE
6984 * src/assoc.c (assoc_to_string): Use a default: abort (); case
6985 to pacify gcc -Wswitch-default.
6986 * src/scan-gram.l (adjust_location): Use a default: break; case
6987 to pacify gcc -Wswitch-default.
6988 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
6989 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
6990 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
6991 Move these decls to scan-skel.l, since they don't need to be
6992 visible elsewhere.
6993 * src/scan-skel.l: Accept the above decls.
6994 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
6995 is used.
6996
02650b7f
PE
69972006-01-21 Paul Eggert <eggert@cs.ucla.edu>
6998
6999 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
7000 since we don't want to insist on a version number at the start
7001 of the changelog every time.
7002 * Makefile.maint: Sync from coreutils a bit better.
7003 (sc_trailing_blank): Renamed from sc_trailing_space.
7004 All uses changed.
7005 (sc_no_if_have_config_h, sc_require_config_h):
7006 (sc_prohibit_assert_without_use): New rules.
7007 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
7008 (sc_dd_max_sym_length): Fix leading spaces in rule.
7009 (sc_system_h_headers): Prefix with @.
7010 (sc_useless_cpp_parens, m4-check): Output line numbers.
7011 (changelog-check): Allow version only in head.
7012 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
7013 satisfy new Makefile.maint rule.
7014 * data/glr.c: Likewise.
7015 * data/glr.cc: Likewise.
7016 * data/lalr1.cc: Likewise.
7017 * data/yacc.c: Likewise.
7018 * lib/ebitsetv.c: Likewise.
7019 * lib/lbitset.c: Likewise.
7020 * lib/subpipe.c: Likewise.
7021 * lib/timevar.c: Likewise.
7022 * src/system.h: Likewise.
7023 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
7024 * djgpp/Makefile.maint: Add copyright notice.
7025 * djgpp/README.in: Likewise.
7026 * djgpp/config.bat: Likewise.
7027 * djgpp/config.site: Likewise.
7028 * djgpp/config_h.sed: Likewise.
7029 * djgpp/djunpack.bat: Likewise.
7030 * djgpp/config.sed: Fix copyright notice to match standard format.
7031 * djgpp/subpipe.h: Likewise.
7032 * lib/bitsetv-print.c: Likewise.
7033 * lib/bitsetv.c: Likewise.
7034 * lib/subpipe.h: Likewise.
7035 * lib/timevar.c: Likewise.
7036 * lib/timevar.h: Likewise.
7037 * djgpp/subpipe.c: Use standard recipe for config.h.
7038 * lib/abitset.c: Likewise.
7039 * lib/bitset.c: Likewise.
7040 * lib/bitset_stats.c: Likewise.
7041 * lib/bitsetv-print.c: Likewise.
7042 * lib/bitsetv.c: Likewise.
7043 * lib/ebitsetv.c: Likewise.
7044 * lib/get-errno.c: Likewise.
7045 * lib/lbitset.c: Likewise.
7046 * lib/subpipe.c: Likewise.
7047 * lib/timevar.c: Likewise.
7048 * lib/vbitset.c: Likewise.
7049 * tests/local.at: Likewise.
7050 * src/scan-gram.l: Don't include verify.h, since system.h does
7051 that for us.
7052 * .x-sc_require_config_h: New file.
7053 * .x-sc_unmarked_diagnostics: New file.
7054
287c78f6
PE
70552006-01-20 Paul Eggert <eggert@cs.ucla.edu>
7056
287c78f6
PE
7057 Be a bit more systematic about using 'abort'.
7058 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
7059 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
7060 Put 'default: abort ();' before some other case, to satisfy older
7061 pedantic compilers.
7062 * lib/bitset_stats.c (bitset_stats_init): Likewise.
7063 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
7064 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
7065 * src/conflicts.c (resolve_sr_conflict): Likewise.
68cae94e
PE
7066 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
7067 (get_decision_str, get_orientation_str, get_node_alignment_str):
7068 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
7069 (get_linestyle_str, get_arrowstyle_str): Likewise.
7070 * src/conflicts.c (resolve_sr_conflict):
7071 Use a default case rather than one for the one remaining enum
7072 value, to catch invalid enum values as well.
7073 * src/lalr.c (set_goto_map, map_goto):
7074 Prefer "assert (FOO);" to "if (!FOO) abort ();".
7075 * src/nullable.c (nullable_compute, token_definitions_output):
7076 Likewise.
7077 * src/reader.c (packgram, reader): Likewise.
7078 * src/state.c (transitions_to, state_new, state_reduction_find):
7079 Likewise.
7080 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
7081 (symbol_pack): Likewise.
7082 * src/tables.c (conflict_row, pack_vector): Likewise.
287c78f6
PE
7083 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
7084 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
68cae94e
PE
7085 * src/system.h: Don't include <assert.h>.
7086 (assert): New macro.
7087
7088 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
7089 (Destructor Decl, Parser Function, Pure Calling):
7090 Describe rules for braces inside C code more carefully.
287c78f6 7091
c66dfadd
PE
70922006-01-19 Paul Eggert <eggert@cs.ucla.edu>
7093
c21493b8
PE
7094 Fix some porting glitches found by Nelson H. F. Beebe.
7095 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
7096 compilers that don't understand that abort () does not return.
7097 * src/state.c (transitions_to): Likewise.
7098 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
7099 that '#include <cstdlib>' works.
7100 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
7101 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
7102 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
7103 for the benefit of some pre-C99 compilers.
7104
b6e3facf
PE
7105 * bootstrap: Undo changes to gnulib files that autoreconf made.
7106
c66dfadd
PE
7107 Minor fixups to get 'make maintainer-check' to work.
7108 * configure.ac: Don't use -Wnested-externs, as it's incompatible
7109 with the new verify.h implementation.
7110 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
7111 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
7112 * data/yacc.c (YYUSE): Likewise.
7113 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
7114 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
7115 * src/parse-gram.y (declaration): Don't pass a string constant
7116 to a function that expects char *, since GCC might complain
7117 about the constant value.
7118 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
7119 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
7120 before #defining them.
7121 * tests/glr-regression.at
7122 (Incorrectly initialized location for empty right-hand side in GLR):
7123 In yyerror, use the msg arg.
7124 (Corrupted semantic options if user action cuts parse):
7125 (Incorrect lookahead during deterministic GLR):
7126 (Incorrect lookahead during nondeterministic GLR):
7127 Don't name a local var 'index'; it shadows string.h's 'index'.
7128
ed94ef2a
AD
71292006-01-19 Akim Demaille <akim@epita.fr>
7130
7131 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
7132 location, not just parts of it.
7133
e9ad4aec
PE
71342006-01-18 Paul Eggert <eggert@cs.ucla.edu>
7135
d6ca7905
PE
7136 * NEWS: Document the fact that multiple %unions are now allowed.
7137 * doc/bison.texinfo (Union Decl): Likewise.
51cbef6f
PE
7138 * TODO: This feature is now implemented, so remove it from
7139 the wishlist.
d6ca7905 7140
ef1b70e0
PE
7141 * Makefile.maint: Merge with coreutils Makefile.maint.
7142 (CVS_LIST): Use build-aux version if available.
7143 (VERSION_REGEXP): New macro.
7144 (syntax-check-rules): Add sc_no_if_have_config_h,
7145 sc_prohibit_assert_without_use, sc_require_config_h,
7146 sc_useless_cpp_parens.
7147 (sc_obsolete_symbols): Check for O_NDELAY.
7148 (sc_dd_max_sym_length): Track coreutils.
7149 (sc_unmarked_diagnostics): Look in all files, not just *.c.
7150 (sc_useless_cpp_parens): New rule.
7151 (news-date-check): Look for version or today's date.
7152 (changelog-check): Don't require version number near head.
7153 (copyright-check): Use current year instead of hardwiring 2005.
7154 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
7155 (announcement): Add --gpg-key-ID.
7156
7157 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
7158 with "file system".
7159
2073ce56 7160 Avoid undefined behavior that addressed just before the start of an
e9ad4aec
PE
7161 array. Problem reported by twlevo.
7162 * src/reader.c (packgram): Prepend a new sentinel before ritem.
7163 * src/lalr.c (build_relations): Rely on new sentinel.
7164 * src/gram.c (gram_free): Adjust to new sentinel.
7165
b7691f15
JD
71662006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
7167
7168 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
7169 yylookaheadNeeds. All uses updated.
7170 (yysplitStack): Rename local yynewLookaheadStatuses to
7171 yynewLookaheadNeeds.
7172 * data/glr-regression.at (Incorrect lookahead during nondeterministic
7173 GLR): In comments, change `lookahead status' to `lookahead need'.
7174
ddee1b06
PH
71752006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7176
7177 * data/glr.c (yysplitStack): A little stylistic rewrite.
7178
12f4614d
PH
71792006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7180
7181 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
7182
32c29292
JD
71832006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
7184
7185 * doc/bison.texinfo: Fix some typos.
7186 (GLR Semantic Actions): New subsection discussing special
7187 considerations because GLR semantic actions might be deferred.
7188 (Actions): Mention look-ahead usage of yylval.
7189 (Actions and Locations): Mention look-ahead usage of yylloc.
7190 (Special Features for Use in Actions): Add YYEOF entry and mention it
7191 in the yychar entry.
7192 In the yychar entry, remove mention of the local yychar case (pure
7193 parser) since this is irrelevant information when writing semantic
148d66d8 7194 actions and since it's already discussed in `Table of Symbols' where
32c29292
JD
7195 yychar is otherwise described as an external variable.
7196 In the yychar entry, don't call it the `current' look-ahead since it
7197 isn't when semantic actions are deferred.
7198 In the yychar and yyclearin entries, add note about deferred semantic
7199 actions.
7200 Add yylloc and yylval entries discussing look-ahead usage.
7201 (Look-Ahead Tokens): When discussing yychar, don't call it the
7202 `current' look-ahead, and do mention yylval and yylloc.
7203 (Error Recovery): Cross-reference `Action Features' when mentioning
7204 yyclearin.
148d66d8 7205 (Table of Symbols): In the yychar entry, don't call it the `current'
32c29292
JD
7206 look-ahead.
7207 In the yylloc and yylval entries, mention look-ahead usage.
7208
de366a2f 72092006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2781dbd1
JD
7210
7211 * tests/glr-regression.at: Update copyright year to 2006.
7212
bf70fa87
JD
72132006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7214
7215 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
7216 use during nondeterministic operation to track which stacks have
7217 actually needed the current lookahead.
7218 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
7219 Allocate, deallocate, resize, and otherwise shuffle space for
7220 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
7221 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
7222 appropriately during nondeterministic operation.
7223 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
7224 members to store the current lookahead to be used by the deferred
7225 user action.
7226 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
7227 from which the RHS is taken. Set the lookahead members of the new
7228 yySemanticOption according to the lookahead status for stack yyk.
7229 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
7230 yyaddDeferredAction.
7231 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
7232 members of yySemanticOption before invoking yyuserAction, and then set
7233 them back to their current values afterward.
7234 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
7235 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
7236 * tests/glr-regression.at: Remove `.' from the ends of recent test case
7237 titles for consistency.
7238 (Leaked merged semantic value if user action cuts parse): In order to
7239 suppress lint warnings, use arguments in merge function, and assign
7240 char value < 128 in main.
7241 (Incorrect lookahead during deterministic GLR): New test case.
7242 (Incorrect lookahead during nondeterministic GLR): New test case.
7243
05449a2c
JD
72442006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7245
de366a2f 7246 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
05449a2c
JD
7247 !yyvaluep as signal that no semantic value is available to print.
7248 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
7249 to print a semantic value.
7250
4158e0a1 72512006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
fd2493f7 7252
4158e0a1
JD
7253 * tests/glr-regression.at: For consistency with my newer test cases,
7254 don't thank myself.
7255
d659304d
JD
72562006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
7257
7258 * data/glr.c (yyresolveValue): When merging semantic options, if at
7259 least one user action succeeds but a later one cuts the parse, then
7260 destroy the semantic value before returning rather than leaking it.
7261 (yyresolveStates): If a user action cuts the parse and thus
7262 yyresolveValue fails, ignore the (unset) semantic value rather than
7263 corrupting the yyGLRState, and empty the semantic options list since
7264 the user actions should have called all necessary destructors.
7265 Simplify code with YYCHK.
7266 * tests/glr-regression.at (Corrupted semantic options if user action
7267 cuts parse): New test case.
7268 (Undesirable destructors if user action cuts parse): New test case.
7269 Before applying any of this patch, this test case never actually failed
7270 for me... but only because the corrupted semantic options usually
7271 masked this bug.
7272 (Leaked merged semantic value if user action cuts parse): New test
7273 case.
7274
6ec2c0f2
AD
72752006-01-05 Akim Demaille <akim@epita.fr>
7276
7277 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
7278
1b9c21fb
PE
72792006-01-04 Paul Eggert <eggert@cs.ucla.edu>
7280
7281 * data/c.m4 (b4_c_modern): New macro, with a new provision for
7282 _MSC_VER. Problem reported by Cenzato Marco.
7283 (b4_c_function_def): Use it.
7284 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
7285 b4_c_modern.
7286 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
7287 than rolling our own.
7288
84866159
AD
72892006-01-04 Akim Demaille <akim@epita.fr>
7290
7291 Also warn about non-used mid-rule values.
7292 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
7293 member.
7294 (symbol_list_new): Adjust.
7295 * src/reader.c (symbol_typed_p): New.
7296 (grammar_rule_check): Use it.
7297 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
7298 Check its rule.
7299 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
7300 Use it.
7301 * tests/actions.at (Exotic Dollars): Adjust.
7302
378f4bd8
AD
73032006-01-04 Akim Demaille <akim@epita.fr>
7304
7305 * src/reader.c (grammar_midrule_action): If $$ is set in a
7306 mid-rule, move the `used' bit to its lhs.
7307 * tests/input.at (Unused values): New.
7308 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
7309
e2a21b6f
PE
73102006-01-03 Paul Eggert <eggert@cs.ucla.edu>
7311
54662697
PE
7312 * doc/bison.texinfo (Bison Options): Say more accurately what
7313 --yacc does.
7314 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
7315 about declarations in the grammar when in Yacc mode, as POSIX does
7316 not require a diagnostic when the grammar uses extensions.
7317
7318 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
7319
073f9288
PE
7320 Warn about dubious constructions like "%token T T".
7321 Reported by twlevo.
7322 * src/symtab.h (struct symbol.declared): New member.
7323 * src/symtab.c (symbol_new): Initialize it to false.
7324 (symbol_class_set): New arg DECLARING, specifying whether
7325 this is a declaration that we want to warn about, if there
7326 is more than one of them. All uses changed.
7327
1221b78a
PE
7328 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
7329 Allow multiple %union directives, whose contents concatenate.
7330 * src/parse-gram.y (grammar_declaration): Likewise.
7331 Use muscle_code_grow, so that we don't need stype_line any more.
7332 All uses changed.
7333
7334 * src/muscle_tab.c (muscle_grow): Fix comment.
7335
e2a21b6f
PE
7336 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
7337 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
7338 Update copyright year to 2006.
7339
8f7e3cf9
AD
73402006-01-03 Akim Demaille <akim@epita.fr>
7341
7342 Have glr.cc pass (some of) the calc.at tests.
7343 * data/glr.cc (b4_parse_param_orig): New.
7344 (b4_parse_param): Improve its definition, and bound it more
7345 clearly in the skeleton.
7346 (b4_epilogue): Append, instead of prepending, in order to keep
7347 #line consistency.
7348 Simplify the generation of auxiliary functions: locations and
7349 purity are mandated.
7350 (b4_global_tokens_and_yystype): Honor it.
7351 * data/location.cc (c++.m4): Don't include it.
7352 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
7353 and AT_SKEL_CC_IF.
7354 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
7355 AT_LALR1_CC_IF.
7356 Be sure to initialize the first position's filename.
7357 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
7358 mandated anyway.
7359 (AT_CHECK_CALC_GLR_CC): New.
7360 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
7361
3953ed88
AD
73622006-01-02 Akim Demaille <akim@epita.fr>
7363
7364 * src/output.c (output_skeleton): Don't hard wire the inclusion of
7365 c.m4.
0a96ba81 7366 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
3953ed88
AD
7367 * data/glr.cc: Do not include stack.hh.
7368
9ecafbbf
AD
73692006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
7370
7371 * data/glr.c: Reformat whitespace with tabs.
7372 (b4_lpure_formals): Remove this unused m4 macro.
7373 * tests/cxx-type.at: Reformat whitespace with tabs.
7374 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
7375 since it's a member. Rename type to isNterm for clarity.
7376
c4d497a0
AD
73772005-12-29 Akim <akim@sulaco.local>
7378
7379 Let glr.cc catch up with symbol_value_print.
7380 * data/glr.cc (b4_yysymprint_generate): Replace by...
7381 (b4_yy_symbol_print_generate): this.
7382 (yy_symbol_print, yy_symbol_value_print): Declare them.
7383
4517da37
PE
73842005-12-28 Paul Eggert <eggert@cs.ucla.edu>
7385
7386 * src/location.h (boundary): Note that a line or column equal
7387 to INT_MAX indicates an overflow.
7388 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
7389 (rule_length_overflow, increment_rule_length, add_column_width):
7390 New functions.
7391 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
7392 (<SC_BRACED_CODE>"}"):
7393 Use increment_rule_length rather than incrementing it by hand.
7394 (adjust_location, handle_syncline): Diagnose overflow.
7395 (handle_action_dollar, handle_action_at):
7396 Fix bug with monstrosities like $-2147483648.
7397 Remove now-unnecessary checks.
7398 (scan_integer): Verify assumptions and remove now-unnecessary checks.
7399 (convert_ucn_to_byte): Verify assumptions.
7400 (handle_syncline): New arg LOC. All callers changed.
7401 Don't store through a value derived from char const * pointer.
7402
7403 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
7404 GCC warnings.
7405
e3233bf6
PE
74062005-12-27 Paul Eggert <eggert@cs.ucla.edu>
7407
7408 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
7409 Remove unnecessary forward static decls.
7410
8f3596a6
AD
74112005-12-27 Akim Demaille <akim@epita.fr>
7412
7413 * src/reader.c (grammar_current_rule_check): Also check that $$
7414 is used.
7415 Take the rule to check as argument, hence rename as...
7416 (grammar_rule_check): this.
7417 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
7418 Rename as...
7419 (grammar_rule_begin, grammar_rule_end): these, for consistency.
7420 (grammar_midrule_action, grammar_symbol_append): Now static.
7421 * tests/torture.at (input): Don't rely on the default action
7422 being always performed.
7423 * tests/calc.at: "Set" $$ even when the action is "cut" with
7424 YYERROR or other.
7425 * tests/actions.at (Exotic Dollars): Instead of using unused
7426 values, check that the warning is issued.
7427
721be13c
PE
74282005-12-22 Paul Eggert <eggert@cs.ucla.edu>
7429
7430 * NEWS: Improve wording for unused-value warnings.
7431
a0af42fc
AD
74322005-12-22 Akim Demaille <akim@epita.fr>
7433
7434 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
7435 (b4_yysymprint_generate): Rename as...
7436 (b4_yy_symbol_print_generate): this.
7437 Generate yy_symbol_print instead of yysymprint.
7438 Generate also yy_symbol_value_print, and use it.
7439
affac613
AD
74402005-12-22 Akim Demaille <akim@epita.fr>
7441
721be13c 7442 * NEWS: Warn about unused values.
affac613
AD
7443 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
7444 a `used' member.
7445 (symbol_list_n_get, symbol_list_n_used_set): New.
7446 (symbol_list_n_type_name_get): Use symbol_list_n_get.
7447 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
7448 * src/reader.c (grammar_current_rule_check): Check that values are
7449 used.
7450 * src/symtab.c (symbol_print): Accept 0.
7451 * tests/existing.at: Remove the type information.
7452 Empty the actions.
7453 Remove useless actions (beware of mid-rule actions: perl -000
7454 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
7455 * tests/actions.at (Exotic Dollars): Use unused values.
7456 * tests/calc.at: Likewise.
7457 * tests/glr-regression.at (No users destructors if stack 0 deleted):
7458 Likewise.
7459
7460 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
7461 rule_useful_p.
7462
9d9b8b70
PE
74632005-12-21 Paul Eggert <eggert@cs.ucla.edu>
7464
8bb4c753
PE
7465 Undo 2005-12-01 tentative license wording change. The wording is
7466 still being reviewed by the lawyers, and we don't want to wait for
7467 them before publishing a test release. For now, revert to the
7468 previous wording.
7469 * NEWS: Undo 2005-12-01 change.
7470 * data/glr.c: Revert to previous license wording.
7471 * data/glr.cc: Likewise.
7472 * data/lalr1.cc: Likewise.
7473 * data/location.cc: Likewise.
7474 * data/yacc.c: Likewise.
7475
9d9b8b70
PE
7476 * NEWS: Reword %destructor vs YYABORT etc.
7477 * data/glr.c: Use American spacing, for consistency.
7478 * data/glr.cc: Likewise.
7479 * data/lalr1.cc: Likewise.
7480 * data/yacc.c: Likewise.
7481 * data/yacc.c: Reformat comments slightly.
7482 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
7483 for consistency. Fix some spelling errors and reword recently-included
7484 text slightly.
7485 * tests/cxx-type.at: Cast results of malloc, for C++.
7486
2c3b392a
AD
74872005-12-21 Joel E. Denny <address@hidden>
7488
7489 * tests/cxx-type.at: Construct a tree, count the parents of shared
7490 nodes, and free each node once and only once. Previously, the memory
7491 for semantic values was leaked instead.
7492
d6cff4dc
AD
74932005-12-21 Joel E. Denny <address@hidden>
7494
7495 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
7496 (yylval, yylloc): If pure, #define to yystackp->yyval and
7497 yystackp->yyloc similar to yychar and yynerrs.
7498 (yyparse): If pure, remove local yylval and yylloc. Add local
7499 yystackp to accommodate pure definitions of yylval and yylloc.
7500 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
7501 yylvalp and yyllocp to &yylval and &yylloc.
7502 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
7503 namespace. Previously, nerrs and char were missing, but lval and lloc
7504 weren't necessary.
7505 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
7506 yylvalp and yyllocp parameters since, if pure, these are now always
7507 accessible through yystackp. If not pure, they are still accessible
7508 globally.
7509 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
7510 `if (YYID (N))' to pacify lint.
7511
a85284cf
AD
75122005-12-21 Akim Demaille <akim@epita.fr>
7513
7514 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
7515 destroy the RHS symbols of a rule.
7516 * data/yacc.c (yylen): Initialize to 0.
7517 Keep its value to the number of items to possibly shift.
7518 In particular, a regular successful parse that ends on YYFINAL by
7519 a (internal) YYACCEPT must not have yylen != 0.
7520 (yyerrorlab, yyreturn): Pop the RHS.
7521 Reorder a bit to emphasize the `shifting' bits of code.
7522 (YYPOPSTACK): Now accept a number of items to pop.
7523 * data/lalr1.cc: Likewise.
7524 * data/glr.c: Formatting changes.
7525 Use goto instead of fall through.
7526 * doc/bison.texinfo (Destructor Decl): Complete.
7527
d508c281
JMG
75282005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7529
7530 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
7531 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
7532 * djgpp/config.bat: Replace every occurence of the file name
7533 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
7534 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
7535 * djgpp/config.sed: Replace every occurence of the file name
7536 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
7537 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
7538 * djgpp/djunpack.bat: DJGPP specific file.
7539 * djgpp/fnchange.lst: DJGPP specific file.
7540 * djgpp/README.in: Add new information about how to unpack the bison
7541 source on MSDOS and other systems which have 8.3 file name restrictions
7542 using djunpack.bat and fnchange.lst.
7543
3e7a2cd9
PE
75442005-12-12 Paul Eggert <eggert@cs.ucla.edu>
7545
7546 * bootstrap (build_cvs_prefix): Remove; unused.
7547 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
7548 when getting gnulib.
7549
75502005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
7551
7552 * data/glr.c: Reorder typedef declarations for structs to match order
7553 of struct declarations.
7554 Rename yystack everywhere to yystackp except in yyparse where it's not
7555 a pointer.
7556 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
7557 consistency.
7558 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
7559 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
7560 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
7561 lint.
7562
877519f8
PE
75632005-12-09 Paul Eggert <eggert@cs.ucla.edu>
7564
0eca5a39
PE
7565 * tests/sets.at (Accept): Fix typos in regular expression used to
7566 sed out the final state number.
7567
2cec9080
PE
7568 Work around portability problem on Solaris 10: flex-generated
7569 files include <stdio.h> before <config.h>, which messes up
7570 because the latter defines __EXTENSIONS__. Address the problem
7571 by creating two new little files that include <config.h> first,
7572 then include the flex-generated files. Rewrite everyone else
7573 to include <config.h> first, as well.
7574 * lib/timevar.c: Always include "config.h".
7575 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
7576 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
7577 (EXTRA_bison_SOURCES): New macro.
7578 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
7579 * src/system.h: Don't include config.h.
7580 * src/LR0.c: Include <config.h> first.
7581 * src/assoc.c: Likewise.
7582 * src/closure.c: Likewise.
7583 * src/complain.c: Likewise.
7584 * src/conflicts.c: Likewise.
7585 * src/derives.c: Likewise.
7586 * src/files.c: Likewise.
7587 * src/getargs.c: Likewise.
7588 * src/gram.c: Likewise.
7589 * src/lalr.c: Likewise.
7590 * src/location.c: Likewise.
7591 * src/main.c: Likewise.
7592 * src/muscle_tab.c: Likewise.
7593 * src/nullable.c: Likewise.
7594 * src/output.c: Likewise.
7595 * src/parse-gram.y: Likewise.
7596 * src/print.c: Likewise.
7597 * src/print_graph.c: Likewise.
7598 * src/reader.c: Likewise.
7599 * src/reduce.c: Likewise.
7600 * src/relation.c: Likewise.
7601 * src/state.c: Likewise.
7602 * src/symlist.c: Likewise.
7603 * src/symtab.c: Likewise.
7604 * src/tables.c: Likewise.
7605 * src/uniqstr.c: Likewise.
7606 * src/vcg.c: Likewise.
7607
877519f8
PE
7608 * src/parse-gram.y: Fix minor problems uncovered by lint.
7609 (current_lhs, current_lhs_location): Now static.
7610 (current_assoc): Remove unused variable.
7611
7612 Cleanups so that Bison-generated parsers have less lint.
7613 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
7614 Prepend /*ARGSUSED*/, for lint's sake.
7615 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
7616 definition if 'lint' is defined.
7617 (YYID): New macro (or function, if lint).
7618 All uses of /*CONSTCOND*/0 replaced by YYID(0).
7619 * data/yacc.c: Likewise.
7620 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
7621 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
7622 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
7623 is C++ only.
7624 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
7625 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
7626 Use YYID(0) rather than 0, for lint.
7627 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
7628 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
7629
f5228370
PE
76302005-12-07 Paul Eggert <eggert@cs.ucla.edu>
7631
7632 * tests/glr-regression.at
7633 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
7634 Close memory leak reported by twlevo.
7635
69ce078b
PE
76362005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
7637
6ff99711
PE
7638 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
7639 all stacks.
7640 (yyparse): Iterate another stack in order to call user destructors.
69ce078b
PE
7641 * tests/glr-regression.at (No users destructors if stack 0 deleted):
7642 New test case.
7643 (Duplicated user destructor for lookahead): This test now is expected
7644 to succeed.
7645
af3412cd
PE
76462005-12-01 Paul Eggert <eggert@cs.ucla.edu>
7647
32b5b719 7648 * NEWS: Document the following change.
af3412cd
PE
7649 * data/yacc.c: Say "parser skeleton" rather than "file", since
7650 it's no longer just a file.
7651 * data/glr.c: Grant a special exception for C GLR parsers, that
7652 reads like the already-existing exception for C LALR(1) parsers.
7653 * data/glr.cc: Likewise.
7654 * data/lalr1.cc: Likewise.
7655 * data/location.cc: Likewise.
7656 * data/yacc.c: Reword the "written by" statement to clarify that
7657 it was the parser skeleton, not the entire output file.
7658 * data/glr.c: Written by Paul Hilfinger.
7659 * data/glr.cc: Written by Akim Demaille.
7660 * data/lalr1.cc: Likewise.
7661
035aa4a0
PE
76622005-11-18 Paul Eggert <eggert@cs.ucla.edu>
7663
d9963c85
PE
7664 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
7665 Fix typos in previous change that broke 'make check'.
7666 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
7667 supported in C.
7668 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
7669 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
7670 We can revert this once things settle down.
7671
035aa4a0
PE
7672 * src/conflicts.c (conflicts_print): Don't print file name twice
7673 when %expect fails because there were no conflicts.
7674 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
7675 change.
7676 * tests/conflicts.at (%expect not enough, %expect too much):
7677 (%expect with reduce conflicts): Adjust to new behavior.
7678
76792005-11-18 Akim Demaille <akim@epita.fr>
7680
7681 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
7682 errors.
7683 * NEWS: Document this.
7684 * doc/bison.texinfo (Expect Decl): Likewise.
7685
d1ff7a7c
AD
76862005-11-16 Akim Demaille <akim@epita.fr>
7687
7688 Generalize the display of semantic values and locations in traces.
7689 * data/glr.c (yy_reduce_print): Fix indices (again).
7690 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
7691 literal integers.
7692 * data/lalr1.cc (yyreduce_print): Rename as...
7693 (yy_reduce_print): this.
7694 Display values and locations.
7695 * data/yacc.c (yy_reduce_print): Likewise.
7696 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
7697 (yysymprint): Move higher to be visible from yy_reduce_print).
7698 (yyparse): Adjust.
7699 * tests/calc.at: Adjust the expected length of the traces.
7700
6de5398d
AD
77012005-11-14 Akim Demaille <akim@epita.fr>
7702
7703 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
7704 from 1 to N, while values and location start at 0.
7705 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
7706
a1373f55
AD
77072005-11-14 Akim Demaille <akim@epita.fr>
7708
7709 * data/glr.c (yy_reduce_print): Fix the $ number.
7710
613d8952
AD
77112005-11-14 Akim Demaille <akim@epita.fr>
7712
7713 "Use" parse parameters.
7714 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
7715 * data/glr.c, data/glr.cc: Use them.
7716 * data/glr.c (YYUSE): Have a C++ definition that supports
7717 non-pointer types.
7718
b2741627
AD
77192005-11-14 Akim Demaille <akim@epita.fr>
7720
7721 * data/glr.c (yyexpandGLRStack): Declare only if defined.
7722
5059b5c8
AD
77232005-11-14 Akim Demaille <akim@epita.fr>
7724
42249483
AD
7725 * data/glr.cc: New.
7726 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
5059b5c8 7727
4626a15d
AD
77282005-11-12 Akim Demaille <akim@epita.fr>
7729
7730 Let position and location be PODs.
7731 * data/location.cc (position::initialize, location::initialize): New.
7732 (position::position, location::location): Define only if
7733 b4_location_constructors is defined.
7734 * data/lalr1.cc (b4_location_constructors): Define it for backward
7735 compatibility.
7736 * doc/bison.texinfo (Initial Action Decl): Use initialize.
7737
77382005-11-12 Akim Demaille <akim@epita.fr>
98ae9643
AD
7739
7740 * data/lalr1.cc: Move the body of the ctor and dtor into the
7741 parser file (instead of the header).
7742 Wrap the implementations in a "namespace yy".
7743
77442005-11-12 Akim Demaille <akim@epita.fr>
7745
7746 Have glr.c include its header file when created.
7747 * data/glr.c (b4_shared_declarations): New.
7748 Output them verbatim in the parser if !%defines, otherwise
7749 output then in the header file, and include it instead.
7750
1989d947
AD
77512005-11-11 Akim Demaille <akim@epita.fr>
7752
7753 * data/glr.c: Comment changes.
7754
77552005-11-11 Akim Demaille <akim@epita.fr>
62b08cfc
AD
7756
7757 When yydebug, report semantic and location values for reductions.
7758 * data/glr.c (yy_reduce_print): Report the semantic values and the
7759 locations.
7760 (YY_REDUCE_PRINT): Adjust.
7761 (yyglrReduce): Use them.
7762 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
7763 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
7764 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
7765 traces.
7766
02998094
AD
77672005-11-10 Akim Demaille <akim@epita.fr>
7768
7769 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
7770 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
7771 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
7772
5210672f
PE
77732005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
7774
7775 * m4/cxx.m4, examples/Makefile.am: Don't build
7776 examples/calc++ if no C++ compiler is available. (trivial change)
7777
a8991a1d
AD
77782005-11-09 Akim Demaille <akim@epita.fr>
7779
7780 * src/scan-skel.l: Use a couple of asserts.
7781
36b5e963
AD
77822005-11-03 Akim Demaille <akim@epita.fr>
7783
7784 In some (weird) cases, the final state number is incorrect.
7785 Reported by Alexandre Duret-Lutz.
7786 * src/LR0.c (state_list_append): Remove the computation of
7787 final_state.
7788 (save_reductions): Do it here.
7789 (get_state): Alpha conversion.
7790 (generate_states): Use a for loop.
7791 * src/gram.h (item_number_is_rule_number)
7792 (item_number_is_symbol_number): New.
7793 * src/state.c: Use assert.
7794 * src/system.h: Include assert.h.
7795 * tests/sets.at (Accept): New.
7796
44e7ead1
PH
77972005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7798
7799 * data/glr.c (yyfill): Adjust comment.
36b5e963 7800 (yyresolveAction): Initialize default location properly
44e7ead1
PH
7801 for empty right-hand sides.
7802 (yydoAction): Ditto.
7803 Add comment explaining apparently dead code.
36b5e963
AD
7804 * tests/glr-regression.at
7805 (Incorrectly initialized location for empty right-hand side in GLR):
44e7ead1 7806 New test.
36b5e963 7807
e10a80ee
PE
78082005-10-30 Paul Eggert <eggert@cs.ucla.edu>
7809
7810 * bootstrap (cleanup_gnulib): New function. Use it to clean up
7811 gnulib when interrupted. This fixes some race conditions and
7812 works around some portability problems (one noted by Paul
7813 Hilfinger).
7814
067b32ee
AD
78152005-10-22 Akim <akim@epita.fr>
7816
7817 * Makefile.cfg: Adjust to config -> build-aux.
7818 Reported by twledo.
7819
4b367315
AD
78202005-10-21 Akim Demaille <akim@epita.fr>
7821
7822 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
7823 the %parse-params.
7824 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
7825 * data/yacc.c (b4_Pure_if): Rename as...
7826 (b4_yacc_pure_if): this.
7827 (YY_SYMBOL_PRINT, yyparse): Adjust.
7828 * doc/bison.texinfo: Formatting changes.
7829
24cc23d9
AD
78302005-10-21 Akim Demaille <akim@epita.fr>
7831
7832 Finish the transition config -> build-aux.
7833 * configure.ac, Makefile.am: Use build-aux.
7834 * config/prev-version, config/announce-gen, config/Makefile.am:
7835 Move to...
7836 * build-aux/prev-version, build-aux/announce-gen,
7837 * build-aux/Makefile.am: here.
7838
d4476375
AD
78392005-10-14 Akim Demaille <akim@epita.fr>
7840
7841 * examples/calc++/test: Use set -x only when VERBOSE.
7842
302c0aee
PE
78432005-10-13 Paul Eggert <eggert@cs.ucla.edu>
7844
7845 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
7846 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
7847
7625ec2c
AD
78482005-10-13 Akim Demaille <akim@epita.fr>
7849
7850 * src/scan-skel.l: Output the base name parts of the parser and
7851 header file names.
302c0aee 7852 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
7625ec2c
AD
7853 additional checks.
7854 Use this to exercise C++ outputs in subdirs.
7855 Reported by Oleg Smolsky.
7856
ba0fe3c7
PE
78572005-10-12 Paul Eggert <eggert@cs.ucla.edu>
7858
7859 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
7860 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
7861 Problem reported by John P. Hartmann.
7862 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
7863 already defined it.
7864
9b8a5ce0
AD
78652005-10-12 Akim Demaille <akim@epita.fr>
7866
7867 * src/parse-gram.y (version_check): Exit 63 to please missing
7868 (stands for "version mismatch).
7869 * tests/input.at, doc/bison.texinfo: Adjust.
7870
4f6e011e
PE
78712005-10-10 Paul Eggert <eggert@cs.ucla.edu>
7872
7873 Work around portability problems with Visual Age C compiler
7874 (xlc and xlC_r) reported by John P. Hartmann.
7875 * data/location.cc (initial_column, initial_line): Remove.
7876 All uses replaced by 0 and 1.
7877 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
7878 that xlc complains about.
7879 * src/scan-skel.l (skel_wrap): Likewise.
4d7aa45e 7880 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
ba0fe3c7 7881 as __STDC__.
4d7aa45e
PE
7882 * data/yacc.c (YYMODERN_C): New macro, which also looks at
7883 __STDC_VERSION__. Use it everywhere instead of looking at
7884 __STDC__ and __cplusplus.
4f6e011e 7885
a1b3bf8c
AD
78862005-10-10 Akim Demaille <akim@epita.fr>
7887
7888 * examples/calc++/test: Be quiet unless VERBOSE.
7889
412e44aa
PE
78902005-10-05 Paul Eggert <eggert@cs.ucla.edu>
7891
2a4647a3
PE
7892 * data/c.m4 (yydestruct, yysymprint):
7893 Use YYUSE instead of casting to void.
7894 * data/glr.c (YYUSE): New macro.
7895 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
7896 Use it instead of rolling our own.
7897 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
7898 (YYCHK1):
7899 Use /*CONSTCOND*/ to suppress lint warnings.
7900 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
7901 (YY_STACK_PRINT): Use 'false' not '0'.
7902 (YYUSE): New macro.
7903 (yysymprint_, yydestruct_): Use it instead of rolling our own.
7904 * data/yacc.c (YYUSE): New macro.
7905 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
7906 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
7907 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
7908
7909
412e44aa
PE
7910 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
7911 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
7912
88c6637f
PE
79132005-10-04 Paul Eggert <eggert@cs.ucla.edu>
7914
2f4f028d
PE
7915 Undo the parts of the unlocked-I/O change that substituted
7916 putc or puts for printf. This might hurt performance a bit,
7917 but some people prefer the printf style.
7918 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
7919 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
7920 All uses replaced by YYFPRINTF and YYDPRINTF.
7921 * data/yacc.c: Likewise.
7922 * lib/bitset.c (bitset_print): Likewise.
7923 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
7924 putc and puts.
7925 * lib/lbitset.c (debug_lbitset): Likewise.
7926 * src/closure.c (print_firsts, print_fderives): Likewise.
7927 * src/gram.c (grammar_dump): Likewise.
7928 * src/lalr.c (look_ahead_tokens_print): Likewise.
7929 * src/output.c (escaped_output): Likewise.
7930 (user_actions_output): Break apart two printfs.
7931 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
7932 * src/reduce.c (reduce_print): Likewise.
7933 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
7934 * src/system.h: Include unlocked-io.h rathe than stdio.h.
7935
88c6637f
PE
7936 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
7937 Use assignments rather than casts-to-void to suppress
7938 unused-variable warnings. This pacifies 'lint'.
7939 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
7940 unused-variable warnings.
7941
fb32e373
JMG
79422005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7943
7944 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
7945
edb8f44f
PE
79462005-10-02 Paul Eggert <eggert@cs.ucla.edu>
7947
fb9c0b33
PE
7948 Use unlocked I/O for a minor performance improvement on hosts like
7949 GNU/Linux and Solaris that support unlocked I/O. The basic idea
7950 is to use the gnlib unlocked-io module, and to prefer putc and
7951 puts to printf when either will work (since the latter doesn't
7952 come in an unlocked flavor).
7953 * bootstrap (gnulib_modules): Add unlocked-io.
7954 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
7955 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
7956 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
7957 and similarly for puts and putc and printf.
7958 * data/yacc.c: Likewise.
7959 * lib/bitset.c (bitset_print): Likewise.
7960 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
7961 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
7962 to printf.
7963 * lib/lbitset.c (debug_lbitset): Likewise.
7964 * src/closure.c (print_firsts, print_fderives): Likewise.
7965 * src/gram.c (grammar_dump): Likewise.
7966 * src/lalr.c (look_ahead_tokens_print): Likewise.
7967 * src/output.c (escaped_output): Likewise.
7968 (user_actions_output): Coalesce two printfs.
2f4f028d 7969 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
fb9c0b33
PE
7970 * src/reduce.c (reduce_print): Likewise.
7971 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2f4f028d 7972 * src/system.h: Include unlocked-io.h rather than stdio.h.
fb9c0b33 7973
edb8f44f
PE
7974 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
7975 this confuses xgettext.
7976
b50d2359
AD
79772005-10-02 Akim Demaille <akim@epita.fr>
7978
7979 * bootstrap (gnulib_modules): Add strverscmp.
7980 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
7981 * m4/.cvsignore: Add strverscmp.m4.
7982 * src/parse-gram.y (%require): New token, new rule.
7983 (version_check): New.
7984 * src/scan-gram.l (%require): Adjust.
7985 * tests/input.at (AT_REQUIRE): New.
7986 Use it.
7987 * doc/bison.texinfo (Require Decl): New.
7988 (Calc++ Parser): Use %require.
7989
21667f64
AD
79902005-10-02 Akim Demaille <akim@epita.fr>
7991
7992 * data/location.cc: New.
7993
2b81e969
AD
79942005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
7995 Akim Demaille <akim@epita.fr>
7996
7997 Make sure -odir/foo.cc creates dir/location.hh etc.
7998 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
7999 (spec_file_prefix, spec_verbose_file, spec_graph_file)
8000 (spec_defines_file): Now const.
8001 (dir_prefix): New.
8002 (short_base_name): Remove.
8003 * src/files.c: Adjust.
8004 (dirname.h): Include.
8005 (base_name): Don't prototype it.
8006 (finput): Remove, duplicates gram_in.
8007 (full_base_name, short_base_name): Replace by...
8008 (all_but_ext, all_but_tab_ext): these.
8009 (compute_base_names): Rename as...
8010 (compute_file_name_parts): this.
8011 Update to compute the new variables, including dir_prefix.
8012 Adjust dependencies.
8013 * src/output.c (prepare): Output them.
8014 * src/reader.c: Adjust to use gram_in, not finput.
8015 * src/scan-skel.l (@dir_prefix@): New.
8016
ad6a9b97
JMG
80172005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8018
8019 * lib/subpipe.c: New function end_of_output_subpipe() added
8020 to allow support for non-posix systems. This is a no-op function
8021 for posix systems.
8022
8023 * lib/subpipe.h: New function end_of_output_subpipe() added
8024 to allow support for non-posix systems. This is a no-op function
8025 for posix systems.
8026
8027 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
8028 handle the lack of pipe/fork functionality on non-posix systems.
8029
8030 * djgpp/Makefile.maint: DJGPP specific file.
8031
8032 * djgpp/README.in: DJGPP specific file.
8033
8034 * djgpp/config.bat: DJGPP specific configuration file.
8035
8036 * djgpp/config.sed: DJGPP specific configuration file.
8037
8038 * djgpp/config.site: DJGPP specific configuration file.
8039
8040 * djgpp/config_h.sed: DJGPP specific configuration file.
8041
8042 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
8043
8044 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
8045
fc695704
AD
80462005-10-02 Akim Demaille <akim@epita.fr>
8047
8048 * data/location.cc: New, extract from...
8049 * data/lalr1.cc: here.
8050 (location.hh): Include it after the user prologue, in case the
8051 filename type is defined by the user.
8052 Forward declation location and position before the pre-prologue.
8053 (yyresult_): Rename as...
8054 (yyresult): this, it's a local variable, not an attribute.
8055 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
8056
80572005-10-01 Akim Demaille <akim@epita.fr>
5215c87f
AD
8058
8059 * examples/extexi: Restore the #line generation.
8060
fb9712a9
AD
80612005-09-30 Akim Demaille <akim@epita.fr>,
8062 Alexandre Duret-Lutz <adl@gnu.org>
8063
8064 Move the token type and YYSTYPE in the parser class.
8065 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
8066 (parser::token): New, from the moved free definition of tokens.
8067 (parser::semantic_value): Now a full definition instead of an
8068 indirection to YYSTYPE.
8069 (b4_post_prologue): No longer included in the header file, but
8070 in the implementation file.
8071 * doc/bison.texi (C+ Language Interface): Update.
8072 * src/parse-gram.y: Support unary %define.
8073 * tests/actions.at: Define global_tokens_and_yystype for backward
8074 compatibility until we update the tests.
8075 * tests/calc.at: Idem.
8076 (first_line, first_column, last_line, last_column): Define for lalr1.cc
8077 to simplify the code.
8078
55f0c7b1
PE
80792005-09-29 Paul Eggert <eggert@cs.ucla.edu>
8080
8081 Port to SunOS 4.1.4, which lacks strtoul and strerror.
8082 Ah, the good old days! Problem reported by Peter Klein.
8083 * bootstrap (gnulib_modules): Add strerror, strtoul.
8084 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
8085 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
8086
fb9712a9 80872005-09-29 Akim Demaille <akim@epita.fr>
d4fb5e3c
AD
8088
8089 * data/c.m4 (b4_error_verbose_if): New.
8090 * data/lalr1.cc: Use it.
8091 (YYERROR_VERBOSE_IF): Remove.
8092 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
8093 parser members, replaced by...
8094 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
8095 local variables.
8096 (yysyntax_error_): Takes the state number as argument.
8097 (yyreduce_print_): Use the argument yyrule, not the former
8098 attribute yyn_.
8099
8a6f72f3
PE
81002005-09-26 Paul Eggert <eggert@cs.ucla.edu>
8101
8102 * bootstrap (gnulib_modules): Add verify.
8103 * lib/.cvsignore: Add verify.h.
8104 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
8105 * src/system.h (verify): Remove.
8106 Include verify.h instead.
8107 * src/tables.c (tables_generate): Use new API for 'verify'.
8108
0d50976f
PE
81092005-09-21 Paul Eggert <eggert@cs.ucla.edu>
8110
ebc3737e
PE
8111 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
8112 local variables whose names begin with 'yy'.
8113 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
8114 Trivial changes from Joel E. Denny.
8115
0d50976f
PE
8116 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
8117 it itself.
8118 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
8119 don't use alloca any more.
8120
8121 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
8122 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
62c4328e 8123 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
0d50976f
PE
8124 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
8125 to match yacc.c, to test more hosts.
8126
a05b79df
PE
81272005-09-20 Paul Eggert <eggert@cs.ucla.edu>
8128
55289366
PE
8129 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
8130 doesn't affect behavior.
8131 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
8132 Solaris, AIX, MSC.
8133 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
8134 This works a bit better with glibc, if user code has already included
8135 stdlib.h.
8136 * doc/bison.texinfo (Bison Parser): Document that users can't
8137 arbitrarily use malloc and free for other purposes. Document
8138 that <alloca.h> and <malloc.h> might be included.
8139 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
8140 user must declare alloca.
8141
a05b79df
PE
8142 * HACKING (release): Forwarn the Translation Project about
8143 stable releses.
8144
3ab2ca22
AD
81452005-09-20 Akim Demaille <akim@epita.fr>
8146
8147 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
8148
a9739e7c
PE
81492005-09-19 Paul Eggert <eggert@cs.ucla.edu>
8150
a702593e
PE
8151 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
8152 (YYSTACK_ALLOC_MAXIMUM): Use it.
8153 (yysyntax_error): New function.
8154 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
8155 multiple syntax errors are reported, and alloca is being used.
8156 Instead, reallocate buffers twice as big each time, so that
8157 we waste at most half the allocated memory. Start with a small
8158 (128-byte) buffer that will suffice in most cases anyway.
8159 Use yysyntax_error to do most of the work.
8160
8161 * doc/bison.texinfo (Error Reporting, Table of Symbols):
8162 yynerrs is the number of errors reported, not the number of
8163 errors encountered.
8164
a9739e7c
PE
8165 * tests/glr-regression.at (Duplicated user destructor for lookahead):
8166 Mark it as expected to fail.
8167 Cast result of malloc; problem reported by twlevo@xs4all.nl.
8168 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
8169 Don't start user-code symbols with "yy", to avoid name space problems.
8170
f479c6c6
AD
81712005-09-19 Akim Demaille <akim@epita.fr>
8172
8173 Remove the traits, failed experiment.
8174 It never proved useful, and anyway because of the current
8175 definition, it was not possible to have several specialization of
8176 this traits, making it useless.
8177 * data/lalr1.cc (yy:traits): Remove.
8178 Inline its definitions in the parser class.
8179
e2586f82
AD
81802005-09-19 Akim Demaille <akim@epita.fr>
8181
8182 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
8183 least Mac OSX with a /usr/local install of gettext.
8184
2e8cf949
AD
81852005-09-19 Akim Demaille <akim@epita.fr>
8186
8187 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
8188 and yytoken for similarity with the other skeletons.
8189
c7fb0b90
AD
81902005-09-19 Akim Demaille <akim@epita.fr>
8191
4e26c69e 8192 * NEWS, configure.ac: update version number to 2.1a.
c7fb0b90 8193
1bd0deda
PE
81942005-09-16 Paul Eggert <eggert@cs.ucla.edu>
8195
8196 * NEWS: Version 2.1.
8197
8198 * NEWS: Remove notice of yytname change, since it was never in an
8199 official release.
8200 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
8201 diagnostic.
8202 * src/output.c (prepare): Likewise.
8203 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
8204 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
8205 is not defined. This is an awful hack, but it's enough for now.
8206 All callers changed.
8207 * tests/glr-regression-at (make_value): Args are const pointers now,
8208 to avoid GCC warning.
8209 (Duplicated user destructor for lookahead): New test. Currently
8210 skipped. It fails on my host but I'm not sure it'll always fail.
8211
82122005-09-16 Akim Demaille <akim@epita.fr>
c1432f65
AD
8213
8214 * src/symtab.h (struct symbol): Declare the printer and destructor
8215 as const, to avoid accidental calls to free.
8216 (symbol_destructor_set, symbol_printer_set): Adjust.
8217 * src/symtab.c: Adjust.
8218
1bd0deda 82192005-09-16 Akim Demaille <akim@epita.fr>
cf147260
AD
8220
8221 * data/c.m4 (b4_token_enums): New.
8222 (b4_token_defines): Rename as...
8223 (b4_token_enums_defines): this.
8224 (b4_token_defines): New, output only the #defines.
8225 * data/yacc.c, data/glr.c: Adjust.
8226 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
8227 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
8228 as default values.
8229
dbcdae2d
AD
82302005-09-16 Akim Demaille <akim@epita.fr>
8231
8232 * data/lalr1.cc (yylex_): Remove, inline its code.
8233 (yyreport_syntax_error_): Remove, replaced by...
8234 (yysyntax_error_): this which returns a string and leaves to the
8235 caller the call to the users' error function.
8236 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
8237 Move from members of the parser object...
8238 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
8239 to local variables of the parse function.
8240
70d8f291
AD
82412005-09-16 Akim Demaille <akim@epita.fr>
8242
8243 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
8244 since it's in Bison's name space.
8245
b47dbebe
PE
82462005-09-15 Paul Eggert <eggert@cs.ucla.edu>
8247
ae199bf1
PE
8248 * data/glr.c (yyresolveValue): Add default case to pacify
8249 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
8250
b47dbebe
PE
8251 * NEWS: Document when yyparse started to return 2.
8252 * doc/bison.texinfo (Parser Function): Document when yyparse
8253 returns 2.
8254
8255 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
8256 (b4_filename_type): Renamed back from b4_file_name_type. All uses
8257 changed.
8258 (class position): file_name -> filename (reverting). All uses changed.
8259
82602005-09-14 Paul Eggert <eggert@cs.ucla.edu>
8261
8262 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
8263 do anything if $@ exists. This reverts part of the 2005-07-07
8264 patch.
8265
00292f66
PE
82662005-09-11 Paul Eggert <eggert@cs.ucla.edu>
8267
8268 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
8269 contains obsolete information and isn't worth distributing as a
8270 separate file anyway.
8271 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
8272 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
8273 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
8274 (yyparse): Abort if user code uses longjmp to throw an unexpected
8275 value.
8276
a420f962
PE
82772005-09-09 Paul Eggert <eggert@cs.ucla.edu>
8278
00292f66
PE
8279 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
8280 Suggested by twlevo@xs4all.nl.
8281
127287e9
PE
8282 * data/glr.c (YYCHK1): Do not assume YYE is in range.
8283 This avoids a diagnostic from gcc -Wswitch-enum.
8284 Problem reported by twlevo@xs4all.nl.
8285
a420f962
PE
8286 * doc/bison.texinfo: Don't use "filename", as per GNU coding
8287 standards. Use "file name" or "file" or "name", depending on
8288 the context.
8289 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
8290 not to hack/foo.tab.c.
8291 (Calc++ Top Level): 2nd arg of main is not const.
48b16bbc
PE
8292 * data/glr.c: b4_filename -> b4_file_name.
8293 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
8294 All uses changed.
8295 (class position): filename -> file_name. All uses changed.
8296 * data/yacc.c: b4_filename -> b4_file_name.
8297 * lib/bitset.h: filename -> file_name in local vars.
8298 * lib/bitset_stats.c: Likewise.
8299 * src/files.c: Likewise.
8300 * src/scan-skel.l ("@output ".*\n): Likewise.
8301 * src/files.c (file_name_split): Renamed from filename_split.
8302 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
a420f962
PE
8303
83042005-09-08 Paul Eggert <eggert@cs.ucla.edu>
8305
8306 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
8307 to accommodate latest gnulib.
8308
8309 * tests/glr-regression.at (Duplicate representation of merged trees):
8310 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
8311
8312 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
8313 needed.
8314
42a6501d
PE
83152005-08-26 Paul Eggert <eggert@cs.ucla.edu>
8316
8317 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
8318 All uses changed. Invoke user destructor after an error during a
8319 split parse (trivial change from Joel E. Denny).
8320
8321 * tests/glr-regression.at
8322 (User destructor after an error during a split parse): New test case.
8323 Problem reported by Joel E. Denny in:
8324 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
8325
ef9a1faf
PE
83262005-08-25 Paul Eggert <eggert@cs.ucla.edu>
8327
5b4aaf78
PE
8328 * README-cvs: Give URLs for recommended tools.
8329 Mention Gzip version problem, and bootstrapping issues.
8330 Remove troubleshooting section, as it's somewhat obsolete.
8331
b5240ba5
PE
8332 * bootstrap (no_cache): New var, to accommodate different wget
8333 variants. Use it instead of '-C off'. Problem reported by
8334 twlevo@xs4all.nl.
8335
ef9a1faf
PE
8336 * data/glr.c (yydestroyStackItem): New function.
8337 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
8338 debugging information. Problem reported by Joel E. Denny.
8339
e6efa9da
AD
83402005-08-25 Akim Demaille <akim@epita.fr>
8341
8342 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
8343
adc90f13
PE
83442005-08-24 Paul Eggert <eggert@cs.ucla.edu>
8345
8346 * data/glr.c (yyrecoverSyntaxError, yyreturn):
8347 Don't invoke destructor on unresolved entries.
8348 * tests/glr-regression.at
8349 (User destructor for unresolved GLR semantic value): New test case.
8350 Problem reported by Joel E. Denny in:
8351 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
8352
f9315de5
PE
83532005-08-21 Paul Eggert <eggert@cs.ucla.edu>
8354
15d29c1f
PE
8355 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
8356 Add strnlen.c.
8357 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
8358 lib-prefix.m4, po.m4.
8359
dd5f2af2
PE
8360 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
8361 in yydestruct diagnostic, since it might not be an error.
8362 Problem reported by Joel Denny near end of
8363 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6250acbd 8364 * data/lalr1.cc (yyerturn): Likewise.
dd5f2af2
PE
8365 * data/yacc.c (yyreturn): Likewise.
8366 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
8367
8368 * src/files.c: Remove obsolete FIXME comment.
8369
8370 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
8371 with the other templates, and to fix bogus run-on messages such
8372 as the one reported at the end of
8373 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
8374 All callers changed to avoid the newline.
8375 (yyprocessOneStack): Output two lines rather than one, to accommodate
8376 the above change. This changes the debug output format slightly.
8377
f9315de5
PE
8378 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
8379 reported by Joel E. Denny in
8380 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
8381 (trivial change).
8382 * tests/glr-regression.at (Duplicate representation of merged trees):
8383 New test, from Joel E. Denny in:
8384 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
8385 * THANKS: Add Joel E. Denny.
8386
8387 * configure.ac (AC_INIT): Bump to 2.0c.
8388
04098407
PE
83892005-07-24 Paul Eggert <eggert@cs.ucla.edu>
8390
8391 * NEWS: Version 2.0b.
8392
ca5d2013
PE
8393 * Makefile.am (SUBDIRS): Put examples before tests, so that
8394 "make check" doesn't finish with "All 1 tests passed".
8395
3d54b576
PE
8396 * tests/regression.at (Token definitions): Don't rely on
8397 AT_PARSER_CHECK for data that contains backslashes. It currently
8398 uses 'echo', and 'echo' isn't portable if its argument contains
8399 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
8400 that the byte '\0xff' is not printable in the C locale; it is,
8401 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
8402 not printable, so use '\0x81' to test.
8403
d53ae497
PE
8404 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
8405 version of GCC, since the macro is used with non-GCC compilers.
8406
fc01665e
PE
8407 Fix core dump reported by Pablo De Napoli in
8408 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
8409 * tests/regression.at (Invalid inputs with {}): New test.
8410 * src/parse-gram.y (token_name): Translate type before using
8411 it as an index.
8412
04098407
PE
8413 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
8414 the user's name space. All uses changed to __attribute__
8415 ((__unused__)).
8416 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
8417 Add __attribute__ ((__noreturn__)).
8418
8419 * etc/clcommit: Remove. We weren't using it, and it failed
8420 "make maintainer-distcheck".
8421 * Makefile.maint: Merge from coreutils.
8422 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
8423 (syntax-check-rules): Change list of rules as described below.
8424 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
8425 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
8426 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
8427 (sc_trailing_space): New rules.
8428 (sc_xalloc_h_in_src): Remove.
8429 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
8430 (sc_space_tab, sc_error_exit_success, sc_changelog):
8431 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
8432 (makefile-check, po-check, author_mark_check):
8433 (makefile_path_separator_check, copyright-check):
8434 Use grep -n, to make it easier to find violations.
8435 Use CVS_LIST and CVS_LIST_EXCEPT.
8436 (header_regexp, h_re): Remove.
8437 (dd_c): New macro.
8438 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
8439 (my-distcheck): Use more-modern GCC flags.
8440 (signatures, %.asc): Remove.
8441 (rel-files, announcement): Remove signatures.
8442 Restore old updating code, even though we don't use it, so
8443 that we're the same as coreutils.
8444 (alpha, beta, major): Depend on news-date-check.
8445 Make the upload commands.
8446
8447 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
8448 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
8449 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
8450 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
8451 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
8452 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
8453 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
8454 * tests/sets.at: Likewise.
8455
8456 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
8457 we comment out the Autoconf version number.
8458 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
8459 it's error-prone and "make maintainer-distcheck" rejects it.
8460
8461 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
8462 Indent calls to "error" to pacify "make maintainer-distcheck",
8463 when the calls are not intended to be translated.
8464 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
8465
8466 * src/Makefile.am (DEFS): Use +=, to pacify
8467 "make maintainer-distcheck".
8468 (bison_SOURCES): Add scan-skel.h.
8469 (sc_tight_scope): New rule, from coreutils.
8470
8471 * src/files.c (src_extension, header_extension):
8472 Now static, not extern.
8473 * src/getargs.c (short_options): Likewise.
8474 * src/muscle_tab.c (muscle_table): Likewise.
8475 * src/parse-gram.y (current_class, current_type, current_prec):
8476 Likewise.
8477 * src/reader.c (grammar_end, previous_rule_end): Likewise.
8478 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
8479 * src/main.c (main): Cast bindtextdomain and textdomain calls to
8480 void, to avoid warning when NLS is disabled.
8481 * src/output.c: Include scan-skel.h.
8482 (scan_skel): Remove decl, since scan-skel.h does this.
8483 (output_skeleton):
8484 Indent calls to "error" to pacify "make maintainer-distcheck".
8485 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
8486 * src/reader.h (gram_end, gram_lineno): New decls to pacify
8487 "make maintainer-distcheck".
8488 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
8489 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
8490 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
8491 (skel_lex_destroy, scan_skel): Move these decls to...
8492 * src/scan-skel.h: New file.
8493 * src/uniqstr.c (uniqstr_assert):
8494 Indent calls to "error" to pacify "make maintainer-distcheck".
8495
8496 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
8497 not @VAR@.
8498
8499 * tests/torture.at: Revamp to avoid misuse of atoi that
8500 "make maintainer-distcheck" complained about.
8501
8502 * examples/extexi (message): Don't print a message more than once,
8503 and omit line-number decoration that makes Emacs compile think
8504 that informative messages are worth worrying about.
8505
85062005-07-22 Paul Eggert <eggert@cs.ucla.edu>
8507
8508 * configure.ac: Update version number.
8509
8510 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
8511 accidentally.
8512 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
8513 autogenerated by the maintainer.
8514 * examples/calc++/.cvsignore: Add *.yy.
8515
8516 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
8517 * lib/bitset_stats.c (bitset_stats_init): Likewise.
8518 * lib/bitsetv.c (bitsetv_alloc): Likewise.
8519
8520 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
8521
8522 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
8523 from maintainer-distcheck about casting the argument of 'free'.
8524
8525 * NEWS: Mention recent yytname changes.
8526 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
8527
8528 * bootstrap: For translations that have not yet been upgraded to
8529 the new runtime-po domain, prime the pump by extracting the
8530 relevant strings from the obsolete translations. This code can be
8531 removed once the bison-runtime domain has been translated by each
8532 team.
8533
8534 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
8535 now that token names are already quoted.
8536
8537 Fix problem reported by Anthony Heading.
8538 * data/glr.c (YYTOKEN_TABLE): New macro.
8539 (yytname): Define if YYTOKEN_TABLE.
8540 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
8541 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
8542 (YYERROR_VERBOSE): Define the same way the other skeletons do.
8543 * src/output.c (prepare_symbols): Output token_table_flag.
8544
0ffda363
PE
85452005-07-21 Paul Eggert <eggert@cs.ucla.edu>
8546
8547 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
8548 again if the first call fails.
8549
8550 * data/glr.c (yytnamerr): New function.
8551 (yyreportSyntaxError): Use it to dequote most string literals.
8552 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
8553 with other skeletons. All uses changed.
8554 (yytnameerr_): New function.
8555 (yyreport_syntax_error): Use it to dequote most string literals.
8556 * data/yacc.c (yytnamerr): New function.
8557 (yyerrlab): Use it to decode most string literals.
8558 * doc/bison.texinfo (Decl Summary, Calling Convention):
8559 Clarify quoting convention of yytname.
8560 * src/output.c (prepare_symbols): Quote all names. This undoes
8561 the 2005-04-17 change, which is now accomplished (mostly) via
8562 changes in the parsers as described above.
8563 * tests/regression.at (Token definitions, Web2c Actions):
8564 Undo most 2005-04-17 change here, too.
8565
85662005-07-20 Paul Eggert <eggert@cs.ucla.edu>
8567
8568 Fix more problems reported by twlevo@xs4all.nl.
8569 * tests/cxx-type.at: Don't pipe output of ./types through sed to
8570 remove trailing spaces. This loses the exit status of ./types,
8571 and isn't needed since ./types shouldn't be emitting trailing
8572 spaces.
8573 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
8574 as the stack isn't valid in that case.
8575
8576 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
8577 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
8578 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
8579 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
8580 is used.
8581 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
8582 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
8583 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
8584 Likewise.
8585
8586 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
8587 overly-picky compilers that reject 'char *foo = "bar";'.
8588
8589 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
8590 to FILE * parameter, not to stderr. This fixes a typo introduced
8591 in the 2005-07-12 change.
8592
8593 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
8594 warnings from GCC 4.
8595
8596 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
8597 (yyglrShiftDefer, yysplitStack):
8598 Remove unused parameters b4_pure_formals. All uses changed.
8599 (yyglrShift): Remove unused parameters b4_user_formals.
8600 All uses changed.
8601 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
8602
6100a9aa
PE
86032005-07-18 Paul Eggert <eggert@cs.ucla.edu>
8604
258b75ca
PE
8605 Destructor cleanups and regularization among the three skeletons.
8606 * NEWS: Document the behavior changes.
8607 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
8608 stack before failing, as the cleanup code will do it for us now.
8609 * data/lalr1.cc (yyerrlab): Likewise.
8610 * data/glr.c (yyparse): Pop everything off the stack before
8611 freeing it, so that destructors get called properly.
8612 * data/lalr1.cc (yyreturn): Likewise.
8613 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
8614 This is more consistent.
8615 * doc/bison.texinfo (Destructor Decl): Mention more reasons
8616 why destructors might be called. 1.875 -> 2.1.
8617 (Destructor Decl, Decl Summary, Table of Symbols):
8618 Some English-language cleanups for %destructor.
8619 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
8620 Add output line for destructor of start symbol.
8621 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
8622 because of that same extra output line.
8623
1a059451
PE
8624 * NEWS: Document minor wording changes in diagnostics of
8625 Bison-generated parsers.
8626 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
8627 Remove unused formals. All uses changed.
8628 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
8629 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
8630 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
8631 Rename yyoverflowab to yyexhaustedlab.
8632 When memory exhaustion occurs during syntax-error reporting,
8633 report it separately rather than in a single diagnostic; this
8634 eases translation.
8635 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
8636 (Memory Exhausted): Renamed from Parser Stack Overflow.
8637 Revamp wording slightly to prefer "memory exhaustion".
8638 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
8639
97460c78
PE
8640 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
8641
30757c8c
PE
8642 Add i18n support to the GLR skeleton. Partially fix the C++
8643 skeleton; a C++ expert needs to finish this. Remove debugging
8644 msgids; there's little point to having them translated, since they
8645 can be understood only by someone who can read the
8646 (English-language) source code.
8647
8648 Generate runtime-po/bison-runtime.pot automatically, so that we
8649 don't have to worry about garbage getting in that file. We'll
8650 make sure after the next official release that old msgids don't
8651 get lost. See
8652 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
8653
8654 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
8655 Now auto-generated.
8656 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
8657 Fix typos in explanations of the runtime file.
8658 * bootstrap: Change gettext keyword from YYI18N to YY_.
8659 Use standard Makefile.in.in in runtime-po, since we'll arrange
8660 for backward-compatible bison-runtime.po files in a different way.
8661 * data/glr.c (YY_): New macro, from yacc.c.
8662 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
8663 Translate messages intended for users.
8664 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
8665 the wording in the other skeletons. We don't know that the memory
8666 is virtual.
8667 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
8668 Use same method that yacc.c uses.
8669 Don't translate debugging messages.
8670 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
8671 it doesn't work (yet), and requires C++ expertise to fix.
8672 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
8673 Move defn to a more logical place, to be consistent with other
8674 skeletons.
8675 Don't translate debugging messages.
8676 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
8677 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
8678 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
8679 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
8680
ac8c5689
PE
8681 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
8682 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
8683 void, not int.
8684 * tests/glr-regression.at (Badly Collapsed GLR States):
8685 Likewise.
8686 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
8687 yylex should return 0 at EOF rather than aborting.
8688
6100a9aa
PE
8689 Improve tests for stack overflow in GLR parser.
8690 Problem reported by twlevo@xs4all.nl.
8691 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
8692 All uses removed.
8693 (yyStackOverflow): Just longjmp, but with value 2 so that caller
8694 can handle the problem.
8695 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
8696 (yyparse): New local variable yyresult to record the result.
8697 Use result of setjmp to set it, rather than storing itinto
8698 struct.
8699 (yyDone): Remove label.
8700 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
8701 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
8702 if YYABORT is used).
8703 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
8704 yyparse status; put status > 1 into diagnostic.
8705 Check that status==2 works.
8706 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
8707 Use exit status 3 for failure to open (which shouldn't happen).
8708
15f40952
PE
87092005-07-17 Paul Eggert <eggert@cs.ucla.edu>
8710
67fd79c4
PE
8711 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
8712 1 on syntax error; just let yyparse do its thing.
8713 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
8714 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
8715 (Exploding the Stack Size with Alloca):
8716 (Exploding the Stack Size with Malloc):
8717 Expect exit status 2, not 1, since the parser is supposed to blow
8718 its stack. Problem reported by twlevo@xs4all.nl.
8719
15f40952
PE
8720 * data/glr.c (yyparse): Don't assume that the initial calls
8721 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
8722 Print a stack-overflow message and fail instead.
8723 Initialize the line-number information before creating the stack,
8724 so that the stack-overflow message can report line zero safely.
8725
f32c66b5
PE
87262005-07-14 Paul Eggert <eggert@cs.ucla.edu>
8727
a22ff96f 8728 Fix problems reported by twlevo@xs4all.nl.
e2688cd9
PE
8729 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
8730 (yyuserMerge): Provide a default case if b4_mergers is empty.
8731 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
8732 * tests/glr-regression.at
8733 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
c70fdfcd 8734 Add casts to pacify C++ compilers.
1beb0b24
PE
8735 * tests/glr-regression.at (Improper merging of GLR delayed action
8736 sets): Declare yylex before using it.
f32c66b5 8737 * tests/Makefile.am (maintainer-check-g++): Fix a stray
a22ff96f
PE
8738 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
8739 test for valgrind; valgrind is independent of g++.
8740 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
8741 for compatibility with POSIX 1003.1-2001 (if running coreutils).
8742 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
8743 Use a destructor, so that we can expand the stack. Change
8744 YYSTYPE to char * so that we can free it. Cast result of malloc.
f32c66b5 8745
d741bd1b
PE
87462005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
8747
8748 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
8749 a valgrind failure. Problem reported by twlevo@xs4all.nl.
8750
0410a6e0
PE
87512005-07-13 Paul Eggert <eggert@cs.ucla.edu>
8752
8753 * PACKAGING: New file, suggested by Bruno Haible and taken from
8754 similar wording in gettext's PACKAGING file.
8755 * NEWS: Mention PACKAGING.
8756 * Makefile.am (EXTRA_DIST): Add PACKAGING.
8757
f7ab6a50
PE
87582005-07-12 Paul Eggert <eggert@cs.ucla.edu>
8759
baf785db 8760 * NEWS: Document recent i18n improvements.
f7ab6a50
PE
8761 * bootstrap: Get runtime translations into runtime-po.
8762 Create runtime-po files automatically, if possible.
8763 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
8764 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
8765 does not infringe on the user's name space.
8766 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
8767 * doc/bison.texinfo (Internationalization): Revamp the English
8768 and Texinfo syntax a bit, to try to make it clearer.
8769 (Bison Options, Option Cross Key): Mention --print-localedir.
8770 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
8771 YYENABLE_NLS. Quote a bit more.
8772 * runtime-po/.cvsignore: New file.
8773 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
8774 * runtime-po/Rules-quot: Remove; now created by bootstrap.
8775 * runtime-po/quot.sed: Likewise.
8776 * runtime-po/boldquot.sed: Likewise.
8777 * runtime-po/en@quot.header: Likewise.
8778 * runtime-po/en@boldquot.header: Likewise.
8779 * runtime-po/insert-header.sin: Likewise.
8780 * runtime-po/remove-potcdate.sin: Likewise.
8781 * runtime-po/Makevars: Likewise.
8782 * runtime-po/LINGUAS: Likewise.
8783 * runtime-po/de.po: Likewise; we will rely on the translation project
8784 to maintain this, so "bootstrap" should get it.
0410a6e0 8785 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
f7ab6a50
PE
8786 its value.
8787 * src/main.c (main): Bind the bison-runtime domain, too.
8788
87892005-07-12 Bruno Haible <bruno@clisp.org>
8790
8791 * data/yacc.c: Include <libintl.h> when NLS is enabled.
8792 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
8793 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
8794 * runtime-po: New directory.
8795 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
8796 $(DOMAIN).pot-update rule, so that old messages are never dropped.
8797 * runtime-po/Rules-quot: New file, copied from po/.
8798 * runtime-po/quot.sed: Likewise.
8799 * runtime-po/boldquot.sed: Likewise.
8800 * runtime-po/en@quot.header: Likewise.
8801 * runtime-po/en@boldquot.header: Likewise.
8802 * runtime-po/insert-header.sin: Likewise.
8803 * runtime-po/remove-potcdate.sin: Likewise.
8804 * runtime-po/Makevars: New file.
8805 * runtime-po/POTFILES.in: New file.
8806 * runtime-po/LINGUAS: New file.
8807 * runtime-po/bison-runtime.pot: New file.
8808 * runtime-po/de.po: New file.
8809 * m4/bison.m4: New file.
8810 * Makefile.am (SUBDIRS): Add runtime-po.
8811 (aclocaldir, aclocal_DATA): New variables.
8812 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
8813 Define aclocaldir.
8814 * src/getargs.c (usage): Document --print-localedir option.
8815 (PRINT_LOCALEDIR_OPTION): New enum item.
8816 (long_options): Add --print-localedir option.
8817 (getargs): Handle --print-localedir option.
8818 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
8819 (Internationalization): New section.
8820
22dda0f0
AD
88212005-07-12 Akim Demaille <akim@epita.fr>
8822
8823 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
8824 for consistency with the rest of the code.
8825 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
8826 Add separators.
8827
82b248ad
AD
88282005-07-12 Akim Demaille <akim@epita.fr>
8829
8830 * src/parse-gram.y: Use %printer instead of YYPRINT.
8831
fa0e9314
AD
88322005-07-12 Akim Demaille <akim@epita.fr>
8833
867a3e00
AD
8834 * src/symtab.h, src/symtab.c (symbol_print): New.
8835 * src/symlist.h, src/symlist.c (symbol_list_print): New.
8836 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
8837
88382005-07-12 Akim Demaille <akim@epita.fr>
8839
8840 * data/glr.c (b4_syncline): Fix (swap) the definitions of
fa0e9314
AD
8841 b4_at_dollar and b4_dollar_dollar.
8842
e054b190
PE
88432005-07-11 Paul Eggert <eggert@cs.ucla.edu>
8844
8845 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
8846 and Pennello's paper.
8847
34160ec4
PE
88482005-07-09 Paul Eggert <eggert@cs.ucla.edu>
8849
407d4a75
PE
8850 * data/yacc.c (yyparse): Undo previous patch. Instead,
8851 set yylsp[0] and yyvsp[0] only if the initial action
8852 sets yylloc and yylval, respectively.
8853
34160ec4
PE
8854 * data/yacc.c (yyparse): In the initial action, set
8855 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
8856 This avoids the use of undefined variables if the initial
8857 action does not set yylloc and/or yylval.
8858
c3d5a4a7
PE
88592005-07-07 Paul Eggert <eggert@cs.ucla.edu>
8860
b34d96c1
PE
8861 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
8862 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
8863 Remove from CVS. These files are automatically generated.
8864 * examples/extexi: Clarify that this file is now part of Bison,
8865 not GNU M4, and that it works with any POSIX-compatible Awk.
8866 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
8867 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
8868 so that we also get calc++-parser.yy. Geneate it.
8869 Use $(AWK), not gawk, since any conforming Awk will do.
8870 Put comment before action, since older 'make' can't handle comment
8871 in action.
8872 $(BUILT_SOURCES): List all built sources, not just some of them.
8873 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
8874 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
8875 $($(calc_sources_generated)): Remove unnecessary test for existence
8876 of target. (This had a shell syntax error anyway; a stray "x".)
8877 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
8878 calc++-parser.yy.
8879 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
8880
c3d5a4a7
PE
8881 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
8882 implied by the other modules.
8883
828c373b
AD
88842005-07-06 Akim Demaille <akim@epita.fr>
8885
8886 Bind examples/calc++ to the package.
8887 * examples/calc++/Makefile: Remove, replaced by...
8888 * examples/calc++/Makefile.am: ... this new file.
8889 * examples/calc++/test: Remove input.
8890 * examples/calc++/compile: Remove.
8891 * examples/Makefile.am: New.
8892 * configure.ac, Makefile.am: Adjust.
8893 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
8894
63cb01d6
PE
88952005-07-05 Paul Eggert <eggert@cs.ucla.edu>
8896
fd2df2ed
PE
8897 * data/glr.c (yyFail): Drastically simplify; since the format argument
8898 never had any % directives, we can simply pass it to yyerror.
8899 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
8900 be modified later, as that is the usual style in glr.c.
8901 Problems reported by Paul Hilfinger.
8902
63cb01d6
PE
8903 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
8904 and size overflow errors.
8905 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
8906 in case the user prolog sets feature-test macros like _GNU_SOURCE.
8907 (YYSIZEMAX): New macro.
8908 (yystpcpy): New function, taken from yacc.c.
8909 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
8910 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
8911 so that we don't have to maintain their signatures.
8912 (yyFail): Check for buffer overflow, by using vsnprintf rather
8913 than vsprintf. Allocate a bigger buffer if possible.
8914 Report an error if buffer allocation fails.
8915 (yyStackOverflow): New function.
8916 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
8917 the initialization was successful. It might fail if storage was
8918 exhausted.
8919 (yyexpandGLRStack): Add more checks for storage allocation failure.
8920 Use yyStackOverflow to report failures.
8921 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
8922 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
8923 Don't assume stack number fits in int.
8924 (yysplitStack): Check for storage allocation failure.
8925 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
8926 can print diagnostics on storage allocation failure. All callers
8927 changed.
8928 (yyresolveValue): Use yybool for boolean.
8929 (yyreportSyntaxError): Check for size-calculation overflow.
8930 This code is taken from yacc.c.
8931 (yyparse): Check for storage allocation errors when allocating
8932 the initial stack.
8933
1c59e0a1
AD
89342005-07-05 Akim Demaille <akim@epita.fr>
8935
8936 Extract calc++ from the documentation.
8937 * doc/bison.texinfo (Calc++): Add the extraction marks.
8938 * examples/extexi: New, from the aborted GNU Programming 2E.
8939 Separate the different paragraph of a file with empty lines.
8940 * examples/Makefile: Use it to extract the whole calc++ example.
8941
8a0adb01
AD
89422005-06-24 Akim Demaille <akim@epita.fr>
8943
8944 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
8945 class typedefs.
8946
12545799
AD
89472005-06-22 Akim Demaille <akim@epita.fr>
8948
8949 * doc/bison.texinfo (C++ Language Interface): First stab.
8950 (C++ Parsers): Remove.
8951
99be0235
AD
89522005-06-22 Akim Demaille <akim@epita.fr>
8953
8954 * data/lalr1.cc (yylex_): Honor %lex-param.
8955
0ffd4fd1
AD
89562005-06-22 Akim Demaille <akim@epita.fr>
8957
8958 Start a set of simple examples.
8959 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
8960 * examples/calc++/calc++-driver.hh,
8961 * examples/calc++/calc++-parser.yy,
8962 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
8963 * examples/calc++/compile, examples/calc++/test: New.
8964
0925ebb4
PE
89652005-06-09 Paul Eggert <eggert@cs.ucla.edu>
8966
8967 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
8968 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
8969 which stems from the 2005-05-27 patch.
8970
43d3b664
PH
89712005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8972
8973 * data/glr.c: Modify treatment of unused parameters to permit use
8974 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
8975
3062864d
PE
89762005-05-30 Paul Eggert <eggert@cs.ucla.edu>
8977
8978 Fix infringement on user name space reported by Janos Zoltan Szabo.
8979 * data/yacc.c (yyparse): strlen -> yystrlen.
8980
989b5b8e
AD
89812005-05-30 Akim Demaille <akim@epita.fr>
8982
8983 * data/lalr1.cc (_): New.
8984 Translate the various messages.
8985
bedf57f5
PE
89862005-05-27 Paul Eggert <eggert@cs.ucla.edu>
8987
8988 Fix infringement on user name space reported by Bruno Haible.
8989 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
8990 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
8991 the user's name space.
8992 (alloca): Include <stdlib.h> to get it, if it's not built in.
8993 (YYMALLOC, YYFREE): Define only if needed.
8994 (malloc, free): Declare, but only if needed, as this infringes on
8995 the user name space.
8996
4d1801f1
PE
89972005-05-25 Paul Eggert <eggert@cs.ucla.edu>
8998
8999 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
9000 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
9001 with %d format.
9002 * lib/ebitset.c (min, max): Undef before defining.
9003 * lib/vbitset.c (min, max): Likewise.
9004 * lib/subpipe.c (create_subpipe): Save local variables in case
9005 vfork clobbers them.
9006
90072005-05-24 Bruno Haible <bruno@clisp.org>
9008
9009 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
9010 error message syntax used by gcc-4.0.
9011
b94a9e1e
PE
90122005-05-23 Paul Eggert <eggert@cs.ucla.edu>
9013
85ac3861
PE
9014 * README: Mention m4 1.4.3. Remove obsolete advice about
9015 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
9016
b94a9e1e
PE
9017 * bootstrap: Remove workaround for problem I encountered with
9018 gettext 0.14.1; it seems to be fixed now.
9019
51c30d21
PE
90202005-05-22 Paul Eggert <eggert@cs.ucla.edu>
9021
009ce67d
PE
9022 * NEWS: Version 2.0a.
9023
f2a97c62
PE
9024 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
9025 the previous change.
9026
c8775f93
PE
9027 Various maintainer cleanups.
9028 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
9029 conftest*, for benefit of CVS commands run at the same time as
9030 "configure". Add build-aux, since "bootstrap" now creates it and
9031 its subfiles.
9032 * Makefile.cfg (move_if_change): Remove.
9033 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
9034 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
9035 (po_repo, do-po-update, po-update, wget_files, get-targets):
9036 (config.guess-url_prefix, config.sub-url_prefix):
9037 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
9038 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
9039 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
9040 Remove.
9041 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
9042 this is now the recommended name.
9043 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
9044 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
9045 ylwrap. These files now go into build-aux.
9046 * config/move-if-change: Remove.
9047 * config/prev-version.txt: Bump from 1.75 to 2.0.
9048
3ea5f0ec
PE
9049 * bootstrap: Add stdio-safer, unistd-safer modules.
9050 Remove m4/glibc2.m4 (introduced by latest gnulib, but
9051 we don't need it).
9052 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
9053 fopen-safer.c, stdio-safer.h, unistd-safer.h.
9054 * lib/subpipe.c: Include "unistd-safer.h".
9055 (create_subpipe): Make sure all the newly-created
9056 file descriptors are > 2, so that diagnostics don't
9057 get sent down them (which might cause Bison to hang, in theory).
9058 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
9059 * src/files.c (xfopen): Use fopen_safer, not fopen.
9060
51c30d21
PE
9061 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
9062 yesterday's yacc.c fix.
9063
cea1469d
PE
90642005-05-21 Paul Eggert <eggert@cs.ucla.edu>
9065
3ea5f0ec
PE
9066 * data/glr.c, data/lalr1.cc: Update copyright date.
9067
cea1469d
PE
9068 Fix a destructor bug reported by Wolfgang Spraul in
9069 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
9070 * data/yacc.c (yyabortlab): Don't call destructor, and
9071 don't set yychar to EMPTY.
9072 (yyoverflowlab): Don't call destructor.
9073 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
9074 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
9075 since we no longer output the message "discarding lookahead token
9076 end of input ()".
9077
5e6f62f2
PH
90782005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9079
9080 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
9081 fix a small glitch in debugging output.
9082 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
9083 after YY_SYMBOL_PRINT where needed.
9084
9085 (struct yyGLRState): Add some comments.
9086 (struct yySemanticOption): Add some comments.
9087 (union yyGLRStackItem): Add comment.
9088
9089 (yymergeOptionSets): Correct this to properly perform the union,
9090 avoiding infinite reported by Michael Rosien.
9091 Update comment.
9092
9093 * tests/glr-regression.at: Add test for GLR merging error reported
9094 by M. Rosien.
cea1469d 9095
0fb669f9
PE
90962005-05-13 Paul Eggert <eggert@cs.ucla.edu>
9097
9098 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
9099 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
9100 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
9101 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
9102 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
9103 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
9104 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
9105 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
9106 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
9107 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
9108 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
9109 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
9110 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
9111 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
9112 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
9113 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
9114 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
9115 src/derives.h, src/files.c, src/files.h, src/getargs.c,
9116 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
9117 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
9118 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
9119 src/output.h, src/parse-gram.c, src/parse-gram.h,
9120 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
9121 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
9122 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
9123 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
9124 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
9125 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
9126 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
9127 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
9128 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
9129 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
9130 tests/reduce.at, tests/regression.at, tests/sets.at,
9131 tests/synclines.at, tests/testsuite.at, tests/torture.at:
9132 Update FSF postal mail address.
9133
51f4735e
PE
91342005-05-11 Paul Eggert <eggert@cs.ucla.edu>
9135
9136 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
9137 Problem reported by Ralf Menzel.
9138
80ce3401
PE
91392005-05-01 Paul Eggert <eggert@cs.ucla.edu>
9140
9141 * tests/actions.at: Test that stack overflow invokes destructors.
9142 From Marcus Holland-Moritz.
9143 * data/yacc.c (yyerrlab): Move the code that destroys the stack
9144 from here....
9145 (yyreturn): to here. That way, destructors are called properly
9146 even if the stack overflows, or the user calls YYACCEPT or
9147 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
9148 (yyoverflowlab): Destroy the lookahead.
9149
91502005-04-24 Paul Eggert <eggert@cs.ucla.edu>
9151
9152 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
9153
72f000b0
PE
91542005-04-17 Paul Eggert <eggert@cs.ucla.edu>
9155
9156 * NEWS: Bison-generated C parsers no longer quote literal strings
9157 associated with tokens.
9158 * src/output.c (prepare_symbols): Don't escape strings,
9159 since users don't want to see C escapes.
9160 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
9161 in diagnostics.
c19683bb 9162 * tests/input.at (Torturing the Scanner): Likewise.
72f000b0
PE
9163 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
9164
1094323f
PE
91652005-04-16 Paul Eggert <eggert@cs.ucla.edu>
9166
9167 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
9168 the data size is known to be too small and we can't increase it.
9169 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
9170
ca407bdf
PE
91712005-04-15 Paul Eggert <eggert@cs.ucla.edu>
9172
9173 * src/parse-gram.y: Include quotearg.h.
9174 (string_as_id): Quote $1 before using it as a key, since the
9175 lexer no longer quotes it for us.
9176 (string_content): Don't strip quotes, since lexer no longer
9177 quotes it for us.
9178 * src/scan-gram.l: Include quotearg.h.
9179 ("\""): Omit quote.
9180 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
9181 a key, since the rest of the lexer doesn't quote it.
9182 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
9183 * tests/regression.at (Token definitions): Check for backslashes
9184 in token strings.
9185
9186 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
9187 (YYSIZE_T): Define to unsigned long int when using an older compiler.
9188 (yyparse): Revamp code to generate long syntax error message, to
9189 make it easier to translate, and to avoid problems with arithmetic
9190 overflow. Change "virtual memory" to "memory" in diagnostic, since
9191 we don't know whether the memory is virtual.
9192
1ce59070
PE
91932005-04-13 Paul Eggert <eggert@cs.ucla.edu>
9194
9195 * NEWS: Bison-generated C parsers now use the _ macro to
9196 translate strings.
9197 * data/yacc.c (_) [!defined _]: New macro.
9198 All English strings wrapped inside this macro.
9199 * doc/bison.texinfo (Bison Parser): Document _.
9200 * po/POTFILES.in: Include src/parse-gram.c, since it now
9201 includes translateable strings that parse-gram.y doesn't.
9202
a749a695
PE
92032005-04-12 Paul Eggert <eggert@cs.ucla.edu>
9204
9205 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
9206 reverting the 2004-10-11 change to this function.
9207 (symbol_check_alias_consistency): Don't call symbol_type_set
9208 if the type name is already correct.
9209 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
9210
8fb1053b
PE
92112005-03-25 Paul Eggert <eggert@cs.ucla.edu>
9212
9213 * tests/regression.at (Token definitions): Don't use a token named
9214 c, as that generates a "#define c ..." that runs afoul of buggy
9215 stdlib.h that uses the identifier c as a member of struct
9216 drand48_data. Problem reported by Horst Wente.
9217
ff498c4a
PE
92182005-03-21 Paul Eggert <eggert@cs.ucla.edu>
9219
9220 * bootstrap: Change translation URL from
9221 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
9222 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
9223 redirection glitches. Problem reported by twlevo@xs4all.nl.
9224
65211d70
PE
92252005-03-20 Paul Eggert <eggert@cs.ucla.edu>
9226
9227 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
9228 after operands; POSIX says this isn't portable for the c99 command.
9229
9577fb1f
PE
92302005-03-18 Paul Eggert <eggert@cs.ucla.edu>
9231
9232 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
9233 immediately if a data overrun has occurred; this may help us track
9234 down what may be a spurious failure on MacOS.
9235
78b178f7
PE
92362005-03-17 Paul Eggert <eggert@cs.ucla.edu>
9237
a2599d0f
PE
9238 Respond to problems reported by twlevo@xs4all.nl.
9239
9240 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
9241
78b178f7
PE
9242 * src/vcg.h: Comment fix.
9243 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
9244 (G_CMAX): Change to -1 instead of INT_MAX.
9245
9246 * data/yacc.c (yyparse): Omit spaces before #line.
78b178f7 9247
7296e729
PE
92482005-03-15 Paul Eggert <eggert@cs.ucla.edu>
9249
9250 * src/tables.c (state_number_to_vector_number): Put it inside an
9251 "#if 0", since it's not currently used. Problem reported by
9252 Roland McGrath.
9253
05ac60f3
PE
92542005-03-06 Paul Eggert <eggert@cs.ucla.edu>
9255
9256 * src/output.c (escaped_output): Renamed from
9257 escaped_file_name_output, since we now use it for symbol tags as
9258 well. All uses changed.
9259 (symbol_destructors_output, symbol_printers_output):
9260 Escape symbol tags too.
9261 Problem reported by Matyas Forstner in
9262 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
9263
9264 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
9265 not needed.
9266 * src/output.c (user_actions_output, token_definitions_output,
9267 symbol_destructors_output, symbol_printers_output): Likewise.
9268 * src/reader.c (prologue_augment): Likewise.
9269 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
9270
9271 * src/vcg.c (output_edge): Don't quote linestyle arg.
9272 Problem reported by twlevo@xs4all.nl.
9273
7eb453ac
PE
92742005-02-28 Paul Eggert <eggert@cs.ucla.edu>
9275
9276 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
9277 example, reported by Derek M Jones. Also, make the example even
9278 more outrageous, to better illustrate how bad the problem is.
9279
4c04c52a
PE
92802005-02-24 Paul Eggert <eggert@cs.ucla.edu>
9281
9282 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
9283 putsym. Typo reported by Sebastian Piping.
9284
a61e1620
PE
92852005-02-23 Paul Eggert <eggert@cs.ucla.edu>
9286
9287 * doc/bison.texinfo (Language and Grammar): some -> same
9288 (Epilogue): int he -> in the
9289 Typos reported by Sebastian Piping via Justin Pence.
9290
9ec93868
PE
92912005-02-07 Paul Eggert <eggert@cs.ucla.edu>
9292
9293 * tests/glr-regression.at (Improper handling of embedded actions
9294 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
9295 embedded actions and $-N in GLR parsers", work around an Autoconf bug
9296 with dollar signs in test names.
9297 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
9298 for a similar reason.
9299
73ce7e7e
PE
93002005-01-28 Paul Eggert <eggert@cs.ucla.edu>
9301
9302 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
9303 wants to redefine G_VIEW.
9304
2e72b98e
PE
93052005-01-27 Paul Eggert <eggert@cs.ucla.edu>
9306
9307 * src/vcg.c (get_view_str): Remove case for normal_view.
9308 Problem reported by twlevo@xs4all.nl.
9309
e0d634e5
PE
93102005-01-24 Paul Eggert <eggert@cs.ucla.edu>
9311
ccf830a4
PE
9312 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
9313 Problem reported by twlevo@xs4all.nl.
9314
e0d634e5
PE
9315 * doc/bison.texinfo: Change @dircategory from "GNU programming
9316 tools" to "Software development". Requested by Richard Stallman
9317 via Karl Berry.
9318
7bbc8cb0
PE
93192005-01-23 Paul Eggert <eggert@cs.ucla.edu>
9320
9321 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
9322 Problem reported by twlevo@xs4all.nl.
9323
08b770bc
PE
93242005-01-21 Paul Eggert <eggert@cs.ucla.edu>
9325
9326 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
9327 keyword; it's not needed with modern compilers, and it doesn't
9328 affect correctness with older compilers. Suggested by
9329 twlevo@xs4all.nl.
9330
95f22ad2
PE
93312005-01-17 Paul Eggert <eggert@cs.ucla.edu>
9332
9333 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
9334 gcc -Wswitch-default.
9335 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
9336 * data/yacc.c (yyparse): Likewise.
9337
d229d15c
PE
93382005-01-12 Paul Eggert <eggert@cs.ucla.edu>
9339
9340 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
9341 already. Let config.h define any nonstandard values.
9342
ecadd90f
PE
93432005-01-10 Paul Eggert <eggert@cs.ucla.edu>
9344
9345 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
9346 for the benefit of slower hosts. Problem reported by
9347 Nelson H. F. Beebe.
9348
213744b5
PE
93492005-01-07 Paul Eggert <eggert@cs.ucla.edu>
9350
9351 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
9352 being defined and not used.
9353 * data/lalr1.cc (yyparse): Likewise.
9354 Use "if (false)" rather than "if (0)".
9355
249d3236
PE
93562005-01-05 Paul Eggert <eggert@cs.ucla.edu>
9357
9358 * TODO: Mention that we should allow NUL bytes in tokens.
9359
987cc1fb
PE
93602005-01-02 Paul Eggert <eggert@cs.ucla.edu>
9361
9362 * src/scan-skel.l (<<EOF>>): Don't close standard output.
9363 Problem reported by Hans Aberg.
9364
08fe02d9
PE
93652005-01-01 Paul Eggert <eggert@cs.ucla.edu>
9366
9367 * src/getargs.c (version): Happy new year; update overall
9368 program copyright date from 2004 to 2005.
9369
9370 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
9371 Problem reported by Hans Aberg.
9372 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
9373 (Output file names.): Add a test for the case when standard output
9374 is closed.
9375
010c0266
PE
93762004-12-26 Paul Eggert <eggert@cs.ucla.edu>
9377
9378 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
9379 to fix an oversight in the Bison 2.0 manual.
9380
da12206a
PE
93812004-12-25 Paul Eggert <eggert@cs.ucla.edu>
9382
9383 * NEWS: Version 2.0. Reformat the existing news items since
9384 1.875, so that related items are grouped together.
3a4734aa 9385 * configure.ac (AC_INIT): Bump version to 2.0.
da12206a
PE
9386 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
9387
c935d934
PE
9388 * tests/torture.at (Exploding the Stack Size with Alloca): Set
9389 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
9390 otherwise, we're not testing alloca. Unfortunately there's no
9391 simple way to consult HAVE_ALLOCA here.
9392
da12206a
PE
9393 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
9394 for yymsg, too.
9395
9396 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
9397 hand. This avoids a warning about comparing int to size_t when
9398 GCC warnings are enabled.
9399
0a2c5137
PE
94002004-12-22 Paul Eggert <eggert@cs.ucla.edu>
9401
d7e14fc0
PE
9402 * NEWS: Bison-generated parsers no longer default to using the
9403 alloca function (when available) to extend the parser stack, due
9404 to widespread problems in unchecked stack-overflow detection.
9405 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
9406 responsibility to set it to a positive value. This lets the user
9407 specify a value that is not a preprocessor constant.
9408 * data/yacc.c (YYMAXDEPTH): Likewise.
9409 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
9410 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
9411 to be a compile-time constant. However, explain the constraints on it.
9412 Also, explain the constraints on YYINITDEPTH.
9413 (Table of Symbols): Explain that alloca is no longer the default.
9414 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
9415 to 1.
9416
0a2c5137
PE
9417 * doc/bison.texinfo (Location Default Action): Mention that n must
9418 be zero when k is zero. Suggested by Frank Heckenbach.
9419
e019c247
AD
94202004-12-22 Akim Demaille <akim@epita.fr>
9421
9422 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
9423 (parser::state_type, parser::semantic_type, parser::location_type):
9424 Private, not public.
9425 (parser::parse): Return ints, not bool.
9426 Returning a bool introduces a problem: 0 corresponds to false, and
9427 it seems weird to return false on success. Returning true changes
9428 the conventions for yyparse.
9429 Alternatively we could return void and send an exception.
9430 There is no clear consensus (yet?).
9431 (state_stack, semantic_stack, location_stack): Rename as...
9432 (state_stack_type, semantic_stack_type, location_stack_type): these.
9433 Private, not public.
9434 * tests/c++.at: New.
9435 * tests/testsuite.at, tests/Makefile.am: Adjust.
9436
72731bb7
AD
94372004-12-21 Akim Demaille <akim@epita.fr>
9438
9439 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
9440
9a0d8bec
AD
94412004-12-21 Akim Demaille <akim@epita.fr>
9442
9443 Don't impose std::string for filenames.
9444
9445 * data/lalr1.cc (b4_filename_type): New.
9446 (position::filename): Use it.
9447 (parser.hh): Move the inclusion of stack.hh and location.hh below
9448 the user code, so that needed headers for the filename type can be
9449 included first.
72731bb7
AD
9450 Forward declare them before the user code.
9451 * tests/Makefile.am (check-local, installcheck-local): Pass
9452 TESTSUITEFLAGS to the TESTSUITE.
9a0d8bec 9453
99880de5
AD
94542004-12-20 Akim Demaille <akim@epita.fr>
9455
9456 Use more STL like names: my_class instead of MyClass.
9457
9458 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
9459 (SemanticStack, SemanticType, StateStack, StateType)
9460 (TokenNumberType, Stack, Slice, Traits, Parser::location)
9461 (Parser::value): Rename as...
9462 (location_stack, location_type, rhs_number_type, semantic_stack)
9463 (semantic_type, state_stack, state_type, token_number_type, stack)
9464 (slice, traits, parser::yylloc, parser::yylval): these.
9465
9466 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
9467
9bec482e
PE
94682004-12-19 Paul Eggert <eggert@cs.ucla.edu>
9469
9470 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
9471 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
9472
f6fbd3da
PE
94732004-12-17 Paul Eggert <eggert@cs.ucla.edu>
9474
9475 Remove uses of 'short int' and 'unsigned short int'. This raises
9476 some arbitrary limits. It uses more memory but nowadays that's
9477 not much of an issue.
9478
9479 This change does not affect the generated parsers; that's a different
9480 task, as some users will want to conserve memory there.
9481
9482 Ideally we should use size_t to represent all object counts, and
9483 something like ptrdiff_t to represent signed differences of object
9484 counts; but that will require more code-cleanup than I have the
9485 time to do right now.
9486
9487 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
9488 Use size_t, not int or short int, to count objects.
9489 * src/closure.c (nritemset, closure): Likewise.
9490 * src/closure.h (nritemset, closure): Likewise.
9491 * src/nullable.c (nullable_compute): Likewise.
9492 * src/print.c (print_core): Likewise.
9493 * src/print_graph.c (print_core): Likewise.
9494 * src/state.c (state_compare, state_hash): Likewise.
9495 * src/state.h (struct state): Likewise.
9496 * src/tables.c (default_goto, goto_actions): Likewise.
9497
9498 * src/gram.h (rule_number, rule): Use int, not short int.
9499 * src/output.c (prepare_rules): Likewise.
9500 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
9501 errs, reductions): Likewise.
9502 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
9503 Likewise.
9504 * src/tables.c (vector_number, tally, action_number,
9505 ACTION_NUMBER_MINIMUM): Likewise.
9506 * src/output.c (muscle_insert_short_int_table): Remove.
9507
efeed023
AD
95082004-12-17 Akim Demaille <akim@epita.fr>
9509
9510 * data/lalr1.cc: Extensive Doxygenation.
9511 (error_): Rename as...
9512 (error): this, since it is visible to the user.
9513 Adjust callers.
9514 (Parser::message): Now an automatic variable from...
9515 (Parser::yyreport_syntax_error_): here.
9516 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
9517 Parser::error.
9518 * tests/input.at: Escape $.
9519
bc82c5a5
PE
95202004-12-16 Paul Eggert <eggert@cs.ucla.edu>
9521
9522 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
9523 Parenthesize rhs to avoid obscure problems with mistakes like
9524 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
9525 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
9526 b4_rhs_location): Likewise.
9527 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
9528 b4_rhs_location): Likewise.
9529
fd19f271
AD
95302004-12-16 Akim Demaille <akim@epita.fr>
9531
9532 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
9533 yacc.c: be sure to stay within yycheck_.
9534 * tests/actions.at: Re-enable C++ tests.
9535
10454ea4
AD
95362004-12-16 Akim Demaille <akim@epita.fr>
9537
9538 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
9539 real.
9540
c5b95ccf
AD
95412004-12-16 Akim Demaille <akim@epita.fr>
9542
9543 Use #define to handle the %name-prefix.
9544
9545 * data/glr.c, data/yacc.c: Comment changes.
9546 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
9547 so that one can refer to yylex in the parser file, and have it
9548 renamed, as is the case with other skeletons.
9549
617a8f12
AD
95502004-12-16 Akim Demaille <akim@epita.fr>
9551
9552 Move lalr1.cc internals into yy*.
9553
9554 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
9555 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
9556 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
9557 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
9558 (empty_, final_, terror_, errcode_, ntokens_)
9559 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
9560 (looka_, ilooka_, error_range_, nerrs_):
9561 Rename as...
9562 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
9563 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
9564 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
9565 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
9566 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
9567 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
9568 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
9569 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
9570 these.
9571
1e547e6e
PE
95722004-12-15 Paul Eggert <eggert@cs.ucla.edu>
9573
9574 Fix some problems reported by twlevo at xs4all.
9575 * src/symtab.c (symbol_new): Report an error if the input grammar
9576 contains too many symbols. This is better than calling abort() later.
9577 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
9578 (struct node, struct graph):
9579 Rename member expand to stretch. All uses changed.
9580 (struct graph): Remove member layoutalgorithm. All uses removed.
9581 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
9582 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
9583 All uses changed.
9584 (N_STRETCH): Rename from N_EXPAND. All uses changed.
9585
735d6bd4
AD
95862004-12-15 Akim Demaille <akim@epita.fr>
9587
9588 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
9589 Add more Doxygen comments.
9590 (symprint_, stack_print_, reduce_print_, destruct_, pop)
9591 (report_syntax_error_, translate_): Rename as...
9592 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
9593 (yypop_, yyreport_syntax_error_, yytranslate_): this.
9594
2e1f5829
AD
95952004-12-15 Akim Demaille <akim@epita.fr>
9596
9597 * data/lalr1.cc (lex_): Rename as...
9598 (yylex_): this.
9599 Move the trace here.
9600 Take the %name-prefix into account.
9601 Reported by Alexandre Duret-Lutz.
9602
a3cb6248
AD
96032004-12-15 Akim Demaille <akim@epita.fr>
9604
9605 Simplify the C++ parser constructor.
9606
9607 * data/lalr1.cc (debug_): Rename as...
9608 (yydebug_): so that the parser's internals are always in the yy*
9609 pseudo namespace.
9610 Adjust uses.
9611 (b4_parse_param_decl): Remove the leading comma as it is now only
9612 called as unique argument list.
9613 (Parser::Parser): Remove the constructor accepting a location and
9614 an initial debugging level.
9615 Remove from the other ctor the argument for the debugging level.
9616 (debug_level_type, debug_level, set_debug_level): New.
9617
9618 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
9619 constructor calls.
9620
07fed891
AD
96212004-12-15 Akim Demaille <akim@epita.fr>
9622
9623 Remove b4_root related material: failure experiment
a3cb6248 9624 (which goal was to allow to derive from a class).
07fed891
AD
9625
9626 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
9627 definitions and uses.
9628
e603eaa5
PE
96292004-12-14 Paul Eggert <eggert@cs.ucla.edu>
9630
9631 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
9632 not 2, since it's not portable to subtract 1 from the start of an
9633 array. The new item 0 is never set or used. All uses changed.
9634
9635 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
9636 the default definition of YYLLOC_DEFAULT. Problem reported
9637 by Frank Heckenbach.
9638
fafb007d
PE
96392004-12-12 Paul Eggert <eggert@cs.ucla.edu>
9640
9641 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
9642 the normal case and one for the error case. Just use the
9643 first one uniformly. Problem reported by Frank Heckenbach.
9644 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
9645 use exactly the same macro in both places.
9646 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
9647 so that the normal-case YYRHSLOC works for the error case too.
9648 All uses changed.
9649 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
9650 (YYLLOC_DEFAULT): Use the same macro as glr.c.
9651 * doc/bison.texinfo (Location Default Action): Don't claim that
9652 we have an array of locations. Use the same macro for both glr
9653 and lalr parsers. Mention YYRHSLOC. Mention what happens when
9654 the index is 0.
9655
48814dcd
PE
96562004-12-10 Paul Eggert <eggert@cs.ucla.edu>
9657
a4e1a53b
PE
9658 * HACKING: Update email addresses to send announcements to.
9659
48814dcd
PE
9660 * configure.ac (AC_INIT): Bump version to 1.875f.
9661
337116ba
PE
96622004-12-10 Paul Eggert <eggert@cs.ucla.edu>
9663
9664 * NEWS: Version 1.875e.
9665 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
9666
9667 * src/scan-skel.l: Include "complain.h", for "fatal".
9668
9669 * src/relation.h (relation_print, relation_digraph):
9670 Relation sizes are of type relation_node, not size_t (this is
9671 merely a doc fix, since the two types are equivalent).
9672 (relation_transpose): Relation sizes are of type relation_node,
9673 not int.
9674 * src/relation.c: Likewise.
9675 (top, infinity): Now of type relation_node, not int.
9676 (traverse, relation_transpose): Use relation_node, not int.
9677
9678 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
9679 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
9680 (yyparse): Remove unused local introduced in 2004-10-25 patch.
9681
9682 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
68b082af 9683 specifying whether the test should be skipped. Use it tp
337116ba 9684 specify that the [%defines %skeleton "lalr1.cc"] tests currently
68b082af 9685 fail on some hosts, and should be skipped.
337116ba 9686
da2a7671
PE
96872004-12-08 Paul Eggert <eggert@cs.ucla.edu>
9688
9689 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
9690 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
9691 unless otherwise specified below.
9692
9693 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
9694 to allocate kernel_base, kernel_items, kernel_size, since
9695 they needn't be initialized to 0.
9696 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
9697 * src/closure.c (new_closure): Likewise, for itemset.
9698 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
9699 * src/lalr.c (set_goto_map): Likewise, for temp_map.
9700 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
9701 (build_relations): Likewise for edge, states1, includes.
9702 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
9703 * src/reader.c (packgram): Likewise, for ritem, rules.
9704 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
9705 * src/relation.c (relation_digraph): Likewise for VERTICES.
9706 (relation_transpose): Likewise for new_R, end_R.
9707 * src/symtab.c (symbols_token_translations_init): Likewise for
9708 token_translations.
9709 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
9710 (token_actions): Likewise for yydefact, actrow, conflrow,
9711 conflict_list.
9712 (save_column): Likewise for froms[symno], tos[symno].
9713 (goto_actions): Likewise for state_count.
9714 (pack_table): Likewise for base, pos, check.
9715 (tables_generate): Likewise for width.
9716
9717 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
9718 for initial core. Just have a separate core, so we needn't worry
9719 about whether kernel_size and kernel_base are initialized.
9720
9721 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
9722 kernel_size, kernel_items): Remove unnecessary initialization.
9723 * src/conflicts.c (conflicts): Likewise.
9724 * src/derives.c (derives): Likewise.
9725 * src/muscle_tablc (muscle_insert): Likewise.
9726 * src/relation.c (relation_digraph): Likewise.
9727 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
9728 conflrow, conflict_table, conflict_list, table, check):
9729 Likewise.
9730
9731 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
9732 This is because all callers pass unsigned int.
9733 * src/closure.h (new_closure): Likewise.
9734
9735 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
9736 (build_relations): Initialize includes[i] in all cases.
9737 * src/reader.c (packgram): Always initialize rules[ruleno].prec
9738 and rules[ruleno].precsym. Initialize members in order.
9739 * src/relation.c (relation_transpose): Always initialize new_R[i]
9740 and end_R[i].
9741 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
9742
9743 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
9744 conflict_list[0] was always 0, but now it isn't initialized.
9745
9746 * src/table.c (table_grow): When conflict_table grew, the grown
9747 area wasn't cleared. Fix this.
9748
9749 * lib/.cvsignore: Add strdup.c, strdup.h.
9750 * m4/.cvsignore: Add strdup.m4.
9751
00baeeac
PE
97522004-12-07 Paul Eggert <eggert@cs.ucla.edu>
9753
9754 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
9755 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
9756 GOTO_NUMBER_MAXIMUM, since we occasionally compute
9757 ngotos + 1 without checking for overflow.
9758 (build_relations): Use END_NODE, not -1, to denote end of edges.
9759 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
9760 build_relations): Use goto_number, not int, for goto numbers.
9761 * src/tables.c (save_column, default_goto): Likewise.
9762
be3d9d42
AD
97632004-11-23 Akim Demaille <akim@epita.fr>
9764
9765 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
9766 of #defining from yystype.
9767 Don't typedef yystype, C++ does not need it.
9768 This lets it possible to forward declare it as union.
9769
78e526d5
PE
97702004-11-23 Paul Eggert <eggert@cs.ucla.edu>
9771
9772 * bootstrap (gnulib_modules): Add extensions.
9773 Problem reported by Jim Meyering.
9774
afbb696d
PE
97752004-11-22 Paul Eggert <eggert@cs.ucla.edu>
9776
9777 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
9778 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
9779 src/system.h, src/tables.c: XFREE -> free, to accommodate
9780 recent change to gnulib xalloc.h.
78e526d5 9781 Problem reported by Jim Meyering.
afbb696d 9782
c1f8f16a
AD
97832004-11-17 Akim Demaille <akim@epita.fr>
9784
9785 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
9786
db7e5eb5 97872004-11-17 Akim Demaille <akim@epita.fr>,
9a1e9989
AD
9788 Alexandre Duret-Lutz <adl@gnu.org>
9789
9790 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
9791 changes.
9792 (YYCDEBUG): Adjust.
9793 Use it instead of cdebug_.
9794 (Parser::debug_stream, Parser::set_debug_stream): New.
9795 (Parser::symprint_): Define cdebug_ for temporary backward
9796 compatibility.
9797 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
9798 debug_stream ().
9799
68e11668
AD
98002004-11-17 Akim Demaille <akim@epita.fr>
9801
9802 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
9803 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
9804 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
9805 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
9806
97cbc73e
PE
98072004-10-27 Paul Eggert <eggert@cs.ucla.edu>
9808
9809 * data/glr.c (yyloc_default): Remove; not used.
9810 Problem reported by Frank Heckenbach.
9811
e342c3be
AD
98122004-10-25 Akim Demaille <akim@epita.fr>
9813
9814 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
9815 Introduce another definition to address simple location arrays.
9816 (yyGLRStack): New member: yyerror_range.
9817 (yyrecoverSyntaxError, yyparse): Update it.
9818 (yyrecoverSyntaxError): Use it when shifting the error token to
9819 have an accurate range, equivalent to the one computed by both
9820 yacc.c and lalr1.cc.
9821 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
9822 that column numbers start at column 0, as per GNU Coding
9823 Standards, the others tests, and the doc.
9824 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
9825 Adjust to the above change (first column is 0).
9826 And adjust the location of the "<error>", now covering the whole
9827 line.
9828
93602feb 98292004-10-22 Akim Demaille <akim@epita.fr>
04098407 9830 and Paul Eggert <eggert@cs.ucla.edu>
93602feb
PE
9831
9832 Remove some arbitrary limits on goto numbers and relations.
9833 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
9834 initial values, since they're never used.
9835 (set_goto_map): ngotos is now unsigned, so test for overflow
9836 by seeing whether it wraps around to zero.
9837 * src/lalr.h (goto_number): Now size_t, not short int.
9838 (GOTO_NUMBER_MAXIMUM): Remove.
9839 * src/relation.c (relation_print, traverse, relation_transpose):
9840 Check for END_NODE rather than looking at sign.
9841 * src/relation.h (END_NODE): New macro.
9842 (relation_node): Now size_t, not short int.
9843
dba08b04
PE
98442004-10-22 Paul Eggert <eggert@cs.ucla.edu>
9845
9846 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
9847 keyword, not an identifier. Problem reported by Baron Schwartz in
9848 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
9849
df09ef2e
AD
98502004-10-11 Akim Demaille <akim@epita.fr>
9851
9852 * src/symtab.c (symbol_check_alias_consistency): Also check
9853 type names, destructors, and printers.
9854 Reported by Alexandre Duret-Lutz.
9855 Recode the handling of associativity and precedence in terms
9856 of symbol_precedence_set.
9857 Accept no redeclaration at all, not even equal to the previous
9858 value.
9859 (redeclaration): New.
9860 Use it to factor redeclaration complaints.
9861 (symbol_make_alias): Don't set the type of the alias, let
9862 symbol_check_alias_consistency do it as for other features.
9863 * src/symtab.h (symbol): Add new member prec_location, and
9864 type_location.
9865 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
9866 * tests/input.at (Incompatible Aliases): New.
9867
146bc99d
PE
98682004-10-09 Paul Eggert <eggert@cs.ucla.edu>
9869
9870 .cvsignore fixes to accommodate gnulib changes,
9871 and the practice of naming build directories "_build".
9872 * .cvsignore: Add "_*". Sort.
9873 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
9874 * m4/.cvsignore: Add "*_gl.m4".
9875
e503aa60
AD
98762004-10-06 Akim Demaille <akim@epita.fr>
9877
9878 * src/parse-gram.y (add_param): Fix the truncation of trailing
9879 spaces.
9880
b4a20338
AD
98812004-10-05 Akim Demaille <akim@epita.fr>
9882
9883 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
9884 whether the reducion was empty or not. This leaves room to
9885 improve the use of YYLLOC_DEFAULT in such a case.
9886 lalr1.cc is still experimental, so changing this is acceptable.
9887 And finally, there are probably not many users who changed the
9888 handling of locations in GLR, so changing is admissible too.
9889
9890 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
9891 empty reduction, set @$ to an empty location ending the previously
9892 stacked symbol.
9893 Adjust uses to make sure the code is triggered on empty
9894 reductions.
9895 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
9896 expected output: empty reductions have empty locations.
9897
f85a5e6f
AD
98982004-09-29 Akim Demaille <akim@epita.fr>
9899
9900 * data/lalr1.cc: Move towards a more standard C++ coding style
9901 for templates: Class < T > -> Class<T>.
9902
b203fc2c
AD
99032004-09-29 Akim Demaille <akim@epita.fr>
9904
9905 * data/lalr1.cc: Reinstall the former ctor, for sake of
9906 compatibility, but warn it will be removed.
9907 Move towards a more standard C++ coding style (i.e., type *var ->
9908 type* var).
9909
5b7e1e73
PE
99102004-09-27 Paul Eggert <eggert@cs.ucla.edu>
9911
3fee967f
PE
9912 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
9913 since it's less likely to work if NULs are involved in the future.
5b7e1e73 9914
0dcca5c2
AD
99152004-09-27 Akim Demaille <akim@epita.fr>
9916
9917 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
9918
6dde1c82
AD
99192004-09-27 Akim Demaille <akim@epita.fr>
9920
9921 * data/lalr1.cc (b4_parse_param_decl_1): New.
b203fc2c 9922 (b4_parse_param_decl): Use it to have different names between attribute
6dde1c82
AD
9923 and argument names.
9924 (b4_cc_constructor_call): Likewise.
9925
b233d555
AD
99262004-09-24 Akim Demaille <akim@epita.fr>
9927
9928 * src/parse-gram.y (add_param): Strip the leading and trailing
9929 blanks from a formal argument declaration.
9930 (YY_LOCATION_PRINT): New.
9931
619404e3
AD
99322004-09-24 Akim Demaille <akim@epita.fr>
9933
9934 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
9935 after the location.
9936
dd8d9022
AD
99372004-09-24 Akim Demaille <akim@epita.fr>
9938
9939 * doc/bison.texinfo (Table of Symbols): Sort.
9940
0092f063
AD
99412004-09-21 Akim Demaille <akim@epita.fr>
9942
9943 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
9944 the useless parentheses.
9945 Suggested by Paul Eggert.
9946
451364ed
AD
99472004-09-20 Akim Demaille <akim@epita.fr>
9948
9949 Let the initial-action act on the look-ahead, and use it for the
9950 "initial push" (corresponding to an hypothetical beginning-of-file).
9951 And let lalr1.cc honor %initial-action.
9952
9953 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
9954 example.
9955 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
9956 (Parser::Parser): Remove the ctor that used to initialize it.
9957 (Parser::parse): Like in the other skeletons, issue the "starting
9958 parse" message before any action.
9959 Honor %initial-action.
9960 Initialize the stacks with the lookahead.
9961 * data/yacc.c: Let $$ and @$ in %initial-action designate the
9962 look-ahead.
9963 Push them in the stacks.
9964 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
9965
18d192f0
AD
99662004-09-20 Akim Demaille <akim@epita.fr>
9967
9968 * doc/bison.texinfo (Initial Action Decl): New.
9969
b8458aa5
AD
99702004-09-20 Akim Demaille <akim@epita.fr>
9971
9972 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
9973 clearer criterion to define it.
9974 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
9975 When reducing on an empty RHS, use the latest stacked location as
9976 location.
9977 yylloc is not always available.
9978 * data/glr.c: Likewise.
9979 Also, honor initial-actions.
9980
3fc16193
AD
99812004-09-20 Akim Demaille <akim@epita.fr>
9982
9983 * data/yacc.c (YY_LOCATION_PRINT): New.
9984 Define when we know YYLTYPE's structure, i.e., when the default
9985 YYLLOC_DEFAULT is used.
9986 * data/c.m4 (b4_yysymprint_generate): Use it.
9987 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
9988 value of the result.
9989 (error_start_): Replace with...
9990 (error_range_): this location array.
9991 This allows to replace code relying on the implementation of
9992 locations by portable code.
9993 * data/yacc.c (yylerrsp): Replace with...
9994 (yyerror_range): this.
9995 Every time a token is popped, update yyerror_range[0], to have an
9996 accurate location for the error token.
9997 * data/glr.c (YY_LOCATION_PRINT): New.
9998 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
9999 deference a pointer.
10000 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
10001 report the location in %printers.
10002
10003 * src/scan-skel.l: Instead of abort, report error messages to ease
10004 understanding skeleton scanning failures.
10005
ecfe33e7
AD
100062004-09-16 Akim Demaille <akim@epita.fr>
10007
10008 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
10009 (iterator, const_iterator): these, to be more in the C++ spirit.
10010 Also, return reverse iterators so that when displaying the stack
10011 we display its bottom first.
10012 (Parser::stack_print_, Parser::reduce_print_): Match the messages
10013 from yacc.c.
10014 We should probably use vector here though.
10015
1576d44d
AD
100162004-09-16 Akim Demaille <akim@epita.fr>
10017
10018 Have more complete shift traces.
10019
10020 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
10021 to report Shifts instead of ad hoc YYDPRINTF invocations,
10022 including for the error token.
10023 * data/lalr1.cc (symprint_): Output the location.
10024 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
10025 output the location within the %printer.
10026 Activate GLR tests, at least to make sure they compile properly.
10027 They still don't pass though.
10028 * tests/calc.at: Adjust expect verbose output, since now "Entering
10029 state..." is on a different line than the "Shifting" message.
10030
9c66f418
AD
100312004-09-08 Akim Demaille <akim@epita.fr>
10032
10033 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
10034 Bison directive from the Bison file to the invocation of this
10035 macro, so that these directives are passed to
10036 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
10037 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
10038 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
10039 the extra Bison directives instead of the whole series.
10040 Change the grammar so that there are recoverable errors, and
10041 unrecoverable errors. Now we can have the parser give up before
10042 consuming the whole input. As a result we now can observe that
10043 the lookahead is freed when needed.
10044 Change the parser source to parse argv[1] instead of a hard coded
10045 string.
10046 Simplify yylex, and give a value and location to EOF.
10047 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
10048 passed directives already coded in the file.
10049 Add some tests to check the location of "error".
10050 For some tests, the C++ parser is correct, and not yacc.c.
10051 For other tests, they provide different, but unsatisfying, values,
10052 so keep the C++ value so that at least one parser is "correct"
10053 according to the test suite.
10054 (Actions after errors): Remove, this is subsumed by the
10055 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
10056
52d5733f
AD
100572004-09-06 Akim Demaille <akim@epita.fr>
10058
10059 * data/lalr1.cc: Adjust the indentation of the labels.
04098407 10060 (Parser::pop): New.
52d5733f
AD
10061 Use it.
10062
a0e68930
AD
100632004-09-06 Akim Demaille <akim@epita.fr>
10064
10065 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
10066 argument, an informative message.
10067 Call YY_SYMBOL_PRINT.
10068 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
10069 * data/lalr1.cc (destruct_): Likewise.
10070 In addition, no longer depend on b4_yysymprint_generate and
10071 b4_yydestruct_generate to generate these functions, do it "by
10072 hand".
10073
e757bb10
AD
100742004-09-03 Akim Demaille <akim@epita.fr>
10075
10076 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
10077 invoked, yydestruct the lookahead.
10078 * tests/calc.at (Calculator $1): Update the expected lengths of
10079 traces: there is an added line for the discarded lookahead.
10080 * doc/bison.texinfo (Destructor Decl): Some rewording.
10081 Define "discarded" symbols.
10082
0fe1f06d
AD
100832004-09-02 Akim Demaille <akim@epita.fr>
10084
10085 * data/lalr1.cc (translate_, destruct_): No reason to be static.
10086
284acc8b
AD
100872004-09-02 Akim Demaille <akim@epita.fr>
10088
10089 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
10090 (YYDSYMPRINTF): Rename as...
10091 (YY_SYMBOL_PRINT): this.
10092 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
10093 two.
10094 Use it instead of direct symprint_ calls.
10095 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
10096 one.
10097
a5eb1ed2
AD
100982004-09-02 Akim Demaille <akim@epita.fr>
10099
b7c72fe1
AD
10100 * data/lalr1.cc (b4_yysymprint_generate): New.
10101 (symprint_): New member function, defined when YYDEBUG.
10102 Use it consistently instead of token/nterm debugging output by
10103 hand.
a5eb1ed2
AD
10104 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
10105 %printer calls to use cdebug_ when using lalr1.cc.
10106
417141dd
AD
101072004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
10108
10109 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
10110 with #ifdef YYDEBUG.
10111
2fa09258
AD
101122004-08-26 Akim Demaille <akim@epita.fr>
10113
10114 * doc/bison.texinfo (Implementing Loops): Rename as...
10115 (Implementing Gotos/Loops): this.
10116
9378b508
PE
101172004-08-13 Paul Eggert <eggert@cs.ucla.edu>
10118
10119 Adjust to latest gnulib.
10120 * bootstrap (gnulib_modules): Add xalloc-die.
10121 Set LC_ALL=C so that file names sort consistently.
10122 Prefer the gnulib copies of gettext.m4, glibc21.m4,
10123 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
10124 uintmax_t.m4, ulonglong.m4.
10125 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
10126 po.m4 since we are now using _gl.m4 instead.
10127
87a8ad5c
PE
101282004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
10129
10130 * src/scan-action.l: Remove. Scanning of semantic actions is
10131 handled in scan-gram.l.
10132
dca81a78
PE
101332004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
10134
10135 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
10136
10137 * src/location.h (struct): The file member is a uniqstr.
10138 (equal_boundaries): Use UNIQSTR_EQ for comparison.
10139
c9cbf7c5
PE
101402004-07-22 Paul Eggert <eggert@cs.ucla.edu>
10141
10142 Fix bug with non-%union parsers that have printers or destructors,
10143 which led to a Bison core dump. Reported by Peter Fales in
10144 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
2fa09258 10145
c9cbf7c5
PE
10146 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
10147 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
10148 not to our own type.
10149 * src/output.c (symbol_destructors_output, symbol_printers_output):
10150 Don't assume %union.
10151 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
10152 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
10153 UNION-FLAG. All callers changed.
10154 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
10155 Use type char, not unsigned int, when declaring an array of char;
10156 this lets us remove a cast.
10157 (Printers and Destructors): Add non-%union test cases.
10158
fa7e68c3
PE
101592004-06-21 Paul Eggert <eggert@cs.ucla.edu>
10160
10161 * doc/bison.texinfo: Minor editorial changes, mostly to the new
10162 GLR writeups. E.g., avoid frenchspacing and the future tense,
10163 change "lookahead" to "look-ahead", and change "wrt" to "with
10164 respect to".
2fa09258 10165
fa7e68c3
PE
101662004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10167
10168 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
10169 New sections, split off from the GLR Parsers section. Put the new
10170 Simple GLR Parser near the start of the GLR section, for clarity.
10171 Rewrite connective text.
10172
99a9344e
PE
101732004-06-21 Frank Heckenbach <frank@g-n-u.de>
10174
10175 * doc/bison.texinfo (Simple GLR Parsers): New section.
10176
8dd162d3
PE
101772004-06-21 Paul Eggert <eggert@cs.ucla.edu>
10178
10179 * NEWS, TODO, doc/bison.texinfo:
10180 Use "look-ahead" instead of "lookahead", to be consistent.
10181 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
10182 while we're fixing "look-ahead".
10183 * src/conflicts.c (shift_set): Renamed from shiftset.
10184 (look_ahead_set): Renamed from lookaheadset.
10185 * src/print.c: Likewise.
10186 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
10187 name for "lookahead".
10188 (report_types, usage): Likewise.
10189 * src/getargs.h (report_look_ahead_tokens): Renamed from
10190 report_lookaheads.
10191 * src/lalr.c (compute_look_ahead_tokens): Renamed from
10192 compute_lookaheads.
10193 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
10194 (look_ahead_tokens_print): Renamed from lookaheads_print.
10195 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
10196 state_rule_lookaheads_print.
10197 * src/state.h: Likewise.
10198 (reductions.look_ahead_tokens): Renamed from lookaheads.
10199 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
10200 AT_DATA_LOOKAHEADS_GRAMMAR.
10201
57a90331
PE
102022004-06-03 Paul Eggert <eggert@cs.ucla.edu>
10203
10204 * README: Update location of patched M4 distribution.
10205
8ed3234a
PE
102062004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
10207
10208 Don't assume the C++ compiler takes the same arguments as the C compiler
10209 (trivial change).
10210 * configure.ac (O0CXXFLAGS): New var.
10211 * tests/atlocal.in (CXXFLAGS): Use it.
10212
07971983
PE
102132004-05-29 Paul Eggert <eggert@cs.ucla.edu>
10214
10215 Fix some "make check" problems with C++ reported by
10216 Albert Chin-A-Young for Tru64 C++ in this thread:
10217 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
10218
10219 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
10220 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
10221 Output to a .cc file for C++, not to a .c file.
10222 * tests/calc.at (AT_CHECK_CALC): Likewise.
10223 * tests/regression.at (AT_CHECK_DANCER): Likewise.
10224 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
10225
29058652
PE
102262004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
10227
10228 * tests/calc.at, tests/actions.at: Workaround for SGI
10229 C++ compiler. (trivial change)
10230
62cb8a99
PE
102312004-05-27 Paul Eggert <eggert@cs.ucla.edu>
10232
fd418816
PE
10233 Spent a few hours checking out which prerequisite versions the
10234 current sources actually require. I went all the way back to
10235 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
10236 a seemingly endless set of combinations of versions more recent
10237 than that. The bottom line is that the current sources require
10238 fairly recent versions of the build tools, and it'll be some work
10239 to change this.
10240 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
10241 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
10242 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
10243 Add comments explaining why those particular versions are
10244 currently needed.
2fa09258 10245
62cb8a99
PE
10246 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
10247 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
161a71f3 10248 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
62cb8a99
PE
10249
10250 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
10251 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
10252
caa52c10
PE
102532004-05-26 Paul Eggert <eggert@cs.ucla.edu>
10254
10255 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
10256 0.11.5. Suggested by Bruno Haible.
10257 * bootstrap: Remove gettext version checking.
10258
10259 * doc/bison.texinfo (Decl Summary): Also mention that %union
10260 can depend on prerequisite types. Problem reported by Tim
10261 Van Holder.
10262
4bfd5e4e
PE
102632004-05-25 Paul Eggert <eggert@cs.ucla.edu>
10264
2cef3017
PE
10265 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
10266 * README-alpha: Don't tell people not to package this.
10267
b9c85d5c
PE
10268 * bootstrap: Don't assume $(...) works; use `...` instead.
10269 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
10270 gettext better.
10271
4bfd5e4e
PE
10272 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
10273 put into the -d output file, and mention what to do if YYSTYPE is
10274 defined as a macro.
10275
6a36ff94
PE
102762004-05-24 Paul Eggert <eggert@cs.ucla.edu>
10277
6712933e
PE
10278 Undo change made earlier today: it caused autopoint to not bring
10279 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
10280 autopoint's.
10281
10282 * bootstrap: Check that gettext version matches what's in
10283 configure.ac. Warn users to ignore robots.txt ERROR 404.
10284 * bootstrap: Undo today's earlier change (logged below).
10285 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
b9c85d5c 10286
6a36ff94
PE
10287 The gettext version checking is causing more trouble than it's
10288 curing; remove it. Problem reported by Paul Hilfinger.
10289
10290 * bootstrap: Issue a warning that one can expect a message
10291 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
10292 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
10293
209ea708
PE
102942004-05-23 Paul Eggert <eggert@cs.ucla.edu>
10295
10296 Ensure that the C++ compiler used for testing actually works on a
10297 simple test program; if not, skip the C++-related tests. Problem
10298 reported by Vin Shelton in:
161a71f3 10299 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
209ea708
PE
10300
10301 * m4/cxx.m4: New file.
10302 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
10303 * tests/atlocal.in (BISON_CXX_WORKS): Add.
10304 * tests/local.at (AT_COMPILE_CXX): Use it.
10305
41ca2549
PE
103062004-05-21 Paul Eggert <eggert@cs.ucla.edu>
10307
383e69dc
PE
10308 * data/glr.c (yylloc): Output this macro even if locations are not
10309 being generated, as the GLR parser needs it even in that case.
10310 Problem reported by Troy A. Johnson
10311 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
10312
41ca2549
PE
10313 * configure.ac (AC_INIT): Update to 1.875e.
10314
e476c87d
PE
103152004-05-21 Paul Eggert <eggert@cs.ucla.edu>
10316
10317 * NEWS: Version 1.875d.
10318 * configure.ac (AC_INIT): Likewise.
10319 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
10320
10321 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
10322 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
10323 lalr1.cc runs afoul of the first, and the last two are no longer
10324 supported by GCC 3.4.0.
10325 * README: Mention GNU m4 1.4 or later; mention m4 patches.
10326 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
10327
233a88ad
PE
103282004-05-06 Paul Eggert <eggert@cs.ucla.edu>
10329
10330 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
10331 unsigned int, for compatibility with latest gnulib hash module.
10332 * src/state.c (state_hash, state_hasher): Likewise.
10333 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
10334 * src/uniqstr.c (hash_uniqstr): Likewise.
e476c87d 10335
12ffdd28
PE
103362004-05-03 Paul Eggert <eggert@cs.ucla.edu>
10337
10338 * NEWS: Unescaped newlines are no longer allowed in char & strings.
10339
10340 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
10341 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
10342 character and string literals.
10343 (unexpected_end): New function.
10344 (unexpected_eof): Use it.
10345 (unexpected_newline): New function.
10346 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
10347 actions.
e476c87d 10348
12ffdd28
PE
10349 * NEWS: Document %expect-rr.
10350
10351 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
10352 Fix typo by replacing $1 with $option.
10353 Remove more 'intl'-related files.
9668e2be 10354 Don't DEFUN AM_INTL_SUBDIR twice.
12ffdd28
PE
10355
10356 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
10357 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
10358 strtoul.c.
10359 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
10360 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
10361 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
10362 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
10363 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
10364 * src/.cvsignore: Add *.output.
10365
10366 * src/parse-gram.y: Put copyright notice inside %{ %} so it
10367 gets copied to the output file.
e476c87d 10368
1f65350a
PE
103692004-04-28 Paul Eggert <eggert@twinsun.com>
10370
10371 Get files from the gnulib and po repositories, instead of relying
10372 on them being in our CVS. Upgrade to latest versions of gnulib
10373 and Automake.
10374
10375 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
10376 * bootstrap: Bootstrap from gnulib and po repositories.
10377 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
10378 * README-cvs: Document these changes. Remove version numbers from
10379 mentions of build tools, since they change so often. Mention Flex.
10380
10381 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
10382 (gl_USE_SYSTEM_EXTENSIONS): Add.
12ffdd28
PE
10383 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
10384 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
1f65350a 10385 does this for us.
12ffdd28
PE
10386 (AC_ISC_POSIX): Remove; we no longer support this
10387 ancient OS, as it gets in the way of latest Autoconf & gnulib.
1f65350a
PE
10388 (AC_HEADER_STDC): Remove: we now assume C89 or better.
10389 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
10390 Do not check for C89 headers, except for locale.h which is used
10391 by the Yacc library and must port to K&R hosts.
10392 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
10393 Do not check for C89 functions, except for setlocale which is
10394 used by the Yacc library.
10395 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
10396 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
10397 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
10398 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
10399 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
10400 AM_GNU_GETTEXT): Remove; now done by:
10401 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
10402 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
10403 for us.
10404
10405 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
10406 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
10407 Define to empty, as gnulib.mk will do the rest for us.
10408 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
10409 for us.
10410 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
10411 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
10412
10413 * src/files.c: Include gnulib's xstrndup.h.
10414
10415 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
10416 (REALLOC): Use xnrealloc, for likewise.
10417 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
10418 (strnlen, memrchr): Remove decls; functions no longer used.
10419 Include <stpcpy.h>.
10420
10421 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
10422 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
10423 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
10424 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
10425 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
10426 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
10427 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
10428 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
10429 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
10430 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
10431 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
10432 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
10433 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
10434 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
10435 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
10436 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
10437 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
10438 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
10439 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
10440 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
10441 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
10442 Remove, as these files are now generated automatically
10443 by bootstrap or automake.
10444
10445 * po/ChangeLog: Remove: all but one entry was a duplicate
10446 of this file, and I moved that 2000-11-02 entry here.
10447
10448 * config/.cvsignore: Add Makefile, depcomp, install-sh.
10449 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
10450 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
10451 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
10452 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
10453 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
10454 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
10455 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
10456 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
10457 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
10458 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
10459 xstrndup.h.
10460 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
10461 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
10462 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
10463 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
10464 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
10465 * src/.cvsignore: Remove *_.c.
10466
10467
10468 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
10469 support it. (The latest stable gzip doesn't.)
10470
104712004-04-27 Paul Eggert <eggert@twinsun.com>
10472
10473 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
10474 case, as stos_ is now used by destructors due to the 2004-02-09
10475 change.
10476
10477 Remove more K&R C support.
10478 * lib/libiberty.y (PARAMS): Remove. All uses removed.
10479 * lib/subpipe.c (errno): Remove decl.
10480 Include <stdlib.h> unconditionally.
10481 (EXIT_FAILURE): Remove macro.
10482 * src/complain.c (vfprintf, strerror): Remove.
10483 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
10484 unconditionally.
10485 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
10486 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
10487 (strchr, strspn, memchr): Remove decls.
10488 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
10489 unconditionally. Do not declare perror.
10490 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
10491 unconditionally.
10492
10493 * src/complain.c (_): Remove useless defn, as system.h defines this.
10494
10495 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
10496 with latest obstack.h.
10497 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
10498 to procedure types, as obstack.h now does that for us.
10499 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
10500
10501 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
10502 so that this include file can stand alone.
10503 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
10504 does this now. Include subpipe.h first after config.h, to
10505 test whether it can stand alone.
10506
10507 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
10508 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
10509 unused declaration.
10510
10511 * tests/synclines.at (%union synch line): Put a dummy member in
10512 the union, because empty unions aren't allowed in C. Caught
10513 by GCC 3.4.0.
10514
4f16766c
PE
105152004-04-13 Jim Meyering <jim@meyering.net>
10516
10517 * src/conflicts.c (conflicts_print): Correct format string typo:
10518 use `%%' to produce literal `%'. (trivial change)
10519
779e7ceb
PE
105202004-03-30 Paul Eggert <eggert@twinsun.com>
10521
10522 * src/getargs.c (version): Update copyright year to 2004.
10523
10524 * data/c.m4 (b4_int_type): Use 'short int' rather than
10525 'short', and similarly for 'long', 'unsigned', etc.
10526 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
10527 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
10528 yy_yypstack, yydumpstack): Likewise.
10529 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
10530 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
10531 Likewise.
10532 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
10533 yy_stack_print, yyparse): Likewise.
10534 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
10535 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
10536 * lib/bitset.c (bitset_print): Likewise.
10537 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
10538 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
10539 * lib/bitsetv.c (bitsetv_dump): Likewise.
10540 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
10541 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
10542 Likewise.
10543 * src/LR0.c (allocate_itemsets): Likewise.
10544 * src/gram.h (rule_number, rule): Likewise.
10545 * src/lalr.h (goto_number): Likewise.
10546 * src/nullable.c (nullable_compute): Likewise.
10547 * src/output.c (prepare_rules): Likewise.
10548 * src/relation.c (relation_print, relation_digraph): Likewise.
10549 * src/relation.h (relation_node): Likewise.
10550 * src/state.h (state_number, transitions, errs, reductions,
10551 struct state): Likewise.
10552 * src/symtab.h (symbol_number, struct symbol): Likewise.
10553 * src/tables.c (vector_number, tally, action_number,
10554 default_goto, goto_actions): Likewise.
10555 * tests/existing.at (GNU Cim Grammar): Likewise.
10556 * tests/regression.at (Web2c Actions): Likewise.
10557
10558 * src/output.c (muscle_insert_short_int_table): Renamed from
10559 muscle_insert_short_table. All uses changed.
10560
d6328241
PH
105612004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10562
10563 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
10564 (declaration): Replace expected_conflicts with expected_sr_conflicts.
10565 Add %expect-rr rule.
4f16766c 10566
d6328241
PH
10567 * src/scan-gram.l: Recognize %expect-rr.
10568
4f16766c 10569 * src/conflicts.h (expected_sr_conflicts): Rename from
d6328241 10570 expected_conflicts.
4f16766c 10571 (expected_rr_conflicts): Declare.
d6328241
PH
10572
10573 * src/conflicts.c (expected_sr_conflicts): Rename from
10574 expected_conflicts.
10575 (expected_rr_conflicts): Define.
10576 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
10577 for GLR parsers.
10578 Use expected_sr_conflicts in place of expected_conflicts.
10579 Warn if expected_rr_conflicts used in non-GLR parser.
4f16766c 10580
d6328241 10581 * doc/bison.texinfo: Add documentation for %expect-rr.
4f16766c 10582
1452af69
PE
105832004-03-08 Paul Eggert <eggert@gnu.org>
10584
10585 Add support for hex token numbers. Suggested by Odd Arild Olsen in
161a71f3 10586 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
1452af69
PE
10587
10588 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
10589 in lalr1.cc.
10590 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
10591 * src/scan-gram.l (scan_integer): New function.
10592 ({int}): Use it.
10593 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
10594 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
10595 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
10596 Say "long int", not "long", for uniformity with GNU style.
10597
006d217d
PE
105982004-02-25 Paul Eggert <eggert@twinsun.com>
10599
10600 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
10601 compilers. This fixes a problem with Intel's C++ compiler being
10602 chatty, reported by Guido Trentalancia in
161a71f3 10603 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
006d217d 10604
c2729758
ADL
106052004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
10606
10607 Support %destructor and merge error locations in lalr1.cc.
10608
10609 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
10610 (Parser::stos_): Define unconditionally.
10611 (Parser::destruct_): New method. Generate its body with
10612 b4_yydestruct_generate.
10613 (Parser::error_start_): New attribute.
10614 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
10615 token which are discarded.
10616 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
10617 error_start_ when erroneous token are discarded.
10618 (Parser::parse) <yyerrlab1>: Compute the location of the error
10619 token so that it covers all the discarded tokens.
10620 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
10621 it can be called with `%skeleton "lalr1.cc"', and do that.
10622
dd0e0635
PE
106232004-02-02 Paul Eggert <eggert@twinsun.com>
10624
10625 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
10626 $(top_srcdir)/lib and ../lib. This fixes a bug reported
10627 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
10628 There's no need to mention top_builddir since Automake does that
10629 for us.
10630 (INCLUDES): Remove, as Automake says it's obsolescent.
10631 Contents migrated into AM_CPPFLAGS as described above.
10632 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
10633
106342004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10635
10636 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
10637 (yyreportSyntaxError): Handle case where lookahead token is
10638 YYEMPTY.
10639
be16239b
PH
106402004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10641
10642 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
10643 resulting parsers are compilable with C++.
10644
5fa90832
PE
106452003-12-23 Paul Eggert <eggert@twinsun.com>
10646
10647 * config/depcomp, config/install-sh: Sync with Automake 1.8.
10648 * src/output.c (output_skeleton): Rename local var.
10649 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
10650 Bison tokens, as this runs afoul of the 2003-10-07 change that
10651 disallowed NUL bytes in character constants or string literals.
10652
10653 * tests/local.at: Require Autoconf 2.59's Autotest.
10654 * tests/testsuite.at: Don't include local.at, since we now assume
10655 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
10656 including it.
10657 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
10658 multiple inclusion warnings.
dd0e0635 10659
b165c324
AD
106602003-12-02 Akim Demaille <akim@epita.fr>
10661
10662 * doc/bison.texinfo (How Can I Reset the Parser): More about start
10663 conditions.
10664 From Bruno Haible.
10665
26e06a21
ADL
106662003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
10667
10668 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
10669
92ac3705
PE
106702003-10-07 Paul Eggert <eggert@twinsun.com>
10671
6a5ecb38
PE
10672 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
10673 if testsuite doesn't exist.
10674
92ac3705
PE
10675 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
10676 literals, unfortunately.
10677 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
10678 Complain about NUL bytes in character constants or string literals.
10679
91d2c560
PE
106802003-10-05 Paul Eggert <eggert@twinsun.com>
10681
10682 * NEWS: Don't document %no-default-prec, as it's still
10683 too experimental.
10684 * doc/bison.texinfo: Document %no-default-prec only if
10685 the defaultprec flag is set. Normally it's not.
10686
0cc3da3a
PE
106872003-10-04 Paul Eggert <eggert@twinsun.com>
10688
10689 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
10690 non-modifiable lvalue, instead of a modifiable one.
10691 * doc/bison.texinfo (Actions): Document that $$ can
10692 be assigned to. Do not claim that $$ and $N are
10693 array element references: user code should not rely on this.
10694
22fccf95
PE
106952003-10-01 Paul Eggert <eggert@twinsun.com>
10696
10697 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
10698 (grammar_declaration): Use it.
10699 * src/scan-gram.l: New token %no-default-prec.
10700 * tests/conflicts.at: Revamp tests to use %no-default-prec.
10701 * NEWS, doc/bison.texinfo: Document the above.
10702
fc8f2965
AD
107032003-10-01 Akim Demaille <akim@epita.fr>
10704
10705 VCG no longer supports long_straight_phase.
10706
10707 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
10708 * src/print_graph.c (print_graph): Adjust.
10709
39a06c25
PE
107102003-09-30 Frank Heckenbach <frank@g-n-u.de>
10711 and Paul Eggert <eggert@twinsun.com>
10712
10713 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
10714 Table of Symbols): Document %default-prec.
10715 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
10716 (grammar_declaration): Set default_prec on %default-prec.
10717 * src/scan-gram.l (%default-prec): New token.
10718 * src/reader.h (default_prec): New flag.
10719 * src/reader.c: Likewise.
10720 (packgram): Handle it.
10721 * tests/conflicts.at (%default-prec without %prec,
10722 %default-prec with %prec, %default-prec 1): New tests.
fc8f2965 10723
39a06c25
PE
107242003-09-30 Paul Eggert <eggert@twinsun.com>
10725
10726 * tests/testsuite.at: Include local.at, not input.at, fixing
10727 a typo in the 2003-08-25 patch.
10728
62b6aef9
AD
107292003-08-27 Akim Demaille <akim@epita.fr>
10730
10731 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
10732 GCC warnings.
10733
89e1cc61
AD
107342003-08-26 Akim Demaille <akim@epita.fr>
10735
10736 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
10737 "<\#" to avoid magic from Gnus when posting parts of this script.
10738
a08460b0
AD
107392003-08-26 Akim Demaille <akim@epita.fr>
10740
10741 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
10742 (Parser::parse): here.
10743 Adjust: nerrs and errstatus is now replaced by...
10744 (Parser::nerrs_, Parser::errstatus_): New.
10745
603f1cfd
AD
107462003-08-25 Akim Demaille <akim@epita.fr>
10747
10748 * config/announce-gen, Makefile.cfg: New.
10749 * Makefile.am: Adjust.
10750 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
10751 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
10752
cd3684cf
AD
107532003-08-25 Akim Demaille <akim@epita.fr>
10754
10755 When reducing initial empty rules, Bison parser read an initial
10756 location that is not defined. This results in garbage, and that
10757 affects Bison's own parser. Therefore we need (i) to extend Bison
10758 to support a means to initialize this location, and (ii) to use
10759 this CVS Bison to fix CVS Bison's parser.
10760
10761 * src/reader.h, reader.c (epilogue_augment): Remove, replace
10762 with...
10763 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
10764 * src/parse-gram.y: Adjust.
10765 (%initial-action): New.
10766 (%error-verbose): Since we require CVS Bison, there is no reason
10767 not to use it.
10768 * src/scan-gram.l: Adjust.
10769 * src/Makefile.am (YACC): New, to make sure we use our own parser.
10770 * data/yacc.c (yyparse): Use b4_initial_action.
10771
4e03e201
AD
107722003-08-25 Akim Demaille <akim@epita.fr>
10773
10774 * doc/bison.texinfo: Don't promote stdout for error messages.
10775
8c182d05
AD
107762003-08-25 Akim Demaille <akim@epita.fr>
10777
10778 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
10779 From Alexandre Duret-Lutz.
10780
6a60c4cf
PE
107812003-08-25 Akim Demaille <akim@epita.fr>
10782
10783 Version 1.875c.
10784
25f66e1a
AD
107852003-08-25 Akim Demaille <akim@epita.fr>
10786
10787 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
10788 Use them.
10789
5348bfbe
AD
107902003-08-25 Akim Demaille <akim@epita.fr>
10791
10792 * data/lalr1.cc (Parser::reduce_print_): New.
10793 Use it.
10794
47301314
AD
107952003-08-25 Akim Demaille <akim@epita.fr>
10796
10797 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
10798 error recovery loops. This patch is based on
161a71f3 10799 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
47301314
AD
10800 Also, augment the similarity between lalr1.cc and yacc.c.
10801 Note: the locations of error recovery rules are not correct yet.
10802
10803 * data/lalr1.cc: Comment changes to augment the similarity between
10804 lalr1.cc and yacc.c.
10805 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
10806 (yyerrlab1): Remove, but where it used to be (now the bottom part of
10807 yyerrlab), when hitting EOF, pop the whole stack here instead of
10808 merely falling thru the default error handling mechanism.
10809 (yyerrorlab): New label, with the old contents of YYERROR,
10810 plus the following change: pop the stack of rhs corresponding
10811 to the production that invoked YYERROR. That is how Yacc
10812 behaves (required by POSIX).
10813 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
10814 fail.
10815
1f7a61ff
AD
108162003-08-25 Akim Demaille <akim@epita.fr>
10817
10818 Tune local.at so that people can "autom4te -l autotest calc.at -o
10819 calc" for instance, to extract a sub test suite.
10820
10821 * tests/testsuite.at: Move the initialization, Autotest version
10822 requirement, and AT_TESTED invocation into...
10823 * tests/local.at: here.
10824 * tests/testsuite.at: Include it for compatibility with Autoconf
10825 2.57.
10826 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
10827 be ignore.
10828
327b5b56
PE
108292003-08-04 Paul Eggert <eggert@twinsun.com>
10830
10831 Rework code slightly to avoid gcc -Wtraditional warnings.
10832 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
10833 The returned value is now stored in *YY0. All callers changed.
10834 * src/output.c (merge_output): Adjust to the above change.
10835
0051e3ed
PE
108362003-07-26 Paul Eggert <eggert@twinsun.com>
10837
10838 * data/glr.c (YYASSERT): New macro.
10839 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
10840 yyresolveStates, yyprocessOneStack):
10841 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
10842 Derived from a suggestion by Frank Heckenbach.
1f7a61ff 10843
137437c6
PE
108442003-07-25 Paul Eggert <eggert@twinsun.com>
10845
5b620e06
PE
10846 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
10847 for portability to K&R C (after ansi2knr, presumably). See
161a71f3 10848 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
5b620e06
PE
10849 by Frank Heckenbach, though I have omitted the structure-initialization
10850 part of his glr-knr.diff patch since I recall that the Portable
10851 C Compiler didn't require that change.
10852
137437c6
PE
10853 Let the user specify how to allocate and free memory.
10854 Derived from a suggestion by Frank Heckenbach in
161a71f3 10855 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
137437c6
PE
10856 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
10857 All uses of free, malloc, realloc changed to use these macros,
10858 and unnecessary casts removed.
10859 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
10860
ddb85ca5
PE
108612003-07-06 Matthias Mann <MatthiasMann@gmx.de>
10862
10863 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
10864 use s.empty() rather than s == "" to test for empty string; see
161a71f3 10865 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
ddb85ca5
PE
10866 (trivial change)
10867
39910e09
AD
108682003-06-25 Akim Demaille <akim@epita.fr>
10869
10870 * config/depcomp, config/install-sh: Update from masters.
10871
0ae99356
PE
108722003-06-20 Paul Eggert <eggert@twinsun.com>
10873
10874 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
10875 and return properly parenthesized result.
10876 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
10877 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
10878 Remove unnecessary parentheses from uses.
10879 * doc/bison.texinfo (Location Default Action): Describe the
10880 conventions for parentheses.
10881
cd05d13c
PE
108822003-06-19 Paul Eggert <eggert@twinsun.com>
10883
81fd08ca
PE
10884 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
10885 yyreportTree): Do not assume that size_t is the same width as int,
10886 when printing sizes. Print sizes using an unsigned format.
10887 Problem reported by Frank Heckenbach in
161a71f3 10888 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
4dcf140b 10889
cd05d13c
PE
10890 Port to Forte Developer 7 C compiler.
10891 * data/glr.c (struct YYLTYPE): If locations are not being used,
10892 declare a single dummy member, as empty structs do not conform
10893 to the C standard.
10894 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
10895 the Forte Developer 7 C compiler complains that end-of-loop
10896 code is not reached.
10897
4dcf140b
PE
108982003-06-17 Paul Eggert <eggert@twinsun.com>
10899
10900 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
10901 avoid warnings from picky compilers about redefinition of PARAMS.
10902
8dd76bee
PE
109032003-06-17 Paul Eggert <eggert@twinsun.com>
10904
10905 Version 1.875b.
10906
10907 * NEWS: Document 1.875b.
10908
10909 * lib/bbitset.h: Do not include config.h; that's the includer's job.
10910 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
10911 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
10912 Don't use 'index' in comments, as it's a builtin fn on some hosts.
10913 * lib/bitset_stats.c: Include gettext.h unconditionally, as
10914 per recent gettext manual's suggestion.
10915 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
10916 Use prototypes, not old-style definitions.
10917 * lib/lbitset.c (lbitset_unused_clear): Likewise.
10918 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
10919 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
10920 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
10921 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
10922 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
10923 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
10924 vbitset_or_and_cmp, vbitset_copy): Likewise.
10925
10926 * lib/libiberty.h: Do not include config.h; that's the includer's job.
10927 Do not include <stdlib.h>.
10928 (PARAMS): Define unconditionally for C89.
10929 (ATTRIBUTE_NORETURN): Remove.
10930 (ATTRIBUTE_UNUSED): Define unconditionally.
10931
10932 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
161a71f3 10933 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
8dd76bee
PE
10934 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
10935 * lib/vbitset.c, lib/vbitset.h: New files.
10936 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
10937 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
10938 from libbitset.
10939
10940 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
10941 `How Can I Reset @code{yyparse}', since texinfo does not allow
10942 arbitrary @ in node names.
10943
10944 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
10945 shouldn't be needed according to the gettext 0.12.1 documentation
10946 but which seem to be needed anyway: codeset.m4 glibc21.m4
f8e8262e 10947 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8dd76bee 10948 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
f8e8262e 10949 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
cd05d13c 10950
8dd76bee
PE
10951 * lib/.cvsignore: Add stdbool.h.
10952 * m4/.cvsignore: Add nls.m4, po.m4.
10953
10954 Upgrade to CVS gnulib.
10955 * stdbool_.h: File renamed from stdbool.h.in.
10956 * configure.ac (AM_STDBOOL_H): Invoke this instead of
10957 AC_HEADER_STDBOOL.
10958 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
10959 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
10960 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
10961 (MOSTLYCLEANFILES): New var.
10962 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
10963 (stdbool.h): New rule.
10964 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
10965 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
10966 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
10967 m4/quote.m4: Upgrade to today's gnulib.
10968
10969 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
10970 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
10971 the tests right now.
10972 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
10973 yyerror are declared before use; C99 requires this.
10974
25005f6a
PH
109752003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10976
10977 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
10978 first.
10979 (yyrecoverSyntaxError): Correct the logic for setting and testing
10980 yyerrState.
10981 Correct comment on handling EOF.
10982 Allow states with only a default reduction, rather than failing
8dd76bee 10983 (I can't quite reconstruct why these were not allowed before).
25005f6a 10984
137437c6 10985 Fixes to avoid problem that $-N rules in GLR parsers can cause
25005f6a 10986 buffer overruns, corrupting state.
8dd76bee
PE
10987
10988 * src/output.c (prepare_rules): Output max_left_semantic_context
25005f6a
PH
10989 definition.
10990 * src/reader.h (max_left_semantic_context): New variable declaration.
10991 * src/scan-gram.l (max_left_semantic_context): Define.
10992 (handle_action_dollar): Update max_left_semantic_context.
10993 * data/glr.c (YYMAXLEFT): New definition.
10994 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
10995 (yyresolveAction): Ditto.
10996
10997 Fixes to problems with location handling in GLR parsers reported by
10998 Frank Heckenbach (2003/06/05).
10999
11000 * data/glr.c (YYLTYPE): Make trivial if locations not used.
11001 (YYRHSLOC): Add parentheses, and define only if locations used.
11002 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
11003 locations not used.
11004 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
11005 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8dd76bee 11006
25005f6a
PH
11007 * tests/cxx-type.at: Exercise location information; update tests
11008 to differentiate output with and without locations.
8dd76bee 11009 Remove forward declarations of yylex and yyerror---caused errors
25005f6a
PH
11010 because default YYLTYPE not yet defined.
11011 Change semantic actions to compute strings, rather than printing
11012 them directly (to test proper passing of semantics values). Change
11013 output to prefix notation and update test data and expected results.
11014 (yylex): Track locations.
11015 (stmtMerge): Return value rather than printing, and include arguments
11016 in value.
8dd76bee 11017
711f40b7
PE
110182003-06-03 Paul Eggert <eggert@twinsun.com>
11019
11020 Avoid warnings generated by GCC 2.95.4 when Bison is
11021 configured with --enable-gcc-warnings.
11022 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
11023 yy::]b4_parser_class_name[::translate_,
11024 yy::Stack::operator[] (unsigned),
11025 yy::Stack::operator[] (unsigned) const,
11026 yy::Slice::operator[] (unsigned),
11027 yy::Slice::operator[] (unsigned) const):
11028 Rename local vars to avoid warnings.
11029 * tests/glr-regression.at (Improper handling of embedded actions
11030 and $-N in GLR parsers): Remove unused local variable from yylex.
11031 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
11032 (void) as arg when not pure, since we now assume C89 when building
11033 Bison. Pacify GCC by using parameter.
11034
ac695f7d
PE
110352003-06-02 Paul Eggert <eggert@twinsun.com>
11036
11037 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
11038 yy::Location::lines, yy::Location::columns): Rename arguments
11039 to avoid shadowing; this removes a warning generated by GCC 3.3.
11040
26ec81e0
PE
110412003-06-01 Paul Eggert <eggert@twinsun.com>
11042
11043 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
11044 to g++, as GCC 3.3 complains if you do it.
11045 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
11046 everything that WARNING_CFLAGS has, except omit warnings
11047 not suitable for C++.
11048 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
11049 * tests/atlocal.in (CXXFLAGS): New var.
11050 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
11051
11052 Fix a GLR parser bug I reported in February; see
161a71f3 11053 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
26ec81e0
PE
11054 The problem was that GLR parsers did not conform to the C standard,
11055 because actions like { $1 = $2 + $3; } expanded to expressions
11056 that invoked YYFILL in separate subexpressions, and YYFILL assigned
11057 to a local variable. The C standard says that expressions
11058 like (var = f ()) + (var = f ()) have undefined behavior.
11059 Another problem was that GCC sometimes issues warnings that
11060 yyfill and its parameters are unused.
11061
11062 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
11063 as possibly unused.
11064 (yyfill): New function.
11065 (YYFILL): Use it.
11066 (yyuserAction): Change type of yynormal to bool, so that it matches
11067 the new yyfill signature. Mark it as possibly unused.
11068
11069
11070 Follow up on a bug I reported in February, where a Bison-generated
11071 parser can loop. Provide a test case and a fix for yacc.c. I
11072 don't have a fix for lalr1.cc or for glr.c, unfortunately.
11073 The original bug report is in:
161a71f3 11074 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
26ec81e0
PE
11075
11076 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
11077 macro's size was becoming unwieldy.
11078 (yyerrlab): Do not discard an empty lookahead symbol, as this
11079 might destroy garbage.
11080 (yyerrorlab): New label, with the old contents of YYERROR,
11081 plus the following change: pop the stack of rhs corresponding
11082 to the production that invoked YYERROR. That is how Yacc
11083 behaves, and POSIX requires this behavior.
11084 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
11085 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
11086 Define 'alarm' to do nothing if unistd.h is not available.
11087 Add a new rule "exp: '-' error;" to test the above change to
11088 data/yacc.c. Use 'alarm' to abort any test taking longer than
11089 10 seconds, as it's probably looping.
11090 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
11091 Also, the new yacc.c generates two fewer diagnostics for an
11092 existing test.
11093
d0829076
PE
110942003-05-24 Paul Eggert <eggert@twinsun.com>
11095
c6ae27df
PE
11096 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
11097 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
11098 This fixes a problem reported by John Bowman when the Compaq/HP
11099 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
11100 -ansi -Wall -gall).
11101 * data/yacc.c (union yyalloc): Likewise.
11102 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
26ec81e0 11103
d0829076
PE
11104 Switch from 'int' to 'bool' where that makes sense.
11105
11106 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
11107 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
11108 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
11109 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
11110 Return or accept bool, not int. All callers changed.
11111 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
11112 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
11113 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
11114 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
11115 bitset_or_and_cmp_): Likewise.
11116 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
11117 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
11118 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
11119 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
11120 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
11121 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
11122 bitset_stats_or_and_cmp): Likewise.
11123 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
11124 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
11125 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
11126 ebitset_xor_cmp): Likewise.
11127 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
11128 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
11129 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
11130 lbitset_xor_cmp): Likewise.
11131 * lib/bbitset.h: Include <stdbool.h>.
11132 (struct bitset_vtable): The following members now return bool, not
11133 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
11134 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
11135 or_and_cmp).
11136 * src/conflicts.c (count_rr_conflicts): Likewise.
11137 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
11138 All uses changed.
11139 * lib/ebitset.c (ebitset_obstack_init): Likewise.
11140 * lib/lbitset.c (lbitset_obstack_init): Likewise.
11141 * src/getargs.c (debug_flag, defines_flag, locations_flag,
11142 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
11143 graph_flag): Likewise.
11144 * src/getargs.h (debug_flag, defines_flag, locations_flag,
11145 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
11146 graph_flag): Likewise.
11147 * src/output.c (error_verbose): Likewise.
11148 * src/output.h (error_verbose): Likewise.
11149 * src/reader.c (start_flag, typed): Likewise.
11150 * src/reader.h (typed): Likewise.
11151 * src/getargs.c (LOCATIONS_OPTION): New constant.
11152 (long_options, getargs): Use it.
11153 * src/lalr.c (build_relations): Use bool, not int.
11154 * src/nullable.c (nullable_compute): Likewise.
11155 * src/print.c (print_reductions): Likewise.
11156 * src/tables.c (action_row, pack_vector): Likewise.
11157 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
11158 * src/output.c (prepare): Use it.
11159 * src/output.c (token_definitions_output,
11160 symbol_destructors_output, symbol_destructors_output): Use string,
11161 not boolean integer, to keep track of whether to output separator.
11162 * src/print_graph.c (print_core): Likewise.
11163 * src/state.c (state_rule_lookaheads_print): Likewise.
11164
11165 * config/install-sh: Sync from automake 1.7.5.
11166
6b2584b7
PE
111672003-05-14 Paul Eggert <eggert@twinsun.com>
11168
11169 * src/parse-gram.y (rules_or_grammar_declaration): Require a
11170 semicolon after a grammar declaration, in the interest of possible
11171 future changes to the Bison input language.
11172 Do not allow a stray semicolon at the start of the grammar.
11173 (rhses.1): Allow one or more semicolons after any rule, including
11174 just before "|" as required by POSIX.
11175 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
11176 grammar.
11177
caf37a36
ADL
111782003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
11179
11180 %parse-param support for lalr1.cc.
11181
11182 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
11183 b4_cc_constructor_calls, b4_cc_constructor_call,
11184 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
11185 definitions.
11186 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
11187 parse-param arguments.
11188 (yy::b4_parser_class_name): Declare instance variables to
11189 hold parse-param arguments.
11190 * tests/calc.at: s/value/semantic_value/ because value clashes
11191 with a member of yy::b4_parser_class_name. Adjust C++ code
11192 to handle %parse-param. Enable %parse-param test in C++.
11193
3ab37077
PE
111942003-05-12 Paul Eggert <eggert@twinsun.com>
11195
11196 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
11197 English a bit. Fix fclose typo. Change "const char" to "char
11198 const", and use ANSI C rather than K&R for "main". Suggest
11199 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
11200 and suggest yy_switch_to_buffer.
11201
112022003-05-05 Paul Eggert <eggert@twinsun.com>
163ab321
PE
11203
11204 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
11205 C89. This avoids a diagnostic on compilers that define __STDC__
11206 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
161a71f3 11207 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
163ab321 11208
e743727f
PE
112092003-05-03 Paul Eggert <eggert@twinsun.com>
11210
11211 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
11212 Do not overrun array bounds.
11213 This should fix a bug reported today by Olatunji Oluwabukunmi in
161a71f3 11214 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
e743727f 11215
916708d5
AD
112162003-04-29 Akim Demaille <akim@epita.fr>
11217
11218 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
11219 * src/getargs.c, src/getargs.h: here, as bool, not int.
11220 (nondeterministic_parser): New.
11221 * src/parse-gram.y, src/scan-gram.l: Support
11222 %nondeterministic-parser.
11223 * src/output.c (prepare): Use nondeterministic_parser instead
11224 of glr_parser where appropriate.
11225 * src/tables.c (conflict_row, action_row, save_row)
11226 (token_actions, token_actions, pack_vector): Ditto.
11227
a06ea4aa
AD
112282003-04-29 Akim Demaille <akim@epita.fr>
11229
11230 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
11231
211074ca
AD
112322003-04-29 Akim Demaille <akim@epita.fr>
11233
11234 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
11235 with %pure-parser and %locations to exercise the patch from Yakov
11236 Markovitch below.
11237
6175ffe3
PE
112382003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
11239
11240 * data/yacc.c: (b4_lex_param): Corrected for the case where
11241 %lex-param is provided and %pure-parser isn't.
11242
b1e95857
PE
112432003-04-27 Paul Eggert <eggert@twinsun.com>
11244
11245 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
161a71f3 11246 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
b1e95857
PE
11247 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
11248 if it is not defined.
11249 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
11250
acda9df6
PE
112512003-04-26 Paul Eggert <eggert@twinsun.com>
11252
3470c57b
PE
11253 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
11254 Declare to be of type suitable for the ninf value itself, not of
11255 type suitable for the corresponding table, since the latter might
11256 be unsigned but the ninf value might be negative. This fixes a
11257 bug reported by Alexandre Duret-Lutz in
161a71f3 11258 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
3470c57b 11259
acda9df6
PE
11260 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
11261 invokes it. We shouldn't invoke it twice because it will attempt
11262 to put error.o in the archive twice. This fixes a glitch reported
11263 by Martin Mokrejs in
161a71f3 11264 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
acda9df6 11265
b5250f26
PE
112662003-04-21 Paul Eggert <eggert@twinsun.com>
11267
11268 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
11269 to gnulib.
11270
089ac0f1
PE
112712003-04-21 Yakov Markovitch <Markovitch@iso.ru>
11272
11273 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
11274 Fix obvious typo that results in uncompilable GLR parsers
11275 when both %pure-parser and %locations are used. (trivial change)
11276
5ededac6
PE
112772003-04-17 Paul Eggert <eggert@twinsun.com>
11278
1b8f2fff
PE
11279 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
11280 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
11281 Do not insert the expected token via unput, as this runs afoul
11282 of a POSIX-compatibility bug in flex 2.5.31.
11283 All uses changed to BEGIN the parent state,
11284 since we no longer insert the expected token via unput.
11285 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
11286 that is no longer emitted after the above change.
11287
5ededac6
PE
11288 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
11289 the first one. This change is from Paul Hilfinger, and it fixes
11290 regression reported by Werner Lemberg in
161a71f3 11291 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5ededac6
PE
11292
11293 (resolve_sr_conflict): Don't invoke state_errs_set
11294 unless one or more tokens have been explicitly made errors.
11295 Otherwise, the above change causes Bison to abort.
11296
11297 * tests/existing.at (GNU pic Grammar): New test case, taken from
11298 Lemberg's email.
11299
b8be9132
AD
113002003-03-31 Akim Demaille <akim@epita.fr>
11301
11302 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
11303
d423d460
AD
113042003-03-31 Akim Demaille <akim@epita.fr>
11305
11306 * src/output.c (prepare_symbols): Avoid trailing spaces in the
11307 output.
11308
c7e441b4
AD
113092003-03-31 Akim Demaille <akim@epita.fr>
11310
11311 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
11312 From Paul Hilfinger.
11313
231897ad
AD
113142003-03-29 Akim Demaille <akim@epita.fr>
11315
11316 * m4/error.m4: Do not put under dynamic conditions some code which
11317 expansion is under static control.
11318
5b066063
AD
113192003-03-29 Akim Demaille <akim@epita.fr>
11320
11321 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
11322
22a74fec
AD
113232003-03-29 Akim Demaille <akim@epita.fr>
11324
11325 * doc/bison.texinfo (Strings are Destroyed): New.
11326
0eee27e7
PE
113272003-03-13 Paul Eggert <eggert@twinsun.com>
11328
11329 * .cvsignore: Add configure.lineno.
11330 * src/.cvsignore: Add yacc.
11331 * tests/.cvsignore: Add testsuite.log.
11332 * doc/fdl.texi: Sync with latest FSF version.
11333
f61aad93
PE
113342003-03-12 Paul Eggert <eggert@twinsun.com>
11335
537636c7
PE
11336 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
11337 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
11338 cursor, instead of leaving it undefined. This fixes a bug
11339 reported by Tim Van Holder in
161a71f3 11340 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
537636c7
PE
11341 * tests/input.at (Torturing the Scanner): Test the scanner on
11342 an empty input file, which was Tim Van Holder's test case.
11343
11344 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
11345 <sys/resource.h> can be included, include sys/time.h and
11346 sys/times.h first, if available. This works around the SunOS
11347 4.1.4 porting bug reported by Bruce Becker in
161a71f3 11348 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
537636c7
PE
11349
11350 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
11351 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
11352 AC_HEADER_SYS_WAIT.
11353
f61aad93
PE
11354 Merge changes from gnulib. This was prompted because the CVS
11355 snapshot didn't build on Solaris 7 due to strnlen problems.
11356
11357 These changes need to be merged back into gnulib:
11358 * lib/hash.c: Include <stdbool.h> unconditionally.
11359 * m4/onceonly.m4 (m4_quote): New macro.
11360 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
11361 Quote AC_FOREACH variable-expansions properly.
11362 The 2003-01-03 obstack.h change also needs merging.
11363 {end of changes requiring merging}
5b066063 11364
f61aad93
PE
11365 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
11366 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
11367 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
11368 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
11369 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
11370 New files, imported from gnulib.
11371 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
11372 above.
11373
11374 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
11375 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
11376 gnulib sources.
11377
11378 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
11379 Add.
11380 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
11381 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
11382 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
11383 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
11384 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
11385 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
11386 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
11387 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
11388 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
11389 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
11390 (jm_PREREQ_ARGMATCH): Remove.
11391 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
11392 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
11393
11394 * src/system.h: Include <stdbool.h> unconditionally.
11395
11396 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
11397 assuming at least C89 in the bitset code for some time now.
11398
d2ffe116
AD
113992003-03-03 Akim Demaille <akim@epita.fr>
11400
11401 * ro.po: New.
11402
052826fd
AD
114032003-03-02 Akim Demaille <akim@epita.fr>
11404
11405 * doc/bison.texinfo (Table of Symbols): Reactivate the
11406 documentation for %lex-param, and %parse-param.
11407
c4749565
AD
114082003-03-02 Akim Demaille <akim@epita.fr>
11409
11410 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
11411 generate verbose error messages.
11412 Use the number of tokens as an upper bound in yytname, as it
11413 cannot be a non terminal.
11414
d5286af1
AD
114152003-03-02 Akim Demaille <akim@epita.fr>
11416
11417 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
11418 message.
11419
22e304a6
AD
114202003-03-02 Akim Demaille <akim@epita.fr>
11421
22e304a6
AD
11422 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
11423 Use them to exercise yycheck overrun.
11424 Based on Andrew Suffield's grammar.
11425
67a25fed
AD
114262003-03-02 Akim Demaille <akim@epita.fr>
11427
11428 Create tests/local.at for Bison generic testing macros.
11429
11430 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
11431 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
11432 This new file.
11433 * tests/calc.at (AT_CHECK_CALC): Adjust.
11434 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
11435 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
11436 * tests/local.at: here.
11437 (AT_COMPILE_CXX): Tags the tests using it as c++.
11438 Ignore the test if CXX is not functional.
11439
9c2b381f
PE
114402003-03-01 Paul Eggert <eggert@twinsun.com>
11441
11442 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
11443 not loc->end, since loc->end might contain garbage and this leads
11444 to undefined behavior on some platforms.
11445 (id_loc, token_start): Use (IF_LINTed) initial values that do not
11446 depend on *loc, so that the reader doesn't give the the false
11447 impression that *loc is initialized.
11448 (<INITIAL>"%%"): Do not bother setting code_start, since its value
11449 does not survive the return.
11450
0433ba88
AD
114512003-03-01 Akim Demaille <akim@epita.fr>
11452
11453 * src/scan-gram.l (code_start): Always initialize it when entering
11454 into yylex, as SC_EPILOGUE is activated *before* the corresponding
11455 yylex invocation. An alternative would be making it static, but
11456 then it starts with the second %%'s beginning, instead of its end.
11457
b305ea69
PE
114582003-02-28 Paul Eggert <eggert@twinsun.com>
11459
11460 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
11461 around a UnixWare 7.1.1 porting bug reported by John Hughes in
161a71f3 11462 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
b305ea69 11463
c3d25e01
PE
114642003-02-26 Paul Eggert <eggert@twinsun.com>
11465
11466 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
11467 Remove Sequent/Pyramid discussion (nobody uses them any more).
11468 Merge VMS and MS-DOS discussion; these ports may well be dead
11469 but let's keep mentioning them for now. Put <> around email
11470 addresses. Add copyright notice.
11471
c267ffbc
PE
114722003-02-24 Paul Eggert <eggert@twinsun.com>
11473
11474 * data/glr.c (yy_reduce_print): yylineno -> yylno,
11475 to avoid collision with flex use of yylineno.
11476 Problem reported by Bruce Lilly in
161a71f3 11477 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
c267ffbc
PE
11478 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
11479 * data/yacc.c (yy_reduce_print): Likewise.
11480
11481 * config/depcomp: Sync with Automake 1.7.3.
11482
f939fc12
AD
114832003-02-21 Akim Demaille <akim@epita.fr>
11484
11485 * data/lalr1.cc: Use temporary variables instead of casts to
11486 change integer types.
11487 Suggested by Paul Eggert.
11488
95923bd6
AD
114892003-02-21 Akim Demaille <akim@epita.fr>
11490
11491 * doc/bison.texinfo: Use "location" consistently to refer to @n,
11492 to avoid confusions with lalr1.cc's notion of Position.
11493 Suggested by Paul Eggert.
11494
2cdc240e
AD
114952003-02-20 Akim Demaille <akim@epita.fr>
11496
11497 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
11498 before initial_columns.
11499 (location.hh): Use consistent variable names when defining the
11500 operator<<.
11501 Use "last" so that we subtract from Positions, not from unsigned.
11502
5d003116
AD
115032003-02-20 Akim Demaille <akim@epita.fr>
11504
11505 * data/lalr1.cc (position.hh): New subfile, including the extended
11506 and Doxygen'ed documentation of class Position.
11507 (location.hh): Use it.
11508 Document a` la Doxygen.
ba1ecc07 11509 With the help of Benoit Perrot.
5d003116 11510
d02b25f9
AD
115112003-02-20 Akim Demaille <akim@epita.fr>
11512
11513 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
11514 AT_YACC_IF.
11515 Redefine AT_YYERROR_SEES_LOC_IF using it.
11516 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
11517 not defined.
11518 Don't use the location in yy::Parser::error_ and
11519 yy::Parser::print_ when not %locations.
11520 Activate more lalr1.cc tests.
11521
0d1c3a04
AD
115222003-02-19 Akim Demaille <akim@epita.fr>
11523
11524 * data/lalr1.cc: When displaying a line number, be sure to make it
11525 an int.
11526
60a777aa
AD
115272003-02-19 Akim Demaille <akim@epita.fr>
11528
11529 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
11530 Remove, useless.
11531 (YYABORT, YYACCEPT, YYERROR): New.
11532 * tests/calc.at: Renable the lalr1.cc test.
11533
0b86fc41
AD
115342003-02-19 Akim Demaille <akim@epita.fr>
11535
11536 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
11537 error recovery, mixing with/without pops and discarding of the
11538 lookahead.
11539 Exercise YYERROR.
11540 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
11541
da99a5dc
PE
115422003-02-17 Paul Eggert <eggert@twinsun.com>
11543
11544 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
11545 * tests/testsuite.at (AT_COMPILE): Use them.
11546 This fixes the testsuite problem reported by Robert Lentz in
161a71f3 11547 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
da99a5dc 11548
93b8c255
PE
115492003-02-12 Paul Eggert <eggert@twinsun.com>
11550
11551 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
11552 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
161a71f3 11553 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
93b8c255
PE
11554 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
11555 Check for malloc failure, for consistency with yacc.c.
11556 (yytname_size): Remove, for consistency with yacc.c.
11557
11558 The bug still remains in data/lalr1.cc, as I didn't have time
11559 to fix it there.
11560
7548fed2
AD
115612003-02-06 Akim Demaille <akim@epita.fr>
11562
11563 * configure.ac (GXX): Rename as...
11564 (CXX): this, to keep the original Autoconf semantics.
11565 Require 2.57.
11566 * data/lalr1.cc: Fix b4_copyright invocations.
11567 If YYDEBUG is not defined, don't depend upon name_ being defined.
11568 (location.hh): Include string and iostream.
11569 (Position::filename): New member.
11570 (Position::Position ()): New.
11571 (operator<< (Position)): New.
11572 (operator- (Position, int)): New.
11573 (Location::first, Location::last): Rename as...
11574 (Location::begin, Location::end): these, to mock the conventional
11575 iterator names.
11576 (operator<< (Location)): New.
11577 * tests/atlocal.in (CXX): New.
11578 * tests/testsuite.at (AT_COMPILE_CXX): New.
11579 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
11580 locations in a more synthetic way.
11581 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
11582 lalr1.cc is used.
11583 Adjust the C locations to match those from Emacs: first column is
11584 column 0.
11585 Change all the expected results.
11586 Conform to the GCS: simplify the locations when applicable.
11587 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
11588 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
11589 these CPP macros with the m4 macros new defined by...
11590 (AT_CHECK_PUSHDEFS): this, i.e.:
11591 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
d02b25f9 11592 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7548fed2
AD
11593 New macros.
11594 (AT_CHECK_POPDEFS): Undefine them.
11595 (AT_CHECK_CALC_LALR1_CC): New.
11596 Use it for the first lalr1.cc test.
11597
43a176ef
AD
115982003-02-04 Akim Demaille <akim@epita.fr>
11599
11600 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
11601 Location as is defined.
11602
fc049e9c
AD
116032003-02-04 Akim Demaille <akim@epita.fr>
11604
11605 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
11606 name_ being defined.
11607
a737b216
PE
116082003-02-03 Paul Eggert <eggert@twinsun.com>
11609
11610 * src/gram.h (start_symbol): Remove unused decl.
11611
11612 Use more-consistent naming conventions for local vars.
11613
11614 * src/derives.c (derives_compute): Change type of local var from
11615 int to rule_number.
11616 * src/gram.c (grammar_rules_partial_print): Likewise.
11617 * src/print.c (print_core): Likewise.
11618 * src/reduce.c (reduce_grammar_tables): Likewise.
11619
11620 * src/gram.c (grammar_dump): Change name of item_number *
11621 local var from r to rp.
11622 * src/nullable.c (nullable_compute): Likewise.
11623
11624 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
11625
11626 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
11627 for symbol or symbol_number var.
11628 * src/reader.c (grammar_start_symbol_set): Likewise.
11629 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
11630 Likewise.
11631 * src/state.c (transitions_to): Likewise.
11632 * src/state.h: Likewise.
11633 * src/tables.c (symbol_number_to_vector_number): Likewise.
11634
11635 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
11636 char * var.
11637
11638 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
11639 var.
11640
11641 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
11642 var.
11643
11644 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
11645 Use str, not s, for char * var. Use ch, not c, for character var.
11646 Use size for size var.
11647
11648 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
11649 char * var.
11650 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
11651 uniqstr var.
11652 * src/uniqstr.h: Likewise.
11653
11654 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
11655 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
11656 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
11657 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
11658 param to have same name as that of enum, so that we don't use
11659 "s" to stand for a non-state.
11660
68e93ad5
AD
116612003-02-02 Akim Demaille <akim@epita.fr>
11662
11663 * src/scan-skel.l: Scan more than one inert character per yylex
11664 invocation.
11665
92898986
PE
116662003-02-01 Paul Eggert <eggert@twinsun.com>
11667
11668 Version 1.875a.
11669
1d9d5d71
PE
11670 * po/LINGUAS: Add ms.
11671
0435d061
AD
116722003-01-30 Akim Demaille <akim@epita.fr>
11673
11674 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
11675
6029a57f
PH
116762003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11677
11678 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
11679 of $1.
0435d061
AD
11680
11681 Changes in response to error report by S. Eken: GLR mode does not
6029a57f 11682 handle negative $ indices or $ indices in embedded rules correctly.
161a71f3 11683 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
0435d061 11684
6029a57f
PH
11685 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
11686 (b4_rhs_location): Ditto.
0435d061 11687 (yyfill): New function to copy from stack tree into array
6029a57f 11688 incrementally.
0435d061
AD
11689 (yyuserAction): Modify to allow incremental move of semantic values
11690 to rhs array when in GLR mode.
11691 Define YYFILL to use in user-defined actions to fill semantic array
6029a57f
PH
11692 as needed.
11693 Remove dummy use of yystack, as there is now a guaranteed use.
11694 (yydoAction): Modify to allow incremental move of semantic values
11695 to rhs array when in GLR mode.
11696 (yyresolveAction): Ditto.
11697 (yyglrShiftDefer): Update comment.
0435d061 11698 (yyresolveStates): Use X == NULL for pointers, not !X.
6029a57f
PH
11699 (yyglrReduce): Ditto.
11700 (yydoAction): Ditto
0435d061 11701
6029a57f
PH
11702 * tests/glr-regr1.at: Rename to ...
11703 * tests/glr-regression.at: Add new regression test for the problems
11704 described above (adapted from S. Eken).
11705 Update copyright notice.
11706 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
11707 * tests/Makefile.am: Ditto.
11708
6cee6297
PE
117092003-01-28 Paul Eggert <eggert@twinsun.com>
11710
11711 * data/lalr1.cc: Do not use @output_header_name@ unless
11712 b4_defines_flag is set. This fixes two bugs reported by
11713 Tim Van Holder in
161a71f3
PE
11714 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
11715 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
6cee6297 11716
b2a836b5
PE
117172003-01-21 Paul Eggert <eggert@twinsun.com>
11718
11719 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
11720 we don't need to worry about yyerrlab1 being reported as an
11721 "unused label" by non-GCC C compilers. The downside is that if
11722 locations are used then a couple of statements are duplicated each
11723 time YYERROR is invoked, but the upside is that the warnings
11724 should vanish.
11725 (yyerrlab1): Move code to YERROR.
11726 (yyerrlab2): Remove. Change uses back to yyerrlab1.
11727 This reverts some of the 2002-12-27 change.
11728
4196b931
PE
117292003-01-17 Paul Eggert <eggert@twinsun.com>
11730
11731 * src/output.c (symbol_printers_output): Fix typo that led
11732 to core dump. Problem reported by Antonio Rus in
161a71f3 11733 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
4196b931 11734
3ae831b4
AD
117352003-01-13 Akim Demaille <akim@epita.fr>,
11736 Quoc Peyrot <chojin@lrde.epita.fr>,
11737 Robert Anisko <anisko_r@lrde.epita.fr>
11738
11739 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
11740 when the stacks contain one element, as the loop would otherwise
11741 free the last state, and then use the top state (the one we just
11742 popped). This means that the initial elements will not be freed
11743 explicitly, as is the case in yacc.c; it is not a problem, as
11744 these elements have fake values.
11745
e3aa65c5
PE
117462003-01-11 Paul Eggert <eggert@twinsun.com>
11747
11748 * NEWS: %expect-violations are now just warnings, reverting
11749 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
11750 bootstrapping problem reported by Matthias Klose; see
161a71f3 11751 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
e3aa65c5
PE
11752 * src/conflicts.c (conflicts_print): Likewise.
11753 * tests/conflicts.at (%expect not enough, %expect too much,
11754 %expect with reduce conflicts): Likewise.
11755 * doc/bison.texinfo (Expect Decl): Document this. Also mention
11756 that the warning is enabled if the number of conflicts changes
11757 (not necessarily increases).
11758
11759 * src/getargs.c (version): Update copyright year.
11760
f0057011
AD
117612003-01-09 Akim Demaille <akim@epita.fr>
11762
11763 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
11764
1ee6d2a0
PE
117652003-01-08 Paul Eggert <eggert@twinsun.com>
11766
11767 * Makefile.maint (WGETFLAGS):
11768 New macro, containing "-C off" to disable proxy caches.
11769 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
11770 (rel-check): Use $(WGET) instead of wget.
11771
d4fd77c4
PE
117722003-01-06 Paul Eggert <eggert@twinsun.com>
11773
11774 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
11775 the GLR paper of Scott, Johnstone and Hussain.
11776
464c6927
PE
117772003-01-04 Paul Eggert <eggert@twinsun.com>
11778
d600ee67
PE
11779 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
11780 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
11781 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
11782 (EXTRA_LIBRARIES): New var, for liby.a.
11783 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
11784 (EXTRA_SCRIPTS): New var, for yacc.
11785
464c6927
PE
11786 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
11787 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
11788 Problem reported by Nelson H. F. Beebe.
11789
117902003-01-03 Paul Eggert <eggert@twinsun.com>
11791
11792 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
11793 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
11794 when compiling Bison 1.875's `bitset bset = obstack_alloc
11795 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
11796
11797 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
11798 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
11799 grow to a huge size with typical invocation.
d600ee67 11800
464c6927
PE
11801 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
11802 Use the pattern recommended by Autoconf 2.57, except also protect
11803 against double-definition.
11804 * src/system.h: Likewise.
11805 Portability issues reported by Nelson H. F. Beebe.
d600ee67 11806
464c6927
PE
11807 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
11808 All uses changed. Provide a definition in both C and C++.
11809 (yytrue, yyfalse): Define even if defined (__cplusplus).
11810
11811 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
11812 Reported by Nelson H. F. Beebe.
d600ee67 11813
464c6927
PE
11814 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
11815
0f42c7d5
PE
118162003-01-02 Paul Eggert <eggert@twinsun.com>
11817
11818 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
11819 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
11820 Bug reported by Nelson H. F. Beebe.
11821
dc546b0f
PE
118222003-01-01 Paul Eggert <eggert@twinsun.com>
11823
11824 * Version 1.875.
11825
2c09b6a7
PE
118262002-12-30 Paul Eggert <eggert@twinsun.com>
11827
11828 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
11829 Moved here from...
11830 (<INITIAL>","): Here. This causes stray "," to be treated
11831 more uniformly.
11832
dc546b0f 11833 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2c09b6a7
PE
11834 last brace in braced code when not in Yacc mode, for compatibility
11835 with Bison 1.35. This resurrects the 2001-12-15 patch to
11836 src/reader.c.
11837
11838 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
11839 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
11840
535c0f63
PE
118412002-12-28 Paul Eggert <eggert@twinsun.com>
11842
11843 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
11844 that of SYM's type. This fixes Debian bug 168069, reported by
11845 Thomas Olsson.
d600ee67 11846
963fcc17
PE
118472002-12-28 Paul Eggert <eggert@twinsun.com>
11848
11849 Version 1.75f.
11850
11851 Switch back to the Yacc style of conflict reports, undoing some
11852 of the 2002-07-30 change.
11853 * doc/bison.texinfo (Understanding): Use Yacc style for
11854 conflict reports. Also, use new way of locating rules.
11855 * src/conflicts.c (conflict_report):
11856 Renamed from conflict_report_yacc, removing the old
11857 'conflict_report'. Translate the entire conflict report at once,
11858 so that we don't assume that "," has the same interpretation in
11859 all languages.
11860 (conflicts_output): Use Yacc-style conflict report for each state,
11861 instead of our more-complicated style.
11862 (conflicts_print): Use Yacc-style conflict report, except print
11863 the input file name when not emulating Yacc.
11864 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
11865 Conflicted Reduction, %expect not enough, %expect too much,
11866 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
11867 * tests/existing.at (GNU Cim Grammar): Likewise.
11868 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
11869
11870 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
11871 fatal): Don't invoke fflush; it's not needed and it might even be
11872 harmful for stdout, as stdout might not be open.
11873 * src/reduce.c (reduce_print): Likewise.
11874
b1efe548
PE
118752002-12-27 Paul Eggert <eggert@twinsun.com>
11876
11877 Fix a bug where error locations were not being recorded correctly.
11878 This problem was originally reported by Paul Hilfinger in
161a71f3 11879 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
b1efe548
PE
11880
11881 * data/yacc.c (yyparse): New local var yylerrsp, to record the
11882 top of the location stack's error locations.
11883 (yyerrlab): Set it. When discarding a token, push its location
11884 onto yylerrsp so that we don't lose track of the error's end.
11885 (yyerrlab1): Now is only the target of YYERROR, so that we can
11886 properly record the location of the action that failed. For GCC
11887 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
11888 GCC warning about yyerrlab1 being unused if YYERROR is unused.
11889 (yyerrlab2): New label, which yyerrlab now falls through to.
11890 Compute the error's location by applying YYLLOC_DEFAULT to
11891 the locations of all the symbols that went into the error.
11892 * doc/bison.texinfo (Location Default Action): Mention that
11893 YYLLOC_DEFAULT is also invoked for syntax errors.
11894 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
11895 Error locations include the locations of all the tokens that were
11896 discarded, not just the last token.
d600ee67 11897
983c5c2c
PE
118982002-12-26 Paul Eggert <eggert@twinsun.com>
11899
b1efe548
PE
11900 * src/files.c: Include quote.h.
11901 (compute_output_file_names): Warn if we detect conflicting
11902 outputs to the same file. This should catch the misunderstanding
11903 exemplified by Debian Bug 165349, reported by Bruce Stephens..
11904
11905 * src/conflicts.c (conflicts_print): If the user specifies
11906 "%expect N", report an error if there are any reduce/reduce
11907 conflicts. This is what the manual says should happen.
11908 This fixes Debian bug 130890, reported by Anthony DeRobertis.
11909 * tests/conflicts.at (%expect with reduce conflicts): New test.
11910
983c5c2c
PE
11911 Don't use m4_include on relative file names, as it doesn't work as
11912 desired if there happens to be a file with that name under ".".
d600ee67 11913
983c5c2c
PE
11914 * m4sugar/version.m4: Remove; it was included but it wasn't used.
11915 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
11916 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
11917 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
11918 * src/output.c (output_skeleton): Use full path names when
11919 specifying a file to include; don't rely on include path, as
11920 it's unreliable when the working file contains a file with
11921 that name.
d600ee67 11922
983c5c2c
PE
119232002-12-25 Paul Eggert <eggert@twinsun.com>
11924
11925 Remove obsolete references to bison.simple and bison.hairy.
11926 Problem mentioned by Aubin Mahe in
161a71f3 11927 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
983c5c2c
PE
11928 * data/glr.c: Comment fix.
11929 * doc/bison.1: Remove references. Also, mention "yacc".
11930
11931 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
11932 with -g option.
11933
11934 * src/parse-gram.y (declaration): Use enum "report_states" rather
11935 than its numeric value 1.
11936
11937 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
11938 opening a new one. This fixes Debian bug 165349, reported by
11939 Bruce Stephens.
11940
23f2d9dc
PE
119412002-12-24 Paul Eggert <eggert@twinsun.com>
11942
11943 Version 1.75e.
11944
11945 * Makefile.maint (cvs-update): Don't assume that the shell
11946 supports $(...), as Solaris sh doesn't.
11947
11948 * src/parse-gram.y (lloc_default): Remove test for empty
11949 nonterminals at the end, since it didn't change the result.
11950
119512002-12-24 Paul Eggert <eggert@twinsun.com>
33167b8b
PE
11952
11953 If the user does not define YYSTYPE as a macro, Bison now declares it
11954 using typedef instead of defining it as a macro. POSIX requires this.
11955 For consistency, YYLTYPE is also declared instead of defined.
11956
11957 %union directives can now have a tag before the `{', e.g., the
11958 directive `%union foo {...}' now generates the C code
11959 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
11960 The default union tag is `YYSTYPE', for compatibility with Solaris 9
11961 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
11962 instead of `yyltype'.
11963
11964 `yystype' and `yyltype' are now obsolescent macros instead of being
11965 typedefs or tags; they are no longer documented and will be
11966 withdrawn in a future release.
11967
11968 * data/glr.c (b4_location_type): Remove.
11969 (YYSTYPE): Renamed from yystype.
11970 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
11971 (struct YYLTYPE): Renamed from struct yyltype.
11972 (YYLTYPE): Renamed from yyltype.
11973 (yyltype, yystype): New (and obsolescent) macros,
11974 for backward compatibility.
11975 * data/yacc.c: Likewise.
11976
11977 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
11978 does not specify a union tag. This is for compatibility with
11979 Solaris 9 yacc.
11980
11981 * src/parse-gram.y (add_param): 2nd arg is now char * not char
11982 const *, since it is now modified by stripping surrounding { }.
11983 (current_braced_code): Remove.
11984 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
11985 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
11986 trailing " {...}". Now of type <chars>.
11987 (grammar_declaration): Adjust to bundled tokens.
11988 (code_content): Remove; stripping is now done by add_param.
11989 (print_token_value): Print contents of bundled tokens.
11990 (token_name): New function.
11991
11992 * src/reader.h (braced_code, current_braced_code): Remove.
11993 (token_name): New decl.
11994
11995 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
11996 token_type, not braced_code code_kind. All uses changed.
11997 (SC_PRE_CODE): New state, for scanning after a keyword that
11998 has (or usually has) an immediately-following braced code.
11999 (token_type): New local var, to keep track of which token type
12000 to return when scanning braced code.
12001 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
dc546b0f 12002 <INITIAL>"%parse-param", <INITIAL>"%printer",
33167b8b
PE
12003 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
12004 instead of returning a token type immediately.
12005 (<INITIAL>"{"): Set token type.
12006 (<SC_BRACED_CODE>"}"): Use it.
12007 (handle_action_dollar, handle_action_at): Now returns bool
12008 indicating success. Fail if ! current_rule; this prevents a core dump.
12009 (handle_symbol_code_dollar, handle_symbol_code_at):
12010 Remove; merge body into caller.
12011 (handle_dollar, handle_at): Complain in invalid contexts.
12012
12013 * NEWS, doc/bison.texinfo: Document the above.
12014 * NEWS: Fix years and program names in copyright notice.
12015
879ca4f8
PE
120162002-12-17 Paul Eggert <eggert@twinsun.com>
12017
12018 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
12019 Reporting, Table of Symbols): Omit mentions of %lex-param and
12020 %parse-param from the documentation for now.
12021
1c5fe69d
PE
120222002-12-15 Paul Eggert <eggert@twinsun.com>
12023
12024 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
12025 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
12026 lookahead symbol, and which sets yychar in parser actions) and it
7ea9026a
PE
12027 disagreed with the Bison documentation. Bug
12028 reported by Andrew Walrond.
d600ee67 12029
1c5fe69d
PE
12030 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
12031 as the caller now does that.
12032 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
12033 (YYEMPTY): Parenthesize right hand side, since others use it.
12034 (yyparse): Don't assume that our generated code is the only code
12035 that sets yychar.
12036
d1de5372
PE
120372002-12-13 Paul Eggert <eggert@twinsun.com>
12038
12039 Version 1.75d.
12040
12041 POSIX requires a "yacc" command.
12042 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
12043 (MOSTLYCLEANFILES): Add yacc.
12044 (yacc): New rule.
1c5fe69d 12045 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
d1de5372
PE
12046 as an alias for bison y.
12047
12048 * po/LINGUAS: Add da.
d600ee67 12049
d1de5372
PE
12050 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
12051 problem with latest <getopt.h>.
12052 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
12053
12054 * doc/fdl.texi: Upgrade to 1.2.
12055 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
12056 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
12057 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
12058 gnulib.
12059 * config/install-sh: Sync with autotools.
12060
12061 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
161a71f3 12062 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
d1de5372
PE
12063 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
12064 locations are requested.
12065 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
12066 locations are requested.
12067
d0f3fe23
PE
120682002-12-12 Paul Eggert <eggert@twinsun.com>
12069
12070 Remove unportable casts and storage allocation tricks.
12071 While we're at it, remove almost all casts, since they
12072 usually aren't needed and are a sign of trouble.
12073
12074 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
12075
12076 * src/derives.c (derives_compute): Do not subtract NTOKENS from
12077 the pointer DSET returned by malloc; this isn't portable.
12078 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
12079 Similarly for DERIVES.
12080 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
12081 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
12082 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
12083
12084 * src/derives.c (derives_compute): Do not bother invoking
12085 int_of_rule_number, since rule numbers are integers.
12086
12087 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
12088 rather than XMALLOC (char, N).
12089
12090 * src/files.c (filename_split): Rewrite to avoid cast.
12091
12092 * src/gram.h (symbol_number_as_item_number,
12093 item_number_as_symbol_number, rule_number_as_item_number,
12094 item_number_as_rule_number):
12095 Now inline functions rather than macros, to avoid casts.
12096 * src/state.h (state_number_as_int): Likewise.
12097 * src/tables.c (state_number_to_vector_number,
12098 symbol_number_to_vector_number): Likewise.
12099
12100 * src/gram.h (int_of_rule_number): Remove; no longer used.
12101
12102 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
12103 since the resulting storage is always stored into.
12104
12105 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
12106 where it's needed.
12107
12108 * src/muscle_tab.c (muscle_m4_output):
12109 Now inline. Return bool, not int.
12110 * src/state.c (state_compare): Likewise.
12111 * src/symtab.c (symbol_check_defined,
12112 symbol_check_alias_consistency, symbol_pack, symbol_translation,
12113 hash_compare_symbol, hash_symbol):
12114 Likewise.
12115 * src/uniqstr.c (uniqstr_print): Likewise.
12116 * src/muscle_tab.c (muscle_m4_output_processor):
12117 New function, to avoid casts.
12118 * src/state.c (state_comparator, stage_hasher): Likewise.
12119 * src/symtab.c (symbol_check_defined_processor,
12120 symbol_check_alias_consistency_processor, symbol_pack_processor,
12121 symbol_translation_processor, hash_symbol_comparator,
12122 hash_symbol_hasher): Likewise.
12123 * src/uniqstr.c (uniqstr_print_processor): Likewise.
12124 * src/muscle_tab.c (muscles_m4_output):
12125 Use new functions instead of casting old functions unportably.
12126 * src/state.c (state_hash_new): Likewise.
12127 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
12128 symbols_token_translations_init):
12129 Likewise.
12130 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
12131
12132 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
12133 var instead of casting to long, to avoid casts.
12134 (prepare_states): Use MALLOC rather than alloca, so that we don't
12135 have to worry about alloca.
12136 * src/state.c (state_hash_lookup): Likewise.
12137
12138 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
12139 local var instead of casting to unsigned char, to avoid casts.
12140
12141 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
12142 STATE_ALLOC): Remove.
12143 (transitions_new, errs_new, reductions_new, state_new): Use malloc
12144 rather than calloc, and use offsetof to avoid allocating slightly
12145 too much storage.
12146 (state_new): Initialize all members.
12147
12148 * src/state.c (state_hash): Use unsigned accumulator, not signed.
12149
12150 * src/symtab.c (symbol_free): Remove; unused.
12151 (symbol_get): Remove cast in lhs of assignment.
12152 (symbols_do): Now static. Accept generic arguments, not
12153 hashing-related ones.
12154
12155 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
12156 (symbol_processor): Remove.
12157 (symbols_do): Remove decl; now static.
12158
12159 * src/system.h (alloca): Remove; decl no longer needed.
12160 (<stddef.h>): Include, for offsetof.
12161 (<inttypes.>, <stdint.h>): Include if available.
12162 (uintptr_t): New type, if system lacks it.
12163 (CALLOC, MALLOC, REALLOC): New macros.
12164 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
12165 new macros.
12166
12167 * src/tables.c (table_size): Now int, to pacify GCC.
12168 (table_grow, table_ninf_remap): Use signed table size.
12169 (save_row): Don't bother initializing locals when not needed.
12170 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
12171 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
12172
12173 * src/vcg.h: Correct misspellings.
12174
12175 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
12176
12177
12178 * src/getargs.c (getargs): Don't assume EOF == -1.
12179
26b4a969
PE
121802002-12-09 Paul Eggert <eggert@twinsun.com>
12181
12182 Change identifier spellings to avoid collisions with names
12183 that are reserved by POSIX.
12184
12185 Don't use names ending in _t, since POSIX reserves them.
12186 For consistency, remove _e and _s endings -- they're weren't
12187 needed to remove ambiguity. All uses changed.
12188 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
12189 turn was just renamed from struniq_t.
12190 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
12191 which in turn was just renamed from struniq_processor_t.
12192 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
12193 in turn was renamed from hash_compare_struniq_t.
12194 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
12195 (state_list): Renamed from state_list_t.
12196 * src/assoc.h (assoc): Renamed from assoc_t.
12197 * src/conflicts.c (enum conflict_resolution): Renamed from
12198 enum conflict_resolution_e.
12199 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
12200 (rule_list): Renamed from rule_list_t.
12201 * src/getargs.h (enum trace): Renamed from enum trace_e.
12202 (enum report): Renamed from enum report_e.
12203 * src/gram.h (item_number): Renamed from item_number_t.
12204 (rule_number): Renamed from rule_number_t.
12205 (struct rule_s): Remove the "rule_s" part; not used.
12206 (rule): Renamed from rule_t.
12207 (rule_filter): Renamed from rule_filter_t.
12208 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
12209 (goto_list): Renamed from goto_list_t.
12210 * src/lalr.h (goto_number): Renamed from goto_number_t.
12211 * src/location.h (location): Renamed from location_t.
12212 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
12213 and moved here from:
12214 * src/muscle_tab.h (muscle_entry_t): here.
12215 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
12216 (rule_list): Renamed from rule_list_t.
12217 * src/print_graph.c (static_graph): Renamed from graph.
12218 * src/reader.h (braced_code): Renamed from braced_code_t.
12219 Remove brace_code_e tag.
12220 * src/relation.h (relation_node): Renamed from relation_node_t.
12221 (relation_nodes): Renamed from relation_nodes_t.
12222 (relation): Renamed from relation_t.
12223 * src/state.h (state_number): Renamed from state_number_t.
12224 (struct state): Renamed from struct state_s.
12225 (state): Renamed from state_t.
12226 (transitions): Renamed from transitions_t. Unused (and
12227 misspelled) transtion_s tag removed.
12228 (errs): Renamed from errs_t. Unused errs_s tag removed.
12229 (reductions): Renamed from reductions_t. Unused tag
12230 reductions_s removed.
12231 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
12232 (struct symbol_list): Renamed from struct symbol_list_s.
12233 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
12234 (struct symbol): Renamed from struct symbol_s.
12235 (symbol): Renamed from symbol_t.
12236 * src/tables.c (vector_number): Renamed from vector_number_t.
12237 (action_number): Renamed from action_t.
12238 * src/tables.h (base_number): Renamed from base_t.
12239 * src/vcg.h (enum color): Renamed from enum color_e.
12240 (enum textmode): Renamed from enum textmode_e.
12241 (enum shape): Renamed from enum shape_e.
12242 (struct colorentry): Renamed from struct colorentry_s.
12243 (struct classname): Renamed from struct classname_s.
12244 (struct infoname): Renamed from struct infoname_s.
12245 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
12246 (enum decision): Renamed from enum decision_e.
12247 (enum orientation): Renamed from enum orientation_e.
12248 (enum alignment): Renamed from enum alignment_e.
12249 (enum arrow_mode): Renamed from enum arrow_mode_e.
12250 (enum crossing_type): Renamed from enum crossing_type_e.
12251 (enum view): Renamed from enum view_e.
12252 (struct node): Renamed from struct node_s.
12253 (node): Renamed from node_t.
12254 (enum linestyle): Renamed from enum linestyle_e.
12255 (enum arrowstyle): Renamed from enum arrowstyle_e.
12256 (struct edge): Renamed from struct edge.
12257 (edge): Renamed from edge_t.
12258 (struct graph): Renamed from struct graph_s.
12259 (graph): Renamed from graph_t.
12260 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
12261 Rename value_t -> value.
12262 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
12263 value_t_as_yystype -> value_as_yystype.
12264
12265 Don't include <errno.h> in the mainstream code, since it
12266 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
12267 * lib/get-errno.c, lib/get-errno.h: New files.
12268 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
12269 get-errno.c.
12270 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
12271 * src/output.c (output_skeleton): Likewise.
12272 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
12273 instead of errno.
12274 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
12275 Likewise.
12276 (handle_action_dollar, handle_action_at): Likewise.
12277 * src/system.h: Do not include <errno.h>.
12278 (TAB_EXT): Renamed from EXT_TAB.
12279 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
12280
12281 Avoid str[a-z]*, since <string.h> reserves that name space.
12282 Change all instances of "struniq" in names to "uniqstr", and
12283 likewise for "STRUNIQ" and "UNIQSTR".
12284 * src/uniqstr.c: Renamed from src/struniq.c.
12285 * src/uniqstr.h: Renamed from src/struniq.h.
12286 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
12287 * src/files.c (strsuffix): Remove; unused.
12288 (concat2): Renamed from stringappend. Now static.
12289 * src/files.h (strsuffix, stringappend): Remove; unused.
12290 * src/parse-gram.y (<chars>): Renamed from <string>.
12291 (<uniqstr>): Renamed from <struniq>.
12292 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
12293 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
12294 (struct graph_s.expand): Renamed from struct graph_s.stretch.
12295 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
12296 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
12297 (N_EXPAND): Renamed from N_STRETCH.
12298
12299 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
12300 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
12301 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
12302 Remove; unused.
12303 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
12304 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
12305 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
12306 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
12307 (BASE_MAXIMUM): Renamed from BASE_MAX.
12308 (BASE_MINIMUM): Renamed from BASE_MIN.
12309 (ACTION_MAX): Remove; unused.
12310 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
12311 Unnecessary casts removed from above defines.
12312
12313
12314 Fix misspelling in names.
12315 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
12316 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
12317 G_NODE_ALIGNEMENT.
12318
12319
12320 * lib/timevar.c (timevar_report): Renamed from time_report,
12321 for consistency with other names.
12322 * lib/timevar.h (timevar_report): New decl.
12323 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
12324
12325
12326 Sort include-file uses.
12327
12328 Reorder all include files under src to be in the order "system.h".
12329 then the ../lib include files in angle brackets (alphabetized),
12330 then the . include files in double-quotes (alphabetized). Fix
12331 dependency breakages encountered in this process, as follows:
12332 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
12333 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
12334 * src/state.h: Include "symtab.h".
12335
996b1c7e
PE
123362002-12-08 Paul Eggert <eggert@twinsun.com>
12337
12338 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
12339 since this causes problems when __file__ contains character
12340 sequences like "@" that are treated specially by src/scan-skel.l.
12341 Instead, just use the file's basename. This fixes the bug
12342 reported by Martin Mokrejs in
161a71f3 12343 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
996b1c7e 12344
e19c4e5d
PE
123452002-12-06 Paul Eggert <eggert@twinsun.com>
12346
12347 Add support for rules that do not have trailing semicolons, as
12348 POSIX requires. Improve the quality of locations in Bison
12349 diagnostics.
26b4a969 12350
e19c4e5d
PE
12351 * src/location.c: Include <quotearg.h>.
12352 (empty_location): Now const.
12353 (location_print): New function. Follow the recommendation of the
12354 GNU Coding Standards for locations that span file boundaries.
12355 * src/location.h: Do not include <quotearg.h>; no longer needed.
12356 (boundary): New type.
12357 (location_t): Use it. This allows locations to span file boundaries.
12358 All member uses changed: file -> start.file or end.file (as needed),
12359 first_line -> start.line, first_column -> start.column,
12360 last_line -> end.line, last_column -> end.column.
12361 (equal_boundaries): New function.
12362 (LOCATION_RESET, LOCATION_STEP): Remove.
12363 (LOCATION_PRINT): Remove. All callers changed to use location_print.
12364 (empty_location): Now const.
12365 (location_print): New decl.
12366 * src/parse-gram.y (lloc_default): New function, which handles
12367 empty locations more accurately.
12368 (YYLLOC_DEFAULT): Use it.
12369 (%token COLON): Remove.
12370 (%token ID_COLON): New token.
26b4a969 12371 (rules): Use it.
e19c4e5d
PE
12372 (declarations, rules): Remove trailing semicolon.
12373 (declaration, rules_or_grammar_declaration):
12374 Allow empty (";") declaration.
12375 (symbol_def): Remove empty actions; no longer needed.
12376 (rules_or_grammar_declaration): Remove trailing semicolon.
12377 (semi_colon.opt): Remove.
12378 * src/reader.h: Include location.h.
12379 (scanner_cursor): New decl.
12380 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
12381 rolling our own.
12382 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
12383 of *loc.
12384 (STEP): Remove. No longer needed, now that adjust_location does
12385 the work. All uses removed.
12386 (scanner_cursor): New var.
12387 (adjust_location): Renamed from extend_location. It now sets
12388 *loc and adjusts the scanner cursor. All uses changed.
12389 Don't bother testing for CR.
12390 (handle_syncline): Remove location arg; now updates scanner cursor.
12391 All callers changed.
12392 (unexpected_end_of_file): Now accepts start boundary of token or
12393 comment, not location. All callers changed. Update scanner cursor,
12394 not the location.
12395 (SC_AFTER_IDENTIFIER): New state.
12396 (context_state): Renamed from c_context. All uses changed.
12397 (id_loc, code_start, token_start): New local vars.
12398 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
12399 processing of Yacc white space and equivalents here.
12400 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
12401 instead of returning ID immediately, since we need to search for
12402 a subsequent colon.
12403 (<INITIAL>"'", "\""): Save token_start.
12404 (<INITIAL>"%{", "{", "%%"): Save code_start.
12405 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
12406 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
12407 BEGIN context_state at end, not INITIAL.
12408 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
12409 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
12410 Return correct token start.
12411 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
12412 the start of a character, string or multiline comment is found.
12413 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
12414 Reduction): Adjust reported locations to match the more-precise
12415 results now expected.
12416 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
12417 * tests/reduce.at (Useless Rules, Reduced Automaton,
12418 Underivable Rules): Likewise.
12419 * tests/regression.at (Invalid inputs): No longer `expecting ";"
12420 or "|"' now that so many other tokens are allowed by the new grammar.
12421
12422 * src/complain.h (current_file): Remove duplicate decl;
12423 current_file is now owned by files.h.
12424 * src/complain.c, src/scan-gram.l: Include files.h.
12425
124262002-12-06 Paul Eggert <eggert@twinsun.com>
26b4a969 12427
e19c4e5d
PE
12428 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
12429 promotes to int; it might be unsigned int.
12430 * data/yacc.c (yy_reduce_print): Likewise.
12431
12432 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
12433 be #defined in the prologue, not in the Bison declarations.
12434 This fixes Debian Bug 102878, reported by Shaul Karl.
26b4a969 12435
b64755e3
PE
124362002-12-02 Paul Eggert <eggert@twinsun.com>
12437
12438 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
12439 * lib/strtoul.c: New file, from gnulib.
12440 This fixes a porting bug reported by Peter Klein in
161a71f3 12441 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
b64755e3 12442
6e746484
PE
124432002-11-30 Paul Eggert <eggert@twinsun.com>
12444
b64755e3
PE
12445 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
12446 and put only a forward declaration in the prologue. This is for
12447 consistency with the other scanner helper functions.
12448
6ba55592
PE
12449 Type clashes now generate warnings, not errors, since it
12450 appears that POSIX may allow some grammars with type clashes.
12451 * src/reader.c (grammar_current_rule_check): Warn about
12452 type clashes instead of complaining.
12453 * tests/input.at (Type Clashes): Expect warnings, not complaints.
12454
6e746484
PE
12455 Add Yacc library, since POSIX requires it.
12456 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
12457 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
12458 * lib/main.c, lib/yyerror.c: New files.
12459
12460 gram_error can be static; it need not be extern.
12461 * src/reader.h (gram_error): Remove decl.
12462 * src/parse-gram.y (gram_error): Now static. Add static decl.
12463 (print_token_value): Omit parameter names from forward decl,
12464 for consistency.
12465
88510f9c
PE
124662002-11-29 Paul Eggert <eggert@twinsun.com>
12467
6e746484
PE
12468 * doc/bison.texinfo: Emphasize that yylex and yyerror must
12469 be declared before being used. E.g., one should typically
12470 declare them in the prologue. Use GNU coding style in examples.
12471 Put "const" consistently after the type it modifies. Mention
12472 that C99 supports "inline". Mention that yyerror traditionally
12473 returns "int".
12474
88510f9c
PE
12475 %parse-param and %lex-param now take just one argument, the
12476 declaration; the argument name is deduced from the declaration.
12477
12478 * doc/bison.texinfo (Parser Function, Pure Calling, Error
12479 Reporting, Table of Symbols): Document this.
12480 * src/parse-gram.y (add_param): New function.
12481 (COMMA): Remove.
12482 (declaration): Implement new rule for %parse-param and %lex-param.
12483 * src/scan-gram.l: "," now elicits a warning, rather than being
12484 a token; this is more compatible with byacc.
12485 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
12486
bb92250c
PE
124872002-11-27 Paul Eggert <eggert@twinsun.com>
12488
12489 Rename identifiers to avoid real and potential collisions.
12490
12491 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
12492 to avoid collision with lex macro described by Bruce Lilly in
161a71f3 12493 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
bb92250c
PE
12494 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
12495 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
12496 * src/parse-gram.y (print_token_value): Renamed from yyprint.
12497 All uses changed.
12498 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
12499 The name "yycontrol" violates the name space rules, and this stuff
12500 wasn't being used anyway.
12501 (input): Remove action; this stuff wasn't being used.
12502 (gram_error): Rename local variable yylloc -> loc.
12503 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
12504 (YY_DECL): Don't use "yy" at start of local variables.
12505 All uses changed, e.g., yylloc -> loc.
12506 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
12507 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
12508 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
12509 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
12510
12511 * src/parse-gram.y (gram_error): loc is now const *.
12512 * src/reader.h (gram_error): Likewise.
12513
3af4feb2
PE
125142002-11-24 Paul Eggert <eggert@twinsun.com>
12515
12516 Version 1.75c.
12517
12518 * tests/actions.at (Actions after errors): Use an output format
12519 more similar to that of the Printers and Destructors test.
12520 Test the position of the ';' token too.
12521 (Printers and Destructors): Likewise.
12522 (Printers and Destructors: %glr-parser): Remove for now, to avoid
12523 unnecessarily alarming people when the test fails.
12524
12525 * data/yacc.c (yyerrlab1): Move this label down, so that the
12526 parser does not discard the lookahead token if the user code
12527 invokes YYERROR. This change is required for POSIX conformance.
12528
12529 * lib/error.c: Sync with gnulib.
12530
125312002-11-22 Paul Eggert <eggert@twinsun.com>
12532
12533 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
12534 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
12535 * lib/xmalloc.c: Likewise.
26b4a969 12536
58004308
PE
125372002-11-20 Paul Eggert <eggert@twinsun.com>
12538
12539 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
12540
125412002-11-20 Paul Eggert <eggert@twinsun.com>
26b4a969 12542
58004308
PE
12543 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
12544 should use `if (! x) abort ();' rather than `assert (x);', and
12545 anyway it's one less thing to worry about configuring.
12546
12547 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
12548 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
12549 and replace all instances of assert with abort.
12550 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
12551 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
12552
12553 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
12554 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
12555 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
12556 hash_find_entry, hash_rehash, hash_insert): Likewise.
12557 * src/conflicts.c (resolve_sr_conflict): Likewise.
12558 * src/lalr.c (set_goto_map, map_goto): Likewise.
12559 * src/nullable.c (nullable_compute): Likewise.
12560 * src/output.c (prepare_rules, token_definitions_output): Likewise.
12561 * src/reader.c (packgram, reader): Likewise.
12562 * src/state.c (state_new, state_free, state_transitions_set,
12563 state_reduction_find): Likewise.
12564 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
12565 symbol_pack): Likewise.
12566 * src/tables.c (conflict_row, pack_vector): Likewise.
12567 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
12568 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
12569 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
12570 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
12571
12572 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
12573 (ARGMATCH_CONSTRAINT): New macro.
12574 (ARGMATCH_ASSERT): Use it.
12575
12576 * src/system.h (verify): New macro.
12577 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
12578 rather than assert.
12579 * src/tables.c (tables_generate): Likewise.
12580
12581 * src/struniq.c (struniq_assert): Now returns void, and aborts
12582 if the assertion is false.
12583 (struniq_assert_p): Remove.
12584 * src/struniq.h: Likewise.
12585
76ae8198
PE
125862002-11-18 Paul Eggert <eggert@twinsun.com>
12587
12588 * data/glr.c (yygetLRActions): Replace `yyindex' with
12589 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
12590 This fixes the regression with Sun ONE Studio 7 cc that I reported in
161a71f3 12591 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
76ae8198 12592
d3c4e709
AD
125932002-11-18 Akim Demaille <akim@epita.fr>
12594
12595 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
12596 space.
12597 From Tim Van Holder.
12598
8d8a7238
PE
125992002-11-17 Paul Eggert <eggert@twinsun.com>
12600
12601 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
12602 to "SyntaxError" for consistency with my 2002-11-15 change.
12603
12604 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
12605 not define to {}, since this breaks the common use of `YYDPRINTF
12606 ((...));' if a single statement is desired (e.g. before `else').
12607 Work around GCC warnings by surrounding corresponding calls with
12608 {} if needed.
12609 (yyhasResolvedValue): Remove unused function.
12610 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
12611 loop body.
12612 (yyreportSyntaxError): Renamed from yyreportParseError.
12613 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
12614 All uses changed.
12615 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
12616 extern when possible. Remove unused initializations.
12617
b0937b22
AD
126182002-11-16 Akim Demaille <akim@epita.fr>
12619
12620 Augment the similarity between GLR and LALR traces.
12621
12622 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
12623 (YY_REDUCE_PRINT): New.
12624 (yyparse): Use them.
12625 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
12626 YYDPRINT here.
12627 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
12628 state reached after the reduction/recovery, since...
12629 (yyparse, yyprocessOneStack): Report the state we are entering in.
12630
c5e3e510
AD
126312002-11-16 Akim Demaille <akim@epita.fr>
12632
12633 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
12634 Add support for --trace=skeleton.
12635 * src/scan-skel.l: %option debug.
12636 Scan strings of non-@ or \n instead of character by character.
12637 (scan_skel): Handle trace_skeleton.
12638 (QPUTS): New.
12639 (@output_parser_name@, @output_header_name@): ``Restore'' their
12640 support (used to be M4 macros).
12641 * data/yacc.c: Quote larger chunks, a la glr.c.
12642 * data/lalr1.cc: Likewise.
12643 The header guards are no longer available, so use some other
12644 string than `YYLSP_NEEDED'.
12645
4c6cc1db
AD
126462002-11-16 Akim Demaille <akim@epita.fr>
12647
12648 Make the ``Printers and Destructors'' test more verbose, taking
12649 `yacc.c''s behavior as (possibly wrong) reference.
12650
12651 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
12652 instead of fprint on stdout.
12653 Set and report the last_line of the symbols.
12654 Consistently display values and locations.
12655
6d9e8019
PE
126562002-11-16 Paul Eggert <eggert@twinsun.com>
12657
12658 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
12659
6e649e65
PE
126602002-11-15 Paul Eggert <eggert@twinsun.com>
12661
b25d88f6
PE
12662 * tests/actions.at (Actions after errors): New test case.
12663
6e649e65
PE
12664 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
12665 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
12666 tests/action.at, tests/calc.at, tests/conflicts.at,
12667 tests/cxx-type.at, tests/regression.at:
12668 "parse error" -> "syntax error" for POSIX compatibility.
12669 "parsing stack overflow..." -> "parser stack overflow" so
12670 that code matches Bison documentation.
12671
0f39aab9
AD
126722002-11-15 Akim Demaille <akim@epita.fr>
12673
12674 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
12675 take two BRACED_CODE, not two string_content.
12676 Free the scanner's obstack when we are done.
12677 (code_content): New.
12678 * tests/calc.at: Adjust.
12679 * doc/bison.texinfo: Adjust.
12680 Also, make sure to include the `,' for these declarations.
12681
761c1926
AD
126822002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
12683
12684 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
12685 definition; avoids potential autoreconf problems.
12686
b0f98b10
AD
126872002-11-15 Akim Demaille <akim@epita.fr>
12688
12689 Always check the value returned by yyparse.
12690
12691 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
12692 returned by yyparse.
12693 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
12694 Adjust calls.
12695 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
12696 returned by yyparse.
12697
970785f1
PH
126982002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12699
12700 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
12701 on input.at test.
12702
8fcc7db1
PE
127032002-11-14 Paul Eggert <eggert@twinsun.com>
12704
7ec1b48e
PE
12705 * src/output.c (output_skeleton): Call xfopen instead of
12706 duplicating xfopen's body.
12707
cfff7583 12708 Fix bugs reported by Nelson H. F. Beebe in
161a71f3 12709 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
cfff7583 12710
8fcc7db1
PE
12711 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
12712 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
12713 Group compiler. Instead, use "$CC -E bar.c". Include the .h
12714 file twice in the grammar, as an extra check.
12715
12716 * tests/input.at (Torturing the Scanner): Surround the
12717 backslash-newline tests with "#if 0", to make it less likely that
12718 we'll run into compiler bugs. Bring back solitary \ inside
12719 comment, but add a closing comment to work around HP C bug. Don't
e3aa65c5 12720 test backslash-newline in C character constant.
8fcc7db1 12721
4e8d992c
AD
127222002-11-14 Akim Demaille <akim@epita.fr>
12723
12724 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
12725 status of the compiler.
f32b346d 12726 Calling `exit 1' is no longer needed.
4e8d992c
AD
12727 Reported by Nelson H. F. Beebe.
12728
9501dc6e
AD
127292002-11-14 Akim Demaille <akim@epita.fr>
12730
12731 * tests/atlocal.in (CPPFLAGS): We have config.h.
12732 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
12733 New.
12734 * tests/actions.at, tests/calc.at, tests/conflicts.at,
12735 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
12736 * tests/regression.at, tests/torture.at: Use them for all the
12737 grammars that are to be compiled.
12738 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
12739 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
12740 * doc/bison.texinfo (GLR Parsers): Document `inline'.
12741
18b519c0
AD
127422002-11-14 Akim Demaille <akim@epita.fr>
12743
12744 * doc/bison.texinfo: Various formatting changes (alignments in
12745 samples, additional @group/@end group, GCS in samples.
12746 Use @deffn instead of simple @table to define the directives,
12747 macros, variables etc.
12748
9a86cdb9
PE
127492002-11-13 Paul Eggert <eggert@twinsun.com>
12750
daa33def 12751 Fix some bugs reported by Albert Chin-A-Young in
161a71f3 12752 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
18b519c0 12753
daa33def 12754 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8fcc7db1 12755 -o c"; the HP C compiler chatters during compilation.
daa33def
PE
12756 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
12757 * tests/headers.at (export YYLTYPE): Likewise.
12758
12759 * tests/input.at (Torturing the Scanner): Remove lines containing
8fcc7db1 12760 solitary backslashes, as they tickle a bug in the HP C compiler.
daa33def 12761
9a86cdb9
PE
12762 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
12763 comments, since they're not portable. Use GNU coding style.
12764
9c1e26bd
AD
127652002-11-13 Akim Demaille <akim@epita.fr>
12766
12767 * data/yacc.c: Leave bigger chunks of quoted text.
12768 (YYDSYMPRINTF): New.
12769 Use it to report symbol activities.
12770 * data/glr.c (YYDSYMPRINTF): New.
12771 Use it.
12772
87f721cc
PE
127732002-11-12 Paul Eggert <eggert@twinsun.com>
12774
12775 Version 1.75b.
12776
12777 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
12778 (yyglrReduce): Return yyok, not 0.
12779 This should avoid the enumerated-type warnings reported
464c6927 12780 by Nelson H. F. Beebe in
161a71f3 12781 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
87f721cc
PE
12782
12783 * lib/bbitset.h (BITSET_INLINE): Remove.
12784 * lib/bitset.h [! BITSET_INLINE]: Remove.
12785 (bitset_set, bitset_reset, bitset_test): Rename local vars
12786 to avoid shadowing warnings by GCC.
12787
12788 * data/glr.c (inline): Remove #define. It's the user's
12789 responsibility to #define it away, just like 'const'.
464c6927 12790 This fixes one of the bugs reported by Nelson H. F. Beebe in
161a71f3 12791 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
18b519c0 12792
87f721cc
PE
12793 * Makefile.maint (po-check): Scan .l and .y files instead of the
12794 .c and the .h files that they generate. This fixes the bug
12795 reported by Tim Van Holder in:
161a71f3 12796 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
87f721cc
PE
12797 Look for N_ as well as for _. Try to avoid matching #define for
12798 N_ and _.
12799 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
12800 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
12801 * src/scan-gram.l: Revamp regular expressions so that " and '
12802 do not confuse xgettext.
12803
12804 * src/struniq.h (struniq_new): Do not declare the return type
12805 to be 'const'; this violates the C standard.
12806 * src/struniq.c (struniq_new): Likewise.
12807
be14ade5
AD
128082002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
12809
12810 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
12811 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
12812 linker.
12813
05291fbc
AD
128142002-11-12 Akim Demaille <akim@epita.fr>
12815
12816 * Makefile.maint: Sync with Autoconf:
12817 (local_updates): New.
12818
1f5fd52e
AD
128192002-11-12 Akim Demaille <akim@epita.fr>
12820
12821 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
12822
283f1e64
AD
128232002-11-12 Akim Demaille <akim@epita.fr>
12824
12825 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
12826 locations.
12827
886b69d1
AD
128282002-11-12 Akim Demaille <akim@epita.fr>
12829
12830 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
12831 not yyvalue.
12832
3df37415
AD
128332002-11-12 Akim Demaille <akim@epita.fr>
12834
12835 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
12836 Use it to test the GLR parser.
12837
7bd6c77e
AD
128382002-11-12 Akim Demaille <akim@epita.fr>
12839
12840 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
12841 defines it.
12842 * data/glr.c (yystos): New.
12843 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
12844 (YYDSYMPRINT): New.
12845 (yyval): Don't define it, it is handled via M4.
12846 (yyrecoverParseError): Free verbosely the discarded symbols.
12847 * data/yacc.c (yysymprint): Remove, rather...
12848 (b4_yysymprint_generate): invoke.
12849 * data/c.m4 (b4_yysymprint_generate): New.
12850 Accept pointers as arguments, as opposed to the version from
12851 yacc.c.
12852 (b4_yydestruct_generate): Likewise.
12853 * tests/cations.at (Printers and Destructors): Use Bison directives
12854 instead of CPP macros.
12855 Don't rely on internal details.
12856
b0400cc6
AD
128572002-11-12 Akim Demaille <akim@epita.fr>
12858
12859 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
12860 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
12861 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
12862 it against YYEMPTY and so forth), work on yytoken (i.e., set
12863 it to YYEMPTY etc.).
12864 (yydestruct): Replace with a b4_yydestruct_generate invocation.
12865 (b4_symbol_actions): Remove.
12866 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
12867 for 0, end-of-input.
12868
72f889cc
AD
128692002-11-12 Akim Demaille <akim@epita.fr>
12870
12871 * doc/bison.texinfo (Destructor Decl): New.
12872
b1ae9233
AD
128732002-11-12 Akim Demaille <akim@epita.fr>
12874
12875 * src/tables.c (tables_generate): Use free for pointers that
12876 cannot be NULL, not XFREE.
12877 (pack_vector): Use assert, not fatal, for bound violations.
12878 * src/state.c (state_new): Likewise.
12879 * src/reader.c (reader): Likewise.
12880 * src/lalr.c (set_goto_map): Likewise.
72f889cc 12881 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
b1ae9233
AD
12882 the file name.
12883
7ec2d4cd
AD
128842002-11-12 Akim Demaille <akim@epita.fr>
12885
12886 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
12887 Restore.
12888 * src/scan-gram.l (last_string): Is global to the file, not to
12889 yylex.
12890 * src/parse-gram.y (input): Don't append the epilogue here,
12891 (epilogue.opt): do it here, and free the scanner's obstack.
12892 * src/reader.c (epilogue_set): Rename as...
12893 (epilogue_augment): this.
12894 * data/c.m4 (b4_epilogue): Defaults to empty.
12895
573a6cd3
AD
128962002-11-12 Akim Demaille <akim@epita.fr>
12897
12898 * src/getargs.c (long_options): Remove duplicates.
12899 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
12900 Remove.
12901 * doc/bison.rnh: Remove.
12902 * doc/bison.texinfo (VMS Invocation): Remove.
12903
95612cfa
AD
129042002-11-12 Akim Demaille <akim@epita.fr>
12905
12906 * src/struniq.h, src/struniq.c (struniq_t): Is const.
12907 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
12908
12909 Use struniq for symbols.
12910
12911 * src/symtab.h (symbol_t): The tag member is a struniq.
12912 (symbol_type_set): Adjust.
12913 * src/symtab.c (symbol_new): Takes a struniq.
12914 (symbol_free): Don't free the tag member.
12915 (hash_compare_symbol_t, hash_symbol_t): Rename as...
12916 (hash_compare_symbol, hash_symbol): these.
12917 Use the fact that tags as struniqs.
12918 (symbol_get): Use struniq_new.
12919 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
12920 Returns a strniq.
12921 * src/reader.h (merger_list, grammar_currentmerge_set): The name
12922 and type members are struniqs.
12923 * src/reader.c (get_merge_function)
12924 (grammar_current_rule_merge_set): Adjust.
12925 (TYPE, current_type): Are struniq.
12926
12927 Use struniq for file names.
12928
12929 * src/files.h, src/files.c (infile): Split into...
12930 (grammar_file, current_file): these.
12931 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
12932 * src/reduce.c (reduce_print): Likewise.
12933 * src/getargs.c (getargs): Likewise.
12934 * src/complain.h, src/complain.c: Likewise.
12935 * src/main.c (main): Call struniqs_new early enough to use it for
12936 file names.
12937 Don't free the input file name.
12938
3e6656f9
AD
129392002-11-12 Akim Demaille <akim@epita.fr>
12940
12941 * src/symtab.c (symbol_free): Remove dead deactivated code:
12942 type_name are properly removed.
12943 Don't use XFREE to free items that cannot be NULL.
12944 * src/struniq.h, src/struniq.c: New.
12945 * src/main.c (main): Initialize/free struniqs.
12946 * src/parse-gram.y (%union): Add astruniq member.
12947 (yyprint): Adjust.
12948 * src/scan-gram.l (<{tag}>): Return a struniq.
12949 Free the obstack bit that used to store it.
12950 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
12951
7672019c
PE
129522002-11-11 Paul Eggert <eggert@twinsun.com>
12953
12954 Revamp to fix many (but not all) of the C- and M4-related quoting
12955 problems. Among other things, this fixes the Bison bug reported
12956 by Jan Hubicka when processing the Bash grammar; see:
161a71f3 12957 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7672019c
PE
12958
12959 Use new @ escapes consistently. Represent brackets with @{ and @}
12960 rather than @<:@ and @:>@, since this works a bit better with dumb
12961 editors like vi. Represent @ with @@, since @ is now consistently
12962 an escape. Use @oline@ and @ofile@ rather than __oline__ and
12963 __ofile__, to avoid unexpected expansions. Similarly, use @output
12964 rather than #output.
12965
12966 * data/c.m4 (b4_copyright): Omit file name from comment, since
12967 the file name could contain "*/".
12968 (b4_synclines_flag): Don't quote the 2nd argument; it should already
12969 be quoted. All uses changed.
12970
12971 * data/glr.c: Use new @ escapes consistently.
12972 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
12973 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
12974 Remove, since they couldn't handle arbitrary characters in file
12975 names.
12976 * data/lalr1.cc: Likewise.
12977 * data/yacc.c: Likewise.
12978
12979 * src/files.c (output_infix): Remove; all uses removed.
12980 * src/files.h: Likewise.
12981
12982 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
12983 mishandled funny characters in file names, and anyway it isn't
12984 needed any more.
12985 * data/yacc.c: Likewise.
12986 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
12987
12988 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
12989 * data/yacc.c: Likewise.
12990
12991 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
12992 strings now.
12993 (muscle_init): Quote filename as a C string.
12994 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
12995 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
12996 * src/output.c (escaped_file_name_output): New function.
12997 (prepare_symbols): Quote tokens for M4.
12998 (prepare): Don't insert output_infix, output_prefix,
12999 output_parser_name, output_header_name; this is now down by scan-skel.
13000 Insert skeleton as a C string.
13001
13002 * src/output.c (user_actions_output, symbol_destructors_output,
13003 symbol_printers_output): Quote filenames for C and M4.
13004 * src/reader.c (prologue_augment, epilogue_set): Likewise.
13005
13006 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
13007 escapes other than \\ and \'; this simplifies the code.
13008 (<SC_STRING>): Likewise, for \\ and \".
13009 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
13010 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
13011 Use new escapes @{ and @} for [ and ].
13012
13013 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
13014 them with auto vars.
13015 Switch to new escape scheme, where @ is the escape character uniformly.
13016 Abort if a stray escape character is found. Avoid unbounded input
13017 buffer when parsing non-escaped text.
13018
13019 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
13020 __oline__, #output, $@, and @{ do not have unintended meanings.
13021
acea4f3b
PE
130222002-11-09 Paul Eggert <eggert@twinsun.com>
13023
13024 Fix the test failure due to GCC warnings described in
161a71f3 13025 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
acea4f3b
PE
13026 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
13027 evaluate to 0 if it's impossible for NINF to be in the respective
13028 table.
13029 (yygetLRActions, yyrecoverParseError): Use them.
13030
13031 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
13032 counted in the token inserted at end of file. Now takes
13033 location_t *, not location_t, so that the location can be
13034 adjusted. All uses changed.
13035
13036 * tests/regression.at (Invalid inputs): Adjust wording in
13037 diagnostic to match the new behavior.
13038
13039 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
13040 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
13041 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
13042 abort ();'. This reduces the runtime of the "Many lookaheads"
13043 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
13044 GCC 3.2.
13045
20ef1ad5
PE
130462002-11-07 Paul Eggert <eggert@twinsun.com>
13047
13048 * src/parse-gram.y (CHARACTER): Remove unused token.
13049 All uses removed.
13050
13051 * src/scan-gram.l: Remove stack option. We no longer use the
13052 stack, since the stack was never deeper than 1; instead, use the
13053 new auto var c_context to record the stacked value.
13054
13055 Remove nounput option. At an unexpected end of file, we now unput
13056 the minimal input necessary to end cleanly; this simplifies the
13057 code.
13058
13059 Avoid unbounded token sizes where this is easy.
13060
13061 (unexpected_end_of_file): New function.
13062 Use it to systematize the error message on unexpected EOF.
13063 (last-string): Now auto, not static.
13064 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
13065 (scanner_last_string_free): Remove; not used.
13066 (percent_percent_count): Move decl to just before use.
13067 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
13068 not the (never otherwised-used) CHARACTER.
13069
93724f13
AD
130702002-11-07 Akim Demaille <akim@epita.fr>
13071
13072 Let yyerror always receive the msg as last argument, so that
13073 yyerror can be variadic.
13074
13075 * data/yacc.c (b4_yyerror_args): New.
13076 Use it when calling yyerror.
13077 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
13078 Use it when calling yyerror.
13079 * doc/bison.texinfo (Error Reporting): Adjust.
13080 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
13081 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
13082
6e40b4eb
AD
130832002-11-06 Akim Demaille <akim@epita.fr>
13084
13085 #line should have quoted strings.
13086 Ideally, this should be done by m4_quotearg.
13087
13088 * src/scan-skel.l: Include quotearg.h.
13089 Quote __ofile__.
13090 * src/output.c (symbol_printers_output)
13091 (symbol_destructors_output): Quote the file name.
13092
2dfbfc12
AD
130932002-11-06 Akim Demaille <akim@epita.fr>
13094
13095 * tests/regression.at (Invalid inputs): Adjust to the recent
13096 messages.
13097
437c2d80
AD
130982002-11-06 Akim Demaille <akim@epita.fr>
13099
13100 Restore --no-lines.
13101 Reported by Jim Kent.
13102
13103 * data/c.m4 (b4_syncline): New.
13104 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
13105 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
13106 * src/output.c (user_actions_output): Likewise.
13107 (prepare): Define 'b4_synclines_flag'.
2dfbfc12 13108 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
437c2d80 13109
900c5db5
AD
131102002-11-06 Akim Demaille <akim@epita.fr>
13111
13112 * src/main.c (main): Free `infile'.
13113 * src/scan-gram.l (handle_syncline): New.
13114 Recognize `#line'.
13115 * src/output.c (user_actions_output, symbol_destructors_output)
13116 (symbol_printers_output): Use the location's file name, not
13117 infile.
13118 * src/reader.c (prologue_augment, epilogue_set): Likewise.
13119
e183b123 131202002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
51b4a04c 13121
e183b123 13122 * src/tables.c (matching_state): Don't allow states to match if
51b4a04c 13123 either has GLR conflict entries.
e183b123 13124
193eb6b7
PE
131252002-11-05 Paul Eggert <eggert@twinsun.com>
13126
e183b123
PE
13127 * src/scan-gram.l: Use more accurate diagnostics, e.g.
13128 "integer out of range" rather than "invalid value".
13129 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
13130 accordingly.
13131
193eb6b7
PE
13132 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
13133 Also, remove one static variable in the scanner.
13134
13135 * src/scan-gram.l (braces_level): Now auto, not static.
13136 Initialize to zero if the compiler is being picky.
13137 (INITIAL): Clear braces_level instead of incrementing it.
13138 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
13139 as POSIX 1003.1-2001 requires.
13140 * src/system.h (IF_LINT): New macro, taken from coreutils.
13141 * configure.ac: Define "lint" if --enable-gcc-warnings.
13142
29c01725
AD
131432002-11-05 Akim Demaille <akim@epita.fr>
13144
13145 * src/scan-gram.l: When it starts with `%', complain about the
13146 whole directive, not just that `invalid character: %'.
13147
8aeac3ca
AD
131482002-11-04 Akim Demaille <akim@epita.fr>
13149
13150 * Makefile.maint: Update from Autoconf.
13151 (update, cvs-update, po-update, do-po-update): New.
13152
793a58bb
AD
131532002-11-04 Akim Demaille <akim@epita.fr>
13154
13155 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
13156 and yyerror.
13157 Have yyerror `use' its arguments.
13158 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
13159 returns true when location & yacc & pure & parse-param.
13160 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
13161
c4d720cd
AD
131622002-11-04 Akim Demaille <akim@epita.fr>
13163
13164 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
13165 clashes.
13166 * src/scan-gram.l: Use [\'] instead of ['] to pacify
13167 font-lock-mode.
13168 Use complain_at.
13169 Use quote, not quote_n since LOCATION_PRINT no longer uses the
13170 slot 0.
13171
613a0dc5
PE
131722002-11-03 Paul Eggert <eggert@twinsun.com>
13173
13174 * src/reader.c (get_merge_function, grammar_current_rule_check):
13175 Use consistent diagnostics for reporting type name clashes.
13176 Quote the types with <>, for consistency with Yacc.
13177 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
13178
2a8d363a
AD
131792002-11-03 Akim Demaille <akim@epita.fr>
13180
13181 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
13182 New.
13183 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
13184 (b4_parse_param): Remove.
13185 Use b4_identification.
13186 Propagate b4_pure_args where needed to pass them to yyerror.
13187 * data/glr.m4 (b4_parse_param): Remove.
13188 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
13189 (b4_lpure_formals): New.
13190 Use b4_identification.
13191 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
13192 b4_user_formals and b4_user_args.
13193 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
13194 (yyreportAmbiguity): When using a pure parser, also need
13195 the location, and the parse-params.
13196 Adjust callers.
13197 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
13198 When using a pure parser, also need the parse-params.
13199 Adjust callers.
13200 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
13201 (%pure-parser + %parse-param) LALR and GLR parsers.
13202 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
13203 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
13204 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
13205 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
13206 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
13207 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
13208 * doc/bison.texinfo: Untabify the whole file.
13209 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
13210 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
13211 (Error Reporting): Adjust to these new directives.
13212 Document %error-verbose, deprecate YYERROR_VERBOSE.
13213
9e32add8
AD
132142002-11-03 Akim Demaille <akim@epita.fr>
13215
13216 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
13217 AT_CHECK_CALC_GLR invocations to use % directives, instead of
13218 command line options.
13219 * tests/cxx-type.at: Formatting changes.
13220
b02d90a5
PE
132212002-11-03 Paul Eggert <eggert@twinsun.com>
13222
13223 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
13224 to count columns correctly, and to check for invalid inputs.
9e32add8 13225
b02d90a5
PE
13226 Use mbsnwidth to count columns correctly. Account for tabs, too.
13227 Include mbswidth.h.
13228 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
13229 (extend_location): New function.
13230 (YY_LINES): Remove.
13231
13232 Handle CRLF in C code rather than in Lex code.
13233 (YY_INPUT): New macro.
13234 (no_cr_read): New function.
13235
13236 Scan UCNs, even though we don't fully handle them yet.
13237 (convert_ucn_to_byte): New function.
13238
13239 Handle backslash-newline correctly in C code.
13240 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
13241 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
13242 all uses changed.
13243 (tag, splice): New EREs. Do not allow NUL or newline in tags.
13244 Use {splice} wherever C allows backslash-newline.
13245 YY_STEP after space, newline, vertical-tab.
13246 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9e32add8 13247
b02d90a5
PE
13248 (letter, id): Don't assume ASCII; e.g., spell out a-z.
13249
13250 ({int}, handle_action_dollar, handle_action_at): Check for integer
13251 overflow.
9e32add8 13252
b02d90a5
PE
13253 (YY_STEP): Omit trailing semicolon, so that it's more like C.
13254
13255 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
13256 as well as \000. Check for UCHAR_MAX, not 255.
13257 Allow \x with an arbitrary positive number of digits, as in C.
13258 Check for overflow here.
13259 Allow \? and UCNs, for compatibility with C.
13260
13261 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
13262 with quote slot used by complain_at.
13263
13264 * tests/input.at: Add tests for backslash-newline, m4 quotes
13265 in symbols, long literals, and funny escapes in strings.
13266
13267 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
13268 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
13269 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
13270 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
13271 * m4/mbswidth.m4: New file, from GNU coreutils.
13272
13273 * doc/bison.texinfo (Grammar Outline): Document // comments.
13274 (Symbols): Document that trigraphs have no special meaning in Bison,
13275 nor is backslash-newline allowed.
13276 (Actions): Document that trigraphs have no special meaning.
13277
13278 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
13279 no longer used.
13280
132812002-11-02 Paul Eggert <eggert@twinsun.com>
13282
13283 * src/reader.c: Don't include quote.h; not needed.
13284 (get_merge_function): Reword warning to be consistent with
13285 type clash diagnostic in grammar_current_rule_check.
13286
13287 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
13288 bug in trigraph handling.
13289
13290 * src/output.c (prepare_symbols): When printing token names,
13291 escape "[" as "@<:@" and likewise for "]".
13292
13293 * src/system.h (errno): Remove declaration, as we are now
13294 assuming C89 or better, and C89 guarantees errno.
13295
762b212b
PE
132962002-10-30 Paul Eggert <eggert@twinsun.com>
13297
13298 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
13299 Check for close failures.
13300 * src/files.h (xfclose): Return void, not int, since it always
13301 returned zero.
13302 * src/files.c (xfclose): Likewise. Report I/O error if ferror
13303 indicates one.
13304 * src/output.c (output_skeleton): Use xfclose rather than fclose
13305 and ferror. xfclose now checks ferror.
13306
13307 * data/glr.c (YYLEFTMOST_STATE): Remove.
13308 (yyreportTree): Use a stack-based leftmost state. This avoids
13309 our continuing battles with bogus warnings about initializers.
13310
56100c60
AD
133112002-10-30 Akim Demaille <akim@epita.fr>
13312
13313 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
13314 #if.
13315
51b4a04c
PH
133162002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13317
13318 * tests/glr-regr1.at: New test for reported regressions.
13319 * tests/testsuite.at: Add glr-regr1.at test.
13320 * tests/Makefile.am: Add glr-regr1.at test.
e183b123 13321
bf1ebda2
PE
133222002-10-24 Paul Eggert <eggert@twinsun.com>
13323
5c16c6b1
PE
13324 Version 1.75a.
13325
bf1ebda2
PE
13326 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
13327 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
13328 we use malloc. Don't assume 'A' through 'Z' are contiguous.
13329 Don't assume strdup exists; POSIX says its an XSI extension.
13330 Check for buffer overflow on input.
13331
b526ee61
AD
133322002-10-24 Akim Demaille <akim@epita.fr>
13333
13334 * src/output.c (output_skeleton): Don't disable M4sugar comments
13335 too soon: it results in comments being expanded.
13336 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
13337 first output.
13338
f1886bb2
AD
133392002-10-24 Akim Demaille <akim@epita.fr>
13340
13341 * data/yacc.c (m4_int_type): New.
13342 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
13343 char' as only yacc.c wants K&R portability.
13344 * data/glr.c (yysigned_char): Remove.
13345 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
13346 Reported by Quoc Peyrot.
13347
c5576256
PE
133482002-10-23 Paul Eggert <eggert@twinsun.com>
13349
13350 * src/main.c (main): With --trace=time, report times even if a
13351 non-fatal error occurs. Formerly, the times were reported in some
13352 such cases but not in others.
13353 * src/reader.c (reader): Just return if a complaint has been issued,
13354 instead of exiting, so that 'main' can report times.
13355
27b0ffea
AD
133562002-10-22 Akim Demaille <akim@epita.fr>
13357
13358 * src/system.h: Include sys/types.
13359 Reported by Bert Deknuydt.
13360
223a7883
PE
133612002-10-23 Paul Eggert <eggert@twinsun.com>
13362
13363 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
13364 Suggested by Art Haas.
13365
133662002-10-22 Paul Eggert <eggert@twinsun.com>
13367
13368 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
13369 decl; not needed any more.
13370 * src/main.c (main): Use return to exit, undoing yesterday's change.
13371 The last OS that we could find where this wouldn't work is
13372 SunOS 3.5, and that's too old to worry about now.
13373
13374 * data/glr.c (struct yyltype): Define members even when not
13375 doing locations. This is more consistent with yacc.c, and it
13376 works around the following bug reports:
161a71f3
PE
13377 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
13378 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
27b0ffea 13379
223a7883
PE
13380 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
13381 @acronym consistently. Standardize on "Yacc" instead of "YACC",
13382 "Algol" instead of "ALGOL". Give a bit more history about BNF.
13383
8b76775a
AD
133842002-10-22 Akim Demaille <akim@epita.fr>
13385
13386 * data/README: New.
13387
6db10d14
PE
133882002-10-21 Paul Eggert <eggert@twinsun.com>
13389
13390 Be consistent about 'bool'; the old code used an enum in one
13391 module and an int in another, and this violates the C standard.
13392 * m4/stdbool.m4: New file, from coreutils 4.5.3.
13393 * configure.ac (AC_HEADER_STDBOOL): Add.
13394 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
13395 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
13396 * src/symtab.c (hash_compare_symbol_t): Likewise.
13397 * src/system.h (bool, false, true): Use a definition consistent
13398 with ../lib/hash.c. All uses changed.
13399
13400 * src/complain.c (warning_issued): Renamed from warn_message_count,
13401 so that we needn't worry about integer overflow (!).
13402 Now of type bool. All uses changed.
13403 (complaint_issued): Renamed from complain_message_count; likewise.
13404
13405 * src/main.c (main): Use exit to exit with failure.
27b0ffea 13406
6db10d14
PE
13407 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
13408 rather than 1 and 0.
13409 * src/main.c (main): Likewise.
13410 * src/getargs.c (getargs): Likewise.
13411 * src/reader.c (reader): Likewise.
13412
13413 * src/getarg.c (getargs): Remove duplicate code for
13414 "Try `bison --help'".
13415
13416 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
13417 What was that "2" for?
13418
13419 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
13420 * src/getargs.c (usage): Likewise.
13421
13422 * src/getargs.c (getargs): When there are too few operands, report
13423 the last one. When there are too many, report the first extra
13424 one. This is how diffutils does it.
13425
92a060fd
PE
134262002-10-20 Paul Eggert <eggert@twinsun.com>
13427
13428 Remove K&R vestiges.
13429 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
13430 * src/complain.c (VA_START): Remove. Assume prototypes.
13431 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
13432 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
13433 fatal): Assume prototypes.
13434 * src/complain.h: Assume prototypes.
13435 * src/system.h (PARAMS): Remove.
13436 Include <limits.h> unconditionally, since it's guaranteeed even
13437 for a freestanding C89 compiler.
13438 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
13439 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8b76775a 13440
e7cb57c0
AD
134412002-10-20 Akim Demaille <akim@epita.fr>
13442
13443 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
13444 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
13445 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
13446 (yyresolveStates, yyresolveAction, yyresolveStack)
13447 (yyprocessOneStack): Use them.
13448 (yy_reduce_print): New.
13449 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
13450
0245f82d
AD
134512002-10-20 Akim Demaille <akim@epita.fr>
13452
13453 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
13454 arguments and output `void'.
13455 (b4_c_function): Rename as...
13456 (b4_c_function_def): this.
13457 (b4_c_function_decl, b4_c_ansi_function_def)
13458 (b4_c_ansi_function_decl): New.
13459 Change the interpretation of the arguments: before `int, foo', now
13460 `int foo, foo'.
13461 * data/yacc.c (yyparse): Prototype and define thanks to these.
13462 Adjust b4_c_function_def uses.
13463 * data/glr.c (yyparse): Likewise, but ANSI only.
13464
39912f52
AD
134652002-10-20 Akim Demaille <akim@epita.fr>
13466
13467 * src/output.c (prepare): Move the definition of `tokens_number',
13468 `nterms_number', `undef_token_number', `user_token_number_max'
13469 to...
13470 (prepare_tokens): Here.
13471 (prepare_tokens): Rename as...
13472 (prepare_symbols): this.
13473 (prepare): Move the definition of `rules_number' to...
13474 (prepare_rules): here.
13475 (prepare): Move the definition of `last', `final_state_number',
13476 `states_number' to...
13477 (prepare_states): here.
13478 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
13479
20c1e2ad
AD
134802002-10-20 Akim Demaille <akim@epita.fr>
13481
13482 * src/tables.h, src/tables.c, src/output.c: Comment changes.
13483
21964f43
AD
134842002-10-20 Akim Demaille <akim@epita.fr>
13485
13486 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
13487 * data/c.m4: here.
13488
66d30cd4
AD
134892002-10-20 Akim Demaille <akim@epita.fr>
13490
13491 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
13492 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
13493 `pair'.
13494 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
13495 `name' to...
13496 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
13497 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
13498 These.
13499
95f2c9fe
PE
135002002-10-19 Paul Eggert <eggert@twinsun.com>
13501
13502 Do not create a temporary file, as that involves security and
13503 cleanup headaches. Instead, use a pair of pipes.
13504 Derived from a suggestion by Florian Krohm.
13505 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
13506 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
13507 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
13508 (BISON_PREREQ_SUBPIPE): Add.
13509 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
13510 Add subpipe.h, subpipe.c.
13511 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
13512 * po/POTFILES.in: Add lib/subpipe.c.
13513 * src/output.c: Include "subpipe.h".
13514 (m4_invoke): Remove decl.
13515 (scan_skel): New decl.
13516 (output_skeleton): Use pipe rather than temporary file for m4 input.
13517 Check that m4sugar.m4 is readable, to avoid deadlock.
13518 Check for pipe I/O error.
13519 * src/scan-skel.l (readpipe): Remove decl.
13520 (scan_skel): New function, to be used in place of m4_invoke.
13521 Read from stream rather than file.
66d30cd4 13522
95f2c9fe
PE
13523 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
13524 float, as this generates a warning on Solaris 8 + GCC 3.2 with
13525 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
13526 this generates a more-accurate value anyway.
13527
13528 * lib/timevar.c (timervar_accumulate): Rename locals to
13529 avoid confusion with similarly-named more-global.
13530 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
13531
13532 * src/output.c (prepare): Use xstrdup to convert char const *
13533 to char *, to avoid GCC warning.
13534
c19988b7
AD
135352002-10-19 Akim Demaille <akim@epita.fr>
13536
13537 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
13538 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
13539 Use them to have `calc.y' ready for %pure-parser.
13540 * data/yacc.c (YYLEX): Pass a yylex return type to
13541 b4_c_function_call.
13542
ae7453f2
AD
135432002-10-19 Akim Demaille <akim@epita.fr>
13544
13545 Prototype support of %lex-param and %parse-param.
13546
13547 * src/parse-gram.y: Add the definition of the %lex-param and
13548 %parse-param tokens, plus their rules.
13549 Drop the `_' version of %glr-parser.
13550 Add the "," token.
13551 * src/scan-gram.l (INITIAL): Scan them.
13552 * src/muscle_tab.c: Comment changes.
13553 (muscle_insert, muscle_find): Rename `pair' as `probe'.
13554 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
13555 (muscle_entry_s): The `value' member is no longer const.
13556 Adjust all dependencies.
13557 * src/muscle_tab.c (muscle_init): Adjust: use
13558 MUSCLE_INSERT_STRING.
13559 Initialize the obstack earlier.
13560 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
13561 (muscle_pair_list_grow): New.
13562 * data/c.m4 (b4_c_function_call, b4_c_args): New.
13563 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
13564 * tests/calc.at: Use %locations, not --locations.
13565 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
13566
0e575721
AD
135672002-10-19 Akim Demaille <akim@epita.fr>
13568
13569 * src/getargs.c (usage): Take status as argument and exit
13570 accordingly.
13571 Report the traditional `Try ... --help' message when status != 0.
13572 (usage, version): Don't take a FILE * as arg, it is pointless.
13573 (getargs): When there is an incorrect number of arguments, make it
13574 an error, and report it GNUlically thanks to `usage ()'.
13575
724ce7f5
PE
135762002-10-18 Paul Eggert <eggert@twinsun.com>
13577
3a781eb2
PE
13578 * data/glr.c (yyreportParseError): Don't assume that sprintf
13579 yields the length of the printed string, as this is not true
13580 on SunOS 4.1.4. Reported by Peter Klein.
13581
724ce7f5
PE
13582 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
13583 * tests/conflicts.at (%nonassoc and eof): Likewise.
13584 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
13585
473d0a75
AD
135862002-10-17 Akim Demaille <akim@epita.fr>
13587
13588 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
13589 * src/getargs.c (trace_types, trace_args): Adjust.
13590 * src/reader.c (grammar_current_rule_prec_set)
13591 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
13592 Standardize error messages.
13593 And s/@prec/%prec/!
13594 (reader): Use trace_flag to enable scanner/parser debugging,
13595 instead of an adhoc scheme.
13596 * src/scan-gram.l: Remove trailing debugging code.
13597
e76d2469
PE
135982002-10-16 Paul Eggert <eggert@twinsun.com>
13599
93e2236a
PE
13600 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
13601 MUSCLE_TAB_H.
13602
e76d2469
PE
13603 * NEWS: Officially drop support for building Bison with K&R C,
13604 since it didn't work anyway and it's not worth worrying about.
13605 * Makefile.maint (wget_files): Remove ansi2knr.c.
13606 (ansi2knr.c-url_prefix): Remove.
13607 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
13608 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
13609 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
13610
5bd1c419
PE
136112002-10-15 Paul Eggert <eggert@twinsun.com>
13612
13613 Stop using the "enum_" trick for K&R-style function definitions;
13614 it confused me, and I was the author! Instead, assume that people
13615 who want to use K&R C compilers (when using these modules in GCC,
13616 perhaps?) will run ansi2knr.
13617
13618 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
13619 All uses of "enum_" changed to "enum ".
13620 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
13621 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 13622
5bd1c419
PE
13623 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
13624 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
13625 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
13626 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
13627 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
13628 abitset_not, abitset_ones, abitset_or, abitset_or_and,
13629 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
13630 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
13631 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
13632 Use function prototypes; this removes the need for declaring
13633 static functions simply to provide their prototypes.
13634 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
13635 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
13636 bitset_count_, bitset_create, bitset_dump, bitset_first,
13637 bitset_free, bitset_init, bitset_last, bitset_next,
13638 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
13639 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
13640 bitset_print, bitset_release_memory, bitset_toggle_,
13641 bitset_type_choose, bitset_type_get, bitset_type_name_get,
13642 debug_bitset): Likewise.
13643 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
13644 * lib/bitset_stats.c (bitset_log_histogram_print,
13645 bitset_percent_histogram_print, bitset_stats_and,
13646 bitset_stats_and_cmp, bitset_stats_and_or,
13647 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
13648 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
13649 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
13650 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
13651 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
13652 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
13653 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
13654 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
13655 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
13656 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
13657 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
13658 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
13659 bitset_stats_zero): Likewise.
13660 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
13661 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
13662 bitsetv_dump, debug_bitsetv): Likewise.
13663 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
13664 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
13665 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
13666 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
13667 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
13668 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
13669 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
13670 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
13671 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
13672 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
13673 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
13674 Likewise.
13675 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
13676 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
13677 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
13678 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
13679 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
13680 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
13681 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
13682 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
13683 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
13684 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
13685 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 13686
ae26e1f0
AD
136872002-10-14 Akim Demaille <akim@epita.fr>
13688
13689 Version 1.75.
13690
d43baf71
AD
136912002-10-14 Akim Demaille <akim@epita.fr>
13692
13693 * tests/Makefile.am (maintainer-check-posix): New.
13694
7ebc83e3
AD
136952002-10-14 Akim Demaille <akim@epita.fr>
13696
13697 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
13698 member.
13699
05846dae
AD
137002002-10-14 Akim Demaille <akim@epita.fr>
13701
13702 * src/tables.c (table_ninf_remap): base -> tab.
13703 Reported by Matt Rosing.
13704
1318e37d
PE
137052002-10-14 Paul Eggert <eggert@twinsun.com>
13706
447fbb17
PE
13707 * tests/action.at, tests/calc.at, tests/conflicts.at,
13708 tests/cxx-type.at, tests/headers.at, tests/input.at,
13709 tests/regression.at, tests/synclines.at, tests/torture.at:
13710 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
13711 so that the tests still work even if POSIXLY_CORRECT is set.
13712 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 13713
1318e37d
PE
13714 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
13715 for portability to K&R hosts. Fix typo: signed char is guaranteed
13716 only to 127, not to 128.
13717 * data/glr.c (yysigned_char): New type.
13718 * data/yacc.c (yysigned_char): Likewise.
13719 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
13720
cc0f0794
PE
137212002-10-13 Paul Eggert <eggert@twinsun.com>
13722
5038f418
PE
13723 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
13724 true due to limited range of data type" warning from GCC.
13725
cc0f0794
PE
13726 * data/c.m4 (b4_token_defines): Protect against double-inclusion
13727 by wrapping enum yytokentype's definition inside #ifndef
13728 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
13729
6fed0802
AD
137302002-10-13 Akim Demaille <akim@epita.fr>
13731
13732 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
13733 Un yy- yyrhs to avoid the name clash with the global YYRHS.
13734
32f0598d
AD
137352002-10-13 Akim Demaille <akim@epita.fr>
13736
13737 * Makefile.maint: Update from Autoconf 2.54.
13738 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
13739
7ea9a33f
AD
137402002-10-13 Akim Demaille <akim@epita.fr>
13741
13742 * src/print.c (print_state): Separate the list of solved conflicts
13743 from the other items.
13744 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
13745
ea99527d
AD
137462002-10-13 Akim Demaille <akim@epita.fr>
13747
13748 Let nondeterministic skeletons be usable with deterministic
13749 tables.
13750
13751 With the patch, GAWK compiled by GCC without -O2 passes its test
13752 suite using a GLR parser driven by LALR tables. It fails with -O2
13753 because `struct stat' gives two different answers on my machine:
13754 88 (definition of an auto var) and later 96 (memset on this var).
13755 Hence the stack is badly corrumpted. The headers inclusion is to
13756 blame: if I move the awk.h inclusion before GLR's system header
13757 inclusion, the two struct stat have the same size.
13758
13759 * src/tables.c (pack_table): Always create conflict_table.
13760 (token_actions): Always create conflict_list.
13761 * data/glr.c (YYFLAG): Remove, unused.
13762
f377f69f
AD
137632002-10-13 Akim Demaille <akim@epita.fr>
13764
13765 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
13766 (O0FLAGS): New.
13767 (VALGRIND, GXX): New.
13768 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
13769 * tests/bison.in: Run $PREBISON a pre-command.
13770 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
13771 (maintainer-check-g++): New.
13772 * Makefile.am (maintainer-check): New.
13773
2a1fe6ed
AD
137742002-10-13 Akim Demaille <akim@epita.fr>
13775
13776 * data/glr.c: Formatting changes.
13777 Tweak some trace messages to match yacc.c's.
13778
f50adbbd
AD
137792002-10-13 Akim Demaille <akim@epita.fr>
13780
13781 GLR parsers sometimes raise parse errors instead of performing the
13782 default reduction.
13783 Reported by Charles-Henry de Boysson.
13784
13785 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
ba0fe3c7 13786 check the length of the traces when %glr.
f50adbbd
AD
13787 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
13788 GLR's traces.
13789 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
13790 Test GLR parsers.
13791 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
13792 (yyltype): Remove the yy prefix from the member names.
13793 (yytable): Complete its comment.
13794 (yygetLRActions): Map error action number from YYTABLE from
13795 YYTABLE_NINF to 0.
13796 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
13797 (which was a bug: it should have been YYTABEL_NINF, and yet it was
13798 not satisfying as we could compare an YYACTION computed from
13799 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
13800 only value for error actions.
13801 (yyreportParseError): In verbose parse error messages, don't issue
13802 `error' in the list of expected tokens.
13803 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
13804 next action to perform to match glr.c's decoding.
13805 (yytable): Complete its comment.
13806
bcbad5b9
PE
138072002-10-13 Paul Eggert <eggert@twinsun.com>
13808
13809 Fix problem reported by Henrik Grubbstroem in
161a71f3 13810 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
bcbad5b9
PE
13811 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
13812 because the Bison parser reads the second action before reducing
13813 the first one.
13814 * src/scan-gram.l (rule_length): New static var.
13815 Use it to keep track of the rule length in the scanner, since
13816 we can't expect the parser to be in lock-step sync with the scanner.
13817 (handle_action_dollar, handle_action_at): Use this var.
13818 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 13819
14904b89
PE
138202002-10-12 Paul Eggert <eggert@twinsun.com>
13821
1fe611e5
PE
13822 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
13823 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
13824 Include <sys/time.h> when checking for clock_t and struct tms.
13825 Use same include order as source.
13826 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
161a71f3 13827 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
05846dae 13828
1fe611e5
PE
13829 * lib/timevar.c: Update copyright date and clarify comments.
13830 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 13831
1fe611e5
PE
13832 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
13833 GCC version as of today, then merge Bison's changes.
13834 Change "GCC" to "Bison" in copyright notice. timevar.def's
13835 author is Akim, so change that too.
13836
98194095
PE
13837 * src/reader.c (grammar_current_rule_check):
13838 Don't worry about the default action if $$ is untyped.
13839 Prevents bogus warnings reported by Jim Gifford in
161a71f3 13840 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
98194095 13841
14904b89
PE
13842 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
13843 * data/glr.c, data/lalr1.cc, data/yacc.c:
13844 Output token definitions before the first part of user declarations.
13845 Fixes compatibility problem reported by Jim Gifford for kbd in
161a71f3 13846 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14904b89 13847
ff6dca18
PE
138482002-10-11 Paul Eggert <eggert@twinsun.com>
13849
13850 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
13851 (yyparse): here. This undoes some of the 2002-07-25 change.
13852 Compatibility problem reported by Ralf S. Engelschall with
13853 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
13854
eb714592
AD
138552002-10-11 Akim Demaille <akim@epita.fr>
13856
13857 * tests/regression.at Characters Escapes): New.
13858 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
13859 characters.
13860 Reported by Jan Nieuwenhuizen.
13861
b7195100
AD
138622002-10-11 Akim Demaille <akim@epita.fr>
13863
13864 * po/id.po: New.
13865
f28a0f2d
PE
138662002-10-10 Paul Eggert <eggert@twinsun.com>
13867
13868 Portability fixes for bitsets; this also avoids several GCC
13869 warnings.
13870
13871 * lib/abitset.c: Include <stddef.h>, for offsetof.
13872 * lib/lbitset.c: Likewise.
13873
13874 * lib/abitset.c (abitset_bytes): Return a size that is aligned
13875 properly for vectors of objects. Do not assume that adding a
13876 header size to a multiple of a word size yields a value that is
13877 properly aligned for the whole union.
13878 * lib/bitsetv.c (bitsetv_alloc): Likewise.
13879
13880 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
13881 unique names for structures.
13882 * lib/ebitset.c (ebitset_bytes): Likewise.
13883 * lib/lbitset.c (lbitset_bytes): Likewise.
13884
13885 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
13886 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
13887 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
13888 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
13889 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
13890 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
13891 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
13892 to improve the type-checking that GCC can do.
13893 * lib/bitset.c (bitset_op4_cmp): Likewise.
13894 * lib/bitset_stats.c (bitset_stats_count,
13895 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
13896 bitset_stats_copy, bitset_stats_disjoint_p,
13897 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
13898 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
13899 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
13900 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
13901 bitset_stats_and_or_cmp, bitset_stats_andn_or,
13902 bitset_stats_andn_or_cmp, bitset_stats_or_and,
13903 bitset_stats_or_and_cmp): Likewise.
13904 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
13905 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
13906 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
13907 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
13908
13909 * lib/abitset.h: Include bitset.h, not bbitset.h.
13910 * lib/ebitset.h: Likewise.
13911 * lib/lbitset.h: Likewise.
13912
13913 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
13914 All instances of parameters of type enum bitset_opts are now of
13915 type enum_bitset_opts, to conform to the C Standard, and similarly
13916 for enum_bitset_type.
13917 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
13918 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
13919
13920 Do not use "struct bitset_struct" to mean different things in
13921 different modules. Not only is this confusing, it violates
13922 the C Standard, which requires that structure types in different
13923 modules must be compatible if one is to be passed to the other.
13924 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
13925 All instances of "struct bitset_struct *" replaced with "bitset".
13926 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
13927 (union bitset_union, struct abitset_struct, struct ebitset_struct,
13928 struct lbitset_struct, struct bitset_stats_struct): New types.
13929 All uses of struct bitset_struct changed to union bitset_union,
13930 etc.
ba0fe3c7 13931 * lib/abitset.c (struct abitset_struct, abitset,
f28a0f2d
PE
13932 struct bitset_struct): Remove.
13933 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
13934 struct bitset_struct): Remove.
13935 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
13936 bitset_struct): Remove.
13937 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
13938 Likewise.
13939
13940 Do not call a function of type T using a call that assumes the
13941 function is of a different type U. Standard C requires that a
13942 function must be called with a type that is compatible with its
13943 definition.
13944 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
13945 New decls.
13946 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
13947 New functions.
13948 * lib/ebitset.c (PFV): Remove.
13949 * lib/lbitset.c (PFV): Likewise.
13950 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
13951 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
13952 decls.
13953 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
13954 (ebitset_vtable): Use them.
13955 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
13956 lbitset_xor): New functions.
13957 (lbitset_vtable): Use them.
13958
13959 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
13960 Declare.
13961
13962 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
13963 GCC warning.
13964 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
13965 Use offsetof, for simplicity.
13966
6fbe4984
PE
139672002-10-06 Paul Eggert <eggert@twinsun.com>
13968
13969 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
13970 the same width as int. This reapplies a hunk of the 2002-08-12 patch
161a71f3 13971 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6fbe4984
PE
13972 which was inadvertently undone by the 2002-09-30 patch.
13973 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
13974 the same width as int.
13975
420f93c8
PE
139762002-10-04 Paul Eggert <eggert@twinsun.com>
13977
13978 Version 1.50.
13979
13980 * configure.ac (AC_INIT), NEWS: Increment version number.
13981
13982 * doc/bison.texinfo: Minor spelling, grammar, and white space
13983 fixes.
13984 (Symbols): Mention that any negative value returned from yylex
13985 signifies end-of-input. Warn about negative chars. Mention
13986 the portable Standard C character set.
13987
13988 The GNU coding standard says CFLAGS and YFLAGS are reserved
13989 for the installer to set.
13990 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
13991 * src/Makefile.am (AM_CFLAGS): Likewise.
13992 (AM_YFLAGS): Renamed from YFLAGS.
13993
13994 Fix some MAX and MIN problems.
13995 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
13996 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
13997 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
13998 * src/reader.c (reader): Use it.
13999
14000 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
14001 POSIX 1003.1-2001 has removed fgrep.
14002
140032002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
14004
14005 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
14006 interpreted as signed.
14007 * lib/ebitset.c (ebitset_list): Fix bug.
14008
ff68026d
PE
140092002-10-01 Paul Eggert <eggert@twinsun.com>
14010
14011 More fixes for 64-bit hosts and large bitsets.
14012
14013 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
14014 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
14015 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
14016 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
14017 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
14018 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
14019 bitset_count_): Likewise.
14020 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
14021 bitset_first, bitset_last): Likewise.
14022 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
14023 bitset_stats_list_reverse, bitset_stats_size,
14024 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
14025 Likewise.
14026 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14027 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
14028 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
14029 bitsetv_reflexive_transitive_closure): Likewise.
14030 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
14031 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
14032 Likewise.
14033 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
14034 Likewise.
420f93c8 14035
ff68026d
PE
14036 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
14037 Use size_t, not unsigned int, to count bytes.
14038 * lib/abitset.h (abitset_bytes): Likewise.
14039 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
14040 Likewise.
14041 * lib/bitset.h (bitset_bytes): Likewise.
14042 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
14043 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
14044 * lib/bitsetv.c (bitsetv_alloc): Likewise.
14045 * lib/ebitset.c (ebitset_bytes): Likewise.
14046 * lib/ebitset.h (ebitset_bytes): Likewise.
14047 * lib/lbitset.c (lbitset_bytes): Likewise.
14048 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 14049
ff68026d
PE
14050 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
14051 abitset_subset_p, abitset_disjoint_p, abitset_and,
14052 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
14053 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
14054 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
14055 abitset_or_and, abitset_or_and_cmp):
14056 Use bitset_windex instead of unsigned int.
14057 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
14058 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
14059 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
14060 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
14061 Likewise.
14062 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 14063
ff68026d
PE
14064 * lib/bitset.c (bitset_print):
14065 Use proper printf formats for widths of integer types.
14066 * lib/bitset_stats.c (bitset_percent_histogram_print,
14067 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
14068 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14069 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
14070 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 14071
ff68026d
PE
14072 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
14073 BITSET_SIZE_MAX): New macros.
14074 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
14075 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
14076 to BITSET_WINDEX_MAX.
14077
14078 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
14079 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
14080 since we now return the bitset_bindex type (not int).
14081
14082 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
14083 when computing sizes.
14084 * lib/ebitset.c (ebitset_elts_grow): Likewise.
14085
14086 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
14087 and avoid cast to unsigned.
14088
6aa452a6
AD
140892002-09-30 Akim Demaille <akim@epita.fr>
14090
14091 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
14092 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
14093 Updates from Michael Hayes.
14094
927f7817
AD
140952002-09-30 Art Haas <ahaas@neosoft.com>
14096
14097 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
14098 invocations.
14099 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
14100 defined.
14101
9738f41e
AD
141022002-09-27 Akim Demaille <akim@epita.fr>
14103
14104 Version 1.49c.
14105
a5c75d7f
AD
141062002-09-27 Akim Demaille <akim@epita.fr>
14107
14108 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
14109 (Because of AC_LIBSOURCE).
14110
8280e179
AD
141112002-09-27 Akim Demaille <akim@epita.fr>
14112
14113 Playing with Autoscan.
14114
14115 * configure.ac: Remove the old LIBOBJ tweaks.
14116 (AC_REPLACE_FUNCS): Add strrchr and strtol.
14117 * lib/strrchr.c: New.
14118 * lib/strtol.c: New, from the Coreutils 4.5.1.
14119
ae64af35
AD
141202002-09-27 Akim Demaille <akim@epita.fr>
14121
14122 Playing with Autoscan.
14123
14124 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
14125 * lib/Makefile.am (libbison_a_SOURCES): No longer include
14126 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
14127 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
14128 Coreutils 4.5.1.
14129
d1a1114f
AD
141302002-09-24 Akim Demaille <akim@epita.fr>
14131
14132 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
14133 (Frequently Asked Questions, Parser Stack Overflow): New.
14134
b906441c
AD
141352002-09-13 Akim Demaille <akim@epita.fr>
14136
14137 Playing with autoscan.
14138
14139 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
14140 * src/files.c (skeleton_find): Remove, unused.
14141 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
14142 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
14143
bd701811
AD
141442002-09-13 Akim Demaille <akim@epita.fr>
14145
14146 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
14147 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
14148
e0a13e7b
AD
141492002-09-13 Akim Demaille <akim@epita.fr>
14150
14151 * configure.ac: Require 2.54.
14152 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
14153 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
14154 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
14155 Remove, provided by Autoconf macros.
14156
c97011bf
AD
141572002-09-12 Akim Demaille <akim@epita.fr>
14158
14159 * m4/prereq.m4: Update, from Coreutils 4.5.1.
14160
d862b1be
AD
141612002-09-12 Akim Demaille <akim@epita.fr>
14162
14163 * m4/prereq.m4: Update, from Fileutils 4.1.5.
14164 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
14165 Reported by Martin Mokrejs.
14166
3d38c03a
AD
141672002-09-10 Akim Demaille <akim@epita.fr>
14168
14169 * src/parse-gram.y: Associate a human readable string to each
14170 token type.
14171 * tests/regression.at (Invalid inputs): Adjust.
14172
b6347355
AD
141732002-09-10 Gary V. Vaughan <gary@gnu.org>
14174
14175 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
14176 with an Autoconf-2.5x style configure.ac.
14177
09ba4ab2
PE
141782002-09-06 Paul Eggert <eggert@twinsun.com>
14179
14180 * doc/bison.texinfo (Conditions): Make explicit that the GPL
14181 exception applies only to yacc.c. This is a modification of a
14182 patch originally suggested by Akim Demaille.
14183
21846f69
AD
141842002-09-06 Akim Demaille <akim@epita.fr>
14185
09ba4ab2
PE
14186 * data/c.m4 (b4_copyright): Move the GPL exception comment from
14187 here to...
14188 * data/yacc.c: here.
14189
21846f69
AD
14190 * data/lalr1.cc (struct yyltype): Don't define it, since we use
14191 LocationType.
14192 (b4_ltype): Default to yy::Location from location.hh.
14193
c0ad8bf3
AD
141942002-09-04 Jim Meyering <jim@meyering.net>
14195
14196 * data/yacc.c: Guard the declaration of yytoknum also with
14197 `#ifdef YYPRINT', so it is declared only when used.
14198
3a93251e
AD
141992002-09-04 Akim Demaille <akim@epita.fr>
14200
14201 * configure.in: Rename as...
14202 * configure.ac: this.
14203 Bump to 1.49c.
14204
427c0dda
AD
142052002-09-04 Akim Demaille <akim@epita.fr>
14206
14207 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
14208 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
14209 translate maintainer only messages.
14210
6a254321
PE
142112002-08-12 Paul Eggert <eggert@twinsun.com>
14212
645e30d1
PE
14213 Version 1.49b.
14214
6a254321
PE
14215 * Makefile.am (SUBDIRS): Remove intl.
14216 (DISTCLEANFILES): Remove.
14217 * NEWS: Mention that GNU M4 is now required. Clarify what is
14218 meant by "larger grammars". Mention the pt_BR translation.
14219 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
14220 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
14221 Bump version from 0.11.2 to 0.11.5.
14222 (BISON_PREREQ_STAGE): Remove.
14223 (AM_GNU_GETTEXT): Use external gettext.
14224 (AC_OUTPUT): Remove intl/Makefile.
14225
14226 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
14227
14228 * data/glr.c: Include string.h, for strlen.
14229 (yyreportParseError): Use size_t for yysize.
14230 (yy_yypstack): No longer nested inside yypstates, as nested
14231 functions are not portable. Do not assume size_t is the
14232 same width as int.
14233 (yypstates): Do not assume that ptrdiff_t is the same width
14234 as int, and similarly for yyposn and YYINDEX.
14235
14236 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
14237
14238 * lib/Makefile.am (INCLUDES): Do not include from the intl
14239 directory, which has been removed.
14240 * src/Makefile.am (INCLUDES): Likewise.
14241
14242 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
14243 (bitsets_sources, additional_bitsets_sources, timevars_sources):
14244 New vars.
14245
14246 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
14247 * tests/Makefile.am (EXTRA_DIST): Likewise.
14248
14249 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
14250 Do not assume that bitset_windex is the same width as unsigned.
14251
14252 * lib/abitset.c (abitset_unused_clear): Do not assume that
14253 bitset_word is the same width as int.
14254 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
14255 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
14256 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
14257 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
14258 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
14259
14260 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
14261 portability to one's complement hosts!).
14262 * lib/ebitset.c (ebitset_op1): Likewise.
14263 * lib/lbitset.c (lbitset_op1): Likewise.
14264
14265 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
14266 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
14267 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
14268 Sync with fileutils.
14269 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
14270 lib/gettext.h: Sync with diffutils.
14271
14272 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
14273 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
14274
14275 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
14276 PROTOTYPES to check for prototypes, and "defined __STDC__" to
14277 check for void *.
14278
14279 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
14280 size_t; the old version tried to do this but casted improperly.
14281 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
14282 (bitset_test): Now returns int, not unsigned long.
14283
14284 * lib/bitset_stats.c: Include "gettext.h".
14285 (_): New macro.
14286 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
14287 name locals "index", as it generates unnecessary warnings on some
14288 hosts that have an "index" function.
14289
14290 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
14291 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
14292 they need translation.
14293 * src/LR0.c (state_list_append, new_itemsets, get_state,
14294 append_states, generate_states): Likewise.
14295 * src/assoc.c (assoc_to_string): Likewise.
14296 * src/closure.c (print_closure, set_firsts, closure): Likewise.
14297 * src/gram.c (grammar_dump): Likewise.
14298 * src/injections.c (injections_compute): Likewise.
14299 * src/lalr.c (lookaheads_print): Likewise.
14300 * src/relation.c (relation_transpose): Likewise.
14301 * src/scan-gram.l: Likewise.
14302 * src/tables.c (table_grow, pack_vector): Likewise.
14303
14304 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
14305 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
14306 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
14307 * m4/mbstate_t.m4: Sync with fileutils.
14308 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
14309
14310 * po/LINGUAS: Add pt_BR.
14311 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
14312 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
14313 lib/timevar.c.
14314 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
14315 manual recommends.
14316 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
14317
14318 * src/complain.c (strerror_r): Remove decl; not needed.
14319 (strerror): Use same pattern as ../lib/error.c.
14320
14321 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
14322
14323 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
14324
14325 * src/main.c (main): Cast result of bindtextdomain and textdomain
14326 to void, to avoid a GCC warning when --disable-nls is in effect.
14327
14328 * src/scan-gram.l: Use strings rather than escapes when possible,
14329 to minimize the number of warnings from xgettext.
14330 (handle_action_dollar, handle_action_at): Don't use isdigit,
14331 as it mishandles negative chars and it may not work as expected
14332 outside the C locale.
14333
14334 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
14335 this is a GCC extension and is not portable to other compilers.
14336
14337 * src/system.h (alloca): Use same pattern as ../lib/error.c.
14338 Do not include <ctype.h>; no longer needed.
14339 Do not include <malloc.h>; no longer needed (and generates
14340 warnings on OpenBSD 3.0).
14341
14342 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
14343 it's not portable.
14344
14345 * tests/regression.at: Do not use 'cc -c input.c -o input';
14346 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
14347
14348 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
14349 exit status as failure, not just exit status 1. Sun C exits
14350 with status 2 sometimes.
14351
14352 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
14353 Use it for the two large tests.
14354
c8f002c7
AD
143552002-08-02 Akim Demaille <akim@epita.fr>
14356
14357 * src/conflicts.c (conflicts_output): Don't output rules never
14358 reduced here, since anyway that computation doesn't work.
14359 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
14360 (rule_useless_p, rule_never_reduced_p): New.
14361 (grammar_rules_partial_print): Use a filter instead of a range.
14362 Display the title only if needed.
14363 (grammar_rules_print): Adjust.
14364 (grammar_rules_never_reduced_report): New.
14365 * src/tables.c (action_row): Move the computation of rules never
14366 reduced to...
14367 (token_actions): here.
14368 * src/main.c (main): Make the parser before making the report, so
14369 that rules never reduced are computed.
14370 Call grammar_rules_never_reduced_report.
14371 * src/print.c (print_results): Report rules never reduced.
14372 * tests/conflicts.at, tests/reduce.at: Adjust.
14373
cd08e51e
AD
143742002-08-01 Akim Demaille <akim@epita.fr>
14375
14376 Instead of attaching lookaheads and duplicating the rules being
14377 reduced by a state, attach the lookaheads to the reductions.
14378
14379 * src/state.h (state_t): Remove the `lookaheads',
14380 `lookaheads_rule' member.
14381 (reductions_t): Add a `lookaheads' member.
14382 Use a regular array for the `rules'.
14383 * src/state.c (reductions_new): Initialize the lookaheads member
14384 to 0.
14385 (state_rule_lookaheads_print): Adjust.
14386 * src/state.h, src/state.c (state_reductions_find): New.
14387 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
14388 (count_rr_conflicts): Adjust.
14389 * src/lalr.c (LArule): Remove.
14390 (add_lookback_edge): Adjust.
14391 (state_lookaheads_count): New.
14392 (states_lookaheads_initialize): Merge into...
14393 (initialize_LA): this.
14394 (lalr_free): Adjust.
14395 * src/main.c (main): Don't free nullable and derives too early: it
14396 is used by --verbose.
14397 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
14398
bb0027a9
AD
143992002-08-01 Akim Demaille <akim@epita.fr>
14400
14401 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
14402 `rule_number_t**'.
14403 (set_derives, free_derives): Rename as...
14404 (derives_compute, derives_free): this.
14405 Adjust all dependencies.
14406 * src/nullable.c (set_nullable, free_nullable): Rename as...
14407 (nullable_compute, nullable_free): these.
14408 (rule_list_t): Store rule_t *, not rule_number_t.
14409 * src/state.c (state_rule_lookaheads_print): Directly compare rule
14410 pointers, instead of their numbers.
14411 * src/main.c (main): Call nullable_free, and derives_free earlier,
14412 as they were lo longer used.
14413
3325ddc4
AD
144142002-08-01 Akim Demaille <akim@epita.fr>
14415
14416 * lib/timevar.c (get_time): Include children time.
14417 * src/lalr.h (LA, LArule): Don't export them: used with the
14418 state_t.
14419 * src/lalr.c (LA, LArule): Static.
14420 * src/lalr.h, src/lalr.c (lalr_free): New.
14421 * src/main.c (main): Call it.
14422 * src/tables.c (pack_vector): Check whether loc is >= to the
14423 table_size, not >.
14424 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
14425 (tables_generate): do it, since that's also it which allocates
14426 them.
14427 Don't free LA and LArule, main does.
14428
c6f1a33c
AD
144292002-07-31 Akim Demaille <akim@epita.fr>
14430
14431 Separate parser tables computation and output.
14432
14433 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
14434 (conflict_list, conflict_list_cnt, table, check, table_ninf)
14435 (yydefgoto, yydefact, high): Move to...
14436 * src/tables.h, src/tables.c: here.
14437 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
14438 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
14439 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
14440 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
14441 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
14442 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
14443 (action_row, save_row, token_actions, save_column, default_goto)
14444 (goto_actions, sort_actions, matching_state, pack_vector)
14445 (table_ninf_remap, pack_table, prepare_actions): Move to...
14446 * src/tables.c: here.
14447 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
14448 * src/output.c (token_actions, output_base, output_conflicts)
14449 (output_check): Merge into...
14450 (prepare_actions): this.
14451 (actions_output): Rename as...
14452 (user_actions_output): this.
14453 * src/main.c (main): Call tables_generate and tables_free.
14454
1509d42f
AD
144552002-07-31 Akim Demaille <akim@epita.fr>
14456
14457 Steal GCC's --time-report support.
14458
14459 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
14460 stolen/adjusted from GCC.
14461 * m4/stage.m4: Remove time related checks.
14462 * m4/timevar.m4: New.
14463 * configure.in: Adjust.
14464 * src/system.h: Adjust to using timevar.h.
14465 * src/getargs.h, src/getargs.c: Support trace_time for
14466 --trace=time.
14467 * src/main.c (stage): Remove.
14468 (main): Replace `stage' invocations with timevar calls.
14469 * src/output.c: Insert pertinent timevar calls.
14470
273a74fa
AD
144712002-07-31 Akim Demaille <akim@epita.fr>
14472
14473 Let --trace have arguments.
14474
14475 * src/getargs.h (enum trace_e): New.
14476 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
14477 (long_options, short_options): --trace/-T takes an optional
14478 argument.
14479 Change all the uses of trace_flag to reflect the new flags.
14480 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
14481
14482 Strengthen `stage' portability.
14483
14484 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
14485 * configure.in: Use it.
14486 Don't check for malloc.h and sys/times.h.
14487 * src/system.h: Include them when appropriate.
14488 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
14489 times and struct tms are available.
14490
217598da
AD
144912002-07-30 Akim Demaille <akim@epita.fr>
14492
14493 In verbose parse error message, don't report `error' as an
14494 expected token.
14495 * tests/actions.at (Printers and Destructors): Adjust.
14496 * tests/calc.at (Calculator $1): Adjust.
14497 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
14498 error message, do not report the parser accepts the error token in
14499 that state.
14500
52489d44
AD
145012002-07-30 Akim Demaille <akim@epita.fr>
14502
14503 Normalize conflict related messages.
14504
14505 * src/complain.h, src/complain.c (warn, complain): New.
14506 * src/conflicts.c (conflicts_print): Use them.
14507 (conflict_report_yacc): New, extracted from...
14508 (conflicts_print): here.
14509 * tests/conflicts.at, tests/existing.at: Adjust.
14510
e8832397
AD
145112002-07-30 Akim Demaille <akim@epita.fr>
14512
14513 Report rules which are never reduced by the parser: those hidden
14514 by conflicts.
14515
14516 * src/LR0.c (save_reductions): Don't make the final state too
14517 different: save its reduction (accept) instead of having a state
14518 without any action (no shift or goto, no reduce).
14519 Note: the final state is now a ``regular'' state, i.e., the
14520 parsers now contain `reduce 0' as default reduction.
14521 Nevertheless, since they decide to `accept' when yystate =
14522 final_state, they still will not reduce rule 0.
14523 * src/print.c (print_actions, print_reduction): Adjust.
14524 * src/output.c (action_row): Track reduced rules.
14525 (token_actions): Report rules never reduced.
14526 * tests/conflicts.at, tests/regression.at: Adjust.
14527
caf23d24
AD
145282002-07-30 Akim Demaille <akim@epita.fr>
14529
14530 `stage' was accidently included in a previous patch.
14531 Initiate its autoconfiscation.
14532
14533 * configure.in: Look for malloc.h and sys/times.h.
14534 * src/main.c (stage): Adjust.
14535 Report only when trace_flag.
14536
640748ee
AD
145372002-07-29 Akim Demaille <akim@epita.fr>
14538
14539 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
14540 state_number_t.
14541 (errs_t): symbol_t*, not symbol_number_t.
14542 (reductions_t): rule_t*, not rule_number_t.
14543 (FOR_EACH_SHIFT): New.
14544 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
14545 * src/print.c, src/print_graph.c: Adjust.
14546
88bce5a2
AD
145472002-07-29 Akim Demaille <akim@epita.fr>
14548
14549 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
14550
14551 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
14552 (endtoken, accept): these.
14553 * src/reader.c (reader): Set endtoken's default tag to "$end".
14554 Set undeftoken's tag to "$undefined" instead of "$undefined.".
14555 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
14556 Adjust.
14557
1bfb97db
AD
145582002-07-29 Akim Demaille <akim@epita.fr>
14559
14560 * src/reduce.c (reduce_grammar): When the language is empty,
14561 complain about the start symbol, not the axiom.
14562 Use its location.
14563 * tests/reduce.at (Empty Language): New.
14564
fc5734fe
AD
145652002-07-26 Akim Demaille <akim@epita.fr>
14566
14567 * src/reader.h, src/reader.c (gram_error): ... can't get
14568 yycontrol without making too strong assumptions on the parser
14569 itself.
14570 * src/output.c (prepare_tokens): Use the real 0th value of
14571 token_translations instead of `0'.
14572 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
14573 visible here.
14574 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
14575 for the time being: %locations ought to provide it to yyerror.
14576
3650b4b8
AD
145772002-07-25 Akim Demaille <akim@epita.fr>
14578
14579 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
14580 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
14581 * tests/regression.at (Web2c Actions): Adjust.
14582
4b3d3a8e
AD
145832002-07-25 Akim Demaille <akim@epita.fr>
14584
14585 Stop storing rules from 1 to nrules + 1.
14586
14587 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
14588 * src/nullable.c, src/output.c, src/print.c, src/reader.c
14589 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
14590 Iterate from 0 to nrules.
14591 Use rule_number_as_item_number and item_number_as_rule_number.
14592 Adjust to `derive' now containing possibly 0.
14593 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
14594 Handle the `- 1' part in rule numbers from/to item numbers.
14595 * src/conflicts.c (log_resolution): Fix the message which reversed
14596 shift and reduce.
14597 * src/output.c (action_row): Initialize default_rule to -1.
14598 (token_actions): Adjust.
14599 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
14600 expected output.
14601 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
14602
4a2a22f4
AD
146032002-07-25 Akim Demaille <akim@epita.fr>
14604
14605 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
14606 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
14607 (b4_c_knr_arg_decl): New.
14608 * data/yacc.c: Use it to define yysymprint, yydestruct, and
14609 yyreport_parse_error.
14610
b8df3223
AD
146112002-07-25 Akim Demaille <akim@epita.fr>
14612
14613 * data/yacc.c (yyreport_parse_error): New, extracted from...
14614 (yyparse): here.
14615 (yydestruct, yysymprint): Move above yyparse.
14616 Be K&R compliant.
14617
a762e609
AD
146182002-07-25 Akim Demaille <akim@epita.fr>
14619
14620 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
14621 replace...
14622 (b4_sint_type, b4_uint_type): these.
14623 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
14624 * tests/regression.at (Web2c Actions): Adjust.
14625
12b0043a
AD
146262002-07-25 Akim Demaille <akim@epita.fr>
14627
14628 * src/gram.h (TIEM_NUMBER_MAX): New.
14629 (item_number_of_rule_number, rule_number_of_item_number): Rename
14630 as...
14631 (rule_number_as_item_number, item_number_as_rule_number): these.
14632 Adjust dependencies.
14633 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
14634 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
14635 (symbol_number_to_vector_number): New.
14636 (order): Of vector_number_t* type.
14637 (base_t, BASE_MAX, BASE_MIN): New.
14638 (froms, tos, width, pos, check): Of base_t type.
14639 (action_number_t, ACTION_MIN, ACTION_MAX): New.
14640 (actrow): Of action_number_t type.
14641 (conflrow): Of unsigned int type.
14642 (table_ninf, base_ninf): New.
14643 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
14644 (muscle_insert_int_table, muscle_insert_base_table)
14645 (muscle_insert_rule_number_table): New.
14646 (prepare_tokens): Output `toknum' as int_table.
14647 (action_row): Returns a rule_number_t.
14648 Use ACTION_MIN, not SHRT_MIN.
14649 (token_actions): yydefact is rule_number_t*.
14650 (table_ninf_remap): New.
14651 (pack_table): Use it for `base' and `table'.
14652 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
14653 replaced with...
14654 (YYPACT_NINF, YYTABLE_NINF): these.
14655 (yypact, yytable): Compute their types instead of hard-coded
14656 `short'.
14657 * tests/regression.at (Web2c Actions): Adjust.
14658
5dde258a
AD
146592002-07-19 Akim Demaille <akim@epita.fr>
14660
14661 * src/scan-gram.l (id): Can start with an underscore.
14662
a945ec39
AD
146632002-07-16 Akim Demaille <akim@epita.fr>
14664
14665 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
14666 Adjust all former `associativity' dependencies.
14667 * src/symtab.c (symbol_new): Default associativity is `undef', not
14668 `right'.
14669 (symbol_check_alias_consistence): Adjust.
14670
fae437e8
AD
146712002-07-09 Akim Demaille <akim@epita.fr>
14672
14673 * doc/bison.texinfo: Properly set the ``header'' part.
14674 Use @dircategory ``GNU programming tools'' as per Texinfo's
14675 documentation.
14676 Use @copying.
14677
1a715ef2
AD
146782002-07-09 Akim Demaille <akim@epita.fr>
14679
14680 * lib/quotearg.h: Protect against multiple inclusions.
14681 * src/location.h (location_t): Add a `file' member.
14682 (LOCATION_RESET, LOCATION_PRINT): Adjust.
14683 * src/complain.c (warn_at, complain_at, fatal_at): Drop
14684 `error_one_per_line' support.
14685
a5d50994
AD
146862002-07-09 Akim Demaille <akim@epita.fr>
14687
14688 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
14689 * src/reader.c (lineno): Remove.
14690 Adjust all dependencies.
14691 (get_merge_function): Take a location and use complain_at.
14692 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
14693 * tests/regression.at (Invalid inputs, Mixing %token styles):
14694 Adjust.
14695
b275314e
AD
146962002-07-09 Akim Demaille <akim@epita.fr>
14697
14698 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
14699 recovery rule, and forbid extensions when --yacc.
14700 (gram_error): Use complain_at.
14701 * src/reader.c (reader): Exit if there were parse errors.
14702
865b9df1
AD
147032002-07-09 Akim Demaille <akim@epita.fr>
14704
14705 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
14706 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
14707 Reported by R Blake <blakers@mac.com>.
14708
c76e14da
AD
147092002-07-09 Akim Demaille <akim@epita.fr>
14710
14711 * data/yacc.c: Output the copyright notive in the header.
14712
7db2ed2d
AD
147132002-07-03 Akim Demaille <akim@epita.fr>
14714
14715 * src/output.c (froms, tos): Are state_number_t.
14716 (save_column): sp, sp1, and sp2 are state_number_t.
14717 (prepare): Rename `final' as `final_state_number', `nnts' as
14718 `nterms_number', `nrules' as `rules_number', `nstates' as
14719 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
14720 unused.
14721 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
14722 * data/lalr1.cc (nsym_): Remove, unused.
14723
e68e0410
AD
147242002-07-03 Akim Demaille <akim@epita.fr>
14725
14726 * src/lalr.h, src/lalr.c (goto_number_t): New.
14727 * src/lalr.c (goto_list_t): New.
14728 Propagate them.
14729 * src/nullable.c (rule_list_t): New.
14730 Propagate.
14731 * src/types.h: Remove.
14732
e1a4f3a4
AD
147332002-07-03 Akim Demaille <akim@epita.fr>
14734
14735 * src/closure.c (print_fderives): Use rule_rhs_print.
14736 * src/derives.c (print_derives): Use rule_rhs_print.
14737 (rule_list_t): New, replaces `shorts'.
14738 (set_derives): Add comments.
14739 * tests/sets.at (Nullable, Firsts): Adjust.
14740
536545f3
AD
147412002-07-03 Akim Demaille <akim@epita.fr>
14742
14743 * src/output.c (prepare_actions): Free `tally' and `width'.
14744 (prepare_actions): Allocate and free `order'.
14745 * src/symtab.c (symbols_free): Free `symbols'.
14746 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
14747 * src/output.c (m4_invoke): Move to...
14748 * src/scan-skel.l: here.
14749 (<<EOF>>): Close yyout, and free its name.
14750
8b752b00
AD
147512002-07-03 Akim Demaille <akim@epita.fr>
14752
14753 Fix some memory leaks, and fix a bug: state 0 was examined twice.
14754
14755 * src/LR0.c (new_state): Merge into...
14756 (state_list_append): this.
14757 (new_states): Merge into...
14758 (generate_states): here.
14759 (set_states): Don't ensure a proper `errs' state member here, do it...
14760 * src/conflicts.c (conflicts_solve): here.
14761 * src/state.h, src/state.c: Comment changes.
14762 (state_t): Rename member `shifts' as `transitions'.
14763 Adjust all dependencies.
14764 (errs_new): For consistency, also take the values as argument.
14765 (errs_dup): Remove.
14766 (state_errs_set): New.
14767 (state_reductions_set, state_transitions_set): Assert that no
14768 previous value was assigned.
14769 (state_free): New.
14770 (states_free): Use it.
14771 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
14772 temporary storage: use `errs' and `nerrs' as elsewhere.
14773 (set_conflicts): Allocate and free this `errs'.
14774
613f5e1a
AD
147752002-07-02 Akim Demaille <akim@epita.fr>
14776
14777 * lib/libiberty.h: New.
14778 * lib: Update the bitset implementation from upstream.
14779 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
14780 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
14781 * src/main.c: Adjust bitset stats calls.
14782
26e0cadc
PE
147832002-07-01 Paul Eggert <eggert@twinsun.com>
14784
14785 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
14786 char, so that negative chars don't collide with $.
14787
1154cced
AD
147882002-06-30 Akim Demaille <akim@epita.fr>
14789
14790 Have the GLR tests be `warning' checked, and fix the warnings.
14791
14792 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
14793 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
14794 (yyremoveDeletes): `yyi' and `yyj' are size_t.
14795 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
14796 (yyaddDeferredAction): static.
14797 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
14798 (yyreportParseError): yyprefix is const.
14799 yytokenp is used only when verbose.
14800 (yy__GNUC__): Replace with __GNUC__.
14801 (yypdumpstack): yyi is size_t.
14802 (yypreference): Un-yy local variables and arguments, to avoid
14803 clashes with `yyr1'. Anyway, we are not in the user name space.
14804 (yytname_size): be an int, as is compared with ints.
14805 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
14806 Use them.
14807 * tests/cxx-gram.at: Use quotation to protect $1.
14808 Use AT_COMPILE to enable warnings hunts.
14809 Prototype yylex and yyerror.
14810 `Use' argc.
14811 Include `string.h', not `strings.h'.
14812 Produce and prototype stmtMerge only when used.
14813 yylex takes a location.
14814
97650f4e
AD
148152002-06-30 Akim Demaille <akim@epita.fr>
14816
14817 We spend a lot of time in quotearg, in particular when --verbose.
14818
14819 * src/symtab.c (symbol_get): Store a quoted version of the key.
14820 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
14821 Adjust all callers.
14822
d2576365
AD
148232002-06-30 Akim Demaille <akim@epita.fr>
14824
14825 * src/state.h (reductions_t): Rename member `nreds' as num.
14826 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
14827 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
14828
ccaf65bc
AD
148292002-06-30 Akim Demaille <akim@epita.fr>
14830
14831 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
14832 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
14833 (shifts_to): Rename as...
14834 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
14835 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
14836 (TRANSITION_IS_DISABLED, transitions_to): these.
14837
87675353
AD
148382002-06-30 Akim Demaille <akim@epita.fr>
14839
14840 * src/print.c (print_shifts, print_gotos): Merge into...
14841 (print_transitions): this.
14842 (print_transitions, print_errs, print_reductions): Align the
14843 lookaheads columns.
14844 (print_core, print_transitions, print_errs, print_state,
14845 print_grammar): Output empty lines separator before, not after.
14846 (state_default_rule_compute): Rename as...
14847 (state_default_rule): this.
14848 * tests/conflicts.at (Defaulted Conflicted Reduction),
14849 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
14850 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
14851
ce4ccb4b
AD
148522002-06-30 Akim Demaille <akim@epita.fr>
14853
14854 Display items as we display rules.
14855
14856 * src/gram.h, src/gram.c (rule_lhs_print): New.
14857 * src/gram.c (grammar_rules_partial_print): Use it.
14858 * src/print.c (print_core): Likewise.
14859 * tests/conflicts.at (Defaulted Conflicted Reduction),
14860 (Unresolved SR Conflicts): Adjust.
14861 (Unresolved SR Conflicts): Adjust and rename as...
14862 (Resolved SR Conflicts): this, as was meant.
14863 * tests/regression.at (Web2c Report): Adjust.
14864
bc933ef1
AD
148652002-06-30 Akim Demaille <akim@epita.fr>
14866
14867 * src/print.c (state_default_rule_compute): New, extracted from...
14868 (print_reductions): here.
14869 Pessimize, but clarify the code.
14870 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
14871
53d4308d
AD
148722002-06-30 Akim Demaille <akim@epita.fr>
14873
14874 * src/output.c (action_row): Let default_rule be always a rule
14875 number.
14876
574fb2d5
AD
148772002-06-30 Akim Demaille <akim@epita.fr>
14878
14879 * src/closure.c (print_firsts, print_fderives, closure):
14880 Use BITSET_EXECUTE.
14881 * src/lalr.c (lookaheads_print): Likewise.
14882 * src/state.c (state_rule_lookaheads_print): Likewise.
14883 * src/print_graph.c (print_core): Likewise.
14884 * src/print.c (print_reductions): Likewise.
14885 * src/output.c (action_row): Likewise.
14886 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
14887
05811fd7
AD
148882002-06-30 Akim Demaille <akim@epita.fr>
14889
14890 * src/print_graph.c: Use report_flag.
14891
0e4d5753
AD
148922002-06-30 Akim Demaille <akim@epita.fr>
14893
14894 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
14895 to...
14896 * src/relation.h, src/relation.c (traverse, relation_digraph)
14897 (relation_print, relation_transpose): New.
14898
24c7d800
AD
148992002-06-30 Akim Demaille <akim@epita.fr>
14900
14901 * src/state.h, src/state.c (shifts_to): New.
14902 * src/lalr.c (build_relations): Use it.
14903
9222837b
AD
149042002-06-30 Akim Demaille <akim@epita.fr>
14905
14906 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
14907 (item_number_of_rule_number, rule_number_of_item_number): New.
14908 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
14909 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
14910 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
14911 Propagate their use.
14912 Much remains to be done, in particular wrt `shorts' from types.h.
14913
260008e5
AD
149142002-06-30 Akim Demaille <akim@epita.fr>
14915
14916 * src/symtab.c (symbol_new): Initialize the `printer' member.
14917
8a731ca8
AD
149182002-06-30 Akim Demaille <akim@epita.fr>
14919
14920 * src/LR0.c (save_reductions): Remove, replaced by...
14921 * src/state.h, src/state.c (state_reductions_set): New.
14922 (reductions, errs): Rename as...
14923 (reductions_t, errs_t): these.
14924 Adjust all dependencies.
14925
32e1e0a4
AD
149262002-06-30 Akim Demaille <akim@epita.fr>
14927
14928 * src/LR0.c (state_list_t, state_list_append): New.
14929 (first_state, last_state): Now symbol_list_t.
14930 (this_state): Remove.
14931 (new_itemsets, append_states, save_reductions): Take a state_t as
14932 argument.
14933 (set_states, generate_states): Adjust.
14934 (save_shifts): Remove, replaced by...
14935 * src/state.h, src/state.c (state_shifts_set): New.
14936 (shifts): Rename as...
14937 (shifts_t): this.
14938 Adjust all dependencies.
14939 * src/state.h (state_t): Remove the `next' member.
14940
e5fb6710
AD
149412002-06-30 Akim Demaille <akim@epita.fr>
14942
14943 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
14944 escaped in slot 0.
14945
c7ca99d4
AD
149462002-06-30 Akim Demaille <akim@epita.fr>
14947
14948 Use hash.h for the state hash table.
14949
14950 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
14951 (allocate_storage): Use state_hash_new.
14952 (free_storage): Use state_hash_free.
14953 (new_state, get_state): Adjust.
14954 * src/lalr.h, src/lalr.c (states): Move to...
14955 * src/states.h (state_t): Remove the `link' member, no longer
14956 used.
14957 * src/states.h, src/states.c: here.
14958 (state_hash_new, state_hash_free, state_hash_lookup)
14959 (state_hash_insert, states_free): New.
14960 * src/states.c (state_table, state_compare, state_hash): New.
14961 * src/output.c (output_actions): Do not free states now, since we
14962 still need to know the final_state number in `prepare', called
14963 afterwards. Do it...
14964 * src/main.c (main): here: call states_free after `output'.
14965
df0e7316
AD
149662002-06-30 Akim Demaille <akim@epita.fr>
14967
14968 * src/state.h, src/state.c (state_new): New, extracted from...
14969 * src/LR0.c (new_state): here.
14970 * src/state.h (STATE_ALLOC): Move to...
14971 * src/state.c: here.
14972 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
14973 * src/state.h, src/state.c: here.
14974
39f41916
AD
149752002-06-30 Akim Demaille <akim@epita.fr>
14976
14977 * src/reader.c (gensym): Rename as...
14978 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
14979 (getsym): Rename as...
14980 (symbol_get): this.
14981
d57650a5
AD
149822002-06-30 Akim Demaille <akim@epita.fr>
14983
14984 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
14985 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
14986 * src/output.c, src/print.c, src/print_graph.c: Propagate.
14987 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
14988
5a08f1ce
AD
149892002-06-30 Akim Demaille <akim@epita.fr>
14990
14991 Make the test suite pass with warnings checked.
14992
14993 * tests/actions.at (Printers and Destructors): Improve.
14994 Avoid unsigned vs. signed issues.
14995 * tests/calc.at: Don't exercise the scanner here, do it...
14996 * tests/input.at (Torturing the Scanner): here.
14997
720623af
PH
149982002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14999
88e7e941 15000 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
15001 reorganize first lines parallel to yacc.c.
15002
fb8135fa
AD
150032002-06-28 Akim Demaille <akim@epita.fr>
15004
15005 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
15006 (b4_token_enum, b4_token_defines): New, factored from...
15007 * data/lalr1.cc, data/yacc.c, glr.c: here.
15008
41442480
AD
150092002-06-28 Akim Demaille <akim@epita.fr>
15010
15011 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
15012 unused variables.
15013 * src/output.c (merger_output): static.
15014
e0e5bf84
AD
150152002-06-28 Akim Demaille <akim@epita.fr>
15016
ba0fe3c7 15017 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
e0e5bf84
AD
15018 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
15019 pacify GCC.
15020 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 15021
676385e2
PH
150222002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15023
15024 Accumulated changelog for new GLR parsing features.
15025
6a254321 15026 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
15027 conflicts_total_count.
15028 * src/conflicts.h: Ditto.
15029 * src/output.c (token_actions): Use the new name.
15030 (output_conflicts): Change conflp => conflict_list_heads, and
15031 confl => conflict_list for better readability.
15032 * data/glr.c: Use the new names.
15033 * NEWS: Add self to GLR announcement.
e0e5bf84 15034
676385e2
PH
15035 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
15036
15037 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
15038 Akim Demaille.
15039
15040 * data/bison.glr: Change name to glr.c
15041 * data/glr.c: Renamed from bison.glr.
15042 * data/Makefile.am: Add glr.c
e0e5bf84
AD
15043
15044 * src/getargs.c:
15045
676385e2 15046 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
ba0fe3c7 15047 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 15048
676385e2
PH
15049 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15050
15051 * data/bison.glr: Be sure to restore the
15052 current #line when returning to the skeleton contents after having
15053 exposed the input file's #line.
15054
15055 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15056
15057 * data/bison.glr: Bring up to date with changes to bison.simple.
15058
15059 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15060
15061 * data/bison.glr: Correct definitions that use b4_prefix.
15062 Various reformatting.
15063 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
15064 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
15065 yytokenp argument; now part of stack.
15066 (yychar): Define to behave as documented.
15067 (yyclearin): Ditto.
e0e5bf84 15068
676385e2
PH
15069 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15070
15071 * src/reader.h: Add declaration for free_merger_functions.
15072
15073 * src/reader.c (merge_functions): New variable.
15074 (get_merge_function): New function.
15075 (free_merger_functions): New function.
15076 (readgram): Check for %prec that is not followed by a symbol.
15077 Handle %dprec and %merge declarations.
15078 (packgram): Initialize dprec and merger fields in rules array.
15079
15080 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
15081 conflict_list_cnt, conflict_list_free): New variables.
15082 (table_grow): Also grow conflict_table.
e0e5bf84 15083 (prepare_rules): Output dprec and merger tables.
676385e2 15084 (conflict_row): New function.
e0e5bf84 15085 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
15086 default reduction in conflicted states for GLR parser so that there
15087 are spaces for the conflict lists.
15088 (save_row): Also save conflict information.
15089 (token_actions): Allocate conflict list.
15090 (merger_output): New function.
15091 (pack_vector): Pack conflict table, too.
15092 (output_conflicts): New function to output yyconflp and yyconfl.
15093 (output_check): Allocate conflict_tos.
15094 (output_actions): Output conflict tables, also.
15095 (output_skeleton): Output b4_mergers definition.
15096 (prepare): Output b4_max_rhs_length definition.
15097 Use 'bison.glr' as default skeleton for GLR parsers.
15098
15099 * src/gram.c (glr_parser): New flag.
15100 (grammar_free): Call free_merger_functions.
15101
15102 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
15103 all pairs of conflicting reductions, rather than just all tokens
15104 causing conflicts. Needed to size conflict tables.
e0e5bf84 15105 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
15106 interface.
15107 (conflicts_print): Ditto.
15108 (count_total_conflicts): New function.
15109
15110 * src/reader.h (merger_list): New type.
15111 (merge_functions): New variable.
15112
15113 * src/lex.h (tok_dprec, tok_merge): New token types.
15114
15115 * src/gram.h (rule_s): Add dprec and merger fields.
15116 (glr_parser): New flag.
15117
15118 * src/conflicts.h (count_total_conflicts): New function.
15119
15120 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
15121
15122 * doc/bison.texinfo (Generalized LR Parsing): New section.
15123 (GLR Parsers): New section.
15124 (Language and Grammar): Mention GLR parsing.
15125 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
15126 Correct typo ("tge" -> "the").
15127
15128 * data/bison.glr: New skeleton for GLR parsing.
15129
15130 * tests/cxx-gram.at: New tests for GLR parsing.
15131
15132 * tests/testsuite.at: Include cxx-gram.at.
15133
15134 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 15135
676385e2
PH
15136 * src/parse-gram.y:
15137
15138 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
15139
15140 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 15141
b5480d74 151422002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
15143
15144 * src/options.h, src/options.c: Remove.
15145 * src/getargs.c (short_options, long_options): New.
15146
60491a94
AD
151472002-06-27 Akim Demaille <akim@epita.fr>
15148
15149 * data/bison.simple, data/bison.c++: Rename as...
15150 * data/yacc.c, data/lalr1.cc: these.
15151 * doc/bison.texinfo (Environment Variables): Remove.
15152
9be0c25b
AD
151532002-06-25 Raja R Harinath <harinath@cs.umn.edu>
15154
15155 * src/getargs.c (report_argmatch): Initialize strtok().
15156
1ae72863
AD
151572002-06-20 Akim Demaille <akim@epita.fr>
15158
15159 * data/bison.simple (b4_symbol_actions): New, replaces...
15160 (b4_symbol_destructor, b4_symbol_printer): these.
15161 (yysymprint): Be sure to call YYPRINT only for tokens, and using
15162 user token numbers.
15163
87542d29
AD
151642002-06-20 Akim Demaille <akim@epita.fr>
15165
15166 * data/bison.simple (yydestructor): Rename as...
15167 (yydestruct): this.
15168
1a31ed21
AD
151692002-06-20 Akim Demaille <akim@epita.fr>
15170
15171 * src/symtab.h, src/symtab.c (symbol_type_set)
15172 (symbol_destructor_set, symbol_precedence_set): The location is
15173 the last argument.
15174 Adjust all callers.
15175
e776192e
AD
151762002-06-20 Akim Demaille <akim@epita.fr>
15177
15178 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
15179 internals.
15180 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
15181 Takes a location.
15182 * src/symtab.h, src/symtab.c (symbol_class_set)
15183 (symbol_user_token_number_set): Likewise.
15184 Adjust all callers.
15185 Promote complain_at.
15186 * tests/input.at (Type Clashes): Adjust.
15187
5c1180b3
AD
151882002-06-20 Akim Demaille <akim@epita.fr>
15189
15190 * data/bison.simple (YYLEX): Fix the declaration when
15191 %pure-parser.
15192
e3170060
AD
151932002-06-20 Akim Demaille <akim@epita.fr>
15194
15195 * data/bison.simple (yysymprint): Don't print the token number,
15196 just its name.
15197 * tests/actions.at (Destructors): Rename as...
15198 (Printers and Destructors): this.
15199 Also exercise %printer.
15200
253862fd
AD
152012002-06-20 Akim Demaille <akim@epita.fr>
15202
15203 * data/bison.simple (YYDSYMPRINT): New.
15204 Use it to remove many of the #if YYDEBUG/if (yydebug).
15205
366eea36
AD
152062002-06-20 Akim Demaille <akim@epita.fr>
15207
15208 * src/symtab.h, src/symtab.c (symbol_t): printer and
15209 printer_location are new members.
15210 (symbol_printer_set): New.
15211 * src/parse-gram.y (PERCENT_PRINTER): New token.
15212 Handle its associated rule.
15213 * src/scan-gram.l: Adjust.
15214 (handle_destructor_at, handle_destructor_dollar): Rename as...
15215 (handle_symbol_code_at, handle_symbol_code_dollar): these.
15216 * src/output.c (symbol_printers_output): New.
15217 (output_skeleton): Call it.
15218 * data/bison.simple (yysymprint): New. Cannot be named yyprint
15219 since there are already many grammar files with a user `yyprint'.
15220 Replace the calls to YYPRINT to calls to yysymprint.
15221 * tests/calc.at: Adjust.
15222 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
15223 taking advantage of parser very internal details (stack size!).
15224
4f25ebb0
AD
152252002-06-20 Akim Demaille <akim@epita.fr>
15226
15227 * src/scan-gram.l: Complete the scanner with the missing patterns
15228 to pacify Flex.
15229 Use `quote' and `symbol_tag_get' where appropriate.
15230
93b68a0e
AD
152312002-06-19 Akim Demaille <akim@epita.fr>
15232
15233 * tests/actions.at (Destructors): Augment to test locations.
15234 * data/bison.simple (yydestructor): Pass it the current location
15235 if locations are enabled.
15236 Prototype only when __STDC__ or C++.
15237 Change the argument names to move into the yy name space: there is
15238 user code here.
15239
58612f1d
AD
152402002-06-19 Akim Demaille <akim@epita.fr>
15241
74310291
AD
15242 * data/bison.simple (b4_pure_if): New.
15243 Use it instead of #ifdef YYPURE.
15244
152452002-06-19 Akim Demaille <akim@epita.fr>
15246
15247 * data/bison.simple (b4_location_if): New.
58612f1d
AD
15248 Use it instead of #ifdef YYLSP_NEEDED.
15249
f25bfb75
AD
152502002-06-19 Akim Demaille <akim@epita.fr>
15251
15252 Prepare @$ in %destructor, but currently don't bind it in the
15253 skeleton, as %location use is not cleaned up yet.
15254
15255 * src/scan-gram.l (handle_dollar, handle_destructor_at)
15256 (handle_action_at): New.
15257 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
15258 a braced_code_t and a location as additional arguments.
15259 (handle_destructor_dollar): Instead of requiring `b4_eval', just
15260 unquote one when outputting `b4_dollar_dollar'.
15261 Adjust callers.
15262 * data/bison.simple (b4_eval): Remove.
15263 (b4_symbol_destructor): Adjust.
15264 * tests/input.at (Invalid @n): Adjust.
15265
c732d2c6
AD
152662002-06-19 Zack Weinberg <zack@codesourcery.com>
15267
15268 * doc/bison.texinfo: Document ability to have multiple
15269 prologue sections.
15270
8c165d89
AD
152712002-06-18 Akim Demaille <akim@epita.fr>
15272
15273 * src/files.c (compute_base_names): When computing the output file
15274 names from the input file name, strip the directory part.
15275
ca98bf57
AD
152762002-06-18 Akim Demaille <akim@epita.fr>
15277
15278 * data/bison.simple.new: Comment changes.
15279 Reported by Andreas Schwab.
15280
0bfb02ff
AD
152812002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
15282
15283 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
15284 there are no `label `yyoverflowlab' defined but not used' warnings
15285 when yyoverflow is defined.
15286
24c0aad7
AD
152872002-06-18 Akim Demaille <akim@epita.fr>
15288
15289 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
15290 new member.
15291 (symbol_destructor_set): Adjust.
15292 * src/output.c (symbol_destructors_output): Output the destructor
15293 locations.
15294 Output the symbol name.
15295 * data/bison.simple (b4_symbol_destructor): Adjust.
15296
5719c109
AD
152972002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
15298 and Akim Demaille <akim@epita.fr>
15299
15300 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
15301 what's left on the stack when the error recovery hits EOF.
15302 * tests/actions.at (Destructors): Complete to exercise this case.
15303
9280d3ef
AD
153042002-06-17 Akim Demaille <akim@epita.fr>
15305
15306 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
15307 arguments is really empty, not only equal to `[]'.
15308 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
15309 member.
15310 (symbol_destructor_set): New.
15311 * src/output.c (symbol_destructors_output): New.
15312 * src/reader.h (brace_code_t, current_braced_code): New.
15313 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
15314 (handle_dollar): Rename as...
15315 (handle_action_dollar): this.
15316 (handle_destructor_dollar): New.
15317 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
15318 (grammar_declaration): Use it.
15319 * data/bison.simple (yystos): Is always defined.
15320 (yydestructor): New.
15321 * tests/actions.at (Destructors): New.
15322 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
15323
dafdc66f
AD
153242002-06-17 Akim Demaille <akim@epita.fr>
15325
15326 * src/symlist.h, src/symlist.c (symbol_list_length): New.
15327 * src/scan-gram.l (handle_dollar, handle_at): Compute the
15328 rule_length only when needed.
15329 * src/output.c (actions_output, token_definitions_output): Output
15330 the full M4 block.
15331 * src/symtab.c: Don't access directly to the symbol tag, use
15332 symbol_tag_get.
15333 * src/parse-gram.y: Use symbol_list_free.
15334
56c47203
AD
153352002-06-17 Akim Demaille <akim@epita.fr>
15336
15337 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
15338 (symbol_list_prepend, get_type_name): Move to...
15339 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
15340 (symbol_list_prepend, symbol_list_n_type_name_get): here.
15341 Adjust all callers.
15342 (symbol_list_free): New.
15343 * src/scan-gram.l (handle_dollar): Takes a location.
15344 * tests/input.at (Invalid $n): Adjust.
15345
1e0bab92
AD
153462002-06-17 Akim Demaille <akim@epita.fr>
15347
15348 * src/reader.h, src/reader.c (symbol_list_new): Export it.
15349 (symbol_list_prepend): New.
15350 * src/parse-gram.y (%union): `list' is a new member.
15351 (symbols.1): New, replaces...
15352 (terms_to_prec.1, nterms_to_type.1): these.
15353 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
15354 Take a location as additional argument.
15355 Adjust all callers.
15356
04e60654
AD
153572002-06-15 Akim Demaille <akim@epita.fr>
15358
15359 * src/parse-gram.y: Move %token in the declaration section so that
15360 we don't depend upon CVS Bison.
15361
10e5b8bd
AD
153622002-06-15 Akim Demaille <akim@epita.fr>
15363
15364 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
15365 * src/print.c (print_core): Use it.
15366
9801d40c
AD
153672002-06-15 Akim Demaille <akim@epita.fr>
15368
15369 * src/conflicts.c (log_resolution): Accept the rule involved in
15370 the sr conflicts instead of the lookahead number that points to
15371 that rule.
15372 (flush_reduce): Accept the current lookahead vector as argument,
15373 instead of the index in LA.
15374 (resolve_sr_conflict): Accept the current number of lookahead
15375 bitset to consider for the STATE, instead of the index in LA.
15376 (set_conflicts): Adjust.
15377 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
15378
c0263492
AD
153792002-06-15 Akim Demaille <akim@epita.fr>
15380
15381 * src/state.h (state_t): Replace the `lookaheadsp' member, a
15382 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
15383 Adjust all dependencies.
15384 * src/lalr.c (initialize_lookaheads): Split into...
15385 (states_lookaheads_count, states_lookaheads_initialize): these.
15386 (lalr): Adjust.
15387
9757c359
AD
153882002-06-15 Akim Demaille <akim@epita.fr>
15389
15390 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
15391 out of...
15392 (grammar_rules_print): here.
15393 * src/reduce.c (reduce_output): Use it.
15394 * tests/reduce.at (Useless Rules, Reduced Automaton)
15395 (Underivable Rules): Adjust.
15396
6b98e4b5
AD
153972002-06-15 Akim Demaille <akim@epita.fr>
15398
15399 Copy BYacc's nice way to report the grammar.
15400
15401 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
15402 New.
15403 Don't print the rules' location, it is confusing and useless.
15404 (rule_print): Use grammar_rhs_print.
15405 * src/print.c (print_grammar): Use grammar_rules_print.
15406
6b98e4b5
AD
154072002-06-15 Akim Demaille <akim@epita.fr>
15408
15409 Complete and rationalize `useless thing' warnings.
15410
15411 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
15412 (symbol_tag_print): New.
15413 Use them everywhere in place of accessing directly the tag member.
15414 * src/gram.h, src/gram.c (rule_print): New.
15415 Use it where a rule used to be printed `by hand'.
15416 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
15417 (reduce_grammar_tables): Report the useless rules.
15418 (reduce_print): Useless things are a warning, not an error.
15419 Report it as such.
15420 * tests/reduce.at (Useless Nonterminals, Useless Rules):
15421 (Reduced Automaton, Underivable Rules): Adjust.
15422 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
15423 * tests/conflicts.at (Unresolved SR Conflicts)
15424 (Solved SR Conflicts): Adjust.
15425
ee000ba4
AD
154262002-06-15 Akim Demaille <akim@epita.fr>
15427
15428 Let symbols have a location.
15429
15430 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
15431 (getsym): Adjust.
15432 Adjust all callers.
15433 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
15434 Use location_t, not int.
15435 * src/symtab.c (symbol_check_defined): Take advantage of the
15436 location.
15437 * tests/regression.at (Invalid inputs): Adjust.
15438
8efe435c
AD
154392002-06-15 Akim Demaille <akim@epita.fr>
15440
15441 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
15442 (input): Don't try to initialize yylloc here, do it in the
15443 scanner.
15444 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
15445 * src/gram.h (rule_t): Change line and action_line into location
15446 and action_location, of location_t type.
15447 Adjust all dependencies.
15448 * src/location.h, src/location.c (empty_location): New.
15449 * src/reader.h, src/reader.c (grammar_start_symbol_set)
15450 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
15451 (grammar_current_rule_symbol_append)
15452 (grammar_current_rule_action_append): Expect a location as argument.
15453 * src/reader.c (grammar_midrule_action): Adjust to attach an
15454 action's location as dummy symbol location.
15455 * src/symtab.h, src/symtab.c (startsymbol_location): New.
15456 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
15457 the line numbers.
15458
1921f1d7
AD
154592002-06-14 Akim Demaille <akim@epita.fr>
15460
15461 Grammar declarations may be found in the grammar section.
15462
15463 * src/parse-gram.y (rules_or_grammar_declaration): New.
15464 (declarations): Each declaration may end with a semicolon, not
15465 just...
15466 (grammar_declaration): `"%union"'.
15467 (grammar): Branch to rules_or_grammar_declaration.
15468
4515534c
AD
154692002-06-14 Akim Demaille <akim@epita.fr>
15470
15471 * src/main.c (main): Invoke scanner_free.
15472
f958596b
AD
154732002-06-14 Akim Demaille <akim@epita.fr>
15474
15475 * src/output.c (m4_invoke): Extracted from...
15476 (output_skeleton): here.
15477 Free tempfile.
15478
2c569025
AD
154792002-06-14 Akim Demaille <akim@epita.fr>
15480
15481 * src/parse-gram.y (directives, directive, gram)
15482 (grammar_directives, precedence_directives, precedence_directive):
15483 Rename as...
15484 (declarations, declaration, grammar, grammar_declaration)
15485 (precedence_declaration, precedence_declarator): these.
15486 (symbol_declaration): New.
15487
592e8d4d
AD
154882002-06-14 Akim Demaille <akim@epita.fr>
15489
15490 * src/files.c (action_obstack): Remove, unused.
15491 (output_obstack): Remove it, and all its dependencies, as it is no
15492 longer needed.
15493 * src/reader.c (epilogue_set): Build the epilogue in the
15494 muscle_obstack.
15495 * src/output.h, src/output.c (muscle_obstack): Move to...
15496 * src/muscle_tab.h, src/muscle_tab.h: here.
15497 (muscle_init): Initialize muscle_obstack.
15498 (muscle_free): New.
15499 * src/main.c (main): Call it.
15500
0c15323d
AD
155012002-06-14 Akim Demaille <akim@epita.fr>
15502
15503 * src/location.h: New, extracted from...
15504 * src/reader.h: here.
15505 * src/Makefile.am (noinst_HEADERS): Merge into
15506 (bison_SOURCES): this.
15507 Add location.h.
15508 * src/parse-gram.y: Use location_t instead of Bison's.
15509 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
15510 Use location_t instead of ints.
15511
e96c9728
AD
155122002-06-14 Akim Demaille <akim@epita.fr>
15513
15514 * data/bison.simple, data/bison.c++: Be sure to restore the
15515 current #line when returning to the skeleton contents after having
15516 exposed the input file's #line.
15517
75d1fe16
AD
155182002-06-12 Akim Demaille <akim@epita.fr>
15519
15520 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
15521 eager.
15522 * tests/actions.at (Exotic Dollars): New.
15523
6c35d22c
AD
155242002-06-12 Akim Demaille <akim@epita.fr>
15525
15526 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
15527 ['"/] too eagerly.
15528 * tests/input.at (Torturing the Scanner): New.
15529
1d6412ad
AD
155302002-06-11 Akim Demaille <akim@epita.fr>
15531
15532 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
15533 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
15534 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
15535 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
15536 * src/reader.c (reader): Use it.
15537
4cdb01db
AD
155382002-06-11 Akim Demaille <akim@epita.fr>
15539
15540 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
15541 Adjust all callers.
15542 (scanner_last_string_free): New.
15543
44995b2e
AD
155442002-06-11 Akim Demaille <akim@epita.fr>
15545
15546 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
15547 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
15548 (last_string, YY_OBS_FREE): New.
15549 Use them when returning an ID.
15550
e9955c83
AD
155512002-06-11 Akim Demaille <akim@epita.fr>
15552
15553 Have Bison grammars parsed by a Bison grammar.
15554
15555 * src/reader.c, src/reader.h (prologue_augment): New.
15556 * src/reader.c (copy_definition): Remove.
15557
15558 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
15559 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
15560 (grammar_current_rule_prec_set, grammar_current_rule_check)
15561 (grammar_current_rule_symbol_append)
15562 (grammar_current_rule_action_append): Export.
15563 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
15564 (symbol_list_action_append): Remove.
15565 Hook the routines from reader.
15566 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
15567 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
15568
15569 * src/reader.c (read_declarations): Remove, unused.
15570
15571 * src/parse-gram.y: Handle the epilogue.
15572 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
15573 (grammar_start_symbol_set): this.
15574 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
15575 * src/reader.c (readgram): Remove, unused.
15576 (reader): Adjust to insert eoftoken and axiom where appropriate.
15577
15578 * src/reader.c (copy_dollar): Replace with...
15579 * src/scan-gram.h (handle_dollar): this.
15580 * src/parse-gram.y: Remove `%thong'.
15581
15582 * src/reader.c (copy_at): Replace with...
15583 * src/scan-gram.h (handle_at): this.
15584
15585 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
15586 New.
15587
15588 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
15589 time being.
15590
15591 * src/reader.h, src/reader.c (grammar_rule_end): New.
15592
15593 * src/parse.y (current_type, current_class): New.
15594 Implement `%nterm', `%token' support.
15595 Merge `%term' into `%token'.
15596 (string_as_id): New.
15597 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
15598 type name.
15599
15600 * src/parse-gram.y: Be sure to handle properly the beginning of
15601 rules.
15602
15603 * src/parse-gram.y: Handle %type.
15604 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
15605
15606 * src/parse-gram.y: More directives support.
15607 * src/options.c: No longer handle source directives.
15608
15609 * src/parse-gram.y: Fix %output.
15610
15611 * src/parse-gram.y: Handle %union.
15612 Use the prologue locations.
15613 * src/reader.c (parse_union_decl): Remove.
15614
15615 * src/reader.h, src/reader.c (epilogue_set): New.
15616 * src/parse-gram.y: Use it.
15617
15618 * data/bison.simple, data/bison.c++: b4_stype is now either not
15619 defined, then default to int, or to the contents of %union,
15620 without `union' itself.
15621 Adjust.
15622 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
15623
15624 * src/output.c (actions_output): Don't output braces, as they are
15625 already handled by the scanner.
15626
15627 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
15628 characters to themselves.
15629
15630 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
15631 that the epilogue has a proper #line.
15632
15633 * src/parse-gram.y: Handle precedence/associativity.
15634
15635 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
15636 a terminal.
15637 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
15638 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
15639 at all to define terminals that cannot be emitted.
15640
15641 * src/scan-gram.l: Escape M4 characters.
15642
15643 * src/scan-gram.l: Working properly with escapes in user
15644 strings/characters.
15645
15646 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
15647 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
15648 grammar.
15649 Use more modest sizes, as for the time being the parser does not
15650 release memory, and therefore the process swallows a huge amount
15651 of memory.
15652
15653 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
15654 stricter %token grammar.
15655
15656 * src/symtab.h (associativity): Add `undef_assoc'.
15657 (symbol_precedence_set): Do nothing when passed an undef_assoc.
15658 * src/symtab.c (symbol_check_alias_consistence): Adjust.
15659
15660 * tests/regression.at (Invalid %directive): Remove, as it is now
15661 meaningless.
15662 (Invalid inputs): Adjust to the new error messages.
15663 (Token definitions): The new grammar doesn't allow too many
15664 eccentricities.
15665
15666 * src/lex.h, src/lex.c: Remove.
15667 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
15668 (copy_character, copy_string2, copy_string, copy_identifier)
15669 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
15670 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
15671 (parse_action): Remove.
15672 * po/POTFILES.in: Adjust.
15673
2e047461
AD
156742002-06-11 Akim Demaille <akim@epita.fr>
15675
cd05d13c 15676 * src/reader.c (parse_action): Don't store directly into the
2e047461
AD
15677 rule's action member: return the action as a string.
15678 Don't require `rule_length' as an argument: compute it.
15679 (grammar_current_rule_symbol_append)
15680 (grammar_current_rule_action_append): New, eved out from
15681 (readgram): here.
15682 Remove `action_flag', `rulelength', unused now.
15683
9af3fbce
AD
156842002-06-11 Akim Demaille <akim@epita.fr>
15685
15686 * src/reader.c (grammar_current_rule_prec_set).
15687 (grammar_current_rule_check): New, eved out from...
15688 (readgram): here.
15689 Remove `xaction', `first_rhs': useless.
15690 * tests/input.at (Type clashes): New.
15691 * tests/existing.at (GNU Cim Grammar): Adjust.
15692
1485e106
AD
156932002-06-11 Akim Demaille <akim@epita.fr>
15694
15695 * src/reader.c (grammar_midrule_action): New, Eved out from
15696 (readgram): here.
15697
da4160c3
AD
156982002-06-11 Akim Demaille <akim@epita.fr>
15699
15700 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
15701 New.
15702 (readgram): Use them as replacement of inlined code, crule and
15703 crule1.
15704
f6d0f937
AD
157052002-06-11 Akim Demaille <akim@epita.fr>
15706
15707 * src/reader.c (grammar_end, grammar_symbol_append): New.
15708 (readgram): Use them.
15709 Make the use of `p' as local as possible.
15710
69078d4b
AD
157112002-06-10 Akim Demaille <akim@epita.fr>
15712
15713 GCJ's parser requires the tokens to be defined before the prologue.
15714
15715 * data/bison.simple: Output the token definition before the user's
15716 prologue.
15717 * tests/regression.at (Braces parsing, Duplicate string)
15718 (Mixing %token styles): Check the output from bison.
15719 (Early token definitions): New.
15720
5e424082
AD
157212002-06-10 Akim Demaille <akim@epita.fr>
15722
15723 * src/symtab.c (symbol_user_token_number_set): Don't complain when
15724 assigning twice the same user number to a token, so that we can
15725 use it in...
15726 * src/lex.c (lex): here.
15727 Also use `symbol_class_set' instead of hand written code.
15728 * src/reader.c (parse_assoc_decl): Likewise.
15729
44536b35
AD
157302002-06-10 Akim Demaille <akim@epita.fr>
15731
15732 * src/symtab.c, src/symtab.c (symbol_class_set)
15733 (symbol_user_token_number_set): New.
15734 * src/reader.c (parse_token_decl): Use them.
15735 Use a switch instead of ifs.
15736 Use a single argument.
15737
8b9f2372
AD
157382002-06-10 Akim Demaille <akim@epita.fr>
15739
15740 Remove `%thong' support as it is undocumented, unused, duplicates
15741 `%token's job, and creates useless e-mail traffic with people who
15742 want to know what it is, why it is undocumented, unused, and
15743 duplicates `%token's job.
15744
15745 * src/reader.c (parse_thong_decl): Remove.
15746 * src/options.c (option_table): Remove "thong".
15747 * src/lex.h (tok_thong): Remove.
15748
3ae2b51f
AD
157492002-06-10 Akim Demaille <akim@epita.fr>
15750
15751 * src/symtab.c, src/symtab.c (symbol_type_set)
15752 (symbol_precedence_set): New.
15753 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
15754 (value_components_used): Remove, unused.
15755
2f1afb73
AD
157562002-06-09 Akim Demaille <akim@epita.fr>
15757
15758 Move symbols handling code out of the reader.
15759
15760 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
15761 (axiom): Move to...
15762 * src/symtab.h, src/symtab.c: here.
15763
15764 * src/gram.c (start_symbol): Remove: use startsymbol->number.
15765 * src/reader.c (startval): Rename as...
15766 * src/symtab.h, src/symtab.c (startsymbol): this.
15767 * src/reader.c: Adjust.
15768
15769 * src/reader.c (symbol_check_defined, symbol_make_alias)
15770 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
15771 (token_translations_init)
15772 Move to...
15773 * src/symtab.c: here.
15774 * src/reader.c (packsymbols): Move to...
15775 * src/symtab.h, src/symtab.c (symbols_pack): here.
15776 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
15777 argument.
15778
e9bca3ad
AD
157792002-06-03 Akim Demaille <akim@epita.fr>
15780
15781 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
15782 then statements.
15783
86eff183
AD
157842002-06-03 Akim Demaille <akim@epita.fr>
15785
15786 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
15787 structs with non literals.
15788 * src/scan-skel.l: never-interactive.
15789 * src/conflicts.c (enum conflict_resolution_e): No trailing
15790 comma.
15791 * src/getargs.c (usage): Split long literal strings.
15792 Reported by Hans Aberg.
15793
717be197
AD
157942002-05-28 Akim Demaille <akim@epita.fr>
15795
15796 * data/bison.c++: Use C++ ostreams.
15797 (cdebug_): New member.
15798
670ddffd
AD
157992002-05-28 Akim Demaille <akim@epita.fr>
15800
15801 * src/output.c (output_skeleton): Be sure to allocate enough room
15802 for `/' _and_ for `\0' in full_skeleton.
15803
769b430f
AD
158042002-05-28 Akim Demaille <akim@epita.fr>
15805
15806 * data/bison.c++: Catch up with bison.simple:
15807 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15808 and Paul Eggert <eggert@twinsun.com>: `error' handing.
15809 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
15810 and popping traces.
15811
7067cb36
PH
158122002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15813
15814 * src/output.c (output_skeleton): Put an explicit path in front of
15815 the skeleton file name, rather than relying on the -I directory,
15816 to partially alleviate effects of having a skeleton file lying around
15817 in the current directory.
769b430f 15818
4a713ec2
PH
158192002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15820
769b430f 15821 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
15822 obstack_printf should be obstack_fgrow1.
15823
b408954b
AD
158242002-05-26 Akim Demaille <akim@epita.fr>
15825
15826 * src/state.h (state_t): `solved_conflicts' is a new member.
15827 * src/LR0.c (new_state): Set it to 0.
15828 * src/conflicts.h, src/conflicts.c (print_conflicts)
15829 (free_conflicts, solve_conflicts): Rename as...
15830 (conflicts_print, conflicts_free, conflicts_solve): these.
15831 Adjust callers.
15832 * src/conflicts.c (enum conflict_resolution_e)
15833 (solved_conflicts_obstack): New, used by...
15834 (log_resolution): this.
15835 Adjust to attach the conflict resolution to each state.
15836 Complete the description with the precedence/associativity
15837 information.
15838 (resolve_sr_conflict): Adjust.
15839 * src/print.c (print_state): Output its solved_conflicts.
15840 * tests/conflicts.at (Unresolved SR Conflicts)
15841 (Solved SR Conflicts): Exercise --report=all.
15842
a49aecd5
AD
158432002-05-26 Akim Demaille <akim@epita.fr>
15844
15845 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
15846 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
15847 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
15848 (token_number_t, item_number_as_token_number)
15849 (token_number_as_item_number, muscle_insert_token_number_table):
15850 Rename as...
15851 (symbol_number_t, item_number_as_symbol_number)
15852 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
15853 these, since it is more appropriate.
15854
5504898e
AD
158552002-05-26 Akim Demaille <akim@epita.fr>
15856
15857 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
15858 `Error:' lines.
15859 * data/bison.simple (yystos) [YYDEBUG]: New.
15860 (yyparse) [YYDEBUG]: Display the symbols which are popped during
15861 error recovery.
15862 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
15863
ec3bc396
AD
158642002-05-25 Akim Demaille <akim@epita.fr>
15865
15866 * doc/bison.texinfo (Debugging): Split into...
15867 (Tracing): this new section, its former contents, and...
15868 (Understanding): this new section.
15869 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
15870 by...
15871 (report_flag): this.
15872 Adjust all dependencies.
15873 (report_args, report_types, report_argmatch): New.
15874 (usage, getargs): Report/support -r, --report.
15875 * src/options.h
15876 (struct option_table_struct): Rename as..,
15877 (struct option_table_s): this.
15878 Rename the `set_flag' member to `flag' to match with getopt_long's
15879 struct.
15880 * src/options.c (option_table): Split verbose into an entry for
15881 %verbose, and another for --verbose.
15882 Support --report/-r, so remove -r from the obsolete --raw.
15883 * src/print.c: Attach full item sets and lookaheads reports to
15884 report_flag instead of trace_flag.
15885 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
15886
78df8250
PE
158872002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15888 and Paul Eggert <eggert@twinsun.com>
769b430f 15889
78df8250
PE
15890 * data/bison.simple (yyparse): Correct error handling to conform to
15891 POSIX and yacc. Specifically, after syntax error is discovered,
15892 do not reduce further before shifting the error token.
15893 Clean up the code a bit by removing the labels yyerrdefault,
15894 yyerrhandle, yyerrpop.
15895 * NEWS: Document the above.
15896
c0c9ea05
PH
158972002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15898
15899 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
15900 type; it isn't always big enough, since it doesn't necessarily
15901 include non-terminals.
769b430f 15902 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
15903 the latter can be removed.
15904 (yy_token_number_type): Remove, only one use.
15905 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
15906 don't use TokenNumberType as element type.
769b430f 15907
c0c9ea05
PH
15908 * tests/regression.at: Modify expected output to agree with change
15909 to yyr1 and yytranslate.
769b430f 15910
6390a83f
FK
159112002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
15912
15913 * src/reader.c (parse_action): Use copy_character instead of
15914 obstack_1grow.
15915
db7c8e9a
AD
159162002-05-13 Akim Demaille <akim@epita.fr>
15917
15918 * tests/regression.at (Token definitions): Prototype yylex and
15919 yyerror.
15920
fcc61800
PH
159212002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15922
158c687b 15923 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
15924 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
15925 32-bit arithmetic.
15926 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
15927
5683e9b2
AD
159282002-05-07 Akim Demaille <akim@epita.fr>
15929
15930 * tests/synclines.at: Be sure to prototype yylex and yyerror to
15931 avoid GCC warnings.
15932
0c2d3f4c
AD
159332002-05-07 Akim Demaille <akim@epita.fr>
15934
15935 Kill GCC warnings.
15936
15937 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
15938 over the RHS of each rule.
15939 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
15940 * src/state.h (state_t): Member `nitems' is unsigned short.
15941 * src/LR0.c (get_state): Adjust.
15942 * src/reader.c (packgram): Likewise.
15943 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
15944 `Type'.
15945 (muscle_insert_int_table): Remove, unused.
15946 (prepare_rules): Remove `max'.
15947
1565b720
AD
159482002-05-06 Akim Demaille <akim@epita.fr>
15949
15950 * src/closure.c (print_firsts): Display of the symbol tags.
15951 (bitmatrix_print): Move to...
15952 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
15953 here.
15954 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
15955
cfaee611
AD
159562002-05-06 Akim Demaille <akim@epita.fr>
15957
15958 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
15959 hash_do_for_each.
15960
458be8e0
AD
159612002-05-06 Akim Demaille <akim@epita.fr>
15962
15963 * src/LR0.c (new_state, get_state): Instead of using the global
15964 `kernel_size' and `kernel_base', have two new arguments:
15965 `core_size' and `core'.
15966 Adjust callers.
15967
a900a624
AD
159682002-05-06 Akim Demaille <akim@epita.fr>
15969
15970 * src/reader.c (packgram): No longer end `ritem' with a 0
15971 sentinel: it is not used.
15972
d4e7d3a1
AD
159732002-05-05 Akim Demaille <akim@epita.fr>
15974
15975 New experimental feature: display the lookaheads in the report and
15976 graph.
15977
15978 * src/print (print_core): When --trace-flag, display the rules
15979 lookaheads.
15980 * src/print_graph.c (print_core): Likewise.
15981 Swap the arguments.
15982 Adjust caller.
15983
39ceb25b
AD
159842002-05-05 Akim Demaille <akim@epita.fr>
15985
15986 * tests/torture.at (Many lookaheads): New test.
15987
5372019f
AD
159882002-05-05 Akim Demaille <akim@epita.fr>
15989
15990 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
15991 (GENERATE_MUSCLE_INSERT_TABLE): this.
15992 (output_int_table, output_unsigned_int_table, output_short_table)
15993 (output_token_number_table, output_item_number_table): Replace with...
15994 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
15995 (muscle_insert_short_table, muscle_insert_token_number_table)
15996 (muscle_insert_item_number_table): these.
15997 Adjust all callers.
15998 (prepare_tokens): Don't free `translations', since...
15999 * src/reader.h, src/reader.c (grammar_free): do it.
16000 Move to...
16001 * src/gram.h, src/gram.c (grammar_free): here.
16002 * data/bison.simple, data/bison.c++: b4_token_number_max is now
16003 b4_translate_max.
16004
5df5f6d5
AD
160052002-05-05 Akim Demaille <akim@epita.fr>
16006
16007 * src/output.c (output_unsigned_int_table): New.
16008 (prepare_rules): `i' is unsigned.
16009 `prhs', `rline', `r2' are unsigned int.
16010 Rename muscle `rhs_number_max' as `rhs_max'.
16011 Output muscles `prhs_max', `rline_max', and `r2_max'.
16012 Free rline and r1.
16013 * data/bison.simple, data/bison.c++: Adjust to use these muscles
16014 to compute types instead of constant types.
16015 * tests/regression.at (Web2c Actions): Adjust.
16016
b87f8b21
AD
160172002-05-04 Akim Demaille <akim@epita.fr>
16018
16019 * src/symtab.h (SALIAS, SUNDEF): Rename as...
16020 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
16021 Adjust dependencies.
16022 * src/output.c (token_definitions_output): Be sure not to output a
16023 `#define 'a'' when fed with `%token 'a' "a"'.
16024 * tests/regression.at (Token definitions): New.
16025
8bb936e4
PE
160262002-05-03 Paul Eggert <eggert@twinsun.com>
16027
16028 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
16029 for K&R C.
16030
160312002-05-03 gettextize <bug-gnu-gettext@gnu.org>
16032
16033 * Makefile.am (SUBDIRS): Remove intl.
16034 (EXTRA_DIST): Add config/config.rpath.
16035
53c71a12
AD
160362002-05-03 Akim Demaille <akim@epita.fr>
16037
16038 * data/bison.simple (m4_if): Don't output empty enums.
16039 And actually, output valid enum definitions :(.
16040
289dd0cf
AD
160412002-05-03 Akim Demaille <akim@epita.fr>
16042
16043 * configure.bat: Remove, completely obsolete.
16044 * Makefile.am (EXTRA_DIST): Adjust.
16045 Don't distribute config.rpath...
16046 * config/Makefile.am (EXTRA_DIST): Do it.
16047
db85e524
AD
160482002-05-03 Akim Demaille <akim@epita.fr>
16049
16050 * configure.in (GETTEXT_VERSION): New.
16051 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
16052
83ccf991
AD
160532002-05-03 Akim Demaille <akim@epita.fr>
16054
16055 * data/bison.simple (b4_token_enum): New.
16056 (b4_token_defines): Use it to output tokens both as #define and
16057 enums.
16058 Suggested by Paul Eggert.
16059 * src/output.c (token_definitions_output): Don't output spurious
16060 white spaces.
16061
1f418995
AD
160622002-05-03 Akim Demaille <akim@epita.fr>
16063
16064 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
16065
45119f04
RA
160662002-05-02 Robert Anisko <robert@lrde.epita.fr>
16067
16068 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
16069 Update the stack class, give a try to deque as the default container.
16070
b2d52318
AD
160712002-05-02 Akim Demaille <akim@epita.fr>
16072
16073 * data/bison.simple (yyparse): Do not implement @$ = @1.
16074 (YYLLOC_DEFAULT): Adjust to do it.
16075 * doc/bison.texinfo (Location Default Action): Fix.
16076
3a8b4109
AD
160772002-05-02 Akim Demaille <akim@epita.fr>
16078
16079 * src/reader.c (parse_braces): Merge into...
16080 (parse_action): this.
16081
84614e13
AD
160822002-05-02 Akim Demaille <akim@epita.fr>
16083
16084 * configure.in (ALL_LINGUAS): Remove.
16085 * po/LINGUAS, hr.po: New.
16086
fdbcd8e2
AD
160872002-05-02 Akim Demaille <akim@epita.fr>
16088
16089 Remove the so called hairy (semantic) parsers.
16090
16091 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
16092 * src/gram.h, src/gram.c (semantic_parser): Remove.
16093 (rule_t): Remove the guard and guard_line members.
16094 * src/lex.h (token_t): remove tok_guard.
16095 * src/options.c (option_table): Remove %guard and %semantic_parser
16096 support.
16097 * src/output.c, src/output.h (guards_output): Remove.
16098 (prepare): Adjust.
16099 (token_definitions_output): Don't output the `T'
16100 tokens (???).
16101 (output_skeleton): Don't output the guards.
16102 * src/files.c, src/files.c (attrsfile): Remove.
16103 * src/reader.c (symbol_list): Remove the guard and guard_line
16104 members.
16105 Adjust dependencies.
16106 (parse_guard): Remove.
16107 * data/bison.hairy: Remove.
16108 * doc/bison.texinfo (Environment Variables): Remove occurrences of
16109 BISON_HAIRY.
16110
82b6cb3f
AD
161112002-05-02 Akim Demaille <akim@epita.fr>
16112
16113 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
16114 (parse_guard): Rename the formal argument `stack_offset' as
16115 `rule_length', which is more readable.
16116 Adjust callers.
16117 (copy_at, copy_dollar): Instead of outputting the hard coded
16118 values of $$, $n and so forth, output invocation to b4_lhs_value,
16119 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
16120 Note: this patch partially drops `semantic-parser' support: it
16121 always does `rule_length - n', where semantic parsers ought to
16122 always use `-n'.
82b6cb3f
AD
16123 * data/bison.simple, data/bison.c++ (b4_lhs_value)
16124 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
16125
6cbfbcc5
AD
161262002-05-02 Akim Demaille <akim@epita.fr>
16127
16128 * configure.in (AC_INIT): Bump to 1.49b.
16129 (AM_INIT_AUTOMAKE): Short invocation.
16130
b8548114
AD
161312002-05-02 Akim Demaille <akim@epita.fr>
16132
16133 Version 1.49a.
16134
c20cd1fa
AD
161352002-05-01 Akim Demaille <akim@epita.fr>
16136
16137 * src/skeleton.h: Remove.
16138
8a9566d4
AD
161392002-05-01 Akim Demaille <akim@epita.fr>
16140
16141 * src/skeleton.h: Fix the #endif.
16142 Reported by Magnus Fromreide.
16143
8c6d399a
PE
161442002-04-26 Paul Eggert <eggert@twinsun.com>
16145
16146 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
16147 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 16148 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 16149
2b7ed18a
RA
161502002-04-25 Robert Anisko <robert@lrde.epita.fr>
16151
16152 * src/scan-skel.l: Postprocess quadrigraphs.
16153
16154 * src/reader.c (copy_character): New function, used to output
16155 single characters while replacing `[' and `]' with quadrigraphs, to
16156 avoid troubles with M4 quotes.
16157 (copy_comment): Output characters with copy_character.
16158 (read_additionnal_code): Likewise.
16159 (copy_string2): Likewise.
16160 (copy_definition): Likewise.
16161
16162 * tests/calc.at: Exercise M4 quoting.
16163
34a89c50
AD
161642002-04-25 Akim Demaille <akim@epita.fr>
16165
16166 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
16167 between `!' and the command.
16168 Reported by Paul Eggert.
16169
0dd1580a
RA
161702002-04-24 Robert Anisko <robert@lrde.epita.fr>
16171
16172 * tests/calc.at: Exercise prologue splitting.
16173
16174 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
16175 `b4_post_prologue' instead of `b4_prologue'.
16176
16177 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
16178 muscles.
16179 (output): Free pre_prologue_obstack and post_prologue_obstack.
16180 * src/files.h, src/files.c (attrs_obstack): Remove.
16181 (pre_prologue_obstack, post_prologue_obstack): New.
16182 * src/reader.c (copy_definition): Add a parameter to specify the
16183 obstack to fill, instead of using attrs_obstack unconditionally.
16184 (read_declarations): Pass pre_prologue_obstack to copy_definition if
16185 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
16186
83c1796f
PE
161872002-04-23 Paul Eggert <eggert@twinsun.com>
16188
16189 * data/bison.simple: Remove unnecessary commentary and white
16190 space differences from 1_29-branch.
16191 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
16192
16193 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
16194 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
16195 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
16196 constructors or destructors.
16197
16198 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
16199
1207eeac
AD
162002002-04-23 Akim Demaille <akim@epita.fr>
16201
16202 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
16203 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
16204 location with columns.
16205 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
16206 All reported by Paul Eggert.
16207
78ab8f67
AD
162082002-04-22 Akim Demaille <akim@epita.fr>
16209
16210 * src/reduce.c (dump_grammar): Move to...
16211 * src/gram.h, src/gram.c (grammar_dump): here.
16212 Be sure to separate long item numbers.
16213 Don't read the members of a rule's prec if its nil.
16214
133c20e2
AD
162152002-04-22 Akim Demaille <akim@epita.fr>
16216
16217 * src/output.c (table_size, table_grow): New.
16218 (MAXTABLE): Remove, replace uses with table_size.
16219 (pack_vector): Instead of dying when the table is too big, grow it.
16220
9515e8a7
AD
162212002-04-22 Akim Demaille <akim@epita.fr>
16222
16223 * data/bison.simple (yyr1): Its type is that of a token number.
16224 * data/bison.c++ (r1_): Likewise.
16225 * tests/regression.at (Web2c Actions): Adjust.
16226
23c5a174
AD
162272002-04-22 Akim Demaille <akim@epita.fr>
16228
16229 * src/reader.c (token_translations_init): 256 is now the default
16230 value for the error token, i.e., it will be assigned another
16231 number if the user assigned 256 to one of her tokens.
16232 (reader): Don't force 256 to error.
16233 * doc/bison.texinfo (Symbols): Adjust.
16234 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
16235 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
16236 etc. instead of 10, 20, 30 (which was used to `jump' over error
16237 (256) and undefined (2)).
16238
5fbb0954
AD
162392002-04-22 Akim Demaille <akim@epita.fr>
16240
16241 Propagate more token_number_t.
16242
16243 * src/gram.h (token_number_as_item_number)
16244 (item_number_as_token_number): New.
16245 * src/output.c (GENERATE_OUTPUT_TABLE): New.
16246 Use it to create output_item_number_table and
16247 output_token_number_table.
16248 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
16249 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
16250 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
16251 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
16252
4f940944
AD
162532002-04-22 Akim Demaille <akim@epita.fr>
16254
16255 * src/output.h, src/output.c (get_lines_number): Remove.
16256
3ded9a63
AD
162572002-04-19 Akim Demaille <akim@epita.fr>
16258
16259 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
16260 as Lex/Flex'.
16261 (Debugging): More details about enabling the debugging features.
16262 (Table of Symbols): Describe $$, $n, @$, and @n.
16263 Suggested by Tim Josling.
16264
e0c471a9
AD
162652002-04-19 Akim Demaille <akim@epita.fr>
16266
16267 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
16268
fecc10cd
AD
162692002-04-10 Akim Demaille <akim@epita.fr>
16270
16271 * src/system.h: Rely on HAVE_LIMITS_H.
16272 Suggested by Paul Eggert.
16273
51dec47b
AD
162742002-04-09 Akim Demaille <akim@epita.fr>
16275
16276 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
16277 full stderr, and strip it according to the bison options, instead
16278 of composing the error message from different bits.
16279 This makes it easier to check for several error messages.
16280 Adjust all the invocations.
16281 Add an invocation exercising the error token.
16282 Add an invocation demonstrating a stupid error message.
16283 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
16284 Adjust the tests.
16285 Error message are for stderr, not stdout.
16286
007a50a4
AD
162872002-04-09 Akim Demaille <akim@epita.fr>
16288
16289 * src/gram.h, src/gram.c (error_token_number): Remove, use
16290 errtoken->number.
16291 * src/reader.c (reader): Don't specify the user token number (2)
16292 for $undefined, as it uselessly prevents using it.
16293 * src/gram.h (token_number_t): Move to...
16294 * src/symtab.h: here.
16295 (state_t.number): Is a token_number_t.
16296 * src/print.c, src/reader.c: Use undeftoken->number instead of
16297 hard coded 2.
16298 (Even though this 2 is not the same as above: the number of the
16299 undeftoken remains being 2, it is its user token number which
16300 might not be 2).
16301 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
16302 `user_token_number_max'.
16303 Output `undef_token_number'.
16304 * data/bison.simple, data/bison.c++: Use them.
16305 Be sure to map invalid yylex return values to
16306 `undef_token_number'. This saves us from gratuitous SEGV.
16307
16308 * tests/conflicts.at (Solved SR Conflicts)
16309 (Unresolved SR Conflicts): Adjust.
16310 * tests/regression.at (Web2c Actions): Adjust.
16311
06446ccf
AD
163122002-04-08 Akim Demaille <akim@epita.fr>
16313
16314 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
16315 Adding #line.
16316 Remove the duplicate `typedefs'.
16317 (RhsNumberType): Fix the declaration and various other typos.
16318 Use __ofile__.
16319 * data/bison.simple: Use __ofile__.
16320 * src/scan-skel.l: Handle __ofile__.
16321
62a3e4f0
AD
163222002-04-08 Akim Demaille <akim@epita.fr>
16323
16324 * src/gram.h (item_number_t): New, the type of item numbers in
16325 RITEM. Note that it must be able to code symbol numbers as
16326 positive number, and the negation of rule numbers as negative
16327 numbers.
16328 Adjust all dependencies (pretty many).
16329 * src/reduce.c (rule): Remove this `short *' pointer: use
16330 item_number_t.
16331 * src/system.h (MINSHORT, MAXSHORT): Remove.
16332 Include `limits.h'.
16333 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
16334 (shortcpy): Remove.
16335 (MAXTABLE): Move to...
16336 * src/output.c (MAXTABLE): here.
16337 (prepare_rules): Use output_int_table to output rhs.
16338 * data/bison.simple, data/bison.c++: Adjust.
16339 * tests/torture.at (Big triangle): Move the limit from 254 to
16340 500.
16341 * tests/regression.at (Web2c Actions): Ajust.
16342
16343 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
16344 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
16345 passes, but produces negative #line number, once fixed, GCC is
16346 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
16347 C), it passes.
16348 * src/state.h (state_h): Code input lines on ints, not shorts.
16349
bb88b0fc
AD
163502002-04-08 Akim Demaille <akim@epita.fr>
16351
16352 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
16353 and then the grammar.
16354
9a636f47
AD
163552002-04-08 Akim Demaille <akim@epita.fr>
16356
16357 * src/system.h: No longer using strndup.
16358
680e8701
AD
163592002-04-07 Akim Demaille <akim@epita.fr>
16360
16361 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
16362 * src/output.c (output_table_data): Return the longest number.
16363 (prepare_tokens): Output `token_number_max').
16364 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
16365 New.
16366 Use them to define yy_token_number_type/TokenNumberType.
16367 Use this type for yytranslate.
16368 * tests/torture.at (Big triangle): Push the limit from 124 to
16369 253.
16370 * tests/regression.at (Web2c Actions): Adjust.
16371
817e9f41
AD
163722002-04-07 Akim Demaille <akim@epita.fr>
16373
16374 * tests/torture.at (Big triangle): New.
16375 (GNU AWK Grammar, GNU Cim Grammar): Move to...
16376 * tests/existing.at: here.
16377
5123689b
AD
163782002-04-07 Akim Demaille <akim@epita.fr>
16379
16380 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
16381 nritems.
16382 Adjust dependencies.
16383
f3849179
AD
163842002-04-07 Akim Demaille <akim@epita.fr>
16385
16386 * src/reader.c: Normalize increments to prefix form.
16387
bd02036a
AD
163882002-04-07 Akim Demaille <akim@epita.fr>
16389
16390 * src/reader.c, symtab.c: Remove debugging code.
16391
db8837cb
AD
163922002-04-07 Akim Demaille <akim@epita.fr>
16393
16394 Rename all the `bucket's as `symbol_t'.
16395
16396 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
16397 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
16398 * src/symtab.c, src/symtab.h (bucket): Rename as...
16399 (symbol_t): this.
16400 (symbol_list_new, bucket_check_defined, bucket_make_alias)
16401 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
16402 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
16403 (buckets_new, buckets_free, buckets_do): Rename as...
16404 (symbol_list_new, symbol_check_defined, symbol_make_alias)
16405 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
16406 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
16407 (symbols_new, symbols_free, symbols_do): these.
16408
72a23c97
AD
164092002-04-07 Akim Demaille <akim@epita.fr>
16410
16411 Use lib/hash for the symbol table.
16412
16413 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
16414 EOF.
16415 * src/lex.c (lex): Set the `number' member of new terminals.
16416 * src/reader.c (bucket_check_defined, bucket_make_alias)
16417 (bucket_check_alias_consistence, bucket_translation): New.
16418 (reader, grammar_free, readgram, token_translations_init)
16419 (packsymbols): Adjust.
16420 (reader): Number the predefined tokens.
16421 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
16422 for predefined tokens.
16423 * src/symtab.h (bucket): Remove all the hash table related
16424 members.
16425 * src/symtab.c (symtab): Replace by...
16426 (bucket_table): this.
16427 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
16428 (buckets_new, buckets_do): New.
16429
280a38c3
AD
164302002-04-07 Akim Demaille <akim@epita.fr>
16431
16432 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
16433 (start_symbol, max_user_token_number, semantic_parser)
16434 (error_token_number): Initialize.
16435 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
16436 Initialize.
16437 (reader): Don't.
16438 (errtoken, eoftoken, undeftoken, axiom): Extern.
16439
03b31c0c
AD
164402002-04-07 Akim Demaille <akim@epita.fr>
16441
16442 * src/gram.h (rule_s): prec and precsym are now pointers
16443 to the bucket giving the priority/associativity.
16444 Member `associativity' removed: useless.
16445 * src/reduce.c, src/conflicts.c: Adjust.
16446
8b3df748
AD
164472002-04-07 Akim Demaille <akim@epita.fr>
16448
16449 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
16450 Properly escape the symbols' TAG when outputting them.
16451
e601aa1d
AD
164522002-04-07 Akim Demaille <akim@epita.fr>
16453
16454 * src/lalr.h (LA): Is a bitsetv, not bitset*.
16455
b0299a2e
AD
164562002-04-07 Akim Demaille <akim@epita.fr>
16457
16458 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
16459 (LArule): this, which is an array to rule_t*.
16460 * src/print.c, src/conflicts.c: Adjust.
16461
d7e1f00c
AD
164622002-04-07 Akim Demaille <akim@epita.fr>
16463
16464 * src/gram.h (rule_t): Rename `number' as `user_number'.
16465 `number' is a new member.
16466 Adjust dependencies.
16467 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
16468
cc9305dd
AD
164692002-04-07 Akim Demaille <akim@epita.fr>
16470
16471 As a result of the previous patch, it is no longer needed
16472 to reorder ritem itself.
16473
16474 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
16475
b0940840
AD
164762002-04-07 Akim Demaille <akim@epita.fr>
16477
16478 Be sure never to walk through RITEMS, but use only data related to
16479 the rules themselves. RITEMS should be banished.
16480
16481 * src/output.c (output_token_translations): Rename as...
16482 (prepare_tokens): this.
16483 In addition to `translate', prepare the muscles `tname' and
16484 `toknum', which were handled by...
16485 (output_rule_data): this.
16486 Remove, and move the remainder of its outputs into...
16487 (prepare_rules): this new routines, which also merges content from
16488 (output_gram): this.
16489 (prepare_rules): Be sure never to walk through RITEMS.
16490 (output_stos): Rename as...
16491 (prepare_stos): this.
16492 (output): Always invoke prepare_states, after all, just don't use it
16493 in the output if you don't need it.
16494
643a5994
AD
164952002-04-07 Akim Demaille <akim@epita.fr>
16496
16497 * src/LR0.c (new_state): Display `nstates' as the name of the
16498 newly created state.
16499 Adjust to initialize first_state and last_state if needed.
16500 Be sure to distinguish the initial from the final state.
16501 (new_states): Create the itemset of the initial state, and use
16502 new_state.
16503 * src/closure.c (closure): Now that the initial state has its
16504 items properly set, there is no need for a special case when
16505 creating `ruleset'.
16506
16507 As a result, now the rule 0, reducing to $axiom, is visible in the
16508 outputs. Adjust the test suite.
16509
16510 * tests/conflicts.at (Solved SR Conflicts)
16511 (Unresolved SR Conflicts): Adjust.
16512 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
16513 * tests/conflicts.at (S/R in initial): New.
16514
b4c4ccc2
AD
165152002-04-07 Akim Demaille <akim@epita.fr>
16516
16517 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
16518 the RHS of the rules.
16519 * src/output.c (output_gram): Likewise.
16520
bba97eb2
AD
165212002-04-07 Akim Demaille <akim@epita.fr>
16522
16523 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
16524 bucket.
16525 Adjust all dependencies.
16526 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
16527 `number' of the buckets too.
16528 * src/gram.h: Include `symtab.h'.
16529 (associativity): Move to...
16530 * src/symtab.h: here.
16531 No longer include `gram.h'.
16532
c3b407f4
AD
165332002-04-07 Akim Demaille <akim@epita.fr>
16534
16535 * src/gram.h, src/gram.c (rules_rhs_length): New.
16536 (ritem_longest_rhs): Use it.
16537 * src/gram.h (rule_t): `number' is a new member.
16538 * src/reader.c (packgram): Set it.
16539 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
16540 the end of `rules', and count them out of `nrules'.
16541 (reduce_output, dump_grammar): Adjust.
16542 * src/print.c (print_grammar): It is no longer needed to check for
16543 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
16544 * tests/reduce.at (Reduced Automaton): New test.
16545
11652ab3
AD
165462002-04-07 Akim Demaille <akim@epita.fr>
16547
16548 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
16549 lacking `+ 1' to nrules, Bison reported as useless a token if it
16550 was used solely to set the precedence of the last rule...
16551
26b23c1a
AD
165522002-04-07 Akim Demaille <akim@epita.fr>
16553
16554 * data/bison.c++, data/bison.simple: Don't output the current file
16555 name in #line, to avoid useless diffs between two identical
16556 outputs under different names.
16557
18bcecb0
AD
165582002-04-07 Akim Demaille <akim@epita.fr>
16559
16560 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
16561 Normalize loops to using `< nrules + 1', not `<= nrules'.
16562
fa770c86
AD
165632002-04-07 Akim Demaille <akim@epita.fr>
16564
16565 * TODO: Update.
16566
d9b739c3
AD
165672002-04-07 Akim Demaille <akim@epita.fr>
16568
16569 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
16570 bucket.value as bucket.number.
16571
99013900
AD
165722002-04-07 Akim Demaille <akim@epita.fr>
16573
16574 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
16575 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
16576 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
16577 RHS, instead of being an index in RITEMS.
16578
e966383b
PE
165792002-04-04 Paul Eggert <eggert@twinsun.com>
16580
16581 * doc/bison.texinfo: Update copyright date.
16582 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
16583 (Symbols): Warn about running Bison in one character set,
16584 but compiling and/or running in an incompatible one.
16585 Warn about character code 256, too.
16586
165872002-04-03 Paul Eggert <eggert@twinsun.com>
16588
16589 * src/bison.data (YYSTACK_ALLOC): Depend on whether
16590 YYERROR_VERBOSE is nonzero, not whether it is defined.
16591
16592 Merge changes from bison-1_29-branch.
c307773e 16593
8d6c48b9
PE
165942002-03-20 Paul Eggert <eggert@twinsun.com>
16595
16596 Merge fixes from Debian bison_1.34-1.diff.
16597
16598 * configure.in (AC_PREREQ): 2.53.
16599
e53c6322
AD
166002002-03-20 Akim Demaille <akim@epita.fr>
16601
16602 * src/conflicts.c (log_resolution): Argument `resolution' is const.
16603
9ffbeca7
PE
166042002-03-19 Paul Eggert <eggert@twinsun.com>
16605
21db0b2a
PE
16606 * src/bison.simple (YYCOPY): New macro.
16607 (YYSTACK_RELOCATE): Use it.
16608 Remove Type arg; no longer needed. All callers changed.
16609 (yymemcpy): Remove; no longer needed.
16610
9ffbeca7
PE
16611 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
16612 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
16613
642cb8f8
AD
166142002-03-19 Akim Demaille <akim@epita.fr>
16615
16616 Test and fix the #line outputs.
16617
16618 * tests/atlocal.at (GCC): New.
16619 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
0ffd4fd1 16620 (Prologue synch line, %union synch line, Postprologue synch line)
642cb8f8
AD
16621 (Action synch line, Epilogue synch line): New tests.
16622 * src/reader.c (parse_union_decl): Define the muscle stype_line.
16623 * data/bison.simple, data/bison.c++: Use it.
16624
3c31a486
AD
166252002-03-19 Akim Demaille <akim@epita.fr>
16626
16627 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
16628 (Solved SR Conflicts, %expect not enough, %expect right)
16629 (%expect too much): Move to...
16630 * tests/conflicts.at: this new file.
16631
0d8bed56
AD
166322002-03-19 Akim Demaille <akim@epita.fr>
16633
16634 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
16635 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
16636 that we can move to enums for instance.
16637 * src/output.c (token_definitions_output): Output a list of
16638 `token-name, token-number' instead of the #define.
16639 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
16640
9208d17f
AD
166412002-03-14 Akim Demaille <akim@epita.fr>
16642
16643 Use Gettext 0.11.1.
16644
af27eacb
RA
166452002-03-09 Robert Anisko <robert@lrde.epita.fr>
16646
16647 * data/bison.c++: Make the user able to add members to the generated
16648 parser by subclassing.
16649
9101a310
RA
166502002-03-05 Robert Anisko <robert@lrde.epita.fr>
16651
16652 * src/reader.c (read_additionnal_code): `c' should be an integer, not
16653 a character.
16654 Reported by Nicolas Tisserand and Nicolas Burrus.
16655
fff9bf0b
RA
166562002-03-04 Robert Anisko <robert@lrde.epita.fr>
16657
16658 * src/reader.c: Warn about lacking semi-colons, do not complain.
16659
64dba31e
RA
166602002-03-04 Robert Anisko <robert@lrde.epita.fr>
16661
16662 * data/bison.c++: Remove a debug line.
16663
374f5a14
RA
166642002-03-04 Robert Anisko <robert@lrde.epita.fr>
16665
16666 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
16667 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
16668 provide a default implementation.
16669
bfcf1f3a
AD
166702002-03-04 Akim Demaille <akim@epita.fr>
16671
16672 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
16673 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
16674 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
16675 * tests/semantic.at (Parsing Guards): Similarly.
16676 * src/reader.at (readgram): Complain if the last rule is not ended
16677 with a semi-colon.
16678
65ccf9fc
AD
166792002-03-04 Akim Demaille <akim@epita.fr>
16680
16681 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
16682 * src/closure.c: here.
16683 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
16684 RTC.
16685 * src/warshall.h, src/warshall.c: Remove.
16686 * tests/sets.at (Broken Closure): Adjust.
16687
d0039cbc
AD
166882002-03-04 Akim Demaille <akim@epita.fr>
16689
16690 * src/output.c (output_skeleton): tempdir is const.
16691 bytes_read is unused.
16692
345cea78
AD
166932002-03-04 Akim Demaille <akim@epita.fr>
16694
16695 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
16696 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
16697 Update.
16698 From Michael Hayes.
16699
564801f7
AD
167002002-03-04 Akim Demaille <akim@epita.fr>
16701
16702 * src/closure.c (closure): `r' is unused.
16703
e5352bc7
AD
167042002-03-04 Akim Demaille <akim@epita.fr>
16705
16706 * tests/sets.at (Broken Closure): Add the ending `;'.
16707 * src/reader.at (readgram): Complain if a rule is not ended with a
16708 semi-colon.
16709
914feea9
AD
167102002-03-04 Akim Demaille <akim@epita.fr>
16711
16712 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
16713 (count_sr_conflicts): Use bitset_count.
16714 * src/reduce.c (inaccessable_symbols): Ditto.
16715 (bits_size): Remove.
16716 * src/warshall.h, src/warshall.c: Convert to bitsetv.
16717
f0250de6
AD
167182002-03-04 Akim Demaille <akim@epita.fr>
16719
16720 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
16721 * src/reduce.c: Remove the `bitset_zero's following the
16722 `bitset_create's, as now it is performed by the latter.
16723
ef017502
AD
167242002-03-04 Akim Demaille <akim@epita.fr>
16725
16726 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
16727 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
16728 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
16729 latest sources from Michael.
16730
76514394
AD
167312002-03-04 Akim Demaille <akim@epita.fr>
16732
16733 * src/output.c (output): Don't free the grammar.
16734 * src/reader.c (grammar_free): New.
16735 * src/main.c (main): Call it and don't free symtab here.
16736
55024580
AD
167372002-03-04 Akim Demaille <akim@epita.fr>
16738
16739 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
16740 before returning.
16741 Reported by Benoit Perrot.
16742
f9abaa2c
AD
167432002-03-04 Akim Demaille <akim@epita.fr>
16744
16745 Use bitset operations when possible, not loops over bits.
16746
16747 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
16748 bitset_or.
16749 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
16750 * src/reduce.c (useless_nonterminals): Formatting changes.
16751 * src/warshall.c (TC): Use bitset_or.
16752
0e721e75
AD
167532002-03-04 Akim Demaille <akim@epita.fr>
16754
16755 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
16756 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
16757 Ditto.
16758
0fb1ffb1
AD
167592002-03-04 Akim Demaille <akim@epita.fr>
16760
16761 * src/lalr.c (F): Now a bitset*.
16762 Adjust all dependencies.
16763
b86796bf
AD
167642002-03-04 Akim Demaille <akim@epita.fr>
16765
16766 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
16767 Adjust all dependencies.
16768
602bbf31
AD
167692002-03-04 Akim Demaille <akim@epita.fr>
16770
16771 * src/L0.c, src/LR0.h (nstates): Be size_t.
16772 Adjust comparisons (signed vs unsigned).
16773 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
16774 bitset*.
16775 Adjust all dependencies.
16776
d8a0245c
AD
167772002-03-04 Akim Demaille <akim@epita.fr>
16778
16779 * src/closure.c (firsts): Now, also a bitset.
16780 Adjust all dependencies.
16781 (varsetsize): Remove, now unused.
16782 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
16783
34ba9743
AD
167842002-03-04 Akim Demaille <akim@epita.fr>
16785
16786 * src/print.c: Convert to use bitset.h, not hand coded iterations
16787 over ints.
16788
ed86e78c
AD
167892002-03-04 Akim Demaille <akim@epita.fr>
16790
16791 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
16792
dfdb1797
AD
167932002-03-04 Akim Demaille <akim@epita.fr>
16794
16795 * src/closure.c (ruleset): Be a bitset.
16796 (rulesetsize): Remove.
16797
7086e707
AD
167982002-03-04 Akim Demaille <akim@epita.fr>
16799
16800 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
16801 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
16802 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
16803 * src/closure.c (fderives): Be an array of bitsets.
16804
98254360
RA
168052002-02-28 Robert Anisko <robert@lrde.epita.fr>
16806
16807 * data/bison.c++: Merge the two generated headers. Insert a copyright
16808 notice in each output file.
16809
a75c057f
AD
168102002-02-28 Akim Demaille <akim@epita.fr>
16811
16812 * data/bison.c++: Copy the prologue of bison.simple to fetch
16813 useful M4 definitions, such as b4_header_guard.
16814
06b00abc
AD
168152002-02-25 Akim Demaille <akim@epita.fr>
16816
16817 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
16818 translator friendly scheme for the bgr
16819 copyright notice.
06b00abc 16820
70e7d534
AD
168212002-02-25 Akim Demaille <akim@epita.fr>
16822
16823 * src/output.c (header_output): Remove, now handled completely via
16824 M4.
16825
abe017f6
AD
168262002-02-25 Akim Demaille <akim@epita.fr>
16827
16828 * m4/m4.m4: New, from CVS Autoconf.
16829 * configure.in: Invoke it.
16830 * src/output.c (output_skeleton): Use its result instead of the
16831 hard coded name.
16832
381fb12e
AD
168332002-02-25 Akim Demaille <akim@epita.fr>
16834
16835 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
16836 Fileutils 4.1.5.
16837 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
16838 * src/output.c (output_skeleton): Use mkstemp to create a real
16839 temporary file.
16840 Move the filling of `skeleton' and its muscle to...
16841 (prepare): here.
16842 (output): Move the definition of the prologue muscle to...
16843 (prepare): here.
16844 * src/system.h (DEFAULT_TMPDIR): New.
16845
6f38107f
PE
168462002-02-14 Paul Eggert <eggert@twinsun.com>
16847
16848 Remove the support for C++ namespace cleanliness; it was
16849 causing more problems than it was curing, since it didn't work
16850 properly on some nonstandard C++ compilers. This can wait
16851 for a proper C++ parser.
16852
16853 * NEWS: Document this.
16854 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
16855 of C++, as it's treated like C now.
16856 * src/bison.simple (YYSTD): Remove.
16857 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
16858 Treat C++ just like Standard C instead of trying to support
16859 namespace cleanliness.
16860
80cce3da
AD
168612002-02-14 Akim Demaille <akim@epita.fr>
16862
16863 * tests/regression.at (else): Adjust to Andreas' change.
16864
842e8679
AD
168652002-02-14 Akim Demaille <akim@epita.fr>
16866
16867 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
16868
4bda3f10
AD
168692002-02-13 Andreas Schwab <schwab@suse.de>
16870
16871 * src/output.c (output_rule_data): Don't output NULL, it might
16872 not be defined yet.
16873
4162fa07 168742002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 16875
4162fa07
RA
16876 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
16877 (Copyright notice): Update.
b418ecd8 16878
bd16a5dc
AD
168792002-02-11 Akim Demaille <akim@epita.fr>
16880
16881 * tests/regression.at (%nonassoc and eof): Don't include
16882 nonportable headers.
16883
8d69a1a3
RA
168842002-02-08 Robert Anisko <robert@lrde.epita.fr>
16885
16886 * data/bison.c++: Correct error recovery. Make the user able to
16887 initialize the starting location.
16888
9b2d0677
AD
168892002-02-07 Akim Demaille <akim@epita.fr>
16890
16891 * tests/input.at: New.
16892
69e2658b
RA
168932002-02-07 Robert Anisko <robert@lrde.epita.fr>
16894
16895 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 16896 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
16897 directives around tables only needed for debugging.
16898
4aacc3a7
RA
168992002-02-07 Robert Anisko <robert@lrde.epita.fr>
16900
16901 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
16902 C++ parsers.
16903 (yy::b4_name::parse): Use print_.
16904
762a801e
RA
169052002-02-07 Robert Anisko <robert@lrde.epita.fr>
16906
16907 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
16908
4bb2bc3f
RA
169092002-02-07 Robert Anisko <robert@lrde.epita.fr>
16910
16911 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
16912 C++ parsers.
16913 (yy::b4_name::parse): Build verbose error messages, and use error_.
16914
6b45a3ca
RA
169152002-02-06 Robert Anisko <robert@lrde.epita.fr>
16916
16917 * data/bison.c++: Fix m4 quoting in comments.
16918
50997c6e
RA
169192002-02-06 Robert Anisko <robert@lrde.epita.fr>
16920
16921 * data/bison.c++: Adjust the parser code. Fix some muscles that were
16922 not expanded by m4.
16923
3f3eed27
AD
169242002-02-05 Akim Demaille <akim@epita.fr>
16925
16926 * data/bison.c++: Adjust to the M4 back end.
16927 More is certainly needed.
16928
be2a1a68
AD
169292002-02-05 Akim Demaille <akim@epita.fr>
16930
16931 Give a try to M4 as a back end.
16932
16933 * lib/readpipe.c: New, from wdiff.
16934 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
16935 BISON_HAIRY.
16936 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
16937 specific values. Now it is m4 that performs the lookup.
16938 * src/parse-skel.y: Remove.
16939 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
16940 * src/output.c (actions_output, guards_output)
16941 (token_definitions_output): No longer keeps track of the output
16942 line number, hence remove the second argument.
16943 (guards_output): Check against the guard member of a rule, not the
16944 action member.
16945 Adjust callers.
16946 (output_skeleton): Don't look for the skeleton location, let m4 do
16947 that.
16948 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
16949 file will be used.
16950 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
16951 (prepare): Given that for the time being changesyntax is not
16952 usable in M4, rename the muscles using `-' to `_'.
16953 Define `defines_flag', `output_parser_name' and `output_header_name'.
16954 * src/output.h (actions_output, guards_output)
16955 (token_definitions_output): Adjust prototypes.
16956 * src/scan-skel.l: Instead of scanning the skeletons, it now
16957 processes the output of m4: `__oline__' and `#output'.
16958 * data/bison.simple: Adjust to be used by M4(sugar).
16959 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
16960 to date.
16961 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
16962 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
16963 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
16964 shamelessly stolen from CVS Autoconf.
16965
beda758b
AD
169662002-02-05 Akim Demaille <akim@epita.fr>
16967
16968 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
16969 * configure.in: Check for the declarations of free and malloc.
16970 * src/muscle_tab.c: Adjust.
16971
5ece6d43
AD
169722002-02-05 Akim Demaille <akim@epita.fr>
16973
16974 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
16975 which have no values.
16976
5bb18f9a
AD
169772002-02-05 Akim Demaille <akim@epita.fr>
16978
16979 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
16980 * data/: here.
16981
894dd62e
PE
169822002-01-29 Paul Eggert <eggert@twinsun.com>
16983
16984 * src/bison.simple (YYSIZE_T): Do not define merely because
16985 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
16986 On some platforms, <alloca.h> does not declare YYSTD (size_t).
16987
82841af7
AD
169882002-01-27 Akim Demaille <akim@epita.fr>
16989
16990 Fix `%nonassoc and eof'.
16991
16992 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
16993 which were not properly copied! Replace
16994 memcpy (res->errs, src->errs, src->nerrs);
16995 with
16996 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
16997 !!!
16998 * tests/regression.at (%nonassoc and eof): Adjust to newest
16999 Autotest: `.' is not in the PATH.
17000
318b76e9
AD
170012002-01-27 Akim Demaille <akim@epita.fr>
17002
17003 * tests/sets.at (AT_EXTRACT_SETS): New.
17004 (Nullable): Use it.
17005 (Firsts): New.
17006
30d2f3d5
AD
170072002-01-26 Akim Demaille <akim@epita.fr>
17008
17009 * tests/actions.at, tests/calc.at, tests/headers.at,
17010 * tests/torture.at: Adjust to the newest Autotest which no longer
17011 forces `.' in the PATH.
17012
30f8c395
AD
170132002-01-25 Akim Demaille <akim@epita.fr>
17014
17015 * tests/regression.at (%nonassoc and eof): New.
17016 Suggested by Robert Anisko.
17017
29ae55f1
AD
170182002-01-24 Akim Demaille <akim@epita.fr>
17019
17020 Bison dumps core when trying to complain about broken input files.
17021 Reported by Cris van Pelt.
17022
17023 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
17024 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
17025 into...
17026 (Invalid inputs): Strengthen: exercise parse_percent_token.
17027
2b548aa6
RA
170282002-01-24 Robert Anisko <robert.anisko@epita.fr>
17029
17030 * src/Makefile.am: Add bison.c++.
17031 * src/bison.c++: New skeleton.
17032
bb0146c2
AD
170332002-01-21 Paolo Bonzini <bonzini@gnu.org>
17034
17035 * po/it.po: New.
17036
bec30531
AD
170372002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
17038
17039 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
17040
fc6edc45
MA
170412002-01-20 Marc Autret <marc@gnu.org>
17042
17043 * src/files.c (compute_output_file_names): Fix
17044
5e5d5415
MA
170452002-01-20 Marc Autret <marc@gnu.org>
17046
17047 * tests/output.at: New test.
17048 * src/files.c (compute_base_names): Don't map extensions when
17049 the YACC flag is set, use defaults.
17050 Reported by Evgeny Stambulchik.
17051
44ea3fbd
MA
170522002-01-20 Marc Autret <marc@gnu.org>
17053
ba0fe3c7
PE
17054 * src/system.h: Need to define __attribute__ away for non-GCC
17055 compilers as well (i.e., the vendor C compiler).
44ea3fbd
MA
17056 Suggested by Albert Chin-A-Young.
17057
338963d1
TVH
170582002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
17059
17060 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
17061 canonical definition.
17062 * src/system.h: Use the canonical definition for PARAMS (avoids
17063 a conflict with the macro from lib/hash.h).
17064
c57b2479
AD
170652002-01-11 Akim Demaille <akim@epita.fr>
17066
17067 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 17068 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 17069
b85810ae
AD
170702002-01-09 Akim Demaille <akim@epita.fr>
17071
17072 * src/files.c, src/files.h (output_infix): New.
17073 (tab_extension): Remove.
17074 (compute_base_names): Compute the former, drop the latter.
17075 * src/output.c (prepare): Insert the muscles `output-infix', and
17076 `output-suffix'.
17077 * src/parse-skel.y (string, string.1): New.
17078 (section.header): Use it.
17079 (section.yacc): Remove.
17080 (prefix): Remove too.
17081 * src/scan-skel.l: Adjust.
17082 * src/bison.simple, src/bison.hairy: Adjust.
17083
cae60122
AD
170842002-01-09 Akim Demaille <akim@epita.fr>
17085
17086 * configure.in (WERROR_CFLAGS): Compute it.
17087 * src/Makefile.am (CFLAGS): Pass it.
17088 * tests/atlocal.in (CFLAGS): Idem.
17089 * src/files.c: Fix a few warnings.
17090 (get_extension_index): Remove, unused.
17091
ae404801
AD
170922002-01-08 Akim Demaille <akim@epita.fr>
17093
17094 * src/getargs.c (AS_FILE_NAME): New.
17095 (getargs): Use it to convert DOSish file names.
17096 * src/files.c (base_name): Rename as full_base_name to avoid
17097 clashes with `base_name ()'.
17098 (filename_split): New.
17099 (compute_base_names): N-th rewrite, using filename_split.
17100
22312b71
AD
171012002-01-08 Akim Demaille <akim@epita.fr>
17102
17103 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
17104 New, stolen from the Fileutils 4.1.
17105 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
17106 * configure.in: Check for the presence of memrchr, and of its
17107 prototype.
17108
a67cef01
TVH
171092002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
17110
17111 * lib/hash.h (__P): Added definition for this macro.
17112 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
17113 BUILT_SOURCES, to ensure they are generated first.
17114 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
17115 %error-verbose to allow bootstrapping with bison 1.30x.
17116
2b25d624
AD
171172002-01-06 Akim Demaille <akim@epita.fr>
17118
17119 * src/reader.c (parse_braces): Don't fetch the next char, the
17120 convention is to fetch on entry.
17121 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
17122 'switch' without a following semicolon.
17123 * tests/regression.at (braces parsing): New.
17124
3460813b
AD
171252002-01-06 Akim Demaille <akim@epita.fr>
17126
17127 Bison is dead wrong in its RR conflict reports.
17128
17129 * tests/torture.at (GNU Cim Grammar): New.
17130 * src/conflicts.c (count_rr_conflicts): Fix.
17131
73784c64
AD
171322002-01-06 Akim Demaille <akim@epita.fr>
17133
17134 Creating package.m4 from configure.ac causes too many problems.
17135
17136 * tests/Makefile.am (package.m4): Create it by hand,
17137 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
17138
25d81090
AD
171392002-01-06 Akim Demaille <akim@epita.fr>
17140
17141 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
17142 skeleton.h.
17143
a9b8959e
PE
171442002-01-04 Paul Eggert <eggert@twinsun.com>
17145
17146 * doc/bison.texinfo (Debugging):
17147 Remove YYSTDERR; it's no longer defined or used.
17148 Also, s/cstdio.h/cstdio/.
17149
25d81090
AD
171502002-01-03 Akim Demaille <akim@epita.fr>
17151
17152 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
17153
1109455c
AD
171542002-01-03 Akim Demaille <akim@epita.fr>
17155
17156 * src/parse-skel.y (process_skeleton): Don't bind the parser's
17157 tracing code to --trace, wait for a better --trace option, with
17158 args.
17159
7ea5e977
AD
171602002-01-03 Akim Demaille <akim@epita.fr>
17161
17162 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
17163 The ISO C++ standard is extremely clear about it: stderr is
17164 considered a macro, not a regular symbol (see table 94 `Header
17165 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
17166 Therefore std:: does not apply to it. It still does with fprintf.
17167 Also, s/cstdio.h/cstdio/.
17168
fab5b110
AD
171692002-01-03 Akim Demaille <akim@epita.fr>
17170
17171 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
17172 for non system headers.
17173
aed7fd9b
AD
171742002-01-02 Akim Demaille <akim@epita.fr>
17175
17176 Equip the skeleton chain with location tracking, runtime trace,
17177 pure parser and scanner.
17178
17179 * src/parse-skel.y: Request a pure parser, locations, and prefix
17180 renaming.
17181 (%union): Having several members with the same type does not help
17182 type mismatches, simplify.
17183 (YYPRINT, yyprint): New.
17184 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
17185 (skel_error): this.
17186 Handle locations.
17187 * src/scan-skel.l: Adjust to these changes.
17188 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
17189 (LOCATION_PRINT, skel_control_t): New.
17190
24fad99e
AD
171912001-12-30 Akim Demaille <akim@epita.fr>
17192
17193 * src/parse-skel.y: Get rid of the shift/reduce conflict:
17194 replace `gb' with BLANKS.
17195 * src/scan-skel.l: Adjust.
17196
a4b36db4
AD
171972001-12-30 Akim Demaille <akim@epita.fr>
17198
17199 * src/system.h: We don't need nor want bcopy.
17200 Throw away MS-DOS crap: we don't need getpid.
17201 * configure.in: We don't need strndup. It was even causing
17202 problems: because Flex includes the headers *before* us,
17203 _GNU_SOURCE is not defined by config.h, and therefore strndup was
17204 not visible.
17205 * lib/xstrndup.c: New.
17206 * src/scan-skel.l: Use it.
17207 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
17208 * src/parse-skel.y: Use %directives instead of #defines.
17209
1239777d
AD
172102001-12-30 Akim Demaille <akim@epita.fr>
17211
17212 * src/skeleton.h: New.
17213 * src/output.c (output_parser, output_master_parser): Remove, dead
17214 code.
17215 * src/output.h (get_lines_number, actions_output, guards_output)
17216 (token_definitions_output): Prototype them.
17217 * src/parse-skel.y: Add the license notice.
17218 Include output.h and skeleton.h.
17219 (process_skeleton): Returns void, and takes a single parameter.
17220 * src/scan-skel.l: Add the license notice.
17221 Include skeleton.h.
17222 Don't use %option yylineno: it seems that then Flex imagines
17223 REJECT has been used, and therefore it won't reallocate its
17224 buffers (which makes no other sense to me than a bug). It results
17225 in warnings for `unused: yy_flex_realloc'.
17226
9b3add5b
RA
172272001-12-30 Robert Anisko <robert.anisko@epita.fr>
17228
17229 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
17230 (MUSCLE_INSERT_PREFIX): ...to there.
17231 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
17232 (MUSCLE_INSERT_PREFIX): Move from here...
17233
17234 * src/bison.hairy: Add a section directive. Put braces around muscle
17235 names. This parser skeleton is still broken, but Bison should not
17236 choke on a bad muscle 'syntax'.
17237 * src/bison.simple: Add a section directive. Put braces around muscle
17238 names.
17239
17240 * src/files.h (strsuffix, stringappend): Add declarations.
17241 (tab_extension): Add declaration.
17242 (short_base_name): Add declaration.
17243
17244 * src/files.c (strsuffix, stringappend): No longer static. These
17245 functions are used in the skeleton parser.
17246 (tab_extension): New.
17247 (compute_base_names): Use the computations done in this function
fab5b110 17248 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
17249 names.
17250 (short_base_name): No longer static.
17251
17252 * src/output.c (output_skeleton): New.
17253 (output): Disable call to output_master_parser, and give a try to
17254 a new skeleton handling system.
17255 (guards_output, actions_output): No longer static.
17256 (token_definitions_output, get_lines_number): No longer static.
17257
17258 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
17259
fab5b110 17260 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
17261 parse-skel.y.
17262
17263 * src/parse-skel.y: New file.
17264 * src/scan-skel.l: New file.
17265
b5b61c61
AD
172662001-12-29 Akim Demaille <akim@epita.fr>
17267
17268 %name-prefix is broken.
17269
17270 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
17271 Adjust all dependencies.
17272 * tests/headers.at (export YYLTYPE): Strengthen this test: use
17273 %name-prefix.
17274
17275 Renaming yylval but not yylloc is not consistent. Now we do.
17276
17277 * src/bison.simple: Prefix yylloc if used.
17278 * doc/bison.texinfo (Decl Summary): Document that.
17279
8c9a50be
AD
172802001-12-29 Akim Demaille <akim@epita.fr>
17281
17282 * doc/bison.texinfo: Promote `%long-directive' over
17283 `%long_directive'.
17284 Remove all references to fixed-output-files, yacc is enough.
17285
d99361e6
AD
172862001-12-29 Akim Demaille <akim@epita.fr>
17287
17288 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
17289 user prologue. These are defaults.
17290 * tests/actions.at (Mid-rule actions): Make sure the user can
17291 define YYDEBUG and YYERROR_VERBOSE.
17292
b9cecb91
AD
172932001-12-29 Akim Demaille <akim@epita.fr>
17294
17295 * src/output.c (header_output): Don't forget to export YYLTYPE and
17296 yylloc.
17297 * tests/headers.at (export YYLTYPE): New, make sure it does.
17298 * tests/regression.at (%union and --defines, Invalid CPP headers):
17299 Move to...
17300 * tests/headers.at: here.
17301
aea13e97
AD
173022001-12-29 Akim Demaille <akim@epita.fr>
17303
17304 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
17305
931394cb
AD
173062001-12-29 Akim Demaille <akim@epita.fr>
17307
17308 * tests/actions.at (Mid-rule actions): Output on a single line
17309 instead of several.
17310
704a47c4
AD
173112001-12-29 Akim Demaille <akim@epita.fr>
17312
17313 * doc/bison.texinfo: Formatting changes.
17314
091e20bb
AD
173152001-12-29 Akim Demaille <akim@epita.fr>
17316
17317 Don't store the token defs in a muscle, just be ready to output it
17318 on command. Now possible via `symbols'. Fixes a memory leak.
17319
17320 * src/output.c (token_definitions_output): New.
17321 (output_parser, header_output): Use it.
17322 * src/reader.c (symbols_save): Remove.
17323
cce71710
AD
173242001-12-29 Akim Demaille <akim@epita.fr>
17325
17326 * src/bison.simple: Do not provide a default for YYSTYPE and
17327 YYLTYPE before the user's prologue. Otherwise it's hardly... a
17328 default.
17329
82c035a8
AD
173302001-12-29 Akim Demaille <akim@epita.fr>
17331
17332 Mid-rule actions are simply... ignored!
17333
17334 * src/reader.c (readgram): Be sure to attach mid-rule actions to
17335 the empty-rule associated to the dummy symbol, not to the host
17336 rule.
17337 * tests/actions.at (Mid-rule actions): New.
17338
8419d367
AD
173392001-12-29 Akim Demaille <akim@epita.fr>
17340
17341 Memory leak.
17342
17343 * src/reader.c (reader): Free grammar.
17344
375d5806
AD
173452001-12-29 Akim Demaille <akim@epita.fr>
17346
17347 Memory leak.
17348
17349 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
17350 since it allocates it for each state, although only one is needed.
17351 (allocate_storage): Do it here.
17352
f51cb8ff
AD
173532001-12-29 Akim Demaille <akim@epita.fr>
17354
17355 * src/options.h, src/options.c (create_long_option_table): Rename
17356 as...
17357 (long_option_table_new): this, with a clearer prototype.
17358 (percent_table): Remove, unused,
17359 * src/getargs.c (getargs): Adjust.
17360
29e88316
AD
173612001-12-29 Akim Demaille <akim@epita.fr>
17362
17363 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
17364 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
17365 as states.
17366
b9f71f19
AD
173672001-12-29 Akim Demaille <akim@epita.fr>
17368
17369 * src/lalr.c (build_relations): Rename `states' as `states1'.
17370 Sorry, I don't understand exactly what it is, no better name...
17371
1a2b5d37
AD
173722001-12-29 Akim Demaille <akim@epita.fr>
17373
17374 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
17375 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
17376 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
17377 as rules.
17378
1cca533e
AD
173792001-12-29 Akim Demaille <akim@epita.fr>
17380
17381 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
17382 ago.
17383
c03ae966
AD
173842001-12-29 Akim Demaille <akim@epita.fr>
17385
17386 * src/reader.c, src/reader.h (user_toknums): Remove.
17387 Adjust all users to use symbols[i]->user_token_number.
17388
5a670b1e
AD
173892001-12-29 Akim Demaille <akim@epita.fr>
17390
17391 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
17392 Adjust all users to use symbols[i]->prec or ->assoc.
17393
ad949da9
AD
173942001-12-29 Akim Demaille <akim@epita.fr>
17395
17396 * src/reader.c, src/reader.h (tags): Remove.
17397 Adjust all users to use symbols[i]->tag.
17398
0e78e603
AD
173992001-12-29 Akim Demaille <akim@epita.fr>
17400
17401 * src/gram.h, src/gram.c (symbols): New, similar to state_table
17402 and rule_table.
17403 * src/reader.c (packsymbols): Fill this table.
17404 Drop sprec.
17405 * src/conflicts.c (resolve_sr_conflict): Adjust.
17406 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
17407 single table.
17408 Use symbols[i]->tag instead of tags[i].
17409
213e640e
AD
174102001-12-29 Akim Demaille <akim@epita.fr>
17411
17412 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
17413 In addition, put a comment in there, to replace...
17414 * tests/regression.at (%union and C comments): Remove.
17415
e7b8bef1
AD
174162001-12-29 Akim Demaille <akim@epita.fr>
17417
17418 * tests/regression.at (Web2c Actions): Blindly move the actual
17419 output as expected output. The contents *seem* right to me, but I
17420 can't pretend reading perfectly parser tables... Nonetheless, all
17421 the other tests pass correctly, the table look OK, even though the
17422 presence of `$axiom' is to be noted: AFAICS it is useless (but
17423 harmless).
17424
b68e7744
AD
174252001-12-29 Akim Demaille <akim@epita.fr>
17426
17427 * src/reader.c (readgram): Don't add the rule 0 if there were no
17428 rules read. In other words, add it _after_ having performed
17429 grammar sanity checks.
17430 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
17431
78d5bae9
AD
174322001-12-29 Akim Demaille <akim@epita.fr>
17433
17434 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
17435 visible, and some states have now a different number.
17436
ff442794
AD
174372001-12-29 Akim Demaille <akim@epita.fr>
17438
17439 * src/reader.c (readgram): Bind the initial rule's lineno to that
17440 of the first rule.
17441 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
17442 (Solved SR Conflicts): Adjust rule 0's line number.
17443
610ab194
AD
174442001-12-29 Akim Demaille <akim@epita.fr>
17445
17446 Fix the `GAWK Grammar' failure.
17447
17448 * src/LR0.c (final_state): Initialize to -1 so that we do compute
17449 the reductions of the first state which was mistakenly confused
17450 with the final state because precisely final_state was initialized
17451 to 0.
17452 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
17453 now noticed by Bison.
17454 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
17455 have a reduction on $default.
17456
29d29c8f
AD
174572001-12-29 Akim Demaille <akim@epita.fr>
17458
17459 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
17460 rule line numbers.
17461 * src/closure.c (print_closure): Likewise.
17462 * src/derives.c (print_derives): Likewise.
17463 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
17464 now.
17465
7c6b64d0
AD
174662001-12-29 Akim Demaille <akim@epita.fr>
17467
17468 * src/lalr.c (lookaheads_print): New.
17469 (lalr): Call it when --trace-flag.
17470 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
17471 are dumped.
17472
3d4daee3
AD
174732001-12-29 Akim Demaille <akim@epita.fr>
17474
17475 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
17476 when walking through ritem, even via rule->rhs.
17477 * src/reduce.c (dump_grammar, useful_production, reduce_output)
17478 (useful_production, useless_nonterminals): Likewise.
17479 (reduce_grammar_tables): Likewise, plus update nritems.
17480 * src/nullable.c (set_nullable): Likewise.
17481 * src/lalr.c (build_relations): Likewise.
17482 * tests/sets.at (Nullable): Adjust.
17483 Fortunately, now, the $axiom is no longer nullable.
17484
9e7f6bbd
AD
174852001-12-29 Akim Demaille <akim@epita.fr>
17486
17487 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
17488 the 0-sentinel.
17489 * src/gram.c (ritem_longest_rhs): Likewise.
17490 * src/reduce.c (nonterminals_reduce): Likewise.
17491 * src/print_graph.c (print_graph): Likewise.
17492 * src/output.c (output_rule_data): Likewise.
17493 * src/nullable.c (set_nullable): Likewise.
17494
255ef638
AD
174952001-12-29 Akim Demaille <akim@epita.fr>
17496
17497 * src/output.c: Comment changes.
17498
0d8a7363
AD
174992001-12-27 Paul Eggert <eggert@twinsun.com>
17500
17501 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
17502 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
17503 Sparc, as they were causing more porting problems than the
17504 (minor) performance improvement was worth.
17505
17506 Also, catch up with 1.31's YYSTD.
17507
3db472b9
AD
175082001-12-27 Akim Demaille <akim@epita.fr>
17509
17510 * src/output.c (output_gram): Rely on nritems, not the
17511 0-sentinel. See below.
17512 Use -1 as separator, not 0.
17513 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
17514 Rely on -1 as separator in yyrhs, instead of 0.
17515 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
17516 twice `Now at end of input', therefore there are two lines less to
17517 expect.
17518
b365aa05
AD
175192001-12-27 Akim Demaille <akim@epita.fr>
17520
17521 * tests/regression.at (Unresolved SR Conflicts):
17522 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
17523 below.
17524
30171f79
AD
175252001-12-27 Akim Demaille <akim@epita.fr>
17526
17527 * src/LR0.c (new_state): Recognize the final state by the fact it
17528 is reached by eoftoken.
17529 (insert_start_shifting_state, insert_eof_shifting_state)
17530 (insert_accepting_state, augment_automaton): Remove, since now
17531 these states are automatically computed from the initial state.
17532 (generate_states): Adjust.
17533 * src/print.c: When reporting a rule number to the user, substract
17534 1, so that the axiom rule is rule 0, and the first user rule is 1.
17535 * src/reduce.c: Likewise.
17536 * src/print_graph.c (print_core): For the time being, just as for
17537 the report, depend upon --trace-flags to dump the full set of
17538 items.
17539 * src/reader.c (readgram): Once the grammar read, insert the rule
17540 0: `$axiom: START-SYMBOL $'.
17541 * tests/set.at: Adjust: rule 0 is now displayed, and since the
17542 number of the states has changed (the final state is no longer
17543 necessarily the last), catch up.
17544
75142d45
AD
175452001-12-27 Akim Demaille <akim@epita.fr>
17546
17547 Try to make the use of the eoftoken valid. Given that its value
17548 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
17549 is used instead of > 0 where appropriate, (ii), depend upon nritems
17550 instead of the 0-sentinel.
17551
17552 * src/gram.h, src/gram.c (nritems): New.
17553 Expected to be duplication of nitems, but for the time being...
17554 * src/reader.c (packgram): Assert nritems and nitems are equal.
17555 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
17556 * src/closure.c (print_closure, print_fderives): Likewise.
17557 * src/gram.c (ritem_print): Likewise.
17558 * src/print.c (print_core, print_grammar): Likewise.
17559 * src/print_graph.c: Likewise.
17560
b7c49edf
AD
175612001-12-27 Akim Demaille <akim@epita.fr>
17562
17563 * src/main.c (main): If there are complains after grammar
17564 reductions, then output the report anyway if requested, then die.
17565 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
17566 * src/reader.c (eoftoken): New.
17567 (parse_token_decl): If the token being defined has value `0', it
17568 is the eoftoken.
17569 (packsymbols): No longer hack `tags' to insert `$' by hand.
17570 Be sure to preserve the value of the eoftoken.
17571 (reader): Make sure eoftoken is defined.
17572 Initialize nsyms to 0: now eoftoken is created just like the others.
17573 * src/print.c (print_grammar): Don't special case the eof token.
17574 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
17575 lie anyway, albeit pleasant.
17576 * tests/calc.at: Exercise error messages with eoftoken.
17577 Change the grammar so that empty input is invalid.
17578 Adjust expectations.
17579 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
17580
ec2da99f
AD
175812001-12-27 Akim Demaille <akim@epita.fr>
17582
17583 * configure.in: Check the protos of strchr ans strspn.
17584 Replace strchr if needed.
17585 * src/system.h: Provide the protos of strchr, strspn and memchr if
17586 missing.
17587 * lib/strchr.c: New.
17588 * src/reader.c (symbols_save): Use strchr.
17589
8adfa272
AD
175902001-12-27 Akim Demaille <akim@epita.fr>
17591
17592 * src/print.c, src/print_graph.c (escape): New.
17593 Use it to quote the TAGS outputs.
17594 * src/print_graph.c (print_state): Now errors are in red, and
17595 reductions in green.
17596 Prefer high to wide: output the state number on a line of its own.
17597
80dac38c
AD
175982001-12-27 Akim Demaille <akim@epita.fr>
17599
17600 * src/state.h, src/state.c (reductions_new): New.
17601 * src/LR0.c (set_state_table): Let all the states have a
17602 `reductions', even if reduced to 0.
17603 (save_reductions): Adjust.
17604 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
17605 * src/print.c (print_reductions, print_actions): Adjust.
17606 * src/output.c (action_row): Adjust.
17607
2cec70b9
AD
176082001-12-27 Akim Demaille <akim@epita.fr>
17609
17610 * src/state.h, src/state.c (errs_new, errs_dup): New.
17611 * src/LR0.c (set_state_table): Let all the states have an errs,
17612 even if reduced to 0.
17613 * src/print.c (print_errs, print_reductions): Adjust.
17614 * src/output.c (output_actions, action_row): Adjust.
17615 * src/conflicts.c (resolve_sr_conflict): Adjust.
17616
13ca549a
AD
176172001-12-27 Akim Demaille <akim@epita.fr>
17618
17619 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
17620
5092aba5
AD
176212001-12-27 Akim Demaille <akim@epita.fr>
17622
17623 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
17624 * src/print.c: here.
17625 (lookaheadset, shiftset): New, used as additional storage by
17626 print_reductions.
17627 (print_results): Adjust.
17628 (print_shifts, print_gotos, print_errs): New, extracted from...
17629 (print_actions): here.
17630 * src/print_graph.c (print_actions): Remove dead code.
17631
11e2beca
AD
176322001-12-27 Akim Demaille <akim@epita.fr>
17633
17634 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
17635 `$n' and `@n'.
17636
dac3c910
AD
176372001-12-27 Akim Demaille <akim@epita.fr>
17638
17639 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
17640 (build_relations): Adjust.
17641
d0b0fefa
AD
176422001-12-27 Akim Demaille <akim@epita.fr>
17643
17644 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
17645 duplication.
17646
adc8c848
AD
176472001-12-27 Akim Demaille <akim@epita.fr>
17648
17649 * src/reader.c (packgram): Catch nitems overflows.
17650
14d293ac
AD
176512001-12-27 Akim Demaille <akim@epita.fr>
17652
17653 * src/files.c, src/files.h (guard_obstack): Remove.
17654 * src/output.c (output): Adjust.
17655 * src/reader.c (parse_braces): New, factoring...
17656 (copy_action, copy_guard): these two which are renamed as...
17657 (parse_action, parse_guard): these.
17658 As a voluntary consequence, using braces around guards is now
17659 mandatory.
17660
f499b062
AD
176612001-12-27 Akim Demaille <akim@epita.fr>
17662
17663 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
17664 * src/reader.c (symbol_list): `guard' and `guard_line' are new
17665 members.
17666 (symbol_list_new): Adjust.
17667 (copy_action): action_line is the first line, not the last.
17668 (copy_guard): Just as for actions, store the `action' only, not
17669 the switch/case/break flesh.
17670 Don't parse the user action that might follow the guard, let...
17671 (readgram): do it, i.e., now, there can be an action after a
17672 guard.
17673 In other words the guard is just explicitly optional.
17674 (packgram): Adjust.
17675 * src/output.c (guards_output): New.
17676 (output_parser): Call it when needed.
17677 (output): Also free the guard and attrs obstacks.
17678 * src/files.c, src/files.h (obstack_save): Remove.
17679 (output_files): Remove.
17680 As a result, if one needs the former `.act' file, using an
17681 appropriate skeleton which requires actions and guards is now
17682 required.
17683 * src/main.c (main): Adjust.
17684 * tests/semantic.at: New.
17685 * tests/regression.at: Use `input.y' as input file name.
17686 Avoid 8+3 problems by requiring input.c when the test needs the
17687 parser.
17688
d945f5cd
AD
176892001-12-27 Akim Demaille <akim@epita.fr>
17690
17691 * src/reader.c (symbol_list_new): Be sure to initialize all the
17692 fields.
17693
d200e455
AD
176942001-12-27 Akim Demaille <akim@epita.fr>
17695
17696 All the hacks using a final pseudo state are now useless.
17697
17698 * src/LR0.c (set_state_table): state_table holds exactly nstates.
17699 * src/lalr.c (nLA): New.
17700 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
17701 instead of lookaheadsp from the pseudo state (nstate + 1).
17702
f9507c28
AD
177032001-12-27 Akim Demaille <akim@epita.fr>
17704
17705 * src/output.c (action_row, token_actions): Use a state_t instead
17706 of a integer, and nlookaheads instead of the following state's
17707 lookaheadsp.
17708
065fbd27
AD
177092001-12-27 Akim Demaille <akim@epita.fr>
17710
17711 * src/conflicts.c (log_resolution, flush_shift)
17712 (resolve_sr_conflict, set_conflicts, solve_conflicts)
17713 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
17714 (conflicts_print, print_reductions): Use a state_t instead of an
17715 integer when referring to a state.
17716 As much as possible, depend upon nlookaheads, instead of the
17717 `lookaheadsp' member of the following state (since lookaheads of
17718 successive states are successive, the difference between state n + 1
17719 and n served as the number of lookaheads for state n).
17720 * src/lalr.c (add_lookback_edge): Likewise.
17721 * src/print.c (print_core, print_actions, print_state)
17722 (print_results): Likewise.
17723 * src/print_graph.c (print_core, print_actions, print_state)
17724 (print_graph): Likewise.
17725 * src/conflicts.h: Adjust.
17726
1b177bd7
AD
177272001-12-27 Akim Demaille <akim@epita.fr>
17728
17729 * src/bison.hairy: Formatting/comment changes.
17730 ANSIfy.
17731 Remove `register' indications.
17732 Add plenty of `static'.
17733
7742ddeb
AD
177342001-12-27 Akim Demaille <akim@epita.fr>
17735
17736 * src/output.c (prepare): Drop the muscle `ntbase' which
17737 duplicates ntokens.
17738 * src/bison.simple: Formatting/comment changes.
17739 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
17740 is an undocumented synonym.
17741
1fa14068
AD
177422001-12-22 Akim Demaille <akim@epita.fr>
17743
17744 * src/output.c (output_table_data): Change the prototype to use
17745 `int' for array ranges: some invocations do pass an int, not a
17746 short.
17747 Reported by Wayne Green.
17748
b9752825
AD
177492001-12-22 Akim Demaille <akim@epita.fr>
17750
17751 Some actions of web2c.y are improperly triggered.
17752 Reported by Mike Castle.
17753
17754 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
17755 * tests/regression.at (Web2c): Rename as...
17756 (Web2c Report): this.
17757 (Web2c Actions): New.
17758
776209d6
AD
177592001-12-22 Akim Demaille <akim@epita.fr>
17760
17761 Reductions in web2c.y are improperly reported.
17762 Reported by Mike Castle.
17763
17764 * src/conflicts.c (print_reductions): Fix.
17765 * tests/regression.at (Web2c): New.
17766
275fc3ad
AD
177672001-12-18 Akim Demaille <akim@epita.fr>
17768
17769 Some host fail on `assert (!"foo")', which expands to
17770 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
17771 Reported by Nelson Beebee.
17772
17773 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
17774 `#define it_succeeded 0' and `assert (it_succeeded)'.
17775
897668ee
MA
177762001-12-17 Marc Autret <autret_m@epita.fr>
17777
17778 * src/bison.simple: Don't hard code the skeleton line and filename.
17779 * src/output.c (output_parser): Rename 'line' as 'output_line'.
17780 New line counter 'skeleton_line' (skeleton-line muscle).
17781
ab3399e0
PE
177822001-12-17 Paul Eggert <eggert@twinsun.com>
17783
17784 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
17785 YYDEBUG must be defined to a nonzero value.
17786
17787 * src/bison.simple (yytname): Do not assume that the user defines
17788 YYDEBUG to a properly parenthesized expression.
17789
3877f72b
AD
177902001-12-17 Akim Demaille <akim@epita.fr>
17791
17792 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
17793 nlookaheads is a new member.
17794 Adjust all users.
17795 * src/lalr.h (nlookaheads): Remove this orphan declaration.
17796 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
17797 state.
776209d6 17798
331dbc1b
AD
177992001-12-17 Akim Demaille <akim@epita.fr>
17800
17801 * src/files.h, src/files.c (open_files, close_files): Remove.
17802 * src/main.c (main): Don't open/close files, nor invoke lex_free,
17803 let...
17804 * src/reader.c (reader): Do it.
776209d6 17805
be750e4c
AD
178062001-12-17 Akim Demaille <akim@epita.fr>
17807
17808 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 17809
709ae8c6
AD
178102001-12-17 Akim Demaille <akim@epita.fr>
17811
17812 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
17813 (flush_reduce): New.
17814 (resolve_sr_conflict): Adjust.
776209d6 17815
f87685c3
AD
178162001-12-17 Akim Demaille <akim@epita.fr>
17817
17818 * src/output.c (output_obstack): Be static and rename as...
17819 (format_obstack): this, to avoid any confusion with files.c's
17820 output_obstack.
17821 * src/reader.h (muscle_obstack): Move to...
17822 * src/output.h: here, since it's defined in output.c.
17823
837491d8
AD
178242001-12-17 Akim Demaille <akim@epita.fr>
17825
17826 * src/output.c (action_row, save_column, default_goto)
17827 (sort_actions, matching_state, pack_vector): Better variable
17828 locality.
17829
796d61fb
AD
178302001-12-17 Akim Demaille <akim@epita.fr>
17831
17832 * src/output.c: Various formatting changes.
776209d6 17833
64d15509
AD
178342001-12-17 Akim Demaille <akim@epita.fr>
17835
17836 * src/files.c (output_files): Free the output_obstack.
17837 * src/main.c (main): Call print and print_graph conditionally.
17838 * src/print.c (print): Work unconditionally.
17839 * src/print_graph.c (print_graph): Work unconditionally.
17840 * src/conflicts.c (log_resolution): Output only if verbose_flag.
17841
fbc8ecb7
MA
178422001-12-16 Marc Autret <autret_m@epita.fr>
17843
17844 * src/output.c (actions_output): Fix. When we use %no-lines,
17845 there is one less line per action.
17846
f0440388
MA
178472001-12-16 Marc Autret <autret_m@epita.fr>
17848
17849 * src/bison.simple: Remove a useless #line directive.
17850 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
17851 * src/output.c (get_lines_number): New.
776209d6 17852 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
17853 output muscles.
17854 Fix line numbering.
17855 (actions_output): Computes the number of lines taken by actions.
17856 (output_master_parser): Insert new skeleton which is the name of
17857 the output parser file name.
17858
a79986b8
MA
178592001-12-15 Marc Autret <autret_m@epita.fr>
17860
17861 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
17862
4ec8e00f
MA
178632001-12-15 Marc Autret <autret_m@epita.fr>
17864
17865 * src/output.c (output_gram): Keep track of the hairy one.
17866
1a4648ff
AD
178672001-12-15 Akim Demaille <akim@epita.fr>
17868
17869 Make `make distcheck' work.
17870
17871 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
17872 system.h which uses libgettext.h.
17873
9c2c67e6
AD
178742001-12-15 Akim Demaille <akim@epita.fr>
17875
17876 * src/nullable.c (set_nullable): Useless rules must be skipped,
17877 otherwise, since we range over their symbols, we might look at a
17878 nonterminal which no longer ``exists'', i.e., it is not counted in
17879 `nvars', hence we overflow our arrays.
17880
93ede233
AD
178812001-12-15 Akim Demaille <akim@epita.fr>
17882
17883 The header can also be produced directly, without any obstack!
17884 Yahoo!
17885
17886 * src/files.c, src/files.h (defines_obstack): Remove.
17887 (compute_header_macro): Global.
17888 (defines_obstack_save): Remove.
17889 * src/reader.c (parse_union_decl): No longer output to
17890 defines_obstack: its content can be found in the `stype' muscle
17891 anyway.
17892 (output_token_translations): Merge into...
17893 (symbols_output): this.
17894 Rename as...
17895 (symbols_save): this.
17896 (reader): Adjust.
17897 * src/output.c (header_output): New.
17898 (output): Call it.
17899
2666f928
AD
179002001-12-15 Akim Demaille <akim@epita.fr>
17901
17902 * src/reader.c (parse_union_decl): Instead of handling two obstack
17903 simultaneously, use one to define the `stype' muscle, and use the
17904 value of the latter to fill defines_obstack.
17905 (copy_comment): Remove.
17906 (copy_comment2): Work for a single obstack.
17907 Rename as...
17908 (copy_comment): this.
17909
428046f8
AD
179102001-12-15 Akim Demaille <akim@epita.fr>
17911
17912 * src/lex.c, src/lex.h (xgetc): No longer static.
17913 * src/reader.c (parse_union_decl): Revamp.
17914
ea52d706
AD
179152001-12-15 Akim Demaille <akim@epita.fr>
17916
17917 Still making progress in separating Bison into (i) input, (ii)
17918 process, (iii) output: now we can directly output the parser file
17919 without using table_obstack at all.
17920
17921 * src/files.c, src/files.h (table_obstack): Bye bye.
17922 (parser_file_name): New.
17923 * src/files.c (compute_output_file_names): Compute it.
17924 * src/output.c (actions_output, output_parser)
17925 (output_master_parser): To a file instead of an obstack.
17926
3f96f4dc
AD
179272001-12-15 Akim Demaille <akim@epita.fr>
17928
17929 Attach actions to rules, instead of pre-outputting them to
17930 actions_obstack.
17931
17932 * src/gram.h (rule_t): action and action_line are new members.
17933 * src/reader.c (symbol_list): Likewise.
17934 (copy_action): Save the actions within the rule.
17935 (packgram): Save them in rule_table.
17936 * src/output.c (actions_output): New.
17937 (output_parser): Use it on `%%actions'.
17938 (output_rule_data): Don't free rule_table.
17939 (output): Do it.
17940 (prepare): Don't save the `action' muscle.
17941 * src/bison.simple: s/%%action/%%actions/.
17942
51576fb3
AD
179432001-12-15 Akim Demaille <akim@epita.fr>
17944
17945 * src/reader.c (copy_action): When --yacc, don't append a `;'
17946 to the user action: let it fail if lacking.
dee049eb 17947 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 17948
2648a72d
AD
179492001-12-14 Akim Demaille <akim@epita.fr>
17950
17951 * src/lex.c (literalchar): Simply return the char you decoded, non
17952 longer mess around with obstacks and int pointers.
17953 Adjust all callers.
17954
92790e5b
AD
179552001-12-14 Akim Demaille <akim@epita.fr>
17956
17957 * src/lex.c (literalchar): Don't escape the special characters,
17958 just decode them, and keep them as char (before, eol was output as
17959 the 2 char string `\n' etc.).
17960 * src/output.c (output_rule_data): Use quotearg to output the
17961 token strings.
17962
927c1557
PE
179632001-12-13 Paul Eggert <eggert@twinsun.com>
17964
17965 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
17966 Do not infringe on the global user namespace when using C++.
17967 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
17968 All uses of `fprintf' and `stderr' changed.
17969
17970 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
17971
ed8e1f68
AD
179722001-12-13 Akim Demaille <akim@epita.fr>
17973
17974 The computation of nullable is broken: it doesn't handle empty
17975 RHS's properly.
17976
17977 * tests/torture.at (GNU AWK Grammar): New.
17978 * tests/sets.at (Nullable): New.
17979 * src/nullable.c (set_nullable): Instead of blindly looping over
17980 `ritems', loop over the rules, and then over their rhs's.
17981
17982 Work around Autotest bugs.
17983
17984 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
17985 frame, because Autotest understand lines starting with a `+' as
17986 traces from the shell. Then, they are not processed properly.
17987 Admittedly an Autotest bug, but we don't have time to wait for
17988 Autotest to catch up.
17989 * tests/regression.at (Broken Closure): Adjust to the new table
17990 frames.
17991 Move to...
17992 * tests/sets.at: here.
17993
cb581495
AD
179942001-12-13 Akim Demaille <akim@epita.fr>
17995
17996 * src/closure.c (closure): Use nrules instead of playing tricks
17997 with BITS_PER_WORD.
17998
2e729273
AD
179992001-12-13 Akim Demaille <akim@epita.fr>
18000
18001 * src/print.c (print_actions): Output the handling of `$' as the
18002 traces do: shifting the token EOF. Before EOF was treated as a
18003 nonterminal.
18004 * tests/regression.at: Adjust some tests.
18005 * src/print_graph.c (print_core): Complete the set of items via
18006 closure. The next-to-final and final states are still unsatisfying,
18007 but that's to be addressed elsewhere.
18008 No longer output the rule numbers, but do output the state number.
18009 A single loop for the shifts + gotos is enough, but picked a
18010 distinct color for each.
18011 (print_graph): Initialize and finalize closure.
18012
107f7dfb
AD
180132001-12-13 Akim Demaille <akim@epita.fr>
18014
18015 * src/reader.c (readgram): Remove dead code, an strip useless
18016 braces.
18017 (get_type): Remove, unused.
18018
9b53a24f
AD
180192001-12-12 Akim Demaille <akim@epita.fr>
18020
18021 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
18022 on that of lib/error.c.
18023
dbfb6dcd
AD
180242001-12-12 Akim Demaille <akim@epita.fr>
18025
18026 Some hosts don't like `/' in includes.
18027
18028 * src/system.h: Include libgettext.h without qualifying the path.
18029 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
18030 $(top_srcdir).
18031
c25fb648
MA
180322001-12-11 Marc Autret <autret_m@epita.fr>
18033
18034 * src/output.c (output_parser): Remove useless muscle.
18035
710ddc4f
MA
180362001-12-11 Marc Autret <autret_m@epita.fr>
18037
18038 * src/bison.simple: Remove #line just before %%epilogue. It
18039 is now handled in ...
18040 * src/reader.c (read_additionnal_code): Add the output of a
18041 #line for the epilogue.
18042
e83d80b8
MA
180432001-12-10 Marc Autret <autret_m@epita.fr>
18044
927c1557 18045 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
18046 replace precedent remove.
18047 * src/bison.simple: Remove #line before %%prologue because
18048 %%input-line is wrong at this time.
18049
971d5158
MA
180502001-12-10 Marc Autret <autret_m@epita.fr>
18051
18052 * src/reader.c (symbols_output): Clean up.
927c1557 18053 * src/output.c (output_gram, output): Clean up.
971d5158 18054
5edafffd
AD
180552001-12-10 Akim Demaille <akim@epita.fr>
18056
18057 * src/lalr.c (initialize_lookaheads): New. Extracted from...
18058 * src/LR0.c (set_state_table): here.
18059 * src/lalr.c (lalr): Call it.
18060
0279f8e9
AD
180612001-12-10 Akim Demaille <akim@epita.fr>
18062
18063 * src/state.h (shifts): Remove the `number' member: shifts are
18064 attached to state, hence no longer need to be labelled with a
18065 state number.
18066
190c4f5f
AD
180672001-12-10 Akim Demaille <akim@epita.fr>
18068
18069 Now that states have a complete set of members, the linked list of
18070 shifts is useless: just fill directly the state's shifts member.
18071
18072 * src/state.h (shifts): Remove the `next' member.
18073 * src/LR0.c (first_state, last_state): Remove.
18074 Adjust the callers.
18075 (augment_automaton): Don't look for the shifts that must be added
18076 a shift on EOF: it is those of the state we looked for! But now,
18077 since shifts are attached, it is no longer needed to looking
18078 merely by its id: its number.
18079
2a73b93d
AD
180802001-12-10 Akim Demaille <akim@epita.fr>
18081
18082 * src/LR0.c (augment_automaton): Better variable locality.
18083 Remove an impossible branch: if there is a state corresponding to
18084 the start symbol being shifted, then there is shift for the start
18085 symbol from the initial state.
18086
74392f6a
AD
180872001-12-10 Akim Demaille <akim@epita.fr>
18088
18089 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
18090 only when appropriate: when insert_start_shifting_state' is not
18091 invoked.
18092 * tests/regression.at (Rule Line Numbers): Adjust.
18093
37c82725
AD
180942001-12-10 Akim Demaille <akim@epita.fr>
18095
18096 * src/LR0.c (augment_automaton): Now that all states have shifts,
18097 merge the two cases addition shifts to the initial state.
18098
6a164e0c
AD
180992001-12-10 Akim Demaille <akim@epita.fr>
18100
18101 * src/lalr.c (set_state_table): Move to...
18102 * src/LR0.c: here.
18103 * src/lalr.c (lalr): Don't call it...
18104 * src/LR0.c (generate_states): do it.
18105 * src/LR0.h (first_state): Remove, only the table is used.
18106
7215de24
AD
181072001-12-10 Akim Demaille <akim@epita.fr>
18108
18109 * src/LR0.h (first_shift, first_reduction): Remove.
18110 * src/lalr.c: Don't use first_shift: find shifts through the
18111 states.
18112
80e25d4d
AD
181132001-12-10 Akim Demaille <akim@epita.fr>
18114
18115 * src/LR0.c: Attach shifts to states as soon as they are
18116 computed.
18117 * src/lalr.c (set_state_table): Instead of assigning shifts to
18118 state, just assert that the mapping was properly done.
18119
0ab3728b
AD
181202001-12-10 Akim Demaille <akim@epita.fr>
18121
18122 * src/LR0.c (insert_start_shift): Rename as...
18123 (insert_start_shifting_state): this.
18124 (insert_eof_shifting_state, insert_accepting_state): New.
18125 (augment_automaton): Adjust.
18126 Better locality of the variables.
18127 When looking if the start_symbol is shifted from the initial
18128 state, using `while (... symbol != start_symbol ...)' sounds
18129 better than `while (... symbol < start_symbol ...)': If fail
18130 to see how the order between symbols could be relevant!
18131
78af9bbc
AD
181322001-12-10 Akim Demaille <akim@epita.fr>
18133
18134 * src/getargs.h: Don't declare `spec_name_prefix' and
18135 `spec_file_prefix', declared by src/files.h.
18136 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
18137 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
18138 * src/output.c (prepare): Adjust.
18139 * src/reader.c (symbols_output): Likewise.
18140 * src/vmsgetargs.c: Vaguely adjust, but who cares?
18141
bdef2a41
AD
181422001-12-10 Akim Demaille <akim@epita.fr>
18143
18144 * src/muscle_tab.c (muscle_init): NULL is a better default than
18145 `"0"'.
18146
3735969c
AD
181472001-12-10 Akim Demaille <akim@epita.fr>
18148
18149 * src/reader.c (reader): Calling symbols_output once is enough.
18150
49701457
AD
181512001-12-10 Akim Demaille <akim@epita.fr>
18152
18153 Now that states have a complete set of members, the linked list of
18154 reductions is useless: just fill directly the state's reductions
18155 member.
18156
18157 * src/state.h (struct reductions): Remove member `number' and
18158 `next'.
18159 * src/LR0.c (first_reduction, last_reduction): Remove.
18160 (save_reductions): Don't link the new reductions, store them in
18161 this_state.
18162 * src/lalr.c (set_state_table): No need to attach reductions to
18163 states, it's already done.
18164 * src/output.c (output_actions): No longer free the shifts, then
18165 the reductions, then the states: free all the states and their
18166 members.
18167
0edad749
AD
181682001-12-10 Akim Demaille <akim@epita.fr>
18169
18170 * src/options.c (OPTN, DRTV, BOTH): New.
18171 (option_table): Use them.
18172
0edad749
AD
18173 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
18174 the job of system.h.
18175 * src/options.c: Don't include stdio.h and xalloc.h for the same
18176 reasons.
18177
5449dd0f
AD
181782001-12-10 Akim Demaille <akim@epita.fr>
18179
18180 * src/output.c (output, prepare): Make sure the values of the
18181 muscles `action' and `prologue' are 0-terminated.
18182
a870c567
AD
181832001-12-10 Akim Demaille <akim@epita.fr>
18184
18185 Clean up GCC warnings.
18186
18187 * src/reader.c (copy_action): `buf' is not used.
18188 (parse_skel_decl): Be static.
18189 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
18190 * src/options.h (create_long_option_table): Have a real prototype.
18191 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
18192 (hash_delete_at): Return const void *.
18193 Adjust casts to preserve the const.
18194
80df8768
AD
181952001-12-10 Akim Demaille <akim@epita.fr>
18196
18197 * configure.in: Require 2.52g.
18198 M4 is not needed, but AUTOM4TE is.
18199 * m4/m4.m4: Remove.
18200 * tests/Makefile.am: Adjust.
18201
f693ad14
AD
182022001-12-10 Akim Demaille <akim@epita.fr>
18203
18204 One structure for states is enough, even though theoretically
18205 there are LR(0) states and LALR(1) states.
18206
18207 * src/lalr.h (state_t): Remove.
18208 (state_table): Be state_t **, not state_t *.
18209 * src/state.h (core, CORE_ALLOC): Rename as...
18210 (state_t, STATE_ALLOC): this.
18211 Add the LALR(1) members: shifts, reductions, errs.
18212 * src/LR0.c (state_table): Rename as...
18213 (state_hash): this, to avoid name clashes with the global
18214 `state_table'.
18215 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
18216 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
18217
74ffbcb6
AD
182182001-12-10 Akim Demaille <akim@epita.fr>
18219
18220 Bison dumps core on bash.y.
18221 Reported by Pascal Bart.
18222
18223 * src/warshall.c (bitmatrix_print): New.
18224 (TC): Use it.
ba0fe3c7 18225 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
74ffbcb6
AD
18226 j must be the outer loop.
18227 * tests/regression.at (Broken Closure): New.
18228
07708e19
AD
182292001-12-05 Akim Demaille <akim@epita.fr>
18230
18231 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
18232 its argument.
ba1ecc07 18233 Reported by Peter Hamorsky.
07708e19 18234
92b16366
AD
182352001-12-05 Akim Demaille <akim@epita.fr>
18236
18237 * src/conflicts.c (err_table): Remove.
18238 (resolve_sr_conflict): Adjust.
18239 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
18240 Rename as...
18241 (state_t.reductions, state_t.shifts): this.
18242
076ab033
AD
182432001-12-05 Akim Demaille <akim@epita.fr>
18244
18245 * src/reduce.c (reduce_grammar_tables): No longer disable the
18246 removal of useless rules via CPP but via `if (0)', so that the
18247 compiler still check the code is valid.
18248 For instance, it should have noticed `rline' no longer exists: use
18249 the `line' member of rule_t.
18250 * src/gram.c (dummy, rline): Remove, unused.
18251
3843c413
AD
182522001-12-05 Akim Demaille <akim@epita.fr>
18253
18254 * src/output.c (pack_vector): Use assert, not berror.
18255 * src/main.c (berror): Remove, unused.
18256
43168960
AD
182572001-12-05 Akim Demaille <akim@epita.fr>
18258
18259 New experimental feature: if --verbose --trace output all the
18260 items of a state, not only its kernel.
18261
18262 * src/print.c (print_core): If `trace_flag', then invoke closure
18263 before outputting the items of the state (print_core is no longer
18264 a correct name them).
18265 (print_results): Invoke new_closure/free_closure if needed.
18266
b2872512
AD
182672001-12-05 Akim Demaille <akim@epita.fr>
18268
18269 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
18270 * src/closure.c, src/closure.h (itemsetsize): Rename as...
18271 (nitemset): for consistency with the rest of the project.
18272
23cbcc6c
AD
182732001-12-05 Akim Demaille <akim@epita.fr>
18274
18275 * src/closure.c (print_closure): Improve.
18276 (closure): Use it for printing input and output.
18277
03ec521c
AD
182782001-12-05 Akim Demaille <akim@epita.fr>
18279
18280 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
18281 indexed by nonterminals.
18282
3a7456dd
AD
182832001-12-05 Akim Demaille <akim@epita.fr>
18284
18285 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
18286 what it was!).
18287 * src/warshall.h: Remove accidental duplication of the content.
18288
1cbcf2e7
AD
182892001-12-05 Akim Demaille <akim@epita.fr>
18290
18291 * src/closure.c (set_fderives): De-obfuscate.
18292
84182270
AD
182932001-12-05 Akim Demaille <akim@epita.fr>
18294
18295 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
18296
3f6f053c
AD
182972001-12-05 Akim Demaille <akim@epita.fr>
18298
18299 * src/closure.c (set_firsts): De-obfuscate.
18300
7a5350ba
AD
183012001-12-05 Akim Demaille <akim@epita.fr>
18302
18303 * src/output.c (action_row): De-obfuscate
18304 using the good o' techniques: arrays not pointers, variable
18305 locality, BITISSET, RESETBIT etc.
18306
d954473d
AD
183072001-12-05 Akim Demaille <akim@epita.fr>
18308
18309 Pessimize the code to simplify it: from now on, all the states
18310 have a valid SHIFTS, which NSHIFTS is possibly 0.
18311
18312 * src/LR0.c (shifts_new): Be global and move to..
18313 * src/state.c, src/state.h: here.
18314 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
18315 * src/print_graph: Adjust.
18316
9839bbe5
AD
183172001-12-05 Akim Demaille <akim@epita.fr>
18318
18319 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
18320 * src/conflicts.c: Use it.
18321 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
18322 incorrectly ``simplified''.
18323
9f136c07
AD
183242001-12-05 Akim Demaille <akim@epita.fr>
18325
18326 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
18327 using the good o' techniques: arrays not pointers, variable
18328 locality, BITISSET, RESETBIT etc.
18329
b608206e
AD
183302001-12-05 Akim Demaille <akim@epita.fr>
18331
18332 * src/state.h (SHIFT_SYMBOL): New.
18333 * src/conflicts.c: Use it to deobfuscate.
18334
52afa962
AD
183352001-12-05 Akim Demaille <akim@epita.fr>
18336
18337 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
18338 (print_reductions): De-obfuscate using the good o' techniques:
18339 arrays not pointers, variable locality, BITISSET.
18340
e74dc321
AD
183412001-12-05 Akim Demaille <akim@epita.fr>
18342
18343 * src/conflicts.c (print_reductions): Arrays, not pointers.
18344 Use BITISSET.
18345
768fca83
AD
183462001-12-05 Akim Demaille <akim@epita.fr>
18347
18348 * src/conflicts.c (print_reductions): Pessimize, but clarify.
18349
a17e599f
AD
183502001-12-05 Akim Demaille <akim@epita.fr>
18351
18352 * src/conflicts.c (print_reductions): Improve variable locality.
18353
a04bc341
AD
183542001-12-05 Akim Demaille <akim@epita.fr>
18355
18356 * src/conflicts.c (print_reductions): Pessimize, but clarify.
18357
c8ea038e
AD
183582001-12-05 Akim Demaille <akim@epita.fr>
18359
18360 * src/conflicts.c (print_reductions): Improve variable locality.
18361
aa2aab3c
AD
183622001-12-05 Akim Demaille <akim@epita.fr>
18363
18364 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
18365 * src/lalr.c: Use them.
18366
b178c8cc
AD
183672001-12-05 Akim Demaille <akim@epita.fr>
18368
18369 * src/LR0.c (augment_automaton): Formatting changes.
18370 Better variable locality.
18371
f67d13aa
AD
183722001-12-05 Akim Demaille <akim@epita.fr>
18373
18374 * src/lalr.c (matrix_print): New.
18375 (transpose): Use it.
18376 Use arrays instead of pointers.
18377
c2713865
AD
183782001-12-05 Akim Demaille <akim@epita.fr>
18379
18380 * src/lalr.c (maxrhs): Move to...
18381 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
18382 * src/lalr.c (build_relations): Adjust.
18383
9887c18a
AD
183842001-12-05 Akim Demaille <akim@epita.fr>
18385
18386 * src/lalr.c (transpose): Free the memory allocated to the
18387 argument, as it is replaced by the results by the unique caller.
18388 (build_relations): Merely invoke transpose: it handles the memory
18389 deallocation.
18390 Improve variable locality.
18391 Avoid variables used as mere abbreviations.
18392 (compute_lookaheads): Use arrays instead of pointers.
18393
4d4f699c
AD
183942001-12-05 Akim Demaille <akim@epita.fr>
18395
18396 * src/lalr.c (initialize_F): Improve variable locality.
18397 Avoid variables used as mere abbreviations.
18398
80a69750
AD
183992001-12-05 Akim Demaille <akim@epita.fr>
18400
18401 * src/derives.c (print_derives): Display the ruleno.
18402 * src/lalr.c (initialize_F, transpose): Better variable locality
18403 to improve readability.
18404 Avoid variables used as mere abbreviations.
18405
fe961097
AD
184062001-12-05 Akim Demaille <akim@epita.fr>
18407
18408 * src/lalr.c (traverse): Use arrays instead of pointers.
18409
e3e4e814
AD
184102001-12-05 Akim Demaille <akim@epita.fr>
18411
18412 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
18413 the handling of squeue.
18414 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
18415
630e182b
AD
184162001-12-05 Akim Demaille <akim@epita.fr>
18417
18418 Because useless nonterminals are now kept alive (instead of being
18419 `destroyed'), we now sometimes examine them, and store information
18420 related to them. Hence we need to know their number, and adjust
18421 memory allocations.
18422
18423 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
18424 static.
18425 * src/LR0.c (allocate_itemsets): The memory allocated to
18426 `symbol_count' was used for two different purpose: once to count
18427 the number of occurrences of each symbol, and later reassigned to
18428 `shift_symbol', containing the symbol that can be shifted from a
18429 given state.
18430 Deobfuscate, i.e., allocate, use and free `symbol_count' here
18431 only, and...
18432 (new_itemsets): Allocate `shift_symbol' here.
18433 (allocate_itemsets): symbol_count includes useless nonterminals.
18434 Make room for them.
18435 (free_storage): Use `free', not `XFREE', for pointers that cannot
18436 be null.
18437
81b51460
AD
184382001-12-05 Akim Demaille <akim@epita.fr>
18439
18440 * src/nullable.c (set_nullable): Deobfuscate the handling of
18441 ritem.
18442 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
18443
3067fbef
AD
184442001-12-05 Akim Demaille <akim@epita.fr>
18445
18446 * src/gram.c, src/gram.h (ritem_print): New.
18447 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
18448 (This useless function was defined only to work around VMS linkers
18449 that can't handle compilation units with variables only).
18450 * src/reduce.c (dump_grammar): Use it to trace the construction of
18451 ritem.
18452
c2bea5f9
PE
184532001-12-04 Paul Eggert <eggert@twinsun.com>
18454
7d27c823
PE
18455 * src/bison.simple (union yyalloc): Change member names
18456 to be the same as the stack names.
18457 (yyparse): yyptr is now union yyalloc *, not char *.
18458 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
18459 and may generate better code on some machines.
c2bea5f9
PE
18460 (yystpcpy): Use prototype if __STDC__ is defined, not just
18461 if __cplusplus is defined.
35687a9d 18462
2c8a9dfa
AD
184632001-11-30 Akim Demaille <akim@epita.fr>
18464
18465 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
18466 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
18467 Gettext doesn't compile cleanly, and dies with -Werror.
18468 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
18469 Include WARNING_CFLAGS here.
18470 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
18471 before being defined.
18472
f4e421e6
AD
184732001-11-27 Paul Eggert <eggert@twinsun.com>
18474
18475 * lib/quotearg.h (quotearg_n, quotearg_n_style):
18476 First arg is int, not unsigned.
18477 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
18478 (SIZE_MAX, UINT_MAX): New macros.
18479 (quotearg_n_options): Abort if N is negative.
18480 Avoid overflow check on hosts where size_t is 64 bits and int
18481 is 32 bits, as overflow is impossible there.
18482 Fix off-by-one typo that caused unnecessary reallocation.
18483
7093d0f5
AD
184842001-11-29 Paul Eggert <eggert@twinsun.com>
18485
18486 Name space cleanup in generated parser.
18487
18488 * doc/bison.texinfo (Bison Parser): Discuss system headers
18489 and their effect on the user name space.
18490
18491 * src/bison.simple:
18492 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
18493 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
18494 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
18495
18496 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
18497 on user names when possible.
18498
18499 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
18500 Simplify test for whather <alloca.h> exists.
18501
18502 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
18503
18504 (<stdio.h>): Include if YYDEBUG.
18505
18506 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
18507 ! defined (yyoverflow) && ! defined (yymemcpy).
18508
18509 (yymemcpy, yyparse): Rename local variables as needed so that
18510 they all begin with 'yy'.
18511
18512 (yystrlen, yystpcpy): New functions.
18513
18514 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
18515 All uses changed.
18516
18517 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
18518 instead of relying on string.h functions. Use YYSTACK_ALLOC
18519 and YYSTACK_FREE instead of malloc and free.
18520
fd51e5ff
AD
185212001-11-30 Akim Demaille <akim@epita.fr>
18522
18523 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
18524 before their first uses.
18525 (YYBISON, YYPURE): Move to the top of the output.
18526
7d13ff5f
AD
185272001-11-30 Akim Demaille <akim@epita.fr>
18528
18529 * tests/reduce.at (Useless Nonterminals): Fix.
18530
892a3995
AD
185312001-11-30 Akim Demaille <akim@epita.fr>
18532
18533 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
18534 if body instead of `;' to pacify GCC's warnings.
18535
68f1e3ed
AD
185362001-11-30 Akim Demaille <akim@epita.fr>
18537
18538 Instead of mapping the LHS of unused rules to -1, keep the LHS
18539 valid, but flag the rules as invalid.
18540
18541 * src/gram.h (rule_t): `useful' is a new member.
18542 * src/print.c (print_grammar): Adjust.
18543 * src/derives.c (set_derives): Likewise.
18544 * src/reader.c (packgram, reduce_output): Likewise.
18545 * src/reduce.c (reduce_grammar_tables): Likewise.
18546 * tests/reduce.at (Underivable Rules, Useless Rules): New.
18547
d2d1b42b
AD
185482001-11-30 Akim Demaille <akim@epita.fr>
18549
18550 * src/reduce.c (reduce_output): Formatting changes.
18551 * src/print.c (print_results, print_grammar): Likewise.
18552 * tests/regression.at (Rule Line Numbers)
18553 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
18554
760b53a8
AD
185552001-11-30 Akim Demaille <akim@epita.fr>
18556
18557 * src/reduce.c (nonterminals_reduce): Instead of throwing away
18558 useless nonterminals, move them at the end of the symbol arrays.
18559 (reduce_output): Adjust.
18560 * tests/reduce.at (Useless Nonterminals): Adjust.
18561
00238958
AD
185622001-11-30 Akim Demaille <akim@epita.fr>
18563
18564 * src/reduce.c: Various comment/formatting changes.
18565 (nonterminals_reduce): New, extracted from...
18566 (reduce_grammar_tables): here.
18567 (reduce_grammar): Call nonterminals_reduce.
18568
396452de
PE
185692001-11-29 Paul Eggert <eggert@twinsun.com>
18570
18571 * src/bison.simple (YYSTACK_REALLOC): Remove.
18572 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
18573 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
18574 New macros.
18575 (union yyalloc): New type.
18576 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
18577 an arbitrary restriction on hosts where size_t is wider than int.
18578
18579 (yyparse): Don't dump core if alloca or malloc fails; instead, report
18580 a parser stack overflow. Allocate just one block of memory for all
18581 three stacks, instead of allocating three blocks; this typically is
18582 faster and reduces fragmentation.
18583
18584 Do not limit the number of items in the stack to a value that fits
18585 in 'int', as this is an arbitrary limit on hosts with 64-bit
18586 size_t and 32-bit int.
18587
147e184c
MA
185882001-11-29 Marc Autret <autret_m@epita.fr>
18589
18590 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
18591 of defining YYERROR_VERBOSE.
18592 [AT_DATA]: $4 is now out of C declarations in the prologue.
18593
426cf563
MA
185942001-11-28 Marc Autret <autret_m@epita.fr>
18595
18596 * src/reader.c (parse_dquoted_param): New.
18597 (parse_skel_decl): Use it.
18598 * src/lex.h: Add its prototype.
18599 * src/lex.c (literalchar): Become not static.
18600
c7925b99
MA
186012001-11-28 Marc Autret <autret_m@epita.fr>
18602
18603 * src/output.h: And put its extern declaration here.
18604 * src/output.c (error_verbose): Define here.
18605 (prepare): Echo name modification.
18606 * src/getargs.h: Clean its extern declaration.
18607 * src/getargs.c (error_verbose_flag): Remove.
18608 (getargs): Remove case 'e'.
18609 * src/options.c (option_table): 'error-verbose' is now seen as simple
18610 percent option.
18611 Include output.h.
18612
18613 * src/reader.c (read_declarations): Remove case tok_include.
18614 (parse_include_decl): Remove.
18615 * src/lex.h (token_t): Remove tok_include.
18616 * src/options.c (option_table): 'include' is now a simple command line
18617 option.
18618
5b5d1929
MA
186192001-11-28 Marc Autret <autret_m@epita.fr>
18620
18621 * src/bison.simple: Adjust muscle names.
18622 * src/muscle_tab.c (muscle_init): Also rename the muscles.
18623 * src/output.c (prepare): s/_/-/ for the muscles names.
18624 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
18625
8850be4b
MA
186262001-11-28 Marc Autret <autret_m@epita.fr>
18627
18628 * src/bison.simple: Fix debug.
18629 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
18630
4a38e613
AD
186312001-11-28 Akim Demaille <akim@epita.fr>
18632
18633 * src/LR0.c (shifts_new): New.
18634 (save_shifts, insert_start_shift, augment_automaton): Use it.
18635
4b35e1c1
AD
186362001-11-28 Akim Demaille <akim@epita.fr>
18637
18638 * src/closure.c (closure): `b' and `ruleno' denote the same value:
18639 keep ruleno only.
18640
d2b04478
AD
186412001-11-28 Akim Demaille <akim@epita.fr>
18642
18643 * src/closure.c (closure): Instead of looping over word in array
18644 then bits in words, loop over bits in array.
18645
2c4c30aa
AD
186462001-11-28 Akim Demaille <akim@epita.fr>
18647
18648 * src/closure.c (closure): No longer optimize the special case
18649 where all the bits of `ruleset[r]' are set to 0, to make the code
18650 clearer.
18651
576890b7
AD
186522001-11-28 Akim Demaille <akim@epita.fr>
18653
18654 * src/closure.c (closure): `r' and `c' are new variables, used to
18655 de-obfuscate accesses to RULESET and CORE.
18656
cb487d7d
AD
186572001-11-28 Akim Demaille <akim@epita.fr>
18658
18659 * src/reduce.c (reduce_print): Use ngettext.
18660 (dump_grammar): Improve the trace accuracy.
18661
6013d43f
AD
186622001-11-28 Akim Demaille <akim@epita.fr>
18663
18664 * src/reduce.c (dump_grammar): Don't translate trace messages.
18665
cb4956ee
AD
186662001-11-28 Akim Demaille <akim@epita.fr>
18667
18668 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
18669 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
18670 as all tags are free'ed afterwards.
18671 From Enrico Scholz.
18672
648185ab
PE
186732001-11-27 Paul Eggert <eggert@twinsun.com>
18674
18675 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
18676 use alloca when we didn't want to, and vice versa.
18677
68254a03
MA
186782001-11-27 Marc Autret <autret_m@epita.fr>
18679
9113b58f
AD
18680 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
18681 initialization.
68254a03
MA
18682 * src/output.c (prepare): Remove its update.
18683
04d843a2
MA
186842001-11-27 Marc Autret <autret_m@epita.fr>
18685
18686 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
18687 Use %error-verbose.
18688
d2079671 186892001-11-27 Marc Autret <autret_m@epita.fr>
eeeb962b
MA
18690
18691 * src/bison.simple: Remove YYERROR_VERBOSE using.
18692 Use %%error_verbose.
18693 (yyparse): Likewise.
18694 * src/output.c (prepare): Give its final value.
18695 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
18696 * src/getargs.h: Add its extern declaration.
18697 * src/getargs.c (error_verbose_flag): New int.
18698 (getargs): Update to catch new case.
18699 * src/options.c (option_table): 'error-verbose' is a new option.
18700 (shortopts): Update.
18701
e0327bc8
AD
187022001-11-27 Akim Demaille <akim@epita.fr>
18703
18704 * src/system.h: Use intl/libgettext.h.
18705 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
18706
000f1a3c
AD
187072001-11-27 Akim Demaille <akim@epita.fr>
18708
18709 * tests/torture.at (Exploding the Stack Size with Malloc):
18710 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
18711
26cfe0be
AD
187122001-11-27 Akim Demaille <akim@epita.fr>
18713
18714 * src/files.c: Include error.h.
18715 Reported by Hans Aberg.
18716
f6bd5427
MA
187172001-11-26 Marc Autret <autret_m@epita.fr>
18718
d2079671 18719 * src/reader.c (parse_include_decl): New, not yet implemented.
f6bd5427
MA
18720 (read_declarations): Add case tok_include.
18721 * src/getargs.h (include): Add its extern definition.
18722 * src/getargs.c (include): New const char *.
18723 (getargs): Add case '-I'.
18724 * src/options.c (option_table): Add include as command line and
18725 percent option.
18726 * src/lex.h (token_t): Add tok_include.
18727
2ca209c1
AD
187282001-11-26 Akim Demaille <akim@epita.fr>
18729
18730 * src/reader.c (readgram): Make sure rules for mid-rule actions
18731 have a lineno equal to that of their host rule.
18732 Reported by Hans Aberg.
18733 * tests/regression.at (Rule Line Numbers): New.
18734
0e41b407
AD
187352001-11-26 Akim Demaille <akim@epita.fr>
18736
18737 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
18738 size_ts.
18739
187402001-11-26 Akim Demaille <akim@epita.fr>
18741
18742 * src/complain.c, src/complain.h (error): Remove, provided by
18743 lib/error.[ch].
18744
e0c40012
AD
187452001-11-26 Akim Demaille <akim@epita.fr>
18746
18747 * src/reader.c (read_declarations): Don't abort on tok_illegal,
18748 issue an error message.
18749 * tests/regression.at (Invalid %directive): New.
18750 Reported by Hans Aberg.
18751
5e147124
AD
187522001-11-26 Akim Demaille <akim@epita.fr>
18753
18754 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
18755 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
18756
a034c8b8
AD
187572001-11-26 Akim Demaille <akim@epita.fr>
18758
18759 * src/conflicts.c (conflicts_print): Don't complain at all when
18760 there are no reduce/reduce conflicts, and as many shift/reduce
18761 conflicts as expected.
18762 * tests/regression.at (%expect right): Adjust.
18763
c64a20f3
AD
187642001-11-23 Akim Demaille <akim@epita.fr>
18765
18766 * lib/alloca.c: Update, from fileutils.
18767
5b0d29bb
AD
187682001-11-23 Akim Demaille <akim@epita.fr>
18769
18770 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
18771
722c4bfe
AD
187722001-11-23 Akim Demaille <akim@epita.fr>
18773
18774 * src/system.h: Include alloca.h.
18775 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
18776
6255b435
AD
187772001-11-23 Akim Demaille <akim@epita.fr>
18778
18779 * src/print_graph.c (print_actions): Remove `rule', unused.
18780 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
18781 pacify GCC's signed < unsigned warnings.
18782 * src/closure.c (itemsetsize): Likewise.
18783 * src/reader.c (symbol_list_new): Static.
18784
b29b2ed5
AD
187852001-11-23 Akim Demaille <akim@epita.fr>
18786
18787 Attaching lineno to buckets is stupid, since only one copy of each
18788 symbol is kept, only the line of the first occurrence is kept too.
18789
18790 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
18791 * src/reader.c (rline_allocated): Remove, unused.
18792 (symbol_list): Have a `line' member.
18793 (symbol_list_new): New.
18794 (readgram): Use it.
18795 * src/print.c (print_grammar): Output the rule line numbers.
18796 * tests/regression.at (Solved SR Conflicts)
18797 (Unresolved SR Conflicts): Adjust.
18798 Reported by Hans Aberg.
18799
a81b1d4a
MA
188002001-11-22 Marc Autret <autret_m@epita.fr>
18801
18802 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
18803
c1ecb3c1
MA
188042001-11-22 Marc Autret <autret_m@epita.fr>
18805
18806 * src/muscle_tab.c (muscle_init): Remove initialization of
18807 skeleton muscle.
18808 * src/output.c (output_master_parser): Do it here.
18809
fbe01355
AD
188102001-11-20 Akim Demaille <akim@epita.fr>
18811
18812 * po/sv.po: New.
18813 * configure.in (ALL_LINGUAS): Adjust.
18814 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
18815 longer contains strings to translate.
18816
81e895c0
AD
188172001-11-19 Akim Demaille <akim@epita.fr>
18818
18819 * src/conflicts.c (conflicts_print): Add a missing \n.
18820
6bb1878b
AD
188212001-11-19 Akim Demaille <akim@epita.fr>
18822
18823 * src/nullable.c (nullable_print): New.
18824 (set_nullable): Call it when tracing.
18825 Better locality of variables.
18826
d9ec2d07
AD
188272001-11-19 Akim Demaille <akim@epita.fr>
18828
18829 * src/print.c (print_actions): Better locality of variables.
18830
720e5c1b
AD
188312001-11-19 Akim Demaille <akim@epita.fr>
18832
18833 * src/derives.c (print_derives): Fix and enrich.
18834 * src/closure.c (print_fderives): Likewise.
18835
fb908786
AD
188362001-11-19 Akim Demaille <akim@epita.fr>
18837
18838 * src/closure.c (itemsetend): Remove, replaced with...
18839 (itemsetsize): new.
18840
125ecb56
AD
188412001-11-19 Akim Demaille <akim@epita.fr>
18842
18843 * src/LR0.c (kernel_end): Remove, replaced with...
18844 (kernel_size): new.
18845
d8cf039f
AD
188462001-11-19 Akim Demaille <akim@epita.fr>
18847
18848 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
18849 to clarify.
18850
7bec0760
AD
188512001-11-19 Akim Demaille <akim@epita.fr>
18852
18853 * src/closure.c (closure): Use arrays instead of pointers to clarify.
18854
c87d4863
AD
188552001-11-19 Akim Demaille <akim@epita.fr>
18856
18857 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
18858 trace messages.
18859 * src/LR0.c: Likewise.
18860 (allocate_itemsets): Use arrays instead of pointers to clarify.
18861
9bfe901c
AD
188622001-11-19 Akim Demaille <akim@epita.fr>
18863
18864 * src/getargs.c (statistics_flag): Replace with...
18865 (trace_flag): New.
18866 (longopts): Accept --trace instead of --statistics.
18867 * src/getargs.h, src/options.c: Adjust.
18868 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
18869 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
18870
97db7bd4
AD
188712001-11-19 Akim Demaille <akim@epita.fr>
18872
cc72668c 18873 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
97db7bd4
AD
18874 pointers to clarify the code.
18875 (save_reductions, save_shifts): Factor common parts of alternatives.
18876
2c5f66ed
AD
188772001-11-19 Akim Demaille <akim@epita.fr>
18878
18879 * src/LR0.c (new_state, get_state): Complete TRACE code.
18880 * src/closure.c: Include `reader.h' to get `tags', needed by the
18881 trace code.
18882 Rename the conditional DEBUG as TRACE.
18883 Output consistently TRACEs to stderr, not stdout.
18884 * src/derives.c: Likewise.
18885 * src/reduce.c: (inaccessable_symbols): Using if is better style
18886 than goto.
18887 Use `#if TRACE' instead of `#if 0' for tracing code.
18888
300f275f
AD
188892001-11-19 Akim Demaille <akim@epita.fr>
18890
18891 * src/system.h (LIST_FREE, shortcpy): New.
18892 * src/LR0.c: Use them.
18893 * src/output.c (free_itemsets, free_reductions, free_shifts):
18894 Remove, replaced by LIST_FREE.
18895
f59c437a
AD
188962001-11-19 Akim Demaille <akim@epita.fr>
18897
18898 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
18899 (REDUCTIONS_ALLOC): New.
18900 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
18901 allocation.
18902
6986fd9e
AD
189032001-11-19 Akim Demaille <akim@epita.fr>
18904
18905 * src/LR0.c (new_state): Complete trace code.
18906 * src/nullable.c (set_nullable): Don't translate traces.
18907
4bc30f78
AD
189082001-11-19 Akim Demaille <akim@epita.fr>
18909
18910 * src/print_graph.c (print_core): Better locality of variables.
18911 * src/print.c (print_core): Likewise.
18912
08a946e0
AD
189132001-11-19 Akim Demaille <akim@epita.fr>
18914
18915 * src/vcg.c: You do the output, so you are responsible of the
18916 handling of VCG syntax, in particular: use quotearg.
18917 * src/print_graph.c: Don't.
18918 (print_actions): Don't output the actions as part of the nodes,
18919 since that's the job of the edges.
18920 (print_state): Don't output by hand: fill the node description,
9bfe901c 18921 and ask for its output.
08a946e0 18922
f0473484
AD
189232001-11-19 Akim Demaille <akim@epita.fr>
18924
cc72668c
AD
18925 * src/bison.simple (yyparse): When verbosely reporting an error,
18926 no longer put additional quotes around token names.
f0473484
AD
18927 * tests/calc.at: Adjust.
18928
e41dc700
AD
189292001-11-19 Akim Demaille <akim@epita.fr>
18930
18931 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
18932 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
18933 * src/output.c: Adjust.
18934
652a871c
AD
189352001-11-19 Akim Demaille <akim@epita.fr>
18936
18937 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
18938 (rule_t): this.
18939 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
18940
b2ed6e58
AD
189412001-11-19 Akim Demaille <akim@epita.fr>
18942
18943 * src/gram.h (rule_t): New.
18944 (rule_table): New.
18945 (rrhs, rlhs): Remove, part of state_t.
18946 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
18947 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
18948 * src/reader.c, src/reduce.c: Adjust.
18949
edad7067
AD
189502001-11-19 Akim Demaille <akim@epita.fr>
18951
18952 * src/reader.c (symbols_output): New, extracted from...
18953 (packsymbols): Here.
18954 (reader): Call it.
18955
3feec034
AD
189562001-11-19 Akim Demaille <akim@epita.fr>
18957
18958 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
18959 (maxrhs): this new function.
18960
ddcd5fdf
AD
189612001-11-19 Akim Demaille <akim@epita.fr>
18962
cc72668c 18963 * src/lalr.c (F): New macro to access the variable F.
ddcd5fdf
AD
18964 Adjust.
18965
bb527fc2
AD
189662001-11-19 Akim Demaille <akim@epita.fr>
18967
cc72668c 18968 * src/lalr.h (LA): New macro to access the variable LA.
bb527fc2
AD
18969 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
18970 * src/lalr.c: Adjust.
18971
a845a697
AD
189722001-11-19 Akim Demaille <akim@epita.fr>
18973
18974 * src/lalr.c (initialize_LA): Only initialize LA. Let...
18975 (set_state_table): handle the `lookaheads' members.
18976
f004bf6a
AD
189772001-11-19 Akim Demaille <akim@epita.fr>
18978
cc72668c
AD
18979 * src/lalr.h (lookaheads): Removed array, whose contents is now
18980 a member of...
f004bf6a
AD
18981 (state_t): this structure.
18982 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
18983 Adjust.
18984
de326cc0
AD
189852001-11-19 Akim Demaille <akim@epita.fr>
18986
cc72668c
AD
18987 * src/lalr.h (consistent): Removed array, whose contents is now
18988 a member of...
de326cc0
AD
18989 (state_t): this structure.
18990 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
18991 Adjust.
18992
90b4416b
AD
189932001-11-19 Akim Demaille <akim@epita.fr>
18994
cc72668c
AD
18995 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
18996 contents are now members of...
90b4416b
AD
18997 (state_t): this structure.
18998 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
18999 Adjust.
19000
9703cc49
AD
190012001-11-19 Akim Demaille <akim@epita.fr>
19002
19003 * src/lalr.h (state_t): New.
19004 (state_table): Be a state_t * instead of a core **.
19005 (accessing_symbol): Remove, part of state_t.
19006 * src/lalr.c: Adjust.
19007 (set_accessing_symbol): Merge into...
19008 (set_state_table): this.
19009 * src/print_graph.c, src/conflicts.c: Adjust.
19010
d803322e
AD
190112001-11-14 Akim Demaille <akim@epita.fr>
19012
19013 * tests/calc.at, tests/output.at, tests/regression.at,
19014 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
19015 now the tests are run in private dirs, therefore AC_CLEANUP and
19016 family can be simplified to 0-ary.
19017 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
19018 use abs. path to find config.h.
19019 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
19020 stderr, there can be way too much random noise.
19021 Instead pass -Werror to GCC and rely on the exit status.
19022 Reported by Wolfram Wagner.
19023
3d76b07d
AD
190242001-11-14 Akim Demaille <akim@epita.fr>
19025
19026 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
19027 defined only if yyoverflow is defined, to avoid `warning: unused
19028 variable `yyvs1''.
19029 Reported by The Test Suite.
19030
09b503c8
AD
190312001-11-14 Akim Demaille <akim@epita.fr>
19032
19033 * src/print.c: Include reduce.h.
19034 Reported by Hans Aberg.
19035
190362001-11-14 Akim Demaille <akim@epita.fr>
19037
19038 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
19039 Revert a previous patch: these are really const.
19040 * src/conflicts.c (conflict_report): Additional useless pair of
19041 braces to pacify GCC's warnings for `if () if () {} else {}'.
19042 * src/lex.c (parse_percent_token): Replace equal_offset with
19043 arg_offset.
19044 arg is const.
19045 Be sure to strdup `arg' when used, since there is no reason for
19046 token_buffer not to change.
19047
0f37a994
AD
190482001-11-14 Akim Demaille <akim@epita.fr>
19049
19050 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
19051 definition.
19052 * src/main.c (main): Use them.
19053 Suggested by Hans Aberg.
19054
d39d93b8
AD
190552001-11-12 Akim Demaille <akim@epita.fr>
19056
19057 * src/system.h (ngettext): Now that we use ngettext, be sure to
19058 provide a default definition when NLS are not used.
19059
9edcd895
AD
190602001-11-12 Akim Demaille <akim@epita.fr>
19061
19062 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
19063 Use @kbd to denote user input.
19064 (Language and Grammar): ANSIfy the example.
19065 Adjust its layout for info/notinfo.
19066 (Location Tracking Calc): Output error messages to stderr.
19067 Output locations in a more GNUtically correct way.
19068 Fix a couple of Englishos.
19069 Adjust @group/@end group pairs.
19070
7da99ede
AD
190712001-11-12 Akim Demaille <akim@epita.fr>
19072
e3aa65c5 19073 %expect was not functioning at all.
7da99ede
AD
19074
19075 * src/conflicts.c (expected_conflicts): Set to -1.
19076 (conflict_report): Use ngettext.
19077 (conflicts_print): Check %expect and make its violation an error.
19078 * doc/bison.texinfo (Expect Decl): Adjust.
19079 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
19080 * tests/regression.at (%expect not enough, %expect right)
19081 (%expect too much): New.
19082
ba9dda1a
AD
190832001-11-12 Akim Demaille <akim@epita.fr>
19084
19085 * tests/regression.at (Conflicts): Rename as...
19086 (Unresolved SR Conflicts): this.
19087 (Solved SR Conflicts): New.
19088
337c5bd1
AD
190892001-11-12 Akim Demaille <akim@epita.fr>
19090
19091 * src/reduce.c (print_results): Rename as...
19092 (reduce_output): This.
19093 Output to OUT, passed as argument, instead of output_obstack.
19094 (dump_grammar): Likewise.
19095 (reduce_free): New.
19096 Also free V1.
19097 (reduce_grammar): No longer call reduce_output, since...
19098 * src/print.c (print_results): do it.
19099 * src/main.c (main): Call reduce_free;
19100
c73a41af
AD
191012001-11-12 Akim Demaille <akim@epita.fr>
19102
19103 * src/conflicts.c (print_reductions): Accept OUT as argument.
19104 Output to it, not to output_obstack.
19105 * src/print.c (print_actions): Adjust.
19106
0df87bb6
AD
191072001-11-12 Akim Demaille <akim@epita.fr>
19108
19109 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
19110 the result instead of using...
19111 (src_total, rrc_total, src_count, rrc_count): Remove.
19112 (any_conflicts): Remove.
19113 (print_conflicts): Split into...
19114 (conflicts_print, conflicts_output): New.
19115 * src/conflicts.h: Adjust.
19116 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
0f37a994 19117 * src/print.c (print_grammar): Issue `\n' between two rules.
0df87bb6
AD
19118 * tests/regression.at (Conflicts): New.
19119 Reported by Tom Lane.
19120
e4d3d4de
AD
191212001-11-12 Akim Demaille <akim@epita.fr>
19122
19123 * tests/regression.at (Invalid input): Remove, duplicate with
19124 ``Invalid input: 1''.
19125
6d7d248e
AD
191262001-11-12 Akim Demaille <akim@epita.fr>
19127
19128 * tests/torture.at (AT_DATA_STACK_TORTURE)
19129 (Exploding the Stack Size with Alloca)
19130 (Exploding the Stack Size with Malloc): New.
19131
e9e4c321
AD
191322001-11-12 Akim Demaille <akim@epita.fr>
19133
19134 * src/bison.simple (YYSTACK_REALLOC): New.
19135 (yyparse) [!yyoverflow]: Use it and free the old stack.
0f37a994 19136 Reported by Per Allansson.
e9e4c321 19137
5f7e0832
AD
191382001-11-12 Pascal Bart <pascal.bart@epita.fr>
19139
19140 * src/bison.simple: Define type yystype instead of YYSTYPE, and
19141 define CPP macro, which substitute YYSTYPE by yystype.
19142 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
19143 with yyltype/YYLTYPE. This allows inclusion of the generated
19144 header within the parser if the compiler, such as GGC, accepts
19145 multiple equivalent #defines.
19146 From Akim.
19147
e3f1699f
AD
191482001-11-05 Akim Demaille <akim@epita.fr>
19149
19150 * src/reader.c (symbols_output): New, extracted from...
19151 (packsymbols): here.
19152 (reader): Adjust.
19153
65be0866
AD
191542001-11-05 Akim Demaille <akim@epita.fr>
19155
19156 * src/lex.c (parse_percent_token): s/quotearg/quote/.
19157
e4d910bf
AD
191582001-11-05 Akim Demaille <akim@epita.fr>
19159
19160 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
19161 pattern.
19162
951366c1
AD
191632001-11-05 Akim Demaille <akim@epita.fr>
19164
19165 * src/options.h (struct option_table_struct): set_flags is void*.
19166 * src/options.c (longopts): Support `--output' and `%output'.
19167 (usage): Adjust.
19168 * src/lex.h (tok_setopt): Remove, replaced with...
19169 (tok_intopt, tok_stropt): these new guys.
19170 * src/lex.c (getopt.h): Not needed.
19171 (token_buffer, unlexed_token_buffer): Not const.
19172 (percent_table): Promote `-' over `_' in directive names.
19173 Active `%name-prefix', `file-prefix', and `output'.
19174 (parse_percent_token): Accept possible arguments to directives.
19175 Promote `-' over `_' in directive names.
19176
d8988b2f
AD
191772001-11-04 Akim Demaille <akim@epita.fr>
19178
19179 * doc/bison.texinfo (Decl Summary): Split the list into
19180 `directives for grammars' and `directives for bison'.
19181 Sort'em.
19182 Add description of `%name-prefix', `file-prefix', and `output'.
19183 Promote `-' over `_' in directive names.
19184 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
19185 Simplify the description of `--name-prefix'.
19186 Promote `-' over `_' in directive names.
19187 Promote `--output' over `--output-file'.
19188 Fix the description of `--defines'.
19189 * tests/output.at: Exercise %file-prefix and %output.
19190
6468d18e
AD
191912001-11-02 Akim Demaille <akim@epita.fr>
19192
19193 * doc/refcard.tex: Update.
19194
6b7e85b9
AD
191952001-11-02 Akim Demaille <akim@epita.fr>
19196
19197 * src/symtab.h (SUNDEF): New.
19198 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
19199 stand for `uninitialized', instead of 0.
19200 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
19201 * src/lex.c (lex): Adjust.
19202
19203 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
19204 Number it 0.
19205 Let yylex return it instead of a plain 0.
19206 Reported by Dick Streefland.
19207
cd5aafcf
AD
192082001-11-02 Akim Demaille <akim@epita.fr>
19209
19210 * tests/regression.at (Mixing %token styles): New test.
19211
037ca2f1
AD
192122001-11-02 Akim Demaille <akim@epita.fr>
19213
19214 * src/reader.c (parse_thong_decl): Formatting changes.
19215 (token_translations_init): New, extracted from...
19216 (packsymbols): Here.
19217 Adjust.
19218
270a173c
AD
192192001-11-01 Akim Demaille <akim@epita.fr>
19220
19221 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
19222 Check that `9foo.y' produces correct cpp guards.
19223 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
19224 guards.
19225 Reported by Wwp.
19226
561f9a30
AD
192272001-11-01 Akim Demaille <akim@epita.fr>
19228
19229 * tests/regression.at (Invalid input: 2): New.
19230 * src/lex.c (unlexed_token_buffer): New.
19231 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
19232 too.
19233 Reported by Wwp.
19234
f987e9d2
AD
192352001-11-01 Akim Demaille <akim@epita.fr>
19236
19237 * tests/calc.at: Catch up with 1.30.
19238 * configure.in: Bump to 1.49a.
19239 Adjust to newer Autotest.
19240
0846f581
PB
192412001-10-19 Pascal Bart <pascal.bart@epita.fr>
19242
19243 * src/conflicts.c: Move global variables rrc_total and src_total ...
19244 (print_conflicts): here.
19245 * src/output.c (output): Free global variable user_toknums.
19246 * src/lex.c (token_obstack): Become static.
19247
3c1a79b3
AD
192482001-10-18 Akim Demaille <akim@epita.fr>
19249
19250 * tests/atlocal.in (GCC): Add.
19251 * tests/calc.at: s/m4_match/m4_bmatch/.
19252 s/m4_patsubst/m4_bpatsubst/.
19253 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
19254 * configure.in: AC_SUBST(GCC).
19255
5d52e7d0
MA
192562001-10-14 Marc Autret <autret_m@epita.fr>
19257
19258 * src/options.c (create_long_option_table): Fix.
19259
631aa1d3
AD
192602001-10-10 Akim Demaille <akim@epita.fr>
19261
19262 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
19263
f6ec6d13
AD
192642001-10-04 Akim Demaille <akim@epita.fr>
19265
19266 * src/reader.c (parse_union_decl): Push the caracters in
19267 union_obstack, not attrs_obstack.
19268
342b8b6e
AD
192692001-10-04 Akim Demaille <akim@epita.fr>
19270
19271 Merge in the branch 1.29.
19272
19273 * src/reader.c (packsymbols): Use a temporary obstack for
19274 `%%tokendef', since output_stack is already used elsewhere.
19275
19276 2001-10-02 Akim Demaille <akim@epita.fr>
19277
19278 Bump 1.29d.
19279
19280 2001-10-02 Akim Demaille <akim@epita.fr>
19281
19282 Version 1.29c.
19283
19284 2001-10-02 Akim Demaille <akim@epita.fr>
19285
19286 * tests/regression.at (Invalid CPP headers): New.
19287 From Alexander Belopolsky.
19288 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
19289
19290 2001-10-02 Akim Demaille <akim@epita.fr>
19291
19292 * tests/regression.at (Invalid input): New.
19293 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
19294 Reported by Shura.
19295
19296 2001-10-02 Akim Demaille <akim@epita.fr>
19297
19298 * tests/calc.at: Now that --debug works, the tests must be adjusted.
19299
19300 2001-10-02 Akim Demaille <akim@epita.fr>
19301
19302 * src/output.c (output_parser): Assert `skeleton'.
19303 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
19304 systems.
19305 From Shura.
19306
19307 2001-10-01 Marc Autret <autret_m@epita.fr>
19308
19309 * src/lex.h: Echo modifications.
19310 * src/lex.c (unlex): Parameter is now token_t.
19311 From Hans Aberg.
19312
19313 2001-10-01 Marc Autret <autret_m@epita.fr>
19314
19315 * src/main.c: Include lex.h.
19316 From Hans Aberg.
19317
19318 2001-09-29 Akim Demaille <akim@epita.fr>
19319
19320 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
19321
19322 2001-09-28 Akim Demaille <akim@epita.fr>
19323
19324 * tests/testsuite.at: Update to newer Autotest.
19325 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
19326
19327 2001-09-27 Akim Demaille <akim@epita.fr>
19328
19329 Position independent wrapper.
19330
19331 * tests/bison: Remove.
19332 * tests/bison.in: New.
19333 * configure.in: Adjust.
19334
19335 2001-09-27 Paul Eggert <eggert@twinsun.com>
19336
19337 Port quotearg fixes from tar 1.13.24.
19338
19339 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
19340 tm to be declared.
19341 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
19342 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
19343
19344 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
19345 * m4/mbrtowc.m4: New file.
19346 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
19347 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
19348
19349 2001-09-27 Akim Demaille <akim@epita.fr>
19350
19351 Bump to 1.29c.
19352
19353 2001-09-27 Akim Demaille <akim@epita.fr>
19354
19355 Version 1.29b.
19356
19357 2001-09-25 Akim Demaille <akim@epita.fr>
19358
19359 * src/system.h: Include `xalloc.h'.
19360 Remove it from the C files.
19361 * src/files.c (output_files): Free the obstacks.
19362 * src/lex.c (init_lex): Rename as...
19363 (lex_init): this.
19364 (lex_free): New.
19365 * src/main.c (main): Use it.
19366
19367 2001-09-24 Marc Autret <autret_m@epita.fr>
19368
19369 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
19370 to output informations in fout (FILE*).
19371 (open_graph, close_graph): Likewise.
19372 (output_graph, output_edge, output_node): Likewise.
19373 * src/vcg.h: Update function prototypes.
19374 * src/print_graph.c (print_graph): Open output graph file.
19375 (print_actions): Adjust.
19376 * src/files.h: Remove extern declaration.
19377 * src/files.c: Remove graph_obstack declaration.
19378 (open_files): Remove graph_obstack initialization.
19379 (output_files): Remove graph_obstack saving.
19380
19381 2001-09-24 Marc Autret <autret_m@epita.fr>
19382
19383 * src/files.c (compute_output_file_names): Fix.
19384
19385 2001-09-24 Marc Autret <autret_m@epita.fr>,
19386 Akim Demaille <akim@epita.fr>
19387
19388 * src/reader.c (reader): Remove call to free_symtab ().
19389 * src/main.c (main): Call it here.
19390 Include symtab.h.
19391 * src/conflicts.c (initialize_conflicts): Rename as...
19392 (solve_conflicts): this.
19393 * src/print.c (print_core, print_actions, print_state)
19394 (print_grammar): Dump to a file instead a `output_obstack'.
19395 (print_results): Dump `output_obstack', and then proceed with the
19396 FILE *.
19397 * src/files.c (compute_output_file_names, close_files): New.
19398 (output_files): Adjust.
19399 * src/main.c (main): Adjust.
19400
19401 2001-09-23 Marc Autret <autret_m@epita.fr>
19402
19403 * src/files.c (compute_header_macro): Computes header macro name
19404 from spec_defines_file when given.
19405
19406 2001-09-23 Marc Autret <autret_m@epita.fr>
19407
19408 * src/files.c (output_files): Add default extensions.
19409
19410 2001-09-22 Akim Demaille <akim@epita.fr>
19411
19412 * src/conflicts.c (finalize_conflicts): Rename as...
19413 (free_conflicts): this.
19414
19415 2001-09-22 Akim Demaille <akim@epita.fr>
19416
19417 * src/gram.c (gram_free): Rename back as...
19418 (dummy): this.
19419 (output_token_translations): Free `token_translations'.
19420 * src/symtab.c (free_symtab): Free the tag field.
19421
19422 2001-09-22 Akim Demaille <akim@epita.fr>
19423
19424 Remove `translations' as it is always set to true.
19425
19426 * src/gram.h: Adjust.
19427 * src/reader.c (packsymbols, parse_token_decl): Adjust
19428 * src/print.c (print_grammar): Adjust.
19429 * src/output.c (output_token_translations): Adjust.
19430 * src/lex.c (lex): Adjust.
19431 * src/gram.c: Be sure the set pointers to NULL.
19432 (dummy): Rename as...
19433 (gram_free): this.
19434
19435 2001-09-22 Akim Demaille <akim@epita.fr>
19436
19437 * configure.in: Invoke AM_LIB_DMALLOC.
19438 * src/system.h: Use dmalloc.
19439 * src/LR0.c: Be sure to have pointers initialized to NULL.
19440 (allocate_itemsets): Allocate kernel_items only if needed.
19441
19442 2001-09-22 Akim Demaille <akim@epita.fr>
19443
19444 * configure.in: Bump to 1.29b.
19445 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
19446 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
19447 need xmalloc.c in calc.y.
19448 From Pascal Bart.
19449
19450 2001-09-21 Akim Demaille <akim@epita.fr>
19451
19452 Version 1.29a.
19453 * Makefile.maint, config/config.guess, config/config.sub,
19454 * config/missing: Update from masters.
19455 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
19456 upon package.m4.
19457 * configure.in (ALL_LINGUAS): Add `tr'.
19458
19459 2001-09-21 Akim Demaille <akim@epita.fr>
19460
19461 * tests/Makefile.am (package.m4): Move to...
19462 ($(srcdir)/$(TESTSUITE)): here.
19463
19464 2001-09-20 Akim Demaille <akim@epita.fr>
19465
19466 * src/complain.c: No longer try to be standalone: use system.h.
19467 Don't assume __STDC__ is defined to 1. Just test if it is defined.
19468 * src/complain.h: Likewise.
19469 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
19470 Remove the unused variable `n'.
19471 From Albert Chin-A-Young.
19472
19473 2001-09-18 Marc Autret <autret_m@epita.fr>
19474
19475 * doc/bison.1: Update.
19476 * doc/bison.texinfo (Bison Options): Update --defines and --graph
19477 descriptions.
19478 (Option Cross Key): Update.
19479 Add --graph.
19480
19481 2001-09-18 Marc Autret <autret_m@epita.fr>
19482
19483 * tests/regression.at: New test (comment in %union).
19484
19485 2001-09-18 Marc Autret <autret_m@epita.fr>
19486
19487 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
19488 do that.
19489 Reported by Keith Browne.
19490
19491 2001-09-18 Marc Autret <autret_m@epita.fr>
19492
19493 * tests/output.at: Add tests for --defines and --graph.
19494
19495 2001-09-18 Marc Autret <autret_m@epita.fr>
19496
19497 * tests/output.at: Removes tests of %{header,src}_extension features.
19498
19499 2001-09-18 Akim Demaille <akim@epita.fr>
19500
19501 * tests/Makefile.am (package.m4): New.
19502 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
19503 (_AT_CHECK_CALC_ERROR): Likewise.
19504 Factor the `, ' part of verbose error messages.
19505
19506 2001-09-18 Marc Autret <autret_m@epita.fr>
19507
19508 * src/getargs.c (longopts): Declare --defines and --graph as options
19509 with optional arguments.
19510 * src/files.h: Add extern declarations.
19511 * src/files.c (spec_graph_file, spec_defines_file): New.
19512 (output_files): Update.
19513 Remove CPP-outed code.
19514
19515 2001-09-18 Marc Autret <autret_m@epita.fr>
19516
19517 Turn off %{source,header}_extension feature.
19518
19519 * src/files.c (compute_exts_from_gf): Update.
19520 (compute_exts_from_src): Update.
19521 (output_files): CPP-out useless code.
19522 * src/files.h: Remove {header,source}_extension extern declarations.
19523 * src/reader.c (parse_dquoted_param): CPP-out.
19524 (parse_header_extension_decl): Remove.
19525 (parse_source_extension_decl): Remove.
19526 (read_declarations): Remove cases tok_{hdrext,srcext}.
19527 * src/lex.c (percent_table): Remove {header,source}_extension entries.
19528 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
19529
19530 2001-09-10 Akim Demaille <akim@epita.fr>
19531
19532 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
19533 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
19534 (AT_CHECK_OUTPUT): this.
19535 Merely check ls' exit status, its output is useless.
19536
19537 2001-09-10 Akim Demaille <akim@epita.fr>
19538
19539 * tests/calc.at: Use m4_match.
19540 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
19541
19542 2001-09-10 Marc Autret <autret_m@epita.fr>,
19543 Akim Demaille <akim@epita.fr>
19544
19545 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
19546 enum color_e.
19547 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
19548 to `normal'.
19549 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
19550 * src/lex.h: Adjust prototype.
19551 (token_t): Add `tok_undef'.
19552 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
19553 (parse_percent_token): Now returns token_t.
19554 Add default statement in switch.
19555 (lex): Separate `c' as an input variable, from the token_t result
19556 part.
19557 (unlexed): Is a token_t.
19558
19559 2001-09-10 Akim Demaille <akim@epita.fr>
19560
19561 * configure.in: Bump to 1.29a.
19562
19563 2001-09-07 Akim Demaille <akim@epita.fr>
19564
19565 Version 1.29.
19566
19567 2001-08-30 Akim Demaille <akim@epita.fr>
19568
19569 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
19570 * m4/atconfig.m4: Remove.
19571 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
19572 * tests/bison: New.
19573 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
19574 m4_if, m4_patsubst, and m4_regexp.
19575 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
19576 `input' file instead of echo.
19577
19578 2001-08-29 Akim Demaille <akim@epita.fr>
19579
19580 Bump to 1.28e.
19581
19582 2001-08-29 Akim Demaille <akim@epita.fr>
19583
19584 Version 1.28d.
19585
19586 2001-08-29 Paul Eggert <eggert@twinsun.com>
19587
19588 * src/bison.simple (yyparse): Don't take the address of an
19589 item before the start of an array, as that doesn't conform to
19590 the C Standard.
19591
19592 2001-08-29 Robert Anisko <anisko_r@epita.fr>
19593
19594 * doc/bison.texinfo (Location Tracking Calc): New node.
19595
19596 2001-08-29 Paul Eggert <eggert@twinsun.com>
19597
19598 * src/output.c (output): Do not define const, as this now
19599 causes more problems than it cures.
19600
19601 2001-08-29 Akim Demaille <akim@epita.fr>
19602
19603 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
19604 the nodes.
19605 Be sure to tag the `detailmenu'.
19606
19607 2001-08-29 Akim Demaille <akim@epita.fr>
19608
19609 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
19610 download in a tmp dir.
19611
19612 2001-08-28 Marc Autret <autret_m@epita.fr>
19613
19614 * config/depcomp: New file.
19615
19616 2001-08-28 Marc Autret <autret_m@epita.fr>
19617
19618 * doc/bison.1 (mandoc): Adjust.
19619 From Juan Manuel Guerrero.
19620
19621 2001-08-28 Marc Autret <autret_m@epita.fr>
19622
19623 * src/print_graph.c (print_state): Fix.
19624
19625 2001-08-27 Marc Autret <autret_m@epita.fr>
19626
19627 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
19628 char * members.
19629 Echo modifications to the functions prototypes.
19630 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
19631
19632 2001-08-27 Marc Autret <autret_m@epita.fr>
19633
19634 * src/vcg.c: Include `xalloc.h'.
19635 (add_colorentry): New.
19636 (add_classname): New.
19637 (add_infoname): New.
19638 * src/vcg.h: Add new prototypes.
19639
19640 2001-08-27 Akim Demaille <akim@epita.fr>
19641
19642 * Makefile.maint: Sync. again with CVS Autoconf.
19643
19644 2001-08-27 Akim Demaille <akim@epita.fr>
19645
19646 * Makefile.maint: Formatting changes.
19647 (po-update, cvs-update, update): New targets.
19648 (AMTAR): Remove.
19649
19650 2001-08-27 Akim Demaille <akim@epita.fr>
19651
19652 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
19653 * Makefile.maint: Sync. with CVS Autoconf.
19654
19655 2001-08-27 Marc Autret <autret_m@epita.fr>
19656
19657 * src/vcg.h (struct infoname_s): New.
19658 (struct colorentry_s): New.
19659 (graph_s): New fields {vertical,horizontal}_order in structure.
19660 Add `infoname' field.
19661 Add `colorentry' field;
19662 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
19663 (G_HORIZONTAL_ORDER): New.
19664 (G_INFONAME): New.
19665 (G_COLORENTRY): New.
19666 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
19667 Add output of `infoname'.
19668 Add output of `colorentry'.
19669
19670 2001-08-27 Marc Autret <autret_m@epita.fr>
19671
19672 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
19673 This one shadowed a global parameter.
19674
19675 2001-08-24 Marc Autret <autret_m@epita.fr>
19676
19677 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
19678 instead of `unsigned'.
19679 (print_state): Do not call obstack_object_size () in obstack_grow ()
19680 to avoid macro variables shadowing.
19681
19682 2001-08-23 Marc Autret <autret_m@epita.fr>
19683
19684 * src/lex.c (percent_table): Typo: s/naem/name/.
19685 Add graph option.
19686 Normalize new options declarations.
19687
19688 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
19689
19690 * tests/suite.at: Exercise %header_extension and %source_extension.
19691
19692 2001-08-16 Marc Autret <autret_m@epita.fr>
19693
19694 * src/reader.c (parse_dquoted_param): New.
19695 (parse_header_extension_decl): Use it.
19696 (parse_source_extension_decl): Likewise.
19697
19698 2001-08-16 Marc Autret <autret_m@epita.fr>
19699
19700 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
19701 (get_xxxx_str): Use assert () instead of complain ().
19702 Remove return invokations in default cases.
19703 (get_decision_str): Modify default behaviour. Remove second argument.
19704 Echo modifications on calls.
19705 (output_graph): Fix.
19706
19707 2001-08-16 Marc Autret <autret_m@epita.fr>
19708
19709 * src/getargs.c (usage): Update with ``-g, --graph''.
19710
19711 2001-08-16 Marc Autret <autret_m@epita.fr>
19712
19713 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
19714 (Option Cross Key): Likewise.
19715 * doc/bison.1: Update.
19716
1c8c2190
PB
197172001-09-25 Pascal Bart <pascal.bart@epita.fr>
19718
19719 * src/output.c (output_master_parser): Don't finish action_obstack.
19720 (output_parser): Don't care about the muscle action, here.
19721 (prepare): Copy the action_obstack in the action muscle.
19722 (output): Free action_obstack.
19723
180d45ba
PB
197242001-09-23 Pascal Bart <pascal.bart@epita.fr>
19725
19726 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
19727 will contain `%union' declaration.
19728 (parse_union_decl): Delete #line directive output.
19729 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
19730 informations about %union.
19731 (parse_union_decl): Copy the union_obstack in the muscle stype.
19732 * src/bison.simple: Add new #line directive.
19733 Add typdef %%stype YYSTYPE.
19734
c51d1a19
PB
197352001-09-23 Pascal Bart <pascal.bart@epita.fr>
19736
19737 * src/bison.simple: Add new `#line' directive.
19738
6f9344da
PB
197392001-09-22 Pascal Bart <pascal.bart@epita.fr>
19740
19741 * src/bison.simple: New `#line' directive.
19742 * src/output.c (output_parser): Support new dynamic muscle input_line.
19743
652def80
MA
197442001-09-22 Marc Autret <autret_m@epita.fr>
19745
19746 * src/output.c (output_master_parser): New.
19747 (output_parser): Be more re-entrant.
19748
25b222fa
MA
197492001-09-21 Marc Autret <autret_m@epita.fr>
19750
19751 * src/reader.c (copy_definition, parse_union_decl): Update and use
19752 `linef' muscle.
19753 (copy_action): Likewise.
19754 Use obstack_1grow ().
19755 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
19756
6bc35ae5
MA
197572001-09-21 Marc Autret <autret_m@epita.fr>
19758
19759 * src/options.c (option_table): Adjust.
19760 * src/lex.c (parse_percent_token): Fix.
19761
c0629aa1
PB
197622001-09-20 Pascal Bart <pascal.bart@epita.fr>
19763
19764 * src/options.c (symtab.h): Include it, need by lex.h.
342b8b6e 19765
82b6d266
PB
197662001-09-20 Pascal Bart <pascal.bart@epita.fr>
19767
19768 * src/lex.c (parse_percent_token): Change type of variable `tx', which
19769 is now an option_table_struct*.
19770 (option_strcmp): New function option_strcmp.
19771 (parse_percent_token): Call option_strcmp.
19772 * src/getargs.c (xalloc.h, options.h): Include it.
19773 (getargs): Call create_long_option_table.
19774 (getargs): Free longopts at the end of the function.
19775 (shortopts): Move in options.c.
19776 * src/options.c (create_long_option_table): New function. Convert
19777 information from option_table to option structure.
19778 * src/reader.c (options.h): Include it.
19779
19780 * src/Makefile.am: Adjust.
19781 * src/options.c (option_table): Create from longopts and percent_table.
19782 * src/getargs.c (longopts): Delete.
19783 * src/lex.c (struct percent_table_struct): Delete.
19784 (percent_table): Delete.
19785 (options.h): Include it.
19786 * src/options.c: Create.
19787 * src/options.h: Create.
19788 Declare enum opt_access_e.
19789 Define struct option_table_struct.
19790
75f5aaea
MA
197912001-09-20 Marc Autret <autret_m@epita.fr>
19792
19793 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
19794 sections of Bison.
19795
f508cb0a
PB
197962001-09-19 Pascal Bart <pascal.bart@epita.fr>
19797
19798 * src/bison.simple: s/%%filename/%%skeleton.
19799 * src/muscle_tab.c (getargs.h): Include it.
19800 (muscle_init): Insert new muscle skeleton.
19801
13105fc1
PB
198022001-09-18 Pascal Bart <pascal.bart@epita.fr>
19803
19804 * src/output.c (output_parser): Delete unused variable actions_dumped.
19805
b0c4483e
PB
198062001-09-07 Pascal Bart <pascal.bart@epita.fr>
19807
19808 * src/output.c (output): Delete call to reader_output_yylsp.
19809 * src/reader.c (reader): Likewise.
ba0fe3c7 19810 * src/reader.h: Delete declaration of reader_output_yylsp.
342b8b6e 19811
11d82f03
MA
198122001-09-02 Marc Autret <autret_m@epita.fr>
19813
19814 * src/reader.c: Include muscle_tab.h.
19815 (parse_union_decl): Update.
19816 (parse_macro_decl): Rename parse_muscle_decl.
19817 Update to use renamed functions and variable.
19818 (read_declarations, copy_action, read_additionnal_code, : Updated
19819 with correct variables and functions names.
19820 (packsymbols, reader): Likewise.
342b8b6e 19821
11d82f03 19822 * src/reader.h (muscle_obstack): Extern declaration update.
342b8b6e 19823
11d82f03
MA
19824 * src/output.c: Include muscle_tab.h
19825 In all functions using macro_insert, change by using muscle_insert ().
19826 (macro_obstack): Rename muscle_obstack.
19827 Echo modifications in the whole file.
19828 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
19829 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
19830 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
19831
19832 * src/muscle_tab.h: Update double inclusion macros.
19833 (macro_entry_s): Rename muscle_entry_s.
19834 Update prototypes.
342b8b6e 19835
11d82f03
MA
19836 * src/muscle_tab.c: Include muscle_tab.h.
19837 Rename macro_tabble to muscle_table.
19838 (mhash1, mhash2, mcmp): Use muscle_entry.
19839 (macro_init): Rename muscle_init. Update.
19840 (macro_insert): Rename muscle_insert. Update.
19841 (macro_find): Rename muscle_find. Update.
19842
19843 * src/main.c: Include muscle_tab.h.
19844 (main): Call muscle_init ().
19845 * src/Makefile.am (bison_SOURCES): Echo modifications.
19846
93a37297
MA
198472001-09-02 Marc Autret <autret_m@epita.fr>
19848
f753cd62 19849 Now the files macro_tab.[ch] are named muscle_tab.[ch].
342b8b6e 19850
f753cd62
MA
19851 * src/muscle_tab.c, src/muscle_tab.h: Add files.
19852
198532001-09-02 Marc Autret <autret_m@epita.fr>
19854
19855 * src/macrotab.c, src/macrotab.h: Remove.
93a37297 19856
682d48cd
PB
198572001-09-01 Pascal Bart <pascal.bart@epita.fr>
19858
342b8b6e 19859 * src/reader.c (copy_guard): Use muscle to specify the `#line'
682d48cd
PB
19860 filename.
19861
087c8fda
MA
198622001-09-01 Marc Autret <autret_m@epita.fr>
19863
19864 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
19865 to an explicit value to activate the feature. We do it here.
19866
dda680cb
PB
198672001-08-31 Pascal Bart <pascal.bart@epita.fr>
19868
19869 * src/output.c (prepare): Delete the `filename' muscule insertion.
19870 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
19871 (parse_union_decl): Likewise.
19872 * src/macrotab.c (macro_init): Initialize filename by infile.
19873
9e644e64
MA
198742001-08-31 Marc Autret <autret_m@epita.fr>
19875
19876 * src/bison.simple (YYLSP_NEEDED): New definition.
19877 * src/output.c (prepare): Add macro insertion of `locations_flag'
19878
17da6427
PB
198792001-08-31 Pascal Bart <pascal.bart@epita.fr>
19880
19881 * src/output.c (prepare): Delete insertion of previous muscles,
19882 and insert the `prefix' muscles.
19883 * src/macrotab.c (macro_init): Likewise.
19884 (macro_init): Initialization prefix directive by `yy'.
342b8b6e 19885 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17da6427
PB
19886 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
19887 yylval, yydebug, yyerror, yynerrs and yyparse.
342b8b6e 19888 New directive `#define' to substitute yydebug, ... with option
17da6427
PB
19889 name_prefix.
19890
e8cb70b9
PB
198912001-08-31 Pascal Bart <pascal.bart@epita.fr>
19892
19893 * src/main.c (main): Standardize.
19894 * src/output.c (output_table_data, output_parser): Likewise.
19895 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
19896
63c2d5de
MA
198972001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
19898
342b8b6e 19899 * src/reader.c (read_additionnal_code): Rename %%user_code to
63c2d5de
MA
19900 %%epilogue.
19901 * src/output.c (output): Rename %%declarations to %%prologue.
19902 * src/bison.simple: Echo modifications.
342b8b6e 19903
d8cb5183
MA
199042001-08-31 Marc Autret <autret_m@epita.fr>
19905
19906 * src/reader.c (readgram): CleanUp.
19907 (output_token_defines): Likewise.
19908 (packsymbols): Likewise.
19909 (reader): Likewise.
19910 * src/output.c (output): CPP-out useless code.
19911
6c686258
PB
199122001-08-31 Pascal Bart <pascal.bart@epita.fr>
19913
342b8b6e 19914 * src/reader.c (reader): Delete obsolete call to function
6c686258
PB
19915 output_trailers and output_headers.
19916 * src/output.h: Remove obsolete functions prototypes of output_headers
19917 and output_trailers.
19918
8f451ef7
PB
199192001-08-30 Pascal Bart <pascal.bart@epita.fr>
19920
19921 * src/main.c: Include macrotab.h.
342b8b6e 19922 * src/macrotab.h (macro_entry_s): Constify fields.
8f451ef7
PB
19923 Adjust functions prototypes.
19924 * src/macrotab.c (macro_insert): Constify key and value.
19925 (macro_find): Constify key.
19926 (macro_insert): Include 'xalloc.h'
19927 (macro_insert): Use XMALLOC.
19928 (macro_find): Constify return value.
19929 * src/output.c (output_table_data): Rename table to table_data.
19930 (output_parser): Constify macro_key, macro_value.
19931
997b6fd0 199322001-08-30 Marc Autret <autret_m@epita.fr>
2ba3b73c
MA
19933
19934 * src/reader.c (parse_skel_decl): New.
342b8b6e 19935 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2ba3b73c
MA
19936 * src/lex.h (token_t): New token `tok_skel'.
19937 * src/lex.c (percent_table): Add skeleton option entry.
19938 Standardize.
19939
ff48177d
MA
199402001-08-29 Marc Autret <autret_m@epita.fr>
19941
19942 * src/bison.simple: Add %%user_code directive at the end.
19943 * src/reader.c (read_additionnal_code): New.
19944 (reader): Use it.
19945 * src/output.c (output_program): Remove.
19946 (output): Update.
19947
b33160bf
MA
199482001-08-28 Marc Autret <autret_m@epita.fr>
19949
19950 * src/output.c (output_actions): Clean up.
4e5caae2 19951 (output_gram): CPP-out useless code.
b33160bf
MA
19952 * src/reader.c (reader): Clean up, CPP-out useless code.
19953
d1a2daf7
PB
199542001-08-28 Pascal Bart <pascal.bart@epita.fr>
19955
342b8b6e 19956 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
535c0e75 19957 directive.
d1a2daf7
PB
19958 * src/bison.simple: Add `%%definitions'.
19959
2b763dfe
MA
199602001-08-28 Marc Autret <autret_m@epita.fr>
19961
19962 * config/depcomp: New file.
19963
f1a87ef6
PE
199642001-08-27 Paul Eggert <eggert@twinsun.com>
19965
19966 * src/bison.simple (yyparse): Don't take the address of an
19967 item before the start of an array, as that doesn't conform to
19968 the C Standard.
19969
82e236e2
RA
199702001-08-27 Robert Anisko <robert.anisko@epita.fr>
19971
f1a87ef6 19972 * src/output.c (output): Remove the initialization of the macro
82e236e2
RA
19973 obstack. It was done too late here.
19974
19975 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
19976 completely wrong.
19977 (reader): Initialize the macro obstack here, since we need it to grow
19978 '%define' directives.
19979
19980 * src/reader.h: Declare the macro obstack as extern.
19981
b0cfa28a
RA
199822001-08-27 Robert Anisko <robert.anisko@epita.fr>
19983
19984 * src/output.c (output_parser): Fix. Store single '%' characters in
19985 the output obstack instead of throwing them away.
19986
6fc74234
AD
199872001-08-27 Akim Demaille <akim@epita.fr>
19988
19989 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
19990
9c76d118
RA
199912001-08-25 Robert Anisko <robert.anisko@epita.fr>
19992
19993 * lib/Makefile.am: Adjust.
19994
a8289c62
RA
199952001-08-25 Robert Anisko <robert.anisko@epita.fr>
19996
19997 * src/bison.simple: Update and add '%%' directives.
19998
b6610515
RA
199992001-08-25 Robert Anisko <robert.anisko@epita.fr>
20000
20001 * src/reader.c (reader): Remove calls to 'output_headers' and
20002 'output_trailers'. Remove some C output.
20003 (readgram): Disable a piece of code that was writing a default
20004 definition for 'YYSTYPE'.
20005 (reader_output_yylsp): Remove.
20006 (packsymbols): Output token defintions to a macro.
20007 (copy_definition): Disable C output.
6fc74234 20008
b6610515
RA
20009 * src/reader.c (parse_macro_decl): New function used to parse macro
20010 declarations.
20011 (copy_string2): Put the body of copy_string into this new function.
20012 Add a parameter to let the caller choose whether he wants to copy the
20013 string delimiters or not.
20014 (copy_string): Be a simple call to copy_string2 with the last argument
20015 bound to true.
20016 (read_declarations): Add case for macro definition.
20017 (copy_identifier): New.
6fc74234 20018 (parse_macro_decl): Read macro identifiers using copy_identifier
b6610515
RA
20019 rather than lex.
20020
26f609ff
RA
200212001-08-25 Robert Anisko <robert.anisko@epita.fr>
20022
20023 * src/output.c (prepare): Add prefixed names.
20024 (output_parser): Output semantic actions.
20025 (output_parser): Fix bug on '%%line' directives.
6fc74234 20026
26f609ff
RA
20027 * src/output.c (output_headers): Remove. The C code printed by this
20028 function should now be in the skeletons.
20029 (output_trailers): Remove.
20030 (output): Disable call to 'reader_output_yylsp'.
20031 (output_rule_data): Do not output tables to the table obstack.
20032
20033 * src/output.c: Remove some C dedicated output.
20034 Improve the use of macro and output obstacks.
20035 (output_defines): Remove.
6fc74234 20036
26f609ff
RA
20037 * src/output.c (output_token_translations): Associate 'translate'
20038 table with a macro. No output to the table obstack.
20039 (output_gram): Same for 'rhs' and 'prhs'.
20040 (output_stos): Same for 'stos'.
20041 (output_rule_data): Same for 'r1' and 'r2'.
20042 (token_actions): Same for 'defact'.
20043 (goto_actions): Same for 'defgoto'.
20044 (output_base): Same for 'pact' and 'pgoto'.
20045 (output_table): Same for 'table'.
20046 (output_check): Same for 'check'.
6fc74234 20047
26f609ff
RA
20048 * src/output.c (output_table_data): New function.
20049 (output_short_table): Remove.
20050 (output_short_or_char_table): Remove.
6fc74234 20051
26f609ff
RA
20052 * src/output.c (output_parser): Replace most of the skeleton copy code
20053 with something new. Skeletons are now processed character by character
20054 rather than line by line, and Bison looks for '%%' macros. This is the
20055 first step in making Bison's output process (a lot) more flexible.
20056 (output_parser): Use the macro table.
20057
6f43b113
RA
200582001-08-25 Robert Anisko <robert.anisko@epita.fr>
20059
20060 * src/main.c (main): Initialize the macro table.
20061
dd3127cf
RA
200622001-08-25 Robert Anisko <robert.anisko@epita.fr>
20063
20064 * src/lex.c (percent_table): Add tok_define.
20065 * src/lex.h: Add tok_define.
20066
aa321494
RA
200672001-08-25 Robert Anisko <robert.anisko@epita.fr>
20068
20069 * src/macrotab.c: New file.
20070 * src/macrotab.h: New file.
20071 * src/Makefile.am: Update.
20072
68bd3b6b
RA
200732001-08-25 Robert Anisko <robert.anisko@epita.fr>
20074
20075 * lib/hash.c: New file.
20076 * lib/hash.h: New file.
20077 * lib/Makefile.am: Update.
20078
45f8dd1e
AD
200792001-08-15 Akim Demaille <akim@epita.fr>
20080
20081 Version 1.28c.
20082
40a64a7a 200832001-08-15 Marc Autret <autret_m@epita.fr>
0b8afb77
AD
20084
20085 * src/reader.c (readgram): Indent output macro YYSTYPE.
20086 (packsymbols): Likewise.
20087 (output_token_defines): Likewise.
20088 * src/files.c: Standardize.
20089 (compute_header_macro): New.
20090 (defines_obstack_save): New. Use compute_header_macro.
20091 (output_files): Update. Use defines_obstack_save.
20092
f9a8293a
AD
200932001-08-15 Akim Demaille <akim@epita.fr>
20094
20095 * doc/bison.texinfo (Table of Symbols): Document
20096 YYSTACK_USE_ALLOCA.
20097
150ca7a7
AD
200982001-08-15 Akim Demaille <akim@epita.fr>
20099
20100 * missing: Update from CVS Automake.
20101 * config/config.guess, config/config.sub, config/texinfo.tex:
20102 Update from gnu.org.
20103
69b5cec4
AD
201042001-08-15 Akim Demaille <akim@epita.fr>
20105
20106 * Makefile.maint: Sync with CVS Autoconf.
20107
f2b5126e
PB
201082001-08-14 Pascal Bart <pascal.bart@epita.fr>
20109
69b5cec4 20110 * doc/bison.texinfo: Include GNU Free Documentation License from
f2b5126e
PB
20111 `fdl.texi'.
20112 * doc/fdl.texi: Add to package.
20113
4ecbf796
MA
201142001-08-14 Marc Autret <autret_m@epita.fr>
20115
20116 Turn on %{source,header}_extension features.
20117
69b5cec4 20118 * src/lex.c (percent_table): Un-CPP out header_extension and
4ecbf796
MA
20119 source_extension.
20120 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
69b5cec4 20121 (compute_exts_from_src): Remove conditions. It restores priorities
4ecbf796
MA
20122 between options.
20123
95fb5662
MA
201242001-08-14 Marc Autret <autret_m@epita.fr>
20125
20126 * src/files.c (compute_base_names): Add extensions computing when
20127 `--file-prefix' used.
20128 Standardize function calls.
20129
78d09da9
MA
201302001-08-13 Marc Autret <autret_m@epita.fr>
20131
69b5cec4 20132 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
78d09da9
MA
20133 defining it (defined but null disables alloca).
20134
5a009f2c
MA
201352001-08-13 Marc Autret <autret_m@epita.fr>
20136
20137 * src/bison.simple (_yy_memcpy): CPP reformat.
20138
1e41465a
PB
201392001-08-13 Pascal Bart <pascal.bart@epita.fr>
20140
20141 * tests/atconfig.in (CPPFLAGS): Fix.
20142
c67a198d
PB
201432001-08-10 Pascal Bart <pascal.bart@epita.fr>
20144
79282c6c 20145 * doc/bison.texinfo: Include GNU General Public License from
c67a198d
PB
20146 `gpl.texi'.
20147 * doc/gpl.texi: Add to package.
20148
09a6de7e
MA
201492001-08-10 Marc Autret <autret_m@epita.fr>
20150
20151 * src/print_graph.h: Fix.
20152 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
20153
b77b9ee0
AD
201542001-08-10 Akim Demaille <akim@epita.fr>
20155
20156 * src/system.h: Provide default declarations for stpcpy, strndup,
20157 and strnlen.
20158
3e259915
MA
201592001-08-10 Robert Anisko <anisko_r@epita.fr>
20160
20161 * doc/bison.texinfo (Locations): Update @$ stuff.
20162
ca96bc2d
MA
201632001-08-09 Robert Anisko <anisko_r@epita.fr>
20164
20165 * src/bison.simple (YYLLOC_DEFAULT): Update.
20166 (yyparse): Adjust.
20167
fdc6758b
MA
201682001-08-08 Marc Autret <autret_m@epita.fr>
20169
b77b9ee0 20170 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
fdc6758b
MA
20171 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
20172 Reported by Fabrice Bauzac.
957d4dbf 20173
600cad3b
MA
201742001-08-08 Marc Autret <autret_m@epita.fr>
20175
20176 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
20177 * src/vcg.c (output_node): Fix.
20178 * src/vcg.h: Cleanup.
20179 * src/print_graph.c: Add comments.
b77b9ee0 20180 (node_output_size): New global variable. Simplify the formatting of
600cad3b 20181 the VCG graph output.
b77b9ee0 20182 (print_actions): Unused code is now used. It notifies the final state
600cad3b 20183 and no action states in the VCG graph. It also give the reduce actions.
b77b9ee0 20184 The `shift and goto' edges are red and the `go to state' edges are
600cad3b
MA
20185 blue.
20186 Get the current node name and node_obstack by argument.
20187 (node_obstack): New variable.
20188 (print_state): Manage node_obstack.
20189 (print_core): Use node_obstack given by argument.
20190 A node is not only computed here but in print_actions also.
20191 (print_graph): CPP out useless code instead of commenting it.
20192
976e528f
AD
201932001-08-07 Pascal Bart <pascal.bart@epita.fr>
20194
20195 * tests/atconfig.in (CPPFLAGS): Fix.
20196
20e8e5ca
AD
201972001-08-07 Akim Demaille <akim@epita.fr>
20198
20199 * src/print_graph.c (quote): New.
20200 (print_core): Use it.
20201
957d4dbf 202022001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3e3da797 20203
3e3da797
AD
20204 * src/vcg.c (complain.h): Include it.
20205 Unepitaize `return' invocations.
c4b66126 20206 [NDEBUG] (main): Remove.
79282c6c 20207 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
c4b66126
AD
20208 * src/files.c (open_files): Initialize graph_obstack.
20209 * src/print_graph.c (print_actions): CPP out useless code.
20210 (print_core): Don't output the last `\n' in labels.
20211 Use `quote'.
20212 * src/files.c (output_files): Output the VCG file.
20213 * src/main.c (main): Invoke print_graph ();
3e3da797 20214
957d4dbf 202152001-08-06 Marc Autret <autret_m@epita.fr>
22c2cbc0
AD
20216
20217 Automaton VCG graph output.
20218 Using option ``-g'' or long option ``--graph'', you can generate
20219 a gram_filename.vcg file containing a VCG description of the LALR (1)
20220 automaton of your grammar.
20221
20222 * src/main.c: Call to print_graph() function.
20223 * src/getargs.h: Update.
20224 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
20225 (graph_flag): New flag.
20226 (longopts): Update.
20227 (getargs): Add case `g'.
20228 * src/files.c (graph_obstack): New obstack struct.
20229 (open_files): Initialize new obstack.
20230 (output_files): Saves graph_obstack if required.
20231 * src/files.h (graph_obstack): New extern declaration.
20232 * src/Makefile.am: Add new source files.
20233
927c1557 202342001-08-06 Marc Autret <autret_m@epita.fr>
ce4d5ce0
AD
20235
20236 * src/print_graph.c, src/print_graph.h (graph): New.
20237 * src/vcg.h: New file.
20238 * src/vcg.c: New file, VCG graph handling.
20239
7333d403
AD
202402001-08-06 Marc Autret <autret_m@epita.fr>
20241
20242 Add of %source_extension and %header_extension which specify
20243 the source or/and the header output file extension.
20244
20245 * src/files.c (compute_base_names): Remove initialisation of
20246 src_extension and header_extension.
20247 (compute_exts_from_gf): Update.
20248 (compute_exts_from_src): Update.
20249 (output_files): Update.
20250 * src/reader.c (parse_header_extension_decl): New.
20251 (parse_source_extension_decl): New.
20252 (read_declarations): New case statements for the new tokens.
20253 * src/lex.c (percent_table): Add entries for %source_extension
20254 and %header_extension.
20255 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
20256
84163231
AD
202572001-08-06 Marc Autret <autret_m@epita.fr>
20258
20259 * configure.in: Bump to 1.28c.
20260 * doc/bison.texinfo: Texinfo thingies.
20261
8303fc42
AD
202622001-08-04 Pascal Bart <pascal.bart@epita.fr>
20263
20264 * tests/atconfig.in (CPPFLAGS): Add.
20265 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
20266
70a84437
AD
202672001-08-03 Akim Demaille <akim@epita.fr>
20268
20269 Version 1.28b.
20270
2ce10144
AD
202712001-08-03 Akim Demaille <akim@epita.fr>
20272
20273 * tests/Makefile.am (check-local): Ship testsuite.
20274 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
20275 Include `string.h'.
20276
1e3e4bc1
AD
202772001-08-03 Akim Demaille <akim@epita.fr>
20278
20279 * configure.in: Try using -Wformat when compiling.
20280
42b45b7f
AD
202812001-08-03 Akim Demaille <akim@epita.fr>
20282
20283 * configure.in: Bump to 1.28b.
20284
8f13fe33
AD
202852001-08-03 Akim Demaille <akim@epita.fr>
20286
20287 * src/complain.c: Adjust strerror_r portability issues.
20288
b37ba92c
AD
202892001-08-03 Akim Demaille <akim@epita.fr>
20290
20291 Version 1.28a.
20292
b0ce6046
AD
202932001-08-03 Akim Demaille <akim@epita.fr>
20294
20295 * src/getargs.c, src/getarg.h (skeleton)): Constify.
20296 * src/lex.c (literalchar): Avoid name clashes on `buf'.
20297 * src/getargs.c: Include complain.h.
20298 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
20299 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
20300
d01c415b
AD
203012001-08-03 Akim Demaille <akim@epita.fr>
20302
20303 * src/reader.c (readgram): Display hidden chars in error messages.
20304
459dd1a6
AD
203052001-08-03 Akim Demaille <akim@epita.fr>
20306
20307 Update to gettext 0.10.39.
20308
53b74c0c
AD
203092001-08-03 Akim Demaille <akim@epita.fr>
20310
20311 * lib/strspn.c: New.
20312
234a3be3
AD
203132001-08-01 Marc Autret <autret_m@epita.fr>
20314
20315 * doc/bison.texinfo: Update.
20316 * doc/bison.1 (mandoc): Update.
20317 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
20318 * src/files.c: Support output files extensions computing.
20319 (src_extension): New static variable.
20320 (header_extension): New static variable.
20321 (tr): New function.
20322 (get_extension_index): New function, gets the index of an extension
20323 filename in a string.
20324 (compute_exts_from_gf): New function, computes extensions from the
20325 grammar file extension.
20326 (compute_exts_from_src): New functions, computes extensions from the
20327 C source file extension, file given by ``-o'' option.
20328 (compute_base_names): Update.
20329 (output_files): Update.
20330
847bf1f5
AD
203312001-08-01 Robert Anisko <anisko_r@epita.fr>
20332
d995fee7 20333 * doc/bison.texi: Document @$.
847bf1f5
AD
20334 (Locations): New section.
20335
d074a105
AD
203362001-07-18 Akim Demaille <akim@epita.fr>
20337
20338 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
20339 * config/prev-version.txt, config/move-if-change: New.
20340 * Makefile.am: Adjust.
20341
3419715d
AD
203422001-07-08 Pascal Bart <pascal.bart@epita.fr>
20343
20344 * src/bison.simple (yyparse): Suppress warning `comparaison
20345 between signed and unsigned'.
20346
62ab6972
AD
203472001-07-05 Pascal Bart <pascal.bart@epita.fr>
20348
20349 * src/getargs.h (raw_flag): Remove.
20350 * src/getargs.c: Die on `-r'/`--raw'.
20351 * src/lex.c (parse_percent_token): Die on `%raw'.
20352 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
20353 * tests/calc.at: Suppress test with option `--raw'.
20354
1e24cc5b
AD
203552001-07-14 Akim Demaille <akim@epita.fr>
20356
20357 * config/: New.
20358 * configure.in: Require Autoconf 2.50.
20359 Update to gettext 0.10.38.
20360
32dfccf8
AD
203612001-03-16 Akim Demaille <akim@epita.fr>
20362
20363 * doc/bison.texinfo: ANSIfy the examples.
20364
cd5bd6ac
AD
203652001-03-16 Akim Demaille <akim@epita.fr>
20366
20367 * getargs.c (skeleton): New variable.
20368 (longopts): --skeleton is a new option.
20369 (shortopts, getargs): -S is a new option.
20370 * getargs.h: Declare skeleton.
20371 * output.c (output_parser): Use it.
20372
5141b016
AD
203732001-03-16 Akim Demaille <akim@epita.fr>
20374
20375 * m4/strerror_r.m4: New.
20376 * m4/error.m4: Run AC_FUNC_STRERROR_R.
20377 * lib/error.h, lib/error.c: Update.
20378
447992b9
AD
203792001-03-16 Akim Demaille <akim@epita.fr>
20380
20381 * src/getargs.c (longopts): Clean up.
20382
274d42ce
AD
203832001-02-21 Akim Demaille <akim@epita.fr>
20384
20385 * src/reader.c (gensym): `gensym_count' is your own.
20386 Use a static buf to create the symbol name, as token_buffer is no
20387 longer a buffer.
20388
22c821f3
AD
203892001-02-08 Akim Demaille <akim@epita.fr>
20390
20391 * src/conflicts.c (conflict_report): Be sure not to append to res
20392 between two calls, which could happen if both first sprintf were
20393 skipped, but not the first cp += strlen.
20394
18569462
AD
203952001-02-08 Akim Demaille <akim@epita.fr>
20396
20397 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
20398 New, from fileutils 4.0.37.
20399 * configure.in: Require Autoconf 2.49c. I took some time before
20400 making this decision. This is the only way out for portability
20401 issues in Bison, it would mean way too much duplicate effort to
20402 import in Bison features implemented in 2.49c since 2.13.
20403 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
20404
0d8f3c8a
AD
204052001-02-02 Akim Demaille <akim@epita.fr>
20406
20407 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
66075dcf 20408 * lib/xalloc.h, lib/xmalloc.c: Update.
0d8f3c8a 20409
f17bcd1f
AD
204102001-01-19 Akim Demaille <akim@epita.fr>
20411
20412 Get rid of the ad hoc handling of token_buffer in the scanner: use
20413 the obstacks.
20414
20415 * src/lex.c (token_obstack): New.
20416 (init_lex): Initialize it. No longer call...
20417 (grow_token_buffer): this. Remove it.
20418 Adjust all the places which used it to use the obstack.
20419
511e79b3
AD
204202001-01-19 Akim Demaille <akim@epita.fr>
20421
20422 * src/lex.h: Rename all the tokens:
20423 s/\bENDFILE\b/tok_eof/g;
20424 s/\bIDENTIFIER\b/tok_identifier/g;
20425 etc.
20426 Let them be enums, not #define, to ease debugging.
20427 Adjust all the code.
20428
0d6508ef
AD
204292001-01-18 Akim Demaille <akim@epita.fr>
20430
20431 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
20432 * src/lex.c (maxtoken, grow_token_buffer): Static.
20433
6deb4447
AD
204342001-01-18 Akim Demaille <akim@epita.fr>
20435
20436 Since we now use obstacks, more % directives can be enabled.
20437
20438 * src/lex.c (percent_table): Also accept `%yacc',
20439 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
20440 `%debug'.
20441 Handle the actions for `%semantic_parser' and `%pure_parser' here,
20442 instead of returning a token.
20443 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
20444 * src/reader.c (read_declarations): Adjust.
20445 * src/files.c (open_files): Don't call `compute_base_names', don't
20446 compute `attrsfile' since they depend upon data which might be
20447 *in* the input file now.
20448 (output_files): Do it here.
20449 * src/output.c (output_headers): Document the fact that this patch
20450 introduces a guaranteed SEGV for semantic parsers.
20451 * doc/bison.texinfo: Document them.
20452 * tests/suite.at: Exercise these %options.
20453
ff4423cc
AD
204542000-12-20 Akim Demaille <akim@epita.fr>
20455
20456 Also handle the output file (--verbose) with obstacks.
20457
20458 * files.c (foutput): Remove.
20459 (output_obstack): New.
20460 Adjust all dependencies.
20461 * src/conflicts.c: Return a string.
20462 * src/system.h (obstack_grow_string): Rename as...
20463 (obstack_sgrow): this. Be ready to work with non literals.
20464 (obstack_fgrow4): New.
20465
956dba3a
AD
204662000-12-20 Akim Demaille <akim@epita.fr>
20467
20468 * src/files.c (open_files): Fix the computation of short_base_name
20469 in the case of `-o foo.tab.c'.
20470
337bab46
AD
204712000-12-20 Akim Demaille <akim@epita.fr>
20472
20473 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
20474 (copy_dollar): Now that everything uses obstacks, get rid of the
20475 FILE * parameters.
20476
5d3214b8
AD
204772000-12-20 Akim Demaille <akim@epita.fr>
20478
20479 * src/files.c (open_files): Actually the `.output' file is based
20480 on the short_base_name, not base_name.
20481 * tests/suite.at (Checking output file names): Adjust.
20482
29092a57
AD
204832000-12-20 Akim Demaille <akim@epita.fr>
20484
20485 * src/bison.s1: Remove, we now use directly...
20486 * src/bison.simple: this.
20487 * src/Makefile.am: Use pkgdata instead of data.
20488
ea5607fd
AD
204892000-12-20 Akim Demaille <akim@epita.fr>
20490
20491 * src/files.c (guard_obstack): New.
20492 (open_files): Initialize it.
20493 (output_files): Dump it...
20494 * src/files.h: Export it.
20495 * src/reader.c (copy_guard): Use it.
20496
27110317
AD
204972000-12-19 Akim Demaille <akim@epita.fr>
20498
20499 * src/files.c (outfile, defsfile, actfile): Removed as global
20500 vars.
20501 (open_files): Don't compute them.
20502 (output_files): Adjust.
20503 (base_name, short_base_name): Be global.
20504 Adjust dependencies.
20505
19c50364
AD
205062000-12-19 Akim Demaille <akim@epita.fr>
20507
20508 * src/files.c (strsuffix): New.
20509 (stringappend): Be just like strcat but allocate.
20510 (base_names): Eve out from open_files.
20511 Try to simplify the rather hairy computation of base_name and
20512 short_base_name.
20513 (open_files): Use it.
20514 * tests/suite.at (Checking output file names): New test.
20515
573c1d9f
AD
205162000-12-19 Akim Demaille <akim@epita.fr>
20517
20518 * src/system.h (obstack_grow_literal_string): Rename as...
20519 (obstack_grow_string): this.
20520 * src/output.c (output_parser): Recognize `%% actions' instead of
20521 `$'.
20522 * src/bison.s1: s/$/%% actions/.
20523 * src/bison.hairy: Likewise.
20524
ef7ddedd
AD
205252000-12-19 Akim Demaille <akim@epita.fr>
20526
20527 * src/output.c (output_parser): Compute the `#line' lines when
20528 there are.
20529 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
20530 Suggested by Hans Aberg.
20531
ff61dabd
AD
205322000-12-19 Akim Demaille <akim@epita.fr>
20533
20534 Let the handling of the skeleton files be local to the procedures
20535 that use it.
20536
20537 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
20538 longer static.
20539 (fparser, open_extra_files): Remove.
20540 (open_files, output_files): Don't take care of fparser.
20541 * src/files.h: Adjust.
20542 * src/output.c (output_parser): Open and close the file to the
20543 skeleton.
20544 * src/reader.c (read_declarations): When %semantic_parser, open
20545 fguard.
20546
55b96341
AD
205472000-12-19 Akim Demaille <akim@epita.fr>
20548
20549 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
20550 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
20551
358c15b7
AD
205522000-12-19 Akim Demaille <akim@epita.fr>
20553
20554 * src/files.c (open_files): Yipee! We no longer need all the code
20555 looking for `/tmp' since we have no tmp file.
20556
7de3329e
AD
205572000-12-19 Akim Demaille <akim@epita.fr>
20558
20559 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
20560 New macros.
20561 * src/files.c (open_files): Less dependency on MSDOS etc.
20562
3abcd459
AD
205632000-12-14 Akim Demaille <akim@epita.fr>
20564
20565 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
20566 Provide a default definition.
20567 Use it when executing the default @ action.
20568 * src/reader.c (reader_output_yylsp): No longer include
20569 `timestamp' and `text' in the default YYLTYPE.
20570
2a91a95e
AD
205712000-12-12 Akim Demaille <akim@epita.fr>
20572
20573 * src/reader.c (copy_definition, parse_union_decl, copy_action)
20574 (copy_guard): Quote the file names.
20575 Reported by Laurent Mascherpa.
20576
14d3eb9b
AD
205772000-12-12 Akim Demaille <akim@epita.fr>
20578
20579 * src/output.c (output_headers, output_program, output): Be sure
20580 to escape special characters when outputting filenames.
20581 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
20582 (output_headers): Don't depend on them, Use ACTSTR.
20583
d7045ec6
AD
205842000-11-17 Akim Demaille <akim@epita.fr>
20585
20586 * lib/obstack.h: Formatting changes.
20587 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
20588 prevents type checking.
20589 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
20590 cast the value to (void *): assigning a `foo *' to a `void *'
20591 variable is valid.
20592 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
20593 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
20594 append characters.
20595
6fd54b73
AD
205962000-11-17 Akim Demaille <akim@epita.fr>
20597
20598 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
20599 as...
20600 (suite.m4, regression.m4, calc.m4): these.
20601 * tests/atgeneral.m4: Update from CVS Autoconf.
20602
4c50eae6
AD
206032000-11-17 Akim Demaille <akim@epita.fr>
20604
20605 * tests/regression.m4 (%union and --defines): New test,
20606 demonstrating a current bug in the obstack implementation.
20607
a35f64ea
AD
206082000-11-17 Akim Demaille <akim@epita.fr>
20609
20610 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
20611 macros.
20612 Use them to declare the variables which are global or local to
20613 `yyparse'.
20614
7de23534
AD
206152000-11-17 Akim Demaille <akim@epita.fr>
20616
20617 * acconfig.h: Remove, no longer used.
20618
aa7815f5
AD
206192000-11-07 Akim Demaille <akim@epita.fr>
20620
20621 * src: s/Copyright (C)/Copyright/g.
20622
5af1f549
AD
206232000-11-07 Akim Demaille <akim@epita.fr>
20624
20625 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
20626 defining.
20627 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
20628
553e2b22
AD
206292000-11-07 Akim Demaille <akim@epita.fr>
20630
20631 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
20632 Merge in a single CPP if/else.
20633
8a4f41d6
AD
206342000-11-07 Akim Demaille <akim@epita.fr>
20635
20636 * src/output.c (output): Remove useless variables.
20637 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
20638 argument `data' for consistency with the prototypes.
20639 Qualify it `const'.
20640 (obstack_copy, obstack_copy0): Rename the second argument as
20641 `address' for consistency. Qualify it `const'.
20642 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
20643 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
20644 `const' their input argument (`data' or `address').
20645 Adjust the corresponding macros to include `const' in casts.
20646
095a3fb5
AD
206472000-11-03 Akim Demaille <akim@epita.fr>
20648
20649 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
20650 s/PFILE1/BISON_HAIRY/.
20651 Adjust dependencies.
20652
d1cdce7c
AD
206532000-11-03 Akim Demaille <akim@epita.fr>
20654
090c5ebf 20655 For some reason, this was not applied.
d1cdce7c
AD
20656
20657 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
20658 `unlink': it's no longer used.
20659
9311529b
AD
206602000-11-03 Akim Demaille <akim@epita.fr>
20661
20662 * src/files.c (skeleton_find): New function, eved out of...
20663 (open_files, open_extra_files): here.
20664
d8880f69
AD
206652000-11-03 Akim Demaille <akim@epita.fr>
20666
20667 Don't use `atexit'.
20668
20669 * src/files.c (obstack_save): New function.
20670 (done): Rename as...
20671 (output_files): this.
20672 Use `obstack_save'.
20673 * src/main.c (main): Don't use `atexit' to register `done', since
20674 it no longer has to remove tmp files, just call `output_files'
20675 when there are no errors.
20676
0dbb648e
AD
206772000-11-02 Akim Demaille <akim@epita.fr>
20678
20679 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
20680 `unlink': it's no longer used.
20681 * src/files.h: Formatting changes.
20682
896fe5c1
AD
206832000-11-02 Akim Demaille <akim@epita.fr>
20684
20685 Remove the last uses of mktemp and unlink/delete.
20686
20687 * src/files.c (fdefines, ftable): Removed.
20688 (defines_ostack, table_obstack): New.
20689 Adjust dependencies of the former into uses of the latter.
20690 * src/output.c (output_short_or_char_table, output_short_table):
20691 Convert to using obstacks.
20692 * src/reader.c (copy_comment2): Accept one FILE * and two
20693 obstacks.
20694 (output_token_defines, reader_output_yylsp): Use obstacks.
20695 * src/system.h (obstack_fgrow3): New.
1f65350a 20696 * po/POTFILES.in: Adjust.
896fe5c1 20697
dd60faec
AD
206982000-11-01 Akim Demaille <akim@epita.fr>
20699
20700 Change each use of `fattrs' into a use of `attrs_obstack'.
20701
20702 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
20703 * src/files.c (fattrs): Remove.
20704 (attrs_obstack): New.
20705 Adjust all dependencies.
20706 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
20707
8c7ebe49
AD
207082000-11-01 Akim Demaille <akim@epita.fr>
20709
20710 Introduce obstacks.
20711 Change each use of `faction' into a use of `action_obstack'.
20712
20713 * lib/obstack.h, lib/obstack.c: New files.
20714 * src/files.c (faction): Remove.
20715 (action_obstack): New.
20716 Adjust all dependencies.
20717
77aee789
AD
207182000-10-20 Akim Demaille <akim@epita.fr>
20719
20720 * lib/quote.h (PARAMS): New macro. Use it.
20721
43591cec
AD
207222000-10-16 Akim Demaille <akim@epita.fr>
20723
20724 * src/output.c (output_short_or_char_table): New function.
20725 (output_short_table, output_token_translations): Use it.
20726 (goto_actions): Use output_short_table.
20727
1e9798d5
AD
207282000-10-16 Akim Demaille <akim@epita.fr>
20729
20730 * src/symtab.c (bucket_new): New function.
20731 (getsym): Use it.
20732
20733 * src/output.c (output_short_table): New argument to display the
20734 comment associated with the table.
20735 Adjust dependencies.
20736 (output_gram): Use it.
20737 (output_rule_data): Nicer output layout for YYTNAME.
20738
f282676b
AD
207392000-10-16 Akim Demaille <akim@epita.fr>
20740
20741 * src/lex.c (read_typename): New function.
20742 (lex): Use it.
20743 * src/reader.c (copy_dollar): Likewise.
20744
550a72a3
AD
207452000-10-16 Akim Demaille <akim@epita.fr>
20746
20747 * src/reader.c (copy_comment2): Expect the input stream to be on
20748 the `/' which is suspected to open a comment, instead of being
20749 called after `//' or `/*' was read.
20750 (copy_comment, copy_definition, parse_union_decl, copy_action)
20751 (copy_guard): Adjust.
20752
131e2fef
AD
207532000-10-16 Akim Demaille <akim@epita.fr>
20754
20755 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
20756 `read_signed_integer'.
20757
79282c5a
AD
207582000-10-16 Akim Demaille <akim@epita.fr>
20759
20760 * src/reader.c (copy_dollar): New function.
20761 (copy_guard, copy_action): Use it.
20762
ff4a34be
AD
207632000-10-16 Akim Demaille <akim@epita.fr>
20764
20765 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
20766 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
20767 New files, from Fileutils 4.0.27.
20768 * src/main.c (printable_version): Remove.
20769 * src/lex.c, src/reader.c: Use `quote'.
20770
207712000-10-04 Akim Demaille <akim@epita.fr>
20772
20773 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
20774
14ded682
AD
207752000-10-04 Akim Demaille <akim@epita.fr>
20776
20777 * doc/bison.texinfo: Various typos spotted by Neil Booth.
20778
8e03724b
AD
207792000-10-04 Akim Demaille <akim@epita.fr>
20780
20781 When a literal string is used to define two different tokens,
20782 `bison -v' segfaults.
20783 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
20784
20785 * tests/regression.m4: New file.
20786 Include the core of the sample provided by Piotr Gackiewicz.
20787 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
20788 properly.
20789
a9e64249
AD
207902000-10-04 Akim Demaille <akim@epita.fr>
20791
20792 * src/reader.c (parse_expect_decl): Keep `count' within the size
20793 of `buffer'.
20794 From Neil Booth.
20795
da9abf43
AD
207962000-10-02 Paul Eggert <eggert@twinsun.com>
20797
20798 * bison.s1 (yyparse): Assign the default value
20799 unconditionally, to avoid a GCC warning and make the parser a
20800 tad smaller.
20801
c33638bb
AD
208022000-10-02 Akim Demaille <akim@epita.fr>
20803
20804 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
20805 options.
20806
444c570a
AD
208072000-10-02 Akim Demaille <akim@epita.fr>
20808
20809 * src/derives.c, src/print.c, src/reduce.c: To ease the
20810 translation, move some `\n' out of the translated strings.
20811
89cab50d
AD
208122000-10-02 Akim Demaille <akim@epita.fr>
20813
20814 The location tracking mechanism is precious for parse error
20815 messages. Nevertheless, it is enabled only when `@n' is used in
20816 the grammar, which is a different issue (you can use it in error
20817 message, but not in the grammar per se). Therefore, there should
20818 be another means to enable it.
20819
20820 * src/getargs.c (getargs): Support `--locations'.
20821 (usage): Report it.
20822 * src/getargs.h (locationsflag): Export it.
20823 * src/lex.c (percent_table): Support `%locations'.
20824 * src/reader.c (yylsp_needed): Remove this variable, now replaced
20825 with `locationsflag'.
20826 * doc/bison.texinfo: Document `--locations' and `%locations'.
20827 Sort the options.
20828 * tests/calc.m4: Test it.
20829
20830 For regularity of the names, replace each
20831 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
20832 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
20833 In addition replace each `flag' with `_flag'.
20834
d6c2cba0
AD
208352000-10-02 Akim Demaille <akim@epita.fr>
20836
20837 Also test parse error messages, including with YYERROR_VERBOSE.
20838
20839 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
20840 associative).
20841 Use it to check the computations.
20842 Use it to check `nonassoc' is honored.
20843 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
20844 `--yyerror-verbose'.
20845 (_AT_CHECK_CALC): Adjust to this option.
20846 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
20847
5a35a6cb
AD
208482000-10-02 Akim Demaille <akim@epita.fr>
20849
20850 Test also `--verbose', `--defines' and `--name-prefix'. Testing
20851 the latter demonstrates a flaw in the handling of non debugging
20852 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
20853 was used in order to simplify:
20854
20855 #if YYDEBUG
20856 if (yydebug)
20857 {
20858 ...
20859 }
20860 #endif
20861
20862 into
20863
20864 if (yydebug)
20865 {
20866 ...
20867 }
20868
20869 unfortunately this leads to a CPP conflict when
20870 `--name-prefix=foo' is used since it produces `#define yydebug
20871 foodebug'.
20872
20873 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
20874 (YYDPRINTF): New macro.
20875 Spread its use.
20876 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
20877 the bison options.
20878 Also test `--verbose', `--defines' and `--name-prefix'.
20879
71da9eea
AD
208802000-10-02 Akim Demaille <akim@epita.fr>
20881
20882 Improve the readability of the produced parsers.
20883
20884 * src/bison.s1: Formatting changes.
20885 Improve the comment related to the `$' mark.
20886 (yydefault): Don't fall through to `yyresume': `goto' there.
20887 * src/output.c (output_parser): When the `$' is met, skip the end
20888 of its line.
20889 New variable, `number_of_dollar_signs', to check there's exactly
20890 one `$' in the parser skeleton.
20891
95e36146
AD
208922000-10-02 Akim Demaille <akim@epita.fr>
20893
20894 * lib/xstrdup.c: New file, from the fileutils.
20895 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
20896 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
20897 instead of strlen + xmalloc + strcpy.
20898 * src/symtab.c (copys): Remove, use xstrdup instead.
20899
d7020c20
AD
209002000-10-02 Akim Demaille <akim@epita.fr>
20901
20902 * src/gram.h (associativity): New enum type which replaces the
20903 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
20904 `right_assoc', `left_assoc' and `non_assoc'.
20905 Adjust all dependencies.
20906 * src/reader.c: Formatting changes.
20907 (LTYPESTR): Don't define it, use it as a literal in
20908 `reader_output_yylsp'.
20909 * src/symtab.h (symbol_class): New enum type which replaces the
20910 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
20911 `sunknown', `stoken and `snterm'.
20912
1916f98e
AD
209132000-10-02 Akim Demaille <akim@epita.fr>
20914
20915 * src/getargs.c (fixed_outfiles): Rename as...
20916 (yaccflag): for consistency and accuracy.
20917 Adjust dependencies.
20918
d7913476
AD
209192000-10-02 Akim Demaille <akim@epita.fr>
20920
20921 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
20922 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
20923 difficult and introduced a lot of core dump. It turns out that
20924 Bison used an implementation of `xmalloc' based on `calloc', and
20925 at various places it does depend upon the initialization to 0. I
20926 have not tried to isolate the pertinent places, and all the former
20927 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
20928 someone should address this issue.
20929
20930 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
20931 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
20932 files.
20933 Adjust dependencies.
20934 * src/warshall.h: New file.
20935 Propagate.
20936
340ef489
AD
209372000-10-02 Akim Demaille <akim@epita.fr>
20938
20939 Various anti-`extern in *.c' changes.
20940
20941 * src/system.h: Include `assert.h'.
20942
b2ca4022
AD
209432000-10-02 Akim Demaille <akim@epita.fr>
20944
20945 * src/state.h (nstates, final_state, first_state, first_shift)
20946 (first_reduction): Move their exportation from here...
20947 * src/LR0.h: to here.
20948 Adjust dependencies.
20949 * src/getargs.c (statisticsflag): New variable.
20950 Add support for `--statistics'.
20951 Adjust dependencies.
20952
20953 Remove a lot of now useless `extern' statements in most files.
20954
403b315b
AD
209552000-10-02 Akim Demaille <akim@epita.fr>
20956
20957 * src/LR0.h: New file.
20958 Propagate its use.
20959
07a58c13
AD
209602000-10-02 Akim Demaille <akim@epita.fr>
20961
20962 * src/print.h: New file.
20963 Propagate its use.
20964 * src/print.c: Formatting and ordering changes.
20965 (verbose, terse): Replace with...
20966 (print_results): this new function.
20967 Adjust dependencies.
20968
0619caf0
AD
209692000-10-02 Akim Demaille <akim@epita.fr>
20970
20971 * src/conflicts.c (conflict_report): New function.
20972 (conflict_log, verbose_conflict_log): Replace with...
20973 (print_conflicts): this function.
20974 Adjust dependencies.
20975 * src/conflicts.h: New file.
20976 Propagate its inclusion.
20977
3519ec76
AD
209782000-10-02 Akim Demaille <akim@epita.fr>
20979
20980 * src/nullable.h: New file.
20981 Propagate its inclusion.
20982 * src/nullable.c: Formatting changes.
20983
015acc48
AD
209842000-10-02 Akim Demaille <akim@epita.fr>
20985
20986 * src/reduce.h: New file.
20987 Propagate its inclusion.
20988 * src/reduce.c: Topological sort and other formatting changes.
20989 (bool, TRUE, FALSE): Move their definition to...
20990 * src/system.h: here.
20991
8963a27b
AD
209922000-10-02 Akim Demaille <akim@epita.fr>
20993
20994 * src/files.c: Formatting changes.
20995 (tryopen, tryclose, openfiles): Rename as...
20996 (xfopen, xfclose, open_files): this.
20997 (stringappend): static.
20998 * src/files.h: Complete the list of exported symbols.
20999 Propagate its use.
21000
a70083a3
AD
210012000-10-02 Akim Demaille <akim@epita.fr>
21002
21003 * src/reader.h: New file.
21004 Propagate its use instead of tedious list of `extern' and
21005 prototypes.
21006 * src/reader.c: Formatting changes, topological sort,
21007 s/register//.
21008
abadc117
AD
210092000-10-02 Akim Demaille <akim@epita.fr>
21010
21011 * src/lex.h: Prototype `lex.c' exported functions.
21012 * src/reader.c: Adjust.
21013 * src/lex.c: Formatting changes.
21014 (safegetc): Rename as...
21015 (xgetc): this.
21016
720d742f
AD
210172000-10-02 Akim Demaille <akim@epita.fr>
21018
21019 * src/lalr.h: New file.
21020 Propagate its inclusion instead of prototypes and `extern'.
21021 * src/lalr.c: Formatting changes, topological sorting etc.
21022
f2acea59
AD
210232000-10-02 Akim Demaille <akim@epita.fr>
21024
21025 * src/output.c (token_actions): Introduce a temporary array,
21026 YYDEFACT, that makes it possible for this function to use
21027 output_short_table.
21028
d019d655
AD
210292000-10-02 Akim Demaille <akim@epita.fr>
21030
21031 `user_toknums' is output as a `short[]' in `output.c', while it is
21032 defined as a `int[]' in `reader.c'. For consistency with the
21033 other output tables, `user_toknums' is now defined as a table of
21034 shorts.
21035
21036 * src/reader.c (user_toknums): Be a short table instead of an int
21037 table.
21038 Adjust dependencies.
21039
21040 Factor the short table outputs.
21041
21042 * src/output.c (output_short_table): New function.
21043 * src/output.c (output_gram, output_stos, output_rule_data)
21044 (output_base, output_table, output_check): Use it.
21045
6c89f1c1
AD
210462000-10-02 Akim Demaille <akim@epita.fr>
21047
21048 * src/output.c (output): Topological sort of the functions, in
21049 order to get rid of the `static' prototypes.
21050 No longer use `register'.
21051 * src/output.h: New file.
21052 Propagate its inclusion in files explicitly prototyping functions
21053 from output.c.
21054
d9efd181
AD
210552000-09-21 Akim Demaille <akim@epita.fr>
21056
21057 * src/atgeneral.m4: Update from Autoconf.
21058
c29240e7 210592000-09-21 Akim Demaille <akim@epita.fr>
2fa6973e
AD
21060
21061 * src/closure.h: New file.
21062 * src/closure.c: Formatting changes, topological sort over the
21063 functions, use of closure.h.
21064 (initialize_closure, finalize_closure): Rename as...
21065 (new_closure, free_closure): these. Adjust dependencies.
21066 * src/LR0.c: Formatting changes, topological sort, use of
21067 cloture.h.
21068 (initialize_states): Rename as...
21069 (new_states): this.
21070 * src/Makefile.am (noinst_HEADERS): Adjust.
21071
499daa50
AD
210722000-09-20 Akim Demaille <akim@epita.fr>
21073
21074 * src/acconfig.h: Don't protect config.h against multiple
21075 inclusion.
21076 Don't define PARAMS.
21077 * src/system.h: Define PARAMS.
21078 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
21079 purpose of config.h. system.h must not try to fix wrong
21080 definitions in config.h.
21081
cc84fd5d
AD
210822000-09-20 Akim Demaille <akim@epita.fr>
21083
21084 * src/derives.h: New file.
21085 * src/main.c, src/derives.h: Use it.
21086 Formatting changes.
21087 * src/Makefile.am (noinst_HEADERS): Adjust.
21088
db5b3a89
AD
210892000-09-20 Akim Demaille <akim@epita.fr>
21090
21091 * tests/atgeneral.m4: Update from Autoconf.
21092 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
21093 (AT_CHECK_CALC): New macros.
21094 Use these macros to test bison with options `', `--raw',
21095 `--debug', `--yacc', `--yacc --debug'.
21096
ceed8467
AD
210972000-09-19 Akim Demaille <akim@epita.fr>
21098
21099 * src/output.c: Formatting changes.
21100 * src/machine.h: Remove, leaving its contents in...
21101 * src/system.h: here.
21102 Include stdio.h.
21103 Adjust all dependencies on stdio.h and machine.h.
21104 * src/getargs.h: New file.
21105 Let all `extern' declarations about getargs.c be replaced with
21106 inclusion of `getargs.h'.
21107 * src/Makefile.am (noinst_HEADERS): Adjust.
21108
21109 * tests/calc.m4 (yyin): Be initialized in main, not on the global
21110 scope.
21111 (yyerror): Returns void, not int.
21112 * doc/bison.texinfo: Formatting changes.
21113
05a1d24b
AD
211142000-09-19 Akim Demaille <akim@epita.fr>
21115
21116 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
21117 portable.
21118
cbd25751
AD
211192000-09-18 Akim Demaille <akim@epita.fr>
21120
21121 * configure.in: Append WARNING_CFLAGS to CFLAGS.
21122 * src/Makefile.am (INCLUDES): Don't.
21123 Be ready to fetch headers in lib/.
21124
13863333
AD
211252000-09-18 Akim Demaille <akim@epita.fr>
21126
21127 * doc/bison.texinfo: Update the copyright.
21128 ANSIfy and GNUify the examples.
21129 Remove the old menu.
21130
0d533154
AD
211312000-09-18 Akim Demaille <akim@epita.fr>
21132
21133 First set of tests: use the `calc' example from the documentation.
21134
21135 * src/bison.s1 (yyparse): Condition the code using `yytname' which
21136 is defined only when YYDEBUG is.
21137 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
21138 * src/files.c (tryopen, tryclose): Formatting changes.
21139 Move to the top and be static.
21140 * src/reader.c (read_signed_integer): Likewise.
21141 * tests/calc.m4: New file.
21142 * Makefile.am, suite.m4: Adjust.
21143 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
21144
e79137ac
AD
211452000-09-18 Akim Demaille <akim@epita.fr>
21146
21147 Add support for an Autotest test suite for Bison.
21148
21149 * m4/m4.m4, m4/atconfig.m4: New files.
21150 * m4/Makefile.am (EXTRA_DIST): Adjust.
21151 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
21152 files.
21153 * src/getargs.c: Display a more standard --version message.
21154 * src/reader.c (reader): Formatting changes.
21155 No longer depend upon VERSION_STRING.
21156 * configure.in: No longer use `dnl'.
21157 Set up the test suite and the new directory `tests/.
21158 (VERSION_STRING): Remove.
21159
27821bff
AD
211602000-04-14 Akim Demaille <akim@epita.fr>
21161
21162 * src/reader.c (copy_comment2): New function, same as former
21163 `copy_comment', but outputs into two FILE *.
21164 (copy_comment): Use it.
21165 (parse_union_decl): Use it.
21166 (get_type, parse_start_decl): Use the same `invalid' message.
21167 (parse_start_decl, parse_union_decl): Use the same `multiple'
21168 message.
21169 (parse_union_decl, copy_guard, copy_action): Use the same
21170 `unmatched' message.
21171 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
21172
cfe5fbc0
AD
211732000-03-31 Akim Demaille <akim@epita.fr>
21174
21175 * src/files.c (tryopen, tryclose): Move to the top.
21176 Be static.
21177
cb7db13e
AD
211782000-03-31 Akim Demaille <akim@epita.fr>
21179
21180 * src/main.c (main): Don't call `done', exit does it.
21181
a0f6b076
AD
211822000-03-31 Akim Demaille <akim@epita.fr>
21183
36281465
AD
21184 * allocate.c: s/return (foo)/return foo/.
21185 * lalr.c: Likewise.
21186 * LR0.c: Likewise.
21187 * output.c: Likewise.
21188 * reader.c: Likewise.
21189 * symtab.c: Likewise.
21190 * vmsgetargs.c: Likewise.
21191
211922000-03-31 Akim Demaille <akim@epita.fr>
21193
21194 Clean up the error reporting functions.
a0f6b076
AD
21195
21196 * src/report.c: New file.
21197 * src/report.h: Likewise.
21198 * src/Makefile.am: Adjust.
21199 * m4/error.m4: New file.
21200 * m4/Makefile.am: Adjust.
21201 * configure.in (jm_PREREQ_ERROR): Call it.
21202 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
21203 Remove.
21204 (fatal, fatals): Remove. All callers use complain.c::fatal.
21205 (warn, warni, warns, warnss, warnss): Remove. All callers use
21206 complain.c::complain.
21207 (toomany): Remove, use fatal instead.
21208 * src/files.c (done): No argument, use complain_message_count.
21209 * src/main.c (main): Register `done' to `atexit'.
21210
21211 * src/getargs.c (usage): More `fputs', less `fprintf'.
21212
18539825
AD
212132000-03-28 Akim Demaille <akim@epita.fr>
21214
21215 * lib/: New directory.
21216 * Makefile.am (SUBDIRS): Adjust.
21217 * configure.in: Adjust.
21218 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
21219 useless.
21220 * src/alloca.c: Moved to lib/.
21221 * src/getopt.c: Likewise.
21222 * src/getopt1.c: Likewise.
21223 * src/getopt.h: Likewise.
21224 * src/ansi2knr.c: Likewise.
21225 * src/ansi2knr.1: Likewise.
21226 * src/Makefile.am: Adjust.
21227 * lib/Makefile.am: New file.
21228
9f306f2a
AD
212292000-03-28 Akim Demaille <akim@epita.fr>
21230
21231 * src/getargs.c (usage): Refresh the help message.
21232
0ba347b6
AD
212332000-03-17 Akim Demaille <akim@epita.fr>
21234
21235 * src/getopt1.c: Updated from textutils 2.0e
21236 * src/getopt.c: Likewise.
21237 * src/getopt.h: Likewise.
21238
dbe7f271
AD
212392000-03-17 Akim Demaille <akim@epita.fr>
21240
21241 * src/Makefile.am (bison.simple): Fix the awk program: quote only
21242 the file name, not the whole `#line LINE FILE'.
21243
75bbe78d
AD
212442000-03-17 Akim Demaille <akim@epita.fr>
21245
21246 On syntax errors, report the token on which we choked.
21247
aa5fd0ee
AD
21248 * src/bison.s1 (yyparse): In the label yyerrlab, when
21249 YYERROR_VERBOSE, add yychar in msg.
75bbe78d 21250
7b306f52
AD
212512000-03-17 Akim Demaille <akim@epita.fr>
21252
aa5fd0ee 21253 * src/reader.c (copy_at): New function.
7b306f52
AD
21254 (copy_guard): Use it.
21255 (copy_action): Use it.
21256
e87b5700
AD
212572000-03-17 Akim Demaille <akim@epita.fr>
21258
21259 Be kind to translators, save some useless translations.
21260
aa5fd0ee 21261 * src/main.c (banner): New function.
e87b5700
AD
21262 (fatal_banner): Use it.
21263 (warn_banner): Use it.
21264
ae3c3164
AD
212652000-03-17 Akim Demaille <akim@epita.fr>
21266
aa5fd0ee
AD
21267 * src/reader.c (copy_definition): Use copy_string and
21268 copy_comment. Removed now unused `match', `ended',
21269 `cplus_comment'.
ae3c3164
AD
21270 (copy_comment, copy_string): Moved, to be visible from
21271 copy_definition.
21272
4dc58e7c
AD
212732000-03-17 Akim Demaille <akim@epita.fr>
21274
aa5fd0ee
AD
21275 * src/reader.c (copy_string): Declare `static inline'. No
21276 problems with inline, since it is checked by configure.
4dc58e7c
AD
21277 (copy_comment): Likewise.
21278
0a6384c4
AD
212792000-03-17 Akim Demaille <akim@epita.fr>
21280
aa5fd0ee 21281 * src/reader.c (packsymbols): Formatting changes.
0a6384c4 21282
3cef001a
AD
212832000-03-17 Akim Demaille <akim@epita.fr>
21284
aa5fd0ee 21285 * src/reader.c (copy_comment): New function, factored out from:
3cef001a
AD
21286 (copy_action): Use it. Removed now unused `match', `ended',
21287 `cplus_comment'.
21288 (copy_guard): Likewise.
21289
ca36d2ef
AD
212902000-03-17 Akim Demaille <akim@epita.fr>
21291
aa5fd0ee 21292 * src/reader.c (copy_string): New function, factored out from:
ca36d2ef
AD
21293 (copy_action): Use it.
21294 (copy_guard): Likewise.
21295
6666f98f
AD
212962000-03-17 Akim Demaille <akim@epita.fr>
21297
21298 Change the handling of @s so that they behave exactly like $s.
21299 There is now a pseudo variable @$ (readble and writable), location
21300 of the lhs of the rule (by default ranging from the location of
21301 the first symbol of the rhs, to the location of the last symbol,
21302 or, if the rhs is empty, YYLLOC).
21303
21304 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
21305 yyval.
21306 (yyparse): When providing a default semantic action, provide a
21307 default location action.
21308 (after the $): No longer change `*YYLSP', just stack YYLOC the
21309 same way you stack YYVAL.
21310 * src/reader.c (read_declarations): Use warns.
21311 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
21312 (copy_action, case '@'): Likewise.
21313 Use a standard error message, to save useless work from
21314 translators.
21315
41aca2e0
AD
213162000-03-17 Akim Demaille <akim@epita.fr>
21317
aa5fd0ee
AD
21318 * src/bison.s1: Formatting and cosmetics changes.
21319 * src/reader.c: Likewise.
41aca2e0
AD
21320 Update the Copyright notice.
21321
dc08c1d5
AD
213222000-03-17 Akim Demaille <akim@epita.fr>
21323
aa5fd0ee
AD
21324 * src/bison.s1 (#line): All set to `#line' only, since the
21325 Makefile now handles them.
dc08c1d5 21326
9ee3c97b
AD
213272000-03-16 Akim Demaille <akim@epita.fr>
21328
21329 * src/output.c (output_rule_data): Output the documentation of
21330 some of the tables.
21331 (Copyright notice): Update.
21332 Formatting changes.
21333
0de741ca
AD
213342000-03-16 Akim Demaille <akim@epita.fr>
21335
21336 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
21337 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
21338 One `#if YYDEBUG' remains, since it uses variables which are
21339 defined only if `YYDEBUG != 0'.
21340
bb10be54
AD
213412000-03-16 Akim Demaille <akim@epita.fr>
21342
21343 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
21344 and related variables so that the similarities are highlighted.
21345
b07b484a
AD
213462000-03-16 Akim Demaille <akim@epita.fr>
21347
21348 * src/bison.s1: Properly indent CPP directives.
21349
361f60b3
AD
213502000-03-16 Akim Demaille <akim@epita.fr>
21351
21352 * src/bison.s1: Properly indent the `alloca' CPP section.
21353
8c44d3ec
AD
213542000-03-16 Akim Demaille <akim@epita.fr>
21355
21356 Do not hard code values of directories in `configure.in'.
21357 Update the `configure' tool chain.
21358
21359 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
21360 src/makefile.am.
21361 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
21362 (AC_OUTPUT): Add m4/Makefile.
21363 Bump to bison 1.28a, 1.29 has never been released.
21364 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
21365 handled via src/Makefile.am.
21366 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
21367 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
21368 autoheader.
21369 * Makefile.am (SUBDIRS): Add m4.
21370 (ACLOCAL_AM_FLAGS): New variable.
21371 (AUTOMAKE_OPTIONS): Add check-news.
21372 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
21373 the proper line number and file name.
21374 (DEFS): Propagate the location of bison library files and of the
21375 locale files.
21376 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
21377 builddir.
21378 * acinclude.m4: Remove, replaced by the directory m4.
21379 * m4/Makefile.am (EXTRA_DIST): New variable.
21380 * m4/gettext.m4: New file, from the fileutils.
21381 * m4/lcmessage.m4: Likewise
21382 * m4/progtest.m4: Likewise.
21383 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
21384
f95997e7
AD
213852000-03-10 Akim Demaille <akim@epita.fr>
21386
21387 * src/closure.c:
21388 Formatting changes of various comments.
21389 Respect the GNU coding standards at various places.
21390 Don't use `_()' when no translation is needed.
21391
213921999-12-13 Jesse Thilo <jthilo@gnu.org>
21393
21394 * src/files.c:
21395 OS/2 honors TMPDIR environment variable.
21396
213971999-12-13 Jesse Thilo <jthilo@gnu.org>
21398
21399 * doc/bison.texinfo: Tweaked spelling and grammar.
21400 Updated ISBN.
21401 Removed reference to price of printed copy.
21402 Mention BISON_SIMPLE and BISON_HAIRY.
21403
214041999-12-13 Jesse Thilo <jthilo@gnu.org>
21405
21406 * configure.in, NEWS:
21407 Bison 1.29 released.
21408
214091999-10-27 Jesse Thilo <jthilo@gnu.org>
21410
21411 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
21412 Added reference card.
21413
214141999-07-26 Jesse Thilo <jthilo@gnu.org>
21415
21416 * po/ru.po: Added Russian translation.
21417
214181999-07-26 Jesse Thilo <jthilo@gnu.org>
21419
21420 * configure.in: Added Russian translation.
21421
214221999-07-06 Jesse Thilo <jthilo@gnu.org>
21423
21424 * configure.in, NEWS, README:
21425 Released version 1.28.
21426
214271999-06-14 Jesse Thilo <jthilo@gnu.org>
21428
21429 * src/system.h:
21430 Squashed redefinition warning on some systems.
21431
21432 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
21433 Have configure build version string instead of relying on ANSI string
21434 concatentation.
21435
214361999-06-14 Jesse Thilo <jthilo@gnu.org>
21437
21438 * po/POTFILES.in: Got rid of version.c.
21439
214401999-06-14 Jesse Thilo <jthilo@gnu.org>
21441
21442 * acconfig.h, configure.in:
21443 Have configure build version string instead of relying on ANSI string
21444 concatentation.
21445
214461999-06-08 Jesse Thilo <jthilo@gnu.org>
21447
21448 * doc/bison.1:
21449 Dropped mention of `+' for long-named options.
21450
214511999-05-30 Jesse Thilo <jthilo@gnu.org>
21452
21453 * src/files.c: Added <unistd.h> for unlink().
21454
21455 * src/Makefile.am, src/system.h:
21456 I18n fixes.
21457
214581999-05-30 Jesse Thilo <jthilo@gnu.org>
21459
21460 * README: Added a FAQ list.
21461
21462 * configure.in, acconfig.h:
21463 I18n fixes.
21464
214651999-05-30 Jesse Thilo <jthilo@gnu.org>
21466
21467 * doc/FAQ, doc/Makefile.am:
21468 Added a FAQ list.
21469
214701999-05-19 Jesse Thilo <jthilo@gnu.org>
21471
21472 * src/alloc.h, src/symtab.h, src/version.c:
21473 Protected inclusion of "config.h" with HAVE_CONFIG_H.
21474
214751999-04-18 Jesse Thilo <jthilo@gnu.org>
21476
21477 * src/.cvsignore, src/Makefile.am:
21478 Reorganized: sources in `src', documentation in `doc'.
21479
21480 * src/lex.c (literalchar):
21481 fixed the code for escaping double quotes (thanks
21482 Jonathan Czisny.)
21483
214841999-04-18 Jesse Thilo <jthilo@gnu.org>
21485
21486 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
21487 Adjusted paths to reflect directory reorganization.
21488
214891999-04-18 Jesse Thilo <jthilo@gnu.org>
21490
21491 * doc/.cvsignore, doc/Makefile.am:
21492 Reorganized: sources in `src', documentation in `doc'.
21493
214941999-04-18 Jesse Thilo <jthilo@gnu.org>
21495
21496 * configure.in:
21497 Updated AC_INIT file to reflect directory reorganization.
21498
21499 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
21500 Reorganized: sources in `src', documentation in `doc'.
21501
215021999-04-13 Jesse Thilo <jthilo@gnu.org>
21503
21504 * src/allocate.c:
21505 Don't declare calloc() and realloc() if not necessary.
21506
215071999-04-13 Jesse Thilo <jthilo@gnu.org>
21508
21509 * configure.in, acconfig.h, acinclude.m4:
21510 Don't declare calloc() and realloc() if not necessary.
21511
215121999-03-23 Jesse Thilo <jthilo@gnu.org>
21513
21514 * po/.cvsignore: Added i18n support.
21515
215161999-03-23 Jesse Thilo <jthilo@gnu.org>
21517
21518 * acconfig.h, configure.in, Makefile.am:
21519 Added i18n support.
21520
215211999-03-22 Jesse Thilo <jthilo@gnu.org>
21522
21523 * src/bison.s1: Fixed #line numbers.
21524
215251999-03-15 Jesse Thilo <jthilo@gnu.org>
21526
21527 * po/es.po, po/fr.po, po/nl.po, po/de.po:
21528 Added PO files from Translation Project.
21529
215301999-03-03 Jesse Thilo <jthilo@gnu.org>
21531
21532 * Makefile.am:
21533 Added support for non-ANSI compilers (ansi2knr).
21534
215351999-02-16 Jesse Thilo <jthilo@gnu.org>
21536
21537 * configure.in: Bumped version number to 1.27.
21538
21539 * Makefile.am:
21540 Added `bison.simple' to list of files removed by `make distclean'.
21541
215421999-02-12 Jesse Thilo <jthilo@gnu.org>
21543
21544 * src/files.c, src/files.h:
21545 Defined locations of parser files in config.h instead of Makefile.
21546
215471999-02-12 Jesse Thilo <jthilo@gnu.org>
21548
21549 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
21550 Defined locations of parser files in config.h instead of Makefile.
21551
215521999-02-09 Jesse Thilo <jthilo@gnu.org>
21553
21554 * Makefile.am:
21555 Removed inappropriate use of $< macro.
21556
215571999-02-05 Jesse Thilo <jthilo@gnu.org>
21558
21559 * po/Makefile.in.in, po/POTFILES.in:
21560 Add `po' directory skeleton.
21561
215621999-01-27 Jesse Thilo <jthilo@gnu.org>
21563
21564 * README: Document help-bison list.
21565
21566 * configure.in: Add check for mkstemp().
21567
215681999-01-20 Jesse Thilo <jthilo@gnu.org>
21569
21570 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
21571 Hush a few compiler warnings.
21572
21573 * src/files.c:
21574 Add tryclose(), which verifies that fclose was successful.
21575 Hush a couple of compiler warnings.
21576
215771999-01-20 Jesse Thilo <jthilo@gnu.org>
21578
21579 * Makefile.am, OChangeLog:
21580 ChangeLog is now automatically generated. Include the old version as
21581 OChangeLog.
21582
215831999-01-14 Jesse Thilo <jthilo@gnu.org>
21584
21585 * 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:
21586 Update FSF address.
21587
215881999-01-14 Jesse Thilo <jthilo@gnu.org>
21589
21590 * doc/bison.texinfo: Fix formatting glitch.
21591
21592 * doc/bison.texinfo: Update FSF address.
21593
215941999-01-14 Jesse Thilo <jthilo@gnu.org>
21595
21596 * acconfig.h: Update FSF address.
21597
215981999-01-08 Jesse Thilo <jthilo@gnu.org>
21599
21600 * src/system.h:
21601 Don't define PACKAGE here, since config.h defines it.
21602
216031998-12-30 Jesse Thilo <jthilo@gnu.org>
21604
21605 * src/reader.c: Update copyright date.
21606
21607 * src/main.c:
21608 Ditch sprintf to statically-sized buffers in fatal/warn functions in
21609 favor of output directly to stderr (avoids buffer overruns).
21610
21611 * src/reader.c: Some checks for premature EOF.
21612
21613 * 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:
21614 Use prototypes if the compiler understands them.
21615
21616 * src/files.c: Honor TMPDIR on Unix hosts.
21617 Use prototypes if the compiler understands them.
21618
21619 * src/reader.c:
21620 Fix a couple of buffer overrun bugs.
21621 Use prototypes if the compiler understands them.
21622
21623 * src/system.h: Include unistd.h and ctype.h.
21624 Use #ifdef instead of #if for NLS symbols.
21625
216261998-12-30 Jesse Thilo <jthilo@gnu.org>
21627
21628 * doc/bison.texinfo:
21629 Delete comment "consider using @set for edition number, etc..." since
21630 we now are doing so.
21631
216321998-12-30 Jesse Thilo <jthilo@gnu.org>
21633
21634 * configure.in:
21635 Use prototypes if the compiler understands them.
21636
21637 * NEWS: Document 1.26 highlights.
21638
21639 * Makefile.am: Require Automake 1.3 or later.
21640
21641 * acconfig.h:
21642 Use prototypes if the compiler understands them.
21643
216441998-12-29 Jesse Thilo <jthilo@gnu.org>
21645
21646 * src/version.c:
21647 Use VERSION symbol from automake for version number.
21648
216491998-12-29 Jesse Thilo <jthilo@gnu.org>
21650
21651 * acconfig.h, configure.in, version.cin:
21652 Use VERSION symbol from automake for version number.
21653
216541998-11-28 Jesse Thilo <jthilo@gnu.org>
21655
21656 * Makefile.am:
21657 Distribute original version of simple parser (bison.s1), not built
21658 version (bison.simple).
21659
216601998-11-28 Jesse Thilo <jthilo@gnu.org>
21661
21662 * doc/bison.texinfo: Add info dir entry.
21663
21664 * doc/bison.texinfo:
21665 Let automake put version number into documentation.
21666
216671998-11-26 Jesse Thilo <jthilo@gnu.org>
21668
21669 * src/bison.cld, src/build.com, src/vmshlp.mar:
21670 Add non-RCS files from /gd/gnu/bison.
21671
216721998-11-26 Jesse Thilo <jthilo@gnu.org>
21673
21674 * doc/bison.1:
21675 Document the BISON_HAIRY and BISON_SIMPLE variables.
21676
216771998-11-25 Jesse Thilo <jthilo@gnu.org>
21678
21679 * src/version.c: Build version.c automatically.
21680
21681 * src/reader.c:
21682 Fix token numbering (used to start at 258, not 257).
21683
21684 * src/system.h: Include config.h.
21685
21686 * src/getargs.c: Update bug report address.
21687
21688 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
21689 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
21690
216911998-11-25 Jesse Thilo <jthilo@gnu.org>
21692
21693 * Makefile.am:
21694 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
21695
21696 * configure.in, version.cin:
21697 Build version.c automatically.
21698
21699 * AUTHORS: Add AUTHORS file.
21700
21701 * README: Update bug report address.
21702
21703 * bison.simple:
21704 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
21705
21706 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
21707 Add automake stuff.
21708
217091998-11-25 Jesse Thilo <jthilo@gnu.org>
21710
21711 * doc/bison.texinfo: Clean up some formatting.
21712
217131998-05-05 Richard Stallman <rms@gnu.org>
21714
21715 * doc/bison.texinfo:
21716 Explain better why to make a pure parser.
21717
217181998-01-05 Richard Stallman <rms@gnu.org>
21719
21720 * src/files.c (openfiles):
21721 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
21722 find a temporary directory, if possible. Do not unlink files while
21723 they are open.
21724
217251997-08-25 Richard Stallman <rms@gnu.org>
21726
21727 * src/reader.c (stack_offset;):
21728 Change some warni to warns.
21729
21730 * src/lex.c (literalchar): Use warns, not warni.
21731
217321997-06-28 Richard Stallman <rms@gnu.org>
21733
21734 * src/bison.s1: Add a Bison version comment.
21735
21736 * src/main.c (fatal, warn, berror):
21737 Use program_name.
21738
217391997-06-28 Richard Stallman <rms@gnu.org>
21740
21741 * Makefile.in (bison_version): New variable.
21742 (dist): Use that variable.
21743 (bison.s1): Substitute the Bison version into bison.simple.
21744
21745 * bison.simple: Add a Bison version comment.
21746
217471997-06-18 Richard Stallman <rms@gnu.org>
21748
21749 * src/main.c (fatal, warn, berror):
21750 Make error messages standard.
21751 (toomany): Improve error message text.
21752
21753 * 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:
21754 new.h renamed to alloc.h.
21755
217561997-06-18 Richard Stallman <rms@gnu.org>
21757
21758 * Makefile.in: new.h renamed to alloc.h.
21759
217601997-05-24 Richard Stallman <rms@gnu.org>
21761
21762 * src/lex.c (literalchar):
21763 Fix the code for escaping \, " and '.
21764
21765 (lex): Avoid trouble when there are many chars
21766 to discard in a char literal with just several chars in it.
21767
217681997-05-17 Richard Stallman <rms@gnu.org>
21769
21770 * src/bison.s1:
21771 Use malloc, if using alloca is troublesome.
21772 (YYSTACK_USE_ALLOCA): New flag macro.
21773 Define it for some systems and compilers.
21774 (YYSTACK_ALLOC): New macro.
21775 (yyparse): Use YYSTACK_ALLOC to allocate stack.
21776 If it was malloc'd, free it.
21777
217781997-05-17 Richard Stallman <rms@gnu.org>
21779
21780 * bison.simple:
21781 Use malloc, if using alloca is troublesome.
21782 (YYSTACK_USE_ALLOCA): New flag macro.
21783 Define it for some systems and compilers.
21784 (YYSTACK_ALLOC): New macro.
21785 (yyparse): Use YYSTACK_ALLOC to allocate stack.
21786 If it was malloc'd, free it.
21787
217881997-04-23 Richard Stallman <rms@gnu.org>
21789
21790 * src/bison.s1:
21791 (alloca) [__hpux]: Always define as __builtin_alloca.
21792
217931997-04-23 Richard Stallman <rms@gnu.org>
21794
21795 * bison.simple:
21796 (alloca) [__hpux]: Always define as __builtin_alloca.
21797
217981997-04-22 Richard Stallman <rms@gnu.org>
21799
21800 * src/bison.s1:
21801 [__hpux]: Include alloca.h (right for HPUX 10)
21802 instead of declaring alloca (right for HPUX 9).
21803
21804 * src/bison.s1 (__yy_memcpy):
21805 Declare arg `count' as unsigned int.
21806 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
21807
218081997-04-22 Richard Stallman <rms@gnu.org>
21809
21810 * bison.simple:
21811 [__hpux]: Include alloca.h (right for HPUX 10)
21812 instead of declaring alloca (right for HPUX 9).
21813
21814 * bison.simple (__yy_memcpy):
21815 Declare arg `count' as unsigned int.
21816 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
21817
218181997-01-03 Richard Stallman <rms@gnu.org>
21819
21820 * src/allocate.c: [__STDC__ or _MSC_VER]:
21821 Declare calloc and realloc to return void *.
21822
218231997-01-02 Richard Stallman <rms@gnu.org>
21824
21825 * src/system.h:
21826 [_MSC_VER]: Include stdlib.h and process.h.
21827 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
21828
21829 * src/main.c (main): Return FAILURE as a value.
21830 (printable_version): Declare arg as int, not char.
21831
218321997-01-02 Richard Stallman <rms@gnu.org>
21833
21834 * Makefile.in (dist):
21835 Explicitly check for symlinks, and copy them.
21836
218371996-12-19 Richard Stallman <rms@gnu.org>
21838
21839 * src/files.c:
21840 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
21841
218421996-12-18 Paul Eggert <eggert@gnu.org>
21843
21844 * src/bison.s1 (yyparse):
21845 If __GNUC__ and YYPARSE_PARAM are both defined,
21846 declare yyparse to have a void * argument.
21847
218481996-12-18 Paul Eggert <eggert@gnu.org>
21849
21850 * bison.simple (yyparse):
21851 If __GNUC__ and YYPARSE_PARAM are both defined,
21852 declare yyparse to have a void * argument.
21853
218541996-12-17 Richard Stallman <rms@gnu.org>
21855
21856 * src/reduce.c (nbits): Add some casts.
21857
218581996-08-12 Richard Stallman <rms@gnu.org>
21859
21860 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
21861
218621996-08-12 Richard Stallman <rms@gnu.org>
21863
21864 * bison.simple: Test _MSDOS as well as _MSDOS_.
21865
218661996-07-31 Richard Stallman <rms@gnu.org>
21867
21868 * src/bison.s1:
21869 [__sun && __i386]: Include alloca.h.
21870
218711996-07-31 Richard Stallman <rms@gnu.org>
21872
21873 * bison.simple:
21874 [__sun && __i386]: Include alloca.h.
21875
218761996-07-30 Richard Stallman <rms@gnu.org>
21877
21878 * src/bison.s1: Comment change.
21879
21880 * src/bison.s1: Test _MSDOS_, not MSDOS.
21881
218821996-07-30 Richard Stallman <rms@gnu.org>
21883
21884 * bison.simple: Comment change.
21885
21886 * bison.simple: Test _MSDOS_, not MSDOS.
21887
218881996-06-01 Richard Stallman <rms@gnu.org>
21889
21890 * 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:
21891 Insert `_' macro around many string constants.
21892
21893 * src/main.c:
21894 Insert `_' macro around many string constants.
21895
21896 (main): Call setlocale, bindtextdomain and textdomain.
21897
21898 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
21899 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
21900 [ENABLE_NLS]: Include libintl.h.
21901 [ENABLE_NLS] (gettext): Define.
21902 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
21903 (N_, PACKAGE, LOCALEDIR): New macros.
21904
219051996-06-01 Richard Stallman <rms@gnu.org>
21906
21907 * POTFILES.in: New file.
21908
21909 * Makefile.in (allocate.o):
21910 Define target explicitly.
21911
21912 * Makefile.in (CFLAGS): Set to @CFLAGS@.
21913 (LDFLAGS): Set to @LDFLAGS@.
21914 (configure): Run autoconf only if preceding `cd' succeeds.
21915 (bison.s1): Redirect output to temporary file then move the
21916 temporary to the target, rather than redirecting directly to bison.s1.
21917 (clean): Remove config.status and config.log.
21918 (distclean): Don't remove config.status here.
21919
219201996-05-12 Richard Stallman <rms@gnu.org>
21921
21922 * src/bison.s1:
21923 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
21924
219251996-05-12 Richard Stallman <rms@gnu.org>
21926
21927 * bison.simple:
21928 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
21929
219301996-05-11 Richard Stallman <rms@gnu.org>
21931
21932 * src/bison.s1 (__yy_memcpy):
21933 Really reorder the args, as was supposedly done on Feb 14 1995.
21934 (yyparse): Calls changed accordingly.
21935
219361996-05-11 Richard Stallman <rms@gnu.org>
21937
21938 * Makefile.in (dist): Don't use $(srcdir).
21939
21940 * bison.simple (__yy_memcpy):
21941 Really reorder the args, as was supposedly done on Feb 14 1995.
21942 (yyparse): Calls changed accordingly.
21943
219441996-01-27 Richard Stallman <rms@gnu.org>
21945
21946 * src/output.c (output_rule_data):
21947 Test YYERROR_VERBOSE in the conditional
21948 around the definition of ttyname.
21949
219501995-12-29 Richard Stallman <rms@gnu.org>
21951
21952 * src/bison.s1:
21953 Fix line numbers in #line commands.
21954
219551995-12-29 Richard Stallman <rms@gnu.org>
21956
21957 * bison.simple:
21958 Fix line numbers in #line commands.
21959
219601995-12-27 Richard Stallman <rms@gnu.org>
21961
21962 * src/bison.s1 (YYPARSE_PARAM_DECL):
21963 In C++, make it always null.
21964 (YYPARSE_PARAM_ARG): New macro.
21965 (yyparse): Use YYPARSE_PARAM_ARG.
21966
219671995-12-27 Richard Stallman <rms@gnu.org>
21968
21969 * bison.simple (YYPARSE_PARAM_DECL):
21970 In C++, make it always null.
21971 (YYPARSE_PARAM_ARG): New macro.
21972 (yyparse): Use YYPARSE_PARAM_ARG.
21973
219741995-11-29 Richard Stallman <rms@gnu.org>
21975
21976 * doc/bison.texinfo:
21977 Describe literal string tokens, %raw, %no_lines, %token_table.
21978
219791995-11-29 Daniel Hagerty <hag@gnu.org>
21980
21981 * doc/bison.texinfo: Fixed update date
21982
219831995-10-16 Richard Stallman <rms@gnu.org>
21984
21985 * src/version.c: Version 1.25.
21986
219871995-10-16 Richard Stallman <rms@gnu.org>
21988
21989 * NEWS: *** empty log message ***
21990
219911995-10-16 Richard Stallman <rms@gnu.org>
21992
21993 * doc/bison.1, doc/bison.rnh:
21994 Add new options.
21995
219961995-10-15 Richard Stallman <rms@gnu.org>
21997
21998 * src/vmsgetargs.c, src/getargs.c:
21999 Added -n, -k, and -raw switches.
22000 (noparserflag, toknumflag, rawtoknumflag): New variables.
22001
22002 * src/symtab.h (SALIAS):
22003 New #define for adding aliases to %token.
22004 (struct bucket): Added `alias' field.
22005
22006 * src/reduce.c (reduce_grammar):
22007 Revise error message.
22008 (print_notices): Remove final `.' from error message.
22009
22010 * src/reader.c (reader_output_yylsp):
22011 New function.
22012 (readgram): Use `#if 0' around code that accepted %command
22013 inside grammar rules: The documentation doesn't allow it,
22014 and it will fail since the %command processors scan for the next %.
22015 (parse_token_decl): Extended the %token
22016 declaration to allow a multi-character symbol as an alias.
22017 (parse_thong_decl): New function.
22018 (read_declarations): Added %thong declarations.
22019 (read_declarations): Handle NOOP to deal with allowing
22020 % declarations as another means to specify the flags.
22021 (readgram): Allow %prec prior to semantics embedded in a rule.
22022 (skip_to_char, read_declarations, copy_definition)
22023 (parse_token_decl, parse_start_decl, parse_type_decl)
22024 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
22025 (get_type_name, copy_guard, copy_action, readgram)
22026 (get_type, packsymbols): Revised most error messages.
22027 Changed `fatal' to `warnxxx' to avoid aborting for error.
22028 Revised and use multiple warnxxx functions to avoid using VARARGS1.
22029 (read_declarations): Improve the error message for
22030 an invalid character. Do not abort.
22031 (read_declarations, copy_guard, copy_action): Use
22032 printable_version to avoid unprintable characters in printed output.
22033 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
22034 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
22035 Allow the type of a non-terminal can be given
22036 more than once, as long as all specifications give the same type.
22037
22038 * src/output.c:
22039 (output_headers, output_trailers, output, output_gram)
22040 (output_rule_data): Implement noparserflag variable.
22041 Implement toknumflag variable.
22042 (output): Call reader_output_yylsp to output LTYPESTR.
22043
22044 * src/main.c (main):
22045 If reader sees an error, don't process the grammar.
22046 (fatals): Updated to not use VARARGS1.
22047 (printable_version, int_to_string, warn, warni, warns, warnss)
22048 (warnsss): New error reporting functions. Avoid abort for error.
22049
22050 * src/lex.h:
22051 Added THONG and NOOP for alias processing.
22052 Added SETOPT for the new code that allows setting options with %flags.
22053
22054 * src/lex.c:
22055 Include getopt.h. Add some extern decls.
22056 (safegetc): New function to deal with EOF gracefully.
22057 (literalchar); new function to deal with reading \ escapes.
22058 (lex): Use literalchar.
22059 (lex): Implemented "..." tokens.
22060 (literalchar, lex, parse_percent_token): Made tokenbuffer
22061 always contain the token. This includes growing the token
22062 buffer while reading an integer.
22063 (parse_percent_token): Replaced if-else statement with percent_table.
22064 (parse_percent_token): Added % declarations as another
22065 way to specify the flags -n, -l, and -r. Also added hooks for
22066 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
22067 major changes to files.c.
22068 (lex) Retain in the incoming stream a character following
22069 an incorrect '/'.
22070 (skip_white_space, lex): Revised most error messages
22071 and changed fatal to warn to avoid aborting.
22072 (percent_table): Added %thong declarations.
22073
22074 * src/gram.h: Comment changes.
22075
22076 * src/files.c (openfiles, open_extra_files, done):
22077 Add faction flag
22078 and actfile file. Handle noparserflag. Both for -n switch.
22079
22080 * src/conflicts.c (resolve_sr_conflict):
22081 Remove use of alloca.
22082
220831995-06-01 Jim Meyering <meyering@gnu.org>
22084
22085 * doc/bison.texinfo: *** empty log message ***
22086
220871995-05-06 Richard Stallman <rms@gnu.org>
22088
22089 * src/bison.s1: Comment change.
22090
220911995-05-06 Richard Stallman <rms@gnu.org>
22092
22093 * bison.simple: Comment change.
22094
220951995-05-03 Richard Stallman <rms@gnu.org>
22096
22097 * src/version.c: Version now 1.24.
22098
22099 * src/bison.s1: Change distribution terms.
22100
22101 * src/version.c: Version now 1.23.
22102
221031995-05-03 Richard Stallman <rms@gnu.org>
22104
22105 * doc/bison.texinfo:
22106 Rewrite "Conditions for Using Bison".
22107 Update version to 1.24.
22108
221091995-05-03 Richard Stallman <rms@gnu.org>
22110
22111 * bison.simple: Change distribution terms.
22112
221131995-02-23 Richard Stallman <rms@gnu.org>
22114
22115 * src/files.c: Test __VMS_POSIX as well as VMS.
22116
221171995-02-14 Jim Meyering <meyering@gnu.org>
22118
22119 * src/bison.s1 (__yy_memcpy):
22120 Renamed from __yy_bcopy to avoid
22121 confusion. Reverse FROM and TO arguments to be consistent with
22122 those of memcpy.
22123
221241995-02-14 Jim Meyering <meyering@gnu.org>
22125
22126 * bison.simple (__yy_memcpy):
22127 Renamed from __yy_bcopy to avoid
22128 confusion. Reverse FROM and TO arguments to be consistent with
22129 those of memcpy.
22130
221311994-11-10 David J. MacKenzie <djm@gnu.org>
22132
22133 * NEWS: reformat
22134
22135 * NEWS: New file.
22136
22137 * Makefile.in (DISTFILES): Include NEWS.
22138
22139 * Makefile.in (DISTFILES):
22140 Include install-sh, not install.sh.
22141
22142 * configure.in: Update to Autoconf v2 macro names.
22143
221441994-10-05 David J. MacKenzie <djm@gnu.org>
22145
22146 * Makefile.in: fix typo
22147
22148 * Makefile.in (prefix, exec_prefix):
22149 Let configure set them.
22150
221511994-09-28 David J. MacKenzie <djm@gnu.org>
22152
22153 * Makefile.in: Set datadir to $(prefix)/share.
22154
221551994-09-15 Richard Stallman <rms@gnu.org>
22156
22157 * src/bison.s1:
22158 Update copyright notice and GPL version.
22159
221601994-09-15 Richard Stallman <rms@gnu.org>
22161
22162 * bison.simple:
22163 Update copyright notice and GPL version.
22164
221651994-07-12 Richard Stallman <rms@gnu.org>
22166
22167 * src/reduce.c, src/reader.c:
22168 entered into RCS
22169
221701994-05-05 David J. MacKenzie <djm@gnu.org>
22171
22172 * Makefile.in: entered into RCS
22173
221741994-03-26 Richard Stallman <rms@gnu.org>
22175
22176 * src/bison.s1: entered into RCS
22177
221781994-03-26 Richard Stallman <rms@gnu.org>
22179
22180 * bison.simple: entered into RCS
22181
221821994-03-25 Richard Stallman <rms@gnu.org>
22183
22184 * src/main.c: entered into RCS
22185
221861994-03-24 Richard Stallman <rms@gnu.org>
22187
22188 * src/conflicts.c: entered into RCS
22189
221901994-01-02 Richard Stallman <rms@gnu.org>
22191
22192 * Makefile.in: *** empty log message ***
22193
221941993-11-21 Richard Stallman <rms@gnu.org>
22195
22196 * src/bison.s1: *** empty log message ***
22197
221981993-11-21 Richard Stallman <rms@gnu.org>
22199
22200 * doc/bison.texinfo: entered into RCS
22201
22202 * doc/bison.texinfo: *** empty log message ***
22203
222041993-11-21 Richard Stallman <rms@gnu.org>
22205
22206 * bison.simple: *** empty log message ***
22207
222081993-10-25 David J. MacKenzie <djm@gnu.org>
22209
22210 * doc/bison.texinfo: *** empty log message ***
22211
222121993-10-19 Richard Stallman <rms@gnu.org>
22213
22214 * src/bison.s1: *** empty log message ***
22215
222161993-10-19 Richard Stallman <rms@gnu.org>
22217
22218 * bison.simple: *** empty log message ***
22219
222201993-10-14 Richard Stallman <rms@gnu.org>
22221
22222 * src/bison.s1: *** empty log message ***
22223
222241993-10-14 Richard Stallman <rms@gnu.org>
22225
22226 * bison.simple: *** empty log message ***
22227
222281993-09-14 David J. MacKenzie <djm@gnu.org>
22229
22230 * doc/bison.texinfo: *** empty log message ***
22231
222321993-09-13 Noah Friedman <friedman@gnu.org>
22233
22234 * Makefile.in: *** empty log message ***
22235
222361993-09-10 Richard Stallman <rms@gnu.org>
22237
22238 * src/conflicts.c: *** empty log message ***
22239
22240 * src/system.h: entered into RCS
22241
222421993-09-10 Richard Stallman <rms@gnu.org>
22243
22244 * doc/bison.1: entered into RCS
22245
222461993-09-06 Noah Friedman <friedman@gnu.org>
22247
22248 * src/version.c: entered into RCS
22249
222501993-09-06 Noah Friedman <friedman@gnu.org>
22251
22252 * Makefile.in: *** empty log message ***
22253
222541993-07-30 David J. MacKenzie <djm@gnu.org>
22255
22256 * Makefile.in: *** empty log message ***
22257
222581993-07-24 Richard Stallman <rms@gnu.org>
22259
22260 * src/bison.s1: *** empty log message ***
22261
222621993-07-24 Richard Stallman <rms@gnu.org>
22263
22264 * bison.simple: *** empty log message ***
22265
222661993-07-08 David J. MacKenzie <djm@gnu.org>
22267
22268 * Makefile.in: *** empty log message ***
22269
222701993-07-04 Richard Stallman <rms@gnu.org>
22271
22272 * src/bison.s1: *** empty log message ***
22273
222741993-07-04 Richard Stallman <rms@gnu.org>
22275
22276 * bison.simple: *** empty log message ***
22277
222781993-06-26 David J. MacKenzie <djm@gnu.org>
22279
22280 * src/getargs.c: entered into RCS
22281
222821993-06-26 David J. MacKenzie <djm@gnu.org>
22283
22284 * doc/bison.texinfo: *** empty log message ***
22285
22286 * doc/bison.1: New file.
22287
222881993-06-25 Richard Stallman <rms@gnu.org>
22289
22290 * src/getargs.c: New file.
22291
222921993-06-16 Richard Stallman <rms@gnu.org>
22293
22294 * src/bison.s1: *** empty log message ***
22295
222961993-06-16 Richard Stallman <rms@gnu.org>
22297
22298 * bison.simple: *** empty log message ***
22299
223001993-06-03 Richard Stallman <rms@gnu.org>
22301
22302 * src/bison.s1: New file.
22303
223041993-06-03 Richard Stallman <rms@gnu.org>
22305
22306 * doc/bison.texinfo: *** empty log message ***
22307
223081993-06-03 Richard Stallman <rms@gnu.org>
22309
22310 * bison.simple: New file.
22311
223121993-05-19 Richard Stallman <rms@gnu.org>
22313
22314 * doc/bison.texinfo: New file.
22315
223161993-05-07 Noah Friedman <friedman@gnu.org>
22317
22318 * Makefile.in: *** empty log message ***
22319
223201993-04-28 Noah Friedman <friedman@gnu.org>
22321
22322 * src/reader.c: *** empty log message ***
22323
223241993-04-23 Noah Friedman <friedman@gnu.org>
22325
22326 * src/alloc.h: entered into RCS
22327
223281993-04-20 David J. MacKenzie <djm@gnu.org>
22329
22330 * src/version.c: *** empty log message ***
22331
22332 * src/files.c, src/allocate.c:
22333 entered into RCS
22334
22335 * src/reader.c: *** empty log message ***
22336
22337 * src/lex.c: entered into RCS
22338
22339 * src/conflicts.c: New file.
22340
22341 * src/symtab.c: entered into RCS
22342
22343 * src/alloc.h: New file.
22344
22345 * src/LR0.c: entered into RCS
22346
223471993-04-18 Noah Friedman <friedman@gnu.org>
22348
22349 * src/reader.c: New file.
22350
22351 * src/version.c: *** empty log message ***
22352
223531993-04-18 Noah Friedman <friedman@gnu.org>
22354
22355 * Makefile.in: *** empty log message ***
22356
223571993-04-17 Noah Friedman <friedman@gnu.org>
22358
22359 * Makefile.in: *** empty log message ***
22360
223611993-04-15 Richard Stallman <rms@gnu.org>
22362
22363 * src/main.c, src/files.c:
22364 New file.
22365
223661993-04-15 Noah Friedman <friedman@gnu.org>
22367
22368 * configure.in: entered into RCS
22369
22370 * configure.in: *** empty log message ***
22371
22372 * configure.in: New file.
22373
223741993-04-14 Richard Stallman <rms@gnu.org>
22375
22376 * Makefile.in: New file.
22377
223781993-04-13 Richard Stallman <rms@gnu.org>
22379
22380 * src/version.c: New file.
22381
223821993-03-25 Richard Stallman <rms@gnu.org>
22383
22384 * src/output.c: entered into RCS
22385
223861992-09-25 Richard Stallman <rms@gnu.org>
22387
22388 * configure.bat: entered into RCS
22389
223901992-06-22 Richard Stallman <rms@gnu.org>
22391
22392 * src/vmsgetargs.c: entered into RCS
22393
223941992-06-22 Richard Stallman <rms@gnu.org>
22395
22396 * doc/bison.rnh: entered into RCS
22397
223981992-04-20 David J. MacKenzie <djm@gnu.org>
22399
22400 * README: entered into RCS
22401
224021992-01-22 Richard Stallman <rms@gnu.org>
22403
22404 * src/machine.h: entered into RCS
22405
224061991-12-21 Richard Stallman <rms@gnu.org>
22407
22408 * src/lalr.c, src/closure.c:
22409 entered into RCS
22410
224111991-12-20 Richard Stallman <rms@gnu.org>
22412
22413 * src/state.h: entered into RCS
22414
224151991-12-18 Richard Stallman <rms@gnu.org>
22416
22417 * src/print.c, src/nullable.c, src/derives.c:
22418 entered into RCS
22419
224201991-11-03 David J. MacKenzie <djm@gnu.org>
22421
22422 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
22423 entered into RCS
22424
224251988-09-09 Richard Stallman <rms@gnu.org>
22426
22427 * src/bison.hairy: entered into RCS
22428
224291987-12-16 Richard Stallman <rms@gnu.org>
22430
22431 * REFERENCES: entered into RCS
dc546b0f 22432
f294a2c2 22433
04098407 22434 -----
f294a2c2 22435
04098407 22436 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
f490771b
JD
22437 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
22438 2007, 2008, 2009 Free Software Foundation, Inc.
f294a2c2 22439
04098407
PE
22440 Copying and distribution of this file, with or without
22441 modification, are permitted provided the copyright notice and this
22442 notice are preserved.