]> git.saurik.com Git - bison.git/blob - ChangeLog
071a754c7bd850a14ca96a32ef3d963010c8f6cf
[bison.git] / ChangeLog
1 2010-05-11 Akim Demaille <demaille@gostai.com>
2
3 lalrl1.cc: give a chance to user defined YYLLOC_DEFAULT.
4 * data/lalr1.cc (YYLLOC_DEFAULT): Move its definition from the
5 header file to the implementation file, after the user %code
6 sections.
7 * NEWS (2.5): Document this.
8
9 2010-05-11 Akim Demaille <demaille@gostai.com>
10
11 doc: please Emacs.
12 * doc/bison.texinfo (Local Variables): Move this after the
13 LocalWords, since the latter are looked for in the whole document,
14 while the former are looked for only at its end.
15 Require american spell checking.
16
17 2010-05-10 Akim Demaille <demaille@gostai.com>
18
19 doc: fix lalr1.cc documentation.
20 * doc/bison.texinfo (C++ Scanner Interface): Fix yylex signature.
21 (C++ Bison Interface): Fix lalr1.cc skeleton name.
22 (C++ Parser Interface): Fix semantic_type and location_type names.
23 Document yy::parser::token.
24 Reported by Jerry Quinn.
25
26 2010-05-10 Akim Demaille <demaille@gostai.com>
27
28 c++: use YYRHSLOC.
29 * data/lalr1.cc (YYRHSLOC): New.
30 (YYLLOC_DEFAULT): Use it.
31 * data/glr.cc: If location_type was user defined, do not include
32 location.hh, and do not produce location.hh and position.hh.
33 * tests/calc.at (YYLLOC_DEFAULT): Use YYRHSLOC.
34 Check that glr.cc supports user defined location_type.
35 * NEWS: Document this.
36
37 2010-05-07 Akim Demaille <demaille@gostai.com>
38
39 doc: fix typo.
40 * tests/synclines.at: here.
41
42 2010-05-04 Akim Demaille <demaille@gostai.com>
43
44 tests: enhance AT_SYNCLINES_COMPILE.
45 * tests/synclines.at (AT_SYNCLINES_COMPILE): More distcc patterns.
46 (AT_TEST_SYNCLINE): Remove GCC 4.5 protection which is already
47 taken care of in AT_SYNCLINES_COMPILE.
48
49 2010-05-04 Akim Demaille <demaille@gostai.com>
50
51 lalr1.cc: don't generate location.hh when location_type is defined
52 * data/bison.m4 (b4_percent_define_get): Accept a default value.
53 * data/c++.m4: Do not provide a default value for the %define
54 variable location_type, rather, use b4_percent_define_get with a
55 default argument where its value is needed.
56 * data/lalr1.cc: Do not load location.cc (which outputs both
57 location.hh and position.hh) if the user defined location_type.
58 Do not include location.hh either.
59
60 2010-05-04 Akim Demaille <demaille@gostai.com>
61
62 lalr1.cc: minor refactoring.
63 * data/lalr1.cc: Don't issue empty namespaces.
64
65 2010-05-04 Akim Demaille <demaille@gostai.com>
66
67 tests: fix %printer.
68 Currently, there is no check that %printer ... <foo> (nor
69 %destructor) is about an existing <foo> type. This C++ test had
70 it wrong (<::std::string> vs. <std::string>).
71
72 * tests/c++.at (AT_CHECK_VARIANTS): In list.yy, redefine the
73 pretty-printing of lists into something better for parser traces.
74 Update the expected output.
75 Fix correspondance between %type/%token and %printer.
76
77 2010-05-04 Akim Demaille <demaille@gostai.com>
78
79 lalr1.cc: location_type: make sure we don't depend on loc.(begin|end).
80 * tests/calc.at (Span): Instead of begin/end, as in the built-in
81 location class, use first and last.
82 Define YYLLOC_DEFAULT to adjust to these changes.
83 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Adjust to the
84 location_type changes.
85
86 2010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
87
88 tests: fix maintainer-xml-check.
89 * data/xslt/xml2dot.xsl (xsl:template match="bison-xml-report"):
90 Update output to include comments now produced by --graph.
91 (xsl:template match="automaton"): As for --graph, name the
92 digraph after the grammar file.
93 * src/print-xml.c (escape_bufs): Enlarge array.
94 (print_xml): Add bug-report and url attributes to
95 bison-xml-report element.
96
97 2010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
98
99 In DOT output, convert from "/*" comments to "//" comments.
100 This handles the possibility that a "*/" might appear in
101 variable portions of those comments at some point in the future.
102 * src/graphviz.c (start_graph): Implement.
103
104 2010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
105
106 Document that undefined %prec identifier warnings will remain.
107 * NEWS (2.4.3): Here.
108 (2.4.2): Here.
109
110 2010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
111
112 Revert 2009-12-30 change for undefined %prec token complaints.
113 That is, keep them as warnings because that should be sufficient
114 to satisfy POSIX without creating backward compatibility issues.
115 Suggested by Richard Stallman at
116 <http://lists.gnu.org/archive/html/bison-patches/2010-03/msg00033.html>.
117 * NEWS (2.5): Remove mention of complaint.
118 * src/reader.c (grammar_rule_check): Convert complaint back to
119 warning.
120 * tests/input.at (%prec's token must be defined): Update.
121
122 2010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
123
124 build: don't require src/bison during bootstrap.
125 Suggested by Eric Blake at
126 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00003.html>.
127 * bootstrap.conf (bootstrap_epilogue): New function to make sure
128 src/parse-gram.[ch] are stamped later than src/parse-gram.y.
129
130 2010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
131
132 i18n: fix untranslatable string.
133 Reported by Goran Uddeborg at
134 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00000.html>.
135 * src/muscle-tab.c (muscle_percent_define_insert): Here.
136
137 2010-04-13 Akim Demaille <demaille@gostai.com>
138
139 tests: calc: minor refactoring.
140 * tests/calc.at (_AT_DATA_CALC_Y): Simplify yylex.
141
142 2010-04-13 Akim Demaille <demaille@gostai.com>
143
144 tests: calc: simplify location management.
145 * tests/local.at (AT_LOC_PUSHDEF, AT_LOC_POPDEF): New.
146 (_AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS): Use them to
147 define the appropriate AT_LOC accessors.
148 * tests/calc.at: Use AT_LOC accessors.
149
150 2010-04-13 Akim Demaille <demaille@gostai.com>
151
152 test location_type.
153 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS):
154 Define AT_LOCATION_TYPE_IF.
155 (_AT_BISON_OPTION_POPDEFS): Undefine AT_LOCATION_TYPE_IF.
156 * tests/calc.at (_AT_DATA_CALC_Y): When %define location_type is
157 used, provide a user location type and use it.
158 (Simple LALR1 C++ Calculator): Add a test case for location_type.
159
160 2010-04-13 Akim Demaille <demaille@gostai.com>
161
162 tests: check fclose's return value.
163 * tests/calc.at (_AT_DATA_CALC_Y): Check fclose's return status.
164
165 2010-04-13 Akim Demaille <demaille@gostai.com>
166
167 tests: don't depend on the actual location type.
168 * tests/calc.at: Use yy::parser::location_type rather than
169 yy::location, since the former is always right, and might point to
170 another type than the latter.
171
172 2010-04-13 Akim Demaille <demaille@gostai.com>
173
174 formatting changes.
175 * tests/calc.at: Formatting changes.
176
177 2010-04-13 Akim Demaille <demaille@gostai.com>
178
179 lalr1.cc: remove useless forward declaration.
180 * data/lalr1.cc: Include location.hh before stack.hh.
181 Remove the useless forward declarations of position and location.
182 Reported by Chris Morley.
183 * data/glr.cc: Likewise.
184
185 2010-04-11 Joel E. Denny <joeldenny@joeldenny.org>
186
187 * NEWS (2.4.3): Mention fix for Sun Studio C++.
188
189 2010-04-10 Joel E. Denny <joeldenny@joeldenny.org>
190
191 tests: fix for newer Sun Studio C++.
192 Reported by Dagobert Michelsen at
193 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00023.html>.
194 * THANKS (Dagobert Michelsen): Add.
195 * configure.ac (AC_PREREQ): Set to 2.64 so we get the latest
196 Autoconf macro for handling the restrict keyword.
197 * gnulib: Update to latest, which no longer overrides that macro
198 from Autoconf.
199
200 2010-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
201
202 portability: fix pointer arithmetic to conform to C standard.
203 Reported by Tys Lefering at
204 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00035.html>.
205 This fix is already implemented in glr.c and does not apply to
206 lalr1.java.
207 * data/lalr1.cc (yy::parser::parse): Increase size of
208 yyerror_range and adjust subscripting so you don't have to
209 subtract one from the beginning of the array.
210 * data/yacc.c (b4_declare_parser_state_variables,
211 yyparse, yypush_parse): Likewise.
212
213 2010-04-05 Akim Demaille <demaille@gostai.com>
214
215 remove useless include.
216 * src/graphviz.h: Don't include stdbool.h.
217
218 2010-04-05 Akim Demaille <demaille@gostai.com>
219
220 graph: sign the output file.
221 * src/graphviz.c (start_graph): Issue comments about Bison.
222 Suggested by Tys Lefering.
223
224 2010-03-31 Joel E. Denny <jdenny@ces.clemson.edu>
225
226 portability: fix test suite for GCC 4.5's new #error message.
227 Reported by Tys Lefering at
228 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00030.html>.
229 * NEWS (2.4.3): Mention.
230 * tests/synclines.at (AT_TEST_SYNCLINE): Implement.
231
232 2010-03-30 Akim Demaille <demaille@gostai.com>
233
234 fix comments.
235 * src/graphviz.h: Add missing license notice.
236 Document.
237
238 2010-03-25 Akim Demaille <demaille@gostai.com>
239
240 tests: fix 250: parse.error=verbose overflow.
241 * tests/regression.at (parse.error=verbose overflow): Avoid the
242 double inclusion of stdlib.h as it triggers hard errors.
243
244 2010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
245
246 portability: fix for BSD make.
247 Reported by Johan van Selst at
248 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00016.html>.
249 * tests/local.mk ($(TESTSUITE)): Qualify package.m4 in
250 this dependency list as in package.m4's target rule.
251
252 2010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
253
254 portability: fix spawning on at least FreeBSD 8 and FreeBSD 9.
255 Reported by Johan van Selst at
256 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00014.html>.
257 * NEWS (2.4.3): New.
258 * THANKS (Johan van Selst): Add.
259 * etc/prefix-gnulib-mk (prefix): Adjust regex for makefile
260 targets so that gnulib's new c++defs.h is matched.
261 * gnulib: Update to latest.
262
263 2010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
264
265 maint: update for changes to gnulib's announce-gen.
266 * HACKING (Announce): RELEASE_TYPE=major must now be written
267 RELEASE_TYPE=stable.
268
269 2010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
270
271 Version 2.4.2.
272 * NEWS (2.4.2): Set version and date. For the recent test suite
273 portability fixes, don't be so optimistic about their success
274 given the lack of feedback on the affected platforms.
275
276 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
277
278 tests: fix maintainer-xml-check for recent changes.
279 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Use
280 AT_BISON_CHECK_NO_XML rather than AT_BISON_CHECK because an
281 output file whose name conflicts with a previous output file
282 is now never generated.
283
284 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
285
286 portability: fix several issues with M4 subprocess.
287
288 M4's output pipe was not being drained upon fatal errors during
289 scan_skel. As a result, broken-pipe messages from M4 were seen
290 on at least AIX, HP-UX, Solaris, and RHEL4, and this caused a
291 failure in the test suite. The problem was that, on platforms
292 where the default disposition for SIGPIPE is ignore instead of
293 terminate, M4 sometimes saw fwrite fail with errno=EPIPE and
294 then reported it. However, there's some sort of race condition,
295 because the new test group occasionally succeeded.
296 Reported by Albert Chin at
297 <http://lists.gnu.org/archive/html/bug-bison/2010-02/msg00004.html>.
298
299 There were also problems with the test suite livelocking on
300 Tru64 5.1b. Reported by Didier Godefroy at
301 <http://lists.gnu.org/archive/html/bug-bison/2009-05/msg00005.html>.
302 Switching to create_pipe_bidi suggested by Akim Demaille.
303
304 To attempt to solve both of these problems, switch to gnulib's
305 create_pipe_bidi and register M4 process as a slave. Along the
306 way, clean up file name conflict handling, which was affected by
307 the broken-pipe problem before the switch.
308 * NEWS (2.4.2): Document.
309 * THANKS (Didier Godefroy): Add.
310 * bootstrap.conf (gnulib_modules): Add pipe.
311 * gnulib: Update to latest to make sure we have all the latest
312 fixes.
313 * lib/local.mk (lib_libbison_a_SOURCES): Remove subpipe.h and
314 subpipe.c.
315 * po/POTFILES.in (lib/subpipe.c): Remove.
316 * src/files.c (compute_output_file_names): Update invocations
317 of output_file_name_check.
318 (output_file_name_check): In the case that the grammar file
319 would be overwritten, use complain instead of fatal, but replace
320 the output file name with /dev/null. Use the /dev/null solution
321 for the case of two conflicting output files as well because it
322 seems safer in case Bison one day tries to open both files at
323 the same time.
324 * src/files.h (output_file_name_check): Update prototype.
325 * src/output.c (output_skeleton): Use create_pipe_bidi and
326 wait_subprocess. Assert that scan_skel completely drains the
327 pipe.
328 * src/scan-skel.l (at_directive_perform): Update
329 output_file_name_check invocation.
330 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Check that the
331 grammar file actually isn't overwritten.
332 (Conflicting output files: -o foo.y): Update expected output.
333 * tests/skeletons.at (Fatal errors but M4 continues producing
334 output): New test group.
335
336 2010-02-04 Joel E. Denny <jdenny@ces.clemson.edu>
337
338 Update POTFILES.
339 * HACKING (Release Procedure): Add reminder about keeping
340 POTFILES files up-to-date.
341 * po/POTFILES.in (src/muscle-tab.c, src/scan-skel.l): Add.
342
343 2010-02-01 Joel E. Denny <jdenny@clemson.edu>
344
345 Code cleanup.
346 * tests/atlocal.in (abs_top_srcdir): Remove shell variable,
347 which is already defined in atconfig.
348
349 2010-01-22 Joel E. Denny <jdenny@clemson.edu>
350
351 tests: fix missing include caught by g++ 4.4.1.
352 Reported by Tys Lefering.
353 * HACKING (Release checks): Add note about trying a recent GCC.
354 * tests/regression.at (_AT_DATA_DANCER_Y): For C++, include
355 cstdlib for abort.
356 (_AT_DATA_EXPECT2_Y): Likewise.
357
358 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
359
360 * cfg.mk (gnulib_dir): Assume gnulib is a subdirectory.
361
362 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
363
364 maint: automate PACKAGE_COPYRIGHT_YEAR update, and update it.
365 * HACKING (Release Procedure): Update notes on copyright years.
366 * Makefile.am (update-package-copyright-year): New target rule.
367 * build-aux/update-package-copyright-year: New file.
368 * cfg.mk (update-copyright): Add update-package-copyright-year
369 as a dependency.
370
371 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
372
373 * bootstrap: Import improvements from latest gnulib.
374
375 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
376
377 build: require Automake 1.11.1 to avoid a security flaw.
378 * HACKING (Release Procedure): Don't document Automake security
379 flaw here.
380 * configure.ac (AM_INIT_AUTOMAKE): Require 1.11.1, and explain
381 why here.
382
383 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
384
385 gnulib: update to latest.
386
387 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
388
389 ChangeLog (2006-09-15): add Odd Arild Olsen's role for push.c.
390
391 2010-01-15 Joel E. Denny <jdenny@clemson.edu>
392
393 Thank the developer of the initial push parser implementation.
394 This unfortunate oversight is several years old.
395 * THANKS (Odd Arild Olsen): Add.
396
397 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
398
399 Fix some comments concerning LR(0) versus LALR(1).
400
401 Stop equating LR(0) with nondeterminism and LALR(1) with
402 determinism. That is, if all states are consistent, then LR(0)
403 tables are deterministic. On the other hand, LALR(1) tables
404 might be nondeterministic before conflict resolution, and GLR
405 permits LALR(1) tables to remain nondeterministic.
406 * src/LR0.c, src/LR0.h: Here.
407 * src/lalr.c, src/lalr.h: Here.
408 * src/main.c (main): Here.
409 * src/state.c, src/state.h: Here.
410
411 * src/ielr.h (ielr): In preconditions, expect LR(0) not LALR(1)
412 parser tables.
413
414 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
415
416 maint: run "make update-copyright"
417
418 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
419
420 POSIX: complain if %prec's token was not defined.
421 * NEWS (2.5): Document.
422 * src/reader.c (grammar_rule_check): Convert warning to
423 complaint.
424 * tests/input.at (%prec's token must be defined): Update.
425
426 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
427
428 POSIX: warn if %prec's token was not defined.
429 Reported by Florian Krohm at
430 <http://lists.gnu.org/archive/html/bug-bison/2009-12/msg00005.html>.
431 * NEWS (2.4.2): Document.
432 * src/reader.c (grammar_rule_check): Implement.
433 (grammar_current_rule_prec_set): Add comments explaining that we
434 here assume a %prec identifier is a token, but we still manage
435 to support POSIX.
436 * tests/input.at (%prec's token must be defined): New test
437 group.
438
439 2009-12-31 Joel E. Denny <jdenny@clemson.edu>
440
441 * HACKING (Release Procedure): Recommend a secure automake.
442
443 2009-12-29 Joel E. Denny <jdenny@clemson.edu>
444
445 portability: `<' and `>' are not always defined on addresses.
446 Specifically, don't sort objects by their memory addresses when
447 they're not allocated in the same array or other object. Though
448 I haven't found a test case where that fails on my platform, C
449 says the behavior is undefined.
450 * src/AnnotationList.c (AnnotationList__insertInto): Remove
451 FIXME. Use new id field of InadequacyList nodes rather than
452 their memory addresses when sorting.
453 (AnnotationList__compute_from_inadequacies): Add
454 inadequacy_list_node_count argument to pass to
455 InadequacyList__new_conflict.
456 * src/AnnotationList.h
457 (AnnotationList__compute_from_inadequacies): Update prototype
458 and documentation for new argument.
459 * src/InadequacyList.c (InadequacyList__new_conflict): Add
460 node_count argument and use it to assign a unique ID.
461 * src/InadequacyList.h (InadequacyListNodeCount): New typedef.
462 (InadequacyList): Add id field.
463 (InadequacyList__new_conflict): Update prototype and
464 documentation for new argument.
465 * src/ielr.c (ielr_compute_annotation_lists): Update
466 AnnotationList__compute_from_inadequacies invocation.
467
468 2009-12-20 Joel E. Denny <jdenny@clemson.edu>
469
470 Fix handling of yychar manipulation in user semantic actions.
471 The problem was that yacc.c didn't always update the yychar
472 translation afterwards. However, other skeletons appear to be
473 fine. glr.c appears to already translate yychar before every
474 use. lalr1.cc does not define yychar and does not document its
475 replacement, yyla, for users. It does provide yyclearin, but
476 that does not manipulate yyla and thus requires no translation
477 update. In lalr1.java, yychar is out of scope during semantic
478 actions.
479 * NEWS (2.5): Document.
480 * data/yacc.c (YYBACKUP): Don't bother translating yychar into
481 yytoken here.
482 (yyparse, yypush_parse): Instead, translate before every use of
483 yytoken, and add comments explaining this approach.
484 * tests/actions.at (Destroying lookahead assigned by semantic
485 action): New test group checking that translation happens before
486 lookahead destructor calls at parser return. Previously,
487 incorrect destructors were called.
488 * tests/conflicts.at (parse.error=verbose and consistent
489 errors): New test group checking that translation happens at
490 syntax error detection before the associated verbose error
491 message and the associated lookahead destructor calls. While
492 the destructor call is fixed by this patch, the verbose error
493 message is currently incorrect due to another bug (see
494 comments in test group), so this is an expected failure for now.
495
496 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
497
498 YYFAIL: warn about uses and remove from lalr1.java.
499 * NEWS (2.5): Document.
500 * data/lalr1.java (parser::YYStack::YYFAIL): Rename to YYERRLAB,
501 and make it private. Update all uses.
502 * src/scan-code.l (SC_RULE_ACTION): Implement warning.
503
504 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
505
506 YYFAIL: deprecate.
507 * NEWS (2.4.2): Document deprecation and the phase-out plan.
508 * data/lalr1.java (parser::YYStack::YYFAIL): Add comment about
509 deprecation.
510 * data/yacc.c (YYFAIL): Likewise, and suppress warnings about
511 YYFAIL from GCC cpp's -Wunused-macros.
512 * doc/bison.texinfo (Java Action Features): Remove YYFAIL
513 documentation.
514 (LocalWords): Remove YYFAIL.
515
516 2009-12-20 Joel E. Denny <jdenny@clemson.edu>
517
518 tests: cleanup.
519 * tests/c++.at (Syntax error discarding no lookahead): Don't
520 ignore stderr. Instead, eliminate remaining warnings.
521
522 2009-12-18 Joel E. Denny <jdenny@clemson.edu>
523
524 lalr1.cc: don't discard non-existent lookahead on syntax error.
525 * data/lalr1.cc (parser::parse): Check yyempty first.
526 * tests/c++.at (Syntax error discarding no lookahead): New test
527 group.
528
529 2009-12-17 Joel E. Denny <jdenny@clemson.edu>
530
531 Code cleanup.
532 * src/symtab.c, src/symtab.h (symbol_class_get_string): Remove
533 function, which is no longer used.
534
535 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
536
537 Add gcc's -Wundef to test suite and fix another warning from it.
538 * NEWS (2.4.2): Update description of -Wundef fix.
539 * configure.ac (WARN_CXXFLAGS_TEST): New substitution.
540 (WARN_CFLAGS_TEST): New substitution.
541 * data/glr.c: Avoid warning about __STRICT_ANSI__.
542 * tests/atlocal.in (CFLAGS): Use WARN_CFLAGS_TEST instead of
543 WARN_CFLAGS.
544 (NO_WERROR_CFLAGS): Likewise.
545 (CXXFLAGS): Use WARN_CXXFLAGS_TEST instead of WARN_CXXFLAGS.
546
547 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
548
549 * data/yacc.c: Reformat m4 a little.
550
551 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
552
553 Document gcc -Wundef fix.
554 * NEWS (2.4.2): Here.
555 * THANKS (Jonathan Nieder): Add.
556
557 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
558
559 Simplify y.tab.c when location tracking is disabled.
560 * data/yacc.c: Do not check YYLTYPE_IS_TRIVIAL if location
561 tracking is not enabled. Instead, unconditionally define
562 YY_LOCATION_PRINT as a no-op for backward compatibility.
563
564 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
565
566 Avoid warnings from gcc -Wundef y.tab.c.
567 * data/glr.c: Check if YYENABLE_NLS and YYLTYPE_IS_TRIVIAL are
568 defined before using them.
569 * data/lalr1.cc: Likewise.
570 * data/yacc.c: Likewise.
571
572 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
573
574 autoconf: update to latest for fix of M4 detection.
575 Reported by Eric Blake.
576 * submodules/autoconf: Update.
577
578 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
579
580 portability: use -DGNULIB_POSIXCHECK.
581 Reported by Eric Blake. See discussions at
582 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00008.html>
583 and
584 <http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00108.html>.
585 * HACKING (Release checks): Suggest -DGNULIB_POSIXCHECK.
586 * bootstrap.conf (gnulib_modules): Add all the printf modules
587 suggested by -DGNULIB_POSIXCHECK. Add realloc-posix as
588 suggested by -DGNULIB_POSIXCHECK for gnulib's own vasnprintf.c.
589 (excluded_files): Remove m4/printf-posix.m4.
590 * tests/atlocal.in (LIBS): As for LDADD in src/local.mk, add
591 lib/libbison.a so gnulib libraries can be linked.
592
593 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
594
595 gnulib: update for fix of fprintf-posix, which we'll use soon.
596 * etc/prefix-gnulib-mk (prefix): Adjust regex for make file
597 targets so that gnulib's new arg-nonnull.h and link-warning.h
598 are matched.
599 * gnulib: Update.
600
601 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
602
603 Enable assertion output and --disable-assert for configure.
604 * bootstrap.conf (gnulib_modules): Add assert module.
605 * src/system.h (aver): Define as assert, and summarize the
606 discussion on this issue.
607
608 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
609
610 Expand GLR acronym in summary of Bison.
611 Based on discussion with Akim Demaille starting at
612 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00087.html>.
613 * doc/bison.texinfo (Introduction): Here.
614 * src/getargs.c (usage): Here.
615
616 2009-10-03 Alex Rozenman <rozenman@gmail.com>
617
618 Document named references.
619 * doc/bison.texinfo (Actions): Add new example and xref to
620 Using Named References node.
621 (Using Named References): New node.
622
623 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
624
625 cleanup.
626 * src/Sbitset.c (Sbitset__new_on_obstack): Use Sbitset instead
627 of char*.
628 (Sbitset__isEmpty): Use Sbitset instead of char*.
629 * src/Sbitset.h (Sbitset): Make it a pointer to unsigned char
630 instead of char. This helps to avoid casting errors.
631 (Sbitset__or): Use Sbitset instead of char*.
632
633 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
634
635 portability: don't assume 8-bit bytes.
636 That is, use CHAR_BIT and UCHAR_MAX instead of 8 and 0xff.
637 * src/Sbitset.h (Sbitset__nbytes): Here.
638 (Sbitset__byteAddress): Here.
639 (Sbitset__bit_mask): Here.
640 (Sbitset__last_byte_mask): Here.
641 (Sbitset__ones): Here.
642 (SBITSET__FOR_EACH): Here.
643
644 2009-10-11 Joel E. Denny <jdenny@clemson.edu>
645
646 portability: use va_start and va_end in the same function.
647 * src/complain.c (error_message): Move va_end from here...
648 (ERROR_MESSAGE): ... to here.
649
650 2009-10-08 Joel E. Denny <jdenny@clemson.edu>
651
652 * data/bison.m4: Update comments for rename to muscle-tab.h.
653
654 2009-10-07 Joel E. Denny <jdenny@clemson.edu>
655
656 Minor code cleanup.
657 * src/muscle-tab.c (MUSCLE_USER_NAME_CONVERT): Remove macro and
658 replace all uses with UNIQSTR_CONCAT.
659 * src/uniqstr.c (uniqstr_vsprintf): New function.
660 * src/uniqstr.h (uniqstr_vsprintf): Add prototype.
661 (UNIQSTR_CONCAT, UNIQSTR_GEN_FORMAT, UNIQSTR_GEN_FORMAT_): New
662 macros.
663
664 2009-10-06 Joel E. Denny <jdenny@clemson.edu>
665
666 * TODO (Complaint submessage indentation): New.
667
668 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
669
670 Minor code cleanup.
671 * src/parse-gram.y: Clean up sorting of declarations.
672 Use types to simplify %printer declarations where possible.
673 Provide %printer for BRACKETED_ID and symbol.prec.
674 * src/symtab.c: Whitespace change.
675
676 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
677
678 tests: skip tests of file names that platform does not support.
679 Reported by Michael Raskin at
680 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00001.html>.
681 * THANKS (Michael Raskin): Add.
682 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Fix. Cygwin used
683 to fail at least for file names containing ":" or "\".
684
685 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
686
687 yysyntax_error: avoid duplicate lookahead collection.
688 Except when memory reallocation is required, this change
689 eliminates the need to invoke yysyntax_error twice and thus to
690 repeat the collection of lookaheads. It also prepares for
691 future extensions that will make those repetitions more
692 expensive and that will require additional memory management in
693 yysyntax_error. Finally, it fixes an obscure bug already
694 exercised in the test suite.
695 * data/yacc.c (yysyntax_error): Add arguments for message
696 buffer variables stored in the parser. Instead of size, return
697 status similar to yyparse status but indicating success of
698 message creation. Other than the actual reallocation of the
699 message buffer, import and clean up memory management code
700 from...
701 (yyparse, yypush_parse): ... here.
702 * tests/regression.at (parse.error=verbose overflow): No longer
703 an expected failure.
704
705 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
706
707 yysyntax_error: test memory management more.
708 * tests/atlocal.in (NO_WERROR_CFLAGS): New cpp macro.
709 * tests/regression.at (parse.error=verbose and
710 YYSTACK_USE_ALLOCA): New test group.
711 (parse.error=verbose overflow): New test group that reveals an
712 obscure bug. Expected fail for now.
713
714 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
715
716 benchmarks: use %debug consistently among grammars.
717 * etc/bench.pl.in (generate_grammar_triangular): Do not activate
718 %debug by default. It can affect the timings even if yydebug=0.
719 (generate_grammar_calc): For consistency with other grammars,
720 use YYDEBUG environment variable to set yydebug.
721
722 2009-10-03 Joel E. Denny <jdenny@clemson.edu>
723
724 Remove dead code.
725 * src/symtab.c (symbol_pack): Here because every symbol's number
726 is always defined by this time.
727
728 2009-10-03 Alex Rozenman <rozenman@gmail.com>
729
730 Add additional space after periods in NEWS.
731 * NEWS (2.5): here.
732
733 2009-09-29 Joel E. Denny <jdenny@clemson.edu>
734
735 Use the correct conversion specifier for size_t.
736 Reported by Jim Meyering.
737 * src/Sbitset.h (SBITSET__INDEX__CONVERSION_SPEC): New, "zu"
738 because Sbitset__Index is size_t.
739 * src/Sbitset.c (Sbitset__fprint): Use it instead of %d.
740
741 2009-09-27 Joel E. Denny <jdenny@clemson.edu>
742
743 tests: don't abuse AT_BISON_CHECK.
744 * tests/regression.at (parse-gram.y: LALR = IELR): Move
745 additional shell commands outside of AT_BISON_CHECK.
746
747 2009-09-26 Joel E. Denny <jdenny@clemson.edu>
748
749 tests: check that parse-gram.y's IELR and LALR are identical.
750 * tests/atlocal.in (abs_top_srcdir): New shell variable.
751 * tests/regression.at (parse-gram.y: LALR = IELR): New test
752 group.
753
754 2009-09-19 Alex Rozenman <rozenman@gmail.com>
755
756 Keep sub-messages aligned. Fix strings for translation.
757 * src/location.h (location_print): Add return value.
758 * src/location.c (location_print): Return number of printed
759 characters.
760 * src/complain.h (complain_at_indent, warn_at_indent): Prototype
761 new functions.
762 * src/complain.cpp (indent_ptr): New static variable.
763 (error_message, complain_at_indent, warn_at_indent): Implement
764 the alignment mechanism.
765 * src/scan-code.l (parse_ref, show_sub_messages): Fix strings
766 for translations. Use new alignment mechanism.
767 * tests/named-ref.at: Adjust test-cases.
768 * NEWS (2.5): Add an announcement about named references.
769
770 2009-09-17 Akim Demaille <demaille@gostai.com>
771
772 doc: fixes.
773 * doc/bison.texinfo: here.
774 Reported by Alex Rozenman.
775
776 2009-09-16 Akim Demaille <demaille@gostai.com>
777
778 doc: lalr1.cc and variants.
779 * doc/bison.texinfo (Decl Summary): Document the "lex_symbol" and
780 "variant" %define variables.
781 (C++ Semantic Values): Split into...
782 (C++ Unions, C++ Variants): these.
783 The latter is new.
784 (C++ Parser Interface): Fix type names.
785 Document parser::syntax_error.
786 Document the fact that locations are not mandatory.
787 (C++ Scanner Interface): Split into...
788 (Split Symbols, Complete Symbols): these.
789 The later is new.
790 (Calc++ Parsing Driver): Use variants.
791 Add more comments.
792 Adjust style.
793 (Calc++ Parser): Declare all the tokens, no
794 longer accept raw characters.
795 Remove %union.
796 Adjust types and printers.
797 Remove destructors.
798 (Calc++ Scanner): Use make_<SYMBOL> functions.
799 Use strerror in error message.
800
801 2009-09-16 Akim Demaille <demaille@gostai.com>
802
803 doc: spell checking.
804 * doc/bison.texinfo: here.
805
806 2009-09-16 Akim Demaille <demaille@gostai.com>
807
808 doc: comment changes.
809 * doc/bison.texinfo: Comment changes.
810
811 2009-09-16 Akim Demaille <demaille@gostai.com>
812
813 lalr1.cc: factor the yytranslate_ invocation in make_SYMBOLS.
814 * data/c++.m4, data/lalr1.cc (parser::symbol_type): Change the
815 constructor to take a token_type instead of the (internal) symbol
816 number.
817 Call yytranslate_.
818 * data/variant.hh (b4_symbol_constructor_define_): Therefore,
819 don't call yytranslate_ here.
820
821 2009-09-16 Akim Demaille <demaille@gostai.com>
822
823 TODO: statistics.
824 * TODO (Figures): New.
825
826 2009-09-13 Joel E. Denny <jdenny@clemson.edu>
827
828 tests: clean up push.at test group titles.
829 * tests/push.at: Remove "Push Parsing: " from test group titles
830 because these are already under the banner "Push Parsing Tests".
831
832 2009-09-12 Alex Rozenman <rozenman@gmail.com>
833
834 Provide an additional sub-message for clarity.
835 Add "symbol not found in production" error message when
836 an "invalid reference" is detected in named references
837 resolution.
838 * src/scan-code.l: Update "invalid reference" case.
839 * tests/named-ref.at: Adjust test-cases.
840
841 2009-09-10 Joel E. Denny <jdenny@clemson.edu>
842
843 Clean up yacc.c a little.
844 * data/yacc.c: Clean up M4 for readability, and make output
845 whitespace more consistent. For the main parse function
846 comment, instead of saying "yyparse or yypush_parse", say either
847 "yyparse" or "yypush_parse" depending on which it actually is.
848
849 2009-09-10 Joel E. Denny <jdenny@clemson.edu>
850
851 Fix --enable-gcc-warnings.
852 * src/parse-gram.y (%printer <param>): Handle param_none.
853
854 2009-09-09 Akim Demaille <demaille@gostai.com>
855
856 lalr1.cc: syntax_error as exceptions.
857 It is common to use sort of factories in the user actions. These
858 factories may check some "syntactic" constraints that are not
859 enforced by the grammar itself. This is possible using YYERROR
860 within the action itself. Provide the user with a means to throw
861 a syntax_error exception.
862
863 * data/c++.m4 (b4_public_types_declare, b4_public_types_define):
864 Declare and define yy::parser::syntax_error.
865 * data/lalr1.cc: Include stdexcept.
866 (yy::parser::parse): Wrap the user action within a try/catch.
867 * data/glr.cc: Include stdexcept.
868
869 2009-09-09 Akim Demaille <demaille@gostai.com>
870
871 lalr1.cc: add missing "inline".
872 * data/c++.m4 (b4_public_types_define): Add missing inline to
873 implementations provided in headers.
874
875 2009-09-09 Akim Demaille <demaille@gostai.com>
876
877 %param: documentation.
878 * NEWS (2.6): Document %param, %lex-param, and %parse-param
879 changes.
880 * doc/bison.texinfo: Document that %lex-param and %parse-param
881 are n-ary.
882 Changes some examples to demonstrate it.
883 (Calc++ Parser): Use %param.
884
885 2009-09-09 Akim Demaille <demaille@gostai.com>
886
887 Regen.
888
889 2009-09-09 Akim Demaille <demaille@gostai.com>
890
891 style changes.
892 * src/parse-gram.y (add_param): Scope changes.
893
894 2009-09-09 Akim Demaille <demaille@gostai.com>
895
896 %parse: support several arguments.
897 * src/parse-gram.y (current_param): New.
898 (param_type): Add param_none.
899 (params): New nonterminal.
900 Use it.
901
902 2009-09-09 Akim Demaille <demaille@gostai.com>
903
904 Regen.
905
906 2009-09-09 Akim Demaille <demaille@gostai.com>
907
908 %param.
909 Provide a means to factor lex-param and parse-param common
910 declarations.
911
912 * src/parse-gram.y (param_type): New.
913 Define a %printer for it.
914 (add_param): Use it.
915 (%parse-param, %lex-param): Merge into...
916 (%parse): this new token.
917 Adjust the grammar to use it.
918 * src/scan-gram.l (RETURN_VALUE): New.
919 (RETURN_PERCENT_FLAG): Use it.
920 (RETURN_PERCENT_PARAM): New.
921 Use it to support %parse-param, %lex-param and %param.
922
923 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
924
925 Use aver not assert.
926 * src/output.c: Don't include assert.h.
927 (output_skeleton): Use aver not assert.
928 * src/system.h (aver): In documentation of why, add links to
929 Paul Eggert's explanations in the mailing lists.
930
931 2009-09-05 Alex Rozenman <rozenman@gmail.com>
932
933 Use "Unresolved reference" error message when no symbols were found
934 in a symbolic reference resolution. Remove .expr and -expr from
935 the shown reference when the reference is unresolved.
936 * src/scan-code.l: Change the error message, adjust location columns,
937 rename variable "exact_mode" to "explicit_bracketing".
938 * tests/named-ref.at: Adjust existing tests and add a new one.
939
940 2009-09-04 Akim Demaille <demaille@gostai.com>
941
942 Adjust synclines in src/parse-gram.[ch].
943 * tests/bison.in: Do some magic (including working around issues
944 with ylwrap) when this wrapper is used to compile
945 src/parse-gram.y.
946
947 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
948
949 Complain about unused %define variables and %code qualifiers.
950 * NEWS (2.5): Document.
951 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
952 * doc/bison.texinfo (Decl Summary): Document complaint, and
953 improve %define documentation a little otherwise.
954 * tests/input.at (Reject unused %code qualifiers): Update.
955 (%define errors): Update.
956 (%define, --define, --force-define): Update.
957 (%define backward compatibility): Update.
958 (Unused %define api.pure): Update.
959 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
960
961 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
962
963 Don't suppress warnings about unused parse.error.
964 * data/bison.m4 (b4_error_verbose_flag): Don't examine value of
965 %define variable parse.error unless b4_error_verbose_flag is
966 actually expanded in a skeleton.
967
968 2009-09-03 Akim Demaille <demaille@gostai.com>
969
970 * NEWS (2.4.2): Add "Internationalization" item.
971
972 2009-09-03 Akim Demaille <demaille@gostai.com>
973
974 bootstrap: fix/improve find_tool.
975 * bootstrap (find_tool): Improve error messages.
976 Fix typo about find_tool_names.
977
978 2009-08-29 Joel E. Denny <jdenny@clemson.edu>
979
980 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
981 See
982 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
983 * src/scan-code.h (code_props_rule_action_init): Rename
984 named_ref arg to name so it doesn't shadow named_ref type. This
985 makes it consistent with the function definition in scan-code.l
986 anyway.
987
988 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
989
990 %define: accept unquoted values.
991 * NEWS (2.5): Group all %define changes together, and document
992 this one. Remove quotes in IELR and canonical LR entry.
993 * doc/bison.texinfo: Remove quotes in most examples throughout.
994 (Decl Summary): Update %define documentation.
995 (Table of Symbols): Likewise.
996 * src/ielr.c (LrType): Update documentation.
997 * src/parse-gram.y (content.opt): Add production for ID.
998 * tests/actions.at: Remove quotes in most tests.
999 * tests/calc.at: Likewise.
1000 * tests/existing.at: Likewise.
1001 * tests/input.at: Likewise.
1002 * tests/local.at: Likewise.
1003 * tests/push.at: Likewise.
1004 * tests/reduce.at: Likewise.
1005 * tests/torture.at: Likewise.
1006
1007 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
1008
1009 %define lr.type: make values lowercase IDs.
1010 That is, "LALR" => "lalr", "IELR" => "ielr", and
1011 "canonical LR" => "canonical-lr".
1012 * NEWS (2.5): Update documentation.
1013 * doc/bison.texinfo (Decl Summary): Likewise.
1014 * src/ielr.c (ielr): Use new values.
1015 * src/ielr.h (ielr): Update documentation.
1016 * src/reader.c (prepare_percent_define_front_end_variables): Use
1017 and validate new values.
1018 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
1019 grammars.
1020 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
1021
1022 2009-08-27 Eric Blake <ebb9@byu.net>
1023
1024 scan-gram: avoid portability trap with ctype usage.
1025 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
1026 Avoid compiler warning.
1027
1028 2009-08-27 Joel E. Denny <jdenny@clemson.edu>
1029
1030 tests: use perl for printing special sequences to files.
1031 And skip tests if perl is not available. This is better than
1032 playing tricks with shell portability. Suggested by Akim
1033 Demaille.
1034 * tests/input.at (Bad character literals): Use it here for
1035 omitting final newlines.
1036 (Bad escapes in literals): Use it here for special characters.
1037
1038 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
1039
1040 tests: show a use of %define lr.default-reductions "consistent"
1041 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
1042 prevents the omission of expected tokens for %error-verbose.
1043
1044 2009-08-26 Akim Demaille <demaille@gostai.com>
1045
1046 tests: portability fix.
1047 * tests/input.at (Bad escapes in literals): Don't expect "echo
1048 '\0'" to output \ then 0.
1049
1050 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
1051
1052 Actually handle the yytable zero value correctly this time.
1053 * data/bison.m4 (b4_integral_parser_tables_map): Don't mention
1054 zero values in the YYTABLE comments.
1055 * data/glr.c (yytable_value_is_error): Don't check for zero
1056 value.
1057 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
1058 * data/yacc.c (yytable_value_is_error): Likewise.
1059 * data/lalr1.java (yy_table_value_is_error_): Likewise.
1060 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
1061 * src/tables.h: In header comments, explain why it's useless to
1062 check for a zero value in yytable.
1063
1064 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1065
1066 More fixes related to last two patches.
1067 * data/bison.m4 (b4_integral_parser_tables_map): Fix YYTABLE
1068 comments: zero indicates syntax error not default action.
1069 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
1070 defined.
1071 * data/glr.c (yyis_pact_ninf): Rename to...
1072 (yypact_value_is_default): ... this.
1073 (yyisDefaultedState): Update for rename.
1074 (yyis_table_ninf): Rename to...
1075 (yytable_value_is_error): ... this, and check for value zero
1076 besides just YYTABLE_NINF.
1077 (yygetLRActions): Check for default value from yypact. It
1078 appears that this check is always performed before this function
1079 is invoked, and so adding the check here is probably redundant.
1080 However, the code may evolve after this subtlety is forgotten.
1081 Also, update for rename to yytable_value_is_error. Because that
1082 macro now checks for zero, a different but equivalent branch of
1083 the if-then-else here is evaluated.
1084 (yyreportSyntaxError): Update for rename to
1085 yytable_value_is_error. The zero condition was mishandled
1086 before.
1087 (yyrecoverSyntaxError): Update for renames. No behavioral
1088 changes.
1089 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
1090 New function.
1091 (yy_table_value_is_error_): New function.
1092 (parse): Use new functions where possible. No behavioral
1093 changes.
1094 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
1095 The zero condition was mishandled before.
1096 * data/yacc.c (yyis_pact_ninf): Rename to...
1097 (yypact_value_is_default): ... this.
1098 (yyis_table_ninf): Rename to...
1099 (yytable_value_is_error): ... this, and check for value zero
1100 besides just YYTABLE_NINF.
1101 (yysyntax_error): Update for rename to yytable_value_is_error.
1102 The zero condition was mishandled before.
1103 (yyparse): Update for renames. No behavioral changes.
1104 * src/tables.h: Improve comments about yypact, yytable, etc.
1105 more. Most importantly, say yytable value of zero means syntax
1106 error not default action.
1107
1108 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1109
1110 Fix %error-verbose for conflicts resolved by %nonassoc.
1111 * NEWS (2.5): Document.
1112 * data/glr.c (yyreportSyntaxError): Fix this by checking
1113 yyis_table_ninf.
1114 * data/yacc.c (yysyntax_error): Likewise.
1115 * data/lalr1.cc (yysyntax_error_): Fix this by checking
1116 yytable_ninf_.
1117 * data/lalr1.java (yysyntax_error): Likewise.
1118 * tests/conflicts.at (%nonassoc and eof): Update expected output
1119 and remove FIXME.
1120
1121 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1122
1123 Some code and documentation improvements.
1124 * data/c.m4 (b4_table_value_equals): New macro to capture
1125 some repeated code.
1126 * data/glr.c (yyis_pact_ninf): Use it here.
1127 (yyis_table_ninf): Likewise.
1128 (yyreportSyntaxError): Improve internal comments.
1129 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
1130 Use it everywhere possible.
1131 (yyis_table_ninf): Likewise.
1132 (yysyntax_error): Improve internal comments.
1133 * data/lalr1.cc (yysyntax_error_): Likewise.
1134 * data/lalr1.java (yysyntax_error): Likewise.
1135 * src/tables.h: Improve comments about yypact, yytable, etc.
1136
1137 2009-08-21 Joel E. Denny <jdenny@clemson.edu>
1138
1139 Use locale when quoting.
1140 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
1141 quote rather than implementing quoting here.
1142
1143 2009-08-20 Eric Blake <ebb9@byu.net>
1144
1145 Make previous patch more robust.
1146 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
1147 argmatch.h.
1148 (output_skeleton): Use it.
1149 Suggested by Akim Demaille.
1150
1151 Import latest m4/m4.m4.
1152 * submodules/autoconf: Update to autoconf 2.64.
1153 * configure.ac (M4_GNU_OPTION): New define.
1154 * src/output.c (output_skeleton): Use it to resolve FIXME.
1155 * NEWS: Mention this.
1156
1157 2009-08-19 Joel E. Denny <jdenny@clemson.edu>
1158
1159 Fix complaints about escape sequences.
1160 Discussed starting at
1161 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
1162 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
1163 For a \0 and similar escape sequences meaning the null
1164 character, report an invalid escape sequence instead of an
1165 invalid null character because the latter does not actually
1166 appear in the user's input.
1167 In all escape sequence complaints, don't escape the initial
1168 backslash, and don't quote when the sequence appears at the end
1169 of the complaint line unless there's whitespace that quotearg
1170 won't escape.
1171 Consistently say "invalid" not "unrecognized".
1172 Consistently prefer "empty character literal" over "extra
1173 characters in character literal" warning for invalid escape
1174 sequences; that is, consistently discard those sequences.
1175 * tests/input.at (Bad escapes in literals): New.
1176
1177 2009-08-19 Akim Demaille <demaille@gostai.com>
1178
1179 doc: fixes.
1180 * doc/bison.texinfo: Fix minor Texinfo errors.
1181
1182 2009-08-19 Akim Demaille <demaille@gostai.com>
1183
1184 tests: distcc compliance.
1185 * tests/synclines.at (AT_SYNCLINES_COMPILE): Discard distcc's
1186 error messages from the output.
1187
1188 2009-08-19 Akim Demaille <demaille@gostai.com>
1189
1190 variables: simplify the upgrade of namespace into api.namespace.
1191
1192 This patch simplifies "variables: rename namespace as
1193 api.namespace", commit 67501061076ba46355cfd9f9361c7eed861b389c.
1194 Suggested by Joel E. Denny in
1195 http://lists.gnu.org/archive/html/bison-patches/2009-07/msg00006.html
1196
1197 * src/muscle-tab.c (muscle_percent_variable_update): New.
1198 (muscle_percent_define_insert): Use it in replacement of the
1199 previous tr invocation.
1200 Remove variable_tr, no longer needed.
1201 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
1202 Remove.
1203 * data/c++.m4: No longer handle namespace -> api.namespace.
1204 * tests/input.at (%define backward compatibility): Check that
1205 namespace is treated as api.namespace.
1206
1207 2009-08-19 Akim Demaille <demaille@gostai.com>
1208
1209 doc: %initial-action to initialize yylloc.
1210 Reported by Bill Allombert.
1211 * doc/bison.texinfo: Set fill-column to 76.
1212 (Location Type): Document the use of %initial-action to initialize
1213 yylloc.
1214
1215 2009-08-19 Akim Demaille <demaille@gostai.com>
1216
1217 lalr1.cc: use state_type.
1218 * data/lalr1.cc (yysyntax_error_): Use state_type.
1219 Move argument names into yy*.
1220
1221 2009-08-19 Akim Demaille <demaille@gostai.com>
1222
1223 lalr1.cc: get rid of yyparse's yystate.
1224 yystate and yystack_[0].state are equal, keep only the latter.
1225 The former was also used as a temporary variable to compute the
1226 post-reduction state. Move this computation into an auxiliary
1227 function.
1228
1229 * data/glr.c (yyLRgotoState): Fuse variable definition and first
1230 assignment.
1231 * data/lalr1.cc (yy_lr_goto_state_): New.
1232 (yyparse): Use it.
1233 Replace remaining uses of yystate by yystate_[0].state.
1234 Remove the former.
1235
1236 2009-08-19 Akim Demaille <demaille@gostai.com>
1237
1238 lalr1.cc: destroy $$ when YYERROR is called.
1239 * data/lalr1.cc (yyreduce): Compute the resulting state before
1240 running the user action so that yylhs is a valid symbol.
1241 (yyerrorlab): Since yylhs is complete (it knows its type), we can
1242 simply call yy_destroy_ to destroy $$ on YYERROR invocations.
1243 * tests/c++.at (AT_CHECK_VARIANTS): Test YYERROR with variants.
1244
1245 2009-08-18 Joel E. Denny <jdenny@clemson.edu>
1246
1247 maint: update for gnulib's recent update-copyright changes
1248 * gnulib: Update.
1249 * .x-update-copyright (COPYING): Add as it's no longer implied
1250 when .x-update-copyright is present.
1251 * cfg.mk (update-copyright-local): Remove, now ignored.
1252 (update-copyright): Declare update-b4-copyright as a dependency.
1253
1254 2009-08-17 Akim Demaille <demaille@gostai.com>
1255
1256 build: require gettext 0.17.
1257
1258 Suggested by Bruno Haible.
1259 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
1260 * configure.ac: require gettext 0.17 to ensure compatibility with
1261 gnulib.
1262
1263 2009-08-17 Akim Demaille <demaille@gostai.com>
1264
1265 build: lower gettext requirements.
1266
1267 Bison was uselessly requiring the formatstring macros from
1268 gettext, which resulted in mo files not being installed on systems
1269 that perfectly supported Bison mo files. Lower the requirement.
1270 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
1271
1272 * configure.ac: Require need-ngettext instead of
1273 need-formatstring-macros.
1274 Reported by Martin Jabocs.
1275 Suggested by Bruno Haible.
1276 * INSTALL: Restructure.
1277 (Internationalization): New.
1278
1279 2009-08-14 Joel E. Denny <jdenny@clemson.edu>
1280
1281 maint: fix use of copyright year intervals.
1282 * gnulib: Update.
1283 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
1284 as now recommended in gnulib/NEWS.
1285 * build-aux/update-b4-copyright: Fix.
1286 * cfg.mk (update-copyright-env): Configure update-copyright.
1287
1288 2009-08-13 Joel E. Denny <jdenny@clemson.edu>
1289
1290 Make it easier to write deterministic tests.
1291 Continues Akim's work from his 2009-06-10 commits.
1292 * src/reader.c (check_and_convert_grammar): Don't add any
1293 symbols after the first symbols_do invocation.
1294 * src/symtab.c (symbols_sorted): New static global.
1295 (user_token_number_redeclaration): Update comments.
1296 (symbol_from_uniqstr): If a new symbol is being created, assert
1297 that symbols_sorted hasn't been allocated yet.
1298 (symbols_free): Free symbols_sorted.
1299 (symbols_cmp, symbols_cmp_qsort): New functions.
1300 (symbols_do): Sort symbol_table into symbols_sorted on first
1301 invocation.
1302 * tests/input.at (Numbered tokens): Recombine tests now that the
1303 output should be deterministic across multiple numbers.
1304
1305 2009-08-12 Akim Demaille <demaille@gostai.com>
1306
1307 tests: GCC 4.5 compliance.
1308 * tests/synclines.at (AT_SYNCLINES_COMPILE): Adjust to GCC 4.5's
1309 messages about #error.
1310
1311 2009-08-12 Akim Demaille <demaille@gostai.com>
1312
1313 build: fix the generation of the documentation.
1314 Some of our targets use "bison --help", but they can't depend on
1315 "bison" itself (to avoid additional requirements on the user), so
1316 they used to call "make src/bison" in the commands. Then
1317 concurrent builds may fail: one make might be aiming one of its
1318 jobs at compiling src/bison, and another job at generating the man
1319 page. If the latter is faster than the former, then we have two
1320 makes that concurrently try to compile src/bison.
1321
1322 This might also be a more convincing explanation for the failure
1323 described in the patch "build: fix paths".
1324
1325 * Makefile.am (SUFFIXES): Initialize.
1326 * build-aux/move-if-change: New, symlink to gnulib's.
1327 * build-aux/local.mk: Ship it.
1328 * doc/common.x: Remove, merged into...
1329 * doc/bison.x: here.
1330 * doc/local.mk (doc/bison.help): New.
1331 ($(CROSS_OPTIONS_TEXI)): Depend on it.
1332 Use src/bison.
1333 (.x.1): Replace with...
1334 (doc/bison.1): this explicit, simpler, target.
1335 (common_dep): Remove, inlined where appropriate.
1336 (SUFFIXES, PREPATH): Remove, unused.
1337
1338 2009-08-12 Akim Demaille <demaille@gostai.com>
1339
1340 gnulib: improve prefixing.
1341 * configure.ac (gl_PREFIXED_LIBOBJS): Don't rename it, rather,
1342 change the value of...
1343 (gl_LIBOBJS): this.
1344 Adjust more variables.
1345 * etc/prefix-gnulib-mk (prefix_assignment): Don't rename
1346 gl_LIBOBJS.
1347 (prefix): Also transform rules whose targets have slashes.
1348 Use $prefix liberally.
1349 Map @MKDIR_P@ to $(MKDIR_P).
1350 Prefix directories that are mkdir'd.
1351
1352 2009-08-12 Akim Demaille <demaille@gostai.com>
1353
1354 build: fix paths.
1355 When using $(top_builddir) inconsistently, Make (including GNU
1356 Make) is sometimes confused. As a result it may want to build
1357 lib/libbison.la and $(top_builddir)/lib/libbison.la (the same
1358 file, different names) concurrently, which, amusingly enough,
1359 might end with:
1360
1361 ranlib lib/libbison.a
1362 ranlib lib/libbison.a
1363 make[2]: *** [lib/libbison.a] Segmentation fault
1364
1365 on OS X.
1366
1367 * doc/local.mk, src/local.mk: Do not use $(top_builddir) when not
1368 needed.
1369
1370 2009-08-12 Akim Demaille <demaille@gostai.com>
1371
1372 distcheck: fix.
1373
1374 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
1375
1376 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
1377
1378 * tests/local.mk (TESTSUITE_AT): Add named-refs.at.
1379
1380 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
1381
1382 Miscellaneous code readability improvements.
1383
1384 * src/reader.c (reader): Move %define front-end variable
1385 defaults and checking into...
1386 (prepare_percent_define_front_end_variables): ... this new
1387 function.
1388
1389 * src/scan-gram.l (INITIAL): For consistency with string
1390 literals, don't store open quote on character literal. It's
1391 discarded before returning anyway.
1392 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
1393 Make length test more readable, and make the character stored
1394 for an empty literal more obvious while consistent with the
1395 previous behavior.
1396
1397 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
1398 USER_NUMBER_HAS_STRING_ALIAS throughout.
1399 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
1400 that is repeated in symtab.h. Improve argument names to make it
1401 clear which side of the symbol-string alias pair is which.
1402 (symbol_check_alias_consistency): Improve local variable names
1403 for the same purpose.
1404 * src/symtab.h (struct symbol): Make comments about aliases
1405 clearer.
1406 (symbol_make_alias): Improve comments and argument name.
1407 * src/output.c (token_definitions_output): Update for rename to
1408 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
1409
1410 2009-08-08 Alex Rozenman <rozenman@gmail.com>
1411
1412 Convert "misleading reference" messages to warnings.
1413 * src/scan-code.l: New function 'show_sub_messages', more
1414 factoring.
1415 * tests/named-ref.at: Adjust tests.
1416
1417 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
1418
1419 maint: run "make update-copyright"
1420
1421 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
1422
1423 maint: make update-b4-copyright easier to use
1424 * build-aux/update-b4-copyright: In warnings, report line
1425 numbers rather than character positions.
1426 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
1427 that update-copyright runs it.
1428 * gnulib: Update.
1429
1430 2009-08-05 Joel E. Denny <jdenny@clemson.edu>
1431
1432 maint: clean up update-b4-copyright code
1433 * build-aux/update-b4-copyright: Do not accept 2-digit
1434 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
1435 Don't accept a `[' in a b4_copyright argument.
1436 Format code more consistently.
1437 Don't assume b4*copyright never occurs.
1438
1439 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1440
1441 maint: automate b4_copyright updates.
1442 * Makefile.am (update-b4-copyright): New target rule.
1443 * build-aux/local.mk (EXTRA_DIST): Add update-b4-copyright.
1444 * build-aux/update-b4-copyright: New.
1445 * data/yacc.c: Remove stray characters around b4_copyright
1446 invocations.
1447
1448 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1449
1450 maint: automate annual package-wide copyright-year update.
1451 * .x-update-copyright: New.
1452 * Makefile.am (EXTRA_DIST): Remove maint.mk.
1453 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
1454 update-copyright. Remove gnumakefile, which is implied by
1455 maintainer-makefile.
1456 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
1457 * gnulib: Update.
1458 * maint.mk: Remove, now copied from gnulib.
1459 * examples/extexi: Add missing "(C)" in copyright statement so
1460 update-copyright can recognize it.
1461 * src/LR0.h: Likewise.
1462 * src/print.h: Likewise.
1463 * src/print_graph.h: Likewise.
1464 * src/gram.c: Add missing comma in copyright statement.
1465 * src/gram.h: Likewise.
1466
1467 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1468
1469 Fix "make distcheck".
1470 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
1471 of just calc.stamp.
1472
1473 2009-08-01 Joel E. Denny <jdenny@clemson.edu>
1474
1475 Pacify "gcc -Wunused" for the input function from Flex.
1476 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
1477 and later.
1478 * src/scan-code.l: Add "%option noinput", which I cannot find in
1479 the Flex manual, but which Flex has supported since at least as
1480 far back as 2.5.4. However, if any of our developers still use
1481 Flex 2.5.4, they'll need to stop configuring with
1482 --enable-gcc-warnings because "%option noinput" didn't work
1483 correctly until Flex 2.5.6.
1484 * src/scan-gram.l: Likewise.
1485 * src/scan-skel.l: Likewise.
1486
1487 2009-07-31 Alex Rozenman <rozenman@gmail.com>
1488
1489 Fix --enable-gcc-warnings problems.
1490 * src/reader.c: Adjust variable names.
1491 * src/scan-code.l: Fix prototypes and adjust names.
1492 * src/named-ref.c: Remove redundant "if".
1493
1494 2009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
1495
1496 Fix a --enable-gcc-warnings problem.
1497 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
1498 variable.
1499
1500 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
1501
1502 Warn about character literals not of length one.
1503 * NEWS (2.5): Document.
1504 * src/scan-gram.l (INITIAL): Remove comment that we don't check
1505 the length.
1506 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
1507 * tests/input.at (Bad character literals): New test group.
1508
1509 2009-07-24 Alex Rozenman <rozenman@gmail.com>
1510
1511 Fix some memory leaks.
1512 * src/named-ref.c: Add a pointer check (named_ref_free).
1513 * src/scan-code.l: New function (variant_table_free). Called in
1514 code_scanner_free.
1515 * src/symlist.c: Call to named_ref_free (symbol_list_free).
1516
1517 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
1518
1519 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
1520
1521 2009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
1522
1523 Some M4 cleanup in the testsuite.
1524 Suggested by Eric Blake at
1525 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
1526 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
1527 complicate the code by distinguishing between a missing value
1528 and an empty string value for an optional argument. This fix is
1529 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
1530 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
1531 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
1532 arguments are not needed because of the following changes.
1533 Fix stale comments.
1534 Bison developers should use GNU M4 and should not use
1535 POSIXLY_CORRECT when building the test suite, so do not
1536 complicate the code by avoiding $10 and above.
1537 Do not quote an empty string value for an optional argument, and
1538 do not distinguish between a missing value and an empty string
1539 value.
1540
1541 2009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
1542
1543 Revert unnecessary column realignment in --help output.
1544 Reported by Akim Demaille at
1545 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
1546 * src/getargs.c (usage): Here.
1547
1548 2009-07-04 Alex Rozenman <rozenman@gmail.com>
1549
1550 Alphabetical order in src/local.mk.
1551 * src/local.mk: Adjust.
1552
1553 2009-07-04 Alex Rozenman <rozenman@gmail.com>
1554
1555 Style changes and factoring.
1556 * src/named-ref.h: Add comments.
1557 * src/parse-gram.y: Readability and style changes.
1558 * src/reader.c: Factoring: assign_named_ref function.
1559 * src/scan-code.l: Factoring and style changes. Rename
1560 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
1561 Use "unsigned" type for variant index. Improve readablity.
1562 * src/scan-gram.l: Change error messages and add comments.
1563 * src/symlist.h: symbol_list_null: New function decl.
1564 * src/symlist.c: symbol_list_null: Implement here.
1565 * tests/named-refs.at: Adjust for new error messages.
1566
1567 2009-06-29 Eric Blake <ebb9@byu.net>
1568
1569 scan-code: avoid compiler warnings
1570 * src/scan-code.l (parse_named_ref): Use correct specifiers.
1571
1572 2009-06-29 Akim Demaille <demaille@gostai.com>
1573
1574 build: avoid concurrent extraction of calc++.
1575 * examples/calc++/Makefile.am (calc.stamp): New.
1576 Depend on it to create the sources of calc++ so that concurrent
1577 builds don't launch several "extexi" in parallel.
1578 Not only this is inefficient, this also builds incorrect sources
1579 with several extractions mixed together.
1580
1581 2009-06-29 Akim Demaille <demaille@gostai.com>
1582
1583 parse.error: fix.
1584 * data/bison.m4: Move code related to specific variables after the
1585 definition of the variable-maintaining macros so that we don't
1586 "invoke" b4_percent_define_check_values before it is defined.
1587
1588 2009-06-29 Akim Demaille <demaille@gostai.com>
1589
1590 variables: parse.error
1591
1592 Implement, document, and test the replacement of %error-verbose
1593 by %define parse.error "verbose".
1594 * data/bison.m4 (b4_error_verbose_if): Reimplement to track the
1595 values of the parse.error variable.
1596 Make "simple" its default value.
1597 Check the valid values.
1598 * src/parse-gram.y: Use %define parse.error.
1599 (PERCENT_ERROR_VERBOSE): New token.
1600 Support it.
1601 * src/scan-gram.l: Support %error-verbose.
1602
1603 * doc/bison.texinfo (Decl Summary): Replace the documentation of
1604 %define error-verbose by that of %define parse.error.
1605 * NEWS: Document it.
1606
1607 * tests/actions.at, tests/calc.at: Use parse.error instead of
1608 %error-verbose.
1609
1610 2009-06-27 Alex Rozenman <rozenman@gmail.com>
1611
1612 Implement support for named symbol references.
1613 * src/parse-gram.y: Add new syntax (named_ref.opt).
1614 * src/reader.c: Store named refs in symbol lists.
1615 * src/reader.h: New argument for symbol_append and
1616 action_append functions.
1617 * src/scan-code.h: Add new field (named_ref) into
1618 code_props data structure. Keeps named ref of midrule
1619 actions.
1620 * src/scan-code.l: Support for named refs in semantic
1621 action code. New function 'parse_named_ref'.
1622 * src/scan-gram.l: Support bracketed id.
1623 * src/symlist.c: Store named refs in symbol lists.
1624 * src/symlist.h: New field in symbol list: named_ref.
1625 * src/named-ref.h: New file, a struct for named_ref.
1626 * src/named-ref.cp: New file, named_ref_new function.
1627 * src/local.mk: Add two new files.
1628 * tests/testsuite.at: Include new test group:
1629 * tests/named-refs.at: this new file.
1630
1631 2009-06-25 Akim Demaille <demaille@gostai.com>
1632
1633 hash: check insertion for memory exhaustion.
1634 * src/uniqstr.c (uniqstr_new): New.
1635
1636 2009-06-24 Akim Demaille <demaille@gostai.com>
1637
1638 variables: rename namespace as api.namespace.
1639 Discussed in
1640 http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00033.html
1641
1642 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
1643 New.
1644 (b4_percent_define_use): New.
1645 Use it where applicable.
1646 * data/c++.m4: Replace uses of the variable "namespace" by
1647 "api.namespace".
1648 Default the latter to the former.
1649 * doc/bison.texinfo (Decl Summary): Document "namespace" as
1650 obsolete.
1651 Document api.namespace.
1652 Use @samp to document %define uses, keep @code for identifiers.
1653 * NEWS: Likewise.
1654 * tests/c++.at, tests/input.at: Test api.namespace instead of
1655 namespace. (The tests passed with namespace.)
1656
1657 2009-06-11 Akim Demaille <demaille@gostai.com>
1658
1659 style changes.
1660 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
1661 * src/print-xml.c: Style changes.
1662 * tests/conflicts.at: Comment changes.
1663
1664 2009-06-11 Akim Demaille <demaille@gostai.com>
1665
1666 xml: beware of user strings used to give a %prec to rules.
1667 * tests/conflicts.at (%prec with user strings): New.
1668 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
1669 XML output.
1670
1671 2009-06-11 Akim Demaille <demaille@gostai.com>
1672
1673 hash: check insertion for memory exhaustion.
1674 * src/muscle-tab.c (muscle_insert, muscle_grow)
1675 * src/state.c (state_hash_insert): Check the return value of
1676 hash_insert.
1677
1678 2009-06-11 Akim Demaille <demaille@gostai.com>
1679
1680 tests: honor TESTSUITEFLAGS in every check target.
1681 * tests/local.mk (RUN_TESTSUITE): New.
1682 (check-local, installcheck-local, maintainer-check-g++)
1683 (maintainer-check-posix, maintainer-check-valgrind): Use it.
1684
1685 2009-06-10 Akim Demaille <demaille@gostai.com>
1686
1687 deterministic test suite.
1688 Some consistency checks on symbols are performed after all the
1689 symbols were read, by an iteration over the symbol table. This
1690 traversal is nondeterministic, which can be a problem for test
1691 cases.
1692 Avoid this.
1693 Addresses another form of nondeterminism reported by Joel E. Denny.
1694 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
1695
1696 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
1697 test in two.
1698 Use different file names for the three tests to make the
1699 maintenance easier.
1700
1701 2009-06-10 Akim Demaille <demaille@gostai.com>
1702
1703 gnulib: update.
1704 * gnulib: Update to latest.
1705 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
1706 * m4/.gitignore: Regen.
1707 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
1708 Call xalloc_die on hash_insert failures.
1709 Requested by the new __warn_unused_result__ attribute of
1710 hash_insert.
1711
1712 2009-06-10 Akim Demaille <demaille@gostai.com>
1713
1714 deterministic user-token-number redeclaration errors.
1715 Address nondeterminism reported by Joel E. Denny.
1716 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
1717
1718 * src/uniqstr.h: Comment changes.
1719 * src/location.h (boundary_cmp, location_cmp): New.
1720 * src/symtab.c (user_token_number_redeclaration): New.
1721 (symbol_translation): Use it.
1722 * tests/input.at (Numbered tokens): Adjust the expected output.
1723
1724 2009-05-25 Akim Demaille <demaille@gostai.com>
1725
1726 build: avoid ignored errors.
1727 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Don't generate ignored
1728 errors, they pollute the output.
1729
1730 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1731
1732 Convert multiple variable definition warnings to complaints.
1733 * NEWS (2.5): Add a new entry for that change.
1734 * doc/bison.texinfo (Decl Summary): Update %define entry.
1735 (Bison Options): Update -D/--define/-F/--force-define entry.
1736 * src/muscle-tab.c (muscle_percent_define_insert): Implement.
1737 * src/muscle-tab.h (muscle_percent_define_insert): Update
1738 comments.
1739 * tests/input.at (`%define errors'): Update.
1740 (`%define, --define, --force-define'): Update.
1741
1742 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1743
1744 -F/--force-define and relative %define/-D/--define priorities.
1745 * NEWS (2.5): Add documentation to -D/--define entry.
1746 * build-aux/cross-options.pl: Hard-code association of
1747 --force-define with %define.
1748 * doc/bison.texinfo (Decl Summary): In %define entry,
1749 cross-reference command-line options.
1750 (Bison Options): Add documentation to -D/--define entry.
1751 (Option Cross Key): Widen column for --force-define row.
1752 * src/getargs.c (usage): Document -F/--force-define. Realign
1753 options in output.
1754 (short_options, long_options, getargs): Parse -F/--force-define,
1755 and update muscle_percent_define_insert invocations.
1756 * src/muscle-tab.h (muscle_percent_define_how): New enum type.
1757 (muscle_percent_define_insert): Add argument with that type.
1758 * src/muscle-tab.c (muscle_percent_define_insert): Implement
1759 -F/--force-define behavior and priorities.
1760 (muscle_percent_define_ensure): Update
1761 muscle_percent_define_insert invocation.
1762 * src/parse-gram.y (prologue_declaration): Update
1763 muscle_percent_define_insert invocations.
1764 * tests/input.at (`%define, --define'): Rename to...
1765 (`%define, --define, --force-define'): ... this and extend.
1766
1767 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1768
1769 Update some comments to make sense for -D.
1770 * data/bison.m4 (b4_check_user_names): In header comments, say
1771 "user occurrence" instead of "grammar occurrence".
1772 * src/muscle-tab.h (muscle_percent_define_insert): Likewise.
1773 (muscle_percent_code_grow): Likewise just for consistency.
1774
1775 2009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
1776
1777 * data/c++.m4 (b4_namespace_close): Simplify slightly.
1778
1779 2009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
1780
1781 Handle a trailing `:' in a user-supplied C++ namespace better.
1782 * data/c++.m4 (b4_namespace_close): Don't let it be printed
1783 among the closing braces here. This fix might make the
1784 generated code easier to debug, but otherwise it should be
1785 insignificant because a trailing `:' is a C++ error already.
1786
1787 2009-05-19 Akim Demaille <demaille@gostai.com>
1788
1789 remove useless variable.
1790 * src/getargs.c (skeleton_arg): Remove now useless variable.
1791 Should help the compiler see that this printf-like call is sane.
1792
1793 2009-05-15 Akim Demaille <demaille@gostai.com>
1794
1795 Rename token.prefix as api.tokens.prefix.
1796 Discussed here.
1797 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00024.html.
1798
1799 * NEWS, data/bison.m4, data/c.m4, data/java.m4, doc/bison.texinfo,
1800 * tests/c++.at, tests/calc.at, tests/java.at, tests/local.at
1801 (token.prefix): Rename as...
1802 (api.tokens.prefix): this.
1803
1804 2009-05-11 Akim Demaille <demaille@gostai.com>
1805
1806 doc: use C++ headers.
1807 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
1808 headers.
1809
1810 2009-05-11 Akim Demaille <demaille@gostai.com>
1811
1812 doc: token.prefix
1813 * doc/bison.simple (Decl Summary): Document token.prefix.
1814 (Calc++ Parser): Various fixes.
1815 Formatting changes.
1816 Use token.prefix.
1817 Introduce a macro TOKEN to shorten the code and make it more
1818 readable.
1819 (Calc++ Scanner): Adjust.
1820 * NEWS (Variable token.prefix): New.
1821
1822 2009-05-04 Akim Demaille <demaille@gostai.com>
1823
1824 bison: catch bad symbol names.
1825 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
1826 * tests/input.at: Adjust.
1827
1828 2009-05-04 Akim Demaille <demaille@gostai.com>
1829
1830 identifiers: dashes are letters.
1831 Dashes can now start identifiers (symbols and directives).
1832
1833 * src/scan-gram.l ({letter}): Add dash.
1834 ({id}): Remove it.
1835 * tests/input.at (Symbols): Adjust.
1836 Remove stray comment.
1837 * tests/regression.at (Invalid inputs): Adjust error message.
1838 * doc/bison.texinfo (Symbols): Update.
1839
1840 2009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
1841
1842 Declare %code to be a permanent feature.
1843 * NEWS (2.4.2): Here.
1844 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
1845 experimental.
1846 (Decl Summary): Likewise.
1847
1848 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
1849
1850 Convert underscores to dashes in some %define variable names.
1851 For now, just api.push-pull and lr.keep-unreachable-states.
1852 Maintain old names for backward compatibility.
1853 * NEWS (2.5): Document.
1854 * data/c.m4 (b4_identification): Update comment.
1855 * data/yacc.c: Update access.
1856 * doc/bison.texinfo: Update.
1857 * etc/bench.pl.in (bench_push_parser): Update use.
1858 * src/files.c (tr): Move to...
1859 * src/getargs.c, src/getargs.h (tr): ... here because I can't
1860 think of a better place to expose it. My logic is that, for all
1861 uses of tr so far, command-line arguments can be involved, and
1862 getargs.h is already included.
1863 * src/main.c (main): Update access.
1864 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
1865 variable names to new variable names before assigning value.
1866 * src/reader.c (reader): Update setting default.
1867 * tests/calc.at: Update uses.
1868 * tests/conflicts.at (Unreachable States After Conflict
1869 Resolution): Update use.
1870 * tests/input.at (%define enum variables): Update use.
1871 (%define backward compatibility): New test group.
1872 * tests/push.at: Update uses.
1873 * tests/reduce.at: Update uses.
1874 * tests/torture.at: Update uses.
1875
1876 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
1877
1878 Set all front-end %define defaults in one place.
1879 * src/main.c (main): Move lr.keep_unreachable_states default...
1880 * src/reader.c (reader): ... to here.
1881
1882 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1883
1884 Rename lr.default_reductions to lr.default-reductions.
1885 * NEWS (2.5): Here.
1886 * doc/bison.texinfo: Here.
1887 * src/lalr.c (initialize_LA): Here.
1888 * src/print.c (print_reductions): Here.
1889 * src/reader.c (reader): Here.
1890 * src/tables.c (action_row): Here.
1891 * tests/input.at (%define enum variables): Here.
1892 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
1893
1894 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1895
1896 Pacify ./configure --enable-gcc-warnings.
1897 * tests/input.at (Symbols): Prototype yyerror and yylex.
1898
1899 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1900
1901 Document how `%define "var" "value"' is not M4-friendly.
1902 * src/parse-gram.y (variable): In comments here.
1903
1904 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
1905
1906 Clean up recent patches a little.
1907 Reported by Akim Demaille.
1908 * doc/bison.texinfo (Understanding): Fix typos.
1909 * src/print.c (print_reductions): Don't use negated variable.
1910
1911 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
1912
1913 List accepted values for a %define enum variable with an invalid value.
1914 Suggested by Akim Demaille at
1915 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
1916 * data/bison.m4 (_b4_percent_define_check_values): Implement.
1917 * src/muscle-tab.c (muscle_percent_define_check_values): Implement.
1918 * tests/input.at (%define lr.default_reductions invalid values): Merge
1919 into...
1920 (%define enum variables): ... here, and update output.
1921
1922 2009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
1923
1924 Rename "default rule" to "default reduction".
1925 This includes changing variable names in code, changing
1926 comments, and renaming %define lr.default_rules to %define
1927 lr.default_reductions.
1928 * NEWS (2.5): Update IELR documentation.
1929 * data/bison.m4 (b4_integral_parser_tables_map): Adjust YYDEFACT
1930 documentation.
1931 * data/glr.c, data/lalr1.java: Sync copyright dates.
1932 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
1933 and lr.type documentation. Make some other wording
1934 improvements.
1935 (Glossary): Adjust cross-references and Default Reduction
1936 definition.
1937 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
1938 Remove a confusing comment pointed out by Akim Demaille.
1939 (initialize_LA): Adjust code.
1940 * src/print-xml.c (print_reductions): Adjust code.
1941 * src/print.c (print_reductions): Adjust code.
1942 * src/reader.c (reader): Adjust code.
1943 * src/tables.c (action_row): Adjust code.
1944 (token_actions): Adjust code.
1945 * src/tables.h: Adjust YYDEFACT documentation.
1946 * tests/input.at (%define lr.default_rules invalid values):
1947 Rename test group to...
1948 (%define lr.default_reductions invalid values): ... this, and
1949 update grammar file and expected output.
1950 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
1951 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
1952
1953 2009-04-21 Akim Demaille <demaille@gostai.com>
1954
1955 tests: check the use of dashes and periods in symbols.
1956 * tests/input.at (Symbol): New test group.
1957
1958 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1959
1960 Document %define lr.type and lr.default_rules.
1961 * NEWS (2.5): Add an entry.
1962 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
1963 besides just LALR(1) and GLR(1).
1964 * doc/bison.texinfo (Introduction): Likewise.
1965 (Language and Grammar): Bison is no longer limited to LALR(1)
1966 restrictions.
1967 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
1968 when trying to distinguish from GLR. Talk about LR(1) grammars
1969 rather than LALR(1) grammars.
1970 (Decl Summary): In %define api.push_pull entry, say it applies
1971 to deterministic parsers in C rather than LALR(1) parsers in C.
1972 Add lr.default_rules entry.
1973 Add lr.type entry.
1974 (Mystery Conflicts): Bison is no longer limited to LALR(1)
1975 restrictions.
1976 (Generalized LR Parsing): Same changes as for the previous GLR
1977 section.
1978 (Memory Management): Say deterministic rather than LALR(1).
1979 (Understanding): Correct some bison output.
1980 Index discussion of "accepting state".
1981 Say deterministic rather than LALR(1).
1982 (Bison Options): In --yacc entry, say deterministic rather than
1983 LALR(1).
1984 In --report, --graph, and --xml entries, just don't mention
1985 LALR(1).
1986 (C++ Parsers): Say deterministic rather than LALR(1).
1987 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
1988 (Glossary): Add Accepting State, Consistent State, Default Rule,
1989 and IELR(1) definitions.
1990 In Generalized LR (GLR) definition, make same changes as in
1991 previous GLR sections.
1992 In LALR(1) definition, say Bison uses LALR(1) by default rather
1993 than implying Bison is limited to LALR(1).
1994 (LocalWords): Add IELR.
1995
1996 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1997
1998 Finish implementing %define lr.type.
1999 Its value can be "LALR", "IELR", or "canonical LR".
2000 * lib/timevar.def (TV_IELR_PHASE1): New var.
2001 (TV_IELR_PHASE2): New var.
2002 (TV_IELR_PHASE3): New var.
2003 (TV_IELR_PHASE4): New var.
2004 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
2005 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
2006 Sbitset.h, ielr.h, and ielr.c.
2007 * src/getargs.h, src/getargs.c (enum trace, trace_args,
2008 trace_types): Add trace_ielr.
2009 * src/lalr.h, src/lalr.c (ngotos): Export it.
2010 (F): Rename to...
2011 (goto_follows): ... this, update all uses, and export it.
2012 (set_goto_map): Export it.
2013 (map_goto): Export it.
2014 (compute_lookahead_tokens): Don't free goto_follows yet. Now
2015 handled in ielr.
2016 (initialize_LA): Export it. Move lookback allocation to...
2017 (lalr): ... here because, for canonical LR, initialize_LA must
2018 be invoked but lookback and much of the rest of LALR isn't
2019 needed.
2020 * main.c (main): Instead of lalr, invoke ielr, which invokes
2021 lalr.
2022 * src/reader.c (reader): Default lr.type to "LALR".
2023 Default lr.default_rules to "accepting" if lr.type is "canonical
2024 LR". Leave the default as "all" otherwise.
2025 Check for a valid lr.type value.
2026 * src/state.h, src/state.c (struct state_list): Add state_list
2027 member.
2028 (state_new): Initialize state_list member to NULL.
2029 (state_new_isocore): New function, exported.
2030 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
2031 exercises all values of lr.type.
2032 (GNU AWK Grammar): Rename test group to...
2033 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
2034 AT_TEST_EXISTING_GRAMMAR.
2035 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
2036 (GNU pic Grammar): Rename test group to...
2037 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
2038 AT_TEST_EXISTING_GRAMMAR.
2039 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
2040 all values of lr.type.
2041 (Single State Split): New test groups using AT_TEST_LR_TYPE.
2042 (Lane Split): Likewise.
2043 (Complex Lane Split): Likewise.
2044 (Split During Added Lookahead Propagation): Likewise.
2045
2046 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2047
2048 Add new files for IELR and canonical LR implementation.
2049 * src/AnnotationList.c: New.
2050 * src/AnnotationList.h: New.
2051 * src/InadequacyList.c: New.
2052 * src/InadequacyList.h: New.
2053 * src/Sbitset.c: New.
2054 * src/Sbitset.h: New.
2055 * src/ielr.c: New.
2056 * src/ielr.h: New.
2057
2058 2009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
2059
2060 Implement %define lr.default_rules.
2061 Its value describes the states that are permitted to contain
2062 default rules: "all", "consistent", or "accepting".
2063 * src/reader.c (reader): Default lr.default_rules to "all".
2064 Check for a valid lr.default_rules value.
2065 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
2066 is "accepting", then only mark the accepting state as
2067 consistent.
2068 (initialize_LA): Tell state_lookahead_tokens_count whether
2069 lr.default_rules is "accepting".
2070 * src/tables.c (action_row): If lr.default_rules is not "all",
2071 then disable default rules in inconsistent states.
2072 * src/print.c (print_reductions): Use this opportunity to
2073 perform some assertions about whether lr.default_rules was
2074 obeyed correctly.
2075 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
2076 helps with checking the parser tables for a grammar.
2077 * tests/input.at (%define lr.default_rules invalid values): New
2078 test group.
2079 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
2080 AT_TEST_TABLES_AND_PARSE.
2081 (`no %define lr.default_rules'): New test group generated by
2082 AT_TEST_LR_DEFAULT_RULES.
2083 (`%define lr.default_rules "all"'): Likewise.
2084 (`%define lr.default_rules "consistent"'): Likewise.
2085 (`%define lr.default_rules "accepting"'): Likewise.
2086
2087 2009-04-20 Akim Demaille <demaille@gostai.com>
2088
2089 Formatting change.
2090
2091 2009-04-20 Akim Demaille <demaille@gostai.com>
2092
2093 bison: factoring.
2094 * src/output.c (token_definitions_output): Use symbol_id_get
2095 instead of duplicating its logic.
2096 * TODO (YYERRCODE): Extend.
2097
2098 2009-04-20 Akim Demaille <demaille@gostai.com>
2099
2100 variables: prefer error-verbose to error_verbose.
2101 * data/bison.m4 (b4_error_verbose_if): Based on error-verbose
2102 instead of error_verbose.
2103 * src/scan-gram.l (%error-verbose): Map to the error-verbose
2104 variable.
2105 * doc/bison.texinfo: Promote %define error-verbose instead of
2106 %error-verbose.
2107 * tests/actions.at: Prefer %define error-verbose to %error-verbose.
2108
2109 2009-04-15 Akim Demaille <demaille@gostai.com>
2110
2111 variables: accept dashes.
2112 * data/bison.m4 (b4_percent_define_if_define_): Also map dashes to
2113 underscores.
2114 * src/scan-gram.l ({id}): Also accept dashes after the initial
2115 letter.
2116 ({directive}): Use {id}.
2117 * src/parse-gram.y: Comment and formatting changes.
2118 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
2119 symbols.
2120 * src/complain.h, src/complain.c (yacc_at): New.
2121 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
2122 symbol names.
2123 * src/output.c (token_definitions_output): Do not #define token
2124 names with dashes.
2125
2126 2009-04-20 Akim Demaille <demaille@gostai.com>
2127
2128 Consistently refer to Yacc, not YACC.
2129 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
2130
2131 2009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
2132
2133 Pacify make maintainer-check-posix.
2134 * tests/input.at (%define, --define): Move bison command-line
2135 options before grammar file name.
2136
2137 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2138
2139 Document semicolon warnings.
2140 * NEWS (2.5): Here.
2141
2142 2009-04-14 Akim Demaille <demaille@gostai.com>
2143
2144 variables: use `parse.assert' instead of `assert'.
2145 * TODO (assert): Remove.
2146 * data/bison.m4 (b4_assert_if): Replace with...
2147 (b4_parse_assert_if): this.
2148 * data/lalr1.cc, data/variant.hh, tests/c++.at: Adjust.
2149 * doc/bison.texinfo (Decl Summary): Document parse.assert.
2150
2151 2009-04-14 Akim Demaille <demaille@gostai.com>
2152
2153 variables: use `parse.trace' instead of `debug'.
2154 * src/getargs.c (getargs): Map -t to %define trace.parse.
2155 * src/scan-gram.l (%debug): Map to %define trace.parse.
2156 * data/bison.m4 (b4_percent_define_if_define): Map `.' in variable
2157 names to `_' in macro names.
2158 (b4_debug_if): Replace with...
2159 (b4_parse_trace_if): this.
2160 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
2161 * data/yacc.c: Adjust.
2162 * doc/bison.texinfo (Decl Summary): Document %debug as obsoleted.
2163 Use @code to label the variable list.
2164 Document the variable parse.trace.
2165 (Tracing): Promote the parse.trace variable.
2166 * TODO: %printer is not documented.
2167
2168 2009-04-14 Akim Demaille <demaille@gostai.com>
2169
2170 doc: minor fixes.
2171 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
2172 (Table of Symbols): Remove duplicate entry for %debug.
2173
2174 2009-04-10 Eric Blake <ebb9@byu.net>
2175
2176 submodules: update to latest
2177 * submodules/autoconf: Use latest upstream Autoconf.
2178
2179 2009-04-06 Eric Blake <ebb9@byu.net>
2180
2181 Work around autoconf 2.63b bug in testsuite.
2182 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
2183 autoconf bug related to # in test.
2184
2185 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2186
2187 * NEWS (2.5): New section. Describe new -D/--define feature.
2188
2189 2009-04-06 Akim Demaille <demaille@gostai.com>
2190
2191 Regen.
2192 * src/parse-gram.h, src/parse-gram.c: Regen.
2193
2194 2009-04-06 Akim Demaille <demaille@gostai.com>
2195
2196 rename muscle_tab.* as muscle-tab.* for consistency.
2197 * src/muscle_tab.h, src/muscle_tab.c: Rename as...
2198 * src/muscle-tab.h, src/muscle-tab.c: these.
2199 * src/getargs.c, src/local.mk, src/main.c, src/output.c,
2200 * src/parse-gram.y, src/reader.c, src/scan-code.l: Adjust.
2201
2202 2009-04-06 Akim Demaille <demaille@gostai.com>
2203
2204 Makefile: introduce $(BISON).
2205 * src/local.mk (BISON): New.
2206 (YACC): Use it.
2207
2208 2009-04-06 Akim Demaille <demaille@gostai.com>
2209
2210 parser: handle %locations as %define locations.
2211 * src/getargs.h, src/getargs.c (locations_flag): Remove.
2212 * src/getargs.c, src/scan-code.l: Use muscle_percent_define_ensure
2213 to set "locations" to true.
2214 * src/output.c (prepare): Don't output "locations".
2215 * src/scan-gram.l (%locations): Handle it as a %<flag>.
2216 * src/parse-gram.y: It's no longer a token.
2217 Don't handle it.
2218 * data/bison.m4 (b4_locations_if): Define it with
2219 b4_percent_define_if_define.
2220 * data/c.m4, data/glr.cc: Adjust.
2221
2222 2009-04-06 Akim Demaille <demaille@gostai.com>
2223
2224 Regen.
2225 * src/parse-gram.c: Regen.
2226
2227 2009-04-06 Akim Demaille <demaille@gostai.com>
2228
2229 muscle: factor the handling of obsolete of obsolete directives.
2230 Suggested by Joel E. Denny.
2231
2232 * src/muscle_tab.h, src/muscle_tab.c (muscle_percent_define_ensure):
2233 New, extracted from...
2234 * src/parse-gram.y (prologue_declaration: pure-parser): here.
2235 Remove it.
2236 (prologue_declaration: "%<flag>"): Use
2237 muscle_percent_define_ensure.
2238 (%error-verbose, %pure-parser): No longer tokens.
2239 * src/scan-gram.l (pure-parser): Return as a %<flag>.
2240
2241 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2242
2243 Fix options documentation.
2244 * build-aux/cross-options.pl: As in --help output, write optional
2245 arguments as [=ARG] not =[ARG].
2246 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
2247
2248 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2249
2250 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
2251 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
2252 requirements for a correct m4 are stricter.
2253 * m4/m4.m4: Make it a symbolic link to submodules/autoconf/m4/m4.m4.
2254 * configure.ac: Update to use AC_PROG_GNU_M4.
2255 Reported by Eric Blake.
2256
2257 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2258
2259 Help with updating web manual.
2260 * HACKING: Incorporate instructions from gnulib/doc/README.
2261 * bootstrap.conf (gnulib_modules): Add gendocs.
2262
2263 2009-04-03 Akim Demaille <demaille@gostai.com>
2264
2265 Regen.
2266 * src/parse-gram.h, src/parse-gram.c: Regen.
2267
2268 2009-04-03 Akim Demaille <demaille@gostai.com>
2269
2270 Factor %FLAG at scan level.
2271 * src/parse-gram.y (PERCENT_DEBUG, PERCENT_ERROR_VERBOSE): Token
2272 definitions and associated rules, replaced by....
2273 (PERCENT_FLAG): this new token type, and rule.
2274 * src/scan-gram.l (RETURN_PERCENT_FLAG): New.
2275 Use it for %debug and %error-verbose.
2276
2277 2009-04-03 Akim Demaille <demaille@gostai.com>
2278
2279 Regen.
2280 * src/parse-gram.h, src/parse-gram.c: Regen.
2281
2282 2009-04-03 Akim Demaille <demaille@gostai.com>
2283
2284 Treat %debug as %define debug.
2285 * data/bison.m4 (b4_debug_if): New.
2286 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c,
2287 * data/lalr1.java: Use it instead of b4_debug_flag.
2288 * src/getargs.h, src/getargs.c (debug_flag): Remove.
2289 * src/output.c (prepare): Don't output it.
2290 * src/parse-gram.y: Treat %debug as %define debug.
2291
2292 2009-04-03 Akim Demaille <demaille@gostai.com>
2293
2294 Treat %error-verbose as %define error_verbose.
2295 This allows to pass -Derror_verbose on the command line. Better
2296 yet, it allows to pass -Derror_verbose=$(ERROR_VERBOSE), with
2297 ERROR_VERBOSE being defined as false or true.
2298 * data/bison.m4 (b4_percent_define_if_define): Instead of relying
2299 on b4_percent_define_ifdef, for does not check the defined value,
2300 but only whether the symbol is defined, rely on
2301 b4_percent_define_flag_if, so that a value of "false" is processed
2302 as a false.
2303 If not defined, define the flag to "false".
2304 (b4_error_verbose_if): New.
2305 * data/glr.c, data/lalr1.cc, data/yacc.c: Use it instead of
2306 b4_error_verbose_flag.
2307 * src/getargs.h, src/getargs.c (error_verbose_flag): Remove.
2308 * src/output.c (prepare): Don't output it.
2309 * src/parse-gram.y (%error-verbose): Treat as %define error_verbose.
2310
2311 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2312
2313 Fix strange %define locations for default values.
2314 Reported by Akim Demaille at
2315 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
2316 and discussed again starting at
2317 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
2318 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
2319 because location information is bogus.
2320 Use angle brackets to delimit fake file name because square brackets
2321 look like underexpanded m4. Choose a better fake file name.
2322 Use negative line numbers.
2323 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
2324 * src/location.c (location_print): If line for a boundary is negative,
2325 only print that boundary's file name.
2326 * src/location.h: Document that.
2327 * tests/skeletons.at (%define Boolean variables: invalid skeleton
2328 defaults): Update output.
2329
2330 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2331
2332 Pacify ./configure --enable-gcc-warnings.
2333 * Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS) because many files
2334 in lib won't compile with it.
2335 * src/local.mk (src_bison_CFLAGS): Use $(WERROR_CFLAGS) here only.
2336
2337 2009-03-31 Akim Demaille <demaille@gostai.com>
2338
2339 bootstrap: --help to stdout.
2340 * bootstrap (usage): Don't send --help to stderr.
2341 Use a here doc instead of a long string.
2342
2343 2009-03-31 Akim Demaille <demaille@gostai.com>
2344
2345 bootstrap: README-hacking no longer exists
2346 * bootstrap (checkout_only_file): Set to HACKING.
2347
2348 2009-03-26 Akim Demaille <demaille@gostai.com>
2349
2350 doc: merge HACKING and README-hacking.
2351 Two files is confusing.
2352 Reported by Alexandre Duret-Lutz.
2353
2354 * README-hacking: Merge into...
2355 * HACKING (Working from the repository): here.
2356
2357 2009-03-26 Akim Demaille <demaille@gostai.com>
2358
2359 doc: update README-hacking.
2360 * README-hacking: We now use git and git submodules.
2361 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
2362
2363 2009-03-26 Akim Demaille <demaille@gostai.com>
2364
2365 lalr1.cc: avoid GCC 4.3 warnings.
2366 GCC 4.3 now warns about "a || b && c" and asks for explicit
2367 parentheses.
2368 Reported by Alexandre Duret-Lutz.
2369 * data/location.cc: Update copyright years.
2370 (Position::operator==): Use parens to make precedence explicit.
2371 Compare lines and columns first, as they are more likely to be
2372 different, and they are faster to compare.
2373
2374 2009-03-26 Akim Demaille <demaille@gostai.com>
2375
2376 gnulib: update.
2377 * gnulib: Update to latest.
2378 * src/local.mk (AM_CFLAGS): Move to...
2379 * Makefile.am: here.
2380 * etc/prefix-gnulib-mk (prefix_assignment): Also transform
2381 AM_CFLAGS.
2382
2383 2009-03-02 Akim Demaille <demaille@gostai.com>
2384
2385 Comment changes.
2386
2387 2009-03-02 Akim Demaille <demaille@gostai.com>
2388
2389 Share b4_yytranslate_define.
2390 * data/lalr1.cc (b4_yytranslate_define): Move to...
2391 * data/c++.m4: here.
2392
2393 2009-03-02 Akim Demaille <demaille@gostai.com>
2394
2395 Use locations in the variant example.
2396 Yes, this obfuscates the point of this example, variants only.
2397 But glr.cc cannot work (yet?) without locations. This change
2398 makes it easier to use this example with glr.cc.
2399
2400 * examples/variant.yy (assert): %define it.
2401 (locations): Request them.
2402 (yylex): Bind the location to the stage.
2403
2404 2009-03-02 Akim Demaille <demaille@gostai.com>
2405
2406 Dub make_TOKEN as a public type interface.
2407 * data/c++.m4 (b4_symbol_constructor_declare)
2408 (b4_symbol_constructor_define): New empty stubs.
2409 (b4_public_types_declare, b4_public_types_define): Use them.
2410 * data/lalr1.cc (b4_symbol_constructor_declare)
2411 (b4_symbol_constructor_declare_)
2412 (b4_symbol_constructor_define_, b4_symbol_constructor_define):
2413 Move to...
2414 * data/variant.hh: here.
2415 Remove the "b4_variant_if" parts, as variant.hh is loaded only if
2416 needed.
2417 * data/lalr1.cc: No longer invoke b4_symbol_constructor_define and
2418 b4_symbol_constructor_declare, as it is now done by
2419 b4_public_types_define and b4_public_types_declare.
2420
2421 2009-03-02 Akim Demaille <demaille@gostai.com>
2422
2423 Coding style changes.
2424 * data/lalr1.cc (b4_symbol_constructor_declaration_)
2425 (b4_symbol_constructor_declarations)
2426 (b4_symbol_constructor_definition_)
2427 (b4_symbol_constructor_definitions)
2428 (b4_yytranslate_definition): Rename as...
2429 (b4_symbol_constructor_declare_)
2430 (b4_symbol_constructor_declare)
2431 (b4_symbol_constructor_define_)
2432 (b4_symbol_constructor_define)
2433 (b4_yytranslate_define): these.
2434 * data/variant.hh (b4_variant_definition): Rename as...
2435 (b4_variant_define): this.
2436
2437 2009-03-02 Akim Demaille <demaille@gostai.com>
2438
2439 Factor b4_assert_if, b4_lex_symbol_if, and b4_variant_if.
2440 * data/bison.m4 (b4_percent_define_if_define): New.
2441 * data/c++.m4 (b4_variant_if): Move to...
2442 * data/bison.m4: Here, using b4_percent_define_if_define.
2443 * data/lalr1.cc (b4_assert_if, b4_lex_symbol_if): Move to...
2444 * data/bison.m4: Here, using b4_percent_define_if_define.
2445
2446 2009-03-02 Akim Demaille <demaille@gostai.com>
2447
2448 Dub symbol_type_base as a public type.
2449 * data/c++.m4 (b4_public_types_declare): Now define
2450 symbol_type_base and symbol_type.
2451 (b4_public_types_define): New.
2452 In both cases, the definitions are taken verbatim from lalr1.cc.
2453 * data/lalr1.cc: Adjust.
2454
2455 2009-03-02 Akim Demaille <demaille@gostai.com>
2456
2457 b4_public_types_declare.
2458 * data/c++.m4 (b4_public_types_declare): New.
2459 * data/glr.cc, data/lalr1.cc: Use it.
2460
2461 2009-03-02 Akim Demaille <demaille@gostai.com>
2462
2463 b4_semantic_type_declare.
2464 * data/c++.m4 (b4_semantic_type_declare): New.
2465 Factors and generalizes what was in glr.cc and lalr1.cc.
2466 * data/variant.hh (b4_semantic_type_declare): Redefine it for
2467 variants.
2468 * data/lalr1.cc, data/glr.cc: Use it.
2469
2470 2009-02-26 Akim Demaille <demaille@gostai.com>
2471
2472 Upgrade gnulib.
2473 * gnulib: Upgrade from master.
2474 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, m4/.gitignore:
2475 Regen.
2476
2477 2009-02-25 Akim Demaille <demaille@gostai.com>
2478
2479 Remove useless arguments.
2480 * data/glr.c (yy_reduce_print): $$ and @$ are not used and not
2481 relevant.
2482
2483 2009-02-25 Akim Demaille <demaille@gostai.com>
2484
2485 Comment changes.
2486 * data/lalr1.cc: here.
2487
2488 2009-02-25 Akim Demaille <demaille@gostai.com>
2489
2490 Fix glr.cc's debug level handling.
2491 * data/glr.cc (yydebug_): Remove, as it is actually yydebug from
2492 glr.c which is used.
2493 (debug_level, set_debug_level): Adjust.
2494
2495 2009-02-25 Akim Demaille <demaille@gostai.com>
2496
2497 Copyright years.
2498 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
2499
2500 2009-02-25 Akim Demaille <demaille@gostai.com>
2501
2502 Style changes.
2503 * etc/bench.pl.in (generate_grammar_list): Consitently use
2504 location_type, not yy::location.
2505
2506 2009-02-25 Akim Demaille <demaille@gostai.com>
2507
2508 Comment change.
2509 * data/lalr1.cc: here.
2510
2511 2009-02-19 Akim Demaille <demaille@gostai.com>
2512
2513 Make yyparser::error public.
2514 * data/lalr1.cc: here.
2515 There is no good reason to keep it private (and it is convenient
2516 to use it from the scanner for instance). It is already public in
2517 glr.cc.
2518
2519 2009-02-19 Akim Demaille <demaille@gostai.com>
2520
2521 Comment changes.
2522 * data/glr.cc: here.
2523
2524 2009-02-19 Akim Demaille <demaille@gostai.com>
2525
2526 Remove trailing blanks.
2527 The epilogue has its own ending \n, no need to add another.
2528
2529 * data/glr.c, data/lalr1.java, data/yacc.c: dnl when outputing the
2530 epilogue.
2531 * data/glr.cc: dnl when extending the epilogue.
2532 Remove stray "private:".
2533
2534 2009-02-19 Akim Demaille <demaille@gostai.com>
2535
2536 Use b4_c_modern.
2537 * data/c.m4 (b4_c_function_decl): Here.
2538
2539 2009-02-19 Akim Demaille <demaille@gostai.com>
2540
2541 Comment changes.
2542 * data/lalr1.cc: here.
2543
2544 2009-02-19 Akim Demaille <demaille@gostai.com>
2545
2546 Extract variant.hh
2547 * data/variant.hh: New, extracted from...
2548 * data/lalr1.cc: here.
2549 Adjust.
2550 * data/local.mk: Adjust.
2551
2552 2009-02-19 Akim Demaille <demaille@gostai.com>
2553
2554 Extract stack.hh from lalr1.cc.
2555 * data/stack.hh: New.
2556 * data/lalr1.cc: Extract from here.
2557 * data/local.mk: Adjust.
2558
2559 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
2560
2561 Add reminder about uploading public key to keys.gnupg.net.
2562 * HACKING (Release Procedure): Here.
2563
2564 2009-01-28 Akim Demaille <demaille@gostai.com>
2565
2566 * NEWS: Update information about 2.4.1 and 2.4.2.
2567
2568 2008-11-04 Akim Demaille <demaille@gostai.com>
2569
2570 Reformat NEWS.
2571 * NEWS: Use more outline-mode markup.
2572 Suggested by Jim Meyering.
2573
2574 2009-01-08 Akim Demaille <demaille@gostai.com>
2575
2576 Fix grep portability issues.
2577 Grep on Solaris does not support -q.
2578 Reported by Summum Bonum.
2579
2580 * NEWS: Add a stub for 2.4.2.
2581 * THANKS: Add Summum Bonum.
2582 * tests/atlocal.in (EGREP): New.
2583 (CC, CXX, XSLTPROC): Make it possible to override them via
2584 envvars.
2585 * tests/java.at: Use $EGREP instead of egrep.
2586 Use AT_CHECK's ignore instead of grep's -q.
2587
2588 2008-12-11 Akim Demaille <demaille@gostai.com>
2589
2590 Pass the token type to yysyntax_error.
2591 * data/yacc.c (yysyntax_error): Take the transated token instead
2592 of the raw number.
2593 Adjust callers.
2594 * TODO: Update.
2595
2596 2008-12-11 Akim Demaille <demaille@gostai.com>
2597
2598 Formatting changes.
2599 * data/glr.c: Formatting changes.
2600
2601 2008-12-11 Akim Demaille <demaille@gostai.com>
2602
2603 Propagate i18n changes into glr.c.
2604 * TODO: Update.
2605 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
2606 building the error message format dynamically.
2607 * data/lalr1.java: Formatting changes.
2608
2609 2008-12-11 Akim Demaille <demaille@gostai.com>
2610
2611 Use testsuite -C.
2612 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
2613 Solves problems when top_srcdir is an absolute path.
2614 Suggested by Eric Blake.
2615 * configure.ac: Require Autoconf 2.62.
2616
2617 2008-12-11 Akim Demaille <demaille@gostai.com>
2618
2619 Simplify the i18n of the error messages.
2620 * data/lalr1.cc: Comment changes.
2621 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
2622 lalr1.cc instead of building dynamically the format string.
2623
2624 2008-12-08 Akim Demaille <demaille@gostai.com>
2625
2626 Fix portability issue in the test suite.
2627 * tests/local.at (AT_MATCHES_CHECK): New.
2628 Based on Perl instead of Sed. Sed has too many portability
2629 pitfalls, not ever Sed is GNU Sed.
2630 * tests/actions.at (Fix user actions without a trailing semicolon):
2631 Use it.
2632
2633 2008-12-08 Akim Demaille <demaille@gostai.com>
2634
2635 Update data/README.
2636 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
2637
2638 2008-12-08 Akim Demaille <demaille@gostai.com>
2639
2640 Install autoconf as a submodule to get m4sugar.
2641 * .gitmodules: Add submodules/autoconf.
2642 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
2643 submodules/autoconf.
2644
2645 2008-12-08 Akim Demaille <demaille@gostai.com>
2646
2647 Test token.prefix in all the skeletons.
2648 * data/java.m4 (b4_token_enum): Use the token.prefix.
2649 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
2650 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
2651 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
2652 * tests/java.at: Comment changes.
2653 (AT_CHECK_JAVA_MINIMAL): Define the END token.
2654 (Java parser class and package names): Add token.prefix check.
2655
2656 2008-12-08 Akim Demaille <demaille@gostai.com>
2657
2658 Fix regeneration of atconfig.
2659 * tests/local.mk (tests/atconfig): The rule was incorrect, but
2660 remove it: now that there is no tests/Makefile.am, the top-level
2661 Makefile properly updates atconfig when needed.
2662
2663 2008-12-07 Di-an Jan <dianj@freeshell.org>
2664
2665 Implement the FIXME that ends an user action with a semicolon
2666 if it seems necessary.
2667 * src/scan-code.l (flex rules section): Flag cpp directive from
2668 any `#' to the first unescaped end-of-line. Semicolon is not
2669 needed after `;', `{', '}', or cpp directives and is needed after
2670 any other token (whitespaces and comments have no effect).
2671 * tests/actions.at (Fix user actions without a trailing semicolon):
2672 New test.
2673 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
2674 to make user actions complete statements.
2675 Adjust column numbers in error messages.
2676 * tests/regression.at (Fix user actions without a trailing semicolon):
2677 Remove. Covered by new test.
2678
2679 2008-12-07 Akim Demaille <demaille@gostai.com>
2680
2681 Update gnulib.
2682 * gnulib: Update from master.
2683
2684 2008-12-05 Eric Blake <ebb9@byu.net>
2685
2686 Avoid compiler warning.
2687 * src/output.c (muscle_insert_item_number_table): Delete unused
2688 function.
2689
2690 2008-12-02 Eric Blake <ebb9@byu.net>
2691
2692 Build testsuite with newer autoconf.
2693 * tests/output.at (m4_expand): Don't override in newer autoconf,
2694 where the underlying implementation changed.
2695 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
2696 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
2697 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
2698 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
2699 since some of them contain unbalanced ')'.
2700
2701 2008-12-01 Akim Demaille <demaille@gostai.com>
2702
2703 Use b4_symbol for printers and destructors everywhere.
2704 * data/bison.m4 (b4_symbol_action_location): New.
2705 * data/c.m4 (b4_symbol_actions): Remove.
2706 Adjust all callers to use by b4_symbol_foreach and the corresponding
2707 b4_symbol_printer/destructor macro.
2708 * data/glr.cc: Adjust.
2709 * data/lalr1.java: Adjust the %destructor sanity check.
2710 * src/output.c (symbol_code_props_output): Remove, we no longer
2711 need the b4_symbol_printers/destructors tables.
2712
2713 2008-12-01 Akim Demaille <demaille@gostai.com>
2714
2715 Use b4_symbol_case_.
2716 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
2717 b4_symbol_case_.
2718
2719 2008-12-01 Akim Demaille <demaille@gostai.com>
2720
2721 Move b4_symbol based macro to bison.m4.
2722 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
2723 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
2724 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
2725 (b4_type_foreach): Move to...
2726 * data/bison.m4: Here.
2727 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
2728 b4_symbol_value_template instead of b4_symbol_value.
2729
2730 2008-12-01 Akim Demaille <demaille@gostai.com>
2731
2732 b4_symbol/type_foreach.
2733 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
2734 Use them.
2735
2736 2008-12-01 Akim Demaille <demaille@gostai.com>
2737
2738 Use the symbol properties to output the printer/destructor for lalr1.cc.
2739 Instead of defining complex list of tuples to define various
2740 properties of the symbols, we now prefer to define symbols as
2741 "structs" in m4: using the symbol key (its number), and the
2742 property name, b4_symbol gives it value. Use this to handle
2743 destructors and printers.
2744
2745 * src/output.c (CODE_PROP): New.
2746 (prepare_symbol_definitions): Use it to define the printer and
2747 destructor related attributes of the symbols.
2748 * data/lalr1.cc (b4_symbol_actions): Rename as...
2749 (b4_symbol_action): this.
2750 Use b4_symbol instead of 6 arguments.
2751 (b4_symbol_printer, b4_symbol_destructor): New.
2752 Use them instead of b4_symbol_actions.
2753
2754 2008-12-01 Akim Demaille <demaille@gostai.com>
2755
2756 Avoid capturing variables too easily.
2757 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
2758 v__ and p__ instead of v and p.
2759
2760 2008-12-01 Akim Demaille <demaille@gostai.com>
2761
2762 Remove spurious empty line before syncline.
2763 * data/bison.m4 (b4_syncline): Don't output an empty line before
2764 the output.
2765
2766 2008-11-26 Akim Demaille <demaille@gostai.com>
2767
2768 Convert lib/Makefile.am into lib/local.mk.
2769 The real problem is rather gnulib.mk, which itself is extracted
2770 from a Makefile.am that gnulib expects to the "recursive". The
2771 tool prefix-gnulib-mk converts such a gnulib.mk to be
2772 non-recursive. Also, some AC_SUBST variables need to be adjusted.
2773
2774 * etc/prefix-gnulib-mk: New.
2775 * bootstrap (slurp): Use it to convert further gnulib.mk.
2776 No longer try to avoid re-creation of lib/gnulib.mk as the changes
2777 are deeper.
2778 * lib/Makefile.am: Rename as...
2779 * lib/local.mk: this.
2780 Adjust to be prefixed.
2781 * Makefile.am, configure.ac: Adjust.
2782 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
2783
2784 2008-11-26 Akim Demaille <demaille@gostai.com>
2785
2786 s/_FLAGS/FLAGS/.
2787 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
2788 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
2789 Reported by Eric Blake.
2790
2791 2008-11-26 Akim Demaille <demaille@gostai.com>
2792
2793 Use b4_parser_tables_define in glr.cc.
2794 * data/glr.c: Use b4_parser_tables_define instead of defining the
2795 (deterministic integral) tables by hand.
2796
2797 2008-11-26 Akim Demaille <demaille@gostai.com>
2798
2799 Use b4_parser_tables_define in Java.
2800 * data/java.m4 (b4_typed_parser_table): Rename as...
2801 (b4_typed_parser_table_define): this, for consistency.
2802 Accept a comment as $4.
2803 Move $2 into yy*_.
2804 (b4_integral_parser_table): Rename as...
2805 (b4_integral_parser_table_define): this.
2806 * data/lalr1.java: Adjust all uses.
2807 Use b4_parser_tables_define instead of generation by hand.
2808
2809 2008-11-26 Akim Demaille <demaille@gostai.com>
2810
2811 Prepare the convergence bw C style and Java table generation.
2812 * data/bison.m4 (b4_tables_map, b4_tables_declare)
2813 (b4_tables_define): Rename as...
2814 (b4_integral_parser_tables_map, b4_parser_tables_declare)
2815 (b4_parser_tables_define): these.
2816 * data/c.m4 (b4_table_define): Rename as...
2817 (b4_integral_parser_table_define): this.
2818 * data/lalr1.cc: Adjust.
2819 (b4_table_define, b4_table_declare): Rename as...
2820 (b4_integral_parser_table_define)
2821 (b4_integral_parser_table_declare): these.
2822 (yyrline_): Move the comment where it is actually used.
2823 * data/yacc.c: Adjust.
2824 (yyrline): Use b4_integral_parser_table_define.
2825
2826 2008-11-26 Akim Demaille <demaille@gostai.com>
2827
2828 Regen.
2829 * src/parse-gram.h, src/parse-gram.c: Regen.
2830
2831 2008-11-26 Akim Demaille <demaille@gostai.com>
2832
2833 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
2834 * data/lalr1.cc (b4_tables_map): Move to...
2835 * data/bison.m4: here.
2836 Update the comment for yytable during the flight.
2837 (b4_tables_declare, b4_tables_define): New.
2838 * data/lalr1.cc: Use them.
2839 * data/c.m4 (b4_table_define): New.
2840 * data/yacc.c: Use b4_tables_define instead of output the tables
2841 by hand.
2842 * tests/regression.at (Web2c Actions): Adjust the expected output,
2843 the order of the tables changed.
2844
2845 2008-11-26 Akim Demaille <demaille@gostai.com>
2846
2847 Get rid of (yy)rhs and (yy)prhs.
2848 These tables are no longer needed in the parsers, and they don't seem to
2849 be useful. They are not documented either.
2850
2851 * src/output.c (prepare_rules): Get rid of rhs and prhs.
2852 Adjust the computation of (yy)r2.
2853
2854 2008-11-26 Akim Demaille <demaille@gostai.com>
2855
2856 Rule length is unsigned.
2857 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
2858
2859 2008-11-26 Akim Demaille <demaille@gostai.com>
2860
2861 Get rid of lalr1-split.cc.
2862 It was no longer maintainer.
2863
2864 * data/lalr1-split.cc: Remove.
2865 * etc/bench.pl.in (bench_fusion_parser): Remove.
2866 Adjust.
2867
2868 2008-11-26 Akim Demaille <demaille@gostai.com>
2869
2870 Use yy* consistently.
2871 * data/glr.c: Now that yyrhs no longer exists as a global
2872 variable, rename local "rhs" variables into "yyrhs" for
2873 consistency.
2874
2875 2008-11-25 Akim Demaille <demaille@gostai.com>
2876
2877 Get rid of yyrhs and yyprhs in glr.c.
2878 * data/glr.c (yyrhs, yyprhs): Remove.
2879 Instead, use the state stack and yystos.
2880
2881 2008-11-25 Akim Demaille <demaille@gostai.com>
2882
2883 Flag glr tests.
2884 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
2885 as an Autotest keyword.
2886
2887 2008-11-25 Akim Demaille <demaille@gostai.com>
2888
2889 Prefer TESTSUITE_FLAGS.
2890 TESTSUITEFLAGS is barely readable.
2891
2892 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
2893 for backward compatibility.
2894 Use the former instead of the latter.
2895
2896 2008-11-25 Akim Demaille <demaille@gostai.com>
2897
2898 Get rid of yyrhs and yyprhs in larl1.java.
2899 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
2900 (yy_reduce_print): Rather, use yystos_ and the state stack.
2901
2902 2008-11-25 Akim Demaille <demaille@gostai.com>
2903
2904 Formatting changes.
2905
2906 2008-11-25 Akim Demaille <demaille@gostai.com>
2907
2908 Get rid of yyrhs and yyprhs in yacc.c.
2909 They were used to get the symbol types, given a rule number, when
2910 displaying the top of the stack before a reduction. But the
2911 symbol type is available from the state stack. This has two be
2912 benefits: two tables less in the parser (making it smaller), and a
2913 more consistent use of the three stacks which will help to fuse
2914 them.
2915
2916 * data/yacc.c (yyprhs, yyrhs): Remove.
2917 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
2918 (yy_reduce_print): Take yyssp as argument.
2919 Use it, together with yystos, to get the symbol type.
2920 * tests/regression.at (Web2c Report): Remove these tables from the
2921 expected output.
2922
2923 2008-11-25 Akim Demaille <demaille@gostai.com>
2924
2925 b4_tables_map.
2926 The point is to factor the generation of the tables across skeletons.
2927 This is language dependant.
2928
2929 * data/c.m4 (b4_comment_): New.
2930 Should be usable to define how to generate tables independently of
2931 the language.
2932 (b4_c_comment): New.
2933 (b4_comment): Bounce to b4_c_comment.
2934 Now support $2 = [PREFIX] for indentation.
2935 * data/lalr1.cc (b4_table_declare): Don't output a comment if
2936 there is no comment.
2937 Indent it properly when there is one.
2938 Output the ending semicolon.
2939 (b4_table_define): Space changes.
2940 Output the ending semicolon.
2941 (b4_tables_map): New.
2942 Use it twice instead of declaring and defining the (integral)
2943 tables by hand.
2944
2945 2008-11-25 Akim Demaille <demaille@gostai.com>
2946
2947 b4_table_declare.
2948 * data/lalr1.cc (b4_table_declare): New.
2949 Use it to declare the tables defined with b4_table_define.
2950 (b4_table_define): Declare a third arg to match b4_table_declare
2951 signature.
2952 Move all the comments around invocations of b4_table_define into
2953 the invocations itselves.
2954 Move things around to have the order for declarations and
2955 definitions.
2956
2957 2008-11-25 Akim Demaille <demaille@gostai.com>
2958
2959 Formatting changes.
2960 * data/lalr1.java: here.
2961
2962 2008-11-25 Akim Demaille <demaille@gostai.com>
2963
2964 b4_args is more general than only C++.
2965 * data/lalr1.cc (b4_args, _b4_args): Move to...
2966 * data/bison.m4: here.
2967
2968 2008-11-21 Di-an Jan <dianj@freeshell.org>
2969
2970 Implement no-XXX arguments for --warnings, --report, --trace.
2971 * src/getargs.c (flags_argmatch): Handles no-XXX.
2972 Fix typo in doxygen comment.
2973
2974 2008-11-21 Akim Demaille <demaille@gostai.com>
2975
2976 Display the changes in cross-options.texi.
2977 * build-aux/cross-options.pl ($sep): New, to separate items.
2978 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
2979 changes.
2980
2981 2008-11-20 Di-an Jan <dianj@freeshell.org>
2982
2983 Improves options in the manual.
2984 * doc/bison.texinfo (-g, -x): Add space before argument.
2985 (Option Cross Key): Implement FIXME: listing directives also.
2986 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
2987 (Short Option): Special case -d. Put arguments inside @option.
2988 (Bison Directive): Add column, automatically extracted from
2989 src/scan-gram.l (actual name passed as the first argument)
2990 with special case for %define.
2991 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
2992 to build-aux/cross-options.pl.
2993 * src/getargs.c (usage): Document limitations of cross-options.pl.
2994 * src/scan-gram.l: Likewise.
2995
2996 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
2997
2998 Fix unexpanded macros in GLR defines file.
2999 Reported by Csaba Raduly at
3000 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
3001 * THANKS (Csaba Raduly): Add.
3002 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
3003 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
3004 lexer in a separate module that includes the defines file.
3005 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
3006 source.
3007 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
3008 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
3009 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
3010 (AT_DATA_SOURCE_PROLOGUE): New.
3011 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
3012 (AT_DATA_SOURCE): New.
3013 (AT_FULL_COMPILE): Extend to support an additional source file.
3014
3015 2008-11-18 Akim Demaille <demaille@gostai.com>
3016
3017 More TODO.
3018 * TODO: More short term issues.
3019
3020 2008-11-18 Akim Demaille <demaille@gostai.com>
3021
3022 Regen.
3023 * src/parse-gram.h, src/parse-gram.c: Regen.
3024
3025 2008-11-18 Akim Demaille <demaille@gostai.com>
3026
3027 Use b4_subtract where possible.
3028 * data/lalr1.cc (b4_subtract): Move to...
3029 * data/bison.m4: here.
3030 * data/glr.c (b4_rhs_data): Use it.
3031 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
3032
3033 2008-11-18 Akim Demaille <demaille@gostai.com>
3034
3035 Remove incorrect mode specification.
3036 * data/glr.cc: Don't pretend it's C code.
3037
3038 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3039
3040 Simplify last patch slightly.
3041 * src/getargs.c (getargs): Here.
3042
3043 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3044
3045 Fix last warning from --enable-gcc-warnings.
3046 * src/getargs.c (getargs): Don't assign const address to non-const
3047 pointer.
3048
3049 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3050
3051 Don't let maintainer-*-check targets force a version update.
3052 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
3053 handled.
3054
3055 2008-11-17 Di-an Jan <dianj@freeshell.org>
3056
3057 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
3058 Align menus. Adjust word wrapping. Use node names for menu names.
3059 (Examples): Don't abbreviate node names.
3060 (LocalWords): Remove abbreviations.
3061 (Copying): Make description a sentence.
3062 (Java Action Features): Remove period to match the rest of menu.
3063
3064 2008-11-17 Di-an Jan <dianj@freeshell.org>
3065
3066 Handles several --enable-gcc-warnings.
3067 * src/getargs.c (command_line_location): Set parameters to void.
3068 * src/output.c (symbol_type_name_cmp): Make static.
3069 (symbols_by_type_name): Set parameters to void.
3070 (symbol_definitions_output): Remove unused parameter. Rename as...
3071 (prepare_symbol_definitions): this.
3072 (muscles_output): Move symbol_definitions_output to...
3073 (output): here as prepare_symbol_definitions.
3074 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
3075 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
3076
3077 2008-11-17 Di-an Jan <dianj@freeshell.org>
3078
3079 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
3080 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
3081
3082 2008-11-16 Akim Demaille <demaille@gostai.com>
3083
3084 Add missing $(EXEEXT).
3085 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
3086 "src/bison$(EXEEXT)".
3087 Reported by Di-an Jan.
3088
3089 2008-11-15 Akim Demaille <demaille@gostai.com>
3090
3091 * TODO: Update.
3092
3093 2008-11-15 Akim Demaille <demaille@gostai.com>
3094
3095 Formatting changes.
3096 * tests/input.at: here.
3097
3098 2008-11-15 Akim Demaille <demaille@gostai.com>
3099
3100 Remove duplicate header inclusion.
3101 * src/LR0.c: here.
3102
3103 2008-11-15 Akim Demaille <demaille@gostai.com>
3104
3105 * src/parse-gram.h, src/parse-gram.c: Regen.
3106
3107 2008-11-15 Akim Demaille <demaille@gostai.com>
3108
3109 Support parametric types.
3110
3111 There are two issues to handle: first scanning nested angle
3112 bracket pairs to support types such as std::pair< std::string,
3113 std::list<std::string> > >.
3114
3115 Another issue is to address idiosyncracies of C++: do not glue two
3116 closing angle brackets together (otherwise it's operator>>), and
3117 avoid sticking blindly a TYPE to the opening <, as it can result
3118 in '<:' which is a digraph for '['.
3119
3120 * src/scan-gram.l (brace_level): Rename as...
3121 (nesting): this.
3122 (SC_TAG): New.
3123 Implement support for complex tags.
3124 (tag): Accept
3125 , but not <.
3126 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
3127 (b4_symbol_variant): Leave space around types as parameters.
3128 * examples/variant.yy: Use nested template types and leading ::.
3129 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
3130 Rename as...
3131 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
3132 * tests/c++.at: Test parametric types.
3133
3134 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3135
3136 Test token.prefix.
3137 This is not sufficient, but we test at least that the make_SYMBOL
3138 interface is not affected by token.prefix. A more general test
3139 will be implemented when the support of token.prefix is generalized
3140 to more skeletons.
3141
3142 * tests/c++.at: One more variant test, using token.prefix.
3143
3144 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3145
3146 Test the make_TOKEN interface.
3147 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
3148 Factor the common code in yylex.
3149 Use it to test "%define lex_symbol".
3150
3151 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3152
3153 Formatting change.
3154
3155 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3156
3157 Simplify code for variants bench marks.
3158 * etc/bench.pl.in (&generate_grammar_list): Define and use
3159 location_type.
3160 Factor the common code in yylex.
3161
3162 2008-11-15 Akim Demaille <demaille@gostai.com>
3163
3164 Better error message.
3165 * bootstrap (find_tool): Fix the error message.
3166
3167 2008-11-15 Akim Demaille <demaille@gostai.com>
3168
3169 Update variant.yy to newest interface.
3170 * examples/variant.yy: Define lex_symbol.
3171 Adjust.
3172
3173 2008-11-15 Akim Demaille <demaille@gostai.com>
3174
3175 Don't use locations in variant.yy.
3176 * examples/variant.yy: Adjust to not using locations.
3177
3178 2008-11-15 Akim Demaille <demaille@gostai.com>
3179
3180 Comment changes.
3181 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
3182 comments for the license.
3183
3184 2008-11-15 Akim Demaille <demaille@gostai.com>
3185
3186 Remove tests/Makefile.am.
3187 * tests/Makefile.am: Rename as...
3188 * tests/local.mk: this.
3189 * Makefile.am, configure.ac: Adjust.
3190 * Makefile.am (DISTCLEANFILES): Define.
3191 (maintainer-check, maintainer-xml-check, maintainer-push-check):
3192 Remove, we no longer need to bounce to the real targets.
3193
3194 2008-11-15 Akim Demaille <demaille@gostai.com>
3195
3196 Comment changes.
3197
3198 2008-11-15 Akim Demaille <demaille@gostai.com>
3199
3200 djgpp/local.mk.
3201 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
3202 * djgpp/local.mk: this new file.
3203
3204 2008-11-15 Akim Demaille <demaille@gostai.com>
3205
3206 Remove doc/Makefile.am.
3207 * doc/Makefile.am: Rename as...
3208 * doc/local.mk: this.
3209 Adjust paths
3210 * Makefile.am, configure.ac: Adjust.
3211 * Makefile.am (MOSTLYCLEANFILES): New.
3212 * src/local.mk: Adjust.
3213
3214 2008-11-15 Akim Demaille <demaille@gostai.com>
3215
3216 Move sc_tight_scope into maint.mk.
3217 It does not work, and I don't know how it was supposed to work: it
3218 seems to be looking for sources in the build tree. I just moved
3219 it at a better place, fixing it is still required.
3220
3221 * src/local.mk (echo): Remove.
3222 (sc_tight_scope): Move to...
3223 * maint.mk: here.
3224
3225 2008-11-15 Akim Demaille <demaille@gostai.com>
3226
3227 Regen.
3228 * src/parse-gram.h, src/parse-gram.h: Regen.
3229
3230 2008-11-15 Akim Demaille <demaille@gostai.com>
3231
3232 Remove src/Makefile.am.
3233 * src/Makefile.am: Rename as...
3234 * src/local.mk: this.
3235 Prefix all the paths with src/.
3236 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
3237 (AM_CPPFLAGS): Find find in builddir/src.
3238 (YACC): Move the flags into...
3239 (AM_YFLAGS): here.
3240 * maint.mk (sc_tight_scope): Disable.
3241 It used to bounce to the version in src/Makefile.am which is now
3242 part of this very Makefile.
3243 * Makefile.am, configure.ac: Adjust.
3244 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
3245 include "..." to find files "here": we are no longer in src/, so
3246 qualify the includes with src/.
3247 * doc/Makefile.am (PREPATH): No longer include the top_builddir
3248 prefix.
3249 (.x.1): Adjust to be able to create src/foo from the top level
3250 Makefile, instead of going bounce to src/Makefile the creation of
3251 foo.
3252
3253 2008-11-15 Akim Demaille <demaille@gostai.com>
3254
3255 Remove useless variable.
3256 * doc/Makefile.am (srcsrcdir): Remove.
3257
3258 2008-11-15 Akim Demaille <demaille@gostai.com>
3259
3260 Remove data/Makefile.am.
3261 * data/Makefile.am: Rename as...
3262 * data/local.mk: this.
3263 Adjust paths.
3264 * Makefile.am, configure.ac: Adjust.
3265
3266 2008-11-15 Akim Demaille <demaille@gostai.com>
3267
3268 Remove etc/Makefile.am.
3269 * etc/Makefile.am: Rename as...
3270 * etc/local.mk: this.
3271 Adjust.
3272 * Makefile.am, configure.ac: Adjust.
3273
3274 2008-11-15 Akim Demaille <demaille@gostai.com>
3275
3276 Remove examples/local.mk.
3277 examples/calc++/Makefile.am might be interesting to keep as is, since
3278 it is an example in itself.
3279
3280 * examples/Makefile.am: Rename as...
3281 * examples/local.mk: this.
3282 Adjust.
3283 * Makefile.am, configure.ac: Adjust.
3284
3285 2008-11-15 Akim Demaille <demaille@gostai.com>
3286
3287 Remove build-aux/Makefile.am.
3288 Recursive Makefiles are really way too slow, let's get rid of some of
3289 them.
3290
3291 * build-aux/Makefile.am: Rename as...
3292 * build-aux/local.mk: this.
3293 Adjust paths.
3294 * Makefile.am, configure.ac: Adjust.
3295
3296 2008-11-15 Akim Demaille <demaille@gostai.com>
3297
3298 Provide convenience constructors for locations and positions.
3299 * data/location.cc (position::position): Accept file, line and
3300 column as arguments with default values.
3301 Always qualify initial line and column literals as unsigned.
3302 (location::location): Provide convenience constructors.
3303
3304 2008-11-15 Akim Demaille <demaille@gostai.com>
3305
3306 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
3307 token type.
3308 Using template buys us nothing, and makes it uselessly complex to
3309 construct a symbol. Besides, it could not be generalized to other
3310 languages, while make_FOO would work in C/Java etc.
3311
3312 * data/lalr1.cc (b4_symbol_): New.
3313 (b4_symbol): Use it.
3314 (b4_symbol_constructor_declaration_)
3315 (b4_symbol_constructor_definition_): Instead of generating
3316 specializations of an overloaded template function, just generate
3317 several functions whose names are forged from the token names
3318 without the token.prefix.
3319 (b4_symbol_constructor_declarations): Generate them for all the
3320 symbols, not just by class of symbol type, now that instead of
3321 specializing a function template by the token, we generate a
3322 function named after the token.
3323 (b4_symbol_constructor_specialization_)
3324 (b4_symbol_constructor_specializations): Remove.
3325 * etc/bench.pl.in: Adjust to this new API.
3326
3327 2008-11-13 Akim Demaille <demaille@gostai.com>
3328
3329 %define token.prefix.
3330 Provide a means to add a prefix to the name of the tokens as
3331 output in the generated files. Because of name clashes, it is
3332 good to have such a prefix such as TOK_ that protects from names
3333 such as EOF, FILE etc. But it clutters the grammar itself.
3334
3335 * data/bison.m4 (token.prefix): Empty by default.
3336 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
3337 * data/lalr1.cc (b4_symbol): Ditto.
3338
3339 2008-11-13 Akim Demaille <demaille@gostai.com>
3340
3341 Compute at M4 time some of the subtractions.
3342 * data/lalr1.cc (b4_subtract): New.
3343 (b4_rhs_data): Use it.
3344
3345 2008-11-13 Akim Demaille <demaille@gostai.com>
3346
3347 symbol::token.
3348 This allows the user to get the type of a token returned by yylex.
3349
3350 * data/lalr1.cc (symbol::token): New.
3351 (yytoknum_): Define when %define lex_symbol, independently of
3352 %debug.
3353 (yytoken_number_): Move into...
3354 (symbol::token): here, since that's the only use.
3355 The other one is YYPRINT which was not officially supported
3356 by lalr1.cc, and anyway it did not work since YYPRINT uses this
3357 array under a different name (yytoknum).
3358
3359 2008-11-13 Akim Demaille <demaille@gostai.com>
3360
3361 YYERRCODE.
3362 * TODO (YYERRCODE): Mention the case of $undef.
3363
3364 2008-11-13 Akim Demaille <demaille@gostai.com>
3365
3366 TODO: YYPRINT.
3367 * TODO (YYPRINT): New.
3368
3369 2008-11-13 Akim Demaille <demaille@gostai.com>
3370
3371 Comment changes.
3372 * data/lalr1.cc, data/yacc.c: Fix the description of the
3373 yytranslate and yytoknum tables.
3374
3375 2008-11-13 Akim Demaille <demaille@gostai.com>
3376
3377 Define make_symbol in the header.
3378 To reach good performances these functions should be inlined (yet
3379 this is to measure precisely). To this end they must be available
3380 to the caller.
3381
3382 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
3383 location_type with the class name.
3384 Since will now be output in the header, declare "inline".
3385 No longer use b4_symbol_constructor_specializations, but
3386 b4_symbol_constructor_definitions in the header.
3387 Don't call it in the *.cc file.
3388
3389 2008-11-13 Akim Demaille <demaille@gostai.com>
3390
3391 Define yytranslate in the header for lex_symbol.
3392 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
3393 into the header file when using %define lex_symbol.
3394 (yytranslate_): Declare inline.
3395
3396 2008-11-13 Akim Demaille <demaille@gostai.com>
3397
3398 Define the constructors of symbol_type in
3399 b4_symbol_constructor_definitions.
3400 The constructors are called by the make_symbol functions, which a
3401 forthcoming patch will move elsewhere. Hence the interest of
3402 putting them together.
3403
3404 The stack_symbol_type does not need to be moved, it is used only
3405 by the parser.
3406
3407 * data/lalr1.cc: Move symbol_type and symbol_base_type
3408 constructors into...
3409 (b4_symbol_constructor_definitions): here.
3410 Adjust.
3411
3412 2008-11-13 Akim Demaille <demaille@gostai.com>
3413
3414 Make it easier to move the definition of yytranslate_.
3415 Forthcoming changes will make it possible to use yytranslate_
3416 from outside the parser implementation file.
3417
3418 * data/lalr1.cc (b4_yytranslate_definition): New.
3419 Use it.
3420
3421 2008-11-13 Akim Demaille <demaille@gostai.com>
3422
3423 Remove useless class specification.
3424 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
3425 to refer to the class name to use a type defined by the class for
3426 arguments of member functions.
3427
3428 2008-11-13 Akim Demaille <demaille@gostai.com>
3429
3430 Finer input type for yytranslate.
3431 This patch is debatable: the tradition expects yylex to return an int
3432 which happens to correspond to token_number (which is an enum). This
3433 allows for instance to return characters (such as '*' etc.). But this
3434 goes against the stronger typing I am trying to have with the new
3435 lex interface which return a symbol_type. So in this case, feed
3436 yytranslate_ with a token_type.
3437
3438 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
3439 expect a token_type.
3440
3441 2008-11-13 Akim Demaille <demaille@gostai.com>
3442
3443 Honor lex-params in %define lex_symbol mode.
3444 * data/lalr1.cc: Use b4_lex_param.
3445
3446 2008-11-13 Akim Demaille <demaille@gostai.com>
3447
3448 Simplify names.
3449 * src/output.c (symbol_definitions_output): Rename symbol
3450 attributes type_name and has_type_name as type and has_type.
3451 * data/lalr1.cc: Adjust uses.
3452
3453 2008-11-13 Akim Demaille <demaille@gostai.com>
3454
3455 Use b4_type_names for the union type.
3456 The union used to compute the size of the variant used to iterate
3457 over the type of all the symbols, with a lot of redundancy. Now
3458 iterate over the lists of symbols having the same type-name.
3459
3460 * data/lalr1.cc (b4_char_sizeof_): New.
3461 (b4_char_sizeof): Use it.
3462 Adjust to be called with a list of numbers instead of a single
3463 number.
3464 Adjust its caller for new-line issues.
3465
3466 2008-11-13 Akim Demaille <demaille@gostai.com>
3467
3468 Define the "identifier" of a symbol.
3469 Symbols may have several string representations, for instance if
3470 they have an alias. What I call its "id" is a string that can be
3471 used as an identifier. May not exist.
3472
3473 Currently the symbols which have the "tag_is_id" flag set are
3474 those that don't have an alias. Look harder for the id.
3475
3476 * src/output.c (is_identifier): Move to...
3477 * src/symtab.c (is_identifier): here.
3478 * src/symtab.h, src/symtab.c (symbol_id_get): New.
3479 * src/output.c (symbol_definitions_output): Use it to define "id"
3480 and "has_id".
3481 Remove the definition of "tag_is_id".
3482 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
3483 "tag_is_id" were used to produce code.
3484 We still use "tag" for documentation.
3485
3486 2008-11-11 Akim Demaille <demaille@gostai.com>
3487
3488 Locations are no longer required by lalr1.cc.
3489 * data/lalr1.cc (_b4_args, b4_args): New.
3490 Adjust all uses of locations to make them optional.
3491 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
3492 (AT_CHECK_NAMESPACE): Check the use of locations.
3493 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
3494 without locations with lalr1.cc.
3495 Test these cases.
3496 * tests/output.at: Check lalr1.cc with and without location
3497 support.
3498 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
3499 Don't use locations.
3500
3501 2008-11-11 Akim Demaille <demaille@gostai.com>
3502
3503 AT_FULL_COMPILE.
3504 * tests/local.at (AT_FULL_COMPILE): New.
3505 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
3506
3507 2008-11-11 Akim Demaille <demaille@gostai.com>
3508
3509 Support parens in calc++.
3510 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
3511 * examples/calc++/test (run): Check the expected output.
3512 Adjust callers.
3513 Check parens too.
3514
3515 2008-11-11 Akim Demaille <demaille@gostai.com>
3516
3517 Simplify lalr1.cc since %defines is mandatory.
3518 * data/lalr1.cc: Remove useless calls to b4_defines_if.
3519
3520 2008-11-11 Akim Demaille <demaille@gostai.com>
3521
3522 TODO: yyfmt.
3523 * TODO (yysyntax_error): New item.
3524
3525 2008-11-11 Akim Demaille <demaille@gostai.com>
3526
3527 Prefer M4 to CPP.
3528 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
3529 YYERROR_VERBOSE.
3530
3531 2008-11-11 Akim Demaille <demaille@gostai.com>
3532
3533 Support i18n of the parse error messages.
3534 * TODO (lalr1.cc/I18n): Remove.
3535 * data/lalr1.cc (yysyntax_error_): Support the translation of the
3536 error messages, as done in yacc.c.
3537 Stay within the yy* pseudo namespace.
3538
3539 2008-11-11 Akim Demaille <demaille@gostai.com>
3540
3541 More TODO.
3542 * TODO (single stack, yysyntax_error): New.
3543
3544 2008-11-11 Akim Demaille <demaille@gostai.com>
3545
3546 Make it possible to return a symbol_type from yylex.
3547 * data/lalr1.cc (b4_lex_symbol_if): New.
3548 (parse): When lex_symbol is defined, expected yylex to return the
3549 complete lookahead.
3550 * etc/bench.pl.in (generate_grammar_list): Extend to support this
3551 yylex interface.
3552 (bench_variant_parser): Exercise it.
3553
3554 2008-11-11 Akim Demaille <demaille@gostai.com>
3555
3556 Remove useless bench case.
3557 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
3558 no longer used.
3559
3560 2008-11-11 Akim Demaille <demaille@gostai.com>
3561
3562 Improve display of directives.
3563 * etc/bench.pl.in (parse_term): Don't add useless eol.
3564
3565 2008-11-11 Akim Demaille <demaille@gostai.com>
3566
3567 Use string_cast in the bench.
3568 * etc/bench.pl.in (generate_grammar_list): Define and use
3569 string_cast.
3570
3571 2008-11-11 Akim Demaille <demaille@gostai.com>
3572
3573 Replace yychar with a Boolean.
3574 * data/lalr1.cc (parse::yychar): Replace by...
3575 (parse::yyempty): this.
3576
3577 2008-11-11 Akim Demaille <demaille@gostai.com>
3578
3579 Factor the tables.
3580 * TODO: New item.
3581
3582 2008-11-11 Akim Demaille <demaille@gostai.com>
3583
3584 Let yytranslate handle the eof case.
3585 * data/lalr1.cc (yytranslate_): Handle the EOF case.
3586 Adjust callers.
3587 No longer expect yychar to be equal to yyeof_, rather, test the
3588 lookahead's (translated) kind.
3589
3590 2008-11-11 Akim Demaille <demaille@gostai.com>
3591
3592 yychar cannot be empty in yyerrlab.
3593 * TODO (yychar == yyempty_): New.
3594 * data/lalr1.cc: Remove the handling of this case.
3595 This eases forthcoming changes related to yychar and yytranslate.
3596
3597 2008-11-11 Akim Demaille <demaille@gostai.com>
3598
3599 Bench: syntactic sugar for %define/#define.
3600 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
3601 (&bench_push_parser, bench_variant_parser): Use this feature.
3602 (&eat): New.
3603 Use it.
3604
3605 2008-11-11 Akim Demaille <demaille@gostai.com>
3606
3607 Less memory pressure on the "list" bench.
3608 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
3609 the values, to limit memory pressure.
3610
3611 2008-11-11 Akim Demaille <demaille@gostai.com>
3612
3613 Introduce make_symbol.
3614 make_symbol provides a means to construct a full symbol (kind,
3615 value, location) in a single shot. It is meant to be a Symbol
3616 constructor, parameterized by the symbol kind so that overloading
3617 would prevent incorrect kind/value pairs. Unfortunately
3618 parameterized constructors do not work well in C++ (unless the
3619 parameter also appears as an argument, which is not acceptable),
3620 hence the use of a function instead of a constructor.
3621
3622 * data/lalr1.cc (b4_symbol_constructor_declaration_)
3623 (b4_symbol_constructor_declarations)
3624 (b4_symbol_constructor_specialization_)
3625 (b4_symbol_constructor_specializations)
3626 (b4_symbol_constructor_definition_)
3627 (b4_symbol_constructor_definitions): New.
3628 Use them where appropriate to generate declaration, declaration of
3629 the specializations, and implementations of the templated
3630 overloaded function "make_symbol".
3631 (variant::variant): Always define a default ctor.
3632 Also provide a copy ctor.
3633 (symbol_base_type, symbol_type): New ctor overloads for value-less
3634 symbols.
3635 (symbol_type): Now public, so that functions such as yylex can use
3636 it.
3637
3638 2008-11-11 Akim Demaille <demaille@gostai.com>
3639
3640 Inform m4 whether a tag is a valid id.
3641 * src/output.c (is_identifier): New.
3642 (symbol_definitions_output): Use it to define tag_is_id.
3643 But maybe this should be done at m4 level?
3644
3645 2008-11-11 Akim Demaille <demaille@gostai.com>
3646
3647 Test 214 was failing: it greps with a pattern containing [ ]*
3648 which obviously meant to catch spaces and tabs, but contained only
3649 spaces. Tabulations in sources are a nuisance, so to simplify the
3650 matter, get rid of all the tabulations in the Java sources. The
3651 other skeletons will be treated equally later.
3652
3653 * data/java.m4, data/lalr1.java: Untabify.
3654 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
3655 tabulations are no longer generated.
3656
3657 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
3658
3659 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
3660 * configure.ac: Adjust usage.
3661 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
3662 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
3663 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
3664
3665 2008-11-10 Di-an Jan <dianj@freeshell.org>
3666
3667 Workaround Java's ``code too large'' problem for parser tables
3668 in most cases, by using one function per initialization.
3669 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
3670 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
3671 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
3672 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
3673 (yytname_): Use b4_typed_parser_table.
3674 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
3675 ``code too large'' error.
3676
3677 2008-11-10 Di-an Jan <dianj@freeshell.org>
3678
3679 * NEWS: Document them.
3680
3681 General Java skeleton improvements.
3682 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
3683 using gcj < 4.3 in the testsuite, according to comments in
3684 gnulib/m4/javacomp.m4.
3685 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
3686 location_type, position_type): Remove extraneous brackets from
3687 b4_percent_define_default.
3688 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
3689 m4_define and m4_define_default.
3690 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
3691 which marks the end of user code with appropriate syncline, like all
3692 the other skeletons.
3693 (b4_user_post_prologue): Add. Don't silently drop.
3694 (yylex): Remove.
3695 (parse): Inline yylex.
3696 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
3697 (%{...%}): Fix typo of %code imports.
3698 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
3699
3700 Support annotations on parser class with %define annotations.
3701 * data/lalr1.java (annotations): Add to parser class modifier.
3702 * doc/bison.texinfo (Java Parser Interface): Document
3703 %define annotations.
3704 (Java Declarations Summary): Document %define annotations.
3705 * tests/java.at (Java parser class modifiers): Test annotations.
3706
3707 Do not generate code for %error-verbose unless requested.
3708 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
3709 Make private. Make conditional on %error-verbose.
3710 (getErrorVerbose, setErrorVerbose): New.
3711 (yytnamerr_): Make conditional on %error-verbose.
3712 (yysyntax_error): Make some code conditional on %error-verbose.
3713 * doc/bison.texinfo (Java Bison Interface): Remove the parts
3714 about %error-verbose having no effect.
3715 (getErrorVerbose, setErrorVerbose): Document.
3716
3717 Move constants for token names to Lexer interface.
3718 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
3719 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
3720 (parse): Qualify EOF to Lexer.EOF.
3721 * doc/bison.texinfo (Java Parser Interface): Move documentation of
3722 EOF and token names to Java Lexer Interface.
3723 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
3724
3725 Make yyerror public.
3726 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
3727 (yyerror): Change to public. Add Javadoc comments. Use longer
3728 parameter names. Make the body rather than the declarator
3729 conditional on %locations.
3730 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
3731
3732 Allow user to add code to the constructor with %code init.
3733 * data/java.m4 (b4_init_throws): New, for %define init_throws.
3734 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
3735 Add %code init to the front of the constructor body.
3736 * doc/bison.texinfo (YYParser.YYParser): Document %code init
3737 and %define init_throws.
3738 (Java Declarations Summary): Document %code init and
3739 %define init_throws.
3740 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
3741 (Java constructor init and init_throws): Add tests.
3742
3743 2008-11-10 Akim Demaille <demaille@gostai.com>
3744
3745 Update TODO.
3746 * TODO (-D): is implemented.
3747 (associativity): Same precedence must have the same associativity.
3748 For instance, how can a * b / c be parsed if * is %left and / is
3749 %right?
3750 (YYERRORCODE, YYFAIL, YYBACKUP): New.
3751
3752 2008-11-10 Akim Demaille <demaille@gostai.com>
3753
3754 Formatting changes.
3755
3756 2008-11-10 Akim Demaille <demaille@gostai.com>
3757
3758 More information about the symbols.
3759 * src/output.c (type_names_output): Document all the symbols,
3760 including those that don't have a type-name.
3761 (symbol_definitions_output): Define "is_token" and
3762 "has_type_name".
3763 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
3764 type-name, now that they are defined too in b4_type_names.
3765
3766 2008-11-10 Akim Demaille <demaille@gostai.com>
3767
3768 Regen.
3769
3770 2008-11-10 Akim Demaille <demaille@gostai.com>
3771
3772 Make parser::yytranslate static.
3773 Small speedup (1%) on the list grammar. And makes yytranslate_
3774 available in non member functions.
3775
3776 * data/lalr1.cc (yytranslate_): Does not need to be a instance
3777 function.
3778
3779 2008-11-10 Akim Demaille <demaille@gostai.com>
3780
3781 Avoid trailing spaces.
3782 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
3783 * data/lalr1.cc: Don't indent before rule and symbol actions, as
3784 they can be empty, and anyway this incorrectly indents the first
3785 action.
3786
3787 2008-11-10 Akim Demaille <demaille@gostai.com>
3788
3789 Comment changes.
3790
3791 2008-11-10 Akim Demaille <demaille@gostai.com>
3792
3793 Use "enum" for integral constants.
3794 This is just nicer to read, I observed no speedup.
3795
3796 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
3797 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
3798 (yyuser_token_number_max_, yyundef_token_): Move into...
3799 (yytranslate_): here.
3800
3801 2008-11-10 Akim Demaille <demaille@gostai.com>
3802
3803 Shortcuts in bench directives.
3804 * etc/bench.pl.in (parse_dirs): New.
3805 Use it.
3806 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
3807 Create the benches in "benches/".
3808
3809 2008-11-10 Akim Demaille <demaille@gostai.com>
3810
3811 Formatting changes.
3812 * data/lalr1.cc: here.
3813
3814 2008-11-10 Akim Demaille <demaille@gostai.com>
3815
3816 Adjust verbose message to using emacs.
3817 * etc/bench.pl.in: Inform compilation-mode when we change the
3818 directory.
3819 (generate_grammar_list): Recognize %define "variant" in addition
3820 to %define variant.
3821
3822 2008-11-10 Akim Demaille <demaille@gostai.com>
3823
3824 Classify symbols by type-name.
3825 * src/uniqstr.h (UNIQSTR_CMP): New.
3826 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
3827 (type_names_output): New.
3828 (muscles_output): Use it.
3829 * data/lalr1.cc (b4_symbol_action_): Remove.
3830 (b4_symbol_case_, b4_type_action_): New.
3831 Adjust uses of b4_symbol_action_ to use b4_type_action_.
3832
3833 2008-11-10 Akim Demaille <demaille@gostai.com>
3834
3835 Change the handling of the symbols in the skeletons.
3836 Before we were using tables which lines were the symbols and which
3837 columns were things like number, tag, type-name etc. It is was
3838 difficult to extend: each time a column was added, all the numbers had
3839 to be updated (you asked for colon $2, not for "tag"). Also, it was
3840 hard to filter these tables when only a subset of the symbols (say the
3841 tokens, or the nterms, or the tokens that have and external number
3842 *and* a type-name) was of interest.
3843
3844 Now instead of monolithic tables, we define one macro per cell. For
3845 instance "b4_symbol(0, tag)" is a macro name which contents is
3846 self-decriptive. The macro "b4_symbol" provides easier access to
3847 these cells.
3848
3849 * src/output.c (type_names_output): Remove.
3850 (symbol_numbers_output, symbol_definitions_output): New.
3851 (muscles_output): Call them.
3852 (prepare_symbols): Define b4_symbols_number.
3853
3854 2008-11-10 Akim Demaille <demaille@gostai.com>
3855
3856 --trace=muscles
3857 * src/getargs.h, src/getargs.c (trace_muscle): New.
3858 (trace_types, trace_args): Support it.
3859 * src/output.c (output_skeleton): Use it.
3860
3861 2008-11-10 Akim Demaille <demaille@gostai.com>
3862
3863 muscles_output.
3864 * src/output.c (muscles_output): New, extracted from...
3865 (output_skeleton): here.
3866 Adjust.
3867
3868 2008-11-10 Akim Demaille <demaille@gostai.com>
3869
3870 Formatting changes.
3871
3872 2008-11-10 Akim Demaille <demaille@gostai.com>
3873
3874 Update the variant example.
3875 * examples/variant.yy: Formatting changes.
3876 One stage build.
3877
3878 2008-11-10 Akim Demaille <demaille@gostai.com>
3879
3880 Support constructor with an argument.
3881 This improves the "list" bench by 2%.
3882
3883 * data/lalr1.cc (variant::build): Add an overloaded version with
3884 an argument.
3885 * tests/c++.at (AT_CHECK_VARIANT): Check it.
3886
3887 2008-11-10 Akim Demaille <demaille@gostai.com>
3888
3889 Test variants.
3890 * tests/c++.at (AT_CHECK_VARIANTS): New.
3891 Use it with and without %define assert.
3892
3893 2008-11-10 Akim Demaille <demaille@gostai.com>
3894
3895 Add %precedence support.
3896 Unfortunately it is not possible to reuse the %prec directive. This
3897 is because to please POSIX, we do not require to end the rules with a
3898 semicolon. As a result,
3899
3900 foo: bar %prec baz
3901
3902 is ambiguous: either a rule which precedence is that of baz, or a rule,
3903 and then a declaration of the precedence of the token baz.
3904
3905 * doc/bison.texinfo: Document %precedence.
3906 (Precedence Only): New.
3907 * src/assoc.h, src/assoc.c (precedence_assoc): New.
3908 * src/conflicts.c (resolve_sr_conflict): Support it.
3909 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
3910 Parse it.
3911 * tests/calc.at: Use %precedence for NEG.
3912 * tests/conflicts.at (%precedence does not suffice)
3913 (%precedence suffices): New tests.
3914
3915 2008-11-09 Akim Demaille <demaille@gostai.com>
3916
3917 Make benches in a sub dirs.
3918 * etc/bench.pl.in ($dir): New.
3919 Use it.
3920 Check the use of constructors with an argument.
3921 (bench_variant_parser): Fix.
3922
3923 2008-11-09 Akim Demaille <demaille@gostai.com>
3924
3925 fix eof condition
3926
3927 2008-11-09 Akim Demaille <demaille@gostai.com>
3928
3929 Fix --help.
3930
3931 2008-11-09 Akim Demaille <demaille@gostai.com>
3932
3933 Require the generation of parse-gram.output.
3934 * src/Makefile.am (YACC): Pass --report=all.
3935
3936 2008-11-09 Akim Demaille <demaille@gostai.com>
3937
3938 Formatting changes.
3939
3940 2008-11-09 Akim Demaille <demaille@gostai.com>
3941
3942 Update TODO.
3943 * TODO: Remove obsolete items.
3944 Update others.
3945
3946 2008-11-09 Akim Demaille <demaille@gostai.com>
3947
3948 Enhance bench.pl.
3949 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
3950 (@token, $grammar, $bench): New.
3951 (generate_grammar_variant): Rename as...
3952 (generate_grammar_list): this.
3953 (generate_grammar): Adjust.
3954 (bench_grammar): Rename as...
3955 (bench): this.
3956 Use it in the various bench-marking routines.
3957 (-b, -g): New options.
3958
3959 2008-11-09 Akim Demaille <demaille@gostai.com>
3960
3961 Use a static hierarchy for symbols in the C++ parser.
3962 * data/lalr1.cc (symbol_base_type, symbol_type)
3963 (stack_symbol_type): Make it a static hierarchy.
3964 Adjust dependencies.
3965
3966 2008-11-09 Akim Demaille <demaille@gostai.com>
3967
3968 bench.pl -d, --directive.
3969 * etc/bench.pl.in (@directive): New.
3970 (&bench_grammar): Use it.
3971 (&bench_list_grammar): New, to provide access to the "variant"
3972 grammar.
3973 Use it.
3974 (getopts): Support -d, --directive.
3975
3976 2008-11-09 Akim Demaille <demaille@gostai.com>
3977
3978 Use inline for small operations.
3979 * data/lalr1.cc (symbol_base_type, symbol_type)
3980 (stack_symbol_type): Declare constructor and other operations as
3981 inline.
3982 (yy_destroy_): Inline.
3983
3984 2008-11-09 Akim Demaille <demaille@gostai.com>
3985
3986 Introduce a hierarchy for symbols.
3987 * data/lalr1.cc (symbol_base_type, symbol_type): New.
3988 (data_type): Rename as...
3989 (stack_symbol_type): this.
3990 Derive from symbol_base_type.
3991 (yy_symbol_value_print_): Merge into...
3992 (yy_symbol_print_): this.
3993 Rename as...
3994 (yy_print_): this.
3995 (yydestruct_): Rename as...
3996 (yy_destroy_): this.
3997 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
3998 (parser::parse): yyla is now of symbol_type.
3999 Use its type member instead of yytoken.
4000
4001 2008-11-09 Akim Demaille <demaille@gostai.com>
4002
4003 Rename data_type and stack_symbol_type.
4004 * data/lalr1.cc (data_type): Rename as...
4005 (stack_symbol_type): this.
4006
4007 2008-11-09 Akim Demaille <demaille@gostai.com>
4008
4009 Handle semantic value and location together.
4010 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
4011 yydata.value and yydata.location.
4012 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
4013 (YY_SYMBOL_PRINT): Now take semantic value and location as a
4014 single arg.
4015 Adjust all callers.
4016 (yydestruct_): New overload for a stack symbol.
4017
4018 2008-11-09 Akim Demaille <demaille@gostai.com>
4019
4020 Push a complete symbol, not connected parts.
4021 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
4022 state, value and location.
4023 Adjust callers.
4024
4025 2008-11-09 Akim Demaille <demaille@gostai.com>
4026
4027 Agregate yylval and yylloc.
4028 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
4029 (parser::yyla): this.
4030
4031 2008-11-09 Akim Demaille <demaille@gostai.com>
4032
4033 Rely on the state stack to display reduction traces.
4034 To display rhs symbols before a reduction, we used information
4035 about the rule reduced, which required the tables yyrhs and
4036 yyprhs. Now use rely only on the state stack to get the same
4037 information.
4038
4039 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
4040 Use them.
4041 (parser::yyrhs_, parser::yyprhs_): Remove.
4042 (parser::yy_reduce_print_): Use the state stack.
4043
4044 2008-11-09 Akim Demaille <demaille@gostai.com>
4045
4046 Fuse yyval and yyloc into yylhs.
4047 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
4048 yylhs.
4049 (parse): Replace yyval and yyloc with yylhs.value and
4050 yylhs.location.
4051 After a user action, compute yylhs.state earlier.
4052 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
4053 fresh error_token.
4054
4055 2008-11-09 Di-an Jan <dianj@freeshell.org>
4056
4057 Remove unused variable.
4058 * src/output.c (type_names_output): Remove unused variable sep.
4059
4060 2008-11-09 Paolo Bonzini <bonzini@gnu.org>
4061
4062 Change tests/output.at quoting.
4063 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
4064 expanding arguments.
4065
4066 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
4067
4068 Don't add a semicolon to actions for %skeleton or %language.
4069 It breaks Java test cases as reported by Akim Demaille.
4070 * src/scan-code.l: Implement.
4071
4072 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
4073
4074 Clean up %skeleton and %language priority implementation.
4075 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
4076 remove static qualifier because others will soon need to see it.
4077 (language_prio): Likewise.
4078 (getargs): Use command_line_prio rather than 0.
4079 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
4080 enum fields.
4081 (skeleton_prio): Extern it.
4082 (language_prio): Extern it.
4083 * src/parse-gram.y: Use grammar_prio rather than 1.
4084
4085 2008-11-07 Akim Demaille <demaille@gostai.com>
4086
4087 Moving push traces into yypush_.
4088 * data/lalr1.cc (yypush_): Now takes a optional trace message.
4089 Adjust all uses.
4090
4091 2008-11-07 Akim Demaille <demaille@gostai.com>
4092
4093 The single-stack C++ parser is now the standard one.
4094 * data/lalr1.cc: Rename as...
4095 * data/lalr1-split.cc: this.
4096 * data/lalr1-fusion.cc: Rename as...
4097 * data/lalr1.cc: this.
4098 * etc/bench.pl.in: Adjust.
4099
4100 2008-11-07 Akim Demaille <demaille@gostai.com>
4101
4102 Avoid empty-if warnings.
4103 Reported by Quentin Hocquet.
4104
4105 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
4106 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
4107
4108 2008-11-07 Akim Demaille <demaille@gostai.com>
4109
4110 Pass command line location to skeleton_arg and language_argmatch.
4111 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
4112 The location argument is now mandatory.
4113 Adjust all dependencies.
4114 (getargs): Use command_line_location.
4115
4116 2008-11-07 Akim Demaille <demaille@gostai.com>
4117
4118 -D, --define.
4119 * src/getargs.c (usage): Document -D.
4120 Fix help string for --locations.
4121 (command_line_location): New.
4122 (short_options, long_options, getargs): Support -D, --define.
4123 (getargs): Move -d support at the right place.
4124 * doc/bison.texinfo (Bison Options): Update.
4125 * tests/input.at (%define, --define): New.
4126
4127 2008-11-07 Akim Demaille <demaille@gostai.com>
4128
4129 Initialize the muscle table before parsing the command line.
4130 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
4131 (getargs): Define file_name.
4132 * src/main.c (main): Initialize muscle_tab before calling
4133 getargs.
4134 * src/muscle_tab.c (muscle_init): No longer define file_name, as
4135 its value is not available yet.
4136
4137 2008-11-07 Akim Demaille <demaille@gostai.com>
4138
4139 Locations without columns for command line arguments.
4140 * src/location.c (location_print): Don't display negative columns.
4141 * src/location.h: Document this.
4142
4143 2008-11-07 Akim Demaille <demaille@gostai.com>
4144
4145 Fix --help.
4146 * src/getargs.c (usage): Fix help string for -W.
4147
4148 2008-11-07 Akim Demaille <demaille@gostai.com>
4149
4150 Handle more general types of option arguments.
4151 * build-aux/cross-options.pl: The argument ends at the first
4152 space, not the first non-symbol character.
4153 Use @var for each word appearing the argument description.
4154
4155 2008-11-07 Akim Demaille <demaille@gostai.com>
4156
4157 Destroy the variants that remain on the stack in case of error.
4158 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
4159 destructor.
4160 Display the value only if yymsg is nonnull.
4161 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
4162
4163 2008-11-07 Akim Demaille <demaille@gostai.com>
4164
4165 Add "%define assert" to variants.
4166 This is used to help the user catch cases where some value gets
4167 ovewritten by a new one. This should not happen, as this will
4168 probably leak.
4169
4170 Unfortunately this uncovered a bug in the C++ parser itself: the
4171 lookahead value was not destroyed between two calls to yylex. For
4172 instance if the previous lookahead was a std::string, and then an int,
4173 then the value of the std::string was correctly taken (i.e., the
4174 lookahead was now an empty string), but std::string structure itself
4175 was not reclaimed.
4176
4177 This is now done in variant::build(other&) (which is used to take the
4178 value of the lookahead): other is not only stolen from its value, it
4179 is also destroyed. This incurs a new performance penalty of a few
4180 percent, and union becomes faster again.
4181
4182 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
4183 (b4_variant_if): New.
4184 (variant::built): New.
4185 Use it whereever the status of the variant changes.
4186 * etc/bench.pl.in: Check the penalty of %define assert.
4187
4188 2008-11-07 Akim Demaille <demaille@gostai.com>
4189
4190 Use "%define variant" in bench.pl.
4191 * etc/bench.pl.in: No longer use the pseudo directive %variants,
4192 just use %define variants.
4193
4194 2008-11-07 Akim Demaille <demaille@gostai.com>
4195
4196 Regen.
4197 * src/parse-gram.h, src/parse-gram.c: Regen.
4198
4199 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
4200
4201 Fix user actions without a trailing semicolon.
4202 Reported by Sergei Steshenko at
4203 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
4204 * THANKS (Sergei Steshenko): Add.
4205 * src/scan-code.l (SC_RULE_ACTION): Fix it.
4206 * tests/regression.at (Fix user actions without a trailing semicolon):
4207 New test case.
4208
4209 2008-11-04 Akim Demaille <demaille@gostai.com>
4210
4211 Use b4_copyright_years.
4212 * data/yacc.c (b4_copyright_years): New.
4213 Fix its value according to the comments in the file.
4214 Use it and undefine it.
4215
4216 2008-11-04 Akim Demaille <demaille@gostai.com>
4217
4218 Formatting changes.
4219 * data/lalr1-fusion.cc, src/parse-gram.y: here.
4220
4221 2008-11-04 Akim Demaille <demaille@gostai.com>
4222
4223 Formatting changes.
4224 * data/lalr1-fusion.cc: here.
4225
4226 2008-11-04 Akim Demaille <demaille@gostai.com>
4227
4228 Use strict on bench.pl.
4229 * etc/bench.pl.in (&run, &generate_grammar): New.
4230 Rename the grammar generating functions for consistency.
4231 Change the interface so that the list of benches to run is passed
4232 as (optionless) arguments.
4233 (&compile): Use &run.
4234
4235 2008-11-04 Akim Demaille <demaille@gostai.com>
4236
4237 Remove spurious initial empty lines.
4238 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
4239 * data/yacc.c: End the @output lines with an @.
4240
4241 2008-11-04 Akim Demaille <demaille@gostai.com>
4242
4243 Improve the display of sizes.
4244 * etc/bench.p.in: Higher precision.
4245 Sort by decreasing size.
4246
4247 2008-11-04 Akim Demaille <demaille@gostai.com>
4248
4249 Don't memcpy C++ structures.
4250 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
4251 arguments.
4252 (variant::build): New overload for
4253 copy-construction-that-destroys.
4254 (variant::swap): New.
4255 (parser::yypush_): Use it in variant mode.
4256
4257 2008-11-04 Akim Demaille <demaille@gostai.com>
4258
4259 Better defaults for bench.pl.
4260 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
4261 default values.
4262 Adjust &verbose uses.
4263 (-q, --quiet): New.
4264
4265 2008-11-04 Akim Demaille <demaille@gostai.com>
4266
4267 Make variant.yy more complex.
4268 std::list cannot be copied via memcpy, they are more demanding than
4269 std::string. Use one std::list to strengthen the test.
4270
4271 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
4272 Adjust.
4273 Create a list of strings, instead of a single large string.
4274
4275 2008-11-04 Akim Demaille <demaille@gostai.com>
4276
4277 bench.pl --bench.
4278 * etc/bench.pl.in (--bench, $bench): New.
4279
4280 2008-11-04 Akim Demaille <demaille@gostai.com>
4281
4282 Sort methods.
4283 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
4284 Define it after as().
4285
4286 2008-11-04 Akim Demaille <demaille@gostai.com>
4287
4288 Useless parens.
4289 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
4290
4291 2008-11-04 Akim Demaille <demaille@gostai.com>
4292
4293 Issue missing synclines after user actions.
4294 * data/c.m4 (b4_case): Issue synclines on the output file.
4295
4296 2008-11-04 Akim Demaille <demaille@gostai.com>
4297
4298 Remove trailing empty line.
4299 * data/lalr1-fusion.cc: Don't add an empty line after the user's
4300 epilogue.
4301
4302 2008-11-04 Akim Demaille <demaille@gostai.com>
4303
4304 Fix output of copyright years.
4305 * data/bison.m4 (b4_copyright): Fix the indentation of the
4306 copyright year paragraph.
4307 Use b4_copyright_years when no years are given.
4308 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
4309 (b4_copyright_years): New.
4310 Use it.
4311
4312 2008-11-04 Akim Demaille <demaille@gostai.com>
4313
4314 Avoid the spurious initial empty line.
4315 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
4316 the end of @output request to suppress the empty line that
4317 results.
4318
4319 2008-11-04 Akim Demaille <demaille@gostai.com>
4320
4321 Remove parser::rhs_number_type.
4322 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
4323 (yyrhs_): Use b4_table_define.
4324
4325 2008-11-04 Akim Demaille <demaille@gostai.com>
4326
4327 Fix iteration type.
4328 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
4329
4330 2008-11-04 Akim Demaille <demaille@gostai.com>
4331
4332 Factor the declaration of the integer tables.
4333 * data/lalr1-fusion.cc (b4_table_define): New.
4334 Use it.
4335
4336 2008-11-03 Akim Demaille <demaille@gostai.com>
4337
4338 Fix indentation of tables in lalr1.cc
4339 * data/lalr1-fusion.cc: Fix the indentation.
4340
4341 2008-11-03 Akim Demaille <demaille@gostai.com>
4342
4343 Destroy the lhs symbols after reduction.
4344 * data/lalr1-fusion.cc (parse): After the user action, when in
4345 variant mode, destroy the lhs symbols.
4346
4347 2008-11-03 Akim Demaille <demaille@gostai.com>
4348
4349 Simplify yysyntax_error_ use.
4350 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
4351 type, but make it unnamed in the declaration when it is not used.
4352
4353 2008-11-03 Akim Demaille <demaille@gostai.com>
4354
4355 Let yy::variant::build return an lvalue.
4356 * data/lalr1-fusion.cc (variant::build): Return a reference to the
4357 object.
4358
4359 2008-11-03 Akim Demaille <demaille@gostai.com>
4360
4361 Define yy::variant only when needed.
4362 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
4363 used.
4364
4365 2008-11-03 Akim Demaille <demaille@gostai.com>
4366
4367 Bench the three-stack lalr1.cc.
4368 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
4369 one-stack one.
4370
4371 2008-11-03 Akim Demaille <demaille@gostai.com>
4372
4373 Fail on parse error in calc++.
4374 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
4375 status.
4376 * examples/calc++/test ($me, $number, $exit, run): New.
4377 Use them to propagate errors to the exit status.
4378
4379 2008-11-03 Akim Demaille <demaille@gostai.com>
4380
4381 Don't specify the skeleton twice in the example.
4382 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
4383 file does what is needed.
4384
4385 2008-11-03 Akim Demaille <demaille@gostai.com>
4386
4387 bench: Improve output.
4388 * etc/bench.pl.in (bench_grammar): Tune the printf format.
4389
4390 2008-11-03 Akim Demaille <demaille@gostai.com>
4391
4392 bench: check impact of %debug on variants.
4393 * etc/bench.pl.in (variant_grammar): Fix the computation of
4394 $variant.
4395 Generate a grammar file that can work with or without %debug.
4396 Do use the @directive.
4397 (bench_variant_parser): Check impact of %debug.
4398 (@directives): Rename all the occurrences to...
4399 (@directive): this, for consistency.
4400
4401 2008-11-03 Akim Demaille <demaille@gostai.com>
4402
4403 bench: report the size too.
4404 * etc/bench.pl.in ($iterations): Defaults to -3.
4405 (&bench_grammar): Require hireswallclock.
4406 Compute and display the size of the result.
4407 More comments.
4408
4409 2008-11-03 Akim Demaille <demaille@gostai.com>
4410
4411 bench: More use of the verbosity level.
4412 * etc/bench.pl.in ($verbose, &verbose): New.
4413 Use them.
4414 More POD documentation.
4415
4416 2008-11-03 Akim Demaille <demaille@gostai.com>
4417
4418 bench.pl: a command line interface
4419 * etc/bench.pl.in: More doc.
4420 Some fixes in the documentation.
4421 ($cflags, $iterations, &help, &getopt): New.
4422 Use them.
4423 (&variant_grammar): Let the number of stages be 10 times what is
4424 specified.
4425
4426 2008-11-03 Akim Demaille <demaille@gostai.com>
4427
4428 Bench the use of Boost.Variants.
4429 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
4430 New.
4431 (&compile): Be ready to compile C++ parsers.
4432 (&bench_push_parser): Move debug information to the outermost
4433 level.
4434 * THANKS: Add Michiel De Wilde.
4435
4436 2008-11-03 Akim Demaille <demaille@gostai.com>
4437
4438 bench.pl: Pass directives as a list instead of as a string.
4439 * etc/bench.pl.in (&directives): New.
4440 (&triangular_grammar, &calc_grammar): Use it to format the Bison
4441 directives.
4442 (&triangular_grammar): Do use the directives (were ignored).
4443 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
4444 directives.
4445
4446 2008-11-03 Akim Demaille <demaille@gostai.com>
4447
4448 Improve genericity of bench.pl.
4449 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
4450 argument.
4451 (&bench_push_parser): New.
4452 Call it.
4453
4454 2008-11-03 Akim Demaille <demaille@gostai.com>
4455
4456 Add documentation to bench.pl.
4457 * etc/bench.pl.in: Comment changes.
4458
4459 2008-11-03 Akim Demaille <demaille@gostai.com>
4460
4461 Fuse the three stacks into a single one.
4462
4463 In order to make it easy to perform benchmarks to ensure that
4464 there are no performance loss, lalr1.cc is forked into
4465 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
4466 lalr1.cc.
4467
4468 Meanwhile, to make sure that lalr1-fusion.cc is correctly
4469 exercized by the test suite, the user must install a symbolic link
4470 from lalr1.cc to it.
4471
4472 Instead of having three stacks (state, value, location), use a
4473 stack of triples. This considerably simplifies the code (and it
4474 will be easier not to require locations as currently does the C++
4475 parser), and also gives a 10% speedup according to
4476 etc/bench (probably mainly since memory allocation is done once
4477 instead of three times).
4478
4479 Another motivation is to make it easier to destruct properly
4480 semantic values: now that they are bound to their state (hence
4481 symbol type) it will be easier to call the appropriate destructor.
4482
4483 These changes should probably benefit the C parser too.
4484
4485 * data/lalr1.cc: Copy as...
4486 * data/lalr1-fusion.cc: this new file.
4487 (b4_rhs_value, b4_rhs_location): New definitions overriding those
4488 from c++.m4.
4489 (state_stack_type, semantic_stack_type, location_stack_type)
4490 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
4491 (data_type, stack_type, yystack_): New.
4492 (YYLLOC_DEFAULT, yypush_): Adjust.
4493 (yyerror_range): Now based on data_type, not location_type.
4494
4495 2008-11-03 Akim Demaille <demaille@gostai.com>
4496
4497 Push the state, value, and location at the same time.
4498 This is needed to prepare a forthcoming patch that fuses the three
4499 stacks into one.
4500
4501 * data/lalr1.cc (parser::yypush_): New.
4502 (parser::yynewstate): Change the semantics: instead of arriving to
4503 this label when value and location have been pushed, but yystate
4504 is to be pushed on the state stack, now the three of them must
4505 have been pushed before. yystate still must be the new state.
4506 This allows to use yypush_ everywhere instead of individual
4507 handling of the stacks.
4508
4509 2008-11-03 Akim Demaille <demaille@gostai.com>
4510
4511 Prefer references to pointers.
4512 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
4513 definition to use references instead of pointers.
4514 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
4515 Take the value and location as references.
4516 Adjust callers.
4517
4518 2008-11-03 Akim Demaille <demaille@gostai.com>
4519
4520 stack::size instead of stack::height.
4521 * data/lalr1.cc (stack::height): Rename as...
4522 (stack::size): this.
4523 Fix the output type.
4524 Comment changes.
4525
4526 2008-11-03 Akim Demaille <demaille@gostai.com>
4527
4528 Use variants to support objects as semantic values.
4529 This patch was inspired by work by Michiel De Wilde. But he used
4530 Boost variants which (i) requires Boost on the user side, (ii) is
4531 slow, and (iii) has useless overhead (the parser knows the type of
4532 the semantic value there is no reason to duplicate this
4533 information as Boost.Variants do).
4534
4535 This implementation reserves a buffer large enough to store the
4536 largest objects. yy::variant implements this buffer. It was
4537 implemented with Quentin Hocquet.
4538
4539 * src/output.c (type_names_output): New.
4540 (output_skeleton): Invoke it.
4541 * data/c++.m4 (b4_variant_if): New.
4542 (b4_symbol_value): If needed, provide a definition for variants.
4543 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
4544 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
4545 (b4_char_sizeof, yy::variant): New.
4546 (parser::parse): If variants are requested, define
4547 parser::union_type, parser::variant, change the definition of
4548 semantic_type, construct $$ before running the user action instead
4549 of performing a default $$ = $1.
4550 * examples/variant.yy: New.
4551 Based on an example by Michiel De Wilde.
4552
4553 2008-11-03 Akim Demaille <demaille@gostai.com>
4554
4555 Parameterize the extraction of semantic values.
4556 To make future changes easier, no longer rely on ".TYPE" being the
4557 way to get a semantic value.
4558
4559 * data/c.m4 (b4_symbol_value): New.
4560 Use it.
4561 * data/c++.m4, data/yacc.c: Use it.
4562 * data/glr.c: Use b4_symbol_value.
4563 (b4_rhs_data): New.
4564 Use it.
4565
4566 2008-11-03 Akim Demaille <demaille@gostai.com>
4567
4568 Prepare easier M4 changes.
4569 * data/lalr1.cc: Use escaped [] instead of literals to prepare
4570 future changes.
4571
4572 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
4573
4574 Initiate further development.
4575 * NEWS: Create an empty section for new entries.
4576 * gnulib: Update submodule to HEAD.
4577
4578 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
4579
4580 * NEWS: Version 2.4.
4581
4582 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
4583
4584 Prepare for next release.
4585 * NEWS: Briefly mention changes since 2.3b.
4586 * README: Say GNU m4 1.4.6, which we've been requiring in release
4587 announcements already, not 1.4.3, which breaks the build.
4588
4589 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
4590
4591 Say %language is experimental.
4592 We're thinking of extending it's effect on output file naming. See the
4593 thread at
4594 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
4595 * NEWS: Say it's experimental.
4596 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
4597 recommend it over %skeleton for now.
4598 (Bison Options): Likewise.
4599 (C++ Bison Interface): Use %skeleton not %language.
4600 (Calc++ Parser): Use %skeleton not %language.
4601 * src/getargs.c (usage): Say it's experimental.
4602
4603 2008-11-01 Di-an Jan <dianj@freeshell.org>
4604 Paolo Bonzini <bonzini@gnu.org>
4605
4606 Support all Java parser class modifiers.
4607 * data/java.m4 (b4_percent_define_get3): New.
4608 (b4_final_if, b4_strictfp_if): New.
4609 * data/lalr1.java (final, strictfp, extends, implements): Support.
4610 * doc/bison.texinfo (final, strictfp, extends, implements): Add
4611 documentation.
4612 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
4613 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
4614 (AT_CHECK_JAVA_GREP): New.
4615 (Java parser class modifiers): New test.
4616 (Java parser class extends and implements): New test.
4617
4618 Model exception propagation better with throws and lex_throws.
4619 * data/java.m4 (b4_list2): New.
4620 (throws): Change default.
4621 * data/lalr1.java (yyaction): Add throws.
4622 (parse): Add lex_throws in addition to throws.
4623 * doc/bison.texinfo (throws, lex_throws): Add documentation.
4624 * tests/java.at (Java throws specifications): New test.
4625
4626 Improve documentation for Java parsers.
4627 * doc/bison.texinfo (Java Parsers): Add subsections.
4628 Don't quote first argument of %define.
4629 (Java Bison Interface): Document output files. Move documentation
4630 of parser class and merge into Java Parser Interface. Document
4631 features that error out. Document directives with no effect.
4632 Move note about Javadoc higher.
4633 (Java Semantic Values): Explicitly mention stype.
4634 Document that generic types cannot be used.
4635 (Java Location Values): Use @deftypeivar. Document constructors.
4636 Correct return value for toString.
4637 (Java Parser Interface): List undocumented constants/fields.
4638 Move documentation of fields added by %parse-param closer to list
4639 of members. Document that token names are added as fields.
4640 Document constructors accurately. Remove error method.
4641 (Java Scanner Interface): Move note on %pure-parser to Java Bison
4642 Interface. Describe %code lexer and yylex accutately.
4643 Remove documentation that does not match the code.
4644 (Java Action Features): New.
4645 (Java Differences): Add reference. Add item on semantic values.
4646 Add note about @{ ... @}. Clarify %% epilogue placement.
4647 (Java Declarations Summary): New.
4648
4649 Fix Java skeleton.
4650 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
4651 (b4_remove_comma): Quote test argument.
4652 (b4_identification): Remove "bison" field.
4653 * tests/java.at (Java parser class and package names): New test.
4654 (Java %parse-param and %lex-param): New test.
4655 (Java stype, position_class and location_class): New test.
4656
4657 2008-10-31 Di-an Jan <dianj@freeshell.org>
4658
4659 * data/lalr1.jave: Update copyright years.
4660 (YYParser): Correct name of "generated from" file in Javadoc:
4661 use b4_file_name instead of @ofile@.
4662 (Location constructor): Correct Javadoc parameter name.
4663 (yylloc): Add missing opening m4 quote after b4_location_if.
4664 This removes a stray [ in the Javadoc of Lexer.getStartPos.
4665 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
4666 (YYParser constructor): Correct Javadoc parameter name.
4667
4668 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
4669
4670 Always put auxiliary code files in the same dir as other output files.
4671 * src/files.c (compute_file_name_parts): When the user specifies
4672 --output but not --file-prefix, extract the directory prefix from the
4673 file prefix not from the grammar file name. This affects the location
4674 of files like location.hh generated by the C++ skeleton. The includes
4675 in the other output files require this fix.
4676 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
4677 for expected output files.
4678 (Output files): Add a test for the above.
4679
4680 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
4681
4682 * gnulib: Update submodule to HEAD.
4683
4684 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4685
4686 Update copyright year.
4687 * src/files.c: Here.
4688
4689 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
4690
4691 Don't overwrite the input file.
4692 * src/files.c (output_file_name_check): Fatal error if using input file
4693 for output.
4694 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
4695 argument.
4696 (Conflicting output files): Add test.
4697
4698 2008-10-28 Akim Demaille <demaille@gostai.com>
4699
4700 Space changes.
4701 * data/lalr1.cc: Formatting changes.
4702
4703 2008-10-28 Akim Demaille <demaille@gostai.com>
4704
4705 Don't define debugging functions when !YYDEBUG.
4706 * data/lalr1.cc (debug_stream, set_debug_stream)
4707 (debug_level_type, debug_level, set_debug_level): Don't
4708 declare them when YYDEBUG is not defined.
4709 The implementation are already YYDEBUG-aware.
4710
4711 2008-10-28 Akim Demaille <demaille@gostai.com>
4712
4713 Prefer "continue" for empty loop bodies.
4714 * etc/bench.pl.in: Use "continue" instead of {}.
4715
4716 2008-10-28 Akim Demaille <demaille@gostai.com>
4717
4718 Space and comments changes.
4719 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
4720 * data/c.m4, data/lalr1.cc: Space changes.
4721
4722 2008-10-28 Akim Demaille <demaille@gostai.com>
4723
4724 Make gnulib a submodule.
4725 * gnulib: New.
4726 * .gitmodules (gnulib): New.
4727
4728 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
4729
4730 Fix yyerror_range for user-defined location type in C++. Reported by
4731 Georg Sauthoff at
4732 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
4733 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
4734 * THANKS (Georg Sauthoff): Add.
4735
4736 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
4737
4738 Update several administrative files mainly to facilitate releasing.
4739 * HACKING (Administrivia): Make the git-merge-changelog notes more
4740 helpful.
4741 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
4742 (Release Procedure): Update for git and add numerous details that were
4743 previously missing.
4744 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
4745 * maint.mk (announcement): Don't list bison as a bootstrap tool so
4746 that announcements don't claim we bootstrapped with whatever bison
4747 happened to be in PATH. Add flex as a bootstrap tool.
4748 * Makefile.maint: Remove, previously replaced by maint.mk.
4749 * Makefile.cfg: Remove, and migrate settings to...
4750 * cfg.mk: ... here for the sake of `make announcement'.
4751 * bootstrap.conf (gnulib_modules): Add announce-gen.
4752 * README: Say GNU Bison instead of just Bison. Suggested by Karl
4753 Berry.
4754
4755 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
4756
4757 Small but important bugfixes for the Java skeleton.
4758 * data/lalr1.java (yyerror): Change Location to b4_location_type.
4759 (yy_symbol_print): Call toString on yyvaluep.
4760
4761 2008-08-29 Akim Demaille <demaille@gostai.com>
4762
4763 Clarify UPDATED use.
4764 * doc/bison.texinfo: It refers to the last edition of this file,
4765 not to the release date of Bison.
4766 Reported by Joel E. Denny.
4767
4768 2008-08-29 Akim Demaille <demaille@gostai.com>
4769
4770 * README: Update FAQ pointer.
4771 Reported by Joel E. Denny.
4772
4773 2008-08-27 Eric Blake <ebb9@byu.net>
4774
4775 Resync m4sugar from autoconf.
4776 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
4777 (m4_init): Adjust to latest m4.git changes.
4778 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
4779 effects.
4780 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
4781 (_m4_list_cmp): Reduce side effects.
4782
4783 2008-08-27 Akim Demaille <demaille@gostai.com>
4784
4785 Check yyerrok in calc.at.
4786 * tests/calc.at (calc.y): Use yyerrok on "( error )".
4787 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
4788 expected.
4789
4790 2008-08-27 Akim Demaille <demaille@gostai.com>
4791
4792 Support yyerrok in lalr1.cc.
4793 YYBACKUP is still to import back into lalr1.cc.
4794 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
4795
4796 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
4797
4798 For maintainer-check*, don't recompile for a $(VERSION) update.
4799 * cfg.mk: New file.
4800 (_is-dist-target): Override the one in GNUmakefile.
4801 * Makefile.am (EXTRA_DIST): Add cfg.mk.
4802
4803 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
4804
4805 Update for recent change to gnulib.
4806 * src/parse-gram.y: Don't include strverscmp.h. It comes from
4807 string.h now.
4808
4809 2008-08-15 Eric Blake <ebb9@byu.net>
4810
4811 Remaining m4sugar merge from autoconf.
4812 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
4813 * data/m4sugar/foreach.m4: New file, copied from autoconf.
4814 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
4815 * src/output.c (output_skeleton): Tell m4 how to find it.
4816
4817 Partial m4sugar merge from autoconf: m4_map.
4818 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
4819 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
4820 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
4821 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
4822 for empty list.
4823 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
4824 Likewise.
4825 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
4826 declares it.
4827
4828 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
4829
4830 Keep .version and PACKAGE_VERSION in sync.
4831 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
4832 dependency, and add comments justifying this in more detail. Discussed
4833 starting at
4834 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
4835
4836 2008-08-06 Eric Blake <ebb9@byu.net>
4837
4838 Partial m4sugar merge from autoconf: m4_shiftn.
4839 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
4840 (m4_shift2, m4_shift3): New macros.
4841 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
4842 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
4843 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
4844 * data/java.m4 (b4_remove_comma): Likewise.
4845
4846 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
4847 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
4848 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
4849 (m4_init): Consolidate wrapped text into single m4_wrap.
4850 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
4851 in wrapped text.
4852
4853 2008-08-05 Eric Blake <ebb9@byu.net>
4854
4855 Partial m4sugar merge from autoconf: builtins, version.m4.
4856 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
4857 (m4_prepend): Remove, as it is unused and inherently quadratic,
4858 whereas m4_append is linear in newer m4.
4859 (m4_mkstemp): New builtin.
4860 (m4_symbols): Make rename conditional.
4861 (m4_version_prereq): Ensure fatal error if used in bison, which
4862 intentionally lacks version.m4.
4863
4864 Fix comments in m4sugar.
4865 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
4866
4867 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
4868
4869 Update for recent .gitignore fix in Gnulib.
4870 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
4871 anchored .gitignore entries.
4872
4873 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
4874
4875 Set gnu or gnits strictness.
4876 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
4877 development and gnits strictness for releases. Based on Eric Blake's
4878 suggestion at
4879 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
4880
4881 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
4882
4883 * NEWS: Clarify documentation of %language.
4884
4885 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
4886
4887 Support usage of git-merge-changelog.
4888 * .gitattributes: New.
4889 * HACKING: Document usage of git-merge-changelog.
4890 * bootstrap: Install git-merge-changelog entries in .git/config
4891 if appropriate.
4892
4893 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
4894
4895 Remove remaining dependence on CVS Id keyword.
4896 * ChangeLog: For the sake of people still using CVS, don't use dollars
4897 when mentioning Id.
4898 * data/xslt/bison.xsl: Remove Id from header comments, where it was
4899 unusual anyway.
4900 * data/xslt/xml2dot.xsl: Likewise.
4901 * data/xslt/xml2text.xsl: Likewise.
4902 * data/xslt/xml2xhtml.xsl: Likewise.
4903 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
4904 * doc/Makefile.am (neutralize): Remove, no longer needed.
4905 (.x.1): Don't use neutralize.
4906 (edit): Don't substitute for ID.
4907 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
4908
4909 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
4910
4911 Fix dependence on computed configure variables.
4912 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
4913 $(top_srcdir)/configure.ac so that changes to computed variables, such
4914 as PACKAGE_VERSION, are seen.
4915 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
4916
4917 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
4918
4919 Update copyright dates for recent changes.
4920 * Makefile.am: Here.
4921 * src/Makefile.am: Here.
4922 * src/reduce.c: Here.
4923 * tests/reduce.at: Here.
4924
4925 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
4926
4927 Use git-version-gen for version names between releases.
4928 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
4929 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
4930 * .prev-version: New.
4931 * .version.in: Remove.
4932 * ChangeLog: Remove the Id previously used for capturing the CVS
4933 revision.
4934 * GNUmakefile: Remove, now copied from Gnulib.
4935 * Makefile.am: Add code suggested by comments in
4936 build-aux/git-version-gen.
4937 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
4938 .prev-version, and .version.
4939 * NEWS (2.3b+): Rename to...
4940 (?.?): ... this because we're dropping the "+" version naming scheme,
4941 but, in general, we still can't be sure of our next release name.
4942 * bootstrap: Add a quick hack to remove from .gitignore the
4943 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
4944 entry. This should really be fixed in gnulib instead.
4945 * bootstrap.conf (gnulib_modules): Add gnumakefile.
4946 * configure.ac (AC_INIT): Set version name by invoking
4947 build-aux/git-version-gen.
4948 (AC_CONFIG_FILES): Remove .version, now generated by
4949 build-aux/git-version-gen.
4950 * maint.mk: New, copied from coreutils.
4951 * doc/.cvsignore (bison.1): Add.
4952 * doc/.gitignore (/bison.1): Add.
4953 * doc/bison.1: Remove, generated.
4954 * src/.cvsignore (revision.c): Remove.
4955 * src/.gitignore (/revision.c): Remove.
4956 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
4957 (BUILT_SOURCES): Remove revision.c.
4958 (revision.c): Remove.
4959 * src/getargs.c (version): Don't print revision after the VERSION.
4960 * src/revision.h: Remove.
4961
4962 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
4963
4964 Fix untranslatable composition of sentences. Reported by Goran
4965 Uddeborg at
4966 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
4967 * THANKS (Goran Uddeborg): Add.
4968 * src/reduce.c (reduce_print): Report the number of nonterminals and
4969 rules useless in the grammar in separate sentences.
4970 * tests/reduce.at (Useless Rules): Update output.
4971 (Reduced Automaton): Likewise.
4972 (Underivable Rules): Likewise.
4973 (Empty Language): Likewise.
4974
4975 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
4976
4977 Fix some .gitignore and .cvsignore problems.
4978 * bootstrap (insert_sorted_if_absent): Replace all uses with...
4979 (insert_vc_ignore): ... this new function, which prepends `/' to all
4980 .gitignore entries before passing them to insert_sorted_if_absent.
4981 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
4982 .cvsignore files are maintained even though Bison developers run
4983 bootstrap while using Git.
4984 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
4985 unneeded by Bison.
4986 (gnulib): Add.
4987 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
4988 unneeded. Reported by Eric Blake.
4989 * lib/.gitignore (/*~): Add.
4990 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
4991 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
4992 Blake.
4993 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
4994
4995 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
4996
4997 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
4998 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
4999 * bootstrap.conf (gnulib_modules): Add unsetenv.
5000 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
5001 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
5002 (/setenv.m4): Add.
5003 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
5004 the first argument because it may become position-dependent, and unset
5005 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
5006 Add comments explaining these issues in more detail.
5007
5008 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
5009
5010 Add .gitignore everywhere based on .cvsignore.
5011 * .gitignore: New.
5012 * build-aux/.gitignore: New.
5013 * data/.gitignore: New.
5014 * doc/.gitignore: New.
5015 * etc/.gitignore: New.
5016 * examples/.gitignore: New.
5017 * examples/calc++/.gitignore: New.
5018 * lib/.gitignore: New.
5019 * m4/.gitignore: New.
5020 * po/.gitignore: New.
5021 * runtime-po/.gitignore: New.
5022 * src/.gitignore: New.
5023 * tests/.gitignore: New.
5024
5025 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
5026
5027 * NEWS (2.3b+): New section, empty for now.
5028 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
5029
5030 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
5031
5032 * NEWS (2.3b): Update release date since there has been a delay in
5033 getting the announcements and tarballs out.
5034
5035 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
5036
5037 * NEWS: Version 2.3b.
5038 * configure.ac (AC_INIT): Likewise.
5039 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
5040
5041 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
5042
5043 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
5044 been doing it for years.
5045 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
5046 (Release Procedure): Add FIXME about make alpha being unmaintained.
5047
5048 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
5049
5050 * data/yacc.c: Reformat m4 a little for readability.
5051 * src/lalr.c (build_relations): Correct comment.
5052
5053 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5054
5055 DJGPP specific issue.
5056 * djgpp/config.sed: Fixes required to run configure scripts generated
5057 by autoconf 2.62.
5058
5059 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
5060
5061 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
5062 coordinator@translationproject.org.
5063
5064 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
5065
5066 * THANKS: Add Eric Blake.
5067
5068 2008-04-23 Eric Blake <ebb9@byu.net>
5069
5070 Revert prior patch, by working around autoconf regression.
5071 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
5072 ("Output file name: ("): Uncomment test.
5073 ("Output file name: )"): Likewise.
5074 Based on an idea from Noah Misch.
5075
5076 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
5077
5078 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
5079 2.61. Reported by Juan Manuel Guerrero at
5080 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
5081 * tests/output.at ("Output file name: ("): Comment out test case for
5082 now.
5083 ("Output file name: )"): Likewise.
5084
5085 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
5086
5087 * GNUmakefile: Update git-version-gen invocation so make dist
5088 succeeds.
5089
5090 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
5091
5092 Update to the current gnulib CVS repository, and fix trigraph handling
5093 in Bison.
5094 * bootstrap: Update gnulib CVS repository URL.
5095 (symlink_to_dir): Encapsulate the code that guarantees the destination
5096 directory exists into...
5097 (check_dst_dir): ... this new function, and...
5098 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
5099 fail when copying files into lib/uniwidth/.
5100 * src/output.c (prepare_symbols): When writing yytname muscles, where
5101 symbol names will be encoded in C-string literals, tell quotearg to
5102 escape trigraphs. This used to be the default in gnulib.
5103 * tests/regression.at (Token definitions): Because of the change in
5104 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
5105 escapes trigraphs in symbol names. Thus, yytname no longer has
5106 trigraphs unnecessarily doubly escaped. Update test case output.
5107 Extend test case to be sure Bison's own error messages will no longer
5108 have trigraphs in symbol names unnecessarily escaped once.
5109
5110 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
5111
5112 Fix make dist infinite loop reported by Juan Manuel Guerrero at
5113 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
5114 * .cvsignore: Add .version.
5115 * .version.in: New.
5116 * bootstrap.conf (gnulib_modules): Add git-version-gen.
5117 * configure.ac (AC_CONFIG_FILES): Add .version.
5118 * build-aux/.cvsignore: Add git-version-gen.
5119
5120 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
5121
5122 * NEWS (2.3a+): Mention that -g now takes an argument.
5123 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
5124 consistency. Update the -g and -x entries now that they take
5125 arguments. Use brackets to indicate optional arguments.
5126 * src/getargs.c (usage): Explain the relationship between arguments of
5127 long and short options more completely. Document --defines and -d
5128 separately since the former takes an argument but, for POSIX Yacc, the
5129 latter does not.
5130 (short_options): Let -W take an optional argument like --warnings.
5131 (getargs): Sort cases.
5132
5133 2008-02-28 Akim Demaille <demaille@gostai.com>
5134
5135 * doc/bison.texinfo: Fix a few typos.
5136
5137 2008-02-28 Akim Demaille <akim@epita.fr>
5138
5139 * doc/bison.texinfo (Bison Options): Document -W.
5140 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
5141
5142 2008-02-28 Akim Demaille <akim@epita.fr>
5143
5144 * src/getargs.c (short_options): Split and sort for readability.
5145 -g and -x take optional arguments, just like their long options.
5146 * build-aux/cross-options.pl: Use /x to make the regexp easier to
5147 understand.
5148 Fix the handling of $opt which resulted in all the argument to be
5149 considered as optional.
5150
5151 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
5152
5153 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
5154 say its interface is experimental.
5155 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
5156 Java.
5157 (Bison Options): In the -L and --language entry, mention Java.
5158 (Java Bison Interface): Say the interface is experimental.
5159 * src/getargs.c (usage): Mention -L and --language.
5160
5161 * NEWS (2.3a+): Say the push parsing interface is experimental.
5162 * doc/bison.texinfo (Push Decl): Likewise.
5163 (Decl Summary): Likewise in the "%define api.push_pull" entry.
5164 (Push Parser Function): Likewise.
5165 (Pull Parser Function): Likewise.
5166 (Parser Create Function): Likewise.
5167 (Parser Delete Function): Likewise.
5168 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
5169 yypull_parse, and yypush_parse entries.
5170
5171 * NEWS (2.3a+): Mention XML support, and say the schema is
5172 experimental.
5173 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
5174 * src/getargs.c (usage): Say the XML schema is experimental.
5175
5176 * NEWS (2.3a+): Say option instead of flag.
5177
5178 2008-02-21 Wojciech Polak <polak@gnu.org>
5179
5180 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
5181 text.
5182
5183 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
5184
5185 Fix impure push parser compile error reported by Bob Rossi at
5186 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
5187 * data/yacc.c: Clean up whitespace in the output a little.
5188 (yypstate_allocated): Define for impure push parsers regardless of
5189 whether the pull interface is also requested.
5190 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
5191 check impure push parsers without the pull interface.
5192
5193 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
5194 yyerror takes arguments specified by %parse-param while yypstate_new
5195 does not.
5196 * doc/bison.texinfo (Parser Create Function): Document that
5197 yypstate_new returns 0 for multiple impure parser instances.
5198 * tests/push.at (Push Parsing: Multiple impure instances): Update
5199 expected stderr output.
5200
5201 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
5202
5203 * runtime-po/POTFILES.in (push.c): Remove.
5204
5205 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
5206
5207 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
5208 * data/push.c: Rename to...
5209 * data/yacc.c: ... this, overwriting it.
5210 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
5211 `%push-pull-parser' -> `%define api.push_pull "both"'.
5212 Remove old yacc.c tests, and update push.c tests to yacc.c.
5213
5214 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
5215
5216 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
5217 `"%code top" blocks' instead of `%code "top" blocks'.
5218 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
5219 Clean up whitespace in the output a little.
5220
5221 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
5222
5223 Fix documentation problems reported by Tim Josling at
5224 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
5225 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
5226 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
5227 integers. Explain the effect of literal string aliases on error
5228 messages. Copy token 0 documentation from the C++ skeleton
5229 documentation.
5230
5231 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
5232
5233 Accept a token number in a %left, %right, or %nonassoc for POSIX
5234 conformance. Reported by Tim Josling at
5235 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
5236 * NEWS (2.3a+): Mention.
5237 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
5238 and code numbers are treated by precedence declarations.
5239 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
5240 of symbols.1.
5241 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
5242 of symbol.
5243 (symbol.prec): New, just like symbol but allows INT.
5244 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
5245 longer holds.
5246 * tests/regression.at (Token number in precedence declaration): New
5247 test case.
5248
5249 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5250
5251 DJGPP specific issues.
5252 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
5253 be changed. Copyright timestamp adjusted.
5254 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
5255 be changed. Copyright timestamp adjusted.
5256 * djgpp/config.site: Copyright timestamp adjusted.
5257 * djgpp/config_h.sed: Copyright timestamp adjusted.
5258 * djgpp/djunpack.bat: Copyright timestamp adjusted.
5259 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
5260 filename translation list.
5261 * djgpp/subpipe.c (init_subpipe): Check the environment variables
5262 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
5263 files shall be created. Before trying to use the temp dir where the
5264 environment variable points to check that the dir really exists. If
5265 not default to the cwd as temp dir. Copyright timestamp adjusted.
5266 * djgpp/subpipe.h: Copyright timestamp adjusted.
5267 * djgpp/testsuite.sed: Copyright timestamp adjusted.
5268
5269 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
5270
5271 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
5272
5273 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
5274
5275 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
5276 Problem reported by Claudio Saavedra in
5277 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
5278
5279 2008-01-05 Wojciech Polak <polak@gnu.org>
5280
5281 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
5282 document's title with the input grammar file name.
5283
5284 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
5285
5286 Automate regression testing of the XML/XSLT implementation. Discussed
5287 starting at
5288 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
5289 * configure.ac (XSLTPROC): New substitution.
5290 * Makefile.am (maintainer-xml-check): New phony target invoking...
5291 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
5292 invoking make maintainer-check with BISON_TEST_XML=1.
5293 * tests/atlocal.in (XSLTPROC): New.
5294 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
5295 not to report reachable memory when Bison is expected to have a
5296 non-zero exit status and (2) to compare XML/XSLT output with --graph
5297 and --report=all output for every working grammar when
5298 BISON_TEST_XML=1.
5299 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
5300 (AT_BISON_CHECK_XML): New.
5301 (AT_QUELL_VALGRIND): New.
5302 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
5303 (AT_CHECK): ... don't redefine this since this was the old way to
5304 quell Valgrind.
5305 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
5306 AT_BISON_CHECK invocations.
5307 * tests/c++.at: Likewise.
5308 * tests/calc.at: Likewise.
5309 * tests/conflicts.at: Likewise.
5310 * tests/cxx-type.at: Likewise.
5311 * tests/existing.at: Likewise.
5312 * tests/glr-regression.at: Likewise.
5313 * tests/headers.at: Likewise.
5314 * tests/input.at: Likewise.
5315 * tests/java.at: Likewise.
5316 * tests/output.at: Likewise.
5317 * tests/push.at: Likewise.
5318 * tests/reduce.at: Likewise.
5319 * tests/regression.at: Likewise.
5320 * tests/sets.at: Likewise.
5321 * tests/skeletons.at: Likewise.
5322 * tests/synclines.at: Likewise.
5323 * tests/torture.at: Likewise.
5324 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
5325 tends to hang xsltproc.
5326 (Big horizontal): Likewise.
5327
5328 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
5329
5330 In XML output, remove redundant class attribute on symbol element.
5331 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
5332 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
5333 look up a symbol to determine whether it's a nonterminal or terminal.
5334 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
5335 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
5336
5337 Add prec/assoc information to XML output.
5338 * src/gram.c (grammar_rules_print_xml): For each rule that has a
5339 %prec, add a percent_prec attribute.
5340 * src/print-xml.c (print_grammar): For each terminal that has a
5341 precedence or associativity, add a prec or assoc attribute.
5342 (xml_indent): New.
5343 (xml_puts): Use xml_indent.
5344 (xml_printf): Use xml_indent.
5345 * src/print-xml.h (xml_indent): Prototype.
5346
5347 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
5348 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5349
5350 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
5351
5352 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
5353 (bison:ruleByNumber): ... this for clarity.
5354 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
5355 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
5356 (xsl:template match="reduction"): Update.
5357 (xsl:template match="item"): Update.
5358 (xsl:template match="reduction"): Update.
5359
5360 In the XML output, don't print the list of rules where symbols appear.
5361 Compute it in XSLT instead. Discussed at
5362 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
5363 * data/xslt/bison.xsl (bison:ruleByLhs): New.
5364 (bison:ruleByRhs): New.
5365 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
5366 bison:ruleByRhs.
5367 (xsl:template match="terminal/rule"): Remove.
5368 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
5369 bison:ruleByRhs.
5370 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
5371 Remove.
5372 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
5373 bison:ruleByRhs and mode="number-link" for rule template.
5374 (xsl:template match="terminal/rule"): Remove.
5375 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
5376 bison:ruleByRhs and mode="number-link" for rule template.
5377 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
5378 Rewrite as...
5379 (xsl:template match="rule" mode="number-link"): ... this.
5380 * src/print-xml.c (print_grammar): Don't print the list of rules.
5381
5382 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
5383
5384 Don't let --report affect XML output; always print all information.
5385 Discussed at
5386 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
5387 * src/conflicts.c (log_resolution): Implement.
5388 * src/print-xml.c (print_core): Implement.
5389 (print_state): Implement.
5390 (print_xml): Implement.
5391
5392 * NEWS (2.3a+): Fix quotes.
5393 * src/parse-gram.y (prologue_declaration): For consistency with -v,
5394 don't let %verbose clear the list specified by --report.
5395
5396 2007-11-26 Akim Demaille <akim@epita.fr>
5397
5398 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
5399
5400 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
5401
5402 In the XML output, list useless and unused symbols and rules with the
5403 useful ones and add a "usefulness" attribute. Discussed starting at
5404 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
5405 * src/gram.c (grammar_rules_partial_print_xml): Remove.
5406 (grammar_rules_print_xml): Print all rules instead of just those
5407 useful in the grammar, and add a "usefulness" attribute.
5408 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
5409 * src/print-xml.c (print_rules_useless_in_parser): Remove.
5410 (print_grammar): Print all nonterminals instead of just useful ones,
5411 and add a "usefulness" attribute to nonterminals and terminals.
5412 (print_xml): Don't print a separate "reductions" or
5413 "rules-useless-in-parser" element.
5414 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
5415 (reduce_xml): Remove.
5416 (reduce_token_unused_in_grammar): New.
5417 (reduce_nonterminal_useless_in_grammar): New.
5418 * src/reduce.h (reduce_xml): Remove prototype.
5419 (reduce_token_unused_in_grammar): Add prototype.
5420 (reduce_nonterminal_useless_in_grammar): Add prototype.
5421 * data/xslt/xml2text.xsl: Update for XML changes.
5422 * data/xslt/xml2xhtml.xsl: Update for XML changes.
5423 * tests/reduce.at (Useless Terminals): Update output.
5424 (Useless Rules): Update output.
5425 (Reduced Automaton): Update output.
5426
5427 Say "Terminals unused in grammar" instead of "Unused terminals".
5428 * NEWS (2.3a+): Update.
5429 * doc/bison.texinfo (Understanding): Update example output.
5430 * src/reduce.c (reduce_output): Implement.
5431 * data/xslt/xml2text.xsl: Implement.
5432 * data/xslt/xml2xhtml.xsl: Implement.
5433
5434 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
5435
5436 Accept --report-file=FILE to override the default `.output' filename.
5437 * NEWS (2.3a+): Mention.
5438 * doc/bison.texinfo (Bison Options): Add an entry.
5439 * src/files.c (compute_output_file_names): Don't override
5440 spec_verbose_file if already set.
5441 * src/getargs.c (usage): Document --report-file.
5442 (REPORT_FILE_OPTION): New anonymous enum member.
5443 (long_options): Add entry for it.
5444 (getargs): Add case for it setting spec_verbose_file.
5445
5446 * build-aux/cross-options.pl: Don't record a short option just because
5447 there's an arg.
5448 * doc/.cvsignore: Add yacc.1.
5449
5450 2007-11-14 Akim Demaille <akim@epita.fr>
5451
5452 * doc/yacc.1.in: New.
5453 * configure.ac, doc/Makefile.am: Adjust.
5454 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
5455 config.h symbol.
5456 Use AC_SUBST for assignments too.
5457 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
5458
5459 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5460
5461 * src/gram.c: Remove comments that duplicate comments in gram.h.
5462
5463 When reporting useless rules and nonterminals, say "useless in grammar"
5464 instead of "useless", and say "useless in parser" instead of "never
5465 reduced". Discussed starting at
5466 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
5467 * NEWS (2.3a+): Mention this change.
5468 * data/xslt/xml2text.xsl: Update output text and expected input XML
5469 element names to match changes below.
5470 * data/xslt/xml2xhtml.xsl: Likewise.
5471 (xsl:template match="bison-xml-report"): Add missing entry in Table of
5472 Contents: "Rules useless in parser due to conflicts".
5473 * doc/bison.texinfo (Decl Summary): Reword a little.
5474 (Understanding): Update example output for changes below.
5475 * src/gram.c: (rule_useful_p): Rename to...
5476 (rule_useful_in_grammar_p): ... this.
5477 (rule_useless_p): Rename to...
5478 (rule_useless_in_grammar_p): ... this.
5479 (rule_never_reduced_p): Rename to...
5480 (rule_useless_in_parser_p): ... this.
5481 (grammar_rules_print): Update for renames.
5482 (grammar_rules_print_xml): Update for renames.
5483 (grammar_rules_never_reduced_report): Rename to...
5484 (grammar_rules_useless_report): ... this since it is used for either
5485 kind of useless rule.
5486 * src/gram.h: Reword comments and update function names in prototypes.
5487 * src/main.c (main): Say "rule useless in parser due to conflicts".
5488 * src/print-xml.c (print_rules_never_reduced): Rename to...
5489 (print_rules_useless_in_parser): ... this, and rename output XML
5490 element "rules-never-reduced" to "rules-useless-in-parser".
5491 (print_xml): Update for rename.
5492 * src/print.c (print_results): Say "Rules useless in parser due to
5493 conflicts".
5494 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
5495 (nonterminals_reduce): Say "nonterminal useless in grammar".
5496 (reduce_output): Say "Nonterminals useless in grammar".
5497 Say "Rules useless in grammar".
5498 (reduce_xml): Rename output XML element "useless" to
5499 "useless-in-grammar".
5500 (reduce_print): Don't report the count of grammatically useless rules
5501 as "rules never reduced" just because %yacc is specified.
5502 In the correct report of this count, say nonterminal(s) and rule(s)
5503 "useless in grammar".
5504 * tests/conflicts.at (S/R in initial): Update expected output.
5505 (Defaulted Conflicted Reduction): Likewise.
5506 (Unreachable States After Conflict Resolution): Likewise.
5507 * tests/existing.at (GNU pic Grammar): Likewise.
5508 * tests/reduce.at (Useless Nonterminals): Likewise.
5509 (Useless Rules): Likewise.
5510 (Reduced Automaton): Likewise.
5511 (Underivable Rules): Likewise.
5512 (Empty Language): Likewise.
5513
5514 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
5515
5516 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
5517 here document and before the EOF so that BSD's implementation of Bourne
5518 shell doesn't parse the delimiter as part of the here document.
5519 * doc/.cvsignore: Add cross-options.texi.
5520 * src/getargs.c (usage): Add a blank line after the warning categories.
5521
5522 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
5523
5524 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
5525
5526 2007-11-05 Akim Demaille <akim@epita.fr>
5527
5528 Remove Id: from bison.1.
5529 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
5530 (perl -0777 -pi -e 's/\.PP\nId): New.
5531 (.x.1): Use it to ignore the version control revision.
5532
5533 2007-11-05 Akim Demaille <demaille@gostai.com>
5534
5535 * build-aux/Makefile.am: Ship cross-options.pl.
5536 * doc/Makefile.am: Always refer to cross-options.texi with
5537 $(srcdir).
5538 (MAINTAINERCLEANFILES): Add it.
5539
5540 2007-11-04 Akim Demaille <demaille@gostai.com>
5541
5542 Generate the long/short option cross-table.
5543 * build-aux/cross-options.pl: New.
5544 * doc/Makefile.am (cross-options.texi): New.
5545 * doc/bison.texinfo: Use it.
5546
5547 2007-11-04 Akim Demaille <demaille@gostai.com>
5548
5549 Generate bison.1 using help2man.
5550 * doc/common.x, doc/bison.x: New.
5551 * doc/Makefile.am (bison.1, .x.1): New.
5552 The code is taken from autoconf-2.61/man/Makefile.am.
5553 * configure.ac: Look for help2man.
5554
5555 2007-11-04 Akim Demaille <demaille@gostai.com>
5556
5557 Complete --help.
5558 * src/getargs.c (usage): Document -W, make it clear that -d,
5559 -g and -x have optional arguments.
5560
5561 2007-11-04 Akim Demaille <demaille@gostai.com>
5562
5563 Find sha1sum when named gsha1sum.
5564 * bootstrap (find_tool): New.
5565 ($SHA1SUM): New.
5566
5567 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
5568
5569 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
5570 at
5571 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
5572 * NEWS (2.3a+): Mention.
5573 * data/bison.m4 (b4_pure_if): Don't define it here.
5574 * data/c.m4 (b4_identification): Depend on individual skeletons to
5575 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
5576 values of the %define variables api.pure or api.push_pull. Define
5577 YYPURE, YYPUSH, and YYPULL accordingly.
5578 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
5579 glr.cc has already defined b4_pure_flag.
5580 * data/push.c: Define b4_pure_if based on `%define api.pure'.
5581 Remove YYPUSH and YYPULL since they're back in b4_identification again.
5582 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
5583 * doc/bison.texinfo (Pure Decl): Update.
5584 (Push Decl): Update.
5585 (Decl Summary): Add api.pure to %define entry.
5586 In %pure-parser entry, say it's deprecated and reference %define.
5587 (Pure Calling): Update.
5588 (Error Reporting): Update.
5589 (C++ Scanner Interface): Update.
5590 (How Can I Reset the Parser): Update.
5591 (Table of Symbols): In %pure-parser entry, say it's deprecated and
5592 reference %define.
5593 * src/getargs.c (pure_parser): Remove global variable.
5594 * src/getargs.h (pure_parser): Remove extern.
5595 * src/output.c (prepare): Don't define pure_flag muscle.
5596 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
5597 wrapper around `%define api.pure'.
5598 * tests/calc.at (Simple LALR Calculator): Update.
5599 (Simple GLR Calculator): Update.
5600 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
5601 Update.
5602 (GLR: Resolve ambiguity, pure, locations): Update.
5603 (GLR: Merge conflicting parses, pure, no locations): Update.
5604 (GLR: Merge conflicting parses, pure, locations): Update.
5605 * tests/glr-regression.at (Uninitialized location when reporting
5606 ambiguity): Update
5607 * tests/input.at (Unused %define api.pure): New test case.
5608 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
5609 AT_PURE_IF and AT_PURE_AND_LOC_IF.
5610 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
5611
5612 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
5613
5614 %define push_pull -> %define api.push_pull. Discussed starting at
5615 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
5616 * data/push.c: Expect the new name.
5617 * data/yacc.c: Likewise.
5618 * doc/bison.texinfo (Push Decl): Update.
5619 (Decl Summary): Update %define entry.
5620 (Push Parser Function): Update.
5621 (Pull Parser Function): Update.
5622 (Parser Create Function): Update.
5623 (Parser Delete Function): Update.
5624 * tests/calc.at (Simple LALR Calculator): Update.
5625 * tests/input.at (%define enum variables): Update.
5626 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
5627 (Push Parsing: Multiple impure instances): Update.
5628 (Push Parsing: Unsupported Skeletons): Update.
5629 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
5630 (Exploding the Stack Size with Malloc): Update.
5631
5632 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
5633 other entries some.
5634
5635 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
5636
5637 For the XML output's terminal element, rename @number to @token-number,
5638 and add @symbol-number. In the nonterminal element, rename @number to
5639 @symbol-number. Discussed starting at
5640 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
5641 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
5642 renames.
5643 (xsl:template match="nonterminal"): Likewise.
5644 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
5645 (xsl:template match="nonterminal"): Likewise.
5646 * src/print-xml.c (print_grammar): Implement.
5647
5648 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5649
5650 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
5651 2007-10-11 change, the child elements here are items not rules.
5652 (xsl:template match="item"): New.
5653 (xsl:template match="rule"): Update for new reduced itemset.
5654 (xsl:template match="point"): Remove.
5655 (xsl:template match="empty"): For consistency with --graph, don't
5656 output "/* empty */".
5657 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
5658 line-wrap, don't pass a negative value as first-line-length since this
5659 won't work with the following changes.
5660 (xsl:template name="line-wrap"): Simplify slightly.
5661 (xsl:template name="ws-search"): Eliminate recursion.
5662 * src/print_graph.c (print_core): Don't print a reduction's lookahead
5663 set next to an item whose dot is not at the end of the RHS even if it
5664 happens to be associated with the same rule.
5665
5666 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
5667
5668 Add %define lr.keep_unreachable_states.
5669 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
5670 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
5671 * src/main.c (main): Implement it.
5672 * tests/conflicts.at (Unreachable States After Conflict Resolution):
5673 Extend to test it, and fix a typo.
5674
5675 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
5676
5677 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
5678 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
5679 the example .output text.
5680 * tests/regression.at (Extra lookahead sets in report): Improve wording
5681 of comments.
5682
5683 2007-10-17 Wojciech Polak <polak@gnu.org>
5684
5685 * src/print-xml.c (print_grammar): Renamed
5686 <terminal> and <nonterminal> attributes:
5687 "type" to "number" and "symbol" to "name".
5688 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
5689 Use new attribute names.
5690 (xsl:template match="nonterminal"): Likewise.
5691 * data/xslt/xml2xhtml.xsl: Likewise.
5692
5693 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
5694
5695 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
5696 (Option Cross Key): Likewise.
5697
5698 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
5699 next to an item whose dot is not at the end of the RHS even if it
5700 happens to be associated with the same rule.
5701 * src/print.c (print_core): Likewise.
5702 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
5703 (Resolved SR Conflicts): Update output.
5704 * tests/regression.at (Extra lookahead sets in report): New test case.
5705
5706 2007-10-11 Wojciech Polak <polak@gnu.org>
5707
5708 * src/print-xml.c (print_core): Remove item set
5709 redundancy.
5710 * data/xslt/bison.xsl (bison:ruleNumber): New key.
5711 Improve processing time. Suggested by Joel E. Denny.
5712 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
5713 Write xsl:param "required" attribute as comment.
5714 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
5715 (xsl:template match="rule"): Support new reduced itemset.
5716 (xsl:template match="point"): Remove.
5717 * data/xslt/xml2xhtml.xsl: Likewise.
5718
5719 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
5720
5721 * src/getargs.c (version): Update copyright year.
5722
5723 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
5724
5725 Make xml2dot.xsl and --graph produce the same output.
5726 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
5727 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
5728 escaped later.
5729 (xsl:template name="output-node"): Use the new escape template instead
5730 of the string-replace template directly.
5731 (xsl:template name="output-edge"): Likewise.
5732 (xsl:template name="escape"): New, escapes backslashes and newlines in
5733 addition to quotation marks.
5734 * src/graphviz.c (start_graph, output_node, output_edge): Add
5735 whitespace to output for legibility.
5736
5737 Make xml2text.xsl and --report produce the same output, and remove the
5738 XML "conflicts" element since a conflict summary is easily extracted
5739 from the automaton.
5740 * data/xslt/bison.xsl: New.
5741 (xsl:template match="state" mode="bison:count-conflicts): New.
5742 * data/xslt/xml2text.xsl: Import bison.xsl.
5743 (xsl:template match="bison-xml-report"): Instead of styling the
5744 "conflicts" element, style the "automaton" element with mode
5745 "conflicts". Unlike the former, the latter lists S/R and R/R
5746 conflicts for a state on the same line.
5747 (xsl:template match="conflicts"): Remove.
5748 (xsl:template match="conflict"): Remove.
5749 (xsl:template match="terminal"): Line-wrap the list of rules in which
5750 the terminal is used.
5751 (xsl:template match="nonterminal"): Likewise for nonterminals.
5752 (xsl:template match="automaton" mode="conflicts"): New.
5753 (xsl:template match="state" mode="conflicts"): New.
5754 (xsl:template name="line-wrap"): New.
5755 (xsl:template name="ws-search"): New.
5756 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
5757 (xsl:template match="bison-xml-report"): Instead of styling the
5758 "conflicts" element, style the "automaton" element with mode
5759 "conflicts."
5760 (xsl:template match="conflicts"): Remove.
5761 (xsl:template match="conflict"): Remove.
5762 (xsl:template match="automaton" mode="conflicts"): New.
5763 (xsl:template match="state" mode="conflicts): New.
5764 * src/conflicts.c (conflicts_output_xml): Remove.
5765 * src/conflicts.h (conflicts_output_xml): Remove prototype.
5766 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
5767 * src/print.c (print_grammar): Consistently wrap at the 66th column so
5768 the corresponding XSLT is easier. Also, never wrap between a word and
5769 the comma that follows it.
5770
5771 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
5772
5773 Improve C++ namespace support. Discussed starting at
5774 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
5775 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
5776 b4_namespace_close): New macros that interpret the %define variable
5777 "namespace" so its value can contain "::" to indicate nested
5778 namespaces.
5779 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
5780 the above macros.
5781 * data/lalr1.cc (b4_namespace): Likewise.
5782 * data/location.cc (b4_namespace): Likewise.
5783 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
5784 inside a new table in the general %define entry. Document `%define
5785 namespace' there as well. Point the %name-prefix entry to it since it
5786 explains it more completely in the case of C++.
5787 (C++ Bison Interface): Mention `%define namespace' instead of
5788 %name-prefix.
5789 (Table of Symbols): Remove the `%define push_pull' entry. The %define
5790 entry suffices.
5791 * tests/c++.at (Relative namespace references): New test case.
5792 (Absolute namespace references): New test case.
5793 (Syntactically invalid namespace references): New test case.
5794 * tests/input.at (C++ namespace reference errors): New test case.
5795
5796 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
5797
5798 Add syncline support and location accessor to internal %define
5799 interfaces.
5800 * data/bison.m4 (b4_percent_define_get_loc): New.
5801 (b4_percent_define_get_syncline): New.
5802 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
5803 (b4_percent_define_default): Record defining location as line 1 rather
5804 than 0 for the sake of synchronizing #line's, and define
5805 b4_percent_define_syncline(VARIABLE).
5806 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
5807 * src/muscle_tab.c (muscle_syncline_grow): New.
5808 (muscle_code_grow): Use muscle_syncline_grow.
5809 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
5810 define b4_percent_define_syncline(VARIABLE).
5811 (muscle_percent_define_get_loc): New.
5812 (muscle_percent_define_get_syncline): New.
5813 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
5814 remove some unused variables.
5815 (muscle_percent_define_default): Record defining location as line 1
5816 rather than 0 for the sake of synchronizing #line's, and define
5817 b4_percent_define_syncline(VARIABLE).
5818 (muscle_percent_define_check_values): Use
5819 muscle_percent_define_get_loc.
5820 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
5821 (muscle_percent_define_get_syncline): Prototype.
5822 * tests/skeletons.at (%define Boolean variables: invalid skeleton
5823 defaults): Update output for location change.
5824 (Complaining during macro argument expansion): Extend to test
5825 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
5826
5827 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
5828
5829 Fix some error-reporting macro bugs.
5830 * data/bison.m4 (b4_cat): New.
5831 (b4_error, b4_error_at): Use b4_cat to send error directives directly
5832 to stdout so they don't become arguments to other macros. Update
5833 comments and add examples.
5834 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
5835 add examples.
5836 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
5837 after printing the error directive so that M4 doesn't report subsequent
5838 problems that are induced by this problem.
5839 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
5840 instead of just in them. Recognize @\n in both places. Both expand to
5841 the empty string. Needed by b4_cat.
5842 * tests/skeletons.at (Complaining during macro argument expansion):
5843 New test case.
5844 (Fatal errors make M4 exit immediately): New test case.
5845
5846 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
5847
5848 Implement --print-datadir.
5849 * src/getargs.c (usage): Mention.
5850 (PRINT_DATADIR_OPTION): New anonymous enum member.
5851 (long_options): Add entry for it.
5852 (getargs): Add case for it calling compute_pkgdatadir.
5853 * src/output.c (output_skeleton): Encapsulate data directory
5854 computation from here...
5855 (prepare): ... and from here...
5856 (compute_pkgdatadir): ... into this new function.
5857 * src/output.h (compute_pkgdatadir): Prototype.
5858
5859 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
5860
5861 * src/print-xml.c (escape_bufs): New static global variable
5862 replacing...
5863 (xml_escape_n): ... the static local variable buf here.
5864 (print_xml): Free memory for escape_bufs.
5865 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
5866
5867 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
5868
5869 Replace `%push-parser' and `%push-pull-parser' with
5870 `%define push_pull "push"' and `%define push_pull "both"'.
5871 `%define push_pull "pull"' is the default.
5872 * doc/bison.texinfo (Push Decl, Push Parser Function,
5873 Pull Parser Function, Parser Create Function, Parser Delete Function):
5874 Update declarations.
5875 (Decl Summary, Table of Symbols): Replace %push-parser and
5876 %push-pull-parser entries with a %define push_pull entry.
5877 * data/bison.m4 (b4_percent_define_check_values): New macro.
5878 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
5879 definitions...
5880 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
5881 definitions...
5882 * data/push.c: ... to here and compute them from the value of the
5883 %define variable push_pull.
5884 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
5885 parsing requests here...
5886 * data/yacc.c: ... hack this to switch to push.c any time
5887 b4_use_push_pull_flag or the %define variable push_pull is set. This
5888 will go away when we mv push.c yacc.c.
5889 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
5890 push parsing is not supported since unused %define variables are
5891 reported anyway.
5892 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
5893 * src/muscle_tab.h (muscle_percent_define_check_values): Update
5894 comments for consistency with b4_percent_define_check_values.
5895 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
5896 muscles.
5897 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
5898 Remove.
5899 (prologue_declaration): Remove %push-parser and %push-pull-parser
5900 rules.
5901 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
5902 * tests/calc.at: Update declarations.
5903 * tests/input.at (%define enum variables): New test case.
5904 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
5905 declaration.
5906 (Push Parsing: Multiple impure instances): Update declaration.
5907 (Push Parsing: Unsupported Skeletons): New test case.
5908 * tests/torture.at (Exploding the Stack Size with Alloca): Update
5909 declaration.
5910 (Exploding the Stack Size with Malloc): Update declaration.
5911
5912 2007-09-24 Wojciech Polak <polak@gnu.org>
5913
5914 Add XSLT transformations.
5915
5916 * data/xslt/xml2dot.xsl: Transform XML into DOT.
5917 * data/xslt/xml2text.xsl: Transform XML into plain text.
5918 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
5919 * data/Makefile.am (xsltdir): New variable.
5920 (dist_xslt_DATA): Add xslt/*.xsl files.
5921
5922 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
5923
5924 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
5925 Problem reported by Wojciech Polak.
5926 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
5927 (xml_printf): Undo change I made on 21 September; that is,
5928 indent 2 spaces, not 1.
5929
5930 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
5931
5932 Pacify ./configure --enable-gcc-warnings.
5933 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
5934 `char const *' instead of `char *'.
5935 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
5936 local variable `sep'.
5937
5938 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
5939
5940 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
5941 elsewhere.
5942 * src/print-xml.c: Prefer "const" after types; that's more consistent.
5943 (xml_printf): Indent just 1 space for level.
5944 (e_char, xlate_char): Remove.
5945 (xml_escape_string): Rewrite to avoid undefined behavior (used
5946 storage that was freed from the stack).
5947 (xml_escape_n): Don't bother checking for subscript error.
5948
5949 2007-09-21 Wojciech Polak <polak@gnu.org>
5950
5951 Add Bison XML Automaton Report.
5952
5953 Add support for an -x option to generate an XML report.
5954 It is not documented yet.
5955 * src/print-xml.c: New file.
5956 * src/print-xml.h: Likewise.
5957 * lib/timevar.def (TV_XML): New var.
5958 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
5959 * src/conflicts.c: Include print-xml.h.
5960 (solved_conflicts_xml_obstack): New var.
5961 (log_resolution, conflicts_solve, conflicts_free):
5962 Add support for XML report.
5963 (conflicts_output_val): New function.
5964 * src/conflicts.h (conflicts_output_val): New decl.
5965 * src/files.c (spec_xml_file): New var.
5966 (compute_output_file_names, output_file_names_free): Add XML support.
5967 * src/files.h (spec_xml_file): New decl.
5968 * src/getargs.c (xml_flag): New var.
5969 (usage, short_options, long_options, getargs): Add XML support.
5970 * src/getargs.h (xml_flag): New decl.
5971 * src/gram.c: Include print-xml.h.
5972 (rule_lhs_print_xml, rule_rhs_print_xml):
5973 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
5974 New functions.
5975 * src/gram.h: Declare external ones.
5976 * src/main.c: Include print-xml.h.
5977 (main): Add XML support.
5978 * src/reduce.c: Include print-xml.h.
5979 (reduce_xml): New function.
5980 * src/reduce.h: Declare it.
5981 * src/state.c: Include print-xml.h.
5982 (state_new): Add XML support.
5983 (state_rule_lookahead_tokens_print_xml): New function.
5984 * src/state.h: Declare it.
5985 (struct state): New member solved_conflicts_xml.
5986 * src/symtab.c (symbol_class_get_string): New function.
5987 * src/symtab.h: Declare it.
5988
5989 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
5990
5991 * GNUmakefile: Switch to coreutils's version.
5992 * bootstrap: Likewise.
5993 * Makefile.cfg: Adjust to new GNUmakefile.
5994 * README-hacking: Likewise.
5995
5996 Import from gnulib:
5997
5998 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
5999 Bruno Haible <bruno@clisp.org>
6000
6001 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
6002 and is a script that invokes bison. Tighten the code. Add comments.
6003
6004 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
6005
6006 Spell "boolean" as "Boolean". Reported by Akim Demaille.
6007 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
6008 * doc/bison.texinfo (Decl Summary): Fix.
6009 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
6010 * tests/input.at (Boolean %define variables): Update output.
6011 * tests/skeletons.at (%define boolean variables: invalid skeleton
6012 defaults): Rename to...
6013 (%define Boolean variables: invalid skeleton defaults): ... this and
6014 update output.
6015
6016 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
6017
6018 In impure push mode, don't allow more than one yypstate to be allocated
6019 since multiple impure parsers would corrupt yynerrs.
6020 * data/push.c (yypstate_allocated): New static global variable
6021 initialized to 0.
6022 (yypull_parse): If yypstate_new returns 0, don't report it as memory
6023 exhaustion if yypstate_allocated is 1, but still return 2.
6024 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
6025 already 1. Otherwise, set it to 1.
6026 (yypstate_delete): Set it to 0.
6027 * tests/push.at (Push Parsing: Multiple impure instances): New test
6028 case.
6029
6030 2007-08-17 Bob Rossi <bob@brasko.net>
6031
6032 * doc/bison.texinfo (Push Decl): Document the push parser.
6033 (Table of Symbols): Ditto.
6034 (Pure Decl): Ditto.
6035 (Decl Summary): Ditto.
6036 (Multiple Parsers, Push Parser Function, Pull Parser Function,
6037 Parser Create Function, Parser Delete Function):
6038 Add new push parser symbols.
6039 (Table of Symbols): Document push-parser, push-pull-parser,
6040 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
6041
6042 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
6043
6044 Update to GPLv3.
6045 * doc/gpl-3.0.texi: New file.
6046 * doc/gpl.texi: Remove.
6047 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
6048 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
6049 * README-hacking, TODO, bootstrap, bootstrap.conf:
6050 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
6051 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
6052 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
6053 * data/lalr1.cc, data/lalr1.java, data/location.cc:
6054 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
6055 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
6056 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
6057 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
6058 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
6059 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
6060 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
6061 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
6062 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
6063 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
6064 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
6065 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
6066 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
6067 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
6068 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
6069 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
6070 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
6071 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
6072 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
6073 * src/complain.c, src/complain.h, src/conflicts.c:
6074 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
6075 * src/files.h, src/flex-scanner.h, src/getargs.c:
6076 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
6077 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
6078 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
6079 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
6080 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
6081 * src/print.c, src/print.h, src/print_graph.c:
6082 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
6083 * src/reduce.h, src/relation.c, src/relation.h:
6084 * src/revision.h, src/scan-code.h, src/scan-code.l:
6085 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
6086 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
6087 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
6088 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
6089 * tests/Makefile.am, tests/actions.at, tests/c++.at:
6090 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
6091 * tests/existing.at, tests/glr-regression.at:
6092 * tests/headers.at, tests/input.at, tests/java.at:
6093 * tests/local.at, tests/output.at, tests/push.at:
6094 * tests/reduce.at, tests/regression.at, tests/sets.at:
6095 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
6096 * tests/torture.at:
6097 Update to GPLv3.
6098
6099 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
6100
6101 Get rid of broken %no-parser, -n, and --no-parser implementation and
6102 documentation.
6103 * TODO: Don't mention them.
6104 * doc/bison.1: Likewise.
6105 * doc/bison.texinfo (Decl Summary): Likewise.
6106 (Bison Options): Likewise.
6107 (Option Cross Key): Likewise.
6108 * src/getargs.c (no_parser_flag): Remove global variable.
6109 (usage): Don't print description of -n and --no-parser.
6110 (long_options): Remove --no-parser entry here.
6111 (getargs): Remove -n case in the switch here.
6112 * src/getargs.h (no_parser_flag): Remove extern.
6113 * tests/regression.at (Web2c Actions): Remove comment that mentions
6114 --no-parser.
6115
6116 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
6117
6118 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
6119 name user variables starting with `yy'. Just pass NULL instead of a
6120 dummy local &yylval to yypush_parse.
6121 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
6122 starting with `yy'.
6123
6124 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
6125
6126 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
6127 true since it's then always used regardless of whether yyoverflow is
6128 defined. Reported by Christian Burger at
6129 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
6130 * THANKS: Add Christian Burger.
6131
6132 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
6133 node names: say "Decl Summary" not "Bison Declaration Summary".
6134
6135 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
6136
6137 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
6138 determine whether this function has already complained about an invalid
6139 value for a %define boolean variable, don't check whether Bison has
6140 ever examined the value. As written, the check was a tautology.
6141 Instead, record and check for this complaint using a separate muscle.
6142
6143 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
6144
6145 Fix push parsing memory leak reported by Brandon Lucia at
6146 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
6147 * THANKS: Add Brandon Lucia.
6148 * data/push.c (yypstate_delete): Free the stack if it was reallocated
6149 but the parse never completed and thus freed it.
6150 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
6151 * tests/testsuite.at: Include push.at.
6152 * test/push.at: New.
6153 (Push Parsing: Memory Leak for Early Deletion): New test case.
6154
6155 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
6156
6157 Improve handling of multiple S/R conflicts in the same state and of S/R
6158 conflicts involving multiple reductions.
6159 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
6160 set for a state here or Bison will abort if it is reassigned on a
6161 later conflicted reduction in the same state.
6162 Similarly, don't finalize and assign the solved conflicts report here
6163 or it will be lost if it is reassigned on a later conflicted reduction
6164 in the same state.
6165 (set_conflicts): Instead, assign them both here after all S/R conflicts
6166 in the state have been fully examined.
6167 * src/print.c (shift_set): Rename to...
6168 (no_reduce_set): ... this.
6169 (print_reductions): Update for rename, and add %nonassoc error action
6170 tokens to no_reduce_set so that, when printing the first remaining
6171 reduction on an error action token, the reduction is enclosed in
6172 brackets.
6173 (print_results): Update for rename.
6174 * tests/conflicts.at (Solved conflicts report for multiple reductions
6175 in a state): New test case.
6176 (%nonassoc error actions for multiple reductions in a state): New test
6177 case.
6178
6179 * src/main.c (main): Don't depend on C99 features.
6180
6181 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
6182
6183 * build-aux/.cvsignore: Add compile.
6184 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
6185 uniwidth.
6186
6187 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
6188
6189 * bootstrap (slurp): Create target directories that don't exist.
6190 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
6191
6192 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
6193
6194 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
6195 than item number.
6196 * closure.c (closure): Likewise.
6197 * state.h (reductions): Comment sorting of rules.
6198 (state): Comment sorting of items.
6199
6200 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
6201
6202 Fix C++ test cases after recent Gnulib changes. Discussed starting at
6203 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
6204 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
6205 definition in order to avoid Gnulib headers since we don't use config.h
6206 here.
6207 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
6208 rather than AT_DATA so that config.h is included.
6209
6210 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
6211
6212 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
6213 instead of fprintf. Guard these functions with #if YYDEBUG instead of
6214 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
6215 and so that YYFPRINTF is guaranteed to be defined here.
6216
6217 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
6218
6219 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
6220 with...
6221 (muscle_percent_define_check_values): ... this more helpful function.
6222 Again, it's not used yet, but it will be.
6223 * src/muscle_tab.h: Likewise.
6224
6225 Improve some comments in parser table construction.
6226 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
6227 (generate_states): Don't mention ruleset, which is internal to closure.
6228 * src/closure.c (closure): Explain sorting of core and itemset, which
6229 is required for this function to behave correctly.
6230 * src/closure.h (closure): Mention sorting.
6231
6232 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
6233
6234 * src/lalr.c (state_lookahead_tokens_count): For code readability,
6235 move the check for disabled transitions to an aver since conflict
6236 resolution hasn't happened yet.
6237
6238 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
6239 labels a state as inconsistent just because it has error transitions.
6240 The original form of this check appeared in revision 1.1 of lalr.c,
6241 which was committed on 1991-12-21. Now (at least), changing the
6242 consistency label on such a state appears to have no useful effect in
6243 any of the places it is examined, which I enumerate below. The key
6244 point to understanding each item in this enumeration is that a state
6245 with an error transition is labelled consistent in the first place only
6246 if it has no rules, so the check cannot matter for states that have
6247 rules. (1) Labelling a state as inconsistent will cause set_conflicts
6248 to try to identify its conflicts, and a state must have *rules* to have
6249 conflicts. (2) Labelling a state as inconsistent will affect how
6250 action_row sets the default *rule* for the state. (3) Labelling a
6251 state as inconsistent will cause build_relations to add lookback edges
6252 to *rules* in that state.
6253 * src/state.h (struct state): Word the comment for member consistent
6254 more carefully.
6255
6256 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
6257
6258 Don't depend on C99 features.
6259 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
6260 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
6261 * src/reader.c (check_and_convert_grammar): Fix for-loop.
6262 * src/state.c (state_mark_reachable_states): Fix for-loop.
6263 (state_remove_unreachable_states): Fix for-loop.
6264
6265 Don't widen struct state with member reachable just to temporarily
6266 record reachability. Instead, use a local bitset.
6267 * src/state.h (struct state): Remove member.
6268 * src/state.c (state_new): Don't initialize it.
6269 (state_mark_reachable_states): Rename to...
6270 (state_record_reachable_states): ... this, and use bitset.
6271 (state_remove_unreachable_states): Use bitset.
6272
6273 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
6274
6275 * src/Makefile.am (yacc): Quote target action commands properly so
6276 that the yacc script isn't corrupt. Reported by Hans Aberg at
6277 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
6278
6279 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
6280 the case of pure parsers. Reported by Frans Englich at
6281 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
6282 * THANKS: Add Frans Englich.
6283
6284 * NEWS (2.3a+): In the %code entry, reference section `Bison
6285 Declaration Summary' from the manual now since the %code summary has
6286 moved there.
6287 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
6288 in the rules section must be terminated by semicolons.
6289
6290 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
6291
6292 Extend the front-end API for %define variables to more completely
6293 mirror the back-end. This will be useful in the future.
6294 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
6295 Update comments to mention the new front-end counterparts of these
6296 macros.
6297 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
6298 for muscle_string_decode and muscle_location_decode.
6299 (muscle_string_decode): New static function.
6300 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
6301 (muscle_percent_define_get, muscle_percent_define_ifdef): New
6302 functions.
6303 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
6304 muscle_percent_define_get to mimic the b4_percent_define_flag_if
6305 implementation more closely.
6306 (muscle_percent_define_invalid_value): New function.
6307 * src/muscle_tab.h (muscle_percent_define_get,
6308 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
6309 Prototype.
6310
6311 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
6312
6313 * NEWS (2.3a+): Mention yesterday's state-removal change.
6314 (2.3a): Remove the %language entry, which was added after 2.3a.
6315 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
6316 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
6317 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
6318 tests/existing.at: Update copyright date.
6319
6320 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
6321
6322 If conflict resolution makes states unreachable, remove those states,
6323 report rules that are then unused, and don't report conflicts in those
6324 states.
6325 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
6326 New global function.
6327 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
6328 function.
6329 * src/main.c (main): After conflict resolution, remove the unreachable
6330 states and update all data structures that reference states by number.
6331 * src/state.c (state_new): Initialize each state's reachable member to
6332 false.
6333 (state_mark_reachable_states): New static function.
6334 (state_remove_unreachable_states): New global function.
6335 * src/state.h (struct state): Add member bool reachable.
6336 (state_remove_unreachable_states): Prototype.
6337 * tests/conflicts.at (Unreachable States After Conflict Resolution):
6338 New test case.
6339 * tests/existing.at (GNU pic Grammar): Update test case output now that
6340 an unused rule is discovered.
6341
6342 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
6343
6344 Minor code cleanup in parser table construction.
6345 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
6346 (new_itemsets, save_reductions): Update for rename to nitemset.
6347 * src/closure.c (nritemset): Rename to...
6348 (nitemset): ... this since the "r" appears to meaningless and isn't
6349 used in the comments.
6350 (closure): Update for rename.
6351 * src/closure.h (nritemset): Update extern to...
6352 (nitemset): ... this.
6353 * src/lalr.c (LA): Fix a typo in comments.
6354 * src/print.c (print_core): Update for rename to nitemset.
6355 * src/print_graph.c (print_graph): Likewise.
6356 * src/state.h: Fix some typos in header comments.
6357
6358 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
6359
6360 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
6361 still sticks to ASCII. Sorry!
6362
6363 * README-hacking: New file, taken mostly from coreutils, with changes
6364 for Bison. Contains much of the contents of:
6365 * README-cvs: Remove.
6366 * bootstrap: Sync from gnulib.
6367 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
6368 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
6369
6370 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
6371
6372 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
6373 Setzer.
6374 (Java Differences): Fix some typos.
6375 * THANKS: Add Sebastian Setzer.
6376
6377 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
6378
6379 * data/java.m4 (b4_single_class_if): Remove.
6380 (b4_abstract_if): Look at "%define abstract".
6381 (b4_lexer_if): New.
6382 (b4_union_name): Rename...
6383 (b4_yystype): ... to this. Map to "%define stype".
6384 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
6385 b4_maybe_throws): Fix quoting.
6386 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
6387 * data/lalr1.java (Lexer interface): Always define.
6388 (Lexer interface within parser class): Remove.
6389 (YYLexer class): New, used when "%code lexer" is present.
6390 (constructor): When "%code lexer" is used, pass %lex-param
6391 to the lexer constructor.
6392 (yylex, yyparse): Remove %lex-param from method invocations
6393 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
6394
6395 * doc/bison.texinfo (Java Bison Interface): Mention "%define
6396 abstract". Rename "%define union_name" to "%define stype".
6397 Rename method names according to previous patch.
6398 (Java Scanner Interface): Describe "%code lexer" instead of
6399 "%pure-parser" and "%define single_class".
6400 (Java Differences): Mention "%code lexer".
6401
6402 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
6403 Include scanner here, using macros from tests/local.at.
6404 (AT_DATA_CALC_Y): Remove final argument.
6405 (_AT_CHECK_JAVA_CALC): Likewise.
6406 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
6407 of %locations and %error-verbose.
6408 (main): Test with and without %lex-param.
6409 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
6410 (AT_BISON_OPTION_POPDEFS): Pop it.
6411
6412 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6413
6414 DJGPP spefic issue. Inhibit the use of disallowed characters for
6415 file name genertion on Win98, WinXP, etc. These are |<>":?*\
6416 and concern testsuite case 46.
6417 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
6418 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
6419 * djgpp/config.bat: Inhibit the use of disallowed characters.
6420
6421 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
6422
6423 Miscellaneous %define and %code cleanup.
6424 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
6425 values are interpreted.
6426 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
6427 documentation a little more.
6428 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
6429 muscle_percent_define_insert, muscle_percent_code_grow): New
6430 functions/macros.
6431 * src/muscle_tab.h (muscle_percent_define_insert,
6432 muscle_percent_code_grow): Prototype.
6433 * src/parse-gram.y (prologue_declaration): Use
6434 muscle_percent_define_insert and muscle_percent_code_grow when parsing
6435 %define and %code directives.
6436
6437 Make it easy to share %define boolean variables between the front-end
6438 and back-end. Though not used yet, this will be useful in the future.
6439 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
6440 Bison uses of names rather than just skeleton uses of names.
6441 (b4_percent_define_get, b4_percent_define_ifdef): Rename
6442 b4_percent_define_skeleton_variables(VARIABLE) to
6443 b4_percent_define_bison_variables(VARIABLE).
6444 (b4_percent_code_get, b4_percent_code_ifdef): Rename
6445 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
6446 b4_percent_code_bison_qualifiers(QUALIFIER).
6447 (b4_check_user_names_wrap): Update for renames.
6448 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
6449 muscle_percent_define_default): New functions mimicking
6450 b4_percent_define_flag_if and b4_percent_define_default.
6451
6452 For %define variables, report locations for invalid values and
6453 redefinitions.
6454 * data/bison.m4 (b4_percent_define_flag_if): Read
6455 b4_percent_define_loc(VARIABLE) to report the location of an invalid
6456 value for VARIABLE.
6457 (b4_percent_define_default): Save a special location in
6458 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
6459 must later be reported as invalid.
6460 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
6461 functions.
6462 (muscle_percent_define_insert): Record the location of VARIABLE in
6463 muscle percent_define_loc(VARIABLE), and use it to report the previous
6464 location for a redefinition.
6465 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
6466 (muscle_percent_define_default): Update like b4_percent_define_default.
6467 (muscle_grow_user_name_list): Rename to...
6468 (muscle_user_name_list_grow): ... this for consistency and use
6469 muscle_location_grow.
6470 * src/muscle_tab.h (muscle_location_grow): Prototype.
6471 * tests/input.at (%define errors): Update expected output.
6472 * tests/skeletons.at (%define boolean variables: invalid skeleton
6473 defaults): New test case.
6474
6475 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
6476
6477 * src/print.c (lookahead_set, state_default_rule): Remove.
6478 (print_reductions): Replace state_default_rule invocation with
6479 equivalent use of yydefact, which was computed in token_actions in
6480 tables.c.
6481 (print_results): Don't allocate lookahead_set.
6482
6483 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
6484
6485 * data/lalr1.java: Prefix all private members with yy.
6486
6487 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
6488
6489 Use YYFPRINTF instead of fprintf where appropriate. Reported by
6490 Sebastien Fricker at
6491 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
6492 * THANKS: Add Sebastien Fricker.
6493 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
6494 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
6495 accept a variable number of arguments.
6496
6497 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
6498
6499 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
6500
6501 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6502
6503 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
6504 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
6505 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
6506
6507 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
6508
6509 Undo my 2007-02-07 change, switching back to the c-strcase module
6510 introduced in the 2007-02-03 change. Bruno Haible reported that
6511 the 2007-02-07 change would be dangerous in Turkish if we add a
6512 language whose name contains "i", since "i" is not lowercase "I"
6513 in Turkish.
6514 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
6515 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
6516 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
6517 * m4/.cvsignore: Remove strcase.m4.
6518 * src/getargs.c: Revert 2007-02-07 change, as follows.
6519 Include c-strcase.h.
6520 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
6521
6522 2007-02-11 Bruno Haible <bruno@clisp.org>
6523
6524 Enable the Java related testsuite tests when the only Java compiler
6525 found is a gcj < 4.3. Discussed at
6526 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
6527 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
6528
6529 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
6530
6531 * data/Makefile.am: Update copyright date.
6532 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
6533 yypstate_new returns NULL.
6534 (yypstate_new): Return NULL if malloc does.
6535 * src/reader.c (packgram): Move translation of rule actions from the
6536 beginning of packgram to...
6537 (check_and_convert_grammar): ... here right before packgram is invoked
6538 so it's easier to write more complete comments, and remove redundant
6539 code.
6540
6541 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
6542
6543 As in semantic actions, make @$ in %initial-action, %destructor, and
6544 %printer imply %locations.
6545 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
6546 scanning @$.
6547 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
6548 (@$ in %initial-action implies %locations,
6549 @$ in %destructor implies %locations,
6550 @$ in %printer implies %locations): ... these new test cases.
6551
6552 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
6553
6554 Undo most of the 2007-02-03 change, switching to the strcase module
6555 now that gnulib strcase has been fixed.
6556 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
6557 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
6558 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
6559 * m4/.cvsignore: Add strcase.m4.
6560 * src/getargs.c: Revert 2007-02-03 change, as follows.
6561 Don't include c-strcase.h.
6562 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
6563 strcasecmp has "unspecified behavior" outside the POSIX locale,
6564 but it works fine in practice if at least one argument is ASCII,
6565 as is the case in Bison.
6566
6567 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
6568
6569 * tests/java.at: Skip tests if only one of javac/java is present.
6570 Reported by Joel E. Denny.
6571 * tests/atlocal.in: Adjust copyright years.
6572
6573 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
6574
6575 * data/lalr1.java (Stack): Work around old verifiers that disallow
6576 access to the private fields of an inner class, from the outer class.
6577 We can make Stack's fields public because user code doesn't have access
6578 to the instance of Stack used by parse(). Reported by Paul Eggert.
6579
6580 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
6581
6582 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
6583 the right spot for these files?
6584 * bootstrap.conf (gnulib_modules): Add c-strcase.
6585 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
6586 c-strncasecmp.c.
6587 * src/getargs.c: Include c-strcase.h.
6588 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
6589 to avoid unspecified behavior.
6590
6591 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
6592
6593 * doc/bison.texinfo (Decl Summary): Correct typo.
6594
6595 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
6596
6597 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
6598 Complain if the value does not match empty, "true" or "false".
6599 * data/c++.m4: Adjust default definitions of %define variables.
6600 * data/java.m4: Adjust default definitions of %define variables.
6601 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
6602 to above behavior.
6603 * tests/input.at (Boolean %define variables): Test new behavior.
6604
6605 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
6606
6607 * NEWS: Mention java.
6608 * TODO: Remove things that are done.
6609 * bootstrap.conf: Add javacomp-script and javaexec-script.
6610 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
6611
6612 * data/Makefile.am: Add new files.
6613 * data/java-skel.m4: New.
6614 * data/java.m4: New.
6615 * data/lalr1.java: New.
6616
6617 * doc/bison.texinfo: Put "A Complete C++ Example" under
6618 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
6619 under Other Languages.
6620
6621 * src/getargs.c (valid_languages): Add Java.
6622 * src/getargs.h (struct bison_language): Update size of string fields.
6623
6624 * tests/Makefile.am: Add java.at.
6625 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
6626 * tests/java.at: New.
6627 * tests/testsuite.at: Include it.
6628
6629 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
6630
6631 Clean up.
6632 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
6633 at_directive_argv arguments so these no longer have to be global
6634 variables. Also, update the implementation for the following changes.
6635 (fail_for_at_directive_too_many_args,
6636 fail_for_at_directive_too_few_args): Add at_directive_name argument.
6637 (at_directive_name): Remove as at_directive_argv[0] will be used for
6638 this now.
6639 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
6640 for the directive name.
6641 (at_directive_argc, at_directive_argv): Make these local within
6642 skel_lex instead of global.
6643 (INITIAL): Update directive start action for above changes.
6644 (SC_AT_DIRECTIVE_ARG): Rename to...
6645 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
6646 (SC_AT_DIRECTIVE_SKIP_WS): Update.
6647 (scan_skel): Move yylex_destroy to...
6648 (skel_scanner_free): ... here.
6649 * tests/skeletons.at (installed skeleton file name): Rename to...
6650 (installed skeleton file names): ... this.
6651
6652 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
6653
6654 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
6655 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
6656 Summary" not "Directives".
6657 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
6658 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
6659 since the former is now the more complete one.
6660 (Prologue Alternatives): Likewise and do the same for %defines.
6661 (Table of Symbols): Add summary of %code, add summary of %define, and
6662 move full %code documentation to...
6663 (Decl Summary): ... here for consistency with other entries in these
6664 sections.
6665 Move %define entry in order to keep this list alphabetized.
6666 Reword %define entry a little to put less emphasis on the skeleton
6667 concept, which most users shouldn't have to think about.
6668
6669 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
6670
6671 Adjust to recent gnulib changes.
6672 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
6673 Add string.h, string_.h, unistd_.h, wchar_.h.
6674 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
6675 * src/system.h: Don't include <stpcpy.h>; this is now done by
6676 <string.h>.
6677
6678 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
6679
6680 Simplify implementation of unqualified %code, implement macros for
6681 uniform treatment of boolean %define flags. Document %define.
6682 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
6683 b4_percent_code_ifdef): New.
6684 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
6685 * data/c++.m4: Define default value for global_tokens_and_yystype.
6686 * data/glr.cc: Likewise.
6687 * data/location.cc: Use b4_percent_define_flag_if.
6688
6689 * doc/bison.texinfo (Decl Summary): Document %define.
6690
6691 * src/parse-gram.y (Unqualified %code): Change muscle name to
6692 b4_percent_code().
6693 (content.opt): Default to empty.
6694
6695 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
6696
6697 Implement support for relative and absolute skeleton file names.
6698 Discussed starting at
6699 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
6700 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
6701 (Bison Options): Document in --skeleton entry.
6702 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
6703 full_skeleton can't necessarily hold all of pkgdatadir.
6704 If the specified skeleton file name contains a `/', don't prepend
6705 pkgdatadir.
6706 * src/parse-gram.y (prologue_declaration): If the specified skeleton
6707 file name contains a `/', prepend the grammar file directory.
6708 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
6709 * skeletons.at: New file.
6710 (relative skeleton file names): New test case.
6711 (installed skeleton file names): New test case.
6712 * tests/testsuite.at: Include skeletons.at.
6713
6714 * bootstrap: Update copyright to 2007.
6715
6716 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
6717
6718 * bootstrap: Remove occurrences of .#bootmp from the files.
6719
6720 2007-01-17 Akim Demaille <akim@epita.fr>
6721
6722 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
6723 nonterminals.
6724 Use per-type %printer.
6725
6726 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
6727
6728 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
6729 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
6730 djgpp/config.site, src/files.c, src/files.h, src/main.c,
6731 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
6732 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
6733 tests/glr-regression.at, tests/input.at, tests/local.at,
6734 tests/output.at, tests/torture.at: Update copyright to 2007.
6735
6736 2007-01-16 Akim Demaille <akim@epita.fr>
6737
6738 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
6739 error code.
6740 (Calc++ Scanner): Exit with failure if we can't open the input
6741 file.
6742 Accept "-" standing for stdin.
6743 (Calc++ Top Level): Print the result only if the parsing was
6744 successful.
6745
6746 2007-01-16 Akim Demaille <akim@epita.fr>
6747
6748 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
6749
6750 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
6751 and Joel E. Denny <jdenny@ces.clemson.edu>
6752
6753 Clean up %define and %code implementation in M4 some. Most
6754 importantly, rename all related macros to be in the b4_percent_define
6755 and b4_percent_code namespaces. Also, complete support for `.' in
6756 %define variable names and %code qualifiers.
6757 * data/bison.m4 (b4_check_user_names): Check for special
6758 "SKELETON-NAMESPACE(name)" macros instead of using two nested
6759 m4_foreach loops.
6760 (b4_get_percent_define, b4_get_percent_code): Rename to...
6761 (b4_percent_define_get, b4_percent_code_get): ... these.
6762 Extend documentation with examples.
6763 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
6764 b4_percent_define_skeleton_variables and
6765 b4_percent_code_skeleton_qualifiers.
6766 Expect any value for the %define variable `foo' to be stored in the
6767 macro named `b4_percent_define(foo)'; expect any %code blocks for the
6768 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
6769 expect any unqualified %code blocks to be stored in a macro named
6770 `b4_percent_code_unqualified'.
6771 Use m4_indir so that %define variable names and %code qualifiers can
6772 contain `.', which is allowed by the grammar parser.
6773 (b4_percent_define_default): New macro to set a default value for a
6774 %define variable.
6775 (m4_wrap): Update wrapped code, and fix some underquoting.
6776 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
6777 Expect grammar uses of %define variables and %code qualifiers to be
6778 defined in b4_percent_define_user_variables and
6779 b4_percent_code_user_qualifiers.
6780 * data/c++.m4: Use b4_percent_define_default rather than
6781 m4_define_default. Fix some underquoting. Skeleton usage of %define
6782 variable define_location_comparison now implies skeleton usage of
6783 %define variable filename_type.
6784 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
6785 data/push.c, data/yacc.c: Update macro names.
6786 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
6787 muscle names.
6788
6789 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6790
6791 DJGPP specific issues.
6792
6793 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
6794 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
6795
6796 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
6797
6798 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
6799 run parsers in all tests so that Valgrind is invoked during
6800 maintainer-check-valgrind.
6801 (Duplicate representation of merged trees): Free all semantic values.
6802 (Duplicated user destructor for lookahead): Likewise.
6803
6804 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
6805
6806 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
6807 command-line prefix.
6808 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
6809 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
6810 miss Valgrind messages.
6811 (Exploding the Stack Size with Malloc): Likewise.
6812
6813 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
6814
6815 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
6816 locals. Reported by Juan Manuel Guerrero at
6817 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
6818 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
6819 Fix some indentation also.
6820 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
6821 explaining this issue.
6822
6823 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
6824 and Joel E. Denny <jdenny@ces.clemson.edu>
6825
6826 Simplify union and prologue handling, and escape union and lex/parse
6827 params with digraphs.
6828 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
6829 values to the empty string since these are no longer guaranteed
6830 initialized by the front-end.
6831 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
6832 braces around b4_user_stype since this is no longer done by the
6833 front-end.
6834 * src/files.c, src/files.h (pre_prologue_obstack,
6835 post_prologue_obstack): Remove.
6836 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
6837 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
6838 with digraphs. This fixes lex params and parse params.
6839 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
6840 * src/output.c (prepare): Remove muscle insertion of the prologues.
6841 (output): Remove freeing of pre_prologue_obstack and
6842 post_prologue_obstack.
6843 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
6844 than prologue_augment for prologue parsing so you don't need prologue
6845 obstacks.
6846 (grammar_declaration): For %union RHS, use `braceless' instead of
6847 "{...}" so that braces are already stripped and code is escaped with
6848 digraphs.
6849 * src/reader.c (prologue_augment): Remove.
6850 (reader): Remove initialization of pre_prologue_obstack and
6851 post_prologue_obstack.
6852 * src/reader.h (prologue_augment): Remove.
6853
6854 * data/c.m4: Remove stray parenthesis.
6855
6856 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
6857
6858 Remove quotes from variables names in %define directives and from
6859 qualifiers in %code directives, and restrict the characters that are
6860 allowed in them to M4-friendly ones. For %define, continue to support
6861 the quoted form as a deprecated feature. Discussed starting at
6862 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
6863 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
6864 %code.
6865 * doc/bison.texinfo (Prologue Alternatives): Update.
6866 (Decl Summary): In %defines entry, update mention of `%code requires'
6867 and `%code provides'.
6868 (C++ Location Values): Update %define uses.
6869 (Calc++ Parser Interface): Likewise.
6870 (Calc++ Parser): Likewise, and update `%code requires' uses.
6871 (Table of Symbols): Update %code documentation.
6872 * src/parse-gram.y (prologue_declaration): For %define variables, use
6873 `variable' instead of `STRING'.
6874 (grammar_declaration): For %code qualifiers, use `ID' instead of
6875 `STRING'.
6876 (variable): New nonterminal that takes an `ID' or a `STRING'.
6877 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
6878 and %define uses.
6879 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
6880 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
6881 (%define errors): Update %define uses.
6882
6883 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
6884
6885 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
6886 instead of muscle_insert for %define values so that M4-special
6887 characters are replaced with digraphs.
6888 * tests/input.at (%define errors): Extend to check weird values.
6889
6890 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
6891
6892 Instead of having skeletons declare all valid %define variables and
6893 %code qualifiers, provide macros that retrieve the associated values
6894 and build these lists automatically. Thus Bison will now warn when a
6895 variable or qualifier is not used by the skeleton in the current
6896 invocation regardless of whether it might sometimes be used by that
6897 skeleton in other invocations. Also, move all %define value macros to
6898 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
6899 form, which is replaced by %code.
6900 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
6901 (b4_check_user_names): ... this, and change the series of valid name
6902 arguments to a single list argument for names used in the skeleton
6903 similar to the existing list argument for names used in the grammar.
6904 Warn instead of complaining.
6905 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
6906 values and %code code, to format %code code properly, and to build
6907 lists of all %define variables and %code qualifiers used in the
6908 skeleton: b4_skeleton_percent_define_variables and
6909 b4_skeleton_percent_code_qualifiers.
6910 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
6911 Remove, and...
6912 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
6913 the skeleton names lists can finish building first. In place of
6914 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
6915 expect the lists b4_user_percent_define_variables and
6916 b4_user_percent_code_qualifiers.
6917 * data/c++.m4: Where setting default values for b4_parser_class_name,
6918 b4_location_type, b4_filename_type, b4_namespace, and
6919 b4_define_location_comparison, update their names to the
6920 b4_percent_define_ namespace.
6921 * data/glr.c: Don't use b4_check_percent_define_variables and
6922 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
6923 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
6924 (b4_parser_class_name, b4_namespace): Define these using
6925 b4_get_percent_define for parser_class_name and namespace.
6926 * data/location.cc: Use b4_get_percent_define.
6927 * data/push.c: Don't use b4_check_percent_define_variables and
6928 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
6929 * data/yacc.c: Likewise, and don't call m4_exit in
6930 b4_use_push_for_pull_if or m4_wrap code will never execute.
6931 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
6932 Rename to...
6933 (muscle_grow_user_name_list): ... this for consistency with the
6934 terminology used in bison.m4.
6935 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
6936 %define variable names, and rename muscle used_percent_define_variables
6937 to user_percent_define_variables.
6938 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
6939 user_percent_code_qualifiers.
6940 (content): Remove.
6941 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
6942 {CODE} form is no longer accepted.
6943 * tests/input.at (Reject bad %code qualifiers): Rename to...
6944 (Reject unused %code qualifiers): ... this, and update test output.
6945 (%define error): Update test output.
6946
6947 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
6948
6949 Check for unrecognized %define variables similar to checking for
6950 unrecognized %code qualifiers. Check for redefined %define variables.
6951 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
6952 generalizes...
6953 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
6954 (b4_check_percent_define_variables): New, also wraps it.
6955 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
6956 variables using b4_check_percent_define_variables.
6957 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
6958 all those exercised in the test suite and all those listed in the
6959 `Default values' section of c++.m4. Are there others?
6960 * data/push.c, data/yacc.c: Declare no valid %define variables.
6961 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
6962 similar to muscle_find, but it works even when the muscle stores a
6963 const value.
6964 (muscle_grow_used_name_list): New function for constructing the used
6965 name list muscles that b4_check_for_unrecognized_names requires.
6966 * src/parse-gram.y (prologue_declaration): Warn if a variable is
6967 %define'd more than once. Define the b4_used_percent_define_variables
6968 muscle with muscle_grow_used_name_list.
6969 (grammar_declaration): Abbreviate %code code with
6970 muscle_grow_used_name_list.
6971 * tests/input.at (%define errors): New.
6972
6973 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
6974
6975 Provide warn_at, complain_at, and fatal_at function callbacks to the
6976 skeletons, and use this for %code qualifier complaints.
6977 * data/bison.m4 (b4_error_at): New, invoked by...
6978 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
6979 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
6980 @fatal_at(...@) directives.
6981 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
6982 qualifiers in b4_used_percent_code_qualifiers and to use
6983 b4_complain_at.
6984 * src/location.c, src/location.h (boundary_set_from_string): New global
6985 function.
6986 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
6987 function.
6988 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
6989 to b4_used_percent_code_qualifiers.
6990 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
6991 function.
6992 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
6993 (lineno): Rename to...
6994 (out_lineno): ... this so I don't misunderstand it again.
6995 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
6996 here; these newlines are in the input but not the output file.
6997 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
6998 (at_directive_perform): ... this new static function, and add handling
6999 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
7000 directives.
7001 * tests/input.at (Reject bad %code qualifiers): Update test output with
7002 locations and extend.
7003
7004 * tests/output.at (Output file name: [, Output file name: ]): Remove
7005 bogus comment about these tests failing.
7006
7007 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7008
7009 Clean up b4_check_percent_code_qualifiers a little.
7010 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
7011 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
7012 documentation and add examples.
7013 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
7014 qualifiers here.
7015
7016 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
7017
7018 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
7019 unreliable -- especially when they're hidden inside another macro.
7020 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
7021 data/c.m4: Remove m4_divert(-1).
7022 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
7023 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
7024 m4_divert_push(0) and m4_divert_pop(0).
7025 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
7026 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
7027 pushed and popped by m4sugar, should be first on the stack.
7028
7029 Provide warn, complain, and fatal function callbacks to the skeletons.
7030 This provides more flexibility than m4_fatal, improves the error
7031 message format, and captures messages for translation. Discussed
7032 starting at
7033 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
7034 * data/bison.m4 (b4_error): New, invoked by...
7035 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
7036 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
7037 directives. Because these M4 macros might be called when the current
7038 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
7039 the previous removal of uses of m4_divert, which caused trouble.
7040 (b4_check_percent_code_qualifiers): Use b4_complain instead of
7041 m4_fatal to report unrecognized %code qualifiers.
7042 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
7043 push parser requests.
7044 * data/glr.c: Use b4_complain instead of m4_fatal to report
7045 non-deterministic push parser requests.
7046 Update @output usage to @output(...@) form.
7047 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
7048 report missing %defines. Update @output usage to @output(...@) form.
7049 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
7050 @output(...@) form.
7051 * src/main.c (main): Invoke skel_scanner_free.
7052 * src/scan-skel.h (skel_scanner_free): Prototype new function.
7053 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
7054 obstack_for_string from flex-scanner.h.
7055 (YY_DECL): Use to declare skel_lex static.
7056 (decode_at_digraphs): Remove; now handled in the new
7057 SC_AT_DIRECTIVE_ARG start condition.
7058 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
7059 functions.
7060 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
7061 at_directive_argv): New static globals.
7062 (INITIAL): Use fail_for_invalid_at.
7063 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
7064 recognize the start of a generalized `@directive(...@)' form and
7065 start...
7066 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
7067 directive args (using the new obstack_for_string), to decode the
7068 contained @ diagraphs, and to perform the directive. It recognizes
7069 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
7070 @output(...@).
7071 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
7072 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
7073 `@,'.
7074 (scan_skel): Initialize obstack_for_string on the first call.
7075 (skel_scanner_free): New function to free obstack_for_string.
7076 * tests/input.at (Reject bad %code qualifiers): Update test output.
7077
7078 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
7079
7080 Consolidate the 4 prologue alternative directives (%code, %requires,
7081 %provides, and %code-top) into a single %code directive with an
7082 optional qualifier field. Discussed at
7083 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
7084 * NEWS (2.3a+): Rewrite the existing entry for the prologue
7085 alternatives.
7086 * doc/bison.texinfo (Prologue Alternatives): Update.
7087 (Decl Summary): Update to %code "requires" and %code "provides".
7088 (Calc++ Parser): Update to %code "requires".
7089 (Table of Symbols): Remove entries for %requires, %provides, and
7090 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
7091 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
7092 are replaced by b4_percent_code_provides and b4_percent_code_requires,
7093 which are skeleton-specific.
7094 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
7095 declare what %code qualifiers it supports and to complain if any other
7096 qualifiers were used in the grammar.
7097 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
7098 and b4_user_code([b4_percent_code_provides]) in place of
7099 b4_user_requires and b4_user_provides.
7100 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
7101 Add b4_user_code([b4_percent_code_top]) and
7102 b4_user_code([b4_percent_code]).
7103 Invoke b4_check_percent_code_qualifiers.
7104 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
7105 PERCENT_REQUIRES): Remove.
7106 (grammar_declaration): Remove RHS's for %code-top, %provides, and
7107 %requires. Rewrite the %code RHS as the unqualified form defining the
7108 muscle b4_percent_code. Add another RHS for the qualified %code form,
7109 which defines muscles of the form b4_percent_code_QUALIFIER and the
7110 b4_used_percent_code_qualifiers muscle.
7111 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
7112 PERCENT_REQUIRES): Remove.
7113 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
7114 %code "requires" and %code "provides".
7115 * tests/input.at (Reject bad %code qualifiers): New.
7116
7117 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
7118
7119 Use the new code_props interface for destructors and printers.
7120 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
7121 printer_location members, and change the type of the destructor and
7122 printer members to code_props.
7123 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
7124 symbol_printer_get, semantic_type_destructor_set,
7125 semantic_type_printer_set, default_tagged_destructor_set,
7126 default_tagless_destructor_set, default_tagged_printer_set,
7127 default_tagless_printer_set): Use code_props in arguments and return
7128 types in place of char const * and location.
7129 (symbol_destructor_location_get, symbol_printer_location_get): Remove
7130 since the locations are now contained in the return of
7131 symbol_destructor_get and symbol_printer_get.
7132 * src/output.c (symbol_destructors_output, symbol_printers_output):
7133 Replace with...
7134 (symbol_code_props_output): ... this to eliminate duplicate code.
7135 (output_skeleton): Update to use symbol_code_props_output.
7136 * src/reader.c (symbol_should_be_used): Update use of
7137 symbol_destructor_get.
7138 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
7139 Update uses of the various _destructor_set and _printer_set functions.
7140 * src/symtab.c: (default_tagged_destructor_location,
7141 default_tagless_destructor_location, default_tagged_printer_location,
7142 default_tagless_printer_location): Remove since we...
7143 (default_tagged_destructor, default_tagless_destructor,
7144 default_tagged_printer, default_tagless_printer): ... change the type
7145 of these to code_props.
7146 (symbol_new, semantic_type_new, symbol_destructor_set,
7147 semantic_type_destructor_set, symbol_destructor_get,
7148 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
7149 symbol_check_alias_consistency, default_tagged_destructor_set,
7150 default_tagless_destructor_set, default_tagged_printer_set,
7151 default_tagless_printer_set): Update.
7152 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
7153 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
7154 code_props members.
7155 (symbol_print): Use SYMBOL_CODE_PRINT.
7156
7157 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
7158
7159 Use the new code_props interface for rule actions.
7160 * src/symlist.h (symbol_list): Replace action, action_location, and
7161 used members with a code_props action_props member.
7162 * src/reader.c (symbol_should_be_used, grammar_rule_check,
7163 grammar_midrule_action, grammar_current_rule_merge_set,
7164 grammar_current_rule_symbol_append, packgram): Update.
7165 * src/scan-code.h (translate_rule_action): Remove, no longer used.
7166 * src/scan-code.l (handle_action_dollar): Update.
7167 (translate_rule_action): Remove, no longer used.
7168 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
7169
7170 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
7171
7172 Use the new code_props interface in parse-gram.y.
7173 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
7174 Update all uses of translate_* functions to use the new code_props
7175 interface and to use gram_scanner_last_string_free and
7176 code_scanner_last_string_free where possible.
7177 (grammar_declaration): symbol_list_destructor_set and
7178 symbol_list_printer_set now perform the translation, so don't do it
7179 here. Use gram_scanner_last_string_free where possible.
7180 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
7181 translate_code): Remove, no longer used.
7182 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
7183 symbol_list_printer_set): Perform code translation here rather than
7184 depending on the caller to do so.
7185
7186 * src/symlist.h (struct symbol_list): Correct some documentation typos.
7187 * src/scan-gram.h (gram_last_string): Remove declaration.
7188 * src/scan-gram.l (last_string): Declare it static.
7189
7190 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
7191
7192 Encapsulate code properties and related functionality for the various
7193 destructors, printers, and actions into a code_props structure and
7194 interface. This patch merely implements code_props in scan-code.h and
7195 scan-code.l. Future patches will rewrite other modules to use it.
7196 Discussed starting at
7197 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
7198 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
7199 consistently initialize const structs that have an empty location
7200 field.
7201 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
7202 to ensure consistency.
7203 * src/scan-code.h (code_props): New structure.
7204 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
7205 function, macro, and const global variable for initializing a
7206 code_props with no code.
7207 (code_props_plain_init, code_props_symbol_action_init,
7208 code_props_rule_action_init, code_props_translate_code): The rest of
7209 the new code_props functional interface. Among other things, the init
7210 functions set the code_props kind field so that
7211 code_props_translate_code will know whether to behave like
7212 translate_symbol_action, translate_rule_action, or translate_code.
7213 These old translate functions must remain until all other modules are
7214 updated to use the new code_props interface.
7215 (code_scanner_last_string_free): New function similar to
7216 gram_scanner_last_string_free.
7217 (code_scanner_free): Add documentation.
7218 * src/scan-code.l: Implement the new interface.
7219 (code_lex): Make it static, add a code_props* argument, and remove the
7220 rule argument.
7221 (last_string): New static global similar to the one in scan-gram.l.
7222 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
7223 instead of rule.
7224 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
7225 code_props since Bison may one day use this information for destructors
7226 and printers.
7227 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
7228 (handle_action_dollar): Use symbol_list_n_get and set used flag
7229 directly since symbol_list_n_used_set is removed.
7230 (translate_action): Add a code_props* argument and remove the rule,
7231 action, and location arguments. Pass the code_props* on to code_lex.
7232 (translate_rule_action, translate_symbol_action, translate_code):
7233 Rewrite as wrappers around the new code_props interface.
7234 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
7235 it would eventually need to break the encapsulation of code_props.
7236
7237 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
7238
7239 * etc/.cvsignore: New.
7240
7241 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
7242
7243 Add maintainer-push-check to run maintainer-check using push parsing in
7244 place of pull parsing where available.
7245 * Makefile.am (maintainer-push-check): New.
7246 * data/bison.m4 (b4_use_push_for_pull_if): New.
7247 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
7248 appropriately based on their existing values.
7249 (yypush_parse): Don't print push-parser-specific diagnostics if push
7250 parsing is being used in place of pull parsing.
7251 * data/yacc.c: If push parsing should replace pull parsing, redirect to
7252 push.c.
7253 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
7254 variable, and insert b4_use_push_for_pull_flag into muscles.
7255 * tests/Makefile.am (maintainer-push-check): New.
7256
7257 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
7258
7259 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
7260 (whether successful or failed) so that yypush_parse can be invoked
7261 again to start a new parse using the same yypstate.
7262 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
7263 check multiple yypull_parse invocations on the same yypstate. For pull
7264 mode, extend to check multiple yyparse invocations.
7265 (Exploding the Stack Size with Alloca): Extend to try with
7266 %push-pull-parser.
7267 (Exploding the Stack Size with Malloc): Likewise.
7268
7269 * tests/calc.at (Simple LALR Calculator): Don't specify
7270 %skeleton "push.c" since %push-pull-parser implies that now.
7271 * tests/headers.at (export YYLTYPE): Don't check for the push
7272 declarations. Otherwise, this test case can't be used to see if push
7273 mode can truly emulate pull mode.
7274 * tests/input.at (Torturing the Scanner): Likewise.
7275 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
7276 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
7277 AT_YACC_IF, which now includes the case of push mode since %skeleton
7278 need not be used for push mode. This will be more intuitive once
7279 push.c is renamed to yacc.c.
7280
7281 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
7282
7283 For push mode, convert yyparse from a macro to a function, invoke yylex
7284 instead of passing a yylexp argument to yypull_parse, and don't
7285 generate yypull_parse or yyparse unless %push-pull-parser is declared.
7286 Discussed starting at
7287 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
7288 * data/bison.m4 (b4_pull_if): New.
7289 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
7290 * data/push.c: Improve M4 quoting a little.
7291 (b4_generate_macro_args, b4_parenthesize): Remove.
7292 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
7293 any time a pull parser is requested.
7294 Don't #define this as a wrapper around yypull_parse. Instead, when
7295 both push and pull are requested, make it a function that does that
7296 same thing.
7297 (yypull_parse): If there's a b4_prefix, #define this to
7298 b4_prefix[pull_parse] when both push and pull are requested.
7299 Don't define this as a function unless both push and pull are
7300 requested.
7301 Remove the yylexp argument and hard-code yylex invocation instead.
7302 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
7303 %push-parser.
7304 * src/getargs.c (pull_parser): New global initialized to true.
7305 * getargs.h (pull_parser): extern it.
7306 * src/output.c (prepare): Insert pull_flag muscle.
7307 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
7308 (prologue_declaration): Set both push_parser and pull_parser = true for
7309 %push-pull-parser. Set push_parser = true and pull_parser = false for
7310 %push-parser.
7311 * src/scan-gram.l: Don't accept %push_parser as an alternative to
7312 %push-parser since there's no backward-compatibility concern here.
7313 Scan %push-pull-parser.
7314 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
7315 instead of %push-parser.
7316 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
7317 prototype it in the module that calls yyparse.
7318 * tests/input.at (Torturing the Scanner): Likewise.
7319 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
7320
7321 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
7322
7323 Update etc/bench.pl. Optimize push mode a little (the yyn change
7324 deserves most of the credit).
7325 * Makefile.am (SUBDIRS): Add etc subdirectory.
7326 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
7327 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
7328 yytoken, yyval, and yyloc declarations to...
7329 (yyparse or yypush_parse): ... here to improve performance. For
7330 yypush_parse invocations after the first, be sure to assign yyn its old
7331 value again.
7332 (yypstate_new): Don't bother initializing the yyresult field since the
7333 initial value isn't used.
7334 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
7335 remove the #define that, in push mode, set it to yyps->NAME.
7336 * etc/Makefile.am: New.
7337 * etc/bench.pl: Remove and build it instead from...
7338 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
7339 "tests/bison" from the build directory by default rather than just
7340 invoking "bison" from $PATH.
7341 (calc_grammar): Update push parser code: don't declare yylval globally,
7342 don't define yyparse_wrapper, and don't #define yyparse.
7343 (bench_grammar): Update to check all working combinations of yacc.c,
7344 push.c, impure, pure, pull, and push.
7345
7346 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
7347
7348 For push mode, add pull wrappers around yypush_parse.
7349 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
7350 (yypull_parse): New function wrapping yypush_parse.
7351 (yyparse): New #define wrapping yypull_parse.
7352 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
7353 is declared.
7354 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
7355 prototype yylex in the module that calls yyparse, and don't prototype
7356 yyparse there. Otherwise, the yyparse expansion won't compile.
7357 * tests/input.at (Torturing the Scanner): Likewise.
7358
7359 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
7360
7361 Enable push parsers to operate in impure mode. Thus, %push-parser no
7362 longer implies %pure-parser. The point of this change is to move
7363 towards being able to test the push parser code by running the entire
7364 test suite as if %push-parser had been declared.
7365 * data/push.c (yypush_parse): For impure mode, remove the
7366 yypushed_char, yypushed_val, and yypushed_loc arguments.
7367 Instead, declare these as local variables initialized to the global
7368 yychar, yylval, and yylloc.
7369 For the first yypush_parse invocation only, restore the initial values
7370 of these global variables when it's time to read a token since they
7371 have been overwritten.
7372 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
7373 %push-parser.
7374 * tests/calc.at (Simple LALR(1) Calculator): Always declare
7375 %pure-parser along with %push-parser since this test case was designed
7376 for pure push parsers.
7377 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
7378 (AT_YACC_OR_PUSH_IF): New.
7379 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
7380 add a note that it's still wrong for some cases (as it has been for a
7381 while).
7382 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
7383 %push-parser no longer implies %pure-parser.
7384
7385 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
7386
7387 Remove some unnecessary differences between the pull parser code and
7388 the push parser code. This patch enables yynerrs in push mode.
7389 * data/push.c: Reformat M4 a little.
7390 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
7391 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
7392 because push mode is on. Instead, if pure mode is on, move yynerrs
7393 to...
7394 (b4_declare_parser_state_variables): ... here.
7395 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
7396 to yyps->NAME so it can be used in yypush_parse.
7397 (yypush_parse): Don't omit uses of yynerrs in push mode.
7398
7399 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
7400
7401 Fix bug such that the first pushed token's value and location are
7402 sometimes overwritten (sometimes by %initial-action) before being used.
7403 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
7404 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
7405 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
7406 more closely mimic the pull parser logic.
7407 Don't copy the pushed token to yychar, yylval, and yylloc until it's
7408 time to read a token, which is after any initialization of yylval and
7409 yylloc.
7410 (gottoken): Rename label to...
7411 (yyread_pushed_token): ... for clarity and to avoid infringing on the
7412 user namespace.
7413
7414 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
7415
7416 Rearrange initialization of the parser state variables so that the
7417 skeleton doesn't have to have a copy for pull mode and another for push
7418 mode. This patch also fixes at least a bug such that yylloc was not
7419 initialized (with b4_location_initial_line and
7420 b4_location_initial_column) upon calling yypush_parse. However, that
7421 initialization now overwrites the first token's location;
7422 %initial-action assigning @$ already did the same thing, and both bugs
7423 will be fixed in a later patch.
7424 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
7425 (b4_declare_parser_state_variables): Remove initialization of yytoken,
7426 yyss, yyvs, yyls, and yystacksize.
7427 (yypstate_new): Remove initialization of some yypstate fields: yystate,
7428 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
7429 yylsp.
7430 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
7431 yyps->NAME so it can be used in yypush_parse.
7432 (yyparse or yypush_parse): For yypush_parse, don't print the
7433 "Starting parse" diagnostic for invocations after the first.
7434 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
7435 yypush_parse, only do it for the first invocation.
7436 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
7437 initialization to occur in yypush_parse but only on the first
7438 invocation.
7439
7440 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
7441
7442 * data/push.c: Add CPP guards around push parser declarations in both
7443 the header and the code file.
7444 In the code file, move the push parser declarations to the same place
7445 they appear in the header file.
7446 Clean up the M4 some, especially the inconsistent underquoting in
7447 some b4_c_function_def and b4_c_function_decl uses.
7448
7449 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
7450
7451 Encapsulate the push parser state variables into an M4 macro so the
7452 push skeleton doesn't have to list them again for pull mode's yyparse.
7453 For push mode, remove yypush_parse's local equivalents of these
7454 variables to eliminate unnecessary copying between the two sets at
7455 run-time. This patch also fixes at least a bug related to multiple
7456 %initial-action invocations in push mode.
7457 * data/push.c (b4_declare_parser_variables): Rename to...
7458 (b4_declare_scanner_communication_variables): ... this for clarity and
7459 update both uses.
7460 (b4_declare_yyparse_variables): Remove and move its contents to the one
7461 spot where it was invoked.
7462 (b4_declare_parser_state_variables): New macro containing the parser
7463 state variables required by push mode.
7464 (struct yypstate): Replace all fields but yynew with
7465 b4_declare_parser_state_variables.
7466 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
7467 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
7468 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
7469 (yyparse or yypush_parse): For yyparse in pull mode, replace local
7470 parser state variable declarations with
7471 b4_declare_parser_state_variables.
7472 Don't initialize parser state variables when calling yypush_parse since
7473 yypstate_new already does that.
7474 Invoke the user's initial action only upon the first yypush_parse
7475 invocation.
7476 Remove all code that copies between the local parser state variables
7477 and the yypstate.
7478
7479 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
7480
7481 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
7482 prevent a name collision in a future patch where these names will
7483 sometimes be #define'd.
7484 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
7485 since it no longer has the same name as the existing argument.
7486 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
7487
7488 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
7489 and Joel E. Denny <jdenny@ces.clemson.edu>
7490
7491 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
7492 that the argument is case-insensitive, and there's no `=' here.
7493 For the %skeleton entry, mention that %language is better.
7494 (Bison Options): Likewise for --language and --skeleton. Move the
7495 --skeleton entry so that the `Tuning the parser' section is sorted
7496 alphabetically on long options.
7497 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
7498 %language directive in detail here; cross-reference the %language
7499 documentation instead.
7500 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
7501 `%require "2.3b"' so that the example is always up-to-date.
7502 (Table of Symbols): Add entries for %language and %skeleton.
7503 * examples/extexi (normalize): Instead of replacing every %require
7504 argument with the current Bison version, just substitute for
7505 `@value{VERSION}'. This guarantees that we're testing what actually
7506 appears in the documentation.
7507 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
7508 rather than `@VERSION@'.
7509
7510 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
7511
7512 * NEWS: Reword the %language news a bit, and put it earlier.
7513
7514 * src/getargs.c (skeleton_arg): Last arg is now location const *.
7515 Rewrite to simplify the logic.
7516 (language_argmatch): Likewise.
7517 (program_name): We now own this var.
7518 * src/getargs.h (struct bison_language): Use char[] rather than
7519 const char *.
7520
7521 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
7522 Java is supported.
7523 * src/complain.c (program_name): Remove decl; no longer needed.
7524 * src/main.c (program_name): Remove; now belongs to getargs.
7525
7526 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
7527
7528 * NEWS: Document %language.
7529
7530 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
7531
7532 * data/c-skel.m4, data/c++-skel.m4: New files.
7533 * data/glr.c: Complain on push parsers.
7534
7535 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
7536 over %skeleton.
7537 (Decl Summary): Document %language and %skeleton.
7538 (Command line): Document -L.
7539
7540 * examples/extexi: Rewrite %require directive.
7541 * examples/calc++/Makefile.am: Pass VERSION to extexi.
7542
7543 * src/files.c (compute_exts_from_gc): Look in language structure
7544 for .y extension.
7545 (compute_file_name_parts): Check whether .tab should be added.
7546 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
7547 (language, skeleton_arg, language_argmatch): New.
7548 (long_options): Add --language.
7549 (getargs): Use skeleton_arg, add -L/--language.
7550 * src/getargs.h: Include location.h.
7551 (struct bison_language, language, skeleton_arg, language_argmatch): New.
7552 * src/output.c (prepare): Pick default skeleton from struct language.
7553 Don't dispatch C skeletons here.
7554 * src/parse-gram.y (PERCENT_LANGUAGE): New.
7555 (prologue_declaration): Add "%language" rule, use skeleton_arg.
7556 * src/scan-gram.l ("%language"): New rule.
7557
7558 * tests/calc.at: Test %skeleton and %language.
7559 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
7560 (AT_GLR_IF): Look for %skeleton "glr.cc".
7561 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
7562 (AT_YACC_IF): Reject %language.
7563
7564 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
7565
7566 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
7567 since it wasn't used; only the typedef name 'semantic_type' is needed.
7568 Also, omit trailing white space.
7569
7570 * bootstrap: Sync from coreutils.
7571 (gnulib_extra_files): Add build-aux/announce.gen.
7572 (slurp): Adjust .gitignore files like .cvsignore files.
7573 * build-aux/announce-gen: Remove from CVS, since bootstrap
7574 now creates this.
7575
7576 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
7577
7578 Make %push-parser imply %pure-parser. This fixes several bugs; see
7579 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
7580 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
7581 pure_parser = true.
7582 * data/push.c: Don't bother testing b4_push_if when deciding whether
7583 to expand b4_declare_parser_variables globally.
7584 (yypush_parse): Likewise in here.
7585
7586 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
7587 (yy_reduce_print): Reformat M4 for readability.
7588
7589 2006-12-15 Bob Rossi <bob@brasko.net>
7590 and Joel Denny <jdenny@ces.clemson.edu>
7591
7592 * data/push.c (yypstate): Add typedef, and update all uses of
7593 struct yypstate to just yypstate.
7594 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
7595
7596 2006-12-14 Bob Rossi <bob@brasko.net>
7597
7598 * data/push.c (yypush_parse): Declare prototype regardless of
7599 %locations option.
7600
7601 2006-12-14 Bob Rossi <bob@brasko.net>
7602
7603 * data/push.c (yyparse): Remove the prototype and the #define when in
7604 push-parser mode.
7605
7606 2006-12-13 Bob Rossi <bob@brasko.net>
7607
7608 * data/push.c (yypstate_init): Rename to...
7609 (yypstate_new): ... this and use b4_c_function_def.
7610 (yypstate_delete): New.
7611 (yypush_parse): Change parameters yynval and yynlloc to be const.
7612 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
7613 yypstate_delete functions.
7614
7615 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
7616
7617 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
7618 strange test case titles. Reported by Bob Rossi.
7619
7620 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
7621
7622 * TODO: Add pointer to Sylvain Schmitz's work on static detection
7623 of potential ambiguities in GLR grammers.
7624
7625 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
7626
7627 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
7628 `bison ', use m4_index instead of m4_substr since chopping up a string
7629 containing M4-special characters causes problems here.
7630
7631 Fix a couple of bugs related to special characters in user-specified
7632 file names, and make it easier for skeletons to compute output file
7633 names with the same file name prefix as Bison-computed output file
7634 names.
7635 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
7636 b4_parser_file_name and b4_spec_defines_file instead of
7637 @output_parser_name@ and @output_header_name@, which are now redundant.
7638 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
7639 b4_parser_file_name, b4_spec_defines_file, and the new
7640 @basename(FILENAME@) instead of @output_parser_name@ and
7641 @output_header_name@, which inappropriately escaped the file names as
7642 C string literals.
7643 * src/files.c (all_but_ext): Remove static qualifier.
7644 (compute_output_file_names): Move `free (all_but_ext)' to...
7645 (output_file_names_free): ... here since all_but_ext is needed later.
7646 * src/files.h (all_but_ext): Extern.
7647 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
7648 exactly what MUSCLE_INSERT_STRING used to do.
7649 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
7650 characters are escaped properly.
7651 * src/output.c (prepare): Define muscle file_name_all_but_ext as
7652 all_but_ext.
7653 For pkgdatadir muscle, maintain previous functionality by using
7654 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
7655 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
7656 digraphs would never be expanded. Hopefully no one has M4-special
7657 characters in his Bison installation path.
7658 * src/scan-skel.l: Don't parse @output_header_name@ and
7659 @output_parser_name@ anymore since they're now redundant.
7660 In @output, use decode_at_digraphs.
7661 Parse a new @basename command that invokes last_component.
7662 (decode_at_digraphs): New.
7663 (BASE_QPUTS): Remove unused.
7664 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
7665 (Output file name): New tests.
7666
7667 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
7668
7669 Warn about output files that are generated by the skeletons and that
7670 conflict with other output files.
7671 * data/glr.c: Don't generate the header file here when glr.cc does.
7672 * src/files.c (file_names, file_names_count): New static globals.
7673 (compute_output_file_names): Invoke output_file_name_check for files
7674 not generated by the skeletons and remove existing checks.
7675 (output_file_name_check): New function that warns about conflicting
7676 output file names.
7677 (output_file_names_free): Free file_names.
7678 * src/files.h (output_file_name_check): Declare.
7679 * src/scan-skel.l: Invoke output_file_name_check for files generated by
7680 the skeletons.
7681 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
7682 (Conflicting output files): New tests.
7683
7684 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7685
7686 * doc/bison.texinfo: Fix a couple of typos.
7687
7688 2006-12-08 Bob Rossi <bob@brasko.net>
7689
7690 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
7691 Rename to...
7692 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
7693 update all uses.
7694 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
7695 (yypush_parse): Rename yypvars argument to yyps and remove redundant
7696 local pv.
7697 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
7698 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
7699
7700 2006-12-07 Bob Rossi <bob@brasko.net>
7701 and Joel Denny <jdenny@ces.clemson.edu>
7702
7703 * data/push.c (yypvarsinit): Change return type from void* to struct
7704 yypvars*. No longer cast to void* on return.
7705 (struct yypvars): Remove yylen since it need not be remembered between
7706 yypushparse invocations.
7707 (yypushparse): Don't copy between yylen and pv->yylen.
7708
7709 2006-12-05 Bob Rossi <bob@brasko.net>
7710
7711 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
7712 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
7713 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
7714 (struct yypvars): Remove b4_declare_parser_variables.
7715 (yypvarsinit): Remove init code for removed variables.
7716 (global scope): Do not declare b4_declare_parser_variables if
7717 push or pure mode.
7718 (yypushparse): Add b4_declare_parser_variables.
7719 Init new local variables, and remove init code for removed
7720 yypvars variables.
7721 (yyparse): Delete.
7722 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
7723 and yyparse for other modes.
7724 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
7725 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
7726 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
7727 (AT_PURE_LEX_IF): True if pure or push parser.
7728
7729 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
7730
7731 Document Yacc prologue alternatives and default %destructor's and
7732 %printer's as experimental. Don't mention Java yet. Discussed at
7733 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
7734 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
7735 (2.3a): Annotate this entry to say the old forms of these features were
7736 also experimental.
7737 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
7738 Table of Symbols): Say they're experimental. Comment out any mention
7739 of Java (we'll want this back eventually).
7740
7741 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
7742
7743 Support a file name argument to %defines. Deprecate `=' in
7744 %file-prefix, %name-prefix, and %output. Discussed at
7745 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
7746 * NEWS (2.3a+): Mention.
7747 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
7748 form of %defines, and remove `=' from entries for %file-prefix,
7749 %name-prefix, and %output.
7750 * src/parse-gram.y (prologue_declaration): Implement.
7751 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
7752 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
7753 all but one occurrence of %name-prefix.
7754 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
7755 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
7756 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
7757 occurrence of each of %file-prefix and %output. Add check for %defines
7758 with argument.
7759 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
7760 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
7761 Remove the `=' from %output.
7762
7763 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
7764
7765 Don't escape $ in test case titles since Autoconf 2.61 now does that
7766 correctly.
7767 * tests/actions.at (Default %printer and %destructor are not for error
7768 or $undefined): Here.
7769 (Default %printer and %destructor are not for $accept): Here.
7770 * tests/input.at (Invalid $n and @n): Here.
7771
7772 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
7773
7774 Rename <!> to <>. Discussed starting at
7775 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
7776 * NEWS (2.3a+): Update.
7777 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
7778 Update.
7779 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
7780 * src/scan-gram.l (INITIAL): Implement.
7781 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
7782 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
7783 comment.
7784 * tests/actions.at (Default tagless %printer and %destructor,
7785 Default tagged and per-type %printer and %destructor,
7786 Default %printer and %destructor are not for error or $undefined,
7787 Default %printer and %destructor are not for $accept,
7788 Default %printer and %destructor for mid-rule values): Update.
7789 * tests/input.at (Default %printer and %destructor redeclared,
7790 Unused values with default %destructor): Update.
7791
7792 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
7793
7794 Don't let %prec take a nonterminal.
7795 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
7796 token.
7797 * tests/input.at (%prec takes a token): New test checking that %prec
7798 won't take a nonterminal.
7799
7800 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
7801
7802 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
7803 it was double-quoted.
7804 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
7805 grammar is maintained with Bison's highest standards.
7806 * src/getargs.c: Fix some typos in Doxygen comments.
7807
7808 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
7809
7810 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
7811 later. Reported by Paul Eggert in
7812 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
7813 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
7814 * src/scan-code.l (translate_action): Don't bother invoking
7815 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
7816 (code_scanner_free): Instead of invoking
7817 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
7818 which frees more.
7819 * src/scan-gram.l (gram_scanner_free): Likewise.
7820 * src/scan-skel.l (scan_skel): Likewise.
7821
7822 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
7823
7824 * src/files.c (tr): Change return type to void.
7825 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
7826 has been called previously for the same key.
7827 (muscle_find): Return storage instead of value so that
7828 --enable-gcc-warnings doesn't produce warnings that the return discards
7829 const. aver that the value and storage are the same since storage
7830 could potentially be NULL when value is not.
7831 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
7832 same as 0.
7833
7834 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
7835
7836 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
7837 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
7838 us a slightly cleaner distribution, and also works.
7839 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
7840 gnulib changes.
7841
7842 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
7843 and Paul Eggert <eggert@cs.ucla.edu>
7844
7845 Don't let Bison leak memory except when it complains.
7846 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
7847 (spec_defines_file, dir_prefix): Now char *, not const char *,
7848 since they are freed.
7849 * src/files.c: Likewise.
7850 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
7851 Likewise.
7852 (tr): Now operates in-place. All uses changed.
7853 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
7854 values.
7855 (compute_file_name_parts, compute_output_file_names): Don't store
7856 read-only data in variables that will be freed.
7857 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
7858 src_extension, and header_extension.
7859 (output_file_names_free): New public function to free
7860 spec_verbose_file, spec_graph_file, spec_defines_file,
7861 parser_file_name, and dir_prefix.
7862 * src/getargs.c (getargs): Don't store read-only data in variables that
7863 will be freed.
7864 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
7865 (which previously existed but was unused), and quotearg_free.
7866 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
7867 * src/muscle_tab.c: Likewise.
7868 (muscle_entry): Make the value char const *,
7869 and add a new storage member that is char * and can be freed.
7870 (muscle_entry_free): New private function.
7871 (muscle_init): Use it instead of free.
7872 (muscle_insert, muscle_grow): Update and use new storage member.
7873 (muscle_code_grow): Free the string passed to muscle_grow
7874 since it's not needed anymore.
7875 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
7876 add a new `char *code' member.
7877 ("{...}"): Declare semantic type as code.
7878 * src/scan-code.h (translate_rule_action):
7879 (translate_symbol_action, translate_code, translate_action): Return
7880 `char const *' rather than `char *' since external code should not free
7881 these strings.
7882 * src/scan-code.l: Likewise.
7883 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
7884 which is "{...}" in the parser.
7885 * tests/Makefile.am (maintainer-check-valgrind): Set
7886 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
7887 Valgrind.
7888 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
7889 complain.
7890 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
7891 expecting a non-zero exit status sets --leak-check=summary and
7892 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
7893 this case, and we don't want to hear about it.
7894
7895 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
7896
7897 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
7898 instead of from the template, to simplify configuration a bit.
7899 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
7900 and m4/wint_t.m4, as they are needed with the latest gnulib.
7901
7902 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
7903
7904 Disable unset/unused mid-rule value warnings by default, and recognize
7905 --warnings=midrule-values to enable them. Discussed starting at
7906 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
7907 * NEWS (2.3a+): Mention.
7908 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
7909 warnings): Add entry for midrule-values subargument.
7910 * src/reader.c (symbol_should_be_used): Don't return true just because
7911 the value is a set/used mid-rule value unless
7912 --warnings=midrule-values was specified.
7913 * tests/input.at (Unused values, Unused values before symbol
7914 declarations): Run tests with and without --warnings=midrule-values.
7915
7916 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
7917 than LIST_FREE directly.
7918
7919 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
7920
7921 Finish implementing --warnings=error, which should not be implied by
7922 --warnings=all (or by its synonyms -W and --warnings without
7923 subarguments).
7924 * src/complain.c (set_warning_issued): New function to report that
7925 warnings are being treated as errors and to record an error if so.
7926 Invoke...
7927 (warn_at, warn): ... here.
7928 * src/getargs.c (warnings_args, warnings_types): Reorder so that
7929 "error - warnings are errors" does not appear above "all - all of the
7930 above".
7931 (getargs): For -W and --warnings without subarguments, don't let
7932 FLAGS_ARGMATCH set warnings_error in warnings_flag.
7933 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
7934
7935 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
7936
7937 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
7938 empty subargument list. For example: `bison --warnings= parser.y'.
7939
7940 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
7941
7942 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
7943 the parser header file so that gcc doesn't warn.
7944
7945 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
7946
7947 Split the default %destructor/%printer into two kinds: <*> and <!>.
7948 Discussed starting at
7949 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
7950 * NEWS (2.3a+): Mention.
7951 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
7952 previous change today related to mid-rules.
7953 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
7954 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
7955 (TYPE_TAG_ANY): Add as <*>.
7956 (TYPE_TAG_NONE): Add as <!>.
7957 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
7958 for <*> and <!>.
7959 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
7960 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
7961 * src/symlist.c (symbol_list_default_new): Split into tagged and
7962 tagless versions.
7963 (symbol_list_destructor_set, symbol_list_printer_set): Split
7964 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
7965 SYMLIST_DEFAULT_TAGLESS.
7966 * src/symlist.h: Update symbol_list_default*_new prototypes.
7967 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
7968 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
7969 * src/symtab.c (default_destructor, default_destructor_location,
7970 default_printer, default_printer_location): Split each into tagged and
7971 tagless versions.
7972 (symbol_destructor_get, symbol_destructor_location_get,
7973 symbol_printer_get, symbol_printer_location_get): Implement tagged
7974 default and tagless default cases.
7975 (default_destructor_set, default_printer_set): Split each into tagged
7976 and tagless versions.
7977 * src/symtab.h: Update prototypes.
7978 * tests/actions.at (Default %printer and %destructor): Rename to...
7979 (Default tagless %printer and %destructor): ... this, and extend.
7980 (Per-type %printer and %destructor): Rename to...
7981 (Default tagged and per-type %printer and %destructor): ... this, and
7982 extend.
7983 (Default %printer and %destructor for user-defined end token): Extend.
7984 (Default %printer and %destructor are not for error or $undefined):
7985 Update.
7986 (Default %printer and %destructor are not for $accept): Update.
7987 (Default %printer and %destructor for mid-rule values): Extend.
7988 * tests/input.at (Default %printer and %destructor redeclared): Extend.
7989 (Unused values with default %destructor): Extend.
7990
7991 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
7992
7993 Don't apply the default %destructor/%printer to an unreferenced midrule
7994 value. Mentioned at
7995 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
7996 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
7997 like $@n instead of just @n so that the default %destructor/%printer
7998 logic doesn't see them as user-defined symbols.
7999 (symbol_is_dummy): Check for both forms of the name.
8000 * src/reader.c (packgram): Remove the `$' from each midrule symbol
8001 name for which the midrule value is referenced in any action.
8002 * tests/actions.at (Default %printer and %destructor for mid-rule
8003 values): New test.
8004 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
8005 for change to dummy symbol names.
8006
8007 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
8008
8009 Warn about unset midrule $$ if the corresponding $n is used.
8010 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
8011 $n usage.
8012 (packgram): Before invoking grammar_rule_check on any rule, make sure
8013 all actions have already been scanned in order to set `used' flags.
8014 Otherwise, checking that a midrule's $$ is set will not always work
8015 properly because the midrule check must forward-reference the midrule's
8016 parent rule.
8017 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
8018 warning.
8019
8020 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
8021
8022 More improvements to the documentation of the prologue alternatives:
8023 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
8024 Bison manual.
8025 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
8026 some text to clarify the relative importance of the new directives and
8027 to show how these directives may be viewed as code labels.
8028
8029 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
8030
8031 Similar to the recently removed %before-header, add %code-top as the
8032 alternative to the pre-prologue. Mentioned at
8033 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
8034 Also, let the prologue alternatives appear in the grammar section.
8035 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
8036 (prologue_declaration): Move the existing prologue alternatives to...
8037 (grammar_declaration): ... here and add %code-top.
8038 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
8039
8040 Clean up and extend documentation for the prologue alternatives.
8041 * NEWS (2.3a+): Describe prologue alternatives.
8042 * doc/bison.texinfo (Prologue): Move discussion of prologue
8043 alternatives to...
8044 (Prologue Alternatives): ... this new section, and extend it to discuss
8045 all 4 directives in detail.
8046 (Table of Symbols): Clean up discussion of prologue alternatives and
8047 add %code-top.
8048
8049 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8050
8051 DJGPP specific issues.
8052
8053 * djgpp/config.bat: config.hin has been moved to lib. Adjust
8054 config.bat accordingly.
8055 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
8056 * djgpp/config.site: Likewise.
8057
8058 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
8059
8060 Replace %*-header with %provides, %requires, %code. See discussion at
8061 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
8062
8063 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
8064 (b4_user_start_header): Remove.
8065 * data/glr.c: Use new macros instead of b4_*start_header
8066 and b4_*end_header.
8067 * data/glr.cc: Likewise.
8068 * data/lalr1.cc: Likewise.
8069 * data/push.c: Likewise.
8070 * data/yacc.c: Likewise.
8071
8072 * doc/bison.texinfo: Remove %before-header, rename
8073 %{start,end,after}-header to %requires, %provides, %code.
8074
8075 * src/parse-gram.y: Likewise (also rename token names accordingly).
8076 * src/scan-gram.l: Likewise.
8077 * tests/actions.at: Likewise.
8078
8079 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
8080
8081 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
8082 Problem reported by Joel E. Denny.
8083
8084 2006-10-14 Jim Meyering <jim@meyering.net>
8085
8086 (Sync from coreutils.)
8087 Work also when the working directory (with e.g. coreutils sources)
8088 is version controlled with git, rather than CVS.
8089 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
8090 rather than CVS.
8091 In messages and comments, say e.g., "checked-out sources",
8092 rather than "CVS sources".
8093 (version_controlled_file): New function. Work for git as well as
8094 for CVS. Don't use grep's -q option.
8095 (slurp): Call it here, in place of CVS-specific code.
8096
8097 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
8098
8099 Fix testsuite for ./configure --enable-gcc-warnings:
8100 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
8101 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
8102 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
8103 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
8104 * test/regression.at (Diagnostic that expects two alternatives):
8105 Likewise.
8106
8107 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
8108
8109 * bootstrap.conf (gnulib_modules): Add config-h.
8110 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
8111 worry about HAVE_CONFIG_H.
8112 * lib/abitset.c: Likewise.
8113 * lib/bitset.c: Likewise.
8114 * lib/bitset_stats.c: Likewise.
8115 * lib/bitsetv-print.c: Likewise.
8116 * lib/bitsetv.c: Likewise.
8117 * lib/ebitset.c: Likewise.
8118 * lib/get-errno.c: Likewise.
8119 * lib/lbitset.c: Likewise.
8120 * lib/subpipe.c: Likewise.
8121 * lib/timevar.c: Likewise.
8122 * lib/vbitset.c: Likewise.
8123 * lib/bitset.c: Include "bitset.h" first, to test interface.
8124 * lib/bitset_stats.c: Include "bitset_stats.h" first.
8125 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
8126 * lib/bitsetv.c: Include "bitsetv.h" first.
8127 * lib/get-errno.c: Include "get-errno.h" first.
8128 * m4/.cvsignore: Add config-h.m4.
8129 * tests/actions.at (Default %printer and %destructor for ...):
8130 Adjust expected line numbers in output to reflect removal of #if
8131 HAVE_CONFIG_H lines.
8132 * tests/glr-regression.at (Missed %merge type warnings when ...):
8133 Likewise.
8134 * tests/regression.at (Braced code in declaration in rules section):
8135 Likewise.
8136 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
8137 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
8138 Include <config.h> unconditionally.
8139
8140 * bootstrap: Sync from coreutils, as follows:
8141
8142 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
8143
8144 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
8145 variable was sometimes used without being initialized. This
8146 messed up the installation of the INSTALL file in some cases.
8147
8148 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
8149
8150 * bootstrap (usage, main program, symlink_to_gnulib): Add option
8151 --copy. Inspired by a suggestion from Bruno Haible.
8152
8153 2006-10-03 Jim Meyering <jim@meyering.net>
8154
8155 * bootstrap: Undo last change to this file, since now gnulib-tool
8156 sticks with the automake default in generating dependencies.
8157
8158 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
8159
8160 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
8161 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
8162
8163 * doc/bison.1: Add copyright notice.
8164
8165 * data/glr.c: Don't include <stdarg.h>; not used.
8166
8167 * NEWS: The -g and --graph options now output graphs in Graphviz
8168 DOT format, not VCG format.
8169 * doc/bison.1: Likewise.
8170 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
8171 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
8172 of this change in
8173 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
8174 * TODO: Remove Graphviz entry.
8175 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
8176 remove vcg.c, vcg.h, vcg_defaults.h.
8177 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
8178 * src/graphviz.c, src/graphviz.h: New files.
8179 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
8180 * src/files.h: Make comment more generic.
8181 * src/main.c (main): Likewise.
8182 * src/print_graph.h: Likewise.
8183 * src/getargs.c (usage): Make usage description more generic.
8184 * src/print_graph.c: Include graphviz.h rather than vcg.h.
8185 (static_graph, fgraph): Remove. All uses changed to pass
8186 arguments instead of sharing a static var.
8187 (print_core, print_actions, print_state, print_graph):
8188 Output graphviz format rather than VCG format.
8189 * tests/.cvsignore: Remove *.vcg; add *.dot.
8190 * tests/output.at: Expect *.dot files, not *.vcg files.
8191
8192 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
8193 accommodates the 2006-10-08 change.
8194
8195 2006-10-11 Bob Rossi <bob@brasko.net>
8196
8197 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
8198 (b4_yyssa, b4_yyerror_range): New macros.
8199 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
8200 (yypvarsinit): Remove init of removed fields.
8201 (yypushparse): Remove use of removed fields; use new macros instead.
8202
8203 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
8204
8205 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
8206 in a push parser. Reindent slightly to match yacc.c better.
8207
8208 2006-10-11 Bob Rossi <bob@brasko.net>
8209
8210 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
8211 yymsg_alloc fields.
8212 (yypvarsinit, yypushparse): Remove init of removed fields.
8213 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
8214
8215 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
8216
8217 * THANKS: Add Paolo Bonzini and Bob Rossi.
8218
8219 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
8220
8221 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
8222 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
8223 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
8224 b4_define_user_cde and uses): Remove.
8225 (b4_comment, b4_prefix, b4_sync_start): New.
8226 * data/bison.m4: New file, with most of the content removed from c.m4.
8227 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
8228 * src/output.c (output_skeleton): Pass bison.m4.
8229 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
8230 only if specified.
8231
8232 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
8233
8234 Fix test failure reported by Tom Lane in
8235 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
8236 and try to make such failures easier to catch in the future.
8237 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
8238 that's now the caller's responsibility.
8239 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
8240 Set yychar = YYEOF if it's negative.
8241 * tests/actions.at (yylex): Abort if asked to read past EOF.
8242 * tests/conflicts.at (yylex): Likewise.
8243 * tests/cxx-type.at (yylex): Likewise.
8244 * tests/glr-regression.at (yylex): Likewise.
8245 * tests/input.at (yylex): Likewise.
8246 * tests/regression.at (yylex): Likewise.
8247 * tests/torture.at (yylex): Likewise.
8248
8249 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
8250
8251 Fix problems with translating English-language diagnostics.
8252 * bootstrap: Fix bug introduced in recent bootstrap changes, with
8253 respect to bison-runtime pot generation. The YY_ stuff
8254 wasn't being captured.
8255 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
8256 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
8257 * runtime-po/POTFILES.in: Add data/push.c.
8258
8259 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
8260
8261 Merge bootstrap changes from coreutils.
8262
8263 2006-09-28 Jim Meyering <jim@meyering.net>
8264
8265 Automatically generated dependencies are important even
8266 when all of the sources in a directory come from gnulib.
8267 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
8268 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
8269
8270 2006-09-23 Jim Meyering <jim@meyering.net>
8271
8272 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
8273
8274 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
8275
8276 * bootstrap: Add support for --force.
8277 (usage): New function. Describe usage less tersely.
8278 (CVS_only_file): New var.
8279
8280 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
8281
8282 * data/push.c (YYPUSH_MORE): Make it an enum instead.
8283 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
8284 Adjust white space and comments to match GNU style better.
8285
8286 2006-09-20 Bob Rossi <bob@brasko.net>
8287
8288 * data/push.c (yyresult_get): Remove function.
8289 (YYPUSH_MORE): Add #define.
8290 (yypushparse): Modify return value.
8291
8292 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
8293
8294 * stamp-h.in: Remove; no longer needed.
8295 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
8296 Remove config.h, config.hin, intl (no longer created).
8297 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
8298 stamp-h1.
8299
8300 Sync bootstrap from coreutils, as follows:
8301
8302 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
8303
8304 * bootstrap (symlink_to_gnulib): New function.
8305 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
8306 to copies-of-gnulib.
8307 (cp_mark_as_generated, slurp, gnulib_files):
8308 Avoid making a copy if it's the same as the old version.
8309 (gnulib_files): Add support for this variable (used by Bison).
8310
8311 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
8312
8313 * src/getargs.c (usage): Rework to use conventions similar to
8314 coreutils, to make translation a bit easier and the code a bit
8315 smaller. Problem reported by Tim Van Holder.
8316
8317 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
8318
8319 Use some of gnulib's new modules, taken from coreutils.
8320
8321 * bootstrap: Sync from coreutils, except add support for gnulib_files.
8322 * bootstrap.conf: New file.
8323 (gnulib_modules): Add configmake, inttypes, unistd.
8324 (XGETTEXT_OPTIONS): Add complain, complain_at,
8325 fatal, fatal_at, warn, warn_at, unexpected_end.
8326 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
8327 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
8328 (gl_EARLY): Add.
8329 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
8330 (gl_INIT): Add
8331 (GNULIB_AUTOCONF_SNIPPET): Remove.
8332 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
8333 the pickiest.
8334 * lib/.cvsignore: Add inttypes_.h.
8335 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
8336 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
8337 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
8338 no-longer-necessary initializations.
8339 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
8340 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
8341 use the unistd module.
8342 * src/system.h: Likewise.
8343 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
8344 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
8345 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
8346 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
8347 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
8348 * src/system.h: Include inttypes.h unconditionally, now that we
8349 use the inttypes module. Don't bother to include stdint.h, since
8350 inttypes.h now does that for us.
8351 (LOCALEDIR): Remove, now that we use the configmake module.
8352 * src/getargs.c: Include configmake.h.
8353 * src/main.c: Likewise.
8354 * src/output.c: Likewise.
8355 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
8356 not from $abs_top_builddir, since config.h moved.
8357
8358
8359 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
8360 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
8361
8362 * src/parse-gram.y (symbol_declaration): Don't put statements
8363 before declarations; it's not portable to C89.
8364 * src/scan-code.l (handle_action_at): Likewise.
8365
8366 * src/scan-code.l: Always initialize braces_level; the old code
8367 left it uninitialized and therefore had undefined behavior.
8368
8369 Don't attempt to redefine 'assert', since it runs afoul of
8370 systems where standard headers (mistakenly) include <assert.h>.
8371 Instead, define and use our own alternative, called 'aver'.
8372 * src/reader.c: Don't include assert.h, since we no longer
8373 use assert.
8374 * src/scan-code.l: Likewise.
8375 * src/system.h (assert): Remove, replacing with....
8376 (aver): New function, taking a bool arg. All uses changed.
8377 * src/tables.c (pack_vector): Ensure that aver arg is bool,
8378 not merely an integer.
8379
8380 2006-09-15 Bob Rossi <bob@brasko.net>
8381
8382 Add support for push parsing. Based on the original work of
8383 Odd Arild Olsen <oao@fibula.no>.
8384 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
8385 * data/c.m4 (YYPUSH): New.
8386 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
8387 * data/push.c: New file.
8388 * src/getargs.c (push_parser): New var.
8389 * src/getargs.h (push_parser): New declaration.
8390 * src/output.c (prepare): Add macro insertion of `push_flag'.
8391 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
8392 (prologue_declaration): Parse %push-parser.
8393 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
8394 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
8395 list of removed lines from the traces observed.
8396 (AT_CHECK_CALC_LALR): Added push parser tests.
8397
8398 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
8399
8400 * NEWS: Version 2.3a.
8401 * configure.ac (AC_INIT): Likewise.
8402
8403 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
8404 "#define YYSTYPE int" that caused "make maintainer-check" to fail
8405 due to header ordering dependencies. I don't know why the #define
8406 was there.
8407
8408 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
8409 runtime cost when YYDEBUG is not defined, and so that some tests
8410 that used to fail now work. Problem and initial suggestion by
8411 Paolo Bonzini.
8412 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
8413 * data/glr.cc (b4_parser_class_name):
8414 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
8415 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
8416 (yydebug_) [YYDEBUG]: New member.
8417 (yycdebug_): Now defined only if YYDEBUG.
8418 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
8419 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
8420 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
8421 if YYYDEBUG.
8422 (debug_stream, set_debug_stream, debug_level, set_debug_level):
8423 Define only if YYDEBUG.
8424 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
8425 set_debug_level.
8426 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
8427 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
8428 AT_CHECK_CALC_GLR_CC that are working now.
8429
8430 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
8431
8432 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
8433 We don't need them in glr.cc, and glr.c defines them.
8434 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
8435 assumes that defining it to anything is the same as defining
8436 it to 1. Problem reported by Paolo Bonzini.
8437
8438 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
8439
8440 * data/c.m4 (b4_null, b4_case): Define.
8441 * src/output.c (prepare_symbols): Use b4_null.
8442 (user_actions_output): Use b4_case.
8443
8444 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
8445
8446 * data/glr.c (b4_shared_declarations): Put start-header first,
8447 before any #includes that we generate, so that feature-test
8448 macros work. Problem reported by Michael Deutschmann in
8449 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
8450 * data/lalr1.cc: Likewise.
8451 * doc/bison.texinfo (Prologue): Document that feature-test macros
8452 should be defined before any Bison declarations.
8453 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
8454 that depend on location.hh after, not before, Bison decls, since
8455 we now include location.hh after the first user prologue.
8456
8457 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
8458 Sander Brandenburg in
8459 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
8460 Also, fix minor white space and comment issues.
8461 (Prologue): Mention that it's better to define feature-test macros
8462 before Bison declarations. Problem reported by Michael Deutschmann.
8463
8464 * README-cvs: Fix typo: "&" should be "&&". Problem reported
8465 by Jim Meyering.
8466 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
8467 This adjusts to recent gnulib changes.
8468
8469 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
8470
8471 Finish implementation of per-type %destructor/%printer. Discussed
8472 starting at
8473 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
8474 and
8475 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
8476 * NEWS (2.3+): Add a description of this feature to the default
8477 %destructor/%printer description.
8478 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
8479 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
8480 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
8481 list node contains a semantic type.
8482 * src/symtab.c, src/symtab.h: Extend with a table that associates
8483 semantic types with their %destructor's and %printer's.
8484 (semantic_type_from_uniqstr, semantic_type_get,
8485 semantic_type_destructor_set, semantic_type_printer_set): New functions
8486 composing the public interface of that table.
8487 (symbol_destructor_get, symbol_destructor_location_get,
8488 symbol_printer_get, symbol_printer_location_get): If there's no
8489 per-symbol %destructor/%printer, look up the per-type before trying
8490 the default.
8491 * tests/actions.at (Per-type %printer and %destructor): New test case.
8492 * tests/input.at (Default %printer and %destructor redeclared):
8493 Extend to check that multiple occurrences of %symbol-default in a
8494 single %destructor/%printer declaration is an error.
8495 (Per-type %printer and %destructor redeclared, Unused values with
8496 per-type %destructor): New test cases.
8497
8498 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
8499
8500 Require default %destructor/%printer to be declared using
8501 %symbol-default instead of an empty symbol list, and start working on
8502 new per-type %destructor/%printer. Discussed at
8503 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
8504 * NEWS (2.3+): Add %symbol-default to example.
8505 * bison.texinfo (Freeing Discarded Symbols): Likewise.
8506 (Table of Symbols): Add entry for %symbol-default.
8507 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
8508 (generic_symlist, generic_symlist_item): New nonterminals for creating
8509 a list in which each item is a symbol, semantic type, or
8510 %symbol-default.
8511 (grammar_declaration): Use generic_symlist in %destructor and %printer
8512 declarations instead of symbols.1 or an empty list.
8513 (symbol_declaration, precedence_declaration, symbols.1): Update actions
8514 for changes to symbol_list.
8515 * src/reader.c: Update for changes to symbol_list.
8516 * src/scan-code.l: Likewise.
8517 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
8518 * src/symlist.c, src/symlist.h: Extend such that a list node may
8519 represent a semantic type or a %symbol-default in addition to just an
8520 ordinary symbol. Add switched functions for setting %destructor's and
8521 %printer's.
8522 * tests/actions.at, tests/input.at: Add %symbol-default to all default
8523 %destructor/%printer declarations.
8524
8525 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
8526
8527 Whether the default %destructor/%printer applies to a particular symbol
8528 isn't a question of whether the user *declares* that symbol (in %token,
8529 for example). It's a question of whether the user by any means
8530 *defines* the symbol at all (by simply using a char token, for
8531 example). $end is defined by Bison whereas any other token with token
8532 number 0 is defined by the user. The error token is always defined by
8533 Bison regardless of whether the user declares it with %token, but we
8534 may one day let the user define error as a nonterminal instead.
8535 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
8536 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
8537 the meaning of "user-defined".
8538 * tests/actions.at (Default %printer and %destructor for user-declared
8539 end token): Rename to...
8540 (Default %printer and %destructor for user-defined end token): ...
8541 this.
8542
8543 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
8544 computation of whether to apply the default, don't maintain a list of
8545 every Bison-defined symbol. Instead, just check for a first character
8546 of '$', which a user symbol cannot have, and check for the error token.
8547
8548 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
8549
8550 Don't apply the default %destructor or %printer to the error token,
8551 $undefined, or $accept. This change fits the general rule that the
8552 default %destructor and %printer are only for user-declared symbols,
8553 and it solves several difficulties that are described in the new test
8554 cases listed below.
8555 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
8556 * tests/actions.at (Default %printer and %destructor are not for error
8557 or $undefined, Default %printer and %destructor are not for $accept):
8558 New test cases.
8559
8560 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
8561
8562 Allow %start after the first rule.
8563 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
8564 when parsing the first rule.
8565 (check_and_convert_grammar): Search for it here after all grammar
8566 declarations have been parsed. Skip midrules, which have dummy LHS
8567 nonterminals.
8568 * src/symtab.c (symbol_is_dummy): New function.
8569 * src/symtab.h (symbol_is_dummy): Declare it.
8570 * tests/input.at (%start after first rule): New test.
8571
8572 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
8573
8574 Redo some of the previous commit: add back the ability to use
8575 non-aliased/undeclared string literals since it might be useful to
8576 those declaring %token-table.
8577 * src/reader.c (check_and_convert_grammar): Undo changes in previous
8578 commit: don't worry about complaints from symbols_pack.
8579 * src/symtab.c (symbol_new, symbol_class_set,
8580 symbol_check_alias_consistency): Undo changes in previous commit: count
8581 each string literal as a new symbol and token, assign it a symbol
8582 number, and don't complain about non-aliased string literals.
8583 (symbols_pack): Since symbol_make_alias still does not decrement symbol
8584 and token counts but does still set aliased tokens to the same number,
8585 symbol_pack_processor now leaves empty slots in the symbols array.
8586 Remove those slots.
8587 * tests/regression.at (Undeclared string literal): Remove test case
8588 added in previous commit since non-aliased string literals are allowed
8589 again.
8590 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
8591 remove unnecessary string literal declarations.
8592 * tests/sets.at (Firsts): Likewise.
8593
8594 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
8595
8596 Don't allow an undeclared string literal, but allow a string literal to
8597 be used before its declaration.
8598 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
8599 symbols_pack complained.
8600 * src/symtab.c (symbol_new): Don't count a string literal as a new
8601 symbol.
8602 (symbol_class_set): Don't count a string literal as a new token, and
8603 don't assign it a symbol number since symbol_make_alias does that.
8604 (symbol_make_alias): It's not necessary to decrement the symbol and
8605 token counts anymore. Don't assume that an alias declaration occurs
8606 before any uses of the identifier or string, and thus don't assert that
8607 one of them has the highest symbol number so far.
8608 (symbol_check_alias_consistency): Complain if there's a string literal
8609 that wasn't declared as an alias.
8610 (symbols_pack): Bail if symbol_check_alias_consistency failed since
8611 symbol_pack asserts that every token has been assigned a symbol number
8612 although undeclared string literals have not.
8613 * tests/regression.at (String alias declared after use, Undeclared
8614 string literal): New test cases.
8615 (Characters Escapes, Web2c Actions): Declare string literals as
8616 aliases.
8617 * tests/sets.at (Firsts): Likewise.
8618
8619 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
8620
8621 In the grammar scanner, STRING_FINISH unclosed constructs and return
8622 them to the parser in order to improve error messages.
8623 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
8624 SC_BRACED_CODE, SC_PROLOGUE): Implement.
8625 * tests/input.at (Unclosed constructs): New test case.
8626 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
8627 seen.
8628
8629 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
8630 unused global.
8631
8632 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
8633
8634 Handle string aliases for character tokens correctly.
8635 * src/symtab.c (symbol_user_token_number_set): If the token has an
8636 alias, check and set its alias's user token number instead of its own,
8637 which is set to indicate the alias. Previously, every occurrence of
8638 the character token in the grammar overwrote that alias indicator with
8639 the character code.
8640 * tests/input.at (String aliases for character tokens): New test.
8641
8642 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
8643
8644 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
8645
8646 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
8647
8648 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
8649 to prevent failures when building on older platforms.
8650 Check for autopoint failure.
8651 Set XGETTEXT_OPTIONS to values that check for C format strings,
8652 so that translators are warned about them (this also helps
8653 prevent core dumps).
8654
8655 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
8656 function, since it simplifies our code a bit.
8657
8658 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
8659 rather than -W, so we don't get bogus warnings about sign comparisons.
8660 Add -Wpointer-arith, since that warning is useful (it reports code
8661 that does not conform to C89 and that some compilers reject).
8662 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
8663 since it's no longer needed.
8664
8665 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
8666
8667 Clean up scanners a bit.
8668 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
8669 definitions so gcc won't warn when obstack_for_string is unused.
8670 * src/scan-code.l: config.h and system.h are already #include'd by
8671 scan-code-c.c, so get rid of them here.
8672 * src/scan-gram.l: Likewise.
8673 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
8674 definitions rather than duplicating the rest of it.
8675 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
8676
8677 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
8678
8679 Suppress signed/unsigned comparison warnings for yycheck.
8680 * data/c.m4 (b4_safest_int_type): New macro.
8681 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
8682 a signed int type, cast it to b4_safest_int_type first.
8683 * data/yacc.c: Likewise.
8684 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
8685 also overwritten.
8686
8687 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
8688
8689 * doc/bison.texinfo: Fix some typos.
8690
8691 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
8692
8693 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
8694 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
8695
8696 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
8697 the latest gnulib does this a different way.
8698 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
8699 translation was patched, so stop omitting it.
8700
8701 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
8702
8703 Enable declaration of default %printer/%destructor. Make the parser
8704 use these for all user-declared grammar symbols for which the user does
8705 not declare a specific %printer/%destructor. Thus, the parser uses it
8706 for token 0 if the user declares it but not if Bison generates it as
8707 $end. Discussed starting at
8708 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
8709 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
8710 and
8711 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
8712 * NEWS (2.3+): Mention.
8713 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
8714 declare a %destructor for a mid-rule's semantic value. It's just
8715 impossible to declare one specific to it.
8716 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
8717 code. Describe default %destructor form.
8718 * src/parse-gram.y (grammar_declaration): Parse default
8719 %printer/%destructor declarations.
8720 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
8721 and symbol_destructor_location_get rather than accessing the destructor
8722 and destructor_location members of struct symbol.
8723 (symbol_printers_output): Likewise but for %printer's.
8724 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
8725 again.
8726 * src/symtab.c (default_destructor, default_destructor_location,
8727 default_printer, default_printer_location): New static global
8728 variables to record the default %destructor and %printer.
8729 (symbol_destructor_get, symbol_destructor_location_get,
8730 symbol_printer_get, symbol_printer_location_get): New functions to
8731 compute the appropriate %destructor and %printer for a symbol.
8732 (default_destructor_set, default_printer_set): New functions to set the
8733 default %destructor and %printer.
8734 * src/symtab.h: Prototype all those new functions.
8735 * tests/actions.at (Default %printer and %destructor): New test to
8736 check that the right %printer and %destructor are called, that they're
8737 not called for $end, and that $$ and @$ work correctly.
8738 (Default %printer and %destructor for user-declared end token): New
8739 test to check that the default %printer and %destructor are called for
8740 a user-declared end token.
8741 * tests/input.at (Default %printer and %destructor redeclared, Unused
8742 values with default %destructor): New tests to check related grammar
8743 warnings and errors.
8744
8745 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
8746
8747 Clean up handling of %destructor for the end token (token 0).
8748 Discussed starting at
8749 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
8750 and
8751 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
8752
8753 Make the skeletons consistent in how they pop the end token and invoke
8754 its %destructor.
8755 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
8756 state, which has token number 0, since this would invoke the
8757 %destructor for the end token.
8758 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
8759 until after shifting the end token, or else it won't be popped.
8760 * data/yacc.c (yyparse): Likewise.
8761
8762 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
8763 it's the end token. Upon termination, destroy an unshifted lookahead
8764 even when it's the end token.
8765 * data/lalr1.cc (yy::parser::parse): Likewise.
8766 * data/yacc.c (yyparse): Likewise.
8767
8768 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
8769 value warnings for the end token when the user gives the end token a
8770 %destructor.
8771
8772 * tests/actions.at (Printers and Destructors): Test all the above.
8773
8774 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
8775
8776 Update to latest gnulib and gettext versions.
8777 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
8778 Add fopen-safer.
8779 (gnulib_files): Add m4/warning.m4. Don't worry about files
8780 overwritten by autopoint.
8781 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
8782 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
8783 rejects them.
8784 Don't use autoreconf; instead, invoke autopoint etc. by hand,
8785 so that we can remove the intl files at a better time.
8786 (intl_files_to_remove): Remove aclocal.m4, since it gets
8787 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
8788 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
8789 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
8790 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
8791 Remove datarootdir hack; no longer needed.
8792 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
8793 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
8794 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
8795 strdup.h.
8796 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
8797 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
8798
8799 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
8800
8801 * bootstrap: Adjust to today's change to gnulib-tool by invoking
8802 it with --assume-autoconf='latest-stable'.
8803
8804 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
8805
8806 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
8807 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
8808 YYSTYPE' and `{'.
8809 * src/muscle_tab.h (muscle_grow): Replace the header comments with
8810 those from muscle_tab.c since the old ones are misleading.
8811
8812 2006-07-13 Akim Demaille <akim@epita.fr>
8813
8814 Support %define "KEY" {VALUE}.
8815 * src/scan-code.h, src/scan-code.l (translate_action)
8816 (translate_rule_action, translate_symbol_action, translate_code):
8817 Return char *, not const char *.
8818 * src/parse-gram.y (declaration): Rename as...
8819 (prologue_declaration): this.
8820 (string_content): Remove this nonterminal, use STRING.
8821 (braceless, content, content.opt): New nonterminal.
8822 Use them.
8823 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
8824 as value.
8825 * src/scan-gram.l (getargs.h): Don't include it.
8826
8827 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
8828
8829 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
8830 rather than a for-loop that declares a local bool variable. This
8831 should work around a compatibility problem with a Cray x1e C++
8832 compiler reported by Hung Nguyen in
8833 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
8834 The for-loop was introduced in the 2004-11-17 change but I don't
8835 know why it was needed.
8836
8837 2006-07-12 Akim Demaille <akim@epita.fr>
8838
8839 * data/c.m4: Comment changes.
8840
8841 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
8842
8843 * src/complain.c (error_message, ERROR_MESSAGE): New.
8844 To factor...
8845 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
8846 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
8847
8848 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
8849
8850 * NEWS: Instead of %union, you can define and use your own union type
8851 YYSTYPE if your grammar contains at least one <type> tag.
8852 Your YYSTYPE need not be a macro; it can be a typedef.
8853 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
8854 (Union Decl, Decl Summary): Document this.
8855 * data/glr.c (YYSTYPE): Implement this.
8856 * data/glr.cc (YYSTYPE): Likewise.
8857 * data/lalr1.cc (YYSTYPE): Likewise.
8858 * data/yacc.c (YYSTYPE): Likewise.
8859 * src/output.c (prepare): Output tag_seen_flag.
8860 * src/parse-gram.y (declaration, grammar_declaration):
8861 Use 'union_seen' rather than 'typed' to determine whether
8862 %union has been seen, since grammars can now be typed without
8863 %union.
8864 (symbol_declaration, type.opt, symbol_def):
8865 Keep track of whether a tag has been seen.
8866 * src/reader.c (union_seen, tag_seen): New vars.
8867 (typed): remove.
8868 * src/reader.h (union_seen, tag_seen, typed): Likewise.
8869 * src/scan-code.l (untyped_var_seen): New variable.
8870 (handle_action_dollar): Adjust to above changes.
8871 (handle_action_dollar, handle_action_at):
8872 Improve overflow checking for outlandish numbers.
8873 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
8874 avoid new diagnostics generated by above changes.
8875 * tests/regression.at (YYSTYPE typedef): Add test to check
8876 for type tags without %union.
8877
8878 * src/symlist.c (symbol_list_length): Return int, not unsigned
8879 int, since callers expect int. This may need to get revisited
8880 once we have proper integer overflow checking.
8881
8882 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
8883 object is now static.
8884
8885 * src/getargs.c (flags_argmatch): Return void, not int,
8886 to pacify ./configure --enable-gcc-warnings.
8887
8888 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
8889 since last_string is already defined to FLEX_PREFIX (last_string).
8890
8891 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
8892
8893 Implement --warnings/-W.
8894 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
8895 replaced by...
8896 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
8897 Adjust callers.
8898 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
8899 (warnings_args, warnings_types): New.
8900 (getargs, short_options, long_options): Accept -W/--warnings.
8901 Sort the options by alphabetical order, upper case letter right
8902 before its lower case.
8903
8904 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
8905
8906 Change %merge result type clash warnings to errors. Discussed at
8907 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
8908 * src/reader.c (record_merge_function_type): Use complain_at.
8909 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
8910 declared later): Update test case results.
8911
8912 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
8913
8914 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
8915 to be in alphabetical order.
8916 (trace_args): Spelling fixes.
8917
8918 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
8919
8920 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
8921 so they don't collide with user-defined macros.
8922 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
8923 this was never guaranteed, and now that we're using gnulib stdint,
8924 which defines int_fast16_t to long int, the problem is exposed.
8925
8926 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
8927
8928 * data/c.m4 (b4_basename): Simplify a bit, since we don't
8929 need the full POSIX semantics (and weren't implementing them
8930 anyway).
8931
8932 Adjust to Autoconf 2.60 and today's gnulib.
8933 * bootstrap (gnulib_modules): Add stdint.
8934 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
8935 no longer copies it.
8936 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
8937 since stdint needs the former and wcwidth (which is now required
8938 by mbswidth) needs the latter.
8939 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
8940 work around a compatibility glitch between gettext 0.14.6 and
8941 Autoconf 2.60.
8942 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
8943 Do not check for uintptr_t, since new stdint module does the right
8944 thing.
8945 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
8946 Add stdint.h, stdint_.h, wcwidth.h.
8947 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
8948 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
8949 stdint.m4, wchar_t.m4, wcwidth.m4.
8950 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
8951 usual order for ../lib/*.h files.
8952 (file_name_split): Use last_component, not base_name, to adjust
8953 to gnulib changes.
8954 * src/parse-gram.h: Include <strverscmp.h> in the usual order
8955 for ../lib/*.h files.
8956 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
8957 Define unconditionally, since we now assume the stdint module.
8958 * src/scan-skel.l: Include <dirname.h>.
8959 (BASE_QPUTS): Use last_component, not base_name.
8960 * src/system.h: Include <unlocked-io.h> in the usual order
8961 for ../lib/*.h files. Include <stdint.h> unconditionally,
8962 since we now use the stdint module.
8963 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
8964 HAVE_UINTPTR_T, since we now use the stdint module.
8965 (base_name): Remove decl, since files now include <dirname.h>
8966 to get the decl.
8967
8968 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
8969
8970 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
8971 New, default to 1.
8972 * data/yacc.c, data/glr.c, data/location.cc: Use them.
8973 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
8974 default.
8975 * tests/calc.at: Adjust.
8976
8977 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
8978
8979 * data/c.m4 (b4_basename): New.
8980 (b4_syncline): Also output the location of its invocation (from
8981 the skeleton).
8982 (b4_user_action, b4_define_user_action, b4_user_actions)
8983 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
8984 (b4_user_stype): New.
8985 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
8986
8987 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
8988
8989 In the grammar file, the first column is 1 not 0 on the first line as
8990 on every other line.
8991 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
8992 * tests/input.at (Torturing the Scanner): Update output.
8993
8994 * src/scan-gram.l (scanner_cursor): Declare it static.
8995
8996 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
8997
8998 In warnings, say "previous declaration" rather than "first
8999 declaration".
9000 * src/symtab.c (redeclaration): Do that here.
9001 * src/reader.c (record_merge_function_type): In the case of a result
9002 type clash, report the previous declaration rather than the very first
9003 one in the grammar file.
9004 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
9005 declared later): Add a third declaration to check this behavior.
9006 * tests/input.at (Incompatible Aliases): Update output.
9007
9008 2006-06-27 Akim Demaille <akim@epita.fr>
9009
9010 * doc/Doxyfile.in: New.
9011 * doc/Makefile.am: Use it.
9012 * src/lalr.h, src/symtab.h: Initial doxygenation.
9013
9014 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
9015
9016 Don't miss %merge result type warnings just because the LHS types are
9017 declared after the %merge. This continues the effort of the previous
9018 patch.
9019 * src/reader.c (get_merge_function): Don't set the merger type yet.
9020 (record_merge_function_type): New function for setting the merger type
9021 and checking for clashes.
9022 (grammar_current_rule_merge_set): Set the location of the %merge for
9023 the current rule.
9024 (packgram): Invoke record_merge_function_type for each rule now that
9025 all symbol type declarations have been parsed.
9026 * src/reader.h (merger_list.type_declaration_location): New member
9027 storing the location of the first %merge from which the type for this
9028 merging function was derived.
9029 * src/symlist.h (symbol_list.merger_declaration_location): New member
9030 storing the location of a rule's %merge, if any.
9031 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
9032 declared later): New test to catch the error fixed by the above patch.
9033
9034 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
9035
9036 Get action warnings (grammar_rule_check) right even when symbol
9037 declarations appear after the rules. Discussed at
9038 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
9039 and
9040 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
9041 Don't mistake the type of $$ in a midrule to be that of its parent
9042 rule's $$.
9043 * src/reader.c (grammar_current_rule_end): Don't invoke
9044 grammar_rule_check yet since not all symbol declarations may have been
9045 parsed yet.
9046 (grammar_midrule_action): Likewise.
9047 Don't record whether the midrule's $$ has been used yet since actions
9048 haven't been translated yet.
9049 Record the midrule's parent rule and its RHS index within the parent
9050 rule.
9051 (grammar_current_rule_action_append): Don't translate the action yet
9052 since not all symbol declarations may have been parsed yet and, thus,
9053 warnings about types for $$, $n, @$, and @n can't be reported yet.
9054 (packgram): Translate the action and invoke grammar_rule_check now that
9055 all symbol declarations have been parsed.
9056 * src/scan-code.l (handle_action_dollar): Now that this is invoked
9057 after parsing the entire grammar file, the symbol list here in the case
9058 of a midrule is actually the midrule's empty RHS, so reference its
9059 parent rule's RHS where necessary.
9060 On the other hand, now that you can already know it's a midrule, you
9061 aren't forced to think $$ has the same type as its parent rule's $$.
9062 (handle_action_at): In the case of a midrule, reference the parent rule
9063 where necessary.
9064 * src/symlist.c (symbol_list_new): Initialize new midrule-related
9065 members.
9066 (symbol_list_length): Now that this is invoked after all rules have
9067 been parsed, a NULL symbol (rather than a NULL symbol list node)
9068 terminates a rule. symbol_list_print already does this correctly.
9069 * src/symlist.h (symbol_list.midrule_parent_rule,
9070 symbol_list.midrule_parent_rhs_index): New members so that midrules can
9071 remember their relationships with their parents.
9072 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
9073 fixed by the above patch.
9074 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
9075 implementing...
9076 (Unused values): ... this old test case and...
9077 (Unused values before symbol declarations): ... this new test case.
9078 This one is the same as `Unused values' except that all symbol
9079 declarations appear after the rules in order to catch the rest of the
9080 errors fixed by the above patch.
9081
9082 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
9083
9084 More cleanup.
9085 * src/reader.c (current_rule): Declare it static since it's no longer
9086 used outside this file.
9087 (grammar_current_rule_action_append): Remove redundant arguments from
9088 translate_rule_action invocation.
9089 * src/reader.h (current_rule): Remove this unused extern.
9090 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
9091 * src/scan-code.l (translate_rule_action): Likewise.
9092
9093 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
9094
9095 Clean up yesterday's patch.
9096 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
9097 to...
9098 * src/reader.c (grammar_current_rule_action_append): ... here for
9099 consistency with grammar_current_rule_symbol_append.
9100 * tests/regression.at (Braced code in declaration in rules section):
9101 Make yyerror and yylex static as usual.
9102
9103 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
9104
9105 Fix bug that mistakes braced code in a declaration in the rules section
9106 to be a rule action. Mentioned at
9107 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
9108 * src/scan-gram.l: Move midrule action detection from the start of the
9109 scanning of any braced code to...
9110 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
9111 action. For readability, use $2 and @2 rather than the equivalent
9112 global variables.
9113 * tests/regression.at (Braced code in declaration in rules section):
9114 New test to catch the error fixed by the above patch.
9115
9116 Work on code readability some.
9117 * src/scan-code.l (current_rule): Get rid of this misleading and
9118 redundant declaration: it's actually extern'ed in reader.h.
9119 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
9120 translate_action): Add a rule argument and use it instead of the global
9121 current_rule.
9122 (translate_rule_action): This already receives current_rule through an
9123 argument, so pass it on to translate_action instead of assigning
9124 current_rule to current_rule.
9125 (translate_symbol_action, translate_code): Pass rule = NULL to
9126 translate_action.
9127
9128 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
9129
9130 Rename %before-definitions to %start-header and %after-definitions to
9131 %end-header. Don't use these declarations to separate pre-prologue
9132 blocks from post-prologue blocks. Add new order-independent
9133 declarations %before-header and %after-header as alternatives to the
9134 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
9135 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
9136 * NEWS (2.3+): Update for these changes.
9137 * data/glr.c (b4_before_definitions): Update to...
9138 (b4_start_header): ... this.
9139 (b4_after_definitions): Update to...
9140 (b4_end_header): ... this.
9141 * data/glr.cc: Likewise.
9142 * data/lalr1.cc: Likewise.
9143 * data/yacc.c: Likewise.
9144 * doc/bison.texinfo (The prologue): Update names, and replace remaining
9145 prologue blocks with %*-header declarations.
9146 (Calc++ Parser): Likewise.
9147 (Decl Summary): Update names.
9148 (Table of Symbols): Update description.
9149 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
9150 (PERCENT_END_HEADER): ... this.
9151 (PERCENT_BEFORE_DEFINITIONS): Update to...
9152 (PERCENT_START_HEADER): ... this.
9153 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
9154 (declaration): Update token names and m4 macro names.
9155 When parsing %end-header and %start-header, invoke translate_code
9156 before muscle_code_grow, and no longer set global booleans to remember
9157 whether these declarations have been seen.
9158 Parse new %after-header and %before-header.
9159 * src/reader.c (before_definitions, after_definitions): Remove.
9160 (prologue_augment): Accept a new bool argument to specify whether to
9161 augment the pre-prologue or post-prologue.
9162 * src/reader.h (before_definitions, after_definitions): Remove these
9163 extern's.
9164 (prologue_augment): Add new bool argument.
9165 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
9166 (PERCENT_END_HEADER): ... this.
9167 (PERCENT_BEFORE_DEFINITIONS): Update to...
9168 (PERCENT_START_HEADER): ... this.
9169 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
9170 * tests/actions.at (Printers and Destructors): Update names.
9171
9172 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
9173
9174 Add comparison operators for C++ location classes. Discussed at
9175 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
9176 * data/c++.m4 (b4_define_location_comparison): New boolean %define
9177 declaration indicating whether filename_type has an operator==. If
9178 filename_type is `std::string', it defaults to `1', `0' otherwise.
9179 * data/location.cc: Iff b4_define_location_comparison is `1', add
9180 operator== and operator!= for class position and for class location.
9181
9182 Some minor fixes.
9183 * src/scan-action.l: Remove unused file.
9184 * src/symtab.c (symbol_printer_set): Use printer_location not
9185 destructor_location.
9186 * src/symtab.h (struct symbol): Replace incorrect source comment for
9187 printer members.
9188 * tests/input.at (Incompatible Aliases): Update output with correct
9189 printer location.
9190
9191 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
9192
9193 Don't put the pre-prologue in the header file. For the yacc.c code
9194 file and the glr.c header and code files, move the pre-prologue before
9195 the token definitions. Add new %before-definitions and
9196 %after-definitions to declare code that will go in both the header file
9197 and code file. Discussed at
9198 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
9199 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
9200 and
9201 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
9202 * NEWS (2.3+): Describe these changes.
9203 * data/glr.c (b4_pre_prologue): Move from within to before...
9204 (b4_shared_declarations): ... this.
9205 Add new b4_before_definitions before b4_token_enums.
9206 Add new b4_after_definitions at the end.
9207 * data/glr.cc (b4_pre_prologue): Replace with...
9208 (b4_before_definitions): ... this in the header file.
9209 (b4_after_definitions): New near the end of the header file.
9210 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
9211 code file right before including the header file.
9212 (b4_before_definitions): New in the previous position of
9213 b4_pre_prologue in the header file.
9214 (b4_after_definitions): New near the end of the header file.
9215 * data/yacc.c: Clean up some m4 quoting especially in the header file.
9216 (b4_token_enums_defines): In the code file, move to right before
9217 YYSTYPE for consistency with the header file.
9218 (b4_before_definitions): New right before b4_token_enums_defines in
9219 both the header and code file.
9220 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
9221 header and code file.
9222 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
9223 of prologues for %union dependencies.
9224 (Decl Summary): In %defines description, mention the effect of
9225 %before-definitions and %after-definitions on the header file.
9226 (Calc++ Parser): Forward declare driver in a %before-definitions rather
9227 than in the pre-prologue so that make check succeeds.
9228 (Table of Symbols): Add entries for %before-definitions and
9229 %after-definitions.
9230 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
9231 %before-definitions.
9232 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
9233 (declaration): Parse those declarations and append to
9234 b4_before_definitions and b4_after_definitions, respectively.
9235 * src/reader.c (before_definitions, after_definitions): New bools to
9236 track whether those declarations have been seen.
9237 (prologue_augment): Add to the post-prologue if %union,
9238 %before-definitions, or %after-definitions has been seen.
9239 * src/reader.h (before_definitions, after_definitions): New extern's.
9240 * src/scan-gram.l: Scan the new declarations.
9241 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
9242 prologue block in a %before-definitions or a %after-definitions based
9243 on whether the %union is declared.
9244 * tests/regression.at (Early token definitions with --yacc, Early token
9245 definitions without --yacc): Move tests for token definitions into the
9246 post-prologue since token names are no longer defined in the
9247 pre-prologue.
9248
9249 2006-06-20 Akim Demaille <akim@epita.fr>
9250
9251 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
9252 (symbol_get): Use it.
9253 * src/parse-gram.y: Use it.
9254
9255 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
9256
9257 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
9258 build succeeds when configured with --enable-gcc-warnings.
9259
9260 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
9261
9262 * src/parse-gram.y (char_name): New function.
9263 (CHAR, STRING, string_content): For %printer, properly escape.
9264 (ID): Prefer fputs to fprintf.
9265 (id): Reindent to be consistent with other rules.
9266 Properly quote char.
9267
9268 The Translation Project changed its way of publishing translations
9269 to maintainers. I haven't received any responses to my request
9270 for supporting the old way, or for documenting the new way. I
9271 have modified 'bootstrap' to use screen scraping
9272 (in this case, HTML scraping). This is unreliable and inelegant,
9273 but I don't see any better way. Yuck.
9274 * bootstrap (TP_URL, WGET_COMMAND): New vars.
9275 (get_translations): New function, which uses HTML scraping to
9276 deduce locations of latest translations.
9277 Use this function to grab both bison and bison-runtime .po files.
9278 Don't bother priming the pump for the runtime-po domain any more,
9279 as it's now translated better than bison is.
9280
9281 2006-06-19 Akim Demaille <akim@epita.fr>
9282
9283 * src/scan-gram.l: No longer "parse" things after `%union' until
9284 `{'. Rather, return a single "%union" token.
9285 No longer make symbols: return strings, and leave the conversion
9286 to symbols to the parser.
9287 (SC_PRE_CODE, token_type): Remove.
9288 * src/parse-gram.y (%union): New field `character'.
9289 Sort tokens.
9290 (CHAR): New token.
9291 (ID, ID_COLON): Now that the scanner no longer makes them
9292 identifiers, adjust all uses to invoke symbol_get.
9293 (id_colon): New, wraps the conversion from string to symbol.
9294 (%union): Accept a possible union_name.
9295 (symbol): Now can be a char.
9296 * data/c.m4 (b4_union_name): Leave a default value.
9297 * data/glr.c, data/yacc.c: Use it.
9298
9299 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
9300
9301 For associating token numbers with token names for "yacc.c", don't use
9302 #define statements unless `--yacc' is specified; always use enum
9303 yytokentype. Most important discussions start at:
9304 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
9305 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
9306 and
9307 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
9308 * NEWS (2.3+): Mention.
9309 * data/c.m4 (b4_yacc_if): New.
9310 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
9311 token #define's.
9312 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
9313 on token name definitions.
9314 * src/getargs.c (usage): Capitalize `Yacc' in English.
9315 * src/output.c (prepare): Define b4_yacc_flag.
9316 * tests/regression.at (Early token definitions): Test that tokens names
9317 are defined before the pre-prologue not just before the post-prologue.
9318 Remove this test case and copy to...
9319 (Early token definitions with --yacc): ... this to test #define's.
9320 (Early token definitions without --yacc): ... and this to test enums.
9321
9322 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
9323
9324 * NEWS: Reword the post-2.3 change to not be so optimistic about
9325 removing the old "look-ahead" spelling.
9326 Update previous look-ahead/lookahead change reports.
9327 * REFERENCES: look-ahead -> lookahead (since that's
9328 what he actually wrote).
9329 * doc/refcard.tex: look ahead -> lookahead,
9330 look-ahead -> lookahead
9331
9332 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
9333
9334 For consistency, use `lookahead' instead of `look-ahead' or
9335 `look_ahead'. Discussed starting at
9336 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
9337 and then at
9338 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
9339 * NEWS: For the next release, note the change to `--report'.
9340 * TODO, doc/bison.1: Update English.
9341 * doc/bison.texinfo: Update English.
9342 (Understanding Your Parser, Bison Options): Document as
9343 `--report=lookahead' rather than `--report=look-ahead'.
9344 * src/conflicts.c: Update English in comments.
9345 (lookahead_set): Rename from look_ahead_set.
9346 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
9347 (resolve_sr_conflict): Rename local look_ahead_tokens to
9348 lookahead_tokens, and update other uses.
9349 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
9350 count_rr_conflicts, conflicts_free): Update uses.
9351 * src/getargs.c (report_args): Move "lookahead" before alternate
9352 spellings.
9353 (report_types): Update uses.
9354 (usage): For `--report' usage description, state `lookahead' spelling
9355 rather than `look-ahead'.
9356 * src/getargs.h (report.report_lookahead_tokens): Rename from
9357 report_look_ahead_tokens.
9358 * src/lalr.c: Update English in comments.
9359 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
9360 (state_lookahead_tokens_count): Rename from
9361 state_look_ahead_tokens_count.
9362 Rename local n_look_ahead_tokens to n_lookahead_tokens.
9363 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
9364 Rename local n_look_ahead_tokens to n_lookahead_tokens.
9365 Update other uses.
9366 Update English in output.
9367 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
9368 * src/print.c: Update English in comments.
9369 (lookahead_set): Rename from look_ahead_set.
9370 (print_reduction): Rename argument lookahead_token from
9371 look_ahead_token.
9372 (print_core, state_default_rule, print_reductions, print_results):
9373 Update uses.
9374 * src/print_graph.c: Update English in comments.
9375 (print_core): Update uses.
9376 * src/state.c: Update English in comments.
9377 (reductions_new): Update uses.
9378 (state_rule_lookahead_tokens_print): Rename from
9379 state_rule_look_ahead_tokens_print, and update other uses.
9380 * src/state.h: Update English in comments.
9381 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
9382 (state_rule_lookahead_tokens_print): Rename from
9383 state_rule_look_ahead_tokens_print.
9384 * src/tables.c: Update English in comments.
9385 (conflict_row, action_row): Update uses.
9386 * tests/glr-regression.at
9387 (Incorrect lookahead during deterministic GLR,
9388 Incorrect lookahead during nondeterministic GLR): Rename
9389 print_look_ahead to print_lookahead.
9390 * tests/torture.at: Update English in comments.
9391 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
9392 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
9393 (Many lookahead tokens): Update uses.
9394 * data/glr.c: Update English in comments.
9395 * lalr1.cc: Likewise.
9396 * yacc.c: Likewise.
9397 * src/conflicts.h: Likewise.
9398 * src/lalr.h: Likewise.
9399 * src/main.c: Likewise.
9400 * src/output.c: Likewise.
9401 * src/parse-gram.c: Likewise.
9402 * src/tables.h: Likewise.
9403 * tests/calc.at: Likewise.
9404
9405 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
9406
9407 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
9408
9409 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
9410
9411 * TODO: Add request from Nelson H. F. Beebe to be able to install
9412 Bison without installing the yacc script.
9413
9414 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
9415
9416 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
9417 and yytext if they're already #define'd.
9418 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
9419 * src/scan-code-c.c: ... here.
9420 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
9421 <config.h>.
9422
9423 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
9424
9425 Get Bison to build again when configured with --enable-gcc-warnings.
9426 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
9427 missing #include's.
9428 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
9429 loc argument as it shadows a global.
9430 * src/scan-gram.l: Remove stray comma that prevents boundary_set
9431 invocation.
9432
9433 * src/.cvsignore: Add scan-code.c.
9434
9435 2006-06-07 Akim Demaille <akim@epita.fr>
9436
9437 * src/scan-gram.l: Move the "add a trailing ; to actions" code
9438 to...
9439 * src/scan-code.l: here.
9440 * tests/input.at (Torturing the Scanner): Fix another location
9441 error.
9442
9443 2006-06-07 Akim Demaille <akim@epita.fr>
9444
9445 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
9446
9447 2006-06-06 Akim Demaille <akim@epita.fr>
9448
9449 Extract the parsing of user actions from the grammar scanner.
9450 As a consequence, the relation between the grammar scanner and
9451 parser is much simpler. We can also split "composite tokens" back
9452 into simple tokens.
9453 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
9454 * src/scan-gram.l (add_column_width, adjust_location): Move to and
9455 rename as...
9456 * src/location.h, src/location.c (add_column_width)
9457 (location_compute): these.
9458 Fix the column count: the initial column is 0.
9459 (location_print): Be robust to ending column being 0.
9460 * src/location.h (boundary_set): New.
9461 * src/main.c: Adjust to scanner_free being renamed as
9462 gram_scanner_free.
9463 * src/output.c: Include scan-code.h.
9464 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
9465 Use boundary_set.
9466 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
9467 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
9468 which is now, again, a separate token.
9469 Adjust all dependencies.
9470 Whereever actions with $ and @ are used, use translate_code.
9471 (action): Remove this nonterminal which is now useless.
9472 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
9473 (grammar_current_rule_action_append): Use translate_code.
9474 (packgram): Bound check ruleno, itemno, and rule_length.
9475 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
9476 (last_string, last_braced_code_loc, max_left_semantic_context)
9477 (scanner_initialize, scanner_free, scanner_last_string_free)
9478 (gram_out, gram_lineno, YY_DECL_): Move to...
9479 * src/scan-gram.h: this new file.
9480 (YY_DECL): Rename as...
9481 (GRAM_DECL): this.
9482 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
9483 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
9484 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
9485 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
9486 Move these declarations, and...
9487 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
9488 these to...
9489 * src/flex-scanner.h: this new file.
9490 * src/scan-gram.l (rule_length, rule_length_overflow)
9491 (increment_rule_length): Remove.
9492 (last_braced_code_loc): Rename as...
9493 (gram_last_braced_code_loc): this.
9494 Adjust to the changes of the parser.
9495 Move all the handling of $ and @ into...
9496 * src/scan-code.l: here.
9497 * src/scan-gram.l (handle_dollar, handle_at): Remove.
9498 (handle_action_dollar, handle_action_at): Move to...
9499 * src/scan-code.l: here.
9500 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
9501 scan-code.h, scan-code-c.c, scan-gram.h.
9502 (EXTRA_bison_SOURCES): Add scan-code.l.
9503 (BUILT_SOURCES): Add scan-code.c.
9504 (yacc): Be robust to white spaces.
9505
9506 * tests/conflicts.at, tests/input.at, tests/reduce.at,
9507 * tests/regression.at: Adjust the column numbers.
9508 * tests/regression.at: Adjust the error message.
9509
9510 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
9511
9512 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
9513 Use Akim's wording from
9514 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
9515
9516 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
9517
9518 Between Bison releases, manually append `+' to the previous Bison
9519 release number, and use that as a signal to automatically print the
9520 ChangeLog's CVS Id keyword from --version. Discussed starting at
9521 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
9522 * ChangeLog: Add Id header.
9523 * configure.ac (AC_INIT): Append `+' to `2.3'.
9524 * src/.cvsignore: Add revision.c.
9525 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
9526 (BUILT_SOURCES): Add revision.c.
9527 (revision.c): New target rule. This file defines a new global variable
9528 named revision. It initializes it with either the Id from ChangeLog
9529 or, if VERSION doesn't contain `+', with the empty string.
9530 * src/getargs.c (version): Print the value of revision.
9531 * src/revision.h: Extern revision.
9532
9533 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
9534
9535 * NEWS: Version 2.3.
9536 * configure.ac (AC_INIT): Likewise.
9537
9538 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
9539
9540 * data/glr.c (YYRECOVERING): Define to be a function-like macro
9541 with no arguments, not as an object-like macro. This is for
9542 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
9543 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
9544 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
9545 Document this.
9546
9547 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
9548
9549 * src/getargs.c (usage): Back out yesterday's modification of the
9550 --help output so that we don't have to wait for translation before
9551 releasing 2.3.
9552
9553 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
9554
9555 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
9556 Problem reported by Akim Demaille.
9557
9558 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
9559
9560 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
9561
9562 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
9563
9564 * data/yacc.c (yy_reduce_print): Omit trailing white space in
9565 generated source code. Problem reported by Frans Englich in
9566 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
9567
9568 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
9569
9570 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
9571 shell, not within 'make', so that 'make' by an ordinary builder
9572 (using GNU make) does not worry about configuring gzip. This also
9573 works around a bug reported independently by Keith Thompson and by
9574 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
9575 stderr rather than stdout, messing up the build logs.
9576
9577 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
9578
9579 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
9580 to make sure that YYID will never be unused. This fixes a 'make
9581 maintainer-check' failure caused by the recent changes to the 'Trivial
9582 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
9583 not used.
9584 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
9585
9586 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
9587
9588 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
9589 state before an empty RHS is always resolved here. Only the location
9590 of that state is guaranteed to be resolved, and that's enough. This
9591 fixes the remaining bug reported by Derek M. Jones in
9592 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
9593 * tests/glr-regression.at (Uninitialized location when reporting
9594 ambiguity): Test the above case.
9595 Also, the embedded comments in this test case claim it checks the case
9596 of an empty RHS that has inherited the initial location. However, the
9597 corresponding LHS was already resolved, so yyresolveLocations didn't
9598 actually have reason to modify it. Fix this by forcing
9599 nondeterministic operation at the beginning of the parse.
9600
9601 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
9602
9603 * data/c.m4 (b4_yy_symbol_print_generate):
9604 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
9605 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
9606 of the bugs reported today by Derek M Jones in
9607 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
9608 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
9609 defined to be a type name without parens or brackets.
9610 (Location Type): Similarly for YYLTYPE.
9611 * tests/regression.at (Trivial grammars): Put in a test for this
9612 bug that will be caught by 'make maintainer-check' (though not,
9613 alas, by 'make check' unless your compiler is picky).
9614
9615 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
9616
9617 * NEWS: Version 2.2.
9618 * configure.ac (AC_INIT): Likewise.
9619
9620 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
9621
9622 * data/glr.c (yyreportTree): Make room in yystates for the state
9623 preceding the RHS. This fixes the segmentation fault reported by Derek
9624 M. Jones in
9625 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
9626 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
9627 to the user. Reported for yyreportTree by Derek M. Jones later in the
9628 same thread.
9629 * THANKS: Add Derek M. Jones.
9630 Update my email address.
9631 Fix typo in Steve Murphy's name.
9632
9633 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
9634
9635 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
9636 checking against YYLAST that caused the parser to miss a potential
9637 alternative in its diagnostic.
9638 Problem reported by Maria Jose Moron Fernandez in
9639 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
9640 * data/lalr1.cc (yysyntax_error_): Likewise.
9641 * data/yacc.c (yysyntax_error): Likewise.
9642 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
9643 tokens, in case we run into an older C compiler.
9644 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
9645 Use them to check for the off-by-one error fixed above.
9646
9647 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
9648 YYSIZE_T, not size_t.
9649 * tests/regression.at (Trivial grammars): New test, to catch
9650 the error fixed by the above patch.
9651
9652 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
9653
9654 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
9655 scheme.
9656 Reported by Steve Murphy.
9657
9658 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
9659
9660 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
9661 * data/glr.cc: b4_location_flag is now b4_locations_flag.
9662
9663 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
9664
9665 Implement --trace=m4.
9666 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
9667 * src/output.c (output_skeleton): When set, pass -dV to m4.
9668
9669 Factor the handling of flags in m4.
9670 * src/output.c (prepare): Rename the muscle names debug, defines,
9671 error_verbose to debug_flag, defines_flag, error_verbose_flag.
9672 * data/c.m4: Adjust.
9673 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
9674 Use b4_define_flag_if to define other b4_FLAG_if macros.
9675 (b4_location_if): As a consequence, rename as...
9676 (b4_locations_if): this, for consistency.
9677 Adjust all the skeletons.
9678
9679 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
9680
9681 * etc/bench.pm: Shorten bench names.
9682
9683 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
9684
9685 * src/output.h, src/output.c (error_verbose): Move to...
9686 * src/getargs.h, src/getargs.c: here.
9687 Sort the flags.
9688 Adjust dependencies.
9689
9690 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
9691
9692 * data/c.m4 (b4_copyright): Put the special exception for Bison
9693 skeletons here, so we don't have to put it in each skeleton. All
9694 uses changed. Suggested by Akim Demaille. Also, wrap the
9695 copyright notice, in case it is longer than 80 columns. Replace
9696 comma by newline after title.
9697
9698 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
9699
9700 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
9701 incompatibility, not a bug. Mention that it wasn't fixed as of
9702 flex 2.5.33.
9703
9704 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
9705
9706 * examples/extexi: Enforce the precedence of concatenation over
9707 >>.
9708 Reported by Tommy Nordgren.
9709
9710 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
9711
9712 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
9713 with the member "token".
9714 Reported by Martin Nylin.
9715
9716 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
9717
9718 * data/glr.c: Switch to Bison 2.2 special-exception language in
9719 the copyright notice. Use more-regular format for titles and
9720 copyright notices.
9721 * data/glr.cc: Likewise.
9722 * data/location.cc: Likewise.
9723 * data/yacc.cc: Likewise.
9724 * doc/bison.texinfo (Conditions): Document this.
9725 * NEWS: likewise. Upgrade version to 2.2.
9726
9727 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
9728
9729 * data/glr.cc: Remove dead code.
9730
9731 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
9732
9733 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
9734 that variable and the line breaks the bootstrap. Problem reported
9735 by Juan M. Guerrero.
9736
9737 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
9738
9739 * doc/bison.texinfo (Multiple start-symbols): New.
9740
9741 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
9742
9743 * etc/README, etc/bench.pl: New.
9744
9745 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
9746
9747 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
9748 rule.
9749 Reported by Mickael Labau.
9750 * tests/input.at (Torturing the Scanner): Test it.
9751
9752 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
9753
9754 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
9755 Problem reported by Bob Rossi.
9756
9757 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
9758
9759 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
9760 and didn't really work.
9761 For the index, use @ifnotinfo, not @iftex.
9762 Minor cleanups of spacing and terminology.
9763
9764 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
9765
9766 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
9767 of AT_NAME_PREFIX when %name-prefix is not used.
9768
9769 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
9770
9771 Apply --prefix to C++ skeletons too: they change the namespace.
9772 The test suite already exercize these cases.
9773 * data/c++.m4 (b4_namespace): New.
9774 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
9775 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
9776 * data/yacc.c, data/glr.c: Remove a useless `[]'.
9777 * doc/bison.texinfo: Document it.
9778 (Option Cross Key): Use @multitable in all formats. It looks
9779 nicer, even in TeX outputs.
9780 (Rules): Use the same code whatever the output type is.
9781 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
9782 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
9783 * tests/calc.at: Use it, instead of hard coding `yy'.
9784
9785 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
9786
9787 * TODO: Remove dead items.
9788
9789 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
9790
9791 * doc/FAQ: Remove, merged into...
9792 * doc/bison.texinfo (FAQ): this.
9793 * doc/Makefile.am (EXTRA_DIST): Adjust.
9794
9795 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
9796
9797 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
9798 even if empty.
9799 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
9800 * doc/bison.texinfo (Calc++ Scanner): Use it.
9801
9802 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
9803
9804 Fix two nits reported by twlevo, plus one more that I discovered.
9805
9806 * src/assoc.h (assoc_to_string): Give a name to the arg, as
9807 this is the usual Bison style.
9808 * src/location.h (location_print): Likewise.
9809
9810 * src/reader.h (token_name): Likewise.
9811
9812 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
9813
9814 Fix some nits reported by twlevo.
9815 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
9816 and "POSIX". Use more-modern syntax for URLs. Mention C++
9817 and ask for Java. Don't hardwire OS version numbers. Add
9818 copyright notice.
9819 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
9820 * src/conflicts.c (solved_conflicts_obstack): Now static.
9821
9822 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
9823
9824 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
9825 page. Say "you can use it" not "you may use it" as on the web page;
9826 we're describing capabilities not granting permission.
9827
9828 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
9829
9830 * data/glr.c (yyresolveLocations): Rename local variables to avoid
9831 shadowing warnings. Use usual patter for iterating through RHS.
9832 * tests/glr-regression.at
9833 (Uninitialized location when reporting ambiguity):
9834 Modify yylex so that it uses its argument, rather than trying
9835 to rely on ARGSUSED (which doesn't work for gcc with warnings).
9836 const char -> char const.
9837
9838 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
9839 Don't use tabs inside commands; it messes up 'ps'.
9840 Problem reported by twlevo.
9841
9842 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
9843
9844 * tests/glr-regression.at (Uninitialized location when reporting
9845 ambiguity): New test case.
9846 * data/glr.c (yyresolveLocations): New function, which uses
9847 YYLLOC_DEFAULT.
9848 (yyresolveValue): Invoke yyresolveLocations before reporting an
9849 ambiguity.
9850 * doc/bison.texinfo (Default Action for Locations): Note
9851 YYLLOC_DEFAULT's usage for ambiguity locations.
9852 (GLR Semantic Actions): Cross-reference those notes.
9853
9854 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
9855
9856 * tests/glr-regression.at (Leaked semantic values when reporting
9857 ambiguity): Remove unnecessary union and type declarations.
9858 (Leaked lookahead after nondeterministic parse syntax error): New test
9859 case.
9860 * data/glr.c (yyparse): Check for zero stacks remaining before
9861 attempting to shift the lookahead so that you don't lose it.
9862
9863 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
9864
9865 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
9866 * tests/glr-regression.at (Leaked semantic values when reporting
9867 ambiguity): New test case.
9868 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
9869 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
9870 now unnecessary yystackp parameter.
9871 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
9872 destructors can be called.
9873
9874 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
9875 in existing testcases.
9876
9877 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
9878
9879 Don't leak semantic values for parent RHS when a user action cuts the
9880 parser, and clean up related code a bit.
9881 * tests/glr-regression.at (Leaked merged semantic value if user action
9882 cuts parse): Rename to...
9883 (Leaked semantic values if user action cuts parse): ... this. Add check
9884 for leaked parent RHS values.
9885 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
9886 between an unresolved state (non-empty chain of semantic options) and
9887 an incomplete one (signaled by an empty chain).
9888 (yyresolveStates): Document the interface. Move all manipulation of a
9889 successfully or unsuccessfully resolved yyGLRState to...
9890 (yyresolveValue): ... here so that yyresolveValue always leaves a
9891 yyGLRState with consistent data and thus is easier to understand.
9892 Remove the yyvalp and yylocp parameters since they are always just
9893 taken from the yys parameter. When reporting a discarded merged value
9894 in debugging output, note that it is incompletely merged. Document the
9895 interface.
9896 (yyresolveAction): If resolving any of the RHS states fails, destroy
9897 them all rather than leaking them. Thus, as long as user actions are
9898 written to clean up the RHS correctly, yyresolveAction always cleans up
9899 the RHS of a semantic option. Document the interface.
9900
9901 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
9902
9903 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
9904 led to a segmentation fault in GNU Pascal. Problem reported
9905 by Waldek Hebisch.
9906
9907 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
9908
9909 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
9910 mid-rule action inside a nonterminal symbol in order to declare a
9911 destructor for its semantic value.
9912
9913 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
9914
9915 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
9916 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
9917 __cplusplus && ! defined _STDLIB_H && !
9918 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
9919 defined free))]: Include <stdlib.h> rather than rolling our own
9920 declarations of malloc and free, to avoid problems with
9921 incompatible declarations (using 'throw') C++'s stdlib.h. This
9922 should fix Debian bug 340012
9923 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
9924 reported by Guillaume Melquiond.
9925
9926 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
9927
9928 * NEWS: Clarify symbols versus types in unused-value warnings.
9929
9930 * configure.ac (AC_INIT): Bump version number.
9931
9932 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
9933
9934 * NEWS: Version 2.1a.
9935 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
9936 since C99 requires this.
9937
9938 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
9939
9940 * m4/c-working.m4: New file.
9941 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
9942
9943 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
9944
9945 * Makefile.maint: Merge from coreutils.
9946
9947 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
9948
9949 More portability fixes for problems summarized by Nelson H. F. Beebe.
9950
9951 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
9952 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
9953 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
9954 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
9955 messes up because C++ code is compiled in 32-bit mode but linked
9956 in 64-bit mode.
9957
9958 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
9959
9960 More portability fixes for problems summarized by Nelson H. F. Beebe.
9961
9962 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
9963 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
9964
9965 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
9966 nodist_PROGRAMS, since we don't need to actually compile the
9967 example if we're just doing a plain 'make'. This avoids bothering
9968 the installer unnecessarily about problems due to weird C++
9969 compilers.
9970
9971 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
9972
9973 More portability fixes for problems summarized by Nelson H. F. Beebe.
9974
9975 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
9976 than #include "...", and compile with -I'.'. The old method was
9977 not portable, according to Posix and the C standard, and it does
9978 not work with Sun C 5.7, where previous #line directives affect
9979 the working directory used in later #include "..." directives.
9980
9981 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9982
9983 Various DJGGP specific issues in /djgpp
9984
9985 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
9986
9987 More portability fixes for problems summarized by Nelson H. F. Beebe.
9988
9989 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
9990 '#include <map>' works and that you can apply ++ to iterators.
9991
9992 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
9993
9994 Work around portability problems summarized by Nelson H. F. Beebe in
9995 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
9996
9997 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
9998 that '#include <string>' works.
9999
10000 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
10001 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
10002 "warning: sorry: semantics of inline function static data `const
10003 unsigned char translate_table[262]' are wrong (you'll wind up with
10004 multiple copies)".
10005
10006 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
10007 or, xor to not_, and_, or_, and xor_, respectively. This works
10008 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
10009 random system header somewhere that includes the equivalent of
10010 <iso646.h>.
10011
10012 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
10013 -E" works; it apparently doesn't work with PathScale EKO Compiler
10014 Suite Version 2.0.
10015
10016 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
10017
10018 During deterministic GLR operation, user actions should be able to
10019 influence the parse by changing yychar. To make this easier to fix and
10020 to make glr.c easier to evolve in general, don't maintain yytoken in
10021 parallel with yychar; just compute yytoken when needed.
10022 * tests/glr-regression.at (Incorrect lookahead during deterministic
10023 GLR): Check that setting yychar in a user action has the intended
10024 effect.
10025 * data/glr.c (yyGLRStack): Remove yytokenp member.
10026 (yyclearin): Don't set *yytokenp.
10027 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
10028 yychar rather than *yytokenp to determine the current lookahead.
10029 Compute yytoken locally when needed.
10030 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
10031 point to.
10032
10033 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
10034 after `--report' documentation.
10035
10036 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
10037
10038 * src/parse-gram.y (grammar_declaration): Location of printer
10039 symbol is @1, not list->location. Bug reported by twlevo.
10040 * tests/input.at (Incompatible Aliases): Adjust to above change.
10041
10042 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
10043
10044 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
10045 all the test at once. This makes the output easier to read in the
10046 normal case.
10047
10048 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
10049 got from <http://bro-ids.org/download.html>. The bug is that
10050 when two actions appeared in succession, the second one was
10051 scanned before the first one was added to the grammar rule
10052 as a midrule action. Bison then output the incorrect warning
10053 "parse.y:905.17-906.36: warning: unused value: $3".
10054 * src/parse-gram.y (BRACED_CODE, action): These are no longer
10055 associated with a value.
10056 (rhs): Don't invoke grammar_current_rule_action_append.
10057 (action): Invoke it here instead.
10058 * src/reader.c (grammar_midrule_action): Now extern.
10059 (grammar_current_rule_action_append): Don't invoke
10060 grammar_midrule_action; that is now the scanner's job.
10061 * src/reader.h (last_string, last_braced_code_loc):
10062 (grammar_midrule_action): New decls.
10063 * src/scan-gram.l (last_string): Now extern, sigh.
10064 (last_braced_code_loc): New extern variable.
10065 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
10066 rule already has an action.
10067 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
10068 * tests/input.at (AT_CHECK_UNUSED_VALUES):
10069 Add some tests to check that the above changes fixed the bug.
10070
10071 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
10072
10073 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
10074 All used changed. Check whether the symbol has a destructor,
10075 not whether it is typed.
10076 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
10077 that the values are still reported as unused. All line numbers
10078 adjusted.
10079
10080 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
10081
10082 Work around a bug in bro 0.8, which underparenthesizes its
10083 definition of YYLLOC_DEFAULT.
10084 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
10085 their arguments.
10086 * data/lalr1.cc: Likewise.
10087 * data/yacc.cc: Likewise.
10088
10089 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
10090
10091 Work around a bug in Pike 7.0, and give the Pike folks a
10092 better way to override the usual int widths.
10093 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
10094 user can override the types.
10095 (short): #undef, to work around a bug in Pike 7.0.
10096 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
10097 (union yyalloc.yyss): Use yytype_int16 rather than short.
10098 All uses changed.
10099 (yysigned_char): Remove.
10100 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
10101 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
10102 * tests/regression.at (Web2c Actions): Adjust to above changes.
10103
10104 * src/reader.c (check_and_convert_grammar): New function.
10105 (reader): Close the input file even if something went wrong during
10106 parsing. Minor file descriptor leak reported by twlevo.
10107
10108 * src/assoc.c (assoc_to_string): Use a default: abort (); case
10109 to pacify gcc -Wswitch-default.
10110 * src/scan-gram.l (adjust_location): Use a default: break; case
10111 to pacify gcc -Wswitch-default.
10112 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
10113 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
10114 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
10115 Move these decls to scan-skel.l, since they don't need to be
10116 visible elsewhere.
10117 * src/scan-skel.l: Accept the above decls.
10118 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
10119 is used.
10120
10121 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
10122
10123 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
10124 since we don't want to insist on a version number at the start
10125 of the changelog every time.
10126 * Makefile.maint: Sync from coreutils a bit better.
10127 (sc_trailing_blank): Renamed from sc_trailing_space.
10128 All uses changed.
10129 (sc_no_if_have_config_h, sc_require_config_h):
10130 (sc_prohibit_assert_without_use): New rules.
10131 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
10132 (sc_dd_max_sym_length): Fix leading spaces in rule.
10133 (sc_system_h_headers): Prefix with @.
10134 (sc_useless_cpp_parens, m4-check): Output line numbers.
10135 (changelog-check): Allow version only in head.
10136 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
10137 satisfy new Makefile.maint rule.
10138 * data/glr.c: Likewise.
10139 * data/glr.cc: Likewise.
10140 * data/lalr1.cc: Likewise.
10141 * data/yacc.c: Likewise.
10142 * lib/ebitsetv.c: Likewise.
10143 * lib/lbitset.c: Likewise.
10144 * lib/subpipe.c: Likewise.
10145 * lib/timevar.c: Likewise.
10146 * src/system.h: Likewise.
10147 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
10148 * djgpp/Makefile.maint: Add copyright notice.
10149 * djgpp/README.in: Likewise.
10150 * djgpp/config.bat: Likewise.
10151 * djgpp/config.site: Likewise.
10152 * djgpp/config_h.sed: Likewise.
10153 * djgpp/djunpack.bat: Likewise.
10154 * djgpp/config.sed: Fix copyright notice to match standard format.
10155 * djgpp/subpipe.h: Likewise.
10156 * lib/bitsetv-print.c: Likewise.
10157 * lib/bitsetv.c: Likewise.
10158 * lib/subpipe.h: Likewise.
10159 * lib/timevar.c: Likewise.
10160 * lib/timevar.h: Likewise.
10161 * djgpp/subpipe.c: Use standard recipe for config.h.
10162 * lib/abitset.c: Likewise.
10163 * lib/bitset.c: Likewise.
10164 * lib/bitset_stats.c: Likewise.
10165 * lib/bitsetv-print.c: Likewise.
10166 * lib/bitsetv.c: Likewise.
10167 * lib/ebitsetv.c: Likewise.
10168 * lib/get-errno.c: Likewise.
10169 * lib/lbitset.c: Likewise.
10170 * lib/subpipe.c: Likewise.
10171 * lib/timevar.c: Likewise.
10172 * lib/vbitset.c: Likewise.
10173 * tests/local.at: Likewise.
10174 * src/scan-gram.l: Don't include verify.h, since system.h does
10175 that for us.
10176 * .x-sc_require_config_h: New file.
10177 * .x-sc_unmarked_diagnostics: New file.
10178
10179 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
10180
10181 Be a bit more systematic about using 'abort'.
10182 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
10183 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
10184 Put 'default: abort ();' before some other case, to satisfy older
10185 pedantic compilers.
10186 * lib/bitset_stats.c (bitset_stats_init): Likewise.
10187 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
10188 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
10189 * src/conflicts.c (resolve_sr_conflict): Likewise.
10190 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
10191 (get_decision_str, get_orientation_str, get_node_alignment_str):
10192 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
10193 (get_linestyle_str, get_arrowstyle_str): Likewise.
10194 * src/conflicts.c (resolve_sr_conflict):
10195 Use a default case rather than one for the one remaining enum
10196 value, to catch invalid enum values as well.
10197 * src/lalr.c (set_goto_map, map_goto):
10198 Prefer "assert (FOO);" to "if (!FOO) abort ();".
10199 * src/nullable.c (nullable_compute, token_definitions_output):
10200 Likewise.
10201 * src/reader.c (packgram, reader): Likewise.
10202 * src/state.c (transitions_to, state_new, state_reduction_find):
10203 Likewise.
10204 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
10205 (symbol_pack): Likewise.
10206 * src/tables.c (conflict_row, pack_vector): Likewise.
10207 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
10208 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
10209 * src/system.h: Don't include <assert.h>.
10210 (assert): New macro.
10211
10212 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
10213 (Destructor Decl, Parser Function, Pure Calling):
10214 Describe rules for braces inside C code more carefully.
10215
10216 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
10217
10218 Fix some porting glitches found by Nelson H. F. Beebe.
10219 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
10220 compilers that don't understand that abort () does not return.
10221 * src/state.c (transitions_to): Likewise.
10222 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
10223 that '#include <cstdlib>' works.
10224 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
10225 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
10226 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
10227 for the benefit of some pre-C99 compilers.
10228
10229 * bootstrap: Undo changes to gnulib files that autoreconf made.
10230
10231 Minor fixups to get 'make maintainer-check' to work.
10232 * configure.ac: Don't use -Wnested-externs, as it's incompatible
10233 with the new verify.h implementation.
10234 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
10235 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
10236 * data/yacc.c (YYUSE): Likewise.
10237 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
10238 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
10239 * src/parse-gram.y (declaration): Don't pass a string constant
10240 to a function that expects char *, since GCC might complain
10241 about the constant value.
10242 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
10243 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
10244 before #defining them.
10245 * tests/glr-regression.at
10246 (Incorrectly initialized location for empty right-hand side in GLR):
10247 In yyerror, use the msg arg.
10248 (Corrupted semantic options if user action cuts parse):
10249 (Incorrect lookahead during deterministic GLR):
10250 (Incorrect lookahead during nondeterministic GLR):
10251 Don't name a local var 'index'; it shadows string.h's 'index'.
10252
10253 2006-01-19 Akim Demaille <akim@epita.fr>
10254
10255 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
10256 location, not just parts of it.
10257
10258 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
10259
10260 * NEWS: Document the fact that multiple %unions are now allowed.
10261 * doc/bison.texinfo (Union Decl): Likewise.
10262 * TODO: This feature is now implemented, so remove it from
10263 the wishlist.
10264
10265 * Makefile.maint: Merge with coreutils Makefile.maint.
10266 (CVS_LIST): Use build-aux version if available.
10267 (VERSION_REGEXP): New macro.
10268 (syntax-check-rules): Add sc_no_if_have_config_h,
10269 sc_prohibit_assert_without_use, sc_require_config_h,
10270 sc_useless_cpp_parens.
10271 (sc_obsolete_symbols): Check for O_NDELAY.
10272 (sc_dd_max_sym_length): Track coreutils.
10273 (sc_unmarked_diagnostics): Look in all files, not just *.c.
10274 (sc_useless_cpp_parens): New rule.
10275 (news-date-check): Look for version or today's date.
10276 (changelog-check): Don't require version number near head.
10277 (copyright-check): Use current year instead of hardwiring 2005.
10278 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
10279 (announcement): Add --gpg-key-ID.
10280
10281 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
10282 with "file system".
10283
10284 Avoid undefined behavior that addressed just before the start of an
10285 array. Problem reported by twlevo.
10286 * src/reader.c (packgram): Prepend a new sentinel before ritem.
10287 * src/lalr.c (build_relations): Rely on new sentinel.
10288 * src/gram.c (gram_free): Adjust to new sentinel.
10289
10290 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
10291
10292 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
10293 yylookaheadNeeds. All uses updated.
10294 (yysplitStack): Rename local yynewLookaheadStatuses to
10295 yynewLookaheadNeeds.
10296 * data/glr-regression.at (Incorrect lookahead during nondeterministic
10297 GLR): In comments, change `lookahead status' to `lookahead need'.
10298
10299 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10300
10301 * data/glr.c (yysplitStack): A little stylistic rewrite.
10302
10303 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10304
10305 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
10306
10307 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
10308
10309 * doc/bison.texinfo: Fix some typos.
10310 (GLR Semantic Actions): New subsection discussing special
10311 considerations because GLR semantic actions might be deferred.
10312 (Actions): Mention look-ahead usage of yylval.
10313 (Actions and Locations): Mention look-ahead usage of yylloc.
10314 (Special Features for Use in Actions): Add YYEOF entry and mention it
10315 in the yychar entry.
10316 In the yychar entry, remove mention of the local yychar case (pure
10317 parser) since this is irrelevant information when writing semantic
10318 actions and since it's already discussed in `Table of Symbols' where
10319 yychar is otherwise described as an external variable.
10320 In the yychar entry, don't call it the `current' look-ahead since it
10321 isn't when semantic actions are deferred.
10322 In the yychar and yyclearin entries, add note about deferred semantic
10323 actions.
10324 Add yylloc and yylval entries discussing look-ahead usage.
10325 (Look-Ahead Tokens): When discussing yychar, don't call it the
10326 `current' look-ahead, and do mention yylval and yylloc.
10327 (Error Recovery): Cross-reference `Action Features' when mentioning
10328 yyclearin.
10329 (Table of Symbols): In the yychar entry, don't call it the `current'
10330 look-ahead.
10331 In the yylloc and yylval entries, mention look-ahead usage.
10332
10333 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
10334
10335 * tests/glr-regression.at: Update copyright year to 2006.
10336
10337 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
10338
10339 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
10340 use during nondeterministic operation to track which stacks have
10341 actually needed the current lookahead.
10342 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
10343 Allocate, deallocate, resize, and otherwise shuffle space for
10344 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
10345 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
10346 appropriately during nondeterministic operation.
10347 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
10348 members to store the current lookahead to be used by the deferred
10349 user action.
10350 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
10351 from which the RHS is taken. Set the lookahead members of the new
10352 yySemanticOption according to the lookahead status for stack yyk.
10353 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
10354 yyaddDeferredAction.
10355 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
10356 members of yySemanticOption before invoking yyuserAction, and then set
10357 them back to their current values afterward.
10358 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
10359 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
10360 * tests/glr-regression.at: Remove `.' from the ends of recent test case
10361 titles for consistency.
10362 (Leaked merged semantic value if user action cuts parse): In order to
10363 suppress lint warnings, use arguments in merge function, and assign
10364 char value < 128 in main.
10365 (Incorrect lookahead during deterministic GLR): New test case.
10366 (Incorrect lookahead during nondeterministic GLR): New test case.
10367
10368 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
10369
10370 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
10371 !yyvaluep as signal that no semantic value is available to print.
10372 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
10373 to print a semantic value.
10374
10375 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
10376
10377 * tests/glr-regression.at: For consistency with my newer test cases,
10378 don't thank myself.
10379
10380 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
10381
10382 * data/glr.c (yyresolveValue): When merging semantic options, if at
10383 least one user action succeeds but a later one cuts the parse, then
10384 destroy the semantic value before returning rather than leaking it.
10385 (yyresolveStates): If a user action cuts the parse and thus
10386 yyresolveValue fails, ignore the (unset) semantic value rather than
10387 corrupting the yyGLRState, and empty the semantic options list since
10388 the user actions should have called all necessary destructors.
10389 Simplify code with YYCHK.
10390 * tests/glr-regression.at (Corrupted semantic options if user action
10391 cuts parse): New test case.
10392 (Undesirable destructors if user action cuts parse): New test case.
10393 Before applying any of this patch, this test case never actually failed
10394 for me... but only because the corrupted semantic options usually
10395 masked this bug.
10396 (Leaked merged semantic value if user action cuts parse): New test
10397 case.
10398
10399 2006-01-05 Akim Demaille <akim@epita.fr>
10400
10401 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
10402
10403 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
10404
10405 * data/c.m4 (b4_c_modern): New macro, with a new provision for
10406 _MSC_VER. Problem reported by Cenzato Marco.
10407 (b4_c_function_def): Use it.
10408 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
10409 b4_c_modern.
10410 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
10411 than rolling our own.
10412
10413 2006-01-04 Akim Demaille <akim@epita.fr>
10414
10415 Also warn about non-used mid-rule values.
10416 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
10417 member.
10418 (symbol_list_new): Adjust.
10419 * src/reader.c (symbol_typed_p): New.
10420 (grammar_rule_check): Use it.
10421 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
10422 Check its rule.
10423 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
10424 Use it.
10425 * tests/actions.at (Exotic Dollars): Adjust.
10426
10427 2006-01-04 Akim Demaille <akim@epita.fr>
10428
10429 * src/reader.c (grammar_midrule_action): If $$ is set in a
10430 mid-rule, move the `used' bit to its lhs.
10431 * tests/input.at (Unused values): New.
10432 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
10433
10434 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
10435
10436 * doc/bison.texinfo (Bison Options): Say more accurately what
10437 --yacc does.
10438 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
10439 about declarations in the grammar when in Yacc mode, as POSIX does
10440 not require a diagnostic when the grammar uses extensions.
10441
10442 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
10443
10444 Warn about dubious constructions like "%token T T".
10445 Reported by twlevo.
10446 * src/symtab.h (struct symbol.declared): New member.
10447 * src/symtab.c (symbol_new): Initialize it to false.
10448 (symbol_class_set): New arg DECLARING, specifying whether
10449 this is a declaration that we want to warn about, if there
10450 is more than one of them. All uses changed.
10451
10452 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
10453 Allow multiple %union directives, whose contents concatenate.
10454 * src/parse-gram.y (grammar_declaration): Likewise.
10455 Use muscle_code_grow, so that we don't need stype_line any more.
10456 All uses changed.
10457
10458 * src/muscle_tab.c (muscle_grow): Fix comment.
10459
10460 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
10461 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
10462 Update copyright year to 2006.
10463
10464 2006-01-03 Akim Demaille <akim@epita.fr>
10465
10466 Have glr.cc pass (some of) the calc.at tests.
10467 * data/glr.cc (b4_parse_param_orig): New.
10468 (b4_parse_param): Improve its definition, and bound it more
10469 clearly in the skeleton.
10470 (b4_epilogue): Append, instead of prepending, in order to keep
10471 #line consistency.
10472 Simplify the generation of auxiliary functions: locations and
10473 purity are mandated.
10474 (b4_global_tokens_and_yystype): Honor it.
10475 * data/location.cc (c++.m4): Don't include it.
10476 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
10477 and AT_SKEL_CC_IF.
10478 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
10479 AT_LALR1_CC_IF.
10480 Be sure to initialize the first position's filename.
10481 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
10482 mandated anyway.
10483 (AT_CHECK_CALC_GLR_CC): New.
10484 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
10485
10486 2006-01-02 Akim Demaille <akim@epita.fr>
10487
10488 * src/output.c (output_skeleton): Don't hard wire the inclusion of
10489 c.m4.
10490 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
10491 * data/glr.cc: Do not include stack.hh.
10492
10493 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
10494
10495 * data/glr.c: Reformat whitespace with tabs.
10496 (b4_lpure_formals): Remove this unused m4 macro.
10497 * tests/cxx-type.at: Reformat whitespace with tabs.
10498 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
10499 since it's a member. Rename type to isNterm for clarity.
10500
10501 2005-12-29 Akim <akim@sulaco.local>
10502
10503 Let glr.cc catch up with symbol_value_print.
10504 * data/glr.cc (b4_yysymprint_generate): Replace by...
10505 (b4_yy_symbol_print_generate): this.
10506 (yy_symbol_print, yy_symbol_value_print): Declare them.
10507
10508 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
10509
10510 * src/location.h (boundary): Note that a line or column equal
10511 to INT_MAX indicates an overflow.
10512 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
10513 (rule_length_overflow, increment_rule_length, add_column_width):
10514 New functions.
10515 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
10516 (<SC_BRACED_CODE>"}"):
10517 Use increment_rule_length rather than incrementing it by hand.
10518 (adjust_location, handle_syncline): Diagnose overflow.
10519 (handle_action_dollar, handle_action_at):
10520 Fix bug with monstrosities like $-2147483648.
10521 Remove now-unnecessary checks.
10522 (scan_integer): Verify assumptions and remove now-unnecessary checks.
10523 (convert_ucn_to_byte): Verify assumptions.
10524 (handle_syncline): New arg LOC. All callers changed.
10525 Don't store through a value derived from char const * pointer.
10526
10527 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
10528 GCC warnings.
10529
10530 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
10531
10532 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
10533 Remove unnecessary forward static decls.
10534
10535 2005-12-27 Akim Demaille <akim@epita.fr>
10536
10537 * src/reader.c (grammar_current_rule_check): Also check that $$
10538 is used.
10539 Take the rule to check as argument, hence rename as...
10540 (grammar_rule_check): this.
10541 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
10542 Rename as...
10543 (grammar_rule_begin, grammar_rule_end): these, for consistency.
10544 (grammar_midrule_action, grammar_symbol_append): Now static.
10545 * tests/torture.at (input): Don't rely on the default action
10546 being always performed.
10547 * tests/calc.at: "Set" $$ even when the action is "cut" with
10548 YYERROR or other.
10549 * tests/actions.at (Exotic Dollars): Instead of using unused
10550 values, check that the warning is issued.
10551
10552 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
10553
10554 * NEWS: Improve wording for unused-value warnings.
10555
10556 2005-12-22 Akim Demaille <akim@epita.fr>
10557
10558 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
10559 (b4_yysymprint_generate): Rename as...
10560 (b4_yy_symbol_print_generate): this.
10561 Generate yy_symbol_print instead of yysymprint.
10562 Generate also yy_symbol_value_print, and use it.
10563
10564 2005-12-22 Akim Demaille <akim@epita.fr>
10565
10566 * NEWS: Warn about unused values.
10567 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
10568 a `used' member.
10569 (symbol_list_n_get, symbol_list_n_used_set): New.
10570 (symbol_list_n_type_name_get): Use symbol_list_n_get.
10571 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
10572 * src/reader.c (grammar_current_rule_check): Check that values are
10573 used.
10574 * src/symtab.c (symbol_print): Accept 0.
10575 * tests/existing.at: Remove the type information.
10576 Empty the actions.
10577 Remove useless actions (beware of mid-rule actions: perl -000
10578 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
10579 * tests/actions.at (Exotic Dollars): Use unused values.
10580 * tests/calc.at: Likewise.
10581 * tests/glr-regression.at (No users destructors if stack 0 deleted):
10582 Likewise.
10583
10584 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
10585 rule_useful_p.
10586
10587 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
10588
10589 Undo 2005-12-01 tentative license wording change. The wording is
10590 still being reviewed by the lawyers, and we don't want to wait for
10591 them before publishing a test release. For now, revert to the
10592 previous wording.
10593 * NEWS: Undo 2005-12-01 change.
10594 * data/glr.c: Revert to previous license wording.
10595 * data/glr.cc: Likewise.
10596 * data/lalr1.cc: Likewise.
10597 * data/location.cc: Likewise.
10598 * data/yacc.c: Likewise.
10599
10600 * NEWS: Reword %destructor vs YYABORT etc.
10601 * data/glr.c: Use American spacing, for consistency.
10602 * data/glr.cc: Likewise.
10603 * data/lalr1.cc: Likewise.
10604 * data/yacc.c: Likewise.
10605 * data/yacc.c: Reformat comments slightly.
10606 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
10607 for consistency. Fix some spelling errors and reword recently-included
10608 text slightly.
10609 * tests/cxx-type.at: Cast results of malloc, for C++.
10610
10611 2005-12-21 Joel E. Denny <address@hidden>
10612
10613 * tests/cxx-type.at: Construct a tree, count the parents of shared
10614 nodes, and free each node once and only once. Previously, the memory
10615 for semantic values was leaked instead.
10616
10617 2005-12-21 Joel E. Denny <address@hidden>
10618
10619 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
10620 (yylval, yylloc): If pure, #define to yystackp->yyval and
10621 yystackp->yyloc similar to yychar and yynerrs.
10622 (yyparse): If pure, remove local yylval and yylloc. Add local
10623 yystackp to accommodate pure definitions of yylval and yylloc.
10624 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
10625 yylvalp and yyllocp to &yylval and &yylloc.
10626 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
10627 namespace. Previously, nerrs and char were missing, but lval and lloc
10628 weren't necessary.
10629 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
10630 yylvalp and yyllocp parameters since, if pure, these are now always
10631 accessible through yystackp. If not pure, they are still accessible
10632 globally.
10633 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
10634 `if (YYID (N))' to pacify lint.
10635
10636 2005-12-21 Akim Demaille <akim@epita.fr>
10637
10638 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
10639 destroy the RHS symbols of a rule.
10640 * data/yacc.c (yylen): Initialize to 0.
10641 Keep its value to the number of items to possibly shift.
10642 In particular, a regular successful parse that ends on YYFINAL by
10643 a (internal) YYACCEPT must not have yylen != 0.
10644 (yyerrorlab, yyreturn): Pop the RHS.
10645 Reorder a bit to emphasize the `shifting' bits of code.
10646 (YYPOPSTACK): Now accept a number of items to pop.
10647 * data/lalr1.cc: Likewise.
10648 * data/glr.c: Formatting changes.
10649 Use goto instead of fall through.
10650 * doc/bison.texinfo (Destructor Decl): Complete.
10651
10652 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
10653
10654 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
10655 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
10656 * djgpp/config.bat: Replace every occurence of the file name
10657 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
10658 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
10659 * djgpp/config.sed: Replace every occurence of the file name
10660 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
10661 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
10662 * djgpp/djunpack.bat: DJGPP specific file.
10663 * djgpp/fnchange.lst: DJGPP specific file.
10664 * djgpp/README.in: Add new information about how to unpack the bison
10665 source on MSDOS and other systems which have 8.3 file name restrictions
10666 using djunpack.bat and fnchange.lst.
10667
10668 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
10669
10670 * bootstrap (build_cvs_prefix): Remove; unused.
10671 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
10672 when getting gnulib.
10673
10674 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
10675
10676 * data/glr.c: Reorder typedef declarations for structs to match order
10677 of struct declarations.
10678 Rename yystack everywhere to yystackp except in yyparse where it's not
10679 a pointer.
10680 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
10681 consistency.
10682 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
10683 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
10684 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
10685 lint.
10686
10687 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
10688
10689 * tests/sets.at (Accept): Fix typos in regular expression used to
10690 sed out the final state number.
10691
10692 Work around portability problem on Solaris 10: flex-generated
10693 files include <stdio.h> before <config.h>, which messes up
10694 because the latter defines __EXTENSIONS__. Address the problem
10695 by creating two new little files that include <config.h> first,
10696 then include the flex-generated files. Rewrite everyone else
10697 to include <config.h> first, as well.
10698 * lib/timevar.c: Always include "config.h".
10699 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
10700 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
10701 (EXTRA_bison_SOURCES): New macro.
10702 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
10703 * src/system.h: Don't include config.h.
10704 * src/LR0.c: Include <config.h> first.
10705 * src/assoc.c: Likewise.
10706 * src/closure.c: Likewise.
10707 * src/complain.c: Likewise.
10708 * src/conflicts.c: Likewise.
10709 * src/derives.c: Likewise.
10710 * src/files.c: Likewise.
10711 * src/getargs.c: Likewise.
10712 * src/gram.c: Likewise.
10713 * src/lalr.c: Likewise.
10714 * src/location.c: Likewise.
10715 * src/main.c: Likewise.
10716 * src/muscle_tab.c: Likewise.
10717 * src/nullable.c: Likewise.
10718 * src/output.c: Likewise.
10719 * src/parse-gram.y: Likewise.
10720 * src/print.c: Likewise.
10721 * src/print_graph.c: Likewise.
10722 * src/reader.c: Likewise.
10723 * src/reduce.c: Likewise.
10724 * src/relation.c: Likewise.
10725 * src/state.c: Likewise.
10726 * src/symlist.c: Likewise.
10727 * src/symtab.c: Likewise.
10728 * src/tables.c: Likewise.
10729 * src/uniqstr.c: Likewise.
10730 * src/vcg.c: Likewise.
10731
10732 * src/parse-gram.y: Fix minor problems uncovered by lint.
10733 (current_lhs, current_lhs_location): Now static.
10734 (current_assoc): Remove unused variable.
10735
10736 Cleanups so that Bison-generated parsers have less lint.
10737 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
10738 Prepend /*ARGSUSED*/, for lint's sake.
10739 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
10740 definition if 'lint' is defined.
10741 (YYID): New macro (or function, if lint).
10742 All uses of /*CONSTCOND*/0 replaced by YYID(0).
10743 * data/yacc.c: Likewise.
10744 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
10745 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
10746 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
10747 is C++ only.
10748 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
10749 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
10750 Use YYID(0) rather than 0, for lint.
10751 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
10752 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
10753
10754 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
10755
10756 * tests/glr-regression.at
10757 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10758 Close memory leak reported by twlevo.
10759
10760 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
10761
10762 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
10763 all stacks.
10764 (yyparse): Iterate another stack in order to call user destructors.
10765 * tests/glr-regression.at (No users destructors if stack 0 deleted):
10766 New test case.
10767 (Duplicated user destructor for lookahead): This test now is expected
10768 to succeed.
10769
10770 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
10771
10772 * NEWS: Document the following change.
10773 * data/yacc.c: Say "parser skeleton" rather than "file", since
10774 it's no longer just a file.
10775 * data/glr.c: Grant a special exception for C GLR parsers, that
10776 reads like the already-existing exception for C LALR(1) parsers.
10777 * data/glr.cc: Likewise.
10778 * data/lalr1.cc: Likewise.
10779 * data/location.cc: Likewise.
10780 * data/yacc.c: Reword the "written by" statement to clarify that
10781 it was the parser skeleton, not the entire output file.
10782 * data/glr.c: Written by Paul Hilfinger.
10783 * data/glr.cc: Written by Akim Demaille.
10784 * data/lalr1.cc: Likewise.
10785
10786 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
10787
10788 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
10789 Fix typos in previous change that broke 'make check'.
10790 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
10791 supported in C.
10792 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
10793 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
10794 We can revert this once things settle down.
10795
10796 * src/conflicts.c (conflicts_print): Don't print file name twice
10797 when %expect fails because there were no conflicts.
10798 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
10799 change.
10800 * tests/conflicts.at (%expect not enough, %expect too much):
10801 (%expect with reduce conflicts): Adjust to new behavior.
10802
10803 2005-11-18 Akim Demaille <akim@epita.fr>
10804
10805 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
10806 errors.
10807 * NEWS: Document this.
10808 * doc/bison.texinfo (Expect Decl): Likewise.
10809
10810 2005-11-16 Akim Demaille <akim@epita.fr>
10811
10812 Generalize the display of semantic values and locations in traces.
10813 * data/glr.c (yy_reduce_print): Fix indices (again).
10814 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
10815 literal integers.
10816 * data/lalr1.cc (yyreduce_print): Rename as...
10817 (yy_reduce_print): this.
10818 Display values and locations.
10819 * data/yacc.c (yy_reduce_print): Likewise.
10820 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
10821 (yysymprint): Move higher to be visible from yy_reduce_print).
10822 (yyparse): Adjust.
10823 * tests/calc.at: Adjust the expected length of the traces.
10824
10825 2005-11-14 Akim Demaille <akim@epita.fr>
10826
10827 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
10828 from 1 to N, while values and location start at 0.
10829 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
10830
10831 2005-11-14 Akim Demaille <akim@epita.fr>
10832
10833 * data/glr.c (yy_reduce_print): Fix the $ number.
10834
10835 2005-11-14 Akim Demaille <akim@epita.fr>
10836
10837 "Use" parse parameters.
10838 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
10839 * data/glr.c, data/glr.cc: Use them.
10840 * data/glr.c (YYUSE): Have a C++ definition that supports
10841 non-pointer types.
10842
10843 2005-11-14 Akim Demaille <akim@epita.fr>
10844
10845 * data/glr.c (yyexpandGLRStack): Declare only if defined.
10846
10847 2005-11-14 Akim Demaille <akim@epita.fr>
10848
10849 * data/glr.cc: New.
10850 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
10851
10852 2005-11-12 Akim Demaille <akim@epita.fr>
10853
10854 Let position and location be PODs.
10855 * data/location.cc (position::initialize, location::initialize): New.
10856 (position::position, location::location): Define only if
10857 b4_location_constructors is defined.
10858 * data/lalr1.cc (b4_location_constructors): Define it for backward
10859 compatibility.
10860 * doc/bison.texinfo (Initial Action Decl): Use initialize.
10861
10862 2005-11-12 Akim Demaille <akim@epita.fr>
10863
10864 * data/lalr1.cc: Move the body of the ctor and dtor into the
10865 parser file (instead of the header).
10866 Wrap the implementations in a "namespace yy".
10867
10868 2005-11-12 Akim Demaille <akim@epita.fr>
10869
10870 Have glr.c include its header file when created.
10871 * data/glr.c (b4_shared_declarations): New.
10872 Output them verbatim in the parser if !%defines, otherwise
10873 output then in the header file, and include it instead.
10874
10875 2005-11-11 Akim Demaille <akim@epita.fr>
10876
10877 * data/glr.c: Comment changes.
10878
10879 2005-11-11 Akim Demaille <akim@epita.fr>
10880
10881 When yydebug, report semantic and location values for reductions.
10882 * data/glr.c (yy_reduce_print): Report the semantic values and the
10883 locations.
10884 (YY_REDUCE_PRINT): Adjust.
10885 (yyglrReduce): Use them.
10886 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
10887 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
10888 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
10889 traces.
10890
10891 2005-11-10 Akim Demaille <akim@epita.fr>
10892
10893 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
10894 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
10895 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
10896
10897 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
10898
10899 * m4/cxx.m4, examples/Makefile.am: Don't build
10900 examples/calc++ if no C++ compiler is available. (trivial change)
10901
10902 2005-11-09 Akim Demaille <akim@epita.fr>
10903
10904 * src/scan-skel.l: Use a couple of asserts.
10905
10906 2005-11-03 Akim Demaille <akim@epita.fr>
10907
10908 In some (weird) cases, the final state number is incorrect.
10909 Reported by Alexandre Duret-Lutz.
10910 * src/LR0.c (state_list_append): Remove the computation of
10911 final_state.
10912 (save_reductions): Do it here.
10913 (get_state): Alpha conversion.
10914 (generate_states): Use a for loop.
10915 * src/gram.h (item_number_is_rule_number)
10916 (item_number_is_symbol_number): New.
10917 * src/state.c: Use assert.
10918 * src/system.h: Include assert.h.
10919 * tests/sets.at (Accept): New.
10920
10921 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10922
10923 * data/glr.c (yyfill): Adjust comment.
10924 (yyresolveAction): Initialize default location properly
10925 for empty right-hand sides.
10926 (yydoAction): Ditto.
10927 Add comment explaining apparently dead code.
10928 * tests/glr-regression.at
10929 (Incorrectly initialized location for empty right-hand side in GLR):
10930 New test.
10931
10932 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
10933
10934 * bootstrap (cleanup_gnulib): New function. Use it to clean up
10935 gnulib when interrupted. This fixes some race conditions and
10936 works around some portability problems (one noted by Paul
10937 Hilfinger).
10938
10939 2005-10-22 Akim <akim@epita.fr>
10940
10941 * Makefile.cfg: Adjust to config -> build-aux.
10942 Reported by twledo.
10943
10944 2005-10-21 Akim Demaille <akim@epita.fr>
10945
10946 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
10947 the %parse-params.
10948 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
10949 * data/yacc.c (b4_Pure_if): Rename as...
10950 (b4_yacc_pure_if): this.
10951 (YY_SYMBOL_PRINT, yyparse): Adjust.
10952 * doc/bison.texinfo: Formatting changes.
10953
10954 2005-10-21 Akim Demaille <akim@epita.fr>
10955
10956 Finish the transition config -> build-aux.
10957 * configure.ac, Makefile.am: Use build-aux.
10958 * config/prev-version, config/announce-gen, config/Makefile.am:
10959 Move to...
10960 * build-aux/prev-version, build-aux/announce-gen,
10961 * build-aux/Makefile.am: here.
10962
10963 2005-10-14 Akim Demaille <akim@epita.fr>
10964
10965 * examples/calc++/test: Use set -x only when VERBOSE.
10966
10967 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
10968
10969 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
10970 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
10971
10972 2005-10-13 Akim Demaille <akim@epita.fr>
10973
10974 * src/scan-skel.l: Output the base name parts of the parser and
10975 header file names.
10976 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
10977 additional checks.
10978 Use this to exercise C++ outputs in subdirs.
10979 Reported by Oleg Smolsky.
10980
10981 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
10982
10983 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
10984 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
10985 Problem reported by John P. Hartmann.
10986 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
10987 already defined it.
10988
10989 2005-10-12 Akim Demaille <akim@epita.fr>
10990
10991 * src/parse-gram.y (version_check): Exit 63 to please missing
10992 (stands for "version mismatch).
10993 * tests/input.at, doc/bison.texinfo: Adjust.
10994
10995 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
10996
10997 Work around portability problems with Visual Age C compiler
10998 (xlc and xlC_r) reported by John P. Hartmann.
10999 * data/location.cc (initial_column, initial_line): Remove.
11000 All uses replaced by 0 and 1.
11001 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
11002 that xlc complains about.
11003 * src/scan-skel.l (skel_wrap): Likewise.
11004 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
11005 as __STDC__.
11006 * data/yacc.c (YYMODERN_C): New macro, which also looks at
11007 __STDC_VERSION__. Use it everywhere instead of looking at
11008 __STDC__ and __cplusplus.
11009
11010 2005-10-10 Akim Demaille <akim@epita.fr>
11011
11012 * examples/calc++/test: Be quiet unless VERBOSE.
11013
11014 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
11015
11016 * data/c.m4 (yydestruct, yysymprint):
11017 Use YYUSE instead of casting to void.
11018 * data/glr.c (YYUSE): New macro.
11019 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
11020 Use it instead of rolling our own.
11021 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
11022 (YYCHK1):
11023 Use /*CONSTCOND*/ to suppress lint warnings.
11024 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
11025 (YY_STACK_PRINT): Use 'false' not '0'.
11026 (YYUSE): New macro.
11027 (yysymprint_, yydestruct_): Use it instead of rolling our own.
11028 * data/yacc.c (YYUSE): New macro.
11029 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
11030 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
11031 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
11032
11033
11034 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
11035 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
11036
11037 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
11038
11039 Undo the parts of the unlocked-I/O change that substituted
11040 putc or puts for printf. This might hurt performance a bit,
11041 but some people prefer the printf style.
11042 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
11043 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
11044 All uses replaced by YYFPRINTF and YYDPRINTF.
11045 * data/yacc.c: Likewise.
11046 * lib/bitset.c (bitset_print): Likewise.
11047 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
11048 putc and puts.
11049 * lib/lbitset.c (debug_lbitset): Likewise.
11050 * src/closure.c (print_firsts, print_fderives): Likewise.
11051 * src/gram.c (grammar_dump): Likewise.
11052 * src/lalr.c (look_ahead_tokens_print): Likewise.
11053 * src/output.c (escaped_output): Likewise.
11054 (user_actions_output): Break apart two printfs.
11055 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
11056 * src/reduce.c (reduce_print): Likewise.
11057 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
11058 * src/system.h: Include unlocked-io.h rathe than stdio.h.
11059
11060 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
11061 Use assignments rather than casts-to-void to suppress
11062 unused-variable warnings. This pacifies 'lint'.
11063 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
11064 unused-variable warnings.
11065
11066 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
11067
11068 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
11069
11070 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
11071
11072 Use unlocked I/O for a minor performance improvement on hosts like
11073 GNU/Linux and Solaris that support unlocked I/O. The basic idea
11074 is to use the gnlib unlocked-io module, and to prefer putc and
11075 puts to printf when either will work (since the latter doesn't
11076 come in an unlocked flavor).
11077 * bootstrap (gnulib_modules): Add unlocked-io.
11078 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
11079 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
11080 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
11081 and similarly for puts and putc and printf.
11082 * data/yacc.c: Likewise.
11083 * lib/bitset.c (bitset_print): Likewise.
11084 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
11085 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
11086 to printf.
11087 * lib/lbitset.c (debug_lbitset): Likewise.
11088 * src/closure.c (print_firsts, print_fderives): Likewise.
11089 * src/gram.c (grammar_dump): Likewise.
11090 * src/lalr.c (look_ahead_tokens_print): Likewise.
11091 * src/output.c (escaped_output): Likewise.
11092 (user_actions_output): Coalesce two printfs.
11093 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
11094 * src/reduce.c (reduce_print): Likewise.
11095 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
11096 * src/system.h: Include unlocked-io.h rather than stdio.h.
11097
11098 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
11099 this confuses xgettext.
11100
11101 2005-10-02 Akim Demaille <akim@epita.fr>
11102
11103 * bootstrap (gnulib_modules): Add strverscmp.
11104 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
11105 * m4/.cvsignore: Add strverscmp.m4.
11106 * src/parse-gram.y (%require): New token, new rule.
11107 (version_check): New.
11108 * src/scan-gram.l (%require): Adjust.
11109 * tests/input.at (AT_REQUIRE): New.
11110 Use it.
11111 * doc/bison.texinfo (Require Decl): New.
11112 (Calc++ Parser): Use %require.
11113
11114 2005-10-02 Akim Demaille <akim@epita.fr>
11115
11116 * data/location.cc: New.
11117
11118 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
11119 Akim Demaille <akim@epita.fr>
11120
11121 Make sure -odir/foo.cc creates dir/location.hh etc.
11122 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
11123 (spec_file_prefix, spec_verbose_file, spec_graph_file)
11124 (spec_defines_file): Now const.
11125 (dir_prefix): New.
11126 (short_base_name): Remove.
11127 * src/files.c: Adjust.
11128 (dirname.h): Include.
11129 (base_name): Don't prototype it.
11130 (finput): Remove, duplicates gram_in.
11131 (full_base_name, short_base_name): Replace by...
11132 (all_but_ext, all_but_tab_ext): these.
11133 (compute_base_names): Rename as...
11134 (compute_file_name_parts): this.
11135 Update to compute the new variables, including dir_prefix.
11136 Adjust dependencies.
11137 * src/output.c (prepare): Output them.
11138 * src/reader.c: Adjust to use gram_in, not finput.
11139 * src/scan-skel.l (@dir_prefix@): New.
11140
11141 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
11142
11143 * lib/subpipe.c: New function end_of_output_subpipe() added
11144 to allow support for non-posix systems. This is a no-op function
11145 for posix systems.
11146
11147 * lib/subpipe.h: New function end_of_output_subpipe() added
11148 to allow support for non-posix systems. This is a no-op function
11149 for posix systems.
11150
11151 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
11152 handle the lack of pipe/fork functionality on non-posix systems.
11153
11154 * djgpp/Makefile.maint: DJGPP specific file.
11155
11156 * djgpp/README.in: DJGPP specific file.
11157
11158 * djgpp/config.bat: DJGPP specific configuration file.
11159
11160 * djgpp/config.sed: DJGPP specific configuration file.
11161
11162 * djgpp/config.site: DJGPP specific configuration file.
11163
11164 * djgpp/config_h.sed: DJGPP specific configuration file.
11165
11166 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
11167
11168 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
11169
11170 2005-10-02 Akim Demaille <akim@epita.fr>
11171
11172 * data/location.cc: New, extract from...
11173 * data/lalr1.cc: here.
11174 (location.hh): Include it after the user prologue, in case the
11175 filename type is defined by the user.
11176 Forward declation location and position before the pre-prologue.
11177 (yyresult_): Rename as...
11178 (yyresult): this, it's a local variable, not an attribute.
11179 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
11180
11181 2005-10-01 Akim Demaille <akim@epita.fr>
11182
11183 * examples/extexi: Restore the #line generation.
11184
11185 2005-09-30 Akim Demaille <akim@epita.fr>,
11186 Alexandre Duret-Lutz <adl@gnu.org>
11187
11188 Move the token type and YYSTYPE in the parser class.
11189 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
11190 (parser::token): New, from the moved free definition of tokens.
11191 (parser::semantic_value): Now a full definition instead of an
11192 indirection to YYSTYPE.
11193 (b4_post_prologue): No longer included in the header file, but
11194 in the implementation file.
11195 * doc/bison.texi (C+ Language Interface): Update.
11196 * src/parse-gram.y: Support unary %define.
11197 * tests/actions.at: Define global_tokens_and_yystype for backward
11198 compatibility until we update the tests.
11199 * tests/calc.at: Idem.
11200 (first_line, first_column, last_line, last_column): Define for lalr1.cc
11201 to simplify the code.
11202
11203 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
11204
11205 Port to SunOS 4.1.4, which lacks strtoul and strerror.
11206 Ah, the good old days! Problem reported by Peter Klein.
11207 * bootstrap (gnulib_modules): Add strerror, strtoul.
11208 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
11209 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
11210
11211 2005-09-29 Akim Demaille <akim@epita.fr>
11212
11213 * data/c.m4 (b4_error_verbose_if): New.
11214 * data/lalr1.cc: Use it.
11215 (YYERROR_VERBOSE_IF): Remove.
11216 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
11217 parser members, replaced by...
11218 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
11219 local variables.
11220 (yysyntax_error_): Takes the state number as argument.
11221 (yyreduce_print_): Use the argument yyrule, not the former
11222 attribute yyn_.
11223
11224 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
11225
11226 * bootstrap (gnulib_modules): Add verify.
11227 * lib/.cvsignore: Add verify.h.
11228 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
11229 * src/system.h (verify): Remove.
11230 Include verify.h instead.
11231 * src/tables.c (tables_generate): Use new API for 'verify'.
11232
11233 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
11234
11235 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
11236 local variables whose names begin with 'yy'.
11237 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
11238 Trivial changes from Joel E. Denny.
11239
11240 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
11241 it itself.
11242 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
11243 don't use alloca any more.
11244
11245 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
11246 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
11247 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
11248 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
11249 to match yacc.c, to test more hosts.
11250
11251 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
11252
11253 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
11254 doesn't affect behavior.
11255 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
11256 Solaris, AIX, MSC.
11257 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
11258 This works a bit better with glibc, if user code has already included
11259 stdlib.h.
11260 * doc/bison.texinfo (Bison Parser): Document that users can't
11261 arbitrarily use malloc and free for other purposes. Document
11262 that <alloca.h> and <malloc.h> might be included.
11263 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
11264 user must declare alloca.
11265
11266 * HACKING (release): Forwarn the Translation Project about
11267 stable releses.
11268
11269 2005-09-20 Akim Demaille <akim@epita.fr>
11270
11271 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
11272
11273 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
11274
11275 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
11276 (YYSTACK_ALLOC_MAXIMUM): Use it.
11277 (yysyntax_error): New function.
11278 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
11279 multiple syntax errors are reported, and alloca is being used.
11280 Instead, reallocate buffers twice as big each time, so that
11281 we waste at most half the allocated memory. Start with a small
11282 (128-byte) buffer that will suffice in most cases anyway.
11283 Use yysyntax_error to do most of the work.
11284
11285 * doc/bison.texinfo (Error Reporting, Table of Symbols):
11286 yynerrs is the number of errors reported, not the number of
11287 errors encountered.
11288
11289 * tests/glr-regression.at (Duplicated user destructor for lookahead):
11290 Mark it as expected to fail.
11291 Cast result of malloc; problem reported by twlevo@xs4all.nl.
11292 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
11293 Don't start user-code symbols with "yy", to avoid name space problems.
11294
11295 2005-09-19 Akim Demaille <akim@epita.fr>
11296
11297 Remove the traits, failed experiment.
11298 It never proved useful, and anyway because of the current
11299 definition, it was not possible to have several specialization of
11300 this traits, making it useless.
11301 * data/lalr1.cc (yy:traits): Remove.
11302 Inline its definitions in the parser class.
11303
11304 2005-09-19 Akim Demaille <akim@epita.fr>
11305
11306 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
11307 least Mac OSX with a /usr/local install of gettext.
11308
11309 2005-09-19 Akim Demaille <akim@epita.fr>
11310
11311 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
11312 and yytoken for similarity with the other skeletons.
11313
11314 2005-09-19 Akim Demaille <akim@epita.fr>
11315
11316 * NEWS, configure.ac: update version number to 2.1a.
11317
11318 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
11319
11320 * NEWS: Version 2.1.
11321
11322 * NEWS: Remove notice of yytname change, since it was never in an
11323 official release.
11324 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
11325 diagnostic.
11326 * src/output.c (prepare): Likewise.
11327 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
11328 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
11329 is not defined. This is an awful hack, but it's enough for now.
11330 All callers changed.
11331 * tests/glr-regression-at (make_value): Args are const pointers now,
11332 to avoid GCC warning.
11333 (Duplicated user destructor for lookahead): New test. Currently
11334 skipped. It fails on my host but I'm not sure it'll always fail.
11335
11336 2005-09-16 Akim Demaille <akim@epita.fr>
11337
11338 * src/symtab.h (struct symbol): Declare the printer and destructor
11339 as const, to avoid accidental calls to free.
11340 (symbol_destructor_set, symbol_printer_set): Adjust.
11341 * src/symtab.c: Adjust.
11342
11343 2005-09-16 Akim Demaille <akim@epita.fr>
11344
11345 * data/c.m4 (b4_token_enums): New.
11346 (b4_token_defines): Rename as...
11347 (b4_token_enums_defines): this.
11348 (b4_token_defines): New, output only the #defines.
11349 * data/yacc.c, data/glr.c: Adjust.
11350 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
11351 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
11352 as default values.
11353
11354 2005-09-16 Akim Demaille <akim@epita.fr>
11355
11356 * data/lalr1.cc (yylex_): Remove, inline its code.
11357 (yyreport_syntax_error_): Remove, replaced by...
11358 (yysyntax_error_): this which returns a string and leaves to the
11359 caller the call to the users' error function.
11360 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
11361 Move from members of the parser object...
11362 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
11363 to local variables of the parse function.
11364
11365 2005-09-16 Akim Demaille <akim@epita.fr>
11366
11367 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
11368 since it's in Bison's name space.
11369
11370 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
11371
11372 * data/glr.c (yyresolveValue): Add default case to pacify
11373 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
11374
11375 * NEWS: Document when yyparse started to return 2.
11376 * doc/bison.texinfo (Parser Function): Document when yyparse
11377 returns 2.
11378
11379 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
11380 (b4_filename_type): Renamed back from b4_file_name_type. All uses
11381 changed.
11382 (class position): file_name -> filename (reverting). All uses changed.
11383
11384 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
11385
11386 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
11387 do anything if $@ exists. This reverts part of the 2005-07-07
11388 patch.
11389
11390 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
11391
11392 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
11393 contains obsolete information and isn't worth distributing as a
11394 separate file anyway.
11395 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
11396 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
11397 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
11398 (yyparse): Abort if user code uses longjmp to throw an unexpected
11399 value.
11400
11401 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
11402
11403 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
11404 Suggested by twlevo@xs4all.nl.
11405
11406 * data/glr.c (YYCHK1): Do not assume YYE is in range.
11407 This avoids a diagnostic from gcc -Wswitch-enum.
11408 Problem reported by twlevo@xs4all.nl.
11409
11410 * doc/bison.texinfo: Don't use "filename", as per GNU coding
11411 standards. Use "file name" or "file" or "name", depending on
11412 the context.
11413 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
11414 not to hack/foo.tab.c.
11415 (Calc++ Top Level): 2nd arg of main is not const.
11416 * data/glr.c: b4_filename -> b4_file_name.
11417 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
11418 All uses changed.
11419 (class position): filename -> file_name. All uses changed.
11420 * data/yacc.c: b4_filename -> b4_file_name.
11421 * lib/bitset.h: filename -> file_name in local vars.
11422 * lib/bitset_stats.c: Likewise.
11423 * src/files.c: Likewise.
11424 * src/scan-skel.l ("@output ".*\n): Likewise.
11425 * src/files.c (file_name_split): Renamed from filename_split.
11426 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
11427
11428 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
11429
11430 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
11431 to accommodate latest gnulib.
11432
11433 * tests/glr-regression.at (Duplicate representation of merged trees):
11434 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
11435
11436 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
11437 needed.
11438
11439 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
11440
11441 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
11442 All uses changed. Invoke user destructor after an error during a
11443 split parse (trivial change from Joel E. Denny).
11444
11445 * tests/glr-regression.at
11446 (User destructor after an error during a split parse): New test case.
11447 Problem reported by Joel E. Denny in:
11448 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
11449
11450 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
11451
11452 * README-cvs: Give URLs for recommended tools.
11453 Mention Gzip version problem, and bootstrapping issues.
11454 Remove troubleshooting section, as it's somewhat obsolete.
11455
11456 * bootstrap (no_cache): New var, to accommodate different wget
11457 variants. Use it instead of '-C off'. Problem reported by
11458 twlevo@xs4all.nl.
11459
11460 * data/glr.c (yydestroyStackItem): New function.
11461 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
11462 debugging information. Problem reported by Joel E. Denny.
11463
11464 2005-08-25 Akim Demaille <akim@epita.fr>
11465
11466 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
11467
11468 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
11469
11470 * data/glr.c (yyrecoverSyntaxError, yyreturn):
11471 Don't invoke destructor on unresolved entries.
11472 * tests/glr-regression.at
11473 (User destructor for unresolved GLR semantic value): New test case.
11474 Problem reported by Joel E. Denny in:
11475 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
11476
11477 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
11478
11479 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
11480 Add strnlen.c.
11481 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
11482 lib-prefix.m4, po.m4.
11483
11484 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
11485 in yydestruct diagnostic, since it might not be an error.
11486 Problem reported by Joel Denny near end of
11487 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
11488 * data/lalr1.cc (yyerturn): Likewise.
11489 * data/yacc.c (yyreturn): Likewise.
11490 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
11491
11492 * src/files.c: Remove obsolete FIXME comment.
11493
11494 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
11495 with the other templates, and to fix bogus run-on messages such
11496 as the one reported at the end of
11497 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
11498 All callers changed to avoid the newline.
11499 (yyprocessOneStack): Output two lines rather than one, to accommodate
11500 the above change. This changes the debug output format slightly.
11501
11502 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
11503 reported by Joel E. Denny in
11504 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
11505 (trivial change).
11506 * tests/glr-regression.at (Duplicate representation of merged trees):
11507 New test, from Joel E. Denny in:
11508 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
11509 * THANKS: Add Joel E. Denny.
11510
11511 * configure.ac (AC_INIT): Bump to 2.0c.
11512
11513 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
11514
11515 * NEWS: Version 2.0b.
11516
11517 * Makefile.am (SUBDIRS): Put examples before tests, so that
11518 "make check" doesn't finish with "All 1 tests passed".
11519
11520 * tests/regression.at (Token definitions): Don't rely on
11521 AT_PARSER_CHECK for data that contains backslashes. It currently
11522 uses 'echo', and 'echo' isn't portable if its argument contains
11523 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
11524 that the byte '\0xff' is not printable in the C locale; it is,
11525 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
11526 not printable, so use '\0x81' to test.
11527
11528 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
11529 version of GCC, since the macro is used with non-GCC compilers.
11530
11531 Fix core dump reported by Pablo De Napoli in
11532 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
11533 * tests/regression.at (Invalid inputs with {}): New test.
11534 * src/parse-gram.y (token_name): Translate type before using
11535 it as an index.
11536
11537 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
11538 the user's name space. All uses changed to __attribute__
11539 ((__unused__)).
11540 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
11541 Add __attribute__ ((__noreturn__)).
11542
11543 * etc/clcommit: Remove. We weren't using it, and it failed
11544 "make maintainer-distcheck".
11545 * Makefile.maint: Merge from coreutils.
11546 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
11547 (syntax-check-rules): Change list of rules as described below.
11548 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
11549 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
11550 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
11551 (sc_trailing_space): New rules.
11552 (sc_xalloc_h_in_src): Remove.
11553 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
11554 (sc_space_tab, sc_error_exit_success, sc_changelog):
11555 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
11556 (makefile-check, po-check, author_mark_check):
11557 (makefile_path_separator_check, copyright-check):
11558 Use grep -n, to make it easier to find violations.
11559 Use CVS_LIST and CVS_LIST_EXCEPT.
11560 (header_regexp, h_re): Remove.
11561 (dd_c): New macro.
11562 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
11563 (my-distcheck): Use more-modern GCC flags.
11564 (signatures, %.asc): Remove.
11565 (rel-files, announcement): Remove signatures.
11566 Restore old updating code, even though we don't use it, so
11567 that we're the same as coreutils.
11568 (alpha, beta, major): Depend on news-date-check.
11569 Make the upload commands.
11570
11571 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
11572 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
11573 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
11574 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
11575 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
11576 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
11577 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
11578 * tests/sets.at: Likewise.
11579
11580 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
11581 we comment out the Autoconf version number.
11582 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
11583 it's error-prone and "make maintainer-distcheck" rejects it.
11584
11585 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
11586 Indent calls to "error" to pacify "make maintainer-distcheck",
11587 when the calls are not intended to be translated.
11588 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
11589
11590 * src/Makefile.am (DEFS): Use +=, to pacify
11591 "make maintainer-distcheck".
11592 (bison_SOURCES): Add scan-skel.h.
11593 (sc_tight_scope): New rule, from coreutils.
11594
11595 * src/files.c (src_extension, header_extension):
11596 Now static, not extern.
11597 * src/getargs.c (short_options): Likewise.
11598 * src/muscle_tab.c (muscle_table): Likewise.
11599 * src/parse-gram.y (current_class, current_type, current_prec):
11600 Likewise.
11601 * src/reader.c (grammar_end, previous_rule_end): Likewise.
11602 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
11603 * src/main.c (main): Cast bindtextdomain and textdomain calls to
11604 void, to avoid warning when NLS is disabled.
11605 * src/output.c: Include scan-skel.h.
11606 (scan_skel): Remove decl, since scan-skel.h does this.
11607 (output_skeleton):
11608 Indent calls to "error" to pacify "make maintainer-distcheck".
11609 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
11610 * src/reader.h (gram_end, gram_lineno): New decls to pacify
11611 "make maintainer-distcheck".
11612 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
11613 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
11614 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
11615 (skel_lex_destroy, scan_skel): Move these decls to...
11616 * src/scan-skel.h: New file.
11617 * src/uniqstr.c (uniqstr_assert):
11618 Indent calls to "error" to pacify "make maintainer-distcheck".
11619
11620 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
11621 not @VAR@.
11622
11623 * tests/torture.at: Revamp to avoid misuse of atoi that
11624 "make maintainer-distcheck" complained about.
11625
11626 * examples/extexi (message): Don't print a message more than once,
11627 and omit line-number decoration that makes Emacs compile think
11628 that informative messages are worth worrying about.
11629
11630 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
11631
11632 * configure.ac: Update version number.
11633
11634 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
11635 accidentally.
11636 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
11637 autogenerated by the maintainer.
11638 * examples/calc++/.cvsignore: Add *.yy.
11639
11640 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
11641 * lib/bitset_stats.c (bitset_stats_init): Likewise.
11642 * lib/bitsetv.c (bitsetv_alloc): Likewise.
11643
11644 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
11645
11646 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
11647 from maintainer-distcheck about casting the argument of 'free'.
11648
11649 * NEWS: Mention recent yytname changes.
11650 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
11651
11652 * bootstrap: For translations that have not yet been upgraded to
11653 the new runtime-po domain, prime the pump by extracting the
11654 relevant strings from the obsolete translations. This code can be
11655 removed once the bison-runtime domain has been translated by each
11656 team.
11657
11658 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
11659 now that token names are already quoted.
11660
11661 Fix problem reported by Anthony Heading.
11662 * data/glr.c (YYTOKEN_TABLE): New macro.
11663 (yytname): Define if YYTOKEN_TABLE.
11664 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
11665 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
11666 (YYERROR_VERBOSE): Define the same way the other skeletons do.
11667 * src/output.c (prepare_symbols): Output token_table_flag.
11668
11669 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
11670
11671 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
11672 again if the first call fails.
11673
11674 * data/glr.c (yytnamerr): New function.
11675 (yyreportSyntaxError): Use it to dequote most string literals.
11676 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
11677 with other skeletons. All uses changed.
11678 (yytnameerr_): New function.
11679 (yyreport_syntax_error): Use it to dequote most string literals.
11680 * data/yacc.c (yytnamerr): New function.
11681 (yyerrlab): Use it to decode most string literals.
11682 * doc/bison.texinfo (Decl Summary, Calling Convention):
11683 Clarify quoting convention of yytname.
11684 * src/output.c (prepare_symbols): Quote all names. This undoes
11685 the 2005-04-17 change, which is now accomplished (mostly) via
11686 changes in the parsers as described above.
11687 * tests/regression.at (Token definitions, Web2c Actions):
11688 Undo most 2005-04-17 change here, too.
11689
11690 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
11691
11692 Fix more problems reported by twlevo@xs4all.nl.
11693 * tests/cxx-type.at: Don't pipe output of ./types through sed to
11694 remove trailing spaces. This loses the exit status of ./types,
11695 and isn't needed since ./types shouldn't be emitting trailing
11696 spaces.
11697 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
11698 as the stack isn't valid in that case.
11699
11700 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
11701 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
11702 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
11703 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
11704 is used.
11705 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
11706 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
11707 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
11708 Likewise.
11709
11710 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
11711 overly-picky compilers that reject 'char *foo = "bar";'.
11712
11713 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
11714 to FILE * parameter, not to stderr. This fixes a typo introduced
11715 in the 2005-07-12 change.
11716
11717 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
11718 warnings from GCC 4.
11719
11720 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
11721 (yyglrShiftDefer, yysplitStack):
11722 Remove unused parameters b4_pure_formals. All uses changed.
11723 (yyglrShift): Remove unused parameters b4_user_formals.
11724 All uses changed.
11725 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
11726
11727 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
11728
11729 Destructor cleanups and regularization among the three skeletons.
11730 * NEWS: Document the behavior changes.
11731 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
11732 stack before failing, as the cleanup code will do it for us now.
11733 * data/lalr1.cc (yyerrlab): Likewise.
11734 * data/glr.c (yyparse): Pop everything off the stack before
11735 freeing it, so that destructors get called properly.
11736 * data/lalr1.cc (yyreturn): Likewise.
11737 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
11738 This is more consistent.
11739 * doc/bison.texinfo (Destructor Decl): Mention more reasons
11740 why destructors might be called. 1.875 -> 2.1.
11741 (Destructor Decl, Decl Summary, Table of Symbols):
11742 Some English-language cleanups for %destructor.
11743 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
11744 Add output line for destructor of start symbol.
11745 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
11746 because of that same extra output line.
11747
11748 * NEWS: Document minor wording changes in diagnostics of
11749 Bison-generated parsers.
11750 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
11751 Remove unused formals. All uses changed.
11752 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
11753 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
11754 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
11755 Rename yyoverflowab to yyexhaustedlab.
11756 When memory exhaustion occurs during syntax-error reporting,
11757 report it separately rather than in a single diagnostic; this
11758 eases translation.
11759 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
11760 (Memory Exhausted): Renamed from Parser Stack Overflow.
11761 Revamp wording slightly to prefer "memory exhaustion".
11762 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
11763
11764 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
11765
11766 Add i18n support to the GLR skeleton. Partially fix the C++
11767 skeleton; a C++ expert needs to finish this. Remove debugging
11768 msgids; there's little point to having them translated, since they
11769 can be understood only by someone who can read the
11770 (English-language) source code.
11771
11772 Generate runtime-po/bison-runtime.pot automatically, so that we
11773 don't have to worry about garbage getting in that file. We'll
11774 make sure after the next official release that old msgids don't
11775 get lost. See
11776 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
11777
11778 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
11779 Now auto-generated.
11780 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
11781 Fix typos in explanations of the runtime file.
11782 * bootstrap: Change gettext keyword from YYI18N to YY_.
11783 Use standard Makefile.in.in in runtime-po, since we'll arrange
11784 for backward-compatible bison-runtime.po files in a different way.
11785 * data/glr.c (YY_): New macro, from yacc.c.
11786 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
11787 Translate messages intended for users.
11788 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
11789 the wording in the other skeletons. We don't know that the memory
11790 is virtual.
11791 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
11792 Use same method that yacc.c uses.
11793 Don't translate debugging messages.
11794 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
11795 it doesn't work (yet), and requires C++ expertise to fix.
11796 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
11797 Move defn to a more logical place, to be consistent with other
11798 skeletons.
11799 Don't translate debugging messages.
11800 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
11801 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
11802 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
11803 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
11804
11805 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
11806 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
11807 void, not int.
11808 * tests/glr-regression.at (Badly Collapsed GLR States):
11809 Likewise.
11810 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
11811 yylex should return 0 at EOF rather than aborting.
11812
11813 Improve tests for stack overflow in GLR parser.
11814 Problem reported by twlevo@xs4all.nl.
11815 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
11816 All uses removed.
11817 (yyStackOverflow): Just longjmp, but with value 2 so that caller
11818 can handle the problem.
11819 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
11820 (yyparse): New local variable yyresult to record the result.
11821 Use result of setjmp to set it, rather than storing itinto
11822 struct.
11823 (yyDone): Remove label.
11824 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
11825 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
11826 if YYABORT is used).
11827 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
11828 yyparse status; put status > 1 into diagnostic.
11829 Check that status==2 works.
11830 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
11831 Use exit status 3 for failure to open (which shouldn't happen).
11832
11833 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
11834
11835 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
11836 1 on syntax error; just let yyparse do its thing.
11837 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
11838 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
11839 (Exploding the Stack Size with Alloca):
11840 (Exploding the Stack Size with Malloc):
11841 Expect exit status 2, not 1, since the parser is supposed to blow
11842 its stack. Problem reported by twlevo@xs4all.nl.
11843
11844 * data/glr.c (yyparse): Don't assume that the initial calls
11845 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
11846 Print a stack-overflow message and fail instead.
11847 Initialize the line-number information before creating the stack,
11848 so that the stack-overflow message can report line zero safely.
11849
11850 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
11851
11852 Fix problems reported by twlevo@xs4all.nl.
11853 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
11854 (yyuserMerge): Provide a default case if b4_mergers is empty.
11855 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
11856 * tests/glr-regression.at
11857 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
11858 Add casts to pacify C++ compilers.
11859 * tests/glr-regression.at (Improper merging of GLR delayed action
11860 sets): Declare yylex before using it.
11861 * tests/Makefile.am (maintainer-check-g++): Fix a stray
11862 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
11863 test for valgrind; valgrind is independent of g++.
11864 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
11865 for compatibility with POSIX 1003.1-2001 (if running coreutils).
11866 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
11867 Use a destructor, so that we can expand the stack. Change
11868 YYSTYPE to char * so that we can free it. Cast result of malloc.
11869
11870 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11871
11872 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
11873 a valgrind failure. Problem reported by twlevo@xs4all.nl.
11874
11875 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
11876
11877 * PACKAGING: New file, suggested by Bruno Haible and taken from
11878 similar wording in gettext's PACKAGING file.
11879 * NEWS: Mention PACKAGING.
11880 * Makefile.am (EXTRA_DIST): Add PACKAGING.
11881
11882 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
11883
11884 * NEWS: Document recent i18n improvements.
11885 * bootstrap: Get runtime translations into runtime-po.
11886 Create runtime-po files automatically, if possible.
11887 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
11888 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
11889 does not infringe on the user's name space.
11890 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
11891 * doc/bison.texinfo (Internationalization): Revamp the English
11892 and Texinfo syntax a bit, to try to make it clearer.
11893 (Bison Options, Option Cross Key): Mention --print-localedir.
11894 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
11895 YYENABLE_NLS. Quote a bit more.
11896 * runtime-po/.cvsignore: New file.
11897 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
11898 * runtime-po/Rules-quot: Remove; now created by bootstrap.
11899 * runtime-po/quot.sed: Likewise.
11900 * runtime-po/boldquot.sed: Likewise.
11901 * runtime-po/en@quot.header: Likewise.
11902 * runtime-po/en@boldquot.header: Likewise.
11903 * runtime-po/insert-header.sin: Likewise.
11904 * runtime-po/remove-potcdate.sin: Likewise.
11905 * runtime-po/Makevars: Likewise.
11906 * runtime-po/LINGUAS: Likewise.
11907 * runtime-po/de.po: Likewise; we will rely on the translation project
11908 to maintain this, so "bootstrap" should get it.
11909 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
11910 its value.
11911 * src/main.c (main): Bind the bison-runtime domain, too.
11912
11913 2005-07-12 Bruno Haible <bruno@clisp.org>
11914
11915 * data/yacc.c: Include <libintl.h> when NLS is enabled.
11916 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
11917 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
11918 * runtime-po: New directory.
11919 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
11920 $(DOMAIN).pot-update rule, so that old messages are never dropped.
11921 * runtime-po/Rules-quot: New file, copied from po/.
11922 * runtime-po/quot.sed: Likewise.
11923 * runtime-po/boldquot.sed: Likewise.
11924 * runtime-po/en@quot.header: Likewise.
11925 * runtime-po/en@boldquot.header: Likewise.
11926 * runtime-po/insert-header.sin: Likewise.
11927 * runtime-po/remove-potcdate.sin: Likewise.
11928 * runtime-po/Makevars: New file.
11929 * runtime-po/POTFILES.in: New file.
11930 * runtime-po/LINGUAS: New file.
11931 * runtime-po/bison-runtime.pot: New file.
11932 * runtime-po/de.po: New file.
11933 * m4/bison.m4: New file.
11934 * Makefile.am (SUBDIRS): Add runtime-po.
11935 (aclocaldir, aclocal_DATA): New variables.
11936 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
11937 Define aclocaldir.
11938 * src/getargs.c (usage): Document --print-localedir option.
11939 (PRINT_LOCALEDIR_OPTION): New enum item.
11940 (long_options): Add --print-localedir option.
11941 (getargs): Handle --print-localedir option.
11942 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
11943 (Internationalization): New section.
11944
11945 2005-07-12 Akim Demaille <akim@epita.fr>
11946
11947 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
11948 for consistency with the rest of the code.
11949 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
11950 Add separators.
11951
11952 2005-07-12 Akim Demaille <akim@epita.fr>
11953
11954 * src/parse-gram.y: Use %printer instead of YYPRINT.
11955
11956 2005-07-12 Akim Demaille <akim@epita.fr>
11957
11958 * src/symtab.h, src/symtab.c (symbol_print): New.
11959 * src/symlist.h, src/symlist.c (symbol_list_print): New.
11960 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
11961
11962 2005-07-12 Akim Demaille <akim@epita.fr>
11963
11964 * data/glr.c (b4_syncline): Fix (swap) the definitions of
11965 b4_at_dollar and b4_dollar_dollar.
11966
11967 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
11968
11969 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
11970 and Pennello's paper.
11971
11972 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
11973
11974 * data/yacc.c (yyparse): Undo previous patch. Instead,
11975 set yylsp[0] and yyvsp[0] only if the initial action
11976 sets yylloc and yylval, respectively.
11977
11978 * data/yacc.c (yyparse): In the initial action, set
11979 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
11980 This avoids the use of undefined variables if the initial
11981 action does not set yylloc and/or yylval.
11982
11983 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
11984
11985 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
11986 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
11987 Remove from CVS. These files are automatically generated.
11988 * examples/extexi: Clarify that this file is now part of Bison,
11989 not GNU M4, and that it works with any POSIX-compatible Awk.
11990 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
11991 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
11992 so that we also get calc++-parser.yy. Geneate it.
11993 Use $(AWK), not gawk, since any conforming Awk will do.
11994 Put comment before action, since older 'make' can't handle comment
11995 in action.
11996 $(BUILT_SOURCES): List all built sources, not just some of them.
11997 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
11998 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
11999 $($(calc_sources_generated)): Remove unnecessary test for existence
12000 of target. (This had a shell syntax error anyway; a stray "x".)
12001 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
12002 calc++-parser.yy.
12003 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
12004
12005 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
12006 implied by the other modules.
12007
12008 2005-07-06 Akim Demaille <akim@epita.fr>
12009
12010 Bind examples/calc++ to the package.
12011 * examples/calc++/Makefile: Remove, replaced by...
12012 * examples/calc++/Makefile.am: ... this new file.
12013 * examples/calc++/test: Remove input.
12014 * examples/calc++/compile: Remove.
12015 * examples/Makefile.am: New.
12016 * configure.ac, Makefile.am: Adjust.
12017 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
12018
12019 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
12020
12021 * data/glr.c (yyFail): Drastically simplify; since the format argument
12022 never had any % directives, we can simply pass it to yyerror.
12023 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
12024 be modified later, as that is the usual style in glr.c.
12025 Problems reported by Paul Hilfinger.
12026
12027 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
12028 and size overflow errors.
12029 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
12030 in case the user prolog sets feature-test macros like _GNU_SOURCE.
12031 (YYSIZEMAX): New macro.
12032 (yystpcpy): New function, taken from yacc.c.
12033 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
12034 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
12035 so that we don't have to maintain their signatures.
12036 (yyFail): Check for buffer overflow, by using vsnprintf rather
12037 than vsprintf. Allocate a bigger buffer if possible.
12038 Report an error if buffer allocation fails.
12039 (yyStackOverflow): New function.
12040 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
12041 the initialization was successful. It might fail if storage was
12042 exhausted.
12043 (yyexpandGLRStack): Add more checks for storage allocation failure.
12044 Use yyStackOverflow to report failures.
12045 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
12046 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
12047 Don't assume stack number fits in int.
12048 (yysplitStack): Check for storage allocation failure.
12049 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
12050 can print diagnostics on storage allocation failure. All callers
12051 changed.
12052 (yyresolveValue): Use yybool for boolean.
12053 (yyreportSyntaxError): Check for size-calculation overflow.
12054 This code is taken from yacc.c.
12055 (yyparse): Check for storage allocation errors when allocating
12056 the initial stack.
12057
12058 2005-07-05 Akim Demaille <akim@epita.fr>
12059
12060 Extract calc++ from the documentation.
12061 * doc/bison.texinfo (Calc++): Add the extraction marks.
12062 * examples/extexi: New, from the aborted GNU Programming 2E.
12063 Separate the different paragraph of a file with empty lines.
12064 * examples/Makefile: Use it to extract the whole calc++ example.
12065
12066 2005-06-24 Akim Demaille <akim@epita.fr>
12067
12068 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
12069 class typedefs.
12070
12071 2005-06-22 Akim Demaille <akim@epita.fr>
12072
12073 * doc/bison.texinfo (C++ Language Interface): First stab.
12074 (C++ Parsers): Remove.
12075
12076 2005-06-22 Akim Demaille <akim@epita.fr>
12077
12078 * data/lalr1.cc (yylex_): Honor %lex-param.
12079
12080 2005-06-22 Akim Demaille <akim@epita.fr>
12081
12082 Start a set of simple examples.
12083 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
12084 * examples/calc++/calc++-driver.hh,
12085 * examples/calc++/calc++-parser.yy,
12086 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
12087 * examples/calc++/compile, examples/calc++/test: New.
12088
12089 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
12090
12091 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
12092 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
12093 which stems from the 2005-05-27 patch.
12094
12095 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
12096
12097 * data/glr.c: Modify treatment of unused parameters to permit use
12098 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
12099
12100 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
12101
12102 Fix infringement on user name space reported by Janos Zoltan Szabo.
12103 * data/yacc.c (yyparse): strlen -> yystrlen.
12104
12105 2005-05-30 Akim Demaille <akim@epita.fr>
12106
12107 * data/lalr1.cc (_): New.
12108 Translate the various messages.
12109
12110 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
12111
12112 Fix infringement on user name space reported by Bruno Haible.
12113 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
12114 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
12115 the user's name space.
12116 (alloca): Include <stdlib.h> to get it, if it's not built in.
12117 (YYMALLOC, YYFREE): Define only if needed.
12118 (malloc, free): Declare, but only if needed, as this infringes on
12119 the user name space.
12120
12121 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
12122
12123 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
12124 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
12125 with %d format.
12126 * lib/ebitset.c (min, max): Undef before defining.
12127 * lib/vbitset.c (min, max): Likewise.
12128 * lib/subpipe.c (create_subpipe): Save local variables in case
12129 vfork clobbers them.
12130
12131 2005-05-24 Bruno Haible <bruno@clisp.org>
12132
12133 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
12134 error message syntax used by gcc-4.0.
12135
12136 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
12137
12138 * README: Mention m4 1.4.3. Remove obsolete advice about
12139 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
12140
12141 * bootstrap: Remove workaround for problem I encountered with
12142 gettext 0.14.1; it seems to be fixed now.
12143
12144 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
12145
12146 * NEWS: Version 2.0a.
12147
12148 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
12149 the previous change.
12150
12151 Various maintainer cleanups.
12152 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
12153 conftest*, for benefit of CVS commands run at the same time as
12154 "configure". Add build-aux, since "bootstrap" now creates it and
12155 its subfiles.
12156 * Makefile.cfg (move_if_change): Remove.
12157 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
12158 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
12159 (po_repo, do-po-update, po-update, wget_files, get-targets):
12160 (config.guess-url_prefix, config.sub-url_prefix):
12161 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
12162 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
12163 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
12164 Remove.
12165 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
12166 this is now the recommended name.
12167 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
12168 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
12169 ylwrap. These files now go into build-aux.
12170 * config/move-if-change: Remove.
12171 * config/prev-version.txt: Bump from 1.75 to 2.0.
12172
12173 * bootstrap: Add stdio-safer, unistd-safer modules.
12174 Remove m4/glibc2.m4 (introduced by latest gnulib, but
12175 we don't need it).
12176 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
12177 fopen-safer.c, stdio-safer.h, unistd-safer.h.
12178 * lib/subpipe.c: Include "unistd-safer.h".
12179 (create_subpipe): Make sure all the newly-created
12180 file descriptors are > 2, so that diagnostics don't
12181 get sent down them (which might cause Bison to hang, in theory).
12182 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
12183 * src/files.c (xfopen): Use fopen_safer, not fopen.
12184
12185 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
12186 yesterday's yacc.c fix.
12187
12188 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
12189
12190 * data/glr.c, data/lalr1.cc: Update copyright date.
12191
12192 Fix a destructor bug reported by Wolfgang Spraul in
12193 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
12194 * data/yacc.c (yyabortlab): Don't call destructor, and
12195 don't set yychar to EMPTY.
12196 (yyoverflowlab): Don't call destructor.
12197 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
12198 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
12199 since we no longer output the message "discarding lookahead token
12200 end of input ()".
12201
12202 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12203
12204 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
12205 fix a small glitch in debugging output.
12206 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
12207 after YY_SYMBOL_PRINT where needed.
12208
12209 (struct yyGLRState): Add some comments.
12210 (struct yySemanticOption): Add some comments.
12211 (union yyGLRStackItem): Add comment.
12212
12213 (yymergeOptionSets): Correct this to properly perform the union,
12214 avoiding infinite reported by Michael Rosien.
12215 Update comment.
12216
12217 * tests/glr-regression.at: Add test for GLR merging error reported
12218 by M. Rosien.
12219
12220 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
12221
12222 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
12223 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
12224 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
12225 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
12226 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
12227 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
12228 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
12229 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
12230 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
12231 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
12232 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
12233 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
12234 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
12235 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
12236 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
12237 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
12238 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
12239 src/derives.h, src/files.c, src/files.h, src/getargs.c,
12240 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
12241 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
12242 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
12243 src/output.h, src/parse-gram.c, src/parse-gram.h,
12244 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
12245 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
12246 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
12247 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
12248 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
12249 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
12250 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
12251 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
12252 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
12253 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
12254 tests/reduce.at, tests/regression.at, tests/sets.at,
12255 tests/synclines.at, tests/testsuite.at, tests/torture.at:
12256 Update FSF postal mail address.
12257
12258 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
12259
12260 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
12261 Problem reported by Ralf Menzel.
12262
12263 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
12264
12265 * tests/actions.at: Test that stack overflow invokes destructors.
12266 From Marcus Holland-Moritz.
12267 * data/yacc.c (yyerrlab): Move the code that destroys the stack
12268 from here....
12269 (yyreturn): to here. That way, destructors are called properly
12270 even if the stack overflows, or the user calls YYACCEPT or
12271 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
12272 (yyoverflowlab): Destroy the lookahead.
12273
12274 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
12275
12276 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
12277
12278 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
12279
12280 * NEWS: Bison-generated C parsers no longer quote literal strings
12281 associated with tokens.
12282 * src/output.c (prepare_symbols): Don't escape strings,
12283 since users don't want to see C escapes.
12284 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
12285 in diagnostics.
12286 * tests/input.at (Torturing the Scanner): Likewise.
12287 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
12288
12289 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
12290
12291 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
12292 the data size is known to be too small and we can't increase it.
12293 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
12294
12295 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
12296
12297 * src/parse-gram.y: Include quotearg.h.
12298 (string_as_id): Quote $1 before using it as a key, since the
12299 lexer no longer quotes it for us.
12300 (string_content): Don't strip quotes, since lexer no longer
12301 quotes it for us.
12302 * src/scan-gram.l: Include quotearg.h.
12303 ("\""): Omit quote.
12304 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
12305 a key, since the rest of the lexer doesn't quote it.
12306 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
12307 * tests/regression.at (Token definitions): Check for backslashes
12308 in token strings.
12309
12310 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
12311 (YYSIZE_T): Define to unsigned long int when using an older compiler.
12312 (yyparse): Revamp code to generate long syntax error message, to
12313 make it easier to translate, and to avoid problems with arithmetic
12314 overflow. Change "virtual memory" to "memory" in diagnostic, since
12315 we don't know whether the memory is virtual.
12316
12317 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
12318
12319 * NEWS: Bison-generated C parsers now use the _ macro to
12320 translate strings.
12321 * data/yacc.c (_) [!defined _]: New macro.
12322 All English strings wrapped inside this macro.
12323 * doc/bison.texinfo (Bison Parser): Document _.
12324 * po/POTFILES.in: Include src/parse-gram.c, since it now
12325 includes translateable strings that parse-gram.y doesn't.
12326
12327 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
12328
12329 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
12330 reverting the 2004-10-11 change to this function.
12331 (symbol_check_alias_consistency): Don't call symbol_type_set
12332 if the type name is already correct.
12333 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
12334
12335 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
12336
12337 * tests/regression.at (Token definitions): Don't use a token named
12338 c, as that generates a "#define c ..." that runs afoul of buggy
12339 stdlib.h that uses the identifier c as a member of struct
12340 drand48_data. Problem reported by Horst Wente.
12341
12342 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
12343
12344 * bootstrap: Change translation URL from
12345 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
12346 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
12347 redirection glitches. Problem reported by twlevo@xs4all.nl.
12348
12349 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
12350
12351 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
12352 after operands; POSIX says this isn't portable for the c99 command.
12353
12354 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
12355
12356 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
12357 immediately if a data overrun has occurred; this may help us track
12358 down what may be a spurious failure on MacOS.
12359
12360 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
12361
12362 Respond to problems reported by twlevo@xs4all.nl.
12363
12364 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
12365
12366 * src/vcg.h: Comment fix.
12367 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
12368 (G_CMAX): Change to -1 instead of INT_MAX.
12369
12370 * data/yacc.c (yyparse): Omit spaces before #line.
12371
12372 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
12373
12374 * src/tables.c (state_number_to_vector_number): Put it inside an
12375 "#if 0", since it's not currently used. Problem reported by
12376 Roland McGrath.
12377
12378 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
12379
12380 * src/output.c (escaped_output): Renamed from
12381 escaped_file_name_output, since we now use it for symbol tags as
12382 well. All uses changed.
12383 (symbol_destructors_output, symbol_printers_output):
12384 Escape symbol tags too.
12385 Problem reported by Matyas Forstner in
12386 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
12387
12388 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
12389 not needed.
12390 * src/output.c (user_actions_output, token_definitions_output,
12391 symbol_destructors_output, symbol_printers_output): Likewise.
12392 * src/reader.c (prologue_augment): Likewise.
12393 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
12394
12395 * src/vcg.c (output_edge): Don't quote linestyle arg.
12396 Problem reported by twlevo@xs4all.nl.
12397
12398 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
12399
12400 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
12401 example, reported by Derek M Jones. Also, make the example even
12402 more outrageous, to better illustrate how bad the problem is.
12403
12404 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
12405
12406 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
12407 putsym. Typo reported by Sebastian Piping.
12408
12409 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
12410
12411 * doc/bison.texinfo (Language and Grammar): some -> same
12412 (Epilogue): int he -> in the
12413 Typos reported by Sebastian Piping via Justin Pence.
12414
12415 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
12416
12417 * tests/glr-regression.at (Improper handling of embedded actions
12418 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
12419 embedded actions and $-N in GLR parsers", work around an Autoconf bug
12420 with dollar signs in test names.
12421 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
12422 for a similar reason.
12423
12424 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
12425
12426 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
12427 wants to redefine G_VIEW.
12428
12429 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
12430
12431 * src/vcg.c (get_view_str): Remove case for normal_view.
12432 Problem reported by twlevo@xs4all.nl.
12433
12434 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
12435
12436 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
12437 Problem reported by twlevo@xs4all.nl.
12438
12439 * doc/bison.texinfo: Change @dircategory from "GNU programming
12440 tools" to "Software development". Requested by Richard Stallman
12441 via Karl Berry.
12442
12443 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
12444
12445 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
12446 Problem reported by twlevo@xs4all.nl.
12447
12448 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
12449
12450 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
12451 keyword; it's not needed with modern compilers, and it doesn't
12452 affect correctness with older compilers. Suggested by
12453 twlevo@xs4all.nl.
12454
12455 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
12456
12457 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
12458 gcc -Wswitch-default.
12459 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
12460 * data/yacc.c (yyparse): Likewise.
12461
12462 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
12463
12464 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
12465 already. Let config.h define any nonstandard values.
12466
12467 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
12468
12469 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
12470 for the benefit of slower hosts. Problem reported by
12471 Nelson H. F. Beebe.
12472
12473 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
12474
12475 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
12476 being defined and not used.
12477 * data/lalr1.cc (yyparse): Likewise.
12478 Use "if (false)" rather than "if (0)".
12479
12480 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
12481
12482 * TODO: Mention that we should allow NUL bytes in tokens.
12483
12484 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
12485
12486 * src/scan-skel.l (<<EOF>>): Don't close standard output.
12487 Problem reported by Hans Aberg.
12488
12489 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
12490
12491 * src/getargs.c (version): Happy new year; update overall
12492 program copyright date from 2004 to 2005.
12493
12494 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
12495 Problem reported by Hans Aberg.
12496 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
12497 (Output file names.): Add a test for the case when standard output
12498 is closed.
12499
12500 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
12501
12502 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
12503 to fix an oversight in the Bison 2.0 manual.
12504
12505 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
12506
12507 * NEWS: Version 2.0. Reformat the existing news items since
12508 1.875, so that related items are grouped together.
12509 * configure.ac (AC_INIT): Bump version to 2.0.
12510 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
12511
12512 * tests/torture.at (Exploding the Stack Size with Alloca): Set
12513 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
12514 otherwise, we're not testing alloca. Unfortunately there's no
12515 simple way to consult HAVE_ALLOCA here.
12516
12517 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
12518 for yymsg, too.
12519
12520 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
12521 hand. This avoids a warning about comparing int to size_t when
12522 GCC warnings are enabled.
12523
12524 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
12525
12526 * NEWS: Bison-generated parsers no longer default to using the
12527 alloca function (when available) to extend the parser stack, due
12528 to widespread problems in unchecked stack-overflow detection.
12529 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
12530 responsibility to set it to a positive value. This lets the user
12531 specify a value that is not a preprocessor constant.
12532 * data/yacc.c (YYMAXDEPTH): Likewise.
12533 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
12534 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
12535 to be a compile-time constant. However, explain the constraints on it.
12536 Also, explain the constraints on YYINITDEPTH.
12537 (Table of Symbols): Explain that alloca is no longer the default.
12538 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
12539 to 1.
12540
12541 * doc/bison.texinfo (Location Default Action): Mention that n must
12542 be zero when k is zero. Suggested by Frank Heckenbach.
12543
12544 2004-12-22 Akim Demaille <akim@epita.fr>
12545
12546 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
12547 (parser::state_type, parser::semantic_type, parser::location_type):
12548 Private, not public.
12549 (parser::parse): Return ints, not bool.
12550 Returning a bool introduces a problem: 0 corresponds to false, and
12551 it seems weird to return false on success. Returning true changes
12552 the conventions for yyparse.
12553 Alternatively we could return void and send an exception.
12554 There is no clear consensus (yet?).
12555 (state_stack, semantic_stack, location_stack): Rename as...
12556 (state_stack_type, semantic_stack_type, location_stack_type): these.
12557 Private, not public.
12558 * tests/c++.at: New.
12559 * tests/testsuite.at, tests/Makefile.am: Adjust.
12560
12561 2004-12-21 Akim Demaille <akim@epita.fr>
12562
12563 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
12564
12565 2004-12-21 Akim Demaille <akim@epita.fr>
12566
12567 Don't impose std::string for filenames.
12568
12569 * data/lalr1.cc (b4_filename_type): New.
12570 (position::filename): Use it.
12571 (parser.hh): Move the inclusion of stack.hh and location.hh below
12572 the user code, so that needed headers for the filename type can be
12573 included first.
12574 Forward declare them before the user code.
12575 * tests/Makefile.am (check-local, installcheck-local): Pass
12576 TESTSUITEFLAGS to the TESTSUITE.
12577
12578 2004-12-20 Akim Demaille <akim@epita.fr>
12579
12580 Use more STL like names: my_class instead of MyClass.
12581
12582 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
12583 (SemanticStack, SemanticType, StateStack, StateType)
12584 (TokenNumberType, Stack, Slice, Traits, Parser::location)
12585 (Parser::value): Rename as...
12586 (location_stack, location_type, rhs_number_type, semantic_stack)
12587 (semantic_type, state_stack, state_type, token_number_type, stack)
12588 (slice, traits, parser::yylloc, parser::yylval): these.
12589
12590 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
12591
12592 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
12593
12594 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
12595 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
12596
12597 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
12598
12599 Remove uses of 'short int' and 'unsigned short int'. This raises
12600 some arbitrary limits. It uses more memory but nowadays that's
12601 not much of an issue.
12602
12603 This change does not affect the generated parsers; that's a different
12604 task, as some users will want to conserve memory there.
12605
12606 Ideally we should use size_t to represent all object counts, and
12607 something like ptrdiff_t to represent signed differences of object
12608 counts; but that will require more code-cleanup than I have the
12609 time to do right now.
12610
12611 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
12612 Use size_t, not int or short int, to count objects.
12613 * src/closure.c (nritemset, closure): Likewise.
12614 * src/closure.h (nritemset, closure): Likewise.
12615 * src/nullable.c (nullable_compute): Likewise.
12616 * src/print.c (print_core): Likewise.
12617 * src/print_graph.c (print_core): Likewise.
12618 * src/state.c (state_compare, state_hash): Likewise.
12619 * src/state.h (struct state): Likewise.
12620 * src/tables.c (default_goto, goto_actions): Likewise.
12621
12622 * src/gram.h (rule_number, rule): Use int, not short int.
12623 * src/output.c (prepare_rules): Likewise.
12624 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
12625 errs, reductions): Likewise.
12626 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
12627 Likewise.
12628 * src/tables.c (vector_number, tally, action_number,
12629 ACTION_NUMBER_MINIMUM): Likewise.
12630 * src/output.c (muscle_insert_short_int_table): Remove.
12631
12632 2004-12-17 Akim Demaille <akim@epita.fr>
12633
12634 * data/lalr1.cc: Extensive Doxygenation.
12635 (error_): Rename as...
12636 (error): this, since it is visible to the user.
12637 Adjust callers.
12638 (Parser::message): Now an automatic variable from...
12639 (Parser::yyreport_syntax_error_): here.
12640 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
12641 Parser::error.
12642 * tests/input.at: Escape $.
12643
12644 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
12645
12646 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
12647 Parenthesize rhs to avoid obscure problems with mistakes like
12648 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
12649 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
12650 b4_rhs_location): Likewise.
12651 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
12652 b4_rhs_location): Likewise.
12653
12654 2004-12-16 Akim Demaille <akim@epita.fr>
12655
12656 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
12657 yacc.c: be sure to stay within yycheck_.
12658 * tests/actions.at: Re-enable C++ tests.
12659
12660 2004-12-16 Akim Demaille <akim@epita.fr>
12661
12662 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
12663 real.
12664
12665 2004-12-16 Akim Demaille <akim@epita.fr>
12666
12667 Use #define to handle the %name-prefix.
12668
12669 * data/glr.c, data/yacc.c: Comment changes.
12670 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
12671 so that one can refer to yylex in the parser file, and have it
12672 renamed, as is the case with other skeletons.
12673
12674 2004-12-16 Akim Demaille <akim@epita.fr>
12675
12676 Move lalr1.cc internals into yy*.
12677
12678 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
12679 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
12680 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
12681 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
12682 (empty_, final_, terror_, errcode_, ntokens_)
12683 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
12684 (looka_, ilooka_, error_range_, nerrs_):
12685 Rename as...
12686 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
12687 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
12688 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
12689 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
12690 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
12691 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
12692 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
12693 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
12694 these.
12695
12696 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
12697
12698 Fix some problems reported by twlevo at xs4all.
12699 * src/symtab.c (symbol_new): Report an error if the input grammar
12700 contains too many symbols. This is better than calling abort() later.
12701 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
12702 (struct node, struct graph):
12703 Rename member expand to stretch. All uses changed.
12704 (struct graph): Remove member layoutalgorithm. All uses removed.
12705 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
12706 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
12707 All uses changed.
12708 (N_STRETCH): Rename from N_EXPAND. All uses changed.
12709
12710 2004-12-15 Akim Demaille <akim@epita.fr>
12711
12712 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
12713 Add more Doxygen comments.
12714 (symprint_, stack_print_, reduce_print_, destruct_, pop)
12715 (report_syntax_error_, translate_): Rename as...
12716 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
12717 (yypop_, yyreport_syntax_error_, yytranslate_): this.
12718
12719 2004-12-15 Akim Demaille <akim@epita.fr>
12720
12721 * data/lalr1.cc (lex_): Rename as...
12722 (yylex_): this.
12723 Move the trace here.
12724 Take the %name-prefix into account.
12725 Reported by Alexandre Duret-Lutz.
12726
12727 2004-12-15 Akim Demaille <akim@epita.fr>
12728
12729 Simplify the C++ parser constructor.
12730
12731 * data/lalr1.cc (debug_): Rename as...
12732 (yydebug_): so that the parser's internals are always in the yy*
12733 pseudo namespace.
12734 Adjust uses.
12735 (b4_parse_param_decl): Remove the leading comma as it is now only
12736 called as unique argument list.
12737 (Parser::Parser): Remove the constructor accepting a location and
12738 an initial debugging level.
12739 Remove from the other ctor the argument for the debugging level.
12740 (debug_level_type, debug_level, set_debug_level): New.
12741
12742 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
12743 constructor calls.
12744
12745 2004-12-15 Akim Demaille <akim@epita.fr>
12746
12747 Remove b4_root related material: failure experiment
12748 (which goal was to allow to derive from a class).
12749
12750 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
12751 definitions and uses.
12752
12753 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
12754
12755 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
12756 not 2, since it's not portable to subtract 1 from the start of an
12757 array. The new item 0 is never set or used. All uses changed.
12758
12759 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
12760 the default definition of YYLLOC_DEFAULT. Problem reported
12761 by Frank Heckenbach.
12762
12763 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
12764
12765 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
12766 the normal case and one for the error case. Just use the
12767 first one uniformly. Problem reported by Frank Heckenbach.
12768 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
12769 use exactly the same macro in both places.
12770 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
12771 so that the normal-case YYRHSLOC works for the error case too.
12772 All uses changed.
12773 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
12774 (YYLLOC_DEFAULT): Use the same macro as glr.c.
12775 * doc/bison.texinfo (Location Default Action): Don't claim that
12776 we have an array of locations. Use the same macro for both glr
12777 and lalr parsers. Mention YYRHSLOC. Mention what happens when
12778 the index is 0.
12779
12780 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
12781
12782 * HACKING: Update email addresses to send announcements to.
12783
12784 * configure.ac (AC_INIT): Bump version to 1.875f.
12785
12786 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
12787
12788 * NEWS: Version 1.875e.
12789 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
12790
12791 * src/scan-skel.l: Include "complain.h", for "fatal".
12792
12793 * src/relation.h (relation_print, relation_digraph):
12794 Relation sizes are of type relation_node, not size_t (this is
12795 merely a doc fix, since the two types are equivalent).
12796 (relation_transpose): Relation sizes are of type relation_node,
12797 not int.
12798 * src/relation.c: Likewise.
12799 (top, infinity): Now of type relation_node, not int.
12800 (traverse, relation_transpose): Use relation_node, not int.
12801
12802 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
12803 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
12804 (yyparse): Remove unused local introduced in 2004-10-25 patch.
12805
12806 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
12807 specifying whether the test should be skipped. Use it tp
12808 specify that the [%defines %skeleton "lalr1.cc"] tests currently
12809 fail on some hosts, and should be skipped.
12810
12811 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
12812
12813 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
12814 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
12815 unless otherwise specified below.
12816
12817 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
12818 to allocate kernel_base, kernel_items, kernel_size, since
12819 they needn't be initialized to 0.
12820 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
12821 * src/closure.c (new_closure): Likewise, for itemset.
12822 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
12823 * src/lalr.c (set_goto_map): Likewise, for temp_map.
12824 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
12825 (build_relations): Likewise for edge, states1, includes.
12826 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
12827 * src/reader.c (packgram): Likewise, for ritem, rules.
12828 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
12829 * src/relation.c (relation_digraph): Likewise for VERTICES.
12830 (relation_transpose): Likewise for new_R, end_R.
12831 * src/symtab.c (symbols_token_translations_init): Likewise for
12832 token_translations.
12833 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
12834 (token_actions): Likewise for yydefact, actrow, conflrow,
12835 conflict_list.
12836 (save_column): Likewise for froms[symno], tos[symno].
12837 (goto_actions): Likewise for state_count.
12838 (pack_table): Likewise for base, pos, check.
12839 (tables_generate): Likewise for width.
12840
12841 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
12842 for initial core. Just have a separate core, so we needn't worry
12843 about whether kernel_size and kernel_base are initialized.
12844
12845 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
12846 kernel_size, kernel_items): Remove unnecessary initialization.
12847 * src/conflicts.c (conflicts): Likewise.
12848 * src/derives.c (derives): Likewise.
12849 * src/muscle_tablc (muscle_insert): Likewise.
12850 * src/relation.c (relation_digraph): Likewise.
12851 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
12852 conflrow, conflict_table, conflict_list, table, check):
12853 Likewise.
12854
12855 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
12856 This is because all callers pass unsigned int.
12857 * src/closure.h (new_closure): Likewise.
12858
12859 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
12860 (build_relations): Initialize includes[i] in all cases.
12861 * src/reader.c (packgram): Always initialize rules[ruleno].prec
12862 and rules[ruleno].precsym. Initialize members in order.
12863 * src/relation.c (relation_transpose): Always initialize new_R[i]
12864 and end_R[i].
12865 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
12866
12867 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
12868 conflict_list[0] was always 0, but now it isn't initialized.
12869
12870 * src/table.c (table_grow): When conflict_table grew, the grown
12871 area wasn't cleared. Fix this.
12872
12873 * lib/.cvsignore: Add strdup.c, strdup.h.
12874 * m4/.cvsignore: Add strdup.m4.
12875
12876 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
12877
12878 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
12879 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
12880 GOTO_NUMBER_MAXIMUM, since we occasionally compute
12881 ngotos + 1 without checking for overflow.
12882 (build_relations): Use END_NODE, not -1, to denote end of edges.
12883 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
12884 build_relations): Use goto_number, not int, for goto numbers.
12885 * src/tables.c (save_column, default_goto): Likewise.
12886
12887 2004-11-23 Akim Demaille <akim@epita.fr>
12888
12889 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
12890 of #defining from yystype.
12891 Don't typedef yystype, C++ does not need it.
12892 This lets it possible to forward declare it as union.
12893
12894 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
12895
12896 * bootstrap (gnulib_modules): Add extensions.
12897 Problem reported by Jim Meyering.
12898
12899 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
12900
12901 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
12902 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
12903 src/system.h, src/tables.c: XFREE -> free, to accommodate
12904 recent change to gnulib xalloc.h.
12905 Problem reported by Jim Meyering.
12906
12907 2004-11-17 Akim Demaille <akim@epita.fr>
12908
12909 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
12910
12911 2004-11-17 Akim Demaille <akim@epita.fr>,
12912 Alexandre Duret-Lutz <adl@gnu.org>
12913
12914 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
12915 changes.
12916 (YYCDEBUG): Adjust.
12917 Use it instead of cdebug_.
12918 (Parser::debug_stream, Parser::set_debug_stream): New.
12919 (Parser::symprint_): Define cdebug_ for temporary backward
12920 compatibility.
12921 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
12922 debug_stream ().
12923
12924 2004-11-17 Akim Demaille <akim@epita.fr>
12925
12926 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
12927 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
12928 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
12929 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
12930
12931 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
12932
12933 * data/glr.c (yyloc_default): Remove; not used.
12934 Problem reported by Frank Heckenbach.
12935
12936 2004-10-25 Akim Demaille <akim@epita.fr>
12937
12938 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
12939 Introduce another definition to address simple location arrays.
12940 (yyGLRStack): New member: yyerror_range.
12941 (yyrecoverSyntaxError, yyparse): Update it.
12942 (yyrecoverSyntaxError): Use it when shifting the error token to
12943 have an accurate range, equivalent to the one computed by both
12944 yacc.c and lalr1.cc.
12945 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
12946 that column numbers start at column 0, as per GNU Coding
12947 Standards, the others tests, and the doc.
12948 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
12949 Adjust to the above change (first column is 0).
12950 And adjust the location of the "<error>", now covering the whole
12951 line.
12952
12953 2004-10-22 Akim Demaille <akim@epita.fr>
12954 and Paul Eggert <eggert@cs.ucla.edu>
12955
12956 Remove some arbitrary limits on goto numbers and relations.
12957 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
12958 initial values, since they're never used.
12959 (set_goto_map): ngotos is now unsigned, so test for overflow
12960 by seeing whether it wraps around to zero.
12961 * src/lalr.h (goto_number): Now size_t, not short int.
12962 (GOTO_NUMBER_MAXIMUM): Remove.
12963 * src/relation.c (relation_print, traverse, relation_transpose):
12964 Check for END_NODE rather than looking at sign.
12965 * src/relation.h (END_NODE): New macro.
12966 (relation_node): Now size_t, not short int.
12967
12968 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
12969
12970 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
12971 keyword, not an identifier. Problem reported by Baron Schwartz in
12972 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
12973
12974 2004-10-11 Akim Demaille <akim@epita.fr>
12975
12976 * src/symtab.c (symbol_check_alias_consistency): Also check
12977 type names, destructors, and printers.
12978 Reported by Alexandre Duret-Lutz.
12979 Recode the handling of associativity and precedence in terms
12980 of symbol_precedence_set.
12981 Accept no redeclaration at all, not even equal to the previous
12982 value.
12983 (redeclaration): New.
12984 Use it to factor redeclaration complaints.
12985 (symbol_make_alias): Don't set the type of the alias, let
12986 symbol_check_alias_consistency do it as for other features.
12987 * src/symtab.h (symbol): Add new member prec_location, and
12988 type_location.
12989 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
12990 * tests/input.at (Incompatible Aliases): New.
12991
12992 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
12993
12994 .cvsignore fixes to accommodate gnulib changes,
12995 and the practice of naming build directories "_build".
12996 * .cvsignore: Add "_*". Sort.
12997 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
12998 * m4/.cvsignore: Add "*_gl.m4".
12999
13000 2004-10-06 Akim Demaille <akim@epita.fr>
13001
13002 * src/parse-gram.y (add_param): Fix the truncation of trailing
13003 spaces.
13004
13005 2004-10-05 Akim Demaille <akim@epita.fr>
13006
13007 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
13008 whether the reducion was empty or not. This leaves room to
13009 improve the use of YYLLOC_DEFAULT in such a case.
13010 lalr1.cc is still experimental, so changing this is acceptable.
13011 And finally, there are probably not many users who changed the
13012 handling of locations in GLR, so changing is admissible too.
13013
13014 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
13015 empty reduction, set @$ to an empty location ending the previously
13016 stacked symbol.
13017 Adjust uses to make sure the code is triggered on empty
13018 reductions.
13019 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
13020 expected output: empty reductions have empty locations.
13021
13022 2004-09-29 Akim Demaille <akim@epita.fr>
13023
13024 * data/lalr1.cc: Move towards a more standard C++ coding style
13025 for templates: Class < T > -> Class<T>.
13026
13027 2004-09-29 Akim Demaille <akim@epita.fr>
13028
13029 * data/lalr1.cc: Reinstall the former ctor, for sake of
13030 compatibility, but warn it will be removed.
13031 Move towards a more standard C++ coding style (i.e., type *var ->
13032 type* var).
13033
13034 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
13035
13036 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
13037 since it's less likely to work if NULs are involved in the future.
13038
13039 2004-09-27 Akim Demaille <akim@epita.fr>
13040
13041 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
13042
13043 2004-09-27 Akim Demaille <akim@epita.fr>
13044
13045 * data/lalr1.cc (b4_parse_param_decl_1): New.
13046 (b4_parse_param_decl): Use it to have different names between attribute
13047 and argument names.
13048 (b4_cc_constructor_call): Likewise.
13049
13050 2004-09-24 Akim Demaille <akim@epita.fr>
13051
13052 * src/parse-gram.y (add_param): Strip the leading and trailing
13053 blanks from a formal argument declaration.
13054 (YY_LOCATION_PRINT): New.
13055
13056 2004-09-24 Akim Demaille <akim@epita.fr>
13057
13058 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
13059 after the location.
13060
13061 2004-09-24 Akim Demaille <akim@epita.fr>
13062
13063 * doc/bison.texinfo (Table of Symbols): Sort.
13064
13065 2004-09-21 Akim Demaille <akim@epita.fr>
13066
13067 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
13068 the useless parentheses.
13069 Suggested by Paul Eggert.
13070
13071 2004-09-20 Akim Demaille <akim@epita.fr>
13072
13073 Let the initial-action act on the look-ahead, and use it for the
13074 "initial push" (corresponding to an hypothetical beginning-of-file).
13075 And let lalr1.cc honor %initial-action.
13076
13077 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
13078 example.
13079 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
13080 (Parser::Parser): Remove the ctor that used to initialize it.
13081 (Parser::parse): Like in the other skeletons, issue the "starting
13082 parse" message before any action.
13083 Honor %initial-action.
13084 Initialize the stacks with the lookahead.
13085 * data/yacc.c: Let $$ and @$ in %initial-action designate the
13086 look-ahead.
13087 Push them in the stacks.
13088 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
13089
13090 2004-09-20 Akim Demaille <akim@epita.fr>
13091
13092 * doc/bison.texinfo (Initial Action Decl): New.
13093
13094 2004-09-20 Akim Demaille <akim@epita.fr>
13095
13096 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
13097 clearer criterion to define it.
13098 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
13099 When reducing on an empty RHS, use the latest stacked location as
13100 location.
13101 yylloc is not always available.
13102 * data/glr.c: Likewise.
13103 Also, honor initial-actions.
13104
13105 2004-09-20 Akim Demaille <akim@epita.fr>
13106
13107 * data/yacc.c (YY_LOCATION_PRINT): New.
13108 Define when we know YYLTYPE's structure, i.e., when the default
13109 YYLLOC_DEFAULT is used.
13110 * data/c.m4 (b4_yysymprint_generate): Use it.
13111 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
13112 value of the result.
13113 (error_start_): Replace with...
13114 (error_range_): this location array.
13115 This allows to replace code relying on the implementation of
13116 locations by portable code.
13117 * data/yacc.c (yylerrsp): Replace with...
13118 (yyerror_range): this.
13119 Every time a token is popped, update yyerror_range[0], to have an
13120 accurate location for the error token.
13121 * data/glr.c (YY_LOCATION_PRINT): New.
13122 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
13123 deference a pointer.
13124 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
13125 report the location in %printers.
13126
13127 * src/scan-skel.l: Instead of abort, report error messages to ease
13128 understanding skeleton scanning failures.
13129
13130 2004-09-16 Akim Demaille <akim@epita.fr>
13131
13132 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
13133 (iterator, const_iterator): these, to be more in the C++ spirit.
13134 Also, return reverse iterators so that when displaying the stack
13135 we display its bottom first.
13136 (Parser::stack_print_, Parser::reduce_print_): Match the messages
13137 from yacc.c.
13138 We should probably use vector here though.
13139
13140 2004-09-16 Akim Demaille <akim@epita.fr>
13141
13142 Have more complete shift traces.
13143
13144 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
13145 to report Shifts instead of ad hoc YYDPRINTF invocations,
13146 including for the error token.
13147 * data/lalr1.cc (symprint_): Output the location.
13148 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
13149 output the location within the %printer.
13150 Activate GLR tests, at least to make sure they compile properly.
13151 They still don't pass though.
13152 * tests/calc.at: Adjust expect verbose output, since now "Entering
13153 state..." is on a different line than the "Shifting" message.
13154
13155 2004-09-08 Akim Demaille <akim@epita.fr>
13156
13157 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
13158 Bison directive from the Bison file to the invocation of this
13159 macro, so that these directives are passed to
13160 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
13161 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
13162 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
13163 the extra Bison directives instead of the whole series.
13164 Change the grammar so that there are recoverable errors, and
13165 unrecoverable errors. Now we can have the parser give up before
13166 consuming the whole input. As a result we now can observe that
13167 the lookahead is freed when needed.
13168 Change the parser source to parse argv[1] instead of a hard coded
13169 string.
13170 Simplify yylex, and give a value and location to EOF.
13171 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
13172 passed directives already coded in the file.
13173 Add some tests to check the location of "error".
13174 For some tests, the C++ parser is correct, and not yacc.c.
13175 For other tests, they provide different, but unsatisfying, values,
13176 so keep the C++ value so that at least one parser is "correct"
13177 according to the test suite.
13178 (Actions after errors): Remove, this is subsumed by the
13179 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
13180
13181 2004-09-06 Akim Demaille <akim@epita.fr>
13182
13183 * data/lalr1.cc: Adjust the indentation of the labels.
13184 (Parser::pop): New.
13185 Use it.
13186
13187 2004-09-06 Akim Demaille <akim@epita.fr>
13188
13189 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
13190 argument, an informative message.
13191 Call YY_SYMBOL_PRINT.
13192 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
13193 * data/lalr1.cc (destruct_): Likewise.
13194 In addition, no longer depend on b4_yysymprint_generate and
13195 b4_yydestruct_generate to generate these functions, do it "by
13196 hand".
13197
13198 2004-09-03 Akim Demaille <akim@epita.fr>
13199
13200 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
13201 invoked, yydestruct the lookahead.
13202 * tests/calc.at (Calculator $1): Update the expected lengths of
13203 traces: there is an added line for the discarded lookahead.
13204 * doc/bison.texinfo (Destructor Decl): Some rewording.
13205 Define "discarded" symbols.
13206
13207 2004-09-02 Akim Demaille <akim@epita.fr>
13208
13209 * data/lalr1.cc (translate_, destruct_): No reason to be static.
13210
13211 2004-09-02 Akim Demaille <akim@epita.fr>
13212
13213 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
13214 (YYDSYMPRINTF): Rename as...
13215 (YY_SYMBOL_PRINT): this.
13216 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
13217 two.
13218 Use it instead of direct symprint_ calls.
13219 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
13220 one.
13221
13222 2004-09-02 Akim Demaille <akim@epita.fr>
13223
13224 * data/lalr1.cc (b4_yysymprint_generate): New.
13225 (symprint_): New member function, defined when YYDEBUG.
13226 Use it consistently instead of token/nterm debugging output by
13227 hand.
13228 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
13229 %printer calls to use cdebug_ when using lalr1.cc.
13230
13231 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
13232
13233 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
13234 with #ifdef YYDEBUG.
13235
13236 2004-08-26 Akim Demaille <akim@epita.fr>
13237
13238 * doc/bison.texinfo (Implementing Loops): Rename as...
13239 (Implementing Gotos/Loops): this.
13240
13241 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
13242
13243 Adjust to latest gnulib.
13244 * bootstrap (gnulib_modules): Add xalloc-die.
13245 Set LC_ALL=C so that file names sort consistently.
13246 Prefer the gnulib copies of gettext.m4, glibc21.m4,
13247 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
13248 uintmax_t.m4, ulonglong.m4.
13249 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
13250 po.m4 since we are now using _gl.m4 instead.
13251
13252 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
13253
13254 * src/scan-action.l: Remove. Scanning of semantic actions is
13255 handled in scan-gram.l.
13256
13257 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
13258
13259 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
13260
13261 * src/location.h (struct): The file member is a uniqstr.
13262 (equal_boundaries): Use UNIQSTR_EQ for comparison.
13263
13264 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
13265
13266 Fix bug with non-%union parsers that have printers or destructors,
13267 which led to a Bison core dump. Reported by Peter Fales in
13268 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
13269
13270 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
13271 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
13272 not to our own type.
13273 * src/output.c (symbol_destructors_output, symbol_printers_output):
13274 Don't assume %union.
13275 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
13276 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
13277 UNION-FLAG. All callers changed.
13278 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
13279 Use type char, not unsigned int, when declaring an array of char;
13280 this lets us remove a cast.
13281 (Printers and Destructors): Add non-%union test cases.
13282
13283 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
13284
13285 * doc/bison.texinfo: Minor editorial changes, mostly to the new
13286 GLR writeups. E.g., avoid frenchspacing and the future tense,
13287 change "lookahead" to "look-ahead", and change "wrt" to "with
13288 respect to".
13289
13290 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
13291
13292 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
13293 New sections, split off from the GLR Parsers section. Put the new
13294 Simple GLR Parser near the start of the GLR section, for clarity.
13295 Rewrite connective text.
13296
13297 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
13298
13299 * doc/bison.texinfo (Simple GLR Parsers): New section.
13300
13301 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
13302
13303 * NEWS, TODO, doc/bison.texinfo:
13304 Use "look-ahead" instead of "lookahead", to be consistent.
13305 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
13306 while we're fixing "look-ahead".
13307 * src/conflicts.c (shift_set): Renamed from shiftset.
13308 (look_ahead_set): Renamed from lookaheadset.
13309 * src/print.c: Likewise.
13310 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
13311 name for "lookahead".
13312 (report_types, usage): Likewise.
13313 * src/getargs.h (report_look_ahead_tokens): Renamed from
13314 report_lookaheads.
13315 * src/lalr.c (compute_look_ahead_tokens): Renamed from
13316 compute_lookaheads.
13317 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
13318 (look_ahead_tokens_print): Renamed from lookaheads_print.
13319 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
13320 state_rule_lookaheads_print.
13321 * src/state.h: Likewise.
13322 (reductions.look_ahead_tokens): Renamed from lookaheads.
13323 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
13324 AT_DATA_LOOKAHEADS_GRAMMAR.
13325
13326 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
13327
13328 * README: Update location of patched M4 distribution.
13329
13330 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
13331
13332 Don't assume the C++ compiler takes the same arguments as the C compiler
13333 (trivial change).
13334 * configure.ac (O0CXXFLAGS): New var.
13335 * tests/atlocal.in (CXXFLAGS): Use it.
13336
13337 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
13338
13339 Fix some "make check" problems with C++ reported by
13340 Albert Chin-A-Young for Tru64 C++ in this thread:
13341 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
13342
13343 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
13344 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
13345 Output to a .cc file for C++, not to a .c file.
13346 * tests/calc.at (AT_CHECK_CALC): Likewise.
13347 * tests/regression.at (AT_CHECK_DANCER): Likewise.
13348 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
13349
13350 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
13351
13352 * tests/calc.at, tests/actions.at: Workaround for SGI
13353 C++ compiler. (trivial change)
13354
13355 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
13356
13357 Spent a few hours checking out which prerequisite versions the
13358 current sources actually require. I went all the way back to
13359 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
13360 a seemingly endless set of combinations of versions more recent
13361 than that. The bottom line is that the current sources require
13362 fairly recent versions of the build tools, and it'll be some work
13363 to change this.
13364 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
13365 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
13366 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
13367 Add comments explaining why those particular versions are
13368 currently needed.
13369
13370 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
13371 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
13372 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
13373
13374 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
13375 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
13376
13377 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
13378
13379 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
13380 0.11.5. Suggested by Bruno Haible.
13381 * bootstrap: Remove gettext version checking.
13382
13383 * doc/bison.texinfo (Decl Summary): Also mention that %union
13384 can depend on prerequisite types. Problem reported by Tim
13385 Van Holder.
13386
13387 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
13388
13389 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
13390 * README-alpha: Don't tell people not to package this.
13391
13392 * bootstrap: Don't assume $(...) works; use `...` instead.
13393 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
13394 gettext better.
13395
13396 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
13397 put into the -d output file, and mention what to do if YYSTYPE is
13398 defined as a macro.
13399
13400 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
13401
13402 Undo change made earlier today: it caused autopoint to not bring
13403 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
13404 autopoint's.
13405
13406 * bootstrap: Check that gettext version matches what's in
13407 configure.ac. Warn users to ignore robots.txt ERROR 404.
13408 * bootstrap: Undo today's earlier change (logged below).
13409 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
13410
13411 The gettext version checking is causing more trouble than it's
13412 curing; remove it. Problem reported by Paul Hilfinger.
13413
13414 * bootstrap: Issue a warning that one can expect a message
13415 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
13416 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
13417
13418 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
13419
13420 Ensure that the C++ compiler used for testing actually works on a
13421 simple test program; if not, skip the C++-related tests. Problem
13422 reported by Vin Shelton in:
13423 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
13424
13425 * m4/cxx.m4: New file.
13426 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
13427 * tests/atlocal.in (BISON_CXX_WORKS): Add.
13428 * tests/local.at (AT_COMPILE_CXX): Use it.
13429
13430 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
13431
13432 * data/glr.c (yylloc): Output this macro even if locations are not
13433 being generated, as the GLR parser needs it even in that case.
13434 Problem reported by Troy A. Johnson
13435 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
13436
13437 * configure.ac (AC_INIT): Update to 1.875e.
13438
13439 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
13440
13441 * NEWS: Version 1.875d.
13442 * configure.ac (AC_INIT): Likewise.
13443 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
13444
13445 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
13446 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
13447 lalr1.cc runs afoul of the first, and the last two are no longer
13448 supported by GCC 3.4.0.
13449 * README: Mention GNU m4 1.4 or later; mention m4 patches.
13450 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
13451
13452 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
13453
13454 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
13455 unsigned int, for compatibility with latest gnulib hash module.
13456 * src/state.c (state_hash, state_hasher): Likewise.
13457 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
13458 * src/uniqstr.c (hash_uniqstr): Likewise.
13459
13460 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
13461
13462 * NEWS: Unescaped newlines are no longer allowed in char & strings.
13463
13464 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
13465 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
13466 character and string literals.
13467 (unexpected_end): New function.
13468 (unexpected_eof): Use it.
13469 (unexpected_newline): New function.
13470 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
13471 actions.
13472
13473 * NEWS: Document %expect-rr.
13474
13475 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
13476 Fix typo by replacing $1 with $option.
13477 Remove more 'intl'-related files.
13478 Don't DEFUN AM_INTL_SUBDIR twice.
13479
13480 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
13481 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
13482 strtoul.c.
13483 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
13484 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
13485 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
13486 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
13487 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
13488 * src/.cvsignore: Add *.output.
13489
13490 * src/parse-gram.y: Put copyright notice inside %{ %} so it
13491 gets copied to the output file.
13492
13493 2004-04-28 Paul Eggert <eggert@twinsun.com>
13494
13495 Get files from the gnulib and po repositories, instead of relying
13496 on them being in our CVS. Upgrade to latest versions of gnulib
13497 and Automake.
13498
13499 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
13500 * bootstrap: Bootstrap from gnulib and po repositories.
13501 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
13502 * README-cvs: Document these changes. Remove version numbers from
13503 mentions of build tools, since they change so often. Mention Flex.
13504
13505 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
13506 (gl_USE_SYSTEM_EXTENSIONS): Add.
13507 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
13508 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
13509 does this for us.
13510 (AC_ISC_POSIX): Remove; we no longer support this
13511 ancient OS, as it gets in the way of latest Autoconf & gnulib.
13512 (AC_HEADER_STDC): Remove: we now assume C89 or better.
13513 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
13514 Do not check for C89 headers, except for locale.h which is used
13515 by the Yacc library and must port to K&R hosts.
13516 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
13517 Do not check for C89 functions, except for setlocale which is
13518 used by the Yacc library.
13519 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
13520 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
13521 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
13522 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
13523 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
13524 AM_GNU_GETTEXT): Remove; now done by:
13525 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
13526 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
13527 for us.
13528
13529 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
13530 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
13531 Define to empty, as gnulib.mk will do the rest for us.
13532 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
13533 for us.
13534 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
13535 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
13536
13537 * src/files.c: Include gnulib's xstrndup.h.
13538
13539 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
13540 (REALLOC): Use xnrealloc, for likewise.
13541 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
13542 (strnlen, memrchr): Remove decls; functions no longer used.
13543 Include <stpcpy.h>.
13544
13545 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
13546 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
13547 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
13548 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
13549 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
13550 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
13551 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
13552 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
13553 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
13554 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
13555 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
13556 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
13557 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
13558 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
13559 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
13560 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
13561 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
13562 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
13563 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
13564 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
13565 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
13566 Remove, as these files are now generated automatically
13567 by bootstrap or automake.
13568
13569 * po/ChangeLog: Remove: all but one entry was a duplicate
13570 of this file, and I moved that 2000-11-02 entry here.
13571
13572 * config/.cvsignore: Add Makefile, depcomp, install-sh.
13573 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
13574 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
13575 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
13576 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
13577 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
13578 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
13579 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
13580 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
13581 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
13582 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
13583 xstrndup.h.
13584 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
13585 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
13586 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
13587 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
13588 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
13589 * src/.cvsignore: Remove *_.c.
13590
13591
13592 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
13593 support it. (The latest stable gzip doesn't.)
13594
13595 2004-04-27 Paul Eggert <eggert@twinsun.com>
13596
13597 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
13598 case, as stos_ is now used by destructors due to the 2004-02-09
13599 change.
13600
13601 Remove more K&R C support.
13602 * lib/libiberty.y (PARAMS): Remove. All uses removed.
13603 * lib/subpipe.c (errno): Remove decl.
13604 Include <stdlib.h> unconditionally.
13605 (EXIT_FAILURE): Remove macro.
13606 * src/complain.c (vfprintf, strerror): Remove.
13607 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
13608 unconditionally.
13609 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
13610 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
13611 (strchr, strspn, memchr): Remove decls.
13612 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
13613 unconditionally. Do not declare perror.
13614 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
13615 unconditionally.
13616
13617 * src/complain.c (_): Remove useless defn, as system.h defines this.
13618
13619 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
13620 with latest obstack.h.
13621 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
13622 to procedure types, as obstack.h now does that for us.
13623 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
13624
13625 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
13626 so that this include file can stand alone.
13627 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
13628 does this now. Include subpipe.h first after config.h, to
13629 test whether it can stand alone.
13630
13631 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
13632 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
13633 unused declaration.
13634
13635 * tests/synclines.at (%union synch line): Put a dummy member in
13636 the union, because empty unions aren't allowed in C. Caught
13637 by GCC 3.4.0.
13638
13639 2004-04-13 Jim Meyering <jim@meyering.net>
13640
13641 * src/conflicts.c (conflicts_print): Correct format string typo:
13642 use `%%' to produce literal `%'. (trivial change)
13643
13644 2004-03-30 Paul Eggert <eggert@twinsun.com>
13645
13646 * src/getargs.c (version): Update copyright year to 2004.
13647
13648 * data/c.m4 (b4_int_type): Use 'short int' rather than
13649 'short', and similarly for 'long', 'unsigned', etc.
13650 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
13651 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
13652 yy_yypstack, yydumpstack): Likewise.
13653 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
13654 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
13655 Likewise.
13656 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
13657 yy_stack_print, yyparse): Likewise.
13658 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
13659 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
13660 * lib/bitset.c (bitset_print): Likewise.
13661 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
13662 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
13663 * lib/bitsetv.c (bitsetv_dump): Likewise.
13664 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
13665 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
13666 Likewise.
13667 * src/LR0.c (allocate_itemsets): Likewise.
13668 * src/gram.h (rule_number, rule): Likewise.
13669 * src/lalr.h (goto_number): Likewise.
13670 * src/nullable.c (nullable_compute): Likewise.
13671 * src/output.c (prepare_rules): Likewise.
13672 * src/relation.c (relation_print, relation_digraph): Likewise.
13673 * src/relation.h (relation_node): Likewise.
13674 * src/state.h (state_number, transitions, errs, reductions,
13675 struct state): Likewise.
13676 * src/symtab.h (symbol_number, struct symbol): Likewise.
13677 * src/tables.c (vector_number, tally, action_number,
13678 default_goto, goto_actions): Likewise.
13679 * tests/existing.at (GNU Cim Grammar): Likewise.
13680 * tests/regression.at (Web2c Actions): Likewise.
13681
13682 * src/output.c (muscle_insert_short_int_table): Renamed from
13683 muscle_insert_short_table. All uses changed.
13684
13685 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
13686
13687 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
13688 (declaration): Replace expected_conflicts with expected_sr_conflicts.
13689 Add %expect-rr rule.
13690
13691 * src/scan-gram.l: Recognize %expect-rr.
13692
13693 * src/conflicts.h (expected_sr_conflicts): Rename from
13694 expected_conflicts.
13695 (expected_rr_conflicts): Declare.
13696
13697 * src/conflicts.c (expected_sr_conflicts): Rename from
13698 expected_conflicts.
13699 (expected_rr_conflicts): Define.
13700 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
13701 for GLR parsers.
13702 Use expected_sr_conflicts in place of expected_conflicts.
13703 Warn if expected_rr_conflicts used in non-GLR parser.
13704
13705 * doc/bison.texinfo: Add documentation for %expect-rr.
13706
13707 2004-03-08 Paul Eggert <eggert@gnu.org>
13708
13709 Add support for hex token numbers. Suggested by Odd Arild Olsen in
13710 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
13711
13712 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
13713 in lalr1.cc.
13714 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
13715 * src/scan-gram.l (scan_integer): New function.
13716 ({int}): Use it.
13717 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
13718 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
13719 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
13720 Say "long int", not "long", for uniformity with GNU style.
13721
13722 2004-02-25 Paul Eggert <eggert@twinsun.com>
13723
13724 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
13725 compilers. This fixes a problem with Intel's C++ compiler being
13726 chatty, reported by Guido Trentalancia in
13727 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
13728
13729 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
13730
13731 Support %destructor and merge error locations in lalr1.cc.
13732
13733 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
13734 (Parser::stos_): Define unconditionally.
13735 (Parser::destruct_): New method. Generate its body with
13736 b4_yydestruct_generate.
13737 (Parser::error_start_): New attribute.
13738 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
13739 token which are discarded.
13740 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
13741 error_start_ when erroneous token are discarded.
13742 (Parser::parse) <yyerrlab1>: Compute the location of the error
13743 token so that it covers all the discarded tokens.
13744 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
13745 it can be called with `%skeleton "lalr1.cc"', and do that.
13746
13747 2004-02-02 Paul Eggert <eggert@twinsun.com>
13748
13749 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
13750 $(top_srcdir)/lib and ../lib. This fixes a bug reported
13751 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
13752 There's no need to mention top_builddir since Automake does that
13753 for us.
13754 (INCLUDES): Remove, as Automake says it's obsolescent.
13755 Contents migrated into AM_CPPFLAGS as described above.
13756 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
13757
13758 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
13759
13760 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
13761 (yyreportSyntaxError): Handle case where lookahead token is
13762 YYEMPTY.
13763
13764 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13765
13766 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
13767 resulting parsers are compilable with C++.
13768
13769 2003-12-23 Paul Eggert <eggert@twinsun.com>
13770
13771 * config/depcomp, config/install-sh: Sync with Automake 1.8.
13772 * src/output.c (output_skeleton): Rename local var.
13773 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
13774 Bison tokens, as this runs afoul of the 2003-10-07 change that
13775 disallowed NUL bytes in character constants or string literals.
13776
13777 * tests/local.at: Require Autoconf 2.59's Autotest.
13778 * tests/testsuite.at: Don't include local.at, since we now assume
13779 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
13780 including it.
13781 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
13782 multiple inclusion warnings.
13783
13784 2003-12-02 Akim Demaille <akim@epita.fr>
13785
13786 * doc/bison.texinfo (How Can I Reset the Parser): More about start
13787 conditions.
13788 From Bruno Haible.
13789
13790 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
13791
13792 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
13793
13794 2003-10-07 Paul Eggert <eggert@twinsun.com>
13795
13796 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
13797 if testsuite doesn't exist.
13798
13799 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
13800 literals, unfortunately.
13801 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
13802 Complain about NUL bytes in character constants or string literals.
13803
13804 2003-10-05 Paul Eggert <eggert@twinsun.com>
13805
13806 * NEWS: Don't document %no-default-prec, as it's still
13807 too experimental.
13808 * doc/bison.texinfo: Document %no-default-prec only if
13809 the defaultprec flag is set. Normally it's not.
13810
13811 2003-10-04 Paul Eggert <eggert@twinsun.com>
13812
13813 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
13814 non-modifiable lvalue, instead of a modifiable one.
13815 * doc/bison.texinfo (Actions): Document that $$ can
13816 be assigned to. Do not claim that $$ and $N are
13817 array element references: user code should not rely on this.
13818
13819 2003-10-01 Paul Eggert <eggert@twinsun.com>
13820
13821 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
13822 (grammar_declaration): Use it.
13823 * src/scan-gram.l: New token %no-default-prec.
13824 * tests/conflicts.at: Revamp tests to use %no-default-prec.
13825 * NEWS, doc/bison.texinfo: Document the above.
13826
13827 2003-10-01 Akim Demaille <akim@epita.fr>
13828
13829 VCG no longer supports long_straight_phase.
13830
13831 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
13832 * src/print_graph.c (print_graph): Adjust.
13833
13834 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
13835 and Paul Eggert <eggert@twinsun.com>
13836
13837 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
13838 Table of Symbols): Document %default-prec.
13839 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
13840 (grammar_declaration): Set default_prec on %default-prec.
13841 * src/scan-gram.l (%default-prec): New token.
13842 * src/reader.h (default_prec): New flag.
13843 * src/reader.c: Likewise.
13844 (packgram): Handle it.
13845 * tests/conflicts.at (%default-prec without %prec,
13846 %default-prec with %prec, %default-prec 1): New tests.
13847
13848 2003-09-30 Paul Eggert <eggert@twinsun.com>
13849
13850 * tests/testsuite.at: Include local.at, not input.at, fixing
13851 a typo in the 2003-08-25 patch.
13852
13853 2003-08-27 Akim Demaille <akim@epita.fr>
13854
13855 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
13856 GCC warnings.
13857
13858 2003-08-26 Akim Demaille <akim@epita.fr>
13859
13860 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
13861 "<\#" to avoid magic from Gnus when posting parts of this script.
13862
13863 2003-08-26 Akim Demaille <akim@epita.fr>
13864
13865 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
13866 (Parser::parse): here.
13867 Adjust: nerrs and errstatus is now replaced by...
13868 (Parser::nerrs_, Parser::errstatus_): New.
13869
13870 2003-08-25 Akim Demaille <akim@epita.fr>
13871
13872 * config/announce-gen, Makefile.cfg: New.
13873 * Makefile.am: Adjust.
13874 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
13875 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
13876
13877 2003-08-25 Akim Demaille <akim@epita.fr>
13878
13879 When reducing initial empty rules, Bison parser read an initial
13880 location that is not defined. This results in garbage, and that
13881 affects Bison's own parser. Therefore we need (i) to extend Bison
13882 to support a means to initialize this location, and (ii) to use
13883 this CVS Bison to fix CVS Bison's parser.
13884
13885 * src/reader.h, reader.c (epilogue_augment): Remove, replace
13886 with...
13887 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
13888 * src/parse-gram.y: Adjust.
13889 (%initial-action): New.
13890 (%error-verbose): Since we require CVS Bison, there is no reason
13891 not to use it.
13892 * src/scan-gram.l: Adjust.
13893 * src/Makefile.am (YACC): New, to make sure we use our own parser.
13894 * data/yacc.c (yyparse): Use b4_initial_action.
13895
13896 2003-08-25 Akim Demaille <akim@epita.fr>
13897
13898 * doc/bison.texinfo: Don't promote stdout for error messages.
13899
13900 2003-08-25 Akim Demaille <akim@epita.fr>
13901
13902 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
13903 From Alexandre Duret-Lutz.
13904
13905 2003-08-25 Akim Demaille <akim@epita.fr>
13906
13907 Version 1.875c.
13908
13909 2003-08-25 Akim Demaille <akim@epita.fr>
13910
13911 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
13912 Use them.
13913
13914 2003-08-25 Akim Demaille <akim@epita.fr>
13915
13916 * data/lalr1.cc (Parser::reduce_print_): New.
13917 Use it.
13918
13919 2003-08-25 Akim Demaille <akim@epita.fr>
13920
13921 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
13922 error recovery loops. This patch is based on
13923 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
13924 Also, augment the similarity between lalr1.cc and yacc.c.
13925 Note: the locations of error recovery rules are not correct yet.
13926
13927 * data/lalr1.cc: Comment changes to augment the similarity between
13928 lalr1.cc and yacc.c.
13929 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
13930 (yyerrlab1): Remove, but where it used to be (now the bottom part of
13931 yyerrlab), when hitting EOF, pop the whole stack here instead of
13932 merely falling thru the default error handling mechanism.
13933 (yyerrorlab): New label, with the old contents of YYERROR,
13934 plus the following change: pop the stack of rhs corresponding
13935 to the production that invoked YYERROR. That is how Yacc
13936 behaves (required by POSIX).
13937 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
13938 fail.
13939
13940 2003-08-25 Akim Demaille <akim@epita.fr>
13941
13942 Tune local.at so that people can "autom4te -l autotest calc.at -o
13943 calc" for instance, to extract a sub test suite.
13944
13945 * tests/testsuite.at: Move the initialization, Autotest version
13946 requirement, and AT_TESTED invocation into...
13947 * tests/local.at: here.
13948 * tests/testsuite.at: Include it for compatibility with Autoconf
13949 2.57.
13950 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
13951 be ignore.
13952
13953 2003-08-04 Paul Eggert <eggert@twinsun.com>
13954
13955 Rework code slightly to avoid gcc -Wtraditional warnings.
13956 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
13957 The returned value is now stored in *YY0. All callers changed.
13958 * src/output.c (merge_output): Adjust to the above change.
13959
13960 2003-07-26 Paul Eggert <eggert@twinsun.com>
13961
13962 * data/glr.c (YYASSERT): New macro.
13963 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
13964 yyresolveStates, yyprocessOneStack):
13965 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
13966 Derived from a suggestion by Frank Heckenbach.
13967
13968 2003-07-25 Paul Eggert <eggert@twinsun.com>
13969
13970 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
13971 for portability to K&R C (after ansi2knr, presumably). See
13972 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
13973 by Frank Heckenbach, though I have omitted the structure-initialization
13974 part of his glr-knr.diff patch since I recall that the Portable
13975 C Compiler didn't require that change.
13976
13977 Let the user specify how to allocate and free memory.
13978 Derived from a suggestion by Frank Heckenbach in
13979 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
13980 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
13981 All uses of free, malloc, realloc changed to use these macros,
13982 and unnecessary casts removed.
13983 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
13984
13985 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
13986
13987 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
13988 use s.empty() rather than s == "" to test for empty string; see
13989 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
13990 (trivial change)
13991
13992 2003-06-25 Akim Demaille <akim@epita.fr>
13993
13994 * config/depcomp, config/install-sh: Update from masters.
13995
13996 2003-06-20 Paul Eggert <eggert@twinsun.com>
13997
13998 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
13999 and return properly parenthesized result.
14000 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
14001 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
14002 Remove unnecessary parentheses from uses.
14003 * doc/bison.texinfo (Location Default Action): Describe the
14004 conventions for parentheses.
14005
14006 2003-06-19 Paul Eggert <eggert@twinsun.com>
14007
14008 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
14009 yyreportTree): Do not assume that size_t is the same width as int,
14010 when printing sizes. Print sizes using an unsigned format.
14011 Problem reported by Frank Heckenbach in
14012 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
14013
14014 Port to Forte Developer 7 C compiler.
14015 * data/glr.c (struct YYLTYPE): If locations are not being used,
14016 declare a single dummy member, as empty structs do not conform
14017 to the C standard.
14018 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
14019 the Forte Developer 7 C compiler complains that end-of-loop
14020 code is not reached.
14021
14022 2003-06-17 Paul Eggert <eggert@twinsun.com>
14023
14024 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
14025 avoid warnings from picky compilers about redefinition of PARAMS.
14026
14027 2003-06-17 Paul Eggert <eggert@twinsun.com>
14028
14029 Version 1.875b.
14030
14031 * NEWS: Document 1.875b.
14032
14033 * lib/bbitset.h: Do not include config.h; that's the includer's job.
14034 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
14035 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
14036 Don't use 'index' in comments, as it's a builtin fn on some hosts.
14037 * lib/bitset_stats.c: Include gettext.h unconditionally, as
14038 per recent gettext manual's suggestion.
14039 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
14040 Use prototypes, not old-style definitions.
14041 * lib/lbitset.c (lbitset_unused_clear): Likewise.
14042 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
14043 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
14044 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
14045 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
14046 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
14047 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
14048 vbitset_or_and_cmp, vbitset_copy): Likewise.
14049
14050 * lib/libiberty.h: Do not include config.h; that's the includer's job.
14051 Do not include <stdlib.h>.
14052 (PARAMS): Define unconditionally for C89.
14053 (ATTRIBUTE_NORETURN): Remove.
14054 (ATTRIBUTE_UNUSED): Define unconditionally.
14055
14056 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
14057 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
14058 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
14059 * lib/vbitset.c, lib/vbitset.h: New files.
14060 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
14061 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
14062 from libbitset.
14063
14064 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
14065 `How Can I Reset @code{yyparse}', since texinfo does not allow
14066 arbitrary @ in node names.
14067
14068 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
14069 shouldn't be needed according to the gettext 0.12.1 documentation
14070 but which seem to be needed anyway: codeset.m4 glibc21.m4
14071 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
14072 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
14073 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
14074
14075 * lib/.cvsignore: Add stdbool.h.
14076 * m4/.cvsignore: Add nls.m4, po.m4.
14077
14078 Upgrade to CVS gnulib.
14079 * stdbool_.h: File renamed from stdbool.h.in.
14080 * configure.ac (AM_STDBOOL_H): Invoke this instead of
14081 AC_HEADER_STDBOOL.
14082 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
14083 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
14084 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
14085 (MOSTLYCLEANFILES): New var.
14086 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
14087 (stdbool.h): New rule.
14088 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
14089 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
14090 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
14091 m4/quote.m4: Upgrade to today's gnulib.
14092
14093 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
14094 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
14095 the tests right now.
14096 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
14097 yyerror are declared before use; C99 requires this.
14098
14099 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14100
14101 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
14102 first.
14103 (yyrecoverSyntaxError): Correct the logic for setting and testing
14104 yyerrState.
14105 Correct comment on handling EOF.
14106 Allow states with only a default reduction, rather than failing
14107 (I can't quite reconstruct why these were not allowed before).
14108
14109 Fixes to avoid problem that $-N rules in GLR parsers can cause
14110 buffer overruns, corrupting state.
14111
14112 * src/output.c (prepare_rules): Output max_left_semantic_context
14113 definition.
14114 * src/reader.h (max_left_semantic_context): New variable declaration.
14115 * src/scan-gram.l (max_left_semantic_context): Define.
14116 (handle_action_dollar): Update max_left_semantic_context.
14117 * data/glr.c (YYMAXLEFT): New definition.
14118 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
14119 (yyresolveAction): Ditto.
14120
14121 Fixes to problems with location handling in GLR parsers reported by
14122 Frank Heckenbach (2003/06/05).
14123
14124 * data/glr.c (YYLTYPE): Make trivial if locations not used.
14125 (YYRHSLOC): Add parentheses, and define only if locations used.
14126 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
14127 locations not used.
14128 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
14129 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
14130
14131 * tests/cxx-type.at: Exercise location information; update tests
14132 to differentiate output with and without locations.
14133 Remove forward declarations of yylex and yyerror---caused errors
14134 because default YYLTYPE not yet defined.
14135 Change semantic actions to compute strings, rather than printing
14136 them directly (to test proper passing of semantics values). Change
14137 output to prefix notation and update test data and expected results.
14138 (yylex): Track locations.
14139 (stmtMerge): Return value rather than printing, and include arguments
14140 in value.
14141
14142 2003-06-03 Paul Eggert <eggert@twinsun.com>
14143
14144 Avoid warnings generated by GCC 2.95.4 when Bison is
14145 configured with --enable-gcc-warnings.
14146 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
14147 yy::]b4_parser_class_name[::translate_,
14148 yy::Stack::operator[] (unsigned),
14149 yy::Stack::operator[] (unsigned) const,
14150 yy::Slice::operator[] (unsigned),
14151 yy::Slice::operator[] (unsigned) const):
14152 Rename local vars to avoid warnings.
14153 * tests/glr-regression.at (Improper handling of embedded actions
14154 and $-N in GLR parsers): Remove unused local variable from yylex.
14155 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
14156 (void) as arg when not pure, since we now assume C89 when building
14157 Bison. Pacify GCC by using parameter.
14158
14159 2003-06-02 Paul Eggert <eggert@twinsun.com>
14160
14161 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
14162 yy::Location::lines, yy::Location::columns): Rename arguments
14163 to avoid shadowing; this removes a warning generated by GCC 3.3.
14164
14165 2003-06-01 Paul Eggert <eggert@twinsun.com>
14166
14167 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
14168 to g++, as GCC 3.3 complains if you do it.
14169 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
14170 everything that WARNING_CFLAGS has, except omit warnings
14171 not suitable for C++.
14172 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
14173 * tests/atlocal.in (CXXFLAGS): New var.
14174 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
14175
14176 Fix a GLR parser bug I reported in February; see
14177 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
14178 The problem was that GLR parsers did not conform to the C standard,
14179 because actions like { $1 = $2 + $3; } expanded to expressions
14180 that invoked YYFILL in separate subexpressions, and YYFILL assigned
14181 to a local variable. The C standard says that expressions
14182 like (var = f ()) + (var = f ()) have undefined behavior.
14183 Another problem was that GCC sometimes issues warnings that
14184 yyfill and its parameters are unused.
14185
14186 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
14187 as possibly unused.
14188 (yyfill): New function.
14189 (YYFILL): Use it.
14190 (yyuserAction): Change type of yynormal to bool, so that it matches
14191 the new yyfill signature. Mark it as possibly unused.
14192
14193
14194 Follow up on a bug I reported in February, where a Bison-generated
14195 parser can loop. Provide a test case and a fix for yacc.c. I
14196 don't have a fix for lalr1.cc or for glr.c, unfortunately.
14197 The original bug report is in:
14198 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
14199
14200 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
14201 macro's size was becoming unwieldy.
14202 (yyerrlab): Do not discard an empty lookahead symbol, as this
14203 might destroy garbage.
14204 (yyerrorlab): New label, with the old contents of YYERROR,
14205 plus the following change: pop the stack of rhs corresponding
14206 to the production that invoked YYERROR. That is how Yacc
14207 behaves, and POSIX requires this behavior.
14208 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
14209 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
14210 Define 'alarm' to do nothing if unistd.h is not available.
14211 Add a new rule "exp: '-' error;" to test the above change to
14212 data/yacc.c. Use 'alarm' to abort any test taking longer than
14213 10 seconds, as it's probably looping.
14214 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
14215 Also, the new yacc.c generates two fewer diagnostics for an
14216 existing test.
14217
14218 2003-05-24 Paul Eggert <eggert@twinsun.com>
14219
14220 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
14221 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
14222 This fixes a problem reported by John Bowman when the Compaq/HP
14223 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
14224 -ansi -Wall -gall).
14225 * data/yacc.c (union yyalloc): Likewise.
14226 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
14227
14228 Switch from 'int' to 'bool' where that makes sense.
14229
14230 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
14231 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
14232 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
14233 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
14234 Return or accept bool, not int. All callers changed.
14235 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
14236 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
14237 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
14238 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
14239 bitset_or_and_cmp_): Likewise.
14240 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
14241 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
14242 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
14243 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
14244 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
14245 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
14246 bitset_stats_or_and_cmp): Likewise.
14247 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
14248 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
14249 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
14250 ebitset_xor_cmp): Likewise.
14251 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
14252 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
14253 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
14254 lbitset_xor_cmp): Likewise.
14255 * lib/bbitset.h: Include <stdbool.h>.
14256 (struct bitset_vtable): The following members now return bool, not
14257 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
14258 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
14259 or_and_cmp).
14260 * src/conflicts.c (count_rr_conflicts): Likewise.
14261 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
14262 All uses changed.
14263 * lib/ebitset.c (ebitset_obstack_init): Likewise.
14264 * lib/lbitset.c (lbitset_obstack_init): Likewise.
14265 * src/getargs.c (debug_flag, defines_flag, locations_flag,
14266 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
14267 graph_flag): Likewise.
14268 * src/getargs.h (debug_flag, defines_flag, locations_flag,
14269 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
14270 graph_flag): Likewise.
14271 * src/output.c (error_verbose): Likewise.
14272 * src/output.h (error_verbose): Likewise.
14273 * src/reader.c (start_flag, typed): Likewise.
14274 * src/reader.h (typed): Likewise.
14275 * src/getargs.c (LOCATIONS_OPTION): New constant.
14276 (long_options, getargs): Use it.
14277 * src/lalr.c (build_relations): Use bool, not int.
14278 * src/nullable.c (nullable_compute): Likewise.
14279 * src/print.c (print_reductions): Likewise.
14280 * src/tables.c (action_row, pack_vector): Likewise.
14281 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
14282 * src/output.c (prepare): Use it.
14283 * src/output.c (token_definitions_output,
14284 symbol_destructors_output, symbol_destructors_output): Use string,
14285 not boolean integer, to keep track of whether to output separator.
14286 * src/print_graph.c (print_core): Likewise.
14287 * src/state.c (state_rule_lookaheads_print): Likewise.
14288
14289 * config/install-sh: Sync from automake 1.7.5.
14290
14291 2003-05-14 Paul Eggert <eggert@twinsun.com>
14292
14293 * src/parse-gram.y (rules_or_grammar_declaration): Require a
14294 semicolon after a grammar declaration, in the interest of possible
14295 future changes to the Bison input language.
14296 Do not allow a stray semicolon at the start of the grammar.
14297 (rhses.1): Allow one or more semicolons after any rule, including
14298 just before "|" as required by POSIX.
14299 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
14300 grammar.
14301
14302 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
14303
14304 %parse-param support for lalr1.cc.
14305
14306 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
14307 b4_cc_constructor_calls, b4_cc_constructor_call,
14308 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
14309 definitions.
14310 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
14311 parse-param arguments.
14312 (yy::b4_parser_class_name): Declare instance variables to
14313 hold parse-param arguments.
14314 * tests/calc.at: s/value/semantic_value/ because value clashes
14315 with a member of yy::b4_parser_class_name. Adjust C++ code
14316 to handle %parse-param. Enable %parse-param test in C++.
14317
14318 2003-05-12 Paul Eggert <eggert@twinsun.com>
14319
14320 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
14321 English a bit. Fix fclose typo. Change "const char" to "char
14322 const", and use ANSI C rather than K&R for "main". Suggest
14323 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
14324 and suggest yy_switch_to_buffer.
14325
14326 2003-05-05 Paul Eggert <eggert@twinsun.com>
14327
14328 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
14329 C89. This avoids a diagnostic on compilers that define __STDC__
14330 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
14331 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
14332
14333 2003-05-03 Paul Eggert <eggert@twinsun.com>
14334
14335 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
14336 Do not overrun array bounds.
14337 This should fix a bug reported today by Olatunji Oluwabukunmi in
14338 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
14339
14340 2003-04-29 Akim Demaille <akim@epita.fr>
14341
14342 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
14343 * src/getargs.c, src/getargs.h: here, as bool, not int.
14344 (nondeterministic_parser): New.
14345 * src/parse-gram.y, src/scan-gram.l: Support
14346 %nondeterministic-parser.
14347 * src/output.c (prepare): Use nondeterministic_parser instead
14348 of glr_parser where appropriate.
14349 * src/tables.c (conflict_row, action_row, save_row)
14350 (token_actions, token_actions, pack_vector): Ditto.
14351
14352 2003-04-29 Akim Demaille <akim@epita.fr>
14353
14354 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
14355
14356 2003-04-29 Akim Demaille <akim@epita.fr>
14357
14358 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
14359 with %pure-parser and %locations to exercise the patch from Yakov
14360 Markovitch below.
14361
14362 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
14363
14364 * data/yacc.c: (b4_lex_param): Corrected for the case where
14365 %lex-param is provided and %pure-parser isn't.
14366
14367 2003-04-27 Paul Eggert <eggert@twinsun.com>
14368
14369 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
14370 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
14371 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
14372 if it is not defined.
14373 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
14374
14375 2003-04-26 Paul Eggert <eggert@twinsun.com>
14376
14377 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
14378 Declare to be of type suitable for the ninf value itself, not of
14379 type suitable for the corresponding table, since the latter might
14380 be unsigned but the ninf value might be negative. This fixes a
14381 bug reported by Alexandre Duret-Lutz in
14382 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
14383
14384 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
14385 invokes it. We shouldn't invoke it twice because it will attempt
14386 to put error.o in the archive twice. This fixes a glitch reported
14387 by Martin Mokrejs in
14388 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
14389
14390 2003-04-21 Paul Eggert <eggert@twinsun.com>
14391
14392 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
14393 to gnulib.
14394
14395 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
14396
14397 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
14398 Fix obvious typo that results in uncompilable GLR parsers
14399 when both %pure-parser and %locations are used. (trivial change)
14400
14401 2003-04-17 Paul Eggert <eggert@twinsun.com>
14402
14403 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
14404 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
14405 Do not insert the expected token via unput, as this runs afoul
14406 of a POSIX-compatibility bug in flex 2.5.31.
14407 All uses changed to BEGIN the parent state,
14408 since we no longer insert the expected token via unput.
14409 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
14410 that is no longer emitted after the above change.
14411
14412 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
14413 the first one. This change is from Paul Hilfinger, and it fixes
14414 regression reported by Werner Lemberg in
14415 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
14416
14417 (resolve_sr_conflict): Don't invoke state_errs_set
14418 unless one or more tokens have been explicitly made errors.
14419 Otherwise, the above change causes Bison to abort.
14420
14421 * tests/existing.at (GNU pic Grammar): New test case, taken from
14422 Lemberg's email.
14423
14424 2003-03-31 Akim Demaille <akim@epita.fr>
14425
14426 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
14427
14428 2003-03-31 Akim Demaille <akim@epita.fr>
14429
14430 * src/output.c (prepare_symbols): Avoid trailing spaces in the
14431 output.
14432
14433 2003-03-31 Akim Demaille <akim@epita.fr>
14434
14435 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
14436 From Paul Hilfinger.
14437
14438 2003-03-29 Akim Demaille <akim@epita.fr>
14439
14440 * m4/error.m4: Do not put under dynamic conditions some code which
14441 expansion is under static control.
14442
14443 2003-03-29 Akim Demaille <akim@epita.fr>
14444
14445 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
14446
14447 2003-03-29 Akim Demaille <akim@epita.fr>
14448
14449 * doc/bison.texinfo (Strings are Destroyed): New.
14450
14451 2003-03-13 Paul Eggert <eggert@twinsun.com>
14452
14453 * .cvsignore: Add configure.lineno.
14454 * src/.cvsignore: Add yacc.
14455 * tests/.cvsignore: Add testsuite.log.
14456 * doc/fdl.texi: Sync with latest FSF version.
14457
14458 2003-03-12 Paul Eggert <eggert@twinsun.com>
14459
14460 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
14461 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
14462 cursor, instead of leaving it undefined. This fixes a bug
14463 reported by Tim Van Holder in
14464 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
14465 * tests/input.at (Torturing the Scanner): Test the scanner on
14466 an empty input file, which was Tim Van Holder's test case.
14467
14468 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
14469 <sys/resource.h> can be included, include sys/time.h and
14470 sys/times.h first, if available. This works around the SunOS
14471 4.1.4 porting bug reported by Bruce Becker in
14472 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
14473
14474 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
14475 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
14476 AC_HEADER_SYS_WAIT.
14477
14478 Merge changes from gnulib. This was prompted because the CVS
14479 snapshot didn't build on Solaris 7 due to strnlen problems.
14480
14481 These changes need to be merged back into gnulib:
14482 * lib/hash.c: Include <stdbool.h> unconditionally.
14483 * m4/onceonly.m4 (m4_quote): New macro.
14484 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
14485 Quote AC_FOREACH variable-expansions properly.
14486 The 2003-01-03 obstack.h change also needs merging.
14487 {end of changes requiring merging}
14488
14489 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
14490 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
14491 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
14492 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
14493 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
14494 New files, imported from gnulib.
14495 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
14496 above.
14497
14498 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
14499 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
14500 gnulib sources.
14501
14502 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
14503 Add.
14504 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
14505 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
14506 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
14507 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
14508 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
14509 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
14510 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
14511 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
14512 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
14513 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
14514 (jm_PREREQ_ARGMATCH): Remove.
14515 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
14516 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
14517
14518 * src/system.h: Include <stdbool.h> unconditionally.
14519
14520 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
14521 assuming at least C89 in the bitset code for some time now.
14522
14523 2003-03-03 Akim Demaille <akim@epita.fr>
14524
14525 * ro.po: New.
14526
14527 2003-03-02 Akim Demaille <akim@epita.fr>
14528
14529 * doc/bison.texinfo (Table of Symbols): Reactivate the
14530 documentation for %lex-param, and %parse-param.
14531
14532 2003-03-02 Akim Demaille <akim@epita.fr>
14533
14534 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
14535 generate verbose error messages.
14536 Use the number of tokens as an upper bound in yytname, as it
14537 cannot be a non terminal.
14538
14539 2003-03-02 Akim Demaille <akim@epita.fr>
14540
14541 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
14542 message.
14543
14544 2003-03-02 Akim Demaille <akim@epita.fr>
14545
14546 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
14547 Use them to exercise yycheck overrun.
14548 Based on Andrew Suffield's grammar.
14549
14550 2003-03-02 Akim Demaille <akim@epita.fr>
14551
14552 Create tests/local.at for Bison generic testing macros.
14553
14554 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
14555 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
14556 This new file.
14557 * tests/calc.at (AT_CHECK_CALC): Adjust.
14558 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
14559 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
14560 * tests/local.at: here.
14561 (AT_COMPILE_CXX): Tags the tests using it as c++.
14562 Ignore the test if CXX is not functional.
14563
14564 2003-03-01 Paul Eggert <eggert@twinsun.com>
14565
14566 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
14567 not loc->end, since loc->end might contain garbage and this leads
14568 to undefined behavior on some platforms.
14569 (id_loc, token_start): Use (IF_LINTed) initial values that do not
14570 depend on *loc, so that the reader doesn't give the the false
14571 impression that *loc is initialized.
14572 (<INITIAL>"%%"): Do not bother setting code_start, since its value
14573 does not survive the return.
14574
14575 2003-03-01 Akim Demaille <akim@epita.fr>
14576
14577 * src/scan-gram.l (code_start): Always initialize it when entering
14578 into yylex, as SC_EPILOGUE is activated *before* the corresponding
14579 yylex invocation. An alternative would be making it static, but
14580 then it starts with the second %%'s beginning, instead of its end.
14581
14582 2003-02-28 Paul Eggert <eggert@twinsun.com>
14583
14584 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
14585 around a UnixWare 7.1.1 porting bug reported by John Hughes in
14586 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
14587
14588 2003-02-26 Paul Eggert <eggert@twinsun.com>
14589
14590 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
14591 Remove Sequent/Pyramid discussion (nobody uses them any more).
14592 Merge VMS and MS-DOS discussion; these ports may well be dead
14593 but let's keep mentioning them for now. Put <> around email
14594 addresses. Add copyright notice.
14595
14596 2003-02-24 Paul Eggert <eggert@twinsun.com>
14597
14598 * data/glr.c (yy_reduce_print): yylineno -> yylno,
14599 to avoid collision with flex use of yylineno.
14600 Problem reported by Bruce Lilly in
14601 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
14602 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
14603 * data/yacc.c (yy_reduce_print): Likewise.
14604
14605 * config/depcomp: Sync with Automake 1.7.3.
14606
14607 2003-02-21 Akim Demaille <akim@epita.fr>
14608
14609 * data/lalr1.cc: Use temporary variables instead of casts to
14610 change integer types.
14611 Suggested by Paul Eggert.
14612
14613 2003-02-21 Akim Demaille <akim@epita.fr>
14614
14615 * doc/bison.texinfo: Use "location" consistently to refer to @n,
14616 to avoid confusions with lalr1.cc's notion of Position.
14617 Suggested by Paul Eggert.
14618
14619 2003-02-20 Akim Demaille <akim@epita.fr>
14620
14621 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
14622 before initial_columns.
14623 (location.hh): Use consistent variable names when defining the
14624 operator<<.
14625 Use "last" so that we subtract from Positions, not from unsigned.
14626
14627 2003-02-20 Akim Demaille <akim@epita.fr>
14628
14629 * data/lalr1.cc (position.hh): New subfile, including the extended
14630 and Doxygen'ed documentation of class Position.
14631 (location.hh): Use it.
14632 Document a` la Doxygen.
14633 With the help of Benoit Perrot.
14634
14635 2003-02-20 Akim Demaille <akim@epita.fr>
14636
14637 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
14638 AT_YACC_IF.
14639 Redefine AT_YYERROR_SEES_LOC_IF using it.
14640 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
14641 not defined.
14642 Don't use the location in yy::Parser::error_ and
14643 yy::Parser::print_ when not %locations.
14644 Activate more lalr1.cc tests.
14645
14646 2003-02-19 Akim Demaille <akim@epita.fr>
14647
14648 * data/lalr1.cc: When displaying a line number, be sure to make it
14649 an int.
14650
14651 2003-02-19 Akim Demaille <akim@epita.fr>
14652
14653 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
14654 Remove, useless.
14655 (YYABORT, YYACCEPT, YYERROR): New.
14656 * tests/calc.at: Renable the lalr1.cc test.
14657
14658 2003-02-19 Akim Demaille <akim@epita.fr>
14659
14660 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
14661 error recovery, mixing with/without pops and discarding of the
14662 lookahead.
14663 Exercise YYERROR.
14664 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
14665
14666 2003-02-17 Paul Eggert <eggert@twinsun.com>
14667
14668 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
14669 * tests/testsuite.at (AT_COMPILE): Use them.
14670 This fixes the testsuite problem reported by Robert Lentz in
14671 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
14672
14673 2003-02-12 Paul Eggert <eggert@twinsun.com>
14674
14675 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
14676 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
14677 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
14678 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
14679 Check for malloc failure, for consistency with yacc.c.
14680 (yytname_size): Remove, for consistency with yacc.c.
14681
14682 The bug still remains in data/lalr1.cc, as I didn't have time
14683 to fix it there.
14684
14685 2003-02-06 Akim Demaille <akim@epita.fr>
14686
14687 * configure.ac (GXX): Rename as...
14688 (CXX): this, to keep the original Autoconf semantics.
14689 Require 2.57.
14690 * data/lalr1.cc: Fix b4_copyright invocations.
14691 If YYDEBUG is not defined, don't depend upon name_ being defined.
14692 (location.hh): Include string and iostream.
14693 (Position::filename): New member.
14694 (Position::Position ()): New.
14695 (operator<< (Position)): New.
14696 (operator- (Position, int)): New.
14697 (Location::first, Location::last): Rename as...
14698 (Location::begin, Location::end): these, to mock the conventional
14699 iterator names.
14700 (operator<< (Location)): New.
14701 * tests/atlocal.in (CXX): New.
14702 * tests/testsuite.at (AT_COMPILE_CXX): New.
14703 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
14704 locations in a more synthetic way.
14705 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
14706 lalr1.cc is used.
14707 Adjust the C locations to match those from Emacs: first column is
14708 column 0.
14709 Change all the expected results.
14710 Conform to the GCS: simplify the locations when applicable.
14711 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
14712 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
14713 these CPP macros with the m4 macros new defined by...
14714 (AT_CHECK_PUSHDEFS): this, i.e.:
14715 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
14716 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
14717 New macros.
14718 (AT_CHECK_POPDEFS): Undefine them.
14719 (AT_CHECK_CALC_LALR1_CC): New.
14720 Use it for the first lalr1.cc test.
14721
14722 2003-02-04 Akim Demaille <akim@epita.fr>
14723
14724 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
14725 Location as is defined.
14726
14727 2003-02-04 Akim Demaille <akim@epita.fr>
14728
14729 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
14730 name_ being defined.
14731
14732 2003-02-03 Paul Eggert <eggert@twinsun.com>
14733
14734 * src/gram.h (start_symbol): Remove unused decl.
14735
14736 Use more-consistent naming conventions for local vars.
14737
14738 * src/derives.c (derives_compute): Change type of local var from
14739 int to rule_number.
14740 * src/gram.c (grammar_rules_partial_print): Likewise.
14741 * src/print.c (print_core): Likewise.
14742 * src/reduce.c (reduce_grammar_tables): Likewise.
14743
14744 * src/gram.c (grammar_dump): Change name of item_number *
14745 local var from r to rp.
14746 * src/nullable.c (nullable_compute): Likewise.
14747
14748 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
14749
14750 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
14751 for symbol or symbol_number var.
14752 * src/reader.c (grammar_start_symbol_set): Likewise.
14753 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
14754 Likewise.
14755 * src/state.c (transitions_to): Likewise.
14756 * src/state.h: Likewise.
14757 * src/tables.c (symbol_number_to_vector_number): Likewise.
14758
14759 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
14760 char * var.
14761
14762 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
14763 var.
14764
14765 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
14766 var.
14767
14768 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
14769 Use str, not s, for char * var. Use ch, not c, for character var.
14770 Use size for size var.
14771
14772 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
14773 char * var.
14774 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
14775 uniqstr var.
14776 * src/uniqstr.h: Likewise.
14777
14778 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
14779 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
14780 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
14781 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
14782 param to have same name as that of enum, so that we don't use
14783 "s" to stand for a non-state.
14784
14785 2003-02-02 Akim Demaille <akim@epita.fr>
14786
14787 * src/scan-skel.l: Scan more than one inert character per yylex
14788 invocation.
14789
14790 2003-02-01 Paul Eggert <eggert@twinsun.com>
14791
14792 Version 1.875a.
14793
14794 * po/LINGUAS: Add ms.
14795
14796 2003-01-30 Akim Demaille <akim@epita.fr>
14797
14798 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
14799
14800 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14801
14802 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
14803 of $1.
14804
14805 Changes in response to error report by S. Eken: GLR mode does not
14806 handle negative $ indices or $ indices in embedded rules correctly.
14807 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
14808
14809 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
14810 (b4_rhs_location): Ditto.
14811 (yyfill): New function to copy from stack tree into array
14812 incrementally.
14813 (yyuserAction): Modify to allow incremental move of semantic values
14814 to rhs array when in GLR mode.
14815 Define YYFILL to use in user-defined actions to fill semantic array
14816 as needed.
14817 Remove dummy use of yystack, as there is now a guaranteed use.
14818 (yydoAction): Modify to allow incremental move of semantic values
14819 to rhs array when in GLR mode.
14820 (yyresolveAction): Ditto.
14821 (yyglrShiftDefer): Update comment.
14822 (yyresolveStates): Use X == NULL for pointers, not !X.
14823 (yyglrReduce): Ditto.
14824 (yydoAction): Ditto
14825
14826 * tests/glr-regr1.at: Rename to ...
14827 * tests/glr-regression.at: Add new regression test for the problems
14828 described above (adapted from S. Eken).
14829 Update copyright notice.
14830 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
14831 * tests/Makefile.am: Ditto.
14832
14833 2003-01-28 Paul Eggert <eggert@twinsun.com>
14834
14835 * data/lalr1.cc: Do not use @output_header_name@ unless
14836 b4_defines_flag is set. This fixes two bugs reported by
14837 Tim Van Holder in
14838 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
14839 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
14840
14841 2003-01-21 Paul Eggert <eggert@twinsun.com>
14842
14843 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
14844 we don't need to worry about yyerrlab1 being reported as an
14845 "unused label" by non-GCC C compilers. The downside is that if
14846 locations are used then a couple of statements are duplicated each
14847 time YYERROR is invoked, but the upside is that the warnings
14848 should vanish.
14849 (yyerrlab1): Move code to YERROR.
14850 (yyerrlab2): Remove. Change uses back to yyerrlab1.
14851 This reverts some of the 2002-12-27 change.
14852
14853 2003-01-17 Paul Eggert <eggert@twinsun.com>
14854
14855 * src/output.c (symbol_printers_output): Fix typo that led
14856 to core dump. Problem reported by Antonio Rus in
14857 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
14858
14859 2003-01-13 Akim Demaille <akim@epita.fr>,
14860 Quoc Peyrot <chojin@lrde.epita.fr>,
14861 Robert Anisko <anisko_r@lrde.epita.fr>
14862
14863 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
14864 when the stacks contain one element, as the loop would otherwise
14865 free the last state, and then use the top state (the one we just
14866 popped). This means that the initial elements will not be freed
14867 explicitly, as is the case in yacc.c; it is not a problem, as
14868 these elements have fake values.
14869
14870 2003-01-11 Paul Eggert <eggert@twinsun.com>
14871
14872 * NEWS: %expect-violations are now just warnings, reverting
14873 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
14874 bootstrapping problem reported by Matthias Klose; see
14875 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
14876 * src/conflicts.c (conflicts_print): Likewise.
14877 * tests/conflicts.at (%expect not enough, %expect too much,
14878 %expect with reduce conflicts): Likewise.
14879 * doc/bison.texinfo (Expect Decl): Document this. Also mention
14880 that the warning is enabled if the number of conflicts changes
14881 (not necessarily increases).
14882
14883 * src/getargs.c (version): Update copyright year.
14884
14885 2003-01-09 Akim Demaille <akim@epita.fr>
14886
14887 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
14888
14889 2003-01-08 Paul Eggert <eggert@twinsun.com>
14890
14891 * Makefile.maint (WGETFLAGS):
14892 New macro, containing "-C off" to disable proxy caches.
14893 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
14894 (rel-check): Use $(WGET) instead of wget.
14895
14896 2003-01-06 Paul Eggert <eggert@twinsun.com>
14897
14898 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
14899 the GLR paper of Scott, Johnstone and Hussain.
14900
14901 2003-01-04 Paul Eggert <eggert@twinsun.com>
14902
14903 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
14904 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
14905 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
14906 (EXTRA_LIBRARIES): New var, for liby.a.
14907 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
14908 (EXTRA_SCRIPTS): New var, for yacc.
14909
14910 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
14911 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
14912 Problem reported by Nelson H. F. Beebe.
14913
14914 2003-01-03 Paul Eggert <eggert@twinsun.com>
14915
14916 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
14917 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
14918 when compiling Bison 1.875's `bitset bset = obstack_alloc
14919 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
14920
14921 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
14922 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
14923 grow to a huge size with typical invocation.
14924
14925 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
14926 Use the pattern recommended by Autoconf 2.57, except also protect
14927 against double-definition.
14928 * src/system.h: Likewise.
14929 Portability issues reported by Nelson H. F. Beebe.
14930
14931 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
14932 All uses changed. Provide a definition in both C and C++.
14933 (yytrue, yyfalse): Define even if defined (__cplusplus).
14934
14935 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
14936 Reported by Nelson H. F. Beebe.
14937
14938 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
14939
14940 2003-01-02 Paul Eggert <eggert@twinsun.com>
14941
14942 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
14943 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
14944 Bug reported by Nelson H. F. Beebe.
14945
14946 2003-01-01 Paul Eggert <eggert@twinsun.com>
14947
14948 * Version 1.875.
14949
14950 2002-12-30 Paul Eggert <eggert@twinsun.com>
14951
14952 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
14953 Moved here from...
14954 (<INITIAL>","): Here. This causes stray "," to be treated
14955 more uniformly.
14956
14957 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
14958 last brace in braced code when not in Yacc mode, for compatibility
14959 with Bison 1.35. This resurrects the 2001-12-15 patch to
14960 src/reader.c.
14961
14962 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
14963 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
14964
14965 2002-12-28 Paul Eggert <eggert@twinsun.com>
14966
14967 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
14968 that of SYM's type. This fixes Debian bug 168069, reported by
14969 Thomas Olsson.
14970
14971 2002-12-28 Paul Eggert <eggert@twinsun.com>
14972
14973 Version 1.75f.
14974
14975 Switch back to the Yacc style of conflict reports, undoing some
14976 of the 2002-07-30 change.
14977 * doc/bison.texinfo (Understanding): Use Yacc style for
14978 conflict reports. Also, use new way of locating rules.
14979 * src/conflicts.c (conflict_report):
14980 Renamed from conflict_report_yacc, removing the old
14981 'conflict_report'. Translate the entire conflict report at once,
14982 so that we don't assume that "," has the same interpretation in
14983 all languages.
14984 (conflicts_output): Use Yacc-style conflict report for each state,
14985 instead of our more-complicated style.
14986 (conflicts_print): Use Yacc-style conflict report, except print
14987 the input file name when not emulating Yacc.
14988 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
14989 Conflicted Reduction, %expect not enough, %expect too much,
14990 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
14991 * tests/existing.at (GNU Cim Grammar): Likewise.
14992 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
14993
14994 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
14995 fatal): Don't invoke fflush; it's not needed and it might even be
14996 harmful for stdout, as stdout might not be open.
14997 * src/reduce.c (reduce_print): Likewise.
14998
14999 2002-12-27 Paul Eggert <eggert@twinsun.com>
15000
15001 Fix a bug where error locations were not being recorded correctly.
15002 This problem was originally reported by Paul Hilfinger in
15003 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
15004
15005 * data/yacc.c (yyparse): New local var yylerrsp, to record the
15006 top of the location stack's error locations.
15007 (yyerrlab): Set it. When discarding a token, push its location
15008 onto yylerrsp so that we don't lose track of the error's end.
15009 (yyerrlab1): Now is only the target of YYERROR, so that we can
15010 properly record the location of the action that failed. For GCC
15011 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
15012 GCC warning about yyerrlab1 being unused if YYERROR is unused.
15013 (yyerrlab2): New label, which yyerrlab now falls through to.
15014 Compute the error's location by applying YYLLOC_DEFAULT to
15015 the locations of all the symbols that went into the error.
15016 * doc/bison.texinfo (Location Default Action): Mention that
15017 YYLLOC_DEFAULT is also invoked for syntax errors.
15018 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
15019 Error locations include the locations of all the tokens that were
15020 discarded, not just the last token.
15021
15022 2002-12-26 Paul Eggert <eggert@twinsun.com>
15023
15024 * src/files.c: Include quote.h.
15025 (compute_output_file_names): Warn if we detect conflicting
15026 outputs to the same file. This should catch the misunderstanding
15027 exemplified by Debian Bug 165349, reported by Bruce Stephens..
15028
15029 * src/conflicts.c (conflicts_print): If the user specifies
15030 "%expect N", report an error if there are any reduce/reduce
15031 conflicts. This is what the manual says should happen.
15032 This fixes Debian bug 130890, reported by Anthony DeRobertis.
15033 * tests/conflicts.at (%expect with reduce conflicts): New test.
15034
15035 Don't use m4_include on relative file names, as it doesn't work as
15036 desired if there happens to be a file with that name under ".".
15037
15038 * m4sugar/version.m4: Remove; it was included but it wasn't used.
15039 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
15040 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
15041 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
15042 * src/output.c (output_skeleton): Use full path names when
15043 specifying a file to include; don't rely on include path, as
15044 it's unreliable when the working file contains a file with
15045 that name.
15046
15047 2002-12-25 Paul Eggert <eggert@twinsun.com>
15048
15049 Remove obsolete references to bison.simple and bison.hairy.
15050 Problem mentioned by Aubin Mahe in
15051 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
15052 * data/glr.c: Comment fix.
15053 * doc/bison.1: Remove references. Also, mention "yacc".
15054
15055 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
15056 with -g option.
15057
15058 * src/parse-gram.y (declaration): Use enum "report_states" rather
15059 than its numeric value 1.
15060
15061 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
15062 opening a new one. This fixes Debian bug 165349, reported by
15063 Bruce Stephens.
15064
15065 2002-12-24 Paul Eggert <eggert@twinsun.com>
15066
15067 Version 1.75e.
15068
15069 * Makefile.maint (cvs-update): Don't assume that the shell
15070 supports $(...), as Solaris sh doesn't.
15071
15072 * src/parse-gram.y (lloc_default): Remove test for empty
15073 nonterminals at the end, since it didn't change the result.
15074
15075 2002-12-24 Paul Eggert <eggert@twinsun.com>
15076
15077 If the user does not define YYSTYPE as a macro, Bison now declares it
15078 using typedef instead of defining it as a macro. POSIX requires this.
15079 For consistency, YYLTYPE is also declared instead of defined.
15080
15081 %union directives can now have a tag before the `{', e.g., the
15082 directive `%union foo {...}' now generates the C code
15083 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
15084 The default union tag is `YYSTYPE', for compatibility with Solaris 9
15085 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
15086 instead of `yyltype'.
15087
15088 `yystype' and `yyltype' are now obsolescent macros instead of being
15089 typedefs or tags; they are no longer documented and will be
15090 withdrawn in a future release.
15091
15092 * data/glr.c (b4_location_type): Remove.
15093 (YYSTYPE): Renamed from yystype.
15094 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
15095 (struct YYLTYPE): Renamed from struct yyltype.
15096 (YYLTYPE): Renamed from yyltype.
15097 (yyltype, yystype): New (and obsolescent) macros,
15098 for backward compatibility.
15099 * data/yacc.c: Likewise.
15100
15101 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
15102 does not specify a union tag. This is for compatibility with
15103 Solaris 9 yacc.
15104
15105 * src/parse-gram.y (add_param): 2nd arg is now char * not char
15106 const *, since it is now modified by stripping surrounding { }.
15107 (current_braced_code): Remove.
15108 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
15109 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
15110 trailing " {...}". Now of type <chars>.
15111 (grammar_declaration): Adjust to bundled tokens.
15112 (code_content): Remove; stripping is now done by add_param.
15113 (print_token_value): Print contents of bundled tokens.
15114 (token_name): New function.
15115
15116 * src/reader.h (braced_code, current_braced_code): Remove.
15117 (token_name): New decl.
15118
15119 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
15120 token_type, not braced_code code_kind. All uses changed.
15121 (SC_PRE_CODE): New state, for scanning after a keyword that
15122 has (or usually has) an immediately-following braced code.
15123 (token_type): New local var, to keep track of which token type
15124 to return when scanning braced code.
15125 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
15126 <INITIAL>"%parse-param", <INITIAL>"%printer",
15127 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
15128 instead of returning a token type immediately.
15129 (<INITIAL>"{"): Set token type.
15130 (<SC_BRACED_CODE>"}"): Use it.
15131 (handle_action_dollar, handle_action_at): Now returns bool
15132 indicating success. Fail if ! current_rule; this prevents a core dump.
15133 (handle_symbol_code_dollar, handle_symbol_code_at):
15134 Remove; merge body into caller.
15135 (handle_dollar, handle_at): Complain in invalid contexts.
15136
15137 * NEWS, doc/bison.texinfo: Document the above.
15138 * NEWS: Fix years and program names in copyright notice.
15139
15140 2002-12-17 Paul Eggert <eggert@twinsun.com>
15141
15142 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
15143 Reporting, Table of Symbols): Omit mentions of %lex-param and
15144 %parse-param from the documentation for now.
15145
15146 2002-12-15 Paul Eggert <eggert@twinsun.com>
15147
15148 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
15149 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
15150 lookahead symbol, and which sets yychar in parser actions) and it
15151 disagreed with the Bison documentation. Bug
15152 reported by Andrew Walrond.
15153
15154 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
15155 as the caller now does that.
15156 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
15157 (YYEMPTY): Parenthesize right hand side, since others use it.
15158 (yyparse): Don't assume that our generated code is the only code
15159 that sets yychar.
15160
15161 2002-12-13 Paul Eggert <eggert@twinsun.com>
15162
15163 Version 1.75d.
15164
15165 POSIX requires a "yacc" command.
15166 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
15167 (MOSTLYCLEANFILES): Add yacc.
15168 (yacc): New rule.
15169 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
15170 as an alias for bison y.
15171
15172 * po/LINGUAS: Add da.
15173
15174 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
15175 problem with latest <getopt.h>.
15176 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
15177
15178 * doc/fdl.texi: Upgrade to 1.2.
15179 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
15180 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
15181 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
15182 gnulib.
15183 * config/install-sh: Sync with autotools.
15184
15185 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
15186 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
15187 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
15188 locations are requested.
15189 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
15190 locations are requested.
15191
15192 2002-12-12 Paul Eggert <eggert@twinsun.com>
15193
15194 Remove unportable casts and storage allocation tricks.
15195 While we're at it, remove almost all casts, since they
15196 usually aren't needed and are a sign of trouble.
15197
15198 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
15199
15200 * src/derives.c (derives_compute): Do not subtract NTOKENS from
15201 the pointer DSET returned by malloc; this isn't portable.
15202 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
15203 Similarly for DERIVES.
15204 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
15205 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
15206 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
15207
15208 * src/derives.c (derives_compute): Do not bother invoking
15209 int_of_rule_number, since rule numbers are integers.
15210
15211 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
15212 rather than XMALLOC (char, N).
15213
15214 * src/files.c (filename_split): Rewrite to avoid cast.
15215
15216 * src/gram.h (symbol_number_as_item_number,
15217 item_number_as_symbol_number, rule_number_as_item_number,
15218 item_number_as_rule_number):
15219 Now inline functions rather than macros, to avoid casts.
15220 * src/state.h (state_number_as_int): Likewise.
15221 * src/tables.c (state_number_to_vector_number,
15222 symbol_number_to_vector_number): Likewise.
15223
15224 * src/gram.h (int_of_rule_number): Remove; no longer used.
15225
15226 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
15227 since the resulting storage is always stored into.
15228
15229 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
15230 where it's needed.
15231
15232 * src/muscle_tab.c (muscle_m4_output):
15233 Now inline. Return bool, not int.
15234 * src/state.c (state_compare): Likewise.
15235 * src/symtab.c (symbol_check_defined,
15236 symbol_check_alias_consistency, symbol_pack, symbol_translation,
15237 hash_compare_symbol, hash_symbol):
15238 Likewise.
15239 * src/uniqstr.c (uniqstr_print): Likewise.
15240 * src/muscle_tab.c (muscle_m4_output_processor):
15241 New function, to avoid casts.
15242 * src/state.c (state_comparator, stage_hasher): Likewise.
15243 * src/symtab.c (symbol_check_defined_processor,
15244 symbol_check_alias_consistency_processor, symbol_pack_processor,
15245 symbol_translation_processor, hash_symbol_comparator,
15246 hash_symbol_hasher): Likewise.
15247 * src/uniqstr.c (uniqstr_print_processor): Likewise.
15248 * src/muscle_tab.c (muscles_m4_output):
15249 Use new functions instead of casting old functions unportably.
15250 * src/state.c (state_hash_new): Likewise.
15251 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
15252 symbols_token_translations_init):
15253 Likewise.
15254 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
15255
15256 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
15257 var instead of casting to long, to avoid casts.
15258 (prepare_states): Use MALLOC rather than alloca, so that we don't
15259 have to worry about alloca.
15260 * src/state.c (state_hash_lookup): Likewise.
15261
15262 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
15263 local var instead of casting to unsigned char, to avoid casts.
15264
15265 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
15266 STATE_ALLOC): Remove.
15267 (transitions_new, errs_new, reductions_new, state_new): Use malloc
15268 rather than calloc, and use offsetof to avoid allocating slightly
15269 too much storage.
15270 (state_new): Initialize all members.
15271
15272 * src/state.c (state_hash): Use unsigned accumulator, not signed.
15273
15274 * src/symtab.c (symbol_free): Remove; unused.
15275 (symbol_get): Remove cast in lhs of assignment.
15276 (symbols_do): Now static. Accept generic arguments, not
15277 hashing-related ones.
15278
15279 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
15280 (symbol_processor): Remove.
15281 (symbols_do): Remove decl; now static.
15282
15283 * src/system.h (alloca): Remove; decl no longer needed.
15284 (<stddef.h>): Include, for offsetof.
15285 (<inttypes.>, <stdint.h>): Include if available.
15286 (uintptr_t): New type, if system lacks it.
15287 (CALLOC, MALLOC, REALLOC): New macros.
15288 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
15289 new macros.
15290
15291 * src/tables.c (table_size): Now int, to pacify GCC.
15292 (table_grow, table_ninf_remap): Use signed table size.
15293 (save_row): Don't bother initializing locals when not needed.
15294 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
15295 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
15296
15297 * src/vcg.h: Correct misspellings.
15298
15299 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
15300
15301
15302 * src/getargs.c (getargs): Don't assume EOF == -1.
15303
15304 2002-12-09 Paul Eggert <eggert@twinsun.com>
15305
15306 Change identifier spellings to avoid collisions with names
15307 that are reserved by POSIX.
15308
15309 Don't use names ending in _t, since POSIX reserves them.
15310 For consistency, remove _e and _s endings -- they're weren't
15311 needed to remove ambiguity. All uses changed.
15312 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
15313 turn was just renamed from struniq_t.
15314 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
15315 which in turn was just renamed from struniq_processor_t.
15316 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
15317 in turn was renamed from hash_compare_struniq_t.
15318 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
15319 (state_list): Renamed from state_list_t.
15320 * src/assoc.h (assoc): Renamed from assoc_t.
15321 * src/conflicts.c (enum conflict_resolution): Renamed from
15322 enum conflict_resolution_e.
15323 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
15324 (rule_list): Renamed from rule_list_t.
15325 * src/getargs.h (enum trace): Renamed from enum trace_e.
15326 (enum report): Renamed from enum report_e.
15327 * src/gram.h (item_number): Renamed from item_number_t.
15328 (rule_number): Renamed from rule_number_t.
15329 (struct rule_s): Remove the "rule_s" part; not used.
15330 (rule): Renamed from rule_t.
15331 (rule_filter): Renamed from rule_filter_t.
15332 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
15333 (goto_list): Renamed from goto_list_t.
15334 * src/lalr.h (goto_number): Renamed from goto_number_t.
15335 * src/location.h (location): Renamed from location_t.
15336 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
15337 and moved here from:
15338 * src/muscle_tab.h (muscle_entry_t): here.
15339 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
15340 (rule_list): Renamed from rule_list_t.
15341 * src/print_graph.c (static_graph): Renamed from graph.
15342 * src/reader.h (braced_code): Renamed from braced_code_t.
15343 Remove brace_code_e tag.
15344 * src/relation.h (relation_node): Renamed from relation_node_t.
15345 (relation_nodes): Renamed from relation_nodes_t.
15346 (relation): Renamed from relation_t.
15347 * src/state.h (state_number): Renamed from state_number_t.
15348 (struct state): Renamed from struct state_s.
15349 (state): Renamed from state_t.
15350 (transitions): Renamed from transitions_t. Unused (and
15351 misspelled) transtion_s tag removed.
15352 (errs): Renamed from errs_t. Unused errs_s tag removed.
15353 (reductions): Renamed from reductions_t. Unused tag
15354 reductions_s removed.
15355 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
15356 (struct symbol_list): Renamed from struct symbol_list_s.
15357 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
15358 (struct symbol): Renamed from struct symbol_s.
15359 (symbol): Renamed from symbol_t.
15360 * src/tables.c (vector_number): Renamed from vector_number_t.
15361 (action_number): Renamed from action_t.
15362 * src/tables.h (base_number): Renamed from base_t.
15363 * src/vcg.h (enum color): Renamed from enum color_e.
15364 (enum textmode): Renamed from enum textmode_e.
15365 (enum shape): Renamed from enum shape_e.
15366 (struct colorentry): Renamed from struct colorentry_s.
15367 (struct classname): Renamed from struct classname_s.
15368 (struct infoname): Renamed from struct infoname_s.
15369 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
15370 (enum decision): Renamed from enum decision_e.
15371 (enum orientation): Renamed from enum orientation_e.
15372 (enum alignment): Renamed from enum alignment_e.
15373 (enum arrow_mode): Renamed from enum arrow_mode_e.
15374 (enum crossing_type): Renamed from enum crossing_type_e.
15375 (enum view): Renamed from enum view_e.
15376 (struct node): Renamed from struct node_s.
15377 (node): Renamed from node_t.
15378 (enum linestyle): Renamed from enum linestyle_e.
15379 (enum arrowstyle): Renamed from enum arrowstyle_e.
15380 (struct edge): Renamed from struct edge.
15381 (edge): Renamed from edge_t.
15382 (struct graph): Renamed from struct graph_s.
15383 (graph): Renamed from graph_t.
15384 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
15385 Rename value_t -> value.
15386 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
15387 value_t_as_yystype -> value_as_yystype.
15388
15389 Don't include <errno.h> in the mainstream code, since it
15390 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
15391 * lib/get-errno.c, lib/get-errno.h: New files.
15392 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
15393 get-errno.c.
15394 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
15395 * src/output.c (output_skeleton): Likewise.
15396 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
15397 instead of errno.
15398 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
15399 Likewise.
15400 (handle_action_dollar, handle_action_at): Likewise.
15401 * src/system.h: Do not include <errno.h>.
15402 (TAB_EXT): Renamed from EXT_TAB.
15403 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
15404
15405 Avoid str[a-z]*, since <string.h> reserves that name space.
15406 Change all instances of "struniq" in names to "uniqstr", and
15407 likewise for "STRUNIQ" and "UNIQSTR".
15408 * src/uniqstr.c: Renamed from src/struniq.c.
15409 * src/uniqstr.h: Renamed from src/struniq.h.
15410 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
15411 * src/files.c (strsuffix): Remove; unused.
15412 (concat2): Renamed from stringappend. Now static.
15413 * src/files.h (strsuffix, stringappend): Remove; unused.
15414 * src/parse-gram.y (<chars>): Renamed from <string>.
15415 (<uniqstr>): Renamed from <struniq>.
15416 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
15417 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
15418 (struct graph_s.expand): Renamed from struct graph_s.stretch.
15419 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
15420 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
15421 (N_EXPAND): Renamed from N_STRETCH.
15422
15423 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
15424 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
15425 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
15426 Remove; unused.
15427 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
15428 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
15429 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
15430 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
15431 (BASE_MAXIMUM): Renamed from BASE_MAX.
15432 (BASE_MINIMUM): Renamed from BASE_MIN.
15433 (ACTION_MAX): Remove; unused.
15434 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
15435 Unnecessary casts removed from above defines.
15436
15437
15438 Fix misspelling in names.
15439 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
15440 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
15441 G_NODE_ALIGNEMENT.
15442
15443
15444 * lib/timevar.c (timevar_report): Renamed from time_report,
15445 for consistency with other names.
15446 * lib/timevar.h (timevar_report): New decl.
15447 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
15448
15449
15450 Sort include-file uses.
15451
15452 Reorder all include files under src to be in the order "system.h".
15453 then the ../lib include files in angle brackets (alphabetized),
15454 then the . include files in double-quotes (alphabetized). Fix
15455 dependency breakages encountered in this process, as follows:
15456 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
15457 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
15458 * src/state.h: Include "symtab.h".
15459
15460 2002-12-08 Paul Eggert <eggert@twinsun.com>
15461
15462 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
15463 since this causes problems when __file__ contains character
15464 sequences like "@" that are treated specially by src/scan-skel.l.
15465 Instead, just use the file's basename. This fixes the bug
15466 reported by Martin Mokrejs in
15467 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
15468
15469 2002-12-06 Paul Eggert <eggert@twinsun.com>
15470
15471 Add support for rules that do not have trailing semicolons, as
15472 POSIX requires. Improve the quality of locations in Bison
15473 diagnostics.
15474
15475 * src/location.c: Include <quotearg.h>.
15476 (empty_location): Now const.
15477 (location_print): New function. Follow the recommendation of the
15478 GNU Coding Standards for locations that span file boundaries.
15479 * src/location.h: Do not include <quotearg.h>; no longer needed.
15480 (boundary): New type.
15481 (location_t): Use it. This allows locations to span file boundaries.
15482 All member uses changed: file -> start.file or end.file (as needed),
15483 first_line -> start.line, first_column -> start.column,
15484 last_line -> end.line, last_column -> end.column.
15485 (equal_boundaries): New function.
15486 (LOCATION_RESET, LOCATION_STEP): Remove.
15487 (LOCATION_PRINT): Remove. All callers changed to use location_print.
15488 (empty_location): Now const.
15489 (location_print): New decl.
15490 * src/parse-gram.y (lloc_default): New function, which handles
15491 empty locations more accurately.
15492 (YYLLOC_DEFAULT): Use it.
15493 (%token COLON): Remove.
15494 (%token ID_COLON): New token.
15495 (rules): Use it.
15496 (declarations, rules): Remove trailing semicolon.
15497 (declaration, rules_or_grammar_declaration):
15498 Allow empty (";") declaration.
15499 (symbol_def): Remove empty actions; no longer needed.
15500 (rules_or_grammar_declaration): Remove trailing semicolon.
15501 (semi_colon.opt): Remove.
15502 * src/reader.h: Include location.h.
15503 (scanner_cursor): New decl.
15504 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
15505 rolling our own.
15506 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
15507 of *loc.
15508 (STEP): Remove. No longer needed, now that adjust_location does
15509 the work. All uses removed.
15510 (scanner_cursor): New var.
15511 (adjust_location): Renamed from extend_location. It now sets
15512 *loc and adjusts the scanner cursor. All uses changed.
15513 Don't bother testing for CR.
15514 (handle_syncline): Remove location arg; now updates scanner cursor.
15515 All callers changed.
15516 (unexpected_end_of_file): Now accepts start boundary of token or
15517 comment, not location. All callers changed. Update scanner cursor,
15518 not the location.
15519 (SC_AFTER_IDENTIFIER): New state.
15520 (context_state): Renamed from c_context. All uses changed.
15521 (id_loc, code_start, token_start): New local vars.
15522 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
15523 processing of Yacc white space and equivalents here.
15524 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
15525 instead of returning ID immediately, since we need to search for
15526 a subsequent colon.
15527 (<INITIAL>"'", "\""): Save token_start.
15528 (<INITIAL>"%{", "{", "%%"): Save code_start.
15529 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
15530 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
15531 BEGIN context_state at end, not INITIAL.
15532 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
15533 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
15534 Return correct token start.
15535 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
15536 the start of a character, string or multiline comment is found.
15537 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
15538 Reduction): Adjust reported locations to match the more-precise
15539 results now expected.
15540 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
15541 * tests/reduce.at (Useless Rules, Reduced Automaton,
15542 Underivable Rules): Likewise.
15543 * tests/regression.at (Invalid inputs): No longer `expecting ";"
15544 or "|"' now that so many other tokens are allowed by the new grammar.
15545
15546 * src/complain.h (current_file): Remove duplicate decl;
15547 current_file is now owned by files.h.
15548 * src/complain.c, src/scan-gram.l: Include files.h.
15549
15550 2002-12-06 Paul Eggert <eggert@twinsun.com>
15551
15552 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
15553 promotes to int; it might be unsigned int.
15554 * data/yacc.c (yy_reduce_print): Likewise.
15555
15556 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
15557 be #defined in the prologue, not in the Bison declarations.
15558 This fixes Debian Bug 102878, reported by Shaul Karl.
15559
15560 2002-12-02 Paul Eggert <eggert@twinsun.com>
15561
15562 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
15563 * lib/strtoul.c: New file, from gnulib.
15564 This fixes a porting bug reported by Peter Klein in
15565 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
15566
15567 2002-11-30 Paul Eggert <eggert@twinsun.com>
15568
15569 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
15570 and put only a forward declaration in the prologue. This is for
15571 consistency with the other scanner helper functions.
15572
15573 Type clashes now generate warnings, not errors, since it
15574 appears that POSIX may allow some grammars with type clashes.
15575 * src/reader.c (grammar_current_rule_check): Warn about
15576 type clashes instead of complaining.
15577 * tests/input.at (Type Clashes): Expect warnings, not complaints.
15578
15579 Add Yacc library, since POSIX requires it.
15580 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
15581 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
15582 * lib/main.c, lib/yyerror.c: New files.
15583
15584 gram_error can be static; it need not be extern.
15585 * src/reader.h (gram_error): Remove decl.
15586 * src/parse-gram.y (gram_error): Now static. Add static decl.
15587 (print_token_value): Omit parameter names from forward decl,
15588 for consistency.
15589
15590 2002-11-29 Paul Eggert <eggert@twinsun.com>
15591
15592 * doc/bison.texinfo: Emphasize that yylex and yyerror must
15593 be declared before being used. E.g., one should typically
15594 declare them in the prologue. Use GNU coding style in examples.
15595 Put "const" consistently after the type it modifies. Mention
15596 that C99 supports "inline". Mention that yyerror traditionally
15597 returns "int".
15598
15599 %parse-param and %lex-param now take just one argument, the
15600 declaration; the argument name is deduced from the declaration.
15601
15602 * doc/bison.texinfo (Parser Function, Pure Calling, Error
15603 Reporting, Table of Symbols): Document this.
15604 * src/parse-gram.y (add_param): New function.
15605 (COMMA): Remove.
15606 (declaration): Implement new rule for %parse-param and %lex-param.
15607 * src/scan-gram.l: "," now elicits a warning, rather than being
15608 a token; this is more compatible with byacc.
15609 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
15610
15611 2002-11-27 Paul Eggert <eggert@twinsun.com>
15612
15613 Rename identifiers to avoid real and potential collisions.
15614
15615 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
15616 to avoid collision with lex macro described by Bruce Lilly in
15617 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
15618 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
15619 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
15620 * src/parse-gram.y (print_token_value): Renamed from yyprint.
15621 All uses changed.
15622 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
15623 The name "yycontrol" violates the name space rules, and this stuff
15624 wasn't being used anyway.
15625 (input): Remove action; this stuff wasn't being used.
15626 (gram_error): Rename local variable yylloc -> loc.
15627 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
15628 (YY_DECL): Don't use "yy" at start of local variables.
15629 All uses changed, e.g., yylloc -> loc.
15630 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
15631 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
15632 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
15633 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
15634
15635 * src/parse-gram.y (gram_error): loc is now const *.
15636 * src/reader.h (gram_error): Likewise.
15637
15638 2002-11-24 Paul Eggert <eggert@twinsun.com>
15639
15640 Version 1.75c.
15641
15642 * tests/actions.at (Actions after errors): Use an output format
15643 more similar to that of the Printers and Destructors test.
15644 Test the position of the ';' token too.
15645 (Printers and Destructors): Likewise.
15646 (Printers and Destructors: %glr-parser): Remove for now, to avoid
15647 unnecessarily alarming people when the test fails.
15648
15649 * data/yacc.c (yyerrlab1): Move this label down, so that the
15650 parser does not discard the lookahead token if the user code
15651 invokes YYERROR. This change is required for POSIX conformance.
15652
15653 * lib/error.c: Sync with gnulib.
15654
15655 2002-11-22 Paul Eggert <eggert@twinsun.com>
15656
15657 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
15658 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
15659 * lib/xmalloc.c: Likewise.
15660
15661 2002-11-20 Paul Eggert <eggert@twinsun.com>
15662
15663 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
15664
15665 2002-11-20 Paul Eggert <eggert@twinsun.com>
15666
15667 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
15668 should use `if (! x) abort ();' rather than `assert (x);', and
15669 anyway it's one less thing to worry about configuring.
15670
15671 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
15672 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
15673 and replace all instances of assert with abort.
15674 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
15675 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
15676
15677 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
15678 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
15679 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
15680 hash_find_entry, hash_rehash, hash_insert): Likewise.
15681 * src/conflicts.c (resolve_sr_conflict): Likewise.
15682 * src/lalr.c (set_goto_map, map_goto): Likewise.
15683 * src/nullable.c (nullable_compute): Likewise.
15684 * src/output.c (prepare_rules, token_definitions_output): Likewise.
15685 * src/reader.c (packgram, reader): Likewise.
15686 * src/state.c (state_new, state_free, state_transitions_set,
15687 state_reduction_find): Likewise.
15688 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
15689 symbol_pack): Likewise.
15690 * src/tables.c (conflict_row, pack_vector): Likewise.
15691 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
15692 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
15693 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
15694 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
15695
15696 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
15697 (ARGMATCH_CONSTRAINT): New macro.
15698 (ARGMATCH_ASSERT): Use it.
15699
15700 * src/system.h (verify): New macro.
15701 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
15702 rather than assert.
15703 * src/tables.c (tables_generate): Likewise.
15704
15705 * src/struniq.c (struniq_assert): Now returns void, and aborts
15706 if the assertion is false.
15707 (struniq_assert_p): Remove.
15708 * src/struniq.h: Likewise.
15709
15710 2002-11-18 Paul Eggert <eggert@twinsun.com>
15711
15712 * data/glr.c (yygetLRActions): Replace `yyindex' with
15713 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
15714 This fixes the regression with Sun ONE Studio 7 cc that I reported in
15715 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
15716
15717 2002-11-18 Akim Demaille <akim@epita.fr>
15718
15719 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
15720 space.
15721 From Tim Van Holder.
15722
15723 2002-11-17 Paul Eggert <eggert@twinsun.com>
15724
15725 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
15726 to "SyntaxError" for consistency with my 2002-11-15 change.
15727
15728 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
15729 not define to {}, since this breaks the common use of `YYDPRINTF
15730 ((...));' if a single statement is desired (e.g. before `else').
15731 Work around GCC warnings by surrounding corresponding calls with
15732 {} if needed.
15733 (yyhasResolvedValue): Remove unused function.
15734 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
15735 loop body.
15736 (yyreportSyntaxError): Renamed from yyreportParseError.
15737 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
15738 All uses changed.
15739 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
15740 extern when possible. Remove unused initializations.
15741
15742 2002-11-16 Akim Demaille <akim@epita.fr>
15743
15744 Augment the similarity between GLR and LALR traces.
15745
15746 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
15747 (YY_REDUCE_PRINT): New.
15748 (yyparse): Use them.
15749 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
15750 YYDPRINT here.
15751 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
15752 state reached after the reduction/recovery, since...
15753 (yyparse, yyprocessOneStack): Report the state we are entering in.
15754
15755 2002-11-16 Akim Demaille <akim@epita.fr>
15756
15757 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
15758 Add support for --trace=skeleton.
15759 * src/scan-skel.l: %option debug.
15760 Scan strings of non-@ or \n instead of character by character.
15761 (scan_skel): Handle trace_skeleton.
15762 (QPUTS): New.
15763 (@output_parser_name@, @output_header_name@): ``Restore'' their
15764 support (used to be M4 macros).
15765 * data/yacc.c: Quote larger chunks, a la glr.c.
15766 * data/lalr1.cc: Likewise.
15767 The header guards are no longer available, so use some other
15768 string than `YYLSP_NEEDED'.
15769
15770 2002-11-16 Akim Demaille <akim@epita.fr>
15771
15772 Make the ``Printers and Destructors'' test more verbose, taking
15773 `yacc.c''s behavior as (possibly wrong) reference.
15774
15775 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
15776 instead of fprint on stdout.
15777 Set and report the last_line of the symbols.
15778 Consistently display values and locations.
15779
15780 2002-11-16 Paul Eggert <eggert@twinsun.com>
15781
15782 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
15783
15784 2002-11-15 Paul Eggert <eggert@twinsun.com>
15785
15786 * tests/actions.at (Actions after errors): New test case.
15787
15788 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
15789 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
15790 tests/action.at, tests/calc.at, tests/conflicts.at,
15791 tests/cxx-type.at, tests/regression.at:
15792 "parse error" -> "syntax error" for POSIX compatibility.
15793 "parsing stack overflow..." -> "parser stack overflow" so
15794 that code matches Bison documentation.
15795
15796 2002-11-15 Akim Demaille <akim@epita.fr>
15797
15798 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
15799 take two BRACED_CODE, not two string_content.
15800 Free the scanner's obstack when we are done.
15801 (code_content): New.
15802 * tests/calc.at: Adjust.
15803 * doc/bison.texinfo: Adjust.
15804 Also, make sure to include the `,' for these declarations.
15805
15806 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
15807
15808 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
15809 definition; avoids potential autoreconf problems.
15810
15811 2002-11-15 Akim Demaille <akim@epita.fr>
15812
15813 Always check the value returned by yyparse.
15814
15815 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
15816 returned by yyparse.
15817 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
15818 Adjust calls.
15819 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
15820 returned by yyparse.
15821
15822 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15823
15824 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
15825 on input.at test.
15826
15827 2002-11-14 Paul Eggert <eggert@twinsun.com>
15828
15829 * src/output.c (output_skeleton): Call xfopen instead of
15830 duplicating xfopen's body.
15831
15832 Fix bugs reported by Nelson H. F. Beebe in
15833 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
15834
15835 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
15836 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
15837 Group compiler. Instead, use "$CC -E bar.c". Include the .h
15838 file twice in the grammar, as an extra check.
15839
15840 * tests/input.at (Torturing the Scanner): Surround the
15841 backslash-newline tests with "#if 0", to make it less likely that
15842 we'll run into compiler bugs. Bring back solitary \ inside
15843 comment, but add a closing comment to work around HP C bug. Don't
15844 test backslash-newline in C character constant.
15845
15846 2002-11-14 Akim Demaille <akim@epita.fr>
15847
15848 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
15849 status of the compiler.
15850 Calling `exit 1' is no longer needed.
15851 Reported by Nelson H. F. Beebe.
15852
15853 2002-11-14 Akim Demaille <akim@epita.fr>
15854
15855 * tests/atlocal.in (CPPFLAGS): We have config.h.
15856 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
15857 New.
15858 * tests/actions.at, tests/calc.at, tests/conflicts.at,
15859 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
15860 * tests/regression.at, tests/torture.at: Use them for all the
15861 grammars that are to be compiled.
15862 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
15863 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
15864 * doc/bison.texinfo (GLR Parsers): Document `inline'.
15865
15866 2002-11-14 Akim Demaille <akim@epita.fr>
15867
15868 * doc/bison.texinfo: Various formatting changes (alignments in
15869 samples, additional @group/@end group, GCS in samples.
15870 Use @deffn instead of simple @table to define the directives,
15871 macros, variables etc.
15872
15873 2002-11-13 Paul Eggert <eggert@twinsun.com>
15874
15875 Fix some bugs reported by Albert Chin-A-Young in
15876 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
15877
15878 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
15879 -o c"; the HP C compiler chatters during compilation.
15880 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
15881 * tests/headers.at (export YYLTYPE): Likewise.
15882
15883 * tests/input.at (Torturing the Scanner): Remove lines containing
15884 solitary backslashes, as they tickle a bug in the HP C compiler.
15885
15886 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
15887 comments, since they're not portable. Use GNU coding style.
15888
15889 2002-11-13 Akim Demaille <akim@epita.fr>
15890
15891 * data/yacc.c: Leave bigger chunks of quoted text.
15892 (YYDSYMPRINTF): New.
15893 Use it to report symbol activities.
15894 * data/glr.c (YYDSYMPRINTF): New.
15895 Use it.
15896
15897 2002-11-12 Paul Eggert <eggert@twinsun.com>
15898
15899 Version 1.75b.
15900
15901 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
15902 (yyglrReduce): Return yyok, not 0.
15903 This should avoid the enumerated-type warnings reported
15904 by Nelson H. F. Beebe in
15905 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
15906
15907 * lib/bbitset.h (BITSET_INLINE): Remove.
15908 * lib/bitset.h [! BITSET_INLINE]: Remove.
15909 (bitset_set, bitset_reset, bitset_test): Rename local vars
15910 to avoid shadowing warnings by GCC.
15911
15912 * data/glr.c (inline): Remove #define. It's the user's
15913 responsibility to #define it away, just like 'const'.
15914 This fixes one of the bugs reported by Nelson H. F. Beebe in
15915 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
15916
15917 * Makefile.maint (po-check): Scan .l and .y files instead of the
15918 .c and the .h files that they generate. This fixes the bug
15919 reported by Tim Van Holder in:
15920 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
15921 Look for N_ as well as for _. Try to avoid matching #define for
15922 N_ and _.
15923 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
15924 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
15925 * src/scan-gram.l: Revamp regular expressions so that " and '
15926 do not confuse xgettext.
15927
15928 * src/struniq.h (struniq_new): Do not declare the return type
15929 to be 'const'; this violates the C standard.
15930 * src/struniq.c (struniq_new): Likewise.
15931
15932 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
15933
15934 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
15935 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
15936 linker.
15937
15938 2002-11-12 Akim Demaille <akim@epita.fr>
15939
15940 * Makefile.maint: Sync with Autoconf:
15941 (local_updates): New.
15942
15943 2002-11-12 Akim Demaille <akim@epita.fr>
15944
15945 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
15946
15947 2002-11-12 Akim Demaille <akim@epita.fr>
15948
15949 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
15950 locations.
15951
15952 2002-11-12 Akim Demaille <akim@epita.fr>
15953
15954 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
15955 not yyvalue.
15956
15957 2002-11-12 Akim Demaille <akim@epita.fr>
15958
15959 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
15960 Use it to test the GLR parser.
15961
15962 2002-11-12 Akim Demaille <akim@epita.fr>
15963
15964 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
15965 defines it.
15966 * data/glr.c (yystos): New.
15967 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
15968 (YYDSYMPRINT): New.
15969 (yyval): Don't define it, it is handled via M4.
15970 (yyrecoverParseError): Free verbosely the discarded symbols.
15971 * data/yacc.c (yysymprint): Remove, rather...
15972 (b4_yysymprint_generate): invoke.
15973 * data/c.m4 (b4_yysymprint_generate): New.
15974 Accept pointers as arguments, as opposed to the version from
15975 yacc.c.
15976 (b4_yydestruct_generate): Likewise.
15977 * tests/cations.at (Printers and Destructors): Use Bison directives
15978 instead of CPP macros.
15979 Don't rely on internal details.
15980
15981 2002-11-12 Akim Demaille <akim@epita.fr>
15982
15983 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
15984 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
15985 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
15986 it against YYEMPTY and so forth), work on yytoken (i.e., set
15987 it to YYEMPTY etc.).
15988 (yydestruct): Replace with a b4_yydestruct_generate invocation.
15989 (b4_symbol_actions): Remove.
15990 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
15991 for 0, end-of-input.
15992
15993 2002-11-12 Akim Demaille <akim@epita.fr>
15994
15995 * doc/bison.texinfo (Destructor Decl): New.
15996
15997 2002-11-12 Akim Demaille <akim@epita.fr>
15998
15999 * src/tables.c (tables_generate): Use free for pointers that
16000 cannot be NULL, not XFREE.
16001 (pack_vector): Use assert, not fatal, for bound violations.
16002 * src/state.c (state_new): Likewise.
16003 * src/reader.c (reader): Likewise.
16004 * src/lalr.c (set_goto_map): Likewise.
16005 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
16006 the file name.
16007
16008 2002-11-12 Akim Demaille <akim@epita.fr>
16009
16010 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
16011 Restore.
16012 * src/scan-gram.l (last_string): Is global to the file, not to
16013 yylex.
16014 * src/parse-gram.y (input): Don't append the epilogue here,
16015 (epilogue.opt): do it here, and free the scanner's obstack.
16016 * src/reader.c (epilogue_set): Rename as...
16017 (epilogue_augment): this.
16018 * data/c.m4 (b4_epilogue): Defaults to empty.
16019
16020 2002-11-12 Akim Demaille <akim@epita.fr>
16021
16022 * src/getargs.c (long_options): Remove duplicates.
16023 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
16024 Remove.
16025 * doc/bison.rnh: Remove.
16026 * doc/bison.texinfo (VMS Invocation): Remove.
16027
16028 2002-11-12 Akim Demaille <akim@epita.fr>
16029
16030 * src/struniq.h, src/struniq.c (struniq_t): Is const.
16031 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
16032
16033 Use struniq for symbols.
16034
16035 * src/symtab.h (symbol_t): The tag member is a struniq.
16036 (symbol_type_set): Adjust.
16037 * src/symtab.c (symbol_new): Takes a struniq.
16038 (symbol_free): Don't free the tag member.
16039 (hash_compare_symbol_t, hash_symbol_t): Rename as...
16040 (hash_compare_symbol, hash_symbol): these.
16041 Use the fact that tags as struniqs.
16042 (symbol_get): Use struniq_new.
16043 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
16044 Returns a strniq.
16045 * src/reader.h (merger_list, grammar_currentmerge_set): The name
16046 and type members are struniqs.
16047 * src/reader.c (get_merge_function)
16048 (grammar_current_rule_merge_set): Adjust.
16049 (TYPE, current_type): Are struniq.
16050
16051 Use struniq for file names.
16052
16053 * src/files.h, src/files.c (infile): Split into...
16054 (grammar_file, current_file): these.
16055 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
16056 * src/reduce.c (reduce_print): Likewise.
16057 * src/getargs.c (getargs): Likewise.
16058 * src/complain.h, src/complain.c: Likewise.
16059 * src/main.c (main): Call struniqs_new early enough to use it for
16060 file names.
16061 Don't free the input file name.
16062
16063 2002-11-12 Akim Demaille <akim@epita.fr>
16064
16065 * src/symtab.c (symbol_free): Remove dead deactivated code:
16066 type_name are properly removed.
16067 Don't use XFREE to free items that cannot be NULL.
16068 * src/struniq.h, src/struniq.c: New.
16069 * src/main.c (main): Initialize/free struniqs.
16070 * src/parse-gram.y (%union): Add astruniq member.
16071 (yyprint): Adjust.
16072 * src/scan-gram.l (<{tag}>): Return a struniq.
16073 Free the obstack bit that used to store it.
16074 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
16075
16076 2002-11-11 Paul Eggert <eggert@twinsun.com>
16077
16078 Revamp to fix many (but not all) of the C- and M4-related quoting
16079 problems. Among other things, this fixes the Bison bug reported
16080 by Jan Hubicka when processing the Bash grammar; see:
16081 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
16082
16083 Use new @ escapes consistently. Represent brackets with @{ and @}
16084 rather than @<:@ and @:>@, since this works a bit better with dumb
16085 editors like vi. Represent @ with @@, since @ is now consistently
16086 an escape. Use @oline@ and @ofile@ rather than __oline__ and
16087 __ofile__, to avoid unexpected expansions. Similarly, use @output
16088 rather than #output.
16089
16090 * data/c.m4 (b4_copyright): Omit file name from comment, since
16091 the file name could contain "*/".
16092 (b4_synclines_flag): Don't quote the 2nd argument; it should already
16093 be quoted. All uses changed.
16094
16095 * data/glr.c: Use new @ escapes consistently.
16096 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
16097 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
16098 Remove, since they couldn't handle arbitrary characters in file
16099 names.
16100 * data/lalr1.cc: Likewise.
16101 * data/yacc.c: Likewise.
16102
16103 * src/files.c (output_infix): Remove; all uses removed.
16104 * src/files.h: Likewise.
16105
16106 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
16107 mishandled funny characters in file names, and anyway it isn't
16108 needed any more.
16109 * data/yacc.c: Likewise.
16110 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
16111
16112 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
16113 * data/yacc.c: Likewise.
16114
16115 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
16116 strings now.
16117 (muscle_init): Quote filename as a C string.
16118 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
16119 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
16120 * src/output.c (escaped_file_name_output): New function.
16121 (prepare_symbols): Quote tokens for M4.
16122 (prepare): Don't insert output_infix, output_prefix,
16123 output_parser_name, output_header_name; this is now down by scan-skel.
16124 Insert skeleton as a C string.
16125
16126 * src/output.c (user_actions_output, symbol_destructors_output,
16127 symbol_printers_output): Quote filenames for C and M4.
16128 * src/reader.c (prologue_augment, epilogue_set): Likewise.
16129
16130 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
16131 escapes other than \\ and \'; this simplifies the code.
16132 (<SC_STRING>): Likewise, for \\ and \".
16133 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
16134 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
16135 Use new escapes @{ and @} for [ and ].
16136
16137 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
16138 them with auto vars.
16139 Switch to new escape scheme, where @ is the escape character uniformly.
16140 Abort if a stray escape character is found. Avoid unbounded input
16141 buffer when parsing non-escaped text.
16142
16143 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
16144 __oline__, #output, $@, and @{ do not have unintended meanings.
16145
16146 2002-11-09 Paul Eggert <eggert@twinsun.com>
16147
16148 Fix the test failure due to GCC warnings described in
16149 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
16150 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
16151 evaluate to 0 if it's impossible for NINF to be in the respective
16152 table.
16153 (yygetLRActions, yyrecoverParseError): Use them.
16154
16155 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
16156 counted in the token inserted at end of file. Now takes
16157 location_t *, not location_t, so that the location can be
16158 adjusted. All uses changed.
16159
16160 * tests/regression.at (Invalid inputs): Adjust wording in
16161 diagnostic to match the new behavior.
16162
16163 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
16164 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
16165 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
16166 abort ();'. This reduces the runtime of the "Many lookaheads"
16167 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
16168 GCC 3.2.
16169
16170 2002-11-07 Paul Eggert <eggert@twinsun.com>
16171
16172 * src/parse-gram.y (CHARACTER): Remove unused token.
16173 All uses removed.
16174
16175 * src/scan-gram.l: Remove stack option. We no longer use the
16176 stack, since the stack was never deeper than 1; instead, use the
16177 new auto var c_context to record the stacked value.
16178
16179 Remove nounput option. At an unexpected end of file, we now unput
16180 the minimal input necessary to end cleanly; this simplifies the
16181 code.
16182
16183 Avoid unbounded token sizes where this is easy.
16184
16185 (unexpected_end_of_file): New function.
16186 Use it to systematize the error message on unexpected EOF.
16187 (last-string): Now auto, not static.
16188 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
16189 (scanner_last_string_free): Remove; not used.
16190 (percent_percent_count): Move decl to just before use.
16191 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
16192 not the (never otherwised-used) CHARACTER.
16193
16194 2002-11-07 Akim Demaille <akim@epita.fr>
16195
16196 Let yyerror always receive the msg as last argument, so that
16197 yyerror can be variadic.
16198
16199 * data/yacc.c (b4_yyerror_args): New.
16200 Use it when calling yyerror.
16201 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
16202 Use it when calling yyerror.
16203 * doc/bison.texinfo (Error Reporting): Adjust.
16204 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
16205 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
16206
16207 2002-11-06 Akim Demaille <akim@epita.fr>
16208
16209 #line should have quoted strings.
16210 Ideally, this should be done by m4_quotearg.
16211
16212 * src/scan-skel.l: Include quotearg.h.
16213 Quote __ofile__.
16214 * src/output.c (symbol_printers_output)
16215 (symbol_destructors_output): Quote the file name.
16216
16217 2002-11-06 Akim Demaille <akim@epita.fr>
16218
16219 * tests/regression.at (Invalid inputs): Adjust to the recent
16220 messages.
16221
16222 2002-11-06 Akim Demaille <akim@epita.fr>
16223
16224 Restore --no-lines.
16225 Reported by Jim Kent.
16226
16227 * data/c.m4 (b4_syncline): New.
16228 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
16229 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
16230 * src/output.c (user_actions_output): Likewise.
16231 (prepare): Define 'b4_synclines_flag'.
16232 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
16233
16234 2002-11-06 Akim Demaille <akim@epita.fr>
16235
16236 * src/main.c (main): Free `infile'.
16237 * src/scan-gram.l (handle_syncline): New.
16238 Recognize `#line'.
16239 * src/output.c (user_actions_output, symbol_destructors_output)
16240 (symbol_printers_output): Use the location's file name, not
16241 infile.
16242 * src/reader.c (prologue_augment, epilogue_set): Likewise.
16243
16244 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16245
16246 * src/tables.c (matching_state): Don't allow states to match if
16247 either has GLR conflict entries.
16248
16249 2002-11-05 Paul Eggert <eggert@twinsun.com>
16250
16251 * src/scan-gram.l: Use more accurate diagnostics, e.g.
16252 "integer out of range" rather than "invalid value".
16253 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
16254 accordingly.
16255
16256 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
16257 Also, remove one static variable in the scanner.
16258
16259 * src/scan-gram.l (braces_level): Now auto, not static.
16260 Initialize to zero if the compiler is being picky.
16261 (INITIAL): Clear braces_level instead of incrementing it.
16262 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
16263 as POSIX 1003.1-2001 requires.
16264 * src/system.h (IF_LINT): New macro, taken from coreutils.
16265 * configure.ac: Define "lint" if --enable-gcc-warnings.
16266
16267 2002-11-05 Akim Demaille <akim@epita.fr>
16268
16269 * src/scan-gram.l: When it starts with `%', complain about the
16270 whole directive, not just that `invalid character: %'.
16271
16272 2002-11-04 Akim Demaille <akim@epita.fr>
16273
16274 * Makefile.maint: Update from Autoconf.
16275 (update, cvs-update, po-update, do-po-update): New.
16276
16277 2002-11-04 Akim Demaille <akim@epita.fr>
16278
16279 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
16280 and yyerror.
16281 Have yyerror `use' its arguments.
16282 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
16283 returns true when location & yacc & pure & parse-param.
16284 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
16285
16286 2002-11-04 Akim Demaille <akim@epita.fr>
16287
16288 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
16289 clashes.
16290 * src/scan-gram.l: Use [\'] instead of ['] to pacify
16291 font-lock-mode.
16292 Use complain_at.
16293 Use quote, not quote_n since LOCATION_PRINT no longer uses the
16294 slot 0.
16295
16296 2002-11-03 Paul Eggert <eggert@twinsun.com>
16297
16298 * src/reader.c (get_merge_function, grammar_current_rule_check):
16299 Use consistent diagnostics for reporting type name clashes.
16300 Quote the types with <>, for consistency with Yacc.
16301 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
16302
16303 2002-11-03 Akim Demaille <akim@epita.fr>
16304
16305 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
16306 New.
16307 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
16308 (b4_parse_param): Remove.
16309 Use b4_identification.
16310 Propagate b4_pure_args where needed to pass them to yyerror.
16311 * data/glr.m4 (b4_parse_param): Remove.
16312 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
16313 (b4_lpure_formals): New.
16314 Use b4_identification.
16315 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
16316 b4_user_formals and b4_user_args.
16317 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
16318 (yyreportAmbiguity): When using a pure parser, also need
16319 the location, and the parse-params.
16320 Adjust callers.
16321 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
16322 When using a pure parser, also need the parse-params.
16323 Adjust callers.
16324 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
16325 (%pure-parser + %parse-param) LALR and GLR parsers.
16326 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
16327 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
16328 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
16329 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
16330 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
16331 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
16332 * doc/bison.texinfo: Untabify the whole file.
16333 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
16334 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
16335 (Error Reporting): Adjust to these new directives.
16336 Document %error-verbose, deprecate YYERROR_VERBOSE.
16337
16338 2002-11-03 Akim Demaille <akim@epita.fr>
16339
16340 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
16341 AT_CHECK_CALC_GLR invocations to use % directives, instead of
16342 command line options.
16343 * tests/cxx-type.at: Formatting changes.
16344
16345 2002-11-03 Paul Eggert <eggert@twinsun.com>
16346
16347 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
16348 to count columns correctly, and to check for invalid inputs.
16349
16350 Use mbsnwidth to count columns correctly. Account for tabs, too.
16351 Include mbswidth.h.
16352 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
16353 (extend_location): New function.
16354 (YY_LINES): Remove.
16355
16356 Handle CRLF in C code rather than in Lex code.
16357 (YY_INPUT): New macro.
16358 (no_cr_read): New function.
16359
16360 Scan UCNs, even though we don't fully handle them yet.
16361 (convert_ucn_to_byte): New function.
16362
16363 Handle backslash-newline correctly in C code.
16364 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
16365 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
16366 all uses changed.
16367 (tag, splice): New EREs. Do not allow NUL or newline in tags.
16368 Use {splice} wherever C allows backslash-newline.
16369 YY_STEP after space, newline, vertical-tab.
16370 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
16371
16372 (letter, id): Don't assume ASCII; e.g., spell out a-z.
16373
16374 ({int}, handle_action_dollar, handle_action_at): Check for integer
16375 overflow.
16376
16377 (YY_STEP): Omit trailing semicolon, so that it's more like C.
16378
16379 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
16380 as well as \000. Check for UCHAR_MAX, not 255.
16381 Allow \x with an arbitrary positive number of digits, as in C.
16382 Check for overflow here.
16383 Allow \? and UCNs, for compatibility with C.
16384
16385 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
16386 with quote slot used by complain_at.
16387
16388 * tests/input.at: Add tests for backslash-newline, m4 quotes
16389 in symbols, long literals, and funny escapes in strings.
16390
16391 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
16392 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
16393 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
16394 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
16395 * m4/mbswidth.m4: New file, from GNU coreutils.
16396
16397 * doc/bison.texinfo (Grammar Outline): Document // comments.
16398 (Symbols): Document that trigraphs have no special meaning in Bison,
16399 nor is backslash-newline allowed.
16400 (Actions): Document that trigraphs have no special meaning.
16401
16402 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
16403 no longer used.
16404
16405 2002-11-02 Paul Eggert <eggert@twinsun.com>
16406
16407 * src/reader.c: Don't include quote.h; not needed.
16408 (get_merge_function): Reword warning to be consistent with
16409 type clash diagnostic in grammar_current_rule_check.
16410
16411 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
16412 bug in trigraph handling.
16413
16414 * src/output.c (prepare_symbols): When printing token names,
16415 escape "[" as "@<:@" and likewise for "]".
16416
16417 * src/system.h (errno): Remove declaration, as we are now
16418 assuming C89 or better, and C89 guarantees errno.
16419
16420 2002-10-30 Paul Eggert <eggert@twinsun.com>
16421
16422 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
16423 Check for close failures.
16424 * src/files.h (xfclose): Return void, not int, since it always
16425 returned zero.
16426 * src/files.c (xfclose): Likewise. Report I/O error if ferror
16427 indicates one.
16428 * src/output.c (output_skeleton): Use xfclose rather than fclose
16429 and ferror. xfclose now checks ferror.
16430
16431 * data/glr.c (YYLEFTMOST_STATE): Remove.
16432 (yyreportTree): Use a stack-based leftmost state. This avoids
16433 our continuing battles with bogus warnings about initializers.
16434
16435 2002-10-30 Akim Demaille <akim@epita.fr>
16436
16437 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
16438 #if.
16439
16440 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16441
16442 * tests/glr-regr1.at: New test for reported regressions.
16443 * tests/testsuite.at: Add glr-regr1.at test.
16444 * tests/Makefile.am: Add glr-regr1.at test.
16445
16446 2002-10-24 Paul Eggert <eggert@twinsun.com>
16447
16448 Version 1.75a.
16449
16450 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
16451 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
16452 we use malloc. Don't assume 'A' through 'Z' are contiguous.
16453 Don't assume strdup exists; POSIX says its an XSI extension.
16454 Check for buffer overflow on input.
16455
16456 2002-10-24 Akim Demaille <akim@epita.fr>
16457
16458 * src/output.c (output_skeleton): Don't disable M4sugar comments
16459 too soon: it results in comments being expanded.
16460 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
16461 first output.
16462
16463 2002-10-24 Akim Demaille <akim@epita.fr>
16464
16465 * data/yacc.c (m4_int_type): New.
16466 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
16467 char' as only yacc.c wants K&R portability.
16468 * data/glr.c (yysigned_char): Remove.
16469 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
16470 Reported by Quoc Peyrot.
16471
16472 2002-10-23 Paul Eggert <eggert@twinsun.com>
16473
16474 * src/main.c (main): With --trace=time, report times even if a
16475 non-fatal error occurs. Formerly, the times were reported in some
16476 such cases but not in others.
16477 * src/reader.c (reader): Just return if a complaint has been issued,
16478 instead of exiting, so that 'main' can report times.
16479
16480 2002-10-22 Akim Demaille <akim@epita.fr>
16481
16482 * src/system.h: Include sys/types.
16483 Reported by Bert Deknuydt.
16484
16485 2002-10-23 Paul Eggert <eggert@twinsun.com>
16486
16487 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
16488 Suggested by Art Haas.
16489
16490 2002-10-22 Paul Eggert <eggert@twinsun.com>
16491
16492 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
16493 decl; not needed any more.
16494 * src/main.c (main): Use return to exit, undoing yesterday's change.
16495 The last OS that we could find where this wouldn't work is
16496 SunOS 3.5, and that's too old to worry about now.
16497
16498 * data/glr.c (struct yyltype): Define members even when not
16499 doing locations. This is more consistent with yacc.c, and it
16500 works around the following bug reports:
16501 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
16502 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
16503
16504 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
16505 @acronym consistently. Standardize on "Yacc" instead of "YACC",
16506 "Algol" instead of "ALGOL". Give a bit more history about BNF.
16507
16508 2002-10-22 Akim Demaille <akim@epita.fr>
16509
16510 * data/README: New.
16511
16512 2002-10-21 Paul Eggert <eggert@twinsun.com>
16513
16514 Be consistent about 'bool'; the old code used an enum in one
16515 module and an int in another, and this violates the C standard.
16516 * m4/stdbool.m4: New file, from coreutils 4.5.3.
16517 * configure.ac (AC_HEADER_STDBOOL): Add.
16518 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
16519 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
16520 * src/symtab.c (hash_compare_symbol_t): Likewise.
16521 * src/system.h (bool, false, true): Use a definition consistent
16522 with ../lib/hash.c. All uses changed.
16523
16524 * src/complain.c (warning_issued): Renamed from warn_message_count,
16525 so that we needn't worry about integer overflow (!).
16526 Now of type bool. All uses changed.
16527 (complaint_issued): Renamed from complain_message_count; likewise.
16528
16529 * src/main.c (main): Use exit to exit with failure.
16530
16531 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
16532 rather than 1 and 0.
16533 * src/main.c (main): Likewise.
16534 * src/getargs.c (getargs): Likewise.
16535 * src/reader.c (reader): Likewise.
16536
16537 * src/getarg.c (getargs): Remove duplicate code for
16538 "Try `bison --help'".
16539
16540 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
16541 What was that "2" for?
16542
16543 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
16544 * src/getargs.c (usage): Likewise.
16545
16546 * src/getargs.c (getargs): When there are too few operands, report
16547 the last one. When there are too many, report the first extra
16548 one. This is how diffutils does it.
16549
16550 2002-10-20 Paul Eggert <eggert@twinsun.com>
16551
16552 Remove K&R vestiges.
16553 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
16554 * src/complain.c (VA_START): Remove. Assume prototypes.
16555 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
16556 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
16557 fatal): Assume prototypes.
16558 * src/complain.h: Assume prototypes.
16559 * src/system.h (PARAMS): Remove.
16560 Include <limits.h> unconditionally, since it's guaranteeed even
16561 for a freestanding C89 compiler.
16562 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
16563 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
16564
16565 2002-10-20 Akim Demaille <akim@epita.fr>
16566
16567 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
16568 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
16569 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
16570 (yyresolveStates, yyresolveAction, yyresolveStack)
16571 (yyprocessOneStack): Use them.
16572 (yy_reduce_print): New.
16573 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
16574
16575 2002-10-20 Akim Demaille <akim@epita.fr>
16576
16577 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
16578 arguments and output `void'.
16579 (b4_c_function): Rename as...
16580 (b4_c_function_def): this.
16581 (b4_c_function_decl, b4_c_ansi_function_def)
16582 (b4_c_ansi_function_decl): New.
16583 Change the interpretation of the arguments: before `int, foo', now
16584 `int foo, foo'.
16585 * data/yacc.c (yyparse): Prototype and define thanks to these.
16586 Adjust b4_c_function_def uses.
16587 * data/glr.c (yyparse): Likewise, but ANSI only.
16588
16589 2002-10-20 Akim Demaille <akim@epita.fr>
16590
16591 * src/output.c (prepare): Move the definition of `tokens_number',
16592 `nterms_number', `undef_token_number', `user_token_number_max'
16593 to...
16594 (prepare_tokens): Here.
16595 (prepare_tokens): Rename as...
16596 (prepare_symbols): this.
16597 (prepare): Move the definition of `rules_number' to...
16598 (prepare_rules): here.
16599 (prepare): Move the definition of `last', `final_state_number',
16600 `states_number' to...
16601 (prepare_states): here.
16602 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
16603
16604 2002-10-20 Akim Demaille <akim@epita.fr>
16605
16606 * src/tables.h, src/tables.c, src/output.c: Comment changes.
16607
16608 2002-10-20 Akim Demaille <akim@epita.fr>
16609
16610 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
16611 * data/c.m4: here.
16612
16613 2002-10-20 Akim Demaille <akim@epita.fr>
16614
16615 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
16616 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
16617 `pair'.
16618 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
16619 `name' to...
16620 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
16621 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
16622 These.
16623
16624 2002-10-19 Paul Eggert <eggert@twinsun.com>
16625
16626 Do not create a temporary file, as that involves security and
16627 cleanup headaches. Instead, use a pair of pipes.
16628 Derived from a suggestion by Florian Krohm.
16629 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
16630 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
16631 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
16632 (BISON_PREREQ_SUBPIPE): Add.
16633 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
16634 Add subpipe.h, subpipe.c.
16635 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
16636 * po/POTFILES.in: Add lib/subpipe.c.
16637 * src/output.c: Include "subpipe.h".
16638 (m4_invoke): Remove decl.
16639 (scan_skel): New decl.
16640 (output_skeleton): Use pipe rather than temporary file for m4 input.
16641 Check that m4sugar.m4 is readable, to avoid deadlock.
16642 Check for pipe I/O error.
16643 * src/scan-skel.l (readpipe): Remove decl.
16644 (scan_skel): New function, to be used in place of m4_invoke.
16645 Read from stream rather than file.
16646
16647 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
16648 float, as this generates a warning on Solaris 8 + GCC 3.2 with
16649 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
16650 this generates a more-accurate value anyway.
16651
16652 * lib/timevar.c (timervar_accumulate): Rename locals to
16653 avoid confusion with similarly-named more-global.
16654 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
16655
16656 * src/output.c (prepare): Use xstrdup to convert char const *
16657 to char *, to avoid GCC warning.
16658
16659 2002-10-19 Akim Demaille <akim@epita.fr>
16660
16661 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
16662 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
16663 Use them to have `calc.y' ready for %pure-parser.
16664 * data/yacc.c (YYLEX): Pass a yylex return type to
16665 b4_c_function_call.
16666
16667 2002-10-19 Akim Demaille <akim@epita.fr>
16668
16669 Prototype support of %lex-param and %parse-param.
16670
16671 * src/parse-gram.y: Add the definition of the %lex-param and
16672 %parse-param tokens, plus their rules.
16673 Drop the `_' version of %glr-parser.
16674 Add the "," token.
16675 * src/scan-gram.l (INITIAL): Scan them.
16676 * src/muscle_tab.c: Comment changes.
16677 (muscle_insert, muscle_find): Rename `pair' as `probe'.
16678 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
16679 (muscle_entry_s): The `value' member is no longer const.
16680 Adjust all dependencies.
16681 * src/muscle_tab.c (muscle_init): Adjust: use
16682 MUSCLE_INSERT_STRING.
16683 Initialize the obstack earlier.
16684 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
16685 (muscle_pair_list_grow): New.
16686 * data/c.m4 (b4_c_function_call, b4_c_args): New.
16687 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
16688 * tests/calc.at: Use %locations, not --locations.
16689 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
16690
16691 2002-10-19 Akim Demaille <akim@epita.fr>
16692
16693 * src/getargs.c (usage): Take status as argument and exit
16694 accordingly.
16695 Report the traditional `Try ... --help' message when status != 0.
16696 (usage, version): Don't take a FILE * as arg, it is pointless.
16697 (getargs): When there is an incorrect number of arguments, make it
16698 an error, and report it GNUlically thanks to `usage ()'.
16699
16700 2002-10-18 Paul Eggert <eggert@twinsun.com>
16701
16702 * data/glr.c (yyreportParseError): Don't assume that sprintf
16703 yields the length of the printed string, as this is not true
16704 on SunOS 4.1.4. Reported by Peter Klein.
16705
16706 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
16707 * tests/conflicts.at (%nonassoc and eof): Likewise.
16708 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
16709
16710 2002-10-17 Akim Demaille <akim@epita.fr>
16711
16712 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
16713 * src/getargs.c (trace_types, trace_args): Adjust.
16714 * src/reader.c (grammar_current_rule_prec_set)
16715 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
16716 Standardize error messages.
16717 And s/@prec/%prec/!
16718 (reader): Use trace_flag to enable scanner/parser debugging,
16719 instead of an adhoc scheme.
16720 * src/scan-gram.l: Remove trailing debugging code.
16721
16722 2002-10-16 Paul Eggert <eggert@twinsun.com>
16723
16724 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
16725 MUSCLE_TAB_H.
16726
16727 * NEWS: Officially drop support for building Bison with K&R C,
16728 since it didn't work anyway and it's not worth worrying about.
16729 * Makefile.maint (wget_files): Remove ansi2knr.c.
16730 (ansi2knr.c-url_prefix): Remove.
16731 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
16732 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
16733 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
16734
16735 2002-10-15 Paul Eggert <eggert@twinsun.com>
16736
16737 Stop using the "enum_" trick for K&R-style function definitions;
16738 it confused me, and I was the author! Instead, assume that people
16739 who want to use K&R C compilers (when using these modules in GCC,
16740 perhaps?) will run ansi2knr.
16741
16742 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
16743 All uses of "enum_" changed to "enum ".
16744 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
16745 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
16746
16747 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
16748 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
16749 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
16750 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
16751 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
16752 abitset_not, abitset_ones, abitset_or, abitset_or_and,
16753 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
16754 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
16755 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
16756 Use function prototypes; this removes the need for declaring
16757 static functions simply to provide their prototypes.
16758 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
16759 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
16760 bitset_count_, bitset_create, bitset_dump, bitset_first,
16761 bitset_free, bitset_init, bitset_last, bitset_next,
16762 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
16763 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
16764 bitset_print, bitset_release_memory, bitset_toggle_,
16765 bitset_type_choose, bitset_type_get, bitset_type_name_get,
16766 debug_bitset): Likewise.
16767 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
16768 * lib/bitset_stats.c (bitset_log_histogram_print,
16769 bitset_percent_histogram_print, bitset_stats_and,
16770 bitset_stats_and_cmp, bitset_stats_and_or,
16771 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
16772 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
16773 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
16774 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
16775 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
16776 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
16777 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
16778 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
16779 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
16780 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
16781 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
16782 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
16783 bitset_stats_zero): Likewise.
16784 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
16785 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
16786 bitsetv_dump, debug_bitsetv): Likewise.
16787 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
16788 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
16789 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
16790 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
16791 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
16792 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
16793 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
16794 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
16795 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
16796 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
16797 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
16798 Likewise.
16799 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
16800 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
16801 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
16802 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
16803 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
16804 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
16805 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
16806 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
16807 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
16808 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
16809 lbitset_xor_cmp, lbitset_zero): Likewise.
16810
16811 2002-10-14 Akim Demaille <akim@epita.fr>
16812
16813 Version 1.75.
16814
16815 2002-10-14 Akim Demaille <akim@epita.fr>
16816
16817 * tests/Makefile.am (maintainer-check-posix): New.
16818
16819 2002-10-14 Akim Demaille <akim@epita.fr>
16820
16821 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
16822 member.
16823
16824 2002-10-14 Akim Demaille <akim@epita.fr>
16825
16826 * src/tables.c (table_ninf_remap): base -> tab.
16827 Reported by Matt Rosing.
16828
16829 2002-10-14 Paul Eggert <eggert@twinsun.com>
16830
16831 * tests/action.at, tests/calc.at, tests/conflicts.at,
16832 tests/cxx-type.at, tests/headers.at, tests/input.at,
16833 tests/regression.at, tests/synclines.at, tests/torture.at:
16834 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
16835 so that the tests still work even if POSIXLY_CORRECT is set.
16836 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
16837
16838 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
16839 for portability to K&R hosts. Fix typo: signed char is guaranteed
16840 only to 127, not to 128.
16841 * data/glr.c (yysigned_char): New type.
16842 * data/yacc.c (yysigned_char): Likewise.
16843 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
16844
16845 2002-10-13 Paul Eggert <eggert@twinsun.com>
16846
16847 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
16848 true due to limited range of data type" warning from GCC.
16849
16850 * data/c.m4 (b4_token_defines): Protect against double-inclusion
16851 by wrapping enum yytokentype's definition inside #ifndef
16852 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
16853
16854 2002-10-13 Akim Demaille <akim@epita.fr>
16855
16856 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
16857 Un yy- yyrhs to avoid the name clash with the global YYRHS.
16858
16859 2002-10-13 Akim Demaille <akim@epita.fr>
16860
16861 * Makefile.maint: Update from Autoconf 2.54.
16862 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
16863
16864 2002-10-13 Akim Demaille <akim@epita.fr>
16865
16866 * src/print.c (print_state): Separate the list of solved conflicts
16867 from the other items.
16868 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
16869
16870 2002-10-13 Akim Demaille <akim@epita.fr>
16871
16872 Let nondeterministic skeletons be usable with deterministic
16873 tables.
16874
16875 With the patch, GAWK compiled by GCC without -O2 passes its test
16876 suite using a GLR parser driven by LALR tables. It fails with -O2
16877 because `struct stat' gives two different answers on my machine:
16878 88 (definition of an auto var) and later 96 (memset on this var).
16879 Hence the stack is badly corrumpted. The headers inclusion is to
16880 blame: if I move the awk.h inclusion before GLR's system header
16881 inclusion, the two struct stat have the same size.
16882
16883 * src/tables.c (pack_table): Always create conflict_table.
16884 (token_actions): Always create conflict_list.
16885 * data/glr.c (YYFLAG): Remove, unused.
16886
16887 2002-10-13 Akim Demaille <akim@epita.fr>
16888
16889 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
16890 (O0FLAGS): New.
16891 (VALGRIND, GXX): New.
16892 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
16893 * tests/bison.in: Run $PREBISON a pre-command.
16894 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
16895 (maintainer-check-g++): New.
16896 * Makefile.am (maintainer-check): New.
16897
16898 2002-10-13 Akim Demaille <akim@epita.fr>
16899
16900 * data/glr.c: Formatting changes.
16901 Tweak some trace messages to match yacc.c's.
16902
16903 2002-10-13 Akim Demaille <akim@epita.fr>
16904
16905 GLR parsers sometimes raise parse errors instead of performing the
16906 default reduction.
16907 Reported by Charles-Henry de Boysson.
16908
16909 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
16910 check the length of the traces when %glr.
16911 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
16912 GLR's traces.
16913 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
16914 Test GLR parsers.
16915 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
16916 (yyltype): Remove the yy prefix from the member names.
16917 (yytable): Complete its comment.
16918 (yygetLRActions): Map error action number from YYTABLE from
16919 YYTABLE_NINF to 0.
16920 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
16921 (which was a bug: it should have been YYTABEL_NINF, and yet it was
16922 not satisfying as we could compare an YYACTION computed from
16923 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
16924 only value for error actions.
16925 (yyreportParseError): In verbose parse error messages, don't issue
16926 `error' in the list of expected tokens.
16927 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
16928 next action to perform to match glr.c's decoding.
16929 (yytable): Complete its comment.
16930
16931 2002-10-13 Paul Eggert <eggert@twinsun.com>
16932
16933 Fix problem reported by Henrik Grubbstroem in
16934 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
16935 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
16936 because the Bison parser reads the second action before reducing
16937 the first one.
16938 * src/scan-gram.l (rule_length): New static var.
16939 Use it to keep track of the rule length in the scanner, since
16940 we can't expect the parser to be in lock-step sync with the scanner.
16941 (handle_action_dollar, handle_action_at): Use this var.
16942 * tests/actions.at (Exotic Dollars): Test for the problem.
16943
16944 2002-10-12 Paul Eggert <eggert@twinsun.com>
16945
16946 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
16947 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
16948 Include <sys/time.h> when checking for clock_t and struct tms.
16949 Use same include order as source.
16950 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
16951 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
16952
16953 * lib/timevar.c: Update copyright date and clarify comments.
16954 (get_time) [IN_GCC]: Keep the GCC version for reference.
16955
16956 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
16957 GCC version as of today, then merge Bison's changes.
16958 Change "GCC" to "Bison" in copyright notice. timevar.def's
16959 author is Akim, so change that too.
16960
16961 * src/reader.c (grammar_current_rule_check):
16962 Don't worry about the default action if $$ is untyped.
16963 Prevents bogus warnings reported by Jim Gifford in
16964 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
16965
16966 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
16967 * data/glr.c, data/lalr1.cc, data/yacc.c:
16968 Output token definitions before the first part of user declarations.
16969 Fixes compatibility problem reported by Jim Gifford for kbd in
16970 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
16971
16972 2002-10-11 Paul Eggert <eggert@twinsun.com>
16973
16974 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
16975 (yyparse): here. This undoes some of the 2002-07-25 change.
16976 Compatibility problem reported by Ralf S. Engelschall with
16977 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
16978
16979 2002-10-11 Akim Demaille <akim@epita.fr>
16980
16981 * tests/regression.at Characters Escapes): New.
16982 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
16983 characters.
16984 Reported by Jan Nieuwenhuizen.
16985
16986 2002-10-11 Akim Demaille <akim@epita.fr>
16987
16988 * po/id.po: New.
16989
16990 2002-10-10 Paul Eggert <eggert@twinsun.com>
16991
16992 Portability fixes for bitsets; this also avoids several GCC
16993 warnings.
16994
16995 * lib/abitset.c: Include <stddef.h>, for offsetof.
16996 * lib/lbitset.c: Likewise.
16997
16998 * lib/abitset.c (abitset_bytes): Return a size that is aligned
16999 properly for vectors of objects. Do not assume that adding a
17000 header size to a multiple of a word size yields a value that is
17001 properly aligned for the whole union.
17002 * lib/bitsetv.c (bitsetv_alloc): Likewise.
17003
17004 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
17005 unique names for structures.
17006 * lib/ebitset.c (ebitset_bytes): Likewise.
17007 * lib/lbitset.c (lbitset_bytes): Likewise.
17008
17009 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
17010 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
17011 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
17012 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
17013 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
17014 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
17015 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
17016 to improve the type-checking that GCC can do.
17017 * lib/bitset.c (bitset_op4_cmp): Likewise.
17018 * lib/bitset_stats.c (bitset_stats_count,
17019 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
17020 bitset_stats_copy, bitset_stats_disjoint_p,
17021 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
17022 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
17023 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
17024 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
17025 bitset_stats_and_or_cmp, bitset_stats_andn_or,
17026 bitset_stats_andn_or_cmp, bitset_stats_or_and,
17027 bitset_stats_or_and_cmp): Likewise.
17028 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
17029 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
17030 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
17031 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
17032
17033 * lib/abitset.h: Include bitset.h, not bbitset.h.
17034 * lib/ebitset.h: Likewise.
17035 * lib/lbitset.h: Likewise.
17036
17037 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
17038 All instances of parameters of type enum bitset_opts are now of
17039 type enum_bitset_opts, to conform to the C Standard, and similarly
17040 for enum_bitset_type.
17041 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
17042 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
17043
17044 Do not use "struct bitset_struct" to mean different things in
17045 different modules. Not only is this confusing, it violates
17046 the C Standard, which requires that structure types in different
17047 modules must be compatible if one is to be passed to the other.
17048 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
17049 All instances of "struct bitset_struct *" replaced with "bitset".
17050 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
17051 (union bitset_union, struct abitset_struct, struct ebitset_struct,
17052 struct lbitset_struct, struct bitset_stats_struct): New types.
17053 All uses of struct bitset_struct changed to union bitset_union,
17054 etc.
17055 * lib/abitset.c (struct abitset_struct, abitset,
17056 struct bitset_struct): Remove.
17057 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
17058 struct bitset_struct): Remove.
17059 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
17060 bitset_struct): Remove.
17061 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
17062 Likewise.
17063
17064 Do not call a function of type T using a call that assumes the
17065 function is of a different type U. Standard C requires that a
17066 function must be called with a type that is compatible with its
17067 definition.
17068 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
17069 New decls.
17070 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
17071 New functions.
17072 * lib/ebitset.c (PFV): Remove.
17073 * lib/lbitset.c (PFV): Likewise.
17074 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
17075 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
17076 decls.
17077 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
17078 (ebitset_vtable): Use them.
17079 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
17080 lbitset_xor): New functions.
17081 (lbitset_vtable): Use them.
17082
17083 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
17084 Declare.
17085
17086 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
17087 GCC warning.
17088 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
17089 Use offsetof, for simplicity.
17090
17091 2002-10-06 Paul Eggert <eggert@twinsun.com>
17092
17093 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
17094 the same width as int. This reapplies a hunk of the 2002-08-12 patch
17095 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
17096 which was inadvertently undone by the 2002-09-30 patch.
17097 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
17098 the same width as int.
17099
17100 2002-10-04 Paul Eggert <eggert@twinsun.com>
17101
17102 Version 1.50.
17103
17104 * configure.ac (AC_INIT), NEWS: Increment version number.
17105
17106 * doc/bison.texinfo: Minor spelling, grammar, and white space
17107 fixes.
17108 (Symbols): Mention that any negative value returned from yylex
17109 signifies end-of-input. Warn about negative chars. Mention
17110 the portable Standard C character set.
17111
17112 The GNU coding standard says CFLAGS and YFLAGS are reserved
17113 for the installer to set.
17114 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
17115 * src/Makefile.am (AM_CFLAGS): Likewise.
17116 (AM_YFLAGS): Renamed from YFLAGS.
17117
17118 Fix some MAX and MIN problems.
17119 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
17120 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
17121 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
17122 * src/reader.c (reader): Use it.
17123
17124 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
17125 POSIX 1003.1-2001 has removed fgrep.
17126
17127 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
17128
17129 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
17130 interpreted as signed.
17131 * lib/ebitset.c (ebitset_list): Fix bug.
17132
17133 2002-10-01 Paul Eggert <eggert@twinsun.com>
17134
17135 More fixes for 64-bit hosts and large bitsets.
17136
17137 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
17138 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
17139 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
17140 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
17141 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
17142 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
17143 bitset_count_): Likewise.
17144 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
17145 bitset_first, bitset_last): Likewise.
17146 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
17147 bitset_stats_list_reverse, bitset_stats_size,
17148 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
17149 Likewise.
17150 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
17151 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
17152 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
17153 bitsetv_reflexive_transitive_closure): Likewise.
17154 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
17155 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
17156 Likewise.
17157 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
17158 Likewise.
17159
17160 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
17161 Use size_t, not unsigned int, to count bytes.
17162 * lib/abitset.h (abitset_bytes): Likewise.
17163 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
17164 Likewise.
17165 * lib/bitset.h (bitset_bytes): Likewise.
17166 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
17167 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
17168 * lib/bitsetv.c (bitsetv_alloc): Likewise.
17169 * lib/ebitset.c (ebitset_bytes): Likewise.
17170 * lib/ebitset.h (ebitset_bytes): Likewise.
17171 * lib/lbitset.c (lbitset_bytes): Likewise.
17172 * lib/lbitset.h (lbitset_bytes): Likewise.
17173
17174 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
17175 abitset_subset_p, abitset_disjoint_p, abitset_and,
17176 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
17177 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
17178 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
17179 abitset_or_and, abitset_or_and_cmp):
17180 Use bitset_windex instead of unsigned int.
17181 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
17182 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
17183 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
17184 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
17185 Likewise.
17186 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
17187
17188 * lib/bitset.c (bitset_print):
17189 Use proper printf formats for widths of integer types.
17190 * lib/bitset_stats.c (bitset_percent_histogram_print,
17191 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
17192 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
17193 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
17194 * lib/lbitset.c (lbitset_bytes): Likewise.
17195
17196 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
17197 BITSET_SIZE_MAX): New macros.
17198 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
17199 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
17200 to BITSET_WINDEX_MAX.
17201
17202 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
17203 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
17204 since we now return the bitset_bindex type (not int).
17205
17206 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
17207 when computing sizes.
17208 * lib/ebitset.c (ebitset_elts_grow): Likewise.
17209
17210 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
17211 and avoid cast to unsigned.
17212
17213 2002-09-30 Akim Demaille <akim@epita.fr>
17214
17215 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
17216 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
17217 Updates from Michael Hayes.
17218
17219 2002-09-30 Art Haas <ahaas@neosoft.com>
17220
17221 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
17222 invocations.
17223 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
17224 defined.
17225
17226 2002-09-27 Akim Demaille <akim@epita.fr>
17227
17228 Version 1.49c.
17229
17230 2002-09-27 Akim Demaille <akim@epita.fr>
17231
17232 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
17233 (Because of AC_LIBSOURCE).
17234
17235 2002-09-27 Akim Demaille <akim@epita.fr>
17236
17237 Playing with Autoscan.
17238
17239 * configure.ac: Remove the old LIBOBJ tweaks.
17240 (AC_REPLACE_FUNCS): Add strrchr and strtol.
17241 * lib/strrchr.c: New.
17242 * lib/strtol.c: New, from the Coreutils 4.5.1.
17243
17244 2002-09-27 Akim Demaille <akim@epita.fr>
17245
17246 Playing with Autoscan.
17247
17248 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
17249 * lib/Makefile.am (libbison_a_SOURCES): No longer include
17250 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
17251 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
17252 Coreutils 4.5.1.
17253
17254 2002-09-24 Akim Demaille <akim@epita.fr>
17255
17256 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
17257 (Frequently Asked Questions, Parser Stack Overflow): New.
17258
17259 2002-09-13 Akim Demaille <akim@epita.fr>
17260
17261 Playing with autoscan.
17262
17263 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
17264 * src/files.c (skeleton_find): Remove, unused.
17265 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
17266 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
17267
17268 2002-09-13 Akim Demaille <akim@epita.fr>
17269
17270 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
17271 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
17272
17273 2002-09-13 Akim Demaille <akim@epita.fr>
17274
17275 * configure.ac: Require 2.54.
17276 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
17277 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
17278 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
17279 Remove, provided by Autoconf macros.
17280
17281 2002-09-12 Akim Demaille <akim@epita.fr>
17282
17283 * m4/prereq.m4: Update, from Coreutils 4.5.1.
17284
17285 2002-09-12 Akim Demaille <akim@epita.fr>
17286
17287 * m4/prereq.m4: Update, from Fileutils 4.1.5.
17288 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
17289 Reported by Martin Mokrejs.
17290
17291 2002-09-10 Akim Demaille <akim@epita.fr>
17292
17293 * src/parse-gram.y: Associate a human readable string to each
17294 token type.
17295 * tests/regression.at (Invalid inputs): Adjust.
17296
17297 2002-09-10 Gary V. Vaughan <gary@gnu.org>
17298
17299 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
17300 with an Autoconf-2.5x style configure.ac.
17301
17302 2002-09-06 Paul Eggert <eggert@twinsun.com>
17303
17304 * doc/bison.texinfo (Conditions): Make explicit that the GPL
17305 exception applies only to yacc.c. This is a modification of a
17306 patch originally suggested by Akim Demaille.
17307
17308 2002-09-06 Akim Demaille <akim@epita.fr>
17309
17310 * data/c.m4 (b4_copyright): Move the GPL exception comment from
17311 here to...
17312 * data/yacc.c: here.
17313
17314 * data/lalr1.cc (struct yyltype): Don't define it, since we use
17315 LocationType.
17316 (b4_ltype): Default to yy::Location from location.hh.
17317
17318 2002-09-04 Jim Meyering <jim@meyering.net>
17319
17320 * data/yacc.c: Guard the declaration of yytoknum also with
17321 `#ifdef YYPRINT', so it is declared only when used.
17322
17323 2002-09-04 Akim Demaille <akim@epita.fr>
17324
17325 * configure.in: Rename as...
17326 * configure.ac: this.
17327 Bump to 1.49c.
17328
17329 2002-09-04 Akim Demaille <akim@epita.fr>
17330
17331 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
17332 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
17333 translate maintainer only messages.
17334
17335 2002-08-12 Paul Eggert <eggert@twinsun.com>
17336
17337 Version 1.49b.
17338
17339 * Makefile.am (SUBDIRS): Remove intl.
17340 (DISTCLEANFILES): Remove.
17341 * NEWS: Mention that GNU M4 is now required. Clarify what is
17342 meant by "larger grammars". Mention the pt_BR translation.
17343 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
17344 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
17345 Bump version from 0.11.2 to 0.11.5.
17346 (BISON_PREREQ_STAGE): Remove.
17347 (AM_GNU_GETTEXT): Use external gettext.
17348 (AC_OUTPUT): Remove intl/Makefile.
17349
17350 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
17351
17352 * data/glr.c: Include string.h, for strlen.
17353 (yyreportParseError): Use size_t for yysize.
17354 (yy_yypstack): No longer nested inside yypstates, as nested
17355 functions are not portable. Do not assume size_t is the
17356 same width as int.
17357 (yypstates): Do not assume that ptrdiff_t is the same width
17358 as int, and similarly for yyposn and YYINDEX.
17359
17360 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
17361
17362 * lib/Makefile.am (INCLUDES): Do not include from the intl
17363 directory, which has been removed.
17364 * src/Makefile.am (INCLUDES): Likewise.
17365
17366 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
17367 (bitsets_sources, additional_bitsets_sources, timevars_sources):
17368 New vars.
17369
17370 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
17371 * tests/Makefile.am (EXTRA_DIST): Likewise.
17372
17373 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
17374 Do not assume that bitset_windex is the same width as unsigned.
17375
17376 * lib/abitset.c (abitset_unused_clear): Do not assume that
17377 bitset_word is the same width as int.
17378 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
17379 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
17380 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
17381 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
17382 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
17383
17384 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
17385 portability to one's complement hosts!).
17386 * lib/ebitset.c (ebitset_op1): Likewise.
17387 * lib/lbitset.c (lbitset_op1): Likewise.
17388
17389 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
17390 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
17391 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
17392 Sync with fileutils.
17393 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
17394 lib/gettext.h: Sync with diffutils.
17395
17396 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
17397 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
17398
17399 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
17400 PROTOTYPES to check for prototypes, and "defined __STDC__" to
17401 check for void *.
17402
17403 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
17404 size_t; the old version tried to do this but casted improperly.
17405 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
17406 (bitset_test): Now returns int, not unsigned long.
17407
17408 * lib/bitset_stats.c: Include "gettext.h".
17409 (_): New macro.
17410 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
17411 name locals "index", as it generates unnecessary warnings on some
17412 hosts that have an "index" function.
17413
17414 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
17415 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
17416 they need translation.
17417 * src/LR0.c (state_list_append, new_itemsets, get_state,
17418 append_states, generate_states): Likewise.
17419 * src/assoc.c (assoc_to_string): Likewise.
17420 * src/closure.c (print_closure, set_firsts, closure): Likewise.
17421 * src/gram.c (grammar_dump): Likewise.
17422 * src/injections.c (injections_compute): Likewise.
17423 * src/lalr.c (lookaheads_print): Likewise.
17424 * src/relation.c (relation_transpose): Likewise.
17425 * src/scan-gram.l: Likewise.
17426 * src/tables.c (table_grow, pack_vector): Likewise.
17427
17428 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
17429 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
17430 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
17431 * m4/mbstate_t.m4: Sync with fileutils.
17432 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
17433
17434 * po/LINGUAS: Add pt_BR.
17435 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
17436 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
17437 lib/timevar.c.
17438 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
17439 manual recommends.
17440 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
17441
17442 * src/complain.c (strerror_r): Remove decl; not needed.
17443 (strerror): Use same pattern as ../lib/error.c.
17444
17445 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
17446
17447 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
17448
17449 * src/main.c (main): Cast result of bindtextdomain and textdomain
17450 to void, to avoid a GCC warning when --disable-nls is in effect.
17451
17452 * src/scan-gram.l: Use strings rather than escapes when possible,
17453 to minimize the number of warnings from xgettext.
17454 (handle_action_dollar, handle_action_at): Don't use isdigit,
17455 as it mishandles negative chars and it may not work as expected
17456 outside the C locale.
17457
17458 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
17459 this is a GCC extension and is not portable to other compilers.
17460
17461 * src/system.h (alloca): Use same pattern as ../lib/error.c.
17462 Do not include <ctype.h>; no longer needed.
17463 Do not include <malloc.h>; no longer needed (and generates
17464 warnings on OpenBSD 3.0).
17465
17466 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
17467 it's not portable.
17468
17469 * tests/regression.at: Do not use 'cc -c input.c -o input';
17470 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
17471
17472 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
17473 exit status as failure, not just exit status 1. Sun C exits
17474 with status 2 sometimes.
17475
17476 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
17477 Use it for the two large tests.
17478
17479 2002-08-02 Akim Demaille <akim@epita.fr>
17480
17481 * src/conflicts.c (conflicts_output): Don't output rules never
17482 reduced here, since anyway that computation doesn't work.
17483 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
17484 (rule_useless_p, rule_never_reduced_p): New.
17485 (grammar_rules_partial_print): Use a filter instead of a range.
17486 Display the title only if needed.
17487 (grammar_rules_print): Adjust.
17488 (grammar_rules_never_reduced_report): New.
17489 * src/tables.c (action_row): Move the computation of rules never
17490 reduced to...
17491 (token_actions): here.
17492 * src/main.c (main): Make the parser before making the report, so
17493 that rules never reduced are computed.
17494 Call grammar_rules_never_reduced_report.
17495 * src/print.c (print_results): Report rules never reduced.
17496 * tests/conflicts.at, tests/reduce.at: Adjust.
17497
17498 2002-08-01 Akim Demaille <akim@epita.fr>
17499
17500 Instead of attaching lookaheads and duplicating the rules being
17501 reduced by a state, attach the lookaheads to the reductions.
17502
17503 * src/state.h (state_t): Remove the `lookaheads',
17504 `lookaheads_rule' member.
17505 (reductions_t): Add a `lookaheads' member.
17506 Use a regular array for the `rules'.
17507 * src/state.c (reductions_new): Initialize the lookaheads member
17508 to 0.
17509 (state_rule_lookaheads_print): Adjust.
17510 * src/state.h, src/state.c (state_reductions_find): New.
17511 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
17512 (count_rr_conflicts): Adjust.
17513 * src/lalr.c (LArule): Remove.
17514 (add_lookback_edge): Adjust.
17515 (state_lookaheads_count): New.
17516 (states_lookaheads_initialize): Merge into...
17517 (initialize_LA): this.
17518 (lalr_free): Adjust.
17519 * src/main.c (main): Don't free nullable and derives too early: it
17520 is used by --verbose.
17521 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
17522
17523 2002-08-01 Akim Demaille <akim@epita.fr>
17524
17525 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
17526 `rule_number_t**'.
17527 (set_derives, free_derives): Rename as...
17528 (derives_compute, derives_free): this.
17529 Adjust all dependencies.
17530 * src/nullable.c (set_nullable, free_nullable): Rename as...
17531 (nullable_compute, nullable_free): these.
17532 (rule_list_t): Store rule_t *, not rule_number_t.
17533 * src/state.c (state_rule_lookaheads_print): Directly compare rule
17534 pointers, instead of their numbers.
17535 * src/main.c (main): Call nullable_free, and derives_free earlier,
17536 as they were lo longer used.
17537
17538 2002-08-01 Akim Demaille <akim@epita.fr>
17539
17540 * lib/timevar.c (get_time): Include children time.
17541 * src/lalr.h (LA, LArule): Don't export them: used with the
17542 state_t.
17543 * src/lalr.c (LA, LArule): Static.
17544 * src/lalr.h, src/lalr.c (lalr_free): New.
17545 * src/main.c (main): Call it.
17546 * src/tables.c (pack_vector): Check whether loc is >= to the
17547 table_size, not >.
17548 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
17549 (tables_generate): do it, since that's also it which allocates
17550 them.
17551 Don't free LA and LArule, main does.
17552
17553 2002-07-31 Akim Demaille <akim@epita.fr>
17554
17555 Separate parser tables computation and output.
17556
17557 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
17558 (conflict_list, conflict_list_cnt, table, check, table_ninf)
17559 (yydefgoto, yydefact, high): Move to...
17560 * src/tables.h, src/tables.c: here.
17561 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
17562 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
17563 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
17564 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
17565 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
17566 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
17567 (action_row, save_row, token_actions, save_column, default_goto)
17568 (goto_actions, sort_actions, matching_state, pack_vector)
17569 (table_ninf_remap, pack_table, prepare_actions): Move to...
17570 * src/tables.c: here.
17571 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
17572 * src/output.c (token_actions, output_base, output_conflicts)
17573 (output_check): Merge into...
17574 (prepare_actions): this.
17575 (actions_output): Rename as...
17576 (user_actions_output): this.
17577 * src/main.c (main): Call tables_generate and tables_free.
17578
17579 2002-07-31 Akim Demaille <akim@epita.fr>
17580
17581 Steal GCC's --time-report support.
17582
17583 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
17584 stolen/adjusted from GCC.
17585 * m4/stage.m4: Remove time related checks.
17586 * m4/timevar.m4: New.
17587 * configure.in: Adjust.
17588 * src/system.h: Adjust to using timevar.h.
17589 * src/getargs.h, src/getargs.c: Support trace_time for
17590 --trace=time.
17591 * src/main.c (stage): Remove.
17592 (main): Replace `stage' invocations with timevar calls.
17593 * src/output.c: Insert pertinent timevar calls.
17594
17595 2002-07-31 Akim Demaille <akim@epita.fr>
17596
17597 Let --trace have arguments.
17598
17599 * src/getargs.h (enum trace_e): New.
17600 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
17601 (long_options, short_options): --trace/-T takes an optional
17602 argument.
17603 Change all the uses of trace_flag to reflect the new flags.
17604 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
17605
17606 Strengthen `stage' portability.
17607
17608 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
17609 * configure.in: Use it.
17610 Don't check for malloc.h and sys/times.h.
17611 * src/system.h: Include them when appropriate.
17612 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
17613 times and struct tms are available.
17614
17615 2002-07-30 Akim Demaille <akim@epita.fr>
17616
17617 In verbose parse error message, don't report `error' as an
17618 expected token.
17619 * tests/actions.at (Printers and Destructors): Adjust.
17620 * tests/calc.at (Calculator $1): Adjust.
17621 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
17622 error message, do not report the parser accepts the error token in
17623 that state.
17624
17625 2002-07-30 Akim Demaille <akim@epita.fr>
17626
17627 Normalize conflict related messages.
17628
17629 * src/complain.h, src/complain.c (warn, complain): New.
17630 * src/conflicts.c (conflicts_print): Use them.
17631 (conflict_report_yacc): New, extracted from...
17632 (conflicts_print): here.
17633 * tests/conflicts.at, tests/existing.at: Adjust.
17634
17635 2002-07-30 Akim Demaille <akim@epita.fr>
17636
17637 Report rules which are never reduced by the parser: those hidden
17638 by conflicts.
17639
17640 * src/LR0.c (save_reductions): Don't make the final state too
17641 different: save its reduction (accept) instead of having a state
17642 without any action (no shift or goto, no reduce).
17643 Note: the final state is now a ``regular'' state, i.e., the
17644 parsers now contain `reduce 0' as default reduction.
17645 Nevertheless, since they decide to `accept' when yystate =
17646 final_state, they still will not reduce rule 0.
17647 * src/print.c (print_actions, print_reduction): Adjust.
17648 * src/output.c (action_row): Track reduced rules.
17649 (token_actions): Report rules never reduced.
17650 * tests/conflicts.at, tests/regression.at: Adjust.
17651
17652 2002-07-30 Akim Demaille <akim@epita.fr>
17653
17654 `stage' was accidently included in a previous patch.
17655 Initiate its autoconfiscation.
17656
17657 * configure.in: Look for malloc.h and sys/times.h.
17658 * src/main.c (stage): Adjust.
17659 Report only when trace_flag.
17660
17661 2002-07-29 Akim Demaille <akim@epita.fr>
17662
17663 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
17664 state_number_t.
17665 (errs_t): symbol_t*, not symbol_number_t.
17666 (reductions_t): rule_t*, not rule_number_t.
17667 (FOR_EACH_SHIFT): New.
17668 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
17669 * src/print.c, src/print_graph.c: Adjust.
17670
17671 2002-07-29 Akim Demaille <akim@epita.fr>
17672
17673 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
17674
17675 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
17676 (endtoken, accept): these.
17677 * src/reader.c (reader): Set endtoken's default tag to "$end".
17678 Set undeftoken's tag to "$undefined" instead of "$undefined.".
17679 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
17680 Adjust.
17681
17682 2002-07-29 Akim Demaille <akim@epita.fr>
17683
17684 * src/reduce.c (reduce_grammar): When the language is empty,
17685 complain about the start symbol, not the axiom.
17686 Use its location.
17687 * tests/reduce.at (Empty Language): New.
17688
17689 2002-07-26 Akim Demaille <akim@epita.fr>
17690
17691 * src/reader.h, src/reader.c (gram_error): ... can't get
17692 yycontrol without making too strong assumptions on the parser
17693 itself.
17694 * src/output.c (prepare_tokens): Use the real 0th value of
17695 token_translations instead of `0'.
17696 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
17697 visible here.
17698 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
17699 for the time being: %locations ought to provide it to yyerror.
17700
17701 2002-07-25 Akim Demaille <akim@epita.fr>
17702
17703 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
17704 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
17705 * tests/regression.at (Web2c Actions): Adjust.
17706
17707 2002-07-25 Akim Demaille <akim@epita.fr>
17708
17709 Stop storing rules from 1 to nrules + 1.
17710
17711 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
17712 * src/nullable.c, src/output.c, src/print.c, src/reader.c
17713 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
17714 Iterate from 0 to nrules.
17715 Use rule_number_as_item_number and item_number_as_rule_number.
17716 Adjust to `derive' now containing possibly 0.
17717 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
17718 Handle the `- 1' part in rule numbers from/to item numbers.
17719 * src/conflicts.c (log_resolution): Fix the message which reversed
17720 shift and reduce.
17721 * src/output.c (action_row): Initialize default_rule to -1.
17722 (token_actions): Adjust.
17723 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
17724 expected output.
17725 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
17726
17727 2002-07-25 Akim Demaille <akim@epita.fr>
17728
17729 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
17730 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
17731 (b4_c_knr_arg_decl): New.
17732 * data/yacc.c: Use it to define yysymprint, yydestruct, and
17733 yyreport_parse_error.
17734
17735 2002-07-25 Akim Demaille <akim@epita.fr>
17736
17737 * data/yacc.c (yyreport_parse_error): New, extracted from...
17738 (yyparse): here.
17739 (yydestruct, yysymprint): Move above yyparse.
17740 Be K&R compliant.
17741
17742 2002-07-25 Akim Demaille <akim@epita.fr>
17743
17744 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
17745 replace...
17746 (b4_sint_type, b4_uint_type): these.
17747 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
17748 * tests/regression.at (Web2c Actions): Adjust.
17749
17750 2002-07-25 Akim Demaille <akim@epita.fr>
17751
17752 * src/gram.h (TIEM_NUMBER_MAX): New.
17753 (item_number_of_rule_number, rule_number_of_item_number): Rename
17754 as...
17755 (rule_number_as_item_number, item_number_as_rule_number): these.
17756 Adjust dependencies.
17757 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
17758 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
17759 (symbol_number_to_vector_number): New.
17760 (order): Of vector_number_t* type.
17761 (base_t, BASE_MAX, BASE_MIN): New.
17762 (froms, tos, width, pos, check): Of base_t type.
17763 (action_number_t, ACTION_MIN, ACTION_MAX): New.
17764 (actrow): Of action_number_t type.
17765 (conflrow): Of unsigned int type.
17766 (table_ninf, base_ninf): New.
17767 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
17768 (muscle_insert_int_table, muscle_insert_base_table)
17769 (muscle_insert_rule_number_table): New.
17770 (prepare_tokens): Output `toknum' as int_table.
17771 (action_row): Returns a rule_number_t.
17772 Use ACTION_MIN, not SHRT_MIN.
17773 (token_actions): yydefact is rule_number_t*.
17774 (table_ninf_remap): New.
17775 (pack_table): Use it for `base' and `table'.
17776 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
17777 replaced with...
17778 (YYPACT_NINF, YYTABLE_NINF): these.
17779 (yypact, yytable): Compute their types instead of hard-coded
17780 `short'.
17781 * tests/regression.at (Web2c Actions): Adjust.
17782
17783 2002-07-19 Akim Demaille <akim@epita.fr>
17784
17785 * src/scan-gram.l (id): Can start with an underscore.
17786
17787 2002-07-16 Akim Demaille <akim@epita.fr>
17788
17789 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
17790 Adjust all former `associativity' dependencies.
17791 * src/symtab.c (symbol_new): Default associativity is `undef', not
17792 `right'.
17793 (symbol_check_alias_consistence): Adjust.
17794
17795 2002-07-09 Akim Demaille <akim@epita.fr>
17796
17797 * doc/bison.texinfo: Properly set the ``header'' part.
17798 Use @dircategory ``GNU programming tools'' as per Texinfo's
17799 documentation.
17800 Use @copying.
17801
17802 2002-07-09 Akim Demaille <akim@epita.fr>
17803
17804 * lib/quotearg.h: Protect against multiple inclusions.
17805 * src/location.h (location_t): Add a `file' member.
17806 (LOCATION_RESET, LOCATION_PRINT): Adjust.
17807 * src/complain.c (warn_at, complain_at, fatal_at): Drop
17808 `error_one_per_line' support.
17809
17810 2002-07-09 Akim Demaille <akim@epita.fr>
17811
17812 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
17813 * src/reader.c (lineno): Remove.
17814 Adjust all dependencies.
17815 (get_merge_function): Take a location and use complain_at.
17816 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
17817 * tests/regression.at (Invalid inputs, Mixing %token styles):
17818 Adjust.
17819
17820 2002-07-09 Akim Demaille <akim@epita.fr>
17821
17822 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
17823 recovery rule, and forbid extensions when --yacc.
17824 (gram_error): Use complain_at.
17825 * src/reader.c (reader): Exit if there were parse errors.
17826
17827 2002-07-09 Akim Demaille <akim@epita.fr>
17828
17829 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
17830 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
17831 Reported by R Blake <blakers@mac.com>.
17832
17833 2002-07-09 Akim Demaille <akim@epita.fr>
17834
17835 * data/yacc.c: Output the copyright notive in the header.
17836
17837 2002-07-03 Akim Demaille <akim@epita.fr>
17838
17839 * src/output.c (froms, tos): Are state_number_t.
17840 (save_column): sp, sp1, and sp2 are state_number_t.
17841 (prepare): Rename `final' as `final_state_number', `nnts' as
17842 `nterms_number', `nrules' as `rules_number', `nstates' as
17843 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
17844 unused.
17845 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
17846 * data/lalr1.cc (nsym_): Remove, unused.
17847
17848 2002-07-03 Akim Demaille <akim@epita.fr>
17849
17850 * src/lalr.h, src/lalr.c (goto_number_t): New.
17851 * src/lalr.c (goto_list_t): New.
17852 Propagate them.
17853 * src/nullable.c (rule_list_t): New.
17854 Propagate.
17855 * src/types.h: Remove.
17856
17857 2002-07-03 Akim Demaille <akim@epita.fr>
17858
17859 * src/closure.c (print_fderives): Use rule_rhs_print.
17860 * src/derives.c (print_derives): Use rule_rhs_print.
17861 (rule_list_t): New, replaces `shorts'.
17862 (set_derives): Add comments.
17863 * tests/sets.at (Nullable, Firsts): Adjust.
17864
17865 2002-07-03 Akim Demaille <akim@epita.fr>
17866
17867 * src/output.c (prepare_actions): Free `tally' and `width'.
17868 (prepare_actions): Allocate and free `order'.
17869 * src/symtab.c (symbols_free): Free `symbols'.
17870 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
17871 * src/output.c (m4_invoke): Move to...
17872 * src/scan-skel.l: here.
17873 (<<EOF>>): Close yyout, and free its name.
17874
17875 2002-07-03 Akim Demaille <akim@epita.fr>
17876
17877 Fix some memory leaks, and fix a bug: state 0 was examined twice.
17878
17879 * src/LR0.c (new_state): Merge into...
17880 (state_list_append): this.
17881 (new_states): Merge into...
17882 (generate_states): here.
17883 (set_states): Don't ensure a proper `errs' state member here, do it...
17884 * src/conflicts.c (conflicts_solve): here.
17885 * src/state.h, src/state.c: Comment changes.
17886 (state_t): Rename member `shifts' as `transitions'.
17887 Adjust all dependencies.
17888 (errs_new): For consistency, also take the values as argument.
17889 (errs_dup): Remove.
17890 (state_errs_set): New.
17891 (state_reductions_set, state_transitions_set): Assert that no
17892 previous value was assigned.
17893 (state_free): New.
17894 (states_free): Use it.
17895 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
17896 temporary storage: use `errs' and `nerrs' as elsewhere.
17897 (set_conflicts): Allocate and free this `errs'.
17898
17899 2002-07-02 Akim Demaille <akim@epita.fr>
17900
17901 * lib/libiberty.h: New.
17902 * lib: Update the bitset implementation from upstream.
17903 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
17904 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
17905 * src/main.c: Adjust bitset stats calls.
17906
17907 2002-07-01 Paul Eggert <eggert@twinsun.com>
17908
17909 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
17910 char, so that negative chars don't collide with $.
17911
17912 2002-06-30 Akim Demaille <akim@epita.fr>
17913
17914 Have the GLR tests be `warning' checked, and fix the warnings.
17915
17916 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
17917 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
17918 (yyremoveDeletes): `yyi' and `yyj' are size_t.
17919 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
17920 (yyaddDeferredAction): static.
17921 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
17922 (yyreportParseError): yyprefix is const.
17923 yytokenp is used only when verbose.
17924 (yy__GNUC__): Replace with __GNUC__.
17925 (yypdumpstack): yyi is size_t.
17926 (yypreference): Un-yy local variables and arguments, to avoid
17927 clashes with `yyr1'. Anyway, we are not in the user name space.
17928 (yytname_size): be an int, as is compared with ints.
17929 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
17930 Use them.
17931 * tests/cxx-gram.at: Use quotation to protect $1.
17932 Use AT_COMPILE to enable warnings hunts.
17933 Prototype yylex and yyerror.
17934 `Use' argc.
17935 Include `string.h', not `strings.h'.
17936 Produce and prototype stmtMerge only when used.
17937 yylex takes a location.
17938
17939 2002-06-30 Akim Demaille <akim@epita.fr>
17940
17941 We spend a lot of time in quotearg, in particular when --verbose.
17942
17943 * src/symtab.c (symbol_get): Store a quoted version of the key.
17944 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
17945 Adjust all callers.
17946
17947 2002-06-30 Akim Demaille <akim@epita.fr>
17948
17949 * src/state.h (reductions_t): Rename member `nreds' as num.
17950 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
17951 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
17952
17953 2002-06-30 Akim Demaille <akim@epita.fr>
17954
17955 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
17956 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
17957 (shifts_to): Rename as...
17958 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
17959 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
17960 (TRANSITION_IS_DISABLED, transitions_to): these.
17961
17962 2002-06-30 Akim Demaille <akim@epita.fr>
17963
17964 * src/print.c (print_shifts, print_gotos): Merge into...
17965 (print_transitions): this.
17966 (print_transitions, print_errs, print_reductions): Align the
17967 lookaheads columns.
17968 (print_core, print_transitions, print_errs, print_state,
17969 print_grammar): Output empty lines separator before, not after.
17970 (state_default_rule_compute): Rename as...
17971 (state_default_rule): this.
17972 * tests/conflicts.at (Defaulted Conflicted Reduction),
17973 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
17974 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
17975
17976 2002-06-30 Akim Demaille <akim@epita.fr>
17977
17978 Display items as we display rules.
17979
17980 * src/gram.h, src/gram.c (rule_lhs_print): New.
17981 * src/gram.c (grammar_rules_partial_print): Use it.
17982 * src/print.c (print_core): Likewise.
17983 * tests/conflicts.at (Defaulted Conflicted Reduction),
17984 (Unresolved SR Conflicts): Adjust.
17985 (Unresolved SR Conflicts): Adjust and rename as...
17986 (Resolved SR Conflicts): this, as was meant.
17987 * tests/regression.at (Web2c Report): Adjust.
17988
17989 2002-06-30 Akim Demaille <akim@epita.fr>
17990
17991 * src/print.c (state_default_rule_compute): New, extracted from...
17992 (print_reductions): here.
17993 Pessimize, but clarify the code.
17994 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
17995
17996 2002-06-30 Akim Demaille <akim@epita.fr>
17997
17998 * src/output.c (action_row): Let default_rule be always a rule
17999 number.
18000
18001 2002-06-30 Akim Demaille <akim@epita.fr>
18002
18003 * src/closure.c (print_firsts, print_fderives, closure):
18004 Use BITSET_EXECUTE.
18005 * src/lalr.c (lookaheads_print): Likewise.
18006 * src/state.c (state_rule_lookaheads_print): Likewise.
18007 * src/print_graph.c (print_core): Likewise.
18008 * src/print.c (print_reductions): Likewise.
18009 * src/output.c (action_row): Likewise.
18010 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
18011
18012 2002-06-30 Akim Demaille <akim@epita.fr>
18013
18014 * src/print_graph.c: Use report_flag.
18015
18016 2002-06-30 Akim Demaille <akim@epita.fr>
18017
18018 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
18019 to...
18020 * src/relation.h, src/relation.c (traverse, relation_digraph)
18021 (relation_print, relation_transpose): New.
18022
18023 2002-06-30 Akim Demaille <akim@epita.fr>
18024
18025 * src/state.h, src/state.c (shifts_to): New.
18026 * src/lalr.c (build_relations): Use it.
18027
18028 2002-06-30 Akim Demaille <akim@epita.fr>
18029
18030 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
18031 (item_number_of_rule_number, rule_number_of_item_number): New.
18032 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
18033 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
18034 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
18035 Propagate their use.
18036 Much remains to be done, in particular wrt `shorts' from types.h.
18037
18038 2002-06-30 Akim Demaille <akim@epita.fr>
18039
18040 * src/symtab.c (symbol_new): Initialize the `printer' member.
18041
18042 2002-06-30 Akim Demaille <akim@epita.fr>
18043
18044 * src/LR0.c (save_reductions): Remove, replaced by...
18045 * src/state.h, src/state.c (state_reductions_set): New.
18046 (reductions, errs): Rename as...
18047 (reductions_t, errs_t): these.
18048 Adjust all dependencies.
18049
18050 2002-06-30 Akim Demaille <akim@epita.fr>
18051
18052 * src/LR0.c (state_list_t, state_list_append): New.
18053 (first_state, last_state): Now symbol_list_t.
18054 (this_state): Remove.
18055 (new_itemsets, append_states, save_reductions): Take a state_t as
18056 argument.
18057 (set_states, generate_states): Adjust.
18058 (save_shifts): Remove, replaced by...
18059 * src/state.h, src/state.c (state_shifts_set): New.
18060 (shifts): Rename as...
18061 (shifts_t): this.
18062 Adjust all dependencies.
18063 * src/state.h (state_t): Remove the `next' member.
18064
18065 2002-06-30 Akim Demaille <akim@epita.fr>
18066
18067 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
18068 escaped in slot 0.
18069
18070 2002-06-30 Akim Demaille <akim@epita.fr>
18071
18072 Use hash.h for the state hash table.
18073
18074 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
18075 (allocate_storage): Use state_hash_new.
18076 (free_storage): Use state_hash_free.
18077 (new_state, get_state): Adjust.
18078 * src/lalr.h, src/lalr.c (states): Move to...
18079 * src/states.h (state_t): Remove the `link' member, no longer
18080 used.
18081 * src/states.h, src/states.c: here.
18082 (state_hash_new, state_hash_free, state_hash_lookup)
18083 (state_hash_insert, states_free): New.
18084 * src/states.c (state_table, state_compare, state_hash): New.
18085 * src/output.c (output_actions): Do not free states now, since we
18086 still need to know the final_state number in `prepare', called
18087 afterwards. Do it...
18088 * src/main.c (main): here: call states_free after `output'.
18089
18090 2002-06-30 Akim Demaille <akim@epita.fr>
18091
18092 * src/state.h, src/state.c (state_new): New, extracted from...
18093 * src/LR0.c (new_state): here.
18094 * src/state.h (STATE_ALLOC): Move to...
18095 * src/state.c: here.
18096 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
18097 * src/state.h, src/state.c: here.
18098
18099 2002-06-30 Akim Demaille <akim@epita.fr>
18100
18101 * src/reader.c (gensym): Rename as...
18102 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
18103 (getsym): Rename as...
18104 (symbol_get): this.
18105
18106 2002-06-30 Akim Demaille <akim@epita.fr>
18107
18108 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
18109 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
18110 * src/output.c, src/print.c, src/print_graph.c: Propagate.
18111 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
18112
18113 2002-06-30 Akim Demaille <akim@epita.fr>
18114
18115 Make the test suite pass with warnings checked.
18116
18117 * tests/actions.at (Printers and Destructors): Improve.
18118 Avoid unsigned vs. signed issues.
18119 * tests/calc.at: Don't exercise the scanner here, do it...
18120 * tests/input.at (Torturing the Scanner): here.
18121
18122 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18123
18124 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
18125 reorganize first lines parallel to yacc.c.
18126
18127 2002-06-28 Akim Demaille <akim@epita.fr>
18128
18129 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
18130 (b4_token_enum, b4_token_defines): New, factored from...
18131 * data/lalr1.cc, data/yacc.c, glr.c: here.
18132
18133 2002-06-28 Akim Demaille <akim@epita.fr>
18134
18135 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
18136 unused variables.
18137 * src/output.c (merger_output): static.
18138
18139 2002-06-28 Akim Demaille <akim@epita.fr>
18140
18141 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
18142 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
18143 pacify GCC.
18144 * src/output.c (save_row): Initialize all the variables to pacify GCC.
18145
18146 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18147
18148 Accumulated changelog for new GLR parsing features.
18149
18150 * src/conflicts.c (count_total_conflicts): Change name to
18151 conflicts_total_count.
18152 * src/conflicts.h: Ditto.
18153 * src/output.c (token_actions): Use the new name.
18154 (output_conflicts): Change conflp => conflict_list_heads, and
18155 confl => conflict_list for better readability.
18156 * data/glr.c: Use the new names.
18157 * NEWS: Add self to GLR announcement.
18158
18159 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
18160
18161 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
18162 Akim Demaille.
18163
18164 * data/bison.glr: Change name to glr.c
18165 * data/glr.c: Renamed from bison.glr.
18166 * data/Makefile.am: Add glr.c
18167
18168 * src/getargs.c:
18169
18170 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
18171 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
18172
18173 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18174
18175 * data/bison.glr: Be sure to restore the
18176 current #line when returning to the skeleton contents after having
18177 exposed the input file's #line.
18178
18179 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18180
18181 * data/bison.glr: Bring up to date with changes to bison.simple.
18182
18183 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18184
18185 * data/bison.glr: Correct definitions that use b4_prefix.
18186 Various reformatting.
18187 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
18188 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
18189 yytokenp argument; now part of stack.
18190 (yychar): Define to behave as documented.
18191 (yyclearin): Ditto.
18192
18193 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18194
18195 * src/reader.h: Add declaration for free_merger_functions.
18196
18197 * src/reader.c (merge_functions): New variable.
18198 (get_merge_function): New function.
18199 (free_merger_functions): New function.
18200 (readgram): Check for %prec that is not followed by a symbol.
18201 Handle %dprec and %merge declarations.
18202 (packgram): Initialize dprec and merger fields in rules array.
18203
18204 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
18205 conflict_list_cnt, conflict_list_free): New variables.
18206 (table_grow): Also grow conflict_table.
18207 (prepare_rules): Output dprec and merger tables.
18208 (conflict_row): New function.
18209 (action_row): Output conflict lists for GLR parser. Don't use
18210 default reduction in conflicted states for GLR parser so that there
18211 are spaces for the conflict lists.
18212 (save_row): Also save conflict information.
18213 (token_actions): Allocate conflict list.
18214 (merger_output): New function.
18215 (pack_vector): Pack conflict table, too.
18216 (output_conflicts): New function to output yyconflp and yyconfl.
18217 (output_check): Allocate conflict_tos.
18218 (output_actions): Output conflict tables, also.
18219 (output_skeleton): Output b4_mergers definition.
18220 (prepare): Output b4_max_rhs_length definition.
18221 Use 'bison.glr' as default skeleton for GLR parsers.
18222
18223 * src/gram.c (glr_parser): New flag.
18224 (grammar_free): Call free_merger_functions.
18225
18226 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
18227 all pairs of conflicting reductions, rather than just all tokens
18228 causing conflicts. Needed to size conflict tables.
18229 (conflicts_output): Modify call to count_rr_conflicts for new
18230 interface.
18231 (conflicts_print): Ditto.
18232 (count_total_conflicts): New function.
18233
18234 * src/reader.h (merger_list): New type.
18235 (merge_functions): New variable.
18236
18237 * src/lex.h (tok_dprec, tok_merge): New token types.
18238
18239 * src/gram.h (rule_s): Add dprec and merger fields.
18240 (glr_parser): New flag.
18241
18242 * src/conflicts.h (count_total_conflicts): New function.
18243
18244 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
18245
18246 * doc/bison.texinfo (Generalized LR Parsing): New section.
18247 (GLR Parsers): New section.
18248 (Language and Grammar): Mention GLR parsing.
18249 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
18250 Correct typo ("tge" -> "the").
18251
18252 * data/bison.glr: New skeleton for GLR parsing.
18253
18254 * tests/cxx-gram.at: New tests for GLR parsing.
18255
18256 * tests/testsuite.at: Include cxx-gram.at.
18257
18258 * tests/Makefile.am: Add cxx-gram.at.
18259
18260 * src/parse-gram.y:
18261
18262 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
18263
18264 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
18265
18266 2002-06-27 Akim Demaille <akim@epita.fr>
18267
18268 * src/options.h, src/options.c: Remove.
18269 * src/getargs.c (short_options, long_options): New.
18270
18271 2002-06-27 Akim Demaille <akim@epita.fr>
18272
18273 * data/bison.simple, data/bison.c++: Rename as...
18274 * data/yacc.c, data/lalr1.cc: these.
18275 * doc/bison.texinfo (Environment Variables): Remove.
18276
18277 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
18278
18279 * src/getargs.c (report_argmatch): Initialize strtok().
18280
18281 2002-06-20 Akim Demaille <akim@epita.fr>
18282
18283 * data/bison.simple (b4_symbol_actions): New, replaces...
18284 (b4_symbol_destructor, b4_symbol_printer): these.
18285 (yysymprint): Be sure to call YYPRINT only for tokens, and using
18286 user token numbers.
18287
18288 2002-06-20 Akim Demaille <akim@epita.fr>
18289
18290 * data/bison.simple (yydestructor): Rename as...
18291 (yydestruct): this.
18292
18293 2002-06-20 Akim Demaille <akim@epita.fr>
18294
18295 * src/symtab.h, src/symtab.c (symbol_type_set)
18296 (symbol_destructor_set, symbol_precedence_set): The location is
18297 the last argument.
18298 Adjust all callers.
18299
18300 2002-06-20 Akim Demaille <akim@epita.fr>
18301
18302 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
18303 internals.
18304 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
18305 Takes a location.
18306 * src/symtab.h, src/symtab.c (symbol_class_set)
18307 (symbol_user_token_number_set): Likewise.
18308 Adjust all callers.
18309 Promote complain_at.
18310 * tests/input.at (Type Clashes): Adjust.
18311
18312 2002-06-20 Akim Demaille <akim@epita.fr>
18313
18314 * data/bison.simple (YYLEX): Fix the declaration when
18315 %pure-parser.
18316
18317 2002-06-20 Akim Demaille <akim@epita.fr>
18318
18319 * data/bison.simple (yysymprint): Don't print the token number,
18320 just its name.
18321 * tests/actions.at (Destructors): Rename as...
18322 (Printers and Destructors): this.
18323 Also exercise %printer.
18324
18325 2002-06-20 Akim Demaille <akim@epita.fr>
18326
18327 * data/bison.simple (YYDSYMPRINT): New.
18328 Use it to remove many of the #if YYDEBUG/if (yydebug).
18329
18330 2002-06-20 Akim Demaille <akim@epita.fr>
18331
18332 * src/symtab.h, src/symtab.c (symbol_t): printer and
18333 printer_location are new members.
18334 (symbol_printer_set): New.
18335 * src/parse-gram.y (PERCENT_PRINTER): New token.
18336 Handle its associated rule.
18337 * src/scan-gram.l: Adjust.
18338 (handle_destructor_at, handle_destructor_dollar): Rename as...
18339 (handle_symbol_code_at, handle_symbol_code_dollar): these.
18340 * src/output.c (symbol_printers_output): New.
18341 (output_skeleton): Call it.
18342 * data/bison.simple (yysymprint): New. Cannot be named yyprint
18343 since there are already many grammar files with a user `yyprint'.
18344 Replace the calls to YYPRINT to calls to yysymprint.
18345 * tests/calc.at: Adjust.
18346 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
18347 taking advantage of parser very internal details (stack size!).
18348
18349 2002-06-20 Akim Demaille <akim@epita.fr>
18350
18351 * src/scan-gram.l: Complete the scanner with the missing patterns
18352 to pacify Flex.
18353 Use `quote' and `symbol_tag_get' where appropriate.
18354
18355 2002-06-19 Akim Demaille <akim@epita.fr>
18356
18357 * tests/actions.at (Destructors): Augment to test locations.
18358 * data/bison.simple (yydestructor): Pass it the current location
18359 if locations are enabled.
18360 Prototype only when __STDC__ or C++.
18361 Change the argument names to move into the yy name space: there is
18362 user code here.
18363
18364 2002-06-19 Akim Demaille <akim@epita.fr>
18365
18366 * data/bison.simple (b4_pure_if): New.
18367 Use it instead of #ifdef YYPURE.
18368
18369 2002-06-19 Akim Demaille <akim@epita.fr>
18370
18371 * data/bison.simple (b4_location_if): New.
18372 Use it instead of #ifdef YYLSP_NEEDED.
18373
18374 2002-06-19 Akim Demaille <akim@epita.fr>
18375
18376 Prepare @$ in %destructor, but currently don't bind it in the
18377 skeleton, as %location use is not cleaned up yet.
18378
18379 * src/scan-gram.l (handle_dollar, handle_destructor_at)
18380 (handle_action_at): New.
18381 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
18382 a braced_code_t and a location as additional arguments.
18383 (handle_destructor_dollar): Instead of requiring `b4_eval', just
18384 unquote one when outputting `b4_dollar_dollar'.
18385 Adjust callers.
18386 * data/bison.simple (b4_eval): Remove.
18387 (b4_symbol_destructor): Adjust.
18388 * tests/input.at (Invalid @n): Adjust.
18389
18390 2002-06-19 Zack Weinberg <zack@codesourcery.com>
18391
18392 * doc/bison.texinfo: Document ability to have multiple
18393 prologue sections.
18394
18395 2002-06-18 Akim Demaille <akim@epita.fr>
18396
18397 * src/files.c (compute_base_names): When computing the output file
18398 names from the input file name, strip the directory part.
18399
18400 2002-06-18 Akim Demaille <akim@epita.fr>
18401
18402 * data/bison.simple.new: Comment changes.
18403 Reported by Andreas Schwab.
18404
18405 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
18406
18407 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
18408 there are no `label `yyoverflowlab' defined but not used' warnings
18409 when yyoverflow is defined.
18410
18411 2002-06-18 Akim Demaille <akim@epita.fr>
18412
18413 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
18414 new member.
18415 (symbol_destructor_set): Adjust.
18416 * src/output.c (symbol_destructors_output): Output the destructor
18417 locations.
18418 Output the symbol name.
18419 * data/bison.simple (b4_symbol_destructor): Adjust.
18420
18421 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
18422 and Akim Demaille <akim@epita.fr>
18423
18424 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
18425 what's left on the stack when the error recovery hits EOF.
18426 * tests/actions.at (Destructors): Complete to exercise this case.
18427
18428 2002-06-17 Akim Demaille <akim@epita.fr>
18429
18430 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
18431 arguments is really empty, not only equal to `[]'.
18432 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
18433 member.
18434 (symbol_destructor_set): New.
18435 * src/output.c (symbol_destructors_output): New.
18436 * src/reader.h (brace_code_t, current_braced_code): New.
18437 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
18438 (handle_dollar): Rename as...
18439 (handle_action_dollar): this.
18440 (handle_destructor_dollar): New.
18441 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
18442 (grammar_declaration): Use it.
18443 * data/bison.simple (yystos): Is always defined.
18444 (yydestructor): New.
18445 * tests/actions.at (Destructors): New.
18446 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
18447
18448 2002-06-17 Akim Demaille <akim@epita.fr>
18449
18450 * src/symlist.h, src/symlist.c (symbol_list_length): New.
18451 * src/scan-gram.l (handle_dollar, handle_at): Compute the
18452 rule_length only when needed.
18453 * src/output.c (actions_output, token_definitions_output): Output
18454 the full M4 block.
18455 * src/symtab.c: Don't access directly to the symbol tag, use
18456 symbol_tag_get.
18457 * src/parse-gram.y: Use symbol_list_free.
18458
18459 2002-06-17 Akim Demaille <akim@epita.fr>
18460
18461 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
18462 (symbol_list_prepend, get_type_name): Move to...
18463 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
18464 (symbol_list_prepend, symbol_list_n_type_name_get): here.
18465 Adjust all callers.
18466 (symbol_list_free): New.
18467 * src/scan-gram.l (handle_dollar): Takes a location.
18468 * tests/input.at (Invalid $n): Adjust.
18469
18470 2002-06-17 Akim Demaille <akim@epita.fr>
18471
18472 * src/reader.h, src/reader.c (symbol_list_new): Export it.
18473 (symbol_list_prepend): New.
18474 * src/parse-gram.y (%union): `list' is a new member.
18475 (symbols.1): New, replaces...
18476 (terms_to_prec.1, nterms_to_type.1): these.
18477 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
18478 Take a location as additional argument.
18479 Adjust all callers.
18480
18481 2002-06-15 Akim Demaille <akim@epita.fr>
18482
18483 * src/parse-gram.y: Move %token in the declaration section so that
18484 we don't depend upon CVS Bison.
18485
18486 2002-06-15 Akim Demaille <akim@epita.fr>
18487
18488 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
18489 * src/print.c (print_core): Use it.
18490
18491 2002-06-15 Akim Demaille <akim@epita.fr>
18492
18493 * src/conflicts.c (log_resolution): Accept the rule involved in
18494 the sr conflicts instead of the lookahead number that points to
18495 that rule.
18496 (flush_reduce): Accept the current lookahead vector as argument,
18497 instead of the index in LA.
18498 (resolve_sr_conflict): Accept the current number of lookahead
18499 bitset to consider for the STATE, instead of the index in LA.
18500 (set_conflicts): Adjust.
18501 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
18502
18503 2002-06-15 Akim Demaille <akim@epita.fr>
18504
18505 * src/state.h (state_t): Replace the `lookaheadsp' member, a
18506 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
18507 Adjust all dependencies.
18508 * src/lalr.c (initialize_lookaheads): Split into...
18509 (states_lookaheads_count, states_lookaheads_initialize): these.
18510 (lalr): Adjust.
18511
18512 2002-06-15 Akim Demaille <akim@epita.fr>
18513
18514 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
18515 out of...
18516 (grammar_rules_print): here.
18517 * src/reduce.c (reduce_output): Use it.
18518 * tests/reduce.at (Useless Rules, Reduced Automaton)
18519 (Underivable Rules): Adjust.
18520
18521 2002-06-15 Akim Demaille <akim@epita.fr>
18522
18523 Copy BYacc's nice way to report the grammar.
18524
18525 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
18526 New.
18527 Don't print the rules' location, it is confusing and useless.
18528 (rule_print): Use grammar_rhs_print.
18529 * src/print.c (print_grammar): Use grammar_rules_print.
18530
18531 2002-06-15 Akim Demaille <akim@epita.fr>
18532
18533 Complete and rationalize `useless thing' warnings.
18534
18535 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
18536 (symbol_tag_print): New.
18537 Use them everywhere in place of accessing directly the tag member.
18538 * src/gram.h, src/gram.c (rule_print): New.
18539 Use it where a rule used to be printed `by hand'.
18540 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
18541 (reduce_grammar_tables): Report the useless rules.
18542 (reduce_print): Useless things are a warning, not an error.
18543 Report it as such.
18544 * tests/reduce.at (Useless Nonterminals, Useless Rules):
18545 (Reduced Automaton, Underivable Rules): Adjust.
18546 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
18547 * tests/conflicts.at (Unresolved SR Conflicts)
18548 (Solved SR Conflicts): Adjust.
18549
18550 2002-06-15 Akim Demaille <akim@epita.fr>
18551
18552 Let symbols have a location.
18553
18554 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
18555 (getsym): Adjust.
18556 Adjust all callers.
18557 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
18558 Use location_t, not int.
18559 * src/symtab.c (symbol_check_defined): Take advantage of the
18560 location.
18561 * tests/regression.at (Invalid inputs): Adjust.
18562
18563 2002-06-15 Akim Demaille <akim@epita.fr>
18564
18565 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
18566 (input): Don't try to initialize yylloc here, do it in the
18567 scanner.
18568 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
18569 * src/gram.h (rule_t): Change line and action_line into location
18570 and action_location, of location_t type.
18571 Adjust all dependencies.
18572 * src/location.h, src/location.c (empty_location): New.
18573 * src/reader.h, src/reader.c (grammar_start_symbol_set)
18574 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
18575 (grammar_current_rule_symbol_append)
18576 (grammar_current_rule_action_append): Expect a location as argument.
18577 * src/reader.c (grammar_midrule_action): Adjust to attach an
18578 action's location as dummy symbol location.
18579 * src/symtab.h, src/symtab.c (startsymbol_location): New.
18580 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
18581 the line numbers.
18582
18583 2002-06-14 Akim Demaille <akim@epita.fr>
18584
18585 Grammar declarations may be found in the grammar section.
18586
18587 * src/parse-gram.y (rules_or_grammar_declaration): New.
18588 (declarations): Each declaration may end with a semicolon, not
18589 just...
18590 (grammar_declaration): `"%union"'.
18591 (grammar): Branch to rules_or_grammar_declaration.
18592
18593 2002-06-14 Akim Demaille <akim@epita.fr>
18594
18595 * src/main.c (main): Invoke scanner_free.
18596
18597 2002-06-14 Akim Demaille <akim@epita.fr>
18598
18599 * src/output.c (m4_invoke): Extracted from...
18600 (output_skeleton): here.
18601 Free tempfile.
18602
18603 2002-06-14 Akim Demaille <akim@epita.fr>
18604
18605 * src/parse-gram.y (directives, directive, gram)
18606 (grammar_directives, precedence_directives, precedence_directive):
18607 Rename as...
18608 (declarations, declaration, grammar, grammar_declaration)
18609 (precedence_declaration, precedence_declarator): these.
18610 (symbol_declaration): New.
18611
18612 2002-06-14 Akim Demaille <akim@epita.fr>
18613
18614 * src/files.c (action_obstack): Remove, unused.
18615 (output_obstack): Remove it, and all its dependencies, as it is no
18616 longer needed.
18617 * src/reader.c (epilogue_set): Build the epilogue in the
18618 muscle_obstack.
18619 * src/output.h, src/output.c (muscle_obstack): Move to...
18620 * src/muscle_tab.h, src/muscle_tab.h: here.
18621 (muscle_init): Initialize muscle_obstack.
18622 (muscle_free): New.
18623 * src/main.c (main): Call it.
18624
18625 2002-06-14 Akim Demaille <akim@epita.fr>
18626
18627 * src/location.h: New, extracted from...
18628 * src/reader.h: here.
18629 * src/Makefile.am (noinst_HEADERS): Merge into
18630 (bison_SOURCES): this.
18631 Add location.h.
18632 * src/parse-gram.y: Use location_t instead of Bison's.
18633 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
18634 Use location_t instead of ints.
18635
18636 2002-06-14 Akim Demaille <akim@epita.fr>
18637
18638 * data/bison.simple, data/bison.c++: Be sure to restore the
18639 current #line when returning to the skeleton contents after having
18640 exposed the input file's #line.
18641
18642 2002-06-12 Akim Demaille <akim@epita.fr>
18643
18644 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
18645 eager.
18646 * tests/actions.at (Exotic Dollars): New.
18647
18648 2002-06-12 Akim Demaille <akim@epita.fr>
18649
18650 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
18651 ['"/] too eagerly.
18652 * tests/input.at (Torturing the Scanner): New.
18653
18654 2002-06-11 Akim Demaille <akim@epita.fr>
18655
18656 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
18657 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
18658 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
18659 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
18660 * src/reader.c (reader): Use it.
18661
18662 2002-06-11 Akim Demaille <akim@epita.fr>
18663
18664 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
18665 Adjust all callers.
18666 (scanner_last_string_free): New.
18667
18668 2002-06-11 Akim Demaille <akim@epita.fr>
18669
18670 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
18671 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
18672 (last_string, YY_OBS_FREE): New.
18673 Use them when returning an ID.
18674
18675 2002-06-11 Akim Demaille <akim@epita.fr>
18676
18677 Have Bison grammars parsed by a Bison grammar.
18678
18679 * src/reader.c, src/reader.h (prologue_augment): New.
18680 * src/reader.c (copy_definition): Remove.
18681
18682 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
18683 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
18684 (grammar_current_rule_prec_set, grammar_current_rule_check)
18685 (grammar_current_rule_symbol_append)
18686 (grammar_current_rule_action_append): Export.
18687 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
18688 (symbol_list_action_append): Remove.
18689 Hook the routines from reader.
18690 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
18691 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
18692
18693 * src/reader.c (read_declarations): Remove, unused.
18694
18695 * src/parse-gram.y: Handle the epilogue.
18696 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
18697 (grammar_start_symbol_set): this.
18698 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
18699 * src/reader.c (readgram): Remove, unused.
18700 (reader): Adjust to insert eoftoken and axiom where appropriate.
18701
18702 * src/reader.c (copy_dollar): Replace with...
18703 * src/scan-gram.h (handle_dollar): this.
18704 * src/parse-gram.y: Remove `%thong'.
18705
18706 * src/reader.c (copy_at): Replace with...
18707 * src/scan-gram.h (handle_at): this.
18708
18709 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
18710 New.
18711
18712 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
18713 time being.
18714
18715 * src/reader.h, src/reader.c (grammar_rule_end): New.
18716
18717 * src/parse.y (current_type, current_class): New.
18718 Implement `%nterm', `%token' support.
18719 Merge `%term' into `%token'.
18720 (string_as_id): New.
18721 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
18722 type name.
18723
18724 * src/parse-gram.y: Be sure to handle properly the beginning of
18725 rules.
18726
18727 * src/parse-gram.y: Handle %type.
18728 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
18729
18730 * src/parse-gram.y: More directives support.
18731 * src/options.c: No longer handle source directives.
18732
18733 * src/parse-gram.y: Fix %output.
18734
18735 * src/parse-gram.y: Handle %union.
18736 Use the prologue locations.
18737 * src/reader.c (parse_union_decl): Remove.
18738
18739 * src/reader.h, src/reader.c (epilogue_set): New.
18740 * src/parse-gram.y: Use it.
18741
18742 * data/bison.simple, data/bison.c++: b4_stype is now either not
18743 defined, then default to int, or to the contents of %union,
18744 without `union' itself.
18745 Adjust.
18746 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
18747
18748 * src/output.c (actions_output): Don't output braces, as they are
18749 already handled by the scanner.
18750
18751 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
18752 characters to themselves.
18753
18754 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
18755 that the epilogue has a proper #line.
18756
18757 * src/parse-gram.y: Handle precedence/associativity.
18758
18759 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
18760 a terminal.
18761 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
18762 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
18763 at all to define terminals that cannot be emitted.
18764
18765 * src/scan-gram.l: Escape M4 characters.
18766
18767 * src/scan-gram.l: Working properly with escapes in user
18768 strings/characters.
18769
18770 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
18771 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
18772 grammar.
18773 Use more modest sizes, as for the time being the parser does not
18774 release memory, and therefore the process swallows a huge amount
18775 of memory.
18776
18777 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
18778 stricter %token grammar.
18779
18780 * src/symtab.h (associativity): Add `undef_assoc'.
18781 (symbol_precedence_set): Do nothing when passed an undef_assoc.
18782 * src/symtab.c (symbol_check_alias_consistence): Adjust.
18783
18784 * tests/regression.at (Invalid %directive): Remove, as it is now
18785 meaningless.
18786 (Invalid inputs): Adjust to the new error messages.
18787 (Token definitions): The new grammar doesn't allow too many
18788 eccentricities.
18789
18790 * src/lex.h, src/lex.c: Remove.
18791 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
18792 (copy_character, copy_string2, copy_string, copy_identifier)
18793 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
18794 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
18795 (parse_action): Remove.
18796 * po/POTFILES.in: Adjust.
18797
18798 2002-06-11 Akim Demaille <akim@epita.fr>
18799
18800 * src/reader.c (parse_action): Don't store directly into the
18801 rule's action member: return the action as a string.
18802 Don't require `rule_length' as an argument: compute it.
18803 (grammar_current_rule_symbol_append)
18804 (grammar_current_rule_action_append): New, eved out from
18805 (readgram): here.
18806 Remove `action_flag', `rulelength', unused now.
18807
18808 2002-06-11 Akim Demaille <akim@epita.fr>
18809
18810 * src/reader.c (grammar_current_rule_prec_set).
18811 (grammar_current_rule_check): New, eved out from...
18812 (readgram): here.
18813 Remove `xaction', `first_rhs': useless.
18814 * tests/input.at (Type clashes): New.
18815 * tests/existing.at (GNU Cim Grammar): Adjust.
18816
18817 2002-06-11 Akim Demaille <akim@epita.fr>
18818
18819 * src/reader.c (grammar_midrule_action): New, Eved out from
18820 (readgram): here.
18821
18822 2002-06-11 Akim Demaille <akim@epita.fr>
18823
18824 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
18825 New.
18826 (readgram): Use them as replacement of inlined code, crule and
18827 crule1.
18828
18829 2002-06-11 Akim Demaille <akim@epita.fr>
18830
18831 * src/reader.c (grammar_end, grammar_symbol_append): New.
18832 (readgram): Use them.
18833 Make the use of `p' as local as possible.
18834
18835 2002-06-10 Akim Demaille <akim@epita.fr>
18836
18837 GCJ's parser requires the tokens to be defined before the prologue.
18838
18839 * data/bison.simple: Output the token definition before the user's
18840 prologue.
18841 * tests/regression.at (Braces parsing, Duplicate string)
18842 (Mixing %token styles): Check the output from bison.
18843 (Early token definitions): New.
18844
18845 2002-06-10 Akim Demaille <akim@epita.fr>
18846
18847 * src/symtab.c (symbol_user_token_number_set): Don't complain when
18848 assigning twice the same user number to a token, so that we can
18849 use it in...
18850 * src/lex.c (lex): here.
18851 Also use `symbol_class_set' instead of hand written code.
18852 * src/reader.c (parse_assoc_decl): Likewise.
18853
18854 2002-06-10 Akim Demaille <akim@epita.fr>
18855
18856 * src/symtab.c, src/symtab.c (symbol_class_set)
18857 (symbol_user_token_number_set): New.
18858 * src/reader.c (parse_token_decl): Use them.
18859 Use a switch instead of ifs.
18860 Use a single argument.
18861
18862 2002-06-10 Akim Demaille <akim@epita.fr>
18863
18864 Remove `%thong' support as it is undocumented, unused, duplicates
18865 `%token's job, and creates useless e-mail traffic with people who
18866 want to know what it is, why it is undocumented, unused, and
18867 duplicates `%token's job.
18868
18869 * src/reader.c (parse_thong_decl): Remove.
18870 * src/options.c (option_table): Remove "thong".
18871 * src/lex.h (tok_thong): Remove.
18872
18873 2002-06-10 Akim Demaille <akim@epita.fr>
18874
18875 * src/symtab.c, src/symtab.c (symbol_type_set)
18876 (symbol_precedence_set): New.
18877 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
18878 (value_components_used): Remove, unused.
18879
18880 2002-06-09 Akim Demaille <akim@epita.fr>
18881
18882 Move symbols handling code out of the reader.
18883
18884 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
18885 (axiom): Move to...
18886 * src/symtab.h, src/symtab.c: here.
18887
18888 * src/gram.c (start_symbol): Remove: use startsymbol->number.
18889 * src/reader.c (startval): Rename as...
18890 * src/symtab.h, src/symtab.c (startsymbol): this.
18891 * src/reader.c: Adjust.
18892
18893 * src/reader.c (symbol_check_defined, symbol_make_alias)
18894 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
18895 (token_translations_init)
18896 Move to...
18897 * src/symtab.c: here.
18898 * src/reader.c (packsymbols): Move to...
18899 * src/symtab.h, src/symtab.c (symbols_pack): here.
18900 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
18901 argument.
18902
18903 2002-06-03 Akim Demaille <akim@epita.fr>
18904
18905 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
18906 then statements.
18907
18908 2002-06-03 Akim Demaille <akim@epita.fr>
18909
18910 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
18911 structs with non literals.
18912 * src/scan-skel.l: never-interactive.
18913 * src/conflicts.c (enum conflict_resolution_e): No trailing
18914 comma.
18915 * src/getargs.c (usage): Split long literal strings.
18916 Reported by Hans Aberg.
18917
18918 2002-05-28 Akim Demaille <akim@epita.fr>
18919
18920 * data/bison.c++: Use C++ ostreams.
18921 (cdebug_): New member.
18922
18923 2002-05-28 Akim Demaille <akim@epita.fr>
18924
18925 * src/output.c (output_skeleton): Be sure to allocate enough room
18926 for `/' _and_ for `\0' in full_skeleton.
18927
18928 2002-05-28 Akim Demaille <akim@epita.fr>
18929
18930 * data/bison.c++: Catch up with bison.simple:
18931 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18932 and Paul Eggert <eggert@twinsun.com>: `error' handing.
18933 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
18934 and popping traces.
18935
18936 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18937
18938 * src/output.c (output_skeleton): Put an explicit path in front of
18939 the skeleton file name, rather than relying on the -I directory,
18940 to partially alleviate effects of having a skeleton file lying around
18941 in the current directory.
18942
18943 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18944
18945 * src/conflicts.c (log_resolution): Correct typo:
18946 obstack_printf should be obstack_fgrow1.
18947
18948 2002-05-26 Akim Demaille <akim@epita.fr>
18949
18950 * src/state.h (state_t): `solved_conflicts' is a new member.
18951 * src/LR0.c (new_state): Set it to 0.
18952 * src/conflicts.h, src/conflicts.c (print_conflicts)
18953 (free_conflicts, solve_conflicts): Rename as...
18954 (conflicts_print, conflicts_free, conflicts_solve): these.
18955 Adjust callers.
18956 * src/conflicts.c (enum conflict_resolution_e)
18957 (solved_conflicts_obstack): New, used by...
18958 (log_resolution): this.
18959 Adjust to attach the conflict resolution to each state.
18960 Complete the description with the precedence/associativity
18961 information.
18962 (resolve_sr_conflict): Adjust.
18963 * src/print.c (print_state): Output its solved_conflicts.
18964 * tests/conflicts.at (Unresolved SR Conflicts)
18965 (Solved SR Conflicts): Exercise --report=all.
18966
18967 2002-05-26 Akim Demaille <akim@epita.fr>
18968
18969 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
18970 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
18971 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
18972 (token_number_t, item_number_as_token_number)
18973 (token_number_as_item_number, muscle_insert_token_number_table):
18974 Rename as...
18975 (symbol_number_t, item_number_as_symbol_number)
18976 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
18977 these, since it is more appropriate.
18978
18979 2002-05-26 Akim Demaille <akim@epita.fr>
18980
18981 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
18982 `Error:' lines.
18983 * data/bison.simple (yystos) [YYDEBUG]: New.
18984 (yyparse) [YYDEBUG]: Display the symbols which are popped during
18985 error recovery.
18986 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
18987
18988 2002-05-25 Akim Demaille <akim@epita.fr>
18989
18990 * doc/bison.texinfo (Debugging): Split into...
18991 (Tracing): this new section, its former contents, and...
18992 (Understanding): this new section.
18993 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
18994 by...
18995 (report_flag): this.
18996 Adjust all dependencies.
18997 (report_args, report_types, report_argmatch): New.
18998 (usage, getargs): Report/support -r, --report.
18999 * src/options.h
19000 (struct option_table_struct): Rename as..,
19001 (struct option_table_s): this.
19002 Rename the `set_flag' member to `flag' to match with getopt_long's
19003 struct.
19004 * src/options.c (option_table): Split verbose into an entry for
19005 %verbose, and another for --verbose.
19006 Support --report/-r, so remove -r from the obsolete --raw.
19007 * src/print.c: Attach full item sets and lookaheads reports to
19008 report_flag instead of trace_flag.
19009 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
19010
19011 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19012 and Paul Eggert <eggert@twinsun.com>
19013
19014 * data/bison.simple (yyparse): Correct error handling to conform to
19015 POSIX and yacc. Specifically, after syntax error is discovered,
19016 do not reduce further before shifting the error token.
19017 Clean up the code a bit by removing the labels yyerrdefault,
19018 yyerrhandle, yyerrpop.
19019 * NEWS: Document the above.
19020
19021 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19022
19023 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
19024 type; it isn't always big enough, since it doesn't necessarily
19025 include non-terminals.
19026 (yytranslate): Expand definition of yy_token_number_type, so that
19027 the latter can be removed.
19028 (yy_token_number_type): Remove, only one use.
19029 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
19030 don't use TokenNumberType as element type.
19031
19032 * tests/regression.at: Modify expected output to agree with change
19033 to yyr1 and yytranslate.
19034
19035 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
19036
19037 * src/reader.c (parse_action): Use copy_character instead of
19038 obstack_1grow.
19039
19040 2002-05-13 Akim Demaille <akim@epita.fr>
19041
19042 * tests/regression.at (Token definitions): Prototype yylex and
19043 yyerror.
19044
19045 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19046
19047 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
19048 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
19049 32-bit arithmetic.
19050 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
19051
19052 2002-05-07 Akim Demaille <akim@epita.fr>
19053
19054 * tests/synclines.at: Be sure to prototype yylex and yyerror to
19055 avoid GCC warnings.
19056
19057 2002-05-07 Akim Demaille <akim@epita.fr>
19058
19059 Kill GCC warnings.
19060
19061 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
19062 over the RHS of each rule.
19063 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
19064 * src/state.h (state_t): Member `nitems' is unsigned short.
19065 * src/LR0.c (get_state): Adjust.
19066 * src/reader.c (packgram): Likewise.
19067 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
19068 `Type'.
19069 (muscle_insert_int_table): Remove, unused.
19070 (prepare_rules): Remove `max'.
19071
19072 2002-05-06 Akim Demaille <akim@epita.fr>
19073
19074 * src/closure.c (print_firsts): Display of the symbol tags.
19075 (bitmatrix_print): Move to...
19076 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
19077 here.
19078 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
19079
19080 2002-05-06 Akim Demaille <akim@epita.fr>
19081
19082 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
19083 hash_do_for_each.
19084
19085 2002-05-06 Akim Demaille <akim@epita.fr>
19086
19087 * src/LR0.c (new_state, get_state): Instead of using the global
19088 `kernel_size' and `kernel_base', have two new arguments:
19089 `core_size' and `core'.
19090 Adjust callers.
19091
19092 2002-05-06 Akim Demaille <akim@epita.fr>
19093
19094 * src/reader.c (packgram): No longer end `ritem' with a 0
19095 sentinel: it is not used.
19096
19097 2002-05-05 Akim Demaille <akim@epita.fr>
19098
19099 New experimental feature: display the lookaheads in the report and
19100 graph.
19101
19102 * src/print (print_core): When --trace-flag, display the rules
19103 lookaheads.
19104 * src/print_graph.c (print_core): Likewise.
19105 Swap the arguments.
19106 Adjust caller.
19107
19108 2002-05-05 Akim Demaille <akim@epita.fr>
19109
19110 * tests/torture.at (Many lookaheads): New test.
19111
19112 2002-05-05 Akim Demaille <akim@epita.fr>
19113
19114 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
19115 (GENERATE_MUSCLE_INSERT_TABLE): this.
19116 (output_int_table, output_unsigned_int_table, output_short_table)
19117 (output_token_number_table, output_item_number_table): Replace with...
19118 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
19119 (muscle_insert_short_table, muscle_insert_token_number_table)
19120 (muscle_insert_item_number_table): these.
19121 Adjust all callers.
19122 (prepare_tokens): Don't free `translations', since...
19123 * src/reader.h, src/reader.c (grammar_free): do it.
19124 Move to...
19125 * src/gram.h, src/gram.c (grammar_free): here.
19126 * data/bison.simple, data/bison.c++: b4_token_number_max is now
19127 b4_translate_max.
19128
19129 2002-05-05 Akim Demaille <akim@epita.fr>
19130
19131 * src/output.c (output_unsigned_int_table): New.
19132 (prepare_rules): `i' is unsigned.
19133 `prhs', `rline', `r2' are unsigned int.
19134 Rename muscle `rhs_number_max' as `rhs_max'.
19135 Output muscles `prhs_max', `rline_max', and `r2_max'.
19136 Free rline and r1.
19137 * data/bison.simple, data/bison.c++: Adjust to use these muscles
19138 to compute types instead of constant types.
19139 * tests/regression.at (Web2c Actions): Adjust.
19140
19141 2002-05-04 Akim Demaille <akim@epita.fr>
19142
19143 * src/symtab.h (SALIAS, SUNDEF): Rename as...
19144 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
19145 Adjust dependencies.
19146 * src/output.c (token_definitions_output): Be sure not to output a
19147 `#define 'a'' when fed with `%token 'a' "a"'.
19148 * tests/regression.at (Token definitions): New.
19149
19150 2002-05-03 Paul Eggert <eggert@twinsun.com>
19151
19152 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
19153 for K&R C.
19154
19155 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
19156
19157 * Makefile.am (SUBDIRS): Remove intl.
19158 (EXTRA_DIST): Add config/config.rpath.
19159
19160 2002-05-03 Akim Demaille <akim@epita.fr>
19161
19162 * data/bison.simple (m4_if): Don't output empty enums.
19163 And actually, output valid enum definitions :(.
19164
19165 2002-05-03 Akim Demaille <akim@epita.fr>
19166
19167 * configure.bat: Remove, completely obsolete.
19168 * Makefile.am (EXTRA_DIST): Adjust.
19169 Don't distribute config.rpath...
19170 * config/Makefile.am (EXTRA_DIST): Do it.
19171
19172 2002-05-03 Akim Demaille <akim@epita.fr>
19173
19174 * configure.in (GETTEXT_VERSION): New.
19175 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
19176
19177 2002-05-03 Akim Demaille <akim@epita.fr>
19178
19179 * data/bison.simple (b4_token_enum): New.
19180 (b4_token_defines): Use it to output tokens both as #define and
19181 enums.
19182 Suggested by Paul Eggert.
19183 * src/output.c (token_definitions_output): Don't output spurious
19184 white spaces.
19185
19186 2002-05-03 Akim Demaille <akim@epita.fr>
19187
19188 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
19189
19190 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
19191
19192 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
19193 Update the stack class, give a try to deque as the default container.
19194
19195 2002-05-02 Akim Demaille <akim@epita.fr>
19196
19197 * data/bison.simple (yyparse): Do not implement @$ = @1.
19198 (YYLLOC_DEFAULT): Adjust to do it.
19199 * doc/bison.texinfo (Location Default Action): Fix.
19200
19201 2002-05-02 Akim Demaille <akim@epita.fr>
19202
19203 * src/reader.c (parse_braces): Merge into...
19204 (parse_action): this.
19205
19206 2002-05-02 Akim Demaille <akim@epita.fr>
19207
19208 * configure.in (ALL_LINGUAS): Remove.
19209 * po/LINGUAS, hr.po: New.
19210
19211 2002-05-02 Akim Demaille <akim@epita.fr>
19212
19213 Remove the so called hairy (semantic) parsers.
19214
19215 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
19216 * src/gram.h, src/gram.c (semantic_parser): Remove.
19217 (rule_t): Remove the guard and guard_line members.
19218 * src/lex.h (token_t): remove tok_guard.
19219 * src/options.c (option_table): Remove %guard and %semantic_parser
19220 support.
19221 * src/output.c, src/output.h (guards_output): Remove.
19222 (prepare): Adjust.
19223 (token_definitions_output): Don't output the `T'
19224 tokens (???).
19225 (output_skeleton): Don't output the guards.
19226 * src/files.c, src/files.c (attrsfile): Remove.
19227 * src/reader.c (symbol_list): Remove the guard and guard_line
19228 members.
19229 Adjust dependencies.
19230 (parse_guard): Remove.
19231 * data/bison.hairy: Remove.
19232 * doc/bison.texinfo (Environment Variables): Remove occurrences of
19233 BISON_HAIRY.
19234
19235 2002-05-02 Akim Demaille <akim@epita.fr>
19236
19237 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
19238 (parse_guard): Rename the formal argument `stack_offset' as
19239 `rule_length', which is more readable.
19240 Adjust callers.
19241 (copy_at, copy_dollar): Instead of outputting the hard coded
19242 values of $$, $n and so forth, output invocation to b4_lhs_value,
19243 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
19244 Note: this patch partially drops `semantic-parser' support: it
19245 always does `rule_length - n', where semantic parsers ought to
19246 always use `-n'.
19247 * data/bison.simple, data/bison.c++ (b4_lhs_value)
19248 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
19249
19250 2002-05-02 Akim Demaille <akim@epita.fr>
19251
19252 * configure.in (AC_INIT): Bump to 1.49b.
19253 (AM_INIT_AUTOMAKE): Short invocation.
19254
19255 2002-05-02 Akim Demaille <akim@epita.fr>
19256
19257 Version 1.49a.
19258
19259 2002-05-01 Akim Demaille <akim@epita.fr>
19260
19261 * src/skeleton.h: Remove.
19262
19263 2002-05-01 Akim Demaille <akim@epita.fr>
19264
19265 * src/skeleton.h: Fix the #endif.
19266 Reported by Magnus Fromreide.
19267
19268 2002-04-26 Paul Eggert <eggert@twinsun.com>
19269
19270 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
19271 Define if we define YYSTYPE and YYLTYPE, respectively.
19272 (YYCOPY): Fix [] quoting problem in the non-GCC case.
19273
19274 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
19275
19276 * src/scan-skel.l: Postprocess quadrigraphs.
19277
19278 * src/reader.c (copy_character): New function, used to output
19279 single characters while replacing `[' and `]' with quadrigraphs, to
19280 avoid troubles with M4 quotes.
19281 (copy_comment): Output characters with copy_character.
19282 (read_additionnal_code): Likewise.
19283 (copy_string2): Likewise.
19284 (copy_definition): Likewise.
19285
19286 * tests/calc.at: Exercise M4 quoting.
19287
19288 2002-04-25 Akim Demaille <akim@epita.fr>
19289
19290 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
19291 between `!' and the command.
19292 Reported by Paul Eggert.
19293
19294 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
19295
19296 * tests/calc.at: Exercise prologue splitting.
19297
19298 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
19299 `b4_post_prologue' instead of `b4_prologue'.
19300
19301 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
19302 muscles.
19303 (output): Free pre_prologue_obstack and post_prologue_obstack.
19304 * src/files.h, src/files.c (attrs_obstack): Remove.
19305 (pre_prologue_obstack, post_prologue_obstack): New.
19306 * src/reader.c (copy_definition): Add a parameter to specify the
19307 obstack to fill, instead of using attrs_obstack unconditionally.
19308 (read_declarations): Pass pre_prologue_obstack to copy_definition if
19309 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
19310
19311 2002-04-23 Paul Eggert <eggert@twinsun.com>
19312
19313 * data/bison.simple: Remove unnecessary commentary and white
19314 space differences from 1_29-branch.
19315 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
19316
19317 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
19318 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
19319 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
19320 constructors or destructors.
19321
19322 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
19323
19324 2002-04-23 Akim Demaille <akim@epita.fr>
19325
19326 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
19327 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
19328 location with columns.
19329 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
19330 All reported by Paul Eggert.
19331
19332 2002-04-22 Akim Demaille <akim@epita.fr>
19333
19334 * src/reduce.c (dump_grammar): Move to...
19335 * src/gram.h, src/gram.c (grammar_dump): here.
19336 Be sure to separate long item numbers.
19337 Don't read the members of a rule's prec if its nil.
19338
19339 2002-04-22 Akim Demaille <akim@epita.fr>
19340
19341 * src/output.c (table_size, table_grow): New.
19342 (MAXTABLE): Remove, replace uses with table_size.
19343 (pack_vector): Instead of dying when the table is too big, grow it.
19344
19345 2002-04-22 Akim Demaille <akim@epita.fr>
19346
19347 * data/bison.simple (yyr1): Its type is that of a token number.
19348 * data/bison.c++ (r1_): Likewise.
19349 * tests/regression.at (Web2c Actions): Adjust.
19350
19351 2002-04-22 Akim Demaille <akim@epita.fr>
19352
19353 * src/reader.c (token_translations_init): 256 is now the default
19354 value for the error token, i.e., it will be assigned another
19355 number if the user assigned 256 to one of her tokens.
19356 (reader): Don't force 256 to error.
19357 * doc/bison.texinfo (Symbols): Adjust.
19358 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
19359 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
19360 etc. instead of 10, 20, 30 (which was used to `jump' over error
19361 (256) and undefined (2)).
19362
19363 2002-04-22 Akim Demaille <akim@epita.fr>
19364
19365 Propagate more token_number_t.
19366
19367 * src/gram.h (token_number_as_item_number)
19368 (item_number_as_token_number): New.
19369 * src/output.c (GENERATE_OUTPUT_TABLE): New.
19370 Use it to create output_item_number_table and
19371 output_token_number_table.
19372 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
19373 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
19374 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
19375 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
19376
19377 2002-04-22 Akim Demaille <akim@epita.fr>
19378
19379 * src/output.h, src/output.c (get_lines_number): Remove.
19380
19381 2002-04-19 Akim Demaille <akim@epita.fr>
19382
19383 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
19384 as Lex/Flex'.
19385 (Debugging): More details about enabling the debugging features.
19386 (Table of Symbols): Describe $$, $n, @$, and @n.
19387 Suggested by Tim Josling.
19388
19389 2002-04-19 Akim Demaille <akim@epita.fr>
19390
19391 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
19392
19393 2002-04-10 Akim Demaille <akim@epita.fr>
19394
19395 * src/system.h: Rely on HAVE_LIMITS_H.
19396 Suggested by Paul Eggert.
19397
19398 2002-04-09 Akim Demaille <akim@epita.fr>
19399
19400 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
19401 full stderr, and strip it according to the bison options, instead
19402 of composing the error message from different bits.
19403 This makes it easier to check for several error messages.
19404 Adjust all the invocations.
19405 Add an invocation exercising the error token.
19406 Add an invocation demonstrating a stupid error message.
19407 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
19408 Adjust the tests.
19409 Error message are for stderr, not stdout.
19410
19411 2002-04-09 Akim Demaille <akim@epita.fr>
19412
19413 * src/gram.h, src/gram.c (error_token_number): Remove, use
19414 errtoken->number.
19415 * src/reader.c (reader): Don't specify the user token number (2)
19416 for $undefined, as it uselessly prevents using it.
19417 * src/gram.h (token_number_t): Move to...
19418 * src/symtab.h: here.
19419 (state_t.number): Is a token_number_t.
19420 * src/print.c, src/reader.c: Use undeftoken->number instead of
19421 hard coded 2.
19422 (Even though this 2 is not the same as above: the number of the
19423 undeftoken remains being 2, it is its user token number which
19424 might not be 2).
19425 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
19426 `user_token_number_max'.
19427 Output `undef_token_number'.
19428 * data/bison.simple, data/bison.c++: Use them.
19429 Be sure to map invalid yylex return values to
19430 `undef_token_number'. This saves us from gratuitous SEGV.
19431
19432 * tests/conflicts.at (Solved SR Conflicts)
19433 (Unresolved SR Conflicts): Adjust.
19434 * tests/regression.at (Web2c Actions): Adjust.
19435
19436 2002-04-08 Akim Demaille <akim@epita.fr>
19437
19438 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
19439 Adding #line.
19440 Remove the duplicate `typedefs'.
19441 (RhsNumberType): Fix the declaration and various other typos.
19442 Use __ofile__.
19443 * data/bison.simple: Use __ofile__.
19444 * src/scan-skel.l: Handle __ofile__.
19445
19446 2002-04-08 Akim Demaille <akim@epita.fr>
19447
19448 * src/gram.h (item_number_t): New, the type of item numbers in
19449 RITEM. Note that it must be able to code symbol numbers as
19450 positive number, and the negation of rule numbers as negative
19451 numbers.
19452 Adjust all dependencies (pretty many).
19453 * src/reduce.c (rule): Remove this `short *' pointer: use
19454 item_number_t.
19455 * src/system.h (MINSHORT, MAXSHORT): Remove.
19456 Include `limits.h'.
19457 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
19458 (shortcpy): Remove.
19459 (MAXTABLE): Move to...
19460 * src/output.c (MAXTABLE): here.
19461 (prepare_rules): Use output_int_table to output rhs.
19462 * data/bison.simple, data/bison.c++: Adjust.
19463 * tests/torture.at (Big triangle): Move the limit from 254 to
19464 500.
19465 * tests/regression.at (Web2c Actions): Ajust.
19466
19467 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
19468 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
19469 passes, but produces negative #line number, once fixed, GCC is
19470 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
19471 C), it passes.
19472 * src/state.h (state_h): Code input lines on ints, not shorts.
19473
19474 2002-04-08 Akim Demaille <akim@epita.fr>
19475
19476 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
19477 and then the grammar.
19478
19479 2002-04-08 Akim Demaille <akim@epita.fr>
19480
19481 * src/system.h: No longer using strndup.
19482
19483 2002-04-07 Akim Demaille <akim@epita.fr>
19484
19485 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
19486 * src/output.c (output_table_data): Return the longest number.
19487 (prepare_tokens): Output `token_number_max').
19488 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
19489 New.
19490 Use them to define yy_token_number_type/TokenNumberType.
19491 Use this type for yytranslate.
19492 * tests/torture.at (Big triangle): Push the limit from 124 to
19493 253.
19494 * tests/regression.at (Web2c Actions): Adjust.
19495
19496 2002-04-07 Akim Demaille <akim@epita.fr>
19497
19498 * tests/torture.at (Big triangle): New.
19499 (GNU AWK Grammar, GNU Cim Grammar): Move to...
19500 * tests/existing.at: here.
19501
19502 2002-04-07 Akim Demaille <akim@epita.fr>
19503
19504 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
19505 nritems.
19506 Adjust dependencies.
19507
19508 2002-04-07 Akim Demaille <akim@epita.fr>
19509
19510 * src/reader.c: Normalize increments to prefix form.
19511
19512 2002-04-07 Akim Demaille <akim@epita.fr>
19513
19514 * src/reader.c, symtab.c: Remove debugging code.
19515
19516 2002-04-07 Akim Demaille <akim@epita.fr>
19517
19518 Rename all the `bucket's as `symbol_t'.
19519
19520 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
19521 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
19522 * src/symtab.c, src/symtab.h (bucket): Rename as...
19523 (symbol_t): this.
19524 (symbol_list_new, bucket_check_defined, bucket_make_alias)
19525 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
19526 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
19527 (buckets_new, buckets_free, buckets_do): Rename as...
19528 (symbol_list_new, symbol_check_defined, symbol_make_alias)
19529 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
19530 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
19531 (symbols_new, symbols_free, symbols_do): these.
19532
19533 2002-04-07 Akim Demaille <akim@epita.fr>
19534
19535 Use lib/hash for the symbol table.
19536
19537 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
19538 EOF.
19539 * src/lex.c (lex): Set the `number' member of new terminals.
19540 * src/reader.c (bucket_check_defined, bucket_make_alias)
19541 (bucket_check_alias_consistence, bucket_translation): New.
19542 (reader, grammar_free, readgram, token_translations_init)
19543 (packsymbols): Adjust.
19544 (reader): Number the predefined tokens.
19545 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
19546 for predefined tokens.
19547 * src/symtab.h (bucket): Remove all the hash table related
19548 members.
19549 * src/symtab.c (symtab): Replace by...
19550 (bucket_table): this.
19551 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
19552 (buckets_new, buckets_do): New.
19553
19554 2002-04-07 Akim Demaille <akim@epita.fr>
19555
19556 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
19557 (start_symbol, max_user_token_number, semantic_parser)
19558 (error_token_number): Initialize.
19559 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
19560 Initialize.
19561 (reader): Don't.
19562 (errtoken, eoftoken, undeftoken, axiom): Extern.
19563
19564 2002-04-07 Akim Demaille <akim@epita.fr>
19565
19566 * src/gram.h (rule_s): prec and precsym are now pointers
19567 to the bucket giving the priority/associativity.
19568 Member `associativity' removed: useless.
19569 * src/reduce.c, src/conflicts.c: Adjust.
19570
19571 2002-04-07 Akim Demaille <akim@epita.fr>
19572
19573 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
19574 Properly escape the symbols' TAG when outputting them.
19575
19576 2002-04-07 Akim Demaille <akim@epita.fr>
19577
19578 * src/lalr.h (LA): Is a bitsetv, not bitset*.
19579
19580 2002-04-07 Akim Demaille <akim@epita.fr>
19581
19582 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
19583 (LArule): this, which is an array to rule_t*.
19584 * src/print.c, src/conflicts.c: Adjust.
19585
19586 2002-04-07 Akim Demaille <akim@epita.fr>
19587
19588 * src/gram.h (rule_t): Rename `number' as `user_number'.
19589 `number' is a new member.
19590 Adjust dependencies.
19591 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
19592
19593 2002-04-07 Akim Demaille <akim@epita.fr>
19594
19595 As a result of the previous patch, it is no longer needed
19596 to reorder ritem itself.
19597
19598 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
19599
19600 2002-04-07 Akim Demaille <akim@epita.fr>
19601
19602 Be sure never to walk through RITEMS, but use only data related to
19603 the rules themselves. RITEMS should be banished.
19604
19605 * src/output.c (output_token_translations): Rename as...
19606 (prepare_tokens): this.
19607 In addition to `translate', prepare the muscles `tname' and
19608 `toknum', which were handled by...
19609 (output_rule_data): this.
19610 Remove, and move the remainder of its outputs into...
19611 (prepare_rules): this new routines, which also merges content from
19612 (output_gram): this.
19613 (prepare_rules): Be sure never to walk through RITEMS.
19614 (output_stos): Rename as...
19615 (prepare_stos): this.
19616 (output): Always invoke prepare_states, after all, just don't use it
19617 in the output if you don't need it.
19618
19619 2002-04-07 Akim Demaille <akim@epita.fr>
19620
19621 * src/LR0.c (new_state): Display `nstates' as the name of the
19622 newly created state.
19623 Adjust to initialize first_state and last_state if needed.
19624 Be sure to distinguish the initial from the final state.
19625 (new_states): Create the itemset of the initial state, and use
19626 new_state.
19627 * src/closure.c (closure): Now that the initial state has its
19628 items properly set, there is no need for a special case when
19629 creating `ruleset'.
19630
19631 As a result, now the rule 0, reducing to $axiom, is visible in the
19632 outputs. Adjust the test suite.
19633
19634 * tests/conflicts.at (Solved SR Conflicts)
19635 (Unresolved SR Conflicts): Adjust.
19636 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
19637 * tests/conflicts.at (S/R in initial): New.
19638
19639 2002-04-07 Akim Demaille <akim@epita.fr>
19640
19641 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
19642 the RHS of the rules.
19643 * src/output.c (output_gram): Likewise.
19644
19645 2002-04-07 Akim Demaille <akim@epita.fr>
19646
19647 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
19648 bucket.
19649 Adjust all dependencies.
19650 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
19651 `number' of the buckets too.
19652 * src/gram.h: Include `symtab.h'.
19653 (associativity): Move to...
19654 * src/symtab.h: here.
19655 No longer include `gram.h'.
19656
19657 2002-04-07 Akim Demaille <akim@epita.fr>
19658
19659 * src/gram.h, src/gram.c (rules_rhs_length): New.
19660 (ritem_longest_rhs): Use it.
19661 * src/gram.h (rule_t): `number' is a new member.
19662 * src/reader.c (packgram): Set it.
19663 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
19664 the end of `rules', and count them out of `nrules'.
19665 (reduce_output, dump_grammar): Adjust.
19666 * src/print.c (print_grammar): It is no longer needed to check for
19667 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
19668 * tests/reduce.at (Reduced Automaton): New test.
19669
19670 2002-04-07 Akim Demaille <akim@epita.fr>
19671
19672 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
19673 lacking `+ 1' to nrules, Bison reported as useless a token if it
19674 was used solely to set the precedence of the last rule...
19675
19676 2002-04-07 Akim Demaille <akim@epita.fr>
19677
19678 * data/bison.c++, data/bison.simple: Don't output the current file
19679 name in #line, to avoid useless diffs between two identical
19680 outputs under different names.
19681
19682 2002-04-07 Akim Demaille <akim@epita.fr>
19683
19684 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
19685 Normalize loops to using `< nrules + 1', not `<= nrules'.
19686
19687 2002-04-07 Akim Demaille <akim@epita.fr>
19688
19689 * TODO: Update.
19690
19691 2002-04-07 Akim Demaille <akim@epita.fr>
19692
19693 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
19694 bucket.value as bucket.number.
19695
19696 2002-04-07 Akim Demaille <akim@epita.fr>
19697
19698 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
19699 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
19700 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
19701 RHS, instead of being an index in RITEMS.
19702
19703 2002-04-04 Paul Eggert <eggert@twinsun.com>
19704
19705 * doc/bison.texinfo: Update copyright date.
19706 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
19707 (Symbols): Warn about running Bison in one character set,
19708 but compiling and/or running in an incompatible one.
19709 Warn about character code 256, too.
19710
19711 2002-04-03 Paul Eggert <eggert@twinsun.com>
19712
19713 * src/bison.data (YYSTACK_ALLOC): Depend on whether
19714 YYERROR_VERBOSE is nonzero, not whether it is defined.
19715
19716 Merge changes from bison-1_29-branch.
19717
19718 2002-03-20 Paul Eggert <eggert@twinsun.com>
19719
19720 Merge fixes from Debian bison_1.34-1.diff.
19721
19722 * configure.in (AC_PREREQ): 2.53.
19723
19724 2002-03-20 Akim Demaille <akim@epita.fr>
19725
19726 * src/conflicts.c (log_resolution): Argument `resolution' is const.
19727
19728 2002-03-19 Paul Eggert <eggert@twinsun.com>
19729
19730 * src/bison.simple (YYCOPY): New macro.
19731 (YYSTACK_RELOCATE): Use it.
19732 Remove Type arg; no longer needed. All callers changed.
19733 (yymemcpy): Remove; no longer needed.
19734
19735 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
19736 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
19737
19738 2002-03-19 Akim Demaille <akim@epita.fr>
19739
19740 Test and fix the #line outputs.
19741
19742 * tests/atlocal.at (GCC): New.
19743 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
19744 (Prologue synch line, %union synch line, Postprologue synch line)
19745 (Action synch line, Epilogue synch line): New tests.
19746 * src/reader.c (parse_union_decl): Define the muscle stype_line.
19747 * data/bison.simple, data/bison.c++: Use it.
19748
19749 2002-03-19 Akim Demaille <akim@epita.fr>
19750
19751 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
19752 (Solved SR Conflicts, %expect not enough, %expect right)
19753 (%expect too much): Move to...
19754 * tests/conflicts.at: this new file.
19755
19756 2002-03-19 Akim Demaille <akim@epita.fr>
19757
19758 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
19759 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
19760 that we can move to enums for instance.
19761 * src/output.c (token_definitions_output): Output a list of
19762 `token-name, token-number' instead of the #define.
19763 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
19764
19765 2002-03-14 Akim Demaille <akim@epita.fr>
19766
19767 Use Gettext 0.11.1.
19768
19769 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
19770
19771 * data/bison.c++: Make the user able to add members to the generated
19772 parser by subclassing.
19773
19774 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
19775
19776 * src/reader.c (read_additionnal_code): `c' should be an integer, not
19777 a character.
19778 Reported by Nicolas Tisserand and Nicolas Burrus.
19779
19780 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
19781
19782 * src/reader.c: Warn about lacking semi-colons, do not complain.
19783
19784 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
19785
19786 * data/bison.c++: Remove a debug line.
19787
19788 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
19789
19790 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
19791 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
19792 provide a default implementation.
19793
19794 2002-03-04 Akim Demaille <akim@epita.fr>
19795
19796 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
19797 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
19798 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
19799 * tests/semantic.at (Parsing Guards): Similarly.
19800 * src/reader.at (readgram): Complain if the last rule is not ended
19801 with a semi-colon.
19802
19803 2002-03-04 Akim Demaille <akim@epita.fr>
19804
19805 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
19806 * src/closure.c: here.
19807 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
19808 RTC.
19809 * src/warshall.h, src/warshall.c: Remove.
19810 * tests/sets.at (Broken Closure): Adjust.
19811
19812 2002-03-04 Akim Demaille <akim@epita.fr>
19813
19814 * src/output.c (output_skeleton): tempdir is const.
19815 bytes_read is unused.
19816
19817 2002-03-04 Akim Demaille <akim@epita.fr>
19818
19819 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
19820 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
19821 Update.
19822 From Michael Hayes.
19823
19824 2002-03-04 Akim Demaille <akim@epita.fr>
19825
19826 * src/closure.c (closure): `r' is unused.
19827
19828 2002-03-04 Akim Demaille <akim@epita.fr>
19829
19830 * tests/sets.at (Broken Closure): Add the ending `;'.
19831 * src/reader.at (readgram): Complain if a rule is not ended with a
19832 semi-colon.
19833
19834 2002-03-04 Akim Demaille <akim@epita.fr>
19835
19836 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
19837 (count_sr_conflicts): Use bitset_count.
19838 * src/reduce.c (inaccessable_symbols): Ditto.
19839 (bits_size): Remove.
19840 * src/warshall.h, src/warshall.c: Convert to bitsetv.
19841
19842 2002-03-04 Akim Demaille <akim@epita.fr>
19843
19844 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
19845 * src/reduce.c: Remove the `bitset_zero's following the
19846 `bitset_create's, as now it is performed by the latter.
19847
19848 2002-03-04 Akim Demaille <akim@epita.fr>
19849
19850 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
19851 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
19852 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
19853 latest sources from Michael.
19854
19855 2002-03-04 Akim Demaille <akim@epita.fr>
19856
19857 * src/output.c (output): Don't free the grammar.
19858 * src/reader.c (grammar_free): New.
19859 * src/main.c (main): Call it and don't free symtab here.
19860
19861 2002-03-04 Akim Demaille <akim@epita.fr>
19862
19863 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
19864 before returning.
19865 Reported by Benoit Perrot.
19866
19867 2002-03-04 Akim Demaille <akim@epita.fr>
19868
19869 Use bitset operations when possible, not loops over bits.
19870
19871 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
19872 bitset_or.
19873 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
19874 * src/reduce.c (useless_nonterminals): Formatting changes.
19875 * src/warshall.c (TC): Use bitset_or.
19876
19877 2002-03-04 Akim Demaille <akim@epita.fr>
19878
19879 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
19880 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
19881 Ditto.
19882
19883 2002-03-04 Akim Demaille <akim@epita.fr>
19884
19885 * src/lalr.c (F): Now a bitset*.
19886 Adjust all dependencies.
19887
19888 2002-03-04 Akim Demaille <akim@epita.fr>
19889
19890 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
19891 Adjust all dependencies.
19892
19893 2002-03-04 Akim Demaille <akim@epita.fr>
19894
19895 * src/L0.c, src/LR0.h (nstates): Be size_t.
19896 Adjust comparisons (signed vs unsigned).
19897 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
19898 bitset*.
19899 Adjust all dependencies.
19900
19901 2002-03-04 Akim Demaille <akim@epita.fr>
19902
19903 * src/closure.c (firsts): Now, also a bitset.
19904 Adjust all dependencies.
19905 (varsetsize): Remove, now unused.
19906 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
19907
19908 2002-03-04 Akim Demaille <akim@epita.fr>
19909
19910 * src/print.c: Convert to use bitset.h, not hand coded iterations
19911 over ints.
19912
19913 2002-03-04 Akim Demaille <akim@epita.fr>
19914
19915 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
19916
19917 2002-03-04 Akim Demaille <akim@epita.fr>
19918
19919 * src/closure.c (ruleset): Be a bitset.
19920 (rulesetsize): Remove.
19921
19922 2002-03-04 Akim Demaille <akim@epita.fr>
19923
19924 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
19925 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
19926 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
19927 * src/closure.c (fderives): Be an array of bitsets.
19928
19929 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
19930
19931 * data/bison.c++: Merge the two generated headers. Insert a copyright
19932 notice in each output file.
19933
19934 2002-02-28 Akim Demaille <akim@epita.fr>
19935
19936 * data/bison.c++: Copy the prologue of bison.simple to fetch
19937 useful M4 definitions, such as b4_header_guard.
19938
19939 2002-02-25 Akim Demaille <akim@epita.fr>
19940
19941 * src/getargs.c (version): Give the name of the authors, and use a
19942 translator friendly scheme for the bgr
19943 copyright notice.
19944
19945 2002-02-25 Akim Demaille <akim@epita.fr>
19946
19947 * src/output.c (header_output): Remove, now handled completely via
19948 M4.
19949
19950 2002-02-25 Akim Demaille <akim@epita.fr>
19951
19952 * m4/m4.m4: New, from CVS Autoconf.
19953 * configure.in: Invoke it.
19954 * src/output.c (output_skeleton): Use its result instead of the
19955 hard coded name.
19956
19957 2002-02-25 Akim Demaille <akim@epita.fr>
19958
19959 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
19960 Fileutils 4.1.5.
19961 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
19962 * src/output.c (output_skeleton): Use mkstemp to create a real
19963 temporary file.
19964 Move the filling of `skeleton' and its muscle to...
19965 (prepare): here.
19966 (output): Move the definition of the prologue muscle to...
19967 (prepare): here.
19968 * src/system.h (DEFAULT_TMPDIR): New.
19969
19970 2002-02-14 Paul Eggert <eggert@twinsun.com>
19971
19972 Remove the support for C++ namespace cleanliness; it was
19973 causing more problems than it was curing, since it didn't work
19974 properly on some nonstandard C++ compilers. This can wait
19975 for a proper C++ parser.
19976
19977 * NEWS: Document this.
19978 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
19979 of C++, as it's treated like C now.
19980 * src/bison.simple (YYSTD): Remove.
19981 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
19982 Treat C++ just like Standard C instead of trying to support
19983 namespace cleanliness.
19984
19985 2002-02-14 Akim Demaille <akim@epita.fr>
19986
19987 * tests/regression.at (else): Adjust to Andreas' change.
19988
19989 2002-02-14 Akim Demaille <akim@epita.fr>
19990
19991 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
19992
19993 2002-02-13 Andreas Schwab <schwab@suse.de>
19994
19995 * src/output.c (output_rule_data): Don't output NULL, it might
19996 not be defined yet.
19997
19998 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
19999
20000 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
20001 (Copyright notice): Update.
20002
20003 2002-02-11 Akim Demaille <akim@epita.fr>
20004
20005 * tests/regression.at (%nonassoc and eof): Don't include
20006 nonportable headers.
20007
20008 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
20009
20010 * data/bison.c++: Correct error recovery. Make the user able to
20011 initialize the starting location.
20012
20013 2002-02-07 Akim Demaille <akim@epita.fr>
20014
20015 * tests/input.at: New.
20016
20017 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
20018
20019 * data/bison.c++: Replace some direct m4 expansions by constants. Be
20020 more consistent when naming methods and variables. Put preprocessor
20021 directives around tables only needed for debugging.
20022
20023 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
20024
20025 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
20026 C++ parsers.
20027 (yy::b4_name::parse): Use print_.
20028
20029 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
20030
20031 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
20032
20033 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
20034
20035 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
20036 C++ parsers.
20037 (yy::b4_name::parse): Build verbose error messages, and use error_.
20038
20039 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
20040
20041 * data/bison.c++: Fix m4 quoting in comments.
20042
20043 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
20044
20045 * data/bison.c++: Adjust the parser code. Fix some muscles that were
20046 not expanded by m4.
20047
20048 2002-02-05 Akim Demaille <akim@epita.fr>
20049
20050 * data/bison.c++: Adjust to the M4 back end.
20051 More is certainly needed.
20052
20053 2002-02-05 Akim Demaille <akim@epita.fr>
20054
20055 Give a try to M4 as a back end.
20056
20057 * lib/readpipe.c: New, from wdiff.
20058 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
20059 BISON_HAIRY.
20060 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
20061 specific values. Now it is m4 that performs the lookup.
20062 * src/parse-skel.y: Remove.
20063 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
20064 * src/output.c (actions_output, guards_output)
20065 (token_definitions_output): No longer keeps track of the output
20066 line number, hence remove the second argument.
20067 (guards_output): Check against the guard member of a rule, not the
20068 action member.
20069 Adjust callers.
20070 (output_skeleton): Don't look for the skeleton location, let m4 do
20071 that.
20072 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
20073 file will be used.
20074 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
20075 (prepare): Given that for the time being changesyntax is not
20076 usable in M4, rename the muscles using `-' to `_'.
20077 Define `defines_flag', `output_parser_name' and `output_header_name'.
20078 * src/output.h (actions_output, guards_output)
20079 (token_definitions_output): Adjust prototypes.
20080 * src/scan-skel.l: Instead of scanning the skeletons, it now
20081 processes the output of m4: `__oline__' and `#output'.
20082 * data/bison.simple: Adjust to be used by M4(sugar).
20083 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
20084 to date.
20085 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
20086 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
20087 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
20088 shamelessly stolen from CVS Autoconf.
20089
20090 2002-02-05 Akim Demaille <akim@epita.fr>
20091
20092 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
20093 * configure.in: Check for the declarations of free and malloc.
20094 * src/muscle_tab.c: Adjust.
20095
20096 2002-02-05 Akim Demaille <akim@epita.fr>
20097
20098 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
20099 which have no values.
20100
20101 2002-02-05 Akim Demaille <akim@epita.fr>
20102
20103 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
20104 * data/: here.
20105
20106 2002-01-29 Paul Eggert <eggert@twinsun.com>
20107
20108 * src/bison.simple (YYSIZE_T): Do not define merely because
20109 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
20110 On some platforms, <alloca.h> does not declare YYSTD (size_t).
20111
20112 2002-01-27 Akim Demaille <akim@epita.fr>
20113
20114 Fix `%nonassoc and eof'.
20115
20116 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
20117 which were not properly copied! Replace
20118 memcpy (res->errs, src->errs, src->nerrs);
20119 with
20120 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
20121 !!!
20122 * tests/regression.at (%nonassoc and eof): Adjust to newest
20123 Autotest: `.' is not in the PATH.
20124
20125 2002-01-27 Akim Demaille <akim@epita.fr>
20126
20127 * tests/sets.at (AT_EXTRACT_SETS): New.
20128 (Nullable): Use it.
20129 (Firsts): New.
20130
20131 2002-01-26 Akim Demaille <akim@epita.fr>
20132
20133 * tests/actions.at, tests/calc.at, tests/headers.at,
20134 * tests/torture.at: Adjust to the newest Autotest which no longer
20135 forces `.' in the PATH.
20136
20137 2002-01-25 Akim Demaille <akim@epita.fr>
20138
20139 * tests/regression.at (%nonassoc and eof): New.
20140 Suggested by Robert Anisko.
20141
20142 2002-01-24 Akim Demaille <akim@epita.fr>
20143
20144 Bison dumps core when trying to complain about broken input files.
20145 Reported by Cris van Pelt.
20146
20147 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
20148 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
20149 into...
20150 (Invalid inputs): Strengthen: exercise parse_percent_token.
20151
20152 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
20153
20154 * src/Makefile.am: Add bison.c++.
20155 * src/bison.c++: New skeleton.
20156
20157 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
20158
20159 * po/it.po: New.
20160
20161 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
20162
20163 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
20164
20165 2002-01-20 Marc Autret <marc@gnu.org>
20166
20167 * src/files.c (compute_output_file_names): Fix
20168
20169 2002-01-20 Marc Autret <marc@gnu.org>
20170
20171 * tests/output.at: New test.
20172 * src/files.c (compute_base_names): Don't map extensions when
20173 the YACC flag is set, use defaults.
20174 Reported by Evgeny Stambulchik.
20175
20176 2002-01-20 Marc Autret <marc@gnu.org>
20177
20178 * src/system.h: Need to define __attribute__ away for non-GCC
20179 compilers as well (i.e., the vendor C compiler).
20180 Suggested by Albert Chin-A-Young.
20181
20182 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
20183
20184 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
20185 canonical definition.
20186 * src/system.h: Use the canonical definition for PARAMS (avoids
20187 a conflict with the macro from lib/hash.h).
20188
20189 2002-01-11 Akim Demaille <akim@epita.fr>
20190
20191 * configure.in: Use AC_FUNC_STRNLEN.
20192 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
20193
20194 2002-01-09 Akim Demaille <akim@epita.fr>
20195
20196 * src/files.c, src/files.h (output_infix): New.
20197 (tab_extension): Remove.
20198 (compute_base_names): Compute the former, drop the latter.
20199 * src/output.c (prepare): Insert the muscles `output-infix', and
20200 `output-suffix'.
20201 * src/parse-skel.y (string, string.1): New.
20202 (section.header): Use it.
20203 (section.yacc): Remove.
20204 (prefix): Remove too.
20205 * src/scan-skel.l: Adjust.
20206 * src/bison.simple, src/bison.hairy: Adjust.
20207
20208 2002-01-09 Akim Demaille <akim@epita.fr>
20209
20210 * configure.in (WERROR_CFLAGS): Compute it.
20211 * src/Makefile.am (CFLAGS): Pass it.
20212 * tests/atlocal.in (CFLAGS): Idem.
20213 * src/files.c: Fix a few warnings.
20214 (get_extension_index): Remove, unused.
20215
20216 2002-01-08 Akim Demaille <akim@epita.fr>
20217
20218 * src/getargs.c (AS_FILE_NAME): New.
20219 (getargs): Use it to convert DOSish file names.
20220 * src/files.c (base_name): Rename as full_base_name to avoid
20221 clashes with `base_name ()'.
20222 (filename_split): New.
20223 (compute_base_names): N-th rewrite, using filename_split.
20224
20225 2002-01-08 Akim Demaille <akim@epita.fr>
20226
20227 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
20228 New, stolen from the Fileutils 4.1.
20229 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
20230 * configure.in: Check for the presence of memrchr, and of its
20231 prototype.
20232
20233 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
20234
20235 * lib/hash.h (__P): Added definition for this macro.
20236 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
20237 BUILT_SOURCES, to ensure they are generated first.
20238 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
20239 %error-verbose to allow bootstrapping with bison 1.30x.
20240
20241 2002-01-06 Akim Demaille <akim@epita.fr>
20242
20243 * src/reader.c (parse_braces): Don't fetch the next char, the
20244 convention is to fetch on entry.
20245 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
20246 'switch' without a following semicolon.
20247 * tests/regression.at (braces parsing): New.
20248
20249 2002-01-06 Akim Demaille <akim@epita.fr>
20250
20251 Bison is dead wrong in its RR conflict reports.
20252
20253 * tests/torture.at (GNU Cim Grammar): New.
20254 * src/conflicts.c (count_rr_conflicts): Fix.
20255
20256 2002-01-06 Akim Demaille <akim@epita.fr>
20257
20258 Creating package.m4 from configure.ac causes too many problems.
20259
20260 * tests/Makefile.am (package.m4): Create it by hand,
20261 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
20262
20263 2002-01-06 Akim Demaille <akim@epita.fr>
20264
20265 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
20266 skeleton.h.
20267
20268 2002-01-04 Paul Eggert <eggert@twinsun.com>
20269
20270 * doc/bison.texinfo (Debugging):
20271 Remove YYSTDERR; it's no longer defined or used.
20272 Also, s/cstdio.h/cstdio/.
20273
20274 2002-01-03 Akim Demaille <akim@epita.fr>
20275
20276 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
20277
20278 2002-01-03 Akim Demaille <akim@epita.fr>
20279
20280 * src/parse-skel.y (process_skeleton): Don't bind the parser's
20281 tracing code to --trace, wait for a better --trace option, with
20282 args.
20283
20284 2002-01-03 Akim Demaille <akim@epita.fr>
20285
20286 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
20287 The ISO C++ standard is extremely clear about it: stderr is
20288 considered a macro, not a regular symbol (see table 94 `Header
20289 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
20290 Therefore std:: does not apply to it. It still does with fprintf.
20291 Also, s/cstdio.h/cstdio/.
20292
20293 2002-01-03 Akim Demaille <akim@epita.fr>
20294
20295 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
20296 for non system headers.
20297
20298 2002-01-02 Akim Demaille <akim@epita.fr>
20299
20300 Equip the skeleton chain with location tracking, runtime trace,
20301 pure parser and scanner.
20302
20303 * src/parse-skel.y: Request a pure parser, locations, and prefix
20304 renaming.
20305 (%union): Having several members with the same type does not help
20306 type mismatches, simplify.
20307 (YYPRINT, yyprint): New.
20308 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
20309 (skel_error): this.
20310 Handle locations.
20311 * src/scan-skel.l: Adjust to these changes.
20312 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
20313 (LOCATION_PRINT, skel_control_t): New.
20314
20315 2001-12-30 Akim Demaille <akim@epita.fr>
20316
20317 * src/parse-skel.y: Get rid of the shift/reduce conflict:
20318 replace `gb' with BLANKS.
20319 * src/scan-skel.l: Adjust.
20320
20321 2001-12-30 Akim Demaille <akim@epita.fr>
20322
20323 * src/system.h: We don't need nor want bcopy.
20324 Throw away MS-DOS crap: we don't need getpid.
20325 * configure.in: We don't need strndup. It was even causing
20326 problems: because Flex includes the headers *before* us,
20327 _GNU_SOURCE is not defined by config.h, and therefore strndup was
20328 not visible.
20329 * lib/xstrndup.c: New.
20330 * src/scan-skel.l: Use it.
20331 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
20332 * src/parse-skel.y: Use %directives instead of #defines.
20333
20334 2001-12-30 Akim Demaille <akim@epita.fr>
20335
20336 * src/skeleton.h: New.
20337 * src/output.c (output_parser, output_master_parser): Remove, dead
20338 code.
20339 * src/output.h (get_lines_number, actions_output, guards_output)
20340 (token_definitions_output): Prototype them.
20341 * src/parse-skel.y: Add the license notice.
20342 Include output.h and skeleton.h.
20343 (process_skeleton): Returns void, and takes a single parameter.
20344 * src/scan-skel.l: Add the license notice.
20345 Include skeleton.h.
20346 Don't use %option yylineno: it seems that then Flex imagines
20347 REJECT has been used, and therefore it won't reallocate its
20348 buffers (which makes no other sense to me than a bug). It results
20349 in warnings for `unused: yy_flex_realloc'.
20350
20351 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
20352
20353 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
20354 (MUSCLE_INSERT_PREFIX): ...to there.
20355 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
20356 (MUSCLE_INSERT_PREFIX): Move from here...
20357
20358 * src/bison.hairy: Add a section directive. Put braces around muscle
20359 names. This parser skeleton is still broken, but Bison should not
20360 choke on a bad muscle 'syntax'.
20361 * src/bison.simple: Add a section directive. Put braces around muscle
20362 names.
20363
20364 * src/files.h (strsuffix, stringappend): Add declarations.
20365 (tab_extension): Add declaration.
20366 (short_base_name): Add declaration.
20367
20368 * src/files.c (strsuffix, stringappend): No longer static. These
20369 functions are used in the skeleton parser.
20370 (tab_extension): New.
20371 (compute_base_names): Use the computations done in this function
20372 to guess if the generated parsers should have '.tab' in their
20373 names.
20374 (short_base_name): No longer static.
20375
20376 * src/output.c (output_skeleton): New.
20377 (output): Disable call to output_master_parser, and give a try to
20378 a new skeleton handling system.
20379 (guards_output, actions_output): No longer static.
20380 (token_definitions_output, get_lines_number): No longer static.
20381
20382 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
20383
20384 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
20385 parse-skel.y.
20386
20387 * src/parse-skel.y: New file.
20388 * src/scan-skel.l: New file.
20389
20390 2001-12-29 Akim Demaille <akim@epita.fr>
20391
20392 %name-prefix is broken.
20393
20394 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
20395 Adjust all dependencies.
20396 * tests/headers.at (export YYLTYPE): Strengthen this test: use
20397 %name-prefix.
20398
20399 Renaming yylval but not yylloc is not consistent. Now we do.
20400
20401 * src/bison.simple: Prefix yylloc if used.
20402 * doc/bison.texinfo (Decl Summary): Document that.
20403
20404 2001-12-29 Akim Demaille <akim@epita.fr>
20405
20406 * doc/bison.texinfo: Promote `%long-directive' over
20407 `%long_directive'.
20408 Remove all references to fixed-output-files, yacc is enough.
20409
20410 2001-12-29 Akim Demaille <akim@epita.fr>
20411
20412 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
20413 user prologue. These are defaults.
20414 * tests/actions.at (Mid-rule actions): Make sure the user can
20415 define YYDEBUG and YYERROR_VERBOSE.
20416
20417 2001-12-29 Akim Demaille <akim@epita.fr>
20418
20419 * src/output.c (header_output): Don't forget to export YYLTYPE and
20420 yylloc.
20421 * tests/headers.at (export YYLTYPE): New, make sure it does.
20422 * tests/regression.at (%union and --defines, Invalid CPP headers):
20423 Move to...
20424 * tests/headers.at: here.
20425
20426 2001-12-29 Akim Demaille <akim@epita.fr>
20427
20428 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
20429
20430 2001-12-29 Akim Demaille <akim@epita.fr>
20431
20432 * tests/actions.at (Mid-rule actions): Output on a single line
20433 instead of several.
20434
20435 2001-12-29 Akim Demaille <akim@epita.fr>
20436
20437 * doc/bison.texinfo: Formatting changes.
20438
20439 2001-12-29 Akim Demaille <akim@epita.fr>
20440
20441 Don't store the token defs in a muscle, just be ready to output it
20442 on command. Now possible via `symbols'. Fixes a memory leak.
20443
20444 * src/output.c (token_definitions_output): New.
20445 (output_parser, header_output): Use it.
20446 * src/reader.c (symbols_save): Remove.
20447
20448 2001-12-29 Akim Demaille <akim@epita.fr>
20449
20450 * src/bison.simple: Do not provide a default for YYSTYPE and
20451 YYLTYPE before the user's prologue. Otherwise it's hardly... a
20452 default.
20453
20454 2001-12-29 Akim Demaille <akim@epita.fr>
20455
20456 Mid-rule actions are simply... ignored!
20457
20458 * src/reader.c (readgram): Be sure to attach mid-rule actions to
20459 the empty-rule associated to the dummy symbol, not to the host
20460 rule.
20461 * tests/actions.at (Mid-rule actions): New.
20462
20463 2001-12-29 Akim Demaille <akim@epita.fr>
20464
20465 Memory leak.
20466
20467 * src/reader.c (reader): Free grammar.
20468
20469 2001-12-29 Akim Demaille <akim@epita.fr>
20470
20471 Memory leak.
20472
20473 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
20474 since it allocates it for each state, although only one is needed.
20475 (allocate_storage): Do it here.
20476
20477 2001-12-29 Akim Demaille <akim@epita.fr>
20478
20479 * src/options.h, src/options.c (create_long_option_table): Rename
20480 as...
20481 (long_option_table_new): this, with a clearer prototype.
20482 (percent_table): Remove, unused,
20483 * src/getargs.c (getargs): Adjust.
20484
20485 2001-12-29 Akim Demaille <akim@epita.fr>
20486
20487 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
20488 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
20489 as states.
20490
20491 2001-12-29 Akim Demaille <akim@epita.fr>
20492
20493 * src/lalr.c (build_relations): Rename `states' as `states1'.
20494 Sorry, I don't understand exactly what it is, no better name...
20495
20496 2001-12-29 Akim Demaille <akim@epita.fr>
20497
20498 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
20499 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
20500 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
20501 as rules.
20502
20503 2001-12-29 Akim Demaille <akim@epita.fr>
20504
20505 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
20506 ago.
20507
20508 2001-12-29 Akim Demaille <akim@epita.fr>
20509
20510 * src/reader.c, src/reader.h (user_toknums): Remove.
20511 Adjust all users to use symbols[i]->user_token_number.
20512
20513 2001-12-29 Akim Demaille <akim@epita.fr>
20514
20515 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
20516 Adjust all users to use symbols[i]->prec or ->assoc.
20517
20518 2001-12-29 Akim Demaille <akim@epita.fr>
20519
20520 * src/reader.c, src/reader.h (tags): Remove.
20521 Adjust all users to use symbols[i]->tag.
20522
20523 2001-12-29 Akim Demaille <akim@epita.fr>
20524
20525 * src/gram.h, src/gram.c (symbols): New, similar to state_table
20526 and rule_table.
20527 * src/reader.c (packsymbols): Fill this table.
20528 Drop sprec.
20529 * src/conflicts.c (resolve_sr_conflict): Adjust.
20530 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
20531 single table.
20532 Use symbols[i]->tag instead of tags[i].
20533
20534 2001-12-29 Akim Demaille <akim@epita.fr>
20535
20536 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
20537 In addition, put a comment in there, to replace...
20538 * tests/regression.at (%union and C comments): Remove.
20539
20540 2001-12-29 Akim Demaille <akim@epita.fr>
20541
20542 * tests/regression.at (Web2c Actions): Blindly move the actual
20543 output as expected output. The contents *seem* right to me, but I
20544 can't pretend reading perfectly parser tables... Nonetheless, all
20545 the other tests pass correctly, the table look OK, even though the
20546 presence of `$axiom' is to be noted: AFAICS it is useless (but
20547 harmless).
20548
20549 2001-12-29 Akim Demaille <akim@epita.fr>
20550
20551 * src/reader.c (readgram): Don't add the rule 0 if there were no
20552 rules read. In other words, add it _after_ having performed
20553 grammar sanity checks.
20554 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
20555
20556 2001-12-29 Akim Demaille <akim@epita.fr>
20557
20558 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
20559 visible, and some states have now a different number.
20560
20561 2001-12-29 Akim Demaille <akim@epita.fr>
20562
20563 * src/reader.c (readgram): Bind the initial rule's lineno to that
20564 of the first rule.
20565 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
20566 (Solved SR Conflicts): Adjust rule 0's line number.
20567
20568 2001-12-29 Akim Demaille <akim@epita.fr>
20569
20570 Fix the `GAWK Grammar' failure.
20571
20572 * src/LR0.c (final_state): Initialize to -1 so that we do compute
20573 the reductions of the first state which was mistakenly confused
20574 with the final state because precisely final_state was initialized
20575 to 0.
20576 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
20577 now noticed by Bison.
20578 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
20579 have a reduction on $default.
20580
20581 2001-12-29 Akim Demaille <akim@epita.fr>
20582
20583 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
20584 rule line numbers.
20585 * src/closure.c (print_closure): Likewise.
20586 * src/derives.c (print_derives): Likewise.
20587 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
20588 now.
20589
20590 2001-12-29 Akim Demaille <akim@epita.fr>
20591
20592 * src/lalr.c (lookaheads_print): New.
20593 (lalr): Call it when --trace-flag.
20594 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
20595 are dumped.
20596
20597 2001-12-29 Akim Demaille <akim@epita.fr>
20598
20599 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
20600 when walking through ritem, even via rule->rhs.
20601 * src/reduce.c (dump_grammar, useful_production, reduce_output)
20602 (useful_production, useless_nonterminals): Likewise.
20603 (reduce_grammar_tables): Likewise, plus update nritems.
20604 * src/nullable.c (set_nullable): Likewise.
20605 * src/lalr.c (build_relations): Likewise.
20606 * tests/sets.at (Nullable): Adjust.
20607 Fortunately, now, the $axiom is no longer nullable.
20608
20609 2001-12-29 Akim Demaille <akim@epita.fr>
20610
20611 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
20612 the 0-sentinel.
20613 * src/gram.c (ritem_longest_rhs): Likewise.
20614 * src/reduce.c (nonterminals_reduce): Likewise.
20615 * src/print_graph.c (print_graph): Likewise.
20616 * src/output.c (output_rule_data): Likewise.
20617 * src/nullable.c (set_nullable): Likewise.
20618
20619 2001-12-29 Akim Demaille <akim@epita.fr>
20620
20621 * src/output.c: Comment changes.
20622
20623 2001-12-27 Paul Eggert <eggert@twinsun.com>
20624
20625 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
20626 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
20627 Sparc, as they were causing more porting problems than the
20628 (minor) performance improvement was worth.
20629
20630 Also, catch up with 1.31's YYSTD.
20631
20632 2001-12-27 Akim Demaille <akim@epita.fr>
20633
20634 * src/output.c (output_gram): Rely on nritems, not the
20635 0-sentinel. See below.
20636 Use -1 as separator, not 0.
20637 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
20638 Rely on -1 as separator in yyrhs, instead of 0.
20639 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
20640 twice `Now at end of input', therefore there are two lines less to
20641 expect.
20642
20643 2001-12-27 Akim Demaille <akim@epita.fr>
20644
20645 * tests/regression.at (Unresolved SR Conflicts):
20646 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
20647 below.
20648
20649 2001-12-27 Akim Demaille <akim@epita.fr>
20650
20651 * src/LR0.c (new_state): Recognize the final state by the fact it
20652 is reached by eoftoken.
20653 (insert_start_shifting_state, insert_eof_shifting_state)
20654 (insert_accepting_state, augment_automaton): Remove, since now
20655 these states are automatically computed from the initial state.
20656 (generate_states): Adjust.
20657 * src/print.c: When reporting a rule number to the user, substract
20658 1, so that the axiom rule is rule 0, and the first user rule is 1.
20659 * src/reduce.c: Likewise.
20660 * src/print_graph.c (print_core): For the time being, just as for
20661 the report, depend upon --trace-flags to dump the full set of
20662 items.
20663 * src/reader.c (readgram): Once the grammar read, insert the rule
20664 0: `$axiom: START-SYMBOL $'.
20665 * tests/set.at: Adjust: rule 0 is now displayed, and since the
20666 number of the states has changed (the final state is no longer
20667 necessarily the last), catch up.
20668
20669 2001-12-27 Akim Demaille <akim@epita.fr>
20670
20671 Try to make the use of the eoftoken valid. Given that its value
20672 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
20673 is used instead of > 0 where appropriate, (ii), depend upon nritems
20674 instead of the 0-sentinel.
20675
20676 * src/gram.h, src/gram.c (nritems): New.
20677 Expected to be duplication of nitems, but for the time being...
20678 * src/reader.c (packgram): Assert nritems and nitems are equal.
20679 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
20680 * src/closure.c (print_closure, print_fderives): Likewise.
20681 * src/gram.c (ritem_print): Likewise.
20682 * src/print.c (print_core, print_grammar): Likewise.
20683 * src/print_graph.c: Likewise.
20684
20685 2001-12-27 Akim Demaille <akim@epita.fr>
20686
20687 * src/main.c (main): If there are complains after grammar
20688 reductions, then output the report anyway if requested, then die.
20689 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
20690 * src/reader.c (eoftoken): New.
20691 (parse_token_decl): If the token being defined has value `0', it
20692 is the eoftoken.
20693 (packsymbols): No longer hack `tags' to insert `$' by hand.
20694 Be sure to preserve the value of the eoftoken.
20695 (reader): Make sure eoftoken is defined.
20696 Initialize nsyms to 0: now eoftoken is created just like the others.
20697 * src/print.c (print_grammar): Don't special case the eof token.
20698 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
20699 lie anyway, albeit pleasant.
20700 * tests/calc.at: Exercise error messages with eoftoken.
20701 Change the grammar so that empty input is invalid.
20702 Adjust expectations.
20703 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
20704
20705 2001-12-27 Akim Demaille <akim@epita.fr>
20706
20707 * configure.in: Check the protos of strchr ans strspn.
20708 Replace strchr if needed.
20709 * src/system.h: Provide the protos of strchr, strspn and memchr if
20710 missing.
20711 * lib/strchr.c: New.
20712 * src/reader.c (symbols_save): Use strchr.
20713
20714 2001-12-27 Akim Demaille <akim@epita.fr>
20715
20716 * src/print.c, src/print_graph.c (escape): New.
20717 Use it to quote the TAGS outputs.
20718 * src/print_graph.c (print_state): Now errors are in red, and
20719 reductions in green.
20720 Prefer high to wide: output the state number on a line of its own.
20721
20722 2001-12-27 Akim Demaille <akim@epita.fr>
20723
20724 * src/state.h, src/state.c (reductions_new): New.
20725 * src/LR0.c (set_state_table): Let all the states have a
20726 `reductions', even if reduced to 0.
20727 (save_reductions): Adjust.
20728 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
20729 * src/print.c (print_reductions, print_actions): Adjust.
20730 * src/output.c (action_row): Adjust.
20731
20732 2001-12-27 Akim Demaille <akim@epita.fr>
20733
20734 * src/state.h, src/state.c (errs_new, errs_dup): New.
20735 * src/LR0.c (set_state_table): Let all the states have an errs,
20736 even if reduced to 0.
20737 * src/print.c (print_errs, print_reductions): Adjust.
20738 * src/output.c (output_actions, action_row): Adjust.
20739 * src/conflicts.c (resolve_sr_conflict): Adjust.
20740
20741 2001-12-27 Akim Demaille <akim@epita.fr>
20742
20743 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
20744
20745 2001-12-27 Akim Demaille <akim@epita.fr>
20746
20747 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
20748 * src/print.c: here.
20749 (lookaheadset, shiftset): New, used as additional storage by
20750 print_reductions.
20751 (print_results): Adjust.
20752 (print_shifts, print_gotos, print_errs): New, extracted from...
20753 (print_actions): here.
20754 * src/print_graph.c (print_actions): Remove dead code.
20755
20756 2001-12-27 Akim Demaille <akim@epita.fr>
20757
20758 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
20759 `$n' and `@n'.
20760
20761 2001-12-27 Akim Demaille <akim@epita.fr>
20762
20763 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
20764 (build_relations): Adjust.
20765
20766 2001-12-27 Akim Demaille <akim@epita.fr>
20767
20768 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
20769 duplication.
20770
20771 2001-12-27 Akim Demaille <akim@epita.fr>
20772
20773 * src/reader.c (packgram): Catch nitems overflows.
20774
20775 2001-12-27 Akim Demaille <akim@epita.fr>
20776
20777 * src/files.c, src/files.h (guard_obstack): Remove.
20778 * src/output.c (output): Adjust.
20779 * src/reader.c (parse_braces): New, factoring...
20780 (copy_action, copy_guard): these two which are renamed as...
20781 (parse_action, parse_guard): these.
20782 As a voluntary consequence, using braces around guards is now
20783 mandatory.
20784
20785 2001-12-27 Akim Demaille <akim@epita.fr>
20786
20787 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
20788 * src/reader.c (symbol_list): `guard' and `guard_line' are new
20789 members.
20790 (symbol_list_new): Adjust.
20791 (copy_action): action_line is the first line, not the last.
20792 (copy_guard): Just as for actions, store the `action' only, not
20793 the switch/case/break flesh.
20794 Don't parse the user action that might follow the guard, let...
20795 (readgram): do it, i.e., now, there can be an action after a
20796 guard.
20797 In other words the guard is just explicitly optional.
20798 (packgram): Adjust.
20799 * src/output.c (guards_output): New.
20800 (output_parser): Call it when needed.
20801 (output): Also free the guard and attrs obstacks.
20802 * src/files.c, src/files.h (obstack_save): Remove.
20803 (output_files): Remove.
20804 As a result, if one needs the former `.act' file, using an
20805 appropriate skeleton which requires actions and guards is now
20806 required.
20807 * src/main.c (main): Adjust.
20808 * tests/semantic.at: New.
20809 * tests/regression.at: Use `input.y' as input file name.
20810 Avoid 8+3 problems by requiring input.c when the test needs the
20811 parser.
20812
20813 2001-12-27 Akim Demaille <akim@epita.fr>
20814
20815 * src/reader.c (symbol_list_new): Be sure to initialize all the
20816 fields.
20817
20818 2001-12-27 Akim Demaille <akim@epita.fr>
20819
20820 All the hacks using a final pseudo state are now useless.
20821
20822 * src/LR0.c (set_state_table): state_table holds exactly nstates.
20823 * src/lalr.c (nLA): New.
20824 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
20825 instead of lookaheadsp from the pseudo state (nstate + 1).
20826
20827 2001-12-27 Akim Demaille <akim@epita.fr>
20828
20829 * src/output.c (action_row, token_actions): Use a state_t instead
20830 of a integer, and nlookaheads instead of the following state's
20831 lookaheadsp.
20832
20833 2001-12-27 Akim Demaille <akim@epita.fr>
20834
20835 * src/conflicts.c (log_resolution, flush_shift)
20836 (resolve_sr_conflict, set_conflicts, solve_conflicts)
20837 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
20838 (conflicts_print, print_reductions): Use a state_t instead of an
20839 integer when referring to a state.
20840 As much as possible, depend upon nlookaheads, instead of the
20841 `lookaheadsp' member of the following state (since lookaheads of
20842 successive states are successive, the difference between state n + 1
20843 and n served as the number of lookaheads for state n).
20844 * src/lalr.c (add_lookback_edge): Likewise.
20845 * src/print.c (print_core, print_actions, print_state)
20846 (print_results): Likewise.
20847 * src/print_graph.c (print_core, print_actions, print_state)
20848 (print_graph): Likewise.
20849 * src/conflicts.h: Adjust.
20850
20851 2001-12-27 Akim Demaille <akim@epita.fr>
20852
20853 * src/bison.hairy: Formatting/comment changes.
20854 ANSIfy.
20855 Remove `register' indications.
20856 Add plenty of `static'.
20857
20858 2001-12-27 Akim Demaille <akim@epita.fr>
20859
20860 * src/output.c (prepare): Drop the muscle `ntbase' which
20861 duplicates ntokens.
20862 * src/bison.simple: Formatting/comment changes.
20863 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
20864 is an undocumented synonym.
20865
20866 2001-12-22 Akim Demaille <akim@epita.fr>
20867
20868 * src/output.c (output_table_data): Change the prototype to use
20869 `int' for array ranges: some invocations do pass an int, not a
20870 short.
20871 Reported by Wayne Green.
20872
20873 2001-12-22 Akim Demaille <akim@epita.fr>
20874
20875 Some actions of web2c.y are improperly triggered.
20876 Reported by Mike Castle.
20877
20878 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
20879 * tests/regression.at (Web2c): Rename as...
20880 (Web2c Report): this.
20881 (Web2c Actions): New.
20882
20883 2001-12-22 Akim Demaille <akim@epita.fr>
20884
20885 Reductions in web2c.y are improperly reported.
20886 Reported by Mike Castle.
20887
20888 * src/conflicts.c (print_reductions): Fix.
20889 * tests/regression.at (Web2c): New.
20890
20891 2001-12-18 Akim Demaille <akim@epita.fr>
20892
20893 Some host fail on `assert (!"foo")', which expands to
20894 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
20895 Reported by Nelson Beebee.
20896
20897 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
20898 `#define it_succeeded 0' and `assert (it_succeeded)'.
20899
20900 2001-12-17 Marc Autret <autret_m@epita.fr>
20901
20902 * src/bison.simple: Don't hard code the skeleton line and filename.
20903 * src/output.c (output_parser): Rename 'line' as 'output_line'.
20904 New line counter 'skeleton_line' (skeleton-line muscle).
20905
20906 2001-12-17 Paul Eggert <eggert@twinsun.com>
20907
20908 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
20909 YYDEBUG must be defined to a nonzero value.
20910
20911 * src/bison.simple (yytname): Do not assume that the user defines
20912 YYDEBUG to a properly parenthesized expression.
20913
20914 2001-12-17 Akim Demaille <akim@epita.fr>
20915
20916 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
20917 nlookaheads is a new member.
20918 Adjust all users.
20919 * src/lalr.h (nlookaheads): Remove this orphan declaration.
20920 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
20921 state.
20922
20923 2001-12-17 Akim Demaille <akim@epita.fr>
20924
20925 * src/files.h, src/files.c (open_files, close_files): Remove.
20926 * src/main.c (main): Don't open/close files, nor invoke lex_free,
20927 let...
20928 * src/reader.c (reader): Do it.
20929
20930 2001-12-17 Akim Demaille <akim@epita.fr>
20931
20932 * src/conflicts.c (print_reductions): Formatting changes.
20933
20934 2001-12-17 Akim Demaille <akim@epita.fr>
20935
20936 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
20937 (flush_reduce): New.
20938 (resolve_sr_conflict): Adjust.
20939
20940 2001-12-17 Akim Demaille <akim@epita.fr>
20941
20942 * src/output.c (output_obstack): Be static and rename as...
20943 (format_obstack): this, to avoid any confusion with files.c's
20944 output_obstack.
20945 * src/reader.h (muscle_obstack): Move to...
20946 * src/output.h: here, since it's defined in output.c.
20947
20948 2001-12-17 Akim Demaille <akim@epita.fr>
20949
20950 * src/output.c (action_row, save_column, default_goto)
20951 (sort_actions, matching_state, pack_vector): Better variable
20952 locality.
20953
20954 2001-12-17 Akim Demaille <akim@epita.fr>
20955
20956 * src/output.c: Various formatting changes.
20957
20958 2001-12-17 Akim Demaille <akim@epita.fr>
20959
20960 * src/files.c (output_files): Free the output_obstack.
20961 * src/main.c (main): Call print and print_graph conditionally.
20962 * src/print.c (print): Work unconditionally.
20963 * src/print_graph.c (print_graph): Work unconditionally.
20964 * src/conflicts.c (log_resolution): Output only if verbose_flag.
20965
20966 2001-12-16 Marc Autret <autret_m@epita.fr>
20967
20968 * src/output.c (actions_output): Fix. When we use %no-lines,
20969 there is one less line per action.
20970
20971 2001-12-16 Marc Autret <autret_m@epita.fr>
20972
20973 * src/bison.simple: Remove a useless #line directive.
20974 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
20975 * src/output.c (get_lines_number): New.
20976 (output_parser): Adjust, now takes care about the lines of a
20977 output muscles.
20978 Fix line numbering.
20979 (actions_output): Computes the number of lines taken by actions.
20980 (output_master_parser): Insert new skeleton which is the name of
20981 the output parser file name.
20982
20983 2001-12-15 Marc Autret <autret_m@epita.fr>
20984
20985 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
20986
20987 2001-12-15 Marc Autret <autret_m@epita.fr>
20988
20989 * src/output.c (output_gram): Keep track of the hairy one.
20990
20991 2001-12-15 Akim Demaille <akim@epita.fr>
20992
20993 Make `make distcheck' work.
20994
20995 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
20996 system.h which uses libgettext.h.
20997
20998 2001-12-15 Akim Demaille <akim@epita.fr>
20999
21000 * src/nullable.c (set_nullable): Useless rules must be skipped,
21001 otherwise, since we range over their symbols, we might look at a
21002 nonterminal which no longer ``exists'', i.e., it is not counted in
21003 `nvars', hence we overflow our arrays.
21004
21005 2001-12-15 Akim Demaille <akim@epita.fr>
21006
21007 The header can also be produced directly, without any obstack!
21008 Yahoo!
21009
21010 * src/files.c, src/files.h (defines_obstack): Remove.
21011 (compute_header_macro): Global.
21012 (defines_obstack_save): Remove.
21013 * src/reader.c (parse_union_decl): No longer output to
21014 defines_obstack: its content can be found in the `stype' muscle
21015 anyway.
21016 (output_token_translations): Merge into...
21017 (symbols_output): this.
21018 Rename as...
21019 (symbols_save): this.
21020 (reader): Adjust.
21021 * src/output.c (header_output): New.
21022 (output): Call it.
21023
21024 2001-12-15 Akim Demaille <akim@epita.fr>
21025
21026 * src/reader.c (parse_union_decl): Instead of handling two obstack
21027 simultaneously, use one to define the `stype' muscle, and use the
21028 value of the latter to fill defines_obstack.
21029 (copy_comment): Remove.
21030 (copy_comment2): Work for a single obstack.
21031 Rename as...
21032 (copy_comment): this.
21033
21034 2001-12-15 Akim Demaille <akim@epita.fr>
21035
21036 * src/lex.c, src/lex.h (xgetc): No longer static.
21037 * src/reader.c (parse_union_decl): Revamp.
21038
21039 2001-12-15 Akim Demaille <akim@epita.fr>
21040
21041 Still making progress in separating Bison into (i) input, (ii)
21042 process, (iii) output: now we can directly output the parser file
21043 without using table_obstack at all.
21044
21045 * src/files.c, src/files.h (table_obstack): Bye bye.
21046 (parser_file_name): New.
21047 * src/files.c (compute_output_file_names): Compute it.
21048 * src/output.c (actions_output, output_parser)
21049 (output_master_parser): To a file instead of an obstack.
21050
21051 2001-12-15 Akim Demaille <akim@epita.fr>
21052
21053 Attach actions to rules, instead of pre-outputting them to
21054 actions_obstack.
21055
21056 * src/gram.h (rule_t): action and action_line are new members.
21057 * src/reader.c (symbol_list): Likewise.
21058 (copy_action): Save the actions within the rule.
21059 (packgram): Save them in rule_table.
21060 * src/output.c (actions_output): New.
21061 (output_parser): Use it on `%%actions'.
21062 (output_rule_data): Don't free rule_table.
21063 (output): Do it.
21064 (prepare): Don't save the `action' muscle.
21065 * src/bison.simple: s/%%action/%%actions/.
21066
21067 2001-12-15 Akim Demaille <akim@epita.fr>
21068
21069 * src/reader.c (copy_action): When --yacc, don't append a `;'
21070 to the user action: let it fail if lacking.
21071 Suggested by Arnold Robbins and Tom Tromey.
21072
21073 2001-12-14 Akim Demaille <akim@epita.fr>
21074
21075 * src/lex.c (literalchar): Simply return the char you decoded, non
21076 longer mess around with obstacks and int pointers.
21077 Adjust all callers.
21078
21079 2001-12-14 Akim Demaille <akim@epita.fr>
21080
21081 * src/lex.c (literalchar): Don't escape the special characters,
21082 just decode them, and keep them as char (before, eol was output as
21083 the 2 char string `\n' etc.).
21084 * src/output.c (output_rule_data): Use quotearg to output the
21085 token strings.
21086
21087 2001-12-13 Paul Eggert <eggert@twinsun.com>
21088
21089 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
21090 Do not infringe on the global user namespace when using C++.
21091 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
21092 All uses of `fprintf' and `stderr' changed.
21093
21094 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
21095
21096 2001-12-13 Akim Demaille <akim@epita.fr>
21097
21098 The computation of nullable is broken: it doesn't handle empty
21099 RHS's properly.
21100
21101 * tests/torture.at (GNU AWK Grammar): New.
21102 * tests/sets.at (Nullable): New.
21103 * src/nullable.c (set_nullable): Instead of blindly looping over
21104 `ritems', loop over the rules, and then over their rhs's.
21105
21106 Work around Autotest bugs.
21107
21108 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
21109 frame, because Autotest understand lines starting with a `+' as
21110 traces from the shell. Then, they are not processed properly.
21111 Admittedly an Autotest bug, but we don't have time to wait for
21112 Autotest to catch up.
21113 * tests/regression.at (Broken Closure): Adjust to the new table
21114 frames.
21115 Move to...
21116 * tests/sets.at: here.
21117
21118 2001-12-13 Akim Demaille <akim@epita.fr>
21119
21120 * src/closure.c (closure): Use nrules instead of playing tricks
21121 with BITS_PER_WORD.
21122
21123 2001-12-13 Akim Demaille <akim@epita.fr>
21124
21125 * src/print.c (print_actions): Output the handling of `$' as the
21126 traces do: shifting the token EOF. Before EOF was treated as a
21127 nonterminal.
21128 * tests/regression.at: Adjust some tests.
21129 * src/print_graph.c (print_core): Complete the set of items via
21130 closure. The next-to-final and final states are still unsatisfying,
21131 but that's to be addressed elsewhere.
21132 No longer output the rule numbers, but do output the state number.
21133 A single loop for the shifts + gotos is enough, but picked a
21134 distinct color for each.
21135 (print_graph): Initialize and finalize closure.
21136
21137 2001-12-13 Akim Demaille <akim@epita.fr>
21138
21139 * src/reader.c (readgram): Remove dead code, an strip useless
21140 braces.
21141 (get_type): Remove, unused.
21142
21143 2001-12-12 Akim Demaille <akim@epita.fr>
21144
21145 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
21146 on that of lib/error.c.
21147
21148 2001-12-12 Akim Demaille <akim@epita.fr>
21149
21150 Some hosts don't like `/' in includes.
21151
21152 * src/system.h: Include libgettext.h without qualifying the path.
21153 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
21154 $(top_srcdir).
21155
21156 2001-12-11 Marc Autret <autret_m@epita.fr>
21157
21158 * src/output.c (output_parser): Remove useless muscle.
21159
21160 2001-12-11 Marc Autret <autret_m@epita.fr>
21161
21162 * src/bison.simple: Remove #line just before %%epilogue. It
21163 is now handled in ...
21164 * src/reader.c (read_additionnal_code): Add the output of a
21165 #line for the epilogue.
21166
21167 2001-12-10 Marc Autret <autret_m@epita.fr>
21168
21169 * src/reader.c (copy_definition): Re-use CPP-outed code which
21170 replace precedent remove.
21171 * src/bison.simple: Remove #line before %%prologue because
21172 %%input-line is wrong at this time.
21173
21174 2001-12-10 Marc Autret <autret_m@epita.fr>
21175
21176 * src/reader.c (symbols_output): Clean up.
21177 * src/output.c (output_gram, output): Clean up.
21178
21179 2001-12-10 Akim Demaille <akim@epita.fr>
21180
21181 * src/lalr.c (initialize_lookaheads): New. Extracted from...
21182 * src/LR0.c (set_state_table): here.
21183 * src/lalr.c (lalr): Call it.
21184
21185 2001-12-10 Akim Demaille <akim@epita.fr>
21186
21187 * src/state.h (shifts): Remove the `number' member: shifts are
21188 attached to state, hence no longer need to be labelled with a
21189 state number.
21190
21191 2001-12-10 Akim Demaille <akim@epita.fr>
21192
21193 Now that states have a complete set of members, the linked list of
21194 shifts is useless: just fill directly the state's shifts member.
21195
21196 * src/state.h (shifts): Remove the `next' member.
21197 * src/LR0.c (first_state, last_state): Remove.
21198 Adjust the callers.
21199 (augment_automaton): Don't look for the shifts that must be added
21200 a shift on EOF: it is those of the state we looked for! But now,
21201 since shifts are attached, it is no longer needed to looking
21202 merely by its id: its number.
21203
21204 2001-12-10 Akim Demaille <akim@epita.fr>
21205
21206 * src/LR0.c (augment_automaton): Better variable locality.
21207 Remove an impossible branch: if there is a state corresponding to
21208 the start symbol being shifted, then there is shift for the start
21209 symbol from the initial state.
21210
21211 2001-12-10 Akim Demaille <akim@epita.fr>
21212
21213 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
21214 only when appropriate: when insert_start_shifting_state' is not
21215 invoked.
21216 * tests/regression.at (Rule Line Numbers): Adjust.
21217
21218 2001-12-10 Akim Demaille <akim@epita.fr>
21219
21220 * src/LR0.c (augment_automaton): Now that all states have shifts,
21221 merge the two cases addition shifts to the initial state.
21222
21223 2001-12-10 Akim Demaille <akim@epita.fr>
21224
21225 * src/lalr.c (set_state_table): Move to...
21226 * src/LR0.c: here.
21227 * src/lalr.c (lalr): Don't call it...
21228 * src/LR0.c (generate_states): do it.
21229 * src/LR0.h (first_state): Remove, only the table is used.
21230
21231 2001-12-10 Akim Demaille <akim@epita.fr>
21232
21233 * src/LR0.h (first_shift, first_reduction): Remove.
21234 * src/lalr.c: Don't use first_shift: find shifts through the
21235 states.
21236
21237 2001-12-10 Akim Demaille <akim@epita.fr>
21238
21239 * src/LR0.c: Attach shifts to states as soon as they are
21240 computed.
21241 * src/lalr.c (set_state_table): Instead of assigning shifts to
21242 state, just assert that the mapping was properly done.
21243
21244 2001-12-10 Akim Demaille <akim@epita.fr>
21245
21246 * src/LR0.c (insert_start_shift): Rename as...
21247 (insert_start_shifting_state): this.
21248 (insert_eof_shifting_state, insert_accepting_state): New.
21249 (augment_automaton): Adjust.
21250 Better locality of the variables.
21251 When looking if the start_symbol is shifted from the initial
21252 state, using `while (... symbol != start_symbol ...)' sounds
21253 better than `while (... symbol < start_symbol ...)': If fail
21254 to see how the order between symbols could be relevant!
21255
21256 2001-12-10 Akim Demaille <akim@epita.fr>
21257
21258 * src/getargs.h: Don't declare `spec_name_prefix' and
21259 `spec_file_prefix', declared by src/files.h.
21260 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
21261 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
21262 * src/output.c (prepare): Adjust.
21263 * src/reader.c (symbols_output): Likewise.
21264 * src/vmsgetargs.c: Vaguely adjust, but who cares?
21265
21266 2001-12-10 Akim Demaille <akim@epita.fr>
21267
21268 * src/muscle_tab.c (muscle_init): NULL is a better default than
21269 `"0"'.
21270
21271 2001-12-10 Akim Demaille <akim@epita.fr>
21272
21273 * src/reader.c (reader): Calling symbols_output once is enough.
21274
21275 2001-12-10 Akim Demaille <akim@epita.fr>
21276
21277 Now that states have a complete set of members, the linked list of
21278 reductions is useless: just fill directly the state's reductions
21279 member.
21280
21281 * src/state.h (struct reductions): Remove member `number' and
21282 `next'.
21283 * src/LR0.c (first_reduction, last_reduction): Remove.
21284 (save_reductions): Don't link the new reductions, store them in
21285 this_state.
21286 * src/lalr.c (set_state_table): No need to attach reductions to
21287 states, it's already done.
21288 * src/output.c (output_actions): No longer free the shifts, then
21289 the reductions, then the states: free all the states and their
21290 members.
21291
21292 2001-12-10 Akim Demaille <akim@epita.fr>
21293
21294 * src/options.c (OPTN, DRTV, BOTH): New.
21295 (option_table): Use them.
21296
21297 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
21298 the job of system.h.
21299 * src/options.c: Don't include stdio.h and xalloc.h for the same
21300 reasons.
21301
21302 2001-12-10 Akim Demaille <akim@epita.fr>
21303
21304 * src/output.c (output, prepare): Make sure the values of the
21305 muscles `action' and `prologue' are 0-terminated.
21306
21307 2001-12-10 Akim Demaille <akim@epita.fr>
21308
21309 Clean up GCC warnings.
21310
21311 * src/reader.c (copy_action): `buf' is not used.
21312 (parse_skel_decl): Be static.
21313 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
21314 * src/options.h (create_long_option_table): Have a real prototype.
21315 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
21316 (hash_delete_at): Return const void *.
21317 Adjust casts to preserve the const.
21318
21319 2001-12-10 Akim Demaille <akim@epita.fr>
21320
21321 * configure.in: Require 2.52g.
21322 M4 is not needed, but AUTOM4TE is.
21323 * m4/m4.m4: Remove.
21324 * tests/Makefile.am: Adjust.
21325
21326 2001-12-10 Akim Demaille <akim@epita.fr>
21327
21328 One structure for states is enough, even though theoretically
21329 there are LR(0) states and LALR(1) states.
21330
21331 * src/lalr.h (state_t): Remove.
21332 (state_table): Be state_t **, not state_t *.
21333 * src/state.h (core, CORE_ALLOC): Rename as...
21334 (state_t, STATE_ALLOC): this.
21335 Add the LALR(1) members: shifts, reductions, errs.
21336 * src/LR0.c (state_table): Rename as...
21337 (state_hash): this, to avoid name clashes with the global
21338 `state_table'.
21339 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
21340 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
21341
21342 2001-12-10 Akim Demaille <akim@epita.fr>
21343
21344 Bison dumps core on bash.y.
21345 Reported by Pascal Bart.
21346
21347 * src/warshall.c (bitmatrix_print): New.
21348 (TC): Use it.
21349 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
21350 j must be the outer loop.
21351 * tests/regression.at (Broken Closure): New.
21352
21353 2001-12-05 Akim Demaille <akim@epita.fr>
21354
21355 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
21356 its argument.
21357 Reported by Peter Hamorsky.
21358
21359 2001-12-05 Akim Demaille <akim@epita.fr>
21360
21361 * src/conflicts.c (err_table): Remove.
21362 (resolve_sr_conflict): Adjust.
21363 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
21364 Rename as...
21365 (state_t.reductions, state_t.shifts): this.
21366
21367 2001-12-05 Akim Demaille <akim@epita.fr>
21368
21369 * src/reduce.c (reduce_grammar_tables): No longer disable the
21370 removal of useless rules via CPP but via `if (0)', so that the
21371 compiler still check the code is valid.
21372 For instance, it should have noticed `rline' no longer exists: use
21373 the `line' member of rule_t.
21374 * src/gram.c (dummy, rline): Remove, unused.
21375
21376 2001-12-05 Akim Demaille <akim@epita.fr>
21377
21378 * src/output.c (pack_vector): Use assert, not berror.
21379 * src/main.c (berror): Remove, unused.
21380
21381 2001-12-05 Akim Demaille <akim@epita.fr>
21382
21383 New experimental feature: if --verbose --trace output all the
21384 items of a state, not only its kernel.
21385
21386 * src/print.c (print_core): If `trace_flag', then invoke closure
21387 before outputting the items of the state (print_core is no longer
21388 a correct name them).
21389 (print_results): Invoke new_closure/free_closure if needed.
21390
21391 2001-12-05 Akim Demaille <akim@epita.fr>
21392
21393 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
21394 * src/closure.c, src/closure.h (itemsetsize): Rename as...
21395 (nitemset): for consistency with the rest of the project.
21396
21397 2001-12-05 Akim Demaille <akim@epita.fr>
21398
21399 * src/closure.c (print_closure): Improve.
21400 (closure): Use it for printing input and output.
21401
21402 2001-12-05 Akim Demaille <akim@epita.fr>
21403
21404 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
21405 indexed by nonterminals.
21406
21407 2001-12-05 Akim Demaille <akim@epita.fr>
21408
21409 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
21410 what it was!).
21411 * src/warshall.h: Remove accidental duplication of the content.
21412
21413 2001-12-05 Akim Demaille <akim@epita.fr>
21414
21415 * src/closure.c (set_fderives): De-obfuscate.
21416
21417 2001-12-05 Akim Demaille <akim@epita.fr>
21418
21419 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
21420
21421 2001-12-05 Akim Demaille <akim@epita.fr>
21422
21423 * src/closure.c (set_firsts): De-obfuscate.
21424
21425 2001-12-05 Akim Demaille <akim@epita.fr>
21426
21427 * src/output.c (action_row): De-obfuscate
21428 using the good o' techniques: arrays not pointers, variable
21429 locality, BITISSET, RESETBIT etc.
21430
21431 2001-12-05 Akim Demaille <akim@epita.fr>
21432
21433 Pessimize the code to simplify it: from now on, all the states
21434 have a valid SHIFTS, which NSHIFTS is possibly 0.
21435
21436 * src/LR0.c (shifts_new): Be global and move to..
21437 * src/state.c, src/state.h: here.
21438 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
21439 * src/print_graph: Adjust.
21440
21441 2001-12-05 Akim Demaille <akim@epita.fr>
21442
21443 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
21444 * src/conflicts.c: Use it.
21445 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
21446 incorrectly ``simplified''.
21447
21448 2001-12-05 Akim Demaille <akim@epita.fr>
21449
21450 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
21451 using the good o' techniques: arrays not pointers, variable
21452 locality, BITISSET, RESETBIT etc.
21453
21454 2001-12-05 Akim Demaille <akim@epita.fr>
21455
21456 * src/state.h (SHIFT_SYMBOL): New.
21457 * src/conflicts.c: Use it to deobfuscate.
21458
21459 2001-12-05 Akim Demaille <akim@epita.fr>
21460
21461 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
21462 (print_reductions): De-obfuscate using the good o' techniques:
21463 arrays not pointers, variable locality, BITISSET.
21464
21465 2001-12-05 Akim Demaille <akim@epita.fr>
21466
21467 * src/conflicts.c (print_reductions): Arrays, not pointers.
21468 Use BITISSET.
21469
21470 2001-12-05 Akim Demaille <akim@epita.fr>
21471
21472 * src/conflicts.c (print_reductions): Pessimize, but clarify.
21473
21474 2001-12-05 Akim Demaille <akim@epita.fr>
21475
21476 * src/conflicts.c (print_reductions): Improve variable locality.
21477
21478 2001-12-05 Akim Demaille <akim@epita.fr>
21479
21480 * src/conflicts.c (print_reductions): Pessimize, but clarify.
21481
21482 2001-12-05 Akim Demaille <akim@epita.fr>
21483
21484 * src/conflicts.c (print_reductions): Improve variable locality.
21485
21486 2001-12-05 Akim Demaille <akim@epita.fr>
21487
21488 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
21489 * src/lalr.c: Use them.
21490
21491 2001-12-05 Akim Demaille <akim@epita.fr>
21492
21493 * src/LR0.c (augment_automaton): Formatting changes.
21494 Better variable locality.
21495
21496 2001-12-05 Akim Demaille <akim@epita.fr>
21497
21498 * src/lalr.c (matrix_print): New.
21499 (transpose): Use it.
21500 Use arrays instead of pointers.
21501
21502 2001-12-05 Akim Demaille <akim@epita.fr>
21503
21504 * src/lalr.c (maxrhs): Move to...
21505 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
21506 * src/lalr.c (build_relations): Adjust.
21507
21508 2001-12-05 Akim Demaille <akim@epita.fr>
21509
21510 * src/lalr.c (transpose): Free the memory allocated to the
21511 argument, as it is replaced by the results by the unique caller.
21512 (build_relations): Merely invoke transpose: it handles the memory
21513 deallocation.
21514 Improve variable locality.
21515 Avoid variables used as mere abbreviations.
21516 (compute_lookaheads): Use arrays instead of pointers.
21517
21518 2001-12-05 Akim Demaille <akim@epita.fr>
21519
21520 * src/lalr.c (initialize_F): Improve variable locality.
21521 Avoid variables used as mere abbreviations.
21522
21523 2001-12-05 Akim Demaille <akim@epita.fr>
21524
21525 * src/derives.c (print_derives): Display the ruleno.
21526 * src/lalr.c (initialize_F, transpose): Better variable locality
21527 to improve readability.
21528 Avoid variables used as mere abbreviations.
21529
21530 2001-12-05 Akim Demaille <akim@epita.fr>
21531
21532 * src/lalr.c (traverse): Use arrays instead of pointers.
21533
21534 2001-12-05 Akim Demaille <akim@epita.fr>
21535
21536 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
21537 the handling of squeue.
21538 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
21539
21540 2001-12-05 Akim Demaille <akim@epita.fr>
21541
21542 Because useless nonterminals are now kept alive (instead of being
21543 `destroyed'), we now sometimes examine them, and store information
21544 related to them. Hence we need to know their number, and adjust
21545 memory allocations.
21546
21547 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
21548 static.
21549 * src/LR0.c (allocate_itemsets): The memory allocated to
21550 `symbol_count' was used for two different purpose: once to count
21551 the number of occurrences of each symbol, and later reassigned to
21552 `shift_symbol', containing the symbol that can be shifted from a
21553 given state.
21554 Deobfuscate, i.e., allocate, use and free `symbol_count' here
21555 only, and...
21556 (new_itemsets): Allocate `shift_symbol' here.
21557 (allocate_itemsets): symbol_count includes useless nonterminals.
21558 Make room for them.
21559 (free_storage): Use `free', not `XFREE', for pointers that cannot
21560 be null.
21561
21562 2001-12-05 Akim Demaille <akim@epita.fr>
21563
21564 * src/nullable.c (set_nullable): Deobfuscate the handling of
21565 ritem.
21566 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
21567
21568 2001-12-05 Akim Demaille <akim@epita.fr>
21569
21570 * src/gram.c, src/gram.h (ritem_print): New.
21571 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
21572 (This useless function was defined only to work around VMS linkers
21573 that can't handle compilation units with variables only).
21574 * src/reduce.c (dump_grammar): Use it to trace the construction of
21575 ritem.
21576
21577 2001-12-04 Paul Eggert <eggert@twinsun.com>
21578
21579 * src/bison.simple (union yyalloc): Change member names
21580 to be the same as the stack names.
21581 (yyparse): yyptr is now union yyalloc *, not char *.
21582 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
21583 and may generate better code on some machines.
21584 (yystpcpy): Use prototype if __STDC__ is defined, not just
21585 if __cplusplus is defined.
21586
21587 2001-11-30 Akim Demaille <akim@epita.fr>
21588
21589 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
21590 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
21591 Gettext doesn't compile cleanly, and dies with -Werror.
21592 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
21593 Include WARNING_CFLAGS here.
21594 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
21595 before being defined.
21596
21597 2001-11-27 Paul Eggert <eggert@twinsun.com>
21598
21599 * lib/quotearg.h (quotearg_n, quotearg_n_style):
21600 First arg is int, not unsigned.
21601 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
21602 (SIZE_MAX, UINT_MAX): New macros.
21603 (quotearg_n_options): Abort if N is negative.
21604 Avoid overflow check on hosts where size_t is 64 bits and int
21605 is 32 bits, as overflow is impossible there.
21606 Fix off-by-one typo that caused unnecessary reallocation.
21607
21608 2001-11-29 Paul Eggert <eggert@twinsun.com>
21609
21610 Name space cleanup in generated parser.
21611
21612 * doc/bison.texinfo (Bison Parser): Discuss system headers
21613 and their effect on the user name space.
21614
21615 * src/bison.simple:
21616 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
21617 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
21618 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
21619
21620 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
21621 on user names when possible.
21622
21623 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
21624 Simplify test for whather <alloca.h> exists.
21625
21626 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
21627
21628 (<stdio.h>): Include if YYDEBUG.
21629
21630 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
21631 ! defined (yyoverflow) && ! defined (yymemcpy).
21632
21633 (yymemcpy, yyparse): Rename local variables as needed so that
21634 they all begin with 'yy'.
21635
21636 (yystrlen, yystpcpy): New functions.
21637
21638 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
21639 All uses changed.
21640
21641 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
21642 instead of relying on string.h functions. Use YYSTACK_ALLOC
21643 and YYSTACK_FREE instead of malloc and free.
21644
21645 2001-11-30 Akim Demaille <akim@epita.fr>
21646
21647 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
21648 before their first uses.
21649 (YYBISON, YYPURE): Move to the top of the output.
21650
21651 2001-11-30 Akim Demaille <akim@epita.fr>
21652
21653 * tests/reduce.at (Useless Nonterminals): Fix.
21654
21655 2001-11-30 Akim Demaille <akim@epita.fr>
21656
21657 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
21658 if body instead of `;' to pacify GCC's warnings.
21659
21660 2001-11-30 Akim Demaille <akim@epita.fr>
21661
21662 Instead of mapping the LHS of unused rules to -1, keep the LHS
21663 valid, but flag the rules as invalid.
21664
21665 * src/gram.h (rule_t): `useful' is a new member.
21666 * src/print.c (print_grammar): Adjust.
21667 * src/derives.c (set_derives): Likewise.
21668 * src/reader.c (packgram, reduce_output): Likewise.
21669 * src/reduce.c (reduce_grammar_tables): Likewise.
21670 * tests/reduce.at (Underivable Rules, Useless Rules): New.
21671
21672 2001-11-30 Akim Demaille <akim@epita.fr>
21673
21674 * src/reduce.c (reduce_output): Formatting changes.
21675 * src/print.c (print_results, print_grammar): Likewise.
21676 * tests/regression.at (Rule Line Numbers)
21677 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
21678
21679 2001-11-30 Akim Demaille <akim@epita.fr>
21680
21681 * src/reduce.c (nonterminals_reduce): Instead of throwing away
21682 useless nonterminals, move them at the end of the symbol arrays.
21683 (reduce_output): Adjust.
21684 * tests/reduce.at (Useless Nonterminals): Adjust.
21685
21686 2001-11-30 Akim Demaille <akim@epita.fr>
21687
21688 * src/reduce.c: Various comment/formatting changes.
21689 (nonterminals_reduce): New, extracted from...
21690 (reduce_grammar_tables): here.
21691 (reduce_grammar): Call nonterminals_reduce.
21692
21693 2001-11-29 Paul Eggert <eggert@twinsun.com>
21694
21695 * src/bison.simple (YYSTACK_REALLOC): Remove.
21696 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
21697 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
21698 New macros.
21699 (union yyalloc): New type.
21700 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
21701 an arbitrary restriction on hosts where size_t is wider than int.
21702
21703 (yyparse): Don't dump core if alloca or malloc fails; instead, report
21704 a parser stack overflow. Allocate just one block of memory for all
21705 three stacks, instead of allocating three blocks; this typically is
21706 faster and reduces fragmentation.
21707
21708 Do not limit the number of items in the stack to a value that fits
21709 in 'int', as this is an arbitrary limit on hosts with 64-bit
21710 size_t and 32-bit int.
21711
21712 2001-11-29 Marc Autret <autret_m@epita.fr>
21713
21714 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
21715 of defining YYERROR_VERBOSE.
21716 [AT_DATA]: $4 is now out of C declarations in the prologue.
21717
21718 2001-11-28 Marc Autret <autret_m@epita.fr>
21719
21720 * src/reader.c (parse_dquoted_param): New.
21721 (parse_skel_decl): Use it.
21722 * src/lex.h: Add its prototype.
21723 * src/lex.c (literalchar): Become not static.
21724
21725 2001-11-28 Marc Autret <autret_m@epita.fr>
21726
21727 * src/output.h: And put its extern declaration here.
21728 * src/output.c (error_verbose): Define here.
21729 (prepare): Echo name modification.
21730 * src/getargs.h: Clean its extern declaration.
21731 * src/getargs.c (error_verbose_flag): Remove.
21732 (getargs): Remove case 'e'.
21733 * src/options.c (option_table): 'error-verbose' is now seen as simple
21734 percent option.
21735 Include output.h.
21736
21737 * src/reader.c (read_declarations): Remove case tok_include.
21738 (parse_include_decl): Remove.
21739 * src/lex.h (token_t): Remove tok_include.
21740 * src/options.c (option_table): 'include' is now a simple command line
21741 option.
21742
21743 2001-11-28 Marc Autret <autret_m@epita.fr>
21744
21745 * src/bison.simple: Adjust muscle names.
21746 * src/muscle_tab.c (muscle_init): Also rename the muscles.
21747 * src/output.c (prepare): s/_/-/ for the muscles names.
21748 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
21749
21750 2001-11-28 Marc Autret <autret_m@epita.fr>
21751
21752 * src/bison.simple: Fix debug.
21753 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
21754
21755 2001-11-28 Akim Demaille <akim@epita.fr>
21756
21757 * src/LR0.c (shifts_new): New.
21758 (save_shifts, insert_start_shift, augment_automaton): Use it.
21759
21760 2001-11-28 Akim Demaille <akim@epita.fr>
21761
21762 * src/closure.c (closure): `b' and `ruleno' denote the same value:
21763 keep ruleno only.
21764
21765 2001-11-28 Akim Demaille <akim@epita.fr>
21766
21767 * src/closure.c (closure): Instead of looping over word in array
21768 then bits in words, loop over bits in array.
21769
21770 2001-11-28 Akim Demaille <akim@epita.fr>
21771
21772 * src/closure.c (closure): No longer optimize the special case
21773 where all the bits of `ruleset[r]' are set to 0, to make the code
21774 clearer.
21775
21776 2001-11-28 Akim Demaille <akim@epita.fr>
21777
21778 * src/closure.c (closure): `r' and `c' are new variables, used to
21779 de-obfuscate accesses to RULESET and CORE.
21780
21781 2001-11-28 Akim Demaille <akim@epita.fr>
21782
21783 * src/reduce.c (reduce_print): Use ngettext.
21784 (dump_grammar): Improve the trace accuracy.
21785
21786 2001-11-28 Akim Demaille <akim@epita.fr>
21787
21788 * src/reduce.c (dump_grammar): Don't translate trace messages.
21789
21790 2001-11-28 Akim Demaille <akim@epita.fr>
21791
21792 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
21793 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
21794 as all tags are free'ed afterwards.
21795 From Enrico Scholz.
21796
21797 2001-11-27 Paul Eggert <eggert@twinsun.com>
21798
21799 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
21800 use alloca when we didn't want to, and vice versa.
21801
21802 2001-11-27 Marc Autret <autret_m@epita.fr>
21803
21804 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
21805 initialization.
21806 * src/output.c (prepare): Remove its update.
21807
21808 2001-11-27 Marc Autret <autret_m@epita.fr>
21809
21810 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
21811 Use %error-verbose.
21812
21813 2001-11-27 Marc Autret <autret_m@epita.fr>
21814
21815 * src/bison.simple: Remove YYERROR_VERBOSE using.
21816 Use %%error_verbose.
21817 (yyparse): Likewise.
21818 * src/output.c (prepare): Give its final value.
21819 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
21820 * src/getargs.h: Add its extern declaration.
21821 * src/getargs.c (error_verbose_flag): New int.
21822 (getargs): Update to catch new case.
21823 * src/options.c (option_table): 'error-verbose' is a new option.
21824 (shortopts): Update.
21825
21826 2001-11-27 Akim Demaille <akim@epita.fr>
21827
21828 * src/system.h: Use intl/libgettext.h.
21829 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
21830
21831 2001-11-27 Akim Demaille <akim@epita.fr>
21832
21833 * tests/torture.at (Exploding the Stack Size with Malloc):
21834 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
21835
21836 2001-11-27 Akim Demaille <akim@epita.fr>
21837
21838 * src/files.c: Include error.h.
21839 Reported by Hans Aberg.
21840
21841 2001-11-26 Marc Autret <autret_m@epita.fr>
21842
21843 * src/reader.c (parse_include_decl): New, not yet implemented.
21844 (read_declarations): Add case tok_include.
21845 * src/getargs.h (include): Add its extern definition.
21846 * src/getargs.c (include): New const char *.
21847 (getargs): Add case '-I'.
21848 * src/options.c (option_table): Add include as command line and
21849 percent option.
21850 * src/lex.h (token_t): Add tok_include.
21851
21852 2001-11-26 Akim Demaille <akim@epita.fr>
21853
21854 * src/reader.c (readgram): Make sure rules for mid-rule actions
21855 have a lineno equal to that of their host rule.
21856 Reported by Hans Aberg.
21857 * tests/regression.at (Rule Line Numbers): New.
21858
21859 2001-11-26 Akim Demaille <akim@epita.fr>
21860
21861 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
21862 size_ts.
21863
21864 2001-11-26 Akim Demaille <akim@epita.fr>
21865
21866 * src/complain.c, src/complain.h (error): Remove, provided by
21867 lib/error.[ch].
21868
21869 2001-11-26 Akim Demaille <akim@epita.fr>
21870
21871 * src/reader.c (read_declarations): Don't abort on tok_illegal,
21872 issue an error message.
21873 * tests/regression.at (Invalid %directive): New.
21874 Reported by Hans Aberg.
21875
21876 2001-11-26 Akim Demaille <akim@epita.fr>
21877
21878 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
21879 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
21880
21881 2001-11-26 Akim Demaille <akim@epita.fr>
21882
21883 * src/conflicts.c (conflicts_print): Don't complain at all when
21884 there are no reduce/reduce conflicts, and as many shift/reduce
21885 conflicts as expected.
21886 * tests/regression.at (%expect right): Adjust.
21887
21888 2001-11-23 Akim Demaille <akim@epita.fr>
21889
21890 * lib/alloca.c: Update, from fileutils.
21891
21892 2001-11-23 Akim Demaille <akim@epita.fr>
21893
21894 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
21895
21896 2001-11-23 Akim Demaille <akim@epita.fr>
21897
21898 * src/system.h: Include alloca.h.
21899 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
21900
21901 2001-11-23 Akim Demaille <akim@epita.fr>
21902
21903 * src/print_graph.c (print_actions): Remove `rule', unused.
21904 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
21905 pacify GCC's signed < unsigned warnings.
21906 * src/closure.c (itemsetsize): Likewise.
21907 * src/reader.c (symbol_list_new): Static.
21908
21909 2001-11-23 Akim Demaille <akim@epita.fr>
21910
21911 Attaching lineno to buckets is stupid, since only one copy of each
21912 symbol is kept, only the line of the first occurrence is kept too.
21913
21914 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
21915 * src/reader.c (rline_allocated): Remove, unused.
21916 (symbol_list): Have a `line' member.
21917 (symbol_list_new): New.
21918 (readgram): Use it.
21919 * src/print.c (print_grammar): Output the rule line numbers.
21920 * tests/regression.at (Solved SR Conflicts)
21921 (Unresolved SR Conflicts): Adjust.
21922 Reported by Hans Aberg.
21923
21924 2001-11-22 Marc Autret <autret_m@epita.fr>
21925
21926 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
21927
21928 2001-11-22 Marc Autret <autret_m@epita.fr>
21929
21930 * src/muscle_tab.c (muscle_init): Remove initialization of
21931 skeleton muscle.
21932 * src/output.c (output_master_parser): Do it here.
21933
21934 2001-11-20 Akim Demaille <akim@epita.fr>
21935
21936 * po/sv.po: New.
21937 * configure.in (ALL_LINGUAS): Adjust.
21938 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
21939 longer contains strings to translate.
21940
21941 2001-11-19 Akim Demaille <akim@epita.fr>
21942
21943 * src/conflicts.c (conflicts_print): Add a missing \n.
21944
21945 2001-11-19 Akim Demaille <akim@epita.fr>
21946
21947 * src/nullable.c (nullable_print): New.
21948 (set_nullable): Call it when tracing.
21949 Better locality of variables.
21950
21951 2001-11-19 Akim Demaille <akim@epita.fr>
21952
21953 * src/print.c (print_actions): Better locality of variables.
21954
21955 2001-11-19 Akim Demaille <akim@epita.fr>
21956
21957 * src/derives.c (print_derives): Fix and enrich.
21958 * src/closure.c (print_fderives): Likewise.
21959
21960 2001-11-19 Akim Demaille <akim@epita.fr>
21961
21962 * src/closure.c (itemsetend): Remove, replaced with...
21963 (itemsetsize): new.
21964
21965 2001-11-19 Akim Demaille <akim@epita.fr>
21966
21967 * src/LR0.c (kernel_end): Remove, replaced with...
21968 (kernel_size): new.
21969
21970 2001-11-19 Akim Demaille <akim@epita.fr>
21971
21972 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
21973 to clarify.
21974
21975 2001-11-19 Akim Demaille <akim@epita.fr>
21976
21977 * src/closure.c (closure): Use arrays instead of pointers to clarify.
21978
21979 2001-11-19 Akim Demaille <akim@epita.fr>
21980
21981 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
21982 trace messages.
21983 * src/LR0.c: Likewise.
21984 (allocate_itemsets): Use arrays instead of pointers to clarify.
21985
21986 2001-11-19 Akim Demaille <akim@epita.fr>
21987
21988 * src/getargs.c (statistics_flag): Replace with...
21989 (trace_flag): New.
21990 (longopts): Accept --trace instead of --statistics.
21991 * src/getargs.h, src/options.c: Adjust.
21992 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
21993 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
21994
21995 2001-11-19 Akim Demaille <akim@epita.fr>
21996
21997 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
21998 pointers to clarify the code.
21999 (save_reductions, save_shifts): Factor common parts of alternatives.
22000
22001 2001-11-19 Akim Demaille <akim@epita.fr>
22002
22003 * src/LR0.c (new_state, get_state): Complete TRACE code.
22004 * src/closure.c: Include `reader.h' to get `tags', needed by the
22005 trace code.
22006 Rename the conditional DEBUG as TRACE.
22007 Output consistently TRACEs to stderr, not stdout.
22008 * src/derives.c: Likewise.
22009 * src/reduce.c: (inaccessable_symbols): Using if is better style
22010 than goto.
22011 Use `#if TRACE' instead of `#if 0' for tracing code.
22012
22013 2001-11-19 Akim Demaille <akim@epita.fr>
22014
22015 * src/system.h (LIST_FREE, shortcpy): New.
22016 * src/LR0.c: Use them.
22017 * src/output.c (free_itemsets, free_reductions, free_shifts):
22018 Remove, replaced by LIST_FREE.
22019
22020 2001-11-19 Akim Demaille <akim@epita.fr>
22021
22022 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
22023 (REDUCTIONS_ALLOC): New.
22024 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
22025 allocation.
22026
22027 2001-11-19 Akim Demaille <akim@epita.fr>
22028
22029 * src/LR0.c (new_state): Complete trace code.
22030 * src/nullable.c (set_nullable): Don't translate traces.
22031
22032 2001-11-19 Akim Demaille <akim@epita.fr>
22033
22034 * src/print_graph.c (print_core): Better locality of variables.
22035 * src/print.c (print_core): Likewise.
22036
22037 2001-11-19 Akim Demaille <akim@epita.fr>
22038
22039 * src/vcg.c: You do the output, so you are responsible of the
22040 handling of VCG syntax, in particular: use quotearg.
22041 * src/print_graph.c: Don't.
22042 (print_actions): Don't output the actions as part of the nodes,
22043 since that's the job of the edges.
22044 (print_state): Don't output by hand: fill the node description,
22045 and ask for its output.
22046
22047 2001-11-19 Akim Demaille <akim@epita.fr>
22048
22049 * src/bison.simple (yyparse): When verbosely reporting an error,
22050 no longer put additional quotes around token names.
22051 * tests/calc.at: Adjust.
22052
22053 2001-11-19 Akim Demaille <akim@epita.fr>
22054
22055 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
22056 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
22057 * src/output.c: Adjust.
22058
22059 2001-11-19 Akim Demaille <akim@epita.fr>
22060
22061 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
22062 (rule_t): this.
22063 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
22064
22065 2001-11-19 Akim Demaille <akim@epita.fr>
22066
22067 * src/gram.h (rule_t): New.
22068 (rule_table): New.
22069 (rrhs, rlhs): Remove, part of state_t.
22070 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
22071 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
22072 * src/reader.c, src/reduce.c: Adjust.
22073
22074 2001-11-19 Akim Demaille <akim@epita.fr>
22075
22076 * src/reader.c (symbols_output): New, extracted from...
22077 (packsymbols): Here.
22078 (reader): Call it.
22079
22080 2001-11-19 Akim Demaille <akim@epita.fr>
22081
22082 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
22083 (maxrhs): this new function.
22084
22085 2001-11-19 Akim Demaille <akim@epita.fr>
22086
22087 * src/lalr.c (F): New macro to access the variable F.
22088 Adjust.
22089
22090 2001-11-19 Akim Demaille <akim@epita.fr>
22091
22092 * src/lalr.h (LA): New macro to access the variable LA.
22093 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22094 * src/lalr.c: Adjust.
22095
22096 2001-11-19 Akim Demaille <akim@epita.fr>
22097
22098 * src/lalr.c (initialize_LA): Only initialize LA. Let...
22099 (set_state_table): handle the `lookaheads' members.
22100
22101 2001-11-19 Akim Demaille <akim@epita.fr>
22102
22103 * src/lalr.h (lookaheads): Removed array, whose contents is now
22104 a member of...
22105 (state_t): this structure.
22106 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22107 Adjust.
22108
22109 2001-11-19 Akim Demaille <akim@epita.fr>
22110
22111 * src/lalr.h (consistent): Removed array, whose contents is now
22112 a member of...
22113 (state_t): this structure.
22114 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22115 Adjust.
22116
22117 2001-11-19 Akim Demaille <akim@epita.fr>
22118
22119 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
22120 contents are now members of...
22121 (state_t): this structure.
22122 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22123 Adjust.
22124
22125 2001-11-19 Akim Demaille <akim@epita.fr>
22126
22127 * src/lalr.h (state_t): New.
22128 (state_table): Be a state_t * instead of a core **.
22129 (accessing_symbol): Remove, part of state_t.
22130 * src/lalr.c: Adjust.
22131 (set_accessing_symbol): Merge into...
22132 (set_state_table): this.
22133 * src/print_graph.c, src/conflicts.c: Adjust.
22134
22135 2001-11-14 Akim Demaille <akim@epita.fr>
22136
22137 * tests/calc.at, tests/output.at, tests/regression.at,
22138 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
22139 now the tests are run in private dirs, therefore AC_CLEANUP and
22140 family can be simplified to 0-ary.
22141 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
22142 use abs. path to find config.h.
22143 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
22144 stderr, there can be way too much random noise.
22145 Instead pass -Werror to GCC and rely on the exit status.
22146 Reported by Wolfram Wagner.
22147
22148 2001-11-14 Akim Demaille <akim@epita.fr>
22149
22150 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
22151 defined only if yyoverflow is defined, to avoid `warning: unused
22152 variable `yyvs1''.
22153 Reported by The Test Suite.
22154
22155 2001-11-14 Akim Demaille <akim@epita.fr>
22156
22157 * src/print.c: Include reduce.h.
22158 Reported by Hans Aberg.
22159
22160 2001-11-14 Akim Demaille <akim@epita.fr>
22161
22162 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
22163 Revert a previous patch: these are really const.
22164 * src/conflicts.c (conflict_report): Additional useless pair of
22165 braces to pacify GCC's warnings for `if () if () {} else {}'.
22166 * src/lex.c (parse_percent_token): Replace equal_offset with
22167 arg_offset.
22168 arg is const.
22169 Be sure to strdup `arg' when used, since there is no reason for
22170 token_buffer not to change.
22171
22172 2001-11-14 Akim Demaille <akim@epita.fr>
22173
22174 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
22175 definition.
22176 * src/main.c (main): Use them.
22177 Suggested by Hans Aberg.
22178
22179 2001-11-12 Akim Demaille <akim@epita.fr>
22180
22181 * src/system.h (ngettext): Now that we use ngettext, be sure to
22182 provide a default definition when NLS are not used.
22183
22184 2001-11-12 Akim Demaille <akim@epita.fr>
22185
22186 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
22187 Use @kbd to denote user input.
22188 (Language and Grammar): ANSIfy the example.
22189 Adjust its layout for info/notinfo.
22190 (Location Tracking Calc): Output error messages to stderr.
22191 Output locations in a more GNUtically correct way.
22192 Fix a couple of Englishos.
22193 Adjust @group/@end group pairs.
22194
22195 2001-11-12 Akim Demaille <akim@epita.fr>
22196
22197 %expect was not functioning at all.
22198
22199 * src/conflicts.c (expected_conflicts): Set to -1.
22200 (conflict_report): Use ngettext.
22201 (conflicts_print): Check %expect and make its violation an error.
22202 * doc/bison.texinfo (Expect Decl): Adjust.
22203 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
22204 * tests/regression.at (%expect not enough, %expect right)
22205 (%expect too much): New.
22206
22207 2001-11-12 Akim Demaille <akim@epita.fr>
22208
22209 * tests/regression.at (Conflicts): Rename as...
22210 (Unresolved SR Conflicts): this.
22211 (Solved SR Conflicts): New.
22212
22213 2001-11-12 Akim Demaille <akim@epita.fr>
22214
22215 * src/reduce.c (print_results): Rename as...
22216 (reduce_output): This.
22217 Output to OUT, passed as argument, instead of output_obstack.
22218 (dump_grammar): Likewise.
22219 (reduce_free): New.
22220 Also free V1.
22221 (reduce_grammar): No longer call reduce_output, since...
22222 * src/print.c (print_results): do it.
22223 * src/main.c (main): Call reduce_free;
22224
22225 2001-11-12 Akim Demaille <akim@epita.fr>
22226
22227 * src/conflicts.c (print_reductions): Accept OUT as argument.
22228 Output to it, not to output_obstack.
22229 * src/print.c (print_actions): Adjust.
22230
22231 2001-11-12 Akim Demaille <akim@epita.fr>
22232
22233 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
22234 the result instead of using...
22235 (src_total, rrc_total, src_count, rrc_count): Remove.
22236 (any_conflicts): Remove.
22237 (print_conflicts): Split into...
22238 (conflicts_print, conflicts_output): New.
22239 * src/conflicts.h: Adjust.
22240 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
22241 * src/print.c (print_grammar): Issue `\n' between two rules.
22242 * tests/regression.at (Conflicts): New.
22243 Reported by Tom Lane.
22244
22245 2001-11-12 Akim Demaille <akim@epita.fr>
22246
22247 * tests/regression.at (Invalid input): Remove, duplicate with
22248 ``Invalid input: 1''.
22249
22250 2001-11-12 Akim Demaille <akim@epita.fr>
22251
22252 * tests/torture.at (AT_DATA_STACK_TORTURE)
22253 (Exploding the Stack Size with Alloca)
22254 (Exploding the Stack Size with Malloc): New.
22255
22256 2001-11-12 Akim Demaille <akim@epita.fr>
22257
22258 * src/bison.simple (YYSTACK_REALLOC): New.
22259 (yyparse) [!yyoverflow]: Use it and free the old stack.
22260 Reported by Per Allansson.
22261
22262 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
22263
22264 * src/bison.simple: Define type yystype instead of YYSTYPE, and
22265 define CPP macro, which substitute YYSTYPE by yystype.
22266 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
22267 with yyltype/YYLTYPE. This allows inclusion of the generated
22268 header within the parser if the compiler, such as GGC, accepts
22269 multiple equivalent #defines.
22270 From Akim.
22271
22272 2001-11-05 Akim Demaille <akim@epita.fr>
22273
22274 * src/reader.c (symbols_output): New, extracted from...
22275 (packsymbols): here.
22276 (reader): Adjust.
22277
22278 2001-11-05 Akim Demaille <akim@epita.fr>
22279
22280 * src/lex.c (parse_percent_token): s/quotearg/quote/.
22281
22282 2001-11-05 Akim Demaille <akim@epita.fr>
22283
22284 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
22285 pattern.
22286
22287 2001-11-05 Akim Demaille <akim@epita.fr>
22288
22289 * src/options.h (struct option_table_struct): set_flags is void*.
22290 * src/options.c (longopts): Support `--output' and `%output'.
22291 (usage): Adjust.
22292 * src/lex.h (tok_setopt): Remove, replaced with...
22293 (tok_intopt, tok_stropt): these new guys.
22294 * src/lex.c (getopt.h): Not needed.
22295 (token_buffer, unlexed_token_buffer): Not const.
22296 (percent_table): Promote `-' over `_' in directive names.
22297 Active `%name-prefix', `file-prefix', and `output'.
22298 (parse_percent_token): Accept possible arguments to directives.
22299 Promote `-' over `_' in directive names.
22300
22301 2001-11-04 Akim Demaille <akim@epita.fr>
22302
22303 * doc/bison.texinfo (Decl Summary): Split the list into
22304 `directives for grammars' and `directives for bison'.
22305 Sort'em.
22306 Add description of `%name-prefix', `file-prefix', and `output'.
22307 Promote `-' over `_' in directive names.
22308 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
22309 Simplify the description of `--name-prefix'.
22310 Promote `-' over `_' in directive names.
22311 Promote `--output' over `--output-file'.
22312 Fix the description of `--defines'.
22313 * tests/output.at: Exercise %file-prefix and %output.
22314
22315 2001-11-02 Akim Demaille <akim@epita.fr>
22316
22317 * doc/refcard.tex: Update.
22318
22319 2001-11-02 Akim Demaille <akim@epita.fr>
22320
22321 * src/symtab.h (SUNDEF): New.
22322 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
22323 stand for `uninitialized', instead of 0.
22324 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
22325 * src/lex.c (lex): Adjust.
22326
22327 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
22328 Number it 0.
22329 Let yylex return it instead of a plain 0.
22330 Reported by Dick Streefland.
22331
22332 2001-11-02 Akim Demaille <akim@epita.fr>
22333
22334 * tests/regression.at (Mixing %token styles): New test.
22335
22336 2001-11-02 Akim Demaille <akim@epita.fr>
22337
22338 * src/reader.c (parse_thong_decl): Formatting changes.
22339 (token_translations_init): New, extracted from...
22340 (packsymbols): Here.
22341 Adjust.
22342
22343 2001-11-01 Akim Demaille <akim@epita.fr>
22344
22345 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
22346 Check that `9foo.y' produces correct cpp guards.
22347 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
22348 guards.
22349 Reported by Wwp.
22350
22351 2001-11-01 Akim Demaille <akim@epita.fr>
22352
22353 * tests/regression.at (Invalid input: 2): New.
22354 * src/lex.c (unlexed_token_buffer): New.
22355 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
22356 too.
22357 Reported by Wwp.
22358
22359 2001-11-01 Akim Demaille <akim@epita.fr>
22360
22361 * tests/calc.at: Catch up with 1.30.
22362 * configure.in: Bump to 1.49a.
22363 Adjust to newer Autotest.
22364
22365 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
22366
22367 * src/conflicts.c: Move global variables rrc_total and src_total ...
22368 (print_conflicts): here.
22369 * src/output.c (output): Free global variable user_toknums.
22370 * src/lex.c (token_obstack): Become static.
22371
22372 2001-10-18 Akim Demaille <akim@epita.fr>
22373
22374 * tests/atlocal.in (GCC): Add.
22375 * tests/calc.at: s/m4_match/m4_bmatch/.
22376 s/m4_patsubst/m4_bpatsubst/.
22377 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
22378 * configure.in: AC_SUBST(GCC).
22379
22380 2001-10-14 Marc Autret <autret_m@epita.fr>
22381
22382 * src/options.c (create_long_option_table): Fix.
22383
22384 2001-10-10 Akim Demaille <akim@epita.fr>
22385
22386 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
22387
22388 2001-10-04 Akim Demaille <akim@epita.fr>
22389
22390 * src/reader.c (parse_union_decl): Push the caracters in
22391 union_obstack, not attrs_obstack.
22392
22393 2001-10-04 Akim Demaille <akim@epita.fr>
22394
22395 Merge in the branch 1.29.
22396
22397 * src/reader.c (packsymbols): Use a temporary obstack for
22398 `%%tokendef', since output_stack is already used elsewhere.
22399
22400 2001-10-02 Akim Demaille <akim@epita.fr>
22401
22402 Bump 1.29d.
22403
22404 2001-10-02 Akim Demaille <akim@epita.fr>
22405
22406 Version 1.29c.
22407
22408 2001-10-02 Akim Demaille <akim@epita.fr>
22409
22410 * tests/regression.at (Invalid CPP headers): New.
22411 From Alexander Belopolsky.
22412 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
22413
22414 2001-10-02 Akim Demaille <akim@epita.fr>
22415
22416 * tests/regression.at (Invalid input): New.
22417 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
22418 Reported by Shura.
22419
22420 2001-10-02 Akim Demaille <akim@epita.fr>
22421
22422 * tests/calc.at: Now that --debug works, the tests must be adjusted.
22423
22424 2001-10-02 Akim Demaille <akim@epita.fr>
22425
22426 * src/output.c (output_parser): Assert `skeleton'.
22427 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
22428 systems.
22429 From Shura.
22430
22431 2001-10-01 Marc Autret <autret_m@epita.fr>
22432
22433 * src/lex.h: Echo modifications.
22434 * src/lex.c (unlex): Parameter is now token_t.
22435 From Hans Aberg.
22436
22437 2001-10-01 Marc Autret <autret_m@epita.fr>
22438
22439 * src/main.c: Include lex.h.
22440 From Hans Aberg.
22441
22442 2001-09-29 Akim Demaille <akim@epita.fr>
22443
22444 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
22445
22446 2001-09-28 Akim Demaille <akim@epita.fr>
22447
22448 * tests/testsuite.at: Update to newer Autotest.
22449 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
22450
22451 2001-09-27 Akim Demaille <akim@epita.fr>
22452
22453 Position independent wrapper.
22454
22455 * tests/bison: Remove.
22456 * tests/bison.in: New.
22457 * configure.in: Adjust.
22458
22459 2001-09-27 Paul Eggert <eggert@twinsun.com>
22460
22461 Port quotearg fixes from tar 1.13.24.
22462
22463 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
22464 tm to be declared.
22465 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
22466 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
22467
22468 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
22469 * m4/mbrtowc.m4: New file.
22470 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
22471 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
22472
22473 2001-09-27 Akim Demaille <akim@epita.fr>
22474
22475 Bump to 1.29c.
22476
22477 2001-09-27 Akim Demaille <akim@epita.fr>
22478
22479 Version 1.29b.
22480
22481 2001-09-25 Akim Demaille <akim@epita.fr>
22482
22483 * src/system.h: Include `xalloc.h'.
22484 Remove it from the C files.
22485 * src/files.c (output_files): Free the obstacks.
22486 * src/lex.c (init_lex): Rename as...
22487 (lex_init): this.
22488 (lex_free): New.
22489 * src/main.c (main): Use it.
22490
22491 2001-09-24 Marc Autret <autret_m@epita.fr>
22492
22493 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
22494 to output informations in fout (FILE*).
22495 (open_graph, close_graph): Likewise.
22496 (output_graph, output_edge, output_node): Likewise.
22497 * src/vcg.h: Update function prototypes.
22498 * src/print_graph.c (print_graph): Open output graph file.
22499 (print_actions): Adjust.
22500 * src/files.h: Remove extern declaration.
22501 * src/files.c: Remove graph_obstack declaration.
22502 (open_files): Remove graph_obstack initialization.
22503 (output_files): Remove graph_obstack saving.
22504
22505 2001-09-24 Marc Autret <autret_m@epita.fr>
22506
22507 * src/files.c (compute_output_file_names): Fix.
22508
22509 2001-09-24 Marc Autret <autret_m@epita.fr>,
22510 Akim Demaille <akim@epita.fr>
22511
22512 * src/reader.c (reader): Remove call to free_symtab ().
22513 * src/main.c (main): Call it here.
22514 Include symtab.h.
22515 * src/conflicts.c (initialize_conflicts): Rename as...
22516 (solve_conflicts): this.
22517 * src/print.c (print_core, print_actions, print_state)
22518 (print_grammar): Dump to a file instead a `output_obstack'.
22519 (print_results): Dump `output_obstack', and then proceed with the
22520 FILE *.
22521 * src/files.c (compute_output_file_names, close_files): New.
22522 (output_files): Adjust.
22523 * src/main.c (main): Adjust.
22524
22525 2001-09-23 Marc Autret <autret_m@epita.fr>
22526
22527 * src/files.c (compute_header_macro): Computes header macro name
22528 from spec_defines_file when given.
22529
22530 2001-09-23 Marc Autret <autret_m@epita.fr>
22531
22532 * src/files.c (output_files): Add default extensions.
22533
22534 2001-09-22 Akim Demaille <akim@epita.fr>
22535
22536 * src/conflicts.c (finalize_conflicts): Rename as...
22537 (free_conflicts): this.
22538
22539 2001-09-22 Akim Demaille <akim@epita.fr>
22540
22541 * src/gram.c (gram_free): Rename back as...
22542 (dummy): this.
22543 (output_token_translations): Free `token_translations'.
22544 * src/symtab.c (free_symtab): Free the tag field.
22545
22546 2001-09-22 Akim Demaille <akim@epita.fr>
22547
22548 Remove `translations' as it is always set to true.
22549
22550 * src/gram.h: Adjust.
22551 * src/reader.c (packsymbols, parse_token_decl): Adjust
22552 * src/print.c (print_grammar): Adjust.
22553 * src/output.c (output_token_translations): Adjust.
22554 * src/lex.c (lex): Adjust.
22555 * src/gram.c: Be sure the set pointers to NULL.
22556 (dummy): Rename as...
22557 (gram_free): this.
22558
22559 2001-09-22 Akim Demaille <akim@epita.fr>
22560
22561 * configure.in: Invoke AM_LIB_DMALLOC.
22562 * src/system.h: Use dmalloc.
22563 * src/LR0.c: Be sure to have pointers initialized to NULL.
22564 (allocate_itemsets): Allocate kernel_items only if needed.
22565
22566 2001-09-22 Akim Demaille <akim@epita.fr>
22567
22568 * configure.in: Bump to 1.29b.
22569 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
22570 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
22571 need xmalloc.c in calc.y.
22572 From Pascal Bart.
22573
22574 2001-09-21 Akim Demaille <akim@epita.fr>
22575
22576 Version 1.29a.
22577 * Makefile.maint, config/config.guess, config/config.sub,
22578 * config/missing: Update from masters.
22579 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
22580 upon package.m4.
22581 * configure.in (ALL_LINGUAS): Add `tr'.
22582
22583 2001-09-21 Akim Demaille <akim@epita.fr>
22584
22585 * tests/Makefile.am (package.m4): Move to...
22586 ($(srcdir)/$(TESTSUITE)): here.
22587
22588 2001-09-20 Akim Demaille <akim@epita.fr>
22589
22590 * src/complain.c: No longer try to be standalone: use system.h.
22591 Don't assume __STDC__ is defined to 1. Just test if it is defined.
22592 * src/complain.h: Likewise.
22593 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
22594 Remove the unused variable `n'.
22595 From Albert Chin-A-Young.
22596
22597 2001-09-18 Marc Autret <autret_m@epita.fr>
22598
22599 * doc/bison.1: Update.
22600 * doc/bison.texinfo (Bison Options): Update --defines and --graph
22601 descriptions.
22602 (Option Cross Key): Update.
22603 Add --graph.
22604
22605 2001-09-18 Marc Autret <autret_m@epita.fr>
22606
22607 * tests/regression.at: New test (comment in %union).
22608
22609 2001-09-18 Marc Autret <autret_m@epita.fr>
22610
22611 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
22612 do that.
22613 Reported by Keith Browne.
22614
22615 2001-09-18 Marc Autret <autret_m@epita.fr>
22616
22617 * tests/output.at: Add tests for --defines and --graph.
22618
22619 2001-09-18 Marc Autret <autret_m@epita.fr>
22620
22621 * tests/output.at: Removes tests of %{header,src}_extension features.
22622
22623 2001-09-18 Akim Demaille <akim@epita.fr>
22624
22625 * tests/Makefile.am (package.m4): New.
22626 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
22627 (_AT_CHECK_CALC_ERROR): Likewise.
22628 Factor the `, ' part of verbose error messages.
22629
22630 2001-09-18 Marc Autret <autret_m@epita.fr>
22631
22632 * src/getargs.c (longopts): Declare --defines and --graph as options
22633 with optional arguments.
22634 * src/files.h: Add extern declarations.
22635 * src/files.c (spec_graph_file, spec_defines_file): New.
22636 (output_files): Update.
22637 Remove CPP-outed code.
22638
22639 2001-09-18 Marc Autret <autret_m@epita.fr>
22640
22641 Turn off %{source,header}_extension feature.
22642
22643 * src/files.c (compute_exts_from_gf): Update.
22644 (compute_exts_from_src): Update.
22645 (output_files): CPP-out useless code.
22646 * src/files.h: Remove {header,source}_extension extern declarations.
22647 * src/reader.c (parse_dquoted_param): CPP-out.
22648 (parse_header_extension_decl): Remove.
22649 (parse_source_extension_decl): Remove.
22650 (read_declarations): Remove cases tok_{hdrext,srcext}.
22651 * src/lex.c (percent_table): Remove {header,source}_extension entries.
22652 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
22653
22654 2001-09-10 Akim Demaille <akim@epita.fr>
22655
22656 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
22657 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
22658 (AT_CHECK_OUTPUT): this.
22659 Merely check ls' exit status, its output is useless.
22660
22661 2001-09-10 Akim Demaille <akim@epita.fr>
22662
22663 * tests/calc.at: Use m4_match.
22664 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
22665
22666 2001-09-10 Marc Autret <autret_m@epita.fr>,
22667 Akim Demaille <akim@epita.fr>
22668
22669 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
22670 enum color_e.
22671 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
22672 to `normal'.
22673 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
22674 * src/lex.h: Adjust prototype.
22675 (token_t): Add `tok_undef'.
22676 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
22677 (parse_percent_token): Now returns token_t.
22678 Add default statement in switch.
22679 (lex): Separate `c' as an input variable, from the token_t result
22680 part.
22681 (unlexed): Is a token_t.
22682
22683 2001-09-10 Akim Demaille <akim@epita.fr>
22684
22685 * configure.in: Bump to 1.29a.
22686
22687 2001-09-07 Akim Demaille <akim@epita.fr>
22688
22689 Version 1.29.
22690
22691 2001-08-30 Akim Demaille <akim@epita.fr>
22692
22693 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
22694 * m4/atconfig.m4: Remove.
22695 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
22696 * tests/bison: New.
22697 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
22698 m4_if, m4_patsubst, and m4_regexp.
22699 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
22700 `input' file instead of echo.
22701
22702 2001-08-29 Akim Demaille <akim@epita.fr>
22703
22704 Bump to 1.28e.
22705
22706 2001-08-29 Akim Demaille <akim@epita.fr>
22707
22708 Version 1.28d.
22709
22710 2001-08-29 Paul Eggert <eggert@twinsun.com>
22711
22712 * src/bison.simple (yyparse): Don't take the address of an
22713 item before the start of an array, as that doesn't conform to
22714 the C Standard.
22715
22716 2001-08-29 Robert Anisko <anisko_r@epita.fr>
22717
22718 * doc/bison.texinfo (Location Tracking Calc): New node.
22719
22720 2001-08-29 Paul Eggert <eggert@twinsun.com>
22721
22722 * src/output.c (output): Do not define const, as this now
22723 causes more problems than it cures.
22724
22725 2001-08-29 Akim Demaille <akim@epita.fr>
22726
22727 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
22728 the nodes.
22729 Be sure to tag the `detailmenu'.
22730
22731 2001-08-29 Akim Demaille <akim@epita.fr>
22732
22733 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
22734 download in a tmp dir.
22735
22736 2001-08-28 Marc Autret <autret_m@epita.fr>
22737
22738 * config/depcomp: New file.
22739
22740 2001-08-28 Marc Autret <autret_m@epita.fr>
22741
22742 * doc/bison.1 (mandoc): Adjust.
22743 From Juan Manuel Guerrero.
22744
22745 2001-08-28 Marc Autret <autret_m@epita.fr>
22746
22747 * src/print_graph.c (print_state): Fix.
22748
22749 2001-08-27 Marc Autret <autret_m@epita.fr>
22750
22751 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
22752 char * members.
22753 Echo modifications to the functions prototypes.
22754 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
22755
22756 2001-08-27 Marc Autret <autret_m@epita.fr>
22757
22758 * src/vcg.c: Include `xalloc.h'.
22759 (add_colorentry): New.
22760 (add_classname): New.
22761 (add_infoname): New.
22762 * src/vcg.h: Add new prototypes.
22763
22764 2001-08-27 Akim Demaille <akim@epita.fr>
22765
22766 * Makefile.maint: Sync. again with CVS Autoconf.
22767
22768 2001-08-27 Akim Demaille <akim@epita.fr>
22769
22770 * Makefile.maint: Formatting changes.
22771 (po-update, cvs-update, update): New targets.
22772 (AMTAR): Remove.
22773
22774 2001-08-27 Akim Demaille <akim@epita.fr>
22775
22776 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
22777 * Makefile.maint: Sync. with CVS Autoconf.
22778
22779 2001-08-27 Marc Autret <autret_m@epita.fr>
22780
22781 * src/vcg.h (struct infoname_s): New.
22782 (struct colorentry_s): New.
22783 (graph_s): New fields {vertical,horizontal}_order in structure.
22784 Add `infoname' field.
22785 Add `colorentry' field;
22786 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
22787 (G_HORIZONTAL_ORDER): New.
22788 (G_INFONAME): New.
22789 (G_COLORENTRY): New.
22790 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
22791 Add output of `infoname'.
22792 Add output of `colorentry'.
22793
22794 2001-08-27 Marc Autret <autret_m@epita.fr>
22795
22796 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
22797 This one shadowed a global parameter.
22798
22799 2001-08-24 Marc Autret <autret_m@epita.fr>
22800
22801 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
22802 instead of `unsigned'.
22803 (print_state): Do not call obstack_object_size () in obstack_grow ()
22804 to avoid macro variables shadowing.
22805
22806 2001-08-23 Marc Autret <autret_m@epita.fr>
22807
22808 * src/lex.c (percent_table): Typo: s/naem/name/.
22809 Add graph option.
22810 Normalize new options declarations.
22811
22812 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
22813
22814 * tests/suite.at: Exercise %header_extension and %source_extension.
22815
22816 2001-08-16 Marc Autret <autret_m@epita.fr>
22817
22818 * src/reader.c (parse_dquoted_param): New.
22819 (parse_header_extension_decl): Use it.
22820 (parse_source_extension_decl): Likewise.
22821
22822 2001-08-16 Marc Autret <autret_m@epita.fr>
22823
22824 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
22825 (get_xxxx_str): Use assert () instead of complain ().
22826 Remove return invokations in default cases.
22827 (get_decision_str): Modify default behaviour. Remove second argument.
22828 Echo modifications on calls.
22829 (output_graph): Fix.
22830
22831 2001-08-16 Marc Autret <autret_m@epita.fr>
22832
22833 * src/getargs.c (usage): Update with ``-g, --graph''.
22834
22835 2001-08-16 Marc Autret <autret_m@epita.fr>
22836
22837 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
22838 (Option Cross Key): Likewise.
22839 * doc/bison.1: Update.
22840
22841 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
22842
22843 * src/output.c (output_master_parser): Don't finish action_obstack.
22844 (output_parser): Don't care about the muscle action, here.
22845 (prepare): Copy the action_obstack in the action muscle.
22846 (output): Free action_obstack.
22847
22848 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
22849
22850 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
22851 will contain `%union' declaration.
22852 (parse_union_decl): Delete #line directive output.
22853 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
22854 informations about %union.
22855 (parse_union_decl): Copy the union_obstack in the muscle stype.
22856 * src/bison.simple: Add new #line directive.
22857 Add typdef %%stype YYSTYPE.
22858
22859 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
22860
22861 * src/bison.simple: Add new `#line' directive.
22862
22863 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
22864
22865 * src/bison.simple: New `#line' directive.
22866 * src/output.c (output_parser): Support new dynamic muscle input_line.
22867
22868 2001-09-22 Marc Autret <autret_m@epita.fr>
22869
22870 * src/output.c (output_master_parser): New.
22871 (output_parser): Be more re-entrant.
22872
22873 2001-09-21 Marc Autret <autret_m@epita.fr>
22874
22875 * src/reader.c (copy_definition, parse_union_decl): Update and use
22876 `linef' muscle.
22877 (copy_action): Likewise.
22878 Use obstack_1grow ().
22879 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
22880
22881 2001-09-21 Marc Autret <autret_m@epita.fr>
22882
22883 * src/options.c (option_table): Adjust.
22884 * src/lex.c (parse_percent_token): Fix.
22885
22886 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
22887
22888 * src/options.c (symtab.h): Include it, need by lex.h.
22889
22890 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
22891
22892 * src/lex.c (parse_percent_token): Change type of variable `tx', which
22893 is now an option_table_struct*.
22894 (option_strcmp): New function option_strcmp.
22895 (parse_percent_token): Call option_strcmp.
22896 * src/getargs.c (xalloc.h, options.h): Include it.
22897 (getargs): Call create_long_option_table.
22898 (getargs): Free longopts at the end of the function.
22899 (shortopts): Move in options.c.
22900 * src/options.c (create_long_option_table): New function. Convert
22901 information from option_table to option structure.
22902 * src/reader.c (options.h): Include it.
22903
22904 * src/Makefile.am: Adjust.
22905 * src/options.c (option_table): Create from longopts and percent_table.
22906 * src/getargs.c (longopts): Delete.
22907 * src/lex.c (struct percent_table_struct): Delete.
22908 (percent_table): Delete.
22909 (options.h): Include it.
22910 * src/options.c: Create.
22911 * src/options.h: Create.
22912 Declare enum opt_access_e.
22913 Define struct option_table_struct.
22914
22915 2001-09-20 Marc Autret <autret_m@epita.fr>
22916
22917 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
22918 sections of Bison.
22919
22920 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
22921
22922 * src/bison.simple: s/%%filename/%%skeleton.
22923 * src/muscle_tab.c (getargs.h): Include it.
22924 (muscle_init): Insert new muscle skeleton.
22925
22926 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
22927
22928 * src/output.c (output_parser): Delete unused variable actions_dumped.
22929
22930 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
22931
22932 * src/output.c (output): Delete call to reader_output_yylsp.
22933 * src/reader.c (reader): Likewise.
22934 * src/reader.h: Delete declaration of reader_output_yylsp.
22935
22936 2001-09-02 Marc Autret <autret_m@epita.fr>
22937
22938 * src/reader.c: Include muscle_tab.h.
22939 (parse_union_decl): Update.
22940 (parse_macro_decl): Rename parse_muscle_decl.
22941 Update to use renamed functions and variable.
22942 (read_declarations, copy_action, read_additionnal_code, : Updated
22943 with correct variables and functions names.
22944 (packsymbols, reader): Likewise.
22945
22946 * src/reader.h (muscle_obstack): Extern declaration update.
22947
22948 * src/output.c: Include muscle_tab.h
22949 In all functions using macro_insert, change by using muscle_insert ().
22950 (macro_obstack): Rename muscle_obstack.
22951 Echo modifications in the whole file.
22952 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
22953 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
22954 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
22955
22956 * src/muscle_tab.h: Update double inclusion macros.
22957 (macro_entry_s): Rename muscle_entry_s.
22958 Update prototypes.
22959
22960 * src/muscle_tab.c: Include muscle_tab.h.
22961 Rename macro_tabble to muscle_table.
22962 (mhash1, mhash2, mcmp): Use muscle_entry.
22963 (macro_init): Rename muscle_init. Update.
22964 (macro_insert): Rename muscle_insert. Update.
22965 (macro_find): Rename muscle_find. Update.
22966
22967 * src/main.c: Include muscle_tab.h.
22968 (main): Call muscle_init ().
22969 * src/Makefile.am (bison_SOURCES): Echo modifications.
22970
22971 2001-09-02 Marc Autret <autret_m@epita.fr>
22972
22973 Now the files macro_tab.[ch] are named muscle_tab.[ch].
22974
22975 * src/muscle_tab.c, src/muscle_tab.h: Add files.
22976
22977 2001-09-02 Marc Autret <autret_m@epita.fr>
22978
22979 * src/macrotab.c, src/macrotab.h: Remove.
22980
22981 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
22982
22983 * src/reader.c (copy_guard): Use muscle to specify the `#line'
22984 filename.
22985
22986 2001-09-01 Marc Autret <autret_m@epita.fr>
22987
22988 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
22989 to an explicit value to activate the feature. We do it here.
22990
22991 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
22992
22993 * src/output.c (prepare): Delete the `filename' muscule insertion.
22994 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
22995 (parse_union_decl): Likewise.
22996 * src/macrotab.c (macro_init): Initialize filename by infile.
22997
22998 2001-08-31 Marc Autret <autret_m@epita.fr>
22999
23000 * src/bison.simple (YYLSP_NEEDED): New definition.
23001 * src/output.c (prepare): Add macro insertion of `locations_flag'
23002
23003 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
23004
23005 * src/output.c (prepare): Delete insertion of previous muscles,
23006 and insert the `prefix' muscles.
23007 * src/macrotab.c (macro_init): Likewise.
23008 (macro_init): Initialization prefix directive by `yy'.
23009 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
23010 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
23011 yylval, yydebug, yyerror, yynerrs and yyparse.
23012 New directive `#define' to substitute yydebug, ... with option
23013 name_prefix.
23014
23015 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
23016
23017 * src/main.c (main): Standardize.
23018 * src/output.c (output_table_data, output_parser): Likewise.
23019 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
23020
23021 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
23022
23023 * src/reader.c (read_additionnal_code): Rename %%user_code to
23024 %%epilogue.
23025 * src/output.c (output): Rename %%declarations to %%prologue.
23026 * src/bison.simple: Echo modifications.
23027
23028 2001-08-31 Marc Autret <autret_m@epita.fr>
23029
23030 * src/reader.c (readgram): CleanUp.
23031 (output_token_defines): Likewise.
23032 (packsymbols): Likewise.
23033 (reader): Likewise.
23034 * src/output.c (output): CPP-out useless code.
23035
23036 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
23037
23038 * src/reader.c (reader): Delete obsolete call to function
23039 output_trailers and output_headers.
23040 * src/output.h: Remove obsolete functions prototypes of output_headers
23041 and output_trailers.
23042
23043 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
23044
23045 * src/main.c: Include macrotab.h.
23046 * src/macrotab.h (macro_entry_s): Constify fields.
23047 Adjust functions prototypes.
23048 * src/macrotab.c (macro_insert): Constify key and value.
23049 (macro_find): Constify key.
23050 (macro_insert): Include 'xalloc.h'
23051 (macro_insert): Use XMALLOC.
23052 (macro_find): Constify return value.
23053 * src/output.c (output_table_data): Rename table to table_data.
23054 (output_parser): Constify macro_key, macro_value.
23055
23056 2001-08-30 Marc Autret <autret_m@epita.fr>
23057
23058 * src/reader.c (parse_skel_decl): New.
23059 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
23060 * src/lex.h (token_t): New token `tok_skel'.
23061 * src/lex.c (percent_table): Add skeleton option entry.
23062 Standardize.
23063
23064 2001-08-29 Marc Autret <autret_m@epita.fr>
23065
23066 * src/bison.simple: Add %%user_code directive at the end.
23067 * src/reader.c (read_additionnal_code): New.
23068 (reader): Use it.
23069 * src/output.c (output_program): Remove.
23070 (output): Update.
23071
23072 2001-08-28 Marc Autret <autret_m@epita.fr>
23073
23074 * src/output.c (output_actions): Clean up.
23075 (output_gram): CPP-out useless code.
23076 * src/reader.c (reader): Clean up, CPP-out useless code.
23077
23078 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
23079
23080 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
23081 directive.
23082 * src/bison.simple: Add `%%definitions'.
23083
23084 2001-08-28 Marc Autret <autret_m@epita.fr>
23085
23086 * config/depcomp: New file.
23087
23088 2001-08-27 Paul Eggert <eggert@twinsun.com>
23089
23090 * src/bison.simple (yyparse): Don't take the address of an
23091 item before the start of an array, as that doesn't conform to
23092 the C Standard.
23093
23094 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
23095
23096 * src/output.c (output): Remove the initialization of the macro
23097 obstack. It was done too late here.
23098
23099 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
23100 completely wrong.
23101 (reader): Initialize the macro obstack here, since we need it to grow
23102 '%define' directives.
23103
23104 * src/reader.h: Declare the macro obstack as extern.
23105
23106 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
23107
23108 * src/output.c (output_parser): Fix. Store single '%' characters in
23109 the output obstack instead of throwing them away.
23110
23111 2001-08-27 Akim Demaille <akim@epita.fr>
23112
23113 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
23114
23115 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23116
23117 * lib/Makefile.am: Adjust.
23118
23119 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23120
23121 * src/bison.simple: Update and add '%%' directives.
23122
23123 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23124
23125 * src/reader.c (reader): Remove calls to 'output_headers' and
23126 'output_trailers'. Remove some C output.
23127 (readgram): Disable a piece of code that was writing a default
23128 definition for 'YYSTYPE'.
23129 (reader_output_yylsp): Remove.
23130 (packsymbols): Output token defintions to a macro.
23131 (copy_definition): Disable C output.
23132
23133 * src/reader.c (parse_macro_decl): New function used to parse macro
23134 declarations.
23135 (copy_string2): Put the body of copy_string into this new function.
23136 Add a parameter to let the caller choose whether he wants to copy the
23137 string delimiters or not.
23138 (copy_string): Be a simple call to copy_string2 with the last argument
23139 bound to true.
23140 (read_declarations): Add case for macro definition.
23141 (copy_identifier): New.
23142 (parse_macro_decl): Read macro identifiers using copy_identifier
23143 rather than lex.
23144
23145 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23146
23147 * src/output.c (prepare): Add prefixed names.
23148 (output_parser): Output semantic actions.
23149 (output_parser): Fix bug on '%%line' directives.
23150
23151 * src/output.c (output_headers): Remove. The C code printed by this
23152 function should now be in the skeletons.
23153 (output_trailers): Remove.
23154 (output): Disable call to 'reader_output_yylsp'.
23155 (output_rule_data): Do not output tables to the table obstack.
23156
23157 * src/output.c: Remove some C dedicated output.
23158 Improve the use of macro and output obstacks.
23159 (output_defines): Remove.
23160
23161 * src/output.c (output_token_translations): Associate 'translate'
23162 table with a macro. No output to the table obstack.
23163 (output_gram): Same for 'rhs' and 'prhs'.
23164 (output_stos): Same for 'stos'.
23165 (output_rule_data): Same for 'r1' and 'r2'.
23166 (token_actions): Same for 'defact'.
23167 (goto_actions): Same for 'defgoto'.
23168 (output_base): Same for 'pact' and 'pgoto'.
23169 (output_table): Same for 'table'.
23170 (output_check): Same for 'check'.
23171
23172 * src/output.c (output_table_data): New function.
23173 (output_short_table): Remove.
23174 (output_short_or_char_table): Remove.
23175
23176 * src/output.c (output_parser): Replace most of the skeleton copy code
23177 with something new. Skeletons are now processed character by character
23178 rather than line by line, and Bison looks for '%%' macros. This is the
23179 first step in making Bison's output process (a lot) more flexible.
23180 (output_parser): Use the macro table.
23181
23182 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23183
23184 * src/main.c (main): Initialize the macro table.
23185
23186 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23187
23188 * src/lex.c (percent_table): Add tok_define.
23189 * src/lex.h: Add tok_define.
23190
23191 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23192
23193 * src/macrotab.c: New file.
23194 * src/macrotab.h: New file.
23195 * src/Makefile.am: Update.
23196
23197 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23198
23199 * lib/hash.c: New file.
23200 * lib/hash.h: New file.
23201 * lib/Makefile.am: Update.
23202
23203 2001-08-15 Akim Demaille <akim@epita.fr>
23204
23205 Version 1.28c.
23206
23207 2001-08-15 Marc Autret <autret_m@epita.fr>
23208
23209 * src/reader.c (readgram): Indent output macro YYSTYPE.
23210 (packsymbols): Likewise.
23211 (output_token_defines): Likewise.
23212 * src/files.c: Standardize.
23213 (compute_header_macro): New.
23214 (defines_obstack_save): New. Use compute_header_macro.
23215 (output_files): Update. Use defines_obstack_save.
23216
23217 2001-08-15 Akim Demaille <akim@epita.fr>
23218
23219 * doc/bison.texinfo (Table of Symbols): Document
23220 YYSTACK_USE_ALLOCA.
23221
23222 2001-08-15 Akim Demaille <akim@epita.fr>
23223
23224 * missing: Update from CVS Automake.
23225 * config/config.guess, config/config.sub, config/texinfo.tex:
23226 Update from gnu.org.
23227
23228 2001-08-15 Akim Demaille <akim@epita.fr>
23229
23230 * Makefile.maint: Sync with CVS Autoconf.
23231
23232 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
23233
23234 * doc/bison.texinfo: Include GNU Free Documentation License from
23235 `fdl.texi'.
23236 * doc/fdl.texi: Add to package.
23237
23238 2001-08-14 Marc Autret <autret_m@epita.fr>
23239
23240 Turn on %{source,header}_extension features.
23241
23242 * src/lex.c (percent_table): Un-CPP out header_extension and
23243 source_extension.
23244 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
23245 (compute_exts_from_src): Remove conditions. It restores priorities
23246 between options.
23247
23248 2001-08-14 Marc Autret <autret_m@epita.fr>
23249
23250 * src/files.c (compute_base_names): Add extensions computing when
23251 `--file-prefix' used.
23252 Standardize function calls.
23253
23254 2001-08-13 Marc Autret <autret_m@epita.fr>
23255
23256 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
23257 defining it (defined but null disables alloca).
23258
23259 2001-08-13 Marc Autret <autret_m@epita.fr>
23260
23261 * src/bison.simple (_yy_memcpy): CPP reformat.
23262
23263 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
23264
23265 * tests/atconfig.in (CPPFLAGS): Fix.
23266
23267 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
23268
23269 * doc/bison.texinfo: Include GNU General Public License from
23270 `gpl.texi'.
23271 * doc/gpl.texi: Add to package.
23272
23273 2001-08-10 Marc Autret <autret_m@epita.fr>
23274
23275 * src/print_graph.h: Fix.
23276 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
23277
23278 2001-08-10 Akim Demaille <akim@epita.fr>
23279
23280 * src/system.h: Provide default declarations for stpcpy, strndup,
23281 and strnlen.
23282
23283 2001-08-10 Robert Anisko <anisko_r@epita.fr>
23284
23285 * doc/bison.texinfo (Locations): Update @$ stuff.
23286
23287 2001-08-09 Robert Anisko <anisko_r@epita.fr>
23288
23289 * src/bison.simple (YYLLOC_DEFAULT): Update.
23290 (yyparse): Adjust.
23291
23292 2001-08-08 Marc Autret <autret_m@epita.fr>
23293
23294 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
23295 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
23296 Reported by Fabrice Bauzac.
23297
23298 2001-08-08 Marc Autret <autret_m@epita.fr>
23299
23300 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
23301 * src/vcg.c (output_node): Fix.
23302 * src/vcg.h: Cleanup.
23303 * src/print_graph.c: Add comments.
23304 (node_output_size): New global variable. Simplify the formatting of
23305 the VCG graph output.
23306 (print_actions): Unused code is now used. It notifies the final state
23307 and no action states in the VCG graph. It also give the reduce actions.
23308 The `shift and goto' edges are red and the `go to state' edges are
23309 blue.
23310 Get the current node name and node_obstack by argument.
23311 (node_obstack): New variable.
23312 (print_state): Manage node_obstack.
23313 (print_core): Use node_obstack given by argument.
23314 A node is not only computed here but in print_actions also.
23315 (print_graph): CPP out useless code instead of commenting it.
23316
23317 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
23318
23319 * tests/atconfig.in (CPPFLAGS): Fix.
23320
23321 2001-08-07 Akim Demaille <akim@epita.fr>
23322
23323 * src/print_graph.c (quote): New.
23324 (print_core): Use it.
23325
23326 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
23327
23328 * src/vcg.c (complain.h): Include it.
23329 Unepitaize `return' invocations.
23330 [NDEBUG] (main): Remove.
23331 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
23332 * src/files.c (open_files): Initialize graph_obstack.
23333 * src/print_graph.c (print_actions): CPP out useless code.
23334 (print_core): Don't output the last `\n' in labels.
23335 Use `quote'.
23336 * src/files.c (output_files): Output the VCG file.
23337 * src/main.c (main): Invoke print_graph ();
23338
23339 2001-08-06 Marc Autret <autret_m@epita.fr>
23340
23341 Automaton VCG graph output.
23342 Using option ``-g'' or long option ``--graph'', you can generate
23343 a gram_filename.vcg file containing a VCG description of the LALR (1)
23344 automaton of your grammar.
23345
23346 * src/main.c: Call to print_graph() function.
23347 * src/getargs.h: Update.
23348 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
23349 (graph_flag): New flag.
23350 (longopts): Update.
23351 (getargs): Add case `g'.
23352 * src/files.c (graph_obstack): New obstack struct.
23353 (open_files): Initialize new obstack.
23354 (output_files): Saves graph_obstack if required.
23355 * src/files.h (graph_obstack): New extern declaration.
23356 * src/Makefile.am: Add new source files.
23357
23358 2001-08-06 Marc Autret <autret_m@epita.fr>
23359
23360 * src/print_graph.c, src/print_graph.h (graph): New.
23361 * src/vcg.h: New file.
23362 * src/vcg.c: New file, VCG graph handling.
23363
23364 2001-08-06 Marc Autret <autret_m@epita.fr>
23365
23366 Add of %source_extension and %header_extension which specify
23367 the source or/and the header output file extension.
23368
23369 * src/files.c (compute_base_names): Remove initialisation of
23370 src_extension and header_extension.
23371 (compute_exts_from_gf): Update.
23372 (compute_exts_from_src): Update.
23373 (output_files): Update.
23374 * src/reader.c (parse_header_extension_decl): New.
23375 (parse_source_extension_decl): New.
23376 (read_declarations): New case statements for the new tokens.
23377 * src/lex.c (percent_table): Add entries for %source_extension
23378 and %header_extension.
23379 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
23380
23381 2001-08-06 Marc Autret <autret_m@epita.fr>
23382
23383 * configure.in: Bump to 1.28c.
23384 * doc/bison.texinfo: Texinfo thingies.
23385
23386 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
23387
23388 * tests/atconfig.in (CPPFLAGS): Add.
23389 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
23390
23391 2001-08-03 Akim Demaille <akim@epita.fr>
23392
23393 Version 1.28b.
23394
23395 2001-08-03 Akim Demaille <akim@epita.fr>
23396
23397 * tests/Makefile.am (check-local): Ship testsuite.
23398 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
23399 Include `string.h'.
23400
23401 2001-08-03 Akim Demaille <akim@epita.fr>
23402
23403 * configure.in: Try using -Wformat when compiling.
23404
23405 2001-08-03 Akim Demaille <akim@epita.fr>
23406
23407 * configure.in: Bump to 1.28b.
23408
23409 2001-08-03 Akim Demaille <akim@epita.fr>
23410
23411 * src/complain.c: Adjust strerror_r portability issues.
23412
23413 2001-08-03 Akim Demaille <akim@epita.fr>
23414
23415 Version 1.28a.
23416
23417 2001-08-03 Akim Demaille <akim@epita.fr>
23418
23419 * src/getargs.c, src/getarg.h (skeleton)): Constify.
23420 * src/lex.c (literalchar): Avoid name clashes on `buf'.
23421 * src/getargs.c: Include complain.h.
23422 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
23423 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
23424
23425 2001-08-03 Akim Demaille <akim@epita.fr>
23426
23427 * src/reader.c (readgram): Display hidden chars in error messages.
23428
23429 2001-08-03 Akim Demaille <akim@epita.fr>
23430
23431 Update to gettext 0.10.39.
23432
23433 2001-08-03 Akim Demaille <akim@epita.fr>
23434
23435 * lib/strspn.c: New.
23436
23437 2001-08-01 Marc Autret <autret_m@epita.fr>
23438
23439 * doc/bison.texinfo: Update.
23440 * doc/bison.1 (mandoc): Update.
23441 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
23442 * src/files.c: Support output files extensions computing.
23443 (src_extension): New static variable.
23444 (header_extension): New static variable.
23445 (tr): New function.
23446 (get_extension_index): New function, gets the index of an extension
23447 filename in a string.
23448 (compute_exts_from_gf): New function, computes extensions from the
23449 grammar file extension.
23450 (compute_exts_from_src): New functions, computes extensions from the
23451 C source file extension, file given by ``-o'' option.
23452 (compute_base_names): Update.
23453 (output_files): Update.
23454
23455 2001-08-01 Robert Anisko <anisko_r@epita.fr>
23456
23457 * doc/bison.texi: Document @$.
23458 (Locations): New section.
23459
23460 2001-07-18 Akim Demaille <akim@epita.fr>
23461
23462 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
23463 * config/prev-version.txt, config/move-if-change: New.
23464 * Makefile.am: Adjust.
23465
23466 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
23467
23468 * src/bison.simple (yyparse): Suppress warning `comparaison
23469 between signed and unsigned'.
23470
23471 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
23472
23473 * src/getargs.h (raw_flag): Remove.
23474 * src/getargs.c: Die on `-r'/`--raw'.
23475 * src/lex.c (parse_percent_token): Die on `%raw'.
23476 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
23477 * tests/calc.at: Suppress test with option `--raw'.
23478
23479 2001-07-14 Akim Demaille <akim@epita.fr>
23480
23481 * config/: New.
23482 * configure.in: Require Autoconf 2.50.
23483 Update to gettext 0.10.38.
23484
23485 2001-03-16 Akim Demaille <akim@epita.fr>
23486
23487 * doc/bison.texinfo: ANSIfy the examples.
23488
23489 2001-03-16 Akim Demaille <akim@epita.fr>
23490
23491 * getargs.c (skeleton): New variable.
23492 (longopts): --skeleton is a new option.
23493 (shortopts, getargs): -S is a new option.
23494 * getargs.h: Declare skeleton.
23495 * output.c (output_parser): Use it.
23496
23497 2001-03-16 Akim Demaille <akim@epita.fr>
23498
23499 * m4/strerror_r.m4: New.
23500 * m4/error.m4: Run AC_FUNC_STRERROR_R.
23501 * lib/error.h, lib/error.c: Update.
23502
23503 2001-03-16 Akim Demaille <akim@epita.fr>
23504
23505 * src/getargs.c (longopts): Clean up.
23506
23507 2001-02-21 Akim Demaille <akim@epita.fr>
23508
23509 * src/reader.c (gensym): `gensym_count' is your own.
23510 Use a static buf to create the symbol name, as token_buffer is no
23511 longer a buffer.
23512
23513 2001-02-08 Akim Demaille <akim@epita.fr>
23514
23515 * src/conflicts.c (conflict_report): Be sure not to append to res
23516 between two calls, which could happen if both first sprintf were
23517 skipped, but not the first cp += strlen.
23518
23519 2001-02-08 Akim Demaille <akim@epita.fr>
23520
23521 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
23522 New, from fileutils 4.0.37.
23523 * configure.in: Require Autoconf 2.49c. I took some time before
23524 making this decision. This is the only way out for portability
23525 issues in Bison, it would mean way too much duplicate effort to
23526 import in Bison features implemented in 2.49c since 2.13.
23527 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
23528
23529 2001-02-02 Akim Demaille <akim@epita.fr>
23530
23531 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
23532 * lib/xalloc.h, lib/xmalloc.c: Update.
23533
23534 2001-01-19 Akim Demaille <akim@epita.fr>
23535
23536 Get rid of the ad hoc handling of token_buffer in the scanner: use
23537 the obstacks.
23538
23539 * src/lex.c (token_obstack): New.
23540 (init_lex): Initialize it. No longer call...
23541 (grow_token_buffer): this. Remove it.
23542 Adjust all the places which used it to use the obstack.
23543
23544 2001-01-19 Akim Demaille <akim@epita.fr>
23545
23546 * src/lex.h: Rename all the tokens:
23547 s/\bENDFILE\b/tok_eof/g;
23548 s/\bIDENTIFIER\b/tok_identifier/g;
23549 etc.
23550 Let them be enums, not #define, to ease debugging.
23551 Adjust all the code.
23552
23553 2001-01-18 Akim Demaille <akim@epita.fr>
23554
23555 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
23556 * src/lex.c (maxtoken, grow_token_buffer): Static.
23557
23558 2001-01-18 Akim Demaille <akim@epita.fr>
23559
23560 Since we now use obstacks, more % directives can be enabled.
23561
23562 * src/lex.c (percent_table): Also accept `%yacc',
23563 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
23564 `%debug'.
23565 Handle the actions for `%semantic_parser' and `%pure_parser' here,
23566 instead of returning a token.
23567 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
23568 * src/reader.c (read_declarations): Adjust.
23569 * src/files.c (open_files): Don't call `compute_base_names', don't
23570 compute `attrsfile' since they depend upon data which might be
23571 *in* the input file now.
23572 (output_files): Do it here.
23573 * src/output.c (output_headers): Document the fact that this patch
23574 introduces a guaranteed SEGV for semantic parsers.
23575 * doc/bison.texinfo: Document them.
23576 * tests/suite.at: Exercise these %options.
23577
23578 2000-12-20 Akim Demaille <akim@epita.fr>
23579
23580 Also handle the output file (--verbose) with obstacks.
23581
23582 * files.c (foutput): Remove.
23583 (output_obstack): New.
23584 Adjust all dependencies.
23585 * src/conflicts.c: Return a string.
23586 * src/system.h (obstack_grow_string): Rename as...
23587 (obstack_sgrow): this. Be ready to work with non literals.
23588 (obstack_fgrow4): New.
23589
23590 2000-12-20 Akim Demaille <akim@epita.fr>
23591
23592 * src/files.c (open_files): Fix the computation of short_base_name
23593 in the case of `-o foo.tab.c'.
23594
23595 2000-12-20 Akim Demaille <akim@epita.fr>
23596
23597 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
23598 (copy_dollar): Now that everything uses obstacks, get rid of the
23599 FILE * parameters.
23600
23601 2000-12-20 Akim Demaille <akim@epita.fr>
23602
23603 * src/files.c (open_files): Actually the `.output' file is based
23604 on the short_base_name, not base_name.
23605 * tests/suite.at (Checking output file names): Adjust.
23606
23607 2000-12-20 Akim Demaille <akim@epita.fr>
23608
23609 * src/bison.s1: Remove, we now use directly...
23610 * src/bison.simple: this.
23611 * src/Makefile.am: Use pkgdata instead of data.
23612
23613 2000-12-20 Akim Demaille <akim@epita.fr>
23614
23615 * src/files.c (guard_obstack): New.
23616 (open_files): Initialize it.
23617 (output_files): Dump it...
23618 * src/files.h: Export it.
23619 * src/reader.c (copy_guard): Use it.
23620
23621 2000-12-19 Akim Demaille <akim@epita.fr>
23622
23623 * src/files.c (outfile, defsfile, actfile): Removed as global
23624 vars.
23625 (open_files): Don't compute them.
23626 (output_files): Adjust.
23627 (base_name, short_base_name): Be global.
23628 Adjust dependencies.
23629
23630 2000-12-19 Akim Demaille <akim@epita.fr>
23631
23632 * src/files.c (strsuffix): New.
23633 (stringappend): Be just like strcat but allocate.
23634 (base_names): Eve out from open_files.
23635 Try to simplify the rather hairy computation of base_name and
23636 short_base_name.
23637 (open_files): Use it.
23638 * tests/suite.at (Checking output file names): New test.
23639
23640 2000-12-19 Akim Demaille <akim@epita.fr>
23641
23642 * src/system.h (obstack_grow_literal_string): Rename as...
23643 (obstack_grow_string): this.
23644 * src/output.c (output_parser): Recognize `%% actions' instead of
23645 `$'.
23646 * src/bison.s1: s/$/%% actions/.
23647 * src/bison.hairy: Likewise.
23648
23649 2000-12-19 Akim Demaille <akim@epita.fr>
23650
23651 * src/output.c (output_parser): Compute the `#line' lines when
23652 there are.
23653 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
23654 Suggested by Hans Aberg.
23655
23656 2000-12-19 Akim Demaille <akim@epita.fr>
23657
23658 Let the handling of the skeleton files be local to the procedures
23659 that use it.
23660
23661 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
23662 longer static.
23663 (fparser, open_extra_files): Remove.
23664 (open_files, output_files): Don't take care of fparser.
23665 * src/files.h: Adjust.
23666 * src/output.c (output_parser): Open and close the file to the
23667 skeleton.
23668 * src/reader.c (read_declarations): When %semantic_parser, open
23669 fguard.
23670
23671 2000-12-19 Akim Demaille <akim@epita.fr>
23672
23673 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
23674 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
23675
23676 2000-12-19 Akim Demaille <akim@epita.fr>
23677
23678 * src/files.c (open_files): Yipee! We no longer need all the code
23679 looking for `/tmp' since we have no tmp file.
23680
23681 2000-12-19 Akim Demaille <akim@epita.fr>
23682
23683 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
23684 New macros.
23685 * src/files.c (open_files): Less dependency on MSDOS etc.
23686
23687 2000-12-14 Akim Demaille <akim@epita.fr>
23688
23689 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
23690 Provide a default definition.
23691 Use it when executing the default @ action.
23692 * src/reader.c (reader_output_yylsp): No longer include
23693 `timestamp' and `text' in the default YYLTYPE.
23694
23695 2000-12-12 Akim Demaille <akim@epita.fr>
23696
23697 * src/reader.c (copy_definition, parse_union_decl, copy_action)
23698 (copy_guard): Quote the file names.
23699 Reported by Laurent Mascherpa.
23700
23701 2000-12-12 Akim Demaille <akim@epita.fr>
23702
23703 * src/output.c (output_headers, output_program, output): Be sure
23704 to escape special characters when outputting filenames.
23705 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
23706 (output_headers): Don't depend on them, Use ACTSTR.
23707
23708 2000-11-17 Akim Demaille <akim@epita.fr>
23709
23710 * lib/obstack.h: Formatting changes.
23711 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
23712 prevents type checking.
23713 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
23714 cast the value to (void *): assigning a `foo *' to a `void *'
23715 variable is valid.
23716 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
23717 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
23718 append characters.
23719
23720 2000-11-17 Akim Demaille <akim@epita.fr>
23721
23722 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
23723 as...
23724 (suite.m4, regression.m4, calc.m4): these.
23725 * tests/atgeneral.m4: Update from CVS Autoconf.
23726
23727 2000-11-17 Akim Demaille <akim@epita.fr>
23728
23729 * tests/regression.m4 (%union and --defines): New test,
23730 demonstrating a current bug in the obstack implementation.
23731
23732 2000-11-17 Akim Demaille <akim@epita.fr>
23733
23734 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
23735 macros.
23736 Use them to declare the variables which are global or local to
23737 `yyparse'.
23738
23739 2000-11-17 Akim Demaille <akim@epita.fr>
23740
23741 * acconfig.h: Remove, no longer used.
23742
23743 2000-11-07 Akim Demaille <akim@epita.fr>
23744
23745 * src: s/Copyright (C)/Copyright/g.
23746
23747 2000-11-07 Akim Demaille <akim@epita.fr>
23748
23749 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
23750 defining.
23751 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
23752
23753 2000-11-07 Akim Demaille <akim@epita.fr>
23754
23755 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
23756 Merge in a single CPP if/else.
23757
23758 2000-11-07 Akim Demaille <akim@epita.fr>
23759
23760 * src/output.c (output): Remove useless variables.
23761 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
23762 argument `data' for consistency with the prototypes.
23763 Qualify it `const'.
23764 (obstack_copy, obstack_copy0): Rename the second argument as
23765 `address' for consistency. Qualify it `const'.
23766 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
23767 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
23768 `const' their input argument (`data' or `address').
23769 Adjust the corresponding macros to include `const' in casts.
23770
23771 2000-11-03 Akim Demaille <akim@epita.fr>
23772
23773 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
23774 s/PFILE1/BISON_HAIRY/.
23775 Adjust dependencies.
23776
23777 2000-11-03 Akim Demaille <akim@epita.fr>
23778
23779 For some reason, this was not applied.
23780
23781 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
23782 `unlink': it's no longer used.
23783
23784 2000-11-03 Akim Demaille <akim@epita.fr>
23785
23786 * src/files.c (skeleton_find): New function, eved out of...
23787 (open_files, open_extra_files): here.
23788
23789 2000-11-03 Akim Demaille <akim@epita.fr>
23790
23791 Don't use `atexit'.
23792
23793 * src/files.c (obstack_save): New function.
23794 (done): Rename as...
23795 (output_files): this.
23796 Use `obstack_save'.
23797 * src/main.c (main): Don't use `atexit' to register `done', since
23798 it no longer has to remove tmp files, just call `output_files'
23799 when there are no errors.
23800
23801 2000-11-02 Akim Demaille <akim@epita.fr>
23802
23803 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
23804 `unlink': it's no longer used.
23805 * src/files.h: Formatting changes.
23806
23807 2000-11-02 Akim Demaille <akim@epita.fr>
23808
23809 Remove the last uses of mktemp and unlink/delete.
23810
23811 * src/files.c (fdefines, ftable): Removed.
23812 (defines_ostack, table_obstack): New.
23813 Adjust dependencies of the former into uses of the latter.
23814 * src/output.c (output_short_or_char_table, output_short_table):
23815 Convert to using obstacks.
23816 * src/reader.c (copy_comment2): Accept one FILE * and two
23817 obstacks.
23818 (output_token_defines, reader_output_yylsp): Use obstacks.
23819 * src/system.h (obstack_fgrow3): New.
23820 * po/POTFILES.in: Adjust.
23821
23822 2000-11-01 Akim Demaille <akim@epita.fr>
23823
23824 Change each use of `fattrs' into a use of `attrs_obstack'.
23825
23826 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
23827 * src/files.c (fattrs): Remove.
23828 (attrs_obstack): New.
23829 Adjust all dependencies.
23830 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
23831
23832 2000-11-01 Akim Demaille <akim@epita.fr>
23833
23834 Introduce obstacks.
23835 Change each use of `faction' into a use of `action_obstack'.
23836
23837 * lib/obstack.h, lib/obstack.c: New files.
23838 * src/files.c (faction): Remove.
23839 (action_obstack): New.
23840 Adjust all dependencies.
23841
23842 2000-10-20 Akim Demaille <akim@epita.fr>
23843
23844 * lib/quote.h (PARAMS): New macro. Use it.
23845
23846 2000-10-16 Akim Demaille <akim@epita.fr>
23847
23848 * src/output.c (output_short_or_char_table): New function.
23849 (output_short_table, output_token_translations): Use it.
23850 (goto_actions): Use output_short_table.
23851
23852 2000-10-16 Akim Demaille <akim@epita.fr>
23853
23854 * src/symtab.c (bucket_new): New function.
23855 (getsym): Use it.
23856
23857 * src/output.c (output_short_table): New argument to display the
23858 comment associated with the table.
23859 Adjust dependencies.
23860 (output_gram): Use it.
23861 (output_rule_data): Nicer output layout for YYTNAME.
23862
23863 2000-10-16 Akim Demaille <akim@epita.fr>
23864
23865 * src/lex.c (read_typename): New function.
23866 (lex): Use it.
23867 * src/reader.c (copy_dollar): Likewise.
23868
23869 2000-10-16 Akim Demaille <akim@epita.fr>
23870
23871 * src/reader.c (copy_comment2): Expect the input stream to be on
23872 the `/' which is suspected to open a comment, instead of being
23873 called after `//' or `/*' was read.
23874 (copy_comment, copy_definition, parse_union_decl, copy_action)
23875 (copy_guard): Adjust.
23876
23877 2000-10-16 Akim Demaille <akim@epita.fr>
23878
23879 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
23880 `read_signed_integer'.
23881
23882 2000-10-16 Akim Demaille <akim@epita.fr>
23883
23884 * src/reader.c (copy_dollar): New function.
23885 (copy_guard, copy_action): Use it.
23886
23887 2000-10-16 Akim Demaille <akim@epita.fr>
23888
23889 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
23890 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
23891 New files, from Fileutils 4.0.27.
23892 * src/main.c (printable_version): Remove.
23893 * src/lex.c, src/reader.c: Use `quote'.
23894
23895 2000-10-04 Akim Demaille <akim@epita.fr>
23896
23897 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
23898
23899 2000-10-04 Akim Demaille <akim@epita.fr>
23900
23901 * doc/bison.texinfo: Various typos spotted by Neil Booth.
23902
23903 2000-10-04 Akim Demaille <akim@epita.fr>
23904
23905 When a literal string is used to define two different tokens,
23906 `bison -v' segfaults.
23907 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
23908
23909 * tests/regression.m4: New file.
23910 Include the core of the sample provided by Piotr Gackiewicz.
23911 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
23912 properly.
23913
23914 2000-10-04 Akim Demaille <akim@epita.fr>
23915
23916 * src/reader.c (parse_expect_decl): Keep `count' within the size
23917 of `buffer'.
23918 From Neil Booth.
23919
23920 2000-10-02 Paul Eggert <eggert@twinsun.com>
23921
23922 * bison.s1 (yyparse): Assign the default value
23923 unconditionally, to avoid a GCC warning and make the parser a
23924 tad smaller.
23925
23926 2000-10-02 Akim Demaille <akim@epita.fr>
23927
23928 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
23929 options.
23930
23931 2000-10-02 Akim Demaille <akim@epita.fr>
23932
23933 * src/derives.c, src/print.c, src/reduce.c: To ease the
23934 translation, move some `\n' out of the translated strings.
23935
23936 2000-10-02 Akim Demaille <akim@epita.fr>
23937
23938 The location tracking mechanism is precious for parse error
23939 messages. Nevertheless, it is enabled only when `@n' is used in
23940 the grammar, which is a different issue (you can use it in error
23941 message, but not in the grammar per se). Therefore, there should
23942 be another means to enable it.
23943
23944 * src/getargs.c (getargs): Support `--locations'.
23945 (usage): Report it.
23946 * src/getargs.h (locationsflag): Export it.
23947 * src/lex.c (percent_table): Support `%locations'.
23948 * src/reader.c (yylsp_needed): Remove this variable, now replaced
23949 with `locationsflag'.
23950 * doc/bison.texinfo: Document `--locations' and `%locations'.
23951 Sort the options.
23952 * tests/calc.m4: Test it.
23953
23954 For regularity of the names, replace each
23955 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
23956 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
23957 In addition replace each `flag' with `_flag'.
23958
23959 2000-10-02 Akim Demaille <akim@epita.fr>
23960
23961 Also test parse error messages, including with YYERROR_VERBOSE.
23962
23963 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
23964 associative).
23965 Use it to check the computations.
23966 Use it to check `nonassoc' is honored.
23967 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
23968 `--yyerror-verbose'.
23969 (_AT_CHECK_CALC): Adjust to this option.
23970 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
23971
23972 2000-10-02 Akim Demaille <akim@epita.fr>
23973
23974 Test also `--verbose', `--defines' and `--name-prefix'. Testing
23975 the latter demonstrates a flaw in the handling of non debugging
23976 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
23977 was used in order to simplify:
23978
23979 #if YYDEBUG
23980 if (yydebug)
23981 {
23982 ...
23983 }
23984 #endif
23985
23986 into
23987
23988 if (yydebug)
23989 {
23990 ...
23991 }
23992
23993 unfortunately this leads to a CPP conflict when
23994 `--name-prefix=foo' is used since it produces `#define yydebug
23995 foodebug'.
23996
23997 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
23998 (YYDPRINTF): New macro.
23999 Spread its use.
24000 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
24001 the bison options.
24002 Also test `--verbose', `--defines' and `--name-prefix'.
24003
24004 2000-10-02 Akim Demaille <akim@epita.fr>
24005
24006 Improve the readability of the produced parsers.
24007
24008 * src/bison.s1: Formatting changes.
24009 Improve the comment related to the `$' mark.
24010 (yydefault): Don't fall through to `yyresume': `goto' there.
24011 * src/output.c (output_parser): When the `$' is met, skip the end
24012 of its line.
24013 New variable, `number_of_dollar_signs', to check there's exactly
24014 one `$' in the parser skeleton.
24015
24016 2000-10-02 Akim Demaille <akim@epita.fr>
24017
24018 * lib/xstrdup.c: New file, from the fileutils.
24019 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
24020 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
24021 instead of strlen + xmalloc + strcpy.
24022 * src/symtab.c (copys): Remove, use xstrdup instead.
24023
24024 2000-10-02 Akim Demaille <akim@epita.fr>
24025
24026 * src/gram.h (associativity): New enum type which replaces the
24027 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
24028 `right_assoc', `left_assoc' and `non_assoc'.
24029 Adjust all dependencies.
24030 * src/reader.c: Formatting changes.
24031 (LTYPESTR): Don't define it, use it as a literal in
24032 `reader_output_yylsp'.
24033 * src/symtab.h (symbol_class): New enum type which replaces the
24034 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
24035 `sunknown', `stoken and `snterm'.
24036
24037 2000-10-02 Akim Demaille <akim@epita.fr>
24038
24039 * src/getargs.c (fixed_outfiles): Rename as...
24040 (yaccflag): for consistency and accuracy.
24041 Adjust dependencies.
24042
24043 2000-10-02 Akim Demaille <akim@epita.fr>
24044
24045 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
24046 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
24047 difficult and introduced a lot of core dump. It turns out that
24048 Bison used an implementation of `xmalloc' based on `calloc', and
24049 at various places it does depend upon the initialization to 0. I
24050 have not tried to isolate the pertinent places, and all the former
24051 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
24052 someone should address this issue.
24053
24054 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
24055 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
24056 files.
24057 Adjust dependencies.
24058 * src/warshall.h: New file.
24059 Propagate.
24060
24061 2000-10-02 Akim Demaille <akim@epita.fr>
24062
24063 Various anti-`extern in *.c' changes.
24064
24065 * src/system.h: Include `assert.h'.
24066
24067 2000-10-02 Akim Demaille <akim@epita.fr>
24068
24069 * src/state.h (nstates, final_state, first_state, first_shift)
24070 (first_reduction): Move their exportation from here...
24071 * src/LR0.h: to here.
24072 Adjust dependencies.
24073 * src/getargs.c (statisticsflag): New variable.
24074 Add support for `--statistics'.
24075 Adjust dependencies.
24076
24077 Remove a lot of now useless `extern' statements in most files.
24078
24079 2000-10-02 Akim Demaille <akim@epita.fr>
24080
24081 * src/LR0.h: New file.
24082 Propagate its use.
24083
24084 2000-10-02 Akim Demaille <akim@epita.fr>
24085
24086 * src/print.h: New file.
24087 Propagate its use.
24088 * src/print.c: Formatting and ordering changes.
24089 (verbose, terse): Replace with...
24090 (print_results): this new function.
24091 Adjust dependencies.
24092
24093 2000-10-02 Akim Demaille <akim@epita.fr>
24094
24095 * src/conflicts.c (conflict_report): New function.
24096 (conflict_log, verbose_conflict_log): Replace with...
24097 (print_conflicts): this function.
24098 Adjust dependencies.
24099 * src/conflicts.h: New file.
24100 Propagate its inclusion.
24101
24102 2000-10-02 Akim Demaille <akim@epita.fr>
24103
24104 * src/nullable.h: New file.
24105 Propagate its inclusion.
24106 * src/nullable.c: Formatting changes.
24107
24108 2000-10-02 Akim Demaille <akim@epita.fr>
24109
24110 * src/reduce.h: New file.
24111 Propagate its inclusion.
24112 * src/reduce.c: Topological sort and other formatting changes.
24113 (bool, TRUE, FALSE): Move their definition to...
24114 * src/system.h: here.
24115
24116 2000-10-02 Akim Demaille <akim@epita.fr>
24117
24118 * src/files.c: Formatting changes.
24119 (tryopen, tryclose, openfiles): Rename as...
24120 (xfopen, xfclose, open_files): this.
24121 (stringappend): static.
24122 * src/files.h: Complete the list of exported symbols.
24123 Propagate its use.
24124
24125 2000-10-02 Akim Demaille <akim@epita.fr>
24126
24127 * src/reader.h: New file.
24128 Propagate its use instead of tedious list of `extern' and
24129 prototypes.
24130 * src/reader.c: Formatting changes, topological sort,
24131 s/register//.
24132
24133 2000-10-02 Akim Demaille <akim@epita.fr>
24134
24135 * src/lex.h: Prototype `lex.c' exported functions.
24136 * src/reader.c: Adjust.
24137 * src/lex.c: Formatting changes.
24138 (safegetc): Rename as...
24139 (xgetc): this.
24140
24141 2000-10-02 Akim Demaille <akim@epita.fr>
24142
24143 * src/lalr.h: New file.
24144 Propagate its inclusion instead of prototypes and `extern'.
24145 * src/lalr.c: Formatting changes, topological sorting etc.
24146
24147 2000-10-02 Akim Demaille <akim@epita.fr>
24148
24149 * src/output.c (token_actions): Introduce a temporary array,
24150 YYDEFACT, that makes it possible for this function to use
24151 output_short_table.
24152
24153 2000-10-02 Akim Demaille <akim@epita.fr>
24154
24155 `user_toknums' is output as a `short[]' in `output.c', while it is
24156 defined as a `int[]' in `reader.c'. For consistency with the
24157 other output tables, `user_toknums' is now defined as a table of
24158 shorts.
24159
24160 * src/reader.c (user_toknums): Be a short table instead of an int
24161 table.
24162 Adjust dependencies.
24163
24164 Factor the short table outputs.
24165
24166 * src/output.c (output_short_table): New function.
24167 * src/output.c (output_gram, output_stos, output_rule_data)
24168 (output_base, output_table, output_check): Use it.
24169
24170 2000-10-02 Akim Demaille <akim@epita.fr>
24171
24172 * src/output.c (output): Topological sort of the functions, in
24173 order to get rid of the `static' prototypes.
24174 No longer use `register'.
24175 * src/output.h: New file.
24176 Propagate its inclusion in files explicitly prototyping functions
24177 from output.c.
24178
24179 2000-09-21 Akim Demaille <akim@epita.fr>
24180
24181 * src/atgeneral.m4: Update from Autoconf.
24182
24183 2000-09-21 Akim Demaille <akim@epita.fr>
24184
24185 * src/closure.h: New file.
24186 * src/closure.c: Formatting changes, topological sort over the
24187 functions, use of closure.h.
24188 (initialize_closure, finalize_closure): Rename as...
24189 (new_closure, free_closure): these. Adjust dependencies.
24190 * src/LR0.c: Formatting changes, topological sort, use of
24191 cloture.h.
24192 (initialize_states): Rename as...
24193 (new_states): this.
24194 * src/Makefile.am (noinst_HEADERS): Adjust.
24195
24196 2000-09-20 Akim Demaille <akim@epita.fr>
24197
24198 * src/acconfig.h: Don't protect config.h against multiple
24199 inclusion.
24200 Don't define PARAMS.
24201 * src/system.h: Define PARAMS.
24202 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
24203 purpose of config.h. system.h must not try to fix wrong
24204 definitions in config.h.
24205
24206 2000-09-20 Akim Demaille <akim@epita.fr>
24207
24208 * src/derives.h: New file.
24209 * src/main.c, src/derives.h: Use it.
24210 Formatting changes.
24211 * src/Makefile.am (noinst_HEADERS): Adjust.
24212
24213 2000-09-20 Akim Demaille <akim@epita.fr>
24214
24215 * tests/atgeneral.m4: Update from Autoconf.
24216 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
24217 (AT_CHECK_CALC): New macros.
24218 Use these macros to test bison with options `', `--raw',
24219 `--debug', `--yacc', `--yacc --debug'.
24220
24221 2000-09-19 Akim Demaille <akim@epita.fr>
24222
24223 * src/output.c: Formatting changes.
24224 * src/machine.h: Remove, leaving its contents in...
24225 * src/system.h: here.
24226 Include stdio.h.
24227 Adjust all dependencies on stdio.h and machine.h.
24228 * src/getargs.h: New file.
24229 Let all `extern' declarations about getargs.c be replaced with
24230 inclusion of `getargs.h'.
24231 * src/Makefile.am (noinst_HEADERS): Adjust.
24232
24233 * tests/calc.m4 (yyin): Be initialized in main, not on the global
24234 scope.
24235 (yyerror): Returns void, not int.
24236 * doc/bison.texinfo: Formatting changes.
24237
24238 2000-09-19 Akim Demaille <akim@epita.fr>
24239
24240 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
24241 portable.
24242
24243 2000-09-18 Akim Demaille <akim@epita.fr>
24244
24245 * configure.in: Append WARNING_CFLAGS to CFLAGS.
24246 * src/Makefile.am (INCLUDES): Don't.
24247 Be ready to fetch headers in lib/.
24248
24249 2000-09-18 Akim Demaille <akim@epita.fr>
24250
24251 * doc/bison.texinfo: Update the copyright.
24252 ANSIfy and GNUify the examples.
24253 Remove the old menu.
24254
24255 2000-09-18 Akim Demaille <akim@epita.fr>
24256
24257 First set of tests: use the `calc' example from the documentation.
24258
24259 * src/bison.s1 (yyparse): Condition the code using `yytname' which
24260 is defined only when YYDEBUG is.
24261 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
24262 * src/files.c (tryopen, tryclose): Formatting changes.
24263 Move to the top and be static.
24264 * src/reader.c (read_signed_integer): Likewise.
24265 * tests/calc.m4: New file.
24266 * Makefile.am, suite.m4: Adjust.
24267 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
24268
24269 2000-09-18 Akim Demaille <akim@epita.fr>
24270
24271 Add support for an Autotest test suite for Bison.
24272
24273 * m4/m4.m4, m4/atconfig.m4: New files.
24274 * m4/Makefile.am (EXTRA_DIST): Adjust.
24275 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
24276 files.
24277 * src/getargs.c: Display a more standard --version message.
24278 * src/reader.c (reader): Formatting changes.
24279 No longer depend upon VERSION_STRING.
24280 * configure.in: No longer use `dnl'.
24281 Set up the test suite and the new directory `tests/.
24282 (VERSION_STRING): Remove.
24283
24284 2000-04-14 Akim Demaille <akim@epita.fr>
24285
24286 * src/reader.c (copy_comment2): New function, same as former
24287 `copy_comment', but outputs into two FILE *.
24288 (copy_comment): Use it.
24289 (parse_union_decl): Use it.
24290 (get_type, parse_start_decl): Use the same `invalid' message.
24291 (parse_start_decl, parse_union_decl): Use the same `multiple'
24292 message.
24293 (parse_union_decl, copy_guard, copy_action): Use the same
24294 `unmatched' message.
24295 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
24296
24297 2000-03-31 Akim Demaille <akim@epita.fr>
24298
24299 * src/files.c (tryopen, tryclose): Move to the top.
24300 Be static.
24301
24302 2000-03-31 Akim Demaille <akim@epita.fr>
24303
24304 * src/main.c (main): Don't call `done', exit does it.
24305
24306 2000-03-31 Akim Demaille <akim@epita.fr>
24307
24308 * allocate.c: s/return (foo)/return foo/.
24309 * lalr.c: Likewise.
24310 * LR0.c: Likewise.
24311 * output.c: Likewise.
24312 * reader.c: Likewise.
24313 * symtab.c: Likewise.
24314 * vmsgetargs.c: Likewise.
24315
24316 2000-03-31 Akim Demaille <akim@epita.fr>
24317
24318 Clean up the error reporting functions.
24319
24320 * src/report.c: New file.
24321 * src/report.h: Likewise.
24322 * src/Makefile.am: Adjust.
24323 * m4/error.m4: New file.
24324 * m4/Makefile.am: Adjust.
24325 * configure.in (jm_PREREQ_ERROR): Call it.
24326 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
24327 Remove.
24328 (fatal, fatals): Remove. All callers use complain.c::fatal.
24329 (warn, warni, warns, warnss, warnss): Remove. All callers use
24330 complain.c::complain.
24331 (toomany): Remove, use fatal instead.
24332 * src/files.c (done): No argument, use complain_message_count.
24333 * src/main.c (main): Register `done' to `atexit'.
24334
24335 * src/getargs.c (usage): More `fputs', less `fprintf'.
24336
24337 2000-03-28 Akim Demaille <akim@epita.fr>
24338
24339 * lib/: New directory.
24340 * Makefile.am (SUBDIRS): Adjust.
24341 * configure.in: Adjust.
24342 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
24343 useless.
24344 * src/alloca.c: Moved to lib/.
24345 * src/getopt.c: Likewise.
24346 * src/getopt1.c: Likewise.
24347 * src/getopt.h: Likewise.
24348 * src/ansi2knr.c: Likewise.
24349 * src/ansi2knr.1: Likewise.
24350 * src/Makefile.am: Adjust.
24351 * lib/Makefile.am: New file.
24352
24353 2000-03-28 Akim Demaille <akim@epita.fr>
24354
24355 * src/getargs.c (usage): Refresh the help message.
24356
24357 2000-03-17 Akim Demaille <akim@epita.fr>
24358
24359 * src/getopt1.c: Updated from textutils 2.0e
24360 * src/getopt.c: Likewise.
24361 * src/getopt.h: Likewise.
24362
24363 2000-03-17 Akim Demaille <akim@epita.fr>
24364
24365 * src/Makefile.am (bison.simple): Fix the awk program: quote only
24366 the file name, not the whole `#line LINE FILE'.
24367
24368 2000-03-17 Akim Demaille <akim@epita.fr>
24369
24370 On syntax errors, report the token on which we choked.
24371
24372 * src/bison.s1 (yyparse): In the label yyerrlab, when
24373 YYERROR_VERBOSE, add yychar in msg.
24374
24375 2000-03-17 Akim Demaille <akim@epita.fr>
24376
24377 * src/reader.c (copy_at): New function.
24378 (copy_guard): Use it.
24379 (copy_action): Use it.
24380
24381 2000-03-17 Akim Demaille <akim@epita.fr>
24382
24383 Be kind to translators, save some useless translations.
24384
24385 * src/main.c (banner): New function.
24386 (fatal_banner): Use it.
24387 (warn_banner): Use it.
24388
24389 2000-03-17 Akim Demaille <akim@epita.fr>
24390
24391 * src/reader.c (copy_definition): Use copy_string and
24392 copy_comment. Removed now unused `match', `ended',
24393 `cplus_comment'.
24394 (copy_comment, copy_string): Moved, to be visible from
24395 copy_definition.
24396
24397 2000-03-17 Akim Demaille <akim@epita.fr>
24398
24399 * src/reader.c (copy_string): Declare `static inline'. No
24400 problems with inline, since it is checked by configure.
24401 (copy_comment): Likewise.
24402
24403 2000-03-17 Akim Demaille <akim@epita.fr>
24404
24405 * src/reader.c (packsymbols): Formatting changes.
24406
24407 2000-03-17 Akim Demaille <akim@epita.fr>
24408
24409 * src/reader.c (copy_comment): New function, factored out from:
24410 (copy_action): Use it. Removed now unused `match', `ended',
24411 `cplus_comment'.
24412 (copy_guard): Likewise.
24413
24414 2000-03-17 Akim Demaille <akim@epita.fr>
24415
24416 * src/reader.c (copy_string): New function, factored out from:
24417 (copy_action): Use it.
24418 (copy_guard): Likewise.
24419
24420 2000-03-17 Akim Demaille <akim@epita.fr>
24421
24422 Change the handling of @s so that they behave exactly like $s.
24423 There is now a pseudo variable @$ (readble and writable), location
24424 of the lhs of the rule (by default ranging from the location of
24425 the first symbol of the rhs, to the location of the last symbol,
24426 or, if the rhs is empty, YYLLOC).
24427
24428 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
24429 yyval.
24430 (yyparse): When providing a default semantic action, provide a
24431 default location action.
24432 (after the $): No longer change `*YYLSP', just stack YYLOC the
24433 same way you stack YYVAL.
24434 * src/reader.c (read_declarations): Use warns.
24435 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
24436 (copy_action, case '@'): Likewise.
24437 Use a standard error message, to save useless work from
24438 translators.
24439
24440 2000-03-17 Akim Demaille <akim@epita.fr>
24441
24442 * src/bison.s1: Formatting and cosmetics changes.
24443 * src/reader.c: Likewise.
24444 Update the Copyright notice.
24445
24446 2000-03-17 Akim Demaille <akim@epita.fr>
24447
24448 * src/bison.s1 (#line): All set to `#line' only, since the
24449 Makefile now handles them.
24450
24451 2000-03-16 Akim Demaille <akim@epita.fr>
24452
24453 * src/output.c (output_rule_data): Output the documentation of
24454 some of the tables.
24455 (Copyright notice): Update.
24456 Formatting changes.
24457
24458 2000-03-16 Akim Demaille <akim@epita.fr>
24459
24460 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
24461 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
24462 One `#if YYDEBUG' remains, since it uses variables which are
24463 defined only if `YYDEBUG != 0'.
24464
24465 2000-03-16 Akim Demaille <akim@epita.fr>
24466
24467 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
24468 and related variables so that the similarities are highlighted.
24469
24470 2000-03-16 Akim Demaille <akim@epita.fr>
24471
24472 * src/bison.s1: Properly indent CPP directives.
24473
24474 2000-03-16 Akim Demaille <akim@epita.fr>
24475
24476 * src/bison.s1: Properly indent the `alloca' CPP section.
24477
24478 2000-03-16 Akim Demaille <akim@epita.fr>
24479
24480 Do not hard code values of directories in `configure.in'.
24481 Update the `configure' tool chain.
24482
24483 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
24484 src/makefile.am.
24485 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
24486 (AC_OUTPUT): Add m4/Makefile.
24487 Bump to bison 1.28a, 1.29 has never been released.
24488 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
24489 handled via src/Makefile.am.
24490 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
24491 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
24492 autoheader.
24493 * Makefile.am (SUBDIRS): Add m4.
24494 (ACLOCAL_AM_FLAGS): New variable.
24495 (AUTOMAKE_OPTIONS): Add check-news.
24496 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
24497 the proper line number and file name.
24498 (DEFS): Propagate the location of bison library files and of the
24499 locale files.
24500 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
24501 builddir.
24502 * acinclude.m4: Remove, replaced by the directory m4.
24503 * m4/Makefile.am (EXTRA_DIST): New variable.
24504 * m4/gettext.m4: New file, from the fileutils.
24505 * m4/lcmessage.m4: Likewise
24506 * m4/progtest.m4: Likewise.
24507 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
24508
24509 2000-03-10 Akim Demaille <akim@epita.fr>
24510
24511 * src/closure.c:
24512 Formatting changes of various comments.
24513 Respect the GNU coding standards at various places.
24514 Don't use `_()' when no translation is needed.
24515
24516 1999-12-13 Jesse Thilo <jthilo@gnu.org>
24517
24518 * src/files.c:
24519 OS/2 honors TMPDIR environment variable.
24520
24521 1999-12-13 Jesse Thilo <jthilo@gnu.org>
24522
24523 * doc/bison.texinfo: Tweaked spelling and grammar.
24524 Updated ISBN.
24525 Removed reference to price of printed copy.
24526 Mention BISON_SIMPLE and BISON_HAIRY.
24527
24528 1999-12-13 Jesse Thilo <jthilo@gnu.org>
24529
24530 * configure.in, NEWS:
24531 Bison 1.29 released.
24532
24533 1999-10-27 Jesse Thilo <jthilo@gnu.org>
24534
24535 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
24536 Added reference card.
24537
24538 1999-07-26 Jesse Thilo <jthilo@gnu.org>
24539
24540 * po/ru.po: Added Russian translation.
24541
24542 1999-07-26 Jesse Thilo <jthilo@gnu.org>
24543
24544 * configure.in: Added Russian translation.
24545
24546 1999-07-06 Jesse Thilo <jthilo@gnu.org>
24547
24548 * configure.in, NEWS, README:
24549 Released version 1.28.
24550
24551 1999-06-14 Jesse Thilo <jthilo@gnu.org>
24552
24553 * src/system.h:
24554 Squashed redefinition warning on some systems.
24555
24556 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
24557 Have configure build version string instead of relying on ANSI string
24558 concatentation.
24559
24560 1999-06-14 Jesse Thilo <jthilo@gnu.org>
24561
24562 * po/POTFILES.in: Got rid of version.c.
24563
24564 1999-06-14 Jesse Thilo <jthilo@gnu.org>
24565
24566 * acconfig.h, configure.in:
24567 Have configure build version string instead of relying on ANSI string
24568 concatentation.
24569
24570 1999-06-08 Jesse Thilo <jthilo@gnu.org>
24571
24572 * doc/bison.1:
24573 Dropped mention of `+' for long-named options.
24574
24575 1999-05-30 Jesse Thilo <jthilo@gnu.org>
24576
24577 * src/files.c: Added <unistd.h> for unlink().
24578
24579 * src/Makefile.am, src/system.h:
24580 I18n fixes.
24581
24582 1999-05-30 Jesse Thilo <jthilo@gnu.org>
24583
24584 * README: Added a FAQ list.
24585
24586 * configure.in, acconfig.h:
24587 I18n fixes.
24588
24589 1999-05-30 Jesse Thilo <jthilo@gnu.org>
24590
24591 * doc/FAQ, doc/Makefile.am:
24592 Added a FAQ list.
24593
24594 1999-05-19 Jesse Thilo <jthilo@gnu.org>
24595
24596 * src/alloc.h, src/symtab.h, src/version.c:
24597 Protected inclusion of "config.h" with HAVE_CONFIG_H.
24598
24599 1999-04-18 Jesse Thilo <jthilo@gnu.org>
24600
24601 * src/.cvsignore, src/Makefile.am:
24602 Reorganized: sources in `src', documentation in `doc'.
24603
24604 * src/lex.c (literalchar):
24605 fixed the code for escaping double quotes (thanks
24606 Jonathan Czisny.)
24607
24608 1999-04-18 Jesse Thilo <jthilo@gnu.org>
24609
24610 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
24611 Adjusted paths to reflect directory reorganization.
24612
24613 1999-04-18 Jesse Thilo <jthilo@gnu.org>
24614
24615 * doc/.cvsignore, doc/Makefile.am:
24616 Reorganized: sources in `src', documentation in `doc'.
24617
24618 1999-04-18 Jesse Thilo <jthilo@gnu.org>
24619
24620 * configure.in:
24621 Updated AC_INIT file to reflect directory reorganization.
24622
24623 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
24624 Reorganized: sources in `src', documentation in `doc'.
24625
24626 1999-04-13 Jesse Thilo <jthilo@gnu.org>
24627
24628 * src/allocate.c:
24629 Don't declare calloc() and realloc() if not necessary.
24630
24631 1999-04-13 Jesse Thilo <jthilo@gnu.org>
24632
24633 * configure.in, acconfig.h, acinclude.m4:
24634 Don't declare calloc() and realloc() if not necessary.
24635
24636 1999-03-23 Jesse Thilo <jthilo@gnu.org>
24637
24638 * po/.cvsignore: Added i18n support.
24639
24640 1999-03-23 Jesse Thilo <jthilo@gnu.org>
24641
24642 * acconfig.h, configure.in, Makefile.am:
24643 Added i18n support.
24644
24645 1999-03-22 Jesse Thilo <jthilo@gnu.org>
24646
24647 * src/bison.s1: Fixed #line numbers.
24648
24649 1999-03-15 Jesse Thilo <jthilo@gnu.org>
24650
24651 * po/es.po, po/fr.po, po/nl.po, po/de.po:
24652 Added PO files from Translation Project.
24653
24654 1999-03-03 Jesse Thilo <jthilo@gnu.org>
24655
24656 * Makefile.am:
24657 Added support for non-ANSI compilers (ansi2knr).
24658
24659 1999-02-16 Jesse Thilo <jthilo@gnu.org>
24660
24661 * configure.in: Bumped version number to 1.27.
24662
24663 * Makefile.am:
24664 Added `bison.simple' to list of files removed by `make distclean'.
24665
24666 1999-02-12 Jesse Thilo <jthilo@gnu.org>
24667
24668 * src/files.c, src/files.h:
24669 Defined locations of parser files in config.h instead of Makefile.
24670
24671 1999-02-12 Jesse Thilo <jthilo@gnu.org>
24672
24673 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
24674 Defined locations of parser files in config.h instead of Makefile.
24675
24676 1999-02-09 Jesse Thilo <jthilo@gnu.org>
24677
24678 * Makefile.am:
24679 Removed inappropriate use of $< macro.
24680
24681 1999-02-05 Jesse Thilo <jthilo@gnu.org>
24682
24683 * po/Makefile.in.in, po/POTFILES.in:
24684 Add `po' directory skeleton.
24685
24686 1999-01-27 Jesse Thilo <jthilo@gnu.org>
24687
24688 * README: Document help-bison list.
24689
24690 * configure.in: Add check for mkstemp().
24691
24692 1999-01-20 Jesse Thilo <jthilo@gnu.org>
24693
24694 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
24695 Hush a few compiler warnings.
24696
24697 * src/files.c:
24698 Add tryclose(), which verifies that fclose was successful.
24699 Hush a couple of compiler warnings.
24700
24701 1999-01-20 Jesse Thilo <jthilo@gnu.org>
24702
24703 * Makefile.am, OChangeLog:
24704 ChangeLog is now automatically generated. Include the old version as
24705 OChangeLog.
24706
24707 1999-01-14 Jesse Thilo <jthilo@gnu.org>
24708
24709 * 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:
24710 Update FSF address.
24711
24712 1999-01-14 Jesse Thilo <jthilo@gnu.org>
24713
24714 * doc/bison.texinfo: Fix formatting glitch.
24715
24716 * doc/bison.texinfo: Update FSF address.
24717
24718 1999-01-14 Jesse Thilo <jthilo@gnu.org>
24719
24720 * acconfig.h: Update FSF address.
24721
24722 1999-01-08 Jesse Thilo <jthilo@gnu.org>
24723
24724 * src/system.h:
24725 Don't define PACKAGE here, since config.h defines it.
24726
24727 1998-12-30 Jesse Thilo <jthilo@gnu.org>
24728
24729 * src/reader.c: Update copyright date.
24730
24731 * src/main.c:
24732 Ditch sprintf to statically-sized buffers in fatal/warn functions in
24733 favor of output directly to stderr (avoids buffer overruns).
24734
24735 * src/reader.c: Some checks for premature EOF.
24736
24737 * 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:
24738 Use prototypes if the compiler understands them.
24739
24740 * src/files.c: Honor TMPDIR on Unix hosts.
24741 Use prototypes if the compiler understands them.
24742
24743 * src/reader.c:
24744 Fix a couple of buffer overrun bugs.
24745 Use prototypes if the compiler understands them.
24746
24747 * src/system.h: Include unistd.h and ctype.h.
24748 Use #ifdef instead of #if for NLS symbols.
24749
24750 1998-12-30 Jesse Thilo <jthilo@gnu.org>
24751
24752 * doc/bison.texinfo:
24753 Delete comment "consider using @set for edition number, etc..." since
24754 we now are doing so.
24755
24756 1998-12-30 Jesse Thilo <jthilo@gnu.org>
24757
24758 * configure.in:
24759 Use prototypes if the compiler understands them.
24760
24761 * NEWS: Document 1.26 highlights.
24762
24763 * Makefile.am: Require Automake 1.3 or later.
24764
24765 * acconfig.h:
24766 Use prototypes if the compiler understands them.
24767
24768 1998-12-29 Jesse Thilo <jthilo@gnu.org>
24769
24770 * src/version.c:
24771 Use VERSION symbol from automake for version number.
24772
24773 1998-12-29 Jesse Thilo <jthilo@gnu.org>
24774
24775 * acconfig.h, configure.in, version.cin:
24776 Use VERSION symbol from automake for version number.
24777
24778 1998-11-28 Jesse Thilo <jthilo@gnu.org>
24779
24780 * Makefile.am:
24781 Distribute original version of simple parser (bison.s1), not built
24782 version (bison.simple).
24783
24784 1998-11-28 Jesse Thilo <jthilo@gnu.org>
24785
24786 * doc/bison.texinfo: Add info dir entry.
24787
24788 * doc/bison.texinfo:
24789 Let automake put version number into documentation.
24790
24791 1998-11-26 Jesse Thilo <jthilo@gnu.org>
24792
24793 * src/bison.cld, src/build.com, src/vmshlp.mar:
24794 Add non-RCS files from /gd/gnu/bison.
24795
24796 1998-11-26 Jesse Thilo <jthilo@gnu.org>
24797
24798 * doc/bison.1:
24799 Document the BISON_HAIRY and BISON_SIMPLE variables.
24800
24801 1998-11-25 Jesse Thilo <jthilo@gnu.org>
24802
24803 * src/version.c: Build version.c automatically.
24804
24805 * src/reader.c:
24806 Fix token numbering (used to start at 258, not 257).
24807
24808 * src/system.h: Include config.h.
24809
24810 * src/getargs.c: Update bug report address.
24811
24812 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
24813 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
24814
24815 1998-11-25 Jesse Thilo <jthilo@gnu.org>
24816
24817 * Makefile.am:
24818 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
24819
24820 * configure.in, version.cin:
24821 Build version.c automatically.
24822
24823 * AUTHORS: Add AUTHORS file.
24824
24825 * README: Update bug report address.
24826
24827 * bison.simple:
24828 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
24829
24830 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
24831 Add automake stuff.
24832
24833 1998-11-25 Jesse Thilo <jthilo@gnu.org>
24834
24835 * doc/bison.texinfo: Clean up some formatting.
24836
24837 1998-05-05 Richard Stallman <rms@gnu.org>
24838
24839 * doc/bison.texinfo:
24840 Explain better why to make a pure parser.
24841
24842 1998-01-05 Richard Stallman <rms@gnu.org>
24843
24844 * src/files.c (openfiles):
24845 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
24846 find a temporary directory, if possible. Do not unlink files while
24847 they are open.
24848
24849 1997-08-25 Richard Stallman <rms@gnu.org>
24850
24851 * src/reader.c (stack_offset;):
24852 Change some warni to warns.
24853
24854 * src/lex.c (literalchar): Use warns, not warni.
24855
24856 1997-06-28 Richard Stallman <rms@gnu.org>
24857
24858 * src/bison.s1: Add a Bison version comment.
24859
24860 * src/main.c (fatal, warn, berror):
24861 Use program_name.
24862
24863 1997-06-28 Richard Stallman <rms@gnu.org>
24864
24865 * Makefile.in (bison_version): New variable.
24866 (dist): Use that variable.
24867 (bison.s1): Substitute the Bison version into bison.simple.
24868
24869 * bison.simple: Add a Bison version comment.
24870
24871 1997-06-18 Richard Stallman <rms@gnu.org>
24872
24873 * src/main.c (fatal, warn, berror):
24874 Make error messages standard.
24875 (toomany): Improve error message text.
24876
24877 * 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:
24878 new.h renamed to alloc.h.
24879
24880 1997-06-18 Richard Stallman <rms@gnu.org>
24881
24882 * Makefile.in: new.h renamed to alloc.h.
24883
24884 1997-05-24 Richard Stallman <rms@gnu.org>
24885
24886 * src/lex.c (literalchar):
24887 Fix the code for escaping \, " and '.
24888
24889 (lex): Avoid trouble when there are many chars
24890 to discard in a char literal with just several chars in it.
24891
24892 1997-05-17 Richard Stallman <rms@gnu.org>
24893
24894 * src/bison.s1:
24895 Use malloc, if using alloca is troublesome.
24896 (YYSTACK_USE_ALLOCA): New flag macro.
24897 Define it for some systems and compilers.
24898 (YYSTACK_ALLOC): New macro.
24899 (yyparse): Use YYSTACK_ALLOC to allocate stack.
24900 If it was malloc'd, free it.
24901
24902 1997-05-17 Richard Stallman <rms@gnu.org>
24903
24904 * bison.simple:
24905 Use malloc, if using alloca is troublesome.
24906 (YYSTACK_USE_ALLOCA): New flag macro.
24907 Define it for some systems and compilers.
24908 (YYSTACK_ALLOC): New macro.
24909 (yyparse): Use YYSTACK_ALLOC to allocate stack.
24910 If it was malloc'd, free it.
24911
24912 1997-04-23 Richard Stallman <rms@gnu.org>
24913
24914 * src/bison.s1:
24915 (alloca) [__hpux]: Always define as __builtin_alloca.
24916
24917 1997-04-23 Richard Stallman <rms@gnu.org>
24918
24919 * bison.simple:
24920 (alloca) [__hpux]: Always define as __builtin_alloca.
24921
24922 1997-04-22 Richard Stallman <rms@gnu.org>
24923
24924 * src/bison.s1:
24925 [__hpux]: Include alloca.h (right for HPUX 10)
24926 instead of declaring alloca (right for HPUX 9).
24927
24928 * src/bison.s1 (__yy_memcpy):
24929 Declare arg `count' as unsigned int.
24930 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
24931
24932 1997-04-22 Richard Stallman <rms@gnu.org>
24933
24934 * bison.simple:
24935 [__hpux]: Include alloca.h (right for HPUX 10)
24936 instead of declaring alloca (right for HPUX 9).
24937
24938 * bison.simple (__yy_memcpy):
24939 Declare arg `count' as unsigned int.
24940 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
24941
24942 1997-01-03 Richard Stallman <rms@gnu.org>
24943
24944 * src/allocate.c: [__STDC__ or _MSC_VER]:
24945 Declare calloc and realloc to return void *.
24946
24947 1997-01-02 Richard Stallman <rms@gnu.org>
24948
24949 * src/system.h:
24950 [_MSC_VER]: Include stdlib.h and process.h.
24951 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
24952
24953 * src/main.c (main): Return FAILURE as a value.
24954 (printable_version): Declare arg as int, not char.
24955
24956 1997-01-02 Richard Stallman <rms@gnu.org>
24957
24958 * Makefile.in (dist):
24959 Explicitly check for symlinks, and copy them.
24960
24961 1996-12-19 Richard Stallman <rms@gnu.org>
24962
24963 * src/files.c:
24964 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
24965
24966 1996-12-18 Paul Eggert <eggert@gnu.org>
24967
24968 * src/bison.s1 (yyparse):
24969 If __GNUC__ and YYPARSE_PARAM are both defined,
24970 declare yyparse to have a void * argument.
24971
24972 1996-12-18 Paul Eggert <eggert@gnu.org>
24973
24974 * bison.simple (yyparse):
24975 If __GNUC__ and YYPARSE_PARAM are both defined,
24976 declare yyparse to have a void * argument.
24977
24978 1996-12-17 Richard Stallman <rms@gnu.org>
24979
24980 * src/reduce.c (nbits): Add some casts.
24981
24982 1996-08-12 Richard Stallman <rms@gnu.org>
24983
24984 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
24985
24986 1996-08-12 Richard Stallman <rms@gnu.org>
24987
24988 * bison.simple: Test _MSDOS as well as _MSDOS_.
24989
24990 1996-07-31 Richard Stallman <rms@gnu.org>
24991
24992 * src/bison.s1:
24993 [__sun && __i386]: Include alloca.h.
24994
24995 1996-07-31 Richard Stallman <rms@gnu.org>
24996
24997 * bison.simple:
24998 [__sun && __i386]: Include alloca.h.
24999
25000 1996-07-30 Richard Stallman <rms@gnu.org>
25001
25002 * src/bison.s1: Comment change.
25003
25004 * src/bison.s1: Test _MSDOS_, not MSDOS.
25005
25006 1996-07-30 Richard Stallman <rms@gnu.org>
25007
25008 * bison.simple: Comment change.
25009
25010 * bison.simple: Test _MSDOS_, not MSDOS.
25011
25012 1996-06-01 Richard Stallman <rms@gnu.org>
25013
25014 * 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:
25015 Insert `_' macro around many string constants.
25016
25017 * src/main.c:
25018 Insert `_' macro around many string constants.
25019
25020 (main): Call setlocale, bindtextdomain and textdomain.
25021
25022 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
25023 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
25024 [ENABLE_NLS]: Include libintl.h.
25025 [ENABLE_NLS] (gettext): Define.
25026 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
25027 (N_, PACKAGE, LOCALEDIR): New macros.
25028
25029 1996-06-01 Richard Stallman <rms@gnu.org>
25030
25031 * POTFILES.in: New file.
25032
25033 * Makefile.in (allocate.o):
25034 Define target explicitly.
25035
25036 * Makefile.in (CFLAGS): Set to @CFLAGS@.
25037 (LDFLAGS): Set to @LDFLAGS@.
25038 (configure): Run autoconf only if preceding `cd' succeeds.
25039 (bison.s1): Redirect output to temporary file then move the
25040 temporary to the target, rather than redirecting directly to bison.s1.
25041 (clean): Remove config.status and config.log.
25042 (distclean): Don't remove config.status here.
25043
25044 1996-05-12 Richard Stallman <rms@gnu.org>
25045
25046 * src/bison.s1:
25047 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
25048
25049 1996-05-12 Richard Stallman <rms@gnu.org>
25050
25051 * bison.simple:
25052 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
25053
25054 1996-05-11 Richard Stallman <rms@gnu.org>
25055
25056 * src/bison.s1 (__yy_memcpy):
25057 Really reorder the args, as was supposedly done on Feb 14 1995.
25058 (yyparse): Calls changed accordingly.
25059
25060 1996-05-11 Richard Stallman <rms@gnu.org>
25061
25062 * Makefile.in (dist): Don't use $(srcdir).
25063
25064 * bison.simple (__yy_memcpy):
25065 Really reorder the args, as was supposedly done on Feb 14 1995.
25066 (yyparse): Calls changed accordingly.
25067
25068 1996-01-27 Richard Stallman <rms@gnu.org>
25069
25070 * src/output.c (output_rule_data):
25071 Test YYERROR_VERBOSE in the conditional
25072 around the definition of ttyname.
25073
25074 1995-12-29 Richard Stallman <rms@gnu.org>
25075
25076 * src/bison.s1:
25077 Fix line numbers in #line commands.
25078
25079 1995-12-29 Richard Stallman <rms@gnu.org>
25080
25081 * bison.simple:
25082 Fix line numbers in #line commands.
25083
25084 1995-12-27 Richard Stallman <rms@gnu.org>
25085
25086 * src/bison.s1 (YYPARSE_PARAM_DECL):
25087 In C++, make it always null.
25088 (YYPARSE_PARAM_ARG): New macro.
25089 (yyparse): Use YYPARSE_PARAM_ARG.
25090
25091 1995-12-27 Richard Stallman <rms@gnu.org>
25092
25093 * bison.simple (YYPARSE_PARAM_DECL):
25094 In C++, make it always null.
25095 (YYPARSE_PARAM_ARG): New macro.
25096 (yyparse): Use YYPARSE_PARAM_ARG.
25097
25098 1995-11-29 Richard Stallman <rms@gnu.org>
25099
25100 * doc/bison.texinfo:
25101 Describe literal string tokens, %raw, %no_lines, %token_table.
25102
25103 1995-11-29 Daniel Hagerty <hag@gnu.org>
25104
25105 * doc/bison.texinfo: Fixed update date
25106
25107 1995-10-16 Richard Stallman <rms@gnu.org>
25108
25109 * src/version.c: Version 1.25.
25110
25111 1995-10-16 Richard Stallman <rms@gnu.org>
25112
25113 * NEWS: *** empty log message ***
25114
25115 1995-10-16 Richard Stallman <rms@gnu.org>
25116
25117 * doc/bison.1, doc/bison.rnh:
25118 Add new options.
25119
25120 1995-10-15 Richard Stallman <rms@gnu.org>
25121
25122 * src/vmsgetargs.c, src/getargs.c:
25123 Added -n, -k, and -raw switches.
25124 (noparserflag, toknumflag, rawtoknumflag): New variables.
25125
25126 * src/symtab.h (SALIAS):
25127 New #define for adding aliases to %token.
25128 (struct bucket): Added `alias' field.
25129
25130 * src/reduce.c (reduce_grammar):
25131 Revise error message.
25132 (print_notices): Remove final `.' from error message.
25133
25134 * src/reader.c (reader_output_yylsp):
25135 New function.
25136 (readgram): Use `#if 0' around code that accepted %command
25137 inside grammar rules: The documentation doesn't allow it,
25138 and it will fail since the %command processors scan for the next %.
25139 (parse_token_decl): Extended the %token
25140 declaration to allow a multi-character symbol as an alias.
25141 (parse_thong_decl): New function.
25142 (read_declarations): Added %thong declarations.
25143 (read_declarations): Handle NOOP to deal with allowing
25144 % declarations as another means to specify the flags.
25145 (readgram): Allow %prec prior to semantics embedded in a rule.
25146 (skip_to_char, read_declarations, copy_definition)
25147 (parse_token_decl, parse_start_decl, parse_type_decl)
25148 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
25149 (get_type_name, copy_guard, copy_action, readgram)
25150 (get_type, packsymbols): Revised most error messages.
25151 Changed `fatal' to `warnxxx' to avoid aborting for error.
25152 Revised and use multiple warnxxx functions to avoid using VARARGS1.
25153 (read_declarations): Improve the error message for
25154 an invalid character. Do not abort.
25155 (read_declarations, copy_guard, copy_action): Use
25156 printable_version to avoid unprintable characters in printed output.
25157 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
25158 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
25159 Allow the type of a non-terminal can be given
25160 more than once, as long as all specifications give the same type.
25161
25162 * src/output.c:
25163 (output_headers, output_trailers, output, output_gram)
25164 (output_rule_data): Implement noparserflag variable.
25165 Implement toknumflag variable.
25166 (output): Call reader_output_yylsp to output LTYPESTR.
25167
25168 * src/main.c (main):
25169 If reader sees an error, don't process the grammar.
25170 (fatals): Updated to not use VARARGS1.
25171 (printable_version, int_to_string, warn, warni, warns, warnss)
25172 (warnsss): New error reporting functions. Avoid abort for error.
25173
25174 * src/lex.h:
25175 Added THONG and NOOP for alias processing.
25176 Added SETOPT for the new code that allows setting options with %flags.
25177
25178 * src/lex.c:
25179 Include getopt.h. Add some extern decls.
25180 (safegetc): New function to deal with EOF gracefully.
25181 (literalchar); new function to deal with reading \ escapes.
25182 (lex): Use literalchar.
25183 (lex): Implemented "..." tokens.
25184 (literalchar, lex, parse_percent_token): Made tokenbuffer
25185 always contain the token. This includes growing the token
25186 buffer while reading an integer.
25187 (parse_percent_token): Replaced if-else statement with percent_table.
25188 (parse_percent_token): Added % declarations as another
25189 way to specify the flags -n, -l, and -r. Also added hooks for
25190 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
25191 major changes to files.c.
25192 (lex) Retain in the incoming stream a character following
25193 an incorrect '/'.
25194 (skip_white_space, lex): Revised most error messages
25195 and changed fatal to warn to avoid aborting.
25196 (percent_table): Added %thong declarations.
25197
25198 * src/gram.h: Comment changes.
25199
25200 * src/files.c (openfiles, open_extra_files, done):
25201 Add faction flag
25202 and actfile file. Handle noparserflag. Both for -n switch.
25203
25204 * src/conflicts.c (resolve_sr_conflict):
25205 Remove use of alloca.
25206
25207 1995-06-01 Jim Meyering <meyering@gnu.org>
25208
25209 * doc/bison.texinfo: *** empty log message ***
25210
25211 1995-05-06 Richard Stallman <rms@gnu.org>
25212
25213 * src/bison.s1: Comment change.
25214
25215 1995-05-06 Richard Stallman <rms@gnu.org>
25216
25217 * bison.simple: Comment change.
25218
25219 1995-05-03 Richard Stallman <rms@gnu.org>
25220
25221 * src/version.c: Version now 1.24.
25222
25223 * src/bison.s1: Change distribution terms.
25224
25225 * src/version.c: Version now 1.23.
25226
25227 1995-05-03 Richard Stallman <rms@gnu.org>
25228
25229 * doc/bison.texinfo:
25230 Rewrite "Conditions for Using Bison".
25231 Update version to 1.24.
25232
25233 1995-05-03 Richard Stallman <rms@gnu.org>
25234
25235 * bison.simple: Change distribution terms.
25236
25237 1995-02-23 Richard Stallman <rms@gnu.org>
25238
25239 * src/files.c: Test __VMS_POSIX as well as VMS.
25240
25241 1995-02-14 Jim Meyering <meyering@gnu.org>
25242
25243 * src/bison.s1 (__yy_memcpy):
25244 Renamed from __yy_bcopy to avoid
25245 confusion. Reverse FROM and TO arguments to be consistent with
25246 those of memcpy.
25247
25248 1995-02-14 Jim Meyering <meyering@gnu.org>
25249
25250 * bison.simple (__yy_memcpy):
25251 Renamed from __yy_bcopy to avoid
25252 confusion. Reverse FROM and TO arguments to be consistent with
25253 those of memcpy.
25254
25255 1994-11-10 David J. MacKenzie <djm@gnu.org>
25256
25257 * NEWS: reformat
25258
25259 * NEWS: New file.
25260
25261 * Makefile.in (DISTFILES): Include NEWS.
25262
25263 * Makefile.in (DISTFILES):
25264 Include install-sh, not install.sh.
25265
25266 * configure.in: Update to Autoconf v2 macro names.
25267
25268 1994-10-05 David J. MacKenzie <djm@gnu.org>
25269
25270 * Makefile.in: fix typo
25271
25272 * Makefile.in (prefix, exec_prefix):
25273 Let configure set them.
25274
25275 1994-09-28 David J. MacKenzie <djm@gnu.org>
25276
25277 * Makefile.in: Set datadir to $(prefix)/share.
25278
25279 1994-09-15 Richard Stallman <rms@gnu.org>
25280
25281 * src/bison.s1:
25282 Update copyright notice and GPL version.
25283
25284 1994-09-15 Richard Stallman <rms@gnu.org>
25285
25286 * bison.simple:
25287 Update copyright notice and GPL version.
25288
25289 1994-07-12 Richard Stallman <rms@gnu.org>
25290
25291 * src/reduce.c, src/reader.c:
25292 entered into RCS
25293
25294 1994-05-05 David J. MacKenzie <djm@gnu.org>
25295
25296 * Makefile.in: entered into RCS
25297
25298 1994-03-26 Richard Stallman <rms@gnu.org>
25299
25300 * src/bison.s1: entered into RCS
25301
25302 1994-03-26 Richard Stallman <rms@gnu.org>
25303
25304 * bison.simple: entered into RCS
25305
25306 1994-03-25 Richard Stallman <rms@gnu.org>
25307
25308 * src/main.c: entered into RCS
25309
25310 1994-03-24 Richard Stallman <rms@gnu.org>
25311
25312 * src/conflicts.c: entered into RCS
25313
25314 1994-01-02 Richard Stallman <rms@gnu.org>
25315
25316 * Makefile.in: *** empty log message ***
25317
25318 1993-11-21 Richard Stallman <rms@gnu.org>
25319
25320 * src/bison.s1: *** empty log message ***
25321
25322 1993-11-21 Richard Stallman <rms@gnu.org>
25323
25324 * doc/bison.texinfo: entered into RCS
25325
25326 * doc/bison.texinfo: *** empty log message ***
25327
25328 1993-11-21 Richard Stallman <rms@gnu.org>
25329
25330 * bison.simple: *** empty log message ***
25331
25332 1993-10-25 David J. MacKenzie <djm@gnu.org>
25333
25334 * doc/bison.texinfo: *** empty log message ***
25335
25336 1993-10-19 Richard Stallman <rms@gnu.org>
25337
25338 * src/bison.s1: *** empty log message ***
25339
25340 1993-10-19 Richard Stallman <rms@gnu.org>
25341
25342 * bison.simple: *** empty log message ***
25343
25344 1993-10-14 Richard Stallman <rms@gnu.org>
25345
25346 * src/bison.s1: *** empty log message ***
25347
25348 1993-10-14 Richard Stallman <rms@gnu.org>
25349
25350 * bison.simple: *** empty log message ***
25351
25352 1993-09-14 David J. MacKenzie <djm@gnu.org>
25353
25354 * doc/bison.texinfo: *** empty log message ***
25355
25356 1993-09-13 Noah Friedman <friedman@gnu.org>
25357
25358 * Makefile.in: *** empty log message ***
25359
25360 1993-09-10 Richard Stallman <rms@gnu.org>
25361
25362 * src/conflicts.c: *** empty log message ***
25363
25364 * src/system.h: entered into RCS
25365
25366 1993-09-10 Richard Stallman <rms@gnu.org>
25367
25368 * doc/bison.1: entered into RCS
25369
25370 1993-09-06 Noah Friedman <friedman@gnu.org>
25371
25372 * src/version.c: entered into RCS
25373
25374 1993-09-06 Noah Friedman <friedman@gnu.org>
25375
25376 * Makefile.in: *** empty log message ***
25377
25378 1993-07-30 David J. MacKenzie <djm@gnu.org>
25379
25380 * Makefile.in: *** empty log message ***
25381
25382 1993-07-24 Richard Stallman <rms@gnu.org>
25383
25384 * src/bison.s1: *** empty log message ***
25385
25386 1993-07-24 Richard Stallman <rms@gnu.org>
25387
25388 * bison.simple: *** empty log message ***
25389
25390 1993-07-08 David J. MacKenzie <djm@gnu.org>
25391
25392 * Makefile.in: *** empty log message ***
25393
25394 1993-07-04 Richard Stallman <rms@gnu.org>
25395
25396 * src/bison.s1: *** empty log message ***
25397
25398 1993-07-04 Richard Stallman <rms@gnu.org>
25399
25400 * bison.simple: *** empty log message ***
25401
25402 1993-06-26 David J. MacKenzie <djm@gnu.org>
25403
25404 * src/getargs.c: entered into RCS
25405
25406 1993-06-26 David J. MacKenzie <djm@gnu.org>
25407
25408 * doc/bison.texinfo: *** empty log message ***
25409
25410 * doc/bison.1: New file.
25411
25412 1993-06-25 Richard Stallman <rms@gnu.org>
25413
25414 * src/getargs.c: New file.
25415
25416 1993-06-16 Richard Stallman <rms@gnu.org>
25417
25418 * src/bison.s1: *** empty log message ***
25419
25420 1993-06-16 Richard Stallman <rms@gnu.org>
25421
25422 * bison.simple: *** empty log message ***
25423
25424 1993-06-03 Richard Stallman <rms@gnu.org>
25425
25426 * src/bison.s1: New file.
25427
25428 1993-06-03 Richard Stallman <rms@gnu.org>
25429
25430 * doc/bison.texinfo: *** empty log message ***
25431
25432 1993-06-03 Richard Stallman <rms@gnu.org>
25433
25434 * bison.simple: New file.
25435
25436 1993-05-19 Richard Stallman <rms@gnu.org>
25437
25438 * doc/bison.texinfo: New file.
25439
25440 1993-05-07 Noah Friedman <friedman@gnu.org>
25441
25442 * Makefile.in: *** empty log message ***
25443
25444 1993-04-28 Noah Friedman <friedman@gnu.org>
25445
25446 * src/reader.c: *** empty log message ***
25447
25448 1993-04-23 Noah Friedman <friedman@gnu.org>
25449
25450 * src/alloc.h: entered into RCS
25451
25452 1993-04-20 David J. MacKenzie <djm@gnu.org>
25453
25454 * src/version.c: *** empty log message ***
25455
25456 * src/files.c, src/allocate.c:
25457 entered into RCS
25458
25459 * src/reader.c: *** empty log message ***
25460
25461 * src/lex.c: entered into RCS
25462
25463 * src/conflicts.c: New file.
25464
25465 * src/symtab.c: entered into RCS
25466
25467 * src/alloc.h: New file.
25468
25469 * src/LR0.c: entered into RCS
25470
25471 1993-04-18 Noah Friedman <friedman@gnu.org>
25472
25473 * src/reader.c: New file.
25474
25475 * src/version.c: *** empty log message ***
25476
25477 1993-04-18 Noah Friedman <friedman@gnu.org>
25478
25479 * Makefile.in: *** empty log message ***
25480
25481 1993-04-17 Noah Friedman <friedman@gnu.org>
25482
25483 * Makefile.in: *** empty log message ***
25484
25485 1993-04-15 Richard Stallman <rms@gnu.org>
25486
25487 * src/main.c, src/files.c:
25488 New file.
25489
25490 1993-04-15 Noah Friedman <friedman@gnu.org>
25491
25492 * configure.in: entered into RCS
25493
25494 * configure.in: *** empty log message ***
25495
25496 * configure.in: New file.
25497
25498 1993-04-14 Richard Stallman <rms@gnu.org>
25499
25500 * Makefile.in: New file.
25501
25502 1993-04-13 Richard Stallman <rms@gnu.org>
25503
25504 * src/version.c: New file.
25505
25506 1993-03-25 Richard Stallman <rms@gnu.org>
25507
25508 * src/output.c: entered into RCS
25509
25510 1992-09-25 Richard Stallman <rms@gnu.org>
25511
25512 * configure.bat: entered into RCS
25513
25514 1992-06-22 Richard Stallman <rms@gnu.org>
25515
25516 * src/vmsgetargs.c: entered into RCS
25517
25518 1992-06-22 Richard Stallman <rms@gnu.org>
25519
25520 * doc/bison.rnh: entered into RCS
25521
25522 1992-04-20 David J. MacKenzie <djm@gnu.org>
25523
25524 * README: entered into RCS
25525
25526 1992-01-22 Richard Stallman <rms@gnu.org>
25527
25528 * src/machine.h: entered into RCS
25529
25530 1991-12-21 Richard Stallman <rms@gnu.org>
25531
25532 * src/lalr.c, src/closure.c:
25533 entered into RCS
25534
25535 1991-12-20 Richard Stallman <rms@gnu.org>
25536
25537 * src/state.h: entered into RCS
25538
25539 1991-12-18 Richard Stallman <rms@gnu.org>
25540
25541 * src/print.c, src/nullable.c, src/derives.c:
25542 entered into RCS
25543
25544 1991-11-03 David J. MacKenzie <djm@gnu.org>
25545
25546 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
25547 entered into RCS
25548
25549 1988-09-09 Richard Stallman <rms@gnu.org>
25550
25551 * src/bison.hairy: entered into RCS
25552
25553 1987-12-16 Richard Stallman <rms@gnu.org>
25554
25555 * REFERENCES: entered into RCS
25556
25557
25558 -----
25559
25560 Copyright (C) 1987-1988, 1991-2010 Free Software Foundation,
25561 Inc.
25562
25563 Copying and distribution of this file, with or without
25564 modification, are permitted provided the copyright notice and this
25565 notice are preserved.