]> git.saurik.com Git - bison.git/blame - ChangeLog
i18n: fix untranslatable string.
[bison.git] / ChangeLog
CommitLineData
e0fda26c
JD
12010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
2
3 i18n: fix untranslatable string.
4 Reported by Goran Uddeborg at
5 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00000.html>.
6 * src/muscle-tab.c (muscle_percent_define_insert): Here.
7
ecbca7db
AD
82010-04-13 Akim Demaille <demaille@gostai.com>
9
10 tests: calc: minor refactoring.
11 * tests/calc.at (_AT_DATA_CALC_Y): Simplify yylex.
12
ed228e60
AD
132010-04-13 Akim Demaille <demaille@gostai.com>
14
15 tests: calc: simplify location management.
16 * tests/local.at (AT_LOC_PUSHDEF, AT_LOC_POPDEF): New.
17 (_AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS): Use them to
18 define the appropriate AT_LOC accessors.
19 * tests/calc.at: Use AT_LOC accessors.
20
cacfdef7
AD
212010-04-13 Akim Demaille <demaille@gostai.com>
22
23 test location_type.
24 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS):
25 Define AT_LOCATION_TYPE_IF.
26 (_AT_BISON_OPTION_POPDEFS): Undefine AT_LOCATION_TYPE_IF.
27 * tests/calc.at (_AT_DATA_CALC_Y): When %define location_type is
28 used, provide a user location type and use it.
29 (Simple LALR1 C++ Calculator): Add a test case for location_type.
30
2f61c4a2
AD
312010-04-13 Akim Demaille <demaille@gostai.com>
32
33 tests: check fclose's return value.
34 * tests/calc.at (_AT_DATA_CALC_Y): Check fclose's return status.
35
16d9244d
AD
362010-04-13 Akim Demaille <demaille@gostai.com>
37
38 tests: don't depend on the actual location type.
39 * tests/calc.at: Use yy::parser::location_type rather than
40 yy::location, since the former is always right, and might point to
41 another type than the latter.
42
3e4a253b
AD
432010-04-13 Akim Demaille <demaille@gostai.com>
44
45 formatting changes.
46 * tests/calc.at: Formatting changes.
47
df5df58d
AD
482010-04-13 Akim Demaille <demaille@gostai.com>
49
50 lalr1.cc: remove useless forward declaration.
51 * data/lalr1.cc: Include location.hh before stack.hh.
52 Remove the useless forward declarations of position and location.
53 Reported by Chris Morley.
54 * data/glr.cc: Likewise.
55
88bb35d6
JD
562010-04-11 Joel E. Denny <joeldenny@joeldenny.org>
57
58 * NEWS (2.4.3): Mention fix for Sun Studio C++.
59
585ef2eb
JD
602010-04-10 Joel E. Denny <joeldenny@joeldenny.org>
61
62 tests: fix for newer Sun Studio C++.
63 Reported by Dagobert Michelsen at
64 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00023.html>.
65 * THANKS (Dagobert Michelsen): Add.
66 * configure.ac (AC_PREREQ): Set to 2.64 so we get the latest
67 Autoconf macro for handling the restrict keyword.
68 * gnulib: Update to latest, which no longer overrides that macro
69 from Autoconf.
70
a005dbcb
JD
712010-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
72
73 portability: fix pointer arithmetic to conform to C standard.
74 Reported by Tys Lefering at
75 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00035.html>.
76 This fix is already implemented in glr.c and does not apply to
77 lalr1.java.
78 * data/lalr1.cc (yy::parser::parse): Increase size of
79 yyerror_range and adjust subscripting so you don't have to
80 subtract one from the beginning of the array.
81 * data/yacc.c (b4_declare_parser_state_variables,
82 yyparse, yypush_parse): Likewise.
83
8a8b33e8
AD
842010-04-05 Akim Demaille <demaille@gostai.com>
85
86 remove useless include.
87 * src/graphviz.h: Don't include stdbool.h.
88
a0279765
AD
892010-04-05 Akim Demaille <demaille@gostai.com>
90
91 graph: sign the output file.
92 * src/graphviz.c (start_graph): Issue comments about Bison.
93 Suggested by Tys Lefering.
94
132247cd
JD
952010-03-31 Joel E. Denny <jdenny@ces.clemson.edu>
96
97 portability: fix test suite for GCC 4.5's new #error message.
98 Reported by Tys Lefering at
99 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00030.html>.
100 * NEWS (2.4.3): Mention.
101 * tests/synclines.at (AT_TEST_SYNCLINE): Implement.
102
c0259969
AD
1032010-03-30 Akim Demaille <demaille@gostai.com>
104
105 fix comments.
106 * src/graphviz.h: Add missing license notice.
107 Document.
108
23761f42
AD
1092010-03-25 Akim Demaille <demaille@gostai.com>
110
111 tests: fix 250: parse.error=verbose overflow.
112 * tests/regression.at (parse.error=verbose overflow): Avoid the
113 double inclusion of stdlib.h as it triggers hard errors.
114
9097fda0
JD
1152010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
116
117 portability: fix for BSD make.
118 Reported by Johan van Selst at
119 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00016.html>.
120 * tests/Makefile.am ($(TESTSUITE)): Qualify package.m4 in
121 this dependency list as in package.m4's target rule.
122
7a9c3cb3
JD
1232010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
124
125 portability: fix spawning on at least FreeBSD 8 and FreeBSD 9.
126 Reported by Johan van Selst at
127 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00014.html>.
128 * NEWS (2.4.3): New.
129 * THANKS (Johan van Selst): Add.
130 * gnulib: Update to latest.
131
5a3c69f1
JD
1322010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
133
134 maint: update for changes to gnulib's announce-gen.
135 * HACKING (Announce): RELEASE_TYPE=major must now be written
136 RELEASE_TYPE=stable.
137
ea66d039
JD
1382010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
139
140 Version 2.4.2.
141 * NEWS (2.4.2): Set version and date. For the recent test suite
142 portability fixes, don't be so optimistic about their success
143 given the lack of feedback on the affected platforms.
144
c50befe6
JD
1452010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
146
147 tests: fix maintainer-xml-check for recent changes.
148 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Use
149 AT_BISON_CHECK_NO_XML rather than AT_BISON_CHECK because an
150 output file whose name conflicts with a previous output file
151 is now never generated.
152
47fa5747
JD
1532010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
154
155 portability: fix several issues with M4 subprocess.
156
157 M4's output pipe was not being drained upon fatal errors during
158 scan_skel. As a result, broken-pipe messages from M4 were seen
159 on at least AIX, HP-UX, Solaris, and RHEL4, and this caused a
160 failure in the test suite. The problem was that, on platforms
161 where the default disposition for SIGPIPE is ignore instead of
162 terminate, M4 sometimes saw fwrite fail with errno=EPIPE and
163 then reported it. However, there's some sort of race condition,
164 because the new test group occasionally succeeded.
165 Reported by Albert Chin at
166 <http://lists.gnu.org/archive/html/bug-bison/2010-02/msg00004.html>.
167
168 There were also problems with the test suite livelocking on
169 Tru64 5.1b. Reported by Didier Godefroy at
170 <http://lists.gnu.org/archive/html/bug-bison/2009-05/msg00005.html>.
171 Switching to create_pipe_bidi suggested by Akim Demaille.
172
173 To attempt to solve both of these problems, switch to gnulib's
174 create_pipe_bidi and register M4 process as a slave. Along the
175 way, clean up file name conflict handling, which was affected by
176 the broken-pipe problem before the switch.
177 * NEWS (2.4.2): Document.
178 * THANKS (Didier Godefroy): Add.
179 * bootstrap.conf (gnulib_modules): Add pipe.
180 * gnulib: Update to latest to make sure we have all the latest
181 fixes.
182 * lib/Makefile.am (libbison_a_SOURCES): Remove subpipe.h and
183 subpipe.c.
184 * po/POTFILES.in (lib/subpipe.c): Remove.
185 * src/files.c (compute_output_file_names): Update invocations
186 of output_file_name_check.
187 (output_file_name_check): In the case that the grammar file
188 would be overwritten, use complain instead of fatal, but replace
189 the output file name with /dev/null. Use the /dev/null solution
190 for the case of two conflicting output files as well because it
191 seems safer in case Bison one day tries to open both files at
192 the same time.
193 * src/files.h (output_file_name_check): Update prototype.
194 * src/output.c (output_skeleton): Use create_pipe_bidi and
195 wait_subprocess. Assert that scan_skel completely drains the
196 pipe.
197 * src/scan-skel.l (at_directive_perform): Update
198 output_file_name_check invocation.
199 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Check that the
200 grammar file actually isn't overwritten.
201 (Conflicting output files: -o foo.y): Update expected output.
202 * tests/skeletons.at (Fatal errors but M4 continues producing
203 output): New test group.
204
d67e37a7
JD
2052010-02-04 Joel E. Denny <jdenny@ces.clemson.edu>
206
207 Update POTFILES.
208 * HACKING (Release Procedure): Add reminder about keeping
209 POTFILES files up-to-date.
210 * po/POTFILES.in (src/muscle-tab.c, src/scan-skel.l): Add.
211
0ee1af2e
JD
2122010-02-01 Joel E. Denny <jdenny@clemson.edu>
213
214 Code cleanup.
215 * tests/atlocal.in (abs_top_srcdir): Remove shell variable,
216 which is already defined in atconfig.
217
2655c7cd
JD
2182010-01-21 Joel E. Denny <jdenny@clemson.edu>
219
220 * cfg.mk (gnulib_dir): Assume gnulib is a subdirectory.
221
8ebc7dca
JD
2222010-01-21 Joel E. Denny <jdenny@clemson.edu>
223
224 maint: automate PACKAGE_COPYRIGHT_YEAR update, and update it.
225 * HACKING (Release Procedure): Update notes on copyright years.
226 * Makefile.am (update-package-copyright-year): New target rule.
227 * build-aux/update-package-copyright-year: New file.
228 * cfg.mk (update-copyright): Add update-package-copyright-year
229 as a dependency.
230
f0a43dd1
JD
2312010-01-19 Joel E. Denny <jdenny@clemson.edu>
232
233 * bootstrap: Import improvements from latest gnulib.
234
e4ca7a85
JD
2352010-01-19 Joel E. Denny <jdenny@clemson.edu>
236
237 build: require Automake 1.11.1 to avoid a security flaw.
238 * HACKING (Release Procedure): Don't document Automake security
239 flaw here.
240 * configure.ac (AM_INIT_AUTOMAKE): Require 1.11.1, and explain
241 why here.
242
8d830047
JD
2432010-01-19 Joel E. Denny <jdenny@clemson.edu>
244
245 gnulib: update to latest.
246
e5926647
JD
2472010-01-19 Joel E. Denny <jdenny@clemson.edu>
248
249 ChangeLog (2006-09-15): add Odd Arild Olsen's role for push.c.
250
5a2f6eb4
JD
2512010-01-15 Joel E. Denny <jdenny@clemson.edu>
252
253 Thank the developer of the initial push parser implementation.
254 This unfortunate oversight is several years old.
255 * THANKS (Odd Arild Olsen): Add.
256
1c4ad777
JD
2572010-01-04 Joel E. Denny <jdenny@clemson.edu>
258
259 Fix some comments concerning LR(0) versus LALR(1).
260
261 Stop equating LR(0) with nondeterminism and LALR(1) with
262 determinism. That is, if all states are consistent, then LR(0)
263 tables are deterministic. On the other hand, LALR(1) tables
264 might be nondeterministic before conflict resolution, and GLR
265 permits LALR(1) tables to remain nondeterministic.
266 * src/LR0.c, src/LR0.h: Here.
267 * src/lalr.c, src/lalr.h: Here.
268 * src/main.c (main): Here.
269 * src/state.c, src/state.h: Here.
270
271 * src/ielr.h (ielr): In preconditions, expect LR(0) not LALR(1)
272 parser tables.
273
1462fcee
JD
2742010-01-04 Joel E. Denny <jdenny@clemson.edu>
275
276 maint: run "make update-copyright"
277
510df951
JD
2782009-12-30 Joel E. Denny <jdenny@clemson.edu>
279
280 POSIX: complain if %prec's token was not defined.
281 * NEWS (2.5): Document.
282 * src/reader.c (grammar_rule_check): Convert warning to
283 complaint.
284 * tests/input.at (%prec's token must be defined): Update.
285
2c203528
JD
2862009-12-30 Joel E. Denny <jdenny@clemson.edu>
287
288 POSIX: warn if %prec's token was not defined.
289 Reported by Florian Krohm at
290 <http://lists.gnu.org/archive/html/bug-bison/2009-12/msg00005.html>.
291 * NEWS (2.4.2): Document.
292 * src/reader.c (grammar_rule_check): Implement.
293 (grammar_current_rule_prec_set): Add comments explaining that we
294 here assume a %prec identifier is a token, but we still manage
295 to support POSIX.
296 * tests/input.at (%prec's token must be defined): New test
297 group.
298
a93cdd3d
JD
2992009-12-31 Joel E. Denny <jdenny@clemson.edu>
300
301 * HACKING (Release Procedure): Recommend a secure automake.
302
bb57985c
AD
3032008-12-11 Akim Demaille <demaille@gostai.com>
304
305 Propagate i18n changes into glr.c.
306 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
307 building the error message format dynamically.
308 * data/lalr1.java: Formatting changes.
309
70afaf26
JD
3102009-12-22 Joel E. Denny <jdenny@clemson.edu>
311
312 Port small part of master's 11707b2b so future ports are easier.
313 * data/lalr1.java (YYParser::yysyntax_error): Untabify.
314
8200219a
AD
3152008-12-11 Akim Demaille <demaille@gostai.com>
316
317 Simplify the i18n of the error messages.
318 * data/lalr1.cc: Comment changes.
319
39f6a8d1
AD
3202008-11-11 Akim Demaille <demaille@gostai.com>
321
322 Prefer M4 to CPP.
323 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
324 YYERROR_VERBOSE.
325
e657f369
AD
3262008-11-11 Akim Demaille <demaille@gostai.com>
327
328 Support i18n of the parse error messages.
329 * TODO (lalr1.cc/I18n): Remove.
330 * data/lalr1.cc (yysyntax_error_): Support the translation of the
331 error messages, as done in yacc.c.
332 Stay within the yy* pseudo namespace.
333
1e05521d
JD
3342009-12-22 Joel E. Denny <jdenny@clemson.edu>
335
336 Port small part of master's 8901f32e so future ports are easier.
337 * data/lalr1.cc (yy::parser::yysyntax_error_): Always add second
338 argument, but name it in the function definition only when
339 verbose error messages are enabled and it'll thus be used.
340 (yy::parser::parse): Update use of yysyntax_error_.
341
2728ac7e
JD
3422009-12-29 Joel E. Denny <jdenny@clemson.edu>
343
344 portability: `<' and `>' are not always defined on addresses.
345 Specifically, don't sort objects by their memory addresses when
346 they're not allocated in the same array or other object. Though
347 I haven't found a test case where that fails on my platform, C
348 says the behavior is undefined.
349 * src/AnnotationList.c (AnnotationList__insertInto): Remove
350 FIXME. Use new id field of InadequacyList nodes rather than
351 their memory addresses when sorting.
352 (AnnotationList__compute_from_inadequacies): Add
353 inadequacy_list_node_count argument to pass to
354 InadequacyList__new_conflict.
355 * src/AnnotationList.h
356 (AnnotationList__compute_from_inadequacies): Update prototype
357 and documentation for new argument.
358 * src/InadequacyList.c (InadequacyList__new_conflict): Add
359 node_count argument and use it to assign a unique ID.
360 * src/InadequacyList.h (InadequacyListNodeCount): New typedef.
361 (InadequacyList): Add id field.
362 (InadequacyList__new_conflict): Update prototype and
363 documentation for new argument.
364 * src/ielr.c (ielr_compute_annotation_lists): Update
365 AnnotationList__compute_from_inadequacies invocation.
366
abcc7c03
JD
3672009-12-20 Joel E. Denny <jdenny@clemson.edu>
368
369 Fix handling of yychar manipulation in user semantic actions.
370 The problem was that yacc.c didn't always update the yychar
371 translation afterwards. However, other skeletons appear to be
372 fine. glr.c appears to already translate yychar before every
373 use. lalr1.cc does not define yychar and does not document its
374 replacement, yyla, for users. It does provide yyclearin, but
375 that does not manipulate yyla and thus requires no translation
376 update. In lalr1.java, yychar is out of scope during semantic
377 actions.
378 * NEWS (2.5): Document.
379 * data/yacc.c (YYBACKUP): Don't bother translating yychar into
380 yytoken here.
381 (yyparse, yypush_parse): Instead, translate before every use of
382 yytoken, and add comments explaining this approach.
383 * tests/actions.at (Destroying lookahead assigned by semantic
384 action): New test group checking that translation happens before
385 lookahead destructor calls at parser return. Previously,
386 incorrect destructors were called.
387 * tests/conflicts.at (%error-verbose and consistent
388 errors): New test group checking that translation happens at
389 syntax error detection before the associated verbose error
390 message and the associated lookahead destructor calls. While
391 the destructor call is fixed by this patch, the verbose error
392 message is currently incorrect due to another bug (see
393 comments in test group), so this is an expected failure for now.
394
62efdd2a
JD
3952009-12-21 Joel E. Denny <jdenny@clemson.edu>
396
397 YYFAIL: warn about uses and remove from lalr1.java.
398 * NEWS (2.5): Document.
399 * data/lalr1.java (parser::YYStack::YYFAIL): Rename to YYERRLAB,
400 and make it private. Update all uses.
401 * src/scan-code.l (SC_RULE_ACTION): Implement warning.
402
41d35e54
JD
4032009-12-21 Joel E. Denny <jdenny@clemson.edu>
404
405 YYFAIL: deprecate.
406 * NEWS (2.4.2): Document deprecation and the phase-out plan.
407 * data/lalr1.java (parser::YYStack::YYFAIL): Add comment about
408 deprecation.
409 * data/yacc.c (YYFAIL): Likewise, and suppress warnings about
410 YYFAIL from GCC cpp's -Wunused-macros.
411 * doc/bison.texinfo (Java Action Features): Remove YYFAIL
412 documentation.
413 (LocalWords): Remove YYFAIL.
414
692d04cb
JD
4152009-12-17 Joel E. Denny <jdenny@clemson.edu>
416
417 Code cleanup.
418 * src/symtab.c, src/symtab.h (symbol_class_get_string): Remove
419 function, which is no longer used.
420
34731471
JD
4212009-12-16 Joel E. Denny <jdenny@clemson.edu>
422
423 Add gcc's -Wundef to test suite and fix another warning from it.
424 * NEWS (2.4.2): Update description of -Wundef fix.
425 * configure.ac (WARN_CXXFLAGS_TEST): New substitution.
426 (WARN_CFLAGS_TEST): New substitution.
427 * data/glr.c: Avoid warning about __STRICT_ANSI__.
428 * tests/atlocal.in (CFLAGS): Use WARN_CFLAGS_TEST instead of
429 WARN_CFLAGS.
430 (NO_WERROR_CFLAGS): Likewise.
431 (CXXFLAGS): Use WARN_CXXFLAGS_TEST instead of WARN_CXXFLAGS.
432
3bba2dad
JD
4332009-12-16 Joel E. Denny <jdenny@clemson.edu>
434
435 * data/yacc.c: Reformat m4 a little.
436
af2ffe5c
JD
4372009-12-16 Joel E. Denny <jdenny@clemson.edu>
438
439 Document gcc -Wundef fix.
440 * NEWS (2.4.2): Here.
441 * THANKS (Jonathan Nieder): Add.
442
874ac415
JN
4432009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
444
445 Simplify y.tab.c when location tracking is disabled.
446 * data/yacc.c: Do not check YYLTYPE_IS_TRIVIAL if location
447 tracking is not enabled. Instead, unconditionally define
448 YY_LOCATION_PRINT as a no-op for backward compatibility.
449
06caf0e1
JN
4502009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
451
452 Avoid warnings from gcc -Wundef y.tab.c.
453 * data/glr.c: Check if YYENABLE_NLS and YYLTYPE_IS_TRIVIAL are
454 defined before using them.
455 * data/lalr1.cc: Likewise.
456 * data/yacc.c: Likewise.
457
687f011a
JD
4582009-12-15 Joel E. Denny <jdenny@clemson.edu>
459
460 autoconf: update to latest for fix of M4 detection.
461 Reported by Eric Blake.
462 * submodules/autoconf: Update.
463
fb9a3976
JD
4642009-12-15 Joel E. Denny <jdenny@clemson.edu>
465
466 portability: use -DGNULIB_POSIXCHECK.
467 Reported by Eric Blake. See discussions at
468 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00008.html>
469 and
470 <http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00108.html>.
471 * HACKING (Release checks): Suggest -DGNULIB_POSIXCHECK.
472 * bootstrap.conf (gnulib_modules): Add all the printf modules
473 suggested by -DGNULIB_POSIXCHECK. Add realloc-posix as
474 suggested by -DGNULIB_POSIXCHECK for gnulib's own vasnprintf.c.
475 (excluded_files): Remove m4/printf-posix.m4.
476 * tests/atlocal.in (LIBS): As for LDADD in src/local.mk, add
477 lib/libbison.a so gnulib libraries can be linked.
478
f1fb412c
JD
4792009-12-14 Joel E. Denny <jdenny@clemson.edu>
480
481 Enable assertion output and --disable-assert for configure.
482 * bootstrap.conf (gnulib_modules): Add assert module.
483 * src/system.h (aver): Define as assert, and summarize the
484 discussion on this issue.
485
51c7ca01
JD
4862009-12-14 Joel E. Denny <jdenny@clemson.edu>
487
488 Expand GLR acronym in summary of Bison.
489 Based on discussion with Akim Demaille starting at
490 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00087.html>.
491 * doc/bison.texinfo (Introduction): Here.
492 * src/getargs.c (usage): Here.
493
1f68dca5
AR
4942009-10-03 Alex Rozenman <rozenman@gmail.com>
495
496 Document named references.
497 * doc/bison.texinfo (Actions): Add new example and xref to
498 Using Named References node.
499 (Using Named References): New node.
500
aa01d193
JD
5012009-10-16 Joel E. Denny <jdenny@clemson.edu>
502
503 cleanup.
504 * src/Sbitset.c (Sbitset__new_on_obstack): Use Sbitset instead
505 of char*.
506 (Sbitset__isEmpty): Use Sbitset instead of char*.
507 * src/Sbitset.h (Sbitset): Make it a pointer to unsigned char
508 instead of char. This helps to avoid casting errors.
509 (Sbitset__or): Use Sbitset instead of char*.
510
61747047
JD
5112009-10-16 Joel E. Denny <jdenny@clemson.edu>
512
513 portability: don't assume 8-bit bytes.
514 That is, use CHAR_BIT and UCHAR_MAX instead of 8 and 0xff.
515 * src/Sbitset.h (Sbitset__nbytes): Here.
516 (Sbitset__byteAddress): Here.
517 (Sbitset__bit_mask): Here.
518 (Sbitset__last_byte_mask): Here.
519 (Sbitset__ones): Here.
520 (SBITSET__FOR_EACH): Here.
521
a70596de
JD
5222009-10-11 Joel E. Denny <jdenny@clemson.edu>
523
524 portability: use va_start and va_end in the same function.
525 * src/complain.c (error_message): Move va_end from here...
526 (ERROR_MESSAGE): ... to here.
527
51f255a5
JD
5282009-10-08 Joel E. Denny <jdenny@clemson.edu>
529
530 * data/bison.m4: Update comments for rename to muscle-tab.h.
531
23ec25b7
JD
5322009-10-08 Joel E. Denny <jdenny@clemson.edu>
533
534 Rename muscle_tab.* to muscle-tab.* for consistency with master.
535 * src/Makefile.am (bison_SOURCES): Update.
536 * src/getargs.c, src/ielr.c, src/lalr.c, src/main.c,
537 src/output.c, src/parse-gram.y, src/print.c, src/reader.c,
538 src/tables.c: Update include.
539 * src/muscle_tab.c, src/muscle_tab.h: Rename to...
540 * src/muscle-tab.c, src/muscle-tab.h: ... these and update
541 include.
542
0ab402b4
JD
5432009-10-07 Joel E. Denny <jdenny@clemson.edu>
544
545 Minor code cleanup.
546 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT): Remove macro and
547 replace all uses with UNIQSTR_CONCAT.
548 * src/uniqstr.c (uniqstr_vsprintf): New function.
549 * src/uniqstr.h (uniqstr_vsprintf): Add prototype.
550 (UNIQSTR_CONCAT, UNIQSTR_GEN_FORMAT, UNIQSTR_GEN_FORMAT_): New
551 macros.
552
42ec0ae1
JD
5532009-10-04 Joel E. Denny <jdenny@clemson.edu>
554
555 Minor code cleanup.
556 * src/parse-gram.y: Clean up sorting of declarations.
557 Use types to simplify %printer declarations where possible.
558 Provide %printer for BRACKETED_ID and symbol.prec.
559 * src/symtab.c: Whitespace change.
560
9637e0ed
JD
5612009-10-04 Joel E. Denny <jdenny@clemson.edu>
562
563 tests: skip tests of file names that platform does not support.
564 Reported by Michael Raskin at
565 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00001.html>.
566 * THANKS (Michael Raskin): Add.
567 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Fix. Cygwin used
568 to fail at least for file names containing ":" or "\".
569
69a2ab11
JD
5702009-09-23 Joel E. Denny <jdenny@clemson.edu>
571
572 yysyntax_error: avoid duplicate lookahead collection.
573 Except when memory reallocation is required, this change
574 eliminates the need to invoke yysyntax_error twice and thus to
575 repeat the collection of lookaheads. It also prepares for
576 future extensions that will make those repetitions more
577 expensive and that will require additional memory management in
578 yysyntax_error. Finally, it fixes an obscure bug already
579 exercised in the test suite.
580 * data/yacc.c (yysyntax_error): Add arguments for message
581 buffer variables stored in the parser. Instead of size, return
582 status similar to yyparse status but indicating success of
583 message creation. Other than the actual reallocation of the
584 message buffer, import and clean up memory management code
585 from...
586 (yyparse, yypush_parse): ... here.
587 * tests/regression.at (%error-verbose overflow): No longer an
588 expected failure.
589
d88cf117
JD
5902009-09-23 Joel E. Denny <jdenny@clemson.edu>
591
592 yysyntax_error: test memory management more.
593 * tests/atlocal.in (NO_WERROR_CFLAGS): New cpp macro.
594 * tests/regression.at (%error-verbose and YYSTACK_USE_ALLOCA):
595 New test group.
596 (%error-verbose overflow): New test group that reveals an
597 obscure bug. Expected fail for now.
598
9da640ea
AD
5992008-12-11 Akim Demaille <demaille@gostai.com>
600
601 Pass the token type to yysyntax_error.
602 * data/yacc.c (yysyntax_error): Take the transated token instead
603 of the raw number.
604 Adjust callers.
605
d3d3628b
AD
6062008-12-11 Akim Demaille <demaille@gostai.com>
607
608 Simplify the i18n of the error messages.
609 * data/yacc.c (yysyntax_error): Rewrite, using a switch instead
610 of building dynamically the format string.
611
4c6b13f3
JD
6122009-10-03 Joel E. Denny <jdenny@clemson.edu>
613
614 Remove dead code.
615 * src/symtab.c (symbol_pack): Here because every symbol's number
616 is always defined by this time.
617
f840c05a
AR
6182009-10-03 Alex Rozenman <rozenman@gmail.com>
619
620 Add additional space after periods in NEWS.
621 * NEWS (2.5): here.
622
17a407dc
JD
6232009-09-29 Joel E. Denny <jdenny@clemson.edu>
624
625 Use the correct conversion specifier for size_t.
626 Reported by Jim Meyering.
627 * src/Sbitset.h (SBITSET__INDEX__CONVERSION_SPEC): New, "zu"
628 because Sbitset__Index is size_t.
629 * src/Sbitset.c (Sbitset__fprint): Use it instead of %d.
630
4b7a4c1b
JD
6312009-09-27 Joel E. Denny <jdenny@clemson.edu>
632
633 tests: don't abuse AT_BISON_CHECK.
634 * tests/regression.at (parse-gram.y: LALR = IELR): Move
635 additional shell commands outside of AT_BISON_CHECK.
636
873ac263
JD
6372009-09-26 Joel E. Denny <jdenny@clemson.edu>
638
639 tests: check that parse-gram.y's IELR and LALR are identical.
640 * tests/atlocal.in (abs_top_srcdir): New shell variable.
641 * tests/regression.at (parse-gram.y: LALR = IELR): New test
642 group.
643
232be91a
AD
6442009-09-16 Akim Demaille <demaille@gostai.com>
645
646 doc: comment changes.
647 * doc/bison.texinfo: Comment changes.
648
c781580d
AD
6492009-09-16 Akim Demaille <demaille@gostai.com>
650
651 doc: spell checking.
652 * doc/bison.texinfo: here.
653
348f5608
AR
6542009-09-19 Alex Rozenman <rozenman@gmail.com>
655
656 Keep sub-messages aligned. Fix strings for translation.
f840c05a
AR
657 * src/location.h (location_print): Add return value.
658 * src/location.c (location_print): Return number of printed
348f5608 659 characters.
f840c05a
AR
660 * src/complain.h (complain_at_indent, warn_at_indent): Prototype
661 new functions.
662 * src/complain.cpp (indent_ptr): New static variable.
663 (error_message, complain_at_indent, warn_at_indent): Implement
664 the alignment mechanism.
665 * src/scan-code.l (parse_ref, show_sub_messages): Fix strings
666 for translations. Use new alignment mechanism.
667 * tests/named-ref.at: Adjust test-cases.
348f5608
AR
668 * NEWS (2.5): Add an announcement about named references.
669
d93b5f50
JD
6702009-09-13 Joel E. Denny <jdenny@clemson.edu>
671
672 tests: clean up push.at test group titles.
673 * tests/push.at: Remove "Push Parsing: " from test group titles
674 because these are already under the banner "Push Parsing Tests".
675
4c56b131
AR
6762009-09-12 Alex Rozenman <rozenman@gmail.com>
677
678 Provide an additional sub-message for clarity.
679 Add "symbol not found in production" error message when
680 an "invalid reference" is detected in named references
681 resolution.
682 * src/scan-code.l: Update "invalid reference" case.
683 * tests/named-ref.at: Adjust test-cases.
684
93d0103d
JD
6852009-09-10 Joel E. Denny <jdenny@clemson.edu>
686
687 Clean up yacc.c a little.
688 * data/yacc.c: Clean up M4 for readability, and make output
689 whitespace more consistent. For the main parse function
690 comment, instead of saying "yyparse or yypush_parse", say either
691 "yyparse" or "yypush_parse" depending on which it actually is.
692
628be6c9
JD
6932009-09-03 Joel E. Denny <jdenny@clemson.edu>
694
695 Complain about unused %define variables and %code qualifiers.
696 * NEWS (2.5): Document.
697 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
698 * doc/bison.texinfo (Decl Summary): Document complaint, and
699 improve %define documentation a little otherwise.
700 * tests/input.at (Reject unused %code qualifiers): Update.
701 (%define errors): Update.
702 (%define, --define, --force-define): Update.
703 (%define backward compatibility): Update.
704 (Unused %define api.pure): Update.
705 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
706
c842365a
JD
7072009-09-03 Joel E. Denny <jdenny@clemson.edu>
708
709 Use aver not assert.
710 * src/output.c: Don't include assert.h.
711 (output_skeleton): Use aver not assert.
712 * src/system.h (aver): In documentation of why, add links to
713 Paul Eggert's explanations in the mailing lists.
714
14e568d7
AR
7152009-09-05 Alex Rozenman <rozenman@gmail.com>
716
717 Use "Unresolved reference" error message when no symbols were found
718 in a symbolic reference resolution. Remove .expr and -expr from
719 the shown reference when the reference is unresolved.
720 * src/scan-code.l: Change the error message, adjust location columns,
721 rename variable "exact_mode" to "explicit_bracketing".
722 * tests/named-ref.at: Adjust existing tests and add a new one.
723
dac8cc0d
AD
7242009-09-03 Akim Demaille <demaille@gostai.com>
725
726 * NEWS (2.4.2): Add "Internationalization" item.
727
3710dd02
AD
7282009-09-03 Akim Demaille <demaille@gostai.com>
729
730 bootstrap: fix/improve find_tool.
731 * bootstrap (find_tool): Improve error messages.
732 Fix typo about find_tool_names.
733
9852b61c
JD
7342009-08-29 Joel E. Denny <jdenny@clemson.edu>
735
736 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
737 See
738 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
739 * src/scan-code.h (code_props_rule_action_init): Rename
740 named_ref arg to name so it doesn't shadow named_ref type. This
741 makes it consistent with the function definition in scan-code.l
742 anyway.
743
f37495f6
JD
7442009-08-28 Joel E. Denny <jdenny@clemson.edu>
745
746 %define: accept unquoted values.
747 * NEWS (2.5): Group all %define changes together, and document
748 this one. Remove quotes in IELR and canonical LR entry.
749 * doc/bison.texinfo: Remove quotes in most examples throughout.
750 (Decl Summary): Update %define documentation.
751 (Table of Symbols): Likewise.
752 * src/ielr.c (LrType): Update documentation.
753 * src/parse-gram.y (content.opt): Add production for ID.
5bf2bf7a 754 * tests/calc.at: Remove quotes in most tests.
f37495f6
JD
755 * tests/existing.at: Likewise.
756 * tests/input.at: Likewise.
757 * tests/local.at: Likewise.
758 * tests/push.at: Likewise.
759 * tests/reduce.at: Likewise.
760 * tests/torture.at: Likewise.
761
3a414bbf
JD
7622009-08-28 Joel E. Denny <jdenny@clemson.edu>
763
764 %define lr.type: make values lowercase IDs.
765 That is, "LALR" => "lalr", "IELR" => "ielr", and
766 "canonical LR" => "canonical-lr".
767 * NEWS (2.5): Update documentation.
768 * doc/bison.texinfo (Decl Summary): Likewise.
769 * src/ielr.c (ielr): Use new values.
770 * src/ielr.h (ielr): Update documentation.
771 * src/reader.c (prepare_percent_define_front_end_variables): Use
772 and validate new values.
773 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
774 grammars.
775 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
776
4bb975e1
EB
7772009-08-27 Eric Blake <ebb9@byu.net>
778
779 scan-gram: avoid portability trap with ctype usage.
780 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
781 Avoid compiler warning.
782
74baf5c9
JD
7832009-08-27 Joel E. Denny <jdenny@clemson.edu>
784
785 tests: use perl for printing special sequences to files.
786 And skip tests if perl is not available. This is better than
787 playing tricks with shell portability. Suggested by Akim
788 Demaille.
789 * tests/input.at (Bad character literals): Use it here for
790 omitting final newlines.
791 (Bad escapes in literals): Use it here for special characters.
792
d63e1279
JD
7932009-08-26 Joel E. Denny <jdenny@clemson.edu>
794
795 tests: show a use of %define lr.default-reductions "consistent"
796 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
797 prevents the omission of expected tokens for %error-verbose.
798
833d1720
AD
7992009-08-26 Akim Demaille <demaille@gostai.com>
800
801 tests: portability fix.
802 * tests/input.at (Bad escapes in literals): Don't expect "echo
803 '\0'" to output \ then 0.
804
e4bcae3c
JD
8052009-08-26 Joel E. Denny <jdenny@clemson.edu>
806
807 Actually handle the yytable zero value correctly this time.
808 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Don't
809 mention zero values in the YYTABLE comments.
810 * data/glr.c (yytable_value_is_error): Don't check for zero
811 value.
812 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
813 * data/yacc.c (yytable_value_is_error): Likewise.
814 * data/lalr1.java (yy_table_value_is_error_): Likewise.
815 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
816 * src/tables.h: In header comments, explain why it's useless to
817 check for a zero value in yytable.
818
d5eb0826
JD
8192009-08-25 Joel E. Denny <jdenny@clemson.edu>
820
821 More fixes related to last two patches.
822 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
823 defined.
824 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Fix
825 yytable comments: zero indicates syntax error not default
826 action.
827 * data/glr.c (yyis_pact_ninf): Rename to...
828 (yypact_value_is_default): ... this.
829 (yyisDefaultedState): Update for rename.
830 (yyis_table_ninf): Rename to...
831 (yytable_value_is_error): ... this, and check for value zero
832 besides just YYTABLE_NINF.
833 (yygetLRActions): Check for default value from yypact. It
834 appears that this check is always performed before this function
835 is invoked, and so adding the check here is probably redundant.
836 However, the code may evolve after this subtlety is forgotten.
837 Also, update for rename to yytable_value_is_error. Because that
838 macro now checks for zero, a different but equivalent branch of
839 the if-then-else here is evaluated.
840 (yyreportSyntaxError): Update for rename to
841 yytable_value_is_error. The zero condition was mishandled
842 before.
843 (yyrecoverSyntaxError): Update for renames. No behavioral
844 changes.
845 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
846 New function.
847 (yy_table_value_is_error_): New function.
848 (parse): Use new functions where possible. No behavioral
849 changes.
850 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
851 The zero condition was mishandled before.
852 * data/yacc.c (yyis_pact_ninf): Rename to...
853 (yypact_value_is_default): ... this.
854 (yyis_table_ninf): Rename to...
855 (yytable_value_is_error): ... this, and check for value zero
856 besides just YYTABLE_NINF.
857 (yysyntax_error): Update for rename to yytable_value_is_error.
858 The zero condition was mishandled before.
859 (yyparse): Update for renames. No behavioral changes.
860 * src/tables.h: Improve comments about yypact, yytable, etc.
861 more. Most importantly, say yytable value of zero means syntax
862 error not default action.
863
1fa30307
JD
8642009-08-25 Joel E. Denny <jdenny@clemson.edu>
865
866 Fix %error-verbose for conflicts resolved by %nonassoc.
867 * NEWS (2.5): Document.
868 * data/glr.c (yyreportSyntaxError): Fix this by checking
869 yyis_table_ninf.
870 * data/yacc.c (yysyntax_error): Likewise.
871 * data/lalr1.cc (yysyntax_error_): Fix this by checking
872 yytable_ninf_.
873 * data/lalr1.java (yysyntax_error): Likewise.
874 * tests/conflicts.at (%nonassoc and eof): Update expected output
875 and remove FIXME.
876
77373efa
JD
8772009-08-25 Joel E. Denny <jdenny@clemson.edu>
878
879 Some code and documentation improvements.
880 * data/c.m4 (b4_table_value_equals): New macro to capture
881 some repeated code.
882 * data/glr.c (yyis_pact_ninf): Use it here.
883 (yyis_table_ninf): Likewise.
884 (yyreportSyntaxError): Improve internal comments.
885 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
886 Use it everywhere possible.
887 (yyis_table_ninf): Likewise.
888 (yysyntax_error): Improve internal comments.
889 * data/lalr1.cc (yysyntax_error_): Likewise.
890 * data/lalr1.java (yysyntax_error): Likewise.
891 * src/tables.h: Improve comments about yypact, yytable, etc.
892
890ab17c
JD
8932009-08-21 Joel E. Denny <jdenny@clemson.edu>
894
895 Use locale when quoting.
896 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
897 quote rather than implementing quoting here.
898
c5196098
EB
8992009-08-20 Eric Blake <ebb9@byu.net>
900
aa50ba7b
EB
901 Make previous patch more robust.
902 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
903 argmatch.h.
904 (output_skeleton): Use it.
905 Suggested by Akim Demaille.
906
c5196098
EB
907 Import latest m4/m4.m4.
908 * submodules/autoconf: Update to autoconf 2.64.
909 * configure.ac (M4_GNU_OPTION): New define.
910 * src/output.c (output_skeleton): Use it to resolve FIXME.
911 * NEWS: Mention this.
912
39fb7e62
JD
9132009-08-19 Joel E. Denny <jdenny@clemson.edu>
914
915 Fix complaints about escape sequences.
916 Discussed starting at
917 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
918 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
919 For a \0 and similar escape sequences meaning the null
920 character, report an invalid escape sequence instead of an
921 invalid null character because the latter does not actually
922 appear in the user's input.
923 In all escape sequence complaints, don't escape the initial
924 backslash, and don't quote when the sequence appears at the end
925 of the complaint line unless there's whitespace that quotearg
926 won't escape.
927 Consistently say "invalid" not "unrecognized".
928 Consistently prefer "empty character literal" over "extra
929 characters in character literal" warning for invalid escape
930 sequences; that is, consistently discard those sequences.
931 * tests/input.at (Bad escapes in literals): New.
932
c33bc800
AD
9332009-08-19 Akim Demaille <demaille@gostai.com>
934
935 doc: fixes.
936 * doc/bison.texinfo: Fix minor Texinfo errors.
937
8fbbeba2
AD
9382009-08-19 Akim Demaille <demaille@gostai.com>
939
940 doc: %initial-action to initialize yylloc.
941 Reported by Bill Allombert.
942 * doc/bison.texinfo: Set fill-column to 76.
943 (Location Type): Document the use of %initial-action to initialize
944 yylloc.
945
1874a474
JD
9462009-08-18 Joel E. Denny <jdenny@clemson.edu>
947
948 maint: update for gnulib's recent update-copyright changes
949 * gnulib: Update.
950 * .x-update-copyright (COPYING): Add as it's no longer implied
951 when .x-update-copyright is present.
952 * cfg.mk (update-copyright-local): Remove, now ignored.
953 (update-copyright): Declare update-b4-copyright as a dependency.
954
f4bfd5a9
AD
9552009-08-17 Akim Demaille <demaille@gostai.com>
956
957 build: require gettext 0.17.
958
959 Suggested by Bruno Haible.
960 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
961 * configure.ac: require gettext 0.17 to ensure compatibility with
962 gnulib.
963
2509eba6
AD
9642009-08-17 Akim Demaille <demaille@gostai.com>
965
966 build: lower gettext requirements.
967
968 Bison was uselessly requiring the formatstring macros from
969 gettext, which resulted in mo files not being installed on systems
970 that perfectly supported Bison mo files. Lower the requirement.
971 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
972
aa50ba7b
EB
973 * configure.ac: Require need-ngettext instead of
974 need-formatstring-macros.
975 Reported by Martin Jabocs.
976 Suggested by Bruno Haible.
977 * INSTALL: Restructure.
978 (Internationalization): New.
2509eba6 979
314542f9
JD
9802009-08-14 Joel E. Denny <jdenny@clemson.edu>
981
982 maint: fix use of copyright year intervals.
983 * gnulib: Update.
984 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
985 as now recommended in gnulib/NEWS.
986 * build-aux/update-b4-copyright: Fix.
987 * cfg.mk (update-copyright-env): Configure update-copyright.
988
24985964
JD
9892009-08-13 Joel E. Denny <jdenny@clemson.edu>
990
991 Make it easier to write deterministic tests.
992 Continues Akim's work from his 2009-06-10 commits.
993 * src/reader.c (check_and_convert_grammar): Don't add any
994 symbols after the first symbols_do invocation.
995 * src/symtab.c (symbols_sorted): New static global.
996 (user_token_number_redeclaration): Update comments.
997 (symbol_from_uniqstr): If a new symbol is being created, assert
998 that symbols_sorted hasn't been allocated yet.
999 (symbols_free): Free symbols_sorted.
1000 (symbols_cmp, symbols_cmp_qsort): New functions.
1001 (symbols_do): Sort symbol_table into symbols_sorted on first
1002 invocation.
1003 * tests/input.at (Numbered tokens): Recombine tests now that the
1004 output should be deterministic across multiple numbers.
1005
47076da5
AD
10062009-08-12 Akim Demaille <demaille@gostai.com>
1007
1008 distcheck: fix.
1009
aa50ba7b 1010 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
47076da5 1011
36dfe466
JD
10122009-08-10 Joel E. Denny <jdenny@clemson.edu>
1013
1014 * tests/Makefile.am (TESTSUITE_AT): Add named-refs.at.
1015
07c0db18
JD
10162009-08-10 Joel E. Denny <jdenny@clemson.edu>
1017
1018 Miscellaneous code readability improvements.
1019
1020 * src/reader.c (reader): Move %define front-end variable
1021 defaults and checking into...
1022 (prepare_percent_define_front_end_variables): ... this new
1023 function.
1024
1025 * src/scan-gram.l (INITIAL): For consistency with string
1026 literals, don't store open quote on character literal. It's
1027 discarded before returning anyway.
1028 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
1029 Make length test more readable, and make the character stored
1030 for an empty literal more obvious while consistent with the
1031 previous behavior.
1032
1033 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
1034 USER_NUMBER_HAS_STRING_ALIAS throughout.
1035 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
1036 that is repeated in symtab.h. Improve argument names to make it
1037 clear which side of the symbol-string alias pair is which.
1038 (symbol_check_alias_consistency): Improve local variable names
1039 for the same purpose.
1040 * src/symtab.h (struct symbol): Make comments about aliases
1041 clearer.
1042 (symbol_make_alias): Improve comments and argument name.
1043 * src/output.c (token_definitions_output): Update for rename to
1044 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
1045
1a323c2f
AR
10462009-08-08 Alex Rozenman <rozenman@gmail.com>
1047
1048 Convert "misleading reference" messages to warnings.
1049 * src/scan-code.l: New function 'show_sub_messages', more
1050 factoring.
1051 * tests/named-ref.at: Adjust tests.
1052
38609c34
JD
10532009-08-06 Joel E. Denny <jdenny@clemson.edu>
1054
1055 maint: run "make update-copyright"
1056
642f240e
JD
10572009-08-06 Joel E. Denny <jdenny@clemson.edu>
1058
1059 maint: make update-b4-copyright easier to use
1060 * build-aux/update-b4-copyright: In warnings, report line
1061 numbers rather than character positions.
1062 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
1063 that update-copyright runs it.
1064 * gnulib: Update.
1065
d0caad01
JD
10662009-08-05 Joel E. Denny <jdenny@clemson.edu>
1067
1068 maint: clean up update-b4-copyright code
1069 * build-aux/update-b4-copyright: Do not accept 2-digit
1070 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
1071 Don't accept a `[' in a b4_copyright argument.
1072 Format code more consistently.
1073 Don't assume b4*copyright never occurs.
1074
ac2def56
JD
10752009-08-04 Joel E. Denny <jdenny@clemson.edu>
1076
1077 maint: automate b4_copyright updates.
1078 * Makefile.am (update-b4-copyright): New target rule.
1079 * build-aux/Makefile.am (EXTRA_DIST): Add update-b4-copyright.
1080 * build-aux/update-b4-copyright: New.
1081 * data/yacc.c: Remove stray characters around b4_copyright
1082 invocations.
1083
dbbb64f0
JD
10842009-08-04 Joel E. Denny <jdenny@clemson.edu>
1085
1086 maint: automate annual package-wide copyright-year update.
1087 * .x-update-copyright: New.
1088 * Makefile.am (EXTRA_DIST): Remove maint.mk.
1089 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
1090 update-copyright. Remove gnumakefile, which is implied by
1091 maintainer-makefile.
1092 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
1093 * gnulib: Update.
1094 * maint.mk: Remove, now copied from gnulib.
1095 * examples/extexi: Add missing "(C)" in copyright statement so
1096 update-copyright can recognize it.
1097 * src/LR0.h: Likewise.
1098 * src/print.h: Likewise.
1099 * src/print_graph.h: Likewise.
1100 * src/gram.c: Add missing comma in copyright statement.
1101 * src/gram.h: Likewise.
1102
bfa018d4
JD
11032009-08-04 Joel E. Denny <jdenny@clemson.edu>
1104
1105 Fix "make distcheck".
1106 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
1107 of just calc.stamp.
1108
4521fcdf
JD
11092009-08-01 Joel E. Denny <jdenny@clemson.edu>
1110
1111 Pacify "gcc -Wunused" for the input function from Flex.
1112 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
1113 and later.
1114 * src/scan-code.l: Add "%option noinput", which I cannot find in
1115 the Flex manual, but which Flex has supported since at least as
1116 far back as 2.5.4. However, if any of our developers still use
1117 Flex 2.5.4, they'll need to stop configuring with
1118 --enable-gcc-warnings because "%option noinput" didn't work
1119 correctly until Flex 2.5.6.
1120 * src/scan-gram.l: Likewise.
1121 * src/scan-skel.l: Likewise.
1122
992e874a
AR
11232009-07-31 Alex Rozenman <rozenman@gmail.com>
1124
1125 Fix --enable-gcc-warnings problems.
1126 * src/reader.c: Adjust variable names.
1127 * src/scan-code.l: Fix prototypes and adjust names.
1128 * src/named-ref.c: Remove redundant "if".
1129
a1ed2b71
JD
11302009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
1131
1132 Fix a --enable-gcc-warnings problem.
1133 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
1134 variable.
1135
cbc6a70e 11362009-07-24 Alex Rozenman <rozenman@gmail.com>
1e20ad11
AR
1137
1138 Fix some memory leaks.
1139 * src/named-ref.c: Add a pointer check (named_ref_free).
1140 * src/scan-code.l: New function (variant_table_free). Called in
1141 code_scanner_free.
1142 * src/symlist.c: Call to named_ref_free (symbol_list_free).
1143
ac9b0e95
JD
11442009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
1145
1146 Warn about character literals not of length one.
1147 * NEWS (2.5): Document.
1148 * src/scan-gram.l (INITIAL): Remove comment that we don't check
1149 the length.
1150 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
1151 * tests/input.at (Bad character literals): New test group.
1152
2de160e1
JD
11532009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
1154
1155 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
1156
cba97506
JD
11572009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
1158
1159 Some M4 cleanup in the testsuite.
1160 Suggested by Eric Blake at
1161 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
1162 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
1163 complicate the code by distinguishing between a missing value
1164 and an empty string value for an optional argument. This fix is
1165 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
1166 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
1167 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
1168 arguments are not needed because of the following changes.
1169 Fix stale comments.
1170 Bison developers should use GNU M4 and should not use
1171 POSIXLY_CORRECT when building the test suite, so do not
1172 complicate the code by avoiding $10 and above.
1173 Do not quote an empty string value for an optional argument, and
1174 do not distinguish between a missing value and an empty string
1175 value.
1176
62eb2d1b
JD
11772009-07-21 Joel E. Denny <jdenny@ces.clemson.edu>
1178
1179 * m4/m4.m4: Make it a sym link to submodules/autoconf/m4/m4.m4.
1180
620b2e36
JD
11812009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
1182
1183 Revert unnecessary column realignment in --help output.
1184 Reported by Akim Demaille at
1185 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
1186 * src/getargs.c (usage): Here.
1187
cbc6a70e 11882009-07-04 Alex Rozenman <rozenman@gmail.com>
dad6544d
AR
1189
1190 Alphabetical order in src/Makefile.am.
1191 * src/Makefile.am: Adjust.
1192
cbc6a70e 11932009-07-04 Alex Rozenman <rozenman@gmail.com>
d5e8574b
AR
1194
1195 Style changes and factoring.
1196 * src/named-ref.h: Add comments.
1197 * src/parse-gram.y: Readability and style changes.
1198 * src/reader.c: Factoring: assign_named_ref function.
1199 * src/scan-code.l: Factoring and style changes. Rename
1200 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
1201 Use "unsigned" type for variant index. Improve readablity.
1202 * src/scan-gram.l: Change error messages and add comments.
1203 * src/symlist.h: symbol_list_null: New function decl.
1204 * src/symlist.c: symbol_list_null: Implement here.
1205 * tests/named-refs.at: Adjust for new error messages.
1206
ae09ec85
EB
12072009-06-29 Eric Blake <ebb9@byu.net>
1208
1209 scan-code: avoid compiler warnings
1210 * src/scan-code.l (parse_named_ref): Use correct specifiers.
1211
80d653fd
AD
12122009-06-29 Akim Demaille <demaille@gostai.com>
1213
1214 build: avoid concurrent extraction of calc++.
1215 * examples/calc++/Makefile.am (calc.stamp): New.
1216 Depend on it to create the sources of calc++ so that concurrent
1217 builds don't launch several "extexi" in parallel.
1218 Not only this is inefficient, this also builds incorrect sources
1219 with several extractions mixed together.
1220
7685e2f7
AR
12212009-06-27 Alex Rozenman <rozenman@gmail.com>
1222
1223 Implement support for named symbol references.
1224 * src/parse-gram.y: Add new syntax (named_ref.opt).
1225 * src/reader.c: Store named refs in symbol lists.
1226 * src/reader.h: New argument for symbol_append and
1227 action_append functions.
1228 * src/scan-code.h: Add new field (named_ref) into
1229 code_props data structure. Keeps named ref of midrule
1230 actions.
1231 * src/scan-code.l: Support for named refs in semantic
1232 action code. New function 'parse_named_ref'.
1233 * src/scan-gram.l: Support bracketed id.
1234 * src/symlist.c: Store named refs in symbol lists.
1235 * src/symlist.h: New field in symbol list: named_ref.
1236 * src/named-ref.h: New file, a struct for named_ref.
1237 * src/named-ref.cp: New file, named_ref_new function.
1238 * src/local.mk: Add two new files.
1239 * tests/testsuite.at: Include new test group:
1240 * tests/named-refs.at: this new file.
1241
67f8cf51
AD
12422009-06-25 Akim Demaille <demaille@gostai.com>
1243
1244 hash: check insertion for memory exhaustion.
1245 * src/uniqstr.c (uniqstr_new): New.
1246
83b66ddd
AD
12472009-06-11 Akim Demaille <demaille@gostai.com>
1248
1249 style changes.
1250 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
1251 * src/print-xml.c: Style changes.
1252 * tests/conflicts.at: Comment changes.
1253
517cb0ad
AD
12542009-06-11 Akim Demaille <demaille@gostai.com>
1255
1256 xml: beware of user strings used to give a %prec to rules.
1257 * tests/conflicts.at (%prec with user strings): New.
1258 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
1259 XML output.
1260
75c7a52a
AD
12612009-06-11 Akim Demaille <demaille@gostai.com>
1262
1263 hash: check insertion for memory exhaustion.
1264 * src/muscle-tab.c (muscle_insert, muscle_grow)
1265 * src/state.c (state_hash_insert): Check the return value of
1266 hash_insert.
1267
66ed9753
AD
12682009-06-10 Akim Demaille <demaille@gostai.com>
1269
1270 deterministic test suite.
1271 Some consistency checks on symbols are performed after all the
1272 symbols were read, by an iteration over the symbol table. This
1273 traversal is nondeterministic, which can be a problem for test
1274 cases.
1275 Avoid this.
1276 Addresses another form of nondeterminism reported by Joel E. Denny.
1277 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
1278
1279 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
1280 test in two.
1281 Use different file names for the three tests to make the
1282 maintenance easier.
1283
ed15d907
AD
12842009-06-10 Akim Demaille <demaille@gostai.com>
1285
95d176ff
AD
1286 deterministic user-token-number redeclaration errors.
1287 Address nondeterminism reported by Joel E. Denny.
1288 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
1289
1290 * src/uniqstr.h: Comment changes.
1291 * src/location.h (boundary_cmp, location_cmp): New.
1292 * src/symtab.c (user_token_number_redeclaration): New.
1293 (symbol_translation): Use it.
1294 * tests/input.at (Numbered tokens): Adjust the expected output.
1295
12962009-05-25 Akim Demaille <demaille@gostai.com>
1297
ed15d907 1298 gnulib: update.
aa50ba7b
EB
1299 * gnulib: Update to latest.
1300 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
1301 * m4/.gitignore: Regen.
1302 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
1303 Call xalloc_die on hash_insert failures.
1304 Requested by the new __warn_unused_result__ attribute of
1305 hash_insert.
ed15d907 1306
e3a33f7c
JD
13072009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1308
1309 Convert multiple variable definition warnings to complaints.
1310 * NEWS (2.5): Add a new entry for that change.
1311 * doc/bison.texinfo (Decl Summary): Update %define entry.
1312 (Bison Options): Update -D/--define/-F/--force-define entry.
1313 * src/muscle_tab.c (muscle_percent_define_insert): Implement.
1314 * src/muscle_tab.h (muscle_percent_define_insert): Update
1315 comments.
1316 * tests/input.at (`%define errors'): Update.
1317 (`%define, --define, --force-define'): Update.
1318
34d41938
JD
13192009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1320
1321 -F/--force-define and relative %define/-D/--define priorities.
1322 * NEWS (2.5): Add documentation to -D/--define entry.
1323 * build-aux/cross-options.pl: Hard-code association of
1324 --force-define with %define.
1325 * doc/bison.texinfo (Decl Summary): In %define entry,
1326 cross-reference command-line options.
1327 (Bison Options): Add documentation to -D/--define entry.
1328 (Option Cross Key): Widen column for --force-define row.
1329 * src/getargs.c (usage): Document -F/--force-define. Realign
1330 options in output.
1331 (short_options, long_options, getargs): Parse -F/--force-define,
1332 and update muscle_percent_define_insert invocation.
1333 * src/muscle_tab.h (muscle_percent_define_how): New enum type.
1334 (muscle_percent_define_insert): Add argument with that type.
1335 * src/muscle_tab.c (muscle_percent_define_insert): Implement
1336 -F/--force-define behavior and priorities.
1337 * src/parse-gram.y (prologue_declaration): Update
1338 muscle_percent_define_insert invocations.
1339 * tests/input.at (`%define, --define'): Rename to...
1340 (`%define, --define, --force-define'): ... this and extend.
1341
246c4efa
JD
13422009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1343
1344 Update some comments to make sense for -D.
1345 * data/bison.m4 (b4_check_user_names): In header comments, say
1346 "user occurrence" instead of "grammar occurrence".
1347 * src/muscle_tab.h (muscle_percent_define_insert): Likewise.
1348 (muscle_percent_code_grow): Likewise just for consistency.
1349
531683e7
JD
13502009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1351
1352 * data/c++.m4: Update copyright year.
1353
e7bfa8b7
JD
13542009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
1355
1356 * data/c++.m4 (b4_namespace_close): Simplify slightly.
1357
8c221795
JD
13582009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
1359
1360 Handle a trailing `:' in a user-supplied C++ namespace better.
1361 * data/c++.m4 (b4_namespace_close): Don't let it be printed
1362 among the closing braces here. This fix might make the
1363 generated code easier to debug, but otherwise it should be
1364 insignificant because a trailing `:' is a C++ error already.
1365
c8bf65f0
AD
13662009-05-19 Akim Demaille <demaille@gostai.com>
1367
1368 remove useless variable.
1369 * src/getargs.c (skeleton_arg): Remove now useless variable.
1370 Should help the compiler see that this printf-like call is sane.
1371
7ac45a46
AD
13722009-05-11 Akim Demaille <demaille@gostai.com>
1373
1374 doc: use C++ headers.
1375 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
1376 headers.
1377
601bdfab
AD
13782009-05-05 Akim Demaille <demaille@gostai.com>
1379
1380 fix hexadecimal token number support.
1381 * src/scan-gram.l: Catch incorrect ids after hexadecimal numbers.
1382
d19123e6
AD
13832009-05-05 Akim Demaille <demaille@gostai.com>
1384
1385 tests: check token numbers.
1386 * tests/input.at (Numbered tokens): New.
1387
ecdfea9a
AD
13882009-05-04 Akim Demaille <demaille@gostai.com>
1389
1390 bison: catch bad symbol names.
1391 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
1392 * tests/input.at: Adjust.
1393
43e6aea5
AD
13942009-05-04 Akim Demaille <demaille@gostai.com>
1395
1396 space changes.
1397 * src/scan-gram.l: Untabify to be robust to zealous editors.
1398
c046698e
AD
13992009-05-04 Akim Demaille <demaille@gostai.com>
1400
1401 identifiers: dashes are letters.
1402 Dashes can now start identifiers (symbols and directives).
b10dd689 1403
c046698e
AD
1404 * src/scan-gram.l ({letter}): Add dash.
1405 ({id}): Remove it.
1406 * tests/input.at (Symbols): Adjust.
1407 Remove stray comment.
1408 * tests/regression.at (Invalid inputs): Adjust error message.
1409 * doc/bison.texinfo (Symbols): Update.
1410
966aba65
JD
14112009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
1412
1413 Declare %code to be a permanent feature.
1414 * NEWS (2.4.2): Here.
1415 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
1416 experimental.
1417 (Decl Summary): Likewise.
1418
812775a0
JD
14192009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
1420
1421 Convert underscores to dashes in some %define variable names.
1422 For now, just api.push-pull and lr.keep-unreachable-states.
1423 Maintain old names for backward compatibility.
1424 * NEWS (2.5): Document.
1425 * data/c.m4 (b4_identification): Update comment.
1426 * data/yacc.c: Update access.
1427 * doc/bison.texinfo: Update.
1428 * etc/bench.pl.in (bench_grammar): Update use.
1429 * src/files.c (tr): Move to...
1430 * src/getargs.c, src/getargs.h (tr): ... here because I can't
1431 think of a better place to expose it. My logic is that, for all
1432 uses of tr so far, command-line arguments can be involved, and
1433 getargs.h is already included.
1434 * src/main.c (main): Update access.
1435 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
1436 variable names to new variable names before assigning value.
1437 * src/reader.c (reader): Update setting default.
1438 * tests/calc.at: Update uses.
1439 * tests/conflicts.at (Unreachable States After Conflict
1440 Resolution): Update use.
1441 * tests/input.at (%define enum variables): Update use.
1442 (%define backward compatibility): New test group.
1443 * tests/push.at: Update uses.
1444 * tests/reduce.at: Update uses.
1445 * tests/torture.at: Update uses.
1446
1c4aa81d
JD
14472009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
1448
1449 Set all front-end %define defaults in one place.
1450 * src/main.c (main): Move lr.keep_unreachable_states default...
1451 * src/reader.c (reader): ... to here.
1452
1d0f55cc
JD
14532009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1454
1455 Rename lr.default_reductions to lr.default-reductions.
1456 * NEWS (2.5): Here.
1457 * doc/bison.texinfo: Here.
1458 * src/lalr.c (initialize_LA): Here.
1459 * src/print.c (print_reductions): Here.
1460 * src/reader.c (reader): Here.
1461 * src/tables.c (action_row): Here.
1462 * tests/input.at (%define enum variables): Here.
1463 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
1464
0b593457
JD
14652009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1466
1467 Pacify ./configure --enable-gcc-warnings.
1468 * tests/input.at (Symbols): Prototype yyerror and yylex.
1469
0939aa2d
AD
14702009-04-21 Akim Demaille <demaille@gostai.com>
1471
1472 tests: check the use of dashes and periods in symbols.
1473 * tests/input.at (Symbol): New test group.
1474
0b593457 14752009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
ae618dcc
JD
1476
1477 Document how `%define "var" "value"' is not M4-friendly.
1478 * src/parse-gram.y (variable): In comments here.
1479
0b593457 14802009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
6789b8bd
JD
1481
1482 Add copyright updates missed during previous cherry pick.
1483 * src/output.c: Here.
1484 * src/parse-gram.y: Here.
1485 * src/scan-gram.l: Here.
1486
663ce7bb
AD
14872009-04-20 Akim Demaille <demaille@gostai.com>
1488
1489 variables: accept dashes.
1490 * src/scan-gram.l ({id}): Also accept dashes after the initial
1491 letter.
1492 ({directive}): Use {id}.
1493 * src/parse-gram.y: Comment and formatting changes.
1494 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
1495 symbols.
1496 * src/complain.h, src/complain.c (yacc_at): New.
1497 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
1498 symbol names.
1499 * src/output.c (token_definitions_output): Do not #define token
1500 names with dashes.
1501
379261b3
JD
15022009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
1503
1504 Clean up recent patches a little.
1505 Reported by Akim Demaille.
1506 * doc/bison.texinfo (Understanding): Fix typos.
1507 * src/print.c (print_reductions): Don't use negated variable.
1508
25029e16
JD
15092009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
1510
1511 List accepted values for a %define enum variable with an invalid value.
1512 Suggested by Akim Demaille at
1513 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
1514 * data/bison.m4 (_b4_percent_define_check_values): Implement.
1515 * src/muscle_tab.c (muscle_percent_define_check_values): Implement.
1516 * tests/input.at (%define lr.default_reductions invalid values): Merge
1517 into...
1518 (%define enum variables): ... here, and update output.
1519
620b5727
JD
15202009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
1521
1522 Rename "default rule" to "default reduction".
1523 This includes changing variable names in code, changing
1524 comments, and renaming %define lr.default_rules to %define
1525 lr.default_reductions.
1526 * NEWS (2.5): Update IELR documentation.
1527 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c:
1528 Adjust YYDEFACT and yydefact_ documentation.
1529 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
1530 and lr.type documentation. Make some other wording
1531 improvements.
1532 (Glossary): Adjust cross-references and Default Reduction
1533 definition.
1534 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
1535 Remove a confusing comment pointed out by Akim Demaille.
1536 (initialize_LA): Adjust code.
1537 * src/print-xml.c (print_reductions): Adjust code.
1538 * src/print.c (print_reductions): Adjust code.
1539 * src/reader.c (reader): Adjust code.
1540 * src/tables.c (action_row): Adjust code.
1541 (token_actions): Adjust code.
1542 * src/tables.h: Adjust YYDEFACT documentation.
1543 * tests/input.at (%define lr.default_rules invalid values):
1544 Rename test group to...
1545 (%define lr.default_reductions invalid values): ... this, and
1546 update grammar file and expected output.
1547 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
1548 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
1549
34a6c2d1
JD
15502009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1551
1552 Document %define lr.type and lr.default_rules.
1553 * NEWS (2.5): Add an entry.
1554 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
1555 besides just LALR(1) and GLR(1).
1556 * doc/bison.texinfo (Introduction): Likewise.
1557 (Language and Grammar): Bison is no longer limited to LALR(1)
1558 restrictions.
1559 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
1560 when trying to distinguish from GLR. Talk about LR(1) grammars
1561 rather than LALR(1) grammars.
1562 (Decl Summary): In %define api.push_pull entry, say it applies
1563 to deterministic parsers in C rather than LALR(1) parsers in C.
1564 Add lr.default_rules entry.
1565 Add lr.type entry.
1566 (Mystery Conflicts): Bison is no longer limited to LALR(1)
1567 restrictions.
1568 (Generalized LR Parsing): Same changes as for the previous GLR
1569 section.
1570 (Memory Management): Say deterministic rather than LALR(1).
1571 (Understanding): Correct some bison output.
1572 Index discussion of "accepting state".
1573 Say deterministic rather than LALR(1).
1574 (Bison Options): In --yacc entry, say deterministic rather than
1575 LALR(1).
1576 In --report, --graph, and --xml entries, just don't mention
1577 LALR(1).
1578 (C++ Parsers): Say deterministic rather than LALR(1).
1579 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
1580 (Glossary): Add Accepting State, Consistent State, Default Rule,
1581 and IELR(1) definitions.
1582 In Generalized LR (GLR) definition, make same changes as in
1583 previous GLR sections.
1584 In LALR(1) definition, say Bison uses LALR(1) by default rather
1585 than implying Bison is limited to LALR(1).
1586 (LocalWords): Add IELR.
1587
f805dfcb
JD
15882009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1589
1590 Finish implementing %define lr.type.
1591 Its value can be "LALR", "IELR", or "canonical LR".
1592 * lib/timevar.def (TV_IELR_PHASE1): New var.
1593 (TV_IELR_PHASE2): New var.
1594 (TV_IELR_PHASE3): New var.
1595 (TV_IELR_PHASE4): New var.
1596 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
1597 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
1598 Sbitset.h, ielr.h, and ielr.c.
1599 * src/getargs.h, src/getargs.c (enum trace, trace_args,
1600 trace_types): Add trace_ielr.
1601 * src/lalr.h, src/lalr.c (ngotos): Export it.
1602 (F): Rename to...
1603 (goto_follows): ... this, update all uses, and export it.
1604 (set_goto_map): Export it.
1605 (map_goto): Export it.
1606 (compute_lookahead_tokens): Don't free goto_follows yet. Now
1607 handled in ielr.
1608 (initialize_LA): Export it. Move lookback allocation to...
1609 (lalr): ... here because, for canonical LR, initialize_LA must
1610 be invoked but lookback and much of the rest of LALR isn't
1611 needed.
1612 * main.c (main): Instead of lalr, invoke ielr, which invokes
1613 lalr.
1614 * src/reader.c (reader): Default lr.type to "LALR".
1615 Default lr.default_rules to "accepting" if lr.type is "canonical
1616 LR". Leave the default as "all" otherwise.
1617 Check for a valid lr.type value.
1618 * src/state.h, src/state.c (struct state_list): Add state_list
1619 member.
1620 (state_new): Initialize state_list member to NULL.
1621 (state_new_isocore): New function, exported.
1622 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
1623 exercises all values of lr.type.
1624 (GNU AWK Grammar): Rename test group to...
1625 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
1626 AT_TEST_EXISTING_GRAMMAR.
1627 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
1628 (GNU pic Grammar): Rename test group to...
1629 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
1630 AT_TEST_EXISTING_GRAMMAR.
1631 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
1632 all values of lr.type.
1633 (Single State Split): New test groups using AT_TEST_LR_TYPE.
1634 (Lane Split): Likewise.
1635 (Complex Lane Split): Likewise.
1636 (Split During Added Lookahead Propagation): Likewise.
1637
166366b2
JD
16382009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1639
1640 Add new files for IELR and canonical LR implementation.
1641 * src/AnnotationList.c: New.
1642 * src/AnnotationList.h: New.
1643 * src/InadequacyList.c: New.
1644 * src/InadequacyList.h: New.
1645 * src/Sbitset.c: New.
1646 * src/Sbitset.h: New.
1647 * src/ielr.c: New.
1648 * src/ielr.h: New.
1649
03c07b03
JD
16502009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
1651
1652 Implement %define lr.default_rules.
1653 Its value describes the states that are permitted to contain
1654 default rules: "all", "consistent", or "accepting".
1655 * src/reader.c (reader): Default lr.default_rules to "all".
1656 Check for a valid lr.default_rules value.
1657 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
1658 is "accepting", then only mark the accepting state as
1659 consistent.
1660 (initialize_LA): Tell state_lookahead_tokens_count whether
1661 lr.default_rules is "accepting".
1662 * src/tables.c (action_row): If lr.default_rules is not "all",
1663 then disable default rules in inconsistent states.
1664 * src/print.c (print_reductions): Use this opportunity to
1665 perform some assertions about whether lr.default_rules was
1666 obeyed correctly.
1667 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
1668 helps with checking the parser tables for a grammar.
1669 * tests/input.at (%define lr.default_rules invalid values): New
1670 test group.
1671 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
1672 AT_TEST_TABLES_AND_PARSE.
1673 (`no %define lr.default_rules'): New test group generated by
1674 AT_TEST_LR_DEFAULT_RULES.
1675 (`%define lr.default_rules "all"'): Likewise.
1676 (`%define lr.default_rules "consistent"'): Likewise.
1677 (`%define lr.default_rules "accepting"'): Likewise.
1678
44c124a3
AD
16792009-04-20 Akim Demaille <demaille@gostai.com>
1680
1681 Consistently refer to Yacc, not YACC.
1682 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
1683
42660736
JD
16842009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
1685
1686 Pacify make maintainer-check-posix.
1687 * tests/input.at (%define, --define): Move bison command-line
1688 options before grammar file name.
1689
a2d05674
JD
16902009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
1691
1692 Document semicolon warnings.
1693 * NEWS (2.5): Here.
1694
c4fae1ef
AD
16952008-12-08 Akim Demaille <demaille@gostai.com>
1696
1697 Fix portability issue in the test suite.
1698 * tests/local.at (AT_MATCHES_CHECK): New.
1699 Based on Perl instead of Sed. Sed has too many portability
1700 pitfalls, not ever Sed is GNU Sed.
1701 * tests/actions.at (Fix user actions without a trailing semicolon):
1702 Use it.
1703
42f4393a
DJ
17042008-12-07 Di-an Jan <dianj@freeshell.org>
1705
1706 Implement the FIXME that ends an user action with a semicolon
1707 if it seems necessary.
1708 * src/scan-code.l (flex rules section): Flag cpp directive from
1709 any `#' to the first unescaped end-of-line. Semicolon is not
1710 needed after `;', `{', '}', or cpp directives and is needed after
1711 any other token (whitespaces and comments have no effect).
1712 * tests/actions.at (Fix user actions without a trailing semicolon):
1713 New test.
1714 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
1715 to make user actions complete statements.
1716 Adjust column numbers in error messages.
1717 * tests/regression.at (Fix user actions without a trailing semicolon):
1718 Remove. Covered by new test.
1719
bd5df716
AD
17202009-04-14 Akim Demaille <demaille@gostai.com>
1721
1722 doc: minor fixes.
1723 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
1724 (Table of Symbols): Remove duplicate entry for %debug.
1725
7ba0d59d
EB
17262009-04-10 Eric Blake <ebb9@byu.net>
1727
1728 submodules: update to latest
1729 * submodules/autoconf: Use latest upstream Autoconf.
1730
b4d71a96
EB
17312009-04-06 Eric Blake <ebb9@byu.net>
1732
1733 Work around autoconf 2.63b bug in testsuite.
1734 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
1735 autoconf bug related to # in test.
1736
4ecd3681
JD
17372009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
1738
1739 * NEWS (2.5): Describe new -D/--define feature.
1740
c65e5292
AD
17412008-11-10 Akim Demaille <demaille@gostai.com>
1742
1743 --trace=muscles
1744 * src/getargs.h, src/getargs.c (trace_muscle): New.
1745 (trace_types, trace_args): Support it.
1746 * src/output.c (output_skeleton): Use it.
1747
96002de2
AD
17482008-11-10 Akim Demaille <demaille@gostai.com>
1749
1750 muscles_output.
1751 * src/output.c (muscles_output): New, extracted from...
1752 (output_skeleton): here.
1753 Adjust.
1754
fadb13b5
AD
17552008-11-21 Akim Demaille <demaille@gostai.com>
1756
1757 Display the changes in cross-options.texi.
1758 * build-aux/cross-options.pl ($sep): New, to separate items.
1759 * doc/Makefile.am ($(srcdir)/cross-options.texi): Use diff to display
1760 the changes.
1761
72183df4
DJ
17622008-11-20 Di-an Jan <dianj@freeshell.org>
1763
1764 Improves options in the manual.
1765 * doc/bison.texinfo (-g, -x): Add space before argument.
1766 (Option Cross Key): Implement FIXME: listing directives also.
1767 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
1768 (Short Option): Special case -d. Put arguments inside @option.
fadb13b5 1769 (Bison Directive): Add column, automatically extracted from
72183df4
DJ
1770 src/scan-gram.l (actual name passed as the first argument)
1771 with special case for %define.
1772 * doc/Makefile.am (doc/cross-options.texi): Pass src/scan-gram.l
1773 to build-aux/cross-options.pl.
1774 * src/getargs.c (usage): Document limitations of cross-options.pl.
1775 * src/scan-gram.l: Likewise.
1776
e80b068c
AD
17772009-02-25 Akim Demaille <demaille@gostai.com>
1778
1779 Copyright years.
1780 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
1781
e3ee30b8
AD
17822008-12-08 Akim Demaille <demaille@gostai.com>
1783
1784 Install autoconf as a submodule to get m4sugar.
1785 * .gitmodules: Add submodules/autoconf.
1786 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
1787 submodules/autoconf.
1788
c4eb1e84
JD
17892008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1790
1791 Simplify last patch slightly.
1792 * src/getargs.c (getargs): Here.
1793
10fa0146
JD
17942008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1795
1796 Fix last warning from --enable-gcc-warnings.
1797 * src/getargs.c (getargs): Don't assign const address to non-const
1798 pointer.
1799
6f5be1ab
DJ
18002008-11-17 Di-an Jan <dianj@freeshell.org>
1801
1802 Handle --enable-gcc-warnings.
1803 * src/getargs.c (command_line_location): Set parameters to void.
1804
11c4e57d
AD
18052008-11-11 Akim Demaille <demaille@gostai.com>
1806
1807 AT_FULL_COMPILE.
1808 * tests/actions.at, tests/regression.at: Use it.
1809
e186a284
AD
18102008-11-07 Akim Demaille <demaille@gostai.com>
1811
1812 Pass command line location to skeleton_arg and language_argmatch.
1813 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
1814 The location argument is now mandatory.
1815 Adjust all dependencies.
1816 (getargs): Use command_line_location.
1817
e14c6831
AD
18182008-11-07 Akim Demaille <demaille@gostai.com>
1819
1820 -D, --define.
1821 * src/getargs.c (usage): Document -D.
1822 Fix help string for --locations.
1823 (command_line_location): New.
1824 (short_options, long_options, getargs): Support -D, --define.
1825 (getargs): Move -d support at the right place.
1826 * doc/bison.texinfo (Bison Options): Update.
1827 * tests/input.at (%define, --define): New.
1828
75c21b61
AD
18292008-11-07 Akim Demaille <demaille@gostai.com>
1830
1831 Initialize the muscle table before parsing the command line.
1832 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
1833 (getargs): Define file_name.
1834 * src/main.c (main): Initialize muscle_tab before calling
1835 getargs.
1836 * src/muscle_tab.c (muscle_init): No longer define file_name, as
1837 its value is not available yet.
1838
33d2a860
AD
18392008-11-09 Akim Demaille <demaille@gostai.com>
1840
1841 Require the generation of parse-gram.output.
1842 * src/Makefile.am (YACC): Pass --report=all.
1843
006faedf
JD
18442009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
1845
1846 * NEWS (2.5): New stub.
1847
ecd1b61c
JD
18482009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
1849
1850 Fix options documentation.
1851 * build-aux/cross-options.pl: As in --help output, write optional
1852 arguments as [=ARG] not =[ARG].
1853 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
1854
f67c4037
AD
18552008-11-07 Akim Demaille <demaille@gostai.com>
1856
1857 Fix --help.
1858 * src/getargs.c (usage): Fix help string for -W.
1859
0213d651
AD
18602008-11-07 Akim Demaille <demaille@gostai.com>
1861
1862 Handle more general types of option arguments.
1863 * build-aux/cross-options.pl: The argument ends at the first
1864 space, not the first non-symbol character.
1865 Use @var for each word appearing the argument description.
1866
c19178bf
JD
18672009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
1868
1869 Remove spurious initial empty lines.
1870 * data/location.cc: End the @output lines with an @.
1871
0d2b2ab0
AD
18722008-11-04 Akim Demaille <demaille@gostai.com>
1873
1874 Remove spurious initial empty lines.
1875 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
1876 * data/yacc.c: End the @output lines with an @.
1877
8ba62e3e
JD
18782009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
1879
1880 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
1881 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
1882 requirements for a correct m4 are stricter.
1883 * m4/m4.m4: Replace with Autoconf 2.63's m4/m4.m4.
1884 * configure.ac: Update to use AC_PROG_GNU_M4.
1885 Reported by Eric Blake.
1886
5bc993d9
JD
18872009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1888
1889 Help with updating web manual.
1890 * HACKING: Incorporate instructions from gnulib/doc/README.
1891 * bootstrap.conf (gnulib_modules): Add gendocs.
1892
580c075d
JD
18932009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1894
1895 Fix strange %define locations for default values.
1896 Reported by Akim Demaille at
1897 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
1898 and discussed again starting at
1899 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
1900 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
1901 because location information is bogus.
1902 Use angle brackets to delimit fake file name because square brackets
1903 look like underexpanded m4. Choose a better fake file name.
1904 Use negative line numbers.
1905 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
1906 * src/location.c (location_print): If line for a boundary is negative,
1907 only print that boundary's file name.
1908 * src/location.h: Document that.
1909 * tests/skeletons.at (%define Boolean variables: invalid skeleton
1910 defaults): Update output.
1911
5d3a1ecb
AD
19122008-11-07 Akim Demaille <demaille@gostai.com>
1913
1914 Locations without columns for command line arguments.
1915 * src/location.c (location_print): Don't display negative columns.
1916 * src/location.h: Document this.
1917
015e86a7
JD
19182009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
1919
1920 Add reminder about uploading public key to keys.gnupg.net.
1921 * HACKING (Release Procedure): Here.
1922
c1455bab
AD
19232009-03-31 Akim Demaille <demaille@gostai.com>
1924
1925 bootstrap: --help to stdout.
1926 * bootstrap (usage): Don't send --help to stderr.
1927 Use a here doc instead of a long string.
1928
2075a82a
AD
19292009-03-31 Akim Demaille <demaille@gostai.com>
1930
1931 bootstrap: README-hacking no longer exists
1932 * bootstrap (checkout_only_file): Set to HACKING.
1933
26fccd4d
AD
19342009-03-26 Akim Demaille <demaille@gostai.com>
1935
1936 doc: merge HACKING and README-hacking.
1937 Two files is confusing.
1938 Reported by Alexandre Duret-Lutz.
5bc993d9 1939
26fccd4d
AD
1940 * README-hacking: Merge into...
1941 * HACKING (Working from the repository): here.
1942
6469c4d7
AD
19432009-03-26 Akim Demaille <demaille@gostai.com>
1944
1945 doc: update README-hacking.
1946 * README-hacking: We now use git and git submodules.
1947 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
1948
b328890a
AD
19492009-03-26 Akim Demaille <demaille@gostai.com>
1950
1951 lalr1.cc: avoid GCC 4.3 warnings.
1952 GCC 4.3 now warns about "a || b && c" and asks for explicit
1953 parentheses.
1954 Reported by Alexandre Duret-Lutz.
1955 * data/location.cc: Update copyright years.
1956 (Position::operator==): Use parens to make precedence explicit.
1957 Compare lines and columns first, as they are more likely to be
1958 different, and they are faster to compare.
1959
f3079439
AD
19602009-03-26 Akim Demaille <demaille@gostai.com>
1961
1962 gnulib: update.
1963 * gnulib: Update to latest.
1964 * lib/Makefile.am (AM_CPPFLAGS): It is now defined by gnulib, so
1965 use +=.
1966
8defe11b
AD
19672009-01-08 Akim Demaille <demaille@gostai.com>
1968
1969 Fix grep portability issues.
1970 Grep on Solaris does not support -q.
1971 Reported by Summum Bonum.
5bc993d9 1972
8defe11b
AD
1973 * NEWS: Add a stub for 2.4.2.
1974 * THANKS: Add Summum Bonum.
1975 * tests/atlocal.in (EGREP): New.
1976 (CC, CXX, XSLTPROC): Make it possible to override them via
1977 envvars.
1978 * tests/java.at: Use $EGREP instead of egrep.
1979 Use AT_CHECK's ignore instead of grep's -q.
1980
41930e7a
JD
19812008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
1982
1983 Version 2.4.1.
1984 * NEWS: Set version and date.
1985 * lib/Makefile.am: Update copyright year.
1986 * tests/atlocal.in: Update copyright year.
1987
d07932ef
JD
19882008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
1989
1990 Semicolon feature removal is not about future language support.
1991 * NEWS: The semicolon feature is no longer active for newer languages,
1992 so don't claim that it causes trouble for them.
1993
0364b334
JD
19942008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
1995
1996 * gnulib: Update submodule to HEAD.
1997
876fd835
AD
19982008-12-09 Akim Demaille <demaille@gostai.com>
1999
2000 Update data/README.
2001 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
2002
bee1df15
EB
20032008-12-05 Eric Blake <ebb9@byu.net>
2004
2005 Build testsuite with newer autoconf.
2006 * tests/output.at (m4_expand): Don't override in newer autoconf,
2007 where the underlying implementation changed.
2008 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
2009 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
2010 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
2011 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
2012 since some of them contain unbalanced ')'.
2013
7e6d1e22
JD
20142008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
2015
2016 * NEWS: Clarify a little.
2017
a957d06c
JD
20182008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
2019
2020 * NEWS: Update for recent changes.
2021
462503f8
JD
20222008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
2023
2024 Fix unexpanded macros in GLR defines file.
2025 Reported by Csaba Raduly at
2026 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
2027 * THANKS (Csaba Raduly): Add.
2028 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
2029 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
2030 lexer in a separate module that includes the defines file.
2031 (AT_CHECK_CALC): Use AT_FULL_COMPILE and request compilation of lexer
2032 source.
2033 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
2034 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
2035 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
2036 (AT_DATA_SOURCE_PROLOGUE): New.
2037 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
2038 (AT_DATA_SOURCE): New.
2039 (AT_FULL_COMPILE): New, copied from master branch and extended to
2040 support an additional source file.
2041
bf151b75
JD
20422008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2043
2044 Don't let maintainer-*-check targets force a version update.
2045 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
2046 handled.
2047
f56274a8
DJ
20482008-11-17 Di-an Jan <dianj@freeshell.org>
2049
2050 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
2051 Align menus. Adjust word wrapping. Use node names for menu names.
2052 (Examples): Don't abbreviate node names.
2053 (LocalWords): Remove abbreviations.
2054 (Copying): Make description a sentence.
bf151b75 2055 (Java Action Features): Remove period to match the rest of menu.
f56274a8 2056
b5775a81
PB
20572008-11-11 Paolo Bonzini <bonzini@gnu.org>
2058
2059 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
2060 * configure.ac: Adjust usage.
2061 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2062 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2063 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
2064
7ed73f82
JD
20652008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2066
2067 Don't add a semicolon to actions for %skeleton or %language.
2068 It breaks Java test cases as reported by Akim Demaille.
2069 * src/scan-code.l: Implement.
2070
4b1ebc49
JD
20712008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2072
2073 Clean up %skeleton and %language priority implementation.
2074 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
2075 remove static qualifier because others will soon need to see it.
2076 (language_prio): Likewise.
2077 (getargs): Use command_line_prio rather than 0.
2078 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
2079 enum fields.
2080 (skeleton_prio): Extern it.
2081 (language_prio): Extern it.
2082 * src/parse-gram.y: Use grammar_prio rather than 1.
2083
738cde3e
AD
20842008-11-04 Akim Demaille <demaille@gostai.com>
2085
2086 * NEWS: Mention the trailing semicolon in action.
2087
d6fb461d
AD
20882008-11-04 Akim Demaille <demaille@gostai.com>
2089
2090 Reformat NEWS.
2091 * NEWS: Use more outline-mode markup.
2092 Suggested by Jim Meyering.
2093
14da0cdd
JD
20942008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
2095
2096 Fix user actions without a trailing semicolon.
2097 Reported by Sergei Steshenko at
2098 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
2099 * THANKS (Sergei Steshenko): Add.
2100 * src/scan-code.l (SC_RULE_ACTION): Fix it.
2101 * tests/regression.at (Fix user actions without a trailing semicolon):
2102 New test case.
2103
c9ba9e59
JD
21042008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2105
2106 Initiate further development.
2107 * NEWS: Create an empty section for new entries.
2108 * gnulib: Update submodule to HEAD.
2109
bfb40910
JD
21102008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2111
2112 * NEWS: Version 2.4.
2113
241fda7a
JD
21142008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2115
2116 Prepare for next release.
2117 * NEWS: Briefly mention changes since 2.3b.
2118 * README: Say GNU m4 1.4.6, which we've been requiring in release
2119 announcements already, not 1.4.3, which breaks the build.
2120
ed4d67dc
JD
21212008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2122
2123 Say %language is experimental.
2124 We're thinking of extending it's effect on output file naming. See the
2125 thread at
2126 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
2127 * NEWS: Say it's experimental.
2128 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
2129 recommend it over %skeleton for now.
2130 (Bison Options): Likewise.
2131 (C++ Bison Interface): Use %skeleton not %language.
2132 (Calc++ Parser): Use %skeleton not %language.
2133 * src/getargs.c (usage): Say it's experimental.
2134
e254a580
DJ
21352008-11-01 Di-an Jan <dianj@freeshell.org>
2136 Paolo Bonzini <bonzini@gnu.org>
2137
2138 Support all Java parser class modifiers.
2139 * data/java.m4 (b4_percent_define_get3): New.
2140 (b4_final_if, b4_strictfp_if): New.
2141 * data/lalr1.java (final, strictfp, extends, implements): Support.
2142 * doc/bison.texinfo (final, strictfp, extends, implements): Add
2143 documentation.
2144 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
2145 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
2146 (AT_CHECK_JAVA_GREP): New.
2147 (Java parser class modifiers): New test.
2148 (Java parser class extends and implements): New test.
2149
2150 Model exception propagation better with throws and lex_throws.
2151 * data/java.m4 (b4_list2): New.
2152 (throws): Change default.
2153 * data/lalr1.java (yyaction): Add throws.
2154 (parse): Add lex_throws in addition to throws.
2155 * doc/bison.texinfo (throws, lex_throws): Add documentation.
2156 * tests/java.at (Java throws specifications): New test.
2157
2158 Improve documentation for Java parsers.
2159 * doc/bison.texinfo (Java Parsers): Add subsections.
2160 Don't quote first argument of %define.
2161 (Java Bison Interface): Document output files. Move documentation
2162 of parser class and merge into Java Parser Interface. Document
2163 features that error out. Document directives with no effect.
2164 Move note about Javadoc higher.
2165 (Java Semantic Values): Explicitly mention stype.
2166 Document that generic types cannot be used.
2167 (Java Location Values): Use @deftypeivar. Document constructors.
2168 Correct return value for toString.
2169 (Java Parser Interface): List undocumented constants/fields.
2170 Move documentation of fields added by %parse-param closer to list
2171 of members. Document that token names are added as fields.
2172 Document constructors accurately. Remove error method.
2173 (Java Scanner Interface): Move note on %pure-parser to Java Bison
2174 Interface. Describe %code lexer and yylex accutately.
2175 Remove documentation that does not match the code.
2176 (Java Action Features): New.
2177 (Java Differences): Add reference. Add item on semantic values.
2178 Add note about @{ ... @}. Clarify %% epilogue placement.
2179 (Java Declarations Summary): New.
2180
2181 Fix Java skeleton.
2182 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
2183 (b4_remove_comma): Quote test argument.
2184 (b4_identification): Remove "bison" field.
2185 * tests/java.at (Java parser class and package names): New test.
2186 (Java %parse-param and %lex-param): New test.
2187 (Java stype, position_class and location_class): New test.
2188
f259e4e6
PB
21892008-10-31 Di-an Jan <dianj@freeshell.org>
2190
2191 * data/lalr1.jave: Update copyright years.
2192 (YYParser): Correct name of "generated from" file in Javadoc:
2193 use b4_file_name instead of @ofile@.
2194 (Location constructor): Correct Javadoc parameter name.
2195 (yylloc): Add missing opening m4 quote after b4_location_if.
2196 This removes a stray [ in the Javadoc of Lexer.getStartPos.
2197 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
2198 (YYParser constructor): Correct Javadoc parameter name.
2199
cae5057f
JD
22002008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
2201
2202 Always put auxiliary code files in the same dir as other output files.
2203 * src/files.c (compute_file_name_parts): When the user specifies
2204 --output but not --file-prefix, extract the directory prefix from the
2205 file prefix not from the grammar file name. This affects the location
2206 of files like location.hh generated by the C++ skeleton. The includes
2207 in the other output files require this fix.
2208 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
2209 for expected output files.
2210 (Output files): Add a test for the above.
2211
4af432ba
JD
22122008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
2213
2214 * gnulib: Update submodule to HEAD.
2215
e26d4e43
JD
22162008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
2217
2218 Update copyright year.
2219 * src/files.c: Here.
2220
c0ee9e21
DJ
22212008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
2222
2223 Don't overwrite the input file.
2224 * src/files.c (output_file_name_check): Fatal error if using input file
2225 for output.
2226 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
2227 argument.
2228 (Conflicting output files): Add test.
2229
482dc52f
AD
22302008-10-28 Akim Demaille <demaille@gostai.com>
2231
2232 Space changes.
2233 * data/lalr1.cc: Formatting changes.
2234
52cbbe84
AD
22352008-10-28 Akim Demaille <demaille@gostai.com>
2236
2237 Don't define debugging functions when !YYDEBUG.
2238 * data/lalr1.cc (debug_stream, set_debug_stream)
2239 (debug_level_type, debug_level, set_debug_level): Don't
2240 declare them when YYDEBUG is not defined.
2241 The implementation are already YYDEBUG-aware.
2242
0925d5bf
AD
22432008-10-28 Akim Demaille <demaille@gostai.com>
2244
2245 Prefer "continue" for empty loop bodies.
2246 * etc/bench.pl.in: Use "continue" instead of {}.
2247
cf98343c
AD
22482008-10-28 Akim Demaille <demaille@gostai.com>
2249
2250 Space and comments changes.
2251 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
2252 * data/c.m4, data/lalr1.cc: Space changes.
2253
9f467b7d
AD
22542008-10-28 Akim Demaille <demaille@gostai.com>
2255
2256 Make gnulib a submodule.
2257 * gnulib: New.
2258 * .gitmodules (gnulib): New.
2259
0f0e1ace
JD
22602008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
2261
2262 Fix yyerror_range for user-defined location type in C++. Reported by
2263 Georg Sauthoff at
2264 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
2265 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
2266 * THANKS (Georg Sauthoff): Add.
2267
548e2104
JD
22682008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
2269
2270 Update several administrative files mainly to facilitate releasing.
2271 * HACKING (Administrivia): Make the git-merge-changelog notes more
2272 helpful.
2273 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
2274 (Release Procedure): Update for git and add numerous details that were
2275 previously missing.
2276 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
2277 * maint.mk (announcement): Don't list bison as a bootstrap tool so
2278 that announcements don't claim we bootstrapped with whatever bison
2279 happened to be in PATH. Add flex as a bootstrap tool.
2280 * Makefile.maint: Remove, previously replaced by maint.mk.
2281 * Makefile.cfg: Remove, and migrate settings to...
2282 * cfg.mk: ... here for the sake of `make announcement'.
2283 * bootstrap.conf (gnulib_modules): Add announce-gen.
2284 * README: Say GNU Bison instead of just Bison. Suggested by Karl
2285 Berry.
2286
ddf17a6e
PB
22872008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
2288
2289 Small but important bugfixes for the Java skeleton.
2290 * data/lalr1.java (yyerror): Change Location to b4_location_type.
2291 (yy_symbol_print): Call toString on yyvaluep.
2292
e1145ad8
AD
22932008-08-29 Akim Demaille <demaille@gostai.com>
2294
2295 Clarify UPDATED use.
bee1df15 2296 * doc/bison.texinfo: It refers to the last edition of this file,
e1145ad8 2297 not to the release date of Bison.
bee1df15 2298 Reported by Joel E. Denny.
e1145ad8 2299
0df72d78
AD
23002008-08-29 Akim Demaille <demaille@gostai.com>
2301
2302 * README: Update FAQ pointer.
2303 Reported by Joel E. Denny.
2304
9a90b6bb
EB
23052008-08-27 Eric Blake <ebb9@byu.net>
2306
2307 Resync m4sugar from autoconf.
2308 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
2309 (m4_init): Adjust to latest m4.git changes.
2310 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
2311 effects.
2312 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
2313 (_m4_list_cmp): Reduce side effects.
2314
65015668
AD
23152008-08-27 Akim Demaille <demaille@gostai.com>
2316
2317 Check yyerrok in calc.at.
bee1df15
EB
2318 * tests/calc.at (calc.y): Use yyerrok on "( error )".
2319 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
2320 expected.
65015668 2321
98e26a92
AD
23222008-08-27 Akim Demaille <demaille@gostai.com>
2323
2324 Support yyerrok in lalr1.cc.
2325 YYBACKUP is still to import back into lalr1.cc.
bee1df15 2326 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
98e26a92 2327
86c0e784
JD
23282008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
2329
2330 For maintainer-check*, don't recompile for a $(VERSION) update.
2331 * cfg.mk: New file.
2332 (_is-dist-target): Override the one in GNUmakefile.
2333 * Makefile.am (EXTRA_DIST): Add cfg.mk.
2334
88511166
JD
23352008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
2336
2337 Update for recent change to gnulib.
2338 * src/parse-gram.y: Don't include strverscmp.h. It comes from
2339 string.h now.
2340
6bbb2ed5
EB
23412008-08-15 Eric Blake <ebb9@byu.net>
2342
d67c52e8
EB
2343 Remaining m4sugar merge from autoconf.
2344 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
2345 * data/m4sugar/foreach.m4: New file, copied from autoconf.
2346 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
2347 * src/output.c (output_skeleton): Tell m4 how to find it.
2348
6bbb2ed5
EB
2349 Partial m4sugar merge from autoconf: m4_map.
2350 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
2351 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
2352 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
2353 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
2354 for empty list.
2355 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
2356 Likewise.
2357 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
2358 declares it.
2359
8dce3875
JD
23602008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
2361
2362 Keep .version and PACKAGE_VERSION in sync.
2363 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
2364 dependency, and add comments justifying this in more detail. Discussed
2365 starting at
2366 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
2367
882a1fbf
EB
23682008-08-06 Eric Blake <ebb9@byu.net>
2369
a3764451
EB
2370 Partial m4sugar merge from autoconf: m4_shiftn.
2371 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
2372 (m4_shift2, m4_shift3): New macros.
2373 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
2374 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
2375 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
2376 * data/java.m4 (b4_remove_comma): Likewise.
2377
882a1fbf
EB
2378 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
2379 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
2380 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
2381 (m4_init): Consolidate wrapped text into single m4_wrap.
2382 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
2383 in wrapped text.
2384
a30e920d
EB
23852008-08-05 Eric Blake <ebb9@byu.net>
2386
dfcc5959
EB
2387 Partial m4sugar merge from autoconf: builtins, version.m4.
2388 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
2389 (m4_prepend): Remove, as it is unused and inherently quadratic,
2390 whereas m4_append is linear in newer m4.
2391 (m4_mkstemp): New builtin.
2392 (m4_symbols): Make rename conditional.
2393 (m4_version_prereq): Ensure fatal error if used in bison, which
2394 intentionally lacks version.m4.
2395
a30e920d
EB
2396 Fix comments in m4sugar.
2397 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
2398
445b7470
JD
23992008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
2400
2401 Update for recent .gitignore fix in Gnulib.
2402 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
2403 anchored .gitignore entries.
2404
a1e50014
JD
24052008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
2406
2407 Set gnu or gnits strictness.
2408 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
2409 development and gnits strictness for releases. Based on Eric Blake's
2410 suggestion at
2411 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
2412
d43f77e7
PB
24132008-07-31 Paolo Bonzini <bonzini@gnu.org>
2414
2415 * NEWS: Clarify documentation of %language.
2416
fee2ed87
PB
24172008-07-31 Paolo Bonzini <bonzini@gnu.org>
2418
2419 Support usage of git-merge-changelog.
2420 * .gitattributes: New.
2421 * HACKING: Document usage of git-merge-changelog.
2422 * bootstrap: Install git-merge-changelog entries in .git/config
2423 if appropriate.
2424
78029cd5
JD
24252008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
2426
2427 Remove remaining dependence on CVS Id keyword.
2428 * ChangeLog: For the sake of people still using CVS, don't use dollars
2429 when mentioning Id.
2430 * data/xslt/bison.xsl: Remove Id from header comments, where it was
2431 unusual anyway.
2432 * data/xslt/xml2dot.xsl: Likewise.
2433 * data/xslt/xml2text.xsl: Likewise.
2434 * data/xslt/xml2xhtml.xsl: Likewise.
2435 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
2436 * doc/Makefile.am (neutralize): Remove, no longer needed.
2437 (.x.1): Don't use neutralize.
2438 (edit): Don't substitute for ID.
2439 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
2440
c53d18b1
JD
24412008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
2442
2443 Fix dependence on computed configure variables.
2444 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
2445 $(top_srcdir)/configure.ac so that changes to computed variables, such
2446 as PACKAGE_VERSION, are seen.
2447 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
2448
5523ac79
JD
24492008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
2450
2451 Update copyright dates for recent changes.
2452 * Makefile.am: Here.
2453 * src/Makefile.am: Here.
2454 * src/reduce.c: Here.
2455 * tests/reduce.at: Here.
2456
8fa36911
JD
24572008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
2458
2459 Use git-version-gen for version names between releases.
2460 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
2461 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
2462 * .prev-version: New.
2463 * .version.in: Remove.
78029cd5 2464 * ChangeLog: Remove the Id previously used for capturing the CVS
8fa36911
JD
2465 revision.
2466 * GNUmakefile: Remove, now copied from Gnulib.
2467 * Makefile.am: Add code suggested by comments in
2468 build-aux/git-version-gen.
2469 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
2470 .prev-version, and .version.
2471 * NEWS (2.3b+): Rename to...
2472 (?.?): ... this because we're dropping the "+" version naming scheme,
2473 but, in general, we still can't be sure of our next release name.
2474 * bootstrap: Add a quick hack to remove from .gitignore the
2475 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
2476 entry. This should really be fixed in gnulib instead.
2477 * bootstrap.conf (gnulib_modules): Add gnumakefile.
2478 * configure.ac (AC_INIT): Set version name by invoking
2479 build-aux/git-version-gen.
2480 (AC_CONFIG_FILES): Remove .version, now generated by
2481 build-aux/git-version-gen.
2482 * maint.mk: New, copied from coreutils.
2483 * doc/.cvsignore (bison.1): Add.
2484 * doc/.gitignore (/bison.1): Add.
2485 * doc/bison.1: Remove, generated.
2486 * src/.cvsignore (revision.c): Remove.
2487 * src/.gitignore (/revision.c): Remove.
2488 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
2489 (BUILT_SOURCES): Remove revision.c.
2490 (revision.c): Remove.
2491 * src/getargs.c (version): Don't print revision after the VERSION.
2492 * src/revision.h: Remove.
2493
bcf07cb7
JD
24942008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
2495
2496 Fix untranslatable composition of sentences. Reported by Goran
2497 Uddeborg at
2498 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
2499 * THANKS (Goran Uddeborg): Add.
2500 * src/reduce.c (reduce_print): Report the number of nonterminals and
2501 rules useless in the grammar in separate sentences.
2502 * tests/reduce.at (Useless Rules): Update output.
2503 (Reduced Automaton): Likewise.
2504 (Underivable Rules): Likewise.
2505 (Empty Language): Likewise.
2506
9aacab9a
JD
25072008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2508
2509 Fix some .gitignore and .cvsignore problems.
2510 * bootstrap (insert_sorted_if_absent): Replace all uses with...
2511 (insert_vc_ignore): ... this new function, which prepends `/' to all
2512 .gitignore entries before passing them to insert_sorted_if_absent.
2513 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
2514 .cvsignore files are maintained even though Bison developers run
2515 bootstrap while using Git.
2516 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
2517 unneeded by Bison.
2518 (gnulib): Add.
2519 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
2520 unneeded. Reported by Eric Blake.
2521 * lib/.gitignore (/*~): Add.
2522 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
2523 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
2524 Blake.
2525 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
2526
a9fc7990
JD
25272008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2528
2529 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
2530 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
2531 * bootstrap.conf (gnulib_modules): Add unsetenv.
2532 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
2533 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
2534 (/setenv.m4): Add.
2535 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
2536 the first argument because it may become position-dependent, and unset
2537 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
2538 Add comments explaining these issues in more detail.
2539
0f1d6f10
JD
25402008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
2541
2542 Add .gitignore everywhere based on .cvsignore.
2543 * .gitignore: New.
2544 * build-aux/.gitignore: New.
2545 * data/.gitignore: New.
2546 * doc/.gitignore: New.
2547 * etc/.gitignore: New.
2548 * examples/.gitignore: New.
2549 * examples/calc++/.gitignore: New.
2550 * lib/.gitignore: New.
2551 * m4/.gitignore: New.
2552 * po/.gitignore: New.
2553 * runtime-po/.gitignore: New.
2554 * src/.gitignore: New.
2555 * tests/.gitignore: New.
2556
7bd1665a
JD
25572008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2558
2559 * NEWS (2.3b+): New section, empty for now.
2560 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
2561
72c5b982
JD
25622008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2563
2564 * NEWS (2.3b): Update release date since there has been a delay in
2565 getting the announcements and tarballs out.
2566
bd02cd5d
JD
25672008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
2568
2569 * NEWS: Version 2.3b.
2570 * configure.ac (AC_INIT): Likewise.
2571 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
2572
9126263e
JD
25732008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
2574
2575 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
2576 been doing it for years.
2577 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
2578 (Release Procedure): Add FIXME about make alpha being unmaintained.
2579
fa6aa7b3
JD
25802008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
2581
2582 * data/yacc.c: Reformat m4 a little for readability.
2583 * src/lalr.c (build_relations): Correct comment.
2584
d30b312d
JMG
25852008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2586
2587 DJGPP specific issue.
2588 * djgpp/config.sed: Fixes required to run configure scripts generated
2589 by autoconf 2.62.
2590
138d4cd9
JD
25912008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
2592
2593 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
2594 coordinator@translationproject.org.
2595
8f7e2e1f
JD
25962008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
2597
2598 * THANKS: Add Eric Blake.
2599
f55efa38
JD
26002008-04-23 Eric Blake <ebb9@byu.net>
2601
2602 Revert prior patch, by working around autoconf regression.
2603 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
2604 ("Output file name: ("): Uncomment test.
2605 ("Output file name: )"): Likewise.
2606 Based on an idea from Noah Misch.
2607
096c9f9d
JD
26082008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2609
2610 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
2611 2.61. Reported by Juan Manuel Guerrero at
2612 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
2613 * tests/output.at ("Output file name: ("): Comment out test case for
2614 now.
2615 ("Output file name: )"): Likewise.
2616
0f664b89
JD
26172008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2618
2619 * GNUmakefile: Update git-version-gen invocation so make dist
2620 succeeds.
2621
1cfe6375
JD
26222008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2623
2624 Update to the current gnulib CVS repository, and fix trigraph handling
2625 in Bison.
2626 * bootstrap: Update gnulib CVS repository URL.
2627 (symlink_to_dir): Encapsulate the code that guarantees the destination
2628 directory exists into...
2629 (check_dst_dir): ... this new function, and...
2630 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
2631 fail when copying files into lib/uniwidth/.
2632 * src/output.c (prepare_symbols): When writing yytname muscles, where
2633 symbol names will be encoded in C-string literals, tell quotearg to
2634 escape trigraphs. This used to be the default in gnulib.
2635 * tests/regression.at (Token definitions): Because of the change in
2636 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
2637 escapes trigraphs in symbol names. Thus, yytname no longer has
2638 trigraphs unnecessarily doubly escaped. Update test case output.
2639 Extend test case to be sure Bison's own error messages will no longer
2640 have trigraphs in symbol names unnecessarily escaped once.
2641
74c52fc8
JD
26422008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
2643
2644 Fix make dist infinite loop reported by Juan Manuel Guerrero at
2645 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
2646 * .cvsignore: Add .version.
2647 * .version.in: New.
2648 * bootstrap.conf (gnulib_modules): Add git-version-gen.
2649 * configure.ac (AC_CONFIG_FILES): Add .version.
2650 * build-aux/.cvsignore: Add git-version-gen.
2651
8e55b3aa
JD
26522008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
2653
2654 * NEWS (2.3a+): Mention that -g now takes an argument.
2655 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
2656 consistency. Update the -g and -x entries now that they take
2657 arguments. Use brackets to indicate optional arguments.
2658 * src/getargs.c (usage): Explain the relationship between arguments of
2659 long and short options more completely. Document --defines and -d
2660 separately since the former takes an argument but, for POSIX Yacc, the
2661 latter does not.
2662 (short_options): Let -W take an optional argument like --warnings.
8452fdd9 2663 (getargs): Sort cases.
8e55b3aa 2664
59c5ac72
AD
26652008-02-28 Akim Demaille <demaille@gostai.com>
2666
2667 * doc/bison.texinfo: Fix a few typos.
2668
118d4978
AD
26692008-02-28 Akim Demaille <akim@epita.fr>
2670
2671 * doc/bison.texinfo (Bison Options): Document -W.
2672 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
2673
7020f1e9
AD
26742008-02-28 Akim Demaille <akim@epita.fr>
2675
2676 * src/getargs.c (short_options): Split and sort for readability.
2677 -g and -x take optional arguments, just like their long options.
2678 * build-aux/cross-options.pl: Use /x to make the regexp easier to
2679 understand.
2680 Fix the handling of $opt which resulted in all the argument to be
2681 considered as optional.
2682
59da312b
JD
26832008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
2684
2685 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
2686 say its interface is experimental.
2687 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
2688 Java.
2689 (Bison Options): In the -L and --language entry, mention Java.
2690 (Java Bison Interface): Say the interface is experimental.
2691 * src/getargs.c (usage): Mention -L and --language.
2692
2693 * NEWS (2.3a+): Say the push parsing interface is experimental.
2694 * doc/bison.texinfo (Push Decl): Likewise.
2695 (Decl Summary): Likewise in the "%define api.push_pull" entry.
2696 (Push Parser Function): Likewise.
2697 (Pull Parser Function): Likewise.
2698 (Parser Create Function): Likewise.
2699 (Parser Delete Function): Likewise.
2700 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
2701 yypull_parse, and yypush_parse entries.
2702
2703 * NEWS (2.3a+): Mention XML support, and say the schema is
2704 experimental.
2705 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
2706 * src/getargs.c (usage): Say the XML schema is experimental.
2707
2708 * NEWS (2.3a+): Say option instead of flag.
2709
2bb3ebec
WP
27102008-02-21 Wojciech Polak <polak@gnu.org>
2711
2712 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
2713 text.
2714
333e670c
JD
27152008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
2716
2717 Fix impure push parser compile error reported by Bob Rossi at
2718 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
2719 * data/yacc.c: Clean up whitespace in the output a little.
2720 (yypstate_allocated): Define for impure push parsers regardless of
2721 whether the pull interface is also requested.
2722 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
2723 check impure push parsers without the pull interface.
2724
2725 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
2726 yyerror takes arguments specified by %parse-param while yypstate_new
2727 does not.
2728 * doc/bison.texinfo (Parser Create Function): Document that
2729 yypstate_new returns 0 for multiple impure parser instances.
2730 * tests/push.at (Push Parsing: Multiple impure instances): Update
2731 expected stderr output.
2732
798096e1
JD
27332008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
2734
2735 * runtime-po/POTFILES.in (push.c): Remove.
2736
9ca7f077
JD
27372008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
2738
2739 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
2740 * data/push.c: Rename to...
2741 * data/yacc.c: ... this, overwriting it.
2742 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
2743 `%push-pull-parser' -> `%define api.push_pull "both"'.
2744 Remove old yacc.c tests, and update push.c tests to yacc.c.
2745
42ee26bb
JD
27462008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
2747
2748 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
2749 `"%code top" blocks' instead of `%code "top" blocks'.
2750 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
2751 Clean up whitespace in the output a little.
2752
b1cc23c4
JD
27532008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
2754
2755 Fix documentation problems reported by Tim Josling at
2756 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
2757 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
2758 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
2759 integers. Explain the effect of literal string aliases on error
2760 messages. Copy token 0 documentation from the C++ skeleton
2761 documentation.
2762
ab7f29f8
JD
27632008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
2764
2765 Accept a token number in a %left, %right, or %nonassoc for POSIX
2766 conformance. Reported by Tim Josling at
2767 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
2768 * NEWS (2.3a+): Mention.
2769 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
2770 and code numbers are treated by precedence declarations.
2771 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
2772 of symbols.1.
2773 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
2774 of symbol.
2775 (symbol.prec): New, just like symbol but allows INT.
2776 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
2777 longer holds.
2778 * tests/regression.at (Token number in precedence declaration): New
2779 test case.
2780
a924ef36
JMG
27812008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2782
2783 DJGPP specific issues.
2784 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
2785 be changed. Copyright timestamp adjusted.
2786 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
2787 be changed. Copyright timestamp adjusted.
2788 * djgpp/config.site: Copyright timestamp adjusted.
2789 * djgpp/config_h.sed: Copyright timestamp adjusted.
2790 * djgpp/djunpack.bat: Copyright timestamp adjusted.
2791 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
2792 filename translation list.
2793 * djgpp/subpipe.c (init_subpipe): Check the environment variables
2794 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
2795 files shall be created. Before trying to use the temp dir where the
2796 environment variable points to check that the dir really exists. If
2797 not default to the cwd as temp dir. Copyright timestamp adjusted.
2798 * djgpp/subpipe.h: Copyright timestamp adjusted.
2799 * djgpp/testsuite.sed: Copyright timestamp adjusted.
2800
389c8cfd
PE
28012008-01-30 Paul Eggert <eggert@cs.ucla.edu>
2802
2803 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
2804
5d1cfef4
PE
28052008-01-09 Paul Eggert <eggert@cs.ucla.edu>
2806
2807 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
2808 Problem reported by Claudio Saavedra in
2809 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
2810
e2dcf996
WP
28112008-01-05 Wojciech Polak <polak@gnu.org>
2812
2813 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
2814 document's title with the input grammar file name.
2815
da730230
JD
28162007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
2817
2818 Automate regression testing of the XML/XSLT implementation. Discussed
2819 starting at
2820 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
2821 * configure.ac (XSLTPROC): New substitution.
2822 * Makefile.am (maintainer-xml-check): New phony target invoking...
2823 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
2824 invoking make maintainer-check with BISON_TEST_XML=1.
2825 * tests/atlocal.in (XSLTPROC): New.
2826 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
2827 not to report reachable memory when Bison is expected to have a
2828 non-zero exit status and (2) to compare XML/XSLT output with --graph
2829 and --report=all output for every working grammar when
2830 BISON_TEST_XML=1.
2831 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
2832 (AT_BISON_CHECK_XML): New.
2833 (AT_QUELL_VALGRIND): New.
2834 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
2835 (AT_CHECK): ... don't redefine this since this was the old way to
2836 quell Valgrind.
2837 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
2838 AT_BISON_CHECK invocations.
2839 * tests/c++.at: Likewise.
2840 * tests/calc.at: Likewise.
2841 * tests/conflicts.at: Likewise.
2842 * tests/cxx-type.at: Likewise.
2843 * tests/existing.at: Likewise.
2844 * tests/glr-regression.at: Likewise.
2845 * tests/headers.at: Likewise.
2846 * tests/input.at: Likewise.
2847 * tests/java.at: Likewise.
2848 * tests/output.at: Likewise.
2849 * tests/push.at: Likewise.
2850 * tests/reduce.at: Likewise.
2851 * tests/regression.at: Likewise.
2852 * tests/sets.at: Likewise.
2853 * tests/skeletons.at: Likewise.
2854 * tests/synclines.at: Likewise.
2855 * tests/torture.at: Likewise.
2856 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
2857 tends to hang xsltproc.
2858 (Big horizontal): Likewise.
2859
408476bc
JD
28602007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
2861
2862 In XML output, remove redundant class attribute on symbol element.
2863 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
2864 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
2865 look up a symbol to determine whether it's a nonterminal or terminal.
2866 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
2867 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
2868
2869 Add prec/assoc information to XML output.
2870 * src/gram.c (grammar_rules_print_xml): For each rule that has a
2871 %prec, add a percent_prec attribute.
2872 * src/print-xml.c (print_grammar): For each terminal that has a
2873 precedence or associativity, add a prec or assoc attribute.
2874 (xml_indent): New.
2875 (xml_puts): Use xml_indent.
2876 (xml_printf): Use xml_indent.
2877 * src/print-xml.h (xml_indent): Prototype.
2878
2879 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
2880 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
2881
d4a26c48
JD
28822007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
2883
2884 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
2885 (bison:ruleByNumber): ... this for clarity.
2886 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
2887 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
2888 (xsl:template match="reduction"): Update.
2889 (xsl:template match="item"): Update.
2890 (xsl:template match="reduction"): Update.
2891
2892 In the XML output, don't print the list of rules where symbols appear.
2893 Compute it in XSLT instead. Discussed at
2894 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
2895 * data/xslt/bison.xsl (bison:ruleByLhs): New.
2896 (bison:ruleByRhs): New.
2897 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
2898 bison:ruleByRhs.
2899 (xsl:template match="terminal/rule"): Remove.
2900 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
2901 bison:ruleByRhs.
2902 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
2903 Remove.
2904 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
2905 bison:ruleByRhs and mode="number-link" for rule template.
2906 (xsl:template match="terminal/rule"): Remove.
2907 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
2908 bison:ruleByRhs and mode="number-link" for rule template.
2909 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
2910 Rewrite as...
2911 (xsl:template match="rule" mode="number-link"): ... this.
2912 * src/print-xml.c (print_grammar): Don't print the list of rules.
2913
ef1b4273
JD
29142007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
2915
2916 Don't let --report affect XML output; always print all information.
2917 Discussed at
2918 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
2919 * src/conflicts.c (log_resolution): Implement.
2920 * src/print-xml.c (print_core): Implement.
2921 (print_state): Implement.
2922 (print_xml): Implement.
2923
2924 * NEWS (2.3a+): Fix quotes.
2925 * src/parse-gram.y (prologue_declaration): For consistency with -v,
2926 don't let %verbose clear the list specified by --report.
2927
0f6cd9e3
AD
29282007-11-26 Akim Demaille <akim@epita.fr>
2929
2930 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
2931
d80fb37a
JD
29322007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
2933
2934 In the XML output, list useless and unused symbols and rules with the
2935 useful ones and add a "usefulness" attribute. Discussed starting at
2936 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
2937 * src/gram.c (grammar_rules_partial_print_xml): Remove.
2938 (grammar_rules_print_xml): Print all rules instead of just those
2939 useful in the grammar, and add a "usefulness" attribute.
2940 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
2941 * src/print-xml.c (print_rules_useless_in_parser): Remove.
2942 (print_grammar): Print all nonterminals instead of just useful ones,
2943 and add a "usefulness" attribute to nonterminals and terminals.
2944 (print_xml): Don't print a separate "reductions" or
2945 "rules-useless-in-parser" element.
2946 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
2947 (reduce_xml): Remove.
2948 (reduce_token_unused_in_grammar): New.
2949 (reduce_nonterminal_useless_in_grammar): New.
2950 * src/reduce.h (reduce_xml): Remove prototype.
2951 (reduce_token_unused_in_grammar): Add prototype.
2952 (reduce_nonterminal_useless_in_grammar): Add prototype.
2953 * data/xslt/xml2text.xsl: Update for XML changes.
2954 * data/xslt/xml2xhtml.xsl: Update for XML changes.
2955 * tests/reduce.at (Useless Terminals): Update output.
2956 (Useless Rules): Update output.
2957 (Reduced Automaton): Update output.
2958
2959 Say "Terminals unused in grammar" instead of "Unused terminals".
2960 * NEWS (2.3a+): Update.
2961 * doc/bison.texinfo (Understanding): Update example output.
2962 * src/reduce.c (reduce_output): Implement.
2963 * data/xslt/xml2text.xsl: Implement.
2964 * data/xslt/xml2xhtml.xsl: Implement.
2965
1bb2bd75
JD
29662007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
2967
2968 Accept --report-file=FILE to override the default `.output' filename.
2969 * NEWS (2.3a+): Mention.
2970 * doc/bison.texinfo (Bison Options): Add an entry.
2971 * src/files.c (compute_output_file_names): Don't override
2972 spec_verbose_file if already set.
2973 * src/getargs.c (usage): Document --report-file.
2974 (REPORT_FILE_OPTION): New anonymous enum member.
2975 (long_options): Add entry for it.
2976 (getargs): Add case for it setting spec_verbose_file.
2977
2978 * build-aux/cross-options.pl: Don't record a short option just because
2979 there's an arg.
2980 * doc/.cvsignore: Add yacc.1.
2981
a005a9c4
AD
29822007-11-14 Akim Demaille <akim@epita.fr>
2983
2984 * doc/yacc.1.in: New.
2985 * configure.ac, doc/Makefile.am: Adjust.
2986 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
2987 config.h symbol.
2988 Use AC_SUBST for assignments too.
2989 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
2990
cff03fb2
JD
29912007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
2992
2993 * src/gram.c: Remove comments that duplicate comments in gram.h.
2994
2995 When reporting useless rules and nonterminals, say "useless in grammar"
2996 instead of "useless", and say "useless in parser" instead of "never
2997 reduced". Discussed starting at
2998 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
2999 * NEWS (2.3a+): Mention this change.
3000 * data/xslt/xml2text.xsl: Update output text and expected input XML
3001 element names to match changes below.
3002 * data/xslt/xml2xhtml.xsl: Likewise.
3003 (xsl:template match="bison-xml-report"): Add missing entry in Table of
3004 Contents: "Rules useless in parser due to conflicts".
3005 * doc/bison.texinfo (Decl Summary): Reword a little.
3006 (Understanding): Update example output for changes below.
3007 * src/gram.c: (rule_useful_p): Rename to...
3008 (rule_useful_in_grammar_p): ... this.
3009 (rule_useless_p): Rename to...
3010 (rule_useless_in_grammar_p): ... this.
3011 (rule_never_reduced_p): Rename to...
3012 (rule_useless_in_parser_p): ... this.
3013 (grammar_rules_print): Update for renames.
3014 (grammar_rules_print_xml): Update for renames.
3015 (grammar_rules_never_reduced_report): Rename to...
3016 (grammar_rules_useless_report): ... this since it is used for either
3017 kind of useless rule.
3018 * src/gram.h: Reword comments and update function names in prototypes.
3019 * src/main.c (main): Say "rule useless in parser due to conflicts".
3020 * src/print-xml.c (print_rules_never_reduced): Rename to...
3021 (print_rules_useless_in_parser): ... this, and rename output XML
3022 element "rules-never-reduced" to "rules-useless-in-parser".
3023 (print_xml): Update for rename.
3024 * src/print.c (print_results): Say "Rules useless in parser due to
3025 conflicts".
3026 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
3027 (nonterminals_reduce): Say "nonterminal useless in grammar".
3028 (reduce_output): Say "Nonterminals useless in grammar".
3029 Say "Rules useless in grammar".
3030 (reduce_xml): Rename output XML element "useless" to
3031 "useless-in-grammar".
3032 (reduce_print): Don't report the count of grammatically useless rules
3033 as "rules never reduced" just because %yacc is specified.
3034 In the correct report of this count, say nonterminal(s) and rule(s)
3035 "useless in grammar".
3036 * tests/conflicts.at (S/R in initial): Update expected output.
3037 (Defaulted Conflicted Reduction): Likewise.
3038 (Unreachable States After Conflict Resolution): Likewise.
3039 * tests/existing.at (GNU pic Grammar): Likewise.
3040 * tests/reduce.at (Useless Nonterminals): Likewise.
3041 (Useless Rules): Likewise.
3042 (Reduced Automaton): Likewise.
3043 (Underivable Rules): Likewise.
3044 (Empty Language): Likewise.
3045
66f0441d
JD
30462007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
3047
3048 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
3049 here document and before the EOF so that BSD's implementation of Bourne
3050 shell doesn't parse the delimiter as part of the here document.
3051 * doc/.cvsignore: Add cross-options.texi.
3052 * src/getargs.c (usage): Add a blank line after the warning categories.
3053
d0ee4105
PB
30542007-11-08 Paolo Bonzini <bonzini@gnu.org>
3055
3056 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
3057
e8b1fb9b
AD
30582007-11-05 Akim Demaille <akim@epita.fr>
3059
3060 Remove Id: from bison.1.
3061 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
3062 (perl -0777 -pi -e 's/\.PP\nId): New.
3063 (.x.1): Use it to ignore the version control revision.
3064
2f7a96b5
AD
30652007-11-05 Akim Demaille <demaille@gostai.com>
3066
3067 * build-aux/Makefile.am: Ship cross-options.pl.
3068 * doc/Makefile.am: Always refer to cross-options.texi with
3069 $(srcdir).
3070 (MAINTAINERCLEANFILES): Add it.
3071
f4101aa6
AD
30722007-11-04 Akim Demaille <demaille@gostai.com>
3073
3074 Generate the long/short option cross-table.
3075 * build-aux/cross-options.pl: New.
3076 * doc/Makefile.am (cross-options.texi): New.
3077 * doc/bison.texinfo: Use it.
3078
727a1401
AD
30792007-11-04 Akim Demaille <demaille@gostai.com>
3080
3081 Generate bison.1 using help2man.
3082 * doc/common.x, doc/bison.x: New.
3083 * doc/Makefile.am (bison.1, .x.1): New.
3084 The code is taken from autoconf-2.61/man/Makefile.am.
3085 * configure.ac: Look for help2man.
3086
6aeb9c57
AD
30872007-11-04 Akim Demaille <demaille@gostai.com>
3088
3089 Complete --help.
3090 * src/getargs.c (usage): Document -W, make it clear that -d,
3091 -g and -x have optional arguments.
3092
d7be4085
AD
30932007-11-04 Akim Demaille <demaille@gostai.com>
3094
3095 Find sha1sum when named gsha1sum.
3096 * bootstrap (find_tool): New.
3097 ($SHA1SUM): New.
3098
d9df47b6
JD
30992007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3100
3101 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
3102 at
3103 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
3104 * NEWS (2.3a+): Mention.
3105 * data/bison.m4 (b4_pure_if): Don't define it here.
3106 * data/c.m4 (b4_identification): Depend on individual skeletons to
3107 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
3108 values of the %define variables api.pure or api.push_pull. Define
3109 YYPURE, YYPUSH, and YYPULL accordingly.
3110 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
3111 glr.cc has already defined b4_pure_flag.
3112 * data/push.c: Define b4_pure_if based on `%define api.pure'.
3113 Remove YYPUSH and YYPULL since they're back in b4_identification again.
42ee26bb 3114 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
d9df47b6
JD
3115 * doc/bison.texinfo (Pure Decl): Update.
3116 (Push Decl): Update.
3117 (Decl Summary): Add api.pure to %define entry.
3118 In %pure-parser entry, say it's deprecated and reference %define.
3119 (Pure Calling): Update.
3120 (Error Reporting): Update.
3121 (C++ Scanner Interface): Update.
3122 (How Can I Reset the Parser): Update.
3123 (Table of Symbols): In %pure-parser entry, say it's deprecated and
3124 reference %define.
3125 * src/getargs.c (pure_parser): Remove global variable.
3126 * src/getargs.h (pure_parser): Remove extern.
3127 * src/output.c (prepare): Don't define pure_flag muscle.
3128 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
3129 wrapper around `%define api.pure'.
3130 * tests/calc.at (Simple LALR Calculator): Update.
3131 (Simple GLR Calculator): Update.
3132 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
3133 Update.
3134 (GLR: Resolve ambiguity, pure, locations): Update.
3135 (GLR: Merge conflicting parses, pure, no locations): Update.
3136 (GLR: Merge conflicting parses, pure, locations): Update.
3137 * tests/glr-regression.at (Uninitialized location when reporting
3138 ambiguity): Update
3139 * tests/input.at (Unused %define api.pure): New test case.
3140 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
3141 AT_PURE_IF and AT_PURE_AND_LOC_IF.
3142 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
3143
c373bf8b
JD
31442007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3145
3146 %define push_pull -> %define api.push_pull. Discussed starting at
3147 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
3148 * data/push.c: Expect the new name.
3149 * data/yacc.c: Likewise.
3150 * doc/bison.texinfo (Push Decl): Update.
3151 (Decl Summary): Update %define entry.
3152 (Push Parser Function): Update.
3153 (Pull Parser Function): Update.
3154 (Parser Create Function): Update.
3155 (Parser Delete Function): Update.
3156 * tests/calc.at (Simple LALR Calculator): Update.
3157 * tests/input.at (%define enum variables): Update.
3158 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
3159 (Push Parsing: Multiple impure instances): Update.
3160 (Push Parsing: Unsupported Skeletons): Update.
3161 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
3162 (Exploding the Stack Size with Malloc): Update.
3163
3164 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
3165 other entries some.
3166
32f19b6b
JD
31672007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
3168
3169 For the XML output's terminal element, rename @number to @token-number,
3170 and add @symbol-number. In the nonterminal element, rename @number to
3171 @symbol-number. Discussed starting at
3172 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
3173 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
3174 renames.
3175 (xsl:template match="nonterminal"): Likewise.
3176 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
3177 (xsl:template match="nonterminal"): Likewise.
3178 * src/print-xml.c (print_grammar): Implement.
3179
255a6b90
JD
31802007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
3181
3182 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
3183 2007-10-11 change, the child elements here are items not rules.
408476bc 3184 (xsl:template match="item"): New.
255a6b90
JD
3185 (xsl:template match="rule"): Update for new reduced itemset.
3186 (xsl:template match="point"): Remove.
3187 (xsl:template match="empty"): For consistency with --graph, don't
3188 output "/* empty */".
3189 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
3190 line-wrap, don't pass a negative value as first-line-length since this
3191 won't work with the following changes.
3192 (xsl:template name="line-wrap"): Simplify slightly.
3193 (xsl:template name="ws-search"): Eliminate recursion.
3194 * src/print_graph.c (print_core): Don't print a reduction's lookahead
3195 set next to an item whose dot is not at the end of the RHS even if it
3196 happens to be associated with the same rule.
3197
88c78747
JD
31982007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
3199
31984206
JD
3200 Add %define lr.keep_unreachable_states.
3201 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
3202 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
3203 * src/main.c (main): Implement it.
3204 * tests/conflicts.at (Unreachable States After Conflict Resolution):
3205 Extend to test it, and fix a typo.
3206
32072007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
3208
3209 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
88c78747
JD
3210 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
3211 the example .output text.
3212 * tests/regression.at (Extra lookahead sets in report): Improve wording
3213 of comments.
3214
b7a70162
WP
32152007-10-17 Wojciech Polak <polak@gnu.org>
3216
3217 * src/print-xml.c (print_grammar): Renamed
3218 <terminal> and <nonterminal> attributes:
3219 "type" to "number" and "symbol" to "name".
3220 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
3221 Use new attribute names.
3222 (xsl:template match="nonterminal"): Likewise.
3223 * data/xslt/xml2xhtml.xsl: Likewise.
3224
a0de5091
JD
32252007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
3226
3227 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
3228 (Option Cross Key): Likewise.
3229
3230 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
3231 next to an item whose dot is not at the end of the RHS even if it
3232 happens to be associated with the same rule.
3233 * src/print.c (print_core): Likewise.
3234 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
3235 (Resolved SR Conflicts): Update output.
3236 * tests/regression.at (Extra lookahead sets in report): New test case.
3237
4c20d18d
WP
32382007-10-11 Wojciech Polak <polak@gnu.org>
3239
3240 * src/print-xml.c (print_core): Remove item set
3241 redundancy.
3242 * data/xslt/bison.xsl (bison:ruleNumber): New key.
3243 Improve processing time. Suggested by Joel E. Denny.
3244 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
3245 Write xsl:param "required" attribute as comment.
3246 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
3247 (xsl:template match="rule"): Support new reduced itemset.
3248 (xsl:template match="point"): Remove.
3249 * data/xslt/xml2xhtml.xsl: Likewise.
3250
f506ad1c
JD
32512007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
3252
3253 * src/getargs.c (version): Update copyright year.
3254
21f1b063
JD
32552007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
3256
3257 Make xml2dot.xsl and --graph produce the same output.
3258 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
3259 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
3260 escaped later.
3261 (xsl:template name="output-node"): Use the new escape template instead
3262 of the string-replace template directly.
3263 (xsl:template name="output-edge"): Likewise.
3264 (xsl:template name="escape"): New, escapes backslashes and newlines in
3265 addition to quotation marks.
3266 * src/graphviz.c (start_graph, output_node, output_edge): Add
3267 whitespace to output for legibility.
3268
3269 Make xml2text.xsl and --report produce the same output, and remove the
3270 XML "conflicts" element since a conflict summary is easily extracted
3271 from the automaton.
3272 * data/xslt/bison.xsl: New.
3273 (xsl:template match="state" mode="bison:count-conflicts): New.
3274 * data/xslt/xml2text.xsl: Import bison.xsl.
3275 (xsl:template match="bison-xml-report"): Instead of styling the
3276 "conflicts" element, style the "automaton" element with mode
3277 "conflicts". Unlike the former, the latter lists S/R and R/R
3278 conflicts for a state on the same line.
3279 (xsl:template match="conflicts"): Remove.
3280 (xsl:template match="conflict"): Remove.
3281 (xsl:template match="terminal"): Line-wrap the list of rules in which
3282 the terminal is used.
3283 (xsl:template match="nonterminal"): Likewise for nonterminals.
3284 (xsl:template match="automaton" mode="conflicts"): New.
3285 (xsl:template match="state" mode="conflicts"): New.
3286 (xsl:template name="line-wrap"): New.
3287 (xsl:template name="ws-search"): New.
3288 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
3289 (xsl:template match="bison-xml-report"): Instead of styling the
3290 "conflicts" element, style the "automaton" element with mode
3291 "conflicts."
3292 (xsl:template match="conflicts"): Remove.
3293 (xsl:template match="conflict"): Remove.
3294 (xsl:template match="automaton" mode="conflicts"): New.
3295 (xsl:template match="state" mode="conflicts): New.
3296 * src/conflicts.c (conflicts_output_xml): Remove.
3297 * src/conflicts.h (conflicts_output_xml): Remove prototype.
3298 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
3299 * src/print.c (print_grammar): Consistently wrap at the 66th column so
3300 the corresponding XSLT is easier. Also, never wrap between a word and
3301 the comma that follows it.
3302
793fbca5
JD
33032007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
3304
3305 Improve C++ namespace support. Discussed starting at
3306 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
3307 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
3308 b4_namespace_close): New macros that interpret the %define variable
3309 "namespace" so its value can contain "::" to indicate nested
3310 namespaces.
3311 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
3312 the above macros.
3313 * data/lalr1.cc (b4_namespace): Likewise.
3314 * data/location.cc (b4_namespace): Likewise.
3315 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
3316 inside a new table in the general %define entry. Document `%define
3317 namespace' there as well. Point the %name-prefix entry to it since it
3318 explains it more completely in the case of C++.
3319 (C++ Bison Interface): Mention `%define namespace' instead of
3320 %name-prefix.
3321 (Table of Symbols): Remove the `%define push_pull' entry. The %define
3322 entry suffices.
3323 * tests/c++.at (Relative namespace references): New test case.
3324 (Absolute namespace references): New test case.
3325 (Syntactically invalid namespace references): New test case.
3326 * tests/input.at (C++ namespace reference errors): New test case.
3327
35b8730d
JD
33282007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
3329
3330 Add syncline support and location accessor to internal %define
3331 interfaces.
3332 * data/bison.m4 (b4_percent_define_get_loc): New.
3333 (b4_percent_define_get_syncline): New.
3334 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
3335 (b4_percent_define_default): Record defining location as line 1 rather
3336 than 0 for the sake of synchronizing #line's, and define
3337 b4_percent_define_syncline(VARIABLE).
3338 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
3339 * src/muscle_tab.c (muscle_syncline_grow): New.
3340 (muscle_code_grow): Use muscle_syncline_grow.
3341 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
3342 define b4_percent_define_syncline(VARIABLE).
3343 (muscle_percent_define_get_loc): New.
3344 (muscle_percent_define_get_syncline): New.
3345 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
3346 remove some unused variables.
3347 (muscle_percent_define_default): Record defining location as line 1
3348 rather than 0 for the sake of synchronizing #line's, and define
3349 b4_percent_define_syncline(VARIABLE).
3350 (muscle_percent_define_check_values): Use
3351 muscle_percent_define_get_loc.
3352 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
3353 (muscle_percent_define_get_syncline): Prototype.
3354 * tests/skeletons.at (%define Boolean variables: invalid skeleton
3355 defaults): Update output for location change.
3356 (Complaining during macro argument expansion): Extend to test
3357 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
3358
7dc4a694
JD
33592007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
3360
3361 Fix some error-reporting macro bugs.
3362 * data/bison.m4 (b4_cat): New.
3363 (b4_error, b4_error_at): Use b4_cat to send error directives directly
3364 to stdout so they don't become arguments to other macros. Update
3365 comments and add examples.
3366 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
3367 add examples.
3368 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
3369 after printing the error directive so that M4 doesn't report subsequent
3370 problems that are induced by this problem.
3371 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
3372 instead of just in them. Recognize @\n in both places. Both expand to
3373 the empty string. Needed by b4_cat.
3374 * tests/skeletons.at (Complaining during macro argument expansion):
3375 New test case.
3376 (Fatal errors make M4 exit immediately): New test case.
3377
d4bd2295
JD
33782007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
3379
3380 Implement --print-datadir.
3381 * src/getargs.c (usage): Mention.
3382 (PRINT_DATADIR_OPTION): New anonymous enum member.
3383 (long_options): Add entry for it.
3384 (getargs): Add case for it calling compute_pkgdatadir.
3385 * src/output.c (output_skeleton): Encapsulate data directory
3386 computation from here...
3387 (prepare): ... and from here...
3388 (compute_pkgdatadir): ... into this new function.
3389 * src/output.h (compute_pkgdatadir): Prototype.
3390
34cdeddf
JD
33912007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
3392
3393 * src/print-xml.c (escape_bufs): New static global variable
3394 replacing...
3395 (xml_escape_n): ... the static local variable buf here.
3396 (print_xml): Free memory for escape_bufs.
3397 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
3398
d782395d
JD
33992007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
3400
3401 Replace `%push-parser' and `%push-pull-parser' with
3402 `%define push_pull "push"' and `%define push_pull "both"'.
3403 `%define push_pull "pull"' is the default.
3404 * doc/bison.texinfo (Push Decl, Push Parser Function,
3405 Pull Parser Function, Parser Create Function, Parser Delete Function):
3406 Update declarations.
3407 (Decl Summary, Table of Symbols): Replace %push-parser and
3408 %push-pull-parser entries with a %define push_pull entry.
3409 * data/bison.m4 (b4_percent_define_check_values): New macro.
3410 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
3411 definitions...
3412 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
3413 definitions...
3414 * data/push.c: ... to here and compute them from the value of the
3415 %define variable push_pull.
3416 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
3417 parsing requests here...
3418 * data/yacc.c: ... hack this to switch to push.c any time
3419 b4_use_push_pull_flag or the %define variable push_pull is set. This
3420 will go away when we mv push.c yacc.c.
3421 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
3422 push parsing is not supported since unused %define variables are
3423 reported anyway.
3424 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
3425 * src/muscle_tab.h (muscle_percent_define_check_values): Update
3426 comments for consistency with b4_percent_define_check_values.
3427 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
3428 muscles.
3429 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
3430 Remove.
3431 (prologue_declaration): Remove %push-parser and %push-pull-parser
3432 rules.
3433 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
3434 * tests/calc.at: Update declarations.
3435 * tests/input.at (%define enum variables): New test case.
3436 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
3437 declaration.
3438 (Push Parsing: Multiple impure instances): Update declaration.
3439 (Push Parsing: Unsupported Skeletons): New test case.
3440 * tests/torture.at (Exploding the Stack Size with Alloca): Update
3441 declaration.
3442 (Exploding the Stack Size with Malloc): Update declaration.
3443
3f999f78
WP
34442007-09-24 Wojciech Polak <polak@gnu.org>
3445
3446 Add XSLT transformations.
3447
3448 * data/xslt/xml2dot.xsl: Transform XML into DOT.
3449 * data/xslt/xml2text.xsl: Transform XML into plain text.
3450 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
3451 * data/Makefile.am (xsltdir): New variable.
3452 (dist_xslt_DATA): Add xslt/*.xsl files.
3453
a4f75309
PE
34542007-09-23 Paul Eggert <eggert@cs.ucla.edu>
3455
3456 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
3457 Problem reported by Wojciech Polak.
3458 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
3459 (xml_printf): Undo change I made on 21 September; that is,
3460 indent 2 spaces, not 1.
3461
ad5feac4
JD
34622007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
3463
3464 Pacify ./configure --enable-gcc-warnings.
3465 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
3466 `char const *' instead of `char *'.
3467 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
3468 local variable `sep'.
3469
41d7a5f2
PE
34702007-09-21 Paul Eggert <eggert@cs.ucla.edu>
3471
3472 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
3473 elsewhere.
3474 * src/print-xml.c: Prefer "const" after types; that's more consistent.
3475 (xml_printf): Indent just 1 space for level.
3476 (e_char, xlate_char): Remove.
3477 (xml_escape_string): Rewrite to avoid undefined behavior (used
3478 storage that was freed from the stack).
3479 (xml_escape_n): Don't bother checking for subscript error.
3480
3f999f78
WP
34812007-09-21 Wojciech Polak <polak@gnu.org>
3482
3483 Add Bison XML Automaton Report.
41d7a5f2
PE
3484
3485 Add support for an -x option to generate an XML report.
3486 It is not documented yet.
3487 * src/print-xml.c: New file.
3488 * src/print-xml.h: Likewise.
3489 * lib/timevar.def (TV_XML): New var.
3490 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
3491 * src/conflicts.c: Include print-xml.h.
3492 (solved_conflicts_xml_obstack): New var.
3493 (log_resolution, conflicts_solve, conflicts_free):
3494 Add support for XML report.
3495 (conflicts_output_val): New function.
3496 * src/conflicts.h (conflicts_output_val): New decl.
3497 * src/files.c (spec_xml_file): New var.
3498 (compute_output_file_names, output_file_names_free): Add XML support.
3499 * src/files.h (spec_xml_file): New decl.
3500 * src/getargs.c (xml_flag): New var.
3501 (usage, short_options, long_options, getargs): Add XML support.
3502 * src/getargs.h (xml_flag): New decl.
3503 * src/gram.c: Include print-xml.h.
3504 (rule_lhs_print_xml, rule_rhs_print_xml):
3505 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
3506 New functions.
3507 * src/gram.h: Declare external ones.
3508 * src/main.c: Include print-xml.h.
3509 (main): Add XML support.
3510 * src/reduce.c: Include print-xml.h.
3511 (reduce_xml): New function.
3512 * src/reduce.h: Declare it.
3513 * src/state.c: Include print-xml.h.
3514 (state_new): Add XML support.
3515 (state_rule_lookahead_tokens_print_xml): New function.
3516 * src/state.h: Declare it.
3517 (struct state): New member solved_conflicts_xml.
3518 * src/symtab.c (symbol_class_get_string): New function.
3519 * src/symtab.h: Declare it.
3520
6d8e724d
PE
35212007-09-21 Paul Eggert <eggert@cs.ucla.edu>
3522
3523 * GNUmakefile: Switch to coreutils's version.
3524 * bootstrap: Likewise.
3525 * Makefile.cfg: Adjust to new GNUmakefile.
3526 * README-hacking: Likewise.
3527
3528 Import from gnulib:
3529
3530 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
3531 Bruno Haible <bruno@clisp.org>
3532
3533 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
3534 and is a script that invokes bison. Tighten the code. Add comments.
3535
922bdd7f
JD
35362007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
3537
3538 Spell "boolean" as "Boolean". Reported by Akim Demaille.
3539 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
3540 * doc/bison.texinfo (Decl Summary): Fix.
3541 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
3542 * tests/input.at (Boolean %define variables): Update output.
3543 * tests/skeletons.at (%define boolean variables: invalid skeleton
3544 defaults): Rename to...
3545 (%define Boolean variables: invalid skeleton defaults): ... this and
3546 update output.
3547
1b17b01d
JD
35482007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
3549
3550 In impure push mode, don't allow more than one yypstate to be allocated
3551 since multiple impure parsers would corrupt yynerrs.
3552 * data/push.c (yypstate_allocated): New static global variable
3553 initialized to 0.
3554 (yypull_parse): If yypstate_new returns 0, don't report it as memory
3555 exhaustion if yypstate_allocated is 1, but still return 2.
3556 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
3557 already 1. Otherwise, set it to 1.
3558 (yypstate_delete): Set it to 0.
3559 * tests/push.at (Push Parsing: Multiple impure instances): New test
3560 case.
3561
9987d1b3
JD
35622007-08-17 Bob Rossi <bob@brasko.net>
3563
3564 * doc/bison.texinfo (Push Decl): Document the push parser.
3565 (Table of Symbols): Ditto.
3566 (Pure Decl): Ditto.
3567 (Decl Summary): Ditto.
3568 (Multiple Parsers, Push Parser Function, Pull Parser Function,
3569 Parser Create Function, Parser Delete Function):
3570 Add new push parser symbols.
3571 (Table of Symbols): Document push-parser, push-pull-parser,
3572 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
3573
f16b0819
PE
35742007-08-15 Paul Eggert <eggert@cs.ucla.edu>
3575
3576 Update to GPLv3.
3577 * doc/gpl-3.0.texi: New file.
3578 * doc/gpl.texi: Remove.
3579 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
3580 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
3581 * README-hacking, TODO, bootstrap, bootstrap.conf:
3582 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
3583 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
3584 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
3585 * data/lalr1.cc, data/lalr1.java, data/location.cc:
3586 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
3587 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
3588 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
3589 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
3590 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
3591 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
3592 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
3593 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
3594 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
3595 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
3596 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
3597 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
3598 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
3599 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
3600 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
3601 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
3602 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
3603 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
3604 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
3605 * src/complain.c, src/complain.h, src/conflicts.c:
3606 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
3607 * src/files.h, src/flex-scanner.h, src/getargs.c:
3608 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
3609 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
3610 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
3611 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
3612 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
3613 * src/print.c, src/print.h, src/print_graph.c:
3614 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
3615 * src/reduce.h, src/relation.c, src/relation.h:
3616 * src/revision.h, src/scan-code.h, src/scan-code.l:
3617 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
3618 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
3619 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
3620 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
3621 * tests/Makefile.am, tests/actions.at, tests/c++.at:
3622 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
3623 * tests/existing.at, tests/glr-regression.at:
3624 * tests/headers.at, tests/input.at, tests/java.at:
3625 * tests/local.at, tests/output.at, tests/push.at:
3626 * tests/reduce.at, tests/regression.at, tests/sets.at:
3627 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
3628 * tests/torture.at:
3629 Update to GPLv3.
3630
728c4be2
JD
36312007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
3632
3633 Get rid of broken %no-parser, -n, and --no-parser implementation and
3634 documentation.
3635 * TODO: Don't mention them.
3636 * doc/bison.1: Likewise.
3637 * doc/bison.texinfo (Decl Summary): Likewise.
3638 (Bison Options): Likewise.
3639 (Option Cross Key): Likewise.
3640 * src/getargs.c (no_parser_flag): Remove global variable.
3641 (usage): Don't print description of -n and --no-parser.
3642 (long_options): Remove --no-parser entry here.
3643 (getargs): Remove -n case in the switch here.
3644 * src/getargs.h (no_parser_flag): Remove extern.
3645 * tests/regression.at (Web2c Actions): Remove comment that mentions
3646 --no-parser.
3647
5d31a216
JD
36482007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
3649
3650 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
3651 name user variables starting with `yy'. Just pass NULL instead of a
3652 dummy local &yylval to yypush_parse.
3653 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
3654 starting with `yy'.
3655
a2ea208d
JD
36562007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
3657
3658 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
3659 true since it's then always used regardless of whether yyoverflow is
3660 defined. Reported by Christian Burger at
3661 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
3662 * THANKS: Add Christian Burger.
3663
91661ebb
JD
3664 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
3665 node names: say "Decl Summary" not "Bison Declaration Summary".
3666
cbd50549
JD
36672007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
3668
3669 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
3670 determine whether this function has already complained about an invalid
3671 value for a %define boolean variable, don't check whether Bison has
3672 ever examined the value. As written, the check was a tautology.
3673 Instead, record and check for this complaint using a separate muscle.
3674
eb1b0740
JD
36752007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3676
3677 Fix push parsing memory leak reported by Brandon Lucia at
3678 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
3679 * THANKS: Add Brandon Lucia.
3680 * data/push.c (yypstate_delete): Free the stack if it was reallocated
3681 but the parse never completed and thus freed it.
3682 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
3683 * tests/testsuite.at: Include push.at.
3684 * test/push.at: New.
3685 (Push Parsing: Memory Leak for Early Deletion): New test case.
3686
9d774aff
JD
36872007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
3688
3689 Improve handling of multiple S/R conflicts in the same state and of S/R
3690 conflicts involving multiple reductions.
3691 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
3692 set for a state here or Bison will abort if it is reassigned on a
3693 later conflicted reduction in the same state.
3694 Similarly, don't finalize and assign the solved conflicts report here
3695 or it will be lost if it is reassigned on a later conflicted reduction
3696 in the same state.
3697 (set_conflicts): Instead, assign them both here after all S/R conflicts
3698 in the state have been fully examined.
3699 * src/print.c (shift_set): Rename to...
3700 (no_reduce_set): ... this.
3701 (print_reductions): Update for rename, and add %nonassoc error action
3702 tokens to no_reduce_set so that, when printing the first remaining
3703 reduction on an error action token, the reduction is enclosed in
3704 brackets.
3705 (print_results): Update for rename.
3706 * tests/conflicts.at (Solved conflicts report for multiple reductions
3707 in a state): New test case.
3708 (%nonassoc error actions for multiple reductions in a state): New test
3709 case.
3710
3711 * src/main.c (main): Don't depend on C99 features.
3712
10159d2a
JD
37132007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
3714
3715 * build-aux/.cvsignore: Add compile.
b541ffdf
JD
3716 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
3717 uniwidth.
10159d2a 3718
953b3935
JD
37192007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
3720
3721 * bootstrap (slurp): Create target directories that don't exist.
3722 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
3723
6ce2d93a
JD
37242007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
3725
3726 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
3727 than item number.
3728 * closure.c (closure): Likewise.
3729 * state.h (reductions): Comment sorting of rules.
3730 (state): Comment sorting of items.
3731
ce3448d5
JD
37322007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
3733
3734 Fix C++ test cases after recent Gnulib changes. Discussed starting at
3735 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
3736 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
3737 definition in order to avoid Gnulib headers since we don't use config.h
3738 here.
3739 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
3740 rather than AT_DATA so that config.h is included.
3741
8a86eef0
JD
37422007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
3743
3744 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
3745 instead of fprintf. Guard these functions with #if YYDEBUG instead of
3746 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
3747 and so that YYFPRINTF is guaranteed to be defined here.
3748
b1a81613
JD
37492007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
3750
3751 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
3752 with...
3753 (muscle_percent_define_check_values): ... this more helpful function.
3754 Again, it's not used yet, but it will be.
3755 * src/muscle_tab.h: Likewise.
3756
71b61d4d
JD
3757 Improve some comments in parser table construction.
3758 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
3759 (generate_states): Don't mention ruleset, which is internal to closure.
3760 * src/closure.c (closure): Explain sorting of core and itemset, which
3761 is required for this function to behave correctly.
3762 * src/closure.h (closure): Mention sorting.
3763
2a6b783d
JD
37642007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
3765
3766 * src/lalr.c (state_lookahead_tokens_count): For code readability,
3767 move the check for disabled transitions to an aver since conflict
3768 resolution hasn't happened yet.
3769
3770 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
3771 labels a state as inconsistent just because it has error transitions.
3772 The original form of this check appeared in revision 1.1 of lalr.c,
3773 which was committed on 1991-12-21. Now (at least), changing the
3774 consistency label on such a state appears to have no useful effect in
3775 any of the places it is examined, which I enumerate below. The key
3776 point to understanding each item in this enumeration is that a state
3777 with an error transition is labelled consistent in the first place only
3778 if it has no rules, so the check cannot matter for states that have
3779 rules. (1) Labelling a state as inconsistent will cause set_conflicts
3780 to try to identify its conflicts, and a state must have *rules* to have
3781 conflicts. (2) Labelling a state as inconsistent will affect how
3782 action_row sets the default *rule* for the state. (3) Labelling a
3783 state as inconsistent will cause build_relations to add lookback edges
3784 to *rules* in that state.
3785 * src/state.h (struct state): Word the comment for member consistent
3786 more carefully.
3787
14462c2b
JD
37882007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3789
3790 Don't depend on C99 features.
3791 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
3792 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
3793 * src/reader.c (check_and_convert_grammar): Fix for-loop.
3794 * src/state.c (state_mark_reachable_states): Fix for-loop.
3795 (state_remove_unreachable_states): Fix for-loop.
3796
3797 Don't widen struct state with member reachable just to temporarily
3798 record reachability. Instead, use a local bitset.
3799 * src/state.h (struct state): Remove member.
3800 * src/state.c (state_new): Don't initialize it.
3801 (state_mark_reachable_states): Rename to...
3802 (state_record_reachable_states): ... this, and use bitset.
3803 (state_remove_unreachable_states): Use bitset.
3804
5a43d418
JD
38052007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
3806
3807 * src/Makefile.am (yacc): Quote target action commands properly so
3808 that the yacc script isn't corrupt. Reported by Hans Aberg at
3809 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
3810
0c650a20
JD
3811 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
3812 the case of pure parsers. Reported by Frans Englich at
3813 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
3814 * THANKS: Add Frans Englich.
3815
61fee93e
JD
3816 * NEWS (2.3a+): In the %code entry, reference section `Bison
3817 Declaration Summary' from the manual now since the %code summary has
3818 moved there.
3819 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
3820 in the rules section must be terminated by semicolons.
3821
f124d423
JD
38222007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
3823
3824 Extend the front-end API for %define variables to more completely
3825 mirror the back-end. This will be useful in the future.
3826 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
3827 Update comments to mention the new front-end counterparts of these
3828 macros.
3829 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
3830 for muscle_string_decode and muscle_location_decode.
3831 (muscle_string_decode): New static function.
3832 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
3833 (muscle_percent_define_get, muscle_percent_define_ifdef): New
3834 functions.
3835 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
3836 muscle_percent_define_get to mimic the b4_percent_define_flag_if
3837 implementation more closely.
3838 (muscle_percent_define_invalid_value): New function.
3839 * src/muscle_tab.h (muscle_percent_define_get,
3840 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
3841 Prototype.
3842
75ad86ee
JD
38432007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
3844
3845 * NEWS (2.3a+): Mention yesterday's state-removal change.
3846 (2.3a): Remove the %language entry, which was added after 2.3a.
3847 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
3848 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
3849 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
3850 tests/existing.at: Update copyright date.
3851
5967f0cf
JD
38522007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3853
3854 If conflict resolution makes states unreachable, remove those states,
3855 report rules that are then unused, and don't report conflicts in those
3856 states.
3857 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
3858 New global function.
3859 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
3860 function.
3861 * src/main.c (main): After conflict resolution, remove the unreachable
3862 states and update all data structures that reference states by number.
3863 * src/state.c (state_new): Initialize each state's reachable member to
3864 false.
3865 (state_mark_reachable_states): New static function.
3866 (state_remove_unreachable_states): New global function.
3867 * src/state.h (struct state): Add member bool reachable.
3868 (state_remove_unreachable_states): Prototype.
3869 * tests/conflicts.at (Unreachable States After Conflict Resolution):
3870 New test case.
3871 * tests/existing.at (GNU pic Grammar): Update test case output now that
3872 an unused rule is discovered.
3873
b09f4f48
JD
38742007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3875
3876 Minor code cleanup in parser table construction.
3877 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
3878 (new_itemsets, save_reductions): Update for rename to nitemset.
3879 * src/closure.c (nritemset): Rename to...
3880 (nitemset): ... this since the "r" appears to meaningless and isn't
3881 used in the comments.
3882 (closure): Update for rename.
3883 * src/closure.h (nritemset): Update extern to...
3884 (nitemset): ... this.
3885 * src/lalr.c (LA): Fix a typo in comments.
3886 * src/print.c (print_core): Update for rename to nitemset.
3887 * src/print_graph.c (print_graph): Likewise.
3888 * src/state.h: Fix some typos in header comments.
3889
bbb44d83
PE
38902007-04-04 Paul Eggert <eggert@cs.ucla.edu>
3891
9b33de72
PE
3892 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
3893 still sticks to ASCII. Sorry!
3894
bbb44d83
PE
3895 * README-hacking: New file, taken mostly from coreutils, with changes
3896 for Bison. Contains much of the contents of:
3897 * README-cvs: Remove.
3898 * bootstrap: Sync from gnulib.
3899 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
3900 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
3901
29553547
JD
39022007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
3903
3904 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
3905 Setzer.
3906 (Java Differences): Fix some typos.
3907 * THANKS: Add Sebastian Setzer.
3908
01b477c6
PB
39092007-03-07 Paolo Bonzini <bonzini@gnu.org>
3910
730739e4
AD
3911 * data/java.m4 (b4_single_class_if): Remove.
3912 (b4_abstract_if): Look at "%define abstract".
3913 (b4_lexer_if): New.
3914 (b4_union_name): Rename...
3915 (b4_yystype): ... to this. Map to "%define stype".
3916 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
3917 b4_maybe_throws): Fix quoting.
3918 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
3919 * data/lalr1.java (Lexer interface): Always define.
3920 (Lexer interface within parser class): Remove.
3921 (YYLexer class): New, used when "%code lexer" is present.
3922 (constructor): When "%code lexer" is used, pass %lex-param
3923 to the lexer constructor.
3924 (yylex, yyparse): Remove %lex-param from method invocations
3925 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
3926
3927 * doc/bison.texinfo (Java Bison Interface): Mention "%define
3928 abstract". Rename "%define union_name" to "%define stype".
3929 Rename method names according to previous patch.
3930 (Java Scanner Interface): Describe "%code lexer" instead of
3931 "%pure-parser" and "%define single_class".
3932 (Java Differences): Mention "%code lexer".
3933
3934 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
3935 Include scanner here, using macros from tests/local.at.
3936 (AT_DATA_CALC_Y): Remove final argument.
3937 (_AT_CHECK_JAVA_CALC): Likewise.
3938 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
3939 of %locations and %error-verbose.
3940 (main): Test with and without %lex-param.
3941 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
3942 (AT_BISON_OPTION_POPDEFS): Pop it.
01b477c6 3943
122bea3a
JMG
39442007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3945
3946 DJGPP spefic issue. Inhibit the use of disallowed characters for
3947 file name genertion on Win98, WinXP, etc. These are |<>":?*\
3948 and concern testsuite case 46.
3949 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
3950 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
3951 * djgpp/config.bat: Inhibit the use of disallowed characters.
3952
9611cfa2
JD
39532007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
3954
3955 Miscellaneous %define and %code cleanup.
3956 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
3957 values are interpreted.
3958 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
3959 documentation a little more.
3960 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
3961 muscle_percent_define_insert, muscle_percent_code_grow): New
3962 functions/macros.
3963 * src/muscle_tab.h (muscle_percent_define_insert,
3964 muscle_percent_code_grow): Prototype.
3965 * src/parse-gram.y (prologue_declaration): Use
3966 muscle_percent_define_insert and muscle_percent_code_grow when parsing
3967 %define and %code directives.
3968
3969 Make it easy to share %define boolean variables between the front-end
3970 and back-end. Though not used yet, this will be useful in the future.
3971 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
3972 Bison uses of names rather than just skeleton uses of names.
3973 (b4_percent_define_get, b4_percent_define_ifdef): Rename
3974 b4_percent_define_skeleton_variables(VARIABLE) to
3975 b4_percent_define_bison_variables(VARIABLE).
3976 (b4_percent_code_get, b4_percent_code_ifdef): Rename
3977 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
3978 b4_percent_code_bison_qualifiers(QUALIFIER).
3979 (b4_check_user_names_wrap): Update for renames.
3980 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
3981 muscle_percent_define_default): New functions mimicking
3982 b4_percent_define_flag_if and b4_percent_define_default.
3983
3984 For %define variables, report locations for invalid values and
bbb44d83 3985 redefinitions.
9611cfa2
JD
3986 * data/bison.m4 (b4_percent_define_flag_if): Read
3987 b4_percent_define_loc(VARIABLE) to report the location of an invalid
3988 value for VARIABLE.
3989 (b4_percent_define_default): Save a special location in
3990 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
3991 must later be reported as invalid.
3992 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
3993 functions.
3994 (muscle_percent_define_insert): Record the location of VARIABLE in
3995 muscle percent_define_loc(VARIABLE), and use it to report the previous
3996 location for a redefinition.
3997 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
3998 (muscle_percent_define_default): Update like b4_percent_define_default.
3999 (muscle_grow_user_name_list): Rename to...
4000 (muscle_user_name_list_grow): ... this for consistency and use
4001 muscle_location_grow.
4002 * src/muscle_tab.h (muscle_location_grow): Prototype.
4003 * tests/input.at (%define errors): Update expected output.
4004 * tests/skeletons.at (%define boolean variables: invalid skeleton
4005 defaults): New test case.
4006
0bf92491
JD
40072007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
4008
4009 * src/print.c (lookahead_set, state_default_rule): Remove.
4010 (print_reductions): Replace state_default_rule invocation with
4011 equivalent use of yydefact, which was computed in token_actions in
4012 tables.c.
4013 (print_results): Don't allocate lookahead_set.
4014
d3b12988
PB
40152007-02-27 Paolo Bonzini <bonzini@gnu.org>
4016
4017 * data/lalr1.java: Prefix all private members with yy.
4018
f57a7536
JD
40192007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
4020
4021 Use YYFPRINTF instead of fprintf where appropriate. Reported by
9b33de72 4022 Sebastien Fricker at
f57a7536 4023 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
9b33de72 4024 * THANKS: Add Sebastien Fricker.
f57a7536
JD
4025 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
4026 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
4027 accept a variable number of arguments.
4028
6404a5bf
JD
40292007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
4030
4031 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
4032
e4e09639
JMG
40332007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4034
4035 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
4036 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
4037 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
4038
d7e0a1a7
PE
40392007-02-11 Paul Eggert <eggert@cs.ucla.edu>
4040
4041 Undo my 2007-02-07 change, switching back to the c-strcase module
4042 introduced in the 2007-02-03 change. Bruno Haible reported that
4043 the 2007-02-07 change would be dangerous in Turkish if we add a
4044 language whose name contains "i", since "i" is not lowercase "I"
4045 in Turkish.
4046 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
4047 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
4048 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
4049 * m4/.cvsignore: Remove strcase.m4.
4050 * src/getargs.c: Revert 2007-02-07 change, as follows.
4051 Include c-strcase.h.
4052 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
4053
deee93a1
JD
40542007-02-11 Bruno Haible <bruno@clisp.org>
4055
4056 Enable the Java related testsuite tests when the only Java compiler
4057 found is a gcj < 4.3. Discussed at
4058 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
4059 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
4060
574add85
JD
40612007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
4062
4063 * data/Makefile.am: Update copyright date.
4064 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
4065 yypstate_new returns NULL.
4066 (yypstate_new): Return NULL if malloc does.
4067 * src/reader.c (packgram): Move translation of rule actions from the
4068 beginning of packgram to...
4069 (check_and_convert_grammar): ... here right before packgram is invoked
4070 so it's easier to write more complete comments, and remove redundant
4071 code.
4072
e785ccf7
JD
40732007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
4074
4075 As in semantic actions, make @$ in %initial-action, %destructor, and
4076 %printer imply %locations.
4077 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
4078 scanning @$.
4079 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
4080 (@$ in %initial-action implies %locations,
4081 @$ in %destructor implies %locations,
4082 @$ in %printer implies %locations): ... these new test cases.
4083
1cfe1ed7
PE
40842007-02-07 Paul Eggert <eggert@cs.ucla.edu>
4085
4086 Undo most of the 2007-02-03 change, switching to the strcase module
4087 now that gnulib strcase has been fixed.
4088 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
4089 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
4090 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
4091 * m4/.cvsignore: Add strcase.m4.
4092 * src/getargs.c: Revert 2007-02-03 change, as follows.
4093 Don't include c-strcase.h.
4094 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
4095 strcasecmp has "unspecified behavior" outside the POSIX locale,
4096 but it works fine in practice if at least one argument is ASCII,
4097 as is the case in Bison.
4098
0049ec86
PB
40992007-02-07 Paolo Bonzini <bonzini@gnu.org>
4100
4101 * tests/java.at: Skip tests if only one of javac/java is present.
4102 Reported by Joel E. Denny.
4103 * tests/atlocal.in: Adjust copyright years.
4104
41052007-02-05 Paolo Bonzini <bonzini@gnu.org>
4106
4107 * data/lalr1.java (Stack): Work around old verifiers that disallow
4108 access to the private fields of an inner class, from the outer class.
4109 We can make Stack's fields public because user code doesn't have access
4110 to the instance of Stack used by parse(). Reported by Paul Eggert.
4111
2c2b7220
PE
41122007-02-03 Paul Eggert <eggert@cs.ucla.edu>
4113
4114 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
4115 the right spot for these files?
4116 * bootstrap.conf (gnulib_modules): Add c-strcase.
4117 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
4118 c-strncasecmp.c.
4119 * src/getargs.c: Include c-strcase.h.
4120 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
4121 to avoid unspecified behavior.
4122
b2b81dae
JD
41232007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
4124
4125 * doc/bison.texinfo (Decl Summary): Correct typo.
4126
c1d19e10
PB
41272007-01-30 Paolo Bonzini <bonzini@gnu.org>
4128
4129 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
4130 Complain if the value does not match empty, "true" or "false".
4131 * data/c++.m4: Adjust default definitions of %define variables.
4132 * data/java.m4: Adjust default definitions of %define variables.
4133 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
4134 to above behavior.
4135 * tests/input.at (Boolean %define variables): Test new behavior.
4136
8405b70c
PB
41372007-01-29 Paolo Bonzini <bonzini@gnu.org>
4138
4139 * NEWS: Mention java.
4140 * TODO: Remove things that are done.
4141 * bootstrap.conf: Add javacomp-script and javaexec-script.
4142 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
4143
4144 * data/Makefile.am: Add new files.
4145 * data/java-skel.m4: New.
4146 * data/java.m4: New.
4147 * data/lalr1.java: New.
4148
4149 * doc/bison.texinfo: Put "A Complete C++ Example" under
4150 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
4151 under Other Languages.
4152
4153 * src/getargs.c (valid_languages): Add Java.
4154 * src/getargs.h (struct bison_language): Update size of string fields.
4155
4156 * tests/Makefile.am: Add java.at.
4157 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
4158 * tests/java.at: New.
4159 * tests/testsuite.at: Include it.
4160
3eb82471
JD
41612007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
4162
4163 Clean up.
4164 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
4165 at_directive_argv arguments so these no longer have to be global
4166 variables. Also, update the implementation for the following changes.
4167 (fail_for_at_directive_too_many_args,
4168 fail_for_at_directive_too_few_args): Add at_directive_name argument.
4169 (at_directive_name): Remove as at_directive_argv[0] will be used for
4170 this now.
4171 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
4172 for the directive name.
4173 (at_directive_argc, at_directive_argv): Make these local within
4174 skel_lex instead of global.
4175 (INITIAL): Update directive start action for above changes.
4176 (SC_AT_DIRECTIVE_ARG): Rename to...
4177 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
4178 (SC_AT_DIRECTIVE_SKIP_WS): Update.
4179 (scan_skel): Move yylex_destroy to...
4180 (skel_scanner_free): ... here.
4181 * tests/skeletons.at (installed skeleton file name): Rename to...
4182 (installed skeleton file names): ... this.
4183
148d66d8
JD
41842007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
4185
4186 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4187 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
4188 Summary" not "Directives".
4189 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
4190 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
4191 since the former is now the more complete one.
4192 (Prologue Alternatives): Likewise and do the same for %defines.
4193 (Table of Symbols): Add summary of %code, add summary of %define, and
4194 move full %code documentation to...
4195 (Decl Summary): ... here for consistency with other entries in these
4196 sections.
4197 Move %define entry in order to keep this list alphabetized.
4198 Reword %define entry a little to put less emphasis on the skeleton
4199 concept, which most users shouldn't have to think about.
4200
665f0c24
PE
42012007-01-26 Paul Eggert <eggert@cs.ucla.edu>
4202
4203 Adjust to recent gnulib changes.
4204 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
4205 Add string.h, string_.h, unistd_.h, wchar_.h.
4206 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
4207 * src/system.h: Don't include <stpcpy.h>; this is now done by
4208 <string.h>.
4209
592d0b1e
PB
42102007-01-23 Paolo Bonzini <bonzini@gnu.org>
4211
4212 Simplify implementation of unqualified %code, implement macros for
4213 uniform treatment of boolean %define flags. Document %define.
4214 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
4215 b4_percent_code_ifdef): New.
4216 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
4217 * data/c++.m4: Define default value for global_tokens_and_yystype.
4218 * data/glr.cc: Likewise.
4219 * data/location.cc: Use b4_percent_define_flag_if.
4220
148d66d8 4221 * doc/bison.texinfo (Decl Summary): Document %define.
592d0b1e
PB
4222
4223 * src/parse-gram.y (Unqualified %code): Change muscle name to
4224 b4_percent_code().
4225 (content.opt): Default to empty.
4226
a7867f53
JD
42272007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
4228
4229 Implement support for relative and absolute skeleton file names.
4230 Discussed starting at
4231 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
4232 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
4233 (Bison Options): Document in --skeleton entry.
4234 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
4235 full_skeleton can't necessarily hold all of pkgdatadir.
4236 If the specified skeleton file name contains a `/', don't prepend
4237 pkgdatadir.
4238 * src/parse-gram.y (prologue_declaration): If the specified skeleton
4239 file name contains a `/', prepend the grammar file directory.
4240 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
4241 * skeletons.at: New file.
4242 (relative skeleton file names): New test case.
4243 (installed skeleton file names): New test case.
4244 * tests/testsuite.at: Include skeletons.at.
4245
4246 * bootstrap: Update copyright to 2007.
4247
830c9b18
PB
42482007-01-17 Paolo Bonzini <bonzini@gnu.org>
4249
4250 * bootstrap: Remove occurrences of .#bootmp from the files.
4251
a8c2e813
AD
42522007-01-17 Akim Demaille <akim@epita.fr>
4253
4254 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
4255 nonterminals.
4256 Use per-type %printer.
4257
279cabb6
JD
42582007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
4259
4260 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
4261 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4262 djgpp/config.site, src/files.c, src/files.h, src/main.c,
4263 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
4264 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
4265 tests/glr-regression.at, tests/input.at, tests/local.at,
4266 tests/output.at, tests/torture.at: Update copyright to 2007.
4267
bb32f4f2
AD
42682007-01-16 Akim Demaille <akim@epita.fr>
4269
4270 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
4271 error code.
4272 (Calc++ Scanner): Exit with failure if we can't open the input
4273 file.
4274 Accept "-" standing for stdin.
4275 (Calc++ Top Level): Print the result only if the parsing was
4276 successful.
4277
7cff04b5
AD
42782007-01-16 Akim Demaille <akim@epita.fr>
4279
4280 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
4281
a4e25e1d
JD
42822007-01-15 Paolo Bonzini <bonzini@gnu.org>
4283 and Joel E. Denny <jdenny@ces.clemson.edu>
4284
4285 Clean up %define and %code implementation in M4 some. Most
4286 importantly, rename all related macros to be in the b4_percent_define
4287 and b4_percent_code namespaces. Also, complete support for `.' in
4288 %define variable names and %code qualifiers.
4289 * data/bison.m4 (b4_check_user_names): Check for special
4290 "SKELETON-NAMESPACE(name)" macros instead of using two nested
4291 m4_foreach loops.
4292 (b4_get_percent_define, b4_get_percent_code): Rename to...
4293 (b4_percent_define_get, b4_percent_code_get): ... these.
4294 Extend documentation with examples.
4295 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
4296 b4_percent_define_skeleton_variables and
4297 b4_percent_code_skeleton_qualifiers.
4298 Expect any value for the %define variable `foo' to be stored in the
4299 macro named `b4_percent_define(foo)'; expect any %code blocks for the
4300 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
4301 expect any unqualified %code blocks to be stored in a macro named
4302 `b4_percent_code_unqualified'.
4303 Use m4_indir so that %define variable names and %code qualifiers can
4304 contain `.', which is allowed by the grammar parser.
4305 (b4_percent_define_default): New macro to set a default value for a
4306 %define variable.
4307 (m4_wrap): Update wrapped code, and fix some underquoting.
4308 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
4309 Expect grammar uses of %define variables and %code qualifiers to be
4310 defined in b4_percent_define_user_variables and
4311 b4_percent_code_user_qualifiers.
4312 * data/c++.m4: Use b4_percent_define_default rather than
4313 m4_define_default. Fix some underquoting. Skeleton usage of %define
4314 variable define_location_comparison now implies skeleton usage of
4315 %define variable filename_type.
4316 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4317 data/push.c, data/yacc.c: Update macro names.
4318 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
4319 muscle names.
4320
e37c665c
JMG
43212007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4322
4323 DJGPP specific issues.
4324
4325 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
4326 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
4327
7d2d521f
JD
43282007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4329
4330 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
4331 run parsers in all tests so that Valgrind is invoked during
4332 maintainer-check-valgrind.
4333 (Duplicate representation of merged trees): Free all semantic values.
4334 (Duplicated user destructor for lookahead): Likewise.
4335
e0ac9b4b
JD
43362007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4337
4338 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
4339 command-line prefix.
4340 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
4341 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
4342 miss Valgrind messages.
4343 (Exploding the Stack Size with Malloc): Likewise.
4344
78143faa
JD
43452007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4346
4347 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
4348 locals. Reported by Juan Manuel Guerrero at
4349 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
4350 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
4351 Fix some indentation also.
4352 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
4353 explaining this issue.
4354
7ecec4dd
JD
43552007-01-09 Paolo Bonzini <bonzini@gnu.org>
4356 and Joel E. Denny <jdenny@ces.clemson.edu>
4357
4358 Simplify union and prologue handling, and escape union and lex/parse
4359 params with digraphs.
4360 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
4361 values to the empty string since these are no longer guaranteed
4362 initialized by the front-end.
4363 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
4364 braces around b4_user_stype since this is no longer done by the
4365 front-end.
4366 * src/files.c, src/files.h (pre_prologue_obstack,
4367 post_prologue_obstack): Remove.
4368 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
4369 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
4370 with digraphs. This fixes lex params and parse params.
4371 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
4372 * src/output.c (prepare): Remove muscle insertion of the prologues.
4373 (output): Remove freeing of pre_prologue_obstack and
4374 post_prologue_obstack.
4375 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
4376 than prologue_augment for prologue parsing so you don't need prologue
4377 obstacks.
5c80250c
JD
4378 (grammar_declaration): For %union RHS, use `braceless' instead of
4379 "{...}" so that braces are already stripped and code is escaped with
4380 digraphs.
7ecec4dd
JD
4381 * src/reader.c (prologue_augment): Remove.
4382 (reader): Remove initialization of pre_prologue_obstack and
4383 post_prologue_obstack.
4384 * src/reader.h (prologue_augment): Remove.
4385
4386 * data/c.m4: Remove stray parenthesis.
4387
16dc6a9e
JD
43882007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4389
4390 Remove quotes from variables names in %define directives and from
4391 qualifiers in %code directives, and restrict the characters that are
4392 allowed in them to M4-friendly ones. For %define, continue to support
4393 the quoted form as a deprecated feature. Discussed starting at
4394 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
4395 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
4396 %code.
4397 * doc/bison.texinfo (Prologue Alternatives): Update.
91661ebb
JD
4398 (Decl Summary): In %defines entry, update mention of `%code requires'
4399 and `%code provides'.
16dc6a9e
JD
4400 (C++ Location Values): Update %define uses.
4401 (Calc++ Parser Interface): Likewise.
4402 (Calc++ Parser): Likewise, and update `%code requires' uses.
148d66d8 4403 (Table of Symbols): Update %code documentation.
16dc6a9e
JD
4404 * src/parse-gram.y (prologue_declaration): For %define variables, use
4405 `variable' instead of `STRING'.
4406 (grammar_declaration): For %code qualifiers, use `ID' instead of
4407 `STRING'.
4408 (variable): New nonterminal that takes an `ID' or a `STRING'.
4409 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
4410 and %define uses.
4411 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
4412 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
4413 (%define errors): Update %define uses.
4414
e9813cd4
JD
44152007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4416
4417 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
4418 instead of muscle_insert for %define values so that M4-special
4419 characters are replaced with digraphs.
4420 * tests/input.at (%define errors): Extend to check weird values.
4421
6afc30cc
JD
44222007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4423
4424 Instead of having skeletons declare all valid %define variables and
4425 %code qualifiers, provide macros that retrieve the associated values
4426 and build these lists automatically. Thus Bison will now warn when a
4427 variable or qualifier is not used by the skeleton in the current
4428 invocation regardless of whether it might sometimes be used by that
4429 skeleton in other invocations. Also, move all %define value macros to
4430 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
4431 form, which is replaced by %code.
4432 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
4433 (b4_check_user_names): ... this, and change the series of valid name
4434 arguments to a single list argument for names used in the skeleton
4435 similar to the existing list argument for names used in the grammar.
4436 Warn instead of complaining.
4437 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
4438 values and %code code, to format %code code properly, and to build
4439 lists of all %define variables and %code qualifiers used in the
4440 skeleton: b4_skeleton_percent_define_variables and
4441 b4_skeleton_percent_code_qualifiers.
4442 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
4443 Remove, and...
4444 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
4445 the skeleton names lists can finish building first. In place of
4446 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
4447 expect the lists b4_user_percent_define_variables and
4448 b4_user_percent_code_qualifiers.
4449 * data/c++.m4: Where setting default values for b4_parser_class_name,
4450 b4_location_type, b4_filename_type, b4_namespace, and
4451 b4_define_location_comparison, update their names to the
4452 b4_percent_define_ namespace.
4453 * data/glr.c: Don't use b4_check_percent_define_variables and
4454 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
4455 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
4456 (b4_parser_class_name, b4_namespace): Define these using
a4e25e1d 4457 b4_get_percent_define for parser_class_name and namespace.
6afc30cc
JD
4458 * data/location.cc: Use b4_get_percent_define.
4459 * data/push.c: Don't use b4_check_percent_define_variables and
4460 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
4461 * data/yacc.c: Likewise, and don't call m4_exit in
4462 b4_use_push_for_pull_if or m4_wrap code will never execute.
4463 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
4464 Rename to...
4465 (muscle_grow_user_name_list): ... this for consistency with the
4466 terminology used in bison.m4.
4467 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
4468 %define variable names, and rename muscle used_percent_define_variables
4469 to user_percent_define_variables.
4470 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
4471 user_percent_code_qualifiers.
4472 (content): Remove.
4473 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
4474 {CODE} form is no longer accepted.
4475 * tests/input.at (Reject bad %code qualifiers): Rename to...
4476 (Reject unused %code qualifiers): ... this, and update test output.
4477 (%define error): Update test output.
4478
7eb8a0bc
JD
44792007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
4480
4481 Check for unrecognized %define variables similar to checking for
4482 unrecognized %code qualifiers. Check for redefined %define variables.
4483 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
4484 generalizes...
4485 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
4486 (b4_check_percent_define_variables): New, also wraps it.
4487 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
4488 variables using b4_check_percent_define_variables.
4489 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
4490 all those exercised in the test suite and all those listed in the
4491 `Default values' section of c++.m4. Are there others?
4492 * data/push.c, data/yacc.c: Declare no valid %define variables.
4493 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
4494 similar to muscle_find, but it works even when the muscle stores a
4495 const value.
4496 (muscle_grow_used_name_list): New function for constructing the used
4497 name list muscles that b4_check_for_unrecognized_names requires.
4498 * src/parse-gram.y (prologue_declaration): Warn if a variable is
4499 %define'd more than once. Define the b4_used_percent_define_variables
4500 muscle with muscle_grow_used_name_list.
4501 (grammar_declaration): Abbreviate %code code with
4502 muscle_grow_used_name_list.
4503 * tests/input.at (%define errors): New.
4504
3fc65ead
JD
45052007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4506
4507 Provide warn_at, complain_at, and fatal_at function callbacks to the
4508 skeletons, and use this for %code qualifier complaints.
4509 * data/bison.m4 (b4_error_at): New, invoked by...
4510 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
4511 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
4512 @fatal_at(...@) directives.
4513 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
4514 qualifiers in b4_used_percent_code_qualifiers and to use
4515 b4_complain_at.
4516 * src/location.c, src/location.h (boundary_set_from_string): New global
4517 function.
4518 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
4519 function.
4520 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
4521 to b4_used_percent_code_qualifiers.
4522 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
4523 function.
4524 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
4525 (lineno): Rename to...
4526 (out_lineno): ... this so I don't misunderstand it again.
4527 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
4528 here; these newlines are in the input but not the output file.
4529 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
4530 (at_directive_perform): ... this new static function, and add handling
4531 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
4532 directives.
4533 * tests/input.at (Reject bad %code qualifiers): Update test output with
4534 locations and extend.
4535
4536 * tests/output.at (Output file name: [, Output file name: ]): Remove
4537 bogus comment about these tests failing.
4538
1c7b7e1d
JD
45392007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4540
4541 Clean up b4_check_percent_code_qualifiers a little.
4542 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
4543 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
4544 documentation and add examples.
4545 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
4546 qualifiers here.
4547
08af01c2
JD
45482007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
4549
4550 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
4551 unreliable -- especially when they're hidden inside another macro.
4552 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
4553 data/c.m4: Remove m4_divert(-1).
4554 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4555 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
4556 m4_divert_push(0) and m4_divert_pop(0).
279cabb6 4557 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
08af01c2
JD
4558 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
4559 pushed and popped by m4sugar, should be first on the stack.
4560
4561 Provide warn, complain, and fatal function callbacks to the skeletons.
4562 This provides more flexibility than m4_fatal, improves the error
4563 message format, and captures messages for translation. Discussed
4564 starting at
4565 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
4566 * data/bison.m4 (b4_error): New, invoked by...
4567 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
4568 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
4569 directives. Because these M4 macros might be called when the current
4570 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
4571 the previous removal of uses of m4_divert, which caused trouble.
4572 (b4_check_percent_code_qualifiers): Use b4_complain instead of
4573 m4_fatal to report unrecognized %code qualifiers.
4574 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
4575 push parser requests.
4576 * data/glr.c: Use b4_complain instead of m4_fatal to report
4577 non-deterministic push parser requests.
4578 Update @output usage to @output(...@) form.
4579 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
4580 report missing %defines. Update @output usage to @output(...@) form.
4581 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
4582 @output(...@) form.
4583 * src/main.c (main): Invoke skel_scanner_free.
4584 * src/scan-skel.h (skel_scanner_free): Prototype new function.
4585 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
4586 obstack_for_string from flex-scanner.h.
4587 (YY_DECL): Use to declare skel_lex static.
4588 (decode_at_digraphs): Remove; now handled in the new
4589 SC_AT_DIRECTIVE_ARG start condition.
4590 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
4591 functions.
4592 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
4593 at_directive_argv): New static globals.
4594 (INITIAL): Use fail_for_invalid_at.
4595 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
4596 recognize the start of a generalized `@directive(...@)' form and
4597 start...
4598 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
4599 directive args (using the new obstack_for_string), to decode the
4600 contained @ diagraphs, and to perform the directive. It recognizes
4601 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
4602 @output(...@).
4603 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
4604 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
4605 `@,'.
4606 (scan_skel): Initialize obstack_for_string on the first call.
4607 (skel_scanner_free): New function to free obstack_for_string.
4608 * tests/input.at (Reject bad %code qualifiers): Update test output.
4609
8e0a5e9e
JD
46102007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
4611
4612 Consolidate the 4 prologue alternative directives (%code, %requires,
4613 %provides, and %code-top) into a single %code directive with an
4614 optional qualifier field. Discussed at
4615 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
4616 * NEWS (2.3a+): Rewrite the existing entry for the prologue
4617 alternatives.
4618 * doc/bison.texinfo (Prologue Alternatives): Update.
4619 (Decl Summary): Update to %code "requires" and %code "provides".
4620 (Calc++ Parser): Update to %code "requires".
148d66d8 4621 (Table of Symbols): Remove entries for %requires, %provides, and
8e0a5e9e
JD
4622 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
4623 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
4624 are replaced by b4_percent_code_provides and b4_percent_code_requires,
4625 which are skeleton-specific.
4626 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
4627 declare what %code qualifiers it supports and to complain if any other
4628 qualifiers were used in the grammar.
4629 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
4630 and b4_user_code([b4_percent_code_provides]) in place of
4631 b4_user_requires and b4_user_provides.
4632 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
4633 Add b4_user_code([b4_percent_code_top]) and
4634 b4_user_code([b4_percent_code]).
4635 Invoke b4_check_percent_code_qualifiers.
4636 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
4637 PERCENT_REQUIRES): Remove.
4638 (grammar_declaration): Remove RHS's for %code-top, %provides, and
4639 %requires. Rewrite the %code RHS as the unqualified form defining the
4640 muscle b4_percent_code. Add another RHS for the qualified %code form,
4641 which defines muscles of the form b4_percent_code_QUALIFIER and the
4642 b4_used_percent_code_qualifiers muscle.
4643 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
4644 PERCENT_REQUIRES): Remove.
4645 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
4646 %code "requires" and %code "provides".
4647 * tests/input.at (Reject bad %code qualifiers): New.
4648
95021767
JD
46492007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
4650
4651 Use the new code_props interface for destructors and printers.
4652 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
4653 printer_location members, and change the type of the destructor and
4654 printer members to code_props.
4655 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
4656 symbol_printer_get, semantic_type_destructor_set,
4657 semantic_type_printer_set, default_tagged_destructor_set,
4658 default_tagless_destructor_set, default_tagged_printer_set,
4659 default_tagless_printer_set): Use code_props in arguments and return
4660 types in place of char const * and location.
4661 (symbol_destructor_location_get, symbol_printer_location_get): Remove
4662 since the locations are now contained in the return of
4663 symbol_destructor_get and symbol_printer_get.
4664 * src/output.c (symbol_destructors_output, symbol_printers_output):
4665 Replace with...
4666 (symbol_code_props_output): ... this to eliminate duplicate code.
4667 (output_skeleton): Update to use symbol_code_props_output.
4668 * src/reader.c (symbol_should_be_used): Update use of
4669 symbol_destructor_get.
4670 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
4671 Update uses of the various _destructor_set and _printer_set functions.
4672 * src/symtab.c: (default_tagged_destructor_location,
4673 default_tagless_destructor_location, default_tagged_printer_location,
4674 default_tagless_printer_location): Remove since we...
4675 (default_tagged_destructor, default_tagless_destructor,
4676 default_tagged_printer, default_tagless_printer): ... change the type
4677 of these to code_props.
4678 (symbol_new, semantic_type_new, symbol_destructor_set,
4679 semantic_type_destructor_set, symbol_destructor_get,
4680 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
4681 symbol_check_alias_consistency, default_tagged_destructor_set,
4682 default_tagless_destructor_set, default_tagged_printer_set,
4683 default_tagless_printer_set): Update.
4684 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
4685 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
4686 code_props members.
4687 (symbol_print): Use SYMBOL_CODE_PRINT.
4688
f6857bbf
JD
46892007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
4690
4691 Use the new code_props interface for rule actions.
4692 * src/symlist.h (symbol_list): Replace action, action_location, and
4693 used members with a code_props action_props member.
4694 * src/reader.c (symbol_should_be_used, grammar_rule_check,
4695 grammar_midrule_action, grammar_current_rule_merge_set,
4696 grammar_current_rule_symbol_append, packgram): Update.
4697 * src/scan-code.h (translate_rule_action): Remove, no longer used.
4698 * src/scan-code.l (handle_action_dollar): Update.
4699 (translate_rule_action): Remove, no longer used.
4700 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
4701
7c0c6181
JD
47022007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
4703
4704 Use the new code_props interface in parse-gram.y.
4705 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
4706 Update all uses of translate_* functions to use the new code_props
4707 interface and to use gram_scanner_last_string_free and
4708 code_scanner_last_string_free where possible.
4709 (grammar_declaration): symbol_list_destructor_set and
4710 symbol_list_printer_set now perform the translation, so don't do it
4711 here. Use gram_scanner_last_string_free where possible.
4712 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
4713 translate_code): Remove, no longer used.
4714 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
4715 symbol_list_printer_set): Perform code translation here rather than
4716 depending on the caller to do so.
4717
4718 * src/symlist.h (struct symbol_list): Correct some documentation typos.
4719 * src/scan-gram.h (gram_last_string): Remove declaration.
4720 * src/scan-gram.l (last_string): Declare it static.
4721
28e52c0d
JD
47222007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
4723
4724 Encapsulate code properties and related functionality for the various
4725 destructors, printers, and actions into a code_props structure and
4726 interface. This patch merely implements code_props in scan-code.h and
4727 scan-code.l. Future patches will rewrite other modules to use it.
4728 Discussed starting at
4729 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
4730 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
4731 consistently initialize const structs that have an empty location
4732 field.
4733 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
4734 to ensure consistency.
4735 * src/scan-code.h (code_props): New structure.
4736 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
4737 function, macro, and const global variable for initializing a
4738 code_props with no code.
4739 (code_props_plain_init, code_props_symbol_action_init,
4740 code_props_rule_action_init, code_props_translate_code): The rest of
4741 the new code_props functional interface. Among other things, the init
4742 functions set the code_props kind field so that
4743 code_props_translate_code will know whether to behave like
4744 translate_symbol_action, translate_rule_action, or translate_code.
4745 These old translate functions must remain until all other modules are
4746 updated to use the new code_props interface.
4747 (code_scanner_last_string_free): New function similar to
4748 gram_scanner_last_string_free.
4749 (code_scanner_free): Add documentation.
4750 * src/scan-code.l: Implement the new interface.
4751 (code_lex): Make it static, add a code_props* argument, and remove the
4752 rule argument.
4753 (last_string): New static global similar to the one in scan-gram.l.
4754 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
4755 instead of rule.
4756 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
4757 code_props since Bison may one day use this information for destructors
4758 and printers.
4759 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
4760 (handle_action_dollar): Use symbol_list_n_get and set used flag
4761 directly since symbol_list_n_used_set is removed.
4762 (translate_action): Add a code_props* argument and remove the rule,
4763 action, and location arguments. Pass the code_props* on to code_lex.
4764 (translate_rule_action, translate_symbol_action, translate_code):
4765 Rewrite as wrappers around the new code_props interface.
4766 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
4767 it would eventually need to break the encapsulation of code_props.
4768
96034983
JD
47692007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
4770
4771 * etc/.cvsignore: New.
4772
945e396c
JD
47732007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
4774
4775 Add maintainer-push-check to run maintainer-check using push parsing in
4776 place of pull parsing where available.
4777 * Makefile.am (maintainer-push-check): New.
4778 * data/bison.m4 (b4_use_push_for_pull_if): New.
4779 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
4780 appropriately based on their existing values.
4781 (yypush_parse): Don't print push-parser-specific diagnostics if push
4782 parsing is being used in place of pull parsing.
4783 * data/yacc.c: If push parsing should replace pull parsing, redirect to
4784 push.c.
4785 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
4786 variable, and insert b4_use_push_for_pull_flag into muscles.
4787 * tests/Makefile.am (maintainer-push-check): New.
4788
7d596384
JD
47892006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
4790
4791 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
4792 (whether successful or failed) so that yypush_parse can be invoked
4793 again to start a new parse using the same yypstate.
4794 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
4795 check multiple yypull_parse invocations on the same yypstate. For pull
4796 mode, extend to check multiple yyparse invocations.
4797 (Exploding the Stack Size with Alloca): Extend to try with
4798 %push-pull-parser.
4799 (Exploding the Stack Size with Malloc): Likewise.
4800
4801 * tests/calc.at (Simple LALR Calculator): Don't specify
4802 %skeleton "push.c" since %push-pull-parser implies that now.
4803 * tests/headers.at (export YYLTYPE): Don't check for the push
4804 declarations. Otherwise, this test case can't be used to see if push
4805 mode can truly emulate pull mode.
4806 * tests/input.at (Torturing the Scanner): Likewise.
4807 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
4808 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
4809 AT_YACC_IF, which now includes the case of push mode since %skeleton
4810 need not be used for push mode. This will be more intuitive once
4811 push.c is renamed to yacc.c.
4812
7172e23e
JD
48132006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
4814
4815 For push mode, convert yyparse from a macro to a function, invoke yylex
4816 instead of passing a yylexp argument to yypull_parse, and don't
4817 generate yypull_parse or yyparse unless %push-pull-parser is declared.
4818 Discussed starting at
4819 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
4820 * data/bison.m4 (b4_pull_if): New.
4821 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
4822 * data/push.c: Improve M4 quoting a little.
4823 (b4_generate_macro_args, b4_parenthesize): Remove.
4824 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
4825 any time a pull parser is requested.
4826 Don't #define this as a wrapper around yypull_parse. Instead, when
4827 both push and pull are requested, make it a function that does that
4828 same thing.
4829 (yypull_parse): If there's a b4_prefix, #define this to
4830 b4_prefix[pull_parse] when both push and pull are requested.
4831 Don't define this as a function unless both push and pull are
4832 requested.
4833 Remove the yylexp argument and hard-code yylex invocation instead.
4834 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
4835 %push-parser.
4836 * src/getargs.c (pull_parser): New global initialized to true.
4837 * getargs.h (pull_parser): extern it.
4838 * src/output.c (prepare): Insert pull_flag muscle.
4839 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
4840 (prologue_declaration): Set both push_parser and pull_parser = true for
4841 %push-pull-parser. Set push_parser = true and pull_parser = false for
4842 %push-parser.
4843 * src/scan-gram.l: Don't accept %push_parser as an alternative to
4844 %push-parser since there's no backward-compatibility concern here.
4845 Scan %push-pull-parser.
4846 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
4847 instead of %push-parser.
4848 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
4849 prototype it in the module that calls yyparse.
4850 * tests/input.at (Torturing the Scanner): Likewise.
4851 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
4852
2e7944cb
JD
48532006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
4854
4855 Update etc/bench.pl. Optimize push mode a little (the yyn change
4856 deserves most of the credit).
4857 * Makefile.am (SUBDIRS): Add etc subdirectory.
4858 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
4859 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
4860 yytoken, yyval, and yyloc declarations to...
4861 (yyparse or yypush_parse): ... here to improve performance. For
4862 yypush_parse invocations after the first, be sure to assign yyn its old
4863 value again.
4864 (yypstate_new): Don't bother initializing the yyresult field since the
4865 initial value isn't used.
4866 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
4867 remove the #define that, in push mode, set it to yyps->NAME.
4868 * etc/Makefile.am: New.
4869 * etc/bench.pl: Remove and build it instead from...
4870 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
4871 "tests/bison" from the build directory by default rather than just
4872 invoking "bison" from $PATH.
4873 (calc_grammar): Update push parser code: don't declare yylval globally,
4874 don't define yyparse_wrapper, and don't #define yyparse.
4875 (bench_grammar): Update to check all working combinations of yacc.c,
4876 push.c, impure, pure, pull, and push.
4877
c3d50342
JD
48782006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
4879
4880 For push mode, add pull wrappers around yypush_parse.
4881 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
4882 (yypull_parse): New function wrapping yypush_parse.
4883 (yyparse): New #define wrapping yypull_parse.
4884 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
4885 is declared.
4886 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
4887 prototype yylex in the module that calls yyparse, and don't prototype
4888 yyparse there. Otherwise, the yyparse expansion won't compile.
4889 * tests/input.at (Torturing the Scanner): Likewise.
4890
94ebeba5
JD
48912006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
4892
4893 Enable push parsers to operate in impure mode. Thus, %push-parser no
4894 longer implies %pure-parser. The point of this change is to move
4895 towards being able to test the push parser code by running the entire
4896 test suite as if %push-parser had been declared.
4897 * data/push.c (yypush_parse): For impure mode, remove the
4898 yypushed_char, yypushed_val, and yypushed_loc arguments.
4899 Instead, declare these as local variables initialized to the global
4900 yychar, yylval, and yylloc.
4901 For the first yypush_parse invocation only, restore the initial values
4902 of these global variables when it's time to read a token since they
4903 have been overwritten.
4904 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
4905 %push-parser.
4906 * tests/calc.at (Simple LALR(1) Calculator): Always declare
4907 %pure-parser along with %push-parser since this test case was designed
4908 for pure push parsers.
4909 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
4910 (AT_YACC_OR_PUSH_IF): New.
4911 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
4912 add a note that it's still wrong for some cases (as it has been for a
4913 while).
4914 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
4915 %push-parser no longer implies %pure-parser.
4916
a0633178
JD
49172006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
4918
4919 Remove some unnecessary differences between the pull parser code and
4920 the push parser code. This patch enables yynerrs in push mode.
4921 * data/push.c: Reformat M4 a little.
4922 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
4923 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
4924 because push mode is on. Instead, if pure mode is on, move yynerrs
4925 to...
4926 (b4_declare_parser_state_variables): ... here.
4927 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
4928 to yyps->NAME so it can be used in yypush_parse.
4929 (yypush_parse): Don't omit uses of yynerrs in push mode.
4930
8646b6a3
JD
49312006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
4932
4933 Fix bug such that the first pushed token's value and location are
4934 sometimes overwritten (sometimes by %initial-action) before being used.
4935 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
4936 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
4937 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
4938 more closely mimic the pull parser logic.
4939 Don't copy the pushed token to yychar, yylval, and yylloc until it's
4940 time to read a token, which is after any initialization of yylval and
4941 yylloc.
4942 (gottoken): Rename label to...
4943 (yyread_pushed_token): ... for clarity and to avoid infringing on the
4944 user namespace.
4945
9baf4d74
JD
49462006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
4947
4948 Rearrange initialization of the parser state variables so that the
4949 skeleton doesn't have to have a copy for pull mode and another for push
4950 mode. This patch also fixes at least a bug such that yylloc was not
4951 initialized (with b4_location_initial_line and
4952 b4_location_initial_column) upon calling yypush_parse. However, that
4953 initialization now overwrites the first token's location;
4954 %initial-action assigning @$ already did the same thing, and both bugs
4955 will be fixed in a later patch.
4956 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
4957 (b4_declare_parser_state_variables): Remove initialization of yytoken,
4958 yyss, yyvs, yyls, and yystacksize.
4959 (yypstate_new): Remove initialization of some yypstate fields: yystate,
4960 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
4961 yylsp.
4962 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
4963 yyps->NAME so it can be used in yypush_parse.
4964 (yyparse or yypush_parse): For yypush_parse, don't print the
4965 "Starting parse" diagnostic for invocations after the first.
4966 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
4967 yypush_parse, only do it for the first invocation.
4968 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
4969 initialization to occur in yypush_parse but only on the first
4970 invocation.
4971
23522164
JD
49722006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
4973
4974 * data/push.c: Add CPP guards around push parser declarations in both
4975 the header and the code file.
4976 In the code file, move the push parser declarations to the same place
4977 they appear in the header file.
4978 Clean up the M4 some, especially the inconsistent underquoting in
4979 some b4_c_function_def and b4_c_function_decl uses.
4980
bb010fe5
JD
49812006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
4982
4983 Encapsulate the push parser state variables into an M4 macro so the
4984 push skeleton doesn't have to list them again for pull mode's yyparse.
4985 For push mode, remove yypush_parse's local equivalents of these
4986 variables to eliminate unnecessary copying between the two sets at
4987 run-time. This patch also fixes at least a bug related to multiple
4988 %initial-action invocations in push mode.
4989 * data/push.c (b4_declare_parser_variables): Rename to...
4990 (b4_declare_scanner_communication_variables): ... this for clarity and
4991 update both uses.
4992 (b4_declare_yyparse_variables): Remove and move its contents to the one
4993 spot where it was invoked.
4994 (b4_declare_parser_state_variables): New macro containing the parser
4995 state variables required by push mode.
4996 (struct yypstate): Replace all fields but yynew with
4997 b4_declare_parser_state_variables.
4998 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
4999 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
5000 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
5001 (yyparse or yypush_parse): For yyparse in pull mode, replace local
5002 parser state variable declarations with
5003 b4_declare_parser_state_variables.
5004 Don't initialize parser state variables when calling yypush_parse since
5005 yypstate_new already does that.
5006 Invoke the user's initial action only upon the first yypush_parse
5007 invocation.
5008 Remove all code that copies between the local parser state variables
5009 and the yypstate.
5010
2d212f8c
JD
50112006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5012
5013 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
5014 prevent a name collision in a future patch where these names will
5015 sometimes be #define'd.
5016 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
5017 since it no longer has the same name as the existing argument.
5018 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
5019
e6e704dc
JD
50202006-12-19 Paolo Bonzini <bonzini@gnu.org>
5021 and Joel E. Denny <jdenny@ces.clemson.edu>
5022
5023 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
5024 that the argument is case-insensitive, and there's no `=' here.
5025 For the %skeleton entry, mention that %language is better.
5026 (Bison Options): Likewise for --language and --skeleton. Move the
5027 --skeleton entry so that the `Tuning the parser' section is sorted
5028 alphabetically on long options.
5029 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
5030 %language directive in detail here; cross-reference the %language
5031 documentation instead.
5032 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
5033 `%require "2.3b"' so that the example is always up-to-date.
148d66d8 5034 (Table of Symbols): Add entries for %language and %skeleton.
e6e704dc
JD
5035 * examples/extexi (normalize): Instead of replacing every %require
5036 argument with the current Bison version, just substitute for
5037 `@value{VERSION}'. This guarantees that we're testing what actually
5038 appears in the documentation.
5039 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
5040 rather than `@VERSION@'.
5041
0e021770
PE
50422006-12-18 Paul Eggert <eggert@cs.ucla.edu>
5043
fd575f05
PE
5044 * NEWS: Reword the %language news a bit, and put it earlier.
5045
0e021770
PE
5046 * src/getargs.c (skeleton_arg): Last arg is now location const *.
5047 Rewrite to simplify the logic.
5048 (language_argmatch): Likewise.
fd575f05
PE
5049 (program_name): We now own this var.
5050 * src/getargs.h (struct bison_language): Use char[] rather than
5051 const char *.
0e021770
PE
5052
5053 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
5054 Java is supported.
5055 * src/complain.c (program_name): Remove decl; no longer needed.
5056 * src/main.c (program_name): Remove; now belongs to getargs.
5057
50582006-12-18 Paolo Bonzini <bonzini@gnu.org>
5059
5060 * NEWS: Document %language.
5061
5062 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
5063
5064 * data/c-skel.m4, data/c++-skel.m4: New files.
5065 * data/glr.c: Complain on push parsers.
5066
5067 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
5068 over %skeleton.
148d66d8 5069 (Decl Summary): Document %language and %skeleton.
0e021770
PE
5070 (Command line): Document -L.
5071
5072 * examples/extexi: Rewrite %require directive.
5073 * examples/calc++/Makefile.am: Pass VERSION to extexi.
5074
5075 * src/files.c (compute_exts_from_gc): Look in language structure
5076 for .y extension.
5077 (compute_file_name_parts): Check whether .tab should be added.
5078 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
5079 (language, skeleton_arg, language_argmatch): New.
5080 (long_options): Add --language.
5081 (getargs): Use skeleton_arg, add -L/--language.
5082 * src/getargs.h: Include location.h.
5083 (struct bison_language, language, skeleton_arg, language_argmatch): New.
5084 * src/output.c (prepare): Pick default skeleton from struct language.
5085 Don't dispatch C skeletons here.
5086 * src/parse-gram.y (PERCENT_LANGUAGE): New.
5087 (prologue_declaration): Add "%language" rule, use skeleton_arg.
5088 * src/scan-gram.l ("%language"): New rule.
5089
5090 * tests/calc.at: Test %skeleton and %language.
5091 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
5092 (AT_GLR_IF): Look for %skeleton "glr.cc".
5093 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
5094 (AT_YACC_IF): Reject %language.
5095
5691bf57
PE
50962006-12-18 Paul Eggert <eggert@cs.ucla.edu>
5097
db06f0ce
PE
5098 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
5099 since it wasn't used; only the typedef name 'semantic_type' is needed.
5100 Also, omit trailing white space.
5101
5691bf57
PE
5102 * bootstrap: Sync from coreutils.
5103 (gnulib_extra_files): Add build-aux/announce.gen.
5104 (slurp): Adjust .gitignore files like .cvsignore files.
5105 * build-aux/announce-gen: Remove from CVS, since bootstrap
5106 now creates this.
5107
791934e4
JD
51082006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
5109
5110 Make %push-parser imply %pure-parser. This fixes several bugs; see
5111 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
5112 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
5113 pure_parser = true.
5114 * data/push.c: Don't bother testing b4_push_if when deciding whether
5115 to expand b4_declare_parser_variables globally.
5116 (yypush_parse): Likewise in here.
5117
5118 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
5119 (yy_reduce_print): Reformat M4 for readability.
5120
ee5abb37
JD
51212006-12-15 Bob Rossi <bob@brasko.net>
5122 and Joel Denny <jdenny@ces.clemson.edu>
5123
5124 * data/push.c (yypstate): Add typedef, and update all uses of
5125 struct yypstate to just yypstate.
5126 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
5127
16ca01f9
JD
51282006-12-14 Bob Rossi <bob@brasko.net>
5129
5130 * data/push.c (yypush_parse): Declare prototype regardless of
5131 %locations option.
5132
ab8e7e1a
JD
51332006-12-14 Bob Rossi <bob@brasko.net>
5134
5135 * data/push.c (yyparse): Remove the prototype and the #define when in
5136 push-parser mode.
5137
9bf32be3
JD
51382006-12-13 Bob Rossi <bob@brasko.net>
5139
5140 * data/push.c (yypstate_init): Rename to...
5141 (yypstate_new): ... this and use b4_c_function_def.
5142 (yypstate_delete): New.
5143 (yypush_parse): Change parameters yynval and yynlloc to be const.
5144 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
5145 yypstate_delete functions.
5146
f02e2948
JD
51472006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
5148
5149 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
5150 strange test case titles. Reported by Bob Rossi.
5151
38eb7751
PE
51522006-12-13 Paul Eggert <eggert@cs.ucla.edu>
5153
5154 * TODO: Add pointer to Sylvain Schmitz's work on static detection
5155 of potential ambiguities in GLR grammers.
5156
bd9d212b
JD
51572006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
5158
5159 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
5160 `bison ', use m4_index instead of m4_substr since chopping up a string
5161 containing M4-special characters causes problems here.
5162
5163 Fix a couple of bugs related to special characters in user-specified
5164 file names, and make it easier for skeletons to compute output file
5165 names with the same file name prefix as Bison-computed output file
5166 names.
5167 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
5168 b4_parser_file_name and b4_spec_defines_file instead of
5169 @output_parser_name@ and @output_header_name@, which are now redundant.
5170 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
5171 b4_parser_file_name, b4_spec_defines_file, and the new
5172 @basename(FILENAME@) instead of @output_parser_name@ and
5173 @output_header_name@, which inappropriately escaped the file names as
5174 C string literals.
5175 * src/files.c (all_but_ext): Remove static qualifier.
5176 (compute_output_file_names): Move `free (all_but_ext)' to...
5177 (output_file_names_free): ... here since all_but_ext is needed later.
5178 * src/files.h (all_but_ext): Extern.
5179 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
5180 exactly what MUSCLE_INSERT_STRING used to do.
5181 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
5182 characters are escaped properly.
5183 * src/output.c (prepare): Define muscle file_name_all_but_ext as
5184 all_but_ext.
5185 For pkgdatadir muscle, maintain previous functionality by using
5186 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
5187 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
5188 digraphs would never be expanded. Hopefully no one has M4-special
5189 characters in his Bison installation path.
5190 * src/scan-skel.l: Don't parse @output_header_name@ and
5191 @output_parser_name@ anymore since they're now redundant.
5192 In @output, use decode_at_digraphs.
5193 Parse a new @basename command that invokes last_component.
5194 (decode_at_digraphs): New.
5195 (BASE_QPUTS): Remove unused.
5196 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
5197 (Output file name): New tests.
5198
3f7ca628
JD
51992006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
5200
5201 Warn about output files that are generated by the skeletons and that
5202 conflict with other output files.
5203 * data/glr.c: Don't generate the header file here when glr.cc does.
5204 * src/files.c (file_names, file_names_count): New static globals.
5205 (compute_output_file_names): Invoke output_file_name_check for files
5206 not generated by the skeletons and remove existing checks.
5207 (output_file_name_check): New function that warns about conflicting
5208 output file names.
5209 (output_file_names_free): Free file_names.
5210 * src/files.h (output_file_name_check): Declare.
5211 * src/scan-skel.l: Invoke output_file_name_check for files generated by
5212 the skeletons.
5213 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
5214 (Conflicting output files): New tests.
5215
178e123e
PE
52162006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5217
5218 * doc/bison.texinfo: Fix a couple of typos.
5219
52202006-12-08 Bob Rossi <bob@brasko.net>
8def5cd0
JD
5221
5222 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
5223 Rename to...
5224 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
5225 update all uses.
5226 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
5227 (yypush_parse): Rename yypvars argument to yyps and remove redundant
5228 local pv.
5229 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
5230 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
5231
ea17f233
JD
52322006-12-07 Bob Rossi <bob@brasko.net>
5233 and Joel Denny <jdenny@ces.clemson.edu>
5234
5235 * data/push.c (yypvarsinit): Change return type from void* to struct
5236 yypvars*. No longer cast to void* on return.
5237 (struct yypvars): Remove yylen since it need not be remembered between
5238 yypushparse invocations.
5239 (yypushparse): Don't copy between yylen and pv->yylen.
5240
55a30bda
JD
52412006-12-05 Bob Rossi <bob@brasko.net>
5242
5243 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
5244 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
5245 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
5246 (struct yypvars): Remove b4_declare_parser_variables.
5247 (yypvarsinit): Remove init code for removed variables.
5248 (global scope): Do not declare b4_declare_parser_variables if
5249 push or pure mode.
5250 (yypushparse): Add b4_declare_parser_variables.
5251 Init new local variables, and remove init code for removed
5252 yypvars variables.
5253 (yyparse): Delete.
5254 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
5255 and yyparse for other modes.
5256 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
5257 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
5258 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
5259 (AT_PURE_LEX_IF): True if pure or push parser.
5260
85894313
JD
52612006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
5262
5263 Document Yacc prologue alternatives and default %destructor's and
5264 %printer's as experimental. Don't mention Java yet. Discussed at
5265 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
5266 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
5267 (2.3a): Annotate this entry to say the old forms of these features were
5268 also experimental.
5269 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
148d66d8 5270 Table of Symbols): Say they're experimental. Comment out any mention
85894313
JD
5271 of Java (we'll want this back eventually).
5272
02975b9a
JD
52732006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
5274
5275 Support a file name argument to %defines. Deprecate `=' in
5276 %file-prefix, %name-prefix, and %output. Discussed at
5277 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
5278 * NEWS (2.3a+): Mention.
148d66d8 5279 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
02975b9a
JD
5280 form of %defines, and remove `=' from entries for %file-prefix,
5281 %name-prefix, and %output.
5282 * src/parse-gram.y (prologue_declaration): Implement.
5283 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
5284 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
5285 all but one occurrence of %name-prefix.
5286 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
5287 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
5288 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
5289 occurrence of each of %file-prefix and %output. Add check for %defines
5290 with argument.
5291 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
5292 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
5293 Remove the `=' from %output.
5294
287b314e
JD
52952006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
5296
5297 Don't escape $ in test case titles since Autoconf 2.61 now does that
5298 correctly.
5299 * tests/actions.at (Default %printer and %destructor are not for error
5300 or $undefined): Here.
5301 (Default %printer and %destructor are not for $accept): Here.
5302 * tests/input.at (Invalid $n and @n): Here.
5303
3ebecc24
JD
53042006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
5305
5306 Rename <!> to <>. Discussed starting at
5307 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
5308 * NEWS (2.3a+): Update.
148d66d8 5309 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
3ebecc24
JD
5310 Update.
5311 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
5312 * src/scan-gram.l (INITIAL): Implement.
5313 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
5314 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
5315 comment.
5316 * tests/actions.at (Default tagless %printer and %destructor,
5317 Default tagged and per-type %printer and %destructor,
5318 Default %printer and %destructor are not for error or $undefined,
5319 Default %printer and %destructor are not for $accept,
5320 Default %printer and %destructor for mid-rule values): Update.
5321 * tests/input.at (Default %printer and %destructor redeclared,
5322 Unused values with default %destructor): Update.
5323
26b8a438
JD
53242006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
5325
5326 Don't let %prec take a nonterminal.
5327 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
5328 token.
5329 * tests/input.at (%prec takes a token): New test checking that %prec
5330 won't take a nonterminal.
5331
07c39ae9
JD
53322006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5333
405d53b7
JD
5334 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
5335 it was double-quoted.
07c39ae9
JD
5336 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
5337 grammar is maintained with Bison's highest standards.
5338 * src/getargs.c: Fix some typos in Doxygen comments.
5339
580b8926
JD
53402006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5341
5342 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
5343 later. Reported by Paul Eggert in
5344 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
5345 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
5346 * src/scan-code.l (translate_action): Don't bother invoking
5347 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
5348 (code_scanner_free): Instead of invoking
5349 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
5350 which frees more.
5351 * src/scan-gram.l (gram_scanner_free): Likewise.
5352 * src/scan-skel.l (scan_skel): Likewise.
5353
4502eadc
JD
53542006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
5355
5356 * src/files.c (tr): Change return type to void.
5357 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
5358 has been called previously for the same key.
5359 (muscle_find): Return storage instead of value so that
5360 --enable-gcc-warnings doesn't produce warnings that the return discards
5361 const. aver that the value and storage are the same since storage
5362 could potentially be NULL when value is not.
5363 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
5364 same as 0.
5365
7746c8f6
PE
53662006-11-08 Paul Eggert <eggert@cs.ucla.edu>
5367
5368 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
5369 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
5370 us a slightly cleaner distribution, and also works.
5371 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
5372 gnulib changes.
5373
eb095650
PE
53742006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
5375 and Paul Eggert <eggert@cs.ucla.edu>
5376
5377 Don't let Bison leak memory except when it complains.
5378 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
5379 (spec_defines_file, dir_prefix): Now char *, not const char *,
5380 since they are freed.
5381 * src/files.c: Likewise.
5382 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
5383 Likewise.
5384 (tr): Now operates in-place. All uses changed.
5385 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
5386 values.
5387 (compute_file_name_parts, compute_output_file_names): Don't store
5388 read-only data in variables that will be freed.
5389 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
5390 src_extension, and header_extension.
5391 (output_file_names_free): New public function to free
5392 spec_verbose_file, spec_graph_file, spec_defines_file,
5393 parser_file_name, and dir_prefix.
5394 * src/getargs.c (getargs): Don't store read-only data in variables that
5395 will be freed.
5396 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
5397 (which previously existed but was unused), and quotearg_free.
5398 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
5399 * src/muscle_tab.c: Likewise.
5400 (muscle_entry): Make the value char const *,
5401 and add a new storage member that is char * and can be freed.
5402 (muscle_entry_free): New private function.
5403 (muscle_init): Use it instead of free.
5404 (muscle_insert, muscle_grow): Update and use new storage member.
5405 (muscle_code_grow): Free the string passed to muscle_grow
5406 since it's not needed anymore.
5407 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
5408 add a new `char *code' member.
5409 ("{...}"): Declare semantic type as code.
5410 * src/scan-code.h (translate_rule_action):
5411 (translate_symbol_action, translate_code, translate_action): Return
5412 `char const *' rather than `char *' since external code should not free
5413 these strings.
5414 * src/scan-code.l: Likewise.
5415 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
5416 which is "{...}" in the parser.
5417 * tests/Makefile.am (maintainer-check-valgrind): Set
5418 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
5419 Valgrind.
5420 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
5421 complain.
5422 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
5423 expecting a non-zero exit status sets --leak-check=summary and
5424 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
5425 this case, and we don't want to hear about it.
5426
ac564be4
PE
54272006-11-08 Paul Eggert <eggert@cs.ucla.edu>
5428
5429 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
5430 instead of from the template, to simplify configuration a bit.
5431 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
5432 and m4/wint_t.m4, as they are needed with the latest gnulib.
5433
17bd8a73
JD
54342006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5435
5436 Disable unset/unused mid-rule value warnings by default, and recognize
5437 --warnings=midrule-values to enable them. Discussed starting at
5438 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
5439 * NEWS (2.3a+): Mention.
5440 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
5441 warnings): Add entry for midrule-values subargument.
5442 * src/reader.c (symbol_should_be_used): Don't return true just because
5443 the value is a set/used mid-rule value unless
5444 --warnings=midrule-values was specified.
5445 * tests/input.at (Unused values, Unused values before symbol
5446 declarations): Run tests with and without --warnings=midrule-values.
5447
5448 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
5449 than LIST_FREE directly.
5450
89eb3c76
JD
54512006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5452
5453 Finish implementing --warnings=error, which should not be implied by
5454 --warnings=all (or by its synonyms -W and --warnings without
5455 subarguments).
5456 * src/complain.c (set_warning_issued): New function to report that
5457 warnings are being treated as errors and to record an error if so.
5458 Invoke...
5459 (warn_at, warn): ... here.
5460 * src/getargs.c (warnings_args, warnings_types): Reorder so that
5461 "error - warnings are errors" does not appear above "all - all of the
5462 above".
5463 (getargs): For -W and --warnings without subarguments, don't let
5464 FLAGS_ARGMATCH set warnings_error in warnings_flag.
5465 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
5466
ba7560e2
JD
54672006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5468
5469 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
5470 empty subargument list. For example: `bison --warnings= parser.y'.
5471
31283fc3
JD
54722006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5473
5474 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
5475 the parser header file so that gcc doesn't warn.
5476
12e35840
JD
54772006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5478
5479 Split the default %destructor/%printer into two kinds: <*> and <!>.
5480 Discussed starting at
5481 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
5482 * NEWS (2.3a+): Mention.
5483 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
5484 previous change today related to mid-rules.
148d66d8 5485 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
3ebecc24 5486 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
12e35840
JD
5487 (TYPE_TAG_ANY): Add as <*>.
5488 (TYPE_TAG_NONE): Add as <!>.
5489 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
5490 for <*> and <!>.
5491 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
5492 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
5493 * src/symlist.c (symbol_list_default_new): Split into tagged and
5494 tagless versions.
5495 (symbol_list_destructor_set, symbol_list_printer_set): Split
5496 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
5497 SYMLIST_DEFAULT_TAGLESS.
5498 * src/symlist.h: Update symbol_list_default*_new prototypes.
5499 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
5500 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
5501 * src/symtab.c (default_destructor, default_destructor_location,
5502 default_printer, default_printer_location): Split each into tagged and
5503 tagless versions.
5504 (symbol_destructor_get, symbol_destructor_location_get,
5505 symbol_printer_get, symbol_printer_location_get): Implement tagged
5506 default and tagless default cases.
5507 (default_destructor_set, default_printer_set): Split each into tagged
5508 and tagless versions.
5509 * src/symtab.h: Update prototypes.
5510 * tests/actions.at (Default %printer and %destructor): Rename to...
5511 (Default tagless %printer and %destructor): ... this, and extend.
5512 (Per-type %printer and %destructor): Rename to...
5513 (Default tagged and per-type %printer and %destructor): ... this, and
5514 extend.
5515 (Default %printer and %destructor for user-defined end token): Extend.
5516 (Default %printer and %destructor are not for error or $undefined):
5517 Update.
5518 (Default %printer and %destructor are not for $accept): Update.
5519 (Default %printer and %destructor for mid-rule values): Extend.
5520 * tests/input.at (Default %printer and %destructor redeclared): Extend.
5521 (Unused values with default %destructor): Extend.
5522
f91b1629
JD
55232006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5524
5525 Don't apply the default %destructor/%printer to an unreferenced midrule
5526 value. Mentioned at
5527 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
5528 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
5529 like $@n instead of just @n so that the default %destructor/%printer
5530 logic doesn't see them as user-defined symbols.
5531 (symbol_is_dummy): Check for both forms of the name.
5532 * src/reader.c (packgram): Remove the `$' from each midrule symbol
5533 name for which the midrule value is referenced in any action.
5534 * tests/actions.at (Default %printer and %destructor for mid-rule
5535 values): New test.
5536 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
5537 for change to dummy symbol names.
5538
519d0004
JD
55392006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
5540
5541 Warn about unset midrule $$ if the corresponding $n is used.
5542 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
5543 $n usage.
5544 (packgram): Before invoking grammar_rule_check on any rule, make sure
5545 all actions have already been scanned in order to set `used' flags.
5546 Otherwise, checking that a midrule's $$ is set will not always work
5547 properly because the midrule check must forward-reference the midrule's
5548 parent rule.
5549 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
5550 warning.
5551
a501eca9
JD
55522006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
5553
5554 More improvements to the documentation of the prologue alternatives:
5555 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
5556 Bison manual.
5557 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
5558 some text to clarify the relative importance of the new directives and
5559 to show how these directives may be viewed as code labels.
5560
2cbe6b7f
JD
55612006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
5562
5563 Similar to the recently removed %before-header, add %code-top as the
5564 alternative to the pre-prologue. Mentioned at
5565 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
5566 Also, let the prologue alternatives appear in the grammar section.
5567 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
5568 (prologue_declaration): Move the existing prologue alternatives to...
5569 (grammar_declaration): ... here and add %code-top.
5570 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
5571
5572 Clean up and extend documentation for the prologue alternatives.
5573 * NEWS (2.3a+): Describe prologue alternatives.
5574 * doc/bison.texinfo (Prologue): Move discussion of prologue
5575 alternatives to...
5576 (Prologue Alternatives): ... this new section, and extend it to discuss
5577 all 4 directives in detail.
148d66d8
JD
5578 (Table of Symbols): Clean up discussion of prologue alternatives and
5579 add %code-top.
2cbe6b7f 5580
e557d3ea
JMG
55812006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5582
5583 DJGPP specific issues.
5584
5585 * djgpp/config.bat: config.hin has been moved to lib. Adjust
5586 config.bat accordingly.
5587 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
5588 * djgpp/config.site: Likewise.
5589
136a0f76
PB
55902006-10-16 Paolo Bonzini <bonzini@gnu.org>
5591
27bd5d67
PB
5592 Replace %*-header with %provides, %requires, %code. See discussion at
5593 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
5594
136a0f76
PB
5595 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
5596 (b4_user_start_header): Remove.
5597 * data/glr.c: Use new macros instead of b4_*start_header
5598 and b4_*end_header.
5599 * data/glr.cc: Likewise.
5600 * data/lalr1.cc: Likewise.
5601 * data/push.c: Likewise.
5602 * data/yacc.c: Likewise.
5603
5604 * doc/bison.texinfo: Remove %before-header, rename
5605 %{start,end,after}-header to %requires, %provides, %code.
5606
5607 * src/parse-gram.y: Likewise (also rename token names accordingly).
5608 * src/scan-gram.l: Likewise.
5609 * tests/actions.at: Likewise.
5610
10f429ef
PE
56112006-10-14 Paul Eggert <eggert@cs.ucla.edu>
5612
5613 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
5614 Problem reported by Joel E. Denny.
5615
56162006-10-14 Jim Meyering <jim@meyering.net>
5617
5618 (Sync from coreutils.)
5619 Work also when the working directory (with e.g. coreutils sources)
5620 is version controlled with git, rather than CVS.
5621 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
5622 rather than CVS.
5623 In messages and comments, say e.g., "checked-out sources",
5624 rather than "CVS sources".
5625 (version_controlled_file): New function. Work for git as well as
5626 for CVS. Don't use grep's -q option.
5627 (slurp): Call it here, in place of CVS-specific code.
5628
c4bd5bf7
JD
56292006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
5630
5631 Fix testsuite for ./configure --enable-gcc-warnings:
5632 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
5633 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
5634 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
5635 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
5636 * test/regression.at (Diagnostic that expects two alternatives):
5637 Likewise.
5638
46356ea4
PE
56392006-10-12 Paul Eggert <eggert@cs.ucla.edu>
5640
231ed89a
PE
5641 * bootstrap.conf (gnulib_modules): Add config-h.
5642 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
5643 worry about HAVE_CONFIG_H.
5644 * lib/abitset.c: Likewise.
5645 * lib/bitset.c: Likewise.
5646 * lib/bitset_stats.c: Likewise.
5647 * lib/bitsetv-print.c: Likewise.
5648 * lib/bitsetv.c: Likewise.
5649 * lib/ebitset.c: Likewise.
5650 * lib/get-errno.c: Likewise.
5651 * lib/lbitset.c: Likewise.
5652 * lib/subpipe.c: Likewise.
5653 * lib/timevar.c: Likewise.
5654 * lib/vbitset.c: Likewise.
5655 * lib/bitset.c: Include "bitset.h" first, to test interface.
5656 * lib/bitset_stats.c: Include "bitset_stats.h" first.
5657 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
5658 * lib/bitsetv.c: Include "bitsetv.h" first.
5659 * lib/get-errno.c: Include "get-errno.h" first.
5660 * m4/.cvsignore: Add config-h.m4.
5661 * tests/actions.at (Default %printer and %destructor for ...):
5662 Adjust expected line numbers in output to reflect removal of #if
5663 HAVE_CONFIG_H lines.
5664 * tests/glr-regression.at (Missed %merge type warnings when ...):
5665 Likewise.
5666 * tests/regression.at (Braced code in declaration in rules section):
5667 Likewise.
5668 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
5669 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
5670 Include <config.h> unconditionally.
5671
46356ea4
PE
5672 * bootstrap: Sync from coreutils, as follows:
5673
5674 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
5675
5676 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
5677 variable was sometimes used without being initialized. This
5678 messed up the installation of the INSTALL file in some cases.
5679
5680 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
5681
5682 * bootstrap (usage, main program, symlink_to_gnulib): Add option
5683 --copy. Inspired by a suggestion from Bruno Haible.
5684
5685 2006-10-03 Jim Meyering <jim@meyering.net>
5686
5687 * bootstrap: Undo last change to this file, since now gnulib-tool
5688 sticks with the automake default in generating dependencies.
5689
dd4bf078
PE
56902006-10-12 Paul Eggert <eggert@cs.ucla.edu>
5691
cf2a5f7c
PE
5692 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
5693 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
5694
5695 * doc/bison.1: Add copyright notice.
5696
5697 * data/glr.c: Don't include <stdarg.h>; not used.
5698
35fe0834
PE
5699 * NEWS: The -g and --graph options now output graphs in Graphviz
5700 DOT format, not VCG format.
5701 * doc/bison.1: Likewise.
5702 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
fcab4a2e
PE
5703 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
5704 of this change in
5705 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
35fe0834
PE
5706 * TODO: Remove Graphviz entry.
5707 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
5708 remove vcg.c, vcg.h, vcg_defaults.h.
5709 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
5710 * src/graphviz.c, src/graphviz.h: New files.
5711 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
5712 * src/files.h: Make comment more generic.
5713 * src/main.c (main): Likewise.
5714 * src/print_graph.h: Likewise.
5715 * src/getargs.c (usage): Make usage description more generic.
5716 * src/print_graph.c: Include graphviz.h rather than vcg.h.
5717 (static_graph, fgraph): Remove. All uses changed to pass
5718 arguments instead of sharing a static var.
5719 (print_core, print_actions, print_state, print_graph):
5720 Output graphviz format rather than VCG format.
5721 * tests/.cvsignore: Remove *.vcg; add *.dot.
5722 * tests/output.at: Expect *.dot files, not *.vcg files.
5723
dd4bf078
PE
5724 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
5725 accommodates the 2006-10-08 change.
5726
efdd7421
PE
57272006-10-11 Bob Rossi <bob@brasko.net>
5728
5729 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
5730 (b4_yyssa, b4_yyerror_range): New macros.
5731 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
5732 (yypvarsinit): Remove init of removed fields.
5733 (yypushparse): Remove use of removed fields; use new macros instead.
5734
96a1981a
PE
57352006-10-11 Paul Eggert <eggert@cs.ucla.edu>
5736
5737 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
5738 in a push parser. Reindent slightly to match yacc.c better.
5739
57402006-10-11 Bob Rossi <bob@brasko.net>
5741
46356ea4
PE
5742 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
5743 yymsg_alloc fields.
5744 (yypvarsinit, yypushparse): Remove init of removed fields.
5745 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
96a1981a 5746
c1630a8b
PE
57472006-10-09 Paul Eggert <eggert@cs.ucla.edu>
5748
5749 * THANKS: Add Paolo Bonzini and Bob Rossi.
5750
90b9908d
PB
57512006-10-08 Paolo Bonzini <bonzini@gnu.org>
5752
5753 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
5754 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
5755 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
5756 b4_define_user_cde and uses): Remove.
5757 (b4_comment, b4_prefix, b4_sync_start): New.
5758 * data/bison.m4: New file, with most of the content removed from c.m4.
5759 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
5760 * src/output.c (output_skeleton): Pass bison.m4.
5761 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
5762 only if specified.
5763
cf806753
PE
57642006-10-05 Paul Eggert <eggert@cs.ucla.edu>
5765
5766 Fix test failure reported by Tom Lane in
5767 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
5768 and try to make such failures easier to catch in the future.
5769 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
5770 that's now the caller's responsibility.
5771 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
5772 Set yychar = YYEOF if it's negative.
5773 * tests/actions.at (yylex): Abort if asked to read past EOF.
5774 * tests/conflicts.at (yylex): Likewise.
5775 * tests/cxx-type.at (yylex): Likewise.
5776 * tests/glr-regression.at (yylex): Likewise.
5777 * tests/input.at (yylex): Likewise.
5778 * tests/regression.at (yylex): Likewise.
5779 * tests/torture.at (yylex): Likewise.
5780
0e2f006a
PE
57812006-10-01 Paul Eggert <eggert@cs.ucla.edu>
5782
5783 Fix problems with translating English-language diagnostics.
5784 * bootstrap: Fix bug introduced in recent bootstrap changes, with
5785 respect to bison-runtime pot generation. The YY_ stuff
5786 wasn't being captured.
5787 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
5788 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
5789 * runtime-po/POTFILES.in: Add data/push.c.
5790
e3ddc1e3
PE
57912006-09-29 Paul Eggert <eggert@cs.ucla.edu>
5792
5793 Merge bootstrap changes from coreutils.
5794
5795 2006-09-28 Jim Meyering <jim@meyering.net>
5796
5797 Automatically generated dependencies are important even
5798 when all of the sources in a directory come from gnulib.
5799 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
5800 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
5801
5802 2006-09-23 Jim Meyering <jim@meyering.net>
5803
5804 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
5805
5806 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5807
5808 * bootstrap: Add support for --force.
5809 (usage): New function. Describe usage less tersely.
5810 (CVS_only_file): New var.
5811
01e972b3
PE
58122006-09-21 Paul Eggert <eggert@cs.ucla.edu>
5813
5814 * data/push.c (YYPUSH_MORE): Make it an enum instead.
5815 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
5816 Adjust white space and comments to match GNU style better.
5817
c63d3e90
PE
58182006-09-20 Bob Rossi <bob@brasko.net>
5819
5820 * data/push.c (yyresult_get): Remove function.
5821 (YYPUSH_MORE): Add #define.
5822 (yypushparse): Modify return value.
5823
e70f46d1
PE
58242006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5825
5826 * stamp-h.in: Remove; no longer needed.
5827 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
5828 Remove config.h, config.hin, intl (no longer created).
5829 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
5830 stamp-h1.
5831
5832 Sync bootstrap from coreutils, as follows:
5833
5834 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
5835
5836 * bootstrap (symlink_to_gnulib): New function.
5837 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
5838 to copies-of-gnulib.
5839 (cp_mark_as_generated, slurp, gnulib_files):
5840 Avoid making a copy if it's the same as the old version.
5841 (gnulib_files): Add support for this variable (used by Bison).
5842
a92be413
PE
58432006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5844
5845 * src/getargs.c (usage): Rework to use conventions similar to
5846 coreutils, to make translation a bit easier and the code a bit
5847 smaller. Problem reported by Tim Van Holder.
5848
4f82b42a
PE
58492006-09-15 Paul Eggert <eggert@cs.ucla.edu>
5850
3b2942e6
PE
5851 Use some of gnulib's new modules, taken from coreutils.
5852
5853 * bootstrap: Sync from coreutils, except add support for gnulib_files.
5854 * bootstrap.conf: New file.
5855 (gnulib_modules): Add configmake, inttypes, unistd.
5856 (XGETTEXT_OPTIONS): Add complain, complain_at,
5857 fatal, fatal_at, warn, warn_at, unexpected_end.
5858 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
5859 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
5860 (gl_EARLY): Add.
5861 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
5862 (gl_INIT): Add
5863 (GNULIB_AUTOCONF_SNIPPET): Remove.
5864 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
5865 the pickiest.
5866 * lib/.cvsignore: Add inttypes_.h.
5867 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
5868 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
5869 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
5870 no-longer-necessary initializations.
5871 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
5872 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
5873 use the unistd module.
5874 * src/system.h: Likewise.
5875 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
5876 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
5877 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
5878 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
5879 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
5880 * src/system.h: Include inttypes.h unconditionally, now that we
5881 use the inttypes module. Don't bother to include stdint.h, since
5882 inttypes.h now does that for us.
5883 (LOCALEDIR): Remove, now that we use the configmake module.
5884 * src/getargs.c: Include configmake.h.
5885 * src/main.c: Likewise.
5886 * src/output.c: Likewise.
5887 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
5888 not from $abs_top_builddir, since config.h moved.
5889
5890
4f82b42a
PE
5891 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
5892 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
5893
5894 * src/parse-gram.y (symbol_declaration): Don't put statements
5895 before declarations; it's not portable to C89.
5896 * src/scan-code.l (handle_action_at): Likewise.
5897
5898 * src/scan-code.l: Always initialize braces_level; the old code
5899 left it uninitialized and therefore had undefined behavior.
5900
5901 Don't attempt to redefine 'assert', since it runs afoul of
5902 systems where standard headers (mistakenly) include <assert.h>.
5903 Instead, define and use our own alternative, called 'aver'.
5904 * src/reader.c: Don't include assert.h, since we no longer
5905 use assert.
5906 * src/scan-code.l: Likewise.
5907 * src/system.h (assert): Remove, replacing with....
5908 (aver): New function, taking a bool arg. All uses changed.
5909 * src/tables.c (pack_vector): Ensure that aver arg is bool,
5910 not merely an integer.
5911
31c10e38
PE
59122006-09-15 Bob Rossi <bob@brasko.net>
5913
e5926647
JD
5914 Add support for push parsing. Based on the original work of
5915 Odd Arild Olsen <oao@fibula.no>.
31c10e38
PE
5916 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
5917 * data/c.m4 (YYPUSH): New.
5918 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
e5926647 5919 * data/push.c: New file.
31c10e38
PE
5920 * src/getargs.c (push_parser): New var.
5921 * src/getargs.h (push_parser): New declaration.
5922 * src/output.c (prepare): Add macro insertion of `push_flag'.
5923 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
5924 (prologue_declaration): Parse %push-parser.
5925 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
5926 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
5927 list of removed lines from the traces observed.
5928 (AT_CHECK_CALC_LALR): Added push parser tests.
5929
fa7b79c0
PE
59302006-09-13 Paul Eggert <eggert@cs.ucla.edu>
5931
21fe08ca
PE
5932 * NEWS: Version 2.3a.
5933 * configure.ac (AC_INIT): Likewise.
5934
e8ec4d9b
PE
5935 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
5936 "#define YYSTYPE int" that caused "make maintainer-check" to fail
5937 due to header ordering dependencies. I don't know why the #define
5938 was there.
5939
fa7b79c0
PE
5940 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
5941 runtime cost when YYDEBUG is not defined, and so that some tests
5942 that used to fail now work. Problem and initial suggestion by
5943 Paolo Bonzini.
5944 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
5945 * data/glr.cc (b4_parser_class_name):
5946 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
5947 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
5948 (yydebug_) [YYDEBUG]: New member.
5949 (yycdebug_): Now defined only if YYDEBUG.
5950 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
5951 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
5952 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
5953 if YYYDEBUG.
5954 (debug_stream, set_debug_stream, debug_level, set_debug_level):
5955 Define only if YYDEBUG.
5956 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
5957 set_debug_level.
5958 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
5959 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
5960 AT_CHECK_CALC_GLR_CC that are working now.
5961
4ec13d60
PE
59622006-09-12 Paul Eggert <eggert@cs.ucla.edu>
5963
5964 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
5965 We don't need them in glr.cc, and glr.c defines them.
5966 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
5967 assumes that defining it to anything is the same as defining
5968 it to 1. Problem reported by Paolo Bonzini.
5969
8e1687ae
PE
59702006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
5971
5972 * data/c.m4 (b4_null, b4_case): Define.
5973 * src/output.c (prepare_symbols): Use b4_null.
5974 (user_actions_output): Use b4_case.
5975
3dc5e96b
PE
59762006-09-11 Paul Eggert <eggert@cs.ucla.edu>
5977
aef3da86
PE
5978 * data/glr.c (b4_shared_declarations): Put start-header first,
5979 before any #includes that we generate, so that feature-test
5980 macros work. Problem reported by Michael Deutschmann in
5981 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
5982 * data/lalr1.cc: Likewise.
5983 * doc/bison.texinfo (Prologue): Document that feature-test macros
5984 should be defined before any Bison declarations.
5985 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
5986 that depend on location.hh after, not before, Bison decls, since
5987 we now include location.hh after the first user prologue.
5988
3dc5e96b
PE
5989 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
5990 Sander Brandenburg in
5991 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
5992 Also, fix minor white space and comment issues.
aef3da86
PE
5993 (Prologue): Mention that it's better to define feature-test macros
5994 before Bison declarations. Problem reported by Michael Deutschmann.
5995
5996 * README-cvs: Fix typo: "&" should be "&&". Problem reported
5997 by Jim Meyering.
5998 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
5999 This adjusts to recent gnulib changes.
3dc5e96b 6000
b2a0b7ca
JD
60012006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
6002
6003 Finish implementation of per-type %destructor/%printer. Discussed
6004 starting at
6005 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
6006 and
6007 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
6008 * NEWS (2.3+): Add a description of this feature to the default
6009 %destructor/%printer description.
6010 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
6011 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
6012 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
6013 list node contains a semantic type.
6014 * src/symtab.c, src/symtab.h: Extend with a table that associates
6015 semantic types with their %destructor's and %printer's.
6016 (semantic_type_from_uniqstr, semantic_type_get,
6017 semantic_type_destructor_set, semantic_type_printer_set): New functions
6018 composing the public interface of that table.
6019 (symbol_destructor_get, symbol_destructor_location_get,
6020 symbol_printer_get, symbol_printer_location_get): If there's no
6021 per-symbol %destructor/%printer, look up the per-type before trying
6022 the default.
6023 * tests/actions.at (Per-type %printer and %destructor): New test case.
6024 * tests/input.at (Default %printer and %destructor redeclared):
6025 Extend to check that multiple occurrences of %symbol-default in a
6026 single %destructor/%printer declaration is an error.
6027 (Per-type %printer and %destructor redeclared, Unused values with
6028 per-type %destructor): New test cases.
6029
3be03b13
JD
60302006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
6031
6032 Require default %destructor/%printer to be declared using
6033 %symbol-default instead of an empty symbol list, and start working on
6034 new per-type %destructor/%printer. Discussed at
6035 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
6036 * NEWS (2.3+): Add %symbol-default to example.
6037 * bison.texinfo (Freeing Discarded Symbols): Likewise.
148d66d8 6038 (Table of Symbols): Add entry for %symbol-default.
3be03b13
JD
6039 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
6040 (generic_symlist, generic_symlist_item): New nonterminals for creating
6041 a list in which each item is a symbol, semantic type, or
6042 %symbol-default.
6043 (grammar_declaration): Use generic_symlist in %destructor and %printer
6044 declarations instead of symbols.1 or an empty list.
6045 (symbol_declaration, precedence_declaration, symbols.1): Update actions
6046 for changes to symbol_list.
6047 * src/reader.c: Update for changes to symbol_list.
6048 * src/scan-code.l: Likewise.
6049 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
6050 * src/symlist.c, src/symlist.h: Extend such that a list node may
6051 represent a semantic type or a %symbol-default in addition to just an
6052 ordinary symbol. Add switched functions for setting %destructor's and
6053 %printer's.
6054 * tests/actions.at, tests/input.at: Add %symbol-default to all default
6055 %destructor/%printer declarations.
6056
3508ce36
JD
60572006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
6058
6059 Whether the default %destructor/%printer applies to a particular symbol
6060 isn't a question of whether the user *declares* that symbol (in %token,
6061 for example). It's a question of whether the user by any means
6062 *defines* the symbol at all (by simply using a char token, for
6063 example). $end is defined by Bison whereas any other token with token
6064 number 0 is defined by the user. The error token is always defined by
6065 Bison regardless of whether the user declares it with %token, but we
6066 may one day let the user define error as a nonterminal instead.
6067 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
6068 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
6069 the meaning of "user-defined".
6070 * tests/actions.at (Default %printer and %destructor for user-declared
6071 end token): Rename to...
6072 (Default %printer and %destructor for user-defined end token): ...
6073 this.
6074
6075 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
6076 computation of whether to apply the default, don't maintain a list of
6077 every Bison-defined symbol. Instead, just check for a first character
6078 of '$', which a user symbol cannot have, and check for the error token.
6079
9350499c
JD
60802006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
6081
6082 Don't apply the default %destructor or %printer to the error token,
6083 $undefined, or $accept. This change fits the general rule that the
6084 default %destructor and %printer are only for user-declared symbols,
6085 and it solves several difficulties that are described in the new test
6086 cases listed below.
6087 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
6088 * tests/actions.at (Default %printer and %destructor are not for error
6089 or $undefined, Default %printer and %destructor are not for $accept):
6090 New test cases.
6091
4d7370cb
JD
60922006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
6093
6094 Allow %start after the first rule.
6095 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
6096 when parsing the first rule.
6097 (check_and_convert_grammar): Search for it here after all grammar
6098 declarations have been parsed. Skip midrules, which have dummy LHS
6099 nonterminals.
6100 * src/symtab.c (symbol_is_dummy): New function.
6101 * src/symtab.h (symbol_is_dummy): Declare it.
6102 * tests/input.at (%start after first rule): New test.
6103
6d0ef4ec
JD
61042006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
6105
6106 Redo some of the previous commit: add back the ability to use
6107 non-aliased/undeclared string literals since it might be useful to
6108 those declaring %token-table.
6109 * src/reader.c (check_and_convert_grammar): Undo changes in previous
6110 commit: don't worry about complaints from symbols_pack.
6111 * src/symtab.c (symbol_new, symbol_class_set,
6112 symbol_check_alias_consistency): Undo changes in previous commit: count
6113 each string literal as a new symbol and token, assign it a symbol
6114 number, and don't complain about non-aliased string literals.
6115 (symbols_pack): Since symbol_make_alias still does not decrement symbol
6116 and token counts but does still set aliased tokens to the same number,
6117 symbol_pack_processor now leaves empty slots in the symbols array.
6118 Remove those slots.
6119 * tests/regression.at (Undeclared string literal): Remove test case
6120 added in previous commit since non-aliased string literals are allowed
6121 again.
6122 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
6123 remove unnecessary string literal declarations.
6124 * tests/sets.at (Firsts): Likewise.
6125
965537bc
JD
61262006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
6127
6128 Don't allow an undeclared string literal, but allow a string literal to
6129 be used before its declaration.
6130 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
6131 symbols_pack complained.
6132 * src/symtab.c (symbol_new): Don't count a string literal as a new
6133 symbol.
6134 (symbol_class_set): Don't count a string literal as a new token, and
6135 don't assign it a symbol number since symbol_make_alias does that.
6136 (symbol_make_alias): It's not necessary to decrement the symbol and
6137 token counts anymore. Don't assume that an alias declaration occurs
6138 before any uses of the identifier or string, and thus don't assert that
6139 one of them has the highest symbol number so far.
6140 (symbol_check_alias_consistency): Complain if there's a string literal
6141 that wasn't declared as an alias.
6142 (symbols_pack): Bail if symbol_check_alias_consistency failed since
6143 symbol_pack asserts that every token has been assigned a symbol number
6144 although undeclared string literals have not.
6145 * tests/regression.at (String alias declared after use, Undeclared
6d0ef4ec 6146 string literal): New test cases.
965537bc
JD
6147 (Characters Escapes, Web2c Actions): Declare string literals as
6148 aliases.
6149 * tests/sets.at (Firsts): Likewise.
6150
47aee066
JD
61512006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
6152
6153 In the grammar scanner, STRING_FINISH unclosed constructs and return
6154 them to the parser in order to improve error messages.
6155 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
6156 SC_BRACED_CODE, SC_PROLOGUE): Implement.
6157 * tests/input.at (Unclosed constructs): New test case.
6158 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
6159 seen.
6160
6161 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
6162 unused global.
6163
1f6b3679
JD
61642006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
6165
6166 Handle string aliases for character tokens correctly.
6167 * src/symtab.c (symbol_user_token_number_set): If the token has an
6168 alias, check and set its alias's user token number instead of its own,
6169 which is set to indicate the alias. Previously, every occurrence of
6170 the character token in the grammar overwrote that alias indicator with
6171 the character code.
6172 * tests/input.at (String aliases for character tokens): New test.
6173
219741d8
JD
61742006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
6175
6176 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
6177
11daa4e7
PE
61782006-08-11 Paul Eggert <eggert@cs.ucla.edu>
6179
6180 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
6181 to prevent failures when building on older platforms.
6182 Check for autopoint failure.
6183 Set XGETTEXT_OPTIONS to values that check for C format strings,
6184 so that translators are warned about them (this also helps
6185 prevent core dumps).
6186
6187 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
6188 function, since it simplifies our code a bit.
6189
6190 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
6191 rather than -W, so we don't get bogus warnings about sign comparisons.
6192 Add -Wpointer-arith, since that warning is useful (it reports code
6193 that does not conform to C89 and that some compilers reject).
6194 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
6195 since it's no longer needed.
6196
f9bfc42a
JD
61972006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
6198
6199 Clean up scanners a bit.
6200 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
6201 definitions so gcc won't warn when obstack_for_string is unused.
6202 * src/scan-code.l: config.h and system.h are already #include'd by
6203 scan-code-c.c, so get rid of them here.
6204 * src/scan-gram.l: Likewise.
6205 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
6206 definitions rather than duplicating the rest of it.
6207 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
6208
06e8700a
JD
62092006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
6210
6211 Suppress signed/unsigned comparison warnings for yycheck.
6212 * data/c.m4 (b4_safest_int_type): New macro.
6213 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
6214 a signed int type, cast it to b4_safest_int_type first.
6215 * data/yacc.c: Likewise.
6216 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
6217 also overwritten.
6218
9c437126
PE
62192006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
6220
6221 * doc/bison.texinfo: Fix some typos.
6222
284d8a13
PE
62232006-08-02 Paul Eggert <eggert@cs.ucla.edu>
6224
6225 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
6226 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
6227
6228 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
6229 the latest gnulib does this a different way.
6230 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
6231 translation was patched, so stop omitting it.
6232
ec5479ce
JD
62332006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
6234
6235 Enable declaration of default %printer/%destructor. Make the parser
6236 use these for all user-declared grammar symbols for which the user does
6237 not declare a specific %printer/%destructor. Thus, the parser uses it
6238 for token 0 if the user declares it but not if Bison generates it as
6239 $end. Discussed starting at
6240 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
6241 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
6242 and
6243 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
6244 * NEWS (2.3+): Mention.
6245 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
6246 declare a %destructor for a mid-rule's semantic value. It's just
6247 impossible to declare one specific to it.
6248 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
6249 code. Describe default %destructor form.
6250 * src/parse-gram.y (grammar_declaration): Parse default
6251 %printer/%destructor declarations.
6252 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
6253 and symbol_destructor_location_get rather than accessing the destructor
6254 and destructor_location members of struct symbol.
6255 (symbol_printers_output): Likewise but for %printer's.
6256 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
6257 again.
6258 * src/symtab.c (default_destructor, default_destructor_location,
6259 default_printer, default_printer_location): New static global
6260 variables to record the default %destructor and %printer.
6261 (symbol_destructor_get, symbol_destructor_location_get,
6262 symbol_printer_get, symbol_printer_location_get): New functions to
6263 compute the appropriate %destructor and %printer for a symbol.
6264 (default_destructor_set, default_printer_set): New functions to set the
6265 default %destructor and %printer.
6266 * src/symtab.h: Prototype all those new functions.
6267 * tests/actions.at (Default %printer and %destructor): New test to
6268 check that the right %printer and %destructor are called, that they're
6269 not called for $end, and that $$ and @$ work correctly.
6270 (Default %printer and %destructor for user-declared end token): New
6271 test to check that the default %printer and %destructor are called for
6272 a user-declared end token.
6273 * tests/input.at (Default %printer and %destructor redeclared, Unused
6274 values with default %destructor): New tests to check related grammar
6275 warnings and errors.
6276
868d2d96
JD
62772006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
6278
6279 Clean up handling of %destructor for the end token (token 0).
6280 Discussed starting at
6281 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
6282 and
6283 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
6284
6285 Make the skeletons consistent in how they pop the end token and invoke
6286 its %destructor.
6287 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
6288 state, which has token number 0, since this would invoke the
6289 %destructor for the end token.
6290 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
6291 until after shifting the end token, or else it won't be popped.
6292 * data/yacc.c (yyparse): Likewise.
6293
6294 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
6295 it's the end token. Upon termination, destroy an unshifted lookahead
6296 even when it's the end token.
6297 * data/lalr1.cc (yy::parser::parse): Likewise.
6298 * data/yacc.c (yyparse): Likewise.
6299
6300 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
6301 value warnings for the end token when the user gives the end token a
6302 %destructor.
6303
6304 * tests/actions.at (Printers and Destructors): Test all the above.
6305
62a9592d
PE
63062006-07-24 Paul Eggert <eggert@cs.ucla.edu>
6307
6308 Update to latest gnulib and gettext versions.
6309 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
6310 Add fopen-safer.
6311 (gnulib_files): Add m4/warning.m4. Don't worry about files
6312 overwritten by autopoint.
6313 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
6314 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
6315 rejects them.
6316 Don't use autoreconf; instead, invoke autopoint etc. by hand,
6317 so that we can remove the intl files at a better time.
6318 (intl_files_to_remove): Remove aclocal.m4, since it gets
6319 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
6320 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
6321 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
6322 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
6323 Remove datarootdir hack; no longer needed.
6324 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
6325 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
6326 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
6327 strdup.h.
6328 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
6329 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
6330
10d6970f
PE
63312006-07-20 Paul Eggert <eggert@cs.ucla.edu>
6332
6333 * bootstrap: Adjust to today's change to gnulib-tool by invoking
6334 it with --assume-autoconf='latest-stable'.
6335
50a33993
JD
63362006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
6337
6338 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
6339 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
6340 YYSTYPE' and `{'.
6341 * src/muscle_tab.h (muscle_grow): Replace the header comments with
6342 those from muscle_tab.c since the old ones are misleading.
6343
2ce4ed68
AD
63442006-07-13 Akim Demaille <akim@epita.fr>
6345
6346 Support %define "KEY" {VALUE}.
6347 * src/scan-code.h, src/scan-code.l (translate_action)
6348 (translate_rule_action, translate_symbol_action, translate_code):
6349 Return char *, not const char *.
6350 * src/parse-gram.y (declaration): Rename as...
6351 (prologue_declaration): this.
6352 (string_content): Remove this nonterminal, use STRING.
6353 (braceless, content, content.opt): New nonterminal.
6354 Use them.
6355 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
6356 as value.
6357 * src/scan-gram.l (getargs.h): Don't include it.
6358
db7e5eb5
PE
63592006-07-12 Paul Eggert <eggert@cs.ucla.edu>
6360
6361 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
6362 rather than a for-loop that declares a local bool variable. This
6363 should work around a compatibility problem with a Cray x1e C++
6364 compiler reported by Hung Nguyen in
6365 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
6366 The for-loop was introduced in the 2004-11-17 change but I don't
6367 know why it was needed.
6368
a5d80ba5
AD
63692006-07-12 Akim Demaille <akim@epita.fr>
6370
6371 * data/c.m4: Comment changes.
6372
23eb2a69
AD
63732006-07-10 Akim Demaille <akim@lrde.epita.fr>
6374
6375 * src/complain.c (error_message, ERROR_MESSAGE): New.
6376 To factor...
6377 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
6378 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
6379
ddc8ede1
PE
63802006-07-09 Paul Eggert <eggert@cs.ucla.edu>
6381
6382 * NEWS: Instead of %union, you can define and use your own union type
6383 YYSTYPE if your grammar contains at least one <type> tag.
6384 Your YYSTYPE need not be a macro; it can be a typedef.
6385 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
6386 (Union Decl, Decl Summary): Document this.
6387 * data/glr.c (YYSTYPE): Implement this.
6388 * data/glr.cc (YYSTYPE): Likewise.
6389 * data/lalr1.cc (YYSTYPE): Likewise.
6390 * data/yacc.c (YYSTYPE): Likewise.
6391 * src/output.c (prepare): Output tag_seen_flag.
6392 * src/parse-gram.y (declaration, grammar_declaration):
6393 Use 'union_seen' rather than 'typed' to determine whether
6394 %union has been seen, since grammars can now be typed without
6395 %union.
6396 (symbol_declaration, type.opt, symbol_def):
6397 Keep track of whether a tag has been seen.
6398 * src/reader.c (union_seen, tag_seen): New vars.
6399 (typed): remove.
6400 * src/reader.h (union_seen, tag_seen, typed): Likewise.
6401 * src/scan-code.l (untyped_var_seen): New variable.
6402 (handle_action_dollar): Adjust to above changes.
6403 (handle_action_dollar, handle_action_at):
6404 Improve overflow checking for outlandish numbers.
6405 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
6406 avoid new diagnostics generated by above changes.
6407 * tests/regression.at (YYSTYPE typedef): Add test to check
6408 for type tags without %union.
6409
6410 * src/symlist.c (symbol_list_length): Return int, not unsigned
6411 int, since callers expect int. This may need to get revisited
6412 once we have proper integer overflow checking.
6413
6414 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
6415 object is now static.
6416
6417 * src/getargs.c (flags_argmatch): Return void, not int,
6418 to pacify ./configure --enable-gcc-warnings.
6419
6420 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
6421 since last_string is already defined to FLEX_PREFIX (last_string).
6422
7b42569e
AD
64232006-07-09 Akim Demaille <akim@lrde.epita.fr>
6424
6425 Implement --warnings/-W.
6426 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
6427 replaced by...
6428 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
6429 Adjust callers.
6430 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
6431 (warnings_args, warnings_types): New.
6432 (getargs, short_options, long_options): Accept -W/--warnings.
6433 Sort the options by alphabetical order, upper case letter right
6434 before its lower case.
6435
3b452f4e
JD
64362006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
6437
6438 Change %merge result type clash warnings to errors. Discussed at
6439 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
6440 * src/reader.c (record_merge_function_type): Use complain_at.
6441 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6442 declared later): Update test case results.
6443
b8a41559
AD
64442006-07-09 Akim Demaille <akim@lrde.epita.fr>
6445
6446 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
6447 to be in alphabetical order.
6448 (trace_args): Spelling fixes.
6449
cd9e1ba2
PE
64502006-07-09 Paul Eggert <eggert@cs.ucla.edu>
6451
6452 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
6453 so they don't collide with user-defined macros.
6454 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
6455 this was never guaranteed, and now that we're using gnulib stdint,
6456 which defines int_fast16_t to long int, the problem is exposed.
6457
cb48f191
PE
64582006-07-08 Paul Eggert <eggert@cs.ucla.edu>
6459
b8445a15
PE
6460 * data/c.m4 (b4_basename): Simplify a bit, since we don't
6461 need the full POSIX semantics (and weren't implementing them
6462 anyway).
6463
cb48f191
PE
6464 Adjust to Autoconf 2.60 and today's gnulib.
6465 * bootstrap (gnulib_modules): Add stdint.
6466 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
6467 no longer copies it.
6468 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
6469 since stdint needs the former and wcwidth (which is now required
6470 by mbswidth) needs the latter.
6471 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
6472 work around a compatibility glitch between gettext 0.14.6 and
6473 Autoconf 2.60.
6474 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
6475 Do not check for uintptr_t, since new stdint module does the right
6476 thing.
6477 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
6478 Add stdint.h, stdint_.h, wcwidth.h.
6479 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
6480 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
6481 stdint.m4, wchar_t.m4, wcwidth.m4.
6482 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
6483 usual order for ../lib/*.h files.
6484 (file_name_split): Use last_component, not base_name, to adjust
6485 to gnulib changes.
6486 * src/parse-gram.h: Include <strverscmp.h> in the usual order
6487 for ../lib/*.h files.
6488 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
6489 Define unconditionally, since we now assume the stdint module.
6490 * src/scan-skel.l: Include <dirname.h>.
6491 (BASE_QPUTS): Use last_component, not base_name.
6492 * src/system.h: Include <unlocked-io.h> in the usual order
6493 for ../lib/*.h files. Include <stdint.h> unconditionally,
6494 since we now use the stdint module.
6495 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
6496 HAVE_UINTPTR_T, since we now use the stdint module.
6497 (base_name): Remove decl, since files now include <dirname.h>
6498 to get the decl.
6499
cd48d21d
AD
65002006-07-08 Akim Demaille <akim@lrde.epita.fr>
6501
6502 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
6503 New, default to 1.
6504 * data/yacc.c, data/glr.c, data/location.cc: Use them.
6505 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
6506 default.
6507 * tests/calc.at: Adjust.
6508
8ec0a172
AD
65092006-07-08 Akim Demaille <akim@lrde.epita.fr>
6510
b8445a15 6511 * data/c.m4 (b4_basename): New.
8ec0a172
AD
6512 (b4_syncline): Also output the location of its invocation (from
6513 the skeleton).
6514 (b4_user_action, b4_define_user_action, b4_user_actions)
6515 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
6516 (b4_user_stype): New.
6517 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
6518
4a678af8
JD
65192006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
6520
6521 In the grammar file, the first column is 1 not 0 on the first line as
6522 on every other line.
6523 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
6524 * tests/input.at (Torturing the Scanner): Update output.
6525
6526 * src/scan-gram.l (scanner_cursor): Declare it static.
6527
dd60572a
JD
65282006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
6529
6530 In warnings, say "previous declaration" rather than "first
6531 declaration".
6532 * src/symtab.c (redeclaration): Do that here.
6533 * src/reader.c (record_merge_function_type): In the case of a result
6534 type clash, report the previous declaration rather than the very first
6535 one in the grammar file.
6536 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6537 declared later): Add a third declaration to check this behavior.
6538 * tests/input.at (Incompatible Aliases): Update output.
6539
2073e1b6
AD
65402006-06-27 Akim Demaille <akim@epita.fr>
6541
6542 * doc/Doxyfile.in: New.
6543 * doc/Makefile.am: Use it.
6544 * src/lalr.h, src/symtab.h: Initial doxygenation.
6545
8ee5b538
JD
65462006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6547
6548 Don't miss %merge result type warnings just because the LHS types are
fab044e6
JD
6549 declared after the %merge. This continues the effort of the previous
6550 patch.
8ee5b538
JD
6551 * src/reader.c (get_merge_function): Don't set the merger type yet.
6552 (record_merge_function_type): New function for setting the merger type
6553 and checking for clashes.
6554 (grammar_current_rule_merge_set): Set the location of the %merge for
6555 the current rule.
6556 (packgram): Invoke record_merge_function_type for each rule now that
6557 all symbol type declarations have been parsed.
6558 * src/reader.h (merger_list.type_declaration_location): New member
6559 storing the location of the first %merge from which the type for this
6560 merging function was derived.
6561 * src/symlist.h (symbol_list.merger_declaration_location): New member
6562 storing the location of a rule's %merge, if any.
6563 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6564 declared later): New test to catch the error fixed by the above patch.
6565
ffa4ba3a
JD
65662006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6567
6568 Get action warnings (grammar_rule_check) right even when symbol
fab044e6
JD
6569 declarations appear after the rules. Discussed at
6570 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
6571 and
6572 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
6573 Don't mistake the type of $$ in a midrule to be that of its parent
6574 rule's $$.
ffa4ba3a
JD
6575 * src/reader.c (grammar_current_rule_end): Don't invoke
6576 grammar_rule_check yet since not all symbol declarations may have been
6577 parsed yet.
6578 (grammar_midrule_action): Likewise.
6579 Don't record whether the midrule's $$ has been used yet since actions
6580 haven't been translated yet.
6581 Record the midrule's parent rule and its RHS index within the parent
6582 rule.
6583 (grammar_current_rule_action_append): Don't translate the action yet
6584 since not all symbol declarations may have been parsed yet and, thus,
6585 warnings about types for $$, $n, @$, and @n can't be reported yet.
6586 (packgram): Translate the action and invoke grammar_rule_check now that
6587 all symbol declarations have been parsed.
6588 * src/scan-code.l (handle_action_dollar): Now that this is invoked
6589 after parsing the entire grammar file, the symbol list here in the case
6590 of a midrule is actually the midrule's empty RHS, so reference its
6591 parent rule's RHS where necessary.
6592 On the other hand, now that you can already know it's a midrule, you
6593 aren't forced to think $$ has the same type as its parent rule's $$.
6594 (handle_action_at): In the case of a midrule, reference the parent rule
6595 where necessary.
6596 * src/symlist.c (symbol_list_new): Initialize new midrule-related
6597 members.
6598 (symbol_list_length): Now that this is invoked after all rules have
6599 been parsed, a NULL symbol (rather than a NULL symbol list node)
6600 terminates a rule. symbol_list_print already does this correctly.
6601 * src/symlist.h (symbol_list.midrule_parent_rule,
6602 symbol_list.midrule_parent_rhs_index): New members so that midrules can
6603 remember their relationships with their parents.
6604 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
6605 fixed by the above patch.
6606 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
6607 implementing...
6608 (Unused values): ... this old test case and...
6609 (Unused values before symbol declarations): ... this new test case.
6610 This one is the same as `Unused values' except that all symbol
6611 declarations appear after the rules in order to catch the rest of the
6612 errors fixed by the above patch.
6613
e256e17f
JD
66142006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6615
300a1930
JD
6616 More cleanup.
6617 * src/reader.c (current_rule): Declare it static since it's no longer
6618 used outside this file.
6619 (grammar_current_rule_action_append): Remove redundant arguments from
6620 translate_rule_action invocation.
6621 * src/reader.h (current_rule): Remove this unused extern.
6622 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
6623 * src/scan-code.l (translate_rule_action): Likewise.
e256e17f 6624
381ecb06
JD
66252006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
6626
6627 Clean up yesterday's patch.
6628 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
6629 to...
6630 * src/reader.c (grammar_current_rule_action_append): ... here for
6631 consistency with grammar_current_rule_symbol_append.
6632 * tests/regression.at (Braced code in declaration in rules section):
6633 Make yyerror and yylex static as usual.
6634
4210cd0b
JD
66352006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
6636
6637 Fix bug that mistakes braced code in a declaration in the rules section
6638 to be a rule action. Mentioned at
6639 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
6640 * src/scan-gram.l: Move midrule action detection from the start of the
6641 scanning of any braced code to...
6642 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
6643 action. For readability, use $2 and @2 rather than the equivalent
6644 global variables.
6645 * tests/regression.at (Braced code in declaration in rules section):
6646 New test to catch the error fixed by the above patch.
6647
6648 Work on code readability some.
6649 * src/scan-code.l (current_rule): Get rid of this misleading and
6650 redundant declaration: it's actually extern'ed in reader.h.
6651 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
6652 translate_action): Add a rule argument and use it instead of the global
6653 current_rule.
6654 (translate_rule_action): This already receives current_rule through an
6655 argument, so pass it on to translate_action instead of assigning
6656 current_rule to current_rule.
6657 (translate_symbol_action, translate_code): Pass rule = NULL to
6658 translate_action.
6659
34f98f46
JD
66602006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
6661
6662 Rename %before-definitions to %start-header and %after-definitions to
6663 %end-header. Don't use these declarations to separate pre-prologue
6664 blocks from post-prologue blocks. Add new order-independent
6665 declarations %before-header and %after-header as alternatives to the
6666 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
6667 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
6668 * NEWS (2.3+): Update for these changes.
6669 * data/glr.c (b4_before_definitions): Update to...
6670 (b4_start_header): ... this.
6671 (b4_after_definitions): Update to...
6672 (b4_end_header): ... this.
6673 * data/glr.cc: Likewise.
6674 * data/lalr1.cc: Likewise.
6675 * data/yacc.c: Likewise.
6676 * doc/bison.texinfo (The prologue): Update names, and replace remaining
6677 prologue blocks with %*-header declarations.
6678 (Calc++ Parser): Likewise.
91661ebb 6679 (Decl Summary): Update names.
148d66d8 6680 (Table of Symbols): Update description.
34f98f46
JD
6681 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
6682 (PERCENT_END_HEADER): ... this.
6683 (PERCENT_BEFORE_DEFINITIONS): Update to...
6684 (PERCENT_START_HEADER): ... this.
6685 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
6686 (declaration): Update token names and m4 macro names.
6687 When parsing %end-header and %start-header, invoke translate_code
6688 before muscle_code_grow, and no longer set global booleans to remember
6689 whether these declarations have been seen.
6690 Parse new %after-header and %before-header.
6691 * src/reader.c (before_definitions, after_definitions): Remove.
6692 (prologue_augment): Accept a new bool argument to specify whether to
6693 augment the pre-prologue or post-prologue.
6694 * src/reader.h (before_definitions, after_definitions): Remove these
6695 extern's.
6696 (prologue_augment): Add new bool argument.
6697 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
6698 (PERCENT_END_HEADER): ... this.
6699 (PERCENT_BEFORE_DEFINITIONS): Update to...
6700 (PERCENT_START_HEADER): ... this.
6701 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
6702 * tests/actions.at (Printers and Destructors): Update names.
6703
31b2b07e
JD
67042006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
6705
6706 Add comparison operators for C++ location classes. Discussed at
6707 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
6708 * data/c++.m4 (b4_define_location_comparison): New boolean %define
6709 declaration indicating whether filename_type has an operator==. If
6710 filename_type is `std::string', it defaults to `1', `0' otherwise.
6711 * data/location.cc: Iff b4_define_location_comparison is `1', add
6712 operator== and operator!= for class position and for class location.
6713
6714 Some minor fixes.
6715 * src/scan-action.l: Remove unused file.
6716 * src/symtab.c (symbol_printer_set): Use printer_location not
6717 destructor_location.
6718 * src/symtab.h (struct symbol): Replace incorrect source comment for
6719 printer members.
6720 * tests/input.at (Incompatible Aliases): Update output with correct
6721 printer location.
6722
9bc0dd67
JD
67232006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
6724
6725 Don't put the pre-prologue in the header file. For the yacc.c code
6726 file and the glr.c header and code files, move the pre-prologue before
6727 the token definitions. Add new %before-definitions and
6728 %after-definitions to declare code that will go in both the header file
6729 and code file. Discussed at
6730 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
6731 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
6732 and
6733 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
6734 * NEWS (2.3+): Describe these changes.
6735 * data/glr.c (b4_pre_prologue): Move from within to before...
6736 (b4_shared_declarations): ... this.
6737 Add new b4_before_definitions before b4_token_enums.
6738 Add new b4_after_definitions at the end.
6739 * data/glr.cc (b4_pre_prologue): Replace with...
6740 (b4_before_definitions): ... this in the header file.
6741 (b4_after_definitions): New near the end of the header file.
6742 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
6743 code file right before including the header file.
6744 (b4_before_definitions): New in the previous position of
6745 b4_pre_prologue in the header file.
6746 (b4_after_definitions): New near the end of the header file.
6747 * data/yacc.c: Clean up some m4 quoting especially in the header file.
6748 (b4_token_enums_defines): In the code file, move to right before
6749 YYSTYPE for consistency with the header file.
6750 (b4_before_definitions): New right before b4_token_enums_defines in
6751 both the header and code file.
6752 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
6753 header and code file.
6754 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
6755 of prologues for %union dependencies.
91661ebb
JD
6756 (Decl Summary): In %defines description, mention the effect of
6757 %before-definitions and %after-definitions on the header file.
9bc0dd67
JD
6758 (Calc++ Parser): Forward declare driver in a %before-definitions rather
6759 than in the pre-prologue so that make check succeeds.
148d66d8 6760 (Table of Symbols): Add entries for %before-definitions and
9bc0dd67
JD
6761 %after-definitions.
6762 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
6763 %before-definitions.
6764 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
6765 (declaration): Parse those declarations and append to
6766 b4_before_definitions and b4_after_definitions, respectively.
6767 * src/reader.c (before_definitions, after_definitions): New bools to
6768 track whether those declarations have been seen.
6769 (prologue_augment): Add to the post-prologue if %union,
6770 %before-definitions, or %after-definitions has been seen.
6771 * src/reader.h (before_definitions, after_definitions): New extern's.
6772 * src/scan-gram.l: Scan the new declarations.
6773 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
6774 prologue block in a %before-definitions or a %after-definitions based
6775 on whether the %union is declared.
6776 * tests/regression.at (Early token definitions with --yacc, Early token
6777 definitions without --yacc): Move tests for token definitions into the
6778 post-prologue since token names are no longer defined in the
6779 pre-prologue.
6780
203b9274
AD
67812006-06-20 Akim Demaille <akim@epita.fr>
6782
6783 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
6784 (symbol_get): Use it.
6785 * src/parse-gram.y: Use it.
6786
a7ee59cf
JD
67872006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
6788
6789 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
6790 build succeeds when configured with --enable-gcc-warnings.
6791
5a2baae7
PE
67922006-06-19 Paul Eggert <eggert@cs.ucla.edu>
6793
33ad1a9c
PE
6794 * src/parse-gram.y (char_name): New function.
6795 (CHAR, STRING, string_content): For %printer, properly escape.
6796 (ID): Prefer fputs to fprintf.
6797 (id): Reindent to be consistent with other rules.
6798 Properly quote char.
6799
5a2baae7
PE
6800 The Translation Project changed its way of publishing translations
6801 to maintainers. I haven't received any responses to my request
6802 for supporting the old way, or for documenting the new way. I
6803 have modified 'bootstrap' to use screen scraping
6804 (in this case, HTML scraping). This is unreliable and inelegant,
6805 but I don't see any better way. Yuck.
6806 * bootstrap (TP_URL, WGET_COMMAND): New vars.
6807 (get_translations): New function, which uses HTML scraping to
6808 deduce locations of latest translations.
6809 Use this function to grab both bison and bison-runtime .po files.
6810 Don't bother priming the pump for the runtime-po domain any more,
6811 as it's now translated better than bison is.
6812
58d7a1a1
AD
68132006-06-19 Akim Demaille <akim@epita.fr>
6814
6815 * src/scan-gram.l: No longer "parse" things after `%union' until
6816 `{'. Rather, return a single "%union" token.
6817 No longer make symbols: return strings, and leave the conversion
6818 to symbols to the parser.
6819 (SC_PRE_CODE, token_type): Remove.
6820 * src/parse-gram.y (%union): New field `character'.
6821 Sort tokens.
6822 (CHAR): New token.
6823 (ID, ID_COLON): Now that the scanner no longer makes them
6824 identifiers, adjust all uses to invoke symbol_get.
6825 (id_colon): New, wraps the conversion from string to symbol.
6826 (%union): Accept a possible union_name.
6827 (symbol): Now can be a char.
6828 * data/c.m4 (b4_union_name): Leave a default value.
6829 * data/glr.c, data/yacc.c: Use it.
6830
b931235e
JD
68312006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
6832
6833 For associating token numbers with token names for "yacc.c", don't use
6834 #define statements unless `--yacc' is specified; always use enum
6835 yytokentype. Most important discussions start at:
6836 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
6837 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
6838 and
6839 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
6840 * NEWS (2.3+): Mention.
6841 * data/c.m4 (b4_yacc_if): New.
6842 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
6843 token #define's.
6844 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
6845 on token name definitions.
6846 * src/getargs.c (usage): Capitalize `Yacc' in English.
6847 * src/output.c (prepare): Define b4_yacc_flag.
6848 * tests/regression.at (Early token definitions): Test that tokens names
6849 are defined before the pre-prologue not just before the post-prologue.
6850 Remove this test case and copy to...
6851 (Early token definitions with --yacc): ... this to test #define's.
6852 (Early token definitions without --yacc): ... and this to test enums.
6853
9e6e7ed2
PE
68542006-06-11 Paul Eggert <eggert@cs.ucla.edu>
6855
6856 * NEWS: Reword the post-2.3 change to not be so optimistic about
6857 removing the old "look-ahead" spelling.
6858 Update previous look-ahead/lookahead change reports.
6859 * REFERENCES: look-ahead -> lookahead (since that's
6860 what he actually wrote).
6861 * doc/refcard.tex: look ahead -> lookahead,
6862 look-ahead -> lookahead
6863
742e4900
JD
68642006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
6865
6866 For consistency, use `lookahead' instead of `look-ahead' or
6867 `look_ahead'. Discussed starting at
6868 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
6869 and then at
6870 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
6871 * NEWS: For the next release, note the change to `--report'.
6872 * TODO, doc/bison.1: Update English.
6873 * doc/bison.texinfo: Update English.
6874 (Understanding Your Parser, Bison Options): Document as
6875 `--report=lookahead' rather than `--report=look-ahead'.
6876 * src/conflicts.c: Update English in comments.
6877 (lookahead_set): Rename from look_ahead_set.
6878 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
6879 (resolve_sr_conflict): Rename local look_ahead_tokens to
6880 lookahead_tokens, and update other uses.
6881 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
6882 count_rr_conflicts, conflicts_free): Update uses.
6883 * src/getargs.c (report_args): Move "lookahead" before alternate
6884 spellings.
6885 (report_types): Update uses.
6886 (usage): For `--report' usage description, state `lookahead' spelling
6887 rather than `look-ahead'.
6888 * src/getargs.h (report.report_lookahead_tokens): Rename from
6889 report_look_ahead_tokens.
6890 * src/lalr.c: Update English in comments.
6891 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
6892 (state_lookahead_tokens_count): Rename from
6893 state_look_ahead_tokens_count.
6894 Rename local n_look_ahead_tokens to n_lookahead_tokens.
6895 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
6896 Rename local n_look_ahead_tokens to n_lookahead_tokens.
6897 Update other uses.
6898 Update English in output.
6899 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
6900 * src/print.c: Update English in comments.
6901 (lookahead_set): Rename from look_ahead_set.
6902 (print_reduction): Rename argument lookahead_token from
6903 look_ahead_token.
6904 (print_core, state_default_rule, print_reductions, print_results):
6905 Update uses.
6906 * src/print_graph.c: Update English in comments.
6907 (print_core): Update uses.
6908 * src/state.c: Update English in comments.
6909 (reductions_new): Update uses.
6910 (state_rule_lookahead_tokens_print): Rename from
6911 state_rule_look_ahead_tokens_print, and update other uses.
6912 * src/state.h: Update English in comments.
6913 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
6914 (state_rule_lookahead_tokens_print): Rename from
6915 state_rule_look_ahead_tokens_print.
6916 * src/tables.c: Update English in comments.
6917 (conflict_row, action_row): Update uses.
6918 * tests/glr-regression.at
6919 (Incorrect lookahead during deterministic GLR,
6920 Incorrect lookahead during nondeterministic GLR): Rename
6921 print_look_ahead to print_lookahead.
6922 * tests/torture.at: Update English in comments.
6923 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
6924 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
6925 (Many lookahead tokens): Update uses.
6926 * data/glr.c: Update English in comments.
6927 * lalr1.cc: Likewise.
6928 * yacc.c: Likewise.
6929 * src/conflicts.h: Likewise.
6930 * src/lalr.h: Likewise.
6931 * src/main.c: Likewise.
6932 * src/output.c: Likewise.
6933 * src/parse-gram.c: Likewise.
6934 * src/tables.h: Likewise.
6935 * tests/calc.at: Likewise.
6936
3c40d0b5
JD
69372006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
6938
6939 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
6940
5d278082
PE
69412006-06-07 Paul Eggert <eggert@cs.ucla.edu>
6942
6943 * TODO: Add request from Nelson H. F. Beebe to be able to install
6944 Bison without installing the yacc script.
6945
9e668899
JD
69462006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
6947
6948 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
6949 and yytext if they're already #define'd.
6950 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
6951 * src/scan-code-c.c: ... here.
6952 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
6953 <config.h>.
6954
0c8e079f
JD
69552006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
6956
6957 Get Bison to build again when configured with --enable-gcc-warnings.
6958 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
6959 missing #include's.
6960 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
6961 loc argument as it shadows a global.
6962 * src/scan-gram.l: Remove stray comma that prevents boundary_set
6963 invocation.
6964
6965 * src/.cvsignore: Add scan-code.c.
6966
2346344a
AD
69672006-06-07 Akim Demaille <akim@epita.fr>
6968
6969 * src/scan-gram.l: Move the "add a trailing ; to actions" code
6970 to...
6971 * src/scan-code.l: here.
6972 * tests/input.at (Torturing the Scanner): Fix another location
6973 error.
6974
4862bdfd
AD
69752006-06-07 Akim Demaille <akim@epita.fr>
6976
6977 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
6978
e9071366
AD
69792006-06-06 Akim Demaille <akim@epita.fr>
6980
6981 Extract the parsing of user actions from the grammar scanner.
6982 As a consequence, the relation between the grammar scanner and
6983 parser is much simpler. We can also split "composite tokens" back
6984 into simple tokens.
6985 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
6986 * src/scan-gram.l (add_column_width, adjust_location): Move to and
6987 rename as...
6988 * src/location.h, src/location.c (add_column_width)
6989 (location_compute): these.
6990 Fix the column count: the initial column is 0.
6991 (location_print): Be robust to ending column being 0.
6992 * src/location.h (boundary_set): New.
6993 * src/main.c: Adjust to scanner_free being renamed as
6994 gram_scanner_free.
6995 * src/output.c: Include scan-code.h.
6996 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
6997 Use boundary_set.
6998 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
6999 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
7000 which is now, again, a separate token.
7001 Adjust all dependencies.
7002 Whereever actions with $ and @ are used, use translate_code.
7003 (action): Remove this nonterminal which is now useless.
7004 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
7005 (grammar_current_rule_action_append): Use translate_code.
7006 (packgram): Bound check ruleno, itemno, and rule_length.
7007 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
7008 (last_string, last_braced_code_loc, max_left_semantic_context)
7009 (scanner_initialize, scanner_free, scanner_last_string_free)
7010 (gram_out, gram_lineno, YY_DECL_): Move to...
7011 * src/scan-gram.h: this new file.
7012 (YY_DECL): Rename as...
7013 (GRAM_DECL): this.
7014 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
7015 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
7016 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
7017 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
7018 Move these declarations, and...
7019 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
7020 these to...
7021 * src/flex-scanner.h: this new file.
7022 * src/scan-gram.l (rule_length, rule_length_overflow)
7023 (increment_rule_length): Remove.
7024 (last_braced_code_loc): Rename as...
7025 (gram_last_braced_code_loc): this.
7026 Adjust to the changes of the parser.
7027 Move all the handling of $ and @ into...
7028 * src/scan-code.l: here.
7029 * src/scan-gram.l (handle_dollar, handle_at): Remove.
7030 (handle_action_dollar, handle_action_at): Move to...
7031 * src/scan-code.l: here.
7032 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
7033 scan-code.h, scan-code-c.c, scan-gram.h.
7034 (EXTRA_bison_SOURCES): Add scan-code.l.
7035 (BUILT_SOURCES): Add scan-code.c.
7036 (yacc): Be robust to white spaces.
7037
7038 * tests/conflicts.at, tests/input.at, tests/reduce.at,
7039 * tests/regression.at: Adjust the column numbers.
7040 * tests/regression.at: Adjust the error message.
7891a7c4 7041
184e42f0
JD
70422006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
7043
7044 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
7045 Use Akim's wording from
7046 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
7047
7891a7c4
JD
70482006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
7049
7050 Between Bison releases, manually append `+' to the previous Bison
7051 release number, and use that as a signal to automatically print the
7052 ChangeLog's CVS Id keyword from --version. Discussed starting at
7053 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
7054 * ChangeLog: Add Id header.
7055 * configure.ac (AC_INIT): Append `+' to `2.3'.
7056 * src/.cvsignore: Add revision.c.
7057 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
7058 (BUILT_SOURCES): Add revision.c.
7059 (revision.c): New target rule. This file defines a new global variable
7060 named revision. It initializes it with either the Id from ChangeLog
7061 or, if VERSION doesn't contain `+', with the empty string.
7062 * src/getargs.c (version): Print the value of revision.
7063 * src/revision.h: Extern revision.
7064
4ad3ed84
PE
70652006-06-05 Paul Eggert <eggert@cs.ucla.edu>
7066
7067 * NEWS: Version 2.3.
7068 * configure.ac (AC_INIT): Likewise.
7069
02103984
PE
70702006-05-30 Paul Eggert <eggert@cs.ucla.edu>
7071
7072 * data/glr.c (YYRECOVERING): Define to be a function-like macro
7073 with no arguments, not as an object-like macro. This is for
7074 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
7075 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
7076 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
7077 Document this.
7078
2c08afa5
JD
70792006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
7080
7081 * src/getargs.c (usage): Back out yesterday's modification of the
7082 --help output so that we don't have to wait for translation before
7083 releasing 2.3.
7084
6077da58
PE
70852006-05-29 Paul Eggert <eggert@cs.ucla.edu>
7086
7087 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
7088 Problem reported by Akim Demaille.
7089
2a26b6c2
JD
70902006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
7091
7092 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
7093
aefef0d6
PE
70942006-05-26 Paul Eggert <eggert@cs.ucla.edu>
7095
7096 * data/yacc.c (yy_reduce_print): Omit trailing white space in
7097 generated source code. Problem reported by Frans Englich in
7098 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
7099
fcd8e201
PE
71002006-05-22 Paul Eggert <eggert@cs.ucla.edu>
7101
7102 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
7103 shell, not within 'make', so that 'make' by an ordinary builder
7104 (using GNU make) does not worry about configuring gzip. This also
7105 works around a bug reported independently by Keith Thompson and by
7106 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
7107 stderr rather than stdout, messing up the build logs.
7108
7b5cdcbd
JD
71092006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
7110
7111 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
7112 to make sure that YYID will never be unused. This fixes a 'make
7113 maintainer-check' failure caused by the recent changes to the 'Trivial
7114 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
7115 not used.
7116 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
7117
5ad0a449
JD
71182006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
7119
7120 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
7121 state before an empty RHS is always resolved here. Only the location
7122 of that state is guaranteed to be resolved, and that's enough. This
7123 fixes the remaining bug reported by Derek M. Jones in
7124 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
7125 * tests/glr-regression.at (Uninitialized location when reporting
7126 ambiguity): Test the above case.
7127 Also, the embedded comments in this test case claim it checks the case
7128 of an empty RHS that has inherited the initial location. However, the
7129 corresponding LHS was already resolved, so yyresolveLocations didn't
7130 actually have reason to modify it. Fix this by forcing
7131 nondeterministic operation at the beginning of the parse.
7132
50cce58e
PE
71332006-05-20 Paul Eggert <eggert@cs.ucla.edu>
7134
7135 * data/c.m4 (b4_yy_symbol_print_generate):
7136 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
7137 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
7138 of the bugs reported today by Derek M Jones in
7139 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
7140 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
7141 defined to be a type name without parens or brackets.
7142 (Location Type): Similarly for YYLTYPE.
7143 * tests/regression.at (Trivial grammars): Put in a test for this
7144 bug that will be caught by 'make maintainer-check' (though not,
7145 alas, by 'make check' unless your compiler is picky).
7146
ab8d9dc5
PE
71472006-05-19 Paul Eggert <eggert@cs.ucla.edu>
7148
0d2c8934 7149 * NEWS: Version 2.2.
ab8d9dc5
PE
7150 * configure.ac (AC_INIT): Likewise.
7151
9138c575
JD
71522006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
7153
7154 * data/glr.c (yyreportTree): Make room in yystates for the state
7155 preceding the RHS. This fixes the segmentation fault reported by Derek
7156 M. Jones in
7157 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
7158 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
7159 to the user. Reported for yyreportTree by Derek M. Jones later in the
7160 same thread.
7161 * THANKS: Add Derek M. Jones.
7162 Update my email address.
7163 Fix typo in Steve Murphy's name.
7164
276f48df
PE
71652006-05-14 Paul Eggert <eggert@cs.ucla.edu>
7166
d6645148
PE
7167 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
7168 checking against YYLAST that caused the parser to miss a potential
7169 alternative in its diagnostic.
7170 Problem reported by Maria Jose Moron Fernandez in
7171 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
7172 * data/lalr1.cc (yysyntax_error_): Likewise.
7173 * data/yacc.c (yysyntax_error): Likewise.
7174 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
7175 tokens, in case we run into an older C compiler.
7176 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
7177 Use them to check for the off-by-one error fixed above.
7178
276f48df
PE
7179 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
7180 YYSIZE_T, not size_t.
7181 * tests/regression.at (Trivial grammars): New test, to catch
7182 the error fixed by the above patch.
7183
cd8b5791
AD
71842006-05-14 Akim Demaille <akim@lrde.epita.fr>
7185
7186 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
7187 scheme.
7188 Reported by Steve Murphy.
7189
34376418
AD
71902006-05-14 Akim Demaille <akim@lrde.epita.fr>
7191
7192 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
7193 * data/glr.cc: b4_location_flag is now b4_locations_flag.
7194
327afc7c
AD
71952006-05-14 Akim Demaille <akim@lrde.epita.fr>
7196
7197 Implement --trace=m4.
7198 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
7199 * src/output.c (output_skeleton): When set, pass -dV to m4.
7200
7201 Factor the handling of flags in m4.
7202 * src/output.c (prepare): Rename the muscle names debug, defines,
7203 error_verbose to debug_flag, defines_flag, error_verbose_flag.
7204 * data/c.m4: Adjust.
7205 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
7206 Use b4_define_flag_if to define other b4_FLAG_if macros.
7207 (b4_location_if): As a consequence, rename as...
7208 (b4_locations_if): this, for consistency.
7209 Adjust all the skeletons.
7210
ba9ecd19
AD
72112006-05-14 Akim Demaille <akim@lrde.epita.fr>
7212
7213 * etc/bench.pm: Shorten bench names.
7214
4e83ea15
AD
72152006-05-14 Akim Demaille <akim@lrde.epita.fr>
7216
7217 * src/output.h, src/output.c (error_verbose): Move to...
7218 * src/getargs.h, src/getargs.c: here.
7219 Sort the flags.
7220 Adjust dependencies.
7221
6e93d810
PE
72222006-05-13 Paul Eggert <eggert@cs.ucla.edu>
7223
7224 * data/c.m4 (b4_copyright): Put the special exception for Bison
7225 skeletons here, so we don't have to put it in each skeleton. All
b15296ff
PE
7226 uses changed. Suggested by Akim Demaille. Also, wrap the
7227 copyright notice, in case it is longer than 80 columns. Replace
7228 comma by newline after title.
6e93d810 7229
eaea13f5
PE
72302006-05-11 Paul Eggert <eggert@cs.ucla.edu>
7231
7232 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
7233 incompatibility, not a bug. Mention that it wasn't fixed as of
7234 flex 2.5.33.
7235
3cf084ec
AD
72362006-05-11 Akim Demaille <akim@lrde.epita.fr>
7237
7238 * examples/extexi: Enforce the precedence of concatenation over
7239 >>.
0a9f1c7d 7240 Reported by Tommy Nordgren.
3cf084ec 7241
32c96bd7
AD
72422006-05-11 Akim Demaille <akim@lrde.epita.fr>
7243
7244 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
7245 with the member "token".
f94705b2 7246 Reported by Martin Nylin.
32c96bd7 7247
eaea13f5
PE
72482006-05-08 Paul Eggert <eggert@cs.ucla.edu>
7249
7250 * data/glr.c: Switch to Bison 2.2 special-exception language in
7251 the copyright notice. Use more-regular format for titles and
7252 copyright notices.
7253 * data/glr.cc: Likewise.
7254 * data/location.cc: Likewise.
7255 * data/yacc.cc: Likewise.
7256 * doc/bison.texinfo (Conditions): Document this.
7257 * NEWS: likewise. Upgrade version to 2.2.
7258
6e2d1146
AD
72592006-04-27 Akim Demaille <akim@lrde.epita.fr>
7260
7261 * data/glr.cc: Remove dead code.
7262
47671055
PE
72632006-04-25 Paul Eggert <eggert@cs.ucla.edu>
7264
7265 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
7266 that variable and the line breaks the bootstrap. Problem reported
7267 by Juan M. Guerrero.
7268
ed2e6384
AD
72692006-04-24 Akim Demaille <akim@lrde.epita.fr>
7270
7271 * doc/bison.texinfo (Multiple start-symbols): New.
7272
3cedc2dc
AD
72732006-04-24 Akim Demaille <akim@lrde.epita.fr>
7274
7275 * etc/README, etc/bench.pl: New.
7276
b2ddc3f3
AD
72772006-04-03 Akim Demaille <akim@lrde.epita.fr>
7278
7279 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
7280 rule.
7281 Reported by Mickael Labau.
7282 * tests/input.at (Torturing the Scanner): Test it.
7283
91e3ac9a
PE
72842006-03-16 Paul Eggert <eggert@cs.ucla.edu>
7285
7286 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
7287 Problem reported by Bob Rossi.
7288
72892006-03-13 Paul Eggert <eggert@cs.ucla.edu>
7290
7291 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
7292 and didn't really work.
7293 For the index, use @ifnotinfo, not @iftex.
7294 Minor cleanups of spacing and terminology.
7295
5cf61e93
AD
72962006-03-12 Akim Demaille <akim@lrde.epita.fr>
7297
7298 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
7299 of AT_NAME_PREFIX when %name-prefix is not used.
7300
aa08666d
AD
73012006-03-12 Akim Demaille <akim@lrde.epita.fr>
7302
7303 Apply --prefix to C++ skeletons too: they change the namespace.
7304 The test suite already exercize these cases.
7305 * data/c++.m4 (b4_namespace): New.
7306 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
7307 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
7308 * data/yacc.c, data/glr.c: Remove a useless `[]'.
7309 * doc/bison.texinfo: Document it.
7310 (Option Cross Key): Use @multitable in all formats. It looks
7311 nicer, even in TeX outputs.
7312 (Rules): Use the same code whatever the output type is.
7313 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
7314 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
7315 * tests/calc.at: Use it, instead of hard coding `yy'.
91e3ac9a 7316
45567173
AD
73172006-03-10 Akim Demaille <akim@lrde.epita.fr>
7318
7319 * TODO: Remove dead items.
7320
e9d8f881 73212006-03-10 Akim Demaille <akim@lrde.epita.fr>
55ba27be
AD
7322
7323 * doc/FAQ: Remove, merged into...
7324 * doc/bison.texinfo (FAQ): this.
7325 * doc/Makefile.am (EXTRA_DIST): Adjust.
7326
c095d689
AD
73272006-03-10 Akim Demaille <akim@lrde.epita.fr>
7328
7329 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
7330 even if empty.
7331 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
7332 * doc/bison.texinfo (Calc++ Scanner): Use it.
7333
6e0f8287
PE
73342006-03-09 Paul Eggert <eggert@cs.ucla.edu>
7335
7336 Fix two nits reported by twlevo, plus one more that I discovered.
7337
7338 * src/assoc.h (assoc_to_string): Give a name to the arg, as
7339 this is the usual Bison style.
7340 * src/location.h (location_print): Likewise.
7341
7342 * src/reader.h (token_name): Likewise.
7343
d6b771c3
PE
73442006-03-08 Paul Eggert <eggert@cs.ucla.edu>
7345
7346 Fix some nits reported by twlevo.
7347 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
7348 and "POSIX". Use more-modern syntax for URLs. Mention C++
7349 and ask for Java. Don't hardwire OS version numbers. Add
7350 copyright notice.
7351 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
7352 * src/conflicts.c (solved_conflicts_obstack): Now static.
7353
1e137b71
JD
73542006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
7355
7356 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
7357 page. Say "you can use it" not "you may use it" as on the web page;
7358 we're describing capabilities not granting permission.
7359
73f2e47e
PE
73602006-03-06 Paul Eggert <eggert@cs.ucla.edu>
7361
6d05403d
PE
7362 * data/glr.c (yyresolveLocations): Rename local variables to avoid
7363 shadowing warnings. Use usual patter for iterating through RHS.
7364 * tests/glr-regression.at
7365 (Uninitialized location when reporting ambiguity):
7366 Modify yylex so that it uses its argument, rather than trying
7367 to rely on ARGSUSED (which doesn't work for gcc with warnings).
7368 const char -> char const.
7369
73f2e47e
PE
7370 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
7371 Don't use tabs inside commands; it messes up 'ps'.
7372 Problem reported by twlevo.
7373
8710fc41
JD
73742006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
7375
7376 * tests/glr-regression.at (Uninitialized location when reporting
7377 ambiguity): New test case.
7378 * data/glr.c (yyresolveLocations): New function, which uses
7379 YYLLOC_DEFAULT.
7380 (yyresolveValue): Invoke yyresolveLocations before reporting an
7381 ambiguity.
7382 * doc/bison.texinfo (Default Action for Locations): Note
7383 YYLLOC_DEFAULT's usage for ambiguity locations.
7384 (GLR Semantic Actions): Cross-reference those notes.
7385
ae952af2
JD
73862006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
7387
7388 * tests/glr-regression.at (Leaked semantic values when reporting
7389 ambiguity): Remove unnecessary union and type declarations.
7390 (Leaked lookahead after nondeterministic parse syntax error): New test
7391 case.
7392 * data/glr.c (yyparse): Check for zero stacks remaining before
7393 attempting to shift the lookahead so that you don't lose it.
7394
35ee866a
JD
73952006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
7396
7397 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
7398 * tests/glr-regression.at (Leaked semantic values when reporting
7399 ambiguity): New test case.
7400 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
7401 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
7402 now unnecessary yystackp parameter.
7403 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
7404 destructors can be called.
7405
7406 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
7407 in existing testcases.
7408
520181ab
JD
74092006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
7410
7411 Don't leak semantic values for parent RHS when a user action cuts the
7412 parser, and clean up related code a bit.
7413 * tests/glr-regression.at (Leaked merged semantic value if user action
35ee866a
JD
7414 cuts parse): Rename to...
7415 (Leaked semantic values if user action cuts parse): ... this. Add check
520181ab
JD
7416 for leaked parent RHS values.
7417 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
7418 between an unresolved state (non-empty chain of semantic options) and
7419 an incomplete one (signaled by an empty chain).
ae952af2 7420 (yyresolveStates): Document the interface. Move all manipulation of a
520181ab
JD
7421 successfully or unsuccessfully resolved yyGLRState to...
7422 (yyresolveValue): ... here so that yyresolveValue always leaves a
7423 yyGLRState with consistent data and thus is easier to understand.
7424 Remove the yyvalp and yylocp parameters since they are always just
7425 taken from the yys parameter. When reporting a discarded merged value
7426 in debugging output, note that it is incompletely merged. Document the
7427 interface.
7428 (yyresolveAction): If resolving any of the RHS states fails, destroy
7429 them all rather than leaking them. Thus, as long as user actions are
7430 written to clean up the RHS correctly, yyresolveAction always cleans up
7431 the RHS of a semantic option. Document the interface.
7432
18d9185c
PE
74332006-02-27 Paul Eggert <eggert@cs.ucla.edu>
7434
7435 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
7436 led to a segmentation fault in GNU Pascal. Problem reported
7437 by Waldek Hebisch.
7438
841a7737
JD
74392006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
7440
7441 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
7442 mid-rule action inside a nonterminal symbol in order to declare a
7443 destructor for its semantic value.
7444
fc3f467f
PE
74452006-02-16 Paul Eggert <eggert@cs.ucla.edu>
7446
7447 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
7448 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
7449 __cplusplus && ! defined _STDLIB_H && !
7450 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
7451 defined free))]: Include <stdlib.h> rather than rolling our own
7452 declarations of malloc and free, to avoid problems with
7453 incompatible declarations (using 'throw') C++'s stdlib.h. This
7454 should fix Debian bug 340012
7455 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
7456 reported by Guillaume Melquiond.
7457
a3af26dd
PE
74582006-02-13 Paul Eggert <eggert@cs.ucla.edu>
7459
4d7bc38c
PE
7460 * NEWS: Clarify symbols versus types in unused-value warnings.
7461
a3af26dd
PE
7462 * configure.ac (AC_INIT): Bump version number.
7463
4e26c69e
PE
74642006-02-13 Paul Eggert <eggert@cs.ucla.edu>
7465
7466 * NEWS: Version 2.1a.
7467 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
7468 since C99 requires this.
7469
498e897c
PE
74702006-02-11 Paul Eggert <eggert@cs.ucla.edu>
7471
7472 * m4/c-working.m4: New file.
7473 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
7474
57bb17ca
PE
74752006-02-10 Paul Eggert <eggert@cs.ucla.edu>
7476
7477 * Makefile.maint: Merge from coreutils.
7478
0be105dc
PE
74792006-02-09 Paul Eggert <eggert@cs.ucla.edu>
7480
7481 More portability fixes for problems summarized by Nelson H. F. Beebe.
7482
7483 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
7484 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
7485 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
7486 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
7487 messes up because C++ code is compiled in 32-bit mode but linked
7488 in 64-bit mode.
7489
6fc0c024
PE
74902006-02-08 Paul Eggert <eggert@cs.ucla.edu>
7491
7492 More portability fixes for problems summarized by Nelson H. F. Beebe.
7493
7870f699
PE
7494 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
7495 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
7496
6fc0c024
PE
7497 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
7498 nodist_PROGRAMS, since we don't need to actually compile the
7499 example if we're just doing a plain 'make'. This avoids bothering
7500 the installer unnecessarily about problems due to weird C++
7501 compilers.
7502
fe6c2fde
PE
75032006-02-06 Paul Eggert <eggert@cs.ucla.edu>
7504
7505 More portability fixes for problems summarized by Nelson H. F. Beebe.
7506
7507 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
7508 than #include "...", and compile with -I'.'. The old method was
7509 not portable, according to Posix and the C standard, and it does
7510 not work with Sun C 5.7, where previous #line directives affect
7511 the working directory used in later #include "..." directives.
7512
927b425b
JMG
75132006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7514
7515 Various DJGGP specific issues in /djgpp
7516
d9735e9e
PE
75172006-02-02 Paul Eggert <eggert@cs.ucla.edu>
7518
7519 More portability fixes for problems summarized by Nelson H. F. Beebe.
7520
7521 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
7522 '#include <map>' works and that you can apply ++ to iterators.
7523
5a6755af
PE
75242006-02-01 Paul Eggert <eggert@cs.ucla.edu>
7525
67a0dc4f
PE
7526 Work around portability problems summarized by Nelson H. F. Beebe in
7527 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
7528
8c86f0ef
PE
7529 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
7530 that '#include <string>' works.
7531
de35dd59
PE
7532 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
7533 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
7534 "warning: sorry: semantics of inline function static data `const
7535 unsigned char translate_table[262]' are wrong (you'll wind up with
7536 multiple copies)".
7537
67a0dc4f
PE
7538 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
7539 or, xor to not_, and_, or_, and xor_, respectively. This works
7540 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
7541 random system header somewhere that includes the equivalent of
7542 <iso646.h>.
7543
5a6755af
PE
7544 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
7545 -E" works; it apparently doesn't work with PathScale EKO Compiler
67a0dc4f 7546 Suite Version 2.0.
5a6755af 7547
3f001415
JD
75482006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
7549
7550 During deterministic GLR operation, user actions should be able to
7551 influence the parse by changing yychar. To make this easier to fix and
7552 to make glr.c easier to evolve in general, don't maintain yytoken in
7553 parallel with yychar; just compute yytoken when needed.
7554 * tests/glr-regression.at (Incorrect lookahead during deterministic
7555 GLR): Check that setting yychar in a user action has the intended
7556 effect.
7557 * data/glr.c (yyGLRStack): Remove yytokenp member.
7558 (yyclearin): Don't set *yytokenp.
7559 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
7560 yychar rather than *yytokenp to determine the current lookahead.
7561 Compute yytoken locally when needed.
7562 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
7563 point to.
7564
7565 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
7566 after `--report' documentation.
7567
e2a8c0f5
PE
75682006-01-30 Paul Eggert <eggert@cs.ucla.edu>
7569
7570 * src/parse-gram.y (grammar_declaration): Location of printer
7571 symbol is @1, not list->location. Bug reported by twlevo.
7572 * tests/input.at (Incompatible Aliases): Adjust to above change.
7573
6b702268
PE
75742006-01-29 Paul Eggert <eggert@cs.ucla.edu>
7575
27622431
PE
7576 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
7577 all the test at once. This makes the output easier to read in the
7578 normal case.
7579
6b702268
PE
7580 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
7581 got from <http://bro-ids.org/download.html>. The bug is that
7582 when two actions appeared in succession, the second one was
7583 scanned before the first one was added to the grammar rule
7584 as a midrule action. Bison then output the incorrect warning
7585 "parse.y:905.17-906.36: warning: unused value: $3".
7586 * src/parse-gram.y (BRACED_CODE, action): These are no longer
7587 associated with a value.
7588 (rhs): Don't invoke grammar_current_rule_action_append.
7589 (action): Invoke it here instead.
7590 * src/reader.c (grammar_midrule_action): Now extern.
7591 (grammar_current_rule_action_append): Don't invoke
7592 grammar_midrule_action; that is now the scanner's job.
7593 * src/reader.h (last_string, last_braced_code_loc):
7594 (grammar_midrule_action): New decls.
7595 * src/scan-gram.l (last_string): Now extern, sigh.
7596 (last_braced_code_loc): New extern variable.
7597 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
7598 rule already has an action.
7599 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
7600 * tests/input.at (AT_CHECK_UNUSED_VALUES):
7601 Add some tests to check that the above changes fixed the bug.
7602
d40ba6c2
PE
76032006-01-27 Paul Eggert <eggert@cs.ucla.edu>
7604
7605 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
7606 All used changed. Check whether the symbol has a destructor,
7607 not whether it is typed.
7608 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
7609 that the values are still reported as unused. All line numbers
7610 adjusted.
7611
401aace6
PE
76122006-01-23 Paul Eggert <eggert@cs.ucla.edu>
7613
7614 Work around a bug in bro 0.8, which underparenthesizes its
7615 definition of YYLLOC_DEFAULT.
7616 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
7617 their arguments.
7618 * data/lalr1.cc: Likewise.
7619 * data/yacc.cc: Likewise.
7620
06f01bc4
PE
76212006-01-22 Paul Eggert <eggert@cs.ucla.edu>
7622
401aace6
PE
7623 Work around a bug in Pike 7.0, and give the Pike folks a
7624 better way to override the usual int widths.
7625 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
7626 user can override the types.
7627 (short): #undef, to work around a bug in Pike 7.0.
7628 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
7629 (union yyalloc.yyss): Use yytype_int16 rather than short.
7630 All uses changed.
7631 (yysigned_char): Remove.
7632 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
7633 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
7634 * tests/regression.at (Web2c Actions): Adjust to above changes.
7635
7636 * src/reader.c (check_and_convert_grammar): New function.
7637 (reader): Close the input file even if something went wrong during
7638 parsing. Minor file descriptor leak reported by twlevo.
7639
06f01bc4
PE
7640 * src/assoc.c (assoc_to_string): Use a default: abort (); case
7641 to pacify gcc -Wswitch-default.
7642 * src/scan-gram.l (adjust_location): Use a default: break; case
7643 to pacify gcc -Wswitch-default.
7644 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
7645 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
7646 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
7647 Move these decls to scan-skel.l, since they don't need to be
7648 visible elsewhere.
7649 * src/scan-skel.l: Accept the above decls.
7650 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
7651 is used.
7652
02650b7f
PE
76532006-01-21 Paul Eggert <eggert@cs.ucla.edu>
7654
7655 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
7656 since we don't want to insist on a version number at the start
7657 of the changelog every time.
7658 * Makefile.maint: Sync from coreutils a bit better.
7659 (sc_trailing_blank): Renamed from sc_trailing_space.
7660 All uses changed.
7661 (sc_no_if_have_config_h, sc_require_config_h):
7662 (sc_prohibit_assert_without_use): New rules.
7663 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
7664 (sc_dd_max_sym_length): Fix leading spaces in rule.
7665 (sc_system_h_headers): Prefix with @.
7666 (sc_useless_cpp_parens, m4-check): Output line numbers.
7667 (changelog-check): Allow version only in head.
7668 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
7669 satisfy new Makefile.maint rule.
7670 * data/glr.c: Likewise.
7671 * data/glr.cc: Likewise.
7672 * data/lalr1.cc: Likewise.
7673 * data/yacc.c: Likewise.
7674 * lib/ebitsetv.c: Likewise.
7675 * lib/lbitset.c: Likewise.
7676 * lib/subpipe.c: Likewise.
7677 * lib/timevar.c: Likewise.
7678 * src/system.h: Likewise.
7679 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
7680 * djgpp/Makefile.maint: Add copyright notice.
7681 * djgpp/README.in: Likewise.
7682 * djgpp/config.bat: Likewise.
7683 * djgpp/config.site: Likewise.
7684 * djgpp/config_h.sed: Likewise.
7685 * djgpp/djunpack.bat: Likewise.
7686 * djgpp/config.sed: Fix copyright notice to match standard format.
7687 * djgpp/subpipe.h: Likewise.
7688 * lib/bitsetv-print.c: Likewise.
7689 * lib/bitsetv.c: Likewise.
7690 * lib/subpipe.h: Likewise.
7691 * lib/timevar.c: Likewise.
7692 * lib/timevar.h: Likewise.
7693 * djgpp/subpipe.c: Use standard recipe for config.h.
7694 * lib/abitset.c: Likewise.
7695 * lib/bitset.c: Likewise.
7696 * lib/bitset_stats.c: Likewise.
7697 * lib/bitsetv-print.c: Likewise.
7698 * lib/bitsetv.c: Likewise.
7699 * lib/ebitsetv.c: Likewise.
7700 * lib/get-errno.c: Likewise.
7701 * lib/lbitset.c: Likewise.
7702 * lib/subpipe.c: Likewise.
7703 * lib/timevar.c: Likewise.
7704 * lib/vbitset.c: Likewise.
7705 * tests/local.at: Likewise.
7706 * src/scan-gram.l: Don't include verify.h, since system.h does
7707 that for us.
7708 * .x-sc_require_config_h: New file.
7709 * .x-sc_unmarked_diagnostics: New file.
7710
287c78f6
PE
77112006-01-20 Paul Eggert <eggert@cs.ucla.edu>
7712
287c78f6
PE
7713 Be a bit more systematic about using 'abort'.
7714 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
7715 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
7716 Put 'default: abort ();' before some other case, to satisfy older
7717 pedantic compilers.
7718 * lib/bitset_stats.c (bitset_stats_init): Likewise.
7719 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
7720 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
7721 * src/conflicts.c (resolve_sr_conflict): Likewise.
68cae94e
PE
7722 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
7723 (get_decision_str, get_orientation_str, get_node_alignment_str):
7724 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
7725 (get_linestyle_str, get_arrowstyle_str): Likewise.
7726 * src/conflicts.c (resolve_sr_conflict):
7727 Use a default case rather than one for the one remaining enum
7728 value, to catch invalid enum values as well.
7729 * src/lalr.c (set_goto_map, map_goto):
7730 Prefer "assert (FOO);" to "if (!FOO) abort ();".
7731 * src/nullable.c (nullable_compute, token_definitions_output):
7732 Likewise.
7733 * src/reader.c (packgram, reader): Likewise.
7734 * src/state.c (transitions_to, state_new, state_reduction_find):
7735 Likewise.
7736 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
7737 (symbol_pack): Likewise.
7738 * src/tables.c (conflict_row, pack_vector): Likewise.
287c78f6
PE
7739 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
7740 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
68cae94e
PE
7741 * src/system.h: Don't include <assert.h>.
7742 (assert): New macro.
7743
7744 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
7745 (Destructor Decl, Parser Function, Pure Calling):
7746 Describe rules for braces inside C code more carefully.
287c78f6 7747
c66dfadd
PE
77482006-01-19 Paul Eggert <eggert@cs.ucla.edu>
7749
c21493b8
PE
7750 Fix some porting glitches found by Nelson H. F. Beebe.
7751 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
7752 compilers that don't understand that abort () does not return.
7753 * src/state.c (transitions_to): Likewise.
7754 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
7755 that '#include <cstdlib>' works.
7756 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
7757 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
7758 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
7759 for the benefit of some pre-C99 compilers.
7760
b6e3facf
PE
7761 * bootstrap: Undo changes to gnulib files that autoreconf made.
7762
c66dfadd
PE
7763 Minor fixups to get 'make maintainer-check' to work.
7764 * configure.ac: Don't use -Wnested-externs, as it's incompatible
7765 with the new verify.h implementation.
7766 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
7767 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
7768 * data/yacc.c (YYUSE): Likewise.
7769 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
7770 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
7771 * src/parse-gram.y (declaration): Don't pass a string constant
7772 to a function that expects char *, since GCC might complain
7773 about the constant value.
7774 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
7775 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
7776 before #defining them.
7777 * tests/glr-regression.at
7778 (Incorrectly initialized location for empty right-hand side in GLR):
7779 In yyerror, use the msg arg.
7780 (Corrupted semantic options if user action cuts parse):
7781 (Incorrect lookahead during deterministic GLR):
7782 (Incorrect lookahead during nondeterministic GLR):
7783 Don't name a local var 'index'; it shadows string.h's 'index'.
7784
ed94ef2a
AD
77852006-01-19 Akim Demaille <akim@epita.fr>
7786
7787 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
7788 location, not just parts of it.
7789
e9ad4aec
PE
77902006-01-18 Paul Eggert <eggert@cs.ucla.edu>
7791
d6ca7905
PE
7792 * NEWS: Document the fact that multiple %unions are now allowed.
7793 * doc/bison.texinfo (Union Decl): Likewise.
51cbef6f
PE
7794 * TODO: This feature is now implemented, so remove it from
7795 the wishlist.
d6ca7905 7796
ef1b70e0
PE
7797 * Makefile.maint: Merge with coreutils Makefile.maint.
7798 (CVS_LIST): Use build-aux version if available.
7799 (VERSION_REGEXP): New macro.
7800 (syntax-check-rules): Add sc_no_if_have_config_h,
7801 sc_prohibit_assert_without_use, sc_require_config_h,
7802 sc_useless_cpp_parens.
7803 (sc_obsolete_symbols): Check for O_NDELAY.
7804 (sc_dd_max_sym_length): Track coreutils.
7805 (sc_unmarked_diagnostics): Look in all files, not just *.c.
7806 (sc_useless_cpp_parens): New rule.
7807 (news-date-check): Look for version or today's date.
7808 (changelog-check): Don't require version number near head.
7809 (copyright-check): Use current year instead of hardwiring 2005.
7810 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
7811 (announcement): Add --gpg-key-ID.
7812
7813 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
7814 with "file system".
7815
2073ce56 7816 Avoid undefined behavior that addressed just before the start of an
e9ad4aec
PE
7817 array. Problem reported by twlevo.
7818 * src/reader.c (packgram): Prepend a new sentinel before ritem.
7819 * src/lalr.c (build_relations): Rely on new sentinel.
7820 * src/gram.c (gram_free): Adjust to new sentinel.
7821
b7691f15
JD
78222006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
7823
7824 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
7825 yylookaheadNeeds. All uses updated.
7826 (yysplitStack): Rename local yynewLookaheadStatuses to
7827 yynewLookaheadNeeds.
7828 * data/glr-regression.at (Incorrect lookahead during nondeterministic
7829 GLR): In comments, change `lookahead status' to `lookahead need'.
7830
ddee1b06
PH
78312006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7832
7833 * data/glr.c (yysplitStack): A little stylistic rewrite.
7834
12f4614d
PH
78352006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7836
7837 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
7838
32c29292
JD
78392006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
7840
7841 * doc/bison.texinfo: Fix some typos.
7842 (GLR Semantic Actions): New subsection discussing special
7843 considerations because GLR semantic actions might be deferred.
7844 (Actions): Mention look-ahead usage of yylval.
7845 (Actions and Locations): Mention look-ahead usage of yylloc.
7846 (Special Features for Use in Actions): Add YYEOF entry and mention it
7847 in the yychar entry.
7848 In the yychar entry, remove mention of the local yychar case (pure
7849 parser) since this is irrelevant information when writing semantic
148d66d8 7850 actions and since it's already discussed in `Table of Symbols' where
32c29292
JD
7851 yychar is otherwise described as an external variable.
7852 In the yychar entry, don't call it the `current' look-ahead since it
7853 isn't when semantic actions are deferred.
7854 In the yychar and yyclearin entries, add note about deferred semantic
7855 actions.
7856 Add yylloc and yylval entries discussing look-ahead usage.
7857 (Look-Ahead Tokens): When discussing yychar, don't call it the
7858 `current' look-ahead, and do mention yylval and yylloc.
7859 (Error Recovery): Cross-reference `Action Features' when mentioning
7860 yyclearin.
148d66d8 7861 (Table of Symbols): In the yychar entry, don't call it the `current'
32c29292
JD
7862 look-ahead.
7863 In the yylloc and yylval entries, mention look-ahead usage.
7864
de366a2f 78652006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2781dbd1
JD
7866
7867 * tests/glr-regression.at: Update copyright year to 2006.
7868
bf70fa87
JD
78692006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7870
7871 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
7872 use during nondeterministic operation to track which stacks have
7873 actually needed the current lookahead.
7874 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
7875 Allocate, deallocate, resize, and otherwise shuffle space for
7876 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
7877 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
7878 appropriately during nondeterministic operation.
7879 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
7880 members to store the current lookahead to be used by the deferred
7881 user action.
7882 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
7883 from which the RHS is taken. Set the lookahead members of the new
7884 yySemanticOption according to the lookahead status for stack yyk.
7885 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
7886 yyaddDeferredAction.
7887 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
7888 members of yySemanticOption before invoking yyuserAction, and then set
7889 them back to their current values afterward.
7890 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
7891 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
7892 * tests/glr-regression.at: Remove `.' from the ends of recent test case
7893 titles for consistency.
7894 (Leaked merged semantic value if user action cuts parse): In order to
7895 suppress lint warnings, use arguments in merge function, and assign
7896 char value < 128 in main.
7897 (Incorrect lookahead during deterministic GLR): New test case.
7898 (Incorrect lookahead during nondeterministic GLR): New test case.
7899
05449a2c
JD
79002006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7901
de366a2f 7902 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
05449a2c
JD
7903 !yyvaluep as signal that no semantic value is available to print.
7904 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
7905 to print a semantic value.
7906
4158e0a1 79072006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
fd2493f7 7908
4158e0a1
JD
7909 * tests/glr-regression.at: For consistency with my newer test cases,
7910 don't thank myself.
7911
d659304d
JD
79122006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
7913
7914 * data/glr.c (yyresolveValue): When merging semantic options, if at
7915 least one user action succeeds but a later one cuts the parse, then
7916 destroy the semantic value before returning rather than leaking it.
7917 (yyresolveStates): If a user action cuts the parse and thus
7918 yyresolveValue fails, ignore the (unset) semantic value rather than
7919 corrupting the yyGLRState, and empty the semantic options list since
7920 the user actions should have called all necessary destructors.
7921 Simplify code with YYCHK.
7922 * tests/glr-regression.at (Corrupted semantic options if user action
7923 cuts parse): New test case.
7924 (Undesirable destructors if user action cuts parse): New test case.
7925 Before applying any of this patch, this test case never actually failed
7926 for me... but only because the corrupted semantic options usually
7927 masked this bug.
7928 (Leaked merged semantic value if user action cuts parse): New test
7929 case.
7930
6ec2c0f2
AD
79312006-01-05 Akim Demaille <akim@epita.fr>
7932
7933 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
7934
1b9c21fb
PE
79352006-01-04 Paul Eggert <eggert@cs.ucla.edu>
7936
7937 * data/c.m4 (b4_c_modern): New macro, with a new provision for
7938 _MSC_VER. Problem reported by Cenzato Marco.
7939 (b4_c_function_def): Use it.
7940 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
7941 b4_c_modern.
7942 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
7943 than rolling our own.
7944
84866159
AD
79452006-01-04 Akim Demaille <akim@epita.fr>
7946
7947 Also warn about non-used mid-rule values.
7948 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
7949 member.
7950 (symbol_list_new): Adjust.
7951 * src/reader.c (symbol_typed_p): New.
7952 (grammar_rule_check): Use it.
7953 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
7954 Check its rule.
7955 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
7956 Use it.
7957 * tests/actions.at (Exotic Dollars): Adjust.
7958
378f4bd8
AD
79592006-01-04 Akim Demaille <akim@epita.fr>
7960
7961 * src/reader.c (grammar_midrule_action): If $$ is set in a
7962 mid-rule, move the `used' bit to its lhs.
7963 * tests/input.at (Unused values): New.
7964 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
7965
e2a21b6f
PE
79662006-01-03 Paul Eggert <eggert@cs.ucla.edu>
7967
54662697
PE
7968 * doc/bison.texinfo (Bison Options): Say more accurately what
7969 --yacc does.
7970 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
7971 about declarations in the grammar when in Yacc mode, as POSIX does
7972 not require a diagnostic when the grammar uses extensions.
7973
7974 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
7975
073f9288
PE
7976 Warn about dubious constructions like "%token T T".
7977 Reported by twlevo.
7978 * src/symtab.h (struct symbol.declared): New member.
7979 * src/symtab.c (symbol_new): Initialize it to false.
7980 (symbol_class_set): New arg DECLARING, specifying whether
7981 this is a declaration that we want to warn about, if there
7982 is more than one of them. All uses changed.
7983
1221b78a
PE
7984 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
7985 Allow multiple %union directives, whose contents concatenate.
7986 * src/parse-gram.y (grammar_declaration): Likewise.
7987 Use muscle_code_grow, so that we don't need stype_line any more.
7988 All uses changed.
7989
7990 * src/muscle_tab.c (muscle_grow): Fix comment.
7991
e2a21b6f
PE
7992 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
7993 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
7994 Update copyright year to 2006.
7995
8f7e3cf9
AD
79962006-01-03 Akim Demaille <akim@epita.fr>
7997
7998 Have glr.cc pass (some of) the calc.at tests.
7999 * data/glr.cc (b4_parse_param_orig): New.
8000 (b4_parse_param): Improve its definition, and bound it more
8001 clearly in the skeleton.
8002 (b4_epilogue): Append, instead of prepending, in order to keep
8003 #line consistency.
8004 Simplify the generation of auxiliary functions: locations and
8005 purity are mandated.
8006 (b4_global_tokens_and_yystype): Honor it.
8007 * data/location.cc (c++.m4): Don't include it.
8008 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
8009 and AT_SKEL_CC_IF.
8010 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
8011 AT_LALR1_CC_IF.
8012 Be sure to initialize the first position's filename.
8013 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
8014 mandated anyway.
8015 (AT_CHECK_CALC_GLR_CC): New.
8016 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
8017
3953ed88
AD
80182006-01-02 Akim Demaille <akim@epita.fr>
8019
8020 * src/output.c (output_skeleton): Don't hard wire the inclusion of
8021 c.m4.
0a96ba81 8022 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
3953ed88
AD
8023 * data/glr.cc: Do not include stack.hh.
8024
9ecafbbf
AD
80252006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
8026
8027 * data/glr.c: Reformat whitespace with tabs.
8028 (b4_lpure_formals): Remove this unused m4 macro.
8029 * tests/cxx-type.at: Reformat whitespace with tabs.
8030 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
8031 since it's a member. Rename type to isNterm for clarity.
8032
c4d497a0
AD
80332005-12-29 Akim <akim@sulaco.local>
8034
8035 Let glr.cc catch up with symbol_value_print.
8036 * data/glr.cc (b4_yysymprint_generate): Replace by...
8037 (b4_yy_symbol_print_generate): this.
8038 (yy_symbol_print, yy_symbol_value_print): Declare them.
8039
4517da37
PE
80402005-12-28 Paul Eggert <eggert@cs.ucla.edu>
8041
8042 * src/location.h (boundary): Note that a line or column equal
8043 to INT_MAX indicates an overflow.
8044 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
8045 (rule_length_overflow, increment_rule_length, add_column_width):
8046 New functions.
8047 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
8048 (<SC_BRACED_CODE>"}"):
8049 Use increment_rule_length rather than incrementing it by hand.
8050 (adjust_location, handle_syncline): Diagnose overflow.
8051 (handle_action_dollar, handle_action_at):
8052 Fix bug with monstrosities like $-2147483648.
8053 Remove now-unnecessary checks.
8054 (scan_integer): Verify assumptions and remove now-unnecessary checks.
8055 (convert_ucn_to_byte): Verify assumptions.
8056 (handle_syncline): New arg LOC. All callers changed.
8057 Don't store through a value derived from char const * pointer.
8058
8059 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
8060 GCC warnings.
8061
e3233bf6
PE
80622005-12-27 Paul Eggert <eggert@cs.ucla.edu>
8063
8064 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
8065 Remove unnecessary forward static decls.
8066
8f3596a6
AD
80672005-12-27 Akim Demaille <akim@epita.fr>
8068
8069 * src/reader.c (grammar_current_rule_check): Also check that $$
8070 is used.
8071 Take the rule to check as argument, hence rename as...
8072 (grammar_rule_check): this.
8073 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
8074 Rename as...
8075 (grammar_rule_begin, grammar_rule_end): these, for consistency.
8076 (grammar_midrule_action, grammar_symbol_append): Now static.
8077 * tests/torture.at (input): Don't rely on the default action
8078 being always performed.
8079 * tests/calc.at: "Set" $$ even when the action is "cut" with
8080 YYERROR or other.
8081 * tests/actions.at (Exotic Dollars): Instead of using unused
8082 values, check that the warning is issued.
8083
721be13c
PE
80842005-12-22 Paul Eggert <eggert@cs.ucla.edu>
8085
8086 * NEWS: Improve wording for unused-value warnings.
8087
a0af42fc
AD
80882005-12-22 Akim Demaille <akim@epita.fr>
8089
8090 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
8091 (b4_yysymprint_generate): Rename as...
8092 (b4_yy_symbol_print_generate): this.
8093 Generate yy_symbol_print instead of yysymprint.
8094 Generate also yy_symbol_value_print, and use it.
8095
affac613
AD
80962005-12-22 Akim Demaille <akim@epita.fr>
8097
721be13c 8098 * NEWS: Warn about unused values.
affac613
AD
8099 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
8100 a `used' member.
8101 (symbol_list_n_get, symbol_list_n_used_set): New.
8102 (symbol_list_n_type_name_get): Use symbol_list_n_get.
8103 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
8104 * src/reader.c (grammar_current_rule_check): Check that values are
8105 used.
8106 * src/symtab.c (symbol_print): Accept 0.
8107 * tests/existing.at: Remove the type information.
8108 Empty the actions.
8109 Remove useless actions (beware of mid-rule actions: perl -000
8110 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
8111 * tests/actions.at (Exotic Dollars): Use unused values.
8112 * tests/calc.at: Likewise.
8113 * tests/glr-regression.at (No users destructors if stack 0 deleted):
8114 Likewise.
8115
8116 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
8117 rule_useful_p.
8118
9d9b8b70
PE
81192005-12-21 Paul Eggert <eggert@cs.ucla.edu>
8120
8bb4c753
PE
8121 Undo 2005-12-01 tentative license wording change. The wording is
8122 still being reviewed by the lawyers, and we don't want to wait for
8123 them before publishing a test release. For now, revert to the
8124 previous wording.
8125 * NEWS: Undo 2005-12-01 change.
8126 * data/glr.c: Revert to previous license wording.
8127 * data/glr.cc: Likewise.
8128 * data/lalr1.cc: Likewise.
8129 * data/location.cc: Likewise.
8130 * data/yacc.c: Likewise.
8131
9d9b8b70
PE
8132 * NEWS: Reword %destructor vs YYABORT etc.
8133 * data/glr.c: Use American spacing, for consistency.
8134 * data/glr.cc: Likewise.
8135 * data/lalr1.cc: Likewise.
8136 * data/yacc.c: Likewise.
8137 * data/yacc.c: Reformat comments slightly.
8138 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
8139 for consistency. Fix some spelling errors and reword recently-included
8140 text slightly.
8141 * tests/cxx-type.at: Cast results of malloc, for C++.
8142
2c3b392a
AD
81432005-12-21 Joel E. Denny <address@hidden>
8144
8145 * tests/cxx-type.at: Construct a tree, count the parents of shared
8146 nodes, and free each node once and only once. Previously, the memory
8147 for semantic values was leaked instead.
8148
d6cff4dc
AD
81492005-12-21 Joel E. Denny <address@hidden>
8150
8151 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
8152 (yylval, yylloc): If pure, #define to yystackp->yyval and
8153 yystackp->yyloc similar to yychar and yynerrs.
8154 (yyparse): If pure, remove local yylval and yylloc. Add local
8155 yystackp to accommodate pure definitions of yylval and yylloc.
8156 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
8157 yylvalp and yyllocp to &yylval and &yylloc.
8158 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
8159 namespace. Previously, nerrs and char were missing, but lval and lloc
8160 weren't necessary.
8161 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
8162 yylvalp and yyllocp parameters since, if pure, these are now always
8163 accessible through yystackp. If not pure, they are still accessible
8164 globally.
8165 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
8166 `if (YYID (N))' to pacify lint.
8167
a85284cf
AD
81682005-12-21 Akim Demaille <akim@epita.fr>
8169
8170 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
8171 destroy the RHS symbols of a rule.
8172 * data/yacc.c (yylen): Initialize to 0.
8173 Keep its value to the number of items to possibly shift.
8174 In particular, a regular successful parse that ends on YYFINAL by
8175 a (internal) YYACCEPT must not have yylen != 0.
8176 (yyerrorlab, yyreturn): Pop the RHS.
8177 Reorder a bit to emphasize the `shifting' bits of code.
8178 (YYPOPSTACK): Now accept a number of items to pop.
8179 * data/lalr1.cc: Likewise.
8180 * data/glr.c: Formatting changes.
8181 Use goto instead of fall through.
8182 * doc/bison.texinfo (Destructor Decl): Complete.
8183
d508c281
JMG
81842005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8185
8186 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
8187 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
8188 * djgpp/config.bat: Replace every occurence of the file name
8189 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
8190 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
8191 * djgpp/config.sed: Replace every occurence of the file name
8192 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
8193 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
8194 * djgpp/djunpack.bat: DJGPP specific file.
8195 * djgpp/fnchange.lst: DJGPP specific file.
8196 * djgpp/README.in: Add new information about how to unpack the bison
8197 source on MSDOS and other systems which have 8.3 file name restrictions
8198 using djunpack.bat and fnchange.lst.
8199
3e7a2cd9
PE
82002005-12-12 Paul Eggert <eggert@cs.ucla.edu>
8201
8202 * bootstrap (build_cvs_prefix): Remove; unused.
8203 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
8204 when getting gnulib.
8205
82062005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
8207
8208 * data/glr.c: Reorder typedef declarations for structs to match order
8209 of struct declarations.
8210 Rename yystack everywhere to yystackp except in yyparse where it's not
8211 a pointer.
8212 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
8213 consistency.
8214 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
8215 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
8216 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
8217 lint.
8218
877519f8
PE
82192005-12-09 Paul Eggert <eggert@cs.ucla.edu>
8220
0eca5a39
PE
8221 * tests/sets.at (Accept): Fix typos in regular expression used to
8222 sed out the final state number.
8223
2cec9080
PE
8224 Work around portability problem on Solaris 10: flex-generated
8225 files include <stdio.h> before <config.h>, which messes up
8226 because the latter defines __EXTENSIONS__. Address the problem
8227 by creating two new little files that include <config.h> first,
8228 then include the flex-generated files. Rewrite everyone else
8229 to include <config.h> first, as well.
8230 * lib/timevar.c: Always include "config.h".
8231 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
8232 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
8233 (EXTRA_bison_SOURCES): New macro.
8234 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
8235 * src/system.h: Don't include config.h.
8236 * src/LR0.c: Include <config.h> first.
8237 * src/assoc.c: Likewise.
8238 * src/closure.c: Likewise.
8239 * src/complain.c: Likewise.
8240 * src/conflicts.c: Likewise.
8241 * src/derives.c: Likewise.
8242 * src/files.c: Likewise.
8243 * src/getargs.c: Likewise.
8244 * src/gram.c: Likewise.
8245 * src/lalr.c: Likewise.
8246 * src/location.c: Likewise.
8247 * src/main.c: Likewise.
8248 * src/muscle_tab.c: Likewise.
8249 * src/nullable.c: Likewise.
8250 * src/output.c: Likewise.
8251 * src/parse-gram.y: Likewise.
8252 * src/print.c: Likewise.
8253 * src/print_graph.c: Likewise.
8254 * src/reader.c: Likewise.
8255 * src/reduce.c: Likewise.
8256 * src/relation.c: Likewise.
8257 * src/state.c: Likewise.
8258 * src/symlist.c: Likewise.
8259 * src/symtab.c: Likewise.
8260 * src/tables.c: Likewise.
8261 * src/uniqstr.c: Likewise.
8262 * src/vcg.c: Likewise.
8263
877519f8
PE
8264 * src/parse-gram.y: Fix minor problems uncovered by lint.
8265 (current_lhs, current_lhs_location): Now static.
8266 (current_assoc): Remove unused variable.
8267
8268 Cleanups so that Bison-generated parsers have less lint.
8269 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
8270 Prepend /*ARGSUSED*/, for lint's sake.
8271 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
8272 definition if 'lint' is defined.
8273 (YYID): New macro (or function, if lint).
8274 All uses of /*CONSTCOND*/0 replaced by YYID(0).
8275 * data/yacc.c: Likewise.
8276 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
8277 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
8278 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
8279 is C++ only.
8280 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
8281 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
8282 Use YYID(0) rather than 0, for lint.
8283 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
8284 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
8285
f5228370
PE
82862005-12-07 Paul Eggert <eggert@cs.ucla.edu>
8287
8288 * tests/glr-regression.at
8289 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
8290 Close memory leak reported by twlevo.
8291
69ce078b
PE
82922005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
8293
6ff99711
PE
8294 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
8295 all stacks.
8296 (yyparse): Iterate another stack in order to call user destructors.
69ce078b
PE
8297 * tests/glr-regression.at (No users destructors if stack 0 deleted):
8298 New test case.
8299 (Duplicated user destructor for lookahead): This test now is expected
8300 to succeed.
8301
af3412cd
PE
83022005-12-01 Paul Eggert <eggert@cs.ucla.edu>
8303
32b5b719 8304 * NEWS: Document the following change.
af3412cd
PE
8305 * data/yacc.c: Say "parser skeleton" rather than "file", since
8306 it's no longer just a file.
8307 * data/glr.c: Grant a special exception for C GLR parsers, that
8308 reads like the already-existing exception for C LALR(1) parsers.
8309 * data/glr.cc: Likewise.
8310 * data/lalr1.cc: Likewise.
8311 * data/location.cc: Likewise.
8312 * data/yacc.c: Reword the "written by" statement to clarify that
8313 it was the parser skeleton, not the entire output file.
8314 * data/glr.c: Written by Paul Hilfinger.
8315 * data/glr.cc: Written by Akim Demaille.
8316 * data/lalr1.cc: Likewise.
8317
035aa4a0
PE
83182005-11-18 Paul Eggert <eggert@cs.ucla.edu>
8319
d9963c85
PE
8320 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
8321 Fix typos in previous change that broke 'make check'.
8322 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
8323 supported in C.
8324 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
8325 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
8326 We can revert this once things settle down.
8327
035aa4a0
PE
8328 * src/conflicts.c (conflicts_print): Don't print file name twice
8329 when %expect fails because there were no conflicts.
8330 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
8331 change.
8332 * tests/conflicts.at (%expect not enough, %expect too much):
8333 (%expect with reduce conflicts): Adjust to new behavior.
8334
83352005-11-18 Akim Demaille <akim@epita.fr>
8336
8337 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
8338 errors.
8339 * NEWS: Document this.
8340 * doc/bison.texinfo (Expect Decl): Likewise.
8341
d1ff7a7c
AD
83422005-11-16 Akim Demaille <akim@epita.fr>
8343
8344 Generalize the display of semantic values and locations in traces.
8345 * data/glr.c (yy_reduce_print): Fix indices (again).
8346 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
8347 literal integers.
8348 * data/lalr1.cc (yyreduce_print): Rename as...
8349 (yy_reduce_print): this.
8350 Display values and locations.
8351 * data/yacc.c (yy_reduce_print): Likewise.
8352 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
8353 (yysymprint): Move higher to be visible from yy_reduce_print).
8354 (yyparse): Adjust.
8355 * tests/calc.at: Adjust the expected length of the traces.
8356
6de5398d
AD
83572005-11-14 Akim Demaille <akim@epita.fr>
8358
8359 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
8360 from 1 to N, while values and location start at 0.
8361 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
8362
a1373f55
AD
83632005-11-14 Akim Demaille <akim@epita.fr>
8364
8365 * data/glr.c (yy_reduce_print): Fix the $ number.
8366
613d8952
AD
83672005-11-14 Akim Demaille <akim@epita.fr>
8368
8369 "Use" parse parameters.
8370 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
8371 * data/glr.c, data/glr.cc: Use them.
8372 * data/glr.c (YYUSE): Have a C++ definition that supports
8373 non-pointer types.
8374
b2741627
AD
83752005-11-14 Akim Demaille <akim@epita.fr>
8376
8377 * data/glr.c (yyexpandGLRStack): Declare only if defined.
8378
5059b5c8
AD
83792005-11-14 Akim Demaille <akim@epita.fr>
8380
42249483
AD
8381 * data/glr.cc: New.
8382 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
5059b5c8 8383
4626a15d
AD
83842005-11-12 Akim Demaille <akim@epita.fr>
8385
8386 Let position and location be PODs.
8387 * data/location.cc (position::initialize, location::initialize): New.
8388 (position::position, location::location): Define only if
8389 b4_location_constructors is defined.
8390 * data/lalr1.cc (b4_location_constructors): Define it for backward
8391 compatibility.
8392 * doc/bison.texinfo (Initial Action Decl): Use initialize.
8393
83942005-11-12 Akim Demaille <akim@epita.fr>
98ae9643
AD
8395
8396 * data/lalr1.cc: Move the body of the ctor and dtor into the
8397 parser file (instead of the header).
8398 Wrap the implementations in a "namespace yy".
8399
84002005-11-12 Akim Demaille <akim@epita.fr>
8401
8402 Have glr.c include its header file when created.
8403 * data/glr.c (b4_shared_declarations): New.
8404 Output them verbatim in the parser if !%defines, otherwise
8405 output then in the header file, and include it instead.
8406
1989d947
AD
84072005-11-11 Akim Demaille <akim@epita.fr>
8408
8409 * data/glr.c: Comment changes.
8410
84112005-11-11 Akim Demaille <akim@epita.fr>
62b08cfc
AD
8412
8413 When yydebug, report semantic and location values for reductions.
8414 * data/glr.c (yy_reduce_print): Report the semantic values and the
8415 locations.
8416 (YY_REDUCE_PRINT): Adjust.
8417 (yyglrReduce): Use them.
8418 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
8419 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
8420 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
8421 traces.
8422
02998094
AD
84232005-11-10 Akim Demaille <akim@epita.fr>
8424
8425 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
8426 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
8427 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
8428
5210672f
PE
84292005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
8430
8431 * m4/cxx.m4, examples/Makefile.am: Don't build
8432 examples/calc++ if no C++ compiler is available. (trivial change)
8433
a8991a1d
AD
84342005-11-09 Akim Demaille <akim@epita.fr>
8435
8436 * src/scan-skel.l: Use a couple of asserts.
8437
36b5e963
AD
84382005-11-03 Akim Demaille <akim@epita.fr>
8439
8440 In some (weird) cases, the final state number is incorrect.
8441 Reported by Alexandre Duret-Lutz.
8442 * src/LR0.c (state_list_append): Remove the computation of
8443 final_state.
8444 (save_reductions): Do it here.
8445 (get_state): Alpha conversion.
8446 (generate_states): Use a for loop.
8447 * src/gram.h (item_number_is_rule_number)
8448 (item_number_is_symbol_number): New.
8449 * src/state.c: Use assert.
8450 * src/system.h: Include assert.h.
8451 * tests/sets.at (Accept): New.
8452
44e7ead1
PH
84532005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8454
8455 * data/glr.c (yyfill): Adjust comment.
36b5e963 8456 (yyresolveAction): Initialize default location properly
44e7ead1
PH
8457 for empty right-hand sides.
8458 (yydoAction): Ditto.
8459 Add comment explaining apparently dead code.
36b5e963
AD
8460 * tests/glr-regression.at
8461 (Incorrectly initialized location for empty right-hand side in GLR):
44e7ead1 8462 New test.
36b5e963 8463
e10a80ee
PE
84642005-10-30 Paul Eggert <eggert@cs.ucla.edu>
8465
8466 * bootstrap (cleanup_gnulib): New function. Use it to clean up
8467 gnulib when interrupted. This fixes some race conditions and
8468 works around some portability problems (one noted by Paul
8469 Hilfinger).
8470
067b32ee
AD
84712005-10-22 Akim <akim@epita.fr>
8472
8473 * Makefile.cfg: Adjust to config -> build-aux.
8474 Reported by twledo.
8475
4b367315
AD
84762005-10-21 Akim Demaille <akim@epita.fr>
8477
8478 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
8479 the %parse-params.
8480 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
8481 * data/yacc.c (b4_Pure_if): Rename as...
8482 (b4_yacc_pure_if): this.
8483 (YY_SYMBOL_PRINT, yyparse): Adjust.
8484 * doc/bison.texinfo: Formatting changes.
8485
24cc23d9
AD
84862005-10-21 Akim Demaille <akim@epita.fr>
8487
8488 Finish the transition config -> build-aux.
8489 * configure.ac, Makefile.am: Use build-aux.
8490 * config/prev-version, config/announce-gen, config/Makefile.am:
8491 Move to...
8492 * build-aux/prev-version, build-aux/announce-gen,
8493 * build-aux/Makefile.am: here.
8494
d4476375
AD
84952005-10-14 Akim Demaille <akim@epita.fr>
8496
8497 * examples/calc++/test: Use set -x only when VERBOSE.
8498
302c0aee
PE
84992005-10-13 Paul Eggert <eggert@cs.ucla.edu>
8500
8501 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
8502 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
8503
7625ec2c
AD
85042005-10-13 Akim Demaille <akim@epita.fr>
8505
8506 * src/scan-skel.l: Output the base name parts of the parser and
8507 header file names.
302c0aee 8508 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
7625ec2c
AD
8509 additional checks.
8510 Use this to exercise C++ outputs in subdirs.
8511 Reported by Oleg Smolsky.
8512
ba0fe3c7
PE
85132005-10-12 Paul Eggert <eggert@cs.ucla.edu>
8514
8515 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
8516 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
8517 Problem reported by John P. Hartmann.
8518 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
8519 already defined it.
8520
9b8a5ce0
AD
85212005-10-12 Akim Demaille <akim@epita.fr>
8522
8523 * src/parse-gram.y (version_check): Exit 63 to please missing
8524 (stands for "version mismatch).
8525 * tests/input.at, doc/bison.texinfo: Adjust.
8526
4f6e011e
PE
85272005-10-10 Paul Eggert <eggert@cs.ucla.edu>
8528
8529 Work around portability problems with Visual Age C compiler
8530 (xlc and xlC_r) reported by John P. Hartmann.
8531 * data/location.cc (initial_column, initial_line): Remove.
8532 All uses replaced by 0 and 1.
8533 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
8534 that xlc complains about.
8535 * src/scan-skel.l (skel_wrap): Likewise.
4d7aa45e 8536 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
ba0fe3c7 8537 as __STDC__.
4d7aa45e
PE
8538 * data/yacc.c (YYMODERN_C): New macro, which also looks at
8539 __STDC_VERSION__. Use it everywhere instead of looking at
8540 __STDC__ and __cplusplus.
4f6e011e 8541
a1b3bf8c
AD
85422005-10-10 Akim Demaille <akim@epita.fr>
8543
8544 * examples/calc++/test: Be quiet unless VERBOSE.
8545
412e44aa
PE
85462005-10-05 Paul Eggert <eggert@cs.ucla.edu>
8547
2a4647a3
PE
8548 * data/c.m4 (yydestruct, yysymprint):
8549 Use YYUSE instead of casting to void.
8550 * data/glr.c (YYUSE): New macro.
8551 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
8552 Use it instead of rolling our own.
8553 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
8554 (YYCHK1):
8555 Use /*CONSTCOND*/ to suppress lint warnings.
8556 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
8557 (YY_STACK_PRINT): Use 'false' not '0'.
8558 (YYUSE): New macro.
8559 (yysymprint_, yydestruct_): Use it instead of rolling our own.
8560 * data/yacc.c (YYUSE): New macro.
8561 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
8562 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
8563 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
8564
8565
412e44aa
PE
8566 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
8567 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
8568
88c6637f
PE
85692005-10-04 Paul Eggert <eggert@cs.ucla.edu>
8570
2f4f028d
PE
8571 Undo the parts of the unlocked-I/O change that substituted
8572 putc or puts for printf. This might hurt performance a bit,
8573 but some people prefer the printf style.
8574 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
8575 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
8576 All uses replaced by YYFPRINTF and YYDPRINTF.
8577 * data/yacc.c: Likewise.
8578 * lib/bitset.c (bitset_print): Likewise.
8579 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
8580 putc and puts.
8581 * lib/lbitset.c (debug_lbitset): Likewise.
8582 * src/closure.c (print_firsts, print_fderives): Likewise.
8583 * src/gram.c (grammar_dump): Likewise.
8584 * src/lalr.c (look_ahead_tokens_print): Likewise.
8585 * src/output.c (escaped_output): Likewise.
8586 (user_actions_output): Break apart two printfs.
8587 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
8588 * src/reduce.c (reduce_print): Likewise.
8589 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
8590 * src/system.h: Include unlocked-io.h rathe than stdio.h.
8591
88c6637f
PE
8592 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
8593 Use assignments rather than casts-to-void to suppress
8594 unused-variable warnings. This pacifies 'lint'.
8595 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
8596 unused-variable warnings.
8597
fb32e373
JMG
85982005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8599
8600 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
8601
edb8f44f
PE
86022005-10-02 Paul Eggert <eggert@cs.ucla.edu>
8603
fb9c0b33
PE
8604 Use unlocked I/O for a minor performance improvement on hosts like
8605 GNU/Linux and Solaris that support unlocked I/O. The basic idea
8606 is to use the gnlib unlocked-io module, and to prefer putc and
8607 puts to printf when either will work (since the latter doesn't
8608 come in an unlocked flavor).
8609 * bootstrap (gnulib_modules): Add unlocked-io.
8610 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
8611 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
8612 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
8613 and similarly for puts and putc and printf.
8614 * data/yacc.c: Likewise.
8615 * lib/bitset.c (bitset_print): Likewise.
8616 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
8617 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
8618 to printf.
8619 * lib/lbitset.c (debug_lbitset): Likewise.
8620 * src/closure.c (print_firsts, print_fderives): Likewise.
8621 * src/gram.c (grammar_dump): Likewise.
8622 * src/lalr.c (look_ahead_tokens_print): Likewise.
8623 * src/output.c (escaped_output): Likewise.
8624 (user_actions_output): Coalesce two printfs.
2f4f028d 8625 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
fb9c0b33
PE
8626 * src/reduce.c (reduce_print): Likewise.
8627 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2f4f028d 8628 * src/system.h: Include unlocked-io.h rather than stdio.h.
fb9c0b33 8629
edb8f44f
PE
8630 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
8631 this confuses xgettext.
8632
b50d2359
AD
86332005-10-02 Akim Demaille <akim@epita.fr>
8634
8635 * bootstrap (gnulib_modules): Add strverscmp.
8636 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
8637 * m4/.cvsignore: Add strverscmp.m4.
8638 * src/parse-gram.y (%require): New token, new rule.
8639 (version_check): New.
8640 * src/scan-gram.l (%require): Adjust.
8641 * tests/input.at (AT_REQUIRE): New.
8642 Use it.
8643 * doc/bison.texinfo (Require Decl): New.
8644 (Calc++ Parser): Use %require.
8645
21667f64
AD
86462005-10-02 Akim Demaille <akim@epita.fr>
8647
8648 * data/location.cc: New.
8649
2b81e969
AD
86502005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
8651 Akim Demaille <akim@epita.fr>
8652
8653 Make sure -odir/foo.cc creates dir/location.hh etc.
8654 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
8655 (spec_file_prefix, spec_verbose_file, spec_graph_file)
8656 (spec_defines_file): Now const.
8657 (dir_prefix): New.
8658 (short_base_name): Remove.
8659 * src/files.c: Adjust.
8660 (dirname.h): Include.
8661 (base_name): Don't prototype it.
8662 (finput): Remove, duplicates gram_in.
8663 (full_base_name, short_base_name): Replace by...
8664 (all_but_ext, all_but_tab_ext): these.
8665 (compute_base_names): Rename as...
8666 (compute_file_name_parts): this.
8667 Update to compute the new variables, including dir_prefix.
8668 Adjust dependencies.
8669 * src/output.c (prepare): Output them.
8670 * src/reader.c: Adjust to use gram_in, not finput.
8671 * src/scan-skel.l (@dir_prefix@): New.
8672
ad6a9b97
JMG
86732005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8674
8675 * lib/subpipe.c: New function end_of_output_subpipe() added
8676 to allow support for non-posix systems. This is a no-op function
8677 for posix systems.
8678
8679 * lib/subpipe.h: New function end_of_output_subpipe() added
8680 to allow support for non-posix systems. This is a no-op function
8681 for posix systems.
8682
8683 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
8684 handle the lack of pipe/fork functionality on non-posix systems.
8685
8686 * djgpp/Makefile.maint: DJGPP specific file.
8687
8688 * djgpp/README.in: DJGPP specific file.
8689
8690 * djgpp/config.bat: DJGPP specific configuration file.
8691
8692 * djgpp/config.sed: DJGPP specific configuration file.
8693
8694 * djgpp/config.site: DJGPP specific configuration file.
8695
8696 * djgpp/config_h.sed: DJGPP specific configuration file.
8697
8698 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
8699
8700 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
8701
fc695704
AD
87022005-10-02 Akim Demaille <akim@epita.fr>
8703
8704 * data/location.cc: New, extract from...
8705 * data/lalr1.cc: here.
8706 (location.hh): Include it after the user prologue, in case the
8707 filename type is defined by the user.
8708 Forward declation location and position before the pre-prologue.
8709 (yyresult_): Rename as...
8710 (yyresult): this, it's a local variable, not an attribute.
8711 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
8712
87132005-10-01 Akim Demaille <akim@epita.fr>
5215c87f
AD
8714
8715 * examples/extexi: Restore the #line generation.
8716
fb9712a9
AD
87172005-09-30 Akim Demaille <akim@epita.fr>,
8718 Alexandre Duret-Lutz <adl@gnu.org>
8719
8720 Move the token type and YYSTYPE in the parser class.
8721 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
8722 (parser::token): New, from the moved free definition of tokens.
8723 (parser::semantic_value): Now a full definition instead of an
8724 indirection to YYSTYPE.
8725 (b4_post_prologue): No longer included in the header file, but
8726 in the implementation file.
8727 * doc/bison.texi (C+ Language Interface): Update.
8728 * src/parse-gram.y: Support unary %define.
8729 * tests/actions.at: Define global_tokens_and_yystype for backward
8730 compatibility until we update the tests.
8731 * tests/calc.at: Idem.
8732 (first_line, first_column, last_line, last_column): Define for lalr1.cc
8733 to simplify the code.
8734
55f0c7b1
PE
87352005-09-29 Paul Eggert <eggert@cs.ucla.edu>
8736
8737 Port to SunOS 4.1.4, which lacks strtoul and strerror.
8738 Ah, the good old days! Problem reported by Peter Klein.
8739 * bootstrap (gnulib_modules): Add strerror, strtoul.
8740 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
8741 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
8742
fb9712a9 87432005-09-29 Akim Demaille <akim@epita.fr>
d4fb5e3c
AD
8744
8745 * data/c.m4 (b4_error_verbose_if): New.
8746 * data/lalr1.cc: Use it.
8747 (YYERROR_VERBOSE_IF): Remove.
8748 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
8749 parser members, replaced by...
8750 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
8751 local variables.
8752 (yysyntax_error_): Takes the state number as argument.
8753 (yyreduce_print_): Use the argument yyrule, not the former
8754 attribute yyn_.
8755
8a6f72f3
PE
87562005-09-26 Paul Eggert <eggert@cs.ucla.edu>
8757
8758 * bootstrap (gnulib_modules): Add verify.
8759 * lib/.cvsignore: Add verify.h.
8760 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
8761 * src/system.h (verify): Remove.
8762 Include verify.h instead.
8763 * src/tables.c (tables_generate): Use new API for 'verify'.
8764
0d50976f
PE
87652005-09-21 Paul Eggert <eggert@cs.ucla.edu>
8766
ebc3737e
PE
8767 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
8768 local variables whose names begin with 'yy'.
8769 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
8770 Trivial changes from Joel E. Denny.
8771
0d50976f
PE
8772 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
8773 it itself.
8774 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
8775 don't use alloca any more.
8776
8777 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
8778 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
62c4328e 8779 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
0d50976f
PE
8780 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
8781 to match yacc.c, to test more hosts.
8782
a05b79df
PE
87832005-09-20 Paul Eggert <eggert@cs.ucla.edu>
8784
55289366
PE
8785 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
8786 doesn't affect behavior.
8787 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
8788 Solaris, AIX, MSC.
8789 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
8790 This works a bit better with glibc, if user code has already included
8791 stdlib.h.
8792 * doc/bison.texinfo (Bison Parser): Document that users can't
8793 arbitrarily use malloc and free for other purposes. Document
8794 that <alloca.h> and <malloc.h> might be included.
8795 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
8796 user must declare alloca.
8797
a05b79df
PE
8798 * HACKING (release): Forwarn the Translation Project about
8799 stable releses.
8800
3ab2ca22
AD
88012005-09-20 Akim Demaille <akim@epita.fr>
8802
8803 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
8804
a9739e7c
PE
88052005-09-19 Paul Eggert <eggert@cs.ucla.edu>
8806
a702593e
PE
8807 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
8808 (YYSTACK_ALLOC_MAXIMUM): Use it.
8809 (yysyntax_error): New function.
8810 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
8811 multiple syntax errors are reported, and alloca is being used.
8812 Instead, reallocate buffers twice as big each time, so that
8813 we waste at most half the allocated memory. Start with a small
8814 (128-byte) buffer that will suffice in most cases anyway.
8815 Use yysyntax_error to do most of the work.
8816
8817 * doc/bison.texinfo (Error Reporting, Table of Symbols):
8818 yynerrs is the number of errors reported, not the number of
8819 errors encountered.
8820
a9739e7c
PE
8821 * tests/glr-regression.at (Duplicated user destructor for lookahead):
8822 Mark it as expected to fail.
8823 Cast result of malloc; problem reported by twlevo@xs4all.nl.
8824 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
8825 Don't start user-code symbols with "yy", to avoid name space problems.
8826
f479c6c6
AD
88272005-09-19 Akim Demaille <akim@epita.fr>
8828
8829 Remove the traits, failed experiment.
8830 It never proved useful, and anyway because of the current
8831 definition, it was not possible to have several specialization of
8832 this traits, making it useless.
8833 * data/lalr1.cc (yy:traits): Remove.
8834 Inline its definitions in the parser class.
8835
e2586f82
AD
88362005-09-19 Akim Demaille <akim@epita.fr>
8837
8838 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
8839 least Mac OSX with a /usr/local install of gettext.
8840
2e8cf949
AD
88412005-09-19 Akim Demaille <akim@epita.fr>
8842
8843 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
8844 and yytoken for similarity with the other skeletons.
8845
c7fb0b90
AD
88462005-09-19 Akim Demaille <akim@epita.fr>
8847
4e26c69e 8848 * NEWS, configure.ac: update version number to 2.1a.
c7fb0b90 8849
1bd0deda
PE
88502005-09-16 Paul Eggert <eggert@cs.ucla.edu>
8851
8852 * NEWS: Version 2.1.
8853
8854 * NEWS: Remove notice of yytname change, since it was never in an
8855 official release.
8856 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
8857 diagnostic.
8858 * src/output.c (prepare): Likewise.
8859 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
8860 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
8861 is not defined. This is an awful hack, but it's enough for now.
8862 All callers changed.
8863 * tests/glr-regression-at (make_value): Args are const pointers now,
8864 to avoid GCC warning.
8865 (Duplicated user destructor for lookahead): New test. Currently
8866 skipped. It fails on my host but I'm not sure it'll always fail.
8867
88682005-09-16 Akim Demaille <akim@epita.fr>
c1432f65
AD
8869
8870 * src/symtab.h (struct symbol): Declare the printer and destructor
8871 as const, to avoid accidental calls to free.
8872 (symbol_destructor_set, symbol_printer_set): Adjust.
8873 * src/symtab.c: Adjust.
8874
1bd0deda 88752005-09-16 Akim Demaille <akim@epita.fr>
cf147260
AD
8876
8877 * data/c.m4 (b4_token_enums): New.
8878 (b4_token_defines): Rename as...
8879 (b4_token_enums_defines): this.
8880 (b4_token_defines): New, output only the #defines.
8881 * data/yacc.c, data/glr.c: Adjust.
8882 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
8883 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
8884 as default values.
8885
dbcdae2d
AD
88862005-09-16 Akim Demaille <akim@epita.fr>
8887
8888 * data/lalr1.cc (yylex_): Remove, inline its code.
8889 (yyreport_syntax_error_): Remove, replaced by...
8890 (yysyntax_error_): this which returns a string and leaves to the
8891 caller the call to the users' error function.
8892 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
8893 Move from members of the parser object...
8894 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
8895 to local variables of the parse function.
8896
70d8f291
AD
88972005-09-16 Akim Demaille <akim@epita.fr>
8898
8899 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
8900 since it's in Bison's name space.
8901
b47dbebe
PE
89022005-09-15 Paul Eggert <eggert@cs.ucla.edu>
8903
ae199bf1
PE
8904 * data/glr.c (yyresolveValue): Add default case to pacify
8905 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
8906
b47dbebe
PE
8907 * NEWS: Document when yyparse started to return 2.
8908 * doc/bison.texinfo (Parser Function): Document when yyparse
8909 returns 2.
8910
8911 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
8912 (b4_filename_type): Renamed back from b4_file_name_type. All uses
8913 changed.
8914 (class position): file_name -> filename (reverting). All uses changed.
8915
89162005-09-14 Paul Eggert <eggert@cs.ucla.edu>
8917
8918 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
8919 do anything if $@ exists. This reverts part of the 2005-07-07
8920 patch.
8921
00292f66
PE
89222005-09-11 Paul Eggert <eggert@cs.ucla.edu>
8923
8924 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
8925 contains obsolete information and isn't worth distributing as a
8926 separate file anyway.
8927 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
8928 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
8929 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
8930 (yyparse): Abort if user code uses longjmp to throw an unexpected
8931 value.
8932
a420f962
PE
89332005-09-09 Paul Eggert <eggert@cs.ucla.edu>
8934
00292f66
PE
8935 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
8936 Suggested by twlevo@xs4all.nl.
8937
127287e9
PE
8938 * data/glr.c (YYCHK1): Do not assume YYE is in range.
8939 This avoids a diagnostic from gcc -Wswitch-enum.
8940 Problem reported by twlevo@xs4all.nl.
8941
a420f962
PE
8942 * doc/bison.texinfo: Don't use "filename", as per GNU coding
8943 standards. Use "file name" or "file" or "name", depending on
8944 the context.
8945 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
8946 not to hack/foo.tab.c.
8947 (Calc++ Top Level): 2nd arg of main is not const.
48b16bbc
PE
8948 * data/glr.c: b4_filename -> b4_file_name.
8949 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
8950 All uses changed.
8951 (class position): filename -> file_name. All uses changed.
8952 * data/yacc.c: b4_filename -> b4_file_name.
8953 * lib/bitset.h: filename -> file_name in local vars.
8954 * lib/bitset_stats.c: Likewise.
8955 * src/files.c: Likewise.
8956 * src/scan-skel.l ("@output ".*\n): Likewise.
8957 * src/files.c (file_name_split): Renamed from filename_split.
8958 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
a420f962
PE
8959
89602005-09-08 Paul Eggert <eggert@cs.ucla.edu>
8961
8962 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
8963 to accommodate latest gnulib.
8964
8965 * tests/glr-regression.at (Duplicate representation of merged trees):
8966 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
8967
8968 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
8969 needed.
8970
42a6501d
PE
89712005-08-26 Paul Eggert <eggert@cs.ucla.edu>
8972
8973 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
8974 All uses changed. Invoke user destructor after an error during a
8975 split parse (trivial change from Joel E. Denny).
8976
8977 * tests/glr-regression.at
8978 (User destructor after an error during a split parse): New test case.
8979 Problem reported by Joel E. Denny in:
8980 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
8981
ef9a1faf
PE
89822005-08-25 Paul Eggert <eggert@cs.ucla.edu>
8983
5b4aaf78
PE
8984 * README-cvs: Give URLs for recommended tools.
8985 Mention Gzip version problem, and bootstrapping issues.
8986 Remove troubleshooting section, as it's somewhat obsolete.
8987
b5240ba5
PE
8988 * bootstrap (no_cache): New var, to accommodate different wget
8989 variants. Use it instead of '-C off'. Problem reported by
8990 twlevo@xs4all.nl.
8991
ef9a1faf
PE
8992 * data/glr.c (yydestroyStackItem): New function.
8993 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
8994 debugging information. Problem reported by Joel E. Denny.
8995
e6efa9da
AD
89962005-08-25 Akim Demaille <akim@epita.fr>
8997
8998 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
8999
adc90f13
PE
90002005-08-24 Paul Eggert <eggert@cs.ucla.edu>
9001
9002 * data/glr.c (yyrecoverSyntaxError, yyreturn):
9003 Don't invoke destructor on unresolved entries.
9004 * tests/glr-regression.at
9005 (User destructor for unresolved GLR semantic value): New test case.
9006 Problem reported by Joel E. Denny in:
9007 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
9008
f9315de5
PE
90092005-08-21 Paul Eggert <eggert@cs.ucla.edu>
9010
15d29c1f
PE
9011 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
9012 Add strnlen.c.
9013 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
9014 lib-prefix.m4, po.m4.
9015
dd5f2af2
PE
9016 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
9017 in yydestruct diagnostic, since it might not be an error.
9018 Problem reported by Joel Denny near end of
9019 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6250acbd 9020 * data/lalr1.cc (yyerturn): Likewise.
dd5f2af2
PE
9021 * data/yacc.c (yyreturn): Likewise.
9022 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
9023
9024 * src/files.c: Remove obsolete FIXME comment.
9025
9026 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
9027 with the other templates, and to fix bogus run-on messages such
9028 as the one reported at the end of
9029 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
9030 All callers changed to avoid the newline.
9031 (yyprocessOneStack): Output two lines rather than one, to accommodate
9032 the above change. This changes the debug output format slightly.
9033
f9315de5
PE
9034 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
9035 reported by Joel E. Denny in
9036 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
9037 (trivial change).
9038 * tests/glr-regression.at (Duplicate representation of merged trees):
9039 New test, from Joel E. Denny in:
9040 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
9041 * THANKS: Add Joel E. Denny.
9042
9043 * configure.ac (AC_INIT): Bump to 2.0c.
9044
04098407
PE
90452005-07-24 Paul Eggert <eggert@cs.ucla.edu>
9046
9047 * NEWS: Version 2.0b.
9048
ca5d2013
PE
9049 * Makefile.am (SUBDIRS): Put examples before tests, so that
9050 "make check" doesn't finish with "All 1 tests passed".
9051
3d54b576
PE
9052 * tests/regression.at (Token definitions): Don't rely on
9053 AT_PARSER_CHECK for data that contains backslashes. It currently
9054 uses 'echo', and 'echo' isn't portable if its argument contains
9055 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
9056 that the byte '\0xff' is not printable in the C locale; it is,
9057 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
9058 not printable, so use '\0x81' to test.
9059
d53ae497
PE
9060 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
9061 version of GCC, since the macro is used with non-GCC compilers.
9062
fc01665e
PE
9063 Fix core dump reported by Pablo De Napoli in
9064 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
9065 * tests/regression.at (Invalid inputs with {}): New test.
9066 * src/parse-gram.y (token_name): Translate type before using
9067 it as an index.
9068
04098407
PE
9069 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
9070 the user's name space. All uses changed to __attribute__
9071 ((__unused__)).
9072 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
9073 Add __attribute__ ((__noreturn__)).
9074
9075 * etc/clcommit: Remove. We weren't using it, and it failed
9076 "make maintainer-distcheck".
9077 * Makefile.maint: Merge from coreutils.
9078 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
9079 (syntax-check-rules): Change list of rules as described below.
9080 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
9081 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
9082 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
9083 (sc_trailing_space): New rules.
9084 (sc_xalloc_h_in_src): Remove.
9085 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
9086 (sc_space_tab, sc_error_exit_success, sc_changelog):
9087 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
9088 (makefile-check, po-check, author_mark_check):
9089 (makefile_path_separator_check, copyright-check):
9090 Use grep -n, to make it easier to find violations.
9091 Use CVS_LIST and CVS_LIST_EXCEPT.
9092 (header_regexp, h_re): Remove.
9093 (dd_c): New macro.
9094 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
9095 (my-distcheck): Use more-modern GCC flags.
9096 (signatures, %.asc): Remove.
9097 (rel-files, announcement): Remove signatures.
9098 Restore old updating code, even though we don't use it, so
9099 that we're the same as coreutils.
9100 (alpha, beta, major): Depend on news-date-check.
9101 Make the upload commands.
9102
9103 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
9104 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
9105 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
9106 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
9107 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
9108 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
9109 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
9110 * tests/sets.at: Likewise.
9111
9112 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
9113 we comment out the Autoconf version number.
9114 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
9115 it's error-prone and "make maintainer-distcheck" rejects it.
9116
9117 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
9118 Indent calls to "error" to pacify "make maintainer-distcheck",
9119 when the calls are not intended to be translated.
9120 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
9121
9122 * src/Makefile.am (DEFS): Use +=, to pacify
9123 "make maintainer-distcheck".
9124 (bison_SOURCES): Add scan-skel.h.
9125 (sc_tight_scope): New rule, from coreutils.
9126
9127 * src/files.c (src_extension, header_extension):
9128 Now static, not extern.
9129 * src/getargs.c (short_options): Likewise.
9130 * src/muscle_tab.c (muscle_table): Likewise.
9131 * src/parse-gram.y (current_class, current_type, current_prec):
9132 Likewise.
9133 * src/reader.c (grammar_end, previous_rule_end): Likewise.
9134 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
9135 * src/main.c (main): Cast bindtextdomain and textdomain calls to
9136 void, to avoid warning when NLS is disabled.
9137 * src/output.c: Include scan-skel.h.
9138 (scan_skel): Remove decl, since scan-skel.h does this.
9139 (output_skeleton):
9140 Indent calls to "error" to pacify "make maintainer-distcheck".
9141 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
9142 * src/reader.h (gram_end, gram_lineno): New decls to pacify
9143 "make maintainer-distcheck".
9144 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
9145 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
9146 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
9147 (skel_lex_destroy, scan_skel): Move these decls to...
9148 * src/scan-skel.h: New file.
9149 * src/uniqstr.c (uniqstr_assert):
9150 Indent calls to "error" to pacify "make maintainer-distcheck".
9151
9152 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
9153 not @VAR@.
9154
9155 * tests/torture.at: Revamp to avoid misuse of atoi that
9156 "make maintainer-distcheck" complained about.
9157
9158 * examples/extexi (message): Don't print a message more than once,
9159 and omit line-number decoration that makes Emacs compile think
9160 that informative messages are worth worrying about.
9161
91622005-07-22 Paul Eggert <eggert@cs.ucla.edu>
9163
9164 * configure.ac: Update version number.
9165
9166 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
9167 accidentally.
9168 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
9169 autogenerated by the maintainer.
9170 * examples/calc++/.cvsignore: Add *.yy.
9171
9172 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
9173 * lib/bitset_stats.c (bitset_stats_init): Likewise.
9174 * lib/bitsetv.c (bitsetv_alloc): Likewise.
9175
9176 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
9177
9178 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
9179 from maintainer-distcheck about casting the argument of 'free'.
9180
9181 * NEWS: Mention recent yytname changes.
9182 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
9183
9184 * bootstrap: For translations that have not yet been upgraded to
9185 the new runtime-po domain, prime the pump by extracting the
9186 relevant strings from the obsolete translations. This code can be
9187 removed once the bison-runtime domain has been translated by each
9188 team.
9189
9190 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
9191 now that token names are already quoted.
9192
9193 Fix problem reported by Anthony Heading.
9194 * data/glr.c (YYTOKEN_TABLE): New macro.
9195 (yytname): Define if YYTOKEN_TABLE.
9196 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
9197 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
9198 (YYERROR_VERBOSE): Define the same way the other skeletons do.
9199 * src/output.c (prepare_symbols): Output token_table_flag.
9200
0ffda363
PE
92012005-07-21 Paul Eggert <eggert@cs.ucla.edu>
9202
9203 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
9204 again if the first call fails.
9205
9206 * data/glr.c (yytnamerr): New function.
9207 (yyreportSyntaxError): Use it to dequote most string literals.
9208 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
9209 with other skeletons. All uses changed.
9210 (yytnameerr_): New function.
9211 (yyreport_syntax_error): Use it to dequote most string literals.
9212 * data/yacc.c (yytnamerr): New function.
9213 (yyerrlab): Use it to decode most string literals.
9214 * doc/bison.texinfo (Decl Summary, Calling Convention):
9215 Clarify quoting convention of yytname.
9216 * src/output.c (prepare_symbols): Quote all names. This undoes
9217 the 2005-04-17 change, which is now accomplished (mostly) via
9218 changes in the parsers as described above.
9219 * tests/regression.at (Token definitions, Web2c Actions):
9220 Undo most 2005-04-17 change here, too.
9221
92222005-07-20 Paul Eggert <eggert@cs.ucla.edu>
9223
9224 Fix more problems reported by twlevo@xs4all.nl.
9225 * tests/cxx-type.at: Don't pipe output of ./types through sed to
9226 remove trailing spaces. This loses the exit status of ./types,
9227 and isn't needed since ./types shouldn't be emitting trailing
9228 spaces.
9229 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
9230 as the stack isn't valid in that case.
9231
9232 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
9233 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
9234 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
9235 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
9236 is used.
9237 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
9238 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
9239 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
9240 Likewise.
9241
9242 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
9243 overly-picky compilers that reject 'char *foo = "bar";'.
9244
9245 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
9246 to FILE * parameter, not to stderr. This fixes a typo introduced
9247 in the 2005-07-12 change.
9248
9249 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
9250 warnings from GCC 4.
9251
9252 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
9253 (yyglrShiftDefer, yysplitStack):
9254 Remove unused parameters b4_pure_formals. All uses changed.
9255 (yyglrShift): Remove unused parameters b4_user_formals.
9256 All uses changed.
9257 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
9258
6100a9aa
PE
92592005-07-18 Paul Eggert <eggert@cs.ucla.edu>
9260
258b75ca
PE
9261 Destructor cleanups and regularization among the three skeletons.
9262 * NEWS: Document the behavior changes.
9263 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
9264 stack before failing, as the cleanup code will do it for us now.
9265 * data/lalr1.cc (yyerrlab): Likewise.
9266 * data/glr.c (yyparse): Pop everything off the stack before
9267 freeing it, so that destructors get called properly.
9268 * data/lalr1.cc (yyreturn): Likewise.
9269 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
9270 This is more consistent.
9271 * doc/bison.texinfo (Destructor Decl): Mention more reasons
9272 why destructors might be called. 1.875 -> 2.1.
9273 (Destructor Decl, Decl Summary, Table of Symbols):
9274 Some English-language cleanups for %destructor.
9275 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
9276 Add output line for destructor of start symbol.
9277 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
9278 because of that same extra output line.
9279
1a059451
PE
9280 * NEWS: Document minor wording changes in diagnostics of
9281 Bison-generated parsers.
9282 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
9283 Remove unused formals. All uses changed.
9284 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
9285 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
9286 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
9287 Rename yyoverflowab to yyexhaustedlab.
9288 When memory exhaustion occurs during syntax-error reporting,
9289 report it separately rather than in a single diagnostic; this
9290 eases translation.
9291 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
9292 (Memory Exhausted): Renamed from Parser Stack Overflow.
9293 Revamp wording slightly to prefer "memory exhaustion".
9294 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
9295
97460c78
PE
9296 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
9297
30757c8c
PE
9298 Add i18n support to the GLR skeleton. Partially fix the C++
9299 skeleton; a C++ expert needs to finish this. Remove debugging
9300 msgids; there's little point to having them translated, since they
9301 can be understood only by someone who can read the
9302 (English-language) source code.
9303
9304 Generate runtime-po/bison-runtime.pot automatically, so that we
9305 don't have to worry about garbage getting in that file. We'll
9306 make sure after the next official release that old msgids don't
9307 get lost. See
9308 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
9309
9310 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
9311 Now auto-generated.
9312 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
9313 Fix typos in explanations of the runtime file.
9314 * bootstrap: Change gettext keyword from YYI18N to YY_.
9315 Use standard Makefile.in.in in runtime-po, since we'll arrange
9316 for backward-compatible bison-runtime.po files in a different way.
9317 * data/glr.c (YY_): New macro, from yacc.c.
9318 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
9319 Translate messages intended for users.
9320 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
9321 the wording in the other skeletons. We don't know that the memory
9322 is virtual.
9323 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
9324 Use same method that yacc.c uses.
9325 Don't translate debugging messages.
9326 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
9327 it doesn't work (yet), and requires C++ expertise to fix.
9328 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
9329 Move defn to a more logical place, to be consistent with other
9330 skeletons.
9331 Don't translate debugging messages.
9332 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
9333 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
9334 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
9335 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
9336
ac8c5689
PE
9337 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
9338 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
9339 void, not int.
9340 * tests/glr-regression.at (Badly Collapsed GLR States):
9341 Likewise.
9342 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9343 yylex should return 0 at EOF rather than aborting.
9344
6100a9aa
PE
9345 Improve tests for stack overflow in GLR parser.
9346 Problem reported by twlevo@xs4all.nl.
9347 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
9348 All uses removed.
9349 (yyStackOverflow): Just longjmp, but with value 2 so that caller
9350 can handle the problem.
9351 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
9352 (yyparse): New local variable yyresult to record the result.
9353 Use result of setjmp to set it, rather than storing itinto
9354 struct.
9355 (yyDone): Remove label.
9356 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
9357 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
9358 if YYABORT is used).
9359 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
9360 yyparse status; put status > 1 into diagnostic.
9361 Check that status==2 works.
9362 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
9363 Use exit status 3 for failure to open (which shouldn't happen).
9364
15f40952
PE
93652005-07-17 Paul Eggert <eggert@cs.ucla.edu>
9366
67fd79c4
PE
9367 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
9368 1 on syntax error; just let yyparse do its thing.
9369 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
9370 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
9371 (Exploding the Stack Size with Alloca):
9372 (Exploding the Stack Size with Malloc):
9373 Expect exit status 2, not 1, since the parser is supposed to blow
9374 its stack. Problem reported by twlevo@xs4all.nl.
9375
15f40952
PE
9376 * data/glr.c (yyparse): Don't assume that the initial calls
9377 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
9378 Print a stack-overflow message and fail instead.
9379 Initialize the line-number information before creating the stack,
9380 so that the stack-overflow message can report line zero safely.
9381
f32c66b5
PE
93822005-07-14 Paul Eggert <eggert@cs.ucla.edu>
9383
a22ff96f 9384 Fix problems reported by twlevo@xs4all.nl.
e2688cd9
PE
9385 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
9386 (yyuserMerge): Provide a default case if b4_mergers is empty.
9387 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
9388 * tests/glr-regression.at
9389 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
c70fdfcd 9390 Add casts to pacify C++ compilers.
1beb0b24
PE
9391 * tests/glr-regression.at (Improper merging of GLR delayed action
9392 sets): Declare yylex before using it.
f32c66b5 9393 * tests/Makefile.am (maintainer-check-g++): Fix a stray
a22ff96f
PE
9394 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
9395 test for valgrind; valgrind is independent of g++.
9396 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
9397 for compatibility with POSIX 1003.1-2001 (if running coreutils).
9398 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
9399 Use a destructor, so that we can expand the stack. Change
9400 YYSTYPE to char * so that we can free it. Cast result of malloc.
f32c66b5 9401
d741bd1b
PE
94022005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9403
9404 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
9405 a valgrind failure. Problem reported by twlevo@xs4all.nl.
9406
0410a6e0
PE
94072005-07-13 Paul Eggert <eggert@cs.ucla.edu>
9408
9409 * PACKAGING: New file, suggested by Bruno Haible and taken from
9410 similar wording in gettext's PACKAGING file.
9411 * NEWS: Mention PACKAGING.
9412 * Makefile.am (EXTRA_DIST): Add PACKAGING.
9413
f7ab6a50
PE
94142005-07-12 Paul Eggert <eggert@cs.ucla.edu>
9415
baf785db 9416 * NEWS: Document recent i18n improvements.
f7ab6a50
PE
9417 * bootstrap: Get runtime translations into runtime-po.
9418 Create runtime-po files automatically, if possible.
9419 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
9420 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
9421 does not infringe on the user's name space.
9422 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
9423 * doc/bison.texinfo (Internationalization): Revamp the English
9424 and Texinfo syntax a bit, to try to make it clearer.
9425 (Bison Options, Option Cross Key): Mention --print-localedir.
9426 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
9427 YYENABLE_NLS. Quote a bit more.
9428 * runtime-po/.cvsignore: New file.
9429 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
9430 * runtime-po/Rules-quot: Remove; now created by bootstrap.
9431 * runtime-po/quot.sed: Likewise.
9432 * runtime-po/boldquot.sed: Likewise.
9433 * runtime-po/en@quot.header: Likewise.
9434 * runtime-po/en@boldquot.header: Likewise.
9435 * runtime-po/insert-header.sin: Likewise.
9436 * runtime-po/remove-potcdate.sin: Likewise.
9437 * runtime-po/Makevars: Likewise.
9438 * runtime-po/LINGUAS: Likewise.
9439 * runtime-po/de.po: Likewise; we will rely on the translation project
9440 to maintain this, so "bootstrap" should get it.
0410a6e0 9441 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
f7ab6a50
PE
9442 its value.
9443 * src/main.c (main): Bind the bison-runtime domain, too.
9444
94452005-07-12 Bruno Haible <bruno@clisp.org>
9446
9447 * data/yacc.c: Include <libintl.h> when NLS is enabled.
9448 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
9449 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
9450 * runtime-po: New directory.
9451 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
9452 $(DOMAIN).pot-update rule, so that old messages are never dropped.
9453 * runtime-po/Rules-quot: New file, copied from po/.
9454 * runtime-po/quot.sed: Likewise.
9455 * runtime-po/boldquot.sed: Likewise.
9456 * runtime-po/en@quot.header: Likewise.
9457 * runtime-po/en@boldquot.header: Likewise.
9458 * runtime-po/insert-header.sin: Likewise.
9459 * runtime-po/remove-potcdate.sin: Likewise.
9460 * runtime-po/Makevars: New file.
9461 * runtime-po/POTFILES.in: New file.
9462 * runtime-po/LINGUAS: New file.
9463 * runtime-po/bison-runtime.pot: New file.
9464 * runtime-po/de.po: New file.
9465 * m4/bison.m4: New file.
9466 * Makefile.am (SUBDIRS): Add runtime-po.
9467 (aclocaldir, aclocal_DATA): New variables.
9468 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
9469 Define aclocaldir.
9470 * src/getargs.c (usage): Document --print-localedir option.
9471 (PRINT_LOCALEDIR_OPTION): New enum item.
9472 (long_options): Add --print-localedir option.
9473 (getargs): Handle --print-localedir option.
9474 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
9475 (Internationalization): New section.
9476
22dda0f0
AD
94772005-07-12 Akim Demaille <akim@epita.fr>
9478
9479 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
9480 for consistency with the rest of the code.
9481 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
9482 Add separators.
9483
82b248ad
AD
94842005-07-12 Akim Demaille <akim@epita.fr>
9485
9486 * src/parse-gram.y: Use %printer instead of YYPRINT.
9487
fa0e9314
AD
94882005-07-12 Akim Demaille <akim@epita.fr>
9489
867a3e00
AD
9490 * src/symtab.h, src/symtab.c (symbol_print): New.
9491 * src/symlist.h, src/symlist.c (symbol_list_print): New.
9492 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
9493
94942005-07-12 Akim Demaille <akim@epita.fr>
9495
9496 * data/glr.c (b4_syncline): Fix (swap) the definitions of
fa0e9314
AD
9497 b4_at_dollar and b4_dollar_dollar.
9498
e054b190
PE
94992005-07-11 Paul Eggert <eggert@cs.ucla.edu>
9500
9501 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
9502 and Pennello's paper.
9503
34160ec4
PE
95042005-07-09 Paul Eggert <eggert@cs.ucla.edu>
9505
407d4a75
PE
9506 * data/yacc.c (yyparse): Undo previous patch. Instead,
9507 set yylsp[0] and yyvsp[0] only if the initial action
9508 sets yylloc and yylval, respectively.
9509
34160ec4
PE
9510 * data/yacc.c (yyparse): In the initial action, set
9511 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
9512 This avoids the use of undefined variables if the initial
9513 action does not set yylloc and/or yylval.
9514
c3d5a4a7
PE
95152005-07-07 Paul Eggert <eggert@cs.ucla.edu>
9516
b34d96c1
PE
9517 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
9518 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
9519 Remove from CVS. These files are automatically generated.
9520 * examples/extexi: Clarify that this file is now part of Bison,
9521 not GNU M4, and that it works with any POSIX-compatible Awk.
9522 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
9523 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
9524 so that we also get calc++-parser.yy. Geneate it.
9525 Use $(AWK), not gawk, since any conforming Awk will do.
9526 Put comment before action, since older 'make' can't handle comment
9527 in action.
9528 $(BUILT_SOURCES): List all built sources, not just some of them.
9529 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
9530 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
9531 $($(calc_sources_generated)): Remove unnecessary test for existence
9532 of target. (This had a shell syntax error anyway; a stray "x".)
9533 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
9534 calc++-parser.yy.
9535 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
9536
c3d5a4a7
PE
9537 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
9538 implied by the other modules.
9539
828c373b
AD
95402005-07-06 Akim Demaille <akim@epita.fr>
9541
9542 Bind examples/calc++ to the package.
9543 * examples/calc++/Makefile: Remove, replaced by...
9544 * examples/calc++/Makefile.am: ... this new file.
9545 * examples/calc++/test: Remove input.
9546 * examples/calc++/compile: Remove.
9547 * examples/Makefile.am: New.
9548 * configure.ac, Makefile.am: Adjust.
9549 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
9550
63cb01d6
PE
95512005-07-05 Paul Eggert <eggert@cs.ucla.edu>
9552
fd2df2ed
PE
9553 * data/glr.c (yyFail): Drastically simplify; since the format argument
9554 never had any % directives, we can simply pass it to yyerror.
9555 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
9556 be modified later, as that is the usual style in glr.c.
9557 Problems reported by Paul Hilfinger.
9558
63cb01d6
PE
9559 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
9560 and size overflow errors.
9561 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
9562 in case the user prolog sets feature-test macros like _GNU_SOURCE.
9563 (YYSIZEMAX): New macro.
9564 (yystpcpy): New function, taken from yacc.c.
9565 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
9566 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
9567 so that we don't have to maintain their signatures.
9568 (yyFail): Check for buffer overflow, by using vsnprintf rather
9569 than vsprintf. Allocate a bigger buffer if possible.
9570 Report an error if buffer allocation fails.
9571 (yyStackOverflow): New function.
9572 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
9573 the initialization was successful. It might fail if storage was
9574 exhausted.
9575 (yyexpandGLRStack): Add more checks for storage allocation failure.
9576 Use yyStackOverflow to report failures.
9577 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
9578 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
9579 Don't assume stack number fits in int.
9580 (yysplitStack): Check for storage allocation failure.
9581 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
9582 can print diagnostics on storage allocation failure. All callers
9583 changed.
9584 (yyresolveValue): Use yybool for boolean.
9585 (yyreportSyntaxError): Check for size-calculation overflow.
9586 This code is taken from yacc.c.
9587 (yyparse): Check for storage allocation errors when allocating
9588 the initial stack.
9589
1c59e0a1
AD
95902005-07-05 Akim Demaille <akim@epita.fr>
9591
9592 Extract calc++ from the documentation.
9593 * doc/bison.texinfo (Calc++): Add the extraction marks.
9594 * examples/extexi: New, from the aborted GNU Programming 2E.
9595 Separate the different paragraph of a file with empty lines.
9596 * examples/Makefile: Use it to extract the whole calc++ example.
9597
8a0adb01
AD
95982005-06-24 Akim Demaille <akim@epita.fr>
9599
9600 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
9601 class typedefs.
9602
12545799
AD
96032005-06-22 Akim Demaille <akim@epita.fr>
9604
9605 * doc/bison.texinfo (C++ Language Interface): First stab.
9606 (C++ Parsers): Remove.
9607
99be0235
AD
96082005-06-22 Akim Demaille <akim@epita.fr>
9609
9610 * data/lalr1.cc (yylex_): Honor %lex-param.
9611
0ffd4fd1
AD
96122005-06-22 Akim Demaille <akim@epita.fr>
9613
9614 Start a set of simple examples.
9615 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
9616 * examples/calc++/calc++-driver.hh,
9617 * examples/calc++/calc++-parser.yy,
9618 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
9619 * examples/calc++/compile, examples/calc++/test: New.
9620
0925ebb4
PE
96212005-06-09 Paul Eggert <eggert@cs.ucla.edu>
9622
9623 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
9624 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
9625 which stems from the 2005-05-27 patch.
9626
43d3b664
PH
96272005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9628
9629 * data/glr.c: Modify treatment of unused parameters to permit use
9630 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
9631
3062864d
PE
96322005-05-30 Paul Eggert <eggert@cs.ucla.edu>
9633
9634 Fix infringement on user name space reported by Janos Zoltan Szabo.
9635 * data/yacc.c (yyparse): strlen -> yystrlen.
9636
989b5b8e
AD
96372005-05-30 Akim Demaille <akim@epita.fr>
9638
9639 * data/lalr1.cc (_): New.
9640 Translate the various messages.
9641
bedf57f5
PE
96422005-05-27 Paul Eggert <eggert@cs.ucla.edu>
9643
9644 Fix infringement on user name space reported by Bruno Haible.
9645 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
9646 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
9647 the user's name space.
9648 (alloca): Include <stdlib.h> to get it, if it's not built in.
9649 (YYMALLOC, YYFREE): Define only if needed.
9650 (malloc, free): Declare, but only if needed, as this infringes on
9651 the user name space.
9652
4d1801f1
PE
96532005-05-25 Paul Eggert <eggert@cs.ucla.edu>
9654
9655 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
9656 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
9657 with %d format.
9658 * lib/ebitset.c (min, max): Undef before defining.
9659 * lib/vbitset.c (min, max): Likewise.
9660 * lib/subpipe.c (create_subpipe): Save local variables in case
9661 vfork clobbers them.
9662
96632005-05-24 Bruno Haible <bruno@clisp.org>
9664
9665 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
9666 error message syntax used by gcc-4.0.
9667
b94a9e1e
PE
96682005-05-23 Paul Eggert <eggert@cs.ucla.edu>
9669
85ac3861
PE
9670 * README: Mention m4 1.4.3. Remove obsolete advice about
9671 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
9672
b94a9e1e
PE
9673 * bootstrap: Remove workaround for problem I encountered with
9674 gettext 0.14.1; it seems to be fixed now.
9675
51c30d21
PE
96762005-05-22 Paul Eggert <eggert@cs.ucla.edu>
9677
009ce67d
PE
9678 * NEWS: Version 2.0a.
9679
f2a97c62
PE
9680 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
9681 the previous change.
9682
c8775f93
PE
9683 Various maintainer cleanups.
9684 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
9685 conftest*, for benefit of CVS commands run at the same time as
9686 "configure". Add build-aux, since "bootstrap" now creates it and
9687 its subfiles.
9688 * Makefile.cfg (move_if_change): Remove.
9689 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
9690 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
9691 (po_repo, do-po-update, po-update, wget_files, get-targets):
9692 (config.guess-url_prefix, config.sub-url_prefix):
9693 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
9694 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
9695 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
9696 Remove.
9697 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
9698 this is now the recommended name.
9699 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
9700 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
9701 ylwrap. These files now go into build-aux.
9702 * config/move-if-change: Remove.
9703 * config/prev-version.txt: Bump from 1.75 to 2.0.
9704
3ea5f0ec
PE
9705 * bootstrap: Add stdio-safer, unistd-safer modules.
9706 Remove m4/glibc2.m4 (introduced by latest gnulib, but
9707 we don't need it).
9708 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
9709 fopen-safer.c, stdio-safer.h, unistd-safer.h.
9710 * lib/subpipe.c: Include "unistd-safer.h".
9711 (create_subpipe): Make sure all the newly-created
9712 file descriptors are > 2, so that diagnostics don't
9713 get sent down them (which might cause Bison to hang, in theory).
9714 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
9715 * src/files.c (xfopen): Use fopen_safer, not fopen.
9716
51c30d21
PE
9717 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
9718 yesterday's yacc.c fix.
9719
cea1469d
PE
97202005-05-21 Paul Eggert <eggert@cs.ucla.edu>
9721
3ea5f0ec
PE
9722 * data/glr.c, data/lalr1.cc: Update copyright date.
9723
cea1469d
PE
9724 Fix a destructor bug reported by Wolfgang Spraul in
9725 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
9726 * data/yacc.c (yyabortlab): Don't call destructor, and
9727 don't set yychar to EMPTY.
9728 (yyoverflowlab): Don't call destructor.
9729 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
9730 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
9731 since we no longer output the message "discarding lookahead token
9732 end of input ()".
9733
5e6f62f2
PH
97342005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9735
9736 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
9737 fix a small glitch in debugging output.
9738 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
9739 after YY_SYMBOL_PRINT where needed.
9740
9741 (struct yyGLRState): Add some comments.
9742 (struct yySemanticOption): Add some comments.
9743 (union yyGLRStackItem): Add comment.
9744
9745 (yymergeOptionSets): Correct this to properly perform the union,
9746 avoiding infinite reported by Michael Rosien.
9747 Update comment.
9748
9749 * tests/glr-regression.at: Add test for GLR merging error reported
9750 by M. Rosien.
cea1469d 9751
0fb669f9
PE
97522005-05-13 Paul Eggert <eggert@cs.ucla.edu>
9753
9754 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
9755 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
9756 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
9757 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
9758 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
9759 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
9760 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
9761 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
9762 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
9763 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
9764 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
9765 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
9766 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
9767 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
9768 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
9769 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
9770 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
9771 src/derives.h, src/files.c, src/files.h, src/getargs.c,
9772 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
9773 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
9774 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
9775 src/output.h, src/parse-gram.c, src/parse-gram.h,
9776 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
9777 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
9778 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
9779 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
9780 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
9781 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
9782 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
9783 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
9784 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
9785 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
9786 tests/reduce.at, tests/regression.at, tests/sets.at,
9787 tests/synclines.at, tests/testsuite.at, tests/torture.at:
9788 Update FSF postal mail address.
9789
51f4735e
PE
97902005-05-11 Paul Eggert <eggert@cs.ucla.edu>
9791
9792 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
9793 Problem reported by Ralf Menzel.
9794
80ce3401
PE
97952005-05-01 Paul Eggert <eggert@cs.ucla.edu>
9796
9797 * tests/actions.at: Test that stack overflow invokes destructors.
9798 From Marcus Holland-Moritz.
9799 * data/yacc.c (yyerrlab): Move the code that destroys the stack
9800 from here....
9801 (yyreturn): to here. That way, destructors are called properly
9802 even if the stack overflows, or the user calls YYACCEPT or
9803 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
9804 (yyoverflowlab): Destroy the lookahead.
9805
98062005-04-24 Paul Eggert <eggert@cs.ucla.edu>
9807
9808 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
9809
72f000b0
PE
98102005-04-17 Paul Eggert <eggert@cs.ucla.edu>
9811
9812 * NEWS: Bison-generated C parsers no longer quote literal strings
9813 associated with tokens.
9814 * src/output.c (prepare_symbols): Don't escape strings,
9815 since users don't want to see C escapes.
9816 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
9817 in diagnostics.
c19683bb 9818 * tests/input.at (Torturing the Scanner): Likewise.
72f000b0
PE
9819 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
9820
1094323f
PE
98212005-04-16 Paul Eggert <eggert@cs.ucla.edu>
9822
9823 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
9824 the data size is known to be too small and we can't increase it.
9825 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
9826
ca407bdf
PE
98272005-04-15 Paul Eggert <eggert@cs.ucla.edu>
9828
9829 * src/parse-gram.y: Include quotearg.h.
9830 (string_as_id): Quote $1 before using it as a key, since the
9831 lexer no longer quotes it for us.
9832 (string_content): Don't strip quotes, since lexer no longer
9833 quotes it for us.
9834 * src/scan-gram.l: Include quotearg.h.
9835 ("\""): Omit quote.
9836 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
9837 a key, since the rest of the lexer doesn't quote it.
9838 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
9839 * tests/regression.at (Token definitions): Check for backslashes
9840 in token strings.
9841
9842 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
9843 (YYSIZE_T): Define to unsigned long int when using an older compiler.
9844 (yyparse): Revamp code to generate long syntax error message, to
9845 make it easier to translate, and to avoid problems with arithmetic
9846 overflow. Change "virtual memory" to "memory" in diagnostic, since
9847 we don't know whether the memory is virtual.
9848
1ce59070
PE
98492005-04-13 Paul Eggert <eggert@cs.ucla.edu>
9850
9851 * NEWS: Bison-generated C parsers now use the _ macro to
9852 translate strings.
9853 * data/yacc.c (_) [!defined _]: New macro.
9854 All English strings wrapped inside this macro.
9855 * doc/bison.texinfo (Bison Parser): Document _.
9856 * po/POTFILES.in: Include src/parse-gram.c, since it now
9857 includes translateable strings that parse-gram.y doesn't.
9858
a749a695
PE
98592005-04-12 Paul Eggert <eggert@cs.ucla.edu>
9860
9861 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
9862 reverting the 2004-10-11 change to this function.
9863 (symbol_check_alias_consistency): Don't call symbol_type_set
9864 if the type name is already correct.
9865 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
9866
8fb1053b
PE
98672005-03-25 Paul Eggert <eggert@cs.ucla.edu>
9868
9869 * tests/regression.at (Token definitions): Don't use a token named
9870 c, as that generates a "#define c ..." that runs afoul of buggy
9871 stdlib.h that uses the identifier c as a member of struct
9872 drand48_data. Problem reported by Horst Wente.
9873
ff498c4a
PE
98742005-03-21 Paul Eggert <eggert@cs.ucla.edu>
9875
9876 * bootstrap: Change translation URL from
9877 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
9878 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
9879 redirection glitches. Problem reported by twlevo@xs4all.nl.
9880
65211d70
PE
98812005-03-20 Paul Eggert <eggert@cs.ucla.edu>
9882
9883 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
9884 after operands; POSIX says this isn't portable for the c99 command.
9885
9577fb1f
PE
98862005-03-18 Paul Eggert <eggert@cs.ucla.edu>
9887
9888 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
9889 immediately if a data overrun has occurred; this may help us track
9890 down what may be a spurious failure on MacOS.
9891
78b178f7
PE
98922005-03-17 Paul Eggert <eggert@cs.ucla.edu>
9893
a2599d0f
PE
9894 Respond to problems reported by twlevo@xs4all.nl.
9895
9896 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
9897
78b178f7
PE
9898 * src/vcg.h: Comment fix.
9899 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
9900 (G_CMAX): Change to -1 instead of INT_MAX.
9901
9902 * data/yacc.c (yyparse): Omit spaces before #line.
78b178f7 9903
7296e729
PE
99042005-03-15 Paul Eggert <eggert@cs.ucla.edu>
9905
9906 * src/tables.c (state_number_to_vector_number): Put it inside an
9907 "#if 0", since it's not currently used. Problem reported by
9908 Roland McGrath.
9909
05ac60f3
PE
99102005-03-06 Paul Eggert <eggert@cs.ucla.edu>
9911
9912 * src/output.c (escaped_output): Renamed from
9913 escaped_file_name_output, since we now use it for symbol tags as
9914 well. All uses changed.
9915 (symbol_destructors_output, symbol_printers_output):
9916 Escape symbol tags too.
9917 Problem reported by Matyas Forstner in
9918 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
9919
9920 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
9921 not needed.
9922 * src/output.c (user_actions_output, token_definitions_output,
9923 symbol_destructors_output, symbol_printers_output): Likewise.
9924 * src/reader.c (prologue_augment): Likewise.
9925 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
9926
9927 * src/vcg.c (output_edge): Don't quote linestyle arg.
9928 Problem reported by twlevo@xs4all.nl.
9929
7eb453ac
PE
99302005-02-28 Paul Eggert <eggert@cs.ucla.edu>
9931
9932 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
9933 example, reported by Derek M Jones. Also, make the example even
9934 more outrageous, to better illustrate how bad the problem is.
9935
4c04c52a
PE
99362005-02-24 Paul Eggert <eggert@cs.ucla.edu>
9937
9938 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
9939 putsym. Typo reported by Sebastian Piping.
9940
a61e1620
PE
99412005-02-23 Paul Eggert <eggert@cs.ucla.edu>
9942
9943 * doc/bison.texinfo (Language and Grammar): some -> same
9944 (Epilogue): int he -> in the
9945 Typos reported by Sebastian Piping via Justin Pence.
9946
9ec93868
PE
99472005-02-07 Paul Eggert <eggert@cs.ucla.edu>
9948
9949 * tests/glr-regression.at (Improper handling of embedded actions
9950 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
9951 embedded actions and $-N in GLR parsers", work around an Autoconf bug
9952 with dollar signs in test names.
9953 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
9954 for a similar reason.
9955
73ce7e7e
PE
99562005-01-28 Paul Eggert <eggert@cs.ucla.edu>
9957
9958 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
9959 wants to redefine G_VIEW.
9960
2e72b98e
PE
99612005-01-27 Paul Eggert <eggert@cs.ucla.edu>
9962
9963 * src/vcg.c (get_view_str): Remove case for normal_view.
9964 Problem reported by twlevo@xs4all.nl.
9965
e0d634e5
PE
99662005-01-24 Paul Eggert <eggert@cs.ucla.edu>
9967
ccf830a4
PE
9968 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
9969 Problem reported by twlevo@xs4all.nl.
9970
e0d634e5
PE
9971 * doc/bison.texinfo: Change @dircategory from "GNU programming
9972 tools" to "Software development". Requested by Richard Stallman
9973 via Karl Berry.
9974
7bbc8cb0
PE
99752005-01-23 Paul Eggert <eggert@cs.ucla.edu>
9976
9977 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
9978 Problem reported by twlevo@xs4all.nl.
9979
08b770bc
PE
99802005-01-21 Paul Eggert <eggert@cs.ucla.edu>
9981
9982 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
9983 keyword; it's not needed with modern compilers, and it doesn't
9984 affect correctness with older compilers. Suggested by
9985 twlevo@xs4all.nl.
9986
95f22ad2
PE
99872005-01-17 Paul Eggert <eggert@cs.ucla.edu>
9988
9989 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
9990 gcc -Wswitch-default.
9991 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
9992 * data/yacc.c (yyparse): Likewise.
9993
d229d15c
PE
99942005-01-12 Paul Eggert <eggert@cs.ucla.edu>
9995
9996 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
9997 already. Let config.h define any nonstandard values.
9998
ecadd90f
PE
99992005-01-10 Paul Eggert <eggert@cs.ucla.edu>
10000
10001 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
10002 for the benefit of slower hosts. Problem reported by
10003 Nelson H. F. Beebe.
10004
213744b5
PE
100052005-01-07 Paul Eggert <eggert@cs.ucla.edu>
10006
10007 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
10008 being defined and not used.
10009 * data/lalr1.cc (yyparse): Likewise.
10010 Use "if (false)" rather than "if (0)".
10011
249d3236
PE
100122005-01-05 Paul Eggert <eggert@cs.ucla.edu>
10013
10014 * TODO: Mention that we should allow NUL bytes in tokens.
10015
987cc1fb
PE
100162005-01-02 Paul Eggert <eggert@cs.ucla.edu>
10017
10018 * src/scan-skel.l (<<EOF>>): Don't close standard output.
10019 Problem reported by Hans Aberg.
10020
08fe02d9
PE
100212005-01-01 Paul Eggert <eggert@cs.ucla.edu>
10022
10023 * src/getargs.c (version): Happy new year; update overall
10024 program copyright date from 2004 to 2005.
10025
10026 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
10027 Problem reported by Hans Aberg.
10028 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
10029 (Output file names.): Add a test for the case when standard output
10030 is closed.
10031
010c0266
PE
100322004-12-26 Paul Eggert <eggert@cs.ucla.edu>
10033
10034 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
10035 to fix an oversight in the Bison 2.0 manual.
10036
da12206a
PE
100372004-12-25 Paul Eggert <eggert@cs.ucla.edu>
10038
10039 * NEWS: Version 2.0. Reformat the existing news items since
10040 1.875, so that related items are grouped together.
3a4734aa 10041 * configure.ac (AC_INIT): Bump version to 2.0.
da12206a
PE
10042 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
10043
c935d934
PE
10044 * tests/torture.at (Exploding the Stack Size with Alloca): Set
10045 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
10046 otherwise, we're not testing alloca. Unfortunately there's no
10047 simple way to consult HAVE_ALLOCA here.
10048
da12206a
PE
10049 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
10050 for yymsg, too.
10051
10052 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
10053 hand. This avoids a warning about comparing int to size_t when
10054 GCC warnings are enabled.
10055
0a2c5137
PE
100562004-12-22 Paul Eggert <eggert@cs.ucla.edu>
10057
d7e14fc0
PE
10058 * NEWS: Bison-generated parsers no longer default to using the
10059 alloca function (when available) to extend the parser stack, due
10060 to widespread problems in unchecked stack-overflow detection.
10061 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
10062 responsibility to set it to a positive value. This lets the user
10063 specify a value that is not a preprocessor constant.
10064 * data/yacc.c (YYMAXDEPTH): Likewise.
10065 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
10066 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
10067 to be a compile-time constant. However, explain the constraints on it.
10068 Also, explain the constraints on YYINITDEPTH.
10069 (Table of Symbols): Explain that alloca is no longer the default.
10070 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
10071 to 1.
10072
0a2c5137
PE
10073 * doc/bison.texinfo (Location Default Action): Mention that n must
10074 be zero when k is zero. Suggested by Frank Heckenbach.
10075
e019c247
AD
100762004-12-22 Akim Demaille <akim@epita.fr>
10077
10078 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
10079 (parser::state_type, parser::semantic_type, parser::location_type):
10080 Private, not public.
10081 (parser::parse): Return ints, not bool.
10082 Returning a bool introduces a problem: 0 corresponds to false, and
10083 it seems weird to return false on success. Returning true changes
10084 the conventions for yyparse.
10085 Alternatively we could return void and send an exception.
10086 There is no clear consensus (yet?).
10087 (state_stack, semantic_stack, location_stack): Rename as...
10088 (state_stack_type, semantic_stack_type, location_stack_type): these.
10089 Private, not public.
10090 * tests/c++.at: New.
10091 * tests/testsuite.at, tests/Makefile.am: Adjust.
10092
72731bb7
AD
100932004-12-21 Akim Demaille <akim@epita.fr>
10094
10095 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
10096
9a0d8bec
AD
100972004-12-21 Akim Demaille <akim@epita.fr>
10098
10099 Don't impose std::string for filenames.
10100
10101 * data/lalr1.cc (b4_filename_type): New.
10102 (position::filename): Use it.
10103 (parser.hh): Move the inclusion of stack.hh and location.hh below
10104 the user code, so that needed headers for the filename type can be
10105 included first.
72731bb7
AD
10106 Forward declare them before the user code.
10107 * tests/Makefile.am (check-local, installcheck-local): Pass
10108 TESTSUITEFLAGS to the TESTSUITE.
9a0d8bec 10109
99880de5
AD
101102004-12-20 Akim Demaille <akim@epita.fr>
10111
10112 Use more STL like names: my_class instead of MyClass.
10113
10114 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
10115 (SemanticStack, SemanticType, StateStack, StateType)
10116 (TokenNumberType, Stack, Slice, Traits, Parser::location)
10117 (Parser::value): Rename as...
10118 (location_stack, location_type, rhs_number_type, semantic_stack)
10119 (semantic_type, state_stack, state_type, token_number_type, stack)
10120 (slice, traits, parser::yylloc, parser::yylval): these.
10121
10122 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
10123
9bec482e
PE
101242004-12-19 Paul Eggert <eggert@cs.ucla.edu>
10125
10126 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
10127 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
10128
f6fbd3da
PE
101292004-12-17 Paul Eggert <eggert@cs.ucla.edu>
10130
10131 Remove uses of 'short int' and 'unsigned short int'. This raises
10132 some arbitrary limits. It uses more memory but nowadays that's
10133 not much of an issue.
10134
10135 This change does not affect the generated parsers; that's a different
10136 task, as some users will want to conserve memory there.
10137
10138 Ideally we should use size_t to represent all object counts, and
10139 something like ptrdiff_t to represent signed differences of object
10140 counts; but that will require more code-cleanup than I have the
10141 time to do right now.
10142
10143 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
10144 Use size_t, not int or short int, to count objects.
10145 * src/closure.c (nritemset, closure): Likewise.
10146 * src/closure.h (nritemset, closure): Likewise.
10147 * src/nullable.c (nullable_compute): Likewise.
10148 * src/print.c (print_core): Likewise.
10149 * src/print_graph.c (print_core): Likewise.
10150 * src/state.c (state_compare, state_hash): Likewise.
10151 * src/state.h (struct state): Likewise.
10152 * src/tables.c (default_goto, goto_actions): Likewise.
10153
10154 * src/gram.h (rule_number, rule): Use int, not short int.
10155 * src/output.c (prepare_rules): Likewise.
10156 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
10157 errs, reductions): Likewise.
10158 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
10159 Likewise.
10160 * src/tables.c (vector_number, tally, action_number,
10161 ACTION_NUMBER_MINIMUM): Likewise.
10162 * src/output.c (muscle_insert_short_int_table): Remove.
10163
efeed023
AD
101642004-12-17 Akim Demaille <akim@epita.fr>
10165
10166 * data/lalr1.cc: Extensive Doxygenation.
10167 (error_): Rename as...
10168 (error): this, since it is visible to the user.
10169 Adjust callers.
10170 (Parser::message): Now an automatic variable from...
10171 (Parser::yyreport_syntax_error_): here.
10172 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
10173 Parser::error.
10174 * tests/input.at: Escape $.
10175
bc82c5a5
PE
101762004-12-16 Paul Eggert <eggert@cs.ucla.edu>
10177
10178 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
10179 Parenthesize rhs to avoid obscure problems with mistakes like
10180 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
10181 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
10182 b4_rhs_location): Likewise.
10183 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
10184 b4_rhs_location): Likewise.
10185
fd19f271
AD
101862004-12-16 Akim Demaille <akim@epita.fr>
10187
10188 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
10189 yacc.c: be sure to stay within yycheck_.
10190 * tests/actions.at: Re-enable C++ tests.
10191
10454ea4
AD
101922004-12-16 Akim Demaille <akim@epita.fr>
10193
10194 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
10195 real.
10196
c5b95ccf
AD
101972004-12-16 Akim Demaille <akim@epita.fr>
10198
10199 Use #define to handle the %name-prefix.
10200
10201 * data/glr.c, data/yacc.c: Comment changes.
10202 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
10203 so that one can refer to yylex in the parser file, and have it
10204 renamed, as is the case with other skeletons.
10205
617a8f12
AD
102062004-12-16 Akim Demaille <akim@epita.fr>
10207
10208 Move lalr1.cc internals into yy*.
10209
10210 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
10211 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
10212 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
10213 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
10214 (empty_, final_, terror_, errcode_, ntokens_)
10215 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
10216 (looka_, ilooka_, error_range_, nerrs_):
10217 Rename as...
10218 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
10219 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
10220 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
10221 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
10222 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
10223 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
10224 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
10225 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
10226 these.
10227
1e547e6e
PE
102282004-12-15 Paul Eggert <eggert@cs.ucla.edu>
10229
10230 Fix some problems reported by twlevo at xs4all.
10231 * src/symtab.c (symbol_new): Report an error if the input grammar
10232 contains too many symbols. This is better than calling abort() later.
10233 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
10234 (struct node, struct graph):
10235 Rename member expand to stretch. All uses changed.
10236 (struct graph): Remove member layoutalgorithm. All uses removed.
10237 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
10238 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
10239 All uses changed.
10240 (N_STRETCH): Rename from N_EXPAND. All uses changed.
10241
735d6bd4
AD
102422004-12-15 Akim Demaille <akim@epita.fr>
10243
10244 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
10245 Add more Doxygen comments.
10246 (symprint_, stack_print_, reduce_print_, destruct_, pop)
10247 (report_syntax_error_, translate_): Rename as...
10248 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
10249 (yypop_, yyreport_syntax_error_, yytranslate_): this.
10250
2e1f5829
AD
102512004-12-15 Akim Demaille <akim@epita.fr>
10252
10253 * data/lalr1.cc (lex_): Rename as...
10254 (yylex_): this.
10255 Move the trace here.
10256 Take the %name-prefix into account.
10257 Reported by Alexandre Duret-Lutz.
10258
a3cb6248
AD
102592004-12-15 Akim Demaille <akim@epita.fr>
10260
10261 Simplify the C++ parser constructor.
10262
10263 * data/lalr1.cc (debug_): Rename as...
10264 (yydebug_): so that the parser's internals are always in the yy*
10265 pseudo namespace.
10266 Adjust uses.
10267 (b4_parse_param_decl): Remove the leading comma as it is now only
10268 called as unique argument list.
10269 (Parser::Parser): Remove the constructor accepting a location and
10270 an initial debugging level.
10271 Remove from the other ctor the argument for the debugging level.
10272 (debug_level_type, debug_level, set_debug_level): New.
10273
10274 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
10275 constructor calls.
10276
07fed891
AD
102772004-12-15 Akim Demaille <akim@epita.fr>
10278
10279 Remove b4_root related material: failure experiment
a3cb6248 10280 (which goal was to allow to derive from a class).
07fed891
AD
10281
10282 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
10283 definitions and uses.
10284
e603eaa5
PE
102852004-12-14 Paul Eggert <eggert@cs.ucla.edu>
10286
10287 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
10288 not 2, since it's not portable to subtract 1 from the start of an
10289 array. The new item 0 is never set or used. All uses changed.
10290
10291 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
10292 the default definition of YYLLOC_DEFAULT. Problem reported
10293 by Frank Heckenbach.
10294
fafb007d
PE
102952004-12-12 Paul Eggert <eggert@cs.ucla.edu>
10296
10297 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
10298 the normal case and one for the error case. Just use the
10299 first one uniformly. Problem reported by Frank Heckenbach.
10300 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
10301 use exactly the same macro in both places.
10302 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
10303 so that the normal-case YYRHSLOC works for the error case too.
10304 All uses changed.
10305 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
10306 (YYLLOC_DEFAULT): Use the same macro as glr.c.
10307 * doc/bison.texinfo (Location Default Action): Don't claim that
10308 we have an array of locations. Use the same macro for both glr
10309 and lalr parsers. Mention YYRHSLOC. Mention what happens when
10310 the index is 0.
10311
48814dcd
PE
103122004-12-10 Paul Eggert <eggert@cs.ucla.edu>
10313
a4e1a53b
PE
10314 * HACKING: Update email addresses to send announcements to.
10315
48814dcd
PE
10316 * configure.ac (AC_INIT): Bump version to 1.875f.
10317
337116ba
PE
103182004-12-10 Paul Eggert <eggert@cs.ucla.edu>
10319
10320 * NEWS: Version 1.875e.
10321 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
10322
10323 * src/scan-skel.l: Include "complain.h", for "fatal".
10324
10325 * src/relation.h (relation_print, relation_digraph):
10326 Relation sizes are of type relation_node, not size_t (this is
10327 merely a doc fix, since the two types are equivalent).
10328 (relation_transpose): Relation sizes are of type relation_node,
10329 not int.
10330 * src/relation.c: Likewise.
10331 (top, infinity): Now of type relation_node, not int.
10332 (traverse, relation_transpose): Use relation_node, not int.
10333
10334 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
10335 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
10336 (yyparse): Remove unused local introduced in 2004-10-25 patch.
10337
10338 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
68b082af 10339 specifying whether the test should be skipped. Use it tp
337116ba 10340 specify that the [%defines %skeleton "lalr1.cc"] tests currently
68b082af 10341 fail on some hosts, and should be skipped.
337116ba 10342
da2a7671
PE
103432004-12-08 Paul Eggert <eggert@cs.ucla.edu>
10344
10345 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
10346 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
10347 unless otherwise specified below.
10348
10349 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
10350 to allocate kernel_base, kernel_items, kernel_size, since
10351 they needn't be initialized to 0.
10352 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
10353 * src/closure.c (new_closure): Likewise, for itemset.
10354 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
10355 * src/lalr.c (set_goto_map): Likewise, for temp_map.
10356 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
10357 (build_relations): Likewise for edge, states1, includes.
10358 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
10359 * src/reader.c (packgram): Likewise, for ritem, rules.
10360 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
10361 * src/relation.c (relation_digraph): Likewise for VERTICES.
10362 (relation_transpose): Likewise for new_R, end_R.
10363 * src/symtab.c (symbols_token_translations_init): Likewise for
10364 token_translations.
10365 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
10366 (token_actions): Likewise for yydefact, actrow, conflrow,
10367 conflict_list.
10368 (save_column): Likewise for froms[symno], tos[symno].
10369 (goto_actions): Likewise for state_count.
10370 (pack_table): Likewise for base, pos, check.
10371 (tables_generate): Likewise for width.
10372
10373 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
10374 for initial core. Just have a separate core, so we needn't worry
10375 about whether kernel_size and kernel_base are initialized.
10376
10377 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
10378 kernel_size, kernel_items): Remove unnecessary initialization.
10379 * src/conflicts.c (conflicts): Likewise.
10380 * src/derives.c (derives): Likewise.
10381 * src/muscle_tablc (muscle_insert): Likewise.
10382 * src/relation.c (relation_digraph): Likewise.
10383 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
10384 conflrow, conflict_table, conflict_list, table, check):
10385 Likewise.
10386
10387 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
10388 This is because all callers pass unsigned int.
10389 * src/closure.h (new_closure): Likewise.
10390
10391 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
10392 (build_relations): Initialize includes[i] in all cases.
10393 * src/reader.c (packgram): Always initialize rules[ruleno].prec
10394 and rules[ruleno].precsym. Initialize members in order.
10395 * src/relation.c (relation_transpose): Always initialize new_R[i]
10396 and end_R[i].
10397 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
10398
10399 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
10400 conflict_list[0] was always 0, but now it isn't initialized.
10401
10402 * src/table.c (table_grow): When conflict_table grew, the grown
10403 area wasn't cleared. Fix this.
10404
10405 * lib/.cvsignore: Add strdup.c, strdup.h.
10406 * m4/.cvsignore: Add strdup.m4.
10407
00baeeac
PE
104082004-12-07 Paul Eggert <eggert@cs.ucla.edu>
10409
10410 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
10411 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
10412 GOTO_NUMBER_MAXIMUM, since we occasionally compute
10413 ngotos + 1 without checking for overflow.
10414 (build_relations): Use END_NODE, not -1, to denote end of edges.
10415 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
10416 build_relations): Use goto_number, not int, for goto numbers.
10417 * src/tables.c (save_column, default_goto): Likewise.
10418
be3d9d42
AD
104192004-11-23 Akim Demaille <akim@epita.fr>
10420
10421 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
10422 of #defining from yystype.
10423 Don't typedef yystype, C++ does not need it.
10424 This lets it possible to forward declare it as union.
10425
78e526d5
PE
104262004-11-23 Paul Eggert <eggert@cs.ucla.edu>
10427
10428 * bootstrap (gnulib_modules): Add extensions.
10429 Problem reported by Jim Meyering.
10430
afbb696d
PE
104312004-11-22 Paul Eggert <eggert@cs.ucla.edu>
10432
10433 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
10434 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
10435 src/system.h, src/tables.c: XFREE -> free, to accommodate
10436 recent change to gnulib xalloc.h.
78e526d5 10437 Problem reported by Jim Meyering.
afbb696d 10438
c1f8f16a
AD
104392004-11-17 Akim Demaille <akim@epita.fr>
10440
10441 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
10442
db7e5eb5 104432004-11-17 Akim Demaille <akim@epita.fr>,
9a1e9989
AD
10444 Alexandre Duret-Lutz <adl@gnu.org>
10445
10446 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
10447 changes.
10448 (YYCDEBUG): Adjust.
10449 Use it instead of cdebug_.
10450 (Parser::debug_stream, Parser::set_debug_stream): New.
10451 (Parser::symprint_): Define cdebug_ for temporary backward
10452 compatibility.
10453 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
10454 debug_stream ().
10455
68e11668
AD
104562004-11-17 Akim Demaille <akim@epita.fr>
10457
10458 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
10459 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
10460 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
10461 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
10462
97cbc73e
PE
104632004-10-27 Paul Eggert <eggert@cs.ucla.edu>
10464
10465 * data/glr.c (yyloc_default): Remove; not used.
10466 Problem reported by Frank Heckenbach.
10467
e342c3be
AD
104682004-10-25 Akim Demaille <akim@epita.fr>
10469
10470 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
10471 Introduce another definition to address simple location arrays.
10472 (yyGLRStack): New member: yyerror_range.
10473 (yyrecoverSyntaxError, yyparse): Update it.
10474 (yyrecoverSyntaxError): Use it when shifting the error token to
10475 have an accurate range, equivalent to the one computed by both
10476 yacc.c and lalr1.cc.
10477 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
10478 that column numbers start at column 0, as per GNU Coding
10479 Standards, the others tests, and the doc.
10480 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
10481 Adjust to the above change (first column is 0).
10482 And adjust the location of the "<error>", now covering the whole
10483 line.
10484
93602feb 104852004-10-22 Akim Demaille <akim@epita.fr>
04098407 10486 and Paul Eggert <eggert@cs.ucla.edu>
93602feb
PE
10487
10488 Remove some arbitrary limits on goto numbers and relations.
10489 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
10490 initial values, since they're never used.
10491 (set_goto_map): ngotos is now unsigned, so test for overflow
10492 by seeing whether it wraps around to zero.
10493 * src/lalr.h (goto_number): Now size_t, not short int.
10494 (GOTO_NUMBER_MAXIMUM): Remove.
10495 * src/relation.c (relation_print, traverse, relation_transpose):
10496 Check for END_NODE rather than looking at sign.
10497 * src/relation.h (END_NODE): New macro.
10498 (relation_node): Now size_t, not short int.
10499
dba08b04
PE
105002004-10-22 Paul Eggert <eggert@cs.ucla.edu>
10501
10502 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
10503 keyword, not an identifier. Problem reported by Baron Schwartz in
10504 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
10505
df09ef2e
AD
105062004-10-11 Akim Demaille <akim@epita.fr>
10507
10508 * src/symtab.c (symbol_check_alias_consistency): Also check
10509 type names, destructors, and printers.
10510 Reported by Alexandre Duret-Lutz.
10511 Recode the handling of associativity and precedence in terms
10512 of symbol_precedence_set.
10513 Accept no redeclaration at all, not even equal to the previous
10514 value.
10515 (redeclaration): New.
10516 Use it to factor redeclaration complaints.
10517 (symbol_make_alias): Don't set the type of the alias, let
10518 symbol_check_alias_consistency do it as for other features.
10519 * src/symtab.h (symbol): Add new member prec_location, and
10520 type_location.
10521 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
10522 * tests/input.at (Incompatible Aliases): New.
10523
146bc99d
PE
105242004-10-09 Paul Eggert <eggert@cs.ucla.edu>
10525
10526 .cvsignore fixes to accommodate gnulib changes,
10527 and the practice of naming build directories "_build".
10528 * .cvsignore: Add "_*". Sort.
10529 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
10530 * m4/.cvsignore: Add "*_gl.m4".
10531
e503aa60
AD
105322004-10-06 Akim Demaille <akim@epita.fr>
10533
10534 * src/parse-gram.y (add_param): Fix the truncation of trailing
10535 spaces.
10536
b4a20338
AD
105372004-10-05 Akim Demaille <akim@epita.fr>
10538
10539 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
10540 whether the reducion was empty or not. This leaves room to
10541 improve the use of YYLLOC_DEFAULT in such a case.
10542 lalr1.cc is still experimental, so changing this is acceptable.
10543 And finally, there are probably not many users who changed the
10544 handling of locations in GLR, so changing is admissible too.
10545
10546 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
10547 empty reduction, set @$ to an empty location ending the previously
10548 stacked symbol.
10549 Adjust uses to make sure the code is triggered on empty
10550 reductions.
10551 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
10552 expected output: empty reductions have empty locations.
10553
f85a5e6f
AD
105542004-09-29 Akim Demaille <akim@epita.fr>
10555
10556 * data/lalr1.cc: Move towards a more standard C++ coding style
10557 for templates: Class < T > -> Class<T>.
10558
b203fc2c
AD
105592004-09-29 Akim Demaille <akim@epita.fr>
10560
10561 * data/lalr1.cc: Reinstall the former ctor, for sake of
10562 compatibility, but warn it will be removed.
10563 Move towards a more standard C++ coding style (i.e., type *var ->
10564 type* var).
10565
5b7e1e73
PE
105662004-09-27 Paul Eggert <eggert@cs.ucla.edu>
10567
3fee967f
PE
10568 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
10569 since it's less likely to work if NULs are involved in the future.
5b7e1e73 10570
0dcca5c2
AD
105712004-09-27 Akim Demaille <akim@epita.fr>
10572
10573 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
10574
6dde1c82
AD
105752004-09-27 Akim Demaille <akim@epita.fr>
10576
10577 * data/lalr1.cc (b4_parse_param_decl_1): New.
b203fc2c 10578 (b4_parse_param_decl): Use it to have different names between attribute
6dde1c82
AD
10579 and argument names.
10580 (b4_cc_constructor_call): Likewise.
10581
b233d555
AD
105822004-09-24 Akim Demaille <akim@epita.fr>
10583
10584 * src/parse-gram.y (add_param): Strip the leading and trailing
10585 blanks from a formal argument declaration.
10586 (YY_LOCATION_PRINT): New.
10587
619404e3
AD
105882004-09-24 Akim Demaille <akim@epita.fr>
10589
10590 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
10591 after the location.
10592
dd8d9022
AD
105932004-09-24 Akim Demaille <akim@epita.fr>
10594
10595 * doc/bison.texinfo (Table of Symbols): Sort.
10596
0092f063
AD
105972004-09-21 Akim Demaille <akim@epita.fr>
10598
10599 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
10600 the useless parentheses.
10601 Suggested by Paul Eggert.
10602
451364ed
AD
106032004-09-20 Akim Demaille <akim@epita.fr>
10604
10605 Let the initial-action act on the look-ahead, and use it for the
10606 "initial push" (corresponding to an hypothetical beginning-of-file).
10607 And let lalr1.cc honor %initial-action.
10608
10609 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
10610 example.
10611 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
10612 (Parser::Parser): Remove the ctor that used to initialize it.
10613 (Parser::parse): Like in the other skeletons, issue the "starting
10614 parse" message before any action.
10615 Honor %initial-action.
10616 Initialize the stacks with the lookahead.
10617 * data/yacc.c: Let $$ and @$ in %initial-action designate the
10618 look-ahead.
10619 Push them in the stacks.
10620 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
10621
18d192f0
AD
106222004-09-20 Akim Demaille <akim@epita.fr>
10623
10624 * doc/bison.texinfo (Initial Action Decl): New.
10625
b8458aa5
AD
106262004-09-20 Akim Demaille <akim@epita.fr>
10627
10628 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
10629 clearer criterion to define it.
10630 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
10631 When reducing on an empty RHS, use the latest stacked location as
10632 location.
10633 yylloc is not always available.
10634 * data/glr.c: Likewise.
10635 Also, honor initial-actions.
10636
3fc16193
AD
106372004-09-20 Akim Demaille <akim@epita.fr>
10638
10639 * data/yacc.c (YY_LOCATION_PRINT): New.
10640 Define when we know YYLTYPE's structure, i.e., when the default
10641 YYLLOC_DEFAULT is used.
10642 * data/c.m4 (b4_yysymprint_generate): Use it.
10643 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
10644 value of the result.
10645 (error_start_): Replace with...
10646 (error_range_): this location array.
10647 This allows to replace code relying on the implementation of
10648 locations by portable code.
10649 * data/yacc.c (yylerrsp): Replace with...
10650 (yyerror_range): this.
10651 Every time a token is popped, update yyerror_range[0], to have an
10652 accurate location for the error token.
10653 * data/glr.c (YY_LOCATION_PRINT): New.
10654 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
10655 deference a pointer.
10656 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
10657 report the location in %printers.
10658
10659 * src/scan-skel.l: Instead of abort, report error messages to ease
10660 understanding skeleton scanning failures.
10661
ecfe33e7
AD
106622004-09-16 Akim Demaille <akim@epita.fr>
10663
10664 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
10665 (iterator, const_iterator): these, to be more in the C++ spirit.
10666 Also, return reverse iterators so that when displaying the stack
10667 we display its bottom first.
10668 (Parser::stack_print_, Parser::reduce_print_): Match the messages
10669 from yacc.c.
10670 We should probably use vector here though.
10671
1576d44d
AD
106722004-09-16 Akim Demaille <akim@epita.fr>
10673
10674 Have more complete shift traces.
10675
10676 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
10677 to report Shifts instead of ad hoc YYDPRINTF invocations,
10678 including for the error token.
10679 * data/lalr1.cc (symprint_): Output the location.
10680 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
10681 output the location within the %printer.
10682 Activate GLR tests, at least to make sure they compile properly.
10683 They still don't pass though.
10684 * tests/calc.at: Adjust expect verbose output, since now "Entering
10685 state..." is on a different line than the "Shifting" message.
10686
9c66f418
AD
106872004-09-08 Akim Demaille <akim@epita.fr>
10688
10689 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
10690 Bison directive from the Bison file to the invocation of this
10691 macro, so that these directives are passed to
10692 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
10693 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
10694 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
10695 the extra Bison directives instead of the whole series.
10696 Change the grammar so that there are recoverable errors, and
10697 unrecoverable errors. Now we can have the parser give up before
10698 consuming the whole input. As a result we now can observe that
10699 the lookahead is freed when needed.
10700 Change the parser source to parse argv[1] instead of a hard coded
10701 string.
10702 Simplify yylex, and give a value and location to EOF.
10703 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
10704 passed directives already coded in the file.
10705 Add some tests to check the location of "error".
10706 For some tests, the C++ parser is correct, and not yacc.c.
10707 For other tests, they provide different, but unsatisfying, values,
10708 so keep the C++ value so that at least one parser is "correct"
10709 according to the test suite.
10710 (Actions after errors): Remove, this is subsumed by the
10711 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
10712
52d5733f
AD
107132004-09-06 Akim Demaille <akim@epita.fr>
10714
10715 * data/lalr1.cc: Adjust the indentation of the labels.
04098407 10716 (Parser::pop): New.
52d5733f
AD
10717 Use it.
10718
a0e68930
AD
107192004-09-06 Akim Demaille <akim@epita.fr>
10720
10721 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
10722 argument, an informative message.
10723 Call YY_SYMBOL_PRINT.
10724 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
10725 * data/lalr1.cc (destruct_): Likewise.
10726 In addition, no longer depend on b4_yysymprint_generate and
10727 b4_yydestruct_generate to generate these functions, do it "by
10728 hand".
10729
e757bb10
AD
107302004-09-03 Akim Demaille <akim@epita.fr>
10731
10732 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
10733 invoked, yydestruct the lookahead.
10734 * tests/calc.at (Calculator $1): Update the expected lengths of
10735 traces: there is an added line for the discarded lookahead.
10736 * doc/bison.texinfo (Destructor Decl): Some rewording.
10737 Define "discarded" symbols.
10738
0fe1f06d
AD
107392004-09-02 Akim Demaille <akim@epita.fr>
10740
10741 * data/lalr1.cc (translate_, destruct_): No reason to be static.
10742
284acc8b
AD
107432004-09-02 Akim Demaille <akim@epita.fr>
10744
10745 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
10746 (YYDSYMPRINTF): Rename as...
10747 (YY_SYMBOL_PRINT): this.
10748 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
10749 two.
10750 Use it instead of direct symprint_ calls.
10751 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
10752 one.
10753
a5eb1ed2
AD
107542004-09-02 Akim Demaille <akim@epita.fr>
10755
b7c72fe1
AD
10756 * data/lalr1.cc (b4_yysymprint_generate): New.
10757 (symprint_): New member function, defined when YYDEBUG.
10758 Use it consistently instead of token/nterm debugging output by
10759 hand.
a5eb1ed2
AD
10760 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
10761 %printer calls to use cdebug_ when using lalr1.cc.
10762
417141dd
AD
107632004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
10764
10765 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
10766 with #ifdef YYDEBUG.
10767
2fa09258
AD
107682004-08-26 Akim Demaille <akim@epita.fr>
10769
10770 * doc/bison.texinfo (Implementing Loops): Rename as...
10771 (Implementing Gotos/Loops): this.
10772
9378b508
PE
107732004-08-13 Paul Eggert <eggert@cs.ucla.edu>
10774
10775 Adjust to latest gnulib.
10776 * bootstrap (gnulib_modules): Add xalloc-die.
10777 Set LC_ALL=C so that file names sort consistently.
10778 Prefer the gnulib copies of gettext.m4, glibc21.m4,
10779 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
10780 uintmax_t.m4, ulonglong.m4.
10781 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
10782 po.m4 since we are now using _gl.m4 instead.
10783
87a8ad5c
PE
107842004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
10785
10786 * src/scan-action.l: Remove. Scanning of semantic actions is
10787 handled in scan-gram.l.
10788
dca81a78
PE
107892004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
10790
10791 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
10792
10793 * src/location.h (struct): The file member is a uniqstr.
10794 (equal_boundaries): Use UNIQSTR_EQ for comparison.
10795
c9cbf7c5
PE
107962004-07-22 Paul Eggert <eggert@cs.ucla.edu>
10797
10798 Fix bug with non-%union parsers that have printers or destructors,
10799 which led to a Bison core dump. Reported by Peter Fales in
10800 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
2fa09258 10801
c9cbf7c5
PE
10802 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
10803 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
10804 not to our own type.
10805 * src/output.c (symbol_destructors_output, symbol_printers_output):
10806 Don't assume %union.
10807 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
10808 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
10809 UNION-FLAG. All callers changed.
10810 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
10811 Use type char, not unsigned int, when declaring an array of char;
10812 this lets us remove a cast.
10813 (Printers and Destructors): Add non-%union test cases.
10814
fa7e68c3
PE
108152004-06-21 Paul Eggert <eggert@cs.ucla.edu>
10816
10817 * doc/bison.texinfo: Minor editorial changes, mostly to the new
10818 GLR writeups. E.g., avoid frenchspacing and the future tense,
10819 change "lookahead" to "look-ahead", and change "wrt" to "with
10820 respect to".
2fa09258 10821
fa7e68c3
PE
108222004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10823
10824 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
10825 New sections, split off from the GLR Parsers section. Put the new
10826 Simple GLR Parser near the start of the GLR section, for clarity.
10827 Rewrite connective text.
10828
99a9344e
PE
108292004-06-21 Frank Heckenbach <frank@g-n-u.de>
10830
10831 * doc/bison.texinfo (Simple GLR Parsers): New section.
10832
8dd162d3
PE
108332004-06-21 Paul Eggert <eggert@cs.ucla.edu>
10834
10835 * NEWS, TODO, doc/bison.texinfo:
10836 Use "look-ahead" instead of "lookahead", to be consistent.
10837 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
10838 while we're fixing "look-ahead".
10839 * src/conflicts.c (shift_set): Renamed from shiftset.
10840 (look_ahead_set): Renamed from lookaheadset.
10841 * src/print.c: Likewise.
10842 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
10843 name for "lookahead".
10844 (report_types, usage): Likewise.
10845 * src/getargs.h (report_look_ahead_tokens): Renamed from
10846 report_lookaheads.
10847 * src/lalr.c (compute_look_ahead_tokens): Renamed from
10848 compute_lookaheads.
10849 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
10850 (look_ahead_tokens_print): Renamed from lookaheads_print.
10851 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
10852 state_rule_lookaheads_print.
10853 * src/state.h: Likewise.
10854 (reductions.look_ahead_tokens): Renamed from lookaheads.
10855 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
10856 AT_DATA_LOOKAHEADS_GRAMMAR.
10857
57a90331
PE
108582004-06-03 Paul Eggert <eggert@cs.ucla.edu>
10859
10860 * README: Update location of patched M4 distribution.
10861
8ed3234a
PE
108622004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
10863
10864 Don't assume the C++ compiler takes the same arguments as the C compiler
10865 (trivial change).
10866 * configure.ac (O0CXXFLAGS): New var.
10867 * tests/atlocal.in (CXXFLAGS): Use it.
10868
07971983
PE
108692004-05-29 Paul Eggert <eggert@cs.ucla.edu>
10870
10871 Fix some "make check" problems with C++ reported by
10872 Albert Chin-A-Young for Tru64 C++ in this thread:
10873 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
10874
10875 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
10876 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
10877 Output to a .cc file for C++, not to a .c file.
10878 * tests/calc.at (AT_CHECK_CALC): Likewise.
10879 * tests/regression.at (AT_CHECK_DANCER): Likewise.
10880 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
10881
29058652
PE
108822004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
10883
10884 * tests/calc.at, tests/actions.at: Workaround for SGI
10885 C++ compiler. (trivial change)
10886
62cb8a99
PE
108872004-05-27 Paul Eggert <eggert@cs.ucla.edu>
10888
fd418816
PE
10889 Spent a few hours checking out which prerequisite versions the
10890 current sources actually require. I went all the way back to
10891 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
10892 a seemingly endless set of combinations of versions more recent
10893 than that. The bottom line is that the current sources require
10894 fairly recent versions of the build tools, and it'll be some work
10895 to change this.
10896 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
10897 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
10898 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
10899 Add comments explaining why those particular versions are
10900 currently needed.
2fa09258 10901
62cb8a99
PE
10902 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
10903 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
161a71f3 10904 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
62cb8a99
PE
10905
10906 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
10907 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
10908
caa52c10
PE
109092004-05-26 Paul Eggert <eggert@cs.ucla.edu>
10910
10911 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
10912 0.11.5. Suggested by Bruno Haible.
10913 * bootstrap: Remove gettext version checking.
10914
10915 * doc/bison.texinfo (Decl Summary): Also mention that %union
10916 can depend on prerequisite types. Problem reported by Tim
10917 Van Holder.
10918
4bfd5e4e
PE
109192004-05-25 Paul Eggert <eggert@cs.ucla.edu>
10920
2cef3017
PE
10921 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
10922 * README-alpha: Don't tell people not to package this.
10923
b9c85d5c
PE
10924 * bootstrap: Don't assume $(...) works; use `...` instead.
10925 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
10926 gettext better.
10927
4bfd5e4e
PE
10928 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
10929 put into the -d output file, and mention what to do if YYSTYPE is
10930 defined as a macro.
10931
6a36ff94
PE
109322004-05-24 Paul Eggert <eggert@cs.ucla.edu>
10933
6712933e
PE
10934 Undo change made earlier today: it caused autopoint to not bring
10935 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
10936 autopoint's.
10937
10938 * bootstrap: Check that gettext version matches what's in
10939 configure.ac. Warn users to ignore robots.txt ERROR 404.
10940 * bootstrap: Undo today's earlier change (logged below).
10941 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
b9c85d5c 10942
6a36ff94
PE
10943 The gettext version checking is causing more trouble than it's
10944 curing; remove it. Problem reported by Paul Hilfinger.
10945
10946 * bootstrap: Issue a warning that one can expect a message
10947 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
10948 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
10949
209ea708
PE
109502004-05-23 Paul Eggert <eggert@cs.ucla.edu>
10951
10952 Ensure that the C++ compiler used for testing actually works on a
10953 simple test program; if not, skip the C++-related tests. Problem
10954 reported by Vin Shelton in:
161a71f3 10955 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
209ea708
PE
10956
10957 * m4/cxx.m4: New file.
10958 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
10959 * tests/atlocal.in (BISON_CXX_WORKS): Add.
10960 * tests/local.at (AT_COMPILE_CXX): Use it.
10961
41ca2549
PE
109622004-05-21 Paul Eggert <eggert@cs.ucla.edu>
10963
383e69dc
PE
10964 * data/glr.c (yylloc): Output this macro even if locations are not
10965 being generated, as the GLR parser needs it even in that case.
10966 Problem reported by Troy A. Johnson
10967 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
10968
41ca2549
PE
10969 * configure.ac (AC_INIT): Update to 1.875e.
10970
e476c87d
PE
109712004-05-21 Paul Eggert <eggert@cs.ucla.edu>
10972
10973 * NEWS: Version 1.875d.
10974 * configure.ac (AC_INIT): Likewise.
10975 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
10976
10977 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
10978 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
10979 lalr1.cc runs afoul of the first, and the last two are no longer
10980 supported by GCC 3.4.0.
10981 * README: Mention GNU m4 1.4 or later; mention m4 patches.
10982 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
10983
233a88ad
PE
109842004-05-06 Paul Eggert <eggert@cs.ucla.edu>
10985
10986 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
10987 unsigned int, for compatibility with latest gnulib hash module.
10988 * src/state.c (state_hash, state_hasher): Likewise.
10989 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
10990 * src/uniqstr.c (hash_uniqstr): Likewise.
e476c87d 10991
12ffdd28
PE
109922004-05-03 Paul Eggert <eggert@cs.ucla.edu>
10993
10994 * NEWS: Unescaped newlines are no longer allowed in char & strings.
10995
10996 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
10997 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
10998 character and string literals.
10999 (unexpected_end): New function.
11000 (unexpected_eof): Use it.
11001 (unexpected_newline): New function.
11002 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
11003 actions.
e476c87d 11004
12ffdd28
PE
11005 * NEWS: Document %expect-rr.
11006
11007 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
11008 Fix typo by replacing $1 with $option.
11009 Remove more 'intl'-related files.
9668e2be 11010 Don't DEFUN AM_INTL_SUBDIR twice.
12ffdd28
PE
11011
11012 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
11013 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
11014 strtoul.c.
11015 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
11016 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
11017 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
11018 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
11019 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
11020 * src/.cvsignore: Add *.output.
11021
11022 * src/parse-gram.y: Put copyright notice inside %{ %} so it
11023 gets copied to the output file.
e476c87d 11024
1f65350a
PE
110252004-04-28 Paul Eggert <eggert@twinsun.com>
11026
11027 Get files from the gnulib and po repositories, instead of relying
11028 on them being in our CVS. Upgrade to latest versions of gnulib
11029 and Automake.
11030
11031 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
11032 * bootstrap: Bootstrap from gnulib and po repositories.
11033 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
11034 * README-cvs: Document these changes. Remove version numbers from
11035 mentions of build tools, since they change so often. Mention Flex.
11036
11037 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
11038 (gl_USE_SYSTEM_EXTENSIONS): Add.
12ffdd28
PE
11039 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
11040 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
1f65350a 11041 does this for us.
12ffdd28
PE
11042 (AC_ISC_POSIX): Remove; we no longer support this
11043 ancient OS, as it gets in the way of latest Autoconf & gnulib.
1f65350a
PE
11044 (AC_HEADER_STDC): Remove: we now assume C89 or better.
11045 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
11046 Do not check for C89 headers, except for locale.h which is used
11047 by the Yacc library and must port to K&R hosts.
11048 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
11049 Do not check for C89 functions, except for setlocale which is
11050 used by the Yacc library.
11051 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
11052 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
11053 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
11054 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
11055 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
11056 AM_GNU_GETTEXT): Remove; now done by:
11057 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
11058 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
11059 for us.
11060
11061 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
11062 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
11063 Define to empty, as gnulib.mk will do the rest for us.
11064 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
11065 for us.
11066 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
11067 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
11068
11069 * src/files.c: Include gnulib's xstrndup.h.
11070
11071 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
11072 (REALLOC): Use xnrealloc, for likewise.
11073 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
11074 (strnlen, memrchr): Remove decls; functions no longer used.
11075 Include <stpcpy.h>.
11076
11077 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
11078 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
11079 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
11080 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
11081 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
11082 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
11083 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
11084 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
11085 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
11086 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
11087 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
11088 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
11089 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
11090 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
11091 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
11092 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
11093 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
11094 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
11095 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
11096 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
11097 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
11098 Remove, as these files are now generated automatically
11099 by bootstrap or automake.
11100
11101 * po/ChangeLog: Remove: all but one entry was a duplicate
11102 of this file, and I moved that 2000-11-02 entry here.
11103
11104 * config/.cvsignore: Add Makefile, depcomp, install-sh.
11105 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
11106 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
11107 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
11108 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
11109 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
11110 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
11111 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
11112 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
11113 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
11114 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
11115 xstrndup.h.
11116 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
11117 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
11118 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
11119 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
11120 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
11121 * src/.cvsignore: Remove *_.c.
11122
11123
11124 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
11125 support it. (The latest stable gzip doesn't.)
11126
111272004-04-27 Paul Eggert <eggert@twinsun.com>
11128
11129 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
11130 case, as stos_ is now used by destructors due to the 2004-02-09
11131 change.
11132
11133 Remove more K&R C support.
11134 * lib/libiberty.y (PARAMS): Remove. All uses removed.
11135 * lib/subpipe.c (errno): Remove decl.
11136 Include <stdlib.h> unconditionally.
11137 (EXIT_FAILURE): Remove macro.
11138 * src/complain.c (vfprintf, strerror): Remove.
11139 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
11140 unconditionally.
11141 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
11142 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
11143 (strchr, strspn, memchr): Remove decls.
11144 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
11145 unconditionally. Do not declare perror.
11146 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
11147 unconditionally.
11148
11149 * src/complain.c (_): Remove useless defn, as system.h defines this.
11150
11151 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
11152 with latest obstack.h.
11153 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
11154 to procedure types, as obstack.h now does that for us.
11155 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
11156
11157 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
11158 so that this include file can stand alone.
11159 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
11160 does this now. Include subpipe.h first after config.h, to
11161 test whether it can stand alone.
11162
11163 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
11164 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
11165 unused declaration.
11166
11167 * tests/synclines.at (%union synch line): Put a dummy member in
11168 the union, because empty unions aren't allowed in C. Caught
11169 by GCC 3.4.0.
11170
4f16766c
PE
111712004-04-13 Jim Meyering <jim@meyering.net>
11172
11173 * src/conflicts.c (conflicts_print): Correct format string typo:
11174 use `%%' to produce literal `%'. (trivial change)
11175
779e7ceb
PE
111762004-03-30 Paul Eggert <eggert@twinsun.com>
11177
11178 * src/getargs.c (version): Update copyright year to 2004.
11179
11180 * data/c.m4 (b4_int_type): Use 'short int' rather than
11181 'short', and similarly for 'long', 'unsigned', etc.
11182 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
11183 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
11184 yy_yypstack, yydumpstack): Likewise.
11185 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
11186 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
11187 Likewise.
11188 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
11189 yy_stack_print, yyparse): Likewise.
11190 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
11191 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
11192 * lib/bitset.c (bitset_print): Likewise.
11193 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
11194 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
11195 * lib/bitsetv.c (bitsetv_dump): Likewise.
11196 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
11197 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
11198 Likewise.
11199 * src/LR0.c (allocate_itemsets): Likewise.
11200 * src/gram.h (rule_number, rule): Likewise.
11201 * src/lalr.h (goto_number): Likewise.
11202 * src/nullable.c (nullable_compute): Likewise.
11203 * src/output.c (prepare_rules): Likewise.
11204 * src/relation.c (relation_print, relation_digraph): Likewise.
11205 * src/relation.h (relation_node): Likewise.
11206 * src/state.h (state_number, transitions, errs, reductions,
11207 struct state): Likewise.
11208 * src/symtab.h (symbol_number, struct symbol): Likewise.
11209 * src/tables.c (vector_number, tally, action_number,
11210 default_goto, goto_actions): Likewise.
11211 * tests/existing.at (GNU Cim Grammar): Likewise.
11212 * tests/regression.at (Web2c Actions): Likewise.
11213
11214 * src/output.c (muscle_insert_short_int_table): Renamed from
11215 muscle_insert_short_table. All uses changed.
11216
d6328241
PH
112172004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11218
11219 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
11220 (declaration): Replace expected_conflicts with expected_sr_conflicts.
11221 Add %expect-rr rule.
4f16766c 11222
d6328241
PH
11223 * src/scan-gram.l: Recognize %expect-rr.
11224
4f16766c 11225 * src/conflicts.h (expected_sr_conflicts): Rename from
d6328241 11226 expected_conflicts.
4f16766c 11227 (expected_rr_conflicts): Declare.
d6328241
PH
11228
11229 * src/conflicts.c (expected_sr_conflicts): Rename from
11230 expected_conflicts.
11231 (expected_rr_conflicts): Define.
11232 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
11233 for GLR parsers.
11234 Use expected_sr_conflicts in place of expected_conflicts.
11235 Warn if expected_rr_conflicts used in non-GLR parser.
4f16766c 11236
d6328241 11237 * doc/bison.texinfo: Add documentation for %expect-rr.
4f16766c 11238
1452af69
PE
112392004-03-08 Paul Eggert <eggert@gnu.org>
11240
11241 Add support for hex token numbers. Suggested by Odd Arild Olsen in
161a71f3 11242 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
1452af69
PE
11243
11244 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
11245 in lalr1.cc.
11246 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
11247 * src/scan-gram.l (scan_integer): New function.
11248 ({int}): Use it.
11249 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
11250 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
11251 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
11252 Say "long int", not "long", for uniformity with GNU style.
11253
006d217d
PE
112542004-02-25 Paul Eggert <eggert@twinsun.com>
11255
11256 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
11257 compilers. This fixes a problem with Intel's C++ compiler being
11258 chatty, reported by Guido Trentalancia in
161a71f3 11259 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
006d217d 11260
c2729758
ADL
112612004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
11262
11263 Support %destructor and merge error locations in lalr1.cc.
11264
11265 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
11266 (Parser::stos_): Define unconditionally.
11267 (Parser::destruct_): New method. Generate its body with
11268 b4_yydestruct_generate.
11269 (Parser::error_start_): New attribute.
11270 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
11271 token which are discarded.
11272 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
11273 error_start_ when erroneous token are discarded.
11274 (Parser::parse) <yyerrlab1>: Compute the location of the error
11275 token so that it covers all the discarded tokens.
11276 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
11277 it can be called with `%skeleton "lalr1.cc"', and do that.
11278
dd0e0635
PE
112792004-02-02 Paul Eggert <eggert@twinsun.com>
11280
11281 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
11282 $(top_srcdir)/lib and ../lib. This fixes a bug reported
11283 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
11284 There's no need to mention top_builddir since Automake does that
11285 for us.
11286 (INCLUDES): Remove, as Automake says it's obsolescent.
11287 Contents migrated into AM_CPPFLAGS as described above.
11288 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
11289
112902004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11291
11292 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
11293 (yyreportSyntaxError): Handle case where lookahead token is
11294 YYEMPTY.
11295
be16239b
PH
112962004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11297
11298 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
11299 resulting parsers are compilable with C++.
11300
5fa90832
PE
113012003-12-23 Paul Eggert <eggert@twinsun.com>
11302
11303 * config/depcomp, config/install-sh: Sync with Automake 1.8.
11304 * src/output.c (output_skeleton): Rename local var.
11305 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
11306 Bison tokens, as this runs afoul of the 2003-10-07 change that
11307 disallowed NUL bytes in character constants or string literals.
11308
11309 * tests/local.at: Require Autoconf 2.59's Autotest.
11310 * tests/testsuite.at: Don't include local.at, since we now assume
11311 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
11312 including it.
11313 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
11314 multiple inclusion warnings.
dd0e0635 11315
b165c324
AD
113162003-12-02 Akim Demaille <akim@epita.fr>
11317
11318 * doc/bison.texinfo (How Can I Reset the Parser): More about start
11319 conditions.
11320 From Bruno Haible.
11321
26e06a21
ADL
113222003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
11323
11324 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
11325
92ac3705
PE
113262003-10-07 Paul Eggert <eggert@twinsun.com>
11327
6a5ecb38
PE
11328 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
11329 if testsuite doesn't exist.
11330
92ac3705
PE
11331 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
11332 literals, unfortunately.
11333 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
11334 Complain about NUL bytes in character constants or string literals.
11335
91d2c560
PE
113362003-10-05 Paul Eggert <eggert@twinsun.com>
11337
11338 * NEWS: Don't document %no-default-prec, as it's still
11339 too experimental.
11340 * doc/bison.texinfo: Document %no-default-prec only if
11341 the defaultprec flag is set. Normally it's not.
11342
0cc3da3a
PE
113432003-10-04 Paul Eggert <eggert@twinsun.com>
11344
11345 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
11346 non-modifiable lvalue, instead of a modifiable one.
11347 * doc/bison.texinfo (Actions): Document that $$ can
11348 be assigned to. Do not claim that $$ and $N are
11349 array element references: user code should not rely on this.
11350
22fccf95
PE
113512003-10-01 Paul Eggert <eggert@twinsun.com>
11352
11353 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
11354 (grammar_declaration): Use it.
11355 * src/scan-gram.l: New token %no-default-prec.
11356 * tests/conflicts.at: Revamp tests to use %no-default-prec.
11357 * NEWS, doc/bison.texinfo: Document the above.
11358
fc8f2965
AD
113592003-10-01 Akim Demaille <akim@epita.fr>
11360
11361 VCG no longer supports long_straight_phase.
11362
11363 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
11364 * src/print_graph.c (print_graph): Adjust.
11365
39a06c25
PE
113662003-09-30 Frank Heckenbach <frank@g-n-u.de>
11367 and Paul Eggert <eggert@twinsun.com>
11368
11369 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
11370 Table of Symbols): Document %default-prec.
11371 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
11372 (grammar_declaration): Set default_prec on %default-prec.
11373 * src/scan-gram.l (%default-prec): New token.
11374 * src/reader.h (default_prec): New flag.
11375 * src/reader.c: Likewise.
11376 (packgram): Handle it.
11377 * tests/conflicts.at (%default-prec without %prec,
11378 %default-prec with %prec, %default-prec 1): New tests.
fc8f2965 11379
39a06c25
PE
113802003-09-30 Paul Eggert <eggert@twinsun.com>
11381
11382 * tests/testsuite.at: Include local.at, not input.at, fixing
11383 a typo in the 2003-08-25 patch.
11384
62b6aef9
AD
113852003-08-27 Akim Demaille <akim@epita.fr>
11386
11387 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
11388 GCC warnings.
11389
89e1cc61
AD
113902003-08-26 Akim Demaille <akim@epita.fr>
11391
11392 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
11393 "<\#" to avoid magic from Gnus when posting parts of this script.
11394
a08460b0
AD
113952003-08-26 Akim Demaille <akim@epita.fr>
11396
11397 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
11398 (Parser::parse): here.
11399 Adjust: nerrs and errstatus is now replaced by...
11400 (Parser::nerrs_, Parser::errstatus_): New.
11401
603f1cfd
AD
114022003-08-25 Akim Demaille <akim@epita.fr>
11403
11404 * config/announce-gen, Makefile.cfg: New.
11405 * Makefile.am: Adjust.
11406 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
11407 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
11408
cd3684cf
AD
114092003-08-25 Akim Demaille <akim@epita.fr>
11410
11411 When reducing initial empty rules, Bison parser read an initial
11412 location that is not defined. This results in garbage, and that
11413 affects Bison's own parser. Therefore we need (i) to extend Bison
11414 to support a means to initialize this location, and (ii) to use
11415 this CVS Bison to fix CVS Bison's parser.
11416
11417 * src/reader.h, reader.c (epilogue_augment): Remove, replace
11418 with...
11419 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
11420 * src/parse-gram.y: Adjust.
11421 (%initial-action): New.
11422 (%error-verbose): Since we require CVS Bison, there is no reason
11423 not to use it.
11424 * src/scan-gram.l: Adjust.
11425 * src/Makefile.am (YACC): New, to make sure we use our own parser.
11426 * data/yacc.c (yyparse): Use b4_initial_action.
11427
4e03e201
AD
114282003-08-25 Akim Demaille <akim@epita.fr>
11429
11430 * doc/bison.texinfo: Don't promote stdout for error messages.
11431
8c182d05
AD
114322003-08-25 Akim Demaille <akim@epita.fr>
11433
11434 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
11435 From Alexandre Duret-Lutz.
11436
6a60c4cf
PE
114372003-08-25 Akim Demaille <akim@epita.fr>
11438
11439 Version 1.875c.
11440
25f66e1a
AD
114412003-08-25 Akim Demaille <akim@epita.fr>
11442
11443 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
11444 Use them.
11445
5348bfbe
AD
114462003-08-25 Akim Demaille <akim@epita.fr>
11447
11448 * data/lalr1.cc (Parser::reduce_print_): New.
11449 Use it.
11450
47301314
AD
114512003-08-25 Akim Demaille <akim@epita.fr>
11452
11453 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
11454 error recovery loops. This patch is based on
161a71f3 11455 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
47301314
AD
11456 Also, augment the similarity between lalr1.cc and yacc.c.
11457 Note: the locations of error recovery rules are not correct yet.
11458
11459 * data/lalr1.cc: Comment changes to augment the similarity between
11460 lalr1.cc and yacc.c.
11461 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
11462 (yyerrlab1): Remove, but where it used to be (now the bottom part of
11463 yyerrlab), when hitting EOF, pop the whole stack here instead of
11464 merely falling thru the default error handling mechanism.
11465 (yyerrorlab): New label, with the old contents of YYERROR,
11466 plus the following change: pop the stack of rhs corresponding
11467 to the production that invoked YYERROR. That is how Yacc
11468 behaves (required by POSIX).
11469 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
11470 fail.
11471
1f7a61ff
AD
114722003-08-25 Akim Demaille <akim@epita.fr>
11473
11474 Tune local.at so that people can "autom4te -l autotest calc.at -o
11475 calc" for instance, to extract a sub test suite.
11476
11477 * tests/testsuite.at: Move the initialization, Autotest version
11478 requirement, and AT_TESTED invocation into...
11479 * tests/local.at: here.
11480 * tests/testsuite.at: Include it for compatibility with Autoconf
11481 2.57.
11482 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
11483 be ignore.
11484
327b5b56
PE
114852003-08-04 Paul Eggert <eggert@twinsun.com>
11486
11487 Rework code slightly to avoid gcc -Wtraditional warnings.
11488 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
11489 The returned value is now stored in *YY0. All callers changed.
11490 * src/output.c (merge_output): Adjust to the above change.
11491
0051e3ed
PE
114922003-07-26 Paul Eggert <eggert@twinsun.com>
11493
11494 * data/glr.c (YYASSERT): New macro.
11495 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
11496 yyresolveStates, yyprocessOneStack):
11497 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
11498 Derived from a suggestion by Frank Heckenbach.
1f7a61ff 11499
137437c6
PE
115002003-07-25 Paul Eggert <eggert@twinsun.com>
11501
5b620e06
PE
11502 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
11503 for portability to K&R C (after ansi2knr, presumably). See
161a71f3 11504 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
5b620e06
PE
11505 by Frank Heckenbach, though I have omitted the structure-initialization
11506 part of his glr-knr.diff patch since I recall that the Portable
11507 C Compiler didn't require that change.
11508
137437c6
PE
11509 Let the user specify how to allocate and free memory.
11510 Derived from a suggestion by Frank Heckenbach in
161a71f3 11511 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
137437c6
PE
11512 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
11513 All uses of free, malloc, realloc changed to use these macros,
11514 and unnecessary casts removed.
11515 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
11516
ddb85ca5
PE
115172003-07-06 Matthias Mann <MatthiasMann@gmx.de>
11518
11519 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
11520 use s.empty() rather than s == "" to test for empty string; see
161a71f3 11521 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
ddb85ca5
PE
11522 (trivial change)
11523
39910e09
AD
115242003-06-25 Akim Demaille <akim@epita.fr>
11525
11526 * config/depcomp, config/install-sh: Update from masters.
11527
0ae99356
PE
115282003-06-20 Paul Eggert <eggert@twinsun.com>
11529
11530 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
11531 and return properly parenthesized result.
11532 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
11533 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
11534 Remove unnecessary parentheses from uses.
11535 * doc/bison.texinfo (Location Default Action): Describe the
11536 conventions for parentheses.
11537
cd05d13c
PE
115382003-06-19 Paul Eggert <eggert@twinsun.com>
11539
81fd08ca
PE
11540 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
11541 yyreportTree): Do not assume that size_t is the same width as int,
11542 when printing sizes. Print sizes using an unsigned format.
11543 Problem reported by Frank Heckenbach in
161a71f3 11544 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
4dcf140b 11545
cd05d13c
PE
11546 Port to Forte Developer 7 C compiler.
11547 * data/glr.c (struct YYLTYPE): If locations are not being used,
11548 declare a single dummy member, as empty structs do not conform
11549 to the C standard.
11550 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
11551 the Forte Developer 7 C compiler complains that end-of-loop
11552 code is not reached.
11553
4dcf140b
PE
115542003-06-17 Paul Eggert <eggert@twinsun.com>
11555
11556 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
11557 avoid warnings from picky compilers about redefinition of PARAMS.
11558
8dd76bee
PE
115592003-06-17 Paul Eggert <eggert@twinsun.com>
11560
11561 Version 1.875b.
11562
11563 * NEWS: Document 1.875b.
11564
11565 * lib/bbitset.h: Do not include config.h; that's the includer's job.
11566 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
11567 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
11568 Don't use 'index' in comments, as it's a builtin fn on some hosts.
11569 * lib/bitset_stats.c: Include gettext.h unconditionally, as
11570 per recent gettext manual's suggestion.
11571 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
11572 Use prototypes, not old-style definitions.
11573 * lib/lbitset.c (lbitset_unused_clear): Likewise.
11574 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
11575 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
11576 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
11577 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
11578 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
11579 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
11580 vbitset_or_and_cmp, vbitset_copy): Likewise.
11581
11582 * lib/libiberty.h: Do not include config.h; that's the includer's job.
11583 Do not include <stdlib.h>.
11584 (PARAMS): Define unconditionally for C89.
11585 (ATTRIBUTE_NORETURN): Remove.
11586 (ATTRIBUTE_UNUSED): Define unconditionally.
11587
11588 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
161a71f3 11589 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
8dd76bee
PE
11590 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
11591 * lib/vbitset.c, lib/vbitset.h: New files.
11592 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
11593 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
11594 from libbitset.
11595
11596 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
11597 `How Can I Reset @code{yyparse}', since texinfo does not allow
11598 arbitrary @ in node names.
11599
11600 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
11601 shouldn't be needed according to the gettext 0.12.1 documentation
11602 but which seem to be needed anyway: codeset.m4 glibc21.m4
f8e8262e 11603 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8dd76bee 11604 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
f8e8262e 11605 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
cd05d13c 11606
8dd76bee
PE
11607 * lib/.cvsignore: Add stdbool.h.
11608 * m4/.cvsignore: Add nls.m4, po.m4.
11609
11610 Upgrade to CVS gnulib.
11611 * stdbool_.h: File renamed from stdbool.h.in.
11612 * configure.ac (AM_STDBOOL_H): Invoke this instead of
11613 AC_HEADER_STDBOOL.
11614 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
11615 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
11616 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
11617 (MOSTLYCLEANFILES): New var.
11618 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
11619 (stdbool.h): New rule.
11620 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
11621 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
11622 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
11623 m4/quote.m4: Upgrade to today's gnulib.
11624
11625 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
11626 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
11627 the tests right now.
11628 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
11629 yyerror are declared before use; C99 requires this.
11630
25005f6a
PH
116312003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11632
11633 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
11634 first.
11635 (yyrecoverSyntaxError): Correct the logic for setting and testing
11636 yyerrState.
11637 Correct comment on handling EOF.
11638 Allow states with only a default reduction, rather than failing
8dd76bee 11639 (I can't quite reconstruct why these were not allowed before).
25005f6a 11640
137437c6 11641 Fixes to avoid problem that $-N rules in GLR parsers can cause
25005f6a 11642 buffer overruns, corrupting state.
8dd76bee
PE
11643
11644 * src/output.c (prepare_rules): Output max_left_semantic_context
25005f6a
PH
11645 definition.
11646 * src/reader.h (max_left_semantic_context): New variable declaration.
11647 * src/scan-gram.l (max_left_semantic_context): Define.
11648 (handle_action_dollar): Update max_left_semantic_context.
11649 * data/glr.c (YYMAXLEFT): New definition.
11650 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
11651 (yyresolveAction): Ditto.
11652
11653 Fixes to problems with location handling in GLR parsers reported by
11654 Frank Heckenbach (2003/06/05).
11655
11656 * data/glr.c (YYLTYPE): Make trivial if locations not used.
11657 (YYRHSLOC): Add parentheses, and define only if locations used.
11658 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
11659 locations not used.
11660 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
11661 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8dd76bee 11662
25005f6a
PH
11663 * tests/cxx-type.at: Exercise location information; update tests
11664 to differentiate output with and without locations.
8dd76bee 11665 Remove forward declarations of yylex and yyerror---caused errors
25005f6a
PH
11666 because default YYLTYPE not yet defined.
11667 Change semantic actions to compute strings, rather than printing
11668 them directly (to test proper passing of semantics values). Change
11669 output to prefix notation and update test data and expected results.
11670 (yylex): Track locations.
11671 (stmtMerge): Return value rather than printing, and include arguments
11672 in value.
8dd76bee 11673
711f40b7
PE
116742003-06-03 Paul Eggert <eggert@twinsun.com>
11675
11676 Avoid warnings generated by GCC 2.95.4 when Bison is
11677 configured with --enable-gcc-warnings.
11678 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
11679 yy::]b4_parser_class_name[::translate_,
11680 yy::Stack::operator[] (unsigned),
11681 yy::Stack::operator[] (unsigned) const,
11682 yy::Slice::operator[] (unsigned),
11683 yy::Slice::operator[] (unsigned) const):
11684 Rename local vars to avoid warnings.
11685 * tests/glr-regression.at (Improper handling of embedded actions
11686 and $-N in GLR parsers): Remove unused local variable from yylex.
11687 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
11688 (void) as arg when not pure, since we now assume C89 when building
11689 Bison. Pacify GCC by using parameter.
11690
ac695f7d
PE
116912003-06-02 Paul Eggert <eggert@twinsun.com>
11692
11693 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
11694 yy::Location::lines, yy::Location::columns): Rename arguments
11695 to avoid shadowing; this removes a warning generated by GCC 3.3.
11696
26ec81e0
PE
116972003-06-01 Paul Eggert <eggert@twinsun.com>
11698
11699 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
11700 to g++, as GCC 3.3 complains if you do it.
11701 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
11702 everything that WARNING_CFLAGS has, except omit warnings
11703 not suitable for C++.
11704 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
11705 * tests/atlocal.in (CXXFLAGS): New var.
11706 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
11707
11708 Fix a GLR parser bug I reported in February; see
161a71f3 11709 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
26ec81e0
PE
11710 The problem was that GLR parsers did not conform to the C standard,
11711 because actions like { $1 = $2 + $3; } expanded to expressions
11712 that invoked YYFILL in separate subexpressions, and YYFILL assigned
11713 to a local variable. The C standard says that expressions
11714 like (var = f ()) + (var = f ()) have undefined behavior.
11715 Another problem was that GCC sometimes issues warnings that
11716 yyfill and its parameters are unused.
11717
11718 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
11719 as possibly unused.
11720 (yyfill): New function.
11721 (YYFILL): Use it.
11722 (yyuserAction): Change type of yynormal to bool, so that it matches
11723 the new yyfill signature. Mark it as possibly unused.
11724
11725
11726 Follow up on a bug I reported in February, where a Bison-generated
11727 parser can loop. Provide a test case and a fix for yacc.c. I
11728 don't have a fix for lalr1.cc or for glr.c, unfortunately.
11729 The original bug report is in:
161a71f3 11730 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
26ec81e0
PE
11731
11732 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
11733 macro's size was becoming unwieldy.
11734 (yyerrlab): Do not discard an empty lookahead symbol, as this
11735 might destroy garbage.
11736 (yyerrorlab): New label, with the old contents of YYERROR,
11737 plus the following change: pop the stack of rhs corresponding
11738 to the production that invoked YYERROR. That is how Yacc
11739 behaves, and POSIX requires this behavior.
11740 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
11741 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
11742 Define 'alarm' to do nothing if unistd.h is not available.
11743 Add a new rule "exp: '-' error;" to test the above change to
11744 data/yacc.c. Use 'alarm' to abort any test taking longer than
11745 10 seconds, as it's probably looping.
11746 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
11747 Also, the new yacc.c generates two fewer diagnostics for an
11748 existing test.
11749
d0829076
PE
117502003-05-24 Paul Eggert <eggert@twinsun.com>
11751
c6ae27df
PE
11752 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
11753 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
11754 This fixes a problem reported by John Bowman when the Compaq/HP
11755 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
11756 -ansi -Wall -gall).
11757 * data/yacc.c (union yyalloc): Likewise.
11758 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
26ec81e0 11759
d0829076
PE
11760 Switch from 'int' to 'bool' where that makes sense.
11761
11762 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
11763 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
11764 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
11765 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
11766 Return or accept bool, not int. All callers changed.
11767 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
11768 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
11769 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
11770 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
11771 bitset_or_and_cmp_): Likewise.
11772 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
11773 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
11774 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
11775 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
11776 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
11777 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
11778 bitset_stats_or_and_cmp): Likewise.
11779 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
11780 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
11781 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
11782 ebitset_xor_cmp): Likewise.
11783 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
11784 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
11785 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
11786 lbitset_xor_cmp): Likewise.
11787 * lib/bbitset.h: Include <stdbool.h>.
11788 (struct bitset_vtable): The following members now return bool, not
11789 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
11790 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
11791 or_and_cmp).
11792 * src/conflicts.c (count_rr_conflicts): Likewise.
11793 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
11794 All uses changed.
11795 * lib/ebitset.c (ebitset_obstack_init): Likewise.
11796 * lib/lbitset.c (lbitset_obstack_init): Likewise.
11797 * src/getargs.c (debug_flag, defines_flag, locations_flag,
11798 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
11799 graph_flag): Likewise.
11800 * src/getargs.h (debug_flag, defines_flag, locations_flag,
11801 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
11802 graph_flag): Likewise.
11803 * src/output.c (error_verbose): Likewise.
11804 * src/output.h (error_verbose): Likewise.
11805 * src/reader.c (start_flag, typed): Likewise.
11806 * src/reader.h (typed): Likewise.
11807 * src/getargs.c (LOCATIONS_OPTION): New constant.
11808 (long_options, getargs): Use it.
11809 * src/lalr.c (build_relations): Use bool, not int.
11810 * src/nullable.c (nullable_compute): Likewise.
11811 * src/print.c (print_reductions): Likewise.
11812 * src/tables.c (action_row, pack_vector): Likewise.
11813 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
11814 * src/output.c (prepare): Use it.
11815 * src/output.c (token_definitions_output,
11816 symbol_destructors_output, symbol_destructors_output): Use string,
11817 not boolean integer, to keep track of whether to output separator.
11818 * src/print_graph.c (print_core): Likewise.
11819 * src/state.c (state_rule_lookaheads_print): Likewise.
11820
11821 * config/install-sh: Sync from automake 1.7.5.
11822
6b2584b7
PE
118232003-05-14 Paul Eggert <eggert@twinsun.com>
11824
11825 * src/parse-gram.y (rules_or_grammar_declaration): Require a
11826 semicolon after a grammar declaration, in the interest of possible
11827 future changes to the Bison input language.
11828 Do not allow a stray semicolon at the start of the grammar.
11829 (rhses.1): Allow one or more semicolons after any rule, including
11830 just before "|" as required by POSIX.
11831 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
11832 grammar.
11833
caf37a36
ADL
118342003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
11835
11836 %parse-param support for lalr1.cc.
11837
11838 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
11839 b4_cc_constructor_calls, b4_cc_constructor_call,
11840 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
11841 definitions.
11842 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
11843 parse-param arguments.
11844 (yy::b4_parser_class_name): Declare instance variables to
11845 hold parse-param arguments.
11846 * tests/calc.at: s/value/semantic_value/ because value clashes
11847 with a member of yy::b4_parser_class_name. Adjust C++ code
11848 to handle %parse-param. Enable %parse-param test in C++.
11849
3ab37077
PE
118502003-05-12 Paul Eggert <eggert@twinsun.com>
11851
11852 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
11853 English a bit. Fix fclose typo. Change "const char" to "char
11854 const", and use ANSI C rather than K&R for "main". Suggest
11855 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
11856 and suggest yy_switch_to_buffer.
11857
118582003-05-05 Paul Eggert <eggert@twinsun.com>
163ab321
PE
11859
11860 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
11861 C89. This avoids a diagnostic on compilers that define __STDC__
11862 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
161a71f3 11863 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
163ab321 11864
e743727f
PE
118652003-05-03 Paul Eggert <eggert@twinsun.com>
11866
11867 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
11868 Do not overrun array bounds.
11869 This should fix a bug reported today by Olatunji Oluwabukunmi in
161a71f3 11870 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
e743727f 11871
916708d5
AD
118722003-04-29 Akim Demaille <akim@epita.fr>
11873
11874 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
11875 * src/getargs.c, src/getargs.h: here, as bool, not int.
11876 (nondeterministic_parser): New.
11877 * src/parse-gram.y, src/scan-gram.l: Support
11878 %nondeterministic-parser.
11879 * src/output.c (prepare): Use nondeterministic_parser instead
11880 of glr_parser where appropriate.
11881 * src/tables.c (conflict_row, action_row, save_row)
11882 (token_actions, token_actions, pack_vector): Ditto.
11883
a06ea4aa
AD
118842003-04-29 Akim Demaille <akim@epita.fr>
11885
11886 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
11887
211074ca
AD
118882003-04-29 Akim Demaille <akim@epita.fr>
11889
11890 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
11891 with %pure-parser and %locations to exercise the patch from Yakov
11892 Markovitch below.
11893
6175ffe3
PE
118942003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
11895
11896 * data/yacc.c: (b4_lex_param): Corrected for the case where
11897 %lex-param is provided and %pure-parser isn't.
11898
b1e95857
PE
118992003-04-27 Paul Eggert <eggert@twinsun.com>
11900
11901 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
161a71f3 11902 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
b1e95857
PE
11903 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
11904 if it is not defined.
11905 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
11906
acda9df6
PE
119072003-04-26 Paul Eggert <eggert@twinsun.com>
11908
3470c57b
PE
11909 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
11910 Declare to be of type suitable for the ninf value itself, not of
11911 type suitable for the corresponding table, since the latter might
11912 be unsigned but the ninf value might be negative. This fixes a
11913 bug reported by Alexandre Duret-Lutz in
161a71f3 11914 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
3470c57b 11915
acda9df6
PE
11916 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
11917 invokes it. We shouldn't invoke it twice because it will attempt
11918 to put error.o in the archive twice. This fixes a glitch reported
11919 by Martin Mokrejs in
161a71f3 11920 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
acda9df6 11921
b5250f26
PE
119222003-04-21 Paul Eggert <eggert@twinsun.com>
11923
11924 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
11925 to gnulib.
11926
089ac0f1
PE
119272003-04-21 Yakov Markovitch <Markovitch@iso.ru>
11928
11929 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
11930 Fix obvious typo that results in uncompilable GLR parsers
11931 when both %pure-parser and %locations are used. (trivial change)
11932
5ededac6
PE
119332003-04-17 Paul Eggert <eggert@twinsun.com>
11934
1b8f2fff
PE
11935 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
11936 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
11937 Do not insert the expected token via unput, as this runs afoul
11938 of a POSIX-compatibility bug in flex 2.5.31.
11939 All uses changed to BEGIN the parent state,
11940 since we no longer insert the expected token via unput.
11941 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
11942 that is no longer emitted after the above change.
11943
5ededac6
PE
11944 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
11945 the first one. This change is from Paul Hilfinger, and it fixes
11946 regression reported by Werner Lemberg in
161a71f3 11947 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5ededac6
PE
11948
11949 (resolve_sr_conflict): Don't invoke state_errs_set
11950 unless one or more tokens have been explicitly made errors.
11951 Otherwise, the above change causes Bison to abort.
11952
11953 * tests/existing.at (GNU pic Grammar): New test case, taken from
11954 Lemberg's email.
11955
b8be9132
AD
119562003-03-31 Akim Demaille <akim@epita.fr>
11957
11958 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
11959
d423d460
AD
119602003-03-31 Akim Demaille <akim@epita.fr>
11961
11962 * src/output.c (prepare_symbols): Avoid trailing spaces in the
11963 output.
11964
c7e441b4
AD
119652003-03-31 Akim Demaille <akim@epita.fr>
11966
11967 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
11968 From Paul Hilfinger.
11969
231897ad
AD
119702003-03-29 Akim Demaille <akim@epita.fr>
11971
11972 * m4/error.m4: Do not put under dynamic conditions some code which
11973 expansion is under static control.
11974
5b066063
AD
119752003-03-29 Akim Demaille <akim@epita.fr>
11976
11977 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
11978
22a74fec
AD
119792003-03-29 Akim Demaille <akim@epita.fr>
11980
11981 * doc/bison.texinfo (Strings are Destroyed): New.
11982
0eee27e7
PE
119832003-03-13 Paul Eggert <eggert@twinsun.com>
11984
11985 * .cvsignore: Add configure.lineno.
11986 * src/.cvsignore: Add yacc.
11987 * tests/.cvsignore: Add testsuite.log.
11988 * doc/fdl.texi: Sync with latest FSF version.
11989
f61aad93
PE
119902003-03-12 Paul Eggert <eggert@twinsun.com>
11991
537636c7
PE
11992 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
11993 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
11994 cursor, instead of leaving it undefined. This fixes a bug
11995 reported by Tim Van Holder in
161a71f3 11996 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
537636c7
PE
11997 * tests/input.at (Torturing the Scanner): Test the scanner on
11998 an empty input file, which was Tim Van Holder's test case.
11999
12000 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
12001 <sys/resource.h> can be included, include sys/time.h and
12002 sys/times.h first, if available. This works around the SunOS
12003 4.1.4 porting bug reported by Bruce Becker in
161a71f3 12004 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
537636c7
PE
12005
12006 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
12007 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
12008 AC_HEADER_SYS_WAIT.
12009
f61aad93
PE
12010 Merge changes from gnulib. This was prompted because the CVS
12011 snapshot didn't build on Solaris 7 due to strnlen problems.
12012
12013 These changes need to be merged back into gnulib:
12014 * lib/hash.c: Include <stdbool.h> unconditionally.
12015 * m4/onceonly.m4 (m4_quote): New macro.
12016 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
12017 Quote AC_FOREACH variable-expansions properly.
12018 The 2003-01-03 obstack.h change also needs merging.
12019 {end of changes requiring merging}
5b066063 12020
f61aad93
PE
12021 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
12022 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
12023 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
12024 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
12025 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
12026 New files, imported from gnulib.
12027 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
12028 above.
12029
12030 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
12031 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
12032 gnulib sources.
12033
12034 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
12035 Add.
12036 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
12037 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
12038 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
12039 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
12040 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
12041 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
12042 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
12043 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
12044 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
12045 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
12046 (jm_PREREQ_ARGMATCH): Remove.
12047 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
12048 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
12049
12050 * src/system.h: Include <stdbool.h> unconditionally.
12051
12052 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
12053 assuming at least C89 in the bitset code for some time now.
12054
d2ffe116
AD
120552003-03-03 Akim Demaille <akim@epita.fr>
12056
12057 * ro.po: New.
12058
052826fd
AD
120592003-03-02 Akim Demaille <akim@epita.fr>
12060
12061 * doc/bison.texinfo (Table of Symbols): Reactivate the
12062 documentation for %lex-param, and %parse-param.
12063
c4749565
AD
120642003-03-02 Akim Demaille <akim@epita.fr>
12065
12066 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
12067 generate verbose error messages.
12068 Use the number of tokens as an upper bound in yytname, as it
12069 cannot be a non terminal.
12070
d5286af1
AD
120712003-03-02 Akim Demaille <akim@epita.fr>
12072
12073 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
12074 message.
12075
22e304a6
AD
120762003-03-02 Akim Demaille <akim@epita.fr>
12077
22e304a6
AD
12078 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
12079 Use them to exercise yycheck overrun.
12080 Based on Andrew Suffield's grammar.
12081
67a25fed
AD
120822003-03-02 Akim Demaille <akim@epita.fr>
12083
12084 Create tests/local.at for Bison generic testing macros.
12085
12086 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
12087 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
12088 This new file.
12089 * tests/calc.at (AT_CHECK_CALC): Adjust.
12090 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
12091 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
12092 * tests/local.at: here.
12093 (AT_COMPILE_CXX): Tags the tests using it as c++.
12094 Ignore the test if CXX is not functional.
12095
9c2b381f
PE
120962003-03-01 Paul Eggert <eggert@twinsun.com>
12097
12098 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
12099 not loc->end, since loc->end might contain garbage and this leads
12100 to undefined behavior on some platforms.
12101 (id_loc, token_start): Use (IF_LINTed) initial values that do not
12102 depend on *loc, so that the reader doesn't give the the false
12103 impression that *loc is initialized.
12104 (<INITIAL>"%%"): Do not bother setting code_start, since its value
12105 does not survive the return.
12106
0433ba88
AD
121072003-03-01 Akim Demaille <akim@epita.fr>
12108
12109 * src/scan-gram.l (code_start): Always initialize it when entering
12110 into yylex, as SC_EPILOGUE is activated *before* the corresponding
12111 yylex invocation. An alternative would be making it static, but
12112 then it starts with the second %%'s beginning, instead of its end.
12113
b305ea69
PE
121142003-02-28 Paul Eggert <eggert@twinsun.com>
12115
12116 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
12117 around a UnixWare 7.1.1 porting bug reported by John Hughes in
161a71f3 12118 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
b305ea69 12119
c3d25e01
PE
121202003-02-26 Paul Eggert <eggert@twinsun.com>
12121
12122 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
12123 Remove Sequent/Pyramid discussion (nobody uses them any more).
12124 Merge VMS and MS-DOS discussion; these ports may well be dead
12125 but let's keep mentioning them for now. Put <> around email
12126 addresses. Add copyright notice.
12127
c267ffbc
PE
121282003-02-24 Paul Eggert <eggert@twinsun.com>
12129
12130 * data/glr.c (yy_reduce_print): yylineno -> yylno,
12131 to avoid collision with flex use of yylineno.
12132 Problem reported by Bruce Lilly in
161a71f3 12133 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
c267ffbc
PE
12134 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
12135 * data/yacc.c (yy_reduce_print): Likewise.
12136
12137 * config/depcomp: Sync with Automake 1.7.3.
12138
f939fc12
AD
121392003-02-21 Akim Demaille <akim@epita.fr>
12140
12141 * data/lalr1.cc: Use temporary variables instead of casts to
12142 change integer types.
12143 Suggested by Paul Eggert.
12144
95923bd6
AD
121452003-02-21 Akim Demaille <akim@epita.fr>
12146
12147 * doc/bison.texinfo: Use "location" consistently to refer to @n,
12148 to avoid confusions with lalr1.cc's notion of Position.
12149 Suggested by Paul Eggert.
12150
2cdc240e
AD
121512003-02-20 Akim Demaille <akim@epita.fr>
12152
12153 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
12154 before initial_columns.
12155 (location.hh): Use consistent variable names when defining the
12156 operator<<.
12157 Use "last" so that we subtract from Positions, not from unsigned.
12158
5d003116
AD
121592003-02-20 Akim Demaille <akim@epita.fr>
12160
12161 * data/lalr1.cc (position.hh): New subfile, including the extended
12162 and Doxygen'ed documentation of class Position.
12163 (location.hh): Use it.
12164 Document a` la Doxygen.
ba1ecc07 12165 With the help of Benoit Perrot.
5d003116 12166
d02b25f9
AD
121672003-02-20 Akim Demaille <akim@epita.fr>
12168
12169 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
12170 AT_YACC_IF.
12171 Redefine AT_YYERROR_SEES_LOC_IF using it.
12172 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
12173 not defined.
12174 Don't use the location in yy::Parser::error_ and
12175 yy::Parser::print_ when not %locations.
12176 Activate more lalr1.cc tests.
12177
0d1c3a04
AD
121782003-02-19 Akim Demaille <akim@epita.fr>
12179
12180 * data/lalr1.cc: When displaying a line number, be sure to make it
12181 an int.
12182
60a777aa
AD
121832003-02-19 Akim Demaille <akim@epita.fr>
12184
12185 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
12186 Remove, useless.
12187 (YYABORT, YYACCEPT, YYERROR): New.
12188 * tests/calc.at: Renable the lalr1.cc test.
12189
0b86fc41
AD
121902003-02-19 Akim Demaille <akim@epita.fr>
12191
12192 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
12193 error recovery, mixing with/without pops and discarding of the
12194 lookahead.
12195 Exercise YYERROR.
12196 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
12197
da99a5dc
PE
121982003-02-17 Paul Eggert <eggert@twinsun.com>
12199
12200 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
12201 * tests/testsuite.at (AT_COMPILE): Use them.
12202 This fixes the testsuite problem reported by Robert Lentz in
161a71f3 12203 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
da99a5dc 12204
93b8c255
PE
122052003-02-12 Paul Eggert <eggert@twinsun.com>
12206
12207 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
12208 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
161a71f3 12209 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
93b8c255
PE
12210 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
12211 Check for malloc failure, for consistency with yacc.c.
12212 (yytname_size): Remove, for consistency with yacc.c.
12213
12214 The bug still remains in data/lalr1.cc, as I didn't have time
12215 to fix it there.
12216
7548fed2
AD
122172003-02-06 Akim Demaille <akim@epita.fr>
12218
12219 * configure.ac (GXX): Rename as...
12220 (CXX): this, to keep the original Autoconf semantics.
12221 Require 2.57.
12222 * data/lalr1.cc: Fix b4_copyright invocations.
12223 If YYDEBUG is not defined, don't depend upon name_ being defined.
12224 (location.hh): Include string and iostream.
12225 (Position::filename): New member.
12226 (Position::Position ()): New.
12227 (operator<< (Position)): New.
12228 (operator- (Position, int)): New.
12229 (Location::first, Location::last): Rename as...
12230 (Location::begin, Location::end): these, to mock the conventional
12231 iterator names.
12232 (operator<< (Location)): New.
12233 * tests/atlocal.in (CXX): New.
12234 * tests/testsuite.at (AT_COMPILE_CXX): New.
12235 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
12236 locations in a more synthetic way.
12237 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
12238 lalr1.cc is used.
12239 Adjust the C locations to match those from Emacs: first column is
12240 column 0.
12241 Change all the expected results.
12242 Conform to the GCS: simplify the locations when applicable.
12243 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
12244 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
12245 these CPP macros with the m4 macros new defined by...
12246 (AT_CHECK_PUSHDEFS): this, i.e.:
12247 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
d02b25f9 12248 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7548fed2
AD
12249 New macros.
12250 (AT_CHECK_POPDEFS): Undefine them.
12251 (AT_CHECK_CALC_LALR1_CC): New.
12252 Use it for the first lalr1.cc test.
12253
43a176ef
AD
122542003-02-04 Akim Demaille <akim@epita.fr>
12255
12256 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
12257 Location as is defined.
12258
fc049e9c
AD
122592003-02-04 Akim Demaille <akim@epita.fr>
12260
12261 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
12262 name_ being defined.
12263
a737b216
PE
122642003-02-03 Paul Eggert <eggert@twinsun.com>
12265
12266 * src/gram.h (start_symbol): Remove unused decl.
12267
12268 Use more-consistent naming conventions for local vars.
12269
12270 * src/derives.c (derives_compute): Change type of local var from
12271 int to rule_number.
12272 * src/gram.c (grammar_rules_partial_print): Likewise.
12273 * src/print.c (print_core): Likewise.
12274 * src/reduce.c (reduce_grammar_tables): Likewise.
12275
12276 * src/gram.c (grammar_dump): Change name of item_number *
12277 local var from r to rp.
12278 * src/nullable.c (nullable_compute): Likewise.
12279
12280 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
12281
12282 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
12283 for symbol or symbol_number var.
12284 * src/reader.c (grammar_start_symbol_set): Likewise.
12285 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
12286 Likewise.
12287 * src/state.c (transitions_to): Likewise.
12288 * src/state.h: Likewise.
12289 * src/tables.c (symbol_number_to_vector_number): Likewise.
12290
12291 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
12292 char * var.
12293
12294 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
12295 var.
12296
12297 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
12298 var.
12299
12300 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
12301 Use str, not s, for char * var. Use ch, not c, for character var.
12302 Use size for size var.
12303
12304 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
12305 char * var.
12306 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
12307 uniqstr var.
12308 * src/uniqstr.h: Likewise.
12309
12310 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
12311 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
12312 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
12313 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
12314 param to have same name as that of enum, so that we don't use
12315 "s" to stand for a non-state.
12316
68e93ad5
AD
123172003-02-02 Akim Demaille <akim@epita.fr>
12318
12319 * src/scan-skel.l: Scan more than one inert character per yylex
12320 invocation.
12321
92898986
PE
123222003-02-01 Paul Eggert <eggert@twinsun.com>
12323
12324 Version 1.875a.
12325
1d9d5d71
PE
12326 * po/LINGUAS: Add ms.
12327
0435d061
AD
123282003-01-30 Akim Demaille <akim@epita.fr>
12329
12330 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
12331
6029a57f
PH
123322003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12333
12334 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
12335 of $1.
0435d061
AD
12336
12337 Changes in response to error report by S. Eken: GLR mode does not
6029a57f 12338 handle negative $ indices or $ indices in embedded rules correctly.
161a71f3 12339 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
0435d061 12340
6029a57f
PH
12341 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
12342 (b4_rhs_location): Ditto.
0435d061 12343 (yyfill): New function to copy from stack tree into array
6029a57f 12344 incrementally.
0435d061
AD
12345 (yyuserAction): Modify to allow incremental move of semantic values
12346 to rhs array when in GLR mode.
12347 Define YYFILL to use in user-defined actions to fill semantic array
6029a57f
PH
12348 as needed.
12349 Remove dummy use of yystack, as there is now a guaranteed use.
12350 (yydoAction): Modify to allow incremental move of semantic values
12351 to rhs array when in GLR mode.
12352 (yyresolveAction): Ditto.
12353 (yyglrShiftDefer): Update comment.
0435d061 12354 (yyresolveStates): Use X == NULL for pointers, not !X.
6029a57f
PH
12355 (yyglrReduce): Ditto.
12356 (yydoAction): Ditto
0435d061 12357
6029a57f
PH
12358 * tests/glr-regr1.at: Rename to ...
12359 * tests/glr-regression.at: Add new regression test for the problems
12360 described above (adapted from S. Eken).
12361 Update copyright notice.
12362 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
12363 * tests/Makefile.am: Ditto.
12364
6cee6297
PE
123652003-01-28 Paul Eggert <eggert@twinsun.com>
12366
12367 * data/lalr1.cc: Do not use @output_header_name@ unless
12368 b4_defines_flag is set. This fixes two bugs reported by
12369 Tim Van Holder in
161a71f3
PE
12370 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
12371 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
6cee6297 12372
b2a836b5
PE
123732003-01-21 Paul Eggert <eggert@twinsun.com>
12374
12375 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
12376 we don't need to worry about yyerrlab1 being reported as an
12377 "unused label" by non-GCC C compilers. The downside is that if
12378 locations are used then a couple of statements are duplicated each
12379 time YYERROR is invoked, but the upside is that the warnings
12380 should vanish.
12381 (yyerrlab1): Move code to YERROR.
12382 (yyerrlab2): Remove. Change uses back to yyerrlab1.
12383 This reverts some of the 2002-12-27 change.
12384
4196b931
PE
123852003-01-17 Paul Eggert <eggert@twinsun.com>
12386
12387 * src/output.c (symbol_printers_output): Fix typo that led
12388 to core dump. Problem reported by Antonio Rus in
161a71f3 12389 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
4196b931 12390
3ae831b4
AD
123912003-01-13 Akim Demaille <akim@epita.fr>,
12392 Quoc Peyrot <chojin@lrde.epita.fr>,
12393 Robert Anisko <anisko_r@lrde.epita.fr>
12394
12395 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
12396 when the stacks contain one element, as the loop would otherwise
12397 free the last state, and then use the top state (the one we just
12398 popped). This means that the initial elements will not be freed
12399 explicitly, as is the case in yacc.c; it is not a problem, as
12400 these elements have fake values.
12401
e3aa65c5
PE
124022003-01-11 Paul Eggert <eggert@twinsun.com>
12403
12404 * NEWS: %expect-violations are now just warnings, reverting
12405 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
12406 bootstrapping problem reported by Matthias Klose; see
161a71f3 12407 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
e3aa65c5
PE
12408 * src/conflicts.c (conflicts_print): Likewise.
12409 * tests/conflicts.at (%expect not enough, %expect too much,
12410 %expect with reduce conflicts): Likewise.
12411 * doc/bison.texinfo (Expect Decl): Document this. Also mention
12412 that the warning is enabled if the number of conflicts changes
12413 (not necessarily increases).
12414
12415 * src/getargs.c (version): Update copyright year.
12416
f0057011
AD
124172003-01-09 Akim Demaille <akim@epita.fr>
12418
12419 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
12420
1ee6d2a0
PE
124212003-01-08 Paul Eggert <eggert@twinsun.com>
12422
12423 * Makefile.maint (WGETFLAGS):
12424 New macro, containing "-C off" to disable proxy caches.
12425 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
12426 (rel-check): Use $(WGET) instead of wget.
12427
d4fd77c4
PE
124282003-01-06 Paul Eggert <eggert@twinsun.com>
12429
12430 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
12431 the GLR paper of Scott, Johnstone and Hussain.
12432
464c6927
PE
124332003-01-04 Paul Eggert <eggert@twinsun.com>
12434
d600ee67
PE
12435 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
12436 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
12437 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
12438 (EXTRA_LIBRARIES): New var, for liby.a.
12439 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
12440 (EXTRA_SCRIPTS): New var, for yacc.
12441
464c6927
PE
12442 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
12443 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
12444 Problem reported by Nelson H. F. Beebe.
12445
124462003-01-03 Paul Eggert <eggert@twinsun.com>
12447
12448 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
12449 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
12450 when compiling Bison 1.875's `bitset bset = obstack_alloc
12451 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
12452
12453 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
12454 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
12455 grow to a huge size with typical invocation.
d600ee67 12456
464c6927
PE
12457 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
12458 Use the pattern recommended by Autoconf 2.57, except also protect
12459 against double-definition.
12460 * src/system.h: Likewise.
12461 Portability issues reported by Nelson H. F. Beebe.
d600ee67 12462
464c6927
PE
12463 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
12464 All uses changed. Provide a definition in both C and C++.
12465 (yytrue, yyfalse): Define even if defined (__cplusplus).
12466
12467 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
12468 Reported by Nelson H. F. Beebe.
d600ee67 12469
464c6927
PE
12470 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
12471
0f42c7d5
PE
124722003-01-02 Paul Eggert <eggert@twinsun.com>
12473
12474 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
12475 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
12476 Bug reported by Nelson H. F. Beebe.
12477
dc546b0f
PE
124782003-01-01 Paul Eggert <eggert@twinsun.com>
12479
12480 * Version 1.875.
12481
2c09b6a7
PE
124822002-12-30 Paul Eggert <eggert@twinsun.com>
12483
12484 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
12485 Moved here from...
12486 (<INITIAL>","): Here. This causes stray "," to be treated
12487 more uniformly.
12488
dc546b0f 12489 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2c09b6a7
PE
12490 last brace in braced code when not in Yacc mode, for compatibility
12491 with Bison 1.35. This resurrects the 2001-12-15 patch to
12492 src/reader.c.
12493
12494 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
12495 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
12496
535c0f63
PE
124972002-12-28 Paul Eggert <eggert@twinsun.com>
12498
12499 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
12500 that of SYM's type. This fixes Debian bug 168069, reported by
12501 Thomas Olsson.
d600ee67 12502
963fcc17
PE
125032002-12-28 Paul Eggert <eggert@twinsun.com>
12504
12505 Version 1.75f.
12506
12507 Switch back to the Yacc style of conflict reports, undoing some
12508 of the 2002-07-30 change.
12509 * doc/bison.texinfo (Understanding): Use Yacc style for
12510 conflict reports. Also, use new way of locating rules.
12511 * src/conflicts.c (conflict_report):
12512 Renamed from conflict_report_yacc, removing the old
12513 'conflict_report'. Translate the entire conflict report at once,
12514 so that we don't assume that "," has the same interpretation in
12515 all languages.
12516 (conflicts_output): Use Yacc-style conflict report for each state,
12517 instead of our more-complicated style.
12518 (conflicts_print): Use Yacc-style conflict report, except print
12519 the input file name when not emulating Yacc.
12520 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
12521 Conflicted Reduction, %expect not enough, %expect too much,
12522 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
12523 * tests/existing.at (GNU Cim Grammar): Likewise.
12524 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
12525
12526 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
12527 fatal): Don't invoke fflush; it's not needed and it might even be
12528 harmful for stdout, as stdout might not be open.
12529 * src/reduce.c (reduce_print): Likewise.
12530
b1efe548
PE
125312002-12-27 Paul Eggert <eggert@twinsun.com>
12532
12533 Fix a bug where error locations were not being recorded correctly.
12534 This problem was originally reported by Paul Hilfinger in
161a71f3 12535 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
b1efe548
PE
12536
12537 * data/yacc.c (yyparse): New local var yylerrsp, to record the
12538 top of the location stack's error locations.
12539 (yyerrlab): Set it. When discarding a token, push its location
12540 onto yylerrsp so that we don't lose track of the error's end.
12541 (yyerrlab1): Now is only the target of YYERROR, so that we can
12542 properly record the location of the action that failed. For GCC
12543 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
12544 GCC warning about yyerrlab1 being unused if YYERROR is unused.
12545 (yyerrlab2): New label, which yyerrlab now falls through to.
12546 Compute the error's location by applying YYLLOC_DEFAULT to
12547 the locations of all the symbols that went into the error.
12548 * doc/bison.texinfo (Location Default Action): Mention that
12549 YYLLOC_DEFAULT is also invoked for syntax errors.
12550 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
12551 Error locations include the locations of all the tokens that were
12552 discarded, not just the last token.
d600ee67 12553
983c5c2c
PE
125542002-12-26 Paul Eggert <eggert@twinsun.com>
12555
b1efe548
PE
12556 * src/files.c: Include quote.h.
12557 (compute_output_file_names): Warn if we detect conflicting
12558 outputs to the same file. This should catch the misunderstanding
12559 exemplified by Debian Bug 165349, reported by Bruce Stephens..
12560
12561 * src/conflicts.c (conflicts_print): If the user specifies
12562 "%expect N", report an error if there are any reduce/reduce
12563 conflicts. This is what the manual says should happen.
12564 This fixes Debian bug 130890, reported by Anthony DeRobertis.
12565 * tests/conflicts.at (%expect with reduce conflicts): New test.
12566
983c5c2c
PE
12567 Don't use m4_include on relative file names, as it doesn't work as
12568 desired if there happens to be a file with that name under ".".
d600ee67 12569
983c5c2c
PE
12570 * m4sugar/version.m4: Remove; it was included but it wasn't used.
12571 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
12572 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
12573 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
12574 * src/output.c (output_skeleton): Use full path names when
12575 specifying a file to include; don't rely on include path, as
12576 it's unreliable when the working file contains a file with
12577 that name.
d600ee67 12578
983c5c2c
PE
125792002-12-25 Paul Eggert <eggert@twinsun.com>
12580
12581 Remove obsolete references to bison.simple and bison.hairy.
12582 Problem mentioned by Aubin Mahe in
161a71f3 12583 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
983c5c2c
PE
12584 * data/glr.c: Comment fix.
12585 * doc/bison.1: Remove references. Also, mention "yacc".
12586
12587 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
12588 with -g option.
12589
12590 * src/parse-gram.y (declaration): Use enum "report_states" rather
12591 than its numeric value 1.
12592
12593 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
12594 opening a new one. This fixes Debian bug 165349, reported by
12595 Bruce Stephens.
12596
23f2d9dc
PE
125972002-12-24 Paul Eggert <eggert@twinsun.com>
12598
12599 Version 1.75e.
12600
12601 * Makefile.maint (cvs-update): Don't assume that the shell
12602 supports $(...), as Solaris sh doesn't.
12603
12604 * src/parse-gram.y (lloc_default): Remove test for empty
12605 nonterminals at the end, since it didn't change the result.
12606
126072002-12-24 Paul Eggert <eggert@twinsun.com>
33167b8b
PE
12608
12609 If the user does not define YYSTYPE as a macro, Bison now declares it
12610 using typedef instead of defining it as a macro. POSIX requires this.
12611 For consistency, YYLTYPE is also declared instead of defined.
12612
12613 %union directives can now have a tag before the `{', e.g., the
12614 directive `%union foo {...}' now generates the C code
12615 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
12616 The default union tag is `YYSTYPE', for compatibility with Solaris 9
12617 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
12618 instead of `yyltype'.
12619
12620 `yystype' and `yyltype' are now obsolescent macros instead of being
12621 typedefs or tags; they are no longer documented and will be
12622 withdrawn in a future release.
12623
12624 * data/glr.c (b4_location_type): Remove.
12625 (YYSTYPE): Renamed from yystype.
12626 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
12627 (struct YYLTYPE): Renamed from struct yyltype.
12628 (YYLTYPE): Renamed from yyltype.
12629 (yyltype, yystype): New (and obsolescent) macros,
12630 for backward compatibility.
12631 * data/yacc.c: Likewise.
12632
12633 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
12634 does not specify a union tag. This is for compatibility with
12635 Solaris 9 yacc.
12636
12637 * src/parse-gram.y (add_param): 2nd arg is now char * not char
12638 const *, since it is now modified by stripping surrounding { }.
12639 (current_braced_code): Remove.
12640 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
12641 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
12642 trailing " {...}". Now of type <chars>.
12643 (grammar_declaration): Adjust to bundled tokens.
12644 (code_content): Remove; stripping is now done by add_param.
12645 (print_token_value): Print contents of bundled tokens.
12646 (token_name): New function.
12647
12648 * src/reader.h (braced_code, current_braced_code): Remove.
12649 (token_name): New decl.
12650
12651 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
12652 token_type, not braced_code code_kind. All uses changed.
12653 (SC_PRE_CODE): New state, for scanning after a keyword that
12654 has (or usually has) an immediately-following braced code.
12655 (token_type): New local var, to keep track of which token type
12656 to return when scanning braced code.
12657 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
dc546b0f 12658 <INITIAL>"%parse-param", <INITIAL>"%printer",
33167b8b
PE
12659 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
12660 instead of returning a token type immediately.
12661 (<INITIAL>"{"): Set token type.
12662 (<SC_BRACED_CODE>"}"): Use it.
12663 (handle_action_dollar, handle_action_at): Now returns bool
12664 indicating success. Fail if ! current_rule; this prevents a core dump.
12665 (handle_symbol_code_dollar, handle_symbol_code_at):
12666 Remove; merge body into caller.
12667 (handle_dollar, handle_at): Complain in invalid contexts.
12668
12669 * NEWS, doc/bison.texinfo: Document the above.
12670 * NEWS: Fix years and program names in copyright notice.
12671
879ca4f8
PE
126722002-12-17 Paul Eggert <eggert@twinsun.com>
12673
12674 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
12675 Reporting, Table of Symbols): Omit mentions of %lex-param and
12676 %parse-param from the documentation for now.
12677
1c5fe69d
PE
126782002-12-15 Paul Eggert <eggert@twinsun.com>
12679
12680 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
12681 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
12682 lookahead symbol, and which sets yychar in parser actions) and it
7ea9026a
PE
12683 disagreed with the Bison documentation. Bug
12684 reported by Andrew Walrond.
d600ee67 12685
1c5fe69d
PE
12686 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
12687 as the caller now does that.
12688 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
12689 (YYEMPTY): Parenthesize right hand side, since others use it.
12690 (yyparse): Don't assume that our generated code is the only code
12691 that sets yychar.
12692
d1de5372
PE
126932002-12-13 Paul Eggert <eggert@twinsun.com>
12694
12695 Version 1.75d.
12696
12697 POSIX requires a "yacc" command.
12698 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
12699 (MOSTLYCLEANFILES): Add yacc.
12700 (yacc): New rule.
1c5fe69d 12701 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
d1de5372
PE
12702 as an alias for bison y.
12703
12704 * po/LINGUAS: Add da.
d600ee67 12705
d1de5372
PE
12706 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
12707 problem with latest <getopt.h>.
12708 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
12709
12710 * doc/fdl.texi: Upgrade to 1.2.
12711 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
12712 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
12713 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
12714 gnulib.
12715 * config/install-sh: Sync with autotools.
12716
12717 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
161a71f3 12718 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
d1de5372
PE
12719 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
12720 locations are requested.
12721 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
12722 locations are requested.
12723
d0f3fe23
PE
127242002-12-12 Paul Eggert <eggert@twinsun.com>
12725
12726 Remove unportable casts and storage allocation tricks.
12727 While we're at it, remove almost all casts, since they
12728 usually aren't needed and are a sign of trouble.
12729
12730 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
12731
12732 * src/derives.c (derives_compute): Do not subtract NTOKENS from
12733 the pointer DSET returned by malloc; this isn't portable.
12734 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
12735 Similarly for DERIVES.
12736 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
12737 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
12738 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
12739
12740 * src/derives.c (derives_compute): Do not bother invoking
12741 int_of_rule_number, since rule numbers are integers.
12742
12743 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
12744 rather than XMALLOC (char, N).
12745
12746 * src/files.c (filename_split): Rewrite to avoid cast.
12747
12748 * src/gram.h (symbol_number_as_item_number,
12749 item_number_as_symbol_number, rule_number_as_item_number,
12750 item_number_as_rule_number):
12751 Now inline functions rather than macros, to avoid casts.
12752 * src/state.h (state_number_as_int): Likewise.
12753 * src/tables.c (state_number_to_vector_number,
12754 symbol_number_to_vector_number): Likewise.
12755
12756 * src/gram.h (int_of_rule_number): Remove; no longer used.
12757
12758 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
12759 since the resulting storage is always stored into.
12760
12761 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
12762 where it's needed.
12763
12764 * src/muscle_tab.c (muscle_m4_output):
12765 Now inline. Return bool, not int.
12766 * src/state.c (state_compare): Likewise.
12767 * src/symtab.c (symbol_check_defined,
12768 symbol_check_alias_consistency, symbol_pack, symbol_translation,
12769 hash_compare_symbol, hash_symbol):
12770 Likewise.
12771 * src/uniqstr.c (uniqstr_print): Likewise.
12772 * src/muscle_tab.c (muscle_m4_output_processor):
12773 New function, to avoid casts.
12774 * src/state.c (state_comparator, stage_hasher): Likewise.
12775 * src/symtab.c (symbol_check_defined_processor,
12776 symbol_check_alias_consistency_processor, symbol_pack_processor,
12777 symbol_translation_processor, hash_symbol_comparator,
12778 hash_symbol_hasher): Likewise.
12779 * src/uniqstr.c (uniqstr_print_processor): Likewise.
12780 * src/muscle_tab.c (muscles_m4_output):
12781 Use new functions instead of casting old functions unportably.
12782 * src/state.c (state_hash_new): Likewise.
12783 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
12784 symbols_token_translations_init):
12785 Likewise.
12786 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
12787
12788 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
12789 var instead of casting to long, to avoid casts.
12790 (prepare_states): Use MALLOC rather than alloca, so that we don't
12791 have to worry about alloca.
12792 * src/state.c (state_hash_lookup): Likewise.
12793
12794 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
12795 local var instead of casting to unsigned char, to avoid casts.
12796
12797 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
12798 STATE_ALLOC): Remove.
12799 (transitions_new, errs_new, reductions_new, state_new): Use malloc
12800 rather than calloc, and use offsetof to avoid allocating slightly
12801 too much storage.
12802 (state_new): Initialize all members.
12803
12804 * src/state.c (state_hash): Use unsigned accumulator, not signed.
12805
12806 * src/symtab.c (symbol_free): Remove; unused.
12807 (symbol_get): Remove cast in lhs of assignment.
12808 (symbols_do): Now static. Accept generic arguments, not
12809 hashing-related ones.
12810
12811 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
12812 (symbol_processor): Remove.
12813 (symbols_do): Remove decl; now static.
12814
12815 * src/system.h (alloca): Remove; decl no longer needed.
12816 (<stddef.h>): Include, for offsetof.
12817 (<inttypes.>, <stdint.h>): Include if available.
12818 (uintptr_t): New type, if system lacks it.
12819 (CALLOC, MALLOC, REALLOC): New macros.
12820 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
12821 new macros.
12822
12823 * src/tables.c (table_size): Now int, to pacify GCC.
12824 (table_grow, table_ninf_remap): Use signed table size.
12825 (save_row): Don't bother initializing locals when not needed.
12826 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
12827 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
12828
12829 * src/vcg.h: Correct misspellings.
12830
12831 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
12832
12833
12834 * src/getargs.c (getargs): Don't assume EOF == -1.
12835
26b4a969
PE
128362002-12-09 Paul Eggert <eggert@twinsun.com>
12837
12838 Change identifier spellings to avoid collisions with names
12839 that are reserved by POSIX.
12840
12841 Don't use names ending in _t, since POSIX reserves them.
12842 For consistency, remove _e and _s endings -- they're weren't
12843 needed to remove ambiguity. All uses changed.
12844 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
12845 turn was just renamed from struniq_t.
12846 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
12847 which in turn was just renamed from struniq_processor_t.
12848 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
12849 in turn was renamed from hash_compare_struniq_t.
12850 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
12851 (state_list): Renamed from state_list_t.
12852 * src/assoc.h (assoc): Renamed from assoc_t.
12853 * src/conflicts.c (enum conflict_resolution): Renamed from
12854 enum conflict_resolution_e.
12855 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
12856 (rule_list): Renamed from rule_list_t.
12857 * src/getargs.h (enum trace): Renamed from enum trace_e.
12858 (enum report): Renamed from enum report_e.
12859 * src/gram.h (item_number): Renamed from item_number_t.
12860 (rule_number): Renamed from rule_number_t.
12861 (struct rule_s): Remove the "rule_s" part; not used.
12862 (rule): Renamed from rule_t.
12863 (rule_filter): Renamed from rule_filter_t.
12864 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
12865 (goto_list): Renamed from goto_list_t.
12866 * src/lalr.h (goto_number): Renamed from goto_number_t.
12867 * src/location.h (location): Renamed from location_t.
12868 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
12869 and moved here from:
12870 * src/muscle_tab.h (muscle_entry_t): here.
12871 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
12872 (rule_list): Renamed from rule_list_t.
12873 * src/print_graph.c (static_graph): Renamed from graph.
12874 * src/reader.h (braced_code): Renamed from braced_code_t.
12875 Remove brace_code_e tag.
12876 * src/relation.h (relation_node): Renamed from relation_node_t.
12877 (relation_nodes): Renamed from relation_nodes_t.
12878 (relation): Renamed from relation_t.
12879 * src/state.h (state_number): Renamed from state_number_t.
12880 (struct state): Renamed from struct state_s.
12881 (state): Renamed from state_t.
12882 (transitions): Renamed from transitions_t. Unused (and
12883 misspelled) transtion_s tag removed.
12884 (errs): Renamed from errs_t. Unused errs_s tag removed.
12885 (reductions): Renamed from reductions_t. Unused tag
12886 reductions_s removed.
12887 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
12888 (struct symbol_list): Renamed from struct symbol_list_s.
12889 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
12890 (struct symbol): Renamed from struct symbol_s.
12891 (symbol): Renamed from symbol_t.
12892 * src/tables.c (vector_number): Renamed from vector_number_t.
12893 (action_number): Renamed from action_t.
12894 * src/tables.h (base_number): Renamed from base_t.
12895 * src/vcg.h (enum color): Renamed from enum color_e.
12896 (enum textmode): Renamed from enum textmode_e.
12897 (enum shape): Renamed from enum shape_e.
12898 (struct colorentry): Renamed from struct colorentry_s.
12899 (struct classname): Renamed from struct classname_s.
12900 (struct infoname): Renamed from struct infoname_s.
12901 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
12902 (enum decision): Renamed from enum decision_e.
12903 (enum orientation): Renamed from enum orientation_e.
12904 (enum alignment): Renamed from enum alignment_e.
12905 (enum arrow_mode): Renamed from enum arrow_mode_e.
12906 (enum crossing_type): Renamed from enum crossing_type_e.
12907 (enum view): Renamed from enum view_e.
12908 (struct node): Renamed from struct node_s.
12909 (node): Renamed from node_t.
12910 (enum linestyle): Renamed from enum linestyle_e.
12911 (enum arrowstyle): Renamed from enum arrowstyle_e.
12912 (struct edge): Renamed from struct edge.
12913 (edge): Renamed from edge_t.
12914 (struct graph): Renamed from struct graph_s.
12915 (graph): Renamed from graph_t.
12916 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
12917 Rename value_t -> value.
12918 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
12919 value_t_as_yystype -> value_as_yystype.
12920
12921 Don't include <errno.h> in the mainstream code, since it
12922 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
12923 * lib/get-errno.c, lib/get-errno.h: New files.
12924 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
12925 get-errno.c.
12926 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
12927 * src/output.c (output_skeleton): Likewise.
12928 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
12929 instead of errno.
12930 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
12931 Likewise.
12932 (handle_action_dollar, handle_action_at): Likewise.
12933 * src/system.h: Do not include <errno.h>.
12934 (TAB_EXT): Renamed from EXT_TAB.
12935 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
12936
12937 Avoid str[a-z]*, since <string.h> reserves that name space.
12938 Change all instances of "struniq" in names to "uniqstr", and
12939 likewise for "STRUNIQ" and "UNIQSTR".
12940 * src/uniqstr.c: Renamed from src/struniq.c.
12941 * src/uniqstr.h: Renamed from src/struniq.h.
12942 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
12943 * src/files.c (strsuffix): Remove; unused.
12944 (concat2): Renamed from stringappend. Now static.
12945 * src/files.h (strsuffix, stringappend): Remove; unused.
12946 * src/parse-gram.y (<chars>): Renamed from <string>.
12947 (<uniqstr>): Renamed from <struniq>.
12948 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
12949 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
12950 (struct graph_s.expand): Renamed from struct graph_s.stretch.
12951 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
12952 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
12953 (N_EXPAND): Renamed from N_STRETCH.
12954
12955 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
12956 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
12957 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
12958 Remove; unused.
12959 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
12960 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
12961 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
12962 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
12963 (BASE_MAXIMUM): Renamed from BASE_MAX.
12964 (BASE_MINIMUM): Renamed from BASE_MIN.
12965 (ACTION_MAX): Remove; unused.
12966 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
12967 Unnecessary casts removed from above defines.
12968
12969
12970 Fix misspelling in names.
12971 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
12972 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
12973 G_NODE_ALIGNEMENT.
12974
12975
12976 * lib/timevar.c (timevar_report): Renamed from time_report,
12977 for consistency with other names.
12978 * lib/timevar.h (timevar_report): New decl.
12979 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
12980
12981
12982 Sort include-file uses.
12983
12984 Reorder all include files under src to be in the order "system.h".
12985 then the ../lib include files in angle brackets (alphabetized),
12986 then the . include files in double-quotes (alphabetized). Fix
12987 dependency breakages encountered in this process, as follows:
12988 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
12989 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
12990 * src/state.h: Include "symtab.h".
12991
996b1c7e
PE
129922002-12-08 Paul Eggert <eggert@twinsun.com>
12993
12994 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
12995 since this causes problems when __file__ contains character
12996 sequences like "@" that are treated specially by src/scan-skel.l.
12997 Instead, just use the file's basename. This fixes the bug
12998 reported by Martin Mokrejs in
161a71f3 12999 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
996b1c7e 13000
e19c4e5d
PE
130012002-12-06 Paul Eggert <eggert@twinsun.com>
13002
13003 Add support for rules that do not have trailing semicolons, as
13004 POSIX requires. Improve the quality of locations in Bison
13005 diagnostics.
26b4a969 13006
e19c4e5d
PE
13007 * src/location.c: Include <quotearg.h>.
13008 (empty_location): Now const.
13009 (location_print): New function. Follow the recommendation of the
13010 GNU Coding Standards for locations that span file boundaries.
13011 * src/location.h: Do not include <quotearg.h>; no longer needed.
13012 (boundary): New type.
13013 (location_t): Use it. This allows locations to span file boundaries.
13014 All member uses changed: file -> start.file or end.file (as needed),
13015 first_line -> start.line, first_column -> start.column,
13016 last_line -> end.line, last_column -> end.column.
13017 (equal_boundaries): New function.
13018 (LOCATION_RESET, LOCATION_STEP): Remove.
13019 (LOCATION_PRINT): Remove. All callers changed to use location_print.
13020 (empty_location): Now const.
13021 (location_print): New decl.
13022 * src/parse-gram.y (lloc_default): New function, which handles
13023 empty locations more accurately.
13024 (YYLLOC_DEFAULT): Use it.
13025 (%token COLON): Remove.
13026 (%token ID_COLON): New token.
26b4a969 13027 (rules): Use it.
e19c4e5d
PE
13028 (declarations, rules): Remove trailing semicolon.
13029 (declaration, rules_or_grammar_declaration):
13030 Allow empty (";") declaration.
13031 (symbol_def): Remove empty actions; no longer needed.
13032 (rules_or_grammar_declaration): Remove trailing semicolon.
13033 (semi_colon.opt): Remove.
13034 * src/reader.h: Include location.h.
13035 (scanner_cursor): New decl.
13036 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
13037 rolling our own.
13038 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
13039 of *loc.
13040 (STEP): Remove. No longer needed, now that adjust_location does
13041 the work. All uses removed.
13042 (scanner_cursor): New var.
13043 (adjust_location): Renamed from extend_location. It now sets
13044 *loc and adjusts the scanner cursor. All uses changed.
13045 Don't bother testing for CR.
13046 (handle_syncline): Remove location arg; now updates scanner cursor.
13047 All callers changed.
13048 (unexpected_end_of_file): Now accepts start boundary of token or
13049 comment, not location. All callers changed. Update scanner cursor,
13050 not the location.
13051 (SC_AFTER_IDENTIFIER): New state.
13052 (context_state): Renamed from c_context. All uses changed.
13053 (id_loc, code_start, token_start): New local vars.
13054 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
13055 processing of Yacc white space and equivalents here.
13056 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
13057 instead of returning ID immediately, since we need to search for
13058 a subsequent colon.
13059 (<INITIAL>"'", "\""): Save token_start.
13060 (<INITIAL>"%{", "{", "%%"): Save code_start.
13061 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
13062 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
13063 BEGIN context_state at end, not INITIAL.
13064 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
13065 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
13066 Return correct token start.
13067 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
13068 the start of a character, string or multiline comment is found.
13069 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
13070 Reduction): Adjust reported locations to match the more-precise
13071 results now expected.
13072 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
13073 * tests/reduce.at (Useless Rules, Reduced Automaton,
13074 Underivable Rules): Likewise.
13075 * tests/regression.at (Invalid inputs): No longer `expecting ";"
13076 or "|"' now that so many other tokens are allowed by the new grammar.
13077
13078 * src/complain.h (current_file): Remove duplicate decl;
13079 current_file is now owned by files.h.
13080 * src/complain.c, src/scan-gram.l: Include files.h.
13081
130822002-12-06 Paul Eggert <eggert@twinsun.com>
26b4a969 13083
e19c4e5d
PE
13084 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
13085 promotes to int; it might be unsigned int.
13086 * data/yacc.c (yy_reduce_print): Likewise.
13087
13088 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
13089 be #defined in the prologue, not in the Bison declarations.
13090 This fixes Debian Bug 102878, reported by Shaul Karl.
26b4a969 13091
b64755e3
PE
130922002-12-02 Paul Eggert <eggert@twinsun.com>
13093
13094 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
13095 * lib/strtoul.c: New file, from gnulib.
13096 This fixes a porting bug reported by Peter Klein in
161a71f3 13097 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
b64755e3 13098
6e746484
PE
130992002-11-30 Paul Eggert <eggert@twinsun.com>
13100
b64755e3
PE
13101 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
13102 and put only a forward declaration in the prologue. This is for
13103 consistency with the other scanner helper functions.
13104
6ba55592
PE
13105 Type clashes now generate warnings, not errors, since it
13106 appears that POSIX may allow some grammars with type clashes.
13107 * src/reader.c (grammar_current_rule_check): Warn about
13108 type clashes instead of complaining.
13109 * tests/input.at (Type Clashes): Expect warnings, not complaints.
13110
6e746484
PE
13111 Add Yacc library, since POSIX requires it.
13112 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
13113 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
13114 * lib/main.c, lib/yyerror.c: New files.
13115
13116 gram_error can be static; it need not be extern.
13117 * src/reader.h (gram_error): Remove decl.
13118 * src/parse-gram.y (gram_error): Now static. Add static decl.
13119 (print_token_value): Omit parameter names from forward decl,
13120 for consistency.
13121
88510f9c
PE
131222002-11-29 Paul Eggert <eggert@twinsun.com>
13123
6e746484
PE
13124 * doc/bison.texinfo: Emphasize that yylex and yyerror must
13125 be declared before being used. E.g., one should typically
13126 declare them in the prologue. Use GNU coding style in examples.
13127 Put "const" consistently after the type it modifies. Mention
13128 that C99 supports "inline". Mention that yyerror traditionally
13129 returns "int".
13130
88510f9c
PE
13131 %parse-param and %lex-param now take just one argument, the
13132 declaration; the argument name is deduced from the declaration.
13133
13134 * doc/bison.texinfo (Parser Function, Pure Calling, Error
13135 Reporting, Table of Symbols): Document this.
13136 * src/parse-gram.y (add_param): New function.
13137 (COMMA): Remove.
13138 (declaration): Implement new rule for %parse-param and %lex-param.
13139 * src/scan-gram.l: "," now elicits a warning, rather than being
13140 a token; this is more compatible with byacc.
13141 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
13142
bb92250c
PE
131432002-11-27 Paul Eggert <eggert@twinsun.com>
13144
13145 Rename identifiers to avoid real and potential collisions.
13146
13147 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
13148 to avoid collision with lex macro described by Bruce Lilly in
161a71f3 13149 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
bb92250c
PE
13150 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
13151 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
13152 * src/parse-gram.y (print_token_value): Renamed from yyprint.
13153 All uses changed.
13154 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
13155 The name "yycontrol" violates the name space rules, and this stuff
13156 wasn't being used anyway.
13157 (input): Remove action; this stuff wasn't being used.
13158 (gram_error): Rename local variable yylloc -> loc.
13159 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
13160 (YY_DECL): Don't use "yy" at start of local variables.
13161 All uses changed, e.g., yylloc -> loc.
13162 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
13163 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
13164 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
13165 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
13166
13167 * src/parse-gram.y (gram_error): loc is now const *.
13168 * src/reader.h (gram_error): Likewise.
13169
3af4feb2
PE
131702002-11-24 Paul Eggert <eggert@twinsun.com>
13171
13172 Version 1.75c.
13173
13174 * tests/actions.at (Actions after errors): Use an output format
13175 more similar to that of the Printers and Destructors test.
13176 Test the position of the ';' token too.
13177 (Printers and Destructors): Likewise.
13178 (Printers and Destructors: %glr-parser): Remove for now, to avoid
13179 unnecessarily alarming people when the test fails.
13180
13181 * data/yacc.c (yyerrlab1): Move this label down, so that the
13182 parser does not discard the lookahead token if the user code
13183 invokes YYERROR. This change is required for POSIX conformance.
13184
13185 * lib/error.c: Sync with gnulib.
13186
131872002-11-22 Paul Eggert <eggert@twinsun.com>
13188
13189 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
13190 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
13191 * lib/xmalloc.c: Likewise.
26b4a969 13192
58004308
PE
131932002-11-20 Paul Eggert <eggert@twinsun.com>
13194
13195 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
13196
131972002-11-20 Paul Eggert <eggert@twinsun.com>
26b4a969 13198
58004308
PE
13199 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
13200 should use `if (! x) abort ();' rather than `assert (x);', and
13201 anyway it's one less thing to worry about configuring.
13202
13203 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
13204 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
13205 and replace all instances of assert with abort.
13206 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
13207 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
13208
13209 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
13210 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
13211 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
13212 hash_find_entry, hash_rehash, hash_insert): Likewise.
13213 * src/conflicts.c (resolve_sr_conflict): Likewise.
13214 * src/lalr.c (set_goto_map, map_goto): Likewise.
13215 * src/nullable.c (nullable_compute): Likewise.
13216 * src/output.c (prepare_rules, token_definitions_output): Likewise.
13217 * src/reader.c (packgram, reader): Likewise.
13218 * src/state.c (state_new, state_free, state_transitions_set,
13219 state_reduction_find): Likewise.
13220 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
13221 symbol_pack): Likewise.
13222 * src/tables.c (conflict_row, pack_vector): Likewise.
13223 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
13224 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
13225 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
13226 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
13227
13228 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
13229 (ARGMATCH_CONSTRAINT): New macro.
13230 (ARGMATCH_ASSERT): Use it.
13231
13232 * src/system.h (verify): New macro.
13233 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
13234 rather than assert.
13235 * src/tables.c (tables_generate): Likewise.
13236
13237 * src/struniq.c (struniq_assert): Now returns void, and aborts
13238 if the assertion is false.
13239 (struniq_assert_p): Remove.
13240 * src/struniq.h: Likewise.
13241
76ae8198
PE
132422002-11-18 Paul Eggert <eggert@twinsun.com>
13243
13244 * data/glr.c (yygetLRActions): Replace `yyindex' with
13245 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
13246 This fixes the regression with Sun ONE Studio 7 cc that I reported in
161a71f3 13247 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
76ae8198 13248
d3c4e709
AD
132492002-11-18 Akim Demaille <akim@epita.fr>
13250
13251 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
13252 space.
13253 From Tim Van Holder.
13254
8d8a7238
PE
132552002-11-17 Paul Eggert <eggert@twinsun.com>
13256
13257 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
13258 to "SyntaxError" for consistency with my 2002-11-15 change.
13259
13260 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
13261 not define to {}, since this breaks the common use of `YYDPRINTF
13262 ((...));' if a single statement is desired (e.g. before `else').
13263 Work around GCC warnings by surrounding corresponding calls with
13264 {} if needed.
13265 (yyhasResolvedValue): Remove unused function.
13266 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
13267 loop body.
13268 (yyreportSyntaxError): Renamed from yyreportParseError.
13269 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
13270 All uses changed.
13271 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
13272 extern when possible. Remove unused initializations.
13273
b0937b22
AD
132742002-11-16 Akim Demaille <akim@epita.fr>
13275
13276 Augment the similarity between GLR and LALR traces.
13277
13278 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
13279 (YY_REDUCE_PRINT): New.
13280 (yyparse): Use them.
13281 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
13282 YYDPRINT here.
13283 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
13284 state reached after the reduction/recovery, since...
13285 (yyparse, yyprocessOneStack): Report the state we are entering in.
13286
c5e3e510
AD
132872002-11-16 Akim Demaille <akim@epita.fr>
13288
13289 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
13290 Add support for --trace=skeleton.
13291 * src/scan-skel.l: %option debug.
13292 Scan strings of non-@ or \n instead of character by character.
13293 (scan_skel): Handle trace_skeleton.
13294 (QPUTS): New.
13295 (@output_parser_name@, @output_header_name@): ``Restore'' their
13296 support (used to be M4 macros).
13297 * data/yacc.c: Quote larger chunks, a la glr.c.
13298 * data/lalr1.cc: Likewise.
13299 The header guards are no longer available, so use some other
13300 string than `YYLSP_NEEDED'.
13301
4c6cc1db
AD
133022002-11-16 Akim Demaille <akim@epita.fr>
13303
13304 Make the ``Printers and Destructors'' test more verbose, taking
13305 `yacc.c''s behavior as (possibly wrong) reference.
13306
13307 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
13308 instead of fprint on stdout.
13309 Set and report the last_line of the symbols.
13310 Consistently display values and locations.
13311
6d9e8019
PE
133122002-11-16 Paul Eggert <eggert@twinsun.com>
13313
13314 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
13315
6e649e65
PE
133162002-11-15 Paul Eggert <eggert@twinsun.com>
13317
b25d88f6
PE
13318 * tests/actions.at (Actions after errors): New test case.
13319
6e649e65
PE
13320 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
13321 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
13322 tests/action.at, tests/calc.at, tests/conflicts.at,
13323 tests/cxx-type.at, tests/regression.at:
13324 "parse error" -> "syntax error" for POSIX compatibility.
13325 "parsing stack overflow..." -> "parser stack overflow" so
13326 that code matches Bison documentation.
13327
0f39aab9
AD
133282002-11-15 Akim Demaille <akim@epita.fr>
13329
13330 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
13331 take two BRACED_CODE, not two string_content.
13332 Free the scanner's obstack when we are done.
13333 (code_content): New.
13334 * tests/calc.at: Adjust.
13335 * doc/bison.texinfo: Adjust.
13336 Also, make sure to include the `,' for these declarations.
13337
761c1926
AD
133382002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
13339
13340 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
13341 definition; avoids potential autoreconf problems.
13342
b0f98b10
AD
133432002-11-15 Akim Demaille <akim@epita.fr>
13344
13345 Always check the value returned by yyparse.
13346
13347 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
13348 returned by yyparse.
13349 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
13350 Adjust calls.
13351 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
13352 returned by yyparse.
13353
970785f1
PH
133542002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13355
13356 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
13357 on input.at test.
13358
8fcc7db1
PE
133592002-11-14 Paul Eggert <eggert@twinsun.com>
13360
7ec1b48e
PE
13361 * src/output.c (output_skeleton): Call xfopen instead of
13362 duplicating xfopen's body.
13363
cfff7583 13364 Fix bugs reported by Nelson H. F. Beebe in
161a71f3 13365 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
cfff7583 13366
8fcc7db1
PE
13367 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
13368 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
13369 Group compiler. Instead, use "$CC -E bar.c". Include the .h
13370 file twice in the grammar, as an extra check.
13371
13372 * tests/input.at (Torturing the Scanner): Surround the
13373 backslash-newline tests with "#if 0", to make it less likely that
13374 we'll run into compiler bugs. Bring back solitary \ inside
13375 comment, but add a closing comment to work around HP C bug. Don't
e3aa65c5 13376 test backslash-newline in C character constant.
8fcc7db1 13377
4e8d992c
AD
133782002-11-14 Akim Demaille <akim@epita.fr>
13379
13380 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
13381 status of the compiler.
f32b346d 13382 Calling `exit 1' is no longer needed.
4e8d992c
AD
13383 Reported by Nelson H. F. Beebe.
13384
9501dc6e
AD
133852002-11-14 Akim Demaille <akim@epita.fr>
13386
13387 * tests/atlocal.in (CPPFLAGS): We have config.h.
13388 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
13389 New.
13390 * tests/actions.at, tests/calc.at, tests/conflicts.at,
13391 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
13392 * tests/regression.at, tests/torture.at: Use them for all the
13393 grammars that are to be compiled.
13394 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
13395 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
13396 * doc/bison.texinfo (GLR Parsers): Document `inline'.
13397
18b519c0
AD
133982002-11-14 Akim Demaille <akim@epita.fr>
13399
13400 * doc/bison.texinfo: Various formatting changes (alignments in
13401 samples, additional @group/@end group, GCS in samples.
13402 Use @deffn instead of simple @table to define the directives,
13403 macros, variables etc.
13404
9a86cdb9
PE
134052002-11-13 Paul Eggert <eggert@twinsun.com>
13406
daa33def 13407 Fix some bugs reported by Albert Chin-A-Young in
161a71f3 13408 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
18b519c0 13409
daa33def 13410 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8fcc7db1 13411 -o c"; the HP C compiler chatters during compilation.
daa33def
PE
13412 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
13413 * tests/headers.at (export YYLTYPE): Likewise.
13414
13415 * tests/input.at (Torturing the Scanner): Remove lines containing
8fcc7db1 13416 solitary backslashes, as they tickle a bug in the HP C compiler.
daa33def 13417
9a86cdb9
PE
13418 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
13419 comments, since they're not portable. Use GNU coding style.
13420
9c1e26bd
AD
134212002-11-13 Akim Demaille <akim@epita.fr>
13422
13423 * data/yacc.c: Leave bigger chunks of quoted text.
13424 (YYDSYMPRINTF): New.
13425 Use it to report symbol activities.
13426 * data/glr.c (YYDSYMPRINTF): New.
13427 Use it.
13428
87f721cc
PE
134292002-11-12 Paul Eggert <eggert@twinsun.com>
13430
13431 Version 1.75b.
13432
13433 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
13434 (yyglrReduce): Return yyok, not 0.
13435 This should avoid the enumerated-type warnings reported
464c6927 13436 by Nelson H. F. Beebe in
161a71f3 13437 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
87f721cc
PE
13438
13439 * lib/bbitset.h (BITSET_INLINE): Remove.
13440 * lib/bitset.h [! BITSET_INLINE]: Remove.
13441 (bitset_set, bitset_reset, bitset_test): Rename local vars
13442 to avoid shadowing warnings by GCC.
13443
13444 * data/glr.c (inline): Remove #define. It's the user's
13445 responsibility to #define it away, just like 'const'.
464c6927 13446 This fixes one of the bugs reported by Nelson H. F. Beebe in
161a71f3 13447 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
18b519c0 13448
87f721cc
PE
13449 * Makefile.maint (po-check): Scan .l and .y files instead of the
13450 .c and the .h files that they generate. This fixes the bug
13451 reported by Tim Van Holder in:
161a71f3 13452 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
87f721cc
PE
13453 Look for N_ as well as for _. Try to avoid matching #define for
13454 N_ and _.
13455 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
13456 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
13457 * src/scan-gram.l: Revamp regular expressions so that " and '
13458 do not confuse xgettext.
13459
13460 * src/struniq.h (struniq_new): Do not declare the return type
13461 to be 'const'; this violates the C standard.
13462 * src/struniq.c (struniq_new): Likewise.
13463
be14ade5
AD
134642002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
13465
13466 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
13467 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
13468 linker.
13469
05291fbc
AD
134702002-11-12 Akim Demaille <akim@epita.fr>
13471
13472 * Makefile.maint: Sync with Autoconf:
13473 (local_updates): New.
13474
1f5fd52e
AD
134752002-11-12 Akim Demaille <akim@epita.fr>
13476
13477 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
13478
283f1e64
AD
134792002-11-12 Akim Demaille <akim@epita.fr>
13480
13481 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
13482 locations.
13483
886b69d1
AD
134842002-11-12 Akim Demaille <akim@epita.fr>
13485
13486 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
13487 not yyvalue.
13488
3df37415
AD
134892002-11-12 Akim Demaille <akim@epita.fr>
13490
13491 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
13492 Use it to test the GLR parser.
13493
7bd6c77e
AD
134942002-11-12 Akim Demaille <akim@epita.fr>
13495
13496 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
13497 defines it.
13498 * data/glr.c (yystos): New.
13499 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
13500 (YYDSYMPRINT): New.
13501 (yyval): Don't define it, it is handled via M4.
13502 (yyrecoverParseError): Free verbosely the discarded symbols.
13503 * data/yacc.c (yysymprint): Remove, rather...
13504 (b4_yysymprint_generate): invoke.
13505 * data/c.m4 (b4_yysymprint_generate): New.
13506 Accept pointers as arguments, as opposed to the version from
13507 yacc.c.
13508 (b4_yydestruct_generate): Likewise.
13509 * tests/cations.at (Printers and Destructors): Use Bison directives
13510 instead of CPP macros.
13511 Don't rely on internal details.
13512
b0400cc6
AD
135132002-11-12 Akim Demaille <akim@epita.fr>
13514
13515 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
13516 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
13517 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
13518 it against YYEMPTY and so forth), work on yytoken (i.e., set
13519 it to YYEMPTY etc.).
13520 (yydestruct): Replace with a b4_yydestruct_generate invocation.
13521 (b4_symbol_actions): Remove.
13522 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
13523 for 0, end-of-input.
13524
72f889cc
AD
135252002-11-12 Akim Demaille <akim@epita.fr>
13526
13527 * doc/bison.texinfo (Destructor Decl): New.
13528
b1ae9233
AD
135292002-11-12 Akim Demaille <akim@epita.fr>
13530
13531 * src/tables.c (tables_generate): Use free for pointers that
13532 cannot be NULL, not XFREE.
13533 (pack_vector): Use assert, not fatal, for bound violations.
13534 * src/state.c (state_new): Likewise.
13535 * src/reader.c (reader): Likewise.
13536 * src/lalr.c (set_goto_map): Likewise.
72f889cc 13537 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
b1ae9233
AD
13538 the file name.
13539
7ec2d4cd
AD
135402002-11-12 Akim Demaille <akim@epita.fr>
13541
13542 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
13543 Restore.
13544 * src/scan-gram.l (last_string): Is global to the file, not to
13545 yylex.
13546 * src/parse-gram.y (input): Don't append the epilogue here,
13547 (epilogue.opt): do it here, and free the scanner's obstack.
13548 * src/reader.c (epilogue_set): Rename as...
13549 (epilogue_augment): this.
13550 * data/c.m4 (b4_epilogue): Defaults to empty.
13551
573a6cd3
AD
135522002-11-12 Akim Demaille <akim@epita.fr>
13553
13554 * src/getargs.c (long_options): Remove duplicates.
13555 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
13556 Remove.
13557 * doc/bison.rnh: Remove.
13558 * doc/bison.texinfo (VMS Invocation): Remove.
13559
95612cfa
AD
135602002-11-12 Akim Demaille <akim@epita.fr>
13561
13562 * src/struniq.h, src/struniq.c (struniq_t): Is const.
13563 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
13564
13565 Use struniq for symbols.
13566
13567 * src/symtab.h (symbol_t): The tag member is a struniq.
13568 (symbol_type_set): Adjust.
13569 * src/symtab.c (symbol_new): Takes a struniq.
13570 (symbol_free): Don't free the tag member.
13571 (hash_compare_symbol_t, hash_symbol_t): Rename as...
13572 (hash_compare_symbol, hash_symbol): these.
13573 Use the fact that tags as struniqs.
13574 (symbol_get): Use struniq_new.
13575 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
13576 Returns a strniq.
13577 * src/reader.h (merger_list, grammar_currentmerge_set): The name
13578 and type members are struniqs.
13579 * src/reader.c (get_merge_function)
13580 (grammar_current_rule_merge_set): Adjust.
13581 (TYPE, current_type): Are struniq.
13582
13583 Use struniq for file names.
13584
13585 * src/files.h, src/files.c (infile): Split into...
13586 (grammar_file, current_file): these.
13587 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
13588 * src/reduce.c (reduce_print): Likewise.
13589 * src/getargs.c (getargs): Likewise.
13590 * src/complain.h, src/complain.c: Likewise.
13591 * src/main.c (main): Call struniqs_new early enough to use it for
13592 file names.
13593 Don't free the input file name.
13594
3e6656f9
AD
135952002-11-12 Akim Demaille <akim@epita.fr>
13596
13597 * src/symtab.c (symbol_free): Remove dead deactivated code:
13598 type_name are properly removed.
13599 Don't use XFREE to free items that cannot be NULL.
13600 * src/struniq.h, src/struniq.c: New.
13601 * src/main.c (main): Initialize/free struniqs.
13602 * src/parse-gram.y (%union): Add astruniq member.
13603 (yyprint): Adjust.
13604 * src/scan-gram.l (<{tag}>): Return a struniq.
13605 Free the obstack bit that used to store it.
13606 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
13607
7672019c
PE
136082002-11-11 Paul Eggert <eggert@twinsun.com>
13609
13610 Revamp to fix many (but not all) of the C- and M4-related quoting
13611 problems. Among other things, this fixes the Bison bug reported
13612 by Jan Hubicka when processing the Bash grammar; see:
161a71f3 13613 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7672019c
PE
13614
13615 Use new @ escapes consistently. Represent brackets with @{ and @}
13616 rather than @<:@ and @:>@, since this works a bit better with dumb
13617 editors like vi. Represent @ with @@, since @ is now consistently
13618 an escape. Use @oline@ and @ofile@ rather than __oline__ and
13619 __ofile__, to avoid unexpected expansions. Similarly, use @output
13620 rather than #output.
13621
13622 * data/c.m4 (b4_copyright): Omit file name from comment, since
13623 the file name could contain "*/".
13624 (b4_synclines_flag): Don't quote the 2nd argument; it should already
13625 be quoted. All uses changed.
13626
13627 * data/glr.c: Use new @ escapes consistently.
13628 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
13629 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
13630 Remove, since they couldn't handle arbitrary characters in file
13631 names.
13632 * data/lalr1.cc: Likewise.
13633 * data/yacc.c: Likewise.
13634
13635 * src/files.c (output_infix): Remove; all uses removed.
13636 * src/files.h: Likewise.
13637
13638 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
13639 mishandled funny characters in file names, and anyway it isn't
13640 needed any more.
13641 * data/yacc.c: Likewise.
13642 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
13643
13644 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
13645 * data/yacc.c: Likewise.
13646
13647 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
13648 strings now.
13649 (muscle_init): Quote filename as a C string.
13650 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
13651 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
13652 * src/output.c (escaped_file_name_output): New function.
13653 (prepare_symbols): Quote tokens for M4.
13654 (prepare): Don't insert output_infix, output_prefix,
13655 output_parser_name, output_header_name; this is now down by scan-skel.
13656 Insert skeleton as a C string.
13657
13658 * src/output.c (user_actions_output, symbol_destructors_output,
13659 symbol_printers_output): Quote filenames for C and M4.
13660 * src/reader.c (prologue_augment, epilogue_set): Likewise.
13661
13662 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
13663 escapes other than \\ and \'; this simplifies the code.
13664 (<SC_STRING>): Likewise, for \\ and \".
13665 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
13666 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
13667 Use new escapes @{ and @} for [ and ].
13668
13669 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
13670 them with auto vars.
13671 Switch to new escape scheme, where @ is the escape character uniformly.
13672 Abort if a stray escape character is found. Avoid unbounded input
13673 buffer when parsing non-escaped text.
13674
13675 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
13676 __oline__, #output, $@, and @{ do not have unintended meanings.
13677
acea4f3b
PE
136782002-11-09 Paul Eggert <eggert@twinsun.com>
13679
13680 Fix the test failure due to GCC warnings described in
161a71f3 13681 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
acea4f3b
PE
13682 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
13683 evaluate to 0 if it's impossible for NINF to be in the respective
13684 table.
13685 (yygetLRActions, yyrecoverParseError): Use them.
13686
13687 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
13688 counted in the token inserted at end of file. Now takes
13689 location_t *, not location_t, so that the location can be
13690 adjusted. All uses changed.
13691
13692 * tests/regression.at (Invalid inputs): Adjust wording in
13693 diagnostic to match the new behavior.
13694
13695 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
13696 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
13697 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
13698 abort ();'. This reduces the runtime of the "Many lookaheads"
13699 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
13700 GCC 3.2.
13701
20ef1ad5
PE
137022002-11-07 Paul Eggert <eggert@twinsun.com>
13703
13704 * src/parse-gram.y (CHARACTER): Remove unused token.
13705 All uses removed.
13706
13707 * src/scan-gram.l: Remove stack option. We no longer use the
13708 stack, since the stack was never deeper than 1; instead, use the
13709 new auto var c_context to record the stacked value.
13710
13711 Remove nounput option. At an unexpected end of file, we now unput
13712 the minimal input necessary to end cleanly; this simplifies the
13713 code.
13714
13715 Avoid unbounded token sizes where this is easy.
13716
13717 (unexpected_end_of_file): New function.
13718 Use it to systematize the error message on unexpected EOF.
13719 (last-string): Now auto, not static.
13720 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
13721 (scanner_last_string_free): Remove; not used.
13722 (percent_percent_count): Move decl to just before use.
13723 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
13724 not the (never otherwised-used) CHARACTER.
13725
93724f13
AD
137262002-11-07 Akim Demaille <akim@epita.fr>
13727
13728 Let yyerror always receive the msg as last argument, so that
13729 yyerror can be variadic.
13730
13731 * data/yacc.c (b4_yyerror_args): New.
13732 Use it when calling yyerror.
13733 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
13734 Use it when calling yyerror.
13735 * doc/bison.texinfo (Error Reporting): Adjust.
13736 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
13737 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
13738
6e40b4eb
AD
137392002-11-06 Akim Demaille <akim@epita.fr>
13740
13741 #line should have quoted strings.
13742 Ideally, this should be done by m4_quotearg.
13743
13744 * src/scan-skel.l: Include quotearg.h.
13745 Quote __ofile__.
13746 * src/output.c (symbol_printers_output)
13747 (symbol_destructors_output): Quote the file name.
13748
2dfbfc12
AD
137492002-11-06 Akim Demaille <akim@epita.fr>
13750
13751 * tests/regression.at (Invalid inputs): Adjust to the recent
13752 messages.
13753
437c2d80
AD
137542002-11-06 Akim Demaille <akim@epita.fr>
13755
13756 Restore --no-lines.
13757 Reported by Jim Kent.
13758
13759 * data/c.m4 (b4_syncline): New.
13760 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
13761 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
13762 * src/output.c (user_actions_output): Likewise.
13763 (prepare): Define 'b4_synclines_flag'.
2dfbfc12 13764 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
437c2d80 13765
900c5db5
AD
137662002-11-06 Akim Demaille <akim@epita.fr>
13767
13768 * src/main.c (main): Free `infile'.
13769 * src/scan-gram.l (handle_syncline): New.
13770 Recognize `#line'.
13771 * src/output.c (user_actions_output, symbol_destructors_output)
13772 (symbol_printers_output): Use the location's file name, not
13773 infile.
13774 * src/reader.c (prologue_augment, epilogue_set): Likewise.
13775
e183b123 137762002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
51b4a04c 13777
e183b123 13778 * src/tables.c (matching_state): Don't allow states to match if
51b4a04c 13779 either has GLR conflict entries.
e183b123 13780
193eb6b7
PE
137812002-11-05 Paul Eggert <eggert@twinsun.com>
13782
e183b123
PE
13783 * src/scan-gram.l: Use more accurate diagnostics, e.g.
13784 "integer out of range" rather than "invalid value".
13785 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
13786 accordingly.
13787
193eb6b7
PE
13788 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
13789 Also, remove one static variable in the scanner.
13790
13791 * src/scan-gram.l (braces_level): Now auto, not static.
13792 Initialize to zero if the compiler is being picky.
13793 (INITIAL): Clear braces_level instead of incrementing it.
13794 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
13795 as POSIX 1003.1-2001 requires.
13796 * src/system.h (IF_LINT): New macro, taken from coreutils.
13797 * configure.ac: Define "lint" if --enable-gcc-warnings.
13798
29c01725
AD
137992002-11-05 Akim Demaille <akim@epita.fr>
13800
13801 * src/scan-gram.l: When it starts with `%', complain about the
13802 whole directive, not just that `invalid character: %'.
13803
8aeac3ca
AD
138042002-11-04 Akim Demaille <akim@epita.fr>
13805
13806 * Makefile.maint: Update from Autoconf.
13807 (update, cvs-update, po-update, do-po-update): New.
13808
793a58bb
AD
138092002-11-04 Akim Demaille <akim@epita.fr>
13810
13811 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
13812 and yyerror.
13813 Have yyerror `use' its arguments.
13814 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
13815 returns true when location & yacc & pure & parse-param.
13816 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
13817
c4d720cd
AD
138182002-11-04 Akim Demaille <akim@epita.fr>
13819
13820 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
13821 clashes.
13822 * src/scan-gram.l: Use [\'] instead of ['] to pacify
13823 font-lock-mode.
13824 Use complain_at.
13825 Use quote, not quote_n since LOCATION_PRINT no longer uses the
13826 slot 0.
13827
613a0dc5
PE
138282002-11-03 Paul Eggert <eggert@twinsun.com>
13829
13830 * src/reader.c (get_merge_function, grammar_current_rule_check):
13831 Use consistent diagnostics for reporting type name clashes.
13832 Quote the types with <>, for consistency with Yacc.
13833 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
13834
2a8d363a
AD
138352002-11-03 Akim Demaille <akim@epita.fr>
13836
13837 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
13838 New.
13839 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
13840 (b4_parse_param): Remove.
13841 Use b4_identification.
13842 Propagate b4_pure_args where needed to pass them to yyerror.
13843 * data/glr.m4 (b4_parse_param): Remove.
13844 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
13845 (b4_lpure_formals): New.
13846 Use b4_identification.
13847 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
13848 b4_user_formals and b4_user_args.
13849 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
13850 (yyreportAmbiguity): When using a pure parser, also need
13851 the location, and the parse-params.
13852 Adjust callers.
13853 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
13854 When using a pure parser, also need the parse-params.
13855 Adjust callers.
13856 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
13857 (%pure-parser + %parse-param) LALR and GLR parsers.
13858 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
13859 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
13860 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
13861 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
13862 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
13863 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
13864 * doc/bison.texinfo: Untabify the whole file.
13865 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
13866 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
13867 (Error Reporting): Adjust to these new directives.
13868 Document %error-verbose, deprecate YYERROR_VERBOSE.
13869
9e32add8
AD
138702002-11-03 Akim Demaille <akim@epita.fr>
13871
13872 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
13873 AT_CHECK_CALC_GLR invocations to use % directives, instead of
13874 command line options.
13875 * tests/cxx-type.at: Formatting changes.
13876
b02d90a5
PE
138772002-11-03 Paul Eggert <eggert@twinsun.com>
13878
13879 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
13880 to count columns correctly, and to check for invalid inputs.
9e32add8 13881
b02d90a5
PE
13882 Use mbsnwidth to count columns correctly. Account for tabs, too.
13883 Include mbswidth.h.
13884 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
13885 (extend_location): New function.
13886 (YY_LINES): Remove.
13887
13888 Handle CRLF in C code rather than in Lex code.
13889 (YY_INPUT): New macro.
13890 (no_cr_read): New function.
13891
13892 Scan UCNs, even though we don't fully handle them yet.
13893 (convert_ucn_to_byte): New function.
13894
13895 Handle backslash-newline correctly in C code.
13896 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
13897 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
13898 all uses changed.
13899 (tag, splice): New EREs. Do not allow NUL or newline in tags.
13900 Use {splice} wherever C allows backslash-newline.
13901 YY_STEP after space, newline, vertical-tab.
13902 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9e32add8 13903
b02d90a5
PE
13904 (letter, id): Don't assume ASCII; e.g., spell out a-z.
13905
13906 ({int}, handle_action_dollar, handle_action_at): Check for integer
13907 overflow.
9e32add8 13908
b02d90a5
PE
13909 (YY_STEP): Omit trailing semicolon, so that it's more like C.
13910
13911 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
13912 as well as \000. Check for UCHAR_MAX, not 255.
13913 Allow \x with an arbitrary positive number of digits, as in C.
13914 Check for overflow here.
13915 Allow \? and UCNs, for compatibility with C.
13916
13917 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
13918 with quote slot used by complain_at.
13919
13920 * tests/input.at: Add tests for backslash-newline, m4 quotes
13921 in symbols, long literals, and funny escapes in strings.
13922
13923 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
13924 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
13925 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
13926 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
13927 * m4/mbswidth.m4: New file, from GNU coreutils.
13928
13929 * doc/bison.texinfo (Grammar Outline): Document // comments.
13930 (Symbols): Document that trigraphs have no special meaning in Bison,
13931 nor is backslash-newline allowed.
13932 (Actions): Document that trigraphs have no special meaning.
13933
13934 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
13935 no longer used.
13936
139372002-11-02 Paul Eggert <eggert@twinsun.com>
13938
13939 * src/reader.c: Don't include quote.h; not needed.
13940 (get_merge_function): Reword warning to be consistent with
13941 type clash diagnostic in grammar_current_rule_check.
13942
13943 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
13944 bug in trigraph handling.
13945
13946 * src/output.c (prepare_symbols): When printing token names,
13947 escape "[" as "@<:@" and likewise for "]".
13948
13949 * src/system.h (errno): Remove declaration, as we are now
13950 assuming C89 or better, and C89 guarantees errno.
13951
762b212b
PE
139522002-10-30 Paul Eggert <eggert@twinsun.com>
13953
13954 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
13955 Check for close failures.
13956 * src/files.h (xfclose): Return void, not int, since it always
13957 returned zero.
13958 * src/files.c (xfclose): Likewise. Report I/O error if ferror
13959 indicates one.
13960 * src/output.c (output_skeleton): Use xfclose rather than fclose
13961 and ferror. xfclose now checks ferror.
13962
13963 * data/glr.c (YYLEFTMOST_STATE): Remove.
13964 (yyreportTree): Use a stack-based leftmost state. This avoids
13965 our continuing battles with bogus warnings about initializers.
13966
56100c60
AD
139672002-10-30 Akim Demaille <akim@epita.fr>
13968
13969 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
13970 #if.
13971
51b4a04c
PH
139722002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13973
13974 * tests/glr-regr1.at: New test for reported regressions.
13975 * tests/testsuite.at: Add glr-regr1.at test.
13976 * tests/Makefile.am: Add glr-regr1.at test.
e183b123 13977
bf1ebda2
PE
139782002-10-24 Paul Eggert <eggert@twinsun.com>
13979
5c16c6b1
PE
13980 Version 1.75a.
13981
bf1ebda2
PE
13982 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
13983 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
13984 we use malloc. Don't assume 'A' through 'Z' are contiguous.
13985 Don't assume strdup exists; POSIX says its an XSI extension.
13986 Check for buffer overflow on input.
13987
b526ee61
AD
139882002-10-24 Akim Demaille <akim@epita.fr>
13989
13990 * src/output.c (output_skeleton): Don't disable M4sugar comments
13991 too soon: it results in comments being expanded.
13992 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
13993 first output.
13994
f1886bb2
AD
139952002-10-24 Akim Demaille <akim@epita.fr>
13996
13997 * data/yacc.c (m4_int_type): New.
13998 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
13999 char' as only yacc.c wants K&R portability.
14000 * data/glr.c (yysigned_char): Remove.
14001 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
14002 Reported by Quoc Peyrot.
14003
c5576256
PE
140042002-10-23 Paul Eggert <eggert@twinsun.com>
14005
14006 * src/main.c (main): With --trace=time, report times even if a
14007 non-fatal error occurs. Formerly, the times were reported in some
14008 such cases but not in others.
14009 * src/reader.c (reader): Just return if a complaint has been issued,
14010 instead of exiting, so that 'main' can report times.
14011
27b0ffea
AD
140122002-10-22 Akim Demaille <akim@epita.fr>
14013
14014 * src/system.h: Include sys/types.
14015 Reported by Bert Deknuydt.
14016
223a7883
PE
140172002-10-23 Paul Eggert <eggert@twinsun.com>
14018
14019 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
14020 Suggested by Art Haas.
14021
140222002-10-22 Paul Eggert <eggert@twinsun.com>
14023
14024 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
14025 decl; not needed any more.
14026 * src/main.c (main): Use return to exit, undoing yesterday's change.
14027 The last OS that we could find where this wouldn't work is
14028 SunOS 3.5, and that's too old to worry about now.
14029
14030 * data/glr.c (struct yyltype): Define members even when not
14031 doing locations. This is more consistent with yacc.c, and it
14032 works around the following bug reports:
161a71f3
PE
14033 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
14034 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
27b0ffea 14035
223a7883
PE
14036 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
14037 @acronym consistently. Standardize on "Yacc" instead of "YACC",
14038 "Algol" instead of "ALGOL". Give a bit more history about BNF.
14039
8b76775a
AD
140402002-10-22 Akim Demaille <akim@epita.fr>
14041
14042 * data/README: New.
14043
6db10d14
PE
140442002-10-21 Paul Eggert <eggert@twinsun.com>
14045
14046 Be consistent about 'bool'; the old code used an enum in one
14047 module and an int in another, and this violates the C standard.
14048 * m4/stdbool.m4: New file, from coreutils 4.5.3.
14049 * configure.ac (AC_HEADER_STDBOOL): Add.
14050 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
14051 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
14052 * src/symtab.c (hash_compare_symbol_t): Likewise.
14053 * src/system.h (bool, false, true): Use a definition consistent
14054 with ../lib/hash.c. All uses changed.
14055
14056 * src/complain.c (warning_issued): Renamed from warn_message_count,
14057 so that we needn't worry about integer overflow (!).
14058 Now of type bool. All uses changed.
14059 (complaint_issued): Renamed from complain_message_count; likewise.
14060
14061 * src/main.c (main): Use exit to exit with failure.
27b0ffea 14062
6db10d14
PE
14063 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
14064 rather than 1 and 0.
14065 * src/main.c (main): Likewise.
14066 * src/getargs.c (getargs): Likewise.
14067 * src/reader.c (reader): Likewise.
14068
14069 * src/getarg.c (getargs): Remove duplicate code for
14070 "Try `bison --help'".
14071
14072 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
14073 What was that "2" for?
14074
14075 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
14076 * src/getargs.c (usage): Likewise.
14077
14078 * src/getargs.c (getargs): When there are too few operands, report
14079 the last one. When there are too many, report the first extra
14080 one. This is how diffutils does it.
14081
92a060fd
PE
140822002-10-20 Paul Eggert <eggert@twinsun.com>
14083
14084 Remove K&R vestiges.
14085 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
14086 * src/complain.c (VA_START): Remove. Assume prototypes.
14087 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
14088 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
14089 fatal): Assume prototypes.
14090 * src/complain.h: Assume prototypes.
14091 * src/system.h (PARAMS): Remove.
14092 Include <limits.h> unconditionally, since it's guaranteeed even
14093 for a freestanding C89 compiler.
14094 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
14095 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8b76775a 14096
e7cb57c0
AD
140972002-10-20 Akim Demaille <akim@epita.fr>
14098
14099 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
14100 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
14101 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
14102 (yyresolveStates, yyresolveAction, yyresolveStack)
14103 (yyprocessOneStack): Use them.
14104 (yy_reduce_print): New.
14105 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
14106
0245f82d
AD
141072002-10-20 Akim Demaille <akim@epita.fr>
14108
14109 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
14110 arguments and output `void'.
14111 (b4_c_function): Rename as...
14112 (b4_c_function_def): this.
14113 (b4_c_function_decl, b4_c_ansi_function_def)
14114 (b4_c_ansi_function_decl): New.
14115 Change the interpretation of the arguments: before `int, foo', now
14116 `int foo, foo'.
14117 * data/yacc.c (yyparse): Prototype and define thanks to these.
14118 Adjust b4_c_function_def uses.
14119 * data/glr.c (yyparse): Likewise, but ANSI only.
14120
39912f52
AD
141212002-10-20 Akim Demaille <akim@epita.fr>
14122
14123 * src/output.c (prepare): Move the definition of `tokens_number',
14124 `nterms_number', `undef_token_number', `user_token_number_max'
14125 to...
14126 (prepare_tokens): Here.
14127 (prepare_tokens): Rename as...
14128 (prepare_symbols): this.
14129 (prepare): Move the definition of `rules_number' to...
14130 (prepare_rules): here.
14131 (prepare): Move the definition of `last', `final_state_number',
14132 `states_number' to...
14133 (prepare_states): here.
14134 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
14135
20c1e2ad
AD
141362002-10-20 Akim Demaille <akim@epita.fr>
14137
14138 * src/tables.h, src/tables.c, src/output.c: Comment changes.
14139
21964f43
AD
141402002-10-20 Akim Demaille <akim@epita.fr>
14141
14142 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
14143 * data/c.m4: here.
14144
66d30cd4
AD
141452002-10-20 Akim Demaille <akim@epita.fr>
14146
14147 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
14148 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
14149 `pair'.
14150 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
14151 `name' to...
14152 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
14153 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
14154 These.
14155
95f2c9fe
PE
141562002-10-19 Paul Eggert <eggert@twinsun.com>
14157
14158 Do not create a temporary file, as that involves security and
14159 cleanup headaches. Instead, use a pair of pipes.
14160 Derived from a suggestion by Florian Krohm.
14161 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
14162 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
14163 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
14164 (BISON_PREREQ_SUBPIPE): Add.
14165 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
14166 Add subpipe.h, subpipe.c.
14167 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
14168 * po/POTFILES.in: Add lib/subpipe.c.
14169 * src/output.c: Include "subpipe.h".
14170 (m4_invoke): Remove decl.
14171 (scan_skel): New decl.
14172 (output_skeleton): Use pipe rather than temporary file for m4 input.
14173 Check that m4sugar.m4 is readable, to avoid deadlock.
14174 Check for pipe I/O error.
14175 * src/scan-skel.l (readpipe): Remove decl.
14176 (scan_skel): New function, to be used in place of m4_invoke.
14177 Read from stream rather than file.
66d30cd4 14178
95f2c9fe
PE
14179 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
14180 float, as this generates a warning on Solaris 8 + GCC 3.2 with
14181 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
14182 this generates a more-accurate value anyway.
14183
14184 * lib/timevar.c (timervar_accumulate): Rename locals to
14185 avoid confusion with similarly-named more-global.
14186 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
14187
14188 * src/output.c (prepare): Use xstrdup to convert char const *
14189 to char *, to avoid GCC warning.
14190
c19988b7
AD
141912002-10-19 Akim Demaille <akim@epita.fr>
14192
14193 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
14194 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
14195 Use them to have `calc.y' ready for %pure-parser.
14196 * data/yacc.c (YYLEX): Pass a yylex return type to
14197 b4_c_function_call.
14198
ae7453f2
AD
141992002-10-19 Akim Demaille <akim@epita.fr>
14200
14201 Prototype support of %lex-param and %parse-param.
14202
14203 * src/parse-gram.y: Add the definition of the %lex-param and
14204 %parse-param tokens, plus their rules.
14205 Drop the `_' version of %glr-parser.
14206 Add the "," token.
14207 * src/scan-gram.l (INITIAL): Scan them.
14208 * src/muscle_tab.c: Comment changes.
14209 (muscle_insert, muscle_find): Rename `pair' as `probe'.
14210 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
14211 (muscle_entry_s): The `value' member is no longer const.
14212 Adjust all dependencies.
14213 * src/muscle_tab.c (muscle_init): Adjust: use
14214 MUSCLE_INSERT_STRING.
14215 Initialize the obstack earlier.
14216 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
14217 (muscle_pair_list_grow): New.
14218 * data/c.m4 (b4_c_function_call, b4_c_args): New.
14219 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
14220 * tests/calc.at: Use %locations, not --locations.
14221 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
14222
0e575721
AD
142232002-10-19 Akim Demaille <akim@epita.fr>
14224
14225 * src/getargs.c (usage): Take status as argument and exit
14226 accordingly.
14227 Report the traditional `Try ... --help' message when status != 0.
14228 (usage, version): Don't take a FILE * as arg, it is pointless.
14229 (getargs): When there is an incorrect number of arguments, make it
14230 an error, and report it GNUlically thanks to `usage ()'.
14231
724ce7f5
PE
142322002-10-18 Paul Eggert <eggert@twinsun.com>
14233
3a781eb2
PE
14234 * data/glr.c (yyreportParseError): Don't assume that sprintf
14235 yields the length of the printed string, as this is not true
14236 on SunOS 4.1.4. Reported by Peter Klein.
14237
724ce7f5
PE
14238 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
14239 * tests/conflicts.at (%nonassoc and eof): Likewise.
14240 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
14241
473d0a75
AD
142422002-10-17 Akim Demaille <akim@epita.fr>
14243
14244 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
14245 * src/getargs.c (trace_types, trace_args): Adjust.
14246 * src/reader.c (grammar_current_rule_prec_set)
14247 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
14248 Standardize error messages.
14249 And s/@prec/%prec/!
14250 (reader): Use trace_flag to enable scanner/parser debugging,
14251 instead of an adhoc scheme.
14252 * src/scan-gram.l: Remove trailing debugging code.
14253
e76d2469
PE
142542002-10-16 Paul Eggert <eggert@twinsun.com>
14255
93e2236a
PE
14256 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
14257 MUSCLE_TAB_H.
14258
e76d2469
PE
14259 * NEWS: Officially drop support for building Bison with K&R C,
14260 since it didn't work anyway and it's not worth worrying about.
14261 * Makefile.maint (wget_files): Remove ansi2knr.c.
14262 (ansi2knr.c-url_prefix): Remove.
14263 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
14264 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14265 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14266
5bd1c419
PE
142672002-10-15 Paul Eggert <eggert@twinsun.com>
14268
14269 Stop using the "enum_" trick for K&R-style function definitions;
14270 it confused me, and I was the author! Instead, assume that people
14271 who want to use K&R C compilers (when using these modules in GCC,
14272 perhaps?) will run ansi2knr.
14273
14274 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
14275 All uses of "enum_" changed to "enum ".
14276 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
14277 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 14278
5bd1c419
PE
14279 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
14280 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
14281 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
14282 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
14283 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
14284 abitset_not, abitset_ones, abitset_or, abitset_or_and,
14285 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
14286 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
14287 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
14288 Use function prototypes; this removes the need for declaring
14289 static functions simply to provide their prototypes.
14290 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
14291 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
14292 bitset_count_, bitset_create, bitset_dump, bitset_first,
14293 bitset_free, bitset_init, bitset_last, bitset_next,
14294 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
14295 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
14296 bitset_print, bitset_release_memory, bitset_toggle_,
14297 bitset_type_choose, bitset_type_get, bitset_type_name_get,
14298 debug_bitset): Likewise.
14299 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
14300 * lib/bitset_stats.c (bitset_log_histogram_print,
14301 bitset_percent_histogram_print, bitset_stats_and,
14302 bitset_stats_and_cmp, bitset_stats_and_or,
14303 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
14304 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
14305 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
14306 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
14307 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
14308 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
14309 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
14310 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
14311 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
14312 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
14313 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
14314 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
14315 bitset_stats_zero): Likewise.
14316 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
14317 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
14318 bitsetv_dump, debug_bitsetv): Likewise.
14319 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
14320 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
14321 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
14322 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
14323 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
14324 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
14325 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
14326 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
14327 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
14328 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
14329 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
14330 Likewise.
14331 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
14332 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
14333 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
14334 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
14335 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
14336 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
14337 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
14338 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
14339 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
14340 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
14341 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 14342
ae26e1f0
AD
143432002-10-14 Akim Demaille <akim@epita.fr>
14344
14345 Version 1.75.
14346
d43baf71
AD
143472002-10-14 Akim Demaille <akim@epita.fr>
14348
14349 * tests/Makefile.am (maintainer-check-posix): New.
14350
7ebc83e3
AD
143512002-10-14 Akim Demaille <akim@epita.fr>
14352
14353 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
14354 member.
14355
05846dae
AD
143562002-10-14 Akim Demaille <akim@epita.fr>
14357
14358 * src/tables.c (table_ninf_remap): base -> tab.
14359 Reported by Matt Rosing.
14360
1318e37d
PE
143612002-10-14 Paul Eggert <eggert@twinsun.com>
14362
447fbb17
PE
14363 * tests/action.at, tests/calc.at, tests/conflicts.at,
14364 tests/cxx-type.at, tests/headers.at, tests/input.at,
14365 tests/regression.at, tests/synclines.at, tests/torture.at:
14366 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
14367 so that the tests still work even if POSIXLY_CORRECT is set.
14368 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 14369
1318e37d
PE
14370 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
14371 for portability to K&R hosts. Fix typo: signed char is guaranteed
14372 only to 127, not to 128.
14373 * data/glr.c (yysigned_char): New type.
14374 * data/yacc.c (yysigned_char): Likewise.
14375 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
14376
cc0f0794
PE
143772002-10-13 Paul Eggert <eggert@twinsun.com>
14378
5038f418
PE
14379 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
14380 true due to limited range of data type" warning from GCC.
14381
cc0f0794
PE
14382 * data/c.m4 (b4_token_defines): Protect against double-inclusion
14383 by wrapping enum yytokentype's definition inside #ifndef
14384 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
14385
6fed0802
AD
143862002-10-13 Akim Demaille <akim@epita.fr>
14387
14388 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
14389 Un yy- yyrhs to avoid the name clash with the global YYRHS.
14390
32f0598d
AD
143912002-10-13 Akim Demaille <akim@epita.fr>
14392
14393 * Makefile.maint: Update from Autoconf 2.54.
14394 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
14395
7ea9a33f
AD
143962002-10-13 Akim Demaille <akim@epita.fr>
14397
14398 * src/print.c (print_state): Separate the list of solved conflicts
14399 from the other items.
14400 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
14401
ea99527d
AD
144022002-10-13 Akim Demaille <akim@epita.fr>
14403
14404 Let nondeterministic skeletons be usable with deterministic
14405 tables.
14406
14407 With the patch, GAWK compiled by GCC without -O2 passes its test
14408 suite using a GLR parser driven by LALR tables. It fails with -O2
14409 because `struct stat' gives two different answers on my machine:
14410 88 (definition of an auto var) and later 96 (memset on this var).
14411 Hence the stack is badly corrumpted. The headers inclusion is to
14412 blame: if I move the awk.h inclusion before GLR's system header
14413 inclusion, the two struct stat have the same size.
14414
14415 * src/tables.c (pack_table): Always create conflict_table.
14416 (token_actions): Always create conflict_list.
14417 * data/glr.c (YYFLAG): Remove, unused.
14418
f377f69f
AD
144192002-10-13 Akim Demaille <akim@epita.fr>
14420
14421 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
14422 (O0FLAGS): New.
14423 (VALGRIND, GXX): New.
14424 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
14425 * tests/bison.in: Run $PREBISON a pre-command.
14426 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
14427 (maintainer-check-g++): New.
14428 * Makefile.am (maintainer-check): New.
14429
2a1fe6ed
AD
144302002-10-13 Akim Demaille <akim@epita.fr>
14431
14432 * data/glr.c: Formatting changes.
14433 Tweak some trace messages to match yacc.c's.
14434
f50adbbd
AD
144352002-10-13 Akim Demaille <akim@epita.fr>
14436
14437 GLR parsers sometimes raise parse errors instead of performing the
14438 default reduction.
14439 Reported by Charles-Henry de Boysson.
14440
14441 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
ba0fe3c7 14442 check the length of the traces when %glr.
f50adbbd
AD
14443 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
14444 GLR's traces.
14445 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
14446 Test GLR parsers.
14447 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
14448 (yyltype): Remove the yy prefix from the member names.
14449 (yytable): Complete its comment.
14450 (yygetLRActions): Map error action number from YYTABLE from
14451 YYTABLE_NINF to 0.
14452 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
14453 (which was a bug: it should have been YYTABEL_NINF, and yet it was
14454 not satisfying as we could compare an YYACTION computed from
14455 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
14456 only value for error actions.
14457 (yyreportParseError): In verbose parse error messages, don't issue
14458 `error' in the list of expected tokens.
14459 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
14460 next action to perform to match glr.c's decoding.
14461 (yytable): Complete its comment.
14462
bcbad5b9
PE
144632002-10-13 Paul Eggert <eggert@twinsun.com>
14464
14465 Fix problem reported by Henrik Grubbstroem in
161a71f3 14466 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
bcbad5b9
PE
14467 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
14468 because the Bison parser reads the second action before reducing
14469 the first one.
14470 * src/scan-gram.l (rule_length): New static var.
14471 Use it to keep track of the rule length in the scanner, since
14472 we can't expect the parser to be in lock-step sync with the scanner.
14473 (handle_action_dollar, handle_action_at): Use this var.
14474 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 14475
14904b89
PE
144762002-10-12 Paul Eggert <eggert@twinsun.com>
14477
1fe611e5
PE
14478 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
14479 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
14480 Include <sys/time.h> when checking for clock_t and struct tms.
14481 Use same include order as source.
14482 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
161a71f3 14483 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
05846dae 14484
1fe611e5
PE
14485 * lib/timevar.c: Update copyright date and clarify comments.
14486 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 14487
1fe611e5
PE
14488 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
14489 GCC version as of today, then merge Bison's changes.
14490 Change "GCC" to "Bison" in copyright notice. timevar.def's
14491 author is Akim, so change that too.
14492
98194095
PE
14493 * src/reader.c (grammar_current_rule_check):
14494 Don't worry about the default action if $$ is untyped.
14495 Prevents bogus warnings reported by Jim Gifford in
161a71f3 14496 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
98194095 14497
14904b89
PE
14498 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
14499 * data/glr.c, data/lalr1.cc, data/yacc.c:
14500 Output token definitions before the first part of user declarations.
14501 Fixes compatibility problem reported by Jim Gifford for kbd in
161a71f3 14502 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14904b89 14503
ff6dca18
PE
145042002-10-11 Paul Eggert <eggert@twinsun.com>
14505
14506 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
14507 (yyparse): here. This undoes some of the 2002-07-25 change.
14508 Compatibility problem reported by Ralf S. Engelschall with
14509 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
14510
eb714592
AD
145112002-10-11 Akim Demaille <akim@epita.fr>
14512
14513 * tests/regression.at Characters Escapes): New.
14514 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
14515 characters.
14516 Reported by Jan Nieuwenhuizen.
14517
b7195100
AD
145182002-10-11 Akim Demaille <akim@epita.fr>
14519
14520 * po/id.po: New.
14521
f28a0f2d
PE
145222002-10-10 Paul Eggert <eggert@twinsun.com>
14523
14524 Portability fixes for bitsets; this also avoids several GCC
14525 warnings.
14526
14527 * lib/abitset.c: Include <stddef.h>, for offsetof.
14528 * lib/lbitset.c: Likewise.
14529
14530 * lib/abitset.c (abitset_bytes): Return a size that is aligned
14531 properly for vectors of objects. Do not assume that adding a
14532 header size to a multiple of a word size yields a value that is
14533 properly aligned for the whole union.
14534 * lib/bitsetv.c (bitsetv_alloc): Likewise.
14535
14536 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
14537 unique names for structures.
14538 * lib/ebitset.c (ebitset_bytes): Likewise.
14539 * lib/lbitset.c (lbitset_bytes): Likewise.
14540
14541 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
14542 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
14543 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
14544 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
14545 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
14546 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
14547 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
14548 to improve the type-checking that GCC can do.
14549 * lib/bitset.c (bitset_op4_cmp): Likewise.
14550 * lib/bitset_stats.c (bitset_stats_count,
14551 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
14552 bitset_stats_copy, bitset_stats_disjoint_p,
14553 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
14554 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
14555 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
14556 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
14557 bitset_stats_and_or_cmp, bitset_stats_andn_or,
14558 bitset_stats_andn_or_cmp, bitset_stats_or_and,
14559 bitset_stats_or_and_cmp): Likewise.
14560 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
14561 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
14562 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
14563 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
14564
14565 * lib/abitset.h: Include bitset.h, not bbitset.h.
14566 * lib/ebitset.h: Likewise.
14567 * lib/lbitset.h: Likewise.
14568
14569 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
14570 All instances of parameters of type enum bitset_opts are now of
14571 type enum_bitset_opts, to conform to the C Standard, and similarly
14572 for enum_bitset_type.
14573 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
14574 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
14575
14576 Do not use "struct bitset_struct" to mean different things in
14577 different modules. Not only is this confusing, it violates
14578 the C Standard, which requires that structure types in different
14579 modules must be compatible if one is to be passed to the other.
14580 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
14581 All instances of "struct bitset_struct *" replaced with "bitset".
14582 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
14583 (union bitset_union, struct abitset_struct, struct ebitset_struct,
14584 struct lbitset_struct, struct bitset_stats_struct): New types.
14585 All uses of struct bitset_struct changed to union bitset_union,
14586 etc.
ba0fe3c7 14587 * lib/abitset.c (struct abitset_struct, abitset,
f28a0f2d
PE
14588 struct bitset_struct): Remove.
14589 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
14590 struct bitset_struct): Remove.
14591 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
14592 bitset_struct): Remove.
14593 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
14594 Likewise.
14595
14596 Do not call a function of type T using a call that assumes the
14597 function is of a different type U. Standard C requires that a
14598 function must be called with a type that is compatible with its
14599 definition.
14600 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
14601 New decls.
14602 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
14603 New functions.
14604 * lib/ebitset.c (PFV): Remove.
14605 * lib/lbitset.c (PFV): Likewise.
14606 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
14607 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
14608 decls.
14609 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
14610 (ebitset_vtable): Use them.
14611 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
14612 lbitset_xor): New functions.
14613 (lbitset_vtable): Use them.
14614
14615 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
14616 Declare.
14617
14618 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
14619 GCC warning.
14620 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
14621 Use offsetof, for simplicity.
14622
6fbe4984
PE
146232002-10-06 Paul Eggert <eggert@twinsun.com>
14624
14625 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
14626 the same width as int. This reapplies a hunk of the 2002-08-12 patch
161a71f3 14627 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6fbe4984
PE
14628 which was inadvertently undone by the 2002-09-30 patch.
14629 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
14630 the same width as int.
14631
420f93c8
PE
146322002-10-04 Paul Eggert <eggert@twinsun.com>
14633
14634 Version 1.50.
14635
14636 * configure.ac (AC_INIT), NEWS: Increment version number.
14637
14638 * doc/bison.texinfo: Minor spelling, grammar, and white space
14639 fixes.
14640 (Symbols): Mention that any negative value returned from yylex
14641 signifies end-of-input. Warn about negative chars. Mention
14642 the portable Standard C character set.
14643
14644 The GNU coding standard says CFLAGS and YFLAGS are reserved
14645 for the installer to set.
14646 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
14647 * src/Makefile.am (AM_CFLAGS): Likewise.
14648 (AM_YFLAGS): Renamed from YFLAGS.
14649
14650 Fix some MAX and MIN problems.
14651 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
14652 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
14653 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
14654 * src/reader.c (reader): Use it.
14655
14656 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
14657 POSIX 1003.1-2001 has removed fgrep.
14658
146592002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
14660
14661 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
14662 interpreted as signed.
14663 * lib/ebitset.c (ebitset_list): Fix bug.
14664
ff68026d
PE
146652002-10-01 Paul Eggert <eggert@twinsun.com>
14666
14667 More fixes for 64-bit hosts and large bitsets.
14668
14669 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
14670 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
14671 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
14672 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
14673 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
14674 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
14675 bitset_count_): Likewise.
14676 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
14677 bitset_first, bitset_last): Likewise.
14678 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
14679 bitset_stats_list_reverse, bitset_stats_size,
14680 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
14681 Likewise.
14682 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14683 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
14684 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
14685 bitsetv_reflexive_transitive_closure): Likewise.
14686 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
14687 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
14688 Likewise.
14689 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
14690 Likewise.
420f93c8 14691
ff68026d
PE
14692 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
14693 Use size_t, not unsigned int, to count bytes.
14694 * lib/abitset.h (abitset_bytes): Likewise.
14695 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
14696 Likewise.
14697 * lib/bitset.h (bitset_bytes): Likewise.
14698 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
14699 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
14700 * lib/bitsetv.c (bitsetv_alloc): Likewise.
14701 * lib/ebitset.c (ebitset_bytes): Likewise.
14702 * lib/ebitset.h (ebitset_bytes): Likewise.
14703 * lib/lbitset.c (lbitset_bytes): Likewise.
14704 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 14705
ff68026d
PE
14706 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
14707 abitset_subset_p, abitset_disjoint_p, abitset_and,
14708 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
14709 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
14710 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
14711 abitset_or_and, abitset_or_and_cmp):
14712 Use bitset_windex instead of unsigned int.
14713 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
14714 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
14715 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
14716 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
14717 Likewise.
14718 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 14719
ff68026d
PE
14720 * lib/bitset.c (bitset_print):
14721 Use proper printf formats for widths of integer types.
14722 * lib/bitset_stats.c (bitset_percent_histogram_print,
14723 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
14724 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14725 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
14726 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 14727
ff68026d
PE
14728 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
14729 BITSET_SIZE_MAX): New macros.
14730 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
14731 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
14732 to BITSET_WINDEX_MAX.
14733
14734 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
14735 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
14736 since we now return the bitset_bindex type (not int).
14737
14738 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
14739 when computing sizes.
14740 * lib/ebitset.c (ebitset_elts_grow): Likewise.
14741
14742 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
14743 and avoid cast to unsigned.
14744
6aa452a6
AD
147452002-09-30 Akim Demaille <akim@epita.fr>
14746
14747 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
14748 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
14749 Updates from Michael Hayes.
14750
927f7817
AD
147512002-09-30 Art Haas <ahaas@neosoft.com>
14752
14753 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
14754 invocations.
14755 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
14756 defined.
14757
9738f41e
AD
147582002-09-27 Akim Demaille <akim@epita.fr>
14759
14760 Version 1.49c.
14761
a5c75d7f
AD
147622002-09-27 Akim Demaille <akim@epita.fr>
14763
14764 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
14765 (Because of AC_LIBSOURCE).
14766
8280e179
AD
147672002-09-27 Akim Demaille <akim@epita.fr>
14768
14769 Playing with Autoscan.
14770
14771 * configure.ac: Remove the old LIBOBJ tweaks.
14772 (AC_REPLACE_FUNCS): Add strrchr and strtol.
14773 * lib/strrchr.c: New.
14774 * lib/strtol.c: New, from the Coreutils 4.5.1.
14775
ae64af35
AD
147762002-09-27 Akim Demaille <akim@epita.fr>
14777
14778 Playing with Autoscan.
14779
14780 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
14781 * lib/Makefile.am (libbison_a_SOURCES): No longer include
14782 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
14783 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
14784 Coreutils 4.5.1.
14785
d1a1114f
AD
147862002-09-24 Akim Demaille <akim@epita.fr>
14787
14788 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
14789 (Frequently Asked Questions, Parser Stack Overflow): New.
14790
b906441c
AD
147912002-09-13 Akim Demaille <akim@epita.fr>
14792
14793 Playing with autoscan.
14794
14795 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
14796 * src/files.c (skeleton_find): Remove, unused.
14797 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
14798 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
14799
bd701811
AD
148002002-09-13 Akim Demaille <akim@epita.fr>
14801
14802 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
14803 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
14804
e0a13e7b
AD
148052002-09-13 Akim Demaille <akim@epita.fr>
14806
14807 * configure.ac: Require 2.54.
14808 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
14809 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
14810 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
14811 Remove, provided by Autoconf macros.
14812
c97011bf
AD
148132002-09-12 Akim Demaille <akim@epita.fr>
14814
14815 * m4/prereq.m4: Update, from Coreutils 4.5.1.
14816
d862b1be
AD
148172002-09-12 Akim Demaille <akim@epita.fr>
14818
14819 * m4/prereq.m4: Update, from Fileutils 4.1.5.
14820 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
14821 Reported by Martin Mokrejs.
14822
3d38c03a
AD
148232002-09-10 Akim Demaille <akim@epita.fr>
14824
14825 * src/parse-gram.y: Associate a human readable string to each
14826 token type.
14827 * tests/regression.at (Invalid inputs): Adjust.
14828
b6347355
AD
148292002-09-10 Gary V. Vaughan <gary@gnu.org>
14830
14831 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
14832 with an Autoconf-2.5x style configure.ac.
14833
09ba4ab2
PE
148342002-09-06 Paul Eggert <eggert@twinsun.com>
14835
14836 * doc/bison.texinfo (Conditions): Make explicit that the GPL
14837 exception applies only to yacc.c. This is a modification of a
14838 patch originally suggested by Akim Demaille.
14839
21846f69
AD
148402002-09-06 Akim Demaille <akim@epita.fr>
14841
09ba4ab2
PE
14842 * data/c.m4 (b4_copyright): Move the GPL exception comment from
14843 here to...
14844 * data/yacc.c: here.
14845
21846f69
AD
14846 * data/lalr1.cc (struct yyltype): Don't define it, since we use
14847 LocationType.
14848 (b4_ltype): Default to yy::Location from location.hh.
14849
c0ad8bf3
AD
148502002-09-04 Jim Meyering <jim@meyering.net>
14851
14852 * data/yacc.c: Guard the declaration of yytoknum also with
14853 `#ifdef YYPRINT', so it is declared only when used.
14854
3a93251e
AD
148552002-09-04 Akim Demaille <akim@epita.fr>
14856
14857 * configure.in: Rename as...
14858 * configure.ac: this.
14859 Bump to 1.49c.
14860
427c0dda
AD
148612002-09-04 Akim Demaille <akim@epita.fr>
14862
14863 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
14864 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
14865 translate maintainer only messages.
14866
6a254321
PE
148672002-08-12 Paul Eggert <eggert@twinsun.com>
14868
645e30d1
PE
14869 Version 1.49b.
14870
6a254321
PE
14871 * Makefile.am (SUBDIRS): Remove intl.
14872 (DISTCLEANFILES): Remove.
14873 * NEWS: Mention that GNU M4 is now required. Clarify what is
14874 meant by "larger grammars". Mention the pt_BR translation.
14875 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
14876 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
14877 Bump version from 0.11.2 to 0.11.5.
14878 (BISON_PREREQ_STAGE): Remove.
14879 (AM_GNU_GETTEXT): Use external gettext.
14880 (AC_OUTPUT): Remove intl/Makefile.
14881
14882 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
14883
14884 * data/glr.c: Include string.h, for strlen.
14885 (yyreportParseError): Use size_t for yysize.
14886 (yy_yypstack): No longer nested inside yypstates, as nested
14887 functions are not portable. Do not assume size_t is the
14888 same width as int.
14889 (yypstates): Do not assume that ptrdiff_t is the same width
14890 as int, and similarly for yyposn and YYINDEX.
14891
14892 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
14893
14894 * lib/Makefile.am (INCLUDES): Do not include from the intl
14895 directory, which has been removed.
14896 * src/Makefile.am (INCLUDES): Likewise.
14897
14898 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
14899 (bitsets_sources, additional_bitsets_sources, timevars_sources):
14900 New vars.
14901
14902 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
14903 * tests/Makefile.am (EXTRA_DIST): Likewise.
14904
14905 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
14906 Do not assume that bitset_windex is the same width as unsigned.
14907
14908 * lib/abitset.c (abitset_unused_clear): Do not assume that
14909 bitset_word is the same width as int.
14910 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
14911 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
14912 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
14913 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
14914 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
14915
14916 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
14917 portability to one's complement hosts!).
14918 * lib/ebitset.c (ebitset_op1): Likewise.
14919 * lib/lbitset.c (lbitset_op1): Likewise.
14920
14921 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
14922 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
14923 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
14924 Sync with fileutils.
14925 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
14926 lib/gettext.h: Sync with diffutils.
14927
14928 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
14929 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
14930
14931 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
14932 PROTOTYPES to check for prototypes, and "defined __STDC__" to
14933 check for void *.
14934
14935 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
14936 size_t; the old version tried to do this but casted improperly.
14937 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
14938 (bitset_test): Now returns int, not unsigned long.
14939
14940 * lib/bitset_stats.c: Include "gettext.h".
14941 (_): New macro.
14942 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
14943 name locals "index", as it generates unnecessary warnings on some
14944 hosts that have an "index" function.
14945
14946 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
14947 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
14948 they need translation.
14949 * src/LR0.c (state_list_append, new_itemsets, get_state,
14950 append_states, generate_states): Likewise.
14951 * src/assoc.c (assoc_to_string): Likewise.
14952 * src/closure.c (print_closure, set_firsts, closure): Likewise.
14953 * src/gram.c (grammar_dump): Likewise.
14954 * src/injections.c (injections_compute): Likewise.
14955 * src/lalr.c (lookaheads_print): Likewise.
14956 * src/relation.c (relation_transpose): Likewise.
14957 * src/scan-gram.l: Likewise.
14958 * src/tables.c (table_grow, pack_vector): Likewise.
14959
14960 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
14961 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
14962 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
14963 * m4/mbstate_t.m4: Sync with fileutils.
14964 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
14965
14966 * po/LINGUAS: Add pt_BR.
14967 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
14968 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
14969 lib/timevar.c.
14970 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
14971 manual recommends.
14972 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
14973
14974 * src/complain.c (strerror_r): Remove decl; not needed.
14975 (strerror): Use same pattern as ../lib/error.c.
14976
14977 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
14978
14979 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
14980
14981 * src/main.c (main): Cast result of bindtextdomain and textdomain
14982 to void, to avoid a GCC warning when --disable-nls is in effect.
14983
14984 * src/scan-gram.l: Use strings rather than escapes when possible,
14985 to minimize the number of warnings from xgettext.
14986 (handle_action_dollar, handle_action_at): Don't use isdigit,
14987 as it mishandles negative chars and it may not work as expected
14988 outside the C locale.
14989
14990 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
14991 this is a GCC extension and is not portable to other compilers.
14992
14993 * src/system.h (alloca): Use same pattern as ../lib/error.c.
14994 Do not include <ctype.h>; no longer needed.
14995 Do not include <malloc.h>; no longer needed (and generates
14996 warnings on OpenBSD 3.0).
14997
14998 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
14999 it's not portable.
15000
15001 * tests/regression.at: Do not use 'cc -c input.c -o input';
15002 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
15003
15004 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
15005 exit status as failure, not just exit status 1. Sun C exits
15006 with status 2 sometimes.
15007
15008 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
15009 Use it for the two large tests.
15010
c8f002c7
AD
150112002-08-02 Akim Demaille <akim@epita.fr>
15012
15013 * src/conflicts.c (conflicts_output): Don't output rules never
15014 reduced here, since anyway that computation doesn't work.
15015 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
15016 (rule_useless_p, rule_never_reduced_p): New.
15017 (grammar_rules_partial_print): Use a filter instead of a range.
15018 Display the title only if needed.
15019 (grammar_rules_print): Adjust.
15020 (grammar_rules_never_reduced_report): New.
15021 * src/tables.c (action_row): Move the computation of rules never
15022 reduced to...
15023 (token_actions): here.
15024 * src/main.c (main): Make the parser before making the report, so
15025 that rules never reduced are computed.
15026 Call grammar_rules_never_reduced_report.
15027 * src/print.c (print_results): Report rules never reduced.
15028 * tests/conflicts.at, tests/reduce.at: Adjust.
15029
cd08e51e
AD
150302002-08-01 Akim Demaille <akim@epita.fr>
15031
15032 Instead of attaching lookaheads and duplicating the rules being
15033 reduced by a state, attach the lookaheads to the reductions.
15034
15035 * src/state.h (state_t): Remove the `lookaheads',
15036 `lookaheads_rule' member.
15037 (reductions_t): Add a `lookaheads' member.
15038 Use a regular array for the `rules'.
15039 * src/state.c (reductions_new): Initialize the lookaheads member
15040 to 0.
15041 (state_rule_lookaheads_print): Adjust.
15042 * src/state.h, src/state.c (state_reductions_find): New.
15043 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
15044 (count_rr_conflicts): Adjust.
15045 * src/lalr.c (LArule): Remove.
15046 (add_lookback_edge): Adjust.
15047 (state_lookaheads_count): New.
15048 (states_lookaheads_initialize): Merge into...
15049 (initialize_LA): this.
15050 (lalr_free): Adjust.
15051 * src/main.c (main): Don't free nullable and derives too early: it
15052 is used by --verbose.
15053 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
15054
bb0027a9
AD
150552002-08-01 Akim Demaille <akim@epita.fr>
15056
15057 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
15058 `rule_number_t**'.
15059 (set_derives, free_derives): Rename as...
15060 (derives_compute, derives_free): this.
15061 Adjust all dependencies.
15062 * src/nullable.c (set_nullable, free_nullable): Rename as...
15063 (nullable_compute, nullable_free): these.
15064 (rule_list_t): Store rule_t *, not rule_number_t.
15065 * src/state.c (state_rule_lookaheads_print): Directly compare rule
15066 pointers, instead of their numbers.
15067 * src/main.c (main): Call nullable_free, and derives_free earlier,
15068 as they were lo longer used.
15069
3325ddc4
AD
150702002-08-01 Akim Demaille <akim@epita.fr>
15071
15072 * lib/timevar.c (get_time): Include children time.
15073 * src/lalr.h (LA, LArule): Don't export them: used with the
15074 state_t.
15075 * src/lalr.c (LA, LArule): Static.
15076 * src/lalr.h, src/lalr.c (lalr_free): New.
15077 * src/main.c (main): Call it.
15078 * src/tables.c (pack_vector): Check whether loc is >= to the
15079 table_size, not >.
15080 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
15081 (tables_generate): do it, since that's also it which allocates
15082 them.
15083 Don't free LA and LArule, main does.
15084
c6f1a33c
AD
150852002-07-31 Akim Demaille <akim@epita.fr>
15086
15087 Separate parser tables computation and output.
15088
15089 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
15090 (conflict_list, conflict_list_cnt, table, check, table_ninf)
15091 (yydefgoto, yydefact, high): Move to...
15092 * src/tables.h, src/tables.c: here.
15093 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
15094 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
15095 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
15096 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
15097 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
15098 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
15099 (action_row, save_row, token_actions, save_column, default_goto)
15100 (goto_actions, sort_actions, matching_state, pack_vector)
15101 (table_ninf_remap, pack_table, prepare_actions): Move to...
15102 * src/tables.c: here.
15103 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
15104 * src/output.c (token_actions, output_base, output_conflicts)
15105 (output_check): Merge into...
15106 (prepare_actions): this.
15107 (actions_output): Rename as...
15108 (user_actions_output): this.
15109 * src/main.c (main): Call tables_generate and tables_free.
15110
1509d42f
AD
151112002-07-31 Akim Demaille <akim@epita.fr>
15112
15113 Steal GCC's --time-report support.
15114
15115 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
15116 stolen/adjusted from GCC.
15117 * m4/stage.m4: Remove time related checks.
15118 * m4/timevar.m4: New.
15119 * configure.in: Adjust.
15120 * src/system.h: Adjust to using timevar.h.
15121 * src/getargs.h, src/getargs.c: Support trace_time for
15122 --trace=time.
15123 * src/main.c (stage): Remove.
15124 (main): Replace `stage' invocations with timevar calls.
15125 * src/output.c: Insert pertinent timevar calls.
15126
273a74fa
AD
151272002-07-31 Akim Demaille <akim@epita.fr>
15128
15129 Let --trace have arguments.
15130
15131 * src/getargs.h (enum trace_e): New.
15132 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
15133 (long_options, short_options): --trace/-T takes an optional
15134 argument.
15135 Change all the uses of trace_flag to reflect the new flags.
15136 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
15137
15138 Strengthen `stage' portability.
15139
15140 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
15141 * configure.in: Use it.
15142 Don't check for malloc.h and sys/times.h.
15143 * src/system.h: Include them when appropriate.
15144 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
15145 times and struct tms are available.
15146
217598da
AD
151472002-07-30 Akim Demaille <akim@epita.fr>
15148
15149 In verbose parse error message, don't report `error' as an
15150 expected token.
15151 * tests/actions.at (Printers and Destructors): Adjust.
15152 * tests/calc.at (Calculator $1): Adjust.
15153 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
15154 error message, do not report the parser accepts the error token in
15155 that state.
15156
52489d44
AD
151572002-07-30 Akim Demaille <akim@epita.fr>
15158
15159 Normalize conflict related messages.
15160
15161 * src/complain.h, src/complain.c (warn, complain): New.
15162 * src/conflicts.c (conflicts_print): Use them.
15163 (conflict_report_yacc): New, extracted from...
15164 (conflicts_print): here.
15165 * tests/conflicts.at, tests/existing.at: Adjust.
15166
e8832397
AD
151672002-07-30 Akim Demaille <akim@epita.fr>
15168
15169 Report rules which are never reduced by the parser: those hidden
15170 by conflicts.
15171
15172 * src/LR0.c (save_reductions): Don't make the final state too
15173 different: save its reduction (accept) instead of having a state
15174 without any action (no shift or goto, no reduce).
15175 Note: the final state is now a ``regular'' state, i.e., the
15176 parsers now contain `reduce 0' as default reduction.
15177 Nevertheless, since they decide to `accept' when yystate =
15178 final_state, they still will not reduce rule 0.
15179 * src/print.c (print_actions, print_reduction): Adjust.
15180 * src/output.c (action_row): Track reduced rules.
15181 (token_actions): Report rules never reduced.
15182 * tests/conflicts.at, tests/regression.at: Adjust.
15183
caf23d24
AD
151842002-07-30 Akim Demaille <akim@epita.fr>
15185
15186 `stage' was accidently included in a previous patch.
15187 Initiate its autoconfiscation.
15188
15189 * configure.in: Look for malloc.h and sys/times.h.
15190 * src/main.c (stage): Adjust.
15191 Report only when trace_flag.
15192
640748ee
AD
151932002-07-29 Akim Demaille <akim@epita.fr>
15194
15195 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
15196 state_number_t.
15197 (errs_t): symbol_t*, not symbol_number_t.
15198 (reductions_t): rule_t*, not rule_number_t.
15199 (FOR_EACH_SHIFT): New.
15200 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
15201 * src/print.c, src/print_graph.c: Adjust.
15202
88bce5a2
AD
152032002-07-29 Akim Demaille <akim@epita.fr>
15204
15205 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
15206
15207 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
15208 (endtoken, accept): these.
15209 * src/reader.c (reader): Set endtoken's default tag to "$end".
15210 Set undeftoken's tag to "$undefined" instead of "$undefined.".
15211 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
15212 Adjust.
15213
1bfb97db
AD
152142002-07-29 Akim Demaille <akim@epita.fr>
15215
15216 * src/reduce.c (reduce_grammar): When the language is empty,
15217 complain about the start symbol, not the axiom.
15218 Use its location.
15219 * tests/reduce.at (Empty Language): New.
15220
fc5734fe
AD
152212002-07-26 Akim Demaille <akim@epita.fr>
15222
15223 * src/reader.h, src/reader.c (gram_error): ... can't get
15224 yycontrol without making too strong assumptions on the parser
15225 itself.
15226 * src/output.c (prepare_tokens): Use the real 0th value of
15227 token_translations instead of `0'.
15228 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
15229 visible here.
15230 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
15231 for the time being: %locations ought to provide it to yyerror.
15232
3650b4b8
AD
152332002-07-25 Akim Demaille <akim@epita.fr>
15234
15235 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
15236 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
15237 * tests/regression.at (Web2c Actions): Adjust.
15238
4b3d3a8e
AD
152392002-07-25 Akim Demaille <akim@epita.fr>
15240
15241 Stop storing rules from 1 to nrules + 1.
15242
15243 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
15244 * src/nullable.c, src/output.c, src/print.c, src/reader.c
15245 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
15246 Iterate from 0 to nrules.
15247 Use rule_number_as_item_number and item_number_as_rule_number.
15248 Adjust to `derive' now containing possibly 0.
15249 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
15250 Handle the `- 1' part in rule numbers from/to item numbers.
15251 * src/conflicts.c (log_resolution): Fix the message which reversed
15252 shift and reduce.
15253 * src/output.c (action_row): Initialize default_rule to -1.
15254 (token_actions): Adjust.
15255 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
15256 expected output.
15257 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
15258
4a2a22f4
AD
152592002-07-25 Akim Demaille <akim@epita.fr>
15260
15261 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
15262 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
15263 (b4_c_knr_arg_decl): New.
15264 * data/yacc.c: Use it to define yysymprint, yydestruct, and
15265 yyreport_parse_error.
15266
b8df3223
AD
152672002-07-25 Akim Demaille <akim@epita.fr>
15268
15269 * data/yacc.c (yyreport_parse_error): New, extracted from...
15270 (yyparse): here.
15271 (yydestruct, yysymprint): Move above yyparse.
15272 Be K&R compliant.
15273
a762e609
AD
152742002-07-25 Akim Demaille <akim@epita.fr>
15275
15276 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
15277 replace...
15278 (b4_sint_type, b4_uint_type): these.
15279 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
15280 * tests/regression.at (Web2c Actions): Adjust.
15281
12b0043a
AD
152822002-07-25 Akim Demaille <akim@epita.fr>
15283
15284 * src/gram.h (TIEM_NUMBER_MAX): New.
15285 (item_number_of_rule_number, rule_number_of_item_number): Rename
15286 as...
15287 (rule_number_as_item_number, item_number_as_rule_number): these.
15288 Adjust dependencies.
15289 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
15290 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
15291 (symbol_number_to_vector_number): New.
15292 (order): Of vector_number_t* type.
15293 (base_t, BASE_MAX, BASE_MIN): New.
15294 (froms, tos, width, pos, check): Of base_t type.
15295 (action_number_t, ACTION_MIN, ACTION_MAX): New.
15296 (actrow): Of action_number_t type.
15297 (conflrow): Of unsigned int type.
15298 (table_ninf, base_ninf): New.
15299 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
15300 (muscle_insert_int_table, muscle_insert_base_table)
15301 (muscle_insert_rule_number_table): New.
15302 (prepare_tokens): Output `toknum' as int_table.
15303 (action_row): Returns a rule_number_t.
15304 Use ACTION_MIN, not SHRT_MIN.
15305 (token_actions): yydefact is rule_number_t*.
15306 (table_ninf_remap): New.
15307 (pack_table): Use it for `base' and `table'.
15308 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
15309 replaced with...
15310 (YYPACT_NINF, YYTABLE_NINF): these.
15311 (yypact, yytable): Compute their types instead of hard-coded
15312 `short'.
15313 * tests/regression.at (Web2c Actions): Adjust.
15314
5dde258a
AD
153152002-07-19 Akim Demaille <akim@epita.fr>
15316
15317 * src/scan-gram.l (id): Can start with an underscore.
15318
a945ec39
AD
153192002-07-16 Akim Demaille <akim@epita.fr>
15320
15321 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
15322 Adjust all former `associativity' dependencies.
15323 * src/symtab.c (symbol_new): Default associativity is `undef', not
15324 `right'.
15325 (symbol_check_alias_consistence): Adjust.
15326
fae437e8
AD
153272002-07-09 Akim Demaille <akim@epita.fr>
15328
15329 * doc/bison.texinfo: Properly set the ``header'' part.
15330 Use @dircategory ``GNU programming tools'' as per Texinfo's
15331 documentation.
15332 Use @copying.
15333
1a715ef2
AD
153342002-07-09 Akim Demaille <akim@epita.fr>
15335
15336 * lib/quotearg.h: Protect against multiple inclusions.
15337 * src/location.h (location_t): Add a `file' member.
15338 (LOCATION_RESET, LOCATION_PRINT): Adjust.
15339 * src/complain.c (warn_at, complain_at, fatal_at): Drop
15340 `error_one_per_line' support.
15341
a5d50994
AD
153422002-07-09 Akim Demaille <akim@epita.fr>
15343
15344 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
15345 * src/reader.c (lineno): Remove.
15346 Adjust all dependencies.
15347 (get_merge_function): Take a location and use complain_at.
15348 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
15349 * tests/regression.at (Invalid inputs, Mixing %token styles):
15350 Adjust.
15351
b275314e
AD
153522002-07-09 Akim Demaille <akim@epita.fr>
15353
15354 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
15355 recovery rule, and forbid extensions when --yacc.
15356 (gram_error): Use complain_at.
15357 * src/reader.c (reader): Exit if there were parse errors.
15358
865b9df1
AD
153592002-07-09 Akim Demaille <akim@epita.fr>
15360
15361 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
15362 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
15363 Reported by R Blake <blakers@mac.com>.
15364
c76e14da
AD
153652002-07-09 Akim Demaille <akim@epita.fr>
15366
15367 * data/yacc.c: Output the copyright notive in the header.
15368
7db2ed2d
AD
153692002-07-03 Akim Demaille <akim@epita.fr>
15370
15371 * src/output.c (froms, tos): Are state_number_t.
15372 (save_column): sp, sp1, and sp2 are state_number_t.
15373 (prepare): Rename `final' as `final_state_number', `nnts' as
15374 `nterms_number', `nrules' as `rules_number', `nstates' as
15375 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
15376 unused.
15377 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
15378 * data/lalr1.cc (nsym_): Remove, unused.
15379
e68e0410
AD
153802002-07-03 Akim Demaille <akim@epita.fr>
15381
15382 * src/lalr.h, src/lalr.c (goto_number_t): New.
15383 * src/lalr.c (goto_list_t): New.
15384 Propagate them.
15385 * src/nullable.c (rule_list_t): New.
15386 Propagate.
15387 * src/types.h: Remove.
15388
e1a4f3a4
AD
153892002-07-03 Akim Demaille <akim@epita.fr>
15390
15391 * src/closure.c (print_fderives): Use rule_rhs_print.
15392 * src/derives.c (print_derives): Use rule_rhs_print.
15393 (rule_list_t): New, replaces `shorts'.
15394 (set_derives): Add comments.
15395 * tests/sets.at (Nullable, Firsts): Adjust.
15396
536545f3
AD
153972002-07-03 Akim Demaille <akim@epita.fr>
15398
15399 * src/output.c (prepare_actions): Free `tally' and `width'.
15400 (prepare_actions): Allocate and free `order'.
15401 * src/symtab.c (symbols_free): Free `symbols'.
15402 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
15403 * src/output.c (m4_invoke): Move to...
15404 * src/scan-skel.l: here.
15405 (<<EOF>>): Close yyout, and free its name.
15406
8b752b00
AD
154072002-07-03 Akim Demaille <akim@epita.fr>
15408
15409 Fix some memory leaks, and fix a bug: state 0 was examined twice.
15410
15411 * src/LR0.c (new_state): Merge into...
15412 (state_list_append): this.
15413 (new_states): Merge into...
15414 (generate_states): here.
15415 (set_states): Don't ensure a proper `errs' state member here, do it...
15416 * src/conflicts.c (conflicts_solve): here.
15417 * src/state.h, src/state.c: Comment changes.
15418 (state_t): Rename member `shifts' as `transitions'.
15419 Adjust all dependencies.
15420 (errs_new): For consistency, also take the values as argument.
15421 (errs_dup): Remove.
15422 (state_errs_set): New.
15423 (state_reductions_set, state_transitions_set): Assert that no
15424 previous value was assigned.
15425 (state_free): New.
15426 (states_free): Use it.
15427 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
15428 temporary storage: use `errs' and `nerrs' as elsewhere.
15429 (set_conflicts): Allocate and free this `errs'.
15430
613f5e1a
AD
154312002-07-02 Akim Demaille <akim@epita.fr>
15432
15433 * lib/libiberty.h: New.
15434 * lib: Update the bitset implementation from upstream.
15435 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
15436 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
15437 * src/main.c: Adjust bitset stats calls.
15438
26e0cadc
PE
154392002-07-01 Paul Eggert <eggert@twinsun.com>
15440
15441 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
15442 char, so that negative chars don't collide with $.
15443
1154cced
AD
154442002-06-30 Akim Demaille <akim@epita.fr>
15445
15446 Have the GLR tests be `warning' checked, and fix the warnings.
15447
15448 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
15449 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
15450 (yyremoveDeletes): `yyi' and `yyj' are size_t.
15451 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
15452 (yyaddDeferredAction): static.
15453 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
15454 (yyreportParseError): yyprefix is const.
15455 yytokenp is used only when verbose.
15456 (yy__GNUC__): Replace with __GNUC__.
15457 (yypdumpstack): yyi is size_t.
15458 (yypreference): Un-yy local variables and arguments, to avoid
15459 clashes with `yyr1'. Anyway, we are not in the user name space.
15460 (yytname_size): be an int, as is compared with ints.
15461 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
15462 Use them.
15463 * tests/cxx-gram.at: Use quotation to protect $1.
15464 Use AT_COMPILE to enable warnings hunts.
15465 Prototype yylex and yyerror.
15466 `Use' argc.
15467 Include `string.h', not `strings.h'.
15468 Produce and prototype stmtMerge only when used.
15469 yylex takes a location.
15470
97650f4e
AD
154712002-06-30 Akim Demaille <akim@epita.fr>
15472
15473 We spend a lot of time in quotearg, in particular when --verbose.
15474
15475 * src/symtab.c (symbol_get): Store a quoted version of the key.
15476 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
15477 Adjust all callers.
15478
d2576365
AD
154792002-06-30 Akim Demaille <akim@epita.fr>
15480
15481 * src/state.h (reductions_t): Rename member `nreds' as num.
15482 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
15483 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
15484
ccaf65bc
AD
154852002-06-30 Akim Demaille <akim@epita.fr>
15486
15487 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
15488 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
15489 (shifts_to): Rename as...
15490 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
15491 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
15492 (TRANSITION_IS_DISABLED, transitions_to): these.
15493
87675353
AD
154942002-06-30 Akim Demaille <akim@epita.fr>
15495
15496 * src/print.c (print_shifts, print_gotos): Merge into...
15497 (print_transitions): this.
15498 (print_transitions, print_errs, print_reductions): Align the
15499 lookaheads columns.
15500 (print_core, print_transitions, print_errs, print_state,
15501 print_grammar): Output empty lines separator before, not after.
15502 (state_default_rule_compute): Rename as...
15503 (state_default_rule): this.
15504 * tests/conflicts.at (Defaulted Conflicted Reduction),
15505 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
15506 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
15507
ce4ccb4b
AD
155082002-06-30 Akim Demaille <akim@epita.fr>
15509
15510 Display items as we display rules.
15511
15512 * src/gram.h, src/gram.c (rule_lhs_print): New.
15513 * src/gram.c (grammar_rules_partial_print): Use it.
15514 * src/print.c (print_core): Likewise.
15515 * tests/conflicts.at (Defaulted Conflicted Reduction),
15516 (Unresolved SR Conflicts): Adjust.
15517 (Unresolved SR Conflicts): Adjust and rename as...
15518 (Resolved SR Conflicts): this, as was meant.
15519 * tests/regression.at (Web2c Report): Adjust.
15520
bc933ef1
AD
155212002-06-30 Akim Demaille <akim@epita.fr>
15522
15523 * src/print.c (state_default_rule_compute): New, extracted from...
15524 (print_reductions): here.
15525 Pessimize, but clarify the code.
15526 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
15527
53d4308d
AD
155282002-06-30 Akim Demaille <akim@epita.fr>
15529
15530 * src/output.c (action_row): Let default_rule be always a rule
15531 number.
15532
574fb2d5
AD
155332002-06-30 Akim Demaille <akim@epita.fr>
15534
15535 * src/closure.c (print_firsts, print_fderives, closure):
15536 Use BITSET_EXECUTE.
15537 * src/lalr.c (lookaheads_print): Likewise.
15538 * src/state.c (state_rule_lookaheads_print): Likewise.
15539 * src/print_graph.c (print_core): Likewise.
15540 * src/print.c (print_reductions): Likewise.
15541 * src/output.c (action_row): Likewise.
15542 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
15543
05811fd7
AD
155442002-06-30 Akim Demaille <akim@epita.fr>
15545
15546 * src/print_graph.c: Use report_flag.
15547
0e4d5753
AD
155482002-06-30 Akim Demaille <akim@epita.fr>
15549
15550 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
15551 to...
15552 * src/relation.h, src/relation.c (traverse, relation_digraph)
15553 (relation_print, relation_transpose): New.
15554
24c7d800
AD
155552002-06-30 Akim Demaille <akim@epita.fr>
15556
15557 * src/state.h, src/state.c (shifts_to): New.
15558 * src/lalr.c (build_relations): Use it.
15559
9222837b
AD
155602002-06-30 Akim Demaille <akim@epita.fr>
15561
15562 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
15563 (item_number_of_rule_number, rule_number_of_item_number): New.
15564 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
15565 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
15566 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
15567 Propagate their use.
15568 Much remains to be done, in particular wrt `shorts' from types.h.
15569
260008e5
AD
155702002-06-30 Akim Demaille <akim@epita.fr>
15571
15572 * src/symtab.c (symbol_new): Initialize the `printer' member.
15573
8a731ca8
AD
155742002-06-30 Akim Demaille <akim@epita.fr>
15575
15576 * src/LR0.c (save_reductions): Remove, replaced by...
15577 * src/state.h, src/state.c (state_reductions_set): New.
15578 (reductions, errs): Rename as...
15579 (reductions_t, errs_t): these.
15580 Adjust all dependencies.
15581
32e1e0a4
AD
155822002-06-30 Akim Demaille <akim@epita.fr>
15583
15584 * src/LR0.c (state_list_t, state_list_append): New.
15585 (first_state, last_state): Now symbol_list_t.
15586 (this_state): Remove.
15587 (new_itemsets, append_states, save_reductions): Take a state_t as
15588 argument.
15589 (set_states, generate_states): Adjust.
15590 (save_shifts): Remove, replaced by...
15591 * src/state.h, src/state.c (state_shifts_set): New.
15592 (shifts): Rename as...
15593 (shifts_t): this.
15594 Adjust all dependencies.
15595 * src/state.h (state_t): Remove the `next' member.
15596
e5fb6710
AD
155972002-06-30 Akim Demaille <akim@epita.fr>
15598
15599 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
15600 escaped in slot 0.
15601
c7ca99d4
AD
156022002-06-30 Akim Demaille <akim@epita.fr>
15603
15604 Use hash.h for the state hash table.
15605
15606 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
15607 (allocate_storage): Use state_hash_new.
15608 (free_storage): Use state_hash_free.
15609 (new_state, get_state): Adjust.
15610 * src/lalr.h, src/lalr.c (states): Move to...
15611 * src/states.h (state_t): Remove the `link' member, no longer
15612 used.
15613 * src/states.h, src/states.c: here.
15614 (state_hash_new, state_hash_free, state_hash_lookup)
15615 (state_hash_insert, states_free): New.
15616 * src/states.c (state_table, state_compare, state_hash): New.
15617 * src/output.c (output_actions): Do not free states now, since we
15618 still need to know the final_state number in `prepare', called
15619 afterwards. Do it...
15620 * src/main.c (main): here: call states_free after `output'.
15621
df0e7316
AD
156222002-06-30 Akim Demaille <akim@epita.fr>
15623
15624 * src/state.h, src/state.c (state_new): New, extracted from...
15625 * src/LR0.c (new_state): here.
15626 * src/state.h (STATE_ALLOC): Move to...
15627 * src/state.c: here.
15628 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
15629 * src/state.h, src/state.c: here.
15630
39f41916
AD
156312002-06-30 Akim Demaille <akim@epita.fr>
15632
15633 * src/reader.c (gensym): Rename as...
15634 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
15635 (getsym): Rename as...
15636 (symbol_get): this.
15637
d57650a5
AD
156382002-06-30 Akim Demaille <akim@epita.fr>
15639
15640 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
15641 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
15642 * src/output.c, src/print.c, src/print_graph.c: Propagate.
15643 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
15644
5a08f1ce
AD
156452002-06-30 Akim Demaille <akim@epita.fr>
15646
15647 Make the test suite pass with warnings checked.
15648
15649 * tests/actions.at (Printers and Destructors): Improve.
15650 Avoid unsigned vs. signed issues.
15651 * tests/calc.at: Don't exercise the scanner here, do it...
15652 * tests/input.at (Torturing the Scanner): here.
15653
720623af
PH
156542002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15655
88e7e941 15656 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
15657 reorganize first lines parallel to yacc.c.
15658
fb8135fa
AD
156592002-06-28 Akim Demaille <akim@epita.fr>
15660
15661 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
15662 (b4_token_enum, b4_token_defines): New, factored from...
15663 * data/lalr1.cc, data/yacc.c, glr.c: here.
15664
41442480
AD
156652002-06-28 Akim Demaille <akim@epita.fr>
15666
15667 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
15668 unused variables.
15669 * src/output.c (merger_output): static.
15670
e0e5bf84
AD
156712002-06-28 Akim Demaille <akim@epita.fr>
15672
ba0fe3c7 15673 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
e0e5bf84
AD
15674 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
15675 pacify GCC.
15676 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 15677
676385e2
PH
156782002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15679
15680 Accumulated changelog for new GLR parsing features.
15681
6a254321 15682 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
15683 conflicts_total_count.
15684 * src/conflicts.h: Ditto.
15685 * src/output.c (token_actions): Use the new name.
15686 (output_conflicts): Change conflp => conflict_list_heads, and
15687 confl => conflict_list for better readability.
15688 * data/glr.c: Use the new names.
15689 * NEWS: Add self to GLR announcement.
e0e5bf84 15690
676385e2
PH
15691 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
15692
15693 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
15694 Akim Demaille.
15695
15696 * data/bison.glr: Change name to glr.c
15697 * data/glr.c: Renamed from bison.glr.
15698 * data/Makefile.am: Add glr.c
e0e5bf84
AD
15699
15700 * src/getargs.c:
15701
676385e2 15702 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
ba0fe3c7 15703 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 15704
676385e2
PH
15705 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15706
15707 * data/bison.glr: Be sure to restore the
15708 current #line when returning to the skeleton contents after having
15709 exposed the input file's #line.
15710
15711 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15712
15713 * data/bison.glr: Bring up to date with changes to bison.simple.
15714
15715 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15716
15717 * data/bison.glr: Correct definitions that use b4_prefix.
15718 Various reformatting.
15719 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
15720 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
15721 yytokenp argument; now part of stack.
15722 (yychar): Define to behave as documented.
15723 (yyclearin): Ditto.
e0e5bf84 15724
676385e2
PH
15725 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15726
15727 * src/reader.h: Add declaration for free_merger_functions.
15728
15729 * src/reader.c (merge_functions): New variable.
15730 (get_merge_function): New function.
15731 (free_merger_functions): New function.
15732 (readgram): Check for %prec that is not followed by a symbol.
15733 Handle %dprec and %merge declarations.
15734 (packgram): Initialize dprec and merger fields in rules array.
15735
15736 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
15737 conflict_list_cnt, conflict_list_free): New variables.
15738 (table_grow): Also grow conflict_table.
e0e5bf84 15739 (prepare_rules): Output dprec and merger tables.
676385e2 15740 (conflict_row): New function.
e0e5bf84 15741 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
15742 default reduction in conflicted states for GLR parser so that there
15743 are spaces for the conflict lists.
15744 (save_row): Also save conflict information.
15745 (token_actions): Allocate conflict list.
15746 (merger_output): New function.
15747 (pack_vector): Pack conflict table, too.
15748 (output_conflicts): New function to output yyconflp and yyconfl.
15749 (output_check): Allocate conflict_tos.
15750 (output_actions): Output conflict tables, also.
15751 (output_skeleton): Output b4_mergers definition.
15752 (prepare): Output b4_max_rhs_length definition.
15753 Use 'bison.glr' as default skeleton for GLR parsers.
15754
15755 * src/gram.c (glr_parser): New flag.
15756 (grammar_free): Call free_merger_functions.
15757
15758 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
15759 all pairs of conflicting reductions, rather than just all tokens
15760 causing conflicts. Needed to size conflict tables.
e0e5bf84 15761 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
15762 interface.
15763 (conflicts_print): Ditto.
15764 (count_total_conflicts): New function.
15765
15766 * src/reader.h (merger_list): New type.
15767 (merge_functions): New variable.
15768
15769 * src/lex.h (tok_dprec, tok_merge): New token types.
15770
15771 * src/gram.h (rule_s): Add dprec and merger fields.
15772 (glr_parser): New flag.
15773
15774 * src/conflicts.h (count_total_conflicts): New function.
15775
15776 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
15777
15778 * doc/bison.texinfo (Generalized LR Parsing): New section.
15779 (GLR Parsers): New section.
15780 (Language and Grammar): Mention GLR parsing.
15781 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
15782 Correct typo ("tge" -> "the").
15783
15784 * data/bison.glr: New skeleton for GLR parsing.
15785
15786 * tests/cxx-gram.at: New tests for GLR parsing.
15787
15788 * tests/testsuite.at: Include cxx-gram.at.
15789
15790 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 15791
676385e2
PH
15792 * src/parse-gram.y:
15793
15794 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
15795
15796 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 15797
b5480d74 157982002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
15799
15800 * src/options.h, src/options.c: Remove.
15801 * src/getargs.c (short_options, long_options): New.
15802
60491a94
AD
158032002-06-27 Akim Demaille <akim@epita.fr>
15804
15805 * data/bison.simple, data/bison.c++: Rename as...
15806 * data/yacc.c, data/lalr1.cc: these.
15807 * doc/bison.texinfo (Environment Variables): Remove.
15808
9be0c25b
AD
158092002-06-25 Raja R Harinath <harinath@cs.umn.edu>
15810
15811 * src/getargs.c (report_argmatch): Initialize strtok().
15812
1ae72863
AD
158132002-06-20 Akim Demaille <akim@epita.fr>
15814
15815 * data/bison.simple (b4_symbol_actions): New, replaces...
15816 (b4_symbol_destructor, b4_symbol_printer): these.
15817 (yysymprint): Be sure to call YYPRINT only for tokens, and using
15818 user token numbers.
15819
87542d29
AD
158202002-06-20 Akim Demaille <akim@epita.fr>
15821
15822 * data/bison.simple (yydestructor): Rename as...
15823 (yydestruct): this.
15824
1a31ed21
AD
158252002-06-20 Akim Demaille <akim@epita.fr>
15826
15827 * src/symtab.h, src/symtab.c (symbol_type_set)
15828 (symbol_destructor_set, symbol_precedence_set): The location is
15829 the last argument.
15830 Adjust all callers.
15831
e776192e
AD
158322002-06-20 Akim Demaille <akim@epita.fr>
15833
15834 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
15835 internals.
15836 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
15837 Takes a location.
15838 * src/symtab.h, src/symtab.c (symbol_class_set)
15839 (symbol_user_token_number_set): Likewise.
15840 Adjust all callers.
15841 Promote complain_at.
15842 * tests/input.at (Type Clashes): Adjust.
15843
5c1180b3
AD
158442002-06-20 Akim Demaille <akim@epita.fr>
15845
15846 * data/bison.simple (YYLEX): Fix the declaration when
15847 %pure-parser.
15848
e3170060
AD
158492002-06-20 Akim Demaille <akim@epita.fr>
15850
15851 * data/bison.simple (yysymprint): Don't print the token number,
15852 just its name.
15853 * tests/actions.at (Destructors): Rename as...
15854 (Printers and Destructors): this.
15855 Also exercise %printer.
15856
253862fd
AD
158572002-06-20 Akim Demaille <akim@epita.fr>
15858
15859 * data/bison.simple (YYDSYMPRINT): New.
15860 Use it to remove many of the #if YYDEBUG/if (yydebug).
15861
366eea36
AD
158622002-06-20 Akim Demaille <akim@epita.fr>
15863
15864 * src/symtab.h, src/symtab.c (symbol_t): printer and
15865 printer_location are new members.
15866 (symbol_printer_set): New.
15867 * src/parse-gram.y (PERCENT_PRINTER): New token.
15868 Handle its associated rule.
15869 * src/scan-gram.l: Adjust.
15870 (handle_destructor_at, handle_destructor_dollar): Rename as...
15871 (handle_symbol_code_at, handle_symbol_code_dollar): these.
15872 * src/output.c (symbol_printers_output): New.
15873 (output_skeleton): Call it.
15874 * data/bison.simple (yysymprint): New. Cannot be named yyprint
15875 since there are already many grammar files with a user `yyprint'.
15876 Replace the calls to YYPRINT to calls to yysymprint.
15877 * tests/calc.at: Adjust.
15878 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
15879 taking advantage of parser very internal details (stack size!).
15880
4f25ebb0
AD
158812002-06-20 Akim Demaille <akim@epita.fr>
15882
15883 * src/scan-gram.l: Complete the scanner with the missing patterns
15884 to pacify Flex.
15885 Use `quote' and `symbol_tag_get' where appropriate.
15886
93b68a0e
AD
158872002-06-19 Akim Demaille <akim@epita.fr>
15888
15889 * tests/actions.at (Destructors): Augment to test locations.
15890 * data/bison.simple (yydestructor): Pass it the current location
15891 if locations are enabled.
15892 Prototype only when __STDC__ or C++.
15893 Change the argument names to move into the yy name space: there is
15894 user code here.
15895
58612f1d
AD
158962002-06-19 Akim Demaille <akim@epita.fr>
15897
74310291
AD
15898 * data/bison.simple (b4_pure_if): New.
15899 Use it instead of #ifdef YYPURE.
15900
159012002-06-19 Akim Demaille <akim@epita.fr>
15902
15903 * data/bison.simple (b4_location_if): New.
58612f1d
AD
15904 Use it instead of #ifdef YYLSP_NEEDED.
15905
f25bfb75
AD
159062002-06-19 Akim Demaille <akim@epita.fr>
15907
15908 Prepare @$ in %destructor, but currently don't bind it in the
15909 skeleton, as %location use is not cleaned up yet.
15910
15911 * src/scan-gram.l (handle_dollar, handle_destructor_at)
15912 (handle_action_at): New.
15913 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
15914 a braced_code_t and a location as additional arguments.
15915 (handle_destructor_dollar): Instead of requiring `b4_eval', just
15916 unquote one when outputting `b4_dollar_dollar'.
15917 Adjust callers.
15918 * data/bison.simple (b4_eval): Remove.
15919 (b4_symbol_destructor): Adjust.
15920 * tests/input.at (Invalid @n): Adjust.
15921
c732d2c6
AD
159222002-06-19 Zack Weinberg <zack@codesourcery.com>
15923
15924 * doc/bison.texinfo: Document ability to have multiple
15925 prologue sections.
15926
8c165d89
AD
159272002-06-18 Akim Demaille <akim@epita.fr>
15928
15929 * src/files.c (compute_base_names): When computing the output file
15930 names from the input file name, strip the directory part.
15931
ca98bf57
AD
159322002-06-18 Akim Demaille <akim@epita.fr>
15933
15934 * data/bison.simple.new: Comment changes.
15935 Reported by Andreas Schwab.
15936
0bfb02ff
AD
159372002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
15938
15939 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
15940 there are no `label `yyoverflowlab' defined but not used' warnings
15941 when yyoverflow is defined.
15942
24c0aad7
AD
159432002-06-18 Akim Demaille <akim@epita.fr>
15944
15945 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
15946 new member.
15947 (symbol_destructor_set): Adjust.
15948 * src/output.c (symbol_destructors_output): Output the destructor
15949 locations.
15950 Output the symbol name.
15951 * data/bison.simple (b4_symbol_destructor): Adjust.
15952
5719c109
AD
159532002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
15954 and Akim Demaille <akim@epita.fr>
15955
15956 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
15957 what's left on the stack when the error recovery hits EOF.
15958 * tests/actions.at (Destructors): Complete to exercise this case.
15959
9280d3ef
AD
159602002-06-17 Akim Demaille <akim@epita.fr>
15961
15962 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
15963 arguments is really empty, not only equal to `[]'.
15964 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
15965 member.
15966 (symbol_destructor_set): New.
15967 * src/output.c (symbol_destructors_output): New.
15968 * src/reader.h (brace_code_t, current_braced_code): New.
15969 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
15970 (handle_dollar): Rename as...
15971 (handle_action_dollar): this.
15972 (handle_destructor_dollar): New.
15973 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
15974 (grammar_declaration): Use it.
15975 * data/bison.simple (yystos): Is always defined.
15976 (yydestructor): New.
15977 * tests/actions.at (Destructors): New.
15978 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
15979
dafdc66f
AD
159802002-06-17 Akim Demaille <akim@epita.fr>
15981
15982 * src/symlist.h, src/symlist.c (symbol_list_length): New.
15983 * src/scan-gram.l (handle_dollar, handle_at): Compute the
15984 rule_length only when needed.
15985 * src/output.c (actions_output, token_definitions_output): Output
15986 the full M4 block.
15987 * src/symtab.c: Don't access directly to the symbol tag, use
15988 symbol_tag_get.
15989 * src/parse-gram.y: Use symbol_list_free.
15990
56c47203
AD
159912002-06-17 Akim Demaille <akim@epita.fr>
15992
15993 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
15994 (symbol_list_prepend, get_type_name): Move to...
15995 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
15996 (symbol_list_prepend, symbol_list_n_type_name_get): here.
15997 Adjust all callers.
15998 (symbol_list_free): New.
15999 * src/scan-gram.l (handle_dollar): Takes a location.
16000 * tests/input.at (Invalid $n): Adjust.
16001
1e0bab92
AD
160022002-06-17 Akim Demaille <akim@epita.fr>
16003
16004 * src/reader.h, src/reader.c (symbol_list_new): Export it.
16005 (symbol_list_prepend): New.
16006 * src/parse-gram.y (%union): `list' is a new member.
16007 (symbols.1): New, replaces...
16008 (terms_to_prec.1, nterms_to_type.1): these.
16009 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
16010 Take a location as additional argument.
16011 Adjust all callers.
16012
04e60654
AD
160132002-06-15 Akim Demaille <akim@epita.fr>
16014
16015 * src/parse-gram.y: Move %token in the declaration section so that
16016 we don't depend upon CVS Bison.
16017
10e5b8bd
AD
160182002-06-15 Akim Demaille <akim@epita.fr>
16019
16020 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
16021 * src/print.c (print_core): Use it.
16022
9801d40c
AD
160232002-06-15 Akim Demaille <akim@epita.fr>
16024
16025 * src/conflicts.c (log_resolution): Accept the rule involved in
16026 the sr conflicts instead of the lookahead number that points to
16027 that rule.
16028 (flush_reduce): Accept the current lookahead vector as argument,
16029 instead of the index in LA.
16030 (resolve_sr_conflict): Accept the current number of lookahead
16031 bitset to consider for the STATE, instead of the index in LA.
16032 (set_conflicts): Adjust.
16033 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
16034
c0263492
AD
160352002-06-15 Akim Demaille <akim@epita.fr>
16036
16037 * src/state.h (state_t): Replace the `lookaheadsp' member, a
16038 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
16039 Adjust all dependencies.
16040 * src/lalr.c (initialize_lookaheads): Split into...
16041 (states_lookaheads_count, states_lookaheads_initialize): these.
16042 (lalr): Adjust.
16043
9757c359
AD
160442002-06-15 Akim Demaille <akim@epita.fr>
16045
16046 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
16047 out of...
16048 (grammar_rules_print): here.
16049 * src/reduce.c (reduce_output): Use it.
16050 * tests/reduce.at (Useless Rules, Reduced Automaton)
16051 (Underivable Rules): Adjust.
16052
6b98e4b5
AD
160532002-06-15 Akim Demaille <akim@epita.fr>
16054
16055 Copy BYacc's nice way to report the grammar.
16056
16057 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
16058 New.
16059 Don't print the rules' location, it is confusing and useless.
16060 (rule_print): Use grammar_rhs_print.
16061 * src/print.c (print_grammar): Use grammar_rules_print.
16062
6b98e4b5
AD
160632002-06-15 Akim Demaille <akim@epita.fr>
16064
16065 Complete and rationalize `useless thing' warnings.
16066
16067 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
16068 (symbol_tag_print): New.
16069 Use them everywhere in place of accessing directly the tag member.
16070 * src/gram.h, src/gram.c (rule_print): New.
16071 Use it where a rule used to be printed `by hand'.
16072 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
16073 (reduce_grammar_tables): Report the useless rules.
16074 (reduce_print): Useless things are a warning, not an error.
16075 Report it as such.
16076 * tests/reduce.at (Useless Nonterminals, Useless Rules):
16077 (Reduced Automaton, Underivable Rules): Adjust.
16078 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
16079 * tests/conflicts.at (Unresolved SR Conflicts)
16080 (Solved SR Conflicts): Adjust.
16081
ee000ba4
AD
160822002-06-15 Akim Demaille <akim@epita.fr>
16083
16084 Let symbols have a location.
16085
16086 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
16087 (getsym): Adjust.
16088 Adjust all callers.
16089 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
16090 Use location_t, not int.
16091 * src/symtab.c (symbol_check_defined): Take advantage of the
16092 location.
16093 * tests/regression.at (Invalid inputs): Adjust.
16094
8efe435c
AD
160952002-06-15 Akim Demaille <akim@epita.fr>
16096
16097 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
16098 (input): Don't try to initialize yylloc here, do it in the
16099 scanner.
16100 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
16101 * src/gram.h (rule_t): Change line and action_line into location
16102 and action_location, of location_t type.
16103 Adjust all dependencies.
16104 * src/location.h, src/location.c (empty_location): New.
16105 * src/reader.h, src/reader.c (grammar_start_symbol_set)
16106 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
16107 (grammar_current_rule_symbol_append)
16108 (grammar_current_rule_action_append): Expect a location as argument.
16109 * src/reader.c (grammar_midrule_action): Adjust to attach an
16110 action's location as dummy symbol location.
16111 * src/symtab.h, src/symtab.c (startsymbol_location): New.
16112 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
16113 the line numbers.
16114
1921f1d7
AD
161152002-06-14 Akim Demaille <akim@epita.fr>
16116
16117 Grammar declarations may be found in the grammar section.
16118
16119 * src/parse-gram.y (rules_or_grammar_declaration): New.
16120 (declarations): Each declaration may end with a semicolon, not
16121 just...
16122 (grammar_declaration): `"%union"'.
16123 (grammar): Branch to rules_or_grammar_declaration.
16124
4515534c
AD
161252002-06-14 Akim Demaille <akim@epita.fr>
16126
16127 * src/main.c (main): Invoke scanner_free.
16128
f958596b
AD
161292002-06-14 Akim Demaille <akim@epita.fr>
16130
16131 * src/output.c (m4_invoke): Extracted from...
16132 (output_skeleton): here.
16133 Free tempfile.
16134
2c569025
AD
161352002-06-14 Akim Demaille <akim@epita.fr>
16136
16137 * src/parse-gram.y (directives, directive, gram)
16138 (grammar_directives, precedence_directives, precedence_directive):
16139 Rename as...
16140 (declarations, declaration, grammar, grammar_declaration)
16141 (precedence_declaration, precedence_declarator): these.
16142 (symbol_declaration): New.
16143
592e8d4d
AD
161442002-06-14 Akim Demaille <akim@epita.fr>
16145
16146 * src/files.c (action_obstack): Remove, unused.
16147 (output_obstack): Remove it, and all its dependencies, as it is no
16148 longer needed.
16149 * src/reader.c (epilogue_set): Build the epilogue in the
16150 muscle_obstack.
16151 * src/output.h, src/output.c (muscle_obstack): Move to...
16152 * src/muscle_tab.h, src/muscle_tab.h: here.
16153 (muscle_init): Initialize muscle_obstack.
16154 (muscle_free): New.
16155 * src/main.c (main): Call it.
16156
0c15323d
AD
161572002-06-14 Akim Demaille <akim@epita.fr>
16158
16159 * src/location.h: New, extracted from...
16160 * src/reader.h: here.
16161 * src/Makefile.am (noinst_HEADERS): Merge into
16162 (bison_SOURCES): this.
16163 Add location.h.
16164 * src/parse-gram.y: Use location_t instead of Bison's.
16165 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
16166 Use location_t instead of ints.
16167
e96c9728
AD
161682002-06-14 Akim Demaille <akim@epita.fr>
16169
16170 * data/bison.simple, data/bison.c++: Be sure to restore the
16171 current #line when returning to the skeleton contents after having
16172 exposed the input file's #line.
16173
75d1fe16
AD
161742002-06-12 Akim Demaille <akim@epita.fr>
16175
16176 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
16177 eager.
16178 * tests/actions.at (Exotic Dollars): New.
16179
6c35d22c
AD
161802002-06-12 Akim Demaille <akim@epita.fr>
16181
16182 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
16183 ['"/] too eagerly.
16184 * tests/input.at (Torturing the Scanner): New.
16185
1d6412ad
AD
161862002-06-11 Akim Demaille <akim@epita.fr>
16187
16188 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
16189 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
16190 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
16191 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
16192 * src/reader.c (reader): Use it.
16193
4cdb01db
AD
161942002-06-11 Akim Demaille <akim@epita.fr>
16195
16196 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
16197 Adjust all callers.
16198 (scanner_last_string_free): New.
16199
44995b2e
AD
162002002-06-11 Akim Demaille <akim@epita.fr>
16201
16202 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
16203 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
16204 (last_string, YY_OBS_FREE): New.
16205 Use them when returning an ID.
16206
e9955c83
AD
162072002-06-11 Akim Demaille <akim@epita.fr>
16208
16209 Have Bison grammars parsed by a Bison grammar.
16210
16211 * src/reader.c, src/reader.h (prologue_augment): New.
16212 * src/reader.c (copy_definition): Remove.
16213
16214 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
16215 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
16216 (grammar_current_rule_prec_set, grammar_current_rule_check)
16217 (grammar_current_rule_symbol_append)
16218 (grammar_current_rule_action_append): Export.
16219 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
16220 (symbol_list_action_append): Remove.
16221 Hook the routines from reader.
16222 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
16223 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
16224
16225 * src/reader.c (read_declarations): Remove, unused.
16226
16227 * src/parse-gram.y: Handle the epilogue.
16228 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
16229 (grammar_start_symbol_set): this.
16230 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
16231 * src/reader.c (readgram): Remove, unused.
16232 (reader): Adjust to insert eoftoken and axiom where appropriate.
16233
16234 * src/reader.c (copy_dollar): Replace with...
16235 * src/scan-gram.h (handle_dollar): this.
16236 * src/parse-gram.y: Remove `%thong'.
16237
16238 * src/reader.c (copy_at): Replace with...
16239 * src/scan-gram.h (handle_at): this.
16240
16241 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
16242 New.
16243
16244 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
16245 time being.
16246
16247 * src/reader.h, src/reader.c (grammar_rule_end): New.
16248
16249 * src/parse.y (current_type, current_class): New.
16250 Implement `%nterm', `%token' support.
16251 Merge `%term' into `%token'.
16252 (string_as_id): New.
16253 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
16254 type name.
16255
16256 * src/parse-gram.y: Be sure to handle properly the beginning of
16257 rules.
16258
16259 * src/parse-gram.y: Handle %type.
16260 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
16261
16262 * src/parse-gram.y: More directives support.
16263 * src/options.c: No longer handle source directives.
16264
16265 * src/parse-gram.y: Fix %output.
16266
16267 * src/parse-gram.y: Handle %union.
16268 Use the prologue locations.
16269 * src/reader.c (parse_union_decl): Remove.
16270
16271 * src/reader.h, src/reader.c (epilogue_set): New.
16272 * src/parse-gram.y: Use it.
16273
16274 * data/bison.simple, data/bison.c++: b4_stype is now either not
16275 defined, then default to int, or to the contents of %union,
16276 without `union' itself.
16277 Adjust.
16278 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
16279
16280 * src/output.c (actions_output): Don't output braces, as they are
16281 already handled by the scanner.
16282
16283 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
16284 characters to themselves.
16285
16286 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
16287 that the epilogue has a proper #line.
16288
16289 * src/parse-gram.y: Handle precedence/associativity.
16290
16291 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
16292 a terminal.
16293 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
16294 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
16295 at all to define terminals that cannot be emitted.
16296
16297 * src/scan-gram.l: Escape M4 characters.
16298
16299 * src/scan-gram.l: Working properly with escapes in user
16300 strings/characters.
16301
16302 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
16303 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
16304 grammar.
16305 Use more modest sizes, as for the time being the parser does not
16306 release memory, and therefore the process swallows a huge amount
16307 of memory.
16308
16309 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
16310 stricter %token grammar.
16311
16312 * src/symtab.h (associativity): Add `undef_assoc'.
16313 (symbol_precedence_set): Do nothing when passed an undef_assoc.
16314 * src/symtab.c (symbol_check_alias_consistence): Adjust.
16315
16316 * tests/regression.at (Invalid %directive): Remove, as it is now
16317 meaningless.
16318 (Invalid inputs): Adjust to the new error messages.
16319 (Token definitions): The new grammar doesn't allow too many
16320 eccentricities.
16321
16322 * src/lex.h, src/lex.c: Remove.
16323 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
16324 (copy_character, copy_string2, copy_string, copy_identifier)
16325 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
16326 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
16327 (parse_action): Remove.
16328 * po/POTFILES.in: Adjust.
16329
2e047461
AD
163302002-06-11 Akim Demaille <akim@epita.fr>
16331
cd05d13c 16332 * src/reader.c (parse_action): Don't store directly into the
2e047461
AD
16333 rule's action member: return the action as a string.
16334 Don't require `rule_length' as an argument: compute it.
16335 (grammar_current_rule_symbol_append)
16336 (grammar_current_rule_action_append): New, eved out from
16337 (readgram): here.
16338 Remove `action_flag', `rulelength', unused now.
16339
9af3fbce
AD
163402002-06-11 Akim Demaille <akim@epita.fr>
16341
16342 * src/reader.c (grammar_current_rule_prec_set).
16343 (grammar_current_rule_check): New, eved out from...
16344 (readgram): here.
16345 Remove `xaction', `first_rhs': useless.
16346 * tests/input.at (Type clashes): New.
16347 * tests/existing.at (GNU Cim Grammar): Adjust.
16348
1485e106
AD
163492002-06-11 Akim Demaille <akim@epita.fr>
16350
16351 * src/reader.c (grammar_midrule_action): New, Eved out from
16352 (readgram): here.
16353
da4160c3
AD
163542002-06-11 Akim Demaille <akim@epita.fr>
16355
16356 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
16357 New.
16358 (readgram): Use them as replacement of inlined code, crule and
16359 crule1.
16360
f6d0f937
AD
163612002-06-11 Akim Demaille <akim@epita.fr>
16362
16363 * src/reader.c (grammar_end, grammar_symbol_append): New.
16364 (readgram): Use them.
16365 Make the use of `p' as local as possible.
16366
69078d4b
AD
163672002-06-10 Akim Demaille <akim@epita.fr>
16368
16369 GCJ's parser requires the tokens to be defined before the prologue.
16370
16371 * data/bison.simple: Output the token definition before the user's
16372 prologue.
16373 * tests/regression.at (Braces parsing, Duplicate string)
16374 (Mixing %token styles): Check the output from bison.
16375 (Early token definitions): New.
16376
5e424082
AD
163772002-06-10 Akim Demaille <akim@epita.fr>
16378
16379 * src/symtab.c (symbol_user_token_number_set): Don't complain when
16380 assigning twice the same user number to a token, so that we can
16381 use it in...
16382 * src/lex.c (lex): here.
16383 Also use `symbol_class_set' instead of hand written code.
16384 * src/reader.c (parse_assoc_decl): Likewise.
16385
44536b35
AD
163862002-06-10 Akim Demaille <akim@epita.fr>
16387
16388 * src/symtab.c, src/symtab.c (symbol_class_set)
16389 (symbol_user_token_number_set): New.
16390 * src/reader.c (parse_token_decl): Use them.
16391 Use a switch instead of ifs.
16392 Use a single argument.
16393
8b9f2372
AD
163942002-06-10 Akim Demaille <akim@epita.fr>
16395
16396 Remove `%thong' support as it is undocumented, unused, duplicates
16397 `%token's job, and creates useless e-mail traffic with people who
16398 want to know what it is, why it is undocumented, unused, and
16399 duplicates `%token's job.
16400
16401 * src/reader.c (parse_thong_decl): Remove.
16402 * src/options.c (option_table): Remove "thong".
16403 * src/lex.h (tok_thong): Remove.
16404
3ae2b51f
AD
164052002-06-10 Akim Demaille <akim@epita.fr>
16406
16407 * src/symtab.c, src/symtab.c (symbol_type_set)
16408 (symbol_precedence_set): New.
16409 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
16410 (value_components_used): Remove, unused.
16411
2f1afb73
AD
164122002-06-09 Akim Demaille <akim@epita.fr>
16413
16414 Move symbols handling code out of the reader.
16415
16416 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
16417 (axiom): Move to...
16418 * src/symtab.h, src/symtab.c: here.
16419
16420 * src/gram.c (start_symbol): Remove: use startsymbol->number.
16421 * src/reader.c (startval): Rename as...
16422 * src/symtab.h, src/symtab.c (startsymbol): this.
16423 * src/reader.c: Adjust.
16424
16425 * src/reader.c (symbol_check_defined, symbol_make_alias)
16426 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
16427 (token_translations_init)
16428 Move to...
16429 * src/symtab.c: here.
16430 * src/reader.c (packsymbols): Move to...
16431 * src/symtab.h, src/symtab.c (symbols_pack): here.
16432 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
16433 argument.
16434
e9bca3ad
AD
164352002-06-03 Akim Demaille <akim@epita.fr>
16436
16437 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
16438 then statements.
16439
86eff183
AD
164402002-06-03 Akim Demaille <akim@epita.fr>
16441
16442 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
16443 structs with non literals.
16444 * src/scan-skel.l: never-interactive.
16445 * src/conflicts.c (enum conflict_resolution_e): No trailing
16446 comma.
16447 * src/getargs.c (usage): Split long literal strings.
16448 Reported by Hans Aberg.
16449
717be197
AD
164502002-05-28 Akim Demaille <akim@epita.fr>
16451
16452 * data/bison.c++: Use C++ ostreams.
16453 (cdebug_): New member.
16454
670ddffd
AD
164552002-05-28 Akim Demaille <akim@epita.fr>
16456
16457 * src/output.c (output_skeleton): Be sure to allocate enough room
16458 for `/' _and_ for `\0' in full_skeleton.
16459
769b430f
AD
164602002-05-28 Akim Demaille <akim@epita.fr>
16461
16462 * data/bison.c++: Catch up with bison.simple:
16463 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16464 and Paul Eggert <eggert@twinsun.com>: `error' handing.
16465 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
16466 and popping traces.
16467
7067cb36
PH
164682002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16469
16470 * src/output.c (output_skeleton): Put an explicit path in front of
16471 the skeleton file name, rather than relying on the -I directory,
16472 to partially alleviate effects of having a skeleton file lying around
16473 in the current directory.
769b430f 16474
4a713ec2
PH
164752002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16476
769b430f 16477 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
16478 obstack_printf should be obstack_fgrow1.
16479
b408954b
AD
164802002-05-26 Akim Demaille <akim@epita.fr>
16481
16482 * src/state.h (state_t): `solved_conflicts' is a new member.
16483 * src/LR0.c (new_state): Set it to 0.
16484 * src/conflicts.h, src/conflicts.c (print_conflicts)
16485 (free_conflicts, solve_conflicts): Rename as...
16486 (conflicts_print, conflicts_free, conflicts_solve): these.
16487 Adjust callers.
16488 * src/conflicts.c (enum conflict_resolution_e)
16489 (solved_conflicts_obstack): New, used by...
16490 (log_resolution): this.
16491 Adjust to attach the conflict resolution to each state.
16492 Complete the description with the precedence/associativity
16493 information.
16494 (resolve_sr_conflict): Adjust.
16495 * src/print.c (print_state): Output its solved_conflicts.
16496 * tests/conflicts.at (Unresolved SR Conflicts)
16497 (Solved SR Conflicts): Exercise --report=all.
16498
a49aecd5
AD
164992002-05-26 Akim Demaille <akim@epita.fr>
16500
16501 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
16502 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
16503 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
16504 (token_number_t, item_number_as_token_number)
16505 (token_number_as_item_number, muscle_insert_token_number_table):
16506 Rename as...
16507 (symbol_number_t, item_number_as_symbol_number)
16508 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
16509 these, since it is more appropriate.
16510
5504898e
AD
165112002-05-26 Akim Demaille <akim@epita.fr>
16512
16513 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
16514 `Error:' lines.
16515 * data/bison.simple (yystos) [YYDEBUG]: New.
16516 (yyparse) [YYDEBUG]: Display the symbols which are popped during
16517 error recovery.
16518 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
16519
ec3bc396
AD
165202002-05-25 Akim Demaille <akim@epita.fr>
16521
16522 * doc/bison.texinfo (Debugging): Split into...
16523 (Tracing): this new section, its former contents, and...
16524 (Understanding): this new section.
16525 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
16526 by...
16527 (report_flag): this.
16528 Adjust all dependencies.
16529 (report_args, report_types, report_argmatch): New.
16530 (usage, getargs): Report/support -r, --report.
16531 * src/options.h
16532 (struct option_table_struct): Rename as..,
16533 (struct option_table_s): this.
16534 Rename the `set_flag' member to `flag' to match with getopt_long's
16535 struct.
16536 * src/options.c (option_table): Split verbose into an entry for
16537 %verbose, and another for --verbose.
16538 Support --report/-r, so remove -r from the obsolete --raw.
16539 * src/print.c: Attach full item sets and lookaheads reports to
16540 report_flag instead of trace_flag.
16541 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
16542
78df8250
PE
165432002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16544 and Paul Eggert <eggert@twinsun.com>
769b430f 16545
78df8250
PE
16546 * data/bison.simple (yyparse): Correct error handling to conform to
16547 POSIX and yacc. Specifically, after syntax error is discovered,
16548 do not reduce further before shifting the error token.
16549 Clean up the code a bit by removing the labels yyerrdefault,
16550 yyerrhandle, yyerrpop.
16551 * NEWS: Document the above.
16552
c0c9ea05
PH
165532002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16554
16555 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
16556 type; it isn't always big enough, since it doesn't necessarily
16557 include non-terminals.
769b430f 16558 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
16559 the latter can be removed.
16560 (yy_token_number_type): Remove, only one use.
16561 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
16562 don't use TokenNumberType as element type.
769b430f 16563
c0c9ea05
PH
16564 * tests/regression.at: Modify expected output to agree with change
16565 to yyr1 and yytranslate.
769b430f 16566
6390a83f
FK
165672002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
16568
16569 * src/reader.c (parse_action): Use copy_character instead of
16570 obstack_1grow.
16571
db7c8e9a
AD
165722002-05-13 Akim Demaille <akim@epita.fr>
16573
16574 * tests/regression.at (Token definitions): Prototype yylex and
16575 yyerror.
16576
fcc61800
PH
165772002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16578
158c687b 16579 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
16580 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
16581 32-bit arithmetic.
16582 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
16583
5683e9b2
AD
165842002-05-07 Akim Demaille <akim@epita.fr>
16585
16586 * tests/synclines.at: Be sure to prototype yylex and yyerror to
16587 avoid GCC warnings.
16588
0c2d3f4c
AD
165892002-05-07 Akim Demaille <akim@epita.fr>
16590
16591 Kill GCC warnings.
16592
16593 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
16594 over the RHS of each rule.
16595 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
16596 * src/state.h (state_t): Member `nitems' is unsigned short.
16597 * src/LR0.c (get_state): Adjust.
16598 * src/reader.c (packgram): Likewise.
16599 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
16600 `Type'.
16601 (muscle_insert_int_table): Remove, unused.
16602 (prepare_rules): Remove `max'.
16603
1565b720
AD
166042002-05-06 Akim Demaille <akim@epita.fr>
16605
16606 * src/closure.c (print_firsts): Display of the symbol tags.
16607 (bitmatrix_print): Move to...
16608 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
16609 here.
16610 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
16611
cfaee611
AD
166122002-05-06 Akim Demaille <akim@epita.fr>
16613
16614 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
16615 hash_do_for_each.
16616
458be8e0
AD
166172002-05-06 Akim Demaille <akim@epita.fr>
16618
16619 * src/LR0.c (new_state, get_state): Instead of using the global
16620 `kernel_size' and `kernel_base', have two new arguments:
16621 `core_size' and `core'.
16622 Adjust callers.
16623
a900a624
AD
166242002-05-06 Akim Demaille <akim@epita.fr>
16625
16626 * src/reader.c (packgram): No longer end `ritem' with a 0
16627 sentinel: it is not used.
16628
d4e7d3a1
AD
166292002-05-05 Akim Demaille <akim@epita.fr>
16630
16631 New experimental feature: display the lookaheads in the report and
16632 graph.
16633
16634 * src/print (print_core): When --trace-flag, display the rules
16635 lookaheads.
16636 * src/print_graph.c (print_core): Likewise.
16637 Swap the arguments.
16638 Adjust caller.
16639
39ceb25b
AD
166402002-05-05 Akim Demaille <akim@epita.fr>
16641
16642 * tests/torture.at (Many lookaheads): New test.
16643
5372019f
AD
166442002-05-05 Akim Demaille <akim@epita.fr>
16645
16646 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
16647 (GENERATE_MUSCLE_INSERT_TABLE): this.
16648 (output_int_table, output_unsigned_int_table, output_short_table)
16649 (output_token_number_table, output_item_number_table): Replace with...
16650 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
16651 (muscle_insert_short_table, muscle_insert_token_number_table)
16652 (muscle_insert_item_number_table): these.
16653 Adjust all callers.
16654 (prepare_tokens): Don't free `translations', since...
16655 * src/reader.h, src/reader.c (grammar_free): do it.
16656 Move to...
16657 * src/gram.h, src/gram.c (grammar_free): here.
16658 * data/bison.simple, data/bison.c++: b4_token_number_max is now
16659 b4_translate_max.
16660
5df5f6d5
AD
166612002-05-05 Akim Demaille <akim@epita.fr>
16662
16663 * src/output.c (output_unsigned_int_table): New.
16664 (prepare_rules): `i' is unsigned.
16665 `prhs', `rline', `r2' are unsigned int.
16666 Rename muscle `rhs_number_max' as `rhs_max'.
16667 Output muscles `prhs_max', `rline_max', and `r2_max'.
16668 Free rline and r1.
16669 * data/bison.simple, data/bison.c++: Adjust to use these muscles
16670 to compute types instead of constant types.
16671 * tests/regression.at (Web2c Actions): Adjust.
16672
b87f8b21
AD
166732002-05-04 Akim Demaille <akim@epita.fr>
16674
16675 * src/symtab.h (SALIAS, SUNDEF): Rename as...
16676 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
16677 Adjust dependencies.
16678 * src/output.c (token_definitions_output): Be sure not to output a
16679 `#define 'a'' when fed with `%token 'a' "a"'.
16680 * tests/regression.at (Token definitions): New.
16681
8bb936e4
PE
166822002-05-03 Paul Eggert <eggert@twinsun.com>
16683
16684 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
16685 for K&R C.
16686
166872002-05-03 gettextize <bug-gnu-gettext@gnu.org>
16688
16689 * Makefile.am (SUBDIRS): Remove intl.
16690 (EXTRA_DIST): Add config/config.rpath.
16691
53c71a12
AD
166922002-05-03 Akim Demaille <akim@epita.fr>
16693
16694 * data/bison.simple (m4_if): Don't output empty enums.
16695 And actually, output valid enum definitions :(.
16696
289dd0cf
AD
166972002-05-03 Akim Demaille <akim@epita.fr>
16698
16699 * configure.bat: Remove, completely obsolete.
16700 * Makefile.am (EXTRA_DIST): Adjust.
16701 Don't distribute config.rpath...
16702 * config/Makefile.am (EXTRA_DIST): Do it.
16703
db85e524
AD
167042002-05-03 Akim Demaille <akim@epita.fr>
16705
16706 * configure.in (GETTEXT_VERSION): New.
16707 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
16708
83ccf991
AD
167092002-05-03 Akim Demaille <akim@epita.fr>
16710
16711 * data/bison.simple (b4_token_enum): New.
16712 (b4_token_defines): Use it to output tokens both as #define and
16713 enums.
16714 Suggested by Paul Eggert.
16715 * src/output.c (token_definitions_output): Don't output spurious
16716 white spaces.
16717
1f418995
AD
167182002-05-03 Akim Demaille <akim@epita.fr>
16719
16720 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
16721
45119f04
RA
167222002-05-02 Robert Anisko <robert@lrde.epita.fr>
16723
16724 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
16725 Update the stack class, give a try to deque as the default container.
16726
b2d52318
AD
167272002-05-02 Akim Demaille <akim@epita.fr>
16728
16729 * data/bison.simple (yyparse): Do not implement @$ = @1.
16730 (YYLLOC_DEFAULT): Adjust to do it.
16731 * doc/bison.texinfo (Location Default Action): Fix.
16732
3a8b4109
AD
167332002-05-02 Akim Demaille <akim@epita.fr>
16734
16735 * src/reader.c (parse_braces): Merge into...
16736 (parse_action): this.
16737
84614e13
AD
167382002-05-02 Akim Demaille <akim@epita.fr>
16739
16740 * configure.in (ALL_LINGUAS): Remove.
16741 * po/LINGUAS, hr.po: New.
16742
fdbcd8e2
AD
167432002-05-02 Akim Demaille <akim@epita.fr>
16744
16745 Remove the so called hairy (semantic) parsers.
16746
16747 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
16748 * src/gram.h, src/gram.c (semantic_parser): Remove.
16749 (rule_t): Remove the guard and guard_line members.
16750 * src/lex.h (token_t): remove tok_guard.
16751 * src/options.c (option_table): Remove %guard and %semantic_parser
16752 support.
16753 * src/output.c, src/output.h (guards_output): Remove.
16754 (prepare): Adjust.
16755 (token_definitions_output): Don't output the `T'
16756 tokens (???).
16757 (output_skeleton): Don't output the guards.
16758 * src/files.c, src/files.c (attrsfile): Remove.
16759 * src/reader.c (symbol_list): Remove the guard and guard_line
16760 members.
16761 Adjust dependencies.
16762 (parse_guard): Remove.
16763 * data/bison.hairy: Remove.
16764 * doc/bison.texinfo (Environment Variables): Remove occurrences of
16765 BISON_HAIRY.
16766
82b6cb3f
AD
167672002-05-02 Akim Demaille <akim@epita.fr>
16768
16769 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
16770 (parse_guard): Rename the formal argument `stack_offset' as
16771 `rule_length', which is more readable.
16772 Adjust callers.
16773 (copy_at, copy_dollar): Instead of outputting the hard coded
16774 values of $$, $n and so forth, output invocation to b4_lhs_value,
16775 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
16776 Note: this patch partially drops `semantic-parser' support: it
16777 always does `rule_length - n', where semantic parsers ought to
16778 always use `-n'.
82b6cb3f
AD
16779 * data/bison.simple, data/bison.c++ (b4_lhs_value)
16780 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
16781
6cbfbcc5
AD
167822002-05-02 Akim Demaille <akim@epita.fr>
16783
16784 * configure.in (AC_INIT): Bump to 1.49b.
16785 (AM_INIT_AUTOMAKE): Short invocation.
16786
b8548114
AD
167872002-05-02 Akim Demaille <akim@epita.fr>
16788
16789 Version 1.49a.
16790
c20cd1fa
AD
167912002-05-01 Akim Demaille <akim@epita.fr>
16792
16793 * src/skeleton.h: Remove.
16794
8a9566d4
AD
167952002-05-01 Akim Demaille <akim@epita.fr>
16796
16797 * src/skeleton.h: Fix the #endif.
16798 Reported by Magnus Fromreide.
16799
8c6d399a
PE
168002002-04-26 Paul Eggert <eggert@twinsun.com>
16801
16802 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
16803 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 16804 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 16805
2b7ed18a
RA
168062002-04-25 Robert Anisko <robert@lrde.epita.fr>
16807
16808 * src/scan-skel.l: Postprocess quadrigraphs.
16809
16810 * src/reader.c (copy_character): New function, used to output
16811 single characters while replacing `[' and `]' with quadrigraphs, to
16812 avoid troubles with M4 quotes.
16813 (copy_comment): Output characters with copy_character.
16814 (read_additionnal_code): Likewise.
16815 (copy_string2): Likewise.
16816 (copy_definition): Likewise.
16817
16818 * tests/calc.at: Exercise M4 quoting.
16819
34a89c50
AD
168202002-04-25 Akim Demaille <akim@epita.fr>
16821
16822 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
16823 between `!' and the command.
16824 Reported by Paul Eggert.
16825
0dd1580a
RA
168262002-04-24 Robert Anisko <robert@lrde.epita.fr>
16827
16828 * tests/calc.at: Exercise prologue splitting.
16829
16830 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
16831 `b4_post_prologue' instead of `b4_prologue'.
16832
16833 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
16834 muscles.
16835 (output): Free pre_prologue_obstack and post_prologue_obstack.
16836 * src/files.h, src/files.c (attrs_obstack): Remove.
16837 (pre_prologue_obstack, post_prologue_obstack): New.
16838 * src/reader.c (copy_definition): Add a parameter to specify the
16839 obstack to fill, instead of using attrs_obstack unconditionally.
16840 (read_declarations): Pass pre_prologue_obstack to copy_definition if
16841 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
16842
83c1796f
PE
168432002-04-23 Paul Eggert <eggert@twinsun.com>
16844
16845 * data/bison.simple: Remove unnecessary commentary and white
16846 space differences from 1_29-branch.
16847 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
16848
16849 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
16850 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
16851 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
16852 constructors or destructors.
16853
16854 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
16855
1207eeac
AD
168562002-04-23 Akim Demaille <akim@epita.fr>
16857
16858 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
16859 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
16860 location with columns.
16861 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
16862 All reported by Paul Eggert.
16863
78ab8f67
AD
168642002-04-22 Akim Demaille <akim@epita.fr>
16865
16866 * src/reduce.c (dump_grammar): Move to...
16867 * src/gram.h, src/gram.c (grammar_dump): here.
16868 Be sure to separate long item numbers.
16869 Don't read the members of a rule's prec if its nil.
16870
133c20e2
AD
168712002-04-22 Akim Demaille <akim@epita.fr>
16872
16873 * src/output.c (table_size, table_grow): New.
16874 (MAXTABLE): Remove, replace uses with table_size.
16875 (pack_vector): Instead of dying when the table is too big, grow it.
16876
9515e8a7
AD
168772002-04-22 Akim Demaille <akim@epita.fr>
16878
16879 * data/bison.simple (yyr1): Its type is that of a token number.
16880 * data/bison.c++ (r1_): Likewise.
16881 * tests/regression.at (Web2c Actions): Adjust.
16882
23c5a174
AD
168832002-04-22 Akim Demaille <akim@epita.fr>
16884
16885 * src/reader.c (token_translations_init): 256 is now the default
16886 value for the error token, i.e., it will be assigned another
16887 number if the user assigned 256 to one of her tokens.
16888 (reader): Don't force 256 to error.
16889 * doc/bison.texinfo (Symbols): Adjust.
16890 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
16891 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
16892 etc. instead of 10, 20, 30 (which was used to `jump' over error
16893 (256) and undefined (2)).
16894
5fbb0954
AD
168952002-04-22 Akim Demaille <akim@epita.fr>
16896
16897 Propagate more token_number_t.
16898
16899 * src/gram.h (token_number_as_item_number)
16900 (item_number_as_token_number): New.
16901 * src/output.c (GENERATE_OUTPUT_TABLE): New.
16902 Use it to create output_item_number_table and
16903 output_token_number_table.
16904 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
16905 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
16906 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
16907 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
16908
4f940944
AD
169092002-04-22 Akim Demaille <akim@epita.fr>
16910
16911 * src/output.h, src/output.c (get_lines_number): Remove.
16912
3ded9a63
AD
169132002-04-19 Akim Demaille <akim@epita.fr>
16914
16915 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
16916 as Lex/Flex'.
16917 (Debugging): More details about enabling the debugging features.
16918 (Table of Symbols): Describe $$, $n, @$, and @n.
16919 Suggested by Tim Josling.
16920
e0c471a9
AD
169212002-04-19 Akim Demaille <akim@epita.fr>
16922
16923 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
16924
fecc10cd
AD
169252002-04-10 Akim Demaille <akim@epita.fr>
16926
16927 * src/system.h: Rely on HAVE_LIMITS_H.
16928 Suggested by Paul Eggert.
16929
51dec47b
AD
169302002-04-09 Akim Demaille <akim@epita.fr>
16931
16932 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
16933 full stderr, and strip it according to the bison options, instead
16934 of composing the error message from different bits.
16935 This makes it easier to check for several error messages.
16936 Adjust all the invocations.
16937 Add an invocation exercising the error token.
16938 Add an invocation demonstrating a stupid error message.
16939 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
16940 Adjust the tests.
16941 Error message are for stderr, not stdout.
16942
007a50a4
AD
169432002-04-09 Akim Demaille <akim@epita.fr>
16944
16945 * src/gram.h, src/gram.c (error_token_number): Remove, use
16946 errtoken->number.
16947 * src/reader.c (reader): Don't specify the user token number (2)
16948 for $undefined, as it uselessly prevents using it.
16949 * src/gram.h (token_number_t): Move to...
16950 * src/symtab.h: here.
16951 (state_t.number): Is a token_number_t.
16952 * src/print.c, src/reader.c: Use undeftoken->number instead of
16953 hard coded 2.
16954 (Even though this 2 is not the same as above: the number of the
16955 undeftoken remains being 2, it is its user token number which
16956 might not be 2).
16957 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
16958 `user_token_number_max'.
16959 Output `undef_token_number'.
16960 * data/bison.simple, data/bison.c++: Use them.
16961 Be sure to map invalid yylex return values to
16962 `undef_token_number'. This saves us from gratuitous SEGV.
16963
16964 * tests/conflicts.at (Solved SR Conflicts)
16965 (Unresolved SR Conflicts): Adjust.
16966 * tests/regression.at (Web2c Actions): Adjust.
16967
06446ccf
AD
169682002-04-08 Akim Demaille <akim@epita.fr>
16969
16970 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
16971 Adding #line.
16972 Remove the duplicate `typedefs'.
16973 (RhsNumberType): Fix the declaration and various other typos.
16974 Use __ofile__.
16975 * data/bison.simple: Use __ofile__.
16976 * src/scan-skel.l: Handle __ofile__.
16977
62a3e4f0
AD
169782002-04-08 Akim Demaille <akim@epita.fr>
16979
16980 * src/gram.h (item_number_t): New, the type of item numbers in
16981 RITEM. Note that it must be able to code symbol numbers as
16982 positive number, and the negation of rule numbers as negative
16983 numbers.
16984 Adjust all dependencies (pretty many).
16985 * src/reduce.c (rule): Remove this `short *' pointer: use
16986 item_number_t.
16987 * src/system.h (MINSHORT, MAXSHORT): Remove.
16988 Include `limits.h'.
16989 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
16990 (shortcpy): Remove.
16991 (MAXTABLE): Move to...
16992 * src/output.c (MAXTABLE): here.
16993 (prepare_rules): Use output_int_table to output rhs.
16994 * data/bison.simple, data/bison.c++: Adjust.
16995 * tests/torture.at (Big triangle): Move the limit from 254 to
16996 500.
16997 * tests/regression.at (Web2c Actions): Ajust.
16998
16999 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
17000 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
17001 passes, but produces negative #line number, once fixed, GCC is
17002 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
17003 C), it passes.
17004 * src/state.h (state_h): Code input lines on ints, not shorts.
17005
bb88b0fc
AD
170062002-04-08 Akim Demaille <akim@epita.fr>
17007
17008 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
17009 and then the grammar.
17010
9a636f47
AD
170112002-04-08 Akim Demaille <akim@epita.fr>
17012
17013 * src/system.h: No longer using strndup.
17014
680e8701
AD
170152002-04-07 Akim Demaille <akim@epita.fr>
17016
17017 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
17018 * src/output.c (output_table_data): Return the longest number.
17019 (prepare_tokens): Output `token_number_max').
17020 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
17021 New.
17022 Use them to define yy_token_number_type/TokenNumberType.
17023 Use this type for yytranslate.
17024 * tests/torture.at (Big triangle): Push the limit from 124 to
17025 253.
17026 * tests/regression.at (Web2c Actions): Adjust.
17027
817e9f41
AD
170282002-04-07 Akim Demaille <akim@epita.fr>
17029
17030 * tests/torture.at (Big triangle): New.
17031 (GNU AWK Grammar, GNU Cim Grammar): Move to...
17032 * tests/existing.at: here.
17033
5123689b
AD
170342002-04-07 Akim Demaille <akim@epita.fr>
17035
17036 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
17037 nritems.
17038 Adjust dependencies.
17039
f3849179
AD
170402002-04-07 Akim Demaille <akim@epita.fr>
17041
17042 * src/reader.c: Normalize increments to prefix form.
17043
bd02036a
AD
170442002-04-07 Akim Demaille <akim@epita.fr>
17045
17046 * src/reader.c, symtab.c: Remove debugging code.
17047
db8837cb
AD
170482002-04-07 Akim Demaille <akim@epita.fr>
17049
17050 Rename all the `bucket's as `symbol_t'.
17051
17052 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
17053 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
17054 * src/symtab.c, src/symtab.h (bucket): Rename as...
17055 (symbol_t): this.
17056 (symbol_list_new, bucket_check_defined, bucket_make_alias)
17057 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
17058 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
17059 (buckets_new, buckets_free, buckets_do): Rename as...
17060 (symbol_list_new, symbol_check_defined, symbol_make_alias)
17061 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
17062 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
17063 (symbols_new, symbols_free, symbols_do): these.
17064
72a23c97
AD
170652002-04-07 Akim Demaille <akim@epita.fr>
17066
17067 Use lib/hash for the symbol table.
17068
17069 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
17070 EOF.
17071 * src/lex.c (lex): Set the `number' member of new terminals.
17072 * src/reader.c (bucket_check_defined, bucket_make_alias)
17073 (bucket_check_alias_consistence, bucket_translation): New.
17074 (reader, grammar_free, readgram, token_translations_init)
17075 (packsymbols): Adjust.
17076 (reader): Number the predefined tokens.
17077 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
17078 for predefined tokens.
17079 * src/symtab.h (bucket): Remove all the hash table related
17080 members.
17081 * src/symtab.c (symtab): Replace by...
17082 (bucket_table): this.
17083 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
17084 (buckets_new, buckets_do): New.
17085
280a38c3
AD
170862002-04-07 Akim Demaille <akim@epita.fr>
17087
17088 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
17089 (start_symbol, max_user_token_number, semantic_parser)
17090 (error_token_number): Initialize.
17091 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
17092 Initialize.
17093 (reader): Don't.
17094 (errtoken, eoftoken, undeftoken, axiom): Extern.
17095
03b31c0c
AD
170962002-04-07 Akim Demaille <akim@epita.fr>
17097
17098 * src/gram.h (rule_s): prec and precsym are now pointers
17099 to the bucket giving the priority/associativity.
17100 Member `associativity' removed: useless.
17101 * src/reduce.c, src/conflicts.c: Adjust.
17102
8b3df748
AD
171032002-04-07 Akim Demaille <akim@epita.fr>
17104
17105 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
17106 Properly escape the symbols' TAG when outputting them.
17107
e601aa1d
AD
171082002-04-07 Akim Demaille <akim@epita.fr>
17109
17110 * src/lalr.h (LA): Is a bitsetv, not bitset*.
17111
b0299a2e
AD
171122002-04-07 Akim Demaille <akim@epita.fr>
17113
17114 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
17115 (LArule): this, which is an array to rule_t*.
17116 * src/print.c, src/conflicts.c: Adjust.
17117
d7e1f00c
AD
171182002-04-07 Akim Demaille <akim@epita.fr>
17119
17120 * src/gram.h (rule_t): Rename `number' as `user_number'.
17121 `number' is a new member.
17122 Adjust dependencies.
17123 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
17124
cc9305dd
AD
171252002-04-07 Akim Demaille <akim@epita.fr>
17126
17127 As a result of the previous patch, it is no longer needed
17128 to reorder ritem itself.
17129
17130 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
17131
b0940840
AD
171322002-04-07 Akim Demaille <akim@epita.fr>
17133
17134 Be sure never to walk through RITEMS, but use only data related to
17135 the rules themselves. RITEMS should be banished.
17136
17137 * src/output.c (output_token_translations): Rename as...
17138 (prepare_tokens): this.
17139 In addition to `translate', prepare the muscles `tname' and
17140 `toknum', which were handled by...
17141 (output_rule_data): this.
17142 Remove, and move the remainder of its outputs into...
17143 (prepare_rules): this new routines, which also merges content from
17144 (output_gram): this.
17145 (prepare_rules): Be sure never to walk through RITEMS.
17146 (output_stos): Rename as...
17147 (prepare_stos): this.
17148 (output): Always invoke prepare_states, after all, just don't use it
17149 in the output if you don't need it.
17150
643a5994
AD
171512002-04-07 Akim Demaille <akim@epita.fr>
17152
17153 * src/LR0.c (new_state): Display `nstates' as the name of the
17154 newly created state.
17155 Adjust to initialize first_state and last_state if needed.
17156 Be sure to distinguish the initial from the final state.
17157 (new_states): Create the itemset of the initial state, and use
17158 new_state.
17159 * src/closure.c (closure): Now that the initial state has its
17160 items properly set, there is no need for a special case when
17161 creating `ruleset'.
17162
17163 As a result, now the rule 0, reducing to $axiom, is visible in the
17164 outputs. Adjust the test suite.
17165
17166 * tests/conflicts.at (Solved SR Conflicts)
17167 (Unresolved SR Conflicts): Adjust.
17168 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
17169 * tests/conflicts.at (S/R in initial): New.
17170
b4c4ccc2
AD
171712002-04-07 Akim Demaille <akim@epita.fr>
17172
17173 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
17174 the RHS of the rules.
17175 * src/output.c (output_gram): Likewise.
17176
bba97eb2
AD
171772002-04-07 Akim Demaille <akim@epita.fr>
17178
17179 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
17180 bucket.
17181 Adjust all dependencies.
17182 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
17183 `number' of the buckets too.
17184 * src/gram.h: Include `symtab.h'.
17185 (associativity): Move to...
17186 * src/symtab.h: here.
17187 No longer include `gram.h'.
17188
c3b407f4
AD
171892002-04-07 Akim Demaille <akim@epita.fr>
17190
17191 * src/gram.h, src/gram.c (rules_rhs_length): New.
17192 (ritem_longest_rhs): Use it.
17193 * src/gram.h (rule_t): `number' is a new member.
17194 * src/reader.c (packgram): Set it.
17195 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
17196 the end of `rules', and count them out of `nrules'.
17197 (reduce_output, dump_grammar): Adjust.
17198 * src/print.c (print_grammar): It is no longer needed to check for
17199 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
17200 * tests/reduce.at (Reduced Automaton): New test.
17201
11652ab3
AD
172022002-04-07 Akim Demaille <akim@epita.fr>
17203
17204 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
17205 lacking `+ 1' to nrules, Bison reported as useless a token if it
17206 was used solely to set the precedence of the last rule...
17207
26b23c1a
AD
172082002-04-07 Akim Demaille <akim@epita.fr>
17209
17210 * data/bison.c++, data/bison.simple: Don't output the current file
17211 name in #line, to avoid useless diffs between two identical
17212 outputs under different names.
17213
18bcecb0
AD
172142002-04-07 Akim Demaille <akim@epita.fr>
17215
17216 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
17217 Normalize loops to using `< nrules + 1', not `<= nrules'.
17218
fa770c86
AD
172192002-04-07 Akim Demaille <akim@epita.fr>
17220
17221 * TODO: Update.
17222
d9b739c3
AD
172232002-04-07 Akim Demaille <akim@epita.fr>
17224
17225 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
17226 bucket.value as bucket.number.
17227
99013900
AD
172282002-04-07 Akim Demaille <akim@epita.fr>
17229
17230 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
17231 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
17232 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
17233 RHS, instead of being an index in RITEMS.
17234
e966383b
PE
172352002-04-04 Paul Eggert <eggert@twinsun.com>
17236
17237 * doc/bison.texinfo: Update copyright date.
17238 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
17239 (Symbols): Warn about running Bison in one character set,
17240 but compiling and/or running in an incompatible one.
17241 Warn about character code 256, too.
17242
172432002-04-03 Paul Eggert <eggert@twinsun.com>
17244
17245 * src/bison.data (YYSTACK_ALLOC): Depend on whether
17246 YYERROR_VERBOSE is nonzero, not whether it is defined.
17247
17248 Merge changes from bison-1_29-branch.
c307773e 17249
8d6c48b9
PE
172502002-03-20 Paul Eggert <eggert@twinsun.com>
17251
17252 Merge fixes from Debian bison_1.34-1.diff.
17253
17254 * configure.in (AC_PREREQ): 2.53.
17255
e53c6322
AD
172562002-03-20 Akim Demaille <akim@epita.fr>
17257
17258 * src/conflicts.c (log_resolution): Argument `resolution' is const.
17259
9ffbeca7
PE
172602002-03-19 Paul Eggert <eggert@twinsun.com>
17261
21db0b2a
PE
17262 * src/bison.simple (YYCOPY): New macro.
17263 (YYSTACK_RELOCATE): Use it.
17264 Remove Type arg; no longer needed. All callers changed.
17265 (yymemcpy): Remove; no longer needed.
17266
9ffbeca7
PE
17267 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
17268 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
17269
642cb8f8
AD
172702002-03-19 Akim Demaille <akim@epita.fr>
17271
17272 Test and fix the #line outputs.
17273
17274 * tests/atlocal.at (GCC): New.
17275 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
0ffd4fd1 17276 (Prologue synch line, %union synch line, Postprologue synch line)
642cb8f8
AD
17277 (Action synch line, Epilogue synch line): New tests.
17278 * src/reader.c (parse_union_decl): Define the muscle stype_line.
17279 * data/bison.simple, data/bison.c++: Use it.
17280
3c31a486
AD
172812002-03-19 Akim Demaille <akim@epita.fr>
17282
17283 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
17284 (Solved SR Conflicts, %expect not enough, %expect right)
17285 (%expect too much): Move to...
17286 * tests/conflicts.at: this new file.
17287
0d8bed56
AD
172882002-03-19 Akim Demaille <akim@epita.fr>
17289
17290 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17291 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
17292 that we can move to enums for instance.
17293 * src/output.c (token_definitions_output): Output a list of
17294 `token-name, token-number' instead of the #define.
17295 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
17296
9208d17f
AD
172972002-03-14 Akim Demaille <akim@epita.fr>
17298
17299 Use Gettext 0.11.1.
17300
af27eacb
RA
173012002-03-09 Robert Anisko <robert@lrde.epita.fr>
17302
17303 * data/bison.c++: Make the user able to add members to the generated
17304 parser by subclassing.
17305
9101a310
RA
173062002-03-05 Robert Anisko <robert@lrde.epita.fr>
17307
17308 * src/reader.c (read_additionnal_code): `c' should be an integer, not
17309 a character.
17310 Reported by Nicolas Tisserand and Nicolas Burrus.
17311
fff9bf0b
RA
173122002-03-04 Robert Anisko <robert@lrde.epita.fr>
17313
17314 * src/reader.c: Warn about lacking semi-colons, do not complain.
17315
64dba31e
RA
173162002-03-04 Robert Anisko <robert@lrde.epita.fr>
17317
17318 * data/bison.c++: Remove a debug line.
17319
374f5a14
RA
173202002-03-04 Robert Anisko <robert@lrde.epita.fr>
17321
17322 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
17323 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
17324 provide a default implementation.
17325
bfcf1f3a
AD
173262002-03-04 Akim Demaille <akim@epita.fr>
17327
17328 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
17329 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
17330 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
17331 * tests/semantic.at (Parsing Guards): Similarly.
17332 * src/reader.at (readgram): Complain if the last rule is not ended
17333 with a semi-colon.
17334
65ccf9fc
AD
173352002-03-04 Akim Demaille <akim@epita.fr>
17336
17337 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
17338 * src/closure.c: here.
17339 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
17340 RTC.
17341 * src/warshall.h, src/warshall.c: Remove.
17342 * tests/sets.at (Broken Closure): Adjust.
17343
d0039cbc
AD
173442002-03-04 Akim Demaille <akim@epita.fr>
17345
17346 * src/output.c (output_skeleton): tempdir is const.
17347 bytes_read is unused.
17348
345cea78
AD
173492002-03-04 Akim Demaille <akim@epita.fr>
17350
17351 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
17352 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
17353 Update.
17354 From Michael Hayes.
17355
564801f7
AD
173562002-03-04 Akim Demaille <akim@epita.fr>
17357
17358 * src/closure.c (closure): `r' is unused.
17359
e5352bc7
AD
173602002-03-04 Akim Demaille <akim@epita.fr>
17361
17362 * tests/sets.at (Broken Closure): Add the ending `;'.
17363 * src/reader.at (readgram): Complain if a rule is not ended with a
17364 semi-colon.
17365
914feea9
AD
173662002-03-04 Akim Demaille <akim@epita.fr>
17367
17368 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
17369 (count_sr_conflicts): Use bitset_count.
17370 * src/reduce.c (inaccessable_symbols): Ditto.
17371 (bits_size): Remove.
17372 * src/warshall.h, src/warshall.c: Convert to bitsetv.
17373
f0250de6
AD
173742002-03-04 Akim Demaille <akim@epita.fr>
17375
17376 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
17377 * src/reduce.c: Remove the `bitset_zero's following the
17378 `bitset_create's, as now it is performed by the latter.
17379
ef017502
AD
173802002-03-04 Akim Demaille <akim@epita.fr>
17381
17382 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
17383 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
17384 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
17385 latest sources from Michael.
17386
76514394
AD
173872002-03-04 Akim Demaille <akim@epita.fr>
17388
17389 * src/output.c (output): Don't free the grammar.
17390 * src/reader.c (grammar_free): New.
17391 * src/main.c (main): Call it and don't free symtab here.
17392
55024580
AD
173932002-03-04 Akim Demaille <akim@epita.fr>
17394
17395 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
17396 before returning.
17397 Reported by Benoit Perrot.
17398
f9abaa2c
AD
173992002-03-04 Akim Demaille <akim@epita.fr>
17400
17401 Use bitset operations when possible, not loops over bits.
17402
17403 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
17404 bitset_or.
17405 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
17406 * src/reduce.c (useless_nonterminals): Formatting changes.
17407 * src/warshall.c (TC): Use bitset_or.
17408
0e721e75
AD
174092002-03-04 Akim Demaille <akim@epita.fr>
17410
17411 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
17412 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
17413 Ditto.
17414
0fb1ffb1
AD
174152002-03-04 Akim Demaille <akim@epita.fr>
17416
17417 * src/lalr.c (F): Now a bitset*.
17418 Adjust all dependencies.
17419
b86796bf
AD
174202002-03-04 Akim Demaille <akim@epita.fr>
17421
17422 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
17423 Adjust all dependencies.
17424
602bbf31
AD
174252002-03-04 Akim Demaille <akim@epita.fr>
17426
17427 * src/L0.c, src/LR0.h (nstates): Be size_t.
17428 Adjust comparisons (signed vs unsigned).
17429 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
17430 bitset*.
17431 Adjust all dependencies.
17432
d8a0245c
AD
174332002-03-04 Akim Demaille <akim@epita.fr>
17434
17435 * src/closure.c (firsts): Now, also a bitset.
17436 Adjust all dependencies.
17437 (varsetsize): Remove, now unused.
17438 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
17439
34ba9743
AD
174402002-03-04 Akim Demaille <akim@epita.fr>
17441
17442 * src/print.c: Convert to use bitset.h, not hand coded iterations
17443 over ints.
17444
ed86e78c
AD
174452002-03-04 Akim Demaille <akim@epita.fr>
17446
17447 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
17448
dfdb1797
AD
174492002-03-04 Akim Demaille <akim@epita.fr>
17450
17451 * src/closure.c (ruleset): Be a bitset.
17452 (rulesetsize): Remove.
17453
7086e707
AD
174542002-03-04 Akim Demaille <akim@epita.fr>
17455
17456 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
17457 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
17458 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
17459 * src/closure.c (fderives): Be an array of bitsets.
17460
98254360
RA
174612002-02-28 Robert Anisko <robert@lrde.epita.fr>
17462
17463 * data/bison.c++: Merge the two generated headers. Insert a copyright
17464 notice in each output file.
17465
a75c057f
AD
174662002-02-28 Akim Demaille <akim@epita.fr>
17467
17468 * data/bison.c++: Copy the prologue of bison.simple to fetch
17469 useful M4 definitions, such as b4_header_guard.
17470
06b00abc
AD
174712002-02-25 Akim Demaille <akim@epita.fr>
17472
17473 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
17474 translator friendly scheme for the bgr
17475 copyright notice.
06b00abc 17476
70e7d534
AD
174772002-02-25 Akim Demaille <akim@epita.fr>
17478
17479 * src/output.c (header_output): Remove, now handled completely via
17480 M4.
17481
abe017f6
AD
174822002-02-25 Akim Demaille <akim@epita.fr>
17483
17484 * m4/m4.m4: New, from CVS Autoconf.
17485 * configure.in: Invoke it.
17486 * src/output.c (output_skeleton): Use its result instead of the
17487 hard coded name.
17488
381fb12e
AD
174892002-02-25 Akim Demaille <akim@epita.fr>
17490
17491 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
17492 Fileutils 4.1.5.
17493 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
17494 * src/output.c (output_skeleton): Use mkstemp to create a real
17495 temporary file.
17496 Move the filling of `skeleton' and its muscle to...
17497 (prepare): here.
17498 (output): Move the definition of the prologue muscle to...
17499 (prepare): here.
17500 * src/system.h (DEFAULT_TMPDIR): New.
17501
6f38107f
PE
175022002-02-14 Paul Eggert <eggert@twinsun.com>
17503
17504 Remove the support for C++ namespace cleanliness; it was
17505 causing more problems than it was curing, since it didn't work
17506 properly on some nonstandard C++ compilers. This can wait
17507 for a proper C++ parser.
17508
17509 * NEWS: Document this.
17510 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
17511 of C++, as it's treated like C now.
17512 * src/bison.simple (YYSTD): Remove.
17513 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
17514 Treat C++ just like Standard C instead of trying to support
17515 namespace cleanliness.
17516
80cce3da
AD
175172002-02-14 Akim Demaille <akim@epita.fr>
17518
17519 * tests/regression.at (else): Adjust to Andreas' change.
17520
842e8679
AD
175212002-02-14 Akim Demaille <akim@epita.fr>
17522
17523 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
17524
4bda3f10
AD
175252002-02-13 Andreas Schwab <schwab@suse.de>
17526
17527 * src/output.c (output_rule_data): Don't output NULL, it might
17528 not be defined yet.
17529
4162fa07 175302002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 17531
4162fa07
RA
17532 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
17533 (Copyright notice): Update.
b418ecd8 17534
bd16a5dc
AD
175352002-02-11 Akim Demaille <akim@epita.fr>
17536
17537 * tests/regression.at (%nonassoc and eof): Don't include
17538 nonportable headers.
17539
8d69a1a3
RA
175402002-02-08 Robert Anisko <robert@lrde.epita.fr>
17541
17542 * data/bison.c++: Correct error recovery. Make the user able to
17543 initialize the starting location.
17544
9b2d0677
AD
175452002-02-07 Akim Demaille <akim@epita.fr>
17546
17547 * tests/input.at: New.
17548
69e2658b
RA
175492002-02-07 Robert Anisko <robert@lrde.epita.fr>
17550
17551 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 17552 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
17553 directives around tables only needed for debugging.
17554
4aacc3a7
RA
175552002-02-07 Robert Anisko <robert@lrde.epita.fr>
17556
17557 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
17558 C++ parsers.
17559 (yy::b4_name::parse): Use print_.
17560
762a801e
RA
175612002-02-07 Robert Anisko <robert@lrde.epita.fr>
17562
17563 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
17564
4bb2bc3f
RA
175652002-02-07 Robert Anisko <robert@lrde.epita.fr>
17566
17567 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
17568 C++ parsers.
17569 (yy::b4_name::parse): Build verbose error messages, and use error_.
17570
6b45a3ca
RA
175712002-02-06 Robert Anisko <robert@lrde.epita.fr>
17572
17573 * data/bison.c++: Fix m4 quoting in comments.
17574
50997c6e
RA
175752002-02-06 Robert Anisko <robert@lrde.epita.fr>
17576
17577 * data/bison.c++: Adjust the parser code. Fix some muscles that were
17578 not expanded by m4.
17579
3f3eed27
AD
175802002-02-05 Akim Demaille <akim@epita.fr>
17581
17582 * data/bison.c++: Adjust to the M4 back end.
17583 More is certainly needed.
17584
be2a1a68
AD
175852002-02-05 Akim Demaille <akim@epita.fr>
17586
17587 Give a try to M4 as a back end.
17588
17589 * lib/readpipe.c: New, from wdiff.
17590 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
17591 BISON_HAIRY.
17592 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
17593 specific values. Now it is m4 that performs the lookup.
17594 * src/parse-skel.y: Remove.
17595 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
17596 * src/output.c (actions_output, guards_output)
17597 (token_definitions_output): No longer keeps track of the output
17598 line number, hence remove the second argument.
17599 (guards_output): Check against the guard member of a rule, not the
17600 action member.
17601 Adjust callers.
17602 (output_skeleton): Don't look for the skeleton location, let m4 do
17603 that.
17604 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
17605 file will be used.
17606 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
17607 (prepare): Given that for the time being changesyntax is not
17608 usable in M4, rename the muscles using `-' to `_'.
17609 Define `defines_flag', `output_parser_name' and `output_header_name'.
17610 * src/output.h (actions_output, guards_output)
17611 (token_definitions_output): Adjust prototypes.
17612 * src/scan-skel.l: Instead of scanning the skeletons, it now
17613 processes the output of m4: `__oline__' and `#output'.
17614 * data/bison.simple: Adjust to be used by M4(sugar).
17615 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
17616 to date.
17617 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
17618 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
17619 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
17620 shamelessly stolen from CVS Autoconf.
17621
beda758b
AD
176222002-02-05 Akim Demaille <akim@epita.fr>
17623
17624 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
17625 * configure.in: Check for the declarations of free and malloc.
17626 * src/muscle_tab.c: Adjust.
17627
5ece6d43
AD
176282002-02-05 Akim Demaille <akim@epita.fr>
17629
17630 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
17631 which have no values.
17632
5bb18f9a
AD
176332002-02-05 Akim Demaille <akim@epita.fr>
17634
17635 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
17636 * data/: here.
17637
894dd62e
PE
176382002-01-29 Paul Eggert <eggert@twinsun.com>
17639
17640 * src/bison.simple (YYSIZE_T): Do not define merely because
17641 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
17642 On some platforms, <alloca.h> does not declare YYSTD (size_t).
17643
82841af7
AD
176442002-01-27 Akim Demaille <akim@epita.fr>
17645
17646 Fix `%nonassoc and eof'.
17647
17648 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
17649 which were not properly copied! Replace
17650 memcpy (res->errs, src->errs, src->nerrs);
17651 with
17652 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
17653 !!!
17654 * tests/regression.at (%nonassoc and eof): Adjust to newest
17655 Autotest: `.' is not in the PATH.
17656
318b76e9
AD
176572002-01-27 Akim Demaille <akim@epita.fr>
17658
17659 * tests/sets.at (AT_EXTRACT_SETS): New.
17660 (Nullable): Use it.
17661 (Firsts): New.
17662
30d2f3d5
AD
176632002-01-26 Akim Demaille <akim@epita.fr>
17664
17665 * tests/actions.at, tests/calc.at, tests/headers.at,
17666 * tests/torture.at: Adjust to the newest Autotest which no longer
17667 forces `.' in the PATH.
17668
30f8c395
AD
176692002-01-25 Akim Demaille <akim@epita.fr>
17670
17671 * tests/regression.at (%nonassoc and eof): New.
17672 Suggested by Robert Anisko.
17673
29ae55f1
AD
176742002-01-24 Akim Demaille <akim@epita.fr>
17675
17676 Bison dumps core when trying to complain about broken input files.
17677 Reported by Cris van Pelt.
17678
17679 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
17680 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
17681 into...
17682 (Invalid inputs): Strengthen: exercise parse_percent_token.
17683
2b548aa6
RA
176842002-01-24 Robert Anisko <robert.anisko@epita.fr>
17685
17686 * src/Makefile.am: Add bison.c++.
17687 * src/bison.c++: New skeleton.
17688
bb0146c2
AD
176892002-01-21 Paolo Bonzini <bonzini@gnu.org>
17690
17691 * po/it.po: New.
17692
bec30531
AD
176932002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
17694
17695 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
17696
fc6edc45
MA
176972002-01-20 Marc Autret <marc@gnu.org>
17698
17699 * src/files.c (compute_output_file_names): Fix
17700
5e5d5415
MA
177012002-01-20 Marc Autret <marc@gnu.org>
17702
17703 * tests/output.at: New test.
17704 * src/files.c (compute_base_names): Don't map extensions when
17705 the YACC flag is set, use defaults.
17706 Reported by Evgeny Stambulchik.
17707
44ea3fbd
MA
177082002-01-20 Marc Autret <marc@gnu.org>
17709
ba0fe3c7
PE
17710 * src/system.h: Need to define __attribute__ away for non-GCC
17711 compilers as well (i.e., the vendor C compiler).
44ea3fbd
MA
17712 Suggested by Albert Chin-A-Young.
17713
338963d1
TVH
177142002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
17715
17716 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
17717 canonical definition.
17718 * src/system.h: Use the canonical definition for PARAMS (avoids
17719 a conflict with the macro from lib/hash.h).
17720
c57b2479
AD
177212002-01-11 Akim Demaille <akim@epita.fr>
17722
17723 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 17724 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 17725
b85810ae
AD
177262002-01-09 Akim Demaille <akim@epita.fr>
17727
17728 * src/files.c, src/files.h (output_infix): New.
17729 (tab_extension): Remove.
17730 (compute_base_names): Compute the former, drop the latter.
17731 * src/output.c (prepare): Insert the muscles `output-infix', and
17732 `output-suffix'.
17733 * src/parse-skel.y (string, string.1): New.
17734 (section.header): Use it.
17735 (section.yacc): Remove.
17736 (prefix): Remove too.
17737 * src/scan-skel.l: Adjust.
17738 * src/bison.simple, src/bison.hairy: Adjust.
17739
cae60122
AD
177402002-01-09 Akim Demaille <akim@epita.fr>
17741
17742 * configure.in (WERROR_CFLAGS): Compute it.
17743 * src/Makefile.am (CFLAGS): Pass it.
17744 * tests/atlocal.in (CFLAGS): Idem.
17745 * src/files.c: Fix a few warnings.
17746 (get_extension_index): Remove, unused.
17747
ae404801
AD
177482002-01-08 Akim Demaille <akim@epita.fr>
17749
17750 * src/getargs.c (AS_FILE_NAME): New.
17751 (getargs): Use it to convert DOSish file names.
17752 * src/files.c (base_name): Rename as full_base_name to avoid
17753 clashes with `base_name ()'.
17754 (filename_split): New.
17755 (compute_base_names): N-th rewrite, using filename_split.
17756
22312b71
AD
177572002-01-08 Akim Demaille <akim@epita.fr>
17758
17759 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
17760 New, stolen from the Fileutils 4.1.
17761 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
17762 * configure.in: Check for the presence of memrchr, and of its
17763 prototype.
17764
a67cef01
TVH
177652002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
17766
17767 * lib/hash.h (__P): Added definition for this macro.
17768 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
17769 BUILT_SOURCES, to ensure they are generated first.
17770 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
17771 %error-verbose to allow bootstrapping with bison 1.30x.
17772
2b25d624
AD
177732002-01-06 Akim Demaille <akim@epita.fr>
17774
17775 * src/reader.c (parse_braces): Don't fetch the next char, the
17776 convention is to fetch on entry.
17777 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
17778 'switch' without a following semicolon.
17779 * tests/regression.at (braces parsing): New.
17780
3460813b
AD
177812002-01-06 Akim Demaille <akim@epita.fr>
17782
17783 Bison is dead wrong in its RR conflict reports.
17784
17785 * tests/torture.at (GNU Cim Grammar): New.
17786 * src/conflicts.c (count_rr_conflicts): Fix.
17787
73784c64
AD
177882002-01-06 Akim Demaille <akim@epita.fr>
17789
17790 Creating package.m4 from configure.ac causes too many problems.
17791
17792 * tests/Makefile.am (package.m4): Create it by hand,
17793 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
17794
25d81090
AD
177952002-01-06 Akim Demaille <akim@epita.fr>
17796
17797 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
17798 skeleton.h.
17799
a9b8959e
PE
178002002-01-04 Paul Eggert <eggert@twinsun.com>
17801
17802 * doc/bison.texinfo (Debugging):
17803 Remove YYSTDERR; it's no longer defined or used.
17804 Also, s/cstdio.h/cstdio/.
17805
25d81090
AD
178062002-01-03 Akim Demaille <akim@epita.fr>
17807
17808 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
17809
1109455c
AD
178102002-01-03 Akim Demaille <akim@epita.fr>
17811
17812 * src/parse-skel.y (process_skeleton): Don't bind the parser's
17813 tracing code to --trace, wait for a better --trace option, with
17814 args.
17815
7ea5e977
AD
178162002-01-03 Akim Demaille <akim@epita.fr>
17817
17818 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
17819 The ISO C++ standard is extremely clear about it: stderr is
17820 considered a macro, not a regular symbol (see table 94 `Header
17821 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
17822 Therefore std:: does not apply to it. It still does with fprintf.
17823 Also, s/cstdio.h/cstdio/.
17824
fab5b110
AD
178252002-01-03 Akim Demaille <akim@epita.fr>
17826
17827 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
17828 for non system headers.
17829
aed7fd9b
AD
178302002-01-02 Akim Demaille <akim@epita.fr>
17831
17832 Equip the skeleton chain with location tracking, runtime trace,
17833 pure parser and scanner.
17834
17835 * src/parse-skel.y: Request a pure parser, locations, and prefix
17836 renaming.
17837 (%union): Having several members with the same type does not help
17838 type mismatches, simplify.
17839 (YYPRINT, yyprint): New.
17840 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
17841 (skel_error): this.
17842 Handle locations.
17843 * src/scan-skel.l: Adjust to these changes.
17844 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
17845 (LOCATION_PRINT, skel_control_t): New.
17846
24fad99e
AD
178472001-12-30 Akim Demaille <akim@epita.fr>
17848
17849 * src/parse-skel.y: Get rid of the shift/reduce conflict:
17850 replace `gb' with BLANKS.
17851 * src/scan-skel.l: Adjust.
17852
a4b36db4
AD
178532001-12-30 Akim Demaille <akim@epita.fr>
17854
17855 * src/system.h: We don't need nor want bcopy.
17856 Throw away MS-DOS crap: we don't need getpid.
17857 * configure.in: We don't need strndup. It was even causing
17858 problems: because Flex includes the headers *before* us,
17859 _GNU_SOURCE is not defined by config.h, and therefore strndup was
17860 not visible.
17861 * lib/xstrndup.c: New.
17862 * src/scan-skel.l: Use it.
17863 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
17864 * src/parse-skel.y: Use %directives instead of #defines.
17865
1239777d
AD
178662001-12-30 Akim Demaille <akim@epita.fr>
17867
17868 * src/skeleton.h: New.
17869 * src/output.c (output_parser, output_master_parser): Remove, dead
17870 code.
17871 * src/output.h (get_lines_number, actions_output, guards_output)
17872 (token_definitions_output): Prototype them.
17873 * src/parse-skel.y: Add the license notice.
17874 Include output.h and skeleton.h.
17875 (process_skeleton): Returns void, and takes a single parameter.
17876 * src/scan-skel.l: Add the license notice.
17877 Include skeleton.h.
17878 Don't use %option yylineno: it seems that then Flex imagines
17879 REJECT has been used, and therefore it won't reallocate its
17880 buffers (which makes no other sense to me than a bug). It results
17881 in warnings for `unused: yy_flex_realloc'.
17882
9b3add5b
RA
178832001-12-30 Robert Anisko <robert.anisko@epita.fr>
17884
17885 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
17886 (MUSCLE_INSERT_PREFIX): ...to there.
17887 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
17888 (MUSCLE_INSERT_PREFIX): Move from here...
17889
17890 * src/bison.hairy: Add a section directive. Put braces around muscle
17891 names. This parser skeleton is still broken, but Bison should not
17892 choke on a bad muscle 'syntax'.
17893 * src/bison.simple: Add a section directive. Put braces around muscle
17894 names.
17895
17896 * src/files.h (strsuffix, stringappend): Add declarations.
17897 (tab_extension): Add declaration.
17898 (short_base_name): Add declaration.
17899
17900 * src/files.c (strsuffix, stringappend): No longer static. These
17901 functions are used in the skeleton parser.
17902 (tab_extension): New.
17903 (compute_base_names): Use the computations done in this function
fab5b110 17904 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
17905 names.
17906 (short_base_name): No longer static.
17907
17908 * src/output.c (output_skeleton): New.
17909 (output): Disable call to output_master_parser, and give a try to
17910 a new skeleton handling system.
17911 (guards_output, actions_output): No longer static.
17912 (token_definitions_output, get_lines_number): No longer static.
17913
17914 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
17915
fab5b110 17916 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
17917 parse-skel.y.
17918
17919 * src/parse-skel.y: New file.
17920 * src/scan-skel.l: New file.
17921
b5b61c61
AD
179222001-12-29 Akim Demaille <akim@epita.fr>
17923
17924 %name-prefix is broken.
17925
17926 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
17927 Adjust all dependencies.
17928 * tests/headers.at (export YYLTYPE): Strengthen this test: use
17929 %name-prefix.
17930
17931 Renaming yylval but not yylloc is not consistent. Now we do.
17932
17933 * src/bison.simple: Prefix yylloc if used.
17934 * doc/bison.texinfo (Decl Summary): Document that.
17935
8c9a50be
AD
179362001-12-29 Akim Demaille <akim@epita.fr>
17937
17938 * doc/bison.texinfo: Promote `%long-directive' over
17939 `%long_directive'.
17940 Remove all references to fixed-output-files, yacc is enough.
17941
d99361e6
AD
179422001-12-29 Akim Demaille <akim@epita.fr>
17943
17944 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
17945 user prologue. These are defaults.
17946 * tests/actions.at (Mid-rule actions): Make sure the user can
17947 define YYDEBUG and YYERROR_VERBOSE.
17948
b9cecb91
AD
179492001-12-29 Akim Demaille <akim@epita.fr>
17950
17951 * src/output.c (header_output): Don't forget to export YYLTYPE and
17952 yylloc.
17953 * tests/headers.at (export YYLTYPE): New, make sure it does.
17954 * tests/regression.at (%union and --defines, Invalid CPP headers):
17955 Move to...
17956 * tests/headers.at: here.
17957
aea13e97
AD
179582001-12-29 Akim Demaille <akim@epita.fr>
17959
17960 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
17961
931394cb
AD
179622001-12-29 Akim Demaille <akim@epita.fr>
17963
17964 * tests/actions.at (Mid-rule actions): Output on a single line
17965 instead of several.
17966
704a47c4
AD
179672001-12-29 Akim Demaille <akim@epita.fr>
17968
17969 * doc/bison.texinfo: Formatting changes.
17970
091e20bb
AD
179712001-12-29 Akim Demaille <akim@epita.fr>
17972
17973 Don't store the token defs in a muscle, just be ready to output it
17974 on command. Now possible via `symbols'. Fixes a memory leak.
17975
17976 * src/output.c (token_definitions_output): New.
17977 (output_parser, header_output): Use it.
17978 * src/reader.c (symbols_save): Remove.
17979
cce71710
AD
179802001-12-29 Akim Demaille <akim@epita.fr>
17981
17982 * src/bison.simple: Do not provide a default for YYSTYPE and
17983 YYLTYPE before the user's prologue. Otherwise it's hardly... a
17984 default.
17985
82c035a8
AD
179862001-12-29 Akim Demaille <akim@epita.fr>
17987
17988 Mid-rule actions are simply... ignored!
17989
17990 * src/reader.c (readgram): Be sure to attach mid-rule actions to
17991 the empty-rule associated to the dummy symbol, not to the host
17992 rule.
17993 * tests/actions.at (Mid-rule actions): New.
17994
8419d367
AD
179952001-12-29 Akim Demaille <akim@epita.fr>
17996
17997 Memory leak.
17998
17999 * src/reader.c (reader): Free grammar.
18000
375d5806
AD
180012001-12-29 Akim Demaille <akim@epita.fr>
18002
18003 Memory leak.
18004
18005 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
18006 since it allocates it for each state, although only one is needed.
18007 (allocate_storage): Do it here.
18008
f51cb8ff
AD
180092001-12-29 Akim Demaille <akim@epita.fr>
18010
18011 * src/options.h, src/options.c (create_long_option_table): Rename
18012 as...
18013 (long_option_table_new): this, with a clearer prototype.
18014 (percent_table): Remove, unused,
18015 * src/getargs.c (getargs): Adjust.
18016
29e88316
AD
180172001-12-29 Akim Demaille <akim@epita.fr>
18018
18019 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
18020 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
18021 as states.
18022
b9f71f19
AD
180232001-12-29 Akim Demaille <akim@epita.fr>
18024
18025 * src/lalr.c (build_relations): Rename `states' as `states1'.
18026 Sorry, I don't understand exactly what it is, no better name...
18027
1a2b5d37
AD
180282001-12-29 Akim Demaille <akim@epita.fr>
18029
18030 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
18031 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
18032 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
18033 as rules.
18034
1cca533e
AD
180352001-12-29 Akim Demaille <akim@epita.fr>
18036
18037 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
18038 ago.
18039
c03ae966
AD
180402001-12-29 Akim Demaille <akim@epita.fr>
18041
18042 * src/reader.c, src/reader.h (user_toknums): Remove.
18043 Adjust all users to use symbols[i]->user_token_number.
18044
5a670b1e
AD
180452001-12-29 Akim Demaille <akim@epita.fr>
18046
18047 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
18048 Adjust all users to use symbols[i]->prec or ->assoc.
18049
ad949da9
AD
180502001-12-29 Akim Demaille <akim@epita.fr>
18051
18052 * src/reader.c, src/reader.h (tags): Remove.
18053 Adjust all users to use symbols[i]->tag.
18054
0e78e603
AD
180552001-12-29 Akim Demaille <akim@epita.fr>
18056
18057 * src/gram.h, src/gram.c (symbols): New, similar to state_table
18058 and rule_table.
18059 * src/reader.c (packsymbols): Fill this table.
18060 Drop sprec.
18061 * src/conflicts.c (resolve_sr_conflict): Adjust.
18062 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
18063 single table.
18064 Use symbols[i]->tag instead of tags[i].
18065
213e640e
AD
180662001-12-29 Akim Demaille <akim@epita.fr>
18067
18068 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
18069 In addition, put a comment in there, to replace...
18070 * tests/regression.at (%union and C comments): Remove.
18071
e7b8bef1
AD
180722001-12-29 Akim Demaille <akim@epita.fr>
18073
18074 * tests/regression.at (Web2c Actions): Blindly move the actual
18075 output as expected output. The contents *seem* right to me, but I
18076 can't pretend reading perfectly parser tables... Nonetheless, all
18077 the other tests pass correctly, the table look OK, even though the
18078 presence of `$axiom' is to be noted: AFAICS it is useless (but
18079 harmless).
18080
b68e7744
AD
180812001-12-29 Akim Demaille <akim@epita.fr>
18082
18083 * src/reader.c (readgram): Don't add the rule 0 if there were no
18084 rules read. In other words, add it _after_ having performed
18085 grammar sanity checks.
18086 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
18087
78d5bae9
AD
180882001-12-29 Akim Demaille <akim@epita.fr>
18089
18090 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
18091 visible, and some states have now a different number.
18092
ff442794
AD
180932001-12-29 Akim Demaille <akim@epita.fr>
18094
18095 * src/reader.c (readgram): Bind the initial rule's lineno to that
18096 of the first rule.
18097 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
18098 (Solved SR Conflicts): Adjust rule 0's line number.
18099
610ab194
AD
181002001-12-29 Akim Demaille <akim@epita.fr>
18101
18102 Fix the `GAWK Grammar' failure.
18103
18104 * src/LR0.c (final_state): Initialize to -1 so that we do compute
18105 the reductions of the first state which was mistakenly confused
18106 with the final state because precisely final_state was initialized
18107 to 0.
18108 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
18109 now noticed by Bison.
18110 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
18111 have a reduction on $default.
18112
29d29c8f
AD
181132001-12-29 Akim Demaille <akim@epita.fr>
18114
18115 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
18116 rule line numbers.
18117 * src/closure.c (print_closure): Likewise.
18118 * src/derives.c (print_derives): Likewise.
18119 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
18120 now.
18121
7c6b64d0
AD
181222001-12-29 Akim Demaille <akim@epita.fr>
18123
18124 * src/lalr.c (lookaheads_print): New.
18125 (lalr): Call it when --trace-flag.
18126 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
18127 are dumped.
18128
3d4daee3
AD
181292001-12-29 Akim Demaille <akim@epita.fr>
18130
18131 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
18132 when walking through ritem, even via rule->rhs.
18133 * src/reduce.c (dump_grammar, useful_production, reduce_output)
18134 (useful_production, useless_nonterminals): Likewise.
18135 (reduce_grammar_tables): Likewise, plus update nritems.
18136 * src/nullable.c (set_nullable): Likewise.
18137 * src/lalr.c (build_relations): Likewise.
18138 * tests/sets.at (Nullable): Adjust.
18139 Fortunately, now, the $axiom is no longer nullable.
18140
9e7f6bbd
AD
181412001-12-29 Akim Demaille <akim@epita.fr>
18142
18143 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
18144 the 0-sentinel.
18145 * src/gram.c (ritem_longest_rhs): Likewise.
18146 * src/reduce.c (nonterminals_reduce): Likewise.
18147 * src/print_graph.c (print_graph): Likewise.
18148 * src/output.c (output_rule_data): Likewise.
18149 * src/nullable.c (set_nullable): Likewise.
18150
255ef638
AD
181512001-12-29 Akim Demaille <akim@epita.fr>
18152
18153 * src/output.c: Comment changes.
18154
0d8a7363
AD
181552001-12-27 Paul Eggert <eggert@twinsun.com>
18156
18157 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
18158 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
18159 Sparc, as they were causing more porting problems than the
18160 (minor) performance improvement was worth.
18161
18162 Also, catch up with 1.31's YYSTD.
18163
3db472b9
AD
181642001-12-27 Akim Demaille <akim@epita.fr>
18165
18166 * src/output.c (output_gram): Rely on nritems, not the
18167 0-sentinel. See below.
18168 Use -1 as separator, not 0.
18169 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
18170 Rely on -1 as separator in yyrhs, instead of 0.
18171 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
18172 twice `Now at end of input', therefore there are two lines less to
18173 expect.
18174
b365aa05
AD
181752001-12-27 Akim Demaille <akim@epita.fr>
18176
18177 * tests/regression.at (Unresolved SR Conflicts):
18178 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
18179 below.
18180
30171f79
AD
181812001-12-27 Akim Demaille <akim@epita.fr>
18182
18183 * src/LR0.c (new_state): Recognize the final state by the fact it
18184 is reached by eoftoken.
18185 (insert_start_shifting_state, insert_eof_shifting_state)
18186 (insert_accepting_state, augment_automaton): Remove, since now
18187 these states are automatically computed from the initial state.
18188 (generate_states): Adjust.
18189 * src/print.c: When reporting a rule number to the user, substract
18190 1, so that the axiom rule is rule 0, and the first user rule is 1.
18191 * src/reduce.c: Likewise.
18192 * src/print_graph.c (print_core): For the time being, just as for
18193 the report, depend upon --trace-flags to dump the full set of
18194 items.
18195 * src/reader.c (readgram): Once the grammar read, insert the rule
18196 0: `$axiom: START-SYMBOL $'.
18197 * tests/set.at: Adjust: rule 0 is now displayed, and since the
18198 number of the states has changed (the final state is no longer
18199 necessarily the last), catch up.
18200
75142d45
AD
182012001-12-27 Akim Demaille <akim@epita.fr>
18202
18203 Try to make the use of the eoftoken valid. Given that its value
18204 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
18205 is used instead of > 0 where appropriate, (ii), depend upon nritems
18206 instead of the 0-sentinel.
18207
18208 * src/gram.h, src/gram.c (nritems): New.
18209 Expected to be duplication of nitems, but for the time being...
18210 * src/reader.c (packgram): Assert nritems and nitems are equal.
18211 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
18212 * src/closure.c (print_closure, print_fderives): Likewise.
18213 * src/gram.c (ritem_print): Likewise.
18214 * src/print.c (print_core, print_grammar): Likewise.
18215 * src/print_graph.c: Likewise.
18216
b7c49edf
AD
182172001-12-27 Akim Demaille <akim@epita.fr>
18218
18219 * src/main.c (main): If there are complains after grammar
18220 reductions, then output the report anyway if requested, then die.
18221 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
18222 * src/reader.c (eoftoken): New.
18223 (parse_token_decl): If the token being defined has value `0', it
18224 is the eoftoken.
18225 (packsymbols): No longer hack `tags' to insert `$' by hand.
18226 Be sure to preserve the value of the eoftoken.
18227 (reader): Make sure eoftoken is defined.
18228 Initialize nsyms to 0: now eoftoken is created just like the others.
18229 * src/print.c (print_grammar): Don't special case the eof token.
18230 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
18231 lie anyway, albeit pleasant.
18232 * tests/calc.at: Exercise error messages with eoftoken.
18233 Change the grammar so that empty input is invalid.
18234 Adjust expectations.
18235 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
18236
ec2da99f
AD
182372001-12-27 Akim Demaille <akim@epita.fr>
18238
18239 * configure.in: Check the protos of strchr ans strspn.
18240 Replace strchr if needed.
18241 * src/system.h: Provide the protos of strchr, strspn and memchr if
18242 missing.
18243 * lib/strchr.c: New.
18244 * src/reader.c (symbols_save): Use strchr.
18245
8adfa272
AD
182462001-12-27 Akim Demaille <akim@epita.fr>
18247
18248 * src/print.c, src/print_graph.c (escape): New.
18249 Use it to quote the TAGS outputs.
18250 * src/print_graph.c (print_state): Now errors are in red, and
18251 reductions in green.
18252 Prefer high to wide: output the state number on a line of its own.
18253
80dac38c
AD
182542001-12-27 Akim Demaille <akim@epita.fr>
18255
18256 * src/state.h, src/state.c (reductions_new): New.
18257 * src/LR0.c (set_state_table): Let all the states have a
18258 `reductions', even if reduced to 0.
18259 (save_reductions): Adjust.
18260 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
18261 * src/print.c (print_reductions, print_actions): Adjust.
18262 * src/output.c (action_row): Adjust.
18263
2cec70b9
AD
182642001-12-27 Akim Demaille <akim@epita.fr>
18265
18266 * src/state.h, src/state.c (errs_new, errs_dup): New.
18267 * src/LR0.c (set_state_table): Let all the states have an errs,
18268 even if reduced to 0.
18269 * src/print.c (print_errs, print_reductions): Adjust.
18270 * src/output.c (output_actions, action_row): Adjust.
18271 * src/conflicts.c (resolve_sr_conflict): Adjust.
18272
13ca549a
AD
182732001-12-27 Akim Demaille <akim@epita.fr>
18274
18275 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
18276
5092aba5
AD
182772001-12-27 Akim Demaille <akim@epita.fr>
18278
18279 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
18280 * src/print.c: here.
18281 (lookaheadset, shiftset): New, used as additional storage by
18282 print_reductions.
18283 (print_results): Adjust.
18284 (print_shifts, print_gotos, print_errs): New, extracted from...
18285 (print_actions): here.
18286 * src/print_graph.c (print_actions): Remove dead code.
18287
11e2beca
AD
182882001-12-27 Akim Demaille <akim@epita.fr>
18289
18290 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
18291 `$n' and `@n'.
18292
dac3c910
AD
182932001-12-27 Akim Demaille <akim@epita.fr>
18294
18295 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
18296 (build_relations): Adjust.
18297
d0b0fefa
AD
182982001-12-27 Akim Demaille <akim@epita.fr>
18299
18300 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
18301 duplication.
18302
adc8c848
AD
183032001-12-27 Akim Demaille <akim@epita.fr>
18304
18305 * src/reader.c (packgram): Catch nitems overflows.
18306
14d293ac
AD
183072001-12-27 Akim Demaille <akim@epita.fr>
18308
18309 * src/files.c, src/files.h (guard_obstack): Remove.
18310 * src/output.c (output): Adjust.
18311 * src/reader.c (parse_braces): New, factoring...
18312 (copy_action, copy_guard): these two which are renamed as...
18313 (parse_action, parse_guard): these.
18314 As a voluntary consequence, using braces around guards is now
18315 mandatory.
18316
f499b062
AD
183172001-12-27 Akim Demaille <akim@epita.fr>
18318
18319 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
18320 * src/reader.c (symbol_list): `guard' and `guard_line' are new
18321 members.
18322 (symbol_list_new): Adjust.
18323 (copy_action): action_line is the first line, not the last.
18324 (copy_guard): Just as for actions, store the `action' only, not
18325 the switch/case/break flesh.
18326 Don't parse the user action that might follow the guard, let...
18327 (readgram): do it, i.e., now, there can be an action after a
18328 guard.
18329 In other words the guard is just explicitly optional.
18330 (packgram): Adjust.
18331 * src/output.c (guards_output): New.
18332 (output_parser): Call it when needed.
18333 (output): Also free the guard and attrs obstacks.
18334 * src/files.c, src/files.h (obstack_save): Remove.
18335 (output_files): Remove.
18336 As a result, if one needs the former `.act' file, using an
18337 appropriate skeleton which requires actions and guards is now
18338 required.
18339 * src/main.c (main): Adjust.
18340 * tests/semantic.at: New.
18341 * tests/regression.at: Use `input.y' as input file name.
18342 Avoid 8+3 problems by requiring input.c when the test needs the
18343 parser.
18344
d945f5cd
AD
183452001-12-27 Akim Demaille <akim@epita.fr>
18346
18347 * src/reader.c (symbol_list_new): Be sure to initialize all the
18348 fields.
18349
d200e455
AD
183502001-12-27 Akim Demaille <akim@epita.fr>
18351
18352 All the hacks using a final pseudo state are now useless.
18353
18354 * src/LR0.c (set_state_table): state_table holds exactly nstates.
18355 * src/lalr.c (nLA): New.
18356 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
18357 instead of lookaheadsp from the pseudo state (nstate + 1).
18358
f9507c28
AD
183592001-12-27 Akim Demaille <akim@epita.fr>
18360
18361 * src/output.c (action_row, token_actions): Use a state_t instead
18362 of a integer, and nlookaheads instead of the following state's
18363 lookaheadsp.
18364
065fbd27
AD
183652001-12-27 Akim Demaille <akim@epita.fr>
18366
18367 * src/conflicts.c (log_resolution, flush_shift)
18368 (resolve_sr_conflict, set_conflicts, solve_conflicts)
18369 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
18370 (conflicts_print, print_reductions): Use a state_t instead of an
18371 integer when referring to a state.
18372 As much as possible, depend upon nlookaheads, instead of the
18373 `lookaheadsp' member of the following state (since lookaheads of
18374 successive states are successive, the difference between state n + 1
18375 and n served as the number of lookaheads for state n).
18376 * src/lalr.c (add_lookback_edge): Likewise.
18377 * src/print.c (print_core, print_actions, print_state)
18378 (print_results): Likewise.
18379 * src/print_graph.c (print_core, print_actions, print_state)
18380 (print_graph): Likewise.
18381 * src/conflicts.h: Adjust.
18382
1b177bd7
AD
183832001-12-27 Akim Demaille <akim@epita.fr>
18384
18385 * src/bison.hairy: Formatting/comment changes.
18386 ANSIfy.
18387 Remove `register' indications.
18388 Add plenty of `static'.
18389
7742ddeb
AD
183902001-12-27 Akim Demaille <akim@epita.fr>
18391
18392 * src/output.c (prepare): Drop the muscle `ntbase' which
18393 duplicates ntokens.
18394 * src/bison.simple: Formatting/comment changes.
18395 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
18396 is an undocumented synonym.
18397
1fa14068
AD
183982001-12-22 Akim Demaille <akim@epita.fr>
18399
18400 * src/output.c (output_table_data): Change the prototype to use
18401 `int' for array ranges: some invocations do pass an int, not a
18402 short.
18403 Reported by Wayne Green.
18404
b9752825
AD
184052001-12-22 Akim Demaille <akim@epita.fr>
18406
18407 Some actions of web2c.y are improperly triggered.
18408 Reported by Mike Castle.
18409
18410 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
18411 * tests/regression.at (Web2c): Rename as...
18412 (Web2c Report): this.
18413 (Web2c Actions): New.
18414
776209d6
AD
184152001-12-22 Akim Demaille <akim@epita.fr>
18416
18417 Reductions in web2c.y are improperly reported.
18418 Reported by Mike Castle.
18419
18420 * src/conflicts.c (print_reductions): Fix.
18421 * tests/regression.at (Web2c): New.
18422
275fc3ad
AD
184232001-12-18 Akim Demaille <akim@epita.fr>
18424
18425 Some host fail on `assert (!"foo")', which expands to
18426 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
18427 Reported by Nelson Beebee.
18428
18429 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
18430 `#define it_succeeded 0' and `assert (it_succeeded)'.
18431
897668ee
MA
184322001-12-17 Marc Autret <autret_m@epita.fr>
18433
18434 * src/bison.simple: Don't hard code the skeleton line and filename.
18435 * src/output.c (output_parser): Rename 'line' as 'output_line'.
18436 New line counter 'skeleton_line' (skeleton-line muscle).
18437
ab3399e0
PE
184382001-12-17 Paul Eggert <eggert@twinsun.com>
18439
18440 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
18441 YYDEBUG must be defined to a nonzero value.
18442
18443 * src/bison.simple (yytname): Do not assume that the user defines
18444 YYDEBUG to a properly parenthesized expression.
18445
3877f72b
AD
184462001-12-17 Akim Demaille <akim@epita.fr>
18447
18448 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
18449 nlookaheads is a new member.
18450 Adjust all users.
18451 * src/lalr.h (nlookaheads): Remove this orphan declaration.
18452 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
18453 state.
776209d6 18454
331dbc1b
AD
184552001-12-17 Akim Demaille <akim@epita.fr>
18456
18457 * src/files.h, src/files.c (open_files, close_files): Remove.
18458 * src/main.c (main): Don't open/close files, nor invoke lex_free,
18459 let...
18460 * src/reader.c (reader): Do it.
776209d6 18461
be750e4c
AD
184622001-12-17 Akim Demaille <akim@epita.fr>
18463
18464 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 18465
709ae8c6
AD
184662001-12-17 Akim Demaille <akim@epita.fr>
18467
18468 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
18469 (flush_reduce): New.
18470 (resolve_sr_conflict): Adjust.
776209d6 18471
f87685c3
AD
184722001-12-17 Akim Demaille <akim@epita.fr>
18473
18474 * src/output.c (output_obstack): Be static and rename as...
18475 (format_obstack): this, to avoid any confusion with files.c's
18476 output_obstack.
18477 * src/reader.h (muscle_obstack): Move to...
18478 * src/output.h: here, since it's defined in output.c.
18479
837491d8
AD
184802001-12-17 Akim Demaille <akim@epita.fr>
18481
18482 * src/output.c (action_row, save_column, default_goto)
18483 (sort_actions, matching_state, pack_vector): Better variable
18484 locality.
18485
796d61fb
AD
184862001-12-17 Akim Demaille <akim@epita.fr>
18487
18488 * src/output.c: Various formatting changes.
776209d6 18489
64d15509
AD
184902001-12-17 Akim Demaille <akim@epita.fr>
18491
18492 * src/files.c (output_files): Free the output_obstack.
18493 * src/main.c (main): Call print and print_graph conditionally.
18494 * src/print.c (print): Work unconditionally.
18495 * src/print_graph.c (print_graph): Work unconditionally.
18496 * src/conflicts.c (log_resolution): Output only if verbose_flag.
18497
fbc8ecb7
MA
184982001-12-16 Marc Autret <autret_m@epita.fr>
18499
18500 * src/output.c (actions_output): Fix. When we use %no-lines,
18501 there is one less line per action.
18502
f0440388
MA
185032001-12-16 Marc Autret <autret_m@epita.fr>
18504
18505 * src/bison.simple: Remove a useless #line directive.
18506 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
18507 * src/output.c (get_lines_number): New.
776209d6 18508 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
18509 output muscles.
18510 Fix line numbering.
18511 (actions_output): Computes the number of lines taken by actions.
18512 (output_master_parser): Insert new skeleton which is the name of
18513 the output parser file name.
18514
a79986b8
MA
185152001-12-15 Marc Autret <autret_m@epita.fr>
18516
18517 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
18518
4ec8e00f
MA
185192001-12-15 Marc Autret <autret_m@epita.fr>
18520
18521 * src/output.c (output_gram): Keep track of the hairy one.
18522
1a4648ff
AD
185232001-12-15 Akim Demaille <akim@epita.fr>
18524
18525 Make `make distcheck' work.
18526
18527 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
18528 system.h which uses libgettext.h.
18529
9c2c67e6
AD
185302001-12-15 Akim Demaille <akim@epita.fr>
18531
18532 * src/nullable.c (set_nullable): Useless rules must be skipped,
18533 otherwise, since we range over their symbols, we might look at a
18534 nonterminal which no longer ``exists'', i.e., it is not counted in
18535 `nvars', hence we overflow our arrays.
18536
93ede233
AD
185372001-12-15 Akim Demaille <akim@epita.fr>
18538
18539 The header can also be produced directly, without any obstack!
18540 Yahoo!
18541
18542 * src/files.c, src/files.h (defines_obstack): Remove.
18543 (compute_header_macro): Global.
18544 (defines_obstack_save): Remove.
18545 * src/reader.c (parse_union_decl): No longer output to
18546 defines_obstack: its content can be found in the `stype' muscle
18547 anyway.
18548 (output_token_translations): Merge into...
18549 (symbols_output): this.
18550 Rename as...
18551 (symbols_save): this.
18552 (reader): Adjust.
18553 * src/output.c (header_output): New.
18554 (output): Call it.
18555
2666f928
AD
185562001-12-15 Akim Demaille <akim@epita.fr>
18557
18558 * src/reader.c (parse_union_decl): Instead of handling two obstack
18559 simultaneously, use one to define the `stype' muscle, and use the
18560 value of the latter to fill defines_obstack.
18561 (copy_comment): Remove.
18562 (copy_comment2): Work for a single obstack.
18563 Rename as...
18564 (copy_comment): this.
18565
428046f8
AD
185662001-12-15 Akim Demaille <akim@epita.fr>
18567
18568 * src/lex.c, src/lex.h (xgetc): No longer static.
18569 * src/reader.c (parse_union_decl): Revamp.
18570
ea52d706
AD
185712001-12-15 Akim Demaille <akim@epita.fr>
18572
18573 Still making progress in separating Bison into (i) input, (ii)
18574 process, (iii) output: now we can directly output the parser file
18575 without using table_obstack at all.
18576
18577 * src/files.c, src/files.h (table_obstack): Bye bye.
18578 (parser_file_name): New.
18579 * src/files.c (compute_output_file_names): Compute it.
18580 * src/output.c (actions_output, output_parser)
18581 (output_master_parser): To a file instead of an obstack.
18582
3f96f4dc
AD
185832001-12-15 Akim Demaille <akim@epita.fr>
18584
18585 Attach actions to rules, instead of pre-outputting them to
18586 actions_obstack.
18587
18588 * src/gram.h (rule_t): action and action_line are new members.
18589 * src/reader.c (symbol_list): Likewise.
18590 (copy_action): Save the actions within the rule.
18591 (packgram): Save them in rule_table.
18592 * src/output.c (actions_output): New.
18593 (output_parser): Use it on `%%actions'.
18594 (output_rule_data): Don't free rule_table.
18595 (output): Do it.
18596 (prepare): Don't save the `action' muscle.
18597 * src/bison.simple: s/%%action/%%actions/.
18598
51576fb3
AD
185992001-12-15 Akim Demaille <akim@epita.fr>
18600
18601 * src/reader.c (copy_action): When --yacc, don't append a `;'
18602 to the user action: let it fail if lacking.
dee049eb 18603 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 18604
2648a72d
AD
186052001-12-14 Akim Demaille <akim@epita.fr>
18606
18607 * src/lex.c (literalchar): Simply return the char you decoded, non
18608 longer mess around with obstacks and int pointers.
18609 Adjust all callers.
18610
92790e5b
AD
186112001-12-14 Akim Demaille <akim@epita.fr>
18612
18613 * src/lex.c (literalchar): Don't escape the special characters,
18614 just decode them, and keep them as char (before, eol was output as
18615 the 2 char string `\n' etc.).
18616 * src/output.c (output_rule_data): Use quotearg to output the
18617 token strings.
18618
927c1557
PE
186192001-12-13 Paul Eggert <eggert@twinsun.com>
18620
18621 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
18622 Do not infringe on the global user namespace when using C++.
18623 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
18624 All uses of `fprintf' and `stderr' changed.
18625
18626 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
18627
ed8e1f68
AD
186282001-12-13 Akim Demaille <akim@epita.fr>
18629
18630 The computation of nullable is broken: it doesn't handle empty
18631 RHS's properly.
18632
18633 * tests/torture.at (GNU AWK Grammar): New.
18634 * tests/sets.at (Nullable): New.
18635 * src/nullable.c (set_nullable): Instead of blindly looping over
18636 `ritems', loop over the rules, and then over their rhs's.
18637
18638 Work around Autotest bugs.
18639
18640 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
18641 frame, because Autotest understand lines starting with a `+' as
18642 traces from the shell. Then, they are not processed properly.
18643 Admittedly an Autotest bug, but we don't have time to wait for
18644 Autotest to catch up.
18645 * tests/regression.at (Broken Closure): Adjust to the new table
18646 frames.
18647 Move to...
18648 * tests/sets.at: here.
18649
cb581495
AD
186502001-12-13 Akim Demaille <akim@epita.fr>
18651
18652 * src/closure.c (closure): Use nrules instead of playing tricks
18653 with BITS_PER_WORD.
18654
2e729273
AD
186552001-12-13 Akim Demaille <akim@epita.fr>
18656
18657 * src/print.c (print_actions): Output the handling of `$' as the
18658 traces do: shifting the token EOF. Before EOF was treated as a
18659 nonterminal.
18660 * tests/regression.at: Adjust some tests.
18661 * src/print_graph.c (print_core): Complete the set of items via
18662 closure. The next-to-final and final states are still unsatisfying,
18663 but that's to be addressed elsewhere.
18664 No longer output the rule numbers, but do output the state number.
18665 A single loop for the shifts + gotos is enough, but picked a
18666 distinct color for each.
18667 (print_graph): Initialize and finalize closure.
18668
107f7dfb
AD
186692001-12-13 Akim Demaille <akim@epita.fr>
18670
18671 * src/reader.c (readgram): Remove dead code, an strip useless
18672 braces.
18673 (get_type): Remove, unused.
18674
9b53a24f
AD
186752001-12-12 Akim Demaille <akim@epita.fr>
18676
18677 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
18678 on that of lib/error.c.
18679
dbfb6dcd
AD
186802001-12-12 Akim Demaille <akim@epita.fr>
18681
18682 Some hosts don't like `/' in includes.
18683
18684 * src/system.h: Include libgettext.h without qualifying the path.
18685 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
18686 $(top_srcdir).
18687
c25fb648
MA
186882001-12-11 Marc Autret <autret_m@epita.fr>
18689
18690 * src/output.c (output_parser): Remove useless muscle.
18691
710ddc4f
MA
186922001-12-11 Marc Autret <autret_m@epita.fr>
18693
18694 * src/bison.simple: Remove #line just before %%epilogue. It
18695 is now handled in ...
18696 * src/reader.c (read_additionnal_code): Add the output of a
18697 #line for the epilogue.
18698
e83d80b8
MA
186992001-12-10 Marc Autret <autret_m@epita.fr>
18700
927c1557 18701 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
18702 replace precedent remove.
18703 * src/bison.simple: Remove #line before %%prologue because
18704 %%input-line is wrong at this time.
18705
971d5158
MA
187062001-12-10 Marc Autret <autret_m@epita.fr>
18707
18708 * src/reader.c (symbols_output): Clean up.
927c1557 18709 * src/output.c (output_gram, output): Clean up.
971d5158 18710
5edafffd
AD
187112001-12-10 Akim Demaille <akim@epita.fr>
18712
18713 * src/lalr.c (initialize_lookaheads): New. Extracted from...
18714 * src/LR0.c (set_state_table): here.
18715 * src/lalr.c (lalr): Call it.
18716
0279f8e9
AD
187172001-12-10 Akim Demaille <akim@epita.fr>
18718
18719 * src/state.h (shifts): Remove the `number' member: shifts are
18720 attached to state, hence no longer need to be labelled with a
18721 state number.
18722
190c4f5f
AD
187232001-12-10 Akim Demaille <akim@epita.fr>
18724
18725 Now that states have a complete set of members, the linked list of
18726 shifts is useless: just fill directly the state's shifts member.
18727
18728 * src/state.h (shifts): Remove the `next' member.
18729 * src/LR0.c (first_state, last_state): Remove.
18730 Adjust the callers.
18731 (augment_automaton): Don't look for the shifts that must be added
18732 a shift on EOF: it is those of the state we looked for! But now,
18733 since shifts are attached, it is no longer needed to looking
18734 merely by its id: its number.
18735
2a73b93d
AD
187362001-12-10 Akim Demaille <akim@epita.fr>
18737
18738 * src/LR0.c (augment_automaton): Better variable locality.
18739 Remove an impossible branch: if there is a state corresponding to
18740 the start symbol being shifted, then there is shift for the start
18741 symbol from the initial state.
18742
74392f6a
AD
187432001-12-10 Akim Demaille <akim@epita.fr>
18744
18745 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
18746 only when appropriate: when insert_start_shifting_state' is not
18747 invoked.
18748 * tests/regression.at (Rule Line Numbers): Adjust.
18749
37c82725
AD
187502001-12-10 Akim Demaille <akim@epita.fr>
18751
18752 * src/LR0.c (augment_automaton): Now that all states have shifts,
18753 merge the two cases addition shifts to the initial state.
18754
6a164e0c
AD
187552001-12-10 Akim Demaille <akim@epita.fr>
18756
18757 * src/lalr.c (set_state_table): Move to...
18758 * src/LR0.c: here.
18759 * src/lalr.c (lalr): Don't call it...
18760 * src/LR0.c (generate_states): do it.
18761 * src/LR0.h (first_state): Remove, only the table is used.
18762
7215de24
AD
187632001-12-10 Akim Demaille <akim@epita.fr>
18764
18765 * src/LR0.h (first_shift, first_reduction): Remove.
18766 * src/lalr.c: Don't use first_shift: find shifts through the
18767 states.
18768
80e25d4d
AD
187692001-12-10 Akim Demaille <akim@epita.fr>
18770
18771 * src/LR0.c: Attach shifts to states as soon as they are
18772 computed.
18773 * src/lalr.c (set_state_table): Instead of assigning shifts to
18774 state, just assert that the mapping was properly done.
18775
0ab3728b
AD
187762001-12-10 Akim Demaille <akim@epita.fr>
18777
18778 * src/LR0.c (insert_start_shift): Rename as...
18779 (insert_start_shifting_state): this.
18780 (insert_eof_shifting_state, insert_accepting_state): New.
18781 (augment_automaton): Adjust.
18782 Better locality of the variables.
18783 When looking if the start_symbol is shifted from the initial
18784 state, using `while (... symbol != start_symbol ...)' sounds
18785 better than `while (... symbol < start_symbol ...)': If fail
18786 to see how the order between symbols could be relevant!
18787
78af9bbc
AD
187882001-12-10 Akim Demaille <akim@epita.fr>
18789
18790 * src/getargs.h: Don't declare `spec_name_prefix' and
18791 `spec_file_prefix', declared by src/files.h.
18792 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
18793 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
18794 * src/output.c (prepare): Adjust.
18795 * src/reader.c (symbols_output): Likewise.
18796 * src/vmsgetargs.c: Vaguely adjust, but who cares?
18797
bdef2a41
AD
187982001-12-10 Akim Demaille <akim@epita.fr>
18799
18800 * src/muscle_tab.c (muscle_init): NULL is a better default than
18801 `"0"'.
18802
3735969c
AD
188032001-12-10 Akim Demaille <akim@epita.fr>
18804
18805 * src/reader.c (reader): Calling symbols_output once is enough.
18806
49701457
AD
188072001-12-10 Akim Demaille <akim@epita.fr>
18808
18809 Now that states have a complete set of members, the linked list of
18810 reductions is useless: just fill directly the state's reductions
18811 member.
18812
18813 * src/state.h (struct reductions): Remove member `number' and
18814 `next'.
18815 * src/LR0.c (first_reduction, last_reduction): Remove.
18816 (save_reductions): Don't link the new reductions, store them in
18817 this_state.
18818 * src/lalr.c (set_state_table): No need to attach reductions to
18819 states, it's already done.
18820 * src/output.c (output_actions): No longer free the shifts, then
18821 the reductions, then the states: free all the states and their
18822 members.
18823
0edad749
AD
188242001-12-10 Akim Demaille <akim@epita.fr>
18825
18826 * src/options.c (OPTN, DRTV, BOTH): New.
18827 (option_table): Use them.
18828
0edad749
AD
18829 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
18830 the job of system.h.
18831 * src/options.c: Don't include stdio.h and xalloc.h for the same
18832 reasons.
18833
5449dd0f
AD
188342001-12-10 Akim Demaille <akim@epita.fr>
18835
18836 * src/output.c (output, prepare): Make sure the values of the
18837 muscles `action' and `prologue' are 0-terminated.
18838
a870c567
AD
188392001-12-10 Akim Demaille <akim@epita.fr>
18840
18841 Clean up GCC warnings.
18842
18843 * src/reader.c (copy_action): `buf' is not used.
18844 (parse_skel_decl): Be static.
18845 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
18846 * src/options.h (create_long_option_table): Have a real prototype.
18847 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
18848 (hash_delete_at): Return const void *.
18849 Adjust casts to preserve the const.
18850
80df8768
AD
188512001-12-10 Akim Demaille <akim@epita.fr>
18852
18853 * configure.in: Require 2.52g.
18854 M4 is not needed, but AUTOM4TE is.
18855 * m4/m4.m4: Remove.
18856 * tests/Makefile.am: Adjust.
18857
f693ad14
AD
188582001-12-10 Akim Demaille <akim@epita.fr>
18859
18860 One structure for states is enough, even though theoretically
18861 there are LR(0) states and LALR(1) states.
18862
18863 * src/lalr.h (state_t): Remove.
18864 (state_table): Be state_t **, not state_t *.
18865 * src/state.h (core, CORE_ALLOC): Rename as...
18866 (state_t, STATE_ALLOC): this.
18867 Add the LALR(1) members: shifts, reductions, errs.
18868 * src/LR0.c (state_table): Rename as...
18869 (state_hash): this, to avoid name clashes with the global
18870 `state_table'.
18871 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
18872 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
18873
74ffbcb6
AD
188742001-12-10 Akim Demaille <akim@epita.fr>
18875
18876 Bison dumps core on bash.y.
18877 Reported by Pascal Bart.
18878
18879 * src/warshall.c (bitmatrix_print): New.
18880 (TC): Use it.
ba0fe3c7 18881 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
74ffbcb6
AD
18882 j must be the outer loop.
18883 * tests/regression.at (Broken Closure): New.
18884
07708e19
AD
188852001-12-05 Akim Demaille <akim@epita.fr>
18886
18887 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
18888 its argument.
ba1ecc07 18889 Reported by Peter Hamorsky.
07708e19 18890
92b16366
AD
188912001-12-05 Akim Demaille <akim@epita.fr>
18892
18893 * src/conflicts.c (err_table): Remove.
18894 (resolve_sr_conflict): Adjust.
18895 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
18896 Rename as...
18897 (state_t.reductions, state_t.shifts): this.
18898
076ab033
AD
188992001-12-05 Akim Demaille <akim@epita.fr>
18900
18901 * src/reduce.c (reduce_grammar_tables): No longer disable the
18902 removal of useless rules via CPP but via `if (0)', so that the
18903 compiler still check the code is valid.
18904 For instance, it should have noticed `rline' no longer exists: use
18905 the `line' member of rule_t.
18906 * src/gram.c (dummy, rline): Remove, unused.
18907
3843c413
AD
189082001-12-05 Akim Demaille <akim@epita.fr>
18909
18910 * src/output.c (pack_vector): Use assert, not berror.
18911 * src/main.c (berror): Remove, unused.
18912
43168960
AD
189132001-12-05 Akim Demaille <akim@epita.fr>
18914
18915 New experimental feature: if --verbose --trace output all the
18916 items of a state, not only its kernel.
18917
18918 * src/print.c (print_core): If `trace_flag', then invoke closure
18919 before outputting the items of the state (print_core is no longer
18920 a correct name them).
18921 (print_results): Invoke new_closure/free_closure if needed.
18922
b2872512
AD
189232001-12-05 Akim Demaille <akim@epita.fr>
18924
18925 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
18926 * src/closure.c, src/closure.h (itemsetsize): Rename as...
18927 (nitemset): for consistency with the rest of the project.
18928
23cbcc6c
AD
189292001-12-05 Akim Demaille <akim@epita.fr>
18930
18931 * src/closure.c (print_closure): Improve.
18932 (closure): Use it for printing input and output.
18933
03ec521c
AD
189342001-12-05 Akim Demaille <akim@epita.fr>
18935
18936 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
18937 indexed by nonterminals.
18938
3a7456dd
AD
189392001-12-05 Akim Demaille <akim@epita.fr>
18940
18941 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
18942 what it was!).
18943 * src/warshall.h: Remove accidental duplication of the content.
18944
1cbcf2e7
AD
189452001-12-05 Akim Demaille <akim@epita.fr>
18946
18947 * src/closure.c (set_fderives): De-obfuscate.
18948
84182270
AD
189492001-12-05 Akim Demaille <akim@epita.fr>
18950
18951 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
18952
3f6f053c
AD
189532001-12-05 Akim Demaille <akim@epita.fr>
18954
18955 * src/closure.c (set_firsts): De-obfuscate.
18956
7a5350ba
AD
189572001-12-05 Akim Demaille <akim@epita.fr>
18958
18959 * src/output.c (action_row): De-obfuscate
18960 using the good o' techniques: arrays not pointers, variable
18961 locality, BITISSET, RESETBIT etc.
18962
d954473d
AD
189632001-12-05 Akim Demaille <akim@epita.fr>
18964
18965 Pessimize the code to simplify it: from now on, all the states
18966 have a valid SHIFTS, which NSHIFTS is possibly 0.
18967
18968 * src/LR0.c (shifts_new): Be global and move to..
18969 * src/state.c, src/state.h: here.
18970 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
18971 * src/print_graph: Adjust.
18972
9839bbe5
AD
189732001-12-05 Akim Demaille <akim@epita.fr>
18974
18975 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
18976 * src/conflicts.c: Use it.
18977 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
18978 incorrectly ``simplified''.
18979
9f136c07
AD
189802001-12-05 Akim Demaille <akim@epita.fr>
18981
18982 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
18983 using the good o' techniques: arrays not pointers, variable
18984 locality, BITISSET, RESETBIT etc.
18985
b608206e
AD
189862001-12-05 Akim Demaille <akim@epita.fr>
18987
18988 * src/state.h (SHIFT_SYMBOL): New.
18989 * src/conflicts.c: Use it to deobfuscate.
18990
52afa962
AD
189912001-12-05 Akim Demaille <akim@epita.fr>
18992
18993 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
18994 (print_reductions): De-obfuscate using the good o' techniques:
18995 arrays not pointers, variable locality, BITISSET.
18996
e74dc321
AD
189972001-12-05 Akim Demaille <akim@epita.fr>
18998
18999 * src/conflicts.c (print_reductions): Arrays, not pointers.
19000 Use BITISSET.
19001
768fca83
AD
190022001-12-05 Akim Demaille <akim@epita.fr>
19003
19004 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19005
a17e599f
AD
190062001-12-05 Akim Demaille <akim@epita.fr>
19007
19008 * src/conflicts.c (print_reductions): Improve variable locality.
19009
a04bc341
AD
190102001-12-05 Akim Demaille <akim@epita.fr>
19011
19012 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19013
c8ea038e
AD
190142001-12-05 Akim Demaille <akim@epita.fr>
19015
19016 * src/conflicts.c (print_reductions): Improve variable locality.
19017
aa2aab3c
AD
190182001-12-05 Akim Demaille <akim@epita.fr>
19019
19020 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
19021 * src/lalr.c: Use them.
19022
b178c8cc
AD
190232001-12-05 Akim Demaille <akim@epita.fr>
19024
19025 * src/LR0.c (augment_automaton): Formatting changes.
19026 Better variable locality.
19027
f67d13aa
AD
190282001-12-05 Akim Demaille <akim@epita.fr>
19029
19030 * src/lalr.c (matrix_print): New.
19031 (transpose): Use it.
19032 Use arrays instead of pointers.
19033
c2713865
AD
190342001-12-05 Akim Demaille <akim@epita.fr>
19035
19036 * src/lalr.c (maxrhs): Move to...
19037 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
19038 * src/lalr.c (build_relations): Adjust.
19039
9887c18a
AD
190402001-12-05 Akim Demaille <akim@epita.fr>
19041
19042 * src/lalr.c (transpose): Free the memory allocated to the
19043 argument, as it is replaced by the results by the unique caller.
19044 (build_relations): Merely invoke transpose: it handles the memory
19045 deallocation.
19046 Improve variable locality.
19047 Avoid variables used as mere abbreviations.
19048 (compute_lookaheads): Use arrays instead of pointers.
19049
4d4f699c
AD
190502001-12-05 Akim Demaille <akim@epita.fr>
19051
19052 * src/lalr.c (initialize_F): Improve variable locality.
19053 Avoid variables used as mere abbreviations.
19054
80a69750
AD
190552001-12-05 Akim Demaille <akim@epita.fr>
19056
19057 * src/derives.c (print_derives): Display the ruleno.
19058 * src/lalr.c (initialize_F, transpose): Better variable locality
19059 to improve readability.
19060 Avoid variables used as mere abbreviations.
19061
fe961097
AD
190622001-12-05 Akim Demaille <akim@epita.fr>
19063
19064 * src/lalr.c (traverse): Use arrays instead of pointers.
19065
e3e4e814
AD
190662001-12-05 Akim Demaille <akim@epita.fr>
19067
19068 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
19069 the handling of squeue.
19070 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
19071
630e182b
AD
190722001-12-05 Akim Demaille <akim@epita.fr>
19073
19074 Because useless nonterminals are now kept alive (instead of being
19075 `destroyed'), we now sometimes examine them, and store information
19076 related to them. Hence we need to know their number, and adjust
19077 memory allocations.
19078
19079 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
19080 static.
19081 * src/LR0.c (allocate_itemsets): The memory allocated to
19082 `symbol_count' was used for two different purpose: once to count
19083 the number of occurrences of each symbol, and later reassigned to
19084 `shift_symbol', containing the symbol that can be shifted from a
19085 given state.
19086 Deobfuscate, i.e., allocate, use and free `symbol_count' here
19087 only, and...
19088 (new_itemsets): Allocate `shift_symbol' here.
19089 (allocate_itemsets): symbol_count includes useless nonterminals.
19090 Make room for them.
19091 (free_storage): Use `free', not `XFREE', for pointers that cannot
19092 be null.
19093
81b51460
AD
190942001-12-05 Akim Demaille <akim@epita.fr>
19095
19096 * src/nullable.c (set_nullable): Deobfuscate the handling of
19097 ritem.
19098 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
19099
3067fbef
AD
191002001-12-05 Akim Demaille <akim@epita.fr>
19101
19102 * src/gram.c, src/gram.h (ritem_print): New.
19103 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
19104 (This useless function was defined only to work around VMS linkers
19105 that can't handle compilation units with variables only).
19106 * src/reduce.c (dump_grammar): Use it to trace the construction of
19107 ritem.
19108
c2bea5f9
PE
191092001-12-04 Paul Eggert <eggert@twinsun.com>
19110
7d27c823
PE
19111 * src/bison.simple (union yyalloc): Change member names
19112 to be the same as the stack names.
19113 (yyparse): yyptr is now union yyalloc *, not char *.
19114 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
19115 and may generate better code on some machines.
c2bea5f9
PE
19116 (yystpcpy): Use prototype if __STDC__ is defined, not just
19117 if __cplusplus is defined.
35687a9d 19118
2c8a9dfa
AD
191192001-11-30 Akim Demaille <akim@epita.fr>
19120
19121 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
19122 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
19123 Gettext doesn't compile cleanly, and dies with -Werror.
19124 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
19125 Include WARNING_CFLAGS here.
19126 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
19127 before being defined.
19128
f4e421e6
AD
191292001-11-27 Paul Eggert <eggert@twinsun.com>
19130
19131 * lib/quotearg.h (quotearg_n, quotearg_n_style):
19132 First arg is int, not unsigned.
19133 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
19134 (SIZE_MAX, UINT_MAX): New macros.
19135 (quotearg_n_options): Abort if N is negative.
19136 Avoid overflow check on hosts where size_t is 64 bits and int
19137 is 32 bits, as overflow is impossible there.
19138 Fix off-by-one typo that caused unnecessary reallocation.
19139
7093d0f5
AD
191402001-11-29 Paul Eggert <eggert@twinsun.com>
19141
19142 Name space cleanup in generated parser.
19143
19144 * doc/bison.texinfo (Bison Parser): Discuss system headers
19145 and their effect on the user name space.
19146
19147 * src/bison.simple:
19148 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
19149 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
19150 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
19151
19152 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
19153 on user names when possible.
19154
19155 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
19156 Simplify test for whather <alloca.h> exists.
19157
19158 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
19159
19160 (<stdio.h>): Include if YYDEBUG.
19161
19162 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
19163 ! defined (yyoverflow) && ! defined (yymemcpy).
19164
19165 (yymemcpy, yyparse): Rename local variables as needed so that
19166 they all begin with 'yy'.
19167
19168 (yystrlen, yystpcpy): New functions.
19169
19170 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
19171 All uses changed.
19172
19173 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
19174 instead of relying on string.h functions. Use YYSTACK_ALLOC
19175 and YYSTACK_FREE instead of malloc and free.
19176
fd51e5ff
AD
191772001-11-30 Akim Demaille <akim@epita.fr>
19178
19179 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
19180 before their first uses.
19181 (YYBISON, YYPURE): Move to the top of the output.
19182
7d13ff5f
AD
191832001-11-30 Akim Demaille <akim@epita.fr>
19184
19185 * tests/reduce.at (Useless Nonterminals): Fix.
19186
892a3995
AD
191872001-11-30 Akim Demaille <akim@epita.fr>
19188
19189 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
19190 if body instead of `;' to pacify GCC's warnings.
19191
68f1e3ed
AD
191922001-11-30 Akim Demaille <akim@epita.fr>
19193
19194 Instead of mapping the LHS of unused rules to -1, keep the LHS
19195 valid, but flag the rules as invalid.
19196
19197 * src/gram.h (rule_t): `useful' is a new member.
19198 * src/print.c (print_grammar): Adjust.
19199 * src/derives.c (set_derives): Likewise.
19200 * src/reader.c (packgram, reduce_output): Likewise.
19201 * src/reduce.c (reduce_grammar_tables): Likewise.
19202 * tests/reduce.at (Underivable Rules, Useless Rules): New.
19203
d2d1b42b
AD
192042001-11-30 Akim Demaille <akim@epita.fr>
19205
19206 * src/reduce.c (reduce_output): Formatting changes.
19207 * src/print.c (print_results, print_grammar): Likewise.
19208 * tests/regression.at (Rule Line Numbers)
19209 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
19210
760b53a8
AD
192112001-11-30 Akim Demaille <akim@epita.fr>
19212
19213 * src/reduce.c (nonterminals_reduce): Instead of throwing away
19214 useless nonterminals, move them at the end of the symbol arrays.
19215 (reduce_output): Adjust.
19216 * tests/reduce.at (Useless Nonterminals): Adjust.
19217
00238958
AD
192182001-11-30 Akim Demaille <akim@epita.fr>
19219
19220 * src/reduce.c: Various comment/formatting changes.
19221 (nonterminals_reduce): New, extracted from...
19222 (reduce_grammar_tables): here.
19223 (reduce_grammar): Call nonterminals_reduce.
19224
396452de
PE
192252001-11-29 Paul Eggert <eggert@twinsun.com>
19226
19227 * src/bison.simple (YYSTACK_REALLOC): Remove.
19228 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
19229 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
19230 New macros.
19231 (union yyalloc): New type.
19232 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
19233 an arbitrary restriction on hosts where size_t is wider than int.
19234
19235 (yyparse): Don't dump core if alloca or malloc fails; instead, report
19236 a parser stack overflow. Allocate just one block of memory for all
19237 three stacks, instead of allocating three blocks; this typically is
19238 faster and reduces fragmentation.
19239
19240 Do not limit the number of items in the stack to a value that fits
19241 in 'int', as this is an arbitrary limit on hosts with 64-bit
19242 size_t and 32-bit int.
19243
147e184c
MA
192442001-11-29 Marc Autret <autret_m@epita.fr>
19245
19246 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
19247 of defining YYERROR_VERBOSE.
19248 [AT_DATA]: $4 is now out of C declarations in the prologue.
19249
426cf563
MA
192502001-11-28 Marc Autret <autret_m@epita.fr>
19251
19252 * src/reader.c (parse_dquoted_param): New.
19253 (parse_skel_decl): Use it.
19254 * src/lex.h: Add its prototype.
19255 * src/lex.c (literalchar): Become not static.
19256
c7925b99
MA
192572001-11-28 Marc Autret <autret_m@epita.fr>
19258
19259 * src/output.h: And put its extern declaration here.
19260 * src/output.c (error_verbose): Define here.
19261 (prepare): Echo name modification.
19262 * src/getargs.h: Clean its extern declaration.
19263 * src/getargs.c (error_verbose_flag): Remove.
19264 (getargs): Remove case 'e'.
19265 * src/options.c (option_table): 'error-verbose' is now seen as simple
19266 percent option.
19267 Include output.h.
19268
19269 * src/reader.c (read_declarations): Remove case tok_include.
19270 (parse_include_decl): Remove.
19271 * src/lex.h (token_t): Remove tok_include.
19272 * src/options.c (option_table): 'include' is now a simple command line
19273 option.
19274
5b5d1929
MA
192752001-11-28 Marc Autret <autret_m@epita.fr>
19276
19277 * src/bison.simple: Adjust muscle names.
19278 * src/muscle_tab.c (muscle_init): Also rename the muscles.
19279 * src/output.c (prepare): s/_/-/ for the muscles names.
19280 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
19281
8850be4b
MA
192822001-11-28 Marc Autret <autret_m@epita.fr>
19283
19284 * src/bison.simple: Fix debug.
19285 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
19286
4a38e613
AD
192872001-11-28 Akim Demaille <akim@epita.fr>
19288
19289 * src/LR0.c (shifts_new): New.
19290 (save_shifts, insert_start_shift, augment_automaton): Use it.
19291
4b35e1c1
AD
192922001-11-28 Akim Demaille <akim@epita.fr>
19293
19294 * src/closure.c (closure): `b' and `ruleno' denote the same value:
19295 keep ruleno only.
19296
d2b04478
AD
192972001-11-28 Akim Demaille <akim@epita.fr>
19298
19299 * src/closure.c (closure): Instead of looping over word in array
19300 then bits in words, loop over bits in array.
19301
2c4c30aa
AD
193022001-11-28 Akim Demaille <akim@epita.fr>
19303
19304 * src/closure.c (closure): No longer optimize the special case
19305 where all the bits of `ruleset[r]' are set to 0, to make the code
19306 clearer.
19307
576890b7
AD
193082001-11-28 Akim Demaille <akim@epita.fr>
19309
19310 * src/closure.c (closure): `r' and `c' are new variables, used to
19311 de-obfuscate accesses to RULESET and CORE.
19312
cb487d7d
AD
193132001-11-28 Akim Demaille <akim@epita.fr>
19314
19315 * src/reduce.c (reduce_print): Use ngettext.
19316 (dump_grammar): Improve the trace accuracy.
19317
6013d43f
AD
193182001-11-28 Akim Demaille <akim@epita.fr>
19319
19320 * src/reduce.c (dump_grammar): Don't translate trace messages.
19321
cb4956ee
AD
193222001-11-28 Akim Demaille <akim@epita.fr>
19323
19324 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
19325 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
19326 as all tags are free'ed afterwards.
19327 From Enrico Scholz.
19328
648185ab
PE
193292001-11-27 Paul Eggert <eggert@twinsun.com>
19330
19331 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
19332 use alloca when we didn't want to, and vice versa.
19333
68254a03
MA
193342001-11-27 Marc Autret <autret_m@epita.fr>
19335
9113b58f
AD
19336 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
19337 initialization.
68254a03
MA
19338 * src/output.c (prepare): Remove its update.
19339
04d843a2
MA
193402001-11-27 Marc Autret <autret_m@epita.fr>
19341
19342 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
19343 Use %error-verbose.
19344
d2079671 193452001-11-27 Marc Autret <autret_m@epita.fr>
eeeb962b
MA
19346
19347 * src/bison.simple: Remove YYERROR_VERBOSE using.
19348 Use %%error_verbose.
19349 (yyparse): Likewise.
19350 * src/output.c (prepare): Give its final value.
19351 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
19352 * src/getargs.h: Add its extern declaration.
19353 * src/getargs.c (error_verbose_flag): New int.
19354 (getargs): Update to catch new case.
19355 * src/options.c (option_table): 'error-verbose' is a new option.
19356 (shortopts): Update.
19357
e0327bc8
AD
193582001-11-27 Akim Demaille <akim@epita.fr>
19359
19360 * src/system.h: Use intl/libgettext.h.
19361 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
19362
000f1a3c
AD
193632001-11-27 Akim Demaille <akim@epita.fr>
19364
19365 * tests/torture.at (Exploding the Stack Size with Malloc):
19366 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
19367
26cfe0be
AD
193682001-11-27 Akim Demaille <akim@epita.fr>
19369
19370 * src/files.c: Include error.h.
19371 Reported by Hans Aberg.
19372
f6bd5427
MA
193732001-11-26 Marc Autret <autret_m@epita.fr>
19374
d2079671 19375 * src/reader.c (parse_include_decl): New, not yet implemented.
f6bd5427
MA
19376 (read_declarations): Add case tok_include.
19377 * src/getargs.h (include): Add its extern definition.
19378 * src/getargs.c (include): New const char *.
19379 (getargs): Add case '-I'.
19380 * src/options.c (option_table): Add include as command line and
19381 percent option.
19382 * src/lex.h (token_t): Add tok_include.
19383
2ca209c1
AD
193842001-11-26 Akim Demaille <akim@epita.fr>
19385
19386 * src/reader.c (readgram): Make sure rules for mid-rule actions
19387 have a lineno equal to that of their host rule.
19388 Reported by Hans Aberg.
19389 * tests/regression.at (Rule Line Numbers): New.
19390
0e41b407
AD
193912001-11-26 Akim Demaille <akim@epita.fr>
19392
19393 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
19394 size_ts.
19395
193962001-11-26 Akim Demaille <akim@epita.fr>
19397
19398 * src/complain.c, src/complain.h (error): Remove, provided by
19399 lib/error.[ch].
19400
e0c40012
AD
194012001-11-26 Akim Demaille <akim@epita.fr>
19402
19403 * src/reader.c (read_declarations): Don't abort on tok_illegal,
19404 issue an error message.
19405 * tests/regression.at (Invalid %directive): New.
19406 Reported by Hans Aberg.
19407
5e147124
AD
194082001-11-26 Akim Demaille <akim@epita.fr>
19409
19410 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
19411 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
19412
a034c8b8
AD
194132001-11-26 Akim Demaille <akim@epita.fr>
19414
19415 * src/conflicts.c (conflicts_print): Don't complain at all when
19416 there are no reduce/reduce conflicts, and as many shift/reduce
19417 conflicts as expected.
19418 * tests/regression.at (%expect right): Adjust.
19419
c64a20f3
AD
194202001-11-23 Akim Demaille <akim@epita.fr>
19421
19422 * lib/alloca.c: Update, from fileutils.
19423
5b0d29bb
AD
194242001-11-23 Akim Demaille <akim@epita.fr>
19425
19426 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
19427
722c4bfe
AD
194282001-11-23 Akim Demaille <akim@epita.fr>
19429
19430 * src/system.h: Include alloca.h.
19431 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
19432
6255b435
AD
194332001-11-23 Akim Demaille <akim@epita.fr>
19434
19435 * src/print_graph.c (print_actions): Remove `rule', unused.
19436 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
19437 pacify GCC's signed < unsigned warnings.
19438 * src/closure.c (itemsetsize): Likewise.
19439 * src/reader.c (symbol_list_new): Static.
19440
b29b2ed5
AD
194412001-11-23 Akim Demaille <akim@epita.fr>
19442
19443 Attaching lineno to buckets is stupid, since only one copy of each
19444 symbol is kept, only the line of the first occurrence is kept too.
19445
19446 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
19447 * src/reader.c (rline_allocated): Remove, unused.
19448 (symbol_list): Have a `line' member.
19449 (symbol_list_new): New.
19450 (readgram): Use it.
19451 * src/print.c (print_grammar): Output the rule line numbers.
19452 * tests/regression.at (Solved SR Conflicts)
19453 (Unresolved SR Conflicts): Adjust.
19454 Reported by Hans Aberg.
19455
a81b1d4a
MA
194562001-11-22 Marc Autret <autret_m@epita.fr>
19457
19458 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
19459
c1ecb3c1
MA
194602001-11-22 Marc Autret <autret_m@epita.fr>
19461
19462 * src/muscle_tab.c (muscle_init): Remove initialization of
19463 skeleton muscle.
19464 * src/output.c (output_master_parser): Do it here.
19465
fbe01355
AD
194662001-11-20 Akim Demaille <akim@epita.fr>
19467
19468 * po/sv.po: New.
19469 * configure.in (ALL_LINGUAS): Adjust.
19470 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
19471 longer contains strings to translate.
19472
81e895c0
AD
194732001-11-19 Akim Demaille <akim@epita.fr>
19474
19475 * src/conflicts.c (conflicts_print): Add a missing \n.
19476
6bb1878b
AD
194772001-11-19 Akim Demaille <akim@epita.fr>
19478
19479 * src/nullable.c (nullable_print): New.
19480 (set_nullable): Call it when tracing.
19481 Better locality of variables.
19482
d9ec2d07
AD
194832001-11-19 Akim Demaille <akim@epita.fr>
19484
19485 * src/print.c (print_actions): Better locality of variables.
19486
720e5c1b
AD
194872001-11-19 Akim Demaille <akim@epita.fr>
19488
19489 * src/derives.c (print_derives): Fix and enrich.
19490 * src/closure.c (print_fderives): Likewise.
19491
fb908786
AD
194922001-11-19 Akim Demaille <akim@epita.fr>
19493
19494 * src/closure.c (itemsetend): Remove, replaced with...
19495 (itemsetsize): new.
19496
125ecb56
AD
194972001-11-19 Akim Demaille <akim@epita.fr>
19498
19499 * src/LR0.c (kernel_end): Remove, replaced with...
19500 (kernel_size): new.
19501
d8cf039f
AD
195022001-11-19 Akim Demaille <akim@epita.fr>
19503
19504 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
19505 to clarify.
19506
7bec0760
AD
195072001-11-19 Akim Demaille <akim@epita.fr>
19508
19509 * src/closure.c (closure): Use arrays instead of pointers to clarify.
19510
c87d4863
AD
195112001-11-19 Akim Demaille <akim@epita.fr>
19512
19513 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
19514 trace messages.
19515 * src/LR0.c: Likewise.
19516 (allocate_itemsets): Use arrays instead of pointers to clarify.
19517
9bfe901c
AD
195182001-11-19 Akim Demaille <akim@epita.fr>
19519
19520 * src/getargs.c (statistics_flag): Replace with...
19521 (trace_flag): New.
19522 (longopts): Accept --trace instead of --statistics.
19523 * src/getargs.h, src/options.c: Adjust.
19524 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
19525 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
19526
97db7bd4
AD
195272001-11-19 Akim Demaille <akim@epita.fr>
19528
cc72668c 19529 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
97db7bd4
AD
19530 pointers to clarify the code.
19531 (save_reductions, save_shifts): Factor common parts of alternatives.
19532
2c5f66ed
AD
195332001-11-19 Akim Demaille <akim@epita.fr>
19534
19535 * src/LR0.c (new_state, get_state): Complete TRACE code.
19536 * src/closure.c: Include `reader.h' to get `tags', needed by the
19537 trace code.
19538 Rename the conditional DEBUG as TRACE.
19539 Output consistently TRACEs to stderr, not stdout.
19540 * src/derives.c: Likewise.
19541 * src/reduce.c: (inaccessable_symbols): Using if is better style
19542 than goto.
19543 Use `#if TRACE' instead of `#if 0' for tracing code.
19544
300f275f
AD
195452001-11-19 Akim Demaille <akim@epita.fr>
19546
19547 * src/system.h (LIST_FREE, shortcpy): New.
19548 * src/LR0.c: Use them.
19549 * src/output.c (free_itemsets, free_reductions, free_shifts):
19550 Remove, replaced by LIST_FREE.
19551
f59c437a
AD
195522001-11-19 Akim Demaille <akim@epita.fr>
19553
19554 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
19555 (REDUCTIONS_ALLOC): New.
19556 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
19557 allocation.
19558
6986fd9e
AD
195592001-11-19 Akim Demaille <akim@epita.fr>
19560
19561 * src/LR0.c (new_state): Complete trace code.
19562 * src/nullable.c (set_nullable): Don't translate traces.
19563
4bc30f78
AD
195642001-11-19 Akim Demaille <akim@epita.fr>
19565
19566 * src/print_graph.c (print_core): Better locality of variables.
19567 * src/print.c (print_core): Likewise.
19568
08a946e0
AD
195692001-11-19 Akim Demaille <akim@epita.fr>
19570
19571 * src/vcg.c: You do the output, so you are responsible of the
19572 handling of VCG syntax, in particular: use quotearg.
19573 * src/print_graph.c: Don't.
19574 (print_actions): Don't output the actions as part of the nodes,
19575 since that's the job of the edges.
19576 (print_state): Don't output by hand: fill the node description,
9bfe901c 19577 and ask for its output.
08a946e0 19578
f0473484
AD
195792001-11-19 Akim Demaille <akim@epita.fr>
19580
cc72668c
AD
19581 * src/bison.simple (yyparse): When verbosely reporting an error,
19582 no longer put additional quotes around token names.
f0473484
AD
19583 * tests/calc.at: Adjust.
19584
e41dc700
AD
195852001-11-19 Akim Demaille <akim@epita.fr>
19586
19587 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
19588 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
19589 * src/output.c: Adjust.
19590
652a871c
AD
195912001-11-19 Akim Demaille <akim@epita.fr>
19592
19593 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
19594 (rule_t): this.
19595 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
19596
b2ed6e58
AD
195972001-11-19 Akim Demaille <akim@epita.fr>
19598
19599 * src/gram.h (rule_t): New.
19600 (rule_table): New.
19601 (rrhs, rlhs): Remove, part of state_t.
19602 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
19603 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
19604 * src/reader.c, src/reduce.c: Adjust.
19605
edad7067
AD
196062001-11-19 Akim Demaille <akim@epita.fr>
19607
19608 * src/reader.c (symbols_output): New, extracted from...
19609 (packsymbols): Here.
19610 (reader): Call it.
19611
3feec034
AD
196122001-11-19 Akim Demaille <akim@epita.fr>
19613
19614 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
19615 (maxrhs): this new function.
19616
ddcd5fdf
AD
196172001-11-19 Akim Demaille <akim@epita.fr>
19618
cc72668c 19619 * src/lalr.c (F): New macro to access the variable F.
ddcd5fdf
AD
19620 Adjust.
19621
bb527fc2
AD
196222001-11-19 Akim Demaille <akim@epita.fr>
19623
cc72668c 19624 * src/lalr.h (LA): New macro to access the variable LA.
bb527fc2
AD
19625 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19626 * src/lalr.c: Adjust.
19627
a845a697
AD
196282001-11-19 Akim Demaille <akim@epita.fr>
19629
19630 * src/lalr.c (initialize_LA): Only initialize LA. Let...
19631 (set_state_table): handle the `lookaheads' members.
19632
f004bf6a
AD
196332001-11-19 Akim Demaille <akim@epita.fr>
19634
cc72668c
AD
19635 * src/lalr.h (lookaheads): Removed array, whose contents is now
19636 a member of...
f004bf6a
AD
19637 (state_t): this structure.
19638 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19639 Adjust.
19640
de326cc0
AD
196412001-11-19 Akim Demaille <akim@epita.fr>
19642
cc72668c
AD
19643 * src/lalr.h (consistent): Removed array, whose contents is now
19644 a member of...
de326cc0
AD
19645 (state_t): this structure.
19646 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19647 Adjust.
19648
90b4416b
AD
196492001-11-19 Akim Demaille <akim@epita.fr>
19650
cc72668c
AD
19651 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
19652 contents are now members of...
90b4416b
AD
19653 (state_t): this structure.
19654 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19655 Adjust.
19656
9703cc49
AD
196572001-11-19 Akim Demaille <akim@epita.fr>
19658
19659 * src/lalr.h (state_t): New.
19660 (state_table): Be a state_t * instead of a core **.
19661 (accessing_symbol): Remove, part of state_t.
19662 * src/lalr.c: Adjust.
19663 (set_accessing_symbol): Merge into...
19664 (set_state_table): this.
19665 * src/print_graph.c, src/conflicts.c: Adjust.
19666
d803322e
AD
196672001-11-14 Akim Demaille <akim@epita.fr>
19668
19669 * tests/calc.at, tests/output.at, tests/regression.at,
19670 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
19671 now the tests are run in private dirs, therefore AC_CLEANUP and
19672 family can be simplified to 0-ary.
19673 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
19674 use abs. path to find config.h.
19675 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
19676 stderr, there can be way too much random noise.
19677 Instead pass -Werror to GCC and rely on the exit status.
19678 Reported by Wolfram Wagner.
19679
3d76b07d
AD
196802001-11-14 Akim Demaille <akim@epita.fr>
19681
19682 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
19683 defined only if yyoverflow is defined, to avoid `warning: unused
19684 variable `yyvs1''.
19685 Reported by The Test Suite.
19686
09b503c8
AD
196872001-11-14 Akim Demaille <akim@epita.fr>
19688
19689 * src/print.c: Include reduce.h.
19690 Reported by Hans Aberg.
19691
196922001-11-14 Akim Demaille <akim@epita.fr>
19693
19694 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
19695 Revert a previous patch: these are really const.
19696 * src/conflicts.c (conflict_report): Additional useless pair of
19697 braces to pacify GCC's warnings for `if () if () {} else {}'.
19698 * src/lex.c (parse_percent_token): Replace equal_offset with
19699 arg_offset.
19700 arg is const.
19701 Be sure to strdup `arg' when used, since there is no reason for
19702 token_buffer not to change.
19703
0f37a994
AD
197042001-11-14 Akim Demaille <akim@epita.fr>
19705
19706 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
19707 definition.
19708 * src/main.c (main): Use them.
19709 Suggested by Hans Aberg.
19710
d39d93b8
AD
197112001-11-12 Akim Demaille <akim@epita.fr>
19712
19713 * src/system.h (ngettext): Now that we use ngettext, be sure to
19714 provide a default definition when NLS are not used.
19715
9edcd895
AD
197162001-11-12 Akim Demaille <akim@epita.fr>
19717
19718 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
19719 Use @kbd to denote user input.
19720 (Language and Grammar): ANSIfy the example.
19721 Adjust its layout for info/notinfo.
19722 (Location Tracking Calc): Output error messages to stderr.
19723 Output locations in a more GNUtically correct way.
19724 Fix a couple of Englishos.
19725 Adjust @group/@end group pairs.
19726
7da99ede
AD
197272001-11-12 Akim Demaille <akim@epita.fr>
19728
e3aa65c5 19729 %expect was not functioning at all.
7da99ede
AD
19730
19731 * src/conflicts.c (expected_conflicts): Set to -1.
19732 (conflict_report): Use ngettext.
19733 (conflicts_print): Check %expect and make its violation an error.
19734 * doc/bison.texinfo (Expect Decl): Adjust.
19735 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
19736 * tests/regression.at (%expect not enough, %expect right)
19737 (%expect too much): New.
19738
ba9dda1a
AD
197392001-11-12 Akim Demaille <akim@epita.fr>
19740
19741 * tests/regression.at (Conflicts): Rename as...
19742 (Unresolved SR Conflicts): this.
19743 (Solved SR Conflicts): New.
19744
337c5bd1
AD
197452001-11-12 Akim Demaille <akim@epita.fr>
19746
19747 * src/reduce.c (print_results): Rename as...
19748 (reduce_output): This.
19749 Output to OUT, passed as argument, instead of output_obstack.
19750 (dump_grammar): Likewise.
19751 (reduce_free): New.
19752 Also free V1.
19753 (reduce_grammar): No longer call reduce_output, since...
19754 * src/print.c (print_results): do it.
19755 * src/main.c (main): Call reduce_free;
19756
c73a41af
AD
197572001-11-12 Akim Demaille <akim@epita.fr>
19758
19759 * src/conflicts.c (print_reductions): Accept OUT as argument.
19760 Output to it, not to output_obstack.
19761 * src/print.c (print_actions): Adjust.
19762
0df87bb6
AD
197632001-11-12 Akim Demaille <akim@epita.fr>
19764
19765 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
19766 the result instead of using...
19767 (src_total, rrc_total, src_count, rrc_count): Remove.
19768 (any_conflicts): Remove.
19769 (print_conflicts): Split into...
19770 (conflicts_print, conflicts_output): New.
19771 * src/conflicts.h: Adjust.
19772 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
0f37a994 19773 * src/print.c (print_grammar): Issue `\n' between two rules.
0df87bb6
AD
19774 * tests/regression.at (Conflicts): New.
19775 Reported by Tom Lane.
19776
e4d3d4de
AD
197772001-11-12 Akim Demaille <akim@epita.fr>
19778
19779 * tests/regression.at (Invalid input): Remove, duplicate with
19780 ``Invalid input: 1''.
19781
6d7d248e
AD
197822001-11-12 Akim Demaille <akim@epita.fr>
19783
19784 * tests/torture.at (AT_DATA_STACK_TORTURE)
19785 (Exploding the Stack Size with Alloca)
19786 (Exploding the Stack Size with Malloc): New.
19787
e9e4c321
AD
197882001-11-12 Akim Demaille <akim@epita.fr>
19789
19790 * src/bison.simple (YYSTACK_REALLOC): New.
19791 (yyparse) [!yyoverflow]: Use it and free the old stack.
0f37a994 19792 Reported by Per Allansson.
e9e4c321 19793
5f7e0832
AD
197942001-11-12 Pascal Bart <pascal.bart@epita.fr>
19795
19796 * src/bison.simple: Define type yystype instead of YYSTYPE, and
19797 define CPP macro, which substitute YYSTYPE by yystype.
19798 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
19799 with yyltype/YYLTYPE. This allows inclusion of the generated
19800 header within the parser if the compiler, such as GGC, accepts
19801 multiple equivalent #defines.
19802 From Akim.
19803
e3f1699f
AD
198042001-11-05 Akim Demaille <akim@epita.fr>
19805
19806 * src/reader.c (symbols_output): New, extracted from...
19807 (packsymbols): here.
19808 (reader): Adjust.
19809
65be0866
AD
198102001-11-05 Akim Demaille <akim@epita.fr>
19811
19812 * src/lex.c (parse_percent_token): s/quotearg/quote/.
19813
e4d910bf
AD
198142001-11-05 Akim Demaille <akim@epita.fr>
19815
19816 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
19817 pattern.
19818
951366c1
AD
198192001-11-05 Akim Demaille <akim@epita.fr>
19820
19821 * src/options.h (struct option_table_struct): set_flags is void*.
19822 * src/options.c (longopts): Support `--output' and `%output'.
19823 (usage): Adjust.
19824 * src/lex.h (tok_setopt): Remove, replaced with...
19825 (tok_intopt, tok_stropt): these new guys.
19826 * src/lex.c (getopt.h): Not needed.
19827 (token_buffer, unlexed_token_buffer): Not const.
19828 (percent_table): Promote `-' over `_' in directive names.
19829 Active `%name-prefix', `file-prefix', and `output'.
19830 (parse_percent_token): Accept possible arguments to directives.
19831 Promote `-' over `_' in directive names.
19832
d8988b2f
AD
198332001-11-04 Akim Demaille <akim@epita.fr>
19834
19835 * doc/bison.texinfo (Decl Summary): Split the list into
19836 `directives for grammars' and `directives for bison'.
19837 Sort'em.
19838 Add description of `%name-prefix', `file-prefix', and `output'.
19839 Promote `-' over `_' in directive names.
19840 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
19841 Simplify the description of `--name-prefix'.
19842 Promote `-' over `_' in directive names.
19843 Promote `--output' over `--output-file'.
19844 Fix the description of `--defines'.
19845 * tests/output.at: Exercise %file-prefix and %output.
19846
6468d18e
AD
198472001-11-02 Akim Demaille <akim@epita.fr>
19848
19849 * doc/refcard.tex: Update.
19850
6b7e85b9
AD
198512001-11-02 Akim Demaille <akim@epita.fr>
19852
19853 * src/symtab.h (SUNDEF): New.
19854 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
19855 stand for `uninitialized', instead of 0.
19856 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
19857 * src/lex.c (lex): Adjust.
19858
19859 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
19860 Number it 0.
19861 Let yylex return it instead of a plain 0.
19862 Reported by Dick Streefland.
19863
cd5aafcf
AD
198642001-11-02 Akim Demaille <akim@epita.fr>
19865
19866 * tests/regression.at (Mixing %token styles): New test.
19867
037ca2f1
AD
198682001-11-02 Akim Demaille <akim@epita.fr>
19869
19870 * src/reader.c (parse_thong_decl): Formatting changes.
19871 (token_translations_init): New, extracted from...
19872 (packsymbols): Here.
19873 Adjust.
19874
270a173c
AD
198752001-11-01 Akim Demaille <akim@epita.fr>
19876
19877 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
19878 Check that `9foo.y' produces correct cpp guards.
19879 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
19880 guards.
19881 Reported by Wwp.
19882
561f9a30
AD
198832001-11-01 Akim Demaille <akim@epita.fr>
19884
19885 * tests/regression.at (Invalid input: 2): New.
19886 * src/lex.c (unlexed_token_buffer): New.
19887 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
19888 too.
19889 Reported by Wwp.
19890
f987e9d2
AD
198912001-11-01 Akim Demaille <akim@epita.fr>
19892
19893 * tests/calc.at: Catch up with 1.30.
19894 * configure.in: Bump to 1.49a.
19895 Adjust to newer Autotest.
19896
0846f581
PB
198972001-10-19 Pascal Bart <pascal.bart@epita.fr>
19898
19899 * src/conflicts.c: Move global variables rrc_total and src_total ...
19900 (print_conflicts): here.
19901 * src/output.c (output): Free global variable user_toknums.
19902 * src/lex.c (token_obstack): Become static.
19903
3c1a79b3
AD
199042001-10-18 Akim Demaille <akim@epita.fr>
19905
19906 * tests/atlocal.in (GCC): Add.
19907 * tests/calc.at: s/m4_match/m4_bmatch/.
19908 s/m4_patsubst/m4_bpatsubst/.
19909 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
19910 * configure.in: AC_SUBST(GCC).
19911
5d52e7d0
MA
199122001-10-14 Marc Autret <autret_m@epita.fr>
19913
19914 * src/options.c (create_long_option_table): Fix.
19915
631aa1d3
AD
199162001-10-10 Akim Demaille <akim@epita.fr>
19917
19918 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
19919
f6ec6d13
AD
199202001-10-04 Akim Demaille <akim@epita.fr>
19921
19922 * src/reader.c (parse_union_decl): Push the caracters in
19923 union_obstack, not attrs_obstack.
19924
342b8b6e
AD
199252001-10-04 Akim Demaille <akim@epita.fr>
19926
19927 Merge in the branch 1.29.
19928
19929 * src/reader.c (packsymbols): Use a temporary obstack for
19930 `%%tokendef', since output_stack is already used elsewhere.
19931
19932 2001-10-02 Akim Demaille <akim@epita.fr>
19933
19934 Bump 1.29d.
19935
19936 2001-10-02 Akim Demaille <akim@epita.fr>
19937
19938 Version 1.29c.
19939
19940 2001-10-02 Akim Demaille <akim@epita.fr>
19941
19942 * tests/regression.at (Invalid CPP headers): New.
19943 From Alexander Belopolsky.
19944 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
19945
19946 2001-10-02 Akim Demaille <akim@epita.fr>
19947
19948 * tests/regression.at (Invalid input): New.
19949 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
19950 Reported by Shura.
19951
19952 2001-10-02 Akim Demaille <akim@epita.fr>
19953
19954 * tests/calc.at: Now that --debug works, the tests must be adjusted.
19955
19956 2001-10-02 Akim Demaille <akim@epita.fr>
19957
19958 * src/output.c (output_parser): Assert `skeleton'.
19959 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
19960 systems.
19961 From Shura.
19962
19963 2001-10-01 Marc Autret <autret_m@epita.fr>
19964
19965 * src/lex.h: Echo modifications.
19966 * src/lex.c (unlex): Parameter is now token_t.
19967 From Hans Aberg.
19968
19969 2001-10-01 Marc Autret <autret_m@epita.fr>
19970
19971 * src/main.c: Include lex.h.
19972 From Hans Aberg.
19973
19974 2001-09-29 Akim Demaille <akim@epita.fr>
19975
19976 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
19977
19978 2001-09-28 Akim Demaille <akim@epita.fr>
19979
19980 * tests/testsuite.at: Update to newer Autotest.
19981 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
19982
19983 2001-09-27 Akim Demaille <akim@epita.fr>
19984
19985 Position independent wrapper.
19986
19987 * tests/bison: Remove.
19988 * tests/bison.in: New.
19989 * configure.in: Adjust.
19990
19991 2001-09-27 Paul Eggert <eggert@twinsun.com>
19992
19993 Port quotearg fixes from tar 1.13.24.
19994
19995 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
19996 tm to be declared.
19997 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
19998 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
19999
20000 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
20001 * m4/mbrtowc.m4: New file.
20002 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
20003 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
20004
20005 2001-09-27 Akim Demaille <akim@epita.fr>
20006
20007 Bump to 1.29c.
20008
20009 2001-09-27 Akim Demaille <akim@epita.fr>
20010
20011 Version 1.29b.
20012
20013 2001-09-25 Akim Demaille <akim@epita.fr>
20014
20015 * src/system.h: Include `xalloc.h'.
20016 Remove it from the C files.
20017 * src/files.c (output_files): Free the obstacks.
20018 * src/lex.c (init_lex): Rename as...
20019 (lex_init): this.
20020 (lex_free): New.
20021 * src/main.c (main): Use it.
20022
20023 2001-09-24 Marc Autret <autret_m@epita.fr>
20024
20025 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
20026 to output informations in fout (FILE*).
20027 (open_graph, close_graph): Likewise.
20028 (output_graph, output_edge, output_node): Likewise.
20029 * src/vcg.h: Update function prototypes.
20030 * src/print_graph.c (print_graph): Open output graph file.
20031 (print_actions): Adjust.
20032 * src/files.h: Remove extern declaration.
20033 * src/files.c: Remove graph_obstack declaration.
20034 (open_files): Remove graph_obstack initialization.
20035 (output_files): Remove graph_obstack saving.
20036
20037 2001-09-24 Marc Autret <autret_m@epita.fr>
20038
20039 * src/files.c (compute_output_file_names): Fix.
20040
20041 2001-09-24 Marc Autret <autret_m@epita.fr>,
20042 Akim Demaille <akim@epita.fr>
20043
20044 * src/reader.c (reader): Remove call to free_symtab ().
20045 * src/main.c (main): Call it here.
20046 Include symtab.h.
20047 * src/conflicts.c (initialize_conflicts): Rename as...
20048 (solve_conflicts): this.
20049 * src/print.c (print_core, print_actions, print_state)
20050 (print_grammar): Dump to a file instead a `output_obstack'.
20051 (print_results): Dump `output_obstack', and then proceed with the
20052 FILE *.
20053 * src/files.c (compute_output_file_names, close_files): New.
20054 (output_files): Adjust.
20055 * src/main.c (main): Adjust.
20056
20057 2001-09-23 Marc Autret <autret_m@epita.fr>
20058
20059 * src/files.c (compute_header_macro): Computes header macro name
20060 from spec_defines_file when given.
20061
20062 2001-09-23 Marc Autret <autret_m@epita.fr>
20063
20064 * src/files.c (output_files): Add default extensions.
20065
20066 2001-09-22 Akim Demaille <akim@epita.fr>
20067
20068 * src/conflicts.c (finalize_conflicts): Rename as...
20069 (free_conflicts): this.
20070
20071 2001-09-22 Akim Demaille <akim@epita.fr>
20072
20073 * src/gram.c (gram_free): Rename back as...
20074 (dummy): this.
20075 (output_token_translations): Free `token_translations'.
20076 * src/symtab.c (free_symtab): Free the tag field.
20077
20078 2001-09-22 Akim Demaille <akim@epita.fr>
20079
20080 Remove `translations' as it is always set to true.
20081
20082 * src/gram.h: Adjust.
20083 * src/reader.c (packsymbols, parse_token_decl): Adjust
20084 * src/print.c (print_grammar): Adjust.
20085 * src/output.c (output_token_translations): Adjust.
20086 * src/lex.c (lex): Adjust.
20087 * src/gram.c: Be sure the set pointers to NULL.
20088 (dummy): Rename as...
20089 (gram_free): this.
20090
20091 2001-09-22 Akim Demaille <akim@epita.fr>
20092
20093 * configure.in: Invoke AM_LIB_DMALLOC.
20094 * src/system.h: Use dmalloc.
20095 * src/LR0.c: Be sure to have pointers initialized to NULL.
20096 (allocate_itemsets): Allocate kernel_items only if needed.
20097
20098 2001-09-22 Akim Demaille <akim@epita.fr>
20099
20100 * configure.in: Bump to 1.29b.
20101 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
20102 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
20103 need xmalloc.c in calc.y.
20104 From Pascal Bart.
20105
20106 2001-09-21 Akim Demaille <akim@epita.fr>
20107
20108 Version 1.29a.
20109 * Makefile.maint, config/config.guess, config/config.sub,
20110 * config/missing: Update from masters.
20111 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
20112 upon package.m4.
20113 * configure.in (ALL_LINGUAS): Add `tr'.
20114
20115 2001-09-21 Akim Demaille <akim@epita.fr>
20116
20117 * tests/Makefile.am (package.m4): Move to...
20118 ($(srcdir)/$(TESTSUITE)): here.
20119
20120 2001-09-20 Akim Demaille <akim@epita.fr>
20121
20122 * src/complain.c: No longer try to be standalone: use system.h.
20123 Don't assume __STDC__ is defined to 1. Just test if it is defined.
20124 * src/complain.h: Likewise.
20125 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
20126 Remove the unused variable `n'.
20127 From Albert Chin-A-Young.
20128
20129 2001-09-18 Marc Autret <autret_m@epita.fr>
20130
20131 * doc/bison.1: Update.
20132 * doc/bison.texinfo (Bison Options): Update --defines and --graph
20133 descriptions.
20134 (Option Cross Key): Update.
20135 Add --graph.
20136
20137 2001-09-18 Marc Autret <autret_m@epita.fr>
20138
20139 * tests/regression.at: New test (comment in %union).
20140
20141 2001-09-18 Marc Autret <autret_m@epita.fr>
20142
20143 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
20144 do that.
20145 Reported by Keith Browne.
20146
20147 2001-09-18 Marc Autret <autret_m@epita.fr>
20148
20149 * tests/output.at: Add tests for --defines and --graph.
20150
20151 2001-09-18 Marc Autret <autret_m@epita.fr>
20152
20153 * tests/output.at: Removes tests of %{header,src}_extension features.
20154
20155 2001-09-18 Akim Demaille <akim@epita.fr>
20156
20157 * tests/Makefile.am (package.m4): New.
20158 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
20159 (_AT_CHECK_CALC_ERROR): Likewise.
20160 Factor the `, ' part of verbose error messages.
20161
20162 2001-09-18 Marc Autret <autret_m@epita.fr>
20163
20164 * src/getargs.c (longopts): Declare --defines and --graph as options
20165 with optional arguments.
20166 * src/files.h: Add extern declarations.
20167 * src/files.c (spec_graph_file, spec_defines_file): New.
20168 (output_files): Update.
20169 Remove CPP-outed code.
20170
20171 2001-09-18 Marc Autret <autret_m@epita.fr>
20172
20173 Turn off %{source,header}_extension feature.
20174
20175 * src/files.c (compute_exts_from_gf): Update.
20176 (compute_exts_from_src): Update.
20177 (output_files): CPP-out useless code.
20178 * src/files.h: Remove {header,source}_extension extern declarations.
20179 * src/reader.c (parse_dquoted_param): CPP-out.
20180 (parse_header_extension_decl): Remove.
20181 (parse_source_extension_decl): Remove.
20182 (read_declarations): Remove cases tok_{hdrext,srcext}.
20183 * src/lex.c (percent_table): Remove {header,source}_extension entries.
20184 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
20185
20186 2001-09-10 Akim Demaille <akim@epita.fr>
20187
20188 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
20189 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
20190 (AT_CHECK_OUTPUT): this.
20191 Merely check ls' exit status, its output is useless.
20192
20193 2001-09-10 Akim Demaille <akim@epita.fr>
20194
20195 * tests/calc.at: Use m4_match.
20196 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
20197
20198 2001-09-10 Marc Autret <autret_m@epita.fr>,
20199 Akim Demaille <akim@epita.fr>
20200
20201 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
20202 enum color_e.
20203 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
20204 to `normal'.
20205 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
20206 * src/lex.h: Adjust prototype.
20207 (token_t): Add `tok_undef'.
20208 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
20209 (parse_percent_token): Now returns token_t.
20210 Add default statement in switch.
20211 (lex): Separate `c' as an input variable, from the token_t result
20212 part.
20213 (unlexed): Is a token_t.
20214
20215 2001-09-10 Akim Demaille <akim@epita.fr>
20216
20217 * configure.in: Bump to 1.29a.
20218
20219 2001-09-07 Akim Demaille <akim@epita.fr>
20220
20221 Version 1.29.
20222
20223 2001-08-30 Akim Demaille <akim@epita.fr>
20224
20225 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
20226 * m4/atconfig.m4: Remove.
20227 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
20228 * tests/bison: New.
20229 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
20230 m4_if, m4_patsubst, and m4_regexp.
20231 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
20232 `input' file instead of echo.
20233
20234 2001-08-29 Akim Demaille <akim@epita.fr>
20235
20236 Bump to 1.28e.
20237
20238 2001-08-29 Akim Demaille <akim@epita.fr>
20239
20240 Version 1.28d.
20241
20242 2001-08-29 Paul Eggert <eggert@twinsun.com>
20243
20244 * src/bison.simple (yyparse): Don't take the address of an
20245 item before the start of an array, as that doesn't conform to
20246 the C Standard.
20247
20248 2001-08-29 Robert Anisko <anisko_r@epita.fr>
20249
20250 * doc/bison.texinfo (Location Tracking Calc): New node.
20251
20252 2001-08-29 Paul Eggert <eggert@twinsun.com>
20253
20254 * src/output.c (output): Do not define const, as this now
20255 causes more problems than it cures.
20256
20257 2001-08-29 Akim Demaille <akim@epita.fr>
20258
20259 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
20260 the nodes.
20261 Be sure to tag the `detailmenu'.
20262
20263 2001-08-29 Akim Demaille <akim@epita.fr>
20264
20265 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
20266 download in a tmp dir.
20267
20268 2001-08-28 Marc Autret <autret_m@epita.fr>
20269
20270 * config/depcomp: New file.
20271
20272 2001-08-28 Marc Autret <autret_m@epita.fr>
20273
20274 * doc/bison.1 (mandoc): Adjust.
20275 From Juan Manuel Guerrero.
20276
20277 2001-08-28 Marc Autret <autret_m@epita.fr>
20278
20279 * src/print_graph.c (print_state): Fix.
20280
20281 2001-08-27 Marc Autret <autret_m@epita.fr>
20282
20283 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
20284 char * members.
20285 Echo modifications to the functions prototypes.
20286 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
20287
20288 2001-08-27 Marc Autret <autret_m@epita.fr>
20289
20290 * src/vcg.c: Include `xalloc.h'.
20291 (add_colorentry): New.
20292 (add_classname): New.
20293 (add_infoname): New.
20294 * src/vcg.h: Add new prototypes.
20295
20296 2001-08-27 Akim Demaille <akim@epita.fr>
20297
20298 * Makefile.maint: Sync. again with CVS Autoconf.
20299
20300 2001-08-27 Akim Demaille <akim@epita.fr>
20301
20302 * Makefile.maint: Formatting changes.
20303 (po-update, cvs-update, update): New targets.
20304 (AMTAR): Remove.
20305
20306 2001-08-27 Akim Demaille <akim@epita.fr>
20307
20308 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
20309 * Makefile.maint: Sync. with CVS Autoconf.
20310
20311 2001-08-27 Marc Autret <autret_m@epita.fr>
20312
20313 * src/vcg.h (struct infoname_s): New.
20314 (struct colorentry_s): New.
20315 (graph_s): New fields {vertical,horizontal}_order in structure.
20316 Add `infoname' field.
20317 Add `colorentry' field;
20318 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
20319 (G_HORIZONTAL_ORDER): New.
20320 (G_INFONAME): New.
20321 (G_COLORENTRY): New.
20322 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
20323 Add output of `infoname'.
20324 Add output of `colorentry'.
20325
20326 2001-08-27 Marc Autret <autret_m@epita.fr>
20327
20328 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
20329 This one shadowed a global parameter.
20330
20331 2001-08-24 Marc Autret <autret_m@epita.fr>
20332
20333 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
20334 instead of `unsigned'.
20335 (print_state): Do not call obstack_object_size () in obstack_grow ()
20336 to avoid macro variables shadowing.
20337
20338 2001-08-23 Marc Autret <autret_m@epita.fr>
20339
20340 * src/lex.c (percent_table): Typo: s/naem/name/.
20341 Add graph option.
20342 Normalize new options declarations.
20343
20344 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
20345
20346 * tests/suite.at: Exercise %header_extension and %source_extension.
20347
20348 2001-08-16 Marc Autret <autret_m@epita.fr>
20349
20350 * src/reader.c (parse_dquoted_param): New.
20351 (parse_header_extension_decl): Use it.
20352 (parse_source_extension_decl): Likewise.
20353
20354 2001-08-16 Marc Autret <autret_m@epita.fr>
20355
20356 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
20357 (get_xxxx_str): Use assert () instead of complain ().
20358 Remove return invokations in default cases.
20359 (get_decision_str): Modify default behaviour. Remove second argument.
20360 Echo modifications on calls.
20361 (output_graph): Fix.
20362
20363 2001-08-16 Marc Autret <autret_m@epita.fr>
20364
20365 * src/getargs.c (usage): Update with ``-g, --graph''.
20366
20367 2001-08-16 Marc Autret <autret_m@epita.fr>
20368
20369 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
20370 (Option Cross Key): Likewise.
20371 * doc/bison.1: Update.
20372
1c8c2190
PB
203732001-09-25 Pascal Bart <pascal.bart@epita.fr>
20374
20375 * src/output.c (output_master_parser): Don't finish action_obstack.
20376 (output_parser): Don't care about the muscle action, here.
20377 (prepare): Copy the action_obstack in the action muscle.
20378 (output): Free action_obstack.
20379
180d45ba
PB
203802001-09-23 Pascal Bart <pascal.bart@epita.fr>
20381
20382 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
20383 will contain `%union' declaration.
20384 (parse_union_decl): Delete #line directive output.
20385 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
20386 informations about %union.
20387 (parse_union_decl): Copy the union_obstack in the muscle stype.
20388 * src/bison.simple: Add new #line directive.
20389 Add typdef %%stype YYSTYPE.
20390
c51d1a19
PB
203912001-09-23 Pascal Bart <pascal.bart@epita.fr>
20392
20393 * src/bison.simple: Add new `#line' directive.
20394
6f9344da
PB
203952001-09-22 Pascal Bart <pascal.bart@epita.fr>
20396
20397 * src/bison.simple: New `#line' directive.
20398 * src/output.c (output_parser): Support new dynamic muscle input_line.
20399
652def80
MA
204002001-09-22 Marc Autret <autret_m@epita.fr>
20401
20402 * src/output.c (output_master_parser): New.
20403 (output_parser): Be more re-entrant.
20404
25b222fa
MA
204052001-09-21 Marc Autret <autret_m@epita.fr>
20406
20407 * src/reader.c (copy_definition, parse_union_decl): Update and use
20408 `linef' muscle.
20409 (copy_action): Likewise.
20410 Use obstack_1grow ().
20411 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
20412
6bc35ae5
MA
204132001-09-21 Marc Autret <autret_m@epita.fr>
20414
20415 * src/options.c (option_table): Adjust.
20416 * src/lex.c (parse_percent_token): Fix.
20417
c0629aa1
PB
204182001-09-20 Pascal Bart <pascal.bart@epita.fr>
20419
20420 * src/options.c (symtab.h): Include it, need by lex.h.
342b8b6e 20421
82b6d266
PB
204222001-09-20 Pascal Bart <pascal.bart@epita.fr>
20423
20424 * src/lex.c (parse_percent_token): Change type of variable `tx', which
20425 is now an option_table_struct*.
20426 (option_strcmp): New function option_strcmp.
20427 (parse_percent_token): Call option_strcmp.
20428 * src/getargs.c (xalloc.h, options.h): Include it.
20429 (getargs): Call create_long_option_table.
20430 (getargs): Free longopts at the end of the function.
20431 (shortopts): Move in options.c.
20432 * src/options.c (create_long_option_table): New function. Convert
20433 information from option_table to option structure.
20434 * src/reader.c (options.h): Include it.
20435
20436 * src/Makefile.am: Adjust.
20437 * src/options.c (option_table): Create from longopts and percent_table.
20438 * src/getargs.c (longopts): Delete.
20439 * src/lex.c (struct percent_table_struct): Delete.
20440 (percent_table): Delete.
20441 (options.h): Include it.
20442 * src/options.c: Create.
20443 * src/options.h: Create.
20444 Declare enum opt_access_e.
20445 Define struct option_table_struct.
20446
75f5aaea
MA
204472001-09-20 Marc Autret <autret_m@epita.fr>
20448
20449 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
20450 sections of Bison.
20451
f508cb0a
PB
204522001-09-19 Pascal Bart <pascal.bart@epita.fr>
20453
20454 * src/bison.simple: s/%%filename/%%skeleton.
20455 * src/muscle_tab.c (getargs.h): Include it.
20456 (muscle_init): Insert new muscle skeleton.
20457
13105fc1
PB
204582001-09-18 Pascal Bart <pascal.bart@epita.fr>
20459
20460 * src/output.c (output_parser): Delete unused variable actions_dumped.
20461
b0c4483e
PB
204622001-09-07 Pascal Bart <pascal.bart@epita.fr>
20463
20464 * src/output.c (output): Delete call to reader_output_yylsp.
20465 * src/reader.c (reader): Likewise.
ba0fe3c7 20466 * src/reader.h: Delete declaration of reader_output_yylsp.
342b8b6e 20467
11d82f03
MA
204682001-09-02 Marc Autret <autret_m@epita.fr>
20469
20470 * src/reader.c: Include muscle_tab.h.
20471 (parse_union_decl): Update.
20472 (parse_macro_decl): Rename parse_muscle_decl.
20473 Update to use renamed functions and variable.
20474 (read_declarations, copy_action, read_additionnal_code, : Updated
20475 with correct variables and functions names.
20476 (packsymbols, reader): Likewise.
342b8b6e 20477
11d82f03 20478 * src/reader.h (muscle_obstack): Extern declaration update.
342b8b6e 20479
11d82f03
MA
20480 * src/output.c: Include muscle_tab.h
20481 In all functions using macro_insert, change by using muscle_insert ().
20482 (macro_obstack): Rename muscle_obstack.
20483 Echo modifications in the whole file.
20484 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
20485 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
20486 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
20487
20488 * src/muscle_tab.h: Update double inclusion macros.
20489 (macro_entry_s): Rename muscle_entry_s.
20490 Update prototypes.
342b8b6e 20491
11d82f03
MA
20492 * src/muscle_tab.c: Include muscle_tab.h.
20493 Rename macro_tabble to muscle_table.
20494 (mhash1, mhash2, mcmp): Use muscle_entry.
20495 (macro_init): Rename muscle_init. Update.
20496 (macro_insert): Rename muscle_insert. Update.
20497 (macro_find): Rename muscle_find. Update.
20498
20499 * src/main.c: Include muscle_tab.h.
20500 (main): Call muscle_init ().
20501 * src/Makefile.am (bison_SOURCES): Echo modifications.
20502
93a37297
MA
205032001-09-02 Marc Autret <autret_m@epita.fr>
20504
f753cd62 20505 Now the files macro_tab.[ch] are named muscle_tab.[ch].
342b8b6e 20506
f753cd62
MA
20507 * src/muscle_tab.c, src/muscle_tab.h: Add files.
20508
205092001-09-02 Marc Autret <autret_m@epita.fr>
20510
20511 * src/macrotab.c, src/macrotab.h: Remove.
93a37297 20512
682d48cd
PB
205132001-09-01 Pascal Bart <pascal.bart@epita.fr>
20514
342b8b6e 20515 * src/reader.c (copy_guard): Use muscle to specify the `#line'
682d48cd
PB
20516 filename.
20517
087c8fda
MA
205182001-09-01 Marc Autret <autret_m@epita.fr>
20519
20520 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
20521 to an explicit value to activate the feature. We do it here.
20522
dda680cb
PB
205232001-08-31 Pascal Bart <pascal.bart@epita.fr>
20524
20525 * src/output.c (prepare): Delete the `filename' muscule insertion.
20526 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
20527 (parse_union_decl): Likewise.
20528 * src/macrotab.c (macro_init): Initialize filename by infile.
20529
9e644e64
MA
205302001-08-31 Marc Autret <autret_m@epita.fr>
20531
20532 * src/bison.simple (YYLSP_NEEDED): New definition.
20533 * src/output.c (prepare): Add macro insertion of `locations_flag'
20534
17da6427
PB
205352001-08-31 Pascal Bart <pascal.bart@epita.fr>
20536
20537 * src/output.c (prepare): Delete insertion of previous muscles,
20538 and insert the `prefix' muscles.
20539 * src/macrotab.c (macro_init): Likewise.
20540 (macro_init): Initialization prefix directive by `yy'.
342b8b6e 20541 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17da6427
PB
20542 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
20543 yylval, yydebug, yyerror, yynerrs and yyparse.
342b8b6e 20544 New directive `#define' to substitute yydebug, ... with option
17da6427
PB
20545 name_prefix.
20546
e8cb70b9
PB
205472001-08-31 Pascal Bart <pascal.bart@epita.fr>
20548
20549 * src/main.c (main): Standardize.
20550 * src/output.c (output_table_data, output_parser): Likewise.
20551 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
20552
63c2d5de
MA
205532001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
20554
342b8b6e 20555 * src/reader.c (read_additionnal_code): Rename %%user_code to
63c2d5de
MA
20556 %%epilogue.
20557 * src/output.c (output): Rename %%declarations to %%prologue.
20558 * src/bison.simple: Echo modifications.
342b8b6e 20559
d8cb5183
MA
205602001-08-31 Marc Autret <autret_m@epita.fr>
20561
20562 * src/reader.c (readgram): CleanUp.
20563 (output_token_defines): Likewise.
20564 (packsymbols): Likewise.
20565 (reader): Likewise.
20566 * src/output.c (output): CPP-out useless code.
20567
6c686258
PB
205682001-08-31 Pascal Bart <pascal.bart@epita.fr>
20569
342b8b6e 20570 * src/reader.c (reader): Delete obsolete call to function
6c686258
PB
20571 output_trailers and output_headers.
20572 * src/output.h: Remove obsolete functions prototypes of output_headers
20573 and output_trailers.
20574
8f451ef7
PB
205752001-08-30 Pascal Bart <pascal.bart@epita.fr>
20576
20577 * src/main.c: Include macrotab.h.
342b8b6e 20578 * src/macrotab.h (macro_entry_s): Constify fields.
8f451ef7
PB
20579 Adjust functions prototypes.
20580 * src/macrotab.c (macro_insert): Constify key and value.
20581 (macro_find): Constify key.
20582 (macro_insert): Include 'xalloc.h'
20583 (macro_insert): Use XMALLOC.
20584 (macro_find): Constify return value.
20585 * src/output.c (output_table_data): Rename table to table_data.
20586 (output_parser): Constify macro_key, macro_value.
20587
997b6fd0 205882001-08-30 Marc Autret <autret_m@epita.fr>
2ba3b73c
MA
20589
20590 * src/reader.c (parse_skel_decl): New.
342b8b6e 20591 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2ba3b73c
MA
20592 * src/lex.h (token_t): New token `tok_skel'.
20593 * src/lex.c (percent_table): Add skeleton option entry.
20594 Standardize.
20595
ff48177d
MA
205962001-08-29 Marc Autret <autret_m@epita.fr>
20597
20598 * src/bison.simple: Add %%user_code directive at the end.
20599 * src/reader.c (read_additionnal_code): New.
20600 (reader): Use it.
20601 * src/output.c (output_program): Remove.
20602 (output): Update.
20603
b33160bf
MA
206042001-08-28 Marc Autret <autret_m@epita.fr>
20605
20606 * src/output.c (output_actions): Clean up.
4e5caae2 20607 (output_gram): CPP-out useless code.
b33160bf
MA
20608 * src/reader.c (reader): Clean up, CPP-out useless code.
20609
d1a2daf7
PB
206102001-08-28 Pascal Bart <pascal.bart@epita.fr>
20611
342b8b6e 20612 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
535c0e75 20613 directive.
d1a2daf7
PB
20614 * src/bison.simple: Add `%%definitions'.
20615
2b763dfe
MA
206162001-08-28 Marc Autret <autret_m@epita.fr>
20617
20618 * config/depcomp: New file.
20619
f1a87ef6
PE
206202001-08-27 Paul Eggert <eggert@twinsun.com>
20621
20622 * src/bison.simple (yyparse): Don't take the address of an
20623 item before the start of an array, as that doesn't conform to
20624 the C Standard.
20625
82e236e2
RA
206262001-08-27 Robert Anisko <robert.anisko@epita.fr>
20627
f1a87ef6 20628 * src/output.c (output): Remove the initialization of the macro
82e236e2
RA
20629 obstack. It was done too late here.
20630
20631 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
20632 completely wrong.
20633 (reader): Initialize the macro obstack here, since we need it to grow
20634 '%define' directives.
20635
20636 * src/reader.h: Declare the macro obstack as extern.
20637
b0cfa28a
RA
206382001-08-27 Robert Anisko <robert.anisko@epita.fr>
20639
20640 * src/output.c (output_parser): Fix. Store single '%' characters in
20641 the output obstack instead of throwing them away.
20642
6fc74234
AD
206432001-08-27 Akim Demaille <akim@epita.fr>
20644
20645 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
20646
9c76d118
RA
206472001-08-25 Robert Anisko <robert.anisko@epita.fr>
20648
20649 * lib/Makefile.am: Adjust.
20650
a8289c62
RA
206512001-08-25 Robert Anisko <robert.anisko@epita.fr>
20652
20653 * src/bison.simple: Update and add '%%' directives.
20654
b6610515
RA
206552001-08-25 Robert Anisko <robert.anisko@epita.fr>
20656
20657 * src/reader.c (reader): Remove calls to 'output_headers' and
20658 'output_trailers'. Remove some C output.
20659 (readgram): Disable a piece of code that was writing a default
20660 definition for 'YYSTYPE'.
20661 (reader_output_yylsp): Remove.
20662 (packsymbols): Output token defintions to a macro.
20663 (copy_definition): Disable C output.
6fc74234 20664
b6610515
RA
20665 * src/reader.c (parse_macro_decl): New function used to parse macro
20666 declarations.
20667 (copy_string2): Put the body of copy_string into this new function.
20668 Add a parameter to let the caller choose whether he wants to copy the
20669 string delimiters or not.
20670 (copy_string): Be a simple call to copy_string2 with the last argument
20671 bound to true.
20672 (read_declarations): Add case for macro definition.
20673 (copy_identifier): New.
6fc74234 20674 (parse_macro_decl): Read macro identifiers using copy_identifier
b6610515
RA
20675 rather than lex.
20676
26f609ff
RA
206772001-08-25 Robert Anisko <robert.anisko@epita.fr>
20678
20679 * src/output.c (prepare): Add prefixed names.
20680 (output_parser): Output semantic actions.
20681 (output_parser): Fix bug on '%%line' directives.
6fc74234 20682
26f609ff
RA
20683 * src/output.c (output_headers): Remove. The C code printed by this
20684 function should now be in the skeletons.
20685 (output_trailers): Remove.
20686 (output): Disable call to 'reader_output_yylsp'.
20687 (output_rule_data): Do not output tables to the table obstack.
20688
20689 * src/output.c: Remove some C dedicated output.
20690 Improve the use of macro and output obstacks.
20691 (output_defines): Remove.
6fc74234 20692
26f609ff
RA
20693 * src/output.c (output_token_translations): Associate 'translate'
20694 table with a macro. No output to the table obstack.
20695 (output_gram): Same for 'rhs' and 'prhs'.
20696 (output_stos): Same for 'stos'.
20697 (output_rule_data): Same for 'r1' and 'r2'.
20698 (token_actions): Same for 'defact'.
20699 (goto_actions): Same for 'defgoto'.
20700 (output_base): Same for 'pact' and 'pgoto'.
20701 (output_table): Same for 'table'.
20702 (output_check): Same for 'check'.
6fc74234 20703
26f609ff
RA
20704 * src/output.c (output_table_data): New function.
20705 (output_short_table): Remove.
20706 (output_short_or_char_table): Remove.
6fc74234 20707
26f609ff
RA
20708 * src/output.c (output_parser): Replace most of the skeleton copy code
20709 with something new. Skeletons are now processed character by character
20710 rather than line by line, and Bison looks for '%%' macros. This is the
20711 first step in making Bison's output process (a lot) more flexible.
20712 (output_parser): Use the macro table.
20713
6f43b113
RA
207142001-08-25 Robert Anisko <robert.anisko@epita.fr>
20715
20716 * src/main.c (main): Initialize the macro table.
20717
dd3127cf
RA
207182001-08-25 Robert Anisko <robert.anisko@epita.fr>
20719
20720 * src/lex.c (percent_table): Add tok_define.
20721 * src/lex.h: Add tok_define.
20722
aa321494
RA
207232001-08-25 Robert Anisko <robert.anisko@epita.fr>
20724
20725 * src/macrotab.c: New file.
20726 * src/macrotab.h: New file.
20727 * src/Makefile.am: Update.
20728
68bd3b6b
RA
207292001-08-25 Robert Anisko <robert.anisko@epita.fr>
20730
20731 * lib/hash.c: New file.
20732 * lib/hash.h: New file.
20733 * lib/Makefile.am: Update.
20734
45f8dd1e
AD
207352001-08-15 Akim Demaille <akim@epita.fr>
20736
20737 Version 1.28c.
20738
40a64a7a 207392001-08-15 Marc Autret <autret_m@epita.fr>
0b8afb77
AD
20740
20741 * src/reader.c (readgram): Indent output macro YYSTYPE.
20742 (packsymbols): Likewise.
20743 (output_token_defines): Likewise.
20744 * src/files.c: Standardize.
20745 (compute_header_macro): New.
20746 (defines_obstack_save): New. Use compute_header_macro.
20747 (output_files): Update. Use defines_obstack_save.
20748
f9a8293a
AD
207492001-08-15 Akim Demaille <akim@epita.fr>
20750
20751 * doc/bison.texinfo (Table of Symbols): Document
20752 YYSTACK_USE_ALLOCA.
20753
150ca7a7
AD
207542001-08-15 Akim Demaille <akim@epita.fr>
20755
20756 * missing: Update from CVS Automake.
20757 * config/config.guess, config/config.sub, config/texinfo.tex:
20758 Update from gnu.org.
20759
69b5cec4
AD
207602001-08-15 Akim Demaille <akim@epita.fr>
20761
20762 * Makefile.maint: Sync with CVS Autoconf.
20763
f2b5126e
PB
207642001-08-14 Pascal Bart <pascal.bart@epita.fr>
20765
69b5cec4 20766 * doc/bison.texinfo: Include GNU Free Documentation License from
f2b5126e
PB
20767 `fdl.texi'.
20768 * doc/fdl.texi: Add to package.
20769
4ecbf796
MA
207702001-08-14 Marc Autret <autret_m@epita.fr>
20771
20772 Turn on %{source,header}_extension features.
20773
69b5cec4 20774 * src/lex.c (percent_table): Un-CPP out header_extension and
4ecbf796
MA
20775 source_extension.
20776 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
69b5cec4 20777 (compute_exts_from_src): Remove conditions. It restores priorities
4ecbf796
MA
20778 between options.
20779
95fb5662
MA
207802001-08-14 Marc Autret <autret_m@epita.fr>
20781
20782 * src/files.c (compute_base_names): Add extensions computing when
20783 `--file-prefix' used.
20784 Standardize function calls.
20785
78d09da9
MA
207862001-08-13 Marc Autret <autret_m@epita.fr>
20787
69b5cec4 20788 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
78d09da9
MA
20789 defining it (defined but null disables alloca).
20790
5a009f2c
MA
207912001-08-13 Marc Autret <autret_m@epita.fr>
20792
20793 * src/bison.simple (_yy_memcpy): CPP reformat.
20794
1e41465a
PB
207952001-08-13 Pascal Bart <pascal.bart@epita.fr>
20796
20797 * tests/atconfig.in (CPPFLAGS): Fix.
20798
c67a198d
PB
207992001-08-10 Pascal Bart <pascal.bart@epita.fr>
20800
79282c6c 20801 * doc/bison.texinfo: Include GNU General Public License from
c67a198d
PB
20802 `gpl.texi'.
20803 * doc/gpl.texi: Add to package.
20804
09a6de7e
MA
208052001-08-10 Marc Autret <autret_m@epita.fr>
20806
20807 * src/print_graph.h: Fix.
20808 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
20809
b77b9ee0
AD
208102001-08-10 Akim Demaille <akim@epita.fr>
20811
20812 * src/system.h: Provide default declarations for stpcpy, strndup,
20813 and strnlen.
20814
3e259915
MA
208152001-08-10 Robert Anisko <anisko_r@epita.fr>
20816
20817 * doc/bison.texinfo (Locations): Update @$ stuff.
20818
ca96bc2d
MA
208192001-08-09 Robert Anisko <anisko_r@epita.fr>
20820
20821 * src/bison.simple (YYLLOC_DEFAULT): Update.
20822 (yyparse): Adjust.
20823
fdc6758b
MA
208242001-08-08 Marc Autret <autret_m@epita.fr>
20825
b77b9ee0 20826 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
fdc6758b
MA
20827 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
20828 Reported by Fabrice Bauzac.
957d4dbf 20829
600cad3b
MA
208302001-08-08 Marc Autret <autret_m@epita.fr>
20831
20832 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
20833 * src/vcg.c (output_node): Fix.
20834 * src/vcg.h: Cleanup.
20835 * src/print_graph.c: Add comments.
b77b9ee0 20836 (node_output_size): New global variable. Simplify the formatting of
600cad3b 20837 the VCG graph output.
b77b9ee0 20838 (print_actions): Unused code is now used. It notifies the final state
600cad3b 20839 and no action states in the VCG graph. It also give the reduce actions.
b77b9ee0 20840 The `shift and goto' edges are red and the `go to state' edges are
600cad3b
MA
20841 blue.
20842 Get the current node name and node_obstack by argument.
20843 (node_obstack): New variable.
20844 (print_state): Manage node_obstack.
20845 (print_core): Use node_obstack given by argument.
20846 A node is not only computed here but in print_actions also.
20847 (print_graph): CPP out useless code instead of commenting it.
20848
976e528f
AD
208492001-08-07 Pascal Bart <pascal.bart@epita.fr>
20850
20851 * tests/atconfig.in (CPPFLAGS): Fix.
20852
20e8e5ca
AD
208532001-08-07 Akim Demaille <akim@epita.fr>
20854
20855 * src/print_graph.c (quote): New.
20856 (print_core): Use it.
20857
957d4dbf 208582001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3e3da797 20859
3e3da797
AD
20860 * src/vcg.c (complain.h): Include it.
20861 Unepitaize `return' invocations.
c4b66126 20862 [NDEBUG] (main): Remove.
79282c6c 20863 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
c4b66126
AD
20864 * src/files.c (open_files): Initialize graph_obstack.
20865 * src/print_graph.c (print_actions): CPP out useless code.
20866 (print_core): Don't output the last `\n' in labels.
20867 Use `quote'.
20868 * src/files.c (output_files): Output the VCG file.
20869 * src/main.c (main): Invoke print_graph ();
3e3da797 20870
957d4dbf 208712001-08-06 Marc Autret <autret_m@epita.fr>
22c2cbc0
AD
20872
20873 Automaton VCG graph output.
20874 Using option ``-g'' or long option ``--graph'', you can generate
20875 a gram_filename.vcg file containing a VCG description of the LALR (1)
20876 automaton of your grammar.
20877
20878 * src/main.c: Call to print_graph() function.
20879 * src/getargs.h: Update.
20880 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
20881 (graph_flag): New flag.
20882 (longopts): Update.
20883 (getargs): Add case `g'.
20884 * src/files.c (graph_obstack): New obstack struct.
20885 (open_files): Initialize new obstack.
20886 (output_files): Saves graph_obstack if required.
20887 * src/files.h (graph_obstack): New extern declaration.
20888 * src/Makefile.am: Add new source files.
20889
927c1557 208902001-08-06 Marc Autret <autret_m@epita.fr>
ce4d5ce0
AD
20891
20892 * src/print_graph.c, src/print_graph.h (graph): New.
20893 * src/vcg.h: New file.
20894 * src/vcg.c: New file, VCG graph handling.
20895
7333d403
AD
208962001-08-06 Marc Autret <autret_m@epita.fr>
20897
20898 Add of %source_extension and %header_extension which specify
20899 the source or/and the header output file extension.
20900
20901 * src/files.c (compute_base_names): Remove initialisation of
20902 src_extension and header_extension.
20903 (compute_exts_from_gf): Update.
20904 (compute_exts_from_src): Update.
20905 (output_files): Update.
20906 * src/reader.c (parse_header_extension_decl): New.
20907 (parse_source_extension_decl): New.
20908 (read_declarations): New case statements for the new tokens.
20909 * src/lex.c (percent_table): Add entries for %source_extension
20910 and %header_extension.
20911 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
20912
84163231
AD
209132001-08-06 Marc Autret <autret_m@epita.fr>
20914
20915 * configure.in: Bump to 1.28c.
20916 * doc/bison.texinfo: Texinfo thingies.
20917
8303fc42
AD
209182001-08-04 Pascal Bart <pascal.bart@epita.fr>
20919
20920 * tests/atconfig.in (CPPFLAGS): Add.
20921 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
20922
70a84437
AD
209232001-08-03 Akim Demaille <akim@epita.fr>
20924
20925 Version 1.28b.
20926
2ce10144
AD
209272001-08-03 Akim Demaille <akim@epita.fr>
20928
20929 * tests/Makefile.am (check-local): Ship testsuite.
20930 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
20931 Include `string.h'.
20932
1e3e4bc1
AD
209332001-08-03 Akim Demaille <akim@epita.fr>
20934
20935 * configure.in: Try using -Wformat when compiling.
20936
42b45b7f
AD
209372001-08-03 Akim Demaille <akim@epita.fr>
20938
20939 * configure.in: Bump to 1.28b.
20940
8f13fe33
AD
209412001-08-03 Akim Demaille <akim@epita.fr>
20942
20943 * src/complain.c: Adjust strerror_r portability issues.
20944
b37ba92c
AD
209452001-08-03 Akim Demaille <akim@epita.fr>
20946
20947 Version 1.28a.
20948
b0ce6046
AD
209492001-08-03 Akim Demaille <akim@epita.fr>
20950
20951 * src/getargs.c, src/getarg.h (skeleton)): Constify.
20952 * src/lex.c (literalchar): Avoid name clashes on `buf'.
20953 * src/getargs.c: Include complain.h.
20954 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
20955 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
20956
d01c415b
AD
209572001-08-03 Akim Demaille <akim@epita.fr>
20958
20959 * src/reader.c (readgram): Display hidden chars in error messages.
20960
459dd1a6
AD
209612001-08-03 Akim Demaille <akim@epita.fr>
20962
20963 Update to gettext 0.10.39.
20964
53b74c0c
AD
209652001-08-03 Akim Demaille <akim@epita.fr>
20966
20967 * lib/strspn.c: New.
20968
234a3be3
AD
209692001-08-01 Marc Autret <autret_m@epita.fr>
20970
20971 * doc/bison.texinfo: Update.
20972 * doc/bison.1 (mandoc): Update.
20973 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
20974 * src/files.c: Support output files extensions computing.
20975 (src_extension): New static variable.
20976 (header_extension): New static variable.
20977 (tr): New function.
20978 (get_extension_index): New function, gets the index of an extension
20979 filename in a string.
20980 (compute_exts_from_gf): New function, computes extensions from the
20981 grammar file extension.
20982 (compute_exts_from_src): New functions, computes extensions from the
20983 C source file extension, file given by ``-o'' option.
20984 (compute_base_names): Update.
20985 (output_files): Update.
20986
847bf1f5
AD
209872001-08-01 Robert Anisko <anisko_r@epita.fr>
20988
d995fee7 20989 * doc/bison.texi: Document @$.
847bf1f5
AD
20990 (Locations): New section.
20991
d074a105
AD
209922001-07-18 Akim Demaille <akim@epita.fr>
20993
20994 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
20995 * config/prev-version.txt, config/move-if-change: New.
20996 * Makefile.am: Adjust.
20997
3419715d
AD
209982001-07-08 Pascal Bart <pascal.bart@epita.fr>
20999
21000 * src/bison.simple (yyparse): Suppress warning `comparaison
21001 between signed and unsigned'.
21002
62ab6972
AD
210032001-07-05 Pascal Bart <pascal.bart@epita.fr>
21004
21005 * src/getargs.h (raw_flag): Remove.
21006 * src/getargs.c: Die on `-r'/`--raw'.
21007 * src/lex.c (parse_percent_token): Die on `%raw'.
21008 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
21009 * tests/calc.at: Suppress test with option `--raw'.
21010
1e24cc5b
AD
210112001-07-14 Akim Demaille <akim@epita.fr>
21012
21013 * config/: New.
21014 * configure.in: Require Autoconf 2.50.
21015 Update to gettext 0.10.38.
21016
32dfccf8
AD
210172001-03-16 Akim Demaille <akim@epita.fr>
21018
21019 * doc/bison.texinfo: ANSIfy the examples.
21020
cd5bd6ac
AD
210212001-03-16 Akim Demaille <akim@epita.fr>
21022
21023 * getargs.c (skeleton): New variable.
21024 (longopts): --skeleton is a new option.
21025 (shortopts, getargs): -S is a new option.
21026 * getargs.h: Declare skeleton.
21027 * output.c (output_parser): Use it.
21028
5141b016
AD
210292001-03-16 Akim Demaille <akim@epita.fr>
21030
21031 * m4/strerror_r.m4: New.
21032 * m4/error.m4: Run AC_FUNC_STRERROR_R.
21033 * lib/error.h, lib/error.c: Update.
21034
447992b9
AD
210352001-03-16 Akim Demaille <akim@epita.fr>
21036
21037 * src/getargs.c (longopts): Clean up.
21038
274d42ce
AD
210392001-02-21 Akim Demaille <akim@epita.fr>
21040
21041 * src/reader.c (gensym): `gensym_count' is your own.
21042 Use a static buf to create the symbol name, as token_buffer is no
21043 longer a buffer.
21044
22c821f3
AD
210452001-02-08 Akim Demaille <akim@epita.fr>
21046
21047 * src/conflicts.c (conflict_report): Be sure not to append to res
21048 between two calls, which could happen if both first sprintf were
21049 skipped, but not the first cp += strlen.
21050
18569462
AD
210512001-02-08 Akim Demaille <akim@epita.fr>
21052
21053 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
21054 New, from fileutils 4.0.37.
21055 * configure.in: Require Autoconf 2.49c. I took some time before
21056 making this decision. This is the only way out for portability
21057 issues in Bison, it would mean way too much duplicate effort to
21058 import in Bison features implemented in 2.49c since 2.13.
21059 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
21060
0d8f3c8a
AD
210612001-02-02 Akim Demaille <akim@epita.fr>
21062
21063 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
66075dcf 21064 * lib/xalloc.h, lib/xmalloc.c: Update.
0d8f3c8a 21065
f17bcd1f
AD
210662001-01-19 Akim Demaille <akim@epita.fr>
21067
21068 Get rid of the ad hoc handling of token_buffer in the scanner: use
21069 the obstacks.
21070
21071 * src/lex.c (token_obstack): New.
21072 (init_lex): Initialize it. No longer call...
21073 (grow_token_buffer): this. Remove it.
21074 Adjust all the places which used it to use the obstack.
21075
511e79b3
AD
210762001-01-19 Akim Demaille <akim@epita.fr>
21077
21078 * src/lex.h: Rename all the tokens:
21079 s/\bENDFILE\b/tok_eof/g;
21080 s/\bIDENTIFIER\b/tok_identifier/g;
21081 etc.
21082 Let them be enums, not #define, to ease debugging.
21083 Adjust all the code.
21084
0d6508ef
AD
210852001-01-18 Akim Demaille <akim@epita.fr>
21086
21087 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
21088 * src/lex.c (maxtoken, grow_token_buffer): Static.
21089
6deb4447
AD
210902001-01-18 Akim Demaille <akim@epita.fr>
21091
21092 Since we now use obstacks, more % directives can be enabled.
21093
21094 * src/lex.c (percent_table): Also accept `%yacc',
21095 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
21096 `%debug'.
21097 Handle the actions for `%semantic_parser' and `%pure_parser' here,
21098 instead of returning a token.
21099 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
21100 * src/reader.c (read_declarations): Adjust.
21101 * src/files.c (open_files): Don't call `compute_base_names', don't
21102 compute `attrsfile' since they depend upon data which might be
21103 *in* the input file now.
21104 (output_files): Do it here.
21105 * src/output.c (output_headers): Document the fact that this patch
21106 introduces a guaranteed SEGV for semantic parsers.
21107 * doc/bison.texinfo: Document them.
21108 * tests/suite.at: Exercise these %options.
21109
ff4423cc
AD
211102000-12-20 Akim Demaille <akim@epita.fr>
21111
21112 Also handle the output file (--verbose) with obstacks.
21113
21114 * files.c (foutput): Remove.
21115 (output_obstack): New.
21116 Adjust all dependencies.
21117 * src/conflicts.c: Return a string.
21118 * src/system.h (obstack_grow_string): Rename as...
21119 (obstack_sgrow): this. Be ready to work with non literals.
21120 (obstack_fgrow4): New.
21121
956dba3a
AD
211222000-12-20 Akim Demaille <akim@epita.fr>
21123
21124 * src/files.c (open_files): Fix the computation of short_base_name
21125 in the case of `-o foo.tab.c'.
21126
337bab46
AD
211272000-12-20 Akim Demaille <akim@epita.fr>
21128
21129 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
21130 (copy_dollar): Now that everything uses obstacks, get rid of the
21131 FILE * parameters.
21132
5d3214b8
AD
211332000-12-20 Akim Demaille <akim@epita.fr>
21134
21135 * src/files.c (open_files): Actually the `.output' file is based
21136 on the short_base_name, not base_name.
21137 * tests/suite.at (Checking output file names): Adjust.
21138
29092a57
AD
211392000-12-20 Akim Demaille <akim@epita.fr>
21140
21141 * src/bison.s1: Remove, we now use directly...
21142 * src/bison.simple: this.
21143 * src/Makefile.am: Use pkgdata instead of data.
21144
ea5607fd
AD
211452000-12-20 Akim Demaille <akim@epita.fr>
21146
21147 * src/files.c (guard_obstack): New.
21148 (open_files): Initialize it.
21149 (output_files): Dump it...
21150 * src/files.h: Export it.
21151 * src/reader.c (copy_guard): Use it.
21152
27110317
AD
211532000-12-19 Akim Demaille <akim@epita.fr>
21154
21155 * src/files.c (outfile, defsfile, actfile): Removed as global
21156 vars.
21157 (open_files): Don't compute them.
21158 (output_files): Adjust.
21159 (base_name, short_base_name): Be global.
21160 Adjust dependencies.
21161
19c50364
AD
211622000-12-19 Akim Demaille <akim@epita.fr>
21163
21164 * src/files.c (strsuffix): New.
21165 (stringappend): Be just like strcat but allocate.
21166 (base_names): Eve out from open_files.
21167 Try to simplify the rather hairy computation of base_name and
21168 short_base_name.
21169 (open_files): Use it.
21170 * tests/suite.at (Checking output file names): New test.
21171
573c1d9f
AD
211722000-12-19 Akim Demaille <akim@epita.fr>
21173
21174 * src/system.h (obstack_grow_literal_string): Rename as...
21175 (obstack_grow_string): this.
21176 * src/output.c (output_parser): Recognize `%% actions' instead of
21177 `$'.
21178 * src/bison.s1: s/$/%% actions/.
21179 * src/bison.hairy: Likewise.
21180
ef7ddedd
AD
211812000-12-19 Akim Demaille <akim@epita.fr>
21182
21183 * src/output.c (output_parser): Compute the `#line' lines when
21184 there are.
21185 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
21186 Suggested by Hans Aberg.
21187
ff61dabd
AD
211882000-12-19 Akim Demaille <akim@epita.fr>
21189
21190 Let the handling of the skeleton files be local to the procedures
21191 that use it.
21192
21193 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
21194 longer static.
21195 (fparser, open_extra_files): Remove.
21196 (open_files, output_files): Don't take care of fparser.
21197 * src/files.h: Adjust.
21198 * src/output.c (output_parser): Open and close the file to the
21199 skeleton.
21200 * src/reader.c (read_declarations): When %semantic_parser, open
21201 fguard.
21202
55b96341
AD
212032000-12-19 Akim Demaille <akim@epita.fr>
21204
21205 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
21206 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
21207
358c15b7
AD
212082000-12-19 Akim Demaille <akim@epita.fr>
21209
21210 * src/files.c (open_files): Yipee! We no longer need all the code
21211 looking for `/tmp' since we have no tmp file.
21212
7de3329e
AD
212132000-12-19 Akim Demaille <akim@epita.fr>
21214
21215 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
21216 New macros.
21217 * src/files.c (open_files): Less dependency on MSDOS etc.
21218
3abcd459
AD
212192000-12-14 Akim Demaille <akim@epita.fr>
21220
21221 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
21222 Provide a default definition.
21223 Use it when executing the default @ action.
21224 * src/reader.c (reader_output_yylsp): No longer include
21225 `timestamp' and `text' in the default YYLTYPE.
21226
2a91a95e
AD
212272000-12-12 Akim Demaille <akim@epita.fr>
21228
21229 * src/reader.c (copy_definition, parse_union_decl, copy_action)
21230 (copy_guard): Quote the file names.
21231 Reported by Laurent Mascherpa.
21232
14d3eb9b
AD
212332000-12-12 Akim Demaille <akim@epita.fr>
21234
21235 * src/output.c (output_headers, output_program, output): Be sure
21236 to escape special characters when outputting filenames.
21237 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
21238 (output_headers): Don't depend on them, Use ACTSTR.
21239
d7045ec6
AD
212402000-11-17 Akim Demaille <akim@epita.fr>
21241
21242 * lib/obstack.h: Formatting changes.
21243 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
21244 prevents type checking.
21245 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
21246 cast the value to (void *): assigning a `foo *' to a `void *'
21247 variable is valid.
21248 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
21249 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
21250 append characters.
21251
6fd54b73
AD
212522000-11-17 Akim Demaille <akim@epita.fr>
21253
21254 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
21255 as...
21256 (suite.m4, regression.m4, calc.m4): these.
21257 * tests/atgeneral.m4: Update from CVS Autoconf.
21258
4c50eae6
AD
212592000-11-17 Akim Demaille <akim@epita.fr>
21260
21261 * tests/regression.m4 (%union and --defines): New test,
21262 demonstrating a current bug in the obstack implementation.
21263
a35f64ea
AD
212642000-11-17 Akim Demaille <akim@epita.fr>
21265
21266 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
21267 macros.
21268 Use them to declare the variables which are global or local to
21269 `yyparse'.
21270
7de23534
AD
212712000-11-17 Akim Demaille <akim@epita.fr>
21272
21273 * acconfig.h: Remove, no longer used.
21274
aa7815f5
AD
212752000-11-07 Akim Demaille <akim@epita.fr>
21276
21277 * src: s/Copyright (C)/Copyright/g.
21278
5af1f549
AD
212792000-11-07 Akim Demaille <akim@epita.fr>
21280
21281 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
21282 defining.
21283 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
21284
553e2b22
AD
212852000-11-07 Akim Demaille <akim@epita.fr>
21286
21287 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
21288 Merge in a single CPP if/else.
21289
8a4f41d6
AD
212902000-11-07 Akim Demaille <akim@epita.fr>
21291
21292 * src/output.c (output): Remove useless variables.
21293 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
21294 argument `data' for consistency with the prototypes.
21295 Qualify it `const'.
21296 (obstack_copy, obstack_copy0): Rename the second argument as
21297 `address' for consistency. Qualify it `const'.
21298 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
21299 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
21300 `const' their input argument (`data' or `address').
21301 Adjust the corresponding macros to include `const' in casts.
21302
095a3fb5
AD
213032000-11-03 Akim Demaille <akim@epita.fr>
21304
21305 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
21306 s/PFILE1/BISON_HAIRY/.
21307 Adjust dependencies.
21308
d1cdce7c
AD
213092000-11-03 Akim Demaille <akim@epita.fr>
21310
090c5ebf 21311 For some reason, this was not applied.
d1cdce7c
AD
21312
21313 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
21314 `unlink': it's no longer used.
21315
9311529b
AD
213162000-11-03 Akim Demaille <akim@epita.fr>
21317
21318 * src/files.c (skeleton_find): New function, eved out of...
21319 (open_files, open_extra_files): here.
21320
d8880f69
AD
213212000-11-03 Akim Demaille <akim@epita.fr>
21322
21323 Don't use `atexit'.
21324
21325 * src/files.c (obstack_save): New function.
21326 (done): Rename as...
21327 (output_files): this.
21328 Use `obstack_save'.
21329 * src/main.c (main): Don't use `atexit' to register `done', since
21330 it no longer has to remove tmp files, just call `output_files'
21331 when there are no errors.
21332
0dbb648e
AD
213332000-11-02 Akim Demaille <akim@epita.fr>
21334
21335 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
21336 `unlink': it's no longer used.
21337 * src/files.h: Formatting changes.
21338
896fe5c1
AD
213392000-11-02 Akim Demaille <akim@epita.fr>
21340
21341 Remove the last uses of mktemp and unlink/delete.
21342
21343 * src/files.c (fdefines, ftable): Removed.
21344 (defines_ostack, table_obstack): New.
21345 Adjust dependencies of the former into uses of the latter.
21346 * src/output.c (output_short_or_char_table, output_short_table):
21347 Convert to using obstacks.
21348 * src/reader.c (copy_comment2): Accept one FILE * and two
21349 obstacks.
21350 (output_token_defines, reader_output_yylsp): Use obstacks.
21351 * src/system.h (obstack_fgrow3): New.
1f65350a 21352 * po/POTFILES.in: Adjust.
896fe5c1 21353
dd60faec
AD
213542000-11-01 Akim Demaille <akim@epita.fr>
21355
21356 Change each use of `fattrs' into a use of `attrs_obstack'.
21357
21358 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
21359 * src/files.c (fattrs): Remove.
21360 (attrs_obstack): New.
21361 Adjust all dependencies.
21362 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
21363
8c7ebe49
AD
213642000-11-01 Akim Demaille <akim@epita.fr>
21365
21366 Introduce obstacks.
21367 Change each use of `faction' into a use of `action_obstack'.
21368
21369 * lib/obstack.h, lib/obstack.c: New files.
21370 * src/files.c (faction): Remove.
21371 (action_obstack): New.
21372 Adjust all dependencies.
21373
77aee789
AD
213742000-10-20 Akim Demaille <akim@epita.fr>
21375
21376 * lib/quote.h (PARAMS): New macro. Use it.
21377
43591cec
AD
213782000-10-16 Akim Demaille <akim@epita.fr>
21379
21380 * src/output.c (output_short_or_char_table): New function.
21381 (output_short_table, output_token_translations): Use it.
21382 (goto_actions): Use output_short_table.
21383
1e9798d5
AD
213842000-10-16 Akim Demaille <akim@epita.fr>
21385
21386 * src/symtab.c (bucket_new): New function.
21387 (getsym): Use it.
21388
21389 * src/output.c (output_short_table): New argument to display the
21390 comment associated with the table.
21391 Adjust dependencies.
21392 (output_gram): Use it.
21393 (output_rule_data): Nicer output layout for YYTNAME.
21394
f282676b
AD
213952000-10-16 Akim Demaille <akim@epita.fr>
21396
21397 * src/lex.c (read_typename): New function.
21398 (lex): Use it.
21399 * src/reader.c (copy_dollar): Likewise.
21400
550a72a3
AD
214012000-10-16 Akim Demaille <akim@epita.fr>
21402
21403 * src/reader.c (copy_comment2): Expect the input stream to be on
21404 the `/' which is suspected to open a comment, instead of being
21405 called after `//' or `/*' was read.
21406 (copy_comment, copy_definition, parse_union_decl, copy_action)
21407 (copy_guard): Adjust.
21408
131e2fef
AD
214092000-10-16 Akim Demaille <akim@epita.fr>
21410
21411 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
21412 `read_signed_integer'.
21413
79282c5a
AD
214142000-10-16 Akim Demaille <akim@epita.fr>
21415
21416 * src/reader.c (copy_dollar): New function.
21417 (copy_guard, copy_action): Use it.
21418
ff4a34be
AD
214192000-10-16 Akim Demaille <akim@epita.fr>
21420
21421 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
21422 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
21423 New files, from Fileutils 4.0.27.
21424 * src/main.c (printable_version): Remove.
21425 * src/lex.c, src/reader.c: Use `quote'.
21426
214272000-10-04 Akim Demaille <akim@epita.fr>
21428
21429 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
21430
14ded682
AD
214312000-10-04 Akim Demaille <akim@epita.fr>
21432
21433 * doc/bison.texinfo: Various typos spotted by Neil Booth.
21434
8e03724b
AD
214352000-10-04 Akim Demaille <akim@epita.fr>
21436
21437 When a literal string is used to define two different tokens,
21438 `bison -v' segfaults.
21439 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
21440
21441 * tests/regression.m4: New file.
21442 Include the core of the sample provided by Piotr Gackiewicz.
21443 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
21444 properly.
21445
a9e64249
AD
214462000-10-04 Akim Demaille <akim@epita.fr>
21447
21448 * src/reader.c (parse_expect_decl): Keep `count' within the size
21449 of `buffer'.
21450 From Neil Booth.
21451
da9abf43
AD
214522000-10-02 Paul Eggert <eggert@twinsun.com>
21453
21454 * bison.s1 (yyparse): Assign the default value
21455 unconditionally, to avoid a GCC warning and make the parser a
21456 tad smaller.
21457
c33638bb
AD
214582000-10-02 Akim Demaille <akim@epita.fr>
21459
21460 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
21461 options.
21462
444c570a
AD
214632000-10-02 Akim Demaille <akim@epita.fr>
21464
21465 * src/derives.c, src/print.c, src/reduce.c: To ease the
21466 translation, move some `\n' out of the translated strings.
21467
89cab50d
AD
214682000-10-02 Akim Demaille <akim@epita.fr>
21469
21470 The location tracking mechanism is precious for parse error
21471 messages. Nevertheless, it is enabled only when `@n' is used in
21472 the grammar, which is a different issue (you can use it in error
21473 message, but not in the grammar per se). Therefore, there should
21474 be another means to enable it.
21475
21476 * src/getargs.c (getargs): Support `--locations'.
21477 (usage): Report it.
21478 * src/getargs.h (locationsflag): Export it.
21479 * src/lex.c (percent_table): Support `%locations'.
21480 * src/reader.c (yylsp_needed): Remove this variable, now replaced
21481 with `locationsflag'.
21482 * doc/bison.texinfo: Document `--locations' and `%locations'.
21483 Sort the options.
21484 * tests/calc.m4: Test it.
21485
21486 For regularity of the names, replace each
21487 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
21488 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
21489 In addition replace each `flag' with `_flag'.
21490
d6c2cba0
AD
214912000-10-02 Akim Demaille <akim@epita.fr>
21492
21493 Also test parse error messages, including with YYERROR_VERBOSE.
21494
21495 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
21496 associative).
21497 Use it to check the computations.
21498 Use it to check `nonassoc' is honored.
21499 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
21500 `--yyerror-verbose'.
21501 (_AT_CHECK_CALC): Adjust to this option.
21502 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
21503
5a35a6cb
AD
215042000-10-02 Akim Demaille <akim@epita.fr>
21505
21506 Test also `--verbose', `--defines' and `--name-prefix'. Testing
21507 the latter demonstrates a flaw in the handling of non debugging
21508 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
21509 was used in order to simplify:
21510
21511 #if YYDEBUG
21512 if (yydebug)
21513 {
21514 ...
21515 }
21516 #endif
21517
21518 into
21519
21520 if (yydebug)
21521 {
21522 ...
21523 }
21524
21525 unfortunately this leads to a CPP conflict when
21526 `--name-prefix=foo' is used since it produces `#define yydebug
21527 foodebug'.
21528
21529 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
21530 (YYDPRINTF): New macro.
21531 Spread its use.
21532 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
21533 the bison options.
21534 Also test `--verbose', `--defines' and `--name-prefix'.
21535
71da9eea
AD
215362000-10-02 Akim Demaille <akim@epita.fr>
21537
21538 Improve the readability of the produced parsers.
21539
21540 * src/bison.s1: Formatting changes.
21541 Improve the comment related to the `$' mark.
21542 (yydefault): Don't fall through to `yyresume': `goto' there.
21543 * src/output.c (output_parser): When the `$' is met, skip the end
21544 of its line.
21545 New variable, `number_of_dollar_signs', to check there's exactly
21546 one `$' in the parser skeleton.
21547
95e36146
AD
215482000-10-02 Akim Demaille <akim@epita.fr>
21549
21550 * lib/xstrdup.c: New file, from the fileutils.
21551 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
21552 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
21553 instead of strlen + xmalloc + strcpy.
21554 * src/symtab.c (copys): Remove, use xstrdup instead.
21555
d7020c20
AD
215562000-10-02 Akim Demaille <akim@epita.fr>
21557
21558 * src/gram.h (associativity): New enum type which replaces the
21559 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
21560 `right_assoc', `left_assoc' and `non_assoc'.
21561 Adjust all dependencies.
21562 * src/reader.c: Formatting changes.
21563 (LTYPESTR): Don't define it, use it as a literal in
21564 `reader_output_yylsp'.
21565 * src/symtab.h (symbol_class): New enum type which replaces the
21566 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
21567 `sunknown', `stoken and `snterm'.
21568
1916f98e
AD
215692000-10-02 Akim Demaille <akim@epita.fr>
21570
21571 * src/getargs.c (fixed_outfiles): Rename as...
21572 (yaccflag): for consistency and accuracy.
21573 Adjust dependencies.
21574
d7913476
AD
215752000-10-02 Akim Demaille <akim@epita.fr>
21576
21577 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
21578 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
21579 difficult and introduced a lot of core dump. It turns out that
21580 Bison used an implementation of `xmalloc' based on `calloc', and
21581 at various places it does depend upon the initialization to 0. I
21582 have not tried to isolate the pertinent places, and all the former
21583 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
21584 someone should address this issue.
21585
21586 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
21587 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
21588 files.
21589 Adjust dependencies.
21590 * src/warshall.h: New file.
21591 Propagate.
21592
340ef489
AD
215932000-10-02 Akim Demaille <akim@epita.fr>
21594
21595 Various anti-`extern in *.c' changes.
21596
21597 * src/system.h: Include `assert.h'.
21598
b2ca4022
AD
215992000-10-02 Akim Demaille <akim@epita.fr>
21600
21601 * src/state.h (nstates, final_state, first_state, first_shift)
21602 (first_reduction): Move their exportation from here...
21603 * src/LR0.h: to here.
21604 Adjust dependencies.
21605 * src/getargs.c (statisticsflag): New variable.
21606 Add support for `--statistics'.
21607 Adjust dependencies.
21608
21609 Remove a lot of now useless `extern' statements in most files.
21610
403b315b
AD
216112000-10-02 Akim Demaille <akim@epita.fr>
21612
21613 * src/LR0.h: New file.
21614 Propagate its use.
21615
07a58c13
AD
216162000-10-02 Akim Demaille <akim@epita.fr>
21617
21618 * src/print.h: New file.
21619 Propagate its use.
21620 * src/print.c: Formatting and ordering changes.
21621 (verbose, terse): Replace with...
21622 (print_results): this new function.
21623 Adjust dependencies.
21624
0619caf0
AD
216252000-10-02 Akim Demaille <akim@epita.fr>
21626
21627 * src/conflicts.c (conflict_report): New function.
21628 (conflict_log, verbose_conflict_log): Replace with...
21629 (print_conflicts): this function.
21630 Adjust dependencies.
21631 * src/conflicts.h: New file.
21632 Propagate its inclusion.
21633
3519ec76
AD
216342000-10-02 Akim Demaille <akim@epita.fr>
21635
21636 * src/nullable.h: New file.
21637 Propagate its inclusion.
21638 * src/nullable.c: Formatting changes.
21639
015acc48
AD
216402000-10-02 Akim Demaille <akim@epita.fr>
21641
21642 * src/reduce.h: New file.
21643 Propagate its inclusion.
21644 * src/reduce.c: Topological sort and other formatting changes.
21645 (bool, TRUE, FALSE): Move their definition to...
21646 * src/system.h: here.
21647
8963a27b
AD
216482000-10-02 Akim Demaille <akim@epita.fr>
21649
21650 * src/files.c: Formatting changes.
21651 (tryopen, tryclose, openfiles): Rename as...
21652 (xfopen, xfclose, open_files): this.
21653 (stringappend): static.
21654 * src/files.h: Complete the list of exported symbols.
21655 Propagate its use.
21656
a70083a3
AD
216572000-10-02 Akim Demaille <akim@epita.fr>
21658
21659 * src/reader.h: New file.
21660 Propagate its use instead of tedious list of `extern' and
21661 prototypes.
21662 * src/reader.c: Formatting changes, topological sort,
21663 s/register//.
21664
abadc117
AD
216652000-10-02 Akim Demaille <akim@epita.fr>
21666
21667 * src/lex.h: Prototype `lex.c' exported functions.
21668 * src/reader.c: Adjust.
21669 * src/lex.c: Formatting changes.
21670 (safegetc): Rename as...
21671 (xgetc): this.
21672
720d742f
AD
216732000-10-02 Akim Demaille <akim@epita.fr>
21674
21675 * src/lalr.h: New file.
21676 Propagate its inclusion instead of prototypes and `extern'.
21677 * src/lalr.c: Formatting changes, topological sorting etc.
21678
f2acea59
AD
216792000-10-02 Akim Demaille <akim@epita.fr>
21680
21681 * src/output.c (token_actions): Introduce a temporary array,
21682 YYDEFACT, that makes it possible for this function to use
21683 output_short_table.
21684
d019d655
AD
216852000-10-02 Akim Demaille <akim@epita.fr>
21686
21687 `user_toknums' is output as a `short[]' in `output.c', while it is
21688 defined as a `int[]' in `reader.c'. For consistency with the
21689 other output tables, `user_toknums' is now defined as a table of
21690 shorts.
21691
21692 * src/reader.c (user_toknums): Be a short table instead of an int
21693 table.
21694 Adjust dependencies.
21695
21696 Factor the short table outputs.
21697
21698 * src/output.c (output_short_table): New function.
21699 * src/output.c (output_gram, output_stos, output_rule_data)
21700 (output_base, output_table, output_check): Use it.
21701
6c89f1c1
AD
217022000-10-02 Akim Demaille <akim@epita.fr>
21703
21704 * src/output.c (output): Topological sort of the functions, in
21705 order to get rid of the `static' prototypes.
21706 No longer use `register'.
21707 * src/output.h: New file.
21708 Propagate its inclusion in files explicitly prototyping functions
21709 from output.c.
21710
d9efd181
AD
217112000-09-21 Akim Demaille <akim@epita.fr>
21712
21713 * src/atgeneral.m4: Update from Autoconf.
21714
c29240e7 217152000-09-21 Akim Demaille <akim@epita.fr>
2fa6973e
AD
21716
21717 * src/closure.h: New file.
21718 * src/closure.c: Formatting changes, topological sort over the
21719 functions, use of closure.h.
21720 (initialize_closure, finalize_closure): Rename as...
21721 (new_closure, free_closure): these. Adjust dependencies.
21722 * src/LR0.c: Formatting changes, topological sort, use of
21723 cloture.h.
21724 (initialize_states): Rename as...
21725 (new_states): this.
21726 * src/Makefile.am (noinst_HEADERS): Adjust.
21727
499daa50
AD
217282000-09-20 Akim Demaille <akim@epita.fr>
21729
21730 * src/acconfig.h: Don't protect config.h against multiple
21731 inclusion.
21732 Don't define PARAMS.
21733 * src/system.h: Define PARAMS.
21734 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
21735 purpose of config.h. system.h must not try to fix wrong
21736 definitions in config.h.
21737
cc84fd5d
AD
217382000-09-20 Akim Demaille <akim@epita.fr>
21739
21740 * src/derives.h: New file.
21741 * src/main.c, src/derives.h: Use it.
21742 Formatting changes.
21743 * src/Makefile.am (noinst_HEADERS): Adjust.
21744
db5b3a89
AD
217452000-09-20 Akim Demaille <akim@epita.fr>
21746
21747 * tests/atgeneral.m4: Update from Autoconf.
21748 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
21749 (AT_CHECK_CALC): New macros.
21750 Use these macros to test bison with options `', `--raw',
21751 `--debug', `--yacc', `--yacc --debug'.
21752
ceed8467
AD
217532000-09-19 Akim Demaille <akim@epita.fr>
21754
21755 * src/output.c: Formatting changes.
21756 * src/machine.h: Remove, leaving its contents in...
21757 * src/system.h: here.
21758 Include stdio.h.
21759 Adjust all dependencies on stdio.h and machine.h.
21760 * src/getargs.h: New file.
21761 Let all `extern' declarations about getargs.c be replaced with
21762 inclusion of `getargs.h'.
21763 * src/Makefile.am (noinst_HEADERS): Adjust.
21764
21765 * tests/calc.m4 (yyin): Be initialized in main, not on the global
21766 scope.
21767 (yyerror): Returns void, not int.
21768 * doc/bison.texinfo: Formatting changes.
21769
05a1d24b
AD
217702000-09-19 Akim Demaille <akim@epita.fr>
21771
21772 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
21773 portable.
21774
cbd25751
AD
217752000-09-18 Akim Demaille <akim@epita.fr>
21776
21777 * configure.in: Append WARNING_CFLAGS to CFLAGS.
21778 * src/Makefile.am (INCLUDES): Don't.
21779 Be ready to fetch headers in lib/.
21780
13863333
AD
217812000-09-18 Akim Demaille <akim@epita.fr>
21782
21783 * doc/bison.texinfo: Update the copyright.
21784 ANSIfy and GNUify the examples.
21785 Remove the old menu.
21786
0d533154
AD
217872000-09-18 Akim Demaille <akim@epita.fr>
21788
21789 First set of tests: use the `calc' example from the documentation.
21790
21791 * src/bison.s1 (yyparse): Condition the code using `yytname' which
21792 is defined only when YYDEBUG is.
21793 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
21794 * src/files.c (tryopen, tryclose): Formatting changes.
21795 Move to the top and be static.
21796 * src/reader.c (read_signed_integer): Likewise.
21797 * tests/calc.m4: New file.
21798 * Makefile.am, suite.m4: Adjust.
21799 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
21800
e79137ac
AD
218012000-09-18 Akim Demaille <akim@epita.fr>
21802
21803 Add support for an Autotest test suite for Bison.
21804
21805 * m4/m4.m4, m4/atconfig.m4: New files.
21806 * m4/Makefile.am (EXTRA_DIST): Adjust.
21807 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
21808 files.
21809 * src/getargs.c: Display a more standard --version message.
21810 * src/reader.c (reader): Formatting changes.
21811 No longer depend upon VERSION_STRING.
21812 * configure.in: No longer use `dnl'.
21813 Set up the test suite and the new directory `tests/.
21814 (VERSION_STRING): Remove.
21815
27821bff
AD
218162000-04-14 Akim Demaille <akim@epita.fr>
21817
21818 * src/reader.c (copy_comment2): New function, same as former
21819 `copy_comment', but outputs into two FILE *.
21820 (copy_comment): Use it.
21821 (parse_union_decl): Use it.
21822 (get_type, parse_start_decl): Use the same `invalid' message.
21823 (parse_start_decl, parse_union_decl): Use the same `multiple'
21824 message.
21825 (parse_union_decl, copy_guard, copy_action): Use the same
21826 `unmatched' message.
21827 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
21828
cfe5fbc0
AD
218292000-03-31 Akim Demaille <akim@epita.fr>
21830
21831 * src/files.c (tryopen, tryclose): Move to the top.
21832 Be static.
21833
cb7db13e
AD
218342000-03-31 Akim Demaille <akim@epita.fr>
21835
21836 * src/main.c (main): Don't call `done', exit does it.
21837
a0f6b076
AD
218382000-03-31 Akim Demaille <akim@epita.fr>
21839
36281465
AD
21840 * allocate.c: s/return (foo)/return foo/.
21841 * lalr.c: Likewise.
21842 * LR0.c: Likewise.
21843 * output.c: Likewise.
21844 * reader.c: Likewise.
21845 * symtab.c: Likewise.
21846 * vmsgetargs.c: Likewise.
21847
218482000-03-31 Akim Demaille <akim@epita.fr>
21849
21850 Clean up the error reporting functions.
a0f6b076
AD
21851
21852 * src/report.c: New file.
21853 * src/report.h: Likewise.
21854 * src/Makefile.am: Adjust.
21855 * m4/error.m4: New file.
21856 * m4/Makefile.am: Adjust.
21857 * configure.in (jm_PREREQ_ERROR): Call it.
21858 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
21859 Remove.
21860 (fatal, fatals): Remove. All callers use complain.c::fatal.
21861 (warn, warni, warns, warnss, warnss): Remove. All callers use
21862 complain.c::complain.
21863 (toomany): Remove, use fatal instead.
21864 * src/files.c (done): No argument, use complain_message_count.
21865 * src/main.c (main): Register `done' to `atexit'.
21866
21867 * src/getargs.c (usage): More `fputs', less `fprintf'.
21868
18539825
AD
218692000-03-28 Akim Demaille <akim@epita.fr>
21870
21871 * lib/: New directory.
21872 * Makefile.am (SUBDIRS): Adjust.
21873 * configure.in: Adjust.
21874 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
21875 useless.
21876 * src/alloca.c: Moved to lib/.
21877 * src/getopt.c: Likewise.
21878 * src/getopt1.c: Likewise.
21879 * src/getopt.h: Likewise.
21880 * src/ansi2knr.c: Likewise.
21881 * src/ansi2knr.1: Likewise.
21882 * src/Makefile.am: Adjust.
21883 * lib/Makefile.am: New file.
21884
9f306f2a
AD
218852000-03-28 Akim Demaille <akim@epita.fr>
21886
21887 * src/getargs.c (usage): Refresh the help message.
21888
0ba347b6
AD
218892000-03-17 Akim Demaille <akim@epita.fr>
21890
21891 * src/getopt1.c: Updated from textutils 2.0e
21892 * src/getopt.c: Likewise.
21893 * src/getopt.h: Likewise.
21894
dbe7f271
AD
218952000-03-17 Akim Demaille <akim@epita.fr>
21896
21897 * src/Makefile.am (bison.simple): Fix the awk program: quote only
21898 the file name, not the whole `#line LINE FILE'.
21899
75bbe78d
AD
219002000-03-17 Akim Demaille <akim@epita.fr>
21901
21902 On syntax errors, report the token on which we choked.
21903
aa5fd0ee
AD
21904 * src/bison.s1 (yyparse): In the label yyerrlab, when
21905 YYERROR_VERBOSE, add yychar in msg.
75bbe78d 21906
7b306f52
AD
219072000-03-17 Akim Demaille <akim@epita.fr>
21908
aa5fd0ee 21909 * src/reader.c (copy_at): New function.
7b306f52
AD
21910 (copy_guard): Use it.
21911 (copy_action): Use it.
21912
e87b5700
AD
219132000-03-17 Akim Demaille <akim@epita.fr>
21914
21915 Be kind to translators, save some useless translations.
21916
aa5fd0ee 21917 * src/main.c (banner): New function.
e87b5700
AD
21918 (fatal_banner): Use it.
21919 (warn_banner): Use it.
21920
ae3c3164
AD
219212000-03-17 Akim Demaille <akim@epita.fr>
21922
aa5fd0ee
AD
21923 * src/reader.c (copy_definition): Use copy_string and
21924 copy_comment. Removed now unused `match', `ended',
21925 `cplus_comment'.
ae3c3164
AD
21926 (copy_comment, copy_string): Moved, to be visible from
21927 copy_definition.
21928
4dc58e7c
AD
219292000-03-17 Akim Demaille <akim@epita.fr>
21930
aa5fd0ee
AD
21931 * src/reader.c (copy_string): Declare `static inline'. No
21932 problems with inline, since it is checked by configure.
4dc58e7c
AD
21933 (copy_comment): Likewise.
21934
0a6384c4
AD
219352000-03-17 Akim Demaille <akim@epita.fr>
21936
aa5fd0ee 21937 * src/reader.c (packsymbols): Formatting changes.
0a6384c4 21938
3cef001a
AD
219392000-03-17 Akim Demaille <akim@epita.fr>
21940
aa5fd0ee 21941 * src/reader.c (copy_comment): New function, factored out from:
3cef001a
AD
21942 (copy_action): Use it. Removed now unused `match', `ended',
21943 `cplus_comment'.
21944 (copy_guard): Likewise.
21945
ca36d2ef
AD
219462000-03-17 Akim Demaille <akim@epita.fr>
21947
aa5fd0ee 21948 * src/reader.c (copy_string): New function, factored out from:
ca36d2ef
AD
21949 (copy_action): Use it.
21950 (copy_guard): Likewise.
21951
6666f98f
AD
219522000-03-17 Akim Demaille <akim@epita.fr>
21953
21954 Change the handling of @s so that they behave exactly like $s.
21955 There is now a pseudo variable @$ (readble and writable), location
21956 of the lhs of the rule (by default ranging from the location of
21957 the first symbol of the rhs, to the location of the last symbol,
21958 or, if the rhs is empty, YYLLOC).
21959
21960 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
21961 yyval.
21962 (yyparse): When providing a default semantic action, provide a
21963 default location action.
21964 (after the $): No longer change `*YYLSP', just stack YYLOC the
21965 same way you stack YYVAL.
21966 * src/reader.c (read_declarations): Use warns.
21967 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
21968 (copy_action, case '@'): Likewise.
21969 Use a standard error message, to save useless work from
21970 translators.
21971
41aca2e0
AD
219722000-03-17 Akim Demaille <akim@epita.fr>
21973
aa5fd0ee
AD
21974 * src/bison.s1: Formatting and cosmetics changes.
21975 * src/reader.c: Likewise.
41aca2e0
AD
21976 Update the Copyright notice.
21977
dc08c1d5
AD
219782000-03-17 Akim Demaille <akim@epita.fr>
21979
aa5fd0ee
AD
21980 * src/bison.s1 (#line): All set to `#line' only, since the
21981 Makefile now handles them.
dc08c1d5 21982
9ee3c97b
AD
219832000-03-16 Akim Demaille <akim@epita.fr>
21984
21985 * src/output.c (output_rule_data): Output the documentation of
21986 some of the tables.
21987 (Copyright notice): Update.
21988 Formatting changes.
21989
0de741ca
AD
219902000-03-16 Akim Demaille <akim@epita.fr>
21991
21992 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
21993 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
21994 One `#if YYDEBUG' remains, since it uses variables which are
21995 defined only if `YYDEBUG != 0'.
21996
bb10be54
AD
219972000-03-16 Akim Demaille <akim@epita.fr>
21998
21999 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
22000 and related variables so that the similarities are highlighted.
22001
b07b484a
AD
220022000-03-16 Akim Demaille <akim@epita.fr>
22003
22004 * src/bison.s1: Properly indent CPP directives.
22005
361f60b3
AD
220062000-03-16 Akim Demaille <akim@epita.fr>
22007
22008 * src/bison.s1: Properly indent the `alloca' CPP section.
22009
8c44d3ec
AD
220102000-03-16 Akim Demaille <akim@epita.fr>
22011
22012 Do not hard code values of directories in `configure.in'.
22013 Update the `configure' tool chain.
22014
22015 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
22016 src/makefile.am.
22017 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
22018 (AC_OUTPUT): Add m4/Makefile.
22019 Bump to bison 1.28a, 1.29 has never been released.
22020 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
22021 handled via src/Makefile.am.
22022 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
22023 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
22024 autoheader.
22025 * Makefile.am (SUBDIRS): Add m4.
22026 (ACLOCAL_AM_FLAGS): New variable.
22027 (AUTOMAKE_OPTIONS): Add check-news.
22028 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
22029 the proper line number and file name.
22030 (DEFS): Propagate the location of bison library files and of the
22031 locale files.
22032 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
22033 builddir.
22034 * acinclude.m4: Remove, replaced by the directory m4.
22035 * m4/Makefile.am (EXTRA_DIST): New variable.
22036 * m4/gettext.m4: New file, from the fileutils.
22037 * m4/lcmessage.m4: Likewise
22038 * m4/progtest.m4: Likewise.
22039 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
22040
f95997e7
AD
220412000-03-10 Akim Demaille <akim@epita.fr>
22042
22043 * src/closure.c:
22044 Formatting changes of various comments.
22045 Respect the GNU coding standards at various places.
22046 Don't use `_()' when no translation is needed.
22047
220481999-12-13 Jesse Thilo <jthilo@gnu.org>
22049
22050 * src/files.c:
22051 OS/2 honors TMPDIR environment variable.
22052
220531999-12-13 Jesse Thilo <jthilo@gnu.org>
22054
22055 * doc/bison.texinfo: Tweaked spelling and grammar.
22056 Updated ISBN.
22057 Removed reference to price of printed copy.
22058 Mention BISON_SIMPLE and BISON_HAIRY.
22059
220601999-12-13 Jesse Thilo <jthilo@gnu.org>
22061
22062 * configure.in, NEWS:
22063 Bison 1.29 released.
22064
220651999-10-27 Jesse Thilo <jthilo@gnu.org>
22066
22067 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
22068 Added reference card.
22069
220701999-07-26 Jesse Thilo <jthilo@gnu.org>
22071
22072 * po/ru.po: Added Russian translation.
22073
220741999-07-26 Jesse Thilo <jthilo@gnu.org>
22075
22076 * configure.in: Added Russian translation.
22077
220781999-07-06 Jesse Thilo <jthilo@gnu.org>
22079
22080 * configure.in, NEWS, README:
22081 Released version 1.28.
22082
220831999-06-14 Jesse Thilo <jthilo@gnu.org>
22084
22085 * src/system.h:
22086 Squashed redefinition warning on some systems.
22087
22088 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
22089 Have configure build version string instead of relying on ANSI string
22090 concatentation.
22091
220921999-06-14 Jesse Thilo <jthilo@gnu.org>
22093
22094 * po/POTFILES.in: Got rid of version.c.
22095
220961999-06-14 Jesse Thilo <jthilo@gnu.org>
22097
22098 * acconfig.h, configure.in:
22099 Have configure build version string instead of relying on ANSI string
22100 concatentation.
22101
221021999-06-08 Jesse Thilo <jthilo@gnu.org>
22103
22104 * doc/bison.1:
22105 Dropped mention of `+' for long-named options.
22106
221071999-05-30 Jesse Thilo <jthilo@gnu.org>
22108
22109 * src/files.c: Added <unistd.h> for unlink().
22110
22111 * src/Makefile.am, src/system.h:
22112 I18n fixes.
22113
221141999-05-30 Jesse Thilo <jthilo@gnu.org>
22115
22116 * README: Added a FAQ list.
22117
22118 * configure.in, acconfig.h:
22119 I18n fixes.
22120
221211999-05-30 Jesse Thilo <jthilo@gnu.org>
22122
22123 * doc/FAQ, doc/Makefile.am:
22124 Added a FAQ list.
22125
221261999-05-19 Jesse Thilo <jthilo@gnu.org>
22127
22128 * src/alloc.h, src/symtab.h, src/version.c:
22129 Protected inclusion of "config.h" with HAVE_CONFIG_H.
22130
221311999-04-18 Jesse Thilo <jthilo@gnu.org>
22132
22133 * src/.cvsignore, src/Makefile.am:
22134 Reorganized: sources in `src', documentation in `doc'.
22135
22136 * src/lex.c (literalchar):
22137 fixed the code for escaping double quotes (thanks
22138 Jonathan Czisny.)
22139
221401999-04-18 Jesse Thilo <jthilo@gnu.org>
22141
22142 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
22143 Adjusted paths to reflect directory reorganization.
22144
221451999-04-18 Jesse Thilo <jthilo@gnu.org>
22146
22147 * doc/.cvsignore, doc/Makefile.am:
22148 Reorganized: sources in `src', documentation in `doc'.
22149
221501999-04-18 Jesse Thilo <jthilo@gnu.org>
22151
22152 * configure.in:
22153 Updated AC_INIT file to reflect directory reorganization.
22154
22155 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
22156 Reorganized: sources in `src', documentation in `doc'.
22157
221581999-04-13 Jesse Thilo <jthilo@gnu.org>
22159
22160 * src/allocate.c:
22161 Don't declare calloc() and realloc() if not necessary.
22162
221631999-04-13 Jesse Thilo <jthilo@gnu.org>
22164
22165 * configure.in, acconfig.h, acinclude.m4:
22166 Don't declare calloc() and realloc() if not necessary.
22167
221681999-03-23 Jesse Thilo <jthilo@gnu.org>
22169
22170 * po/.cvsignore: Added i18n support.
22171
221721999-03-23 Jesse Thilo <jthilo@gnu.org>
22173
22174 * acconfig.h, configure.in, Makefile.am:
22175 Added i18n support.
22176
221771999-03-22 Jesse Thilo <jthilo@gnu.org>
22178
22179 * src/bison.s1: Fixed #line numbers.
22180
221811999-03-15 Jesse Thilo <jthilo@gnu.org>
22182
22183 * po/es.po, po/fr.po, po/nl.po, po/de.po:
22184 Added PO files from Translation Project.
22185
221861999-03-03 Jesse Thilo <jthilo@gnu.org>
22187
22188 * Makefile.am:
22189 Added support for non-ANSI compilers (ansi2knr).
22190
221911999-02-16 Jesse Thilo <jthilo@gnu.org>
22192
22193 * configure.in: Bumped version number to 1.27.
22194
22195 * Makefile.am:
22196 Added `bison.simple' to list of files removed by `make distclean'.
22197
221981999-02-12 Jesse Thilo <jthilo@gnu.org>
22199
22200 * src/files.c, src/files.h:
22201 Defined locations of parser files in config.h instead of Makefile.
22202
222031999-02-12 Jesse Thilo <jthilo@gnu.org>
22204
22205 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
22206 Defined locations of parser files in config.h instead of Makefile.
22207
222081999-02-09 Jesse Thilo <jthilo@gnu.org>
22209
22210 * Makefile.am:
22211 Removed inappropriate use of $< macro.
22212
222131999-02-05 Jesse Thilo <jthilo@gnu.org>
22214
22215 * po/Makefile.in.in, po/POTFILES.in:
22216 Add `po' directory skeleton.
22217
222181999-01-27 Jesse Thilo <jthilo@gnu.org>
22219
22220 * README: Document help-bison list.
22221
22222 * configure.in: Add check for mkstemp().
22223
222241999-01-20 Jesse Thilo <jthilo@gnu.org>
22225
22226 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
22227 Hush a few compiler warnings.
22228
22229 * src/files.c:
22230 Add tryclose(), which verifies that fclose was successful.
22231 Hush a couple of compiler warnings.
22232
222331999-01-20 Jesse Thilo <jthilo@gnu.org>
22234
22235 * Makefile.am, OChangeLog:
22236 ChangeLog is now automatically generated. Include the old version as
22237 OChangeLog.
22238
222391999-01-14 Jesse Thilo <jthilo@gnu.org>
22240
22241 * 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:
22242 Update FSF address.
22243
222441999-01-14 Jesse Thilo <jthilo@gnu.org>
22245
22246 * doc/bison.texinfo: Fix formatting glitch.
22247
22248 * doc/bison.texinfo: Update FSF address.
22249
222501999-01-14 Jesse Thilo <jthilo@gnu.org>
22251
22252 * acconfig.h: Update FSF address.
22253
222541999-01-08 Jesse Thilo <jthilo@gnu.org>
22255
22256 * src/system.h:
22257 Don't define PACKAGE here, since config.h defines it.
22258
222591998-12-30 Jesse Thilo <jthilo@gnu.org>
22260
22261 * src/reader.c: Update copyright date.
22262
22263 * src/main.c:
22264 Ditch sprintf to statically-sized buffers in fatal/warn functions in
22265 favor of output directly to stderr (avoids buffer overruns).
22266
22267 * src/reader.c: Some checks for premature EOF.
22268
22269 * 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:
22270 Use prototypes if the compiler understands them.
22271
22272 * src/files.c: Honor TMPDIR on Unix hosts.
22273 Use prototypes if the compiler understands them.
22274
22275 * src/reader.c:
22276 Fix a couple of buffer overrun bugs.
22277 Use prototypes if the compiler understands them.
22278
22279 * src/system.h: Include unistd.h and ctype.h.
22280 Use #ifdef instead of #if for NLS symbols.
22281
222821998-12-30 Jesse Thilo <jthilo@gnu.org>
22283
22284 * doc/bison.texinfo:
22285 Delete comment "consider using @set for edition number, etc..." since
22286 we now are doing so.
22287
222881998-12-30 Jesse Thilo <jthilo@gnu.org>
22289
22290 * configure.in:
22291 Use prototypes if the compiler understands them.
22292
22293 * NEWS: Document 1.26 highlights.
22294
22295 * Makefile.am: Require Automake 1.3 or later.
22296
22297 * acconfig.h:
22298 Use prototypes if the compiler understands them.
22299
223001998-12-29 Jesse Thilo <jthilo@gnu.org>
22301
22302 * src/version.c:
22303 Use VERSION symbol from automake for version number.
22304
223051998-12-29 Jesse Thilo <jthilo@gnu.org>
22306
22307 * acconfig.h, configure.in, version.cin:
22308 Use VERSION symbol from automake for version number.
22309
223101998-11-28 Jesse Thilo <jthilo@gnu.org>
22311
22312 * Makefile.am:
22313 Distribute original version of simple parser (bison.s1), not built
22314 version (bison.simple).
22315
223161998-11-28 Jesse Thilo <jthilo@gnu.org>
22317
22318 * doc/bison.texinfo: Add info dir entry.
22319
22320 * doc/bison.texinfo:
22321 Let automake put version number into documentation.
22322
223231998-11-26 Jesse Thilo <jthilo@gnu.org>
22324
22325 * src/bison.cld, src/build.com, src/vmshlp.mar:
22326 Add non-RCS files from /gd/gnu/bison.
22327
223281998-11-26 Jesse Thilo <jthilo@gnu.org>
22329
22330 * doc/bison.1:
22331 Document the BISON_HAIRY and BISON_SIMPLE variables.
22332
223331998-11-25 Jesse Thilo <jthilo@gnu.org>
22334
22335 * src/version.c: Build version.c automatically.
22336
22337 * src/reader.c:
22338 Fix token numbering (used to start at 258, not 257).
22339
22340 * src/system.h: Include config.h.
22341
22342 * src/getargs.c: Update bug report address.
22343
22344 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
22345 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
22346
223471998-11-25 Jesse Thilo <jthilo@gnu.org>
22348
22349 * Makefile.am:
22350 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
22351
22352 * configure.in, version.cin:
22353 Build version.c automatically.
22354
22355 * AUTHORS: Add AUTHORS file.
22356
22357 * README: Update bug report address.
22358
22359 * bison.simple:
22360 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
22361
22362 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
22363 Add automake stuff.
22364
223651998-11-25 Jesse Thilo <jthilo@gnu.org>
22366
22367 * doc/bison.texinfo: Clean up some formatting.
22368
223691998-05-05 Richard Stallman <rms@gnu.org>
22370
22371 * doc/bison.texinfo:
22372 Explain better why to make a pure parser.
22373
223741998-01-05 Richard Stallman <rms@gnu.org>
22375
22376 * src/files.c (openfiles):
22377 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
22378 find a temporary directory, if possible. Do not unlink files while
22379 they are open.
22380
223811997-08-25 Richard Stallman <rms@gnu.org>
22382
22383 * src/reader.c (stack_offset;):
22384 Change some warni to warns.
22385
22386 * src/lex.c (literalchar): Use warns, not warni.
22387
223881997-06-28 Richard Stallman <rms@gnu.org>
22389
22390 * src/bison.s1: Add a Bison version comment.
22391
22392 * src/main.c (fatal, warn, berror):
22393 Use program_name.
22394
223951997-06-28 Richard Stallman <rms@gnu.org>
22396
22397 * Makefile.in (bison_version): New variable.
22398 (dist): Use that variable.
22399 (bison.s1): Substitute the Bison version into bison.simple.
22400
22401 * bison.simple: Add a Bison version comment.
22402
224031997-06-18 Richard Stallman <rms@gnu.org>
22404
22405 * src/main.c (fatal, warn, berror):
22406 Make error messages standard.
22407 (toomany): Improve error message text.
22408
22409 * 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:
22410 new.h renamed to alloc.h.
22411
224121997-06-18 Richard Stallman <rms@gnu.org>
22413
22414 * Makefile.in: new.h renamed to alloc.h.
22415
224161997-05-24 Richard Stallman <rms@gnu.org>
22417
22418 * src/lex.c (literalchar):
22419 Fix the code for escaping \, " and '.
22420
22421 (lex): Avoid trouble when there are many chars
22422 to discard in a char literal with just several chars in it.
22423
224241997-05-17 Richard Stallman <rms@gnu.org>
22425
22426 * src/bison.s1:
22427 Use malloc, if using alloca is troublesome.
22428 (YYSTACK_USE_ALLOCA): New flag macro.
22429 Define it for some systems and compilers.
22430 (YYSTACK_ALLOC): New macro.
22431 (yyparse): Use YYSTACK_ALLOC to allocate stack.
22432 If it was malloc'd, free it.
22433
224341997-05-17 Richard Stallman <rms@gnu.org>
22435
22436 * bison.simple:
22437 Use malloc, if using alloca is troublesome.
22438 (YYSTACK_USE_ALLOCA): New flag macro.
22439 Define it for some systems and compilers.
22440 (YYSTACK_ALLOC): New macro.
22441 (yyparse): Use YYSTACK_ALLOC to allocate stack.
22442 If it was malloc'd, free it.
22443
224441997-04-23 Richard Stallman <rms@gnu.org>
22445
22446 * src/bison.s1:
22447 (alloca) [__hpux]: Always define as __builtin_alloca.
22448
224491997-04-23 Richard Stallman <rms@gnu.org>
22450
22451 * bison.simple:
22452 (alloca) [__hpux]: Always define as __builtin_alloca.
22453
224541997-04-22 Richard Stallman <rms@gnu.org>
22455
22456 * src/bison.s1:
22457 [__hpux]: Include alloca.h (right for HPUX 10)
22458 instead of declaring alloca (right for HPUX 9).
22459
22460 * src/bison.s1 (__yy_memcpy):
22461 Declare arg `count' as unsigned int.
22462 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
22463
224641997-04-22 Richard Stallman <rms@gnu.org>
22465
22466 * bison.simple:
22467 [__hpux]: Include alloca.h (right for HPUX 10)
22468 instead of declaring alloca (right for HPUX 9).
22469
22470 * bison.simple (__yy_memcpy):
22471 Declare arg `count' as unsigned int.
22472 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
22473
224741997-01-03 Richard Stallman <rms@gnu.org>
22475
22476 * src/allocate.c: [__STDC__ or _MSC_VER]:
22477 Declare calloc and realloc to return void *.
22478
224791997-01-02 Richard Stallman <rms@gnu.org>
22480
22481 * src/system.h:
22482 [_MSC_VER]: Include stdlib.h and process.h.
22483 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
22484
22485 * src/main.c (main): Return FAILURE as a value.
22486 (printable_version): Declare arg as int, not char.
22487
224881997-01-02 Richard Stallman <rms@gnu.org>
22489
22490 * Makefile.in (dist):
22491 Explicitly check for symlinks, and copy them.
22492
224931996-12-19 Richard Stallman <rms@gnu.org>
22494
22495 * src/files.c:
22496 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
22497
224981996-12-18 Paul Eggert <eggert@gnu.org>
22499
22500 * src/bison.s1 (yyparse):
22501 If __GNUC__ and YYPARSE_PARAM are both defined,
22502 declare yyparse to have a void * argument.
22503
225041996-12-18 Paul Eggert <eggert@gnu.org>
22505
22506 * bison.simple (yyparse):
22507 If __GNUC__ and YYPARSE_PARAM are both defined,
22508 declare yyparse to have a void * argument.
22509
225101996-12-17 Richard Stallman <rms@gnu.org>
22511
22512 * src/reduce.c (nbits): Add some casts.
22513
225141996-08-12 Richard Stallman <rms@gnu.org>
22515
22516 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
22517
225181996-08-12 Richard Stallman <rms@gnu.org>
22519
22520 * bison.simple: Test _MSDOS as well as _MSDOS_.
22521
225221996-07-31 Richard Stallman <rms@gnu.org>
22523
22524 * src/bison.s1:
22525 [__sun && __i386]: Include alloca.h.
22526
225271996-07-31 Richard Stallman <rms@gnu.org>
22528
22529 * bison.simple:
22530 [__sun && __i386]: Include alloca.h.
22531
225321996-07-30 Richard Stallman <rms@gnu.org>
22533
22534 * src/bison.s1: Comment change.
22535
22536 * src/bison.s1: Test _MSDOS_, not MSDOS.
22537
225381996-07-30 Richard Stallman <rms@gnu.org>
22539
22540 * bison.simple: Comment change.
22541
22542 * bison.simple: Test _MSDOS_, not MSDOS.
22543
225441996-06-01 Richard Stallman <rms@gnu.org>
22545
22546 * 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:
22547 Insert `_' macro around many string constants.
22548
22549 * src/main.c:
22550 Insert `_' macro around many string constants.
22551
22552 (main): Call setlocale, bindtextdomain and textdomain.
22553
22554 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
22555 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
22556 [ENABLE_NLS]: Include libintl.h.
22557 [ENABLE_NLS] (gettext): Define.
22558 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
22559 (N_, PACKAGE, LOCALEDIR): New macros.
22560
225611996-06-01 Richard Stallman <rms@gnu.org>
22562
22563 * POTFILES.in: New file.
22564
22565 * Makefile.in (allocate.o):
22566 Define target explicitly.
22567
22568 * Makefile.in (CFLAGS): Set to @CFLAGS@.
22569 (LDFLAGS): Set to @LDFLAGS@.
22570 (configure): Run autoconf only if preceding `cd' succeeds.
22571 (bison.s1): Redirect output to temporary file then move the
22572 temporary to the target, rather than redirecting directly to bison.s1.
22573 (clean): Remove config.status and config.log.
22574 (distclean): Don't remove config.status here.
22575
225761996-05-12 Richard Stallman <rms@gnu.org>
22577
22578 * src/bison.s1:
22579 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
22580
225811996-05-12 Richard Stallman <rms@gnu.org>
22582
22583 * bison.simple:
22584 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
22585
225861996-05-11 Richard Stallman <rms@gnu.org>
22587
22588 * src/bison.s1 (__yy_memcpy):
22589 Really reorder the args, as was supposedly done on Feb 14 1995.
22590 (yyparse): Calls changed accordingly.
22591
225921996-05-11 Richard Stallman <rms@gnu.org>
22593
22594 * Makefile.in (dist): Don't use $(srcdir).
22595
22596 * bison.simple (__yy_memcpy):
22597 Really reorder the args, as was supposedly done on Feb 14 1995.
22598 (yyparse): Calls changed accordingly.
22599
226001996-01-27 Richard Stallman <rms@gnu.org>
22601
22602 * src/output.c (output_rule_data):
22603 Test YYERROR_VERBOSE in the conditional
22604 around the definition of ttyname.
22605
226061995-12-29 Richard Stallman <rms@gnu.org>
22607
22608 * src/bison.s1:
22609 Fix line numbers in #line commands.
22610
226111995-12-29 Richard Stallman <rms@gnu.org>
22612
22613 * bison.simple:
22614 Fix line numbers in #line commands.
22615
226161995-12-27 Richard Stallman <rms@gnu.org>
22617
22618 * src/bison.s1 (YYPARSE_PARAM_DECL):
22619 In C++, make it always null.
22620 (YYPARSE_PARAM_ARG): New macro.
22621 (yyparse): Use YYPARSE_PARAM_ARG.
22622
226231995-12-27 Richard Stallman <rms@gnu.org>
22624
22625 * bison.simple (YYPARSE_PARAM_DECL):
22626 In C++, make it always null.
22627 (YYPARSE_PARAM_ARG): New macro.
22628 (yyparse): Use YYPARSE_PARAM_ARG.
22629
226301995-11-29 Richard Stallman <rms@gnu.org>
22631
22632 * doc/bison.texinfo:
22633 Describe literal string tokens, %raw, %no_lines, %token_table.
22634
226351995-11-29 Daniel Hagerty <hag@gnu.org>
22636
22637 * doc/bison.texinfo: Fixed update date
22638
226391995-10-16 Richard Stallman <rms@gnu.org>
22640
22641 * src/version.c: Version 1.25.
22642
226431995-10-16 Richard Stallman <rms@gnu.org>
22644
22645 * NEWS: *** empty log message ***
22646
226471995-10-16 Richard Stallman <rms@gnu.org>
22648
22649 * doc/bison.1, doc/bison.rnh:
22650 Add new options.
22651
226521995-10-15 Richard Stallman <rms@gnu.org>
22653
22654 * src/vmsgetargs.c, src/getargs.c:
22655 Added -n, -k, and -raw switches.
22656 (noparserflag, toknumflag, rawtoknumflag): New variables.
22657
22658 * src/symtab.h (SALIAS):
22659 New #define for adding aliases to %token.
22660 (struct bucket): Added `alias' field.
22661
22662 * src/reduce.c (reduce_grammar):
22663 Revise error message.
22664 (print_notices): Remove final `.' from error message.
22665
22666 * src/reader.c (reader_output_yylsp):
22667 New function.
22668 (readgram): Use `#if 0' around code that accepted %command
22669 inside grammar rules: The documentation doesn't allow it,
22670 and it will fail since the %command processors scan for the next %.
22671 (parse_token_decl): Extended the %token
22672 declaration to allow a multi-character symbol as an alias.
22673 (parse_thong_decl): New function.
22674 (read_declarations): Added %thong declarations.
22675 (read_declarations): Handle NOOP to deal with allowing
22676 % declarations as another means to specify the flags.
22677 (readgram): Allow %prec prior to semantics embedded in a rule.
22678 (skip_to_char, read_declarations, copy_definition)
22679 (parse_token_decl, parse_start_decl, parse_type_decl)
22680 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
22681 (get_type_name, copy_guard, copy_action, readgram)
22682 (get_type, packsymbols): Revised most error messages.
22683 Changed `fatal' to `warnxxx' to avoid aborting for error.
22684 Revised and use multiple warnxxx functions to avoid using VARARGS1.
22685 (read_declarations): Improve the error message for
22686 an invalid character. Do not abort.
22687 (read_declarations, copy_guard, copy_action): Use
22688 printable_version to avoid unprintable characters in printed output.
22689 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
22690 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
22691 Allow the type of a non-terminal can be given
22692 more than once, as long as all specifications give the same type.
22693
22694 * src/output.c:
22695 (output_headers, output_trailers, output, output_gram)
22696 (output_rule_data): Implement noparserflag variable.
22697 Implement toknumflag variable.
22698 (output): Call reader_output_yylsp to output LTYPESTR.
22699
22700 * src/main.c (main):
22701 If reader sees an error, don't process the grammar.
22702 (fatals): Updated to not use VARARGS1.
22703 (printable_version, int_to_string, warn, warni, warns, warnss)
22704 (warnsss): New error reporting functions. Avoid abort for error.
22705
22706 * src/lex.h:
22707 Added THONG and NOOP for alias processing.
22708 Added SETOPT for the new code that allows setting options with %flags.
22709
22710 * src/lex.c:
22711 Include getopt.h. Add some extern decls.
22712 (safegetc): New function to deal with EOF gracefully.
22713 (literalchar); new function to deal with reading \ escapes.
22714 (lex): Use literalchar.
22715 (lex): Implemented "..." tokens.
22716 (literalchar, lex, parse_percent_token): Made tokenbuffer
22717 always contain the token. This includes growing the token
22718 buffer while reading an integer.
22719 (parse_percent_token): Replaced if-else statement with percent_table.
22720 (parse_percent_token): Added % declarations as another
22721 way to specify the flags -n, -l, and -r. Also added hooks for
22722 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
22723 major changes to files.c.
22724 (lex) Retain in the incoming stream a character following
22725 an incorrect '/'.
22726 (skip_white_space, lex): Revised most error messages
22727 and changed fatal to warn to avoid aborting.
22728 (percent_table): Added %thong declarations.
22729
22730 * src/gram.h: Comment changes.
22731
22732 * src/files.c (openfiles, open_extra_files, done):
22733 Add faction flag
22734 and actfile file. Handle noparserflag. Both for -n switch.
22735
22736 * src/conflicts.c (resolve_sr_conflict):
22737 Remove use of alloca.
22738
227391995-06-01 Jim Meyering <meyering@gnu.org>
22740
22741 * doc/bison.texinfo: *** empty log message ***
22742
227431995-05-06 Richard Stallman <rms@gnu.org>
22744
22745 * src/bison.s1: Comment change.
22746
227471995-05-06 Richard Stallman <rms@gnu.org>
22748
22749 * bison.simple: Comment change.
22750
227511995-05-03 Richard Stallman <rms@gnu.org>
22752
22753 * src/version.c: Version now 1.24.
22754
22755 * src/bison.s1: Change distribution terms.
22756
22757 * src/version.c: Version now 1.23.
22758
227591995-05-03 Richard Stallman <rms@gnu.org>
22760
22761 * doc/bison.texinfo:
22762 Rewrite "Conditions for Using Bison".
22763 Update version to 1.24.
22764
227651995-05-03 Richard Stallman <rms@gnu.org>
22766
22767 * bison.simple: Change distribution terms.
22768
227691995-02-23 Richard Stallman <rms@gnu.org>
22770
22771 * src/files.c: Test __VMS_POSIX as well as VMS.
22772
227731995-02-14 Jim Meyering <meyering@gnu.org>
22774
22775 * src/bison.s1 (__yy_memcpy):
22776 Renamed from __yy_bcopy to avoid
22777 confusion. Reverse FROM and TO arguments to be consistent with
22778 those of memcpy.
22779
227801995-02-14 Jim Meyering <meyering@gnu.org>
22781
22782 * bison.simple (__yy_memcpy):
22783 Renamed from __yy_bcopy to avoid
22784 confusion. Reverse FROM and TO arguments to be consistent with
22785 those of memcpy.
22786
227871994-11-10 David J. MacKenzie <djm@gnu.org>
22788
22789 * NEWS: reformat
22790
22791 * NEWS: New file.
22792
22793 * Makefile.in (DISTFILES): Include NEWS.
22794
22795 * Makefile.in (DISTFILES):
22796 Include install-sh, not install.sh.
22797
22798 * configure.in: Update to Autoconf v2 macro names.
22799
228001994-10-05 David J. MacKenzie <djm@gnu.org>
22801
22802 * Makefile.in: fix typo
22803
22804 * Makefile.in (prefix, exec_prefix):
22805 Let configure set them.
22806
228071994-09-28 David J. MacKenzie <djm@gnu.org>
22808
22809 * Makefile.in: Set datadir to $(prefix)/share.
22810
228111994-09-15 Richard Stallman <rms@gnu.org>
22812
22813 * src/bison.s1:
22814 Update copyright notice and GPL version.
22815
228161994-09-15 Richard Stallman <rms@gnu.org>
22817
22818 * bison.simple:
22819 Update copyright notice and GPL version.
22820
228211994-07-12 Richard Stallman <rms@gnu.org>
22822
22823 * src/reduce.c, src/reader.c:
22824 entered into RCS
22825
228261994-05-05 David J. MacKenzie <djm@gnu.org>
22827
22828 * Makefile.in: entered into RCS
22829
228301994-03-26 Richard Stallman <rms@gnu.org>
22831
22832 * src/bison.s1: entered into RCS
22833
228341994-03-26 Richard Stallman <rms@gnu.org>
22835
22836 * bison.simple: entered into RCS
22837
228381994-03-25 Richard Stallman <rms@gnu.org>
22839
22840 * src/main.c: entered into RCS
22841
228421994-03-24 Richard Stallman <rms@gnu.org>
22843
22844 * src/conflicts.c: entered into RCS
22845
228461994-01-02 Richard Stallman <rms@gnu.org>
22847
22848 * Makefile.in: *** empty log message ***
22849
228501993-11-21 Richard Stallman <rms@gnu.org>
22851
22852 * src/bison.s1: *** empty log message ***
22853
228541993-11-21 Richard Stallman <rms@gnu.org>
22855
22856 * doc/bison.texinfo: entered into RCS
22857
22858 * doc/bison.texinfo: *** empty log message ***
22859
228601993-11-21 Richard Stallman <rms@gnu.org>
22861
22862 * bison.simple: *** empty log message ***
22863
228641993-10-25 David J. MacKenzie <djm@gnu.org>
22865
22866 * doc/bison.texinfo: *** empty log message ***
22867
228681993-10-19 Richard Stallman <rms@gnu.org>
22869
22870 * src/bison.s1: *** empty log message ***
22871
228721993-10-19 Richard Stallman <rms@gnu.org>
22873
22874 * bison.simple: *** empty log message ***
22875
228761993-10-14 Richard Stallman <rms@gnu.org>
22877
22878 * src/bison.s1: *** empty log message ***
22879
228801993-10-14 Richard Stallman <rms@gnu.org>
22881
22882 * bison.simple: *** empty log message ***
22883
228841993-09-14 David J. MacKenzie <djm@gnu.org>
22885
22886 * doc/bison.texinfo: *** empty log message ***
22887
228881993-09-13 Noah Friedman <friedman@gnu.org>
22889
22890 * Makefile.in: *** empty log message ***
22891
228921993-09-10 Richard Stallman <rms@gnu.org>
22893
22894 * src/conflicts.c: *** empty log message ***
22895
22896 * src/system.h: entered into RCS
22897
228981993-09-10 Richard Stallman <rms@gnu.org>
22899
22900 * doc/bison.1: entered into RCS
22901
229021993-09-06 Noah Friedman <friedman@gnu.org>
22903
22904 * src/version.c: entered into RCS
22905
229061993-09-06 Noah Friedman <friedman@gnu.org>
22907
22908 * Makefile.in: *** empty log message ***
22909
229101993-07-30 David J. MacKenzie <djm@gnu.org>
22911
22912 * Makefile.in: *** empty log message ***
22913
229141993-07-24 Richard Stallman <rms@gnu.org>
22915
22916 * src/bison.s1: *** empty log message ***
22917
229181993-07-24 Richard Stallman <rms@gnu.org>
22919
22920 * bison.simple: *** empty log message ***
22921
229221993-07-08 David J. MacKenzie <djm@gnu.org>
22923
22924 * Makefile.in: *** empty log message ***
22925
229261993-07-04 Richard Stallman <rms@gnu.org>
22927
22928 * src/bison.s1: *** empty log message ***
22929
229301993-07-04 Richard Stallman <rms@gnu.org>
22931
22932 * bison.simple: *** empty log message ***
22933
229341993-06-26 David J. MacKenzie <djm@gnu.org>
22935
22936 * src/getargs.c: entered into RCS
22937
229381993-06-26 David J. MacKenzie <djm@gnu.org>
22939
22940 * doc/bison.texinfo: *** empty log message ***
22941
22942 * doc/bison.1: New file.
22943
229441993-06-25 Richard Stallman <rms@gnu.org>
22945
22946 * src/getargs.c: New file.
22947
229481993-06-16 Richard Stallman <rms@gnu.org>
22949
22950 * src/bison.s1: *** empty log message ***
22951
229521993-06-16 Richard Stallman <rms@gnu.org>
22953
22954 * bison.simple: *** empty log message ***
22955
229561993-06-03 Richard Stallman <rms@gnu.org>
22957
22958 * src/bison.s1: New file.
22959
229601993-06-03 Richard Stallman <rms@gnu.org>
22961
22962 * doc/bison.texinfo: *** empty log message ***
22963
229641993-06-03 Richard Stallman <rms@gnu.org>
22965
22966 * bison.simple: New file.
22967
229681993-05-19 Richard Stallman <rms@gnu.org>
22969
22970 * doc/bison.texinfo: New file.
22971
229721993-05-07 Noah Friedman <friedman@gnu.org>
22973
22974 * Makefile.in: *** empty log message ***
22975
229761993-04-28 Noah Friedman <friedman@gnu.org>
22977
22978 * src/reader.c: *** empty log message ***
22979
229801993-04-23 Noah Friedman <friedman@gnu.org>
22981
22982 * src/alloc.h: entered into RCS
22983
229841993-04-20 David J. MacKenzie <djm@gnu.org>
22985
22986 * src/version.c: *** empty log message ***
22987
22988 * src/files.c, src/allocate.c:
22989 entered into RCS
22990
22991 * src/reader.c: *** empty log message ***
22992
22993 * src/lex.c: entered into RCS
22994
22995 * src/conflicts.c: New file.
22996
22997 * src/symtab.c: entered into RCS
22998
22999 * src/alloc.h: New file.
23000
23001 * src/LR0.c: entered into RCS
23002
230031993-04-18 Noah Friedman <friedman@gnu.org>
23004
23005 * src/reader.c: New file.
23006
23007 * src/version.c: *** empty log message ***
23008
230091993-04-18 Noah Friedman <friedman@gnu.org>
23010
23011 * Makefile.in: *** empty log message ***
23012
230131993-04-17 Noah Friedman <friedman@gnu.org>
23014
23015 * Makefile.in: *** empty log message ***
23016
230171993-04-15 Richard Stallman <rms@gnu.org>
23018
23019 * src/main.c, src/files.c:
23020 New file.
23021
230221993-04-15 Noah Friedman <friedman@gnu.org>
23023
23024 * configure.in: entered into RCS
23025
23026 * configure.in: *** empty log message ***
23027
23028 * configure.in: New file.
23029
230301993-04-14 Richard Stallman <rms@gnu.org>
23031
23032 * Makefile.in: New file.
23033
230341993-04-13 Richard Stallman <rms@gnu.org>
23035
23036 * src/version.c: New file.
23037
230381993-03-25 Richard Stallman <rms@gnu.org>
23039
23040 * src/output.c: entered into RCS
23041
230421992-09-25 Richard Stallman <rms@gnu.org>
23043
23044 * configure.bat: entered into RCS
23045
230461992-06-22 Richard Stallman <rms@gnu.org>
23047
23048 * src/vmsgetargs.c: entered into RCS
23049
230501992-06-22 Richard Stallman <rms@gnu.org>
23051
23052 * doc/bison.rnh: entered into RCS
23053
230541992-04-20 David J. MacKenzie <djm@gnu.org>
23055
23056 * README: entered into RCS
23057
230581992-01-22 Richard Stallman <rms@gnu.org>
23059
23060 * src/machine.h: entered into RCS
23061
230621991-12-21 Richard Stallman <rms@gnu.org>
23063
23064 * src/lalr.c, src/closure.c:
23065 entered into RCS
23066
230671991-12-20 Richard Stallman <rms@gnu.org>
23068
23069 * src/state.h: entered into RCS
23070
230711991-12-18 Richard Stallman <rms@gnu.org>
23072
23073 * src/print.c, src/nullable.c, src/derives.c:
23074 entered into RCS
23075
230761991-11-03 David J. MacKenzie <djm@gnu.org>
23077
23078 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
23079 entered into RCS
23080
230811988-09-09 Richard Stallman <rms@gnu.org>
23082
23083 * src/bison.hairy: entered into RCS
23084
230851987-12-16 Richard Stallman <rms@gnu.org>
23086
23087 * REFERENCES: entered into RCS
dc546b0f 23088
f294a2c2 23089
04098407 23090 -----
f294a2c2 23091
1462fcee
JD
23092 Copyright (C) 1987-1988, 1991-2010 Free Software Foundation,
23093 Inc.
f294a2c2 23094
04098407
PE
23095 Copying and distribution of this file, with or without
23096 modification, are permitted provided the copyright notice and this
23097 notice are preserved.