]> git.saurik.com Git - bison.git/blob - ChangeLog
0e711e5e83f27119e6a49df6f7aa693269ee907e
[bison.git] / ChangeLog
1 2010-11-07 Joel E. Denny <jdenny@clemson.edu>
2
3 yysyntax_error: fix for consistent error with lookahead.
4 * NEWS (2.5): Document.
5 * data/yacc.c (yysyntax_error): In a verbose syntax error
6 message while in a consistent state with a default action (which
7 must be an error action given that yysyntax_error is being
8 invoked), continue to drop the expected token list, but don't
9 drop the unexpected token unless there actually is no lookahead.
10 Moreover, handle that internally instead of returning 1 to tell
11 the caller to do it. With that meaning of 1 gone, renumber
12 return codes more usefully.
13 (yyparse, yypush_parse): Update yysyntax_error usage. Most
14 importantly, set yytoken to YYEMPTY when there's no lookahead.
15 * data/glr.c (yyreportSyntaxError): As in yacc.c, don't drop the
16 unexpected token unless there actually is no lookahead.
17 * data/lalr1.cc (yy::parser::parse): If there's no lookahead,
18 set yytoken to yyempty_ before invoking yysyntax_error_.
19 (yy::parser::yysyntax_error_): Again, don't drop the unexpected
20 token unless there actually is no lookahead.
21 * data/lalr1.java (YYParser::parse): If there's no lookahead,
22 set yytoken to yyempty_ before invoking yysyntax_error.
23 (YYParser::yysyntax_error): Again, don't drop the unexpected
24 token unless there actually is no lookahead.
25 * tests/conflicts.at (%error-verbose and consistent
26 errors): Extend test group to further reveal how the previous
27 use of the simple "syntax error" message was too general. Test
28 yacc.c, glr.c, lalr1.cc, and lalr1.java. No longer an expected
29 failure.
30 * tests/java.at (AT_JAVA_COMPILE, AT_JAVA_PARSER_CHECK): Move
31 to...
32 * tests/local.at: ... here.
33 (_AT_BISON_OPTION_PUSHDEFS): Push AT_SKEL_JAVA_IF definition.
34 (AT_BISON_OPTION_POPDEFS): Pop it.
35 (AT_FULL_COMPILE): Extend to handle Java.
36
37 2010-11-07 Joel E. Denny <jdenny@clemson.edu>
38
39 yysyntax_error: more preparation for readability of next patch.
40 There are no behavioral changes here.
41 * data/glr.c (yyreportSyntaxError): Reorganize.
42 * data/lalr1.cc (yy::parser::yysyntax_error_): Reorganize.
43 * tests/conflicts.at (%error-verbose and consistent errors):
44 Reorganize.
45
46 2010-11-07 Joel E. Denny <jdenny@clemson.edu>
47
48 yysyntax_error: prepare for readability of next patches.
49 These are purely whitespace changes that result in ugly code
50 but that make the next couple of patches much easier to read.
51 * data/glr.c (yyreportSyntaxError): Reindent.
52 * data/lalr1.cc (yy::parser::yysyntax_error_): Reindent.
53 * data/lalr1.java (YYParser::yysyntax_error): Reindent.
54 * data/yacc.c (yysyntax_error): Reindent.
55
56 2010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
57
58 yysyntax_error: improve invocation readability.
59 * data/yacc.c (yyparse, yypush_parse): For yysyntax_error
60 invocation, get rid of the while loop, which is misleading
61 because there are really at most two iterations.
62
63 2010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
64
65 * ChangeLog: Correct some errors in previous entries.
66
67 2010-10-17 Joel E. Denny <joeldenny@joeldenny.org>
68
69 maint: re-anchor all .gitignore entries.
70 * bootstrap: Copy from gnulib's latest for the fix to
71 automatically anchor entries it constructs.
72 * gnulib: Update to latest just so it has the same bootstrap.
73 * .gitignore, build-aux/.gitignore, doc/.gitignore:
74 * lib/.gitignore, m4/.gitignore, po/.gitignore:
75 * runtime-po/.gitignore: Re-anchor all entries.
76
77 2010-10-08 Paul Eggert <eggert@cs.ucla.edu>
78
79 Fix portability problem on OpenBSD 4.7.
80
81 Jim Meyering reported this in
82 <http://lists.gnu.org/archive/html/bug-bison/2010-10/msg00007.html>.
83 * data/yacc.c: Use EXIT_SUCCESS as a witness for stdlib.h,
84 not _STDLIB_H. EXIT_SUCCESS has been defined by the standard
85 for quite some time.
86 * src/parse-gram.c, src/parse-gram.h: Regenerate.
87 * tests/regression.at: Tamper with the renamed witness.
88
89 Adjust to recent changes to gnulib bootstrap.
90
91 * .cvsignore, build-aux/.cvsignore, doc/.cvsignore, etc/.cvsignore:
92 * examples/calc++/.cvsignore, lib/.cvsignore, m4/.cvsignore:
93 * po/.cvsignore, runtime-po/.cvsignore, src/.cvsignore:
94 * tests/.cvsignore: Remove; I don't use CVS to maintain Bison
95 anymore and don't know of anybody else who does. If someone needs
96 these files, they can resurrect them.
97 * .gitignore, build-aux/.gitignore, doc/.gitignore, lib/.gitignore:
98 * m4/.gitignore, po/.gitignore, runtime-po/.gitignore:
99 Omit leading '/', since bootstrap omits it.
100 Adjust file names to match current contents better.
101 * bootstrap: Sync from gnulib: this contains the new gnulib_mk_hook
102 installed just for us.
103 * bootstrap.conf (excluded_files): Don't exclude codeset.m4,
104 glibc21.m4, inttypes_h.m4, size_max.m4, xsize.m4, as they are now
105 needed somehow. Don't have time to look into why.
106 (gnulib_modules): Change malloc to malloc-gnu. Do we really assume
107 the GNU malloc behavior, where malloc (0) != NULL unless we're
108 out of storage? If not, we can omit malloc-gnu; but for now I left
109 it in to be safe.
110 (vc_ignore): Remove.
111 * README-hacking: Renamed from HACKING, since gnulib bootstrap now
112 uses that convention.
113
114 2010-08-05 Joel E. Denny <joeldenny@joeldenny.org>
115
116 Version 2.4.3.
117 * NEWS (2.4.3): Set date.
118
119 2010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
120
121 maint: add gettext version to release announcements.
122 Suggested by Paul Hilfinger at
123 <http://lists.gnu.org/archive/html/bison-patches/2010-07/msg00019.html>
124 <http://lists.gnu.org/archive/html/bison-patches/2010-08/msg00002.html>.
125 * cfg.mk (bootstrap-tools): Add gettext.
126
127 2010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
128
129 doc: fix -W and %expect documentation some.
130 * NEWS (2.4.3): Mention that there are documentation fixes.
131 * doc/bison.texinfo (Expect Decl): Make it clear that %expect
132 turns conflicts into errors not warnings.
133 (Shift/Reduce): Likewise.
134 (Bison Options): Don't mention -Wsyntax. It doesn't exist.
135
136 2010-08-01 Joel E. Denny <joeldenny@joeldenny.org>
137
138 -Werror: fix for rules useless in parser after conflicts.
139 * NEWS (2.4.3): Document fix.
140 * src/complain.c (error_message): Extend to handle incomplete
141 error messages so warn and warn_at can be used in more cases.
142 * src/gram.c (grammar_rules_useless_report): Use warn_at so that
143 -Werror is always obeyed.
144 * src/reduce.c (reduce_print): Use warn so that the "warnings
145 being treated as errors" message is printed consistently before
146 the first warning message. This makes testing easier.
147 * tests/local.at (AT_BISON_WERROR_MSG): New macro.
148 (AT_BISON_CHECK_NO_XML): Extend to check -Werror and
149 --warnings=error when warnings appear in bison's stderr.
150
151 2010-07-29 Joel E. Denny <joeldenny@joeldenny.org>
152
153 maint: enable gnits only at stable releases.
154 * configure.ac (AM_INIT_AUTOMAKE): Underscore or dash in a
155 version string should disable gnits. Explain in comments.
156
157 2010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
158
159 i18n: update.
160 * po/POTFILES.in: Add src/graphviz.c.
161
162 2010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
163
164 i18n: fix for gnulib.
165 * po/POTFILES.in: Add remaining gnulib files that have
166 translatable strings.
167
168 2010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
169
170 maint: use announce-gen's new --mail-headers.
171 * HACKING (Announce): Update instructions.
172 * cfg.mk (announcement_Cc_): Define.
173 * configure.ac (AM_GNU_GETTEXT_VERSION): Update to 0.18 as
174 required by latest gnulib.
175 * gnulib: Update to latest.
176
177 2010-07-24 Joel E. Denny <joeldenny@joeldenny.org>
178
179 tests: handle Valgrind that complains about >&-.
180 * tests/output.at (AT_CHECK_OUTPUT): Extend to accept pre-tests.
181 (Output files: -dv >&-): Skip test group if running
182 maintainer-check-valgrind.
183
184 2010-06-17 Paul Eggert <eggert@cs.ucla.edu>
185
186 Update from GFDL GFDL 1.2 to 1.3.
187 * doc/bison.texinfo: Update GFDL version number.
188 * doc/fdl.texi: Update to version 1.3, taken from:
189 http://www.gnu.org/licenses/fdl.texi
190
191 2010-06-17 Paul Eggert <eggert@cs.ucla.edu>
192
193 Do not use date ranges in copyright notices.
194 See http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices
195
196 * HACKING, Makefile.am, NEWS, PACKAGING, README, README-alpha:
197 * TODO, bootstrap, bootstrap.conf:
198 * build-aux/update-b4-copyright, cfg.mk, configure.ac:
199 * data/README, data/bison.m4, data/c++-skel.m4, data/c++.m4:
200 * data/c-skel.m4, data/c.m4, data/glr.c, data/glr.cc:
201 * data/java-skel.m4, data/java.m4, data/lalr1.cc:
202 * data/lalr1.java, data/location.cc:
203 * data/xslt/bison.xsl:
204 * data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl:
205 * data/xslt/xml2xhtml.xsl, data/yacc.c, djgpp/Makefile.maint:
206 * djgpp/README.in, djgpp/config.bat, djgpp/config.sed:
207 * djgpp/config.site, djgpp/config_h.sed, djgpp/djunpack.bat:
208 * djgpp/subpipe.c, djgpp/subpipe.h:
209 * djgpp/testsuite.sed, doc/bison.texinfo:
210 * doc/refcard.tex, etc/README, etc/bench.pl.in:
211 * examples/calc++/Makefile.am, examples/extexi:
212 * lib/abitset.c, lib/abitset.h:
213 * lib/bbitset.h, lib/bitset.c, lib/bitset.h:
214 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
215 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
216 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
217 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
218 * lib/libiberty.h, lib/main.c, lib/timevar.c:
219 * lib/timevar.def, lib/timevar.h, lib/vbitset.c:
220 * lib/vbitset.h, lib/yyerror.c, m4/bison-i18n.m4:
221 * m4/c-working.m4, m4/cxx.m4, m4/subpipe.m4, m4/timevar.m4:
222 * src/AnnotationList.c, src/AnnotationList.h:
223 * src/InadequacyList.c, src/InadequacyList.h, src/LR0.c:
224 * src/LR0.h, src/Sbitset.c, src/Sbitset.h, src/assoc.c:
225 * src/assoc.h, src/closure.c, src/closure.h, src/complain.c:
226 * src/complain.h, src/conflicts.c, src/conflicts.h:
227 * src/derives.c, src/derives.h, src/files.c, src/files.h:
228 * src/flex-scanner.h, src/getargs.c, src/getargs.h:
229 * src/gram.c, src/gram.h, src/graphviz.c, src/ielr.c:
230 * src/ielr.h, src/lalr.c, src/lalr.h:
231 * src/location.c, src/location.h, src/main.c:
232 * src/muscle-tab.c, src/muscle-tab.h, src/named-ref.c:
233 * src/named-ref.h, src/nullable.c, src/nullable.h:
234 * src/output.c, src/output.h, src/parse-gram.y:
235 * src/print-xml.c, src/print-xml.h, src/print.c, src/print.h:
236 * src/print_graph.c, src/print_graph.h, src/reader.c:
237 * src/reader.h, src/reduce.c, src/reduce.h, src/relation.c:
238 * src/relation.h, src/scan-code.h, src/scan-code.l:
239 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
240 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
241 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
242 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
243 * tests/actions.at, tests/atlocal.in, tests/c++.at:
244 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
245 * tests/existing.at, tests/glr-regression.at:
246 * tests/headers.at, tests/input.at, tests/java.at:
247 * tests/local.at, tests/named-refs.at:
248 * tests/output.at, tests/push.at, tests/reduce.at:
249 * tests/regression.at, tests/sets.at, tests/skeletons.at:
250 * tests/synclines.at, tests/testsuite.at, tests/torture.at:
251 * data/Makefile.am, data/location.cc, doc/Makefile.am, src/Makefile.am:
252 * tests/Makefile.am, lib/Makefile.am, examples/Makefile.am:
253 * etc/Makefile.am:
254 Don't use date ranges in copyright notices.
255
256 2010-05-11 Akim Demaille <demaille@gostai.com>
257
258 lalrl1.cc: give a chance to user defined YYLLOC_DEFAULT.
259 * data/lalr1.cc (YYLLOC_DEFAULT): Move its definition from the
260 header file to the implementation file, after the user %code
261 sections.
262 * NEWS (2.5): Document this.
263
264 2010-05-07 Akim Demaille <demaille@gostai.com>
265
266 c++: use YYRHSLOC.
267 * data/lalr1.cc (YYRHSLOC): New.
268 (YYLLOC_DEFAULT): Use it.
269 * data/glr.cc: If location_type was user defined, do not include
270 location.hh, and do not produce location.hh and position.hh.
271 * tests/calc.at (YYLLOC_DEFAULT): Use YYRHSLOC.
272 Check that glr.cc supports user defined location_type.
273 * NEWS: Document this.
274
275 2010-05-10 Akim Demaille <demaille@gostai.com>
276
277 doc: fix lalr1.cc documentation.
278 * doc/bison.texinfo (C++ Scanner Interface): Fix yylex signature.
279 (C++ Bison Interface): Fix lalr1.cc skeleton name.
280 (C++ Parser Interface): Fix semantic_type and location_type names.
281 Document yy::parser::token.
282 Reported by Jerry Quinn.
283
284 2010-05-04 Akim Demaille <demaille@gostai.com>
285
286 lalr1.cc: don't generate location.hh when location_type is defined
287 * data/bison.m4 (b4_percent_define_use): New.
288 (b4_percent_define_get): Use it.
289 Accept a default value.
290 * data/c++.m4: Do not provide a default value for the %define
291 variable location_type, rather, use b4_percent_define_get with a
292 default argument where its value is needed.
293 * data/lalr1.cc: Do not load location.cc (which outputs both
294 location.hh and position.hh) if the user defined location_type.
295 Do not include location.hh either.
296 * data/glr.cc: Likewise.
297
298 2010-05-04 Akim Demaille <demaille@gostai.com>
299
300 lalr1.cc: location_type: make sure we don't depend on loc.(begin|end).
301 * tests/calc.at (Span): Instead of begin/end, as in the built-in
302 location class, use first and last.
303 Define YYLLOC_DEFAULT to adjust to these changes.
304 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Adjust to the
305 location_type changes.
306
307 2010-05-04 Akim Demaille <demaille@gostai.com>
308
309 tests: enhance AT_SYNCLINES_COMPILE.
310 * tests/synclines.at (AT_TEST_SYNCLINE): Move GCC 4.5 protection
311 into...
312 (AT_SYNCLINES_COMPILE): here.
313 Add more distcc patterns.
314
315 2010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
316
317 tests: fix maintainer-xml-check.
318 * data/xslt/xml2dot.xsl (xsl:template match="bison-xml-report"):
319 Update output to include comments now produced by --graph.
320 (xsl:template match="automaton"): As for --graph, name the
321 digraph after the grammar file.
322 * src/print-xml.c (escape_bufs): Enlarge array.
323 (print_xml): Add bug-report and url attributes to
324 bison-xml-report element.
325
326 2010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
327
328 In DOT output, convert from "/*" comments to "//" comments.
329 This handles the possibility that a "*/" might appear in
330 variable portions of those comments at some point in the future.
331 * src/graphviz.c (start_graph): Implement.
332
333 2010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
334
335 Document that undefined %prec identifier warnings will remain.
336 * NEWS (2.4.3): Here.
337 (2.4.2): Here.
338
339 2010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
340
341 Revert 2009-12-30 change for undefined %prec token complaints.
342 That is, keep them as warnings because that should be sufficient
343 to satisfy POSIX without creating backward compatibility issues.
344 Suggested by Richard Stallman at
345 <http://lists.gnu.org/archive/html/bison-patches/2010-03/msg00033.html>.
346 * NEWS (2.5): Remove mention of complaint.
347 * src/reader.c (grammar_rule_check): Convert complaint back to
348 warning.
349 * tests/input.at (%prec's token must be defined): Update.
350
351 2010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
352
353 build: don't require src/bison during bootstrap.
354 Suggested by Eric Blake at
355 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00003.html>.
356 * bootstrap.conf (bootstrap_epilogue): New function to make sure
357 src/parse-gram.[ch] are stamped later than src/parse-gram.y.
358
359 2010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
360
361 i18n: fix untranslatable string.
362 Reported by Goran Uddeborg at
363 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00000.html>.
364 * src/muscle-tab.c (muscle_percent_define_insert): Here.
365
366 2010-04-13 Akim Demaille <demaille@gostai.com>
367
368 tests: calc: minor refactoring.
369 * tests/calc.at (_AT_DATA_CALC_Y): Simplify yylex.
370
371 2010-04-13 Akim Demaille <demaille@gostai.com>
372
373 tests: calc: simplify location management.
374 * tests/local.at (AT_LOC_PUSHDEF, AT_LOC_POPDEF): New.
375 (_AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS): Use them to
376 define the appropriate AT_LOC accessors.
377 * tests/calc.at: Use AT_LOC accessors.
378
379 2010-04-13 Akim Demaille <demaille@gostai.com>
380
381 test location_type.
382 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS):
383 Define AT_LOCATION_TYPE_IF.
384 (_AT_BISON_OPTION_POPDEFS): Undefine AT_LOCATION_TYPE_IF.
385 * tests/calc.at (_AT_DATA_CALC_Y): When %define location_type is
386 used, provide a user location type and use it.
387 (Simple LALR1 C++ Calculator): Add a test case for location_type.
388
389 2010-04-13 Akim Demaille <demaille@gostai.com>
390
391 tests: check fclose's return value.
392 * tests/calc.at (_AT_DATA_CALC_Y): Check fclose's return status.
393
394 2010-04-13 Akim Demaille <demaille@gostai.com>
395
396 tests: don't depend on the actual location type.
397 * tests/calc.at: Use yy::parser::location_type rather than
398 yy::location, since the former is always right, and might point to
399 another type than the latter.
400
401 2010-04-13 Akim Demaille <demaille@gostai.com>
402
403 formatting changes.
404 * tests/calc.at: Formatting changes.
405
406 2010-04-13 Akim Demaille <demaille@gostai.com>
407
408 lalr1.cc: remove useless forward declaration.
409 * data/lalr1.cc: Include location.hh before stack.hh.
410 Remove the useless forward declarations of position and location.
411 Reported by Chris Morley.
412 * data/glr.cc: Likewise.
413
414 2010-04-11 Joel E. Denny <joeldenny@joeldenny.org>
415
416 * NEWS (2.4.3): Mention fix for Sun Studio C++.
417
418 2010-04-10 Joel E. Denny <joeldenny@joeldenny.org>
419
420 tests: fix for newer Sun Studio C++.
421 Reported by Dagobert Michelsen at
422 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00023.html>.
423 * THANKS (Dagobert Michelsen): Add.
424 * configure.ac (AC_PREREQ): Set to 2.64 so we get the latest
425 Autoconf macro for handling the restrict keyword.
426 * gnulib: Update to latest, which no longer overrides that macro
427 from Autoconf.
428
429 2010-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
430
431 portability: fix pointer arithmetic to conform to C standard.
432 Reported by Tys Lefering at
433 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00035.html>.
434 This fix is already implemented in glr.c and does not apply to
435 lalr1.java.
436 * data/lalr1.cc (yy::parser::parse): Increase size of
437 yyerror_range and adjust subscripting so you don't have to
438 subtract one from the beginning of the array.
439 * data/yacc.c (b4_declare_parser_state_variables,
440 yyparse, yypush_parse): Likewise.
441
442 2010-04-05 Akim Demaille <demaille@gostai.com>
443
444 remove useless include.
445 * src/graphviz.h: Don't include stdbool.h.
446
447 2010-04-05 Akim Demaille <demaille@gostai.com>
448
449 graph: sign the output file.
450 * src/graphviz.c (start_graph): Issue comments about Bison.
451 Suggested by Tys Lefering.
452
453 2010-03-31 Joel E. Denny <jdenny@ces.clemson.edu>
454
455 portability: fix test suite for GCC 4.5's new #error message.
456 Reported by Tys Lefering at
457 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00030.html>.
458 * NEWS (2.4.3): Mention.
459 * tests/synclines.at (AT_TEST_SYNCLINE): Implement.
460
461 2010-03-30 Akim Demaille <demaille@gostai.com>
462
463 fix comments.
464 * src/graphviz.h: Add missing license notice.
465 Document.
466
467 2010-03-25 Akim Demaille <demaille@gostai.com>
468
469 tests: fix 250: parse.error=verbose overflow.
470 * tests/regression.at (parse.error=verbose overflow): Avoid the
471 double inclusion of stdlib.h as it triggers hard errors.
472
473 2010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
474
475 portability: fix for BSD make.
476 Reported by Johan van Selst at
477 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00016.html>.
478 * tests/Makefile.am ($(TESTSUITE)): Qualify package.m4 in
479 this dependency list as in package.m4's target rule.
480
481 2010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
482
483 portability: fix spawning on at least FreeBSD 8 and FreeBSD 9.
484 Reported by Johan van Selst at
485 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00014.html>.
486 * NEWS (2.4.3): New.
487 * THANKS (Johan van Selst): Add.
488 * gnulib: Update to latest.
489
490 2010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
491
492 maint: update for changes to gnulib's announce-gen.
493 * HACKING (Announce): RELEASE_TYPE=major must now be written
494 RELEASE_TYPE=stable.
495
496 2010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
497
498 Version 2.4.2.
499 * NEWS (2.4.2): Set version and date. For the recent test suite
500 portability fixes, don't be so optimistic about their success
501 given the lack of feedback on the affected platforms.
502
503 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
504
505 tests: fix maintainer-xml-check for recent changes.
506 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Use
507 AT_BISON_CHECK_NO_XML rather than AT_BISON_CHECK because an
508 output file whose name conflicts with a previous output file
509 is now never generated.
510
511 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
512
513 portability: fix several issues with M4 subprocess.
514
515 M4's output pipe was not being drained upon fatal errors during
516 scan_skel. As a result, broken-pipe messages from M4 were seen
517 on at least AIX, HP-UX, Solaris, and RHEL4, and this caused a
518 failure in the test suite. The problem was that, on platforms
519 where the default disposition for SIGPIPE is ignore instead of
520 terminate, M4 sometimes saw fwrite fail with errno=EPIPE and
521 then reported it. However, there's some sort of race condition,
522 because the new test group occasionally succeeded.
523 Reported by Albert Chin at
524 <http://lists.gnu.org/archive/html/bug-bison/2010-02/msg00004.html>.
525
526 There were also problems with the test suite livelocking on
527 Tru64 5.1b. Reported by Didier Godefroy at
528 <http://lists.gnu.org/archive/html/bug-bison/2009-05/msg00005.html>.
529 Switching to create_pipe_bidi suggested by Akim Demaille.
530
531 To attempt to solve both of these problems, switch to gnulib's
532 create_pipe_bidi and register M4 process as a slave. Along the
533 way, clean up file name conflict handling, which was affected by
534 the broken-pipe problem before the switch.
535 * NEWS (2.4.2): Document.
536 * THANKS (Didier Godefroy): Add.
537 * bootstrap.conf (gnulib_modules): Add pipe.
538 * gnulib: Update to latest to make sure we have all the latest
539 fixes.
540 * lib/Makefile.am (libbison_a_SOURCES): Remove subpipe.h and
541 subpipe.c.
542 * po/POTFILES.in (lib/subpipe.c): Remove.
543 * src/files.c (compute_output_file_names): Update invocations
544 of output_file_name_check.
545 (output_file_name_check): In the case that the grammar file
546 would be overwritten, use complain instead of fatal, but replace
547 the output file name with /dev/null. Use the /dev/null solution
548 for the case of two conflicting output files as well because it
549 seems safer in case Bison one day tries to open both files at
550 the same time.
551 * src/files.h (output_file_name_check): Update prototype.
552 * src/output.c (output_skeleton): Use create_pipe_bidi and
553 wait_subprocess. Assert that scan_skel completely drains the
554 pipe.
555 * src/scan-skel.l (at_directive_perform): Update
556 output_file_name_check invocation.
557 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Check that the
558 grammar file actually isn't overwritten.
559 (Conflicting output files: -o foo.y): Update expected output.
560 * tests/skeletons.at (Fatal errors but M4 continues producing
561 output): New test group.
562
563 2010-02-04 Joel E. Denny <jdenny@ces.clemson.edu>
564
565 Update POTFILES.
566 * HACKING (Release Procedure): Add reminder about keeping
567 POTFILES files up-to-date.
568 * po/POTFILES.in (src/muscle-tab.c, src/scan-skel.l): Add.
569
570 2010-02-01 Joel E. Denny <jdenny@clemson.edu>
571
572 Code cleanup.
573 * tests/atlocal.in (abs_top_srcdir): Remove shell variable,
574 which is already defined in atconfig.
575
576 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
577
578 * cfg.mk (gnulib_dir): Assume gnulib is a subdirectory.
579
580 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
581
582 maint: automate PACKAGE_COPYRIGHT_YEAR update, and update it.
583 * HACKING (Release Procedure): Update notes on copyright years.
584 * Makefile.am (update-package-copyright-year): New target rule.
585 * build-aux/update-package-copyright-year: New file.
586 * cfg.mk (update-copyright): Add update-package-copyright-year
587 as a dependency.
588
589 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
590
591 * bootstrap: Import improvements from latest gnulib.
592
593 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
594
595 build: require Automake 1.11.1 to avoid a security flaw.
596 * HACKING (Release Procedure): Don't document Automake security
597 flaw here.
598 * configure.ac (AM_INIT_AUTOMAKE): Require 1.11.1, and explain
599 why here.
600
601 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
602
603 gnulib: update to latest.
604
605 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
606
607 ChangeLog (2006-09-15): add Odd Arild Olsen's role for push.c.
608
609 2010-01-15 Joel E. Denny <jdenny@clemson.edu>
610
611 Thank the developer of the initial push parser implementation.
612 This unfortunate oversight is several years old.
613 * THANKS (Odd Arild Olsen): Add.
614
615 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
616
617 Fix some comments concerning LR(0) versus LALR(1).
618
619 Stop equating LR(0) with nondeterminism and LALR(1) with
620 determinism. That is, if all states are consistent, then LR(0)
621 tables are deterministic. On the other hand, LALR(1) tables
622 might be nondeterministic before conflict resolution, and GLR
623 permits LALR(1) tables to remain nondeterministic.
624 * src/LR0.c, src/LR0.h: Here.
625 * src/lalr.c, src/lalr.h: Here.
626 * src/main.c (main): Here.
627 * src/state.c, src/state.h: Here.
628
629 * src/ielr.h (ielr): In preconditions, expect LR(0) not LALR(1)
630 parser tables.
631
632 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
633
634 maint: run "make update-copyright"
635
636 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
637
638 POSIX: complain if %prec's token was not defined.
639 * NEWS (2.5): Document.
640 * src/reader.c (grammar_rule_check): Convert warning to
641 complaint.
642 * tests/input.at (%prec's token must be defined): Update.
643
644 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
645
646 POSIX: warn if %prec's token was not defined.
647 Reported by Florian Krohm at
648 <http://lists.gnu.org/archive/html/bug-bison/2009-12/msg00005.html>.
649 * NEWS (2.4.2): Document.
650 * src/reader.c (grammar_rule_check): Implement.
651 (grammar_current_rule_prec_set): Add comments explaining that we
652 here assume a %prec identifier is a token, but we still manage
653 to support POSIX.
654 * tests/input.at (%prec's token must be defined): New test
655 group.
656
657 2009-12-31 Joel E. Denny <jdenny@clemson.edu>
658
659 * HACKING (Release Procedure): Recommend a secure automake.
660
661 2008-12-11 Akim Demaille <demaille@gostai.com>
662
663 Propagate i18n changes into glr.c.
664 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
665 building the error message format dynamically.
666 * data/lalr1.java: Formatting changes.
667
668 2009-12-22 Joel E. Denny <jdenny@clemson.edu>
669
670 Port small part of master's 11707b2b so future ports are easier.
671 * data/lalr1.java (YYParser::yysyntax_error): Untabify.
672
673 2008-12-11 Akim Demaille <demaille@gostai.com>
674
675 Simplify the i18n of the error messages.
676 * data/lalr1.cc: Comment changes.
677
678 2008-11-11 Akim Demaille <demaille@gostai.com>
679
680 Prefer M4 to CPP.
681 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
682 YYERROR_VERBOSE.
683
684 2008-11-11 Akim Demaille <demaille@gostai.com>
685
686 Support i18n of the parse error messages.
687 * TODO (lalr1.cc/I18n): Remove.
688 * data/lalr1.cc (yysyntax_error_): Support the translation of the
689 error messages, as done in yacc.c.
690 Stay within the yy* pseudo namespace.
691
692 2009-12-22 Joel E. Denny <jdenny@clemson.edu>
693
694 Port small part of master's 8901f32e so future ports are easier.
695 * data/lalr1.cc (yy::parser::yysyntax_error_): Always add second
696 argument, but name it in the function definition only when
697 verbose error messages are enabled and it'll thus be used.
698 (yy::parser::parse): Update use of yysyntax_error_.
699
700 2009-12-29 Joel E. Denny <jdenny@clemson.edu>
701
702 portability: `<' and `>' are not always defined on addresses.
703 Specifically, don't sort objects by their memory addresses when
704 they're not allocated in the same array or other object. Though
705 I haven't found a test case where that fails on my platform, C
706 says the behavior is undefined.
707 * src/AnnotationList.c (AnnotationList__insertInto): Remove
708 FIXME. Use new id field of InadequacyList nodes rather than
709 their memory addresses when sorting.
710 (AnnotationList__compute_from_inadequacies): Add
711 inadequacy_list_node_count argument to pass to
712 InadequacyList__new_conflict.
713 * src/AnnotationList.h
714 (AnnotationList__compute_from_inadequacies): Update prototype
715 and documentation for new argument.
716 * src/InadequacyList.c (InadequacyList__new_conflict): Add
717 node_count argument and use it to assign a unique ID.
718 * src/InadequacyList.h (InadequacyListNodeCount): New typedef.
719 (InadequacyList): Add id field.
720 (InadequacyList__new_conflict): Update prototype and
721 documentation for new argument.
722 * src/ielr.c (ielr_compute_annotation_lists): Update
723 AnnotationList__compute_from_inadequacies invocation.
724
725 2009-12-20 Joel E. Denny <jdenny@clemson.edu>
726
727 Fix handling of yychar manipulation in user semantic actions.
728 The problem was that yacc.c didn't always update the yychar
729 translation afterwards. However, other skeletons appear to be
730 fine. glr.c appears to already translate yychar before every
731 use. lalr1.cc does not define yychar and does not document its
732 replacement, yyla, for users. It does provide yyclearin, but
733 that does not manipulate yyla and thus requires no translation
734 update. In lalr1.java, yychar is out of scope during semantic
735 actions.
736 * NEWS (2.5): Document.
737 * data/yacc.c (YYBACKUP): Don't bother translating yychar into
738 yytoken here.
739 (yyparse, yypush_parse): Instead, translate before every use of
740 yytoken, and add comments explaining this approach.
741 * tests/actions.at (Destroying lookahead assigned by semantic
742 action): New test group checking that translation happens before
743 lookahead destructor calls at parser return. Previously,
744 incorrect destructors were called.
745 * tests/conflicts.at (%error-verbose and consistent
746 errors): New test group checking that translation happens at
747 syntax error detection before the associated verbose error
748 message and the associated lookahead destructor calls. While
749 the destructor call is fixed by this patch, the verbose error
750 message is currently incorrect due to another bug (see
751 comments in test group), so this is an expected failure for now.
752
753 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
754
755 YYFAIL: warn about uses and remove from lalr1.java.
756 * NEWS (2.5): Document.
757 * data/lalr1.java (YYParser::YYFAIL): Rename to YYERRLAB,
758 and make it private. Update all uses.
759 * src/scan-code.l (SC_RULE_ACTION): Implement warning.
760
761 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
762
763 YYFAIL: deprecate.
764 * NEWS (2.4.2): Document deprecation and the phase-out plan.
765 * data/lalr1.java (YYParser::YYFAIL): Add comment about
766 deprecation.
767 * data/yacc.c (YYFAIL): Likewise, and suppress warnings about
768 YYFAIL from GCC cpp's -Wunused-macros.
769 * doc/bison.texinfo (Java Action Features): Remove YYFAIL
770 documentation.
771 (LocalWords): Remove YYFAIL.
772
773 2009-12-17 Joel E. Denny <jdenny@clemson.edu>
774
775 Code cleanup.
776 * src/symtab.c, src/symtab.h (symbol_class_get_string): Remove
777 function, which is no longer used.
778
779 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
780
781 Add gcc's -Wundef to test suite and fix another warning from it.
782 * NEWS (2.4.2): Update description of -Wundef fix.
783 * configure.ac (WARN_CXXFLAGS_TEST): New substitution.
784 (WARN_CFLAGS_TEST): New substitution.
785 * data/glr.c: Avoid warning about __STRICT_ANSI__.
786 * tests/atlocal.in (CFLAGS): Use WARN_CFLAGS_TEST instead of
787 WARN_CFLAGS.
788 (NO_WERROR_CFLAGS): Likewise.
789 (CXXFLAGS): Use WARN_CXXFLAGS_TEST instead of WARN_CXXFLAGS.
790
791 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
792
793 * data/yacc.c: Reformat m4 a little.
794
795 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
796
797 Document gcc -Wundef fix.
798 * NEWS (2.4.2): Here.
799 * THANKS (Jonathan Nieder): Add.
800
801 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
802
803 Simplify y.tab.c when location tracking is disabled.
804 * data/yacc.c: Do not check YYLTYPE_IS_TRIVIAL if location
805 tracking is not enabled. Instead, unconditionally define
806 YY_LOCATION_PRINT as a no-op for backward compatibility.
807
808 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
809
810 Avoid warnings from gcc -Wundef y.tab.c.
811 * data/glr.c: Check if YYENABLE_NLS and YYLTYPE_IS_TRIVIAL are
812 defined before using them.
813 * data/lalr1.cc: Likewise.
814 * data/yacc.c: Likewise.
815
816 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
817
818 autoconf: update to latest for fix of M4 detection.
819 Reported by Eric Blake.
820 * submodules/autoconf: Update.
821
822 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
823
824 portability: use -DGNULIB_POSIXCHECK.
825 Reported by Eric Blake. See discussions at
826 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00008.html>
827 and
828 <http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00108.html>.
829 * HACKING (Release checks): Suggest -DGNULIB_POSIXCHECK.
830 * bootstrap.conf (gnulib_modules): Add all the printf modules
831 suggested by -DGNULIB_POSIXCHECK. Add realloc-posix as
832 suggested by -DGNULIB_POSIXCHECK for gnulib's own vasnprintf.c.
833 (excluded_files): Remove m4/printf-posix.m4.
834 * tests/atlocal.in (LIBS): As for LDADD in src/local.mk, add
835 lib/libbison.a so gnulib libraries can be linked.
836
837 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
838
839 Enable assertion output and --disable-assert for configure.
840 * bootstrap.conf (gnulib_modules): Add assert module.
841 * src/system.h (aver): Define as assert, and summarize the
842 discussion on this issue.
843
844 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
845
846 Expand GLR acronym in summary of Bison.
847 Based on discussion with Akim Demaille starting at
848 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00087.html>.
849 * doc/bison.texinfo (Introduction): Here.
850 * src/getargs.c (usage): Here.
851
852 2009-10-03 Alex Rozenman <rozenman@gmail.com>
853
854 Document named references.
855 * doc/bison.texinfo (Actions): Add new example and xref to
856 Using Named References node.
857 (Using Named References): New node.
858
859 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
860
861 cleanup.
862 * src/Sbitset.c (Sbitset__new_on_obstack): Use Sbitset instead
863 of char*.
864 (Sbitset__isEmpty): Use Sbitset instead of char*.
865 * src/Sbitset.h (Sbitset): Make it a pointer to unsigned char
866 instead of char. This helps to avoid casting errors.
867 (Sbitset__or): Use Sbitset instead of char*.
868
869 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
870
871 portability: don't assume 8-bit bytes.
872 That is, use CHAR_BIT and UCHAR_MAX instead of 8 and 0xff.
873 * src/Sbitset.h (Sbitset__nbytes): Here.
874 (Sbitset__byteAddress): Here.
875 (Sbitset__bit_mask): Here.
876 (Sbitset__last_byte_mask): Here.
877 (Sbitset__ones): Here.
878 (SBITSET__FOR_EACH): Here.
879
880 2009-10-11 Joel E. Denny <jdenny@clemson.edu>
881
882 portability: use va_start and va_end in the same function.
883 * src/complain.c (error_message): Move va_end from here...
884 (ERROR_MESSAGE): ... to here.
885
886 2009-10-08 Joel E. Denny <jdenny@clemson.edu>
887
888 * data/bison.m4: Update comments for rename to muscle-tab.h.
889
890 2009-10-08 Joel E. Denny <jdenny@clemson.edu>
891
892 Rename muscle_tab.* to muscle-tab.* for consistency with master.
893 * src/Makefile.am (bison_SOURCES): Update.
894 * src/getargs.c, src/ielr.c, src/lalr.c, src/main.c,
895 src/output.c, src/parse-gram.y, src/print.c, src/reader.c,
896 src/tables.c: Update include.
897 * src/muscle_tab.c, src/muscle_tab.h: Rename to...
898 * src/muscle-tab.c, src/muscle-tab.h: ... these and update
899 include.
900
901 2009-10-07 Joel E. Denny <jdenny@clemson.edu>
902
903 Minor code cleanup.
904 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT): Remove macro and
905 replace all uses with UNIQSTR_CONCAT.
906 * src/uniqstr.c (uniqstr_vsprintf): New function.
907 * src/uniqstr.h (uniqstr_vsprintf): Add prototype.
908 (UNIQSTR_CONCAT, UNIQSTR_GEN_FORMAT, UNIQSTR_GEN_FORMAT_): New
909 macros.
910
911 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
912
913 Minor code cleanup.
914 * src/parse-gram.y: Clean up sorting of declarations.
915 Use types to simplify %printer declarations where possible.
916 Provide %printer for BRACKETED_ID and symbol.prec.
917 * src/symtab.c: Whitespace change.
918
919 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
920
921 tests: skip tests of file names that platform does not support.
922 Reported by Michael Raskin at
923 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00001.html>.
924 * THANKS (Michael Raskin): Add.
925 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Fix. Cygwin used
926 to fail at least for file names containing ":" or "\".
927
928 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
929
930 yysyntax_error: avoid duplicate lookahead collection.
931 Except when memory reallocation is required, this change
932 eliminates the need to invoke yysyntax_error twice and thus to
933 repeat the collection of lookaheads. It also prepares for
934 future extensions that will make those repetitions more
935 expensive and that will require additional memory management in
936 yysyntax_error. Finally, it fixes an obscure bug already
937 exercised in the test suite.
938 * data/yacc.c (yysyntax_error): Add arguments for message
939 buffer variables stored in the parser. Instead of size, return
940 status similar to yyparse status but indicating success of
941 message creation. Other than the actual reallocation of the
942 message buffer, import and clean up memory management code
943 from...
944 (yyparse, yypush_parse): ... here.
945 * tests/regression.at (%error-verbose overflow): No longer an
946 expected failure.
947
948 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
949
950 yysyntax_error: test memory management more.
951 * tests/atlocal.in (NO_WERROR_CFLAGS): New cpp macro.
952 * tests/regression.at (%error-verbose and YYSTACK_USE_ALLOCA):
953 New test group.
954 (%error-verbose overflow): New test group that reveals an
955 obscure bug. Expected fail for now.
956
957 2008-12-11 Akim Demaille <demaille@gostai.com>
958
959 Pass the token type to yysyntax_error.
960 * data/yacc.c (yysyntax_error): Take the transated token instead
961 of the raw number.
962 Adjust callers.
963
964 2008-12-11 Akim Demaille <demaille@gostai.com>
965
966 Simplify the i18n of the error messages.
967 * data/yacc.c (yysyntax_error): Rewrite, using a switch instead
968 of building dynamically the format string.
969
970 2009-10-03 Joel E. Denny <jdenny@clemson.edu>
971
972 Remove dead code.
973 * src/symtab.c (symbol_pack): Here because every symbol's number
974 is always defined by this time.
975
976 2009-10-03 Alex Rozenman <rozenman@gmail.com>
977
978 Add additional space after periods in NEWS.
979 * NEWS (2.5): here.
980
981 2009-09-29 Joel E. Denny <jdenny@clemson.edu>
982
983 Use the correct conversion specifier for size_t.
984 Reported by Jim Meyering.
985 * src/Sbitset.h (SBITSET__INDEX__CONVERSION_SPEC): New, "zu"
986 because Sbitset__Index is size_t.
987 * src/Sbitset.c (Sbitset__fprint): Use it instead of %d.
988
989 2009-09-27 Joel E. Denny <jdenny@clemson.edu>
990
991 tests: don't abuse AT_BISON_CHECK.
992 * tests/regression.at (parse-gram.y: LALR = IELR): Move
993 additional shell commands outside of AT_BISON_CHECK.
994
995 2009-09-26 Joel E. Denny <jdenny@clemson.edu>
996
997 tests: check that parse-gram.y's IELR and LALR are identical.
998 * tests/atlocal.in (abs_top_srcdir): New shell variable.
999 * tests/regression.at (parse-gram.y: LALR = IELR): New test
1000 group.
1001
1002 2009-09-16 Akim Demaille <demaille@gostai.com>
1003
1004 doc: comment changes.
1005 * doc/bison.texinfo: Comment changes.
1006
1007 2009-09-16 Akim Demaille <demaille@gostai.com>
1008
1009 doc: spell checking.
1010 * doc/bison.texinfo: here.
1011
1012 2009-09-19 Alex Rozenman <rozenman@gmail.com>
1013
1014 Keep sub-messages aligned. Fix strings for translation.
1015 * src/location.h (location_print): Add return value.
1016 * src/location.c (location_print): Return number of printed
1017 characters.
1018 * src/complain.h (complain_at_indent, warn_at_indent): Prototype
1019 new functions.
1020 * src/complain.cpp (indent_ptr): New static variable.
1021 (error_message, complain_at_indent, warn_at_indent): Implement
1022 the alignment mechanism.
1023 * src/scan-code.l (parse_ref, show_sub_messages): Fix strings
1024 for translations. Use new alignment mechanism.
1025 * tests/named-ref.at: Adjust test-cases.
1026 * NEWS (2.5): Add an announcement about named references.
1027
1028 2009-09-13 Joel E. Denny <jdenny@clemson.edu>
1029
1030 tests: clean up push.at test group titles.
1031 * tests/push.at: Remove "Push Parsing: " from test group titles
1032 because these are already under the banner "Push Parsing Tests".
1033
1034 2009-09-12 Alex Rozenman <rozenman@gmail.com>
1035
1036 Provide an additional sub-message for clarity.
1037 Add "symbol not found in production" error message when
1038 an "invalid reference" is detected in named references
1039 resolution.
1040 * src/scan-code.l: Update "invalid reference" case.
1041 * tests/named-ref.at: Adjust test-cases.
1042
1043 2009-09-10 Joel E. Denny <jdenny@clemson.edu>
1044
1045 Clean up yacc.c a little.
1046 * data/yacc.c: Clean up M4 for readability, and make output
1047 whitespace more consistent. For the main parse function
1048 comment, instead of saying "yyparse or yypush_parse", say either
1049 "yyparse" or "yypush_parse" depending on which it actually is.
1050
1051 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
1052
1053 Complain about unused %define variables and %code qualifiers.
1054 * NEWS (2.5): Document.
1055 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
1056 * doc/bison.texinfo (Decl Summary): Document complaint, and
1057 improve %define documentation a little otherwise.
1058 * tests/input.at (Reject unused %code qualifiers): Update.
1059 (%define errors): Update.
1060 (%define, --define, --force-define): Update.
1061 (%define backward compatibility): Update.
1062 (Unused %define api.pure): Update.
1063 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
1064
1065 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
1066
1067 Use aver not assert.
1068 * src/output.c: Don't include assert.h.
1069 (output_skeleton): Use aver not assert.
1070 * src/system.h (aver): In documentation of why, add links to
1071 Paul Eggert's explanations in the mailing lists.
1072
1073 2009-09-05 Alex Rozenman <rozenman@gmail.com>
1074
1075 Use "Unresolved reference" error message when no symbols were found
1076 in a symbolic reference resolution. Remove .expr and -expr from
1077 the shown reference when the reference is unresolved.
1078 * src/scan-code.l: Change the error message, adjust location columns,
1079 rename variable "exact_mode" to "explicit_bracketing".
1080 * tests/named-ref.at: Adjust existing tests and add a new one.
1081
1082 2009-09-03 Akim Demaille <demaille@gostai.com>
1083
1084 * NEWS (2.4.2): Add "Internationalization" item.
1085
1086 2009-09-03 Akim Demaille <demaille@gostai.com>
1087
1088 bootstrap: fix/improve find_tool.
1089 * bootstrap (find_tool): Improve error messages.
1090 Fix typo about find_tool_names.
1091
1092 2009-08-29 Joel E. Denny <jdenny@clemson.edu>
1093
1094 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
1095 See
1096 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
1097 * src/scan-code.h (code_props_rule_action_init): Rename
1098 named_ref arg to name so it doesn't shadow named_ref type. This
1099 makes it consistent with the function definition in scan-code.l
1100 anyway.
1101
1102 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
1103
1104 %define: accept unquoted values.
1105 * NEWS (2.5): Group all %define changes together, and document
1106 this one. Remove quotes in IELR and canonical LR entry.
1107 * doc/bison.texinfo: Remove quotes in most examples throughout.
1108 (Decl Summary): Update %define documentation.
1109 (Table of Symbols): Likewise.
1110 * src/ielr.c (LrType): Update documentation.
1111 * src/parse-gram.y (content.opt): Add production for ID.
1112 * tests/calc.at: Remove quotes in most tests.
1113 * tests/existing.at: Likewise.
1114 * tests/input.at: Likewise.
1115 * tests/local.at: Likewise.
1116 * tests/push.at: Likewise.
1117 * tests/reduce.at: Likewise.
1118 * tests/torture.at: Likewise.
1119
1120 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
1121
1122 %define lr.type: make values lowercase IDs.
1123 That is, "LALR" => "lalr", "IELR" => "ielr", and
1124 "canonical LR" => "canonical-lr".
1125 * NEWS (2.5): Update documentation.
1126 * doc/bison.texinfo (Decl Summary): Likewise.
1127 * src/ielr.c (ielr): Use new values.
1128 * src/ielr.h (ielr): Update documentation.
1129 * src/reader.c (prepare_percent_define_front_end_variables): Use
1130 and validate new values.
1131 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
1132 grammars.
1133 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
1134
1135 2009-08-27 Eric Blake <ebb9@byu.net>
1136
1137 scan-gram: avoid portability trap with ctype usage.
1138 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
1139 Avoid compiler warning.
1140
1141 2009-08-27 Joel E. Denny <jdenny@clemson.edu>
1142
1143 tests: use perl for printing special sequences to files.
1144 And skip tests if perl is not available. This is better than
1145 playing tricks with shell portability. Suggested by Akim
1146 Demaille.
1147 * tests/input.at (Bad character literals): Use it here for
1148 omitting final newlines.
1149 (Bad escapes in literals): Use it here for special characters.
1150
1151 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
1152
1153 tests: show a use of %define lr.default-reductions "consistent"
1154 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
1155 prevents the omission of expected tokens for %error-verbose.
1156
1157 2009-08-26 Akim Demaille <demaille@gostai.com>
1158
1159 tests: portability fix.
1160 * tests/input.at (Bad escapes in literals): Don't expect "echo
1161 '\0'" to output \ then 0.
1162
1163 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
1164
1165 Actually handle the yytable zero value correctly this time.
1166 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Don't
1167 mention zero values in the YYTABLE comments.
1168 * data/glr.c (yytable_value_is_error): Don't check for zero
1169 value.
1170 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
1171 * data/yacc.c (yytable_value_is_error): Likewise.
1172 * data/lalr1.java (yy_table_value_is_error_): Likewise.
1173 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
1174 * src/tables.h: In header comments, explain why it's useless to
1175 check for a zero value in yytable.
1176
1177 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1178
1179 More fixes related to last two patches.
1180 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
1181 defined.
1182 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Fix
1183 yytable comments: zero indicates syntax error not default
1184 action.
1185 * data/glr.c (yyis_pact_ninf): Rename to...
1186 (yypact_value_is_default): ... this.
1187 (yyisDefaultedState): Update for rename.
1188 (yyis_table_ninf): Rename to...
1189 (yytable_value_is_error): ... this, and check for value zero
1190 besides just YYTABLE_NINF.
1191 (yygetLRActions): Check for default value from yypact. It
1192 appears that this check is always performed before this function
1193 is invoked, and so adding the check here is probably redundant.
1194 However, the code may evolve after this subtlety is forgotten.
1195 Also, update for rename to yytable_value_is_error. Because that
1196 macro now checks for zero, a different but equivalent branch of
1197 the if-then-else here is evaluated.
1198 (yyreportSyntaxError): Update for rename to
1199 yytable_value_is_error. The zero condition was mishandled
1200 before.
1201 (yyrecoverSyntaxError): Update for renames. No behavioral
1202 changes.
1203 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
1204 New function.
1205 (yy_table_value_is_error_): New function.
1206 (parse): Use new functions where possible. No behavioral
1207 changes.
1208 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
1209 The zero condition was mishandled before.
1210 * data/yacc.c (yyis_pact_ninf): Rename to...
1211 (yypact_value_is_default): ... this.
1212 (yyis_table_ninf): Rename to...
1213 (yytable_value_is_error): ... this, and check for value zero
1214 besides just YYTABLE_NINF.
1215 (yysyntax_error): Update for rename to yytable_value_is_error.
1216 The zero condition was mishandled before.
1217 (yyparse): Update for renames. No behavioral changes.
1218 * src/tables.h: Improve comments about yypact, yytable, etc.
1219 more. Most importantly, say yytable value of zero means syntax
1220 error not default action.
1221
1222 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1223
1224 Fix %error-verbose for conflicts resolved by %nonassoc.
1225 * NEWS (2.5): Document.
1226 * data/glr.c (yyreportSyntaxError): Fix this by checking
1227 yyis_table_ninf.
1228 * data/yacc.c (yysyntax_error): Likewise.
1229 * data/lalr1.cc (yysyntax_error_): Fix this by checking
1230 yytable_ninf_.
1231 * data/lalr1.java (yysyntax_error): Likewise.
1232 * tests/conflicts.at (%nonassoc and eof): Update expected output
1233 and remove FIXME.
1234
1235 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1236
1237 Some code and documentation improvements.
1238 * data/c.m4 (b4_table_value_equals): New macro to capture
1239 some repeated code.
1240 * data/glr.c (yyis_pact_ninf): Use it here.
1241 (yyis_table_ninf): Likewise.
1242 (yyreportSyntaxError): Improve internal comments.
1243 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
1244 Use it everywhere possible.
1245 (yyis_table_ninf): Likewise.
1246 (yysyntax_error): Improve internal comments.
1247 * data/lalr1.cc (yysyntax_error_): Likewise.
1248 * data/lalr1.java (yysyntax_error): Likewise.
1249 * src/tables.h: Improve comments about yypact, yytable, etc.
1250
1251 2009-08-21 Joel E. Denny <jdenny@clemson.edu>
1252
1253 Use locale when quoting.
1254 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
1255 quote rather than implementing quoting here.
1256
1257 2009-08-20 Eric Blake <ebb9@byu.net>
1258
1259 Make previous patch more robust.
1260 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
1261 argmatch.h.
1262 (output_skeleton): Use it.
1263 Suggested by Akim Demaille.
1264
1265 Import latest m4/m4.m4.
1266 * submodules/autoconf: Update to autoconf 2.64.
1267 * configure.ac (M4_GNU_OPTION): New define.
1268 * src/output.c (output_skeleton): Use it to resolve FIXME.
1269 * NEWS: Mention this.
1270
1271 2009-08-19 Joel E. Denny <jdenny@clemson.edu>
1272
1273 Fix complaints about escape sequences.
1274 Discussed starting at
1275 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
1276 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
1277 For a \0 and similar escape sequences meaning the null
1278 character, report an invalid escape sequence instead of an
1279 invalid null character because the latter does not actually
1280 appear in the user's input.
1281 In all escape sequence complaints, don't escape the initial
1282 backslash, and don't quote when the sequence appears at the end
1283 of the complaint line unless there's whitespace that quotearg
1284 won't escape.
1285 Consistently say "invalid" not "unrecognized".
1286 Consistently prefer "empty character literal" over "extra
1287 characters in character literal" warning for invalid escape
1288 sequences; that is, consistently discard those sequences.
1289 * tests/input.at (Bad escapes in literals): New.
1290
1291 2009-08-19 Akim Demaille <demaille@gostai.com>
1292
1293 doc: fixes.
1294 * doc/bison.texinfo: Fix minor Texinfo errors.
1295
1296 2009-08-19 Akim Demaille <demaille@gostai.com>
1297
1298 doc: %initial-action to initialize yylloc.
1299 Reported by Bill Allombert.
1300 * doc/bison.texinfo: Set fill-column to 76.
1301 (Location Type): Document the use of %initial-action to initialize
1302 yylloc.
1303
1304 2009-08-18 Joel E. Denny <jdenny@clemson.edu>
1305
1306 maint: update for gnulib's recent update-copyright changes
1307 * gnulib: Update.
1308 * .x-update-copyright (COPYING): Add as it's no longer implied
1309 when .x-update-copyright is present.
1310 * cfg.mk (update-copyright-local): Remove, now ignored.
1311 (update-copyright): Declare update-b4-copyright as a dependency.
1312
1313 2009-08-17 Akim Demaille <demaille@gostai.com>
1314
1315 build: require gettext 0.17.
1316
1317 Suggested by Bruno Haible.
1318 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
1319 * configure.ac: require gettext 0.17 to ensure compatibility with
1320 gnulib.
1321
1322 2009-08-17 Akim Demaille <demaille@gostai.com>
1323
1324 build: lower gettext requirements.
1325
1326 Bison was uselessly requiring the formatstring macros from
1327 gettext, which resulted in mo files not being installed on systems
1328 that perfectly supported Bison mo files. Lower the requirement.
1329 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
1330
1331 * configure.ac: Require need-ngettext instead of
1332 need-formatstring-macros.
1333 Reported by Martin Jabocs.
1334 Suggested by Bruno Haible.
1335 * INSTALL: Restructure.
1336 (Internationalization): New.
1337
1338 2009-08-14 Joel E. Denny <jdenny@clemson.edu>
1339
1340 maint: fix use of copyright year intervals.
1341 * gnulib: Update.
1342 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
1343 as now recommended in gnulib/NEWS.
1344 * build-aux/update-b4-copyright: Fix.
1345 * cfg.mk (update-copyright-env): Configure update-copyright.
1346
1347 2009-08-13 Joel E. Denny <jdenny@clemson.edu>
1348
1349 Make it easier to write deterministic tests.
1350 Continues Akim's work from his 2009-06-10 commits.
1351 * src/reader.c (check_and_convert_grammar): Don't add any
1352 symbols after the first symbols_do invocation.
1353 * src/symtab.c (symbols_sorted): New static global.
1354 (user_token_number_redeclaration): Update comments.
1355 (symbol_from_uniqstr): If a new symbol is being created, assert
1356 that symbols_sorted hasn't been allocated yet.
1357 (symbols_free): Free symbols_sorted.
1358 (symbols_cmp, symbols_cmp_qsort): New functions.
1359 (symbols_do): Sort symbol_table into symbols_sorted on first
1360 invocation.
1361 * tests/input.at (Numbered tokens): Recombine tests now that the
1362 output should be deterministic across multiple numbers.
1363
1364 2009-08-12 Akim Demaille <demaille@gostai.com>
1365
1366 distcheck: fix.
1367
1368 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
1369
1370 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
1371
1372 * tests/Makefile.am (TESTSUITE_AT): Add named-refs.at.
1373
1374 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
1375
1376 Miscellaneous code readability improvements.
1377
1378 * src/reader.c (reader): Move %define front-end variable
1379 defaults and checking into...
1380 (prepare_percent_define_front_end_variables): ... this new
1381 function.
1382
1383 * src/scan-gram.l (INITIAL): For consistency with string
1384 literals, don't store open quote on character literal. It's
1385 discarded before returning anyway.
1386 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
1387 Make length test more readable, and make the character stored
1388 for an empty literal more obvious while consistent with the
1389 previous behavior.
1390
1391 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
1392 USER_NUMBER_HAS_STRING_ALIAS throughout.
1393 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
1394 that is repeated in symtab.h. Improve argument names to make it
1395 clear which side of the symbol-string alias pair is which.
1396 (symbol_check_alias_consistency): Improve local variable names
1397 for the same purpose.
1398 * src/symtab.h (struct symbol): Make comments about aliases
1399 clearer.
1400 (symbol_make_alias): Improve comments and argument name.
1401 * src/output.c (token_definitions_output): Update for rename to
1402 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
1403
1404 2009-08-08 Alex Rozenman <rozenman@gmail.com>
1405
1406 Convert "misleading reference" messages to warnings.
1407 * src/scan-code.l: New function 'show_sub_messages', more
1408 factoring.
1409 * tests/named-ref.at: Adjust tests.
1410
1411 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
1412
1413 maint: run "make update-copyright"
1414
1415 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
1416
1417 maint: make update-b4-copyright easier to use
1418 * build-aux/update-b4-copyright: In warnings, report line
1419 numbers rather than character positions.
1420 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
1421 that update-copyright runs it.
1422 * gnulib: Update.
1423
1424 2009-08-05 Joel E. Denny <jdenny@clemson.edu>
1425
1426 maint: clean up update-b4-copyright code
1427 * build-aux/update-b4-copyright: Do not accept 2-digit
1428 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
1429 Don't accept a `[' in a b4_copyright argument.
1430 Format code more consistently.
1431 Don't assume b4*copyright never occurs.
1432
1433 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1434
1435 maint: automate b4_copyright updates.
1436 * Makefile.am (update-b4-copyright): New target rule.
1437 * build-aux/Makefile.am (EXTRA_DIST): Add update-b4-copyright.
1438 * build-aux/update-b4-copyright: New.
1439 * data/yacc.c: Remove stray characters around b4_copyright
1440 invocations.
1441
1442 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1443
1444 maint: automate annual package-wide copyright-year update.
1445 * .x-update-copyright: New.
1446 * Makefile.am (EXTRA_DIST): Remove maint.mk.
1447 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
1448 update-copyright. Remove gnumakefile, which is implied by
1449 maintainer-makefile.
1450 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
1451 * gnulib: Update.
1452 * maint.mk: Remove, now copied from gnulib.
1453 * examples/extexi: Add missing "(C)" in copyright statement so
1454 update-copyright can recognize it.
1455 * src/LR0.h: Likewise.
1456 * src/print.h: Likewise.
1457 * src/print_graph.h: Likewise.
1458 * src/gram.c: Add missing comma in copyright statement.
1459 * src/gram.h: Likewise.
1460
1461 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1462
1463 Fix "make distcheck".
1464 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
1465 of just calc.stamp.
1466
1467 2009-08-01 Joel E. Denny <jdenny@clemson.edu>
1468
1469 Pacify "gcc -Wunused" for the input function from Flex.
1470 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
1471 and later.
1472 * src/scan-code.l: Add "%option noinput", which I cannot find in
1473 the Flex manual, but which Flex has supported since at least as
1474 far back as 2.5.4. However, if any of our developers still use
1475 Flex 2.5.4, they'll need to stop configuring with
1476 --enable-gcc-warnings because "%option noinput" didn't work
1477 correctly until Flex 2.5.6.
1478 * src/scan-gram.l: Likewise.
1479 * src/scan-skel.l: Likewise.
1480
1481 2009-07-31 Alex Rozenman <rozenman@gmail.com>
1482
1483 Fix --enable-gcc-warnings problems.
1484 * src/reader.c: Adjust variable names.
1485 * src/scan-code.l: Fix prototypes and adjust names.
1486 * src/named-ref.c: Remove redundant "if".
1487
1488 2009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
1489
1490 Fix a --enable-gcc-warnings problem.
1491 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
1492 variable.
1493
1494 2009-07-24 Alex Rozenman <rozenman@gmail.com>
1495
1496 Fix some memory leaks.
1497 * src/named-ref.c: Add a pointer check (named_ref_free).
1498 * src/scan-code.l: New function (variant_table_free). Called in
1499 code_scanner_free.
1500 * src/symlist.c: Call to named_ref_free (symbol_list_free).
1501
1502 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
1503
1504 Warn about character literals not of length one.
1505 * NEWS (2.5): Document.
1506 * src/scan-gram.l (INITIAL): Remove comment that we don't check
1507 the length.
1508 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
1509 * tests/input.at (Bad character literals): New test group.
1510
1511 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
1512
1513 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
1514
1515 2009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
1516
1517 Some M4 cleanup in the testsuite.
1518 Suggested by Eric Blake at
1519 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
1520 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
1521 complicate the code by distinguishing between a missing value
1522 and an empty string value for an optional argument. This fix is
1523 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
1524 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
1525 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
1526 arguments are not needed because of the following changes.
1527 Fix stale comments.
1528 Bison developers should use GNU M4 and should not use
1529 POSIXLY_CORRECT when building the test suite, so do not
1530 complicate the code by avoiding $10 and above.
1531 Do not quote an empty string value for an optional argument, and
1532 do not distinguish between a missing value and an empty string
1533 value.
1534
1535 2009-07-21 Joel E. Denny <jdenny@ces.clemson.edu>
1536
1537 * m4/m4.m4: Make it a sym link to submodules/autoconf/m4/m4.m4.
1538
1539 2009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
1540
1541 Revert unnecessary column realignment in --help output.
1542 Reported by Akim Demaille at
1543 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
1544 * src/getargs.c (usage): Here.
1545
1546 2009-07-04 Alex Rozenman <rozenman@gmail.com>
1547
1548 Alphabetical order in src/Makefile.am.
1549 * src/Makefile.am: Adjust.
1550
1551 2009-07-04 Alex Rozenman <rozenman@gmail.com>
1552
1553 Style changes and factoring.
1554 * src/named-ref.h: Add comments.
1555 * src/parse-gram.y: Readability and style changes.
1556 * src/reader.c: Factoring: assign_named_ref function.
1557 * src/scan-code.l: Factoring and style changes. Rename
1558 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
1559 Use "unsigned" type for variant index. Improve readablity.
1560 * src/scan-gram.l: Change error messages and add comments.
1561 * src/symlist.h: symbol_list_null: New function decl.
1562 * src/symlist.c: symbol_list_null: Implement here.
1563 * tests/named-refs.at: Adjust for new error messages.
1564
1565 2009-06-29 Eric Blake <ebb9@byu.net>
1566
1567 scan-code: avoid compiler warnings
1568 * src/scan-code.l (parse_named_ref): Use correct specifiers.
1569
1570 2009-06-29 Akim Demaille <demaille@gostai.com>
1571
1572 build: avoid concurrent extraction of calc++.
1573 * examples/calc++/Makefile.am (calc.stamp): New.
1574 Depend on it to create the sources of calc++ so that concurrent
1575 builds don't launch several "extexi" in parallel.
1576 Not only this is inefficient, this also builds incorrect sources
1577 with several extractions mixed together.
1578
1579 2009-06-27 Alex Rozenman <rozenman@gmail.com>
1580
1581 Implement support for named symbol references.
1582 * src/parse-gram.y: Add new syntax (named_ref.opt).
1583 * src/reader.c: Store named refs in symbol lists.
1584 * src/reader.h: New argument for symbol_append and
1585 action_append functions.
1586 * src/scan-code.h: Add new field (named_ref) into
1587 code_props data structure. Keeps named ref of midrule
1588 actions.
1589 * src/scan-code.l: Support for named refs in semantic
1590 action code. New function 'parse_named_ref'.
1591 * src/scan-gram.l: Support bracketed id.
1592 * src/symlist.c: Store named refs in symbol lists.
1593 * src/symlist.h: New field in symbol list: named_ref.
1594 * src/named-ref.h: New file, a struct for named_ref.
1595 * src/named-ref.cp: New file, named_ref_new function.
1596 * src/local.mk: Add two new files.
1597 * tests/testsuite.at: Include new test group:
1598 * tests/named-refs.at: this new file.
1599
1600 2009-06-25 Akim Demaille <demaille@gostai.com>
1601
1602 hash: check insertion for memory exhaustion.
1603 * src/uniqstr.c (uniqstr_new): New.
1604
1605 2009-06-11 Akim Demaille <demaille@gostai.com>
1606
1607 style changes.
1608 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
1609 * src/print-xml.c: Style changes.
1610 * tests/conflicts.at: Comment changes.
1611
1612 2009-06-11 Akim Demaille <demaille@gostai.com>
1613
1614 xml: beware of user strings used to give a %prec to rules.
1615 * tests/conflicts.at (%prec with user strings): New.
1616 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
1617 XML output.
1618
1619 2009-06-11 Akim Demaille <demaille@gostai.com>
1620
1621 hash: check insertion for memory exhaustion.
1622 * src/muscle-tab.c (muscle_insert, muscle_grow)
1623 * src/state.c (state_hash_insert): Check the return value of
1624 hash_insert.
1625
1626 2009-06-10 Akim Demaille <demaille@gostai.com>
1627
1628 deterministic test suite.
1629 Some consistency checks on symbols are performed after all the
1630 symbols were read, by an iteration over the symbol table. This
1631 traversal is nondeterministic, which can be a problem for test
1632 cases.
1633 Avoid this.
1634 Addresses another form of nondeterminism reported by Joel E. Denny.
1635 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
1636
1637 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
1638 test in two.
1639 Use different file names for the three tests to make the
1640 maintenance easier.
1641
1642 2009-06-10 Akim Demaille <demaille@gostai.com>
1643
1644 deterministic user-token-number redeclaration errors.
1645 Address nondeterminism reported by Joel E. Denny.
1646 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
1647
1648 * src/uniqstr.h: Comment changes.
1649 * src/location.h (boundary_cmp, location_cmp): New.
1650 * src/symtab.c (user_token_number_redeclaration): New.
1651 (symbol_translation): Use it.
1652 * tests/input.at (Numbered tokens): Adjust the expected output.
1653
1654 2009-05-25 Akim Demaille <demaille@gostai.com>
1655
1656 gnulib: update.
1657 * gnulib: Update to latest.
1658 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
1659 * m4/.gitignore: Regen.
1660 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
1661 Call xalloc_die on hash_insert failures.
1662 Requested by the new __warn_unused_result__ attribute of
1663 hash_insert.
1664
1665 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1666
1667 Convert multiple variable definition warnings to complaints.
1668 * NEWS (2.5): Add a new entry for that change.
1669 * doc/bison.texinfo (Decl Summary): Update %define entry.
1670 (Bison Options): Update -D/--define/-F/--force-define entry.
1671 * src/muscle_tab.c (muscle_percent_define_insert): Implement.
1672 * src/muscle_tab.h (muscle_percent_define_insert): Update
1673 comments.
1674 * tests/input.at (`%define errors'): Update.
1675 (`%define, --define, --force-define'): Update.
1676
1677 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1678
1679 -F/--force-define and relative %define/-D/--define priorities.
1680 * NEWS (2.5): Add documentation to -D/--define entry.
1681 * build-aux/cross-options.pl: Hard-code association of
1682 --force-define with %define.
1683 * doc/bison.texinfo (Decl Summary): In %define entry,
1684 cross-reference command-line options.
1685 (Bison Options): Add documentation to -D/--define entry.
1686 (Option Cross Key): Widen column for --force-define row.
1687 * src/getargs.c (usage): Document -F/--force-define. Realign
1688 options in output.
1689 (short_options, long_options, getargs): Parse -F/--force-define,
1690 and update muscle_percent_define_insert invocation.
1691 * src/muscle_tab.h (muscle_percent_define_how): New enum type.
1692 (muscle_percent_define_insert): Add argument with that type.
1693 * src/muscle_tab.c (muscle_percent_define_insert): Implement
1694 -F/--force-define behavior and priorities.
1695 * src/parse-gram.y (prologue_declaration): Update
1696 muscle_percent_define_insert invocations.
1697 * tests/input.at (`%define, --define'): Rename to...
1698 (`%define, --define, --force-define'): ... this and extend.
1699
1700 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1701
1702 Update some comments to make sense for -D.
1703 * data/bison.m4 (b4_check_user_names): In header comments, say
1704 "user occurrence" instead of "grammar occurrence".
1705 * src/muscle_tab.h (muscle_percent_define_insert): Likewise.
1706 (muscle_percent_code_grow): Likewise just for consistency.
1707
1708 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1709
1710 * data/c++.m4: Update copyright year.
1711
1712 2009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
1713
1714 * data/c++.m4 (b4_namespace_close): Simplify slightly.
1715
1716 2009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
1717
1718 Handle a trailing `:' in a user-supplied C++ namespace better.
1719 * data/c++.m4 (b4_namespace_close): Don't let it be printed
1720 among the closing braces here. This fix might make the
1721 generated code easier to debug, but otherwise it should be
1722 insignificant because a trailing `:' is a C++ error already.
1723
1724 2009-05-19 Akim Demaille <demaille@gostai.com>
1725
1726 remove useless variable.
1727 * src/getargs.c (skeleton_arg): Remove now useless variable.
1728 Should help the compiler see that this printf-like call is sane.
1729
1730 2009-05-11 Akim Demaille <demaille@gostai.com>
1731
1732 doc: use C++ headers.
1733 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
1734 headers.
1735
1736 2009-05-05 Akim Demaille <demaille@gostai.com>
1737
1738 fix hexadecimal token number support.
1739 * src/scan-gram.l: Catch incorrect ids after hexadecimal numbers.
1740
1741 2009-05-05 Akim Demaille <demaille@gostai.com>
1742
1743 tests: check token numbers.
1744 * tests/input.at (Numbered tokens): New.
1745
1746 2009-05-04 Akim Demaille <demaille@gostai.com>
1747
1748 bison: catch bad symbol names.
1749 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
1750 * tests/input.at: Adjust.
1751
1752 2009-05-04 Akim Demaille <demaille@gostai.com>
1753
1754 space changes.
1755 * src/scan-gram.l: Untabify to be robust to zealous editors.
1756
1757 2009-05-04 Akim Demaille <demaille@gostai.com>
1758
1759 identifiers: dashes are letters.
1760 Dashes can now start identifiers (symbols and directives).
1761
1762 * src/scan-gram.l ({letter}): Add dash.
1763 ({id}): Remove it.
1764 * tests/input.at (Symbols): Adjust.
1765 Remove stray comment.
1766 * tests/regression.at (Invalid inputs): Adjust error message.
1767 * doc/bison.texinfo (Symbols): Update.
1768
1769 2009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
1770
1771 Declare %code to be a permanent feature.
1772 * NEWS (2.4.2): Here.
1773 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
1774 experimental.
1775 (Decl Summary): Likewise.
1776
1777 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
1778
1779 Convert underscores to dashes in some %define variable names.
1780 For now, just api.push-pull and lr.keep-unreachable-states.
1781 Maintain old names for backward compatibility.
1782 * NEWS (2.5): Document.
1783 * data/c.m4 (b4_identification): Update comment.
1784 * data/yacc.c: Update access.
1785 * doc/bison.texinfo: Update.
1786 * etc/bench.pl.in (bench_grammar): Update use.
1787 * src/files.c (tr): Move to...
1788 * src/getargs.c, src/getargs.h (tr): ... here because I can't
1789 think of a better place to expose it. My logic is that, for all
1790 uses of tr so far, command-line arguments can be involved, and
1791 getargs.h is already included.
1792 * src/main.c (main): Update access.
1793 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
1794 variable names to new variable names before assigning value.
1795 * src/reader.c (reader): Update setting default.
1796 * tests/calc.at: Update uses.
1797 * tests/conflicts.at (Unreachable States After Conflict
1798 Resolution): Update use.
1799 * tests/input.at (%define enum variables): Update use.
1800 (%define backward compatibility): New test group.
1801 * tests/push.at: Update uses.
1802 * tests/reduce.at: Update uses.
1803 * tests/torture.at: Update uses.
1804
1805 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
1806
1807 Set all front-end %define defaults in one place.
1808 * src/main.c (main): Move lr.keep_unreachable_states default...
1809 * src/reader.c (reader): ... to here.
1810
1811 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1812
1813 Rename lr.default_reductions to lr.default-reductions.
1814 * NEWS (2.5): Here.
1815 * doc/bison.texinfo: Here.
1816 * src/lalr.c (initialize_LA): Here.
1817 * src/print.c (print_reductions): Here.
1818 * src/reader.c (reader): Here.
1819 * src/tables.c (action_row): Here.
1820 * tests/input.at (%define enum variables): Here.
1821 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
1822
1823 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1824
1825 Pacify ./configure --enable-gcc-warnings.
1826 * tests/input.at (Symbols): Prototype yyerror and yylex.
1827
1828 2009-04-21 Akim Demaille <demaille@gostai.com>
1829
1830 tests: check the use of dashes and periods in symbols.
1831 * tests/input.at (Symbol): New test group.
1832
1833 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1834
1835 Document how `%define "var" "value"' is not M4-friendly.
1836 * src/parse-gram.y (variable): In comments here.
1837
1838 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1839
1840 Add copyright updates missed during previous cherry pick.
1841 * src/output.c: Here.
1842 * src/parse-gram.y: Here.
1843 * src/scan-gram.l: Here.
1844
1845 2009-04-20 Akim Demaille <demaille@gostai.com>
1846
1847 variables: accept dashes.
1848 * src/scan-gram.l ({id}): Also accept dashes after the initial
1849 letter.
1850 ({directive}): Use {id}.
1851 * src/parse-gram.y: Comment and formatting changes.
1852 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
1853 symbols.
1854 * src/complain.h, src/complain.c (yacc_at): New.
1855 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
1856 symbol names.
1857 * src/output.c (token_definitions_output): Do not #define token
1858 names with dashes.
1859
1860 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
1861
1862 Clean up recent patches a little.
1863 Reported by Akim Demaille.
1864 * doc/bison.texinfo (Understanding): Fix typos.
1865 * src/print.c (print_reductions): Don't use negated variable.
1866
1867 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
1868
1869 List accepted values for a %define enum variable with an invalid value.
1870 Suggested by Akim Demaille at
1871 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
1872 * data/bison.m4 (_b4_percent_define_check_values): Implement.
1873 * src/muscle_tab.c (muscle_percent_define_check_values): Implement.
1874 * tests/input.at (%define lr.default_reductions invalid values): Merge
1875 into...
1876 (%define enum variables): ... here, and update output.
1877
1878 2009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
1879
1880 Rename "default rule" to "default reduction".
1881 This includes changing variable names in code, changing
1882 comments, and renaming %define lr.default_rules to %define
1883 lr.default_reductions.
1884 * NEWS (2.5): Update IELR documentation.
1885 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c:
1886 Adjust YYDEFACT and yydefact_ documentation.
1887 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
1888 and lr.type documentation. Make some other wording
1889 improvements.
1890 (Glossary): Adjust cross-references and Default Reduction
1891 definition.
1892 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
1893 Remove a confusing comment pointed out by Akim Demaille.
1894 (initialize_LA): Adjust code.
1895 * src/print-xml.c (print_reductions): Adjust code.
1896 * src/print.c (print_reductions): Adjust code.
1897 * src/reader.c (reader): Adjust code.
1898 * src/tables.c (action_row): Adjust code.
1899 (token_actions): Adjust code.
1900 * src/tables.h: Adjust YYDEFACT documentation.
1901 * tests/input.at (%define lr.default_rules invalid values):
1902 Rename test group to...
1903 (%define lr.default_reductions invalid values): ... this, and
1904 update grammar file and expected output.
1905 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
1906 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
1907
1908 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1909
1910 Document %define lr.type and lr.default_rules.
1911 * NEWS (2.5): Add an entry.
1912 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
1913 besides just LALR(1) and GLR(1).
1914 * doc/bison.texinfo (Introduction): Likewise.
1915 (Language and Grammar): Bison is no longer limited to LALR(1)
1916 restrictions.
1917 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
1918 when trying to distinguish from GLR. Talk about LR(1) grammars
1919 rather than LALR(1) grammars.
1920 (Decl Summary): In %define api.push_pull entry, say it applies
1921 to deterministic parsers in C rather than LALR(1) parsers in C.
1922 Add lr.default_rules entry.
1923 Add lr.type entry.
1924 (Mystery Conflicts): Bison is no longer limited to LALR(1)
1925 restrictions.
1926 (Generalized LR Parsing): Same changes as for the previous GLR
1927 section.
1928 (Memory Management): Say deterministic rather than LALR(1).
1929 (Understanding): Correct some bison output.
1930 Index discussion of "accepting state".
1931 Say deterministic rather than LALR(1).
1932 (Bison Options): In --yacc entry, say deterministic rather than
1933 LALR(1).
1934 In --report, --graph, and --xml entries, just don't mention
1935 LALR(1).
1936 (C++ Parsers): Say deterministic rather than LALR(1).
1937 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
1938 (Glossary): Add Accepting State, Consistent State, Default Rule,
1939 and IELR(1) definitions.
1940 In Generalized LR (GLR) definition, make same changes as in
1941 previous GLR sections.
1942 In LALR(1) definition, say Bison uses LALR(1) by default rather
1943 than implying Bison is limited to LALR(1).
1944 (LocalWords): Add IELR.
1945
1946 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1947
1948 Finish implementing %define lr.type.
1949 Its value can be "LALR", "IELR", or "canonical LR".
1950 * lib/timevar.def (TV_IELR_PHASE1): New var.
1951 (TV_IELR_PHASE2): New var.
1952 (TV_IELR_PHASE3): New var.
1953 (TV_IELR_PHASE4): New var.
1954 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
1955 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
1956 Sbitset.h, ielr.h, and ielr.c.
1957 * src/getargs.h, src/getargs.c (enum trace, trace_args,
1958 trace_types): Add trace_ielr.
1959 * src/lalr.h, src/lalr.c (ngotos): Export it.
1960 (F): Rename to...
1961 (goto_follows): ... this, update all uses, and export it.
1962 (set_goto_map): Export it.
1963 (map_goto): Export it.
1964 (compute_lookahead_tokens): Don't free goto_follows yet. Now
1965 handled in ielr.
1966 (initialize_LA): Export it. Move lookback allocation to...
1967 (lalr): ... here because, for canonical LR, initialize_LA must
1968 be invoked but lookback and much of the rest of LALR isn't
1969 needed.
1970 * main.c (main): Instead of lalr, invoke ielr, which invokes
1971 lalr.
1972 * src/reader.c (reader): Default lr.type to "LALR".
1973 Default lr.default_rules to "accepting" if lr.type is "canonical
1974 LR". Leave the default as "all" otherwise.
1975 Check for a valid lr.type value.
1976 * src/state.h, src/state.c (struct state_list): Add state_list
1977 member.
1978 (state_new): Initialize state_list member to NULL.
1979 (state_new_isocore): New function, exported.
1980 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
1981 exercises all values of lr.type.
1982 (GNU AWK Grammar): Rename test group to...
1983 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
1984 AT_TEST_EXISTING_GRAMMAR.
1985 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
1986 (GNU pic Grammar): Rename test group to...
1987 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
1988 AT_TEST_EXISTING_GRAMMAR.
1989 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
1990 all values of lr.type.
1991 (Single State Split): New test groups using AT_TEST_LR_TYPE.
1992 (Lane Split): Likewise.
1993 (Complex Lane Split): Likewise.
1994 (Split During Added Lookahead Propagation): Likewise.
1995
1996 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1997
1998 Add new files for IELR and canonical LR implementation.
1999 * src/AnnotationList.c: New.
2000 * src/AnnotationList.h: New.
2001 * src/InadequacyList.c: New.
2002 * src/InadequacyList.h: New.
2003 * src/Sbitset.c: New.
2004 * src/Sbitset.h: New.
2005 * src/ielr.c: New.
2006 * src/ielr.h: New.
2007
2008 2009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
2009
2010 Implement %define lr.default_rules.
2011 Its value describes the states that are permitted to contain
2012 default rules: "all", "consistent", or "accepting".
2013 * src/reader.c (reader): Default lr.default_rules to "all".
2014 Check for a valid lr.default_rules value.
2015 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
2016 is "accepting", then only mark the accepting state as
2017 consistent.
2018 (initialize_LA): Tell state_lookahead_tokens_count whether
2019 lr.default_rules is "accepting".
2020 * src/tables.c (action_row): If lr.default_rules is not "all",
2021 then disable default rules in inconsistent states.
2022 * src/print.c (print_reductions): Use this opportunity to
2023 perform some assertions about whether lr.default_rules was
2024 obeyed correctly.
2025 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
2026 helps with checking the parser tables for a grammar.
2027 * tests/input.at (%define lr.default_rules invalid values): New
2028 test group.
2029 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
2030 AT_TEST_TABLES_AND_PARSE.
2031 (`no %define lr.default_rules'): New test group generated by
2032 AT_TEST_LR_DEFAULT_RULES.
2033 (`%define lr.default_rules "all"'): Likewise.
2034 (`%define lr.default_rules "consistent"'): Likewise.
2035 (`%define lr.default_rules "accepting"'): Likewise.
2036
2037 2009-04-20 Akim Demaille <demaille@gostai.com>
2038
2039 Consistently refer to Yacc, not YACC.
2040 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
2041
2042 2009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
2043
2044 Pacify make maintainer-check-posix.
2045 * tests/input.at (%define, --define): Move bison command-line
2046 options before grammar file name.
2047
2048 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2049
2050 Document semicolon warnings.
2051 * NEWS (2.5): Here.
2052
2053 2008-12-08 Akim Demaille <demaille@gostai.com>
2054
2055 Fix portability issue in the test suite.
2056 * tests/local.at (AT_MATCHES_CHECK): New.
2057 Based on Perl instead of Sed. Sed has too many portability
2058 pitfalls, not ever Sed is GNU Sed.
2059 * tests/actions.at (Fix user actions without a trailing semicolon):
2060 Use it.
2061
2062 2008-12-07 Di-an Jan <dianj@freeshell.org>
2063
2064 Implement the FIXME that ends an user action with a semicolon
2065 if it seems necessary.
2066 * src/scan-code.l (flex rules section): Flag cpp directive from
2067 any `#' to the first unescaped end-of-line. Semicolon is not
2068 needed after `;', `{', '}', or cpp directives and is needed after
2069 any other token (whitespaces and comments have no effect).
2070 * tests/actions.at (Fix user actions without a trailing semicolon):
2071 New test.
2072 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
2073 to make user actions complete statements.
2074 Adjust column numbers in error messages.
2075 * tests/regression.at (Fix user actions without a trailing semicolon):
2076 Remove. Covered by new test.
2077
2078 2009-04-14 Akim Demaille <demaille@gostai.com>
2079
2080 doc: minor fixes.
2081 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
2082 (Table of Symbols): Remove duplicate entry for %debug.
2083
2084 2009-04-10 Eric Blake <ebb9@byu.net>
2085
2086 submodules: update to latest
2087 * submodules/autoconf: Use latest upstream Autoconf.
2088
2089 2009-04-06 Eric Blake <ebb9@byu.net>
2090
2091 Work around autoconf 2.63b bug in testsuite.
2092 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
2093 autoconf bug related to # in test.
2094
2095 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2096
2097 * NEWS (2.5): Describe new -D/--define feature.
2098
2099 2008-11-10 Akim Demaille <demaille@gostai.com>
2100
2101 --trace=muscles
2102 * src/getargs.h, src/getargs.c (trace_muscle): New.
2103 (trace_types, trace_args): Support it.
2104 * src/output.c (output_skeleton): Use it.
2105
2106 2008-11-10 Akim Demaille <demaille@gostai.com>
2107
2108 muscles_output.
2109 * src/output.c (muscles_output): New, extracted from...
2110 (output_skeleton): here.
2111 Adjust.
2112
2113 2008-11-21 Akim Demaille <demaille@gostai.com>
2114
2115 Display the changes in cross-options.texi.
2116 * build-aux/cross-options.pl ($sep): New, to separate items.
2117 * doc/Makefile.am ($(srcdir)/cross-options.texi): Use diff to display
2118 the changes.
2119
2120 2008-11-20 Di-an Jan <dianj@freeshell.org>
2121
2122 Improves options in the manual.
2123 * doc/bison.texinfo (-g, -x): Add space before argument.
2124 (Option Cross Key): Implement FIXME: listing directives also.
2125 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
2126 (Short Option): Special case -d. Put arguments inside @option.
2127 (Bison Directive): Add column, automatically extracted from
2128 src/scan-gram.l (actual name passed as the first argument)
2129 with special case for %define.
2130 * doc/Makefile.am (doc/cross-options.texi): Pass src/scan-gram.l
2131 to build-aux/cross-options.pl.
2132 * src/getargs.c (usage): Document limitations of cross-options.pl.
2133 * src/scan-gram.l: Likewise.
2134
2135 2009-02-25 Akim Demaille <demaille@gostai.com>
2136
2137 Copyright years.
2138 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
2139
2140 2008-12-08 Akim Demaille <demaille@gostai.com>
2141
2142 Install autoconf as a submodule to get m4sugar.
2143 * .gitmodules: Add submodules/autoconf.
2144 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
2145 submodules/autoconf.
2146
2147 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2148
2149 Simplify last patch slightly.
2150 * src/getargs.c (getargs): Here.
2151
2152 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2153
2154 Fix last warning from --enable-gcc-warnings.
2155 * src/getargs.c (getargs): Don't assign const address to non-const
2156 pointer.
2157
2158 2008-11-17 Di-an Jan <dianj@freeshell.org>
2159
2160 Handle --enable-gcc-warnings.
2161 * src/getargs.c (command_line_location): Set parameters to void.
2162
2163 2008-11-11 Akim Demaille <demaille@gostai.com>
2164
2165 AT_FULL_COMPILE.
2166 * tests/actions.at, tests/regression.at: Use it.
2167
2168 2008-11-07 Akim Demaille <demaille@gostai.com>
2169
2170 Pass command line location to skeleton_arg and language_argmatch.
2171 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
2172 The location argument is now mandatory.
2173 Adjust all dependencies.
2174 (getargs): Use command_line_location.
2175
2176 2008-11-07 Akim Demaille <demaille@gostai.com>
2177
2178 -D, --define.
2179 * src/getargs.c (usage): Document -D.
2180 Fix help string for --locations.
2181 (command_line_location): New.
2182 (short_options, long_options, getargs): Support -D, --define.
2183 (getargs): Move -d support at the right place.
2184 * doc/bison.texinfo (Bison Options): Update.
2185 * tests/input.at (%define, --define): New.
2186
2187 2008-11-07 Akim Demaille <demaille@gostai.com>
2188
2189 Initialize the muscle table before parsing the command line.
2190 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
2191 (getargs): Define file_name.
2192 * src/main.c (main): Initialize muscle_tab before calling
2193 getargs.
2194 * src/muscle_tab.c (muscle_init): No longer define file_name, as
2195 its value is not available yet.
2196
2197 2008-11-09 Akim Demaille <demaille@gostai.com>
2198
2199 Require the generation of parse-gram.output.
2200 * src/Makefile.am (YACC): Pass --report=all.
2201
2202 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2203
2204 * NEWS (2.5): New stub.
2205
2206 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2207
2208 Fix options documentation.
2209 * build-aux/cross-options.pl: As in --help output, write optional
2210 arguments as [=ARG] not =[ARG].
2211 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
2212
2213 2008-11-07 Akim Demaille <demaille@gostai.com>
2214
2215 Fix --help.
2216 * src/getargs.c (usage): Fix help string for -W.
2217
2218 2008-11-07 Akim Demaille <demaille@gostai.com>
2219
2220 Handle more general types of option arguments.
2221 * build-aux/cross-options.pl: The argument ends at the first
2222 space, not the first non-symbol character.
2223 Use @var for each word appearing the argument description.
2224
2225 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2226
2227 Remove spurious initial empty lines.
2228 * data/location.cc: End the @output lines with an @.
2229
2230 2008-11-04 Akim Demaille <demaille@gostai.com>
2231
2232 Remove spurious initial empty lines.
2233 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
2234 * data/yacc.c: End the @output lines with an @.
2235
2236 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2237
2238 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
2239 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
2240 requirements for a correct m4 are stricter.
2241 * m4/m4.m4: Replace with Autoconf 2.63's m4/m4.m4.
2242 * configure.ac: Update to use AC_PROG_GNU_M4.
2243 Reported by Eric Blake.
2244
2245 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2246
2247 Help with updating web manual.
2248 * HACKING: Incorporate instructions from gnulib/doc/README.
2249 * bootstrap.conf (gnulib_modules): Add gendocs.
2250
2251 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2252
2253 Fix strange %define locations for default values.
2254 Reported by Akim Demaille at
2255 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
2256 and discussed again starting at
2257 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
2258 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
2259 because location information is bogus.
2260 Use angle brackets to delimit fake file name because square brackets
2261 look like underexpanded m4. Choose a better fake file name.
2262 Use negative line numbers.
2263 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
2264 * src/location.c (location_print): If line for a boundary is negative,
2265 only print that boundary's file name.
2266 * src/location.h: Document that.
2267 * tests/skeletons.at (%define Boolean variables: invalid skeleton
2268 defaults): Update output.
2269
2270 2008-11-07 Akim Demaille <demaille@gostai.com>
2271
2272 Locations without columns for command line arguments.
2273 * src/location.c (location_print): Don't display negative columns.
2274 * src/location.h: Document this.
2275
2276 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
2277
2278 Add reminder about uploading public key to keys.gnupg.net.
2279 * HACKING (Release Procedure): Here.
2280
2281 2009-03-31 Akim Demaille <demaille@gostai.com>
2282
2283 bootstrap: --help to stdout.
2284 * bootstrap (usage): Don't send --help to stderr.
2285 Use a here doc instead of a long string.
2286
2287 2009-03-31 Akim Demaille <demaille@gostai.com>
2288
2289 bootstrap: README-hacking no longer exists
2290 * bootstrap (checkout_only_file): Set to HACKING.
2291
2292 2009-03-26 Akim Demaille <demaille@gostai.com>
2293
2294 doc: merge HACKING and README-hacking.
2295 Two files is confusing.
2296 Reported by Alexandre Duret-Lutz.
2297
2298 * README-hacking: Merge into...
2299 * HACKING (Working from the repository): here.
2300
2301 2009-03-26 Akim Demaille <demaille@gostai.com>
2302
2303 doc: update README-hacking.
2304 * README-hacking: We now use git and git submodules.
2305 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
2306
2307 2009-03-26 Akim Demaille <demaille@gostai.com>
2308
2309 lalr1.cc: avoid GCC 4.3 warnings.
2310 GCC 4.3 now warns about "a || b && c" and asks for explicit
2311 parentheses.
2312 Reported by Alexandre Duret-Lutz.
2313 * data/location.cc: Update copyright years.
2314 (Position::operator==): Use parens to make precedence explicit.
2315 Compare lines and columns first, as they are more likely to be
2316 different, and they are faster to compare.
2317
2318 2009-03-26 Akim Demaille <demaille@gostai.com>
2319
2320 gnulib: update.
2321 * gnulib: Update to latest.
2322 * lib/Makefile.am (AM_CPPFLAGS): It is now defined by gnulib, so
2323 use +=.
2324
2325 2009-01-08 Akim Demaille <demaille@gostai.com>
2326
2327 Fix grep portability issues.
2328 Grep on Solaris does not support -q.
2329 Reported by Summum Bonum.
2330
2331 * NEWS: Add a stub for 2.4.2.
2332 * THANKS: Add Summum Bonum.
2333 * tests/atlocal.in (EGREP): New.
2334 (CC, CXX, XSLTPROC): Make it possible to override them via
2335 envvars.
2336 * tests/java.at: Use $EGREP instead of egrep.
2337 Use AT_CHECK's ignore instead of grep's -q.
2338
2339 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
2340
2341 Version 2.4.1.
2342 * NEWS: Set version and date.
2343 * lib/Makefile.am: Update copyright year.
2344 * tests/atlocal.in: Update copyright year.
2345
2346 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
2347
2348 Semicolon feature removal is not about future language support.
2349 * NEWS: The semicolon feature is no longer active for newer languages,
2350 so don't claim that it causes trouble for them.
2351
2352 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
2353
2354 * gnulib: Update submodule to HEAD.
2355
2356 2008-12-09 Akim Demaille <demaille@gostai.com>
2357
2358 Update data/README.
2359 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
2360
2361 2008-12-05 Eric Blake <ebb9@byu.net>
2362
2363 Build testsuite with newer autoconf.
2364 * tests/output.at (m4_expand): Don't override in newer autoconf,
2365 where the underlying implementation changed.
2366 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
2367 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
2368 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
2369 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
2370 since some of them contain unbalanced ')'.
2371
2372 2008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
2373
2374 * NEWS: Clarify a little.
2375
2376 2008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
2377
2378 * NEWS: Update for recent changes.
2379
2380 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
2381
2382 Fix unexpanded macros in GLR defines file.
2383 Reported by Csaba Raduly at
2384 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
2385 * THANKS (Csaba Raduly): Add.
2386 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
2387 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
2388 lexer in a separate module that includes the defines file.
2389 (AT_CHECK_CALC): Use AT_FULL_COMPILE and request compilation of lexer
2390 source.
2391 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
2392 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
2393 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
2394 (AT_DATA_SOURCE_PROLOGUE): New.
2395 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
2396 (AT_DATA_SOURCE): New.
2397 (AT_FULL_COMPILE): New, copied from master branch and extended to
2398 support an additional source file.
2399
2400 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2401
2402 Don't let maintainer-*-check targets force a version update.
2403 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
2404 handled.
2405
2406 2008-11-17 Di-an Jan <dianj@freeshell.org>
2407
2408 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
2409 Align menus. Adjust word wrapping. Use node names for menu names.
2410 (Examples): Don't abbreviate node names.
2411 (LocalWords): Remove abbreviations.
2412 (Copying): Make description a sentence.
2413 (Java Action Features): Remove period to match the rest of menu.
2414
2415 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
2416
2417 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
2418 * configure.ac: Adjust usage.
2419 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2420 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2421 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
2422
2423 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2424
2425 Don't add a semicolon to actions for %skeleton or %language.
2426 It breaks Java test cases as reported by Akim Demaille.
2427 * src/scan-code.l: Implement.
2428
2429 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2430
2431 Clean up %skeleton and %language priority implementation.
2432 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
2433 remove static qualifier because others will soon need to see it.
2434 (language_prio): Likewise.
2435 (getargs): Use command_line_prio rather than 0.
2436 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
2437 enum fields.
2438 (skeleton_prio): Extern it.
2439 (language_prio): Extern it.
2440 * src/parse-gram.y: Use grammar_prio rather than 1.
2441
2442 2008-11-04 Akim Demaille <demaille@gostai.com>
2443
2444 * NEWS: Mention the trailing semicolon in action.
2445
2446 2008-11-04 Akim Demaille <demaille@gostai.com>
2447
2448 Reformat NEWS.
2449 * NEWS: Use more outline-mode markup.
2450 Suggested by Jim Meyering.
2451
2452 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
2453
2454 Fix user actions without a trailing semicolon.
2455 Reported by Sergei Steshenko at
2456 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
2457 * THANKS (Sergei Steshenko): Add.
2458 * src/scan-code.l (SC_RULE_ACTION): Fix it.
2459 * tests/regression.at (Fix user actions without a trailing semicolon):
2460 New test case.
2461
2462 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2463
2464 Initiate further development.
2465 * NEWS: Create an empty section for new entries.
2466 * gnulib: Update submodule to HEAD.
2467
2468 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2469
2470 * NEWS: Version 2.4.
2471
2472 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2473
2474 Prepare for next release.
2475 * NEWS: Briefly mention changes since 2.3b.
2476 * README: Say GNU m4 1.4.6, which we've been requiring in release
2477 announcements already, not 1.4.3, which breaks the build.
2478
2479 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2480
2481 Say %language is experimental.
2482 We're thinking of extending it's effect on output file naming. See the
2483 thread at
2484 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
2485 * NEWS: Say it's experimental.
2486 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
2487 recommend it over %skeleton for now.
2488 (Bison Options): Likewise.
2489 (C++ Bison Interface): Use %skeleton not %language.
2490 (Calc++ Parser): Use %skeleton not %language.
2491 * src/getargs.c (usage): Say it's experimental.
2492
2493 2008-11-01 Di-an Jan <dianj@freeshell.org>
2494 Paolo Bonzini <bonzini@gnu.org>
2495
2496 Support all Java parser class modifiers.
2497 * data/java.m4 (b4_percent_define_get3): New.
2498 (b4_final_if, b4_strictfp_if): New.
2499 * data/lalr1.java (final, strictfp, extends, implements): Support.
2500 * doc/bison.texinfo (final, strictfp, extends, implements): Add
2501 documentation.
2502 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
2503 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
2504 (AT_CHECK_JAVA_GREP): New.
2505 (Java parser class modifiers): New test.
2506 (Java parser class extends and implements): New test.
2507
2508 Model exception propagation better with throws and lex_throws.
2509 * data/java.m4 (b4_list2): New.
2510 (throws): Change default.
2511 * data/lalr1.java (yyaction): Add throws.
2512 (parse): Add lex_throws in addition to throws.
2513 * doc/bison.texinfo (throws, lex_throws): Add documentation.
2514 * tests/java.at (Java throws specifications): New test.
2515
2516 Improve documentation for Java parsers.
2517 * doc/bison.texinfo (Java Parsers): Add subsections.
2518 Don't quote first argument of %define.
2519 (Java Bison Interface): Document output files. Move documentation
2520 of parser class and merge into Java Parser Interface. Document
2521 features that error out. Document directives with no effect.
2522 Move note about Javadoc higher.
2523 (Java Semantic Values): Explicitly mention stype.
2524 Document that generic types cannot be used.
2525 (Java Location Values): Use @deftypeivar. Document constructors.
2526 Correct return value for toString.
2527 (Java Parser Interface): List undocumented constants/fields.
2528 Move documentation of fields added by %parse-param closer to list
2529 of members. Document that token names are added as fields.
2530 Document constructors accurately. Remove error method.
2531 (Java Scanner Interface): Move note on %pure-parser to Java Bison
2532 Interface. Describe %code lexer and yylex accutately.
2533 Remove documentation that does not match the code.
2534 (Java Action Features): New.
2535 (Java Differences): Add reference. Add item on semantic values.
2536 Add note about @{ ... @}. Clarify %% epilogue placement.
2537 (Java Declarations Summary): New.
2538
2539 Fix Java skeleton.
2540 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
2541 (b4_remove_comma): Quote test argument.
2542 (b4_identification): Remove "bison" field.
2543 * tests/java.at (Java parser class and package names): New test.
2544 (Java %parse-param and %lex-param): New test.
2545 (Java stype, position_class and location_class): New test.
2546
2547 2008-10-31 Di-an Jan <dianj@freeshell.org>
2548
2549 * data/lalr1.jave: Update copyright years.
2550 (YYParser): Correct name of "generated from" file in Javadoc:
2551 use b4_file_name instead of @ofile@.
2552 (Location constructor): Correct Javadoc parameter name.
2553 (yylloc): Add missing opening m4 quote after b4_location_if.
2554 This removes a stray [ in the Javadoc of Lexer.getStartPos.
2555 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
2556 (YYParser constructor): Correct Javadoc parameter name.
2557
2558 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
2559
2560 Always put auxiliary code files in the same dir as other output files.
2561 * src/files.c (compute_file_name_parts): When the user specifies
2562 --output but not --file-prefix, extract the directory prefix from the
2563 file prefix not from the grammar file name. This affects the location
2564 of files like location.hh generated by the C++ skeleton. The includes
2565 in the other output files require this fix.
2566 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
2567 for expected output files.
2568 (Output files): Add a test for the above.
2569
2570 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
2571
2572 * gnulib: Update submodule to HEAD.
2573
2574 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
2575
2576 Update copyright year.
2577 * src/files.c: Here.
2578
2579 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
2580
2581 Don't overwrite the input file.
2582 * src/files.c (output_file_name_check): Fatal error if using input file
2583 for output.
2584 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
2585 argument.
2586 (Conflicting output files): Add test.
2587
2588 2008-10-28 Akim Demaille <demaille@gostai.com>
2589
2590 Space changes.
2591 * data/lalr1.cc: Formatting changes.
2592
2593 2008-10-28 Akim Demaille <demaille@gostai.com>
2594
2595 Don't define debugging functions when !YYDEBUG.
2596 * data/lalr1.cc (debug_stream, set_debug_stream)
2597 (debug_level_type, debug_level, set_debug_level): Don't
2598 declare them when YYDEBUG is not defined.
2599 The implementation are already YYDEBUG-aware.
2600
2601 2008-10-28 Akim Demaille <demaille@gostai.com>
2602
2603 Prefer "continue" for empty loop bodies.
2604 * etc/bench.pl.in: Use "continue" instead of {}.
2605
2606 2008-10-28 Akim Demaille <demaille@gostai.com>
2607
2608 Space and comments changes.
2609 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
2610 * data/c.m4, data/lalr1.cc: Space changes.
2611
2612 2008-10-28 Akim Demaille <demaille@gostai.com>
2613
2614 Make gnulib a submodule.
2615 * gnulib: New.
2616 * .gitmodules (gnulib): New.
2617
2618 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
2619
2620 Fix yyerror_range for user-defined location type in C++. Reported by
2621 Georg Sauthoff at
2622 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
2623 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
2624 * THANKS (Georg Sauthoff): Add.
2625
2626 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
2627
2628 Update several administrative files mainly to facilitate releasing.
2629 * HACKING (Administrivia): Make the git-merge-changelog notes more
2630 helpful.
2631 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
2632 (Release Procedure): Update for git and add numerous details that were
2633 previously missing.
2634 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
2635 * maint.mk (announcement): Don't list bison as a bootstrap tool so
2636 that announcements don't claim we bootstrapped with whatever bison
2637 happened to be in PATH. Add flex as a bootstrap tool.
2638 * Makefile.maint: Remove, previously replaced by maint.mk.
2639 * Makefile.cfg: Remove, and migrate settings to...
2640 * cfg.mk: ... here for the sake of `make announcement'.
2641 * bootstrap.conf (gnulib_modules): Add announce-gen.
2642 * README: Say GNU Bison instead of just Bison. Suggested by Karl
2643 Berry.
2644
2645 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
2646
2647 Small but important bugfixes for the Java skeleton.
2648 * data/lalr1.java (yyerror): Change Location to b4_location_type.
2649 (yy_symbol_print): Call toString on yyvaluep.
2650
2651 2008-08-29 Akim Demaille <demaille@gostai.com>
2652
2653 Clarify UPDATED use.
2654 * doc/bison.texinfo: It refers to the last edition of this file,
2655 not to the release date of Bison.
2656 Reported by Joel E. Denny.
2657
2658 2008-08-29 Akim Demaille <demaille@gostai.com>
2659
2660 * README: Update FAQ pointer.
2661 Reported by Joel E. Denny.
2662
2663 2008-08-27 Eric Blake <ebb9@byu.net>
2664
2665 Resync m4sugar from autoconf.
2666 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
2667 (m4_init): Adjust to latest m4.git changes.
2668 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
2669 effects.
2670 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
2671 (_m4_list_cmp): Reduce side effects.
2672
2673 2008-08-27 Akim Demaille <demaille@gostai.com>
2674
2675 Check yyerrok in calc.at.
2676 * tests/calc.at (calc.y): Use yyerrok on "( error )".
2677 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
2678 expected.
2679
2680 2008-08-27 Akim Demaille <demaille@gostai.com>
2681
2682 Support yyerrok in lalr1.cc.
2683 YYBACKUP is still to import back into lalr1.cc.
2684 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
2685
2686 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
2687
2688 For maintainer-check*, don't recompile for a $(VERSION) update.
2689 * cfg.mk: New file.
2690 (_is-dist-target): Override the one in GNUmakefile.
2691 * Makefile.am (EXTRA_DIST): Add cfg.mk.
2692
2693 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
2694
2695 Update for recent change to gnulib.
2696 * src/parse-gram.y: Don't include strverscmp.h. It comes from
2697 string.h now.
2698
2699 2008-08-15 Eric Blake <ebb9@byu.net>
2700
2701 Remaining m4sugar merge from autoconf.
2702 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
2703 * data/m4sugar/foreach.m4: New file, copied from autoconf.
2704 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
2705 * src/output.c (output_skeleton): Tell m4 how to find it.
2706
2707 Partial m4sugar merge from autoconf: m4_map.
2708 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
2709 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
2710 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
2711 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
2712 for empty list.
2713 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
2714 Likewise.
2715 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
2716 declares it.
2717
2718 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
2719
2720 Keep .version and PACKAGE_VERSION in sync.
2721 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
2722 dependency, and add comments justifying this in more detail. Discussed
2723 starting at
2724 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
2725
2726 2008-08-06 Eric Blake <ebb9@byu.net>
2727
2728 Partial m4sugar merge from autoconf: m4_shiftn.
2729 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
2730 (m4_shift2, m4_shift3): New macros.
2731 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
2732 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
2733 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
2734 * data/java.m4 (b4_remove_comma): Likewise.
2735
2736 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
2737 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
2738 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
2739 (m4_init): Consolidate wrapped text into single m4_wrap.
2740 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
2741 in wrapped text.
2742
2743 2008-08-05 Eric Blake <ebb9@byu.net>
2744
2745 Partial m4sugar merge from autoconf: builtins, version.m4.
2746 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
2747 (m4_prepend): Remove, as it is unused and inherently quadratic,
2748 whereas m4_append is linear in newer m4.
2749 (m4_mkstemp): New builtin.
2750 (m4_symbols): Make rename conditional.
2751 (m4_version_prereq): Ensure fatal error if used in bison, which
2752 intentionally lacks version.m4.
2753
2754 Fix comments in m4sugar.
2755 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
2756
2757 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
2758
2759 Update for recent .gitignore fix in Gnulib.
2760 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
2761 anchored .gitignore entries.
2762
2763 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
2764
2765 Set gnu or gnits strictness.
2766 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
2767 development and gnits strictness for releases. Based on Eric Blake's
2768 suggestion at
2769 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
2770
2771 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
2772
2773 * NEWS: Clarify documentation of %language.
2774
2775 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
2776
2777 Support usage of git-merge-changelog.
2778 * .gitattributes: New.
2779 * HACKING: Document usage of git-merge-changelog.
2780 * bootstrap: Install git-merge-changelog entries in .git/config
2781 if appropriate.
2782
2783 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
2784
2785 Remove remaining dependence on CVS Id keyword.
2786 * ChangeLog: For the sake of people still using CVS, don't use dollars
2787 when mentioning Id.
2788 * data/xslt/bison.xsl: Remove Id from header comments, where it was
2789 unusual anyway.
2790 * data/xslt/xml2dot.xsl: Likewise.
2791 * data/xslt/xml2text.xsl: Likewise.
2792 * data/xslt/xml2xhtml.xsl: Likewise.
2793 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
2794 * doc/Makefile.am (neutralize): Remove, no longer needed.
2795 (.x.1): Don't use neutralize.
2796 (edit): Don't substitute for ID.
2797 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
2798
2799 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
2800
2801 Fix dependence on computed configure variables.
2802 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
2803 $(top_srcdir)/configure.ac so that changes to computed variables, such
2804 as PACKAGE_VERSION, are seen.
2805 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
2806
2807 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
2808
2809 Update copyright dates for recent changes.
2810 * Makefile.am: Here.
2811 * src/Makefile.am: Here.
2812 * src/reduce.c: Here.
2813 * tests/reduce.at: Here.
2814
2815 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
2816
2817 Use git-version-gen for version names between releases.
2818 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
2819 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
2820 * .prev-version: New.
2821 * .version.in: Remove.
2822 * ChangeLog: Remove the Id previously used for capturing the CVS
2823 revision.
2824 * GNUmakefile: Remove, now copied from Gnulib.
2825 * Makefile.am: Add code suggested by comments in
2826 build-aux/git-version-gen.
2827 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
2828 .prev-version, and .version.
2829 * NEWS (2.3b+): Rename to...
2830 (?.?): ... this because we're dropping the "+" version naming scheme,
2831 but, in general, we still can't be sure of our next release name.
2832 * bootstrap: Add a quick hack to remove from .gitignore the
2833 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
2834 entry. This should really be fixed in gnulib instead.
2835 * bootstrap.conf (gnulib_modules): Add gnumakefile.
2836 * configure.ac (AC_INIT): Set version name by invoking
2837 build-aux/git-version-gen.
2838 (AC_CONFIG_FILES): Remove .version, now generated by
2839 build-aux/git-version-gen.
2840 * maint.mk: New, copied from coreutils.
2841 * doc/.cvsignore (bison.1): Add.
2842 * doc/.gitignore (/bison.1): Add.
2843 * doc/bison.1: Remove, generated.
2844 * src/.cvsignore (revision.c): Remove.
2845 * src/.gitignore (/revision.c): Remove.
2846 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
2847 (BUILT_SOURCES): Remove revision.c.
2848 (revision.c): Remove.
2849 * src/getargs.c (version): Don't print revision after the VERSION.
2850 * src/revision.h: Remove.
2851
2852 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
2853
2854 Fix untranslatable composition of sentences. Reported by Goran
2855 Uddeborg at
2856 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
2857 * THANKS (Goran Uddeborg): Add.
2858 * src/reduce.c (reduce_print): Report the number of nonterminals and
2859 rules useless in the grammar in separate sentences.
2860 * tests/reduce.at (Useless Rules): Update output.
2861 (Reduced Automaton): Likewise.
2862 (Underivable Rules): Likewise.
2863 (Empty Language): Likewise.
2864
2865 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2866
2867 Fix some .gitignore and .cvsignore problems.
2868 * bootstrap (insert_sorted_if_absent): Replace all uses with...
2869 (insert_vc_ignore): ... this new function, which prepends `/' to all
2870 .gitignore entries before passing them to insert_sorted_if_absent.
2871 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
2872 .cvsignore files are maintained even though Bison developers run
2873 bootstrap while using Git.
2874 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
2875 unneeded by Bison.
2876 (gnulib): Add.
2877 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
2878 unneeded. Reported by Eric Blake.
2879 * lib/.gitignore (/*~): Add.
2880 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
2881 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
2882 Blake.
2883 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
2884
2885 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2886
2887 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
2888 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
2889 * bootstrap.conf (gnulib_modules): Add unsetenv.
2890 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
2891 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
2892 (/setenv.m4): Add.
2893 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
2894 the first argument because it may become position-dependent, and unset
2895 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
2896 Add comments explaining these issues in more detail.
2897
2898 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
2899
2900 Add .gitignore everywhere based on .cvsignore.
2901 * .gitignore: New.
2902 * build-aux/.gitignore: New.
2903 * data/.gitignore: New.
2904 * doc/.gitignore: New.
2905 * etc/.gitignore: New.
2906 * examples/.gitignore: New.
2907 * examples/calc++/.gitignore: New.
2908 * lib/.gitignore: New.
2909 * m4/.gitignore: New.
2910 * po/.gitignore: New.
2911 * runtime-po/.gitignore: New.
2912 * src/.gitignore: New.
2913 * tests/.gitignore: New.
2914
2915 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2916
2917 * NEWS (2.3b+): New section, empty for now.
2918 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
2919
2920 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2921
2922 * NEWS (2.3b): Update release date since there has been a delay in
2923 getting the announcements and tarballs out.
2924
2925 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
2926
2927 * NEWS: Version 2.3b.
2928 * configure.ac (AC_INIT): Likewise.
2929 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
2930
2931 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
2932
2933 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
2934 been doing it for years.
2935 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
2936 (Release Procedure): Add FIXME about make alpha being unmaintained.
2937
2938 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
2939
2940 * data/yacc.c: Reformat m4 a little for readability.
2941 * src/lalr.c (build_relations): Correct comment.
2942
2943 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2944
2945 DJGPP specific issue.
2946 * djgpp/config.sed: Fixes required to run configure scripts generated
2947 by autoconf 2.62.
2948
2949 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
2950
2951 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
2952 coordinator@translationproject.org.
2953
2954 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
2955
2956 * THANKS: Add Eric Blake.
2957
2958 2008-04-23 Eric Blake <ebb9@byu.net>
2959
2960 Revert prior patch, by working around autoconf regression.
2961 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
2962 ("Output file name: ("): Uncomment test.
2963 ("Output file name: )"): Likewise.
2964 Based on an idea from Noah Misch.
2965
2966 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2967
2968 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
2969 2.61. Reported by Juan Manuel Guerrero at
2970 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
2971 * tests/output.at ("Output file name: ("): Comment out test case for
2972 now.
2973 ("Output file name: )"): Likewise.
2974
2975 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2976
2977 * GNUmakefile: Update git-version-gen invocation so make dist
2978 succeeds.
2979
2980 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2981
2982 Update to the current gnulib CVS repository, and fix trigraph handling
2983 in Bison.
2984 * bootstrap: Update gnulib CVS repository URL.
2985 (symlink_to_dir): Encapsulate the code that guarantees the destination
2986 directory exists into...
2987 (check_dst_dir): ... this new function, and...
2988 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
2989 fail when copying files into lib/uniwidth/.
2990 * src/output.c (prepare_symbols): When writing yytname muscles, where
2991 symbol names will be encoded in C-string literals, tell quotearg to
2992 escape trigraphs. This used to be the default in gnulib.
2993 * tests/regression.at (Token definitions): Because of the change in
2994 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
2995 escapes trigraphs in symbol names. Thus, yytname no longer has
2996 trigraphs unnecessarily doubly escaped. Update test case output.
2997 Extend test case to be sure Bison's own error messages will no longer
2998 have trigraphs in symbol names unnecessarily escaped once.
2999
3000 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
3001
3002 Fix make dist infinite loop reported by Juan Manuel Guerrero at
3003 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
3004 * .cvsignore: Add .version.
3005 * .version.in: New.
3006 * bootstrap.conf (gnulib_modules): Add git-version-gen.
3007 * configure.ac (AC_CONFIG_FILES): Add .version.
3008 * build-aux/.cvsignore: Add git-version-gen.
3009
3010 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
3011
3012 * NEWS (2.3a+): Mention that -g now takes an argument.
3013 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
3014 consistency. Update the -g and -x entries now that they take
3015 arguments. Use brackets to indicate optional arguments.
3016 * src/getargs.c (usage): Explain the relationship between arguments of
3017 long and short options more completely. Document --defines and -d
3018 separately since the former takes an argument but, for POSIX Yacc, the
3019 latter does not.
3020 (short_options): Let -W take an optional argument like --warnings.
3021 (getargs): Sort cases.
3022
3023 2008-02-28 Akim Demaille <demaille@gostai.com>
3024
3025 * doc/bison.texinfo: Fix a few typos.
3026
3027 2008-02-28 Akim Demaille <akim@epita.fr>
3028
3029 * doc/bison.texinfo (Bison Options): Document -W.
3030 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
3031
3032 2008-02-28 Akim Demaille <akim@epita.fr>
3033
3034 * src/getargs.c (short_options): Split and sort for readability.
3035 -g and -x take optional arguments, just like their long options.
3036 * build-aux/cross-options.pl: Use /x to make the regexp easier to
3037 understand.
3038 Fix the handling of $opt which resulted in all the argument to be
3039 considered as optional.
3040
3041 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
3042
3043 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
3044 say its interface is experimental.
3045 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
3046 Java.
3047 (Bison Options): In the -L and --language entry, mention Java.
3048 (Java Bison Interface): Say the interface is experimental.
3049 * src/getargs.c (usage): Mention -L and --language.
3050
3051 * NEWS (2.3a+): Say the push parsing interface is experimental.
3052 * doc/bison.texinfo (Push Decl): Likewise.
3053 (Decl Summary): Likewise in the "%define api.push_pull" entry.
3054 (Push Parser Function): Likewise.
3055 (Pull Parser Function): Likewise.
3056 (Parser Create Function): Likewise.
3057 (Parser Delete Function): Likewise.
3058 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
3059 yypull_parse, and yypush_parse entries.
3060
3061 * NEWS (2.3a+): Mention XML support, and say the schema is
3062 experimental.
3063 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
3064 * src/getargs.c (usage): Say the XML schema is experimental.
3065
3066 * NEWS (2.3a+): Say option instead of flag.
3067
3068 2008-02-21 Wojciech Polak <polak@gnu.org>
3069
3070 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
3071 text.
3072
3073 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
3074
3075 Fix impure push parser compile error reported by Bob Rossi at
3076 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
3077 * data/yacc.c: Clean up whitespace in the output a little.
3078 (yypstate_allocated): Define for impure push parsers regardless of
3079 whether the pull interface is also requested.
3080 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
3081 check impure push parsers without the pull interface.
3082
3083 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
3084 yyerror takes arguments specified by %parse-param while yypstate_new
3085 does not.
3086 * doc/bison.texinfo (Parser Create Function): Document that
3087 yypstate_new returns 0 for multiple impure parser instances.
3088 * tests/push.at (Push Parsing: Multiple impure instances): Update
3089 expected stderr output.
3090
3091 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
3092
3093 * runtime-po/POTFILES.in (push.c): Remove.
3094
3095 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3096
3097 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
3098 * data/push.c: Rename to...
3099 * data/yacc.c: ... this, overwriting it.
3100 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
3101 `%push-pull-parser' -> `%define api.push_pull "both"'.
3102 Remove old yacc.c tests, and update push.c tests to yacc.c.
3103
3104 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3105
3106 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
3107 `"%code top" blocks' instead of `%code "top" blocks'.
3108 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
3109 Clean up whitespace in the output a little.
3110
3111 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3112
3113 Fix documentation problems reported by Tim Josling at
3114 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
3115 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
3116 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
3117 integers. Explain the effect of literal string aliases on error
3118 messages. Copy token 0 documentation from the C++ skeleton
3119 documentation.
3120
3121 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3122
3123 Accept a token number in a %left, %right, or %nonassoc for POSIX
3124 conformance. Reported by Tim Josling at
3125 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
3126 * NEWS (2.3a+): Mention.
3127 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
3128 and code numbers are treated by precedence declarations.
3129 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
3130 of symbols.1.
3131 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
3132 of symbol.
3133 (symbol.prec): New, just like symbol but allows INT.
3134 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
3135 longer holds.
3136 * tests/regression.at (Token number in precedence declaration): New
3137 test case.
3138
3139 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3140
3141 DJGPP specific issues.
3142 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
3143 be changed. Copyright timestamp adjusted.
3144 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
3145 be changed. Copyright timestamp adjusted.
3146 * djgpp/config.site: Copyright timestamp adjusted.
3147 * djgpp/config_h.sed: Copyright timestamp adjusted.
3148 * djgpp/djunpack.bat: Copyright timestamp adjusted.
3149 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
3150 filename translation list.
3151 * djgpp/subpipe.c (init_subpipe): Check the environment variables
3152 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
3153 files shall be created. Before trying to use the temp dir where the
3154 environment variable points to check that the dir really exists. If
3155 not default to the cwd as temp dir. Copyright timestamp adjusted.
3156 * djgpp/subpipe.h: Copyright timestamp adjusted.
3157 * djgpp/testsuite.sed: Copyright timestamp adjusted.
3158
3159 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
3160
3161 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
3162
3163 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
3164
3165 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
3166 Problem reported by Claudio Saavedra in
3167 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
3168
3169 2008-01-05 Wojciech Polak <polak@gnu.org>
3170
3171 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
3172 document's title with the input grammar file name.
3173
3174 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
3175
3176 Automate regression testing of the XML/XSLT implementation. Discussed
3177 starting at
3178 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
3179 * configure.ac (XSLTPROC): New substitution.
3180 * Makefile.am (maintainer-xml-check): New phony target invoking...
3181 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
3182 invoking make maintainer-check with BISON_TEST_XML=1.
3183 * tests/atlocal.in (XSLTPROC): New.
3184 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
3185 not to report reachable memory when Bison is expected to have a
3186 non-zero exit status and (2) to compare XML/XSLT output with --graph
3187 and --report=all output for every working grammar when
3188 BISON_TEST_XML=1.
3189 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
3190 (AT_BISON_CHECK_XML): New.
3191 (AT_QUELL_VALGRIND): New.
3192 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
3193 (AT_CHECK): ... don't redefine this since this was the old way to
3194 quell Valgrind.
3195 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
3196 AT_BISON_CHECK invocations.
3197 * tests/c++.at: Likewise.
3198 * tests/calc.at: Likewise.
3199 * tests/conflicts.at: Likewise.
3200 * tests/cxx-type.at: Likewise.
3201 * tests/existing.at: Likewise.
3202 * tests/glr-regression.at: Likewise.
3203 * tests/headers.at: Likewise.
3204 * tests/input.at: Likewise.
3205 * tests/java.at: Likewise.
3206 * tests/output.at: Likewise.
3207 * tests/push.at: Likewise.
3208 * tests/reduce.at: Likewise.
3209 * tests/regression.at: Likewise.
3210 * tests/sets.at: Likewise.
3211 * tests/skeletons.at: Likewise.
3212 * tests/synclines.at: Likewise.
3213 * tests/torture.at: Likewise.
3214 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
3215 tends to hang xsltproc.
3216 (Big horizontal): Likewise.
3217
3218 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3219
3220 In XML output, remove redundant class attribute on symbol element.
3221 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
3222 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
3223 look up a symbol to determine whether it's a nonterminal or terminal.
3224 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
3225 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
3226
3227 Add prec/assoc information to XML output.
3228 * src/gram.c (grammar_rules_print_xml): For each rule that has a
3229 %prec, add a percent_prec attribute.
3230 * src/print-xml.c (print_grammar): For each terminal that has a
3231 precedence or associativity, add a prec or assoc attribute.
3232 (xml_indent): New.
3233 (xml_puts): Use xml_indent.
3234 (xml_printf): Use xml_indent.
3235 * src/print-xml.h (xml_indent): Prototype.
3236
3237 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
3238 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
3239
3240 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3241
3242 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
3243 (bison:ruleByNumber): ... this for clarity.
3244 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
3245 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
3246 (xsl:template match="reduction"): Update.
3247 (xsl:template match="item"): Update.
3248 (xsl:template match="reduction"): Update.
3249
3250 In the XML output, don't print the list of rules where symbols appear.
3251 Compute it in XSLT instead. Discussed at
3252 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
3253 * data/xslt/bison.xsl (bison:ruleByLhs): New.
3254 (bison:ruleByRhs): New.
3255 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
3256 bison:ruleByRhs.
3257 (xsl:template match="terminal/rule"): Remove.
3258 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3259 bison:ruleByRhs.
3260 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3261 Remove.
3262 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
3263 bison:ruleByRhs and mode="number-link" for rule template.
3264 (xsl:template match="terminal/rule"): Remove.
3265 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3266 bison:ruleByRhs and mode="number-link" for rule template.
3267 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3268 Rewrite as...
3269 (xsl:template match="rule" mode="number-link"): ... this.
3270 * src/print-xml.c (print_grammar): Don't print the list of rules.
3271
3272 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
3273
3274 Don't let --report affect XML output; always print all information.
3275 Discussed at
3276 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
3277 * src/conflicts.c (log_resolution): Implement.
3278 * src/print-xml.c (print_core): Implement.
3279 (print_state): Implement.
3280 (print_xml): Implement.
3281
3282 * NEWS (2.3a+): Fix quotes.
3283 * src/parse-gram.y (prologue_declaration): For consistency with -v,
3284 don't let %verbose clear the list specified by --report.
3285
3286 2007-11-26 Akim Demaille <akim@epita.fr>
3287
3288 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
3289
3290 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
3291
3292 In the XML output, list useless and unused symbols and rules with the
3293 useful ones and add a "usefulness" attribute. Discussed starting at
3294 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
3295 * src/gram.c (grammar_rules_partial_print_xml): Remove.
3296 (grammar_rules_print_xml): Print all rules instead of just those
3297 useful in the grammar, and add a "usefulness" attribute.
3298 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
3299 * src/print-xml.c (print_rules_useless_in_parser): Remove.
3300 (print_grammar): Print all nonterminals instead of just useful ones,
3301 and add a "usefulness" attribute to nonterminals and terminals.
3302 (print_xml): Don't print a separate "reductions" or
3303 "rules-useless-in-parser" element.
3304 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
3305 (reduce_xml): Remove.
3306 (reduce_token_unused_in_grammar): New.
3307 (reduce_nonterminal_useless_in_grammar): New.
3308 * src/reduce.h (reduce_xml): Remove prototype.
3309 (reduce_token_unused_in_grammar): Add prototype.
3310 (reduce_nonterminal_useless_in_grammar): Add prototype.
3311 * data/xslt/xml2text.xsl: Update for XML changes.
3312 * data/xslt/xml2xhtml.xsl: Update for XML changes.
3313 * tests/reduce.at (Useless Terminals): Update output.
3314 (Useless Rules): Update output.
3315 (Reduced Automaton): Update output.
3316
3317 Say "Terminals unused in grammar" instead of "Unused terminals".
3318 * NEWS (2.3a+): Update.
3319 * doc/bison.texinfo (Understanding): Update example output.
3320 * src/reduce.c (reduce_output): Implement.
3321 * data/xslt/xml2text.xsl: Implement.
3322 * data/xslt/xml2xhtml.xsl: Implement.
3323
3324 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
3325
3326 Accept --report-file=FILE to override the default `.output' filename.
3327 * NEWS (2.3a+): Mention.
3328 * doc/bison.texinfo (Bison Options): Add an entry.
3329 * src/files.c (compute_output_file_names): Don't override
3330 spec_verbose_file if already set.
3331 * src/getargs.c (usage): Document --report-file.
3332 (REPORT_FILE_OPTION): New anonymous enum member.
3333 (long_options): Add entry for it.
3334 (getargs): Add case for it setting spec_verbose_file.
3335
3336 * build-aux/cross-options.pl: Don't record a short option just because
3337 there's an arg.
3338 * doc/.cvsignore: Add yacc.1.
3339
3340 2007-11-14 Akim Demaille <akim@epita.fr>
3341
3342 * doc/yacc.1.in: New.
3343 * configure.ac, doc/Makefile.am: Adjust.
3344 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
3345 config.h symbol.
3346 Use AC_SUBST for assignments too.
3347 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
3348
3349 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
3350
3351 * src/gram.c: Remove comments that duplicate comments in gram.h.
3352
3353 When reporting useless rules and nonterminals, say "useless in grammar"
3354 instead of "useless", and say "useless in parser" instead of "never
3355 reduced". Discussed starting at
3356 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
3357 * NEWS (2.3a+): Mention this change.
3358 * data/xslt/xml2text.xsl: Update output text and expected input XML
3359 element names to match changes below.
3360 * data/xslt/xml2xhtml.xsl: Likewise.
3361 (xsl:template match="bison-xml-report"): Add missing entry in Table of
3362 Contents: "Rules useless in parser due to conflicts".
3363 * doc/bison.texinfo (Decl Summary): Reword a little.
3364 (Understanding): Update example output for changes below.
3365 * src/gram.c: (rule_useful_p): Rename to...
3366 (rule_useful_in_grammar_p): ... this.
3367 (rule_useless_p): Rename to...
3368 (rule_useless_in_grammar_p): ... this.
3369 (rule_never_reduced_p): Rename to...
3370 (rule_useless_in_parser_p): ... this.
3371 (grammar_rules_print): Update for renames.
3372 (grammar_rules_print_xml): Update for renames.
3373 (grammar_rules_never_reduced_report): Rename to...
3374 (grammar_rules_useless_report): ... this since it is used for either
3375 kind of useless rule.
3376 * src/gram.h: Reword comments and update function names in prototypes.
3377 * src/main.c (main): Say "rule useless in parser due to conflicts".
3378 * src/print-xml.c (print_rules_never_reduced): Rename to...
3379 (print_rules_useless_in_parser): ... this, and rename output XML
3380 element "rules-never-reduced" to "rules-useless-in-parser".
3381 (print_xml): Update for rename.
3382 * src/print.c (print_results): Say "Rules useless in parser due to
3383 conflicts".
3384 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
3385 (nonterminals_reduce): Say "nonterminal useless in grammar".
3386 (reduce_output): Say "Nonterminals useless in grammar".
3387 Say "Rules useless in grammar".
3388 (reduce_xml): Rename output XML element "useless" to
3389 "useless-in-grammar".
3390 (reduce_print): Don't report the count of grammatically useless rules
3391 as "rules never reduced" just because %yacc is specified.
3392 In the correct report of this count, say nonterminal(s) and rule(s)
3393 "useless in grammar".
3394 * tests/conflicts.at (S/R in initial): Update expected output.
3395 (Defaulted Conflicted Reduction): Likewise.
3396 (Unreachable States After Conflict Resolution): Likewise.
3397 * tests/existing.at (GNU pic Grammar): Likewise.
3398 * tests/reduce.at (Useless Nonterminals): Likewise.
3399 (Useless Rules): Likewise.
3400 (Reduced Automaton): Likewise.
3401 (Underivable Rules): Likewise.
3402 (Empty Language): Likewise.
3403
3404 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
3405
3406 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
3407 here document and before the EOF so that BSD's implementation of Bourne
3408 shell doesn't parse the delimiter as part of the here document.
3409 * doc/.cvsignore: Add cross-options.texi.
3410 * src/getargs.c (usage): Add a blank line after the warning categories.
3411
3412 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
3413
3414 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
3415
3416 2007-11-05 Akim Demaille <akim@epita.fr>
3417
3418 Remove Id: from bison.1.
3419 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
3420 (perl -0777 -pi -e 's/\.PP\nId): New.
3421 (.x.1): Use it to ignore the version control revision.
3422
3423 2007-11-05 Akim Demaille <demaille@gostai.com>
3424
3425 * build-aux/Makefile.am: Ship cross-options.pl.
3426 * doc/Makefile.am: Always refer to cross-options.texi with
3427 $(srcdir).
3428 (MAINTAINERCLEANFILES): Add it.
3429
3430 2007-11-04 Akim Demaille <demaille@gostai.com>
3431
3432 Generate the long/short option cross-table.
3433 * build-aux/cross-options.pl: New.
3434 * doc/Makefile.am (cross-options.texi): New.
3435 * doc/bison.texinfo: Use it.
3436
3437 2007-11-04 Akim Demaille <demaille@gostai.com>
3438
3439 Generate bison.1 using help2man.
3440 * doc/common.x, doc/bison.x: New.
3441 * doc/Makefile.am (bison.1, .x.1): New.
3442 The code is taken from autoconf-2.61/man/Makefile.am.
3443 * configure.ac: Look for help2man.
3444
3445 2007-11-04 Akim Demaille <demaille@gostai.com>
3446
3447 Complete --help.
3448 * src/getargs.c (usage): Document -W, make it clear that -d,
3449 -g and -x have optional arguments.
3450
3451 2007-11-04 Akim Demaille <demaille@gostai.com>
3452
3453 Find sha1sum when named gsha1sum.
3454 * bootstrap (find_tool): New.
3455 ($SHA1SUM): New.
3456
3457 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3458
3459 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
3460 at
3461 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
3462 * NEWS (2.3a+): Mention.
3463 * data/bison.m4 (b4_pure_if): Don't define it here.
3464 * data/c.m4 (b4_identification): Depend on individual skeletons to
3465 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
3466 values of the %define variables api.pure or api.push_pull. Define
3467 YYPURE, YYPUSH, and YYPULL accordingly.
3468 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
3469 glr.cc has already defined b4_pure_flag.
3470 * data/push.c: Define b4_pure_if based on `%define api.pure'.
3471 Remove YYPUSH and YYPULL since they're back in b4_identification again.
3472 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
3473 * doc/bison.texinfo (Pure Decl): Update.
3474 (Push Decl): Update.
3475 (Decl Summary): Add api.pure to %define entry.
3476 In %pure-parser entry, say it's deprecated and reference %define.
3477 (Pure Calling): Update.
3478 (Error Reporting): Update.
3479 (C++ Scanner Interface): Update.
3480 (How Can I Reset the Parser): Update.
3481 (Table of Symbols): In %pure-parser entry, say it's deprecated and
3482 reference %define.
3483 * src/getargs.c (pure_parser): Remove global variable.
3484 * src/getargs.h (pure_parser): Remove extern.
3485 * src/output.c (prepare): Don't define pure_flag muscle.
3486 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
3487 wrapper around `%define api.pure'.
3488 * tests/calc.at (Simple LALR Calculator): Update.
3489 (Simple GLR Calculator): Update.
3490 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
3491 Update.
3492 (GLR: Resolve ambiguity, pure, locations): Update.
3493 (GLR: Merge conflicting parses, pure, no locations): Update.
3494 (GLR: Merge conflicting parses, pure, locations): Update.
3495 * tests/glr-regression.at (Uninitialized location when reporting
3496 ambiguity): Update
3497 * tests/input.at (Unused %define api.pure): New test case.
3498 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
3499 AT_PURE_IF and AT_PURE_AND_LOC_IF.
3500 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
3501
3502 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3503
3504 %define push_pull -> %define api.push_pull. Discussed starting at
3505 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
3506 * data/push.c: Expect the new name.
3507 * data/yacc.c: Likewise.
3508 * doc/bison.texinfo (Push Decl): Update.
3509 (Decl Summary): Update %define entry.
3510 (Push Parser Function): Update.
3511 (Pull Parser Function): Update.
3512 (Parser Create Function): Update.
3513 (Parser Delete Function): Update.
3514 * tests/calc.at (Simple LALR Calculator): Update.
3515 * tests/input.at (%define enum variables): Update.
3516 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
3517 (Push Parsing: Multiple impure instances): Update.
3518 (Push Parsing: Unsupported Skeletons): Update.
3519 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
3520 (Exploding the Stack Size with Malloc): Update.
3521
3522 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
3523 other entries some.
3524
3525 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
3526
3527 For the XML output's terminal element, rename @number to @token-number,
3528 and add @symbol-number. In the nonterminal element, rename @number to
3529 @symbol-number. Discussed starting at
3530 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
3531 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
3532 renames.
3533 (xsl:template match="nonterminal"): Likewise.
3534 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
3535 (xsl:template match="nonterminal"): Likewise.
3536 * src/print-xml.c (print_grammar): Implement.
3537
3538 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
3539
3540 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
3541 2007-10-11 change, the child elements here are items not rules.
3542 (xsl:template match="item"): New.
3543 (xsl:template match="rule"): Update for new reduced itemset.
3544 (xsl:template match="point"): Remove.
3545 (xsl:template match="empty"): For consistency with --graph, don't
3546 output "/* empty */".
3547 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
3548 line-wrap, don't pass a negative value as first-line-length since this
3549 won't work with the following changes.
3550 (xsl:template name="line-wrap"): Simplify slightly.
3551 (xsl:template name="ws-search"): Eliminate recursion.
3552 * src/print_graph.c (print_core): Don't print a reduction's lookahead
3553 set next to an item whose dot is not at the end of the RHS even if it
3554 happens to be associated with the same rule.
3555
3556 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
3557
3558 Add %define lr.keep_unreachable_states.
3559 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
3560 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
3561 * src/main.c (main): Implement it.
3562 * tests/conflicts.at (Unreachable States After Conflict Resolution):
3563 Extend to test it, and fix a typo.
3564
3565 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
3566
3567 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
3568 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
3569 the example .output text.
3570 * tests/regression.at (Extra lookahead sets in report): Improve wording
3571 of comments.
3572
3573 2007-10-17 Wojciech Polak <polak@gnu.org>
3574
3575 * src/print-xml.c (print_grammar): Renamed
3576 <terminal> and <nonterminal> attributes:
3577 "type" to "number" and "symbol" to "name".
3578 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
3579 Use new attribute names.
3580 (xsl:template match="nonterminal"): Likewise.
3581 * data/xslt/xml2xhtml.xsl: Likewise.
3582
3583 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
3584
3585 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
3586 (Option Cross Key): Likewise.
3587
3588 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
3589 next to an item whose dot is not at the end of the RHS even if it
3590 happens to be associated with the same rule.
3591 * src/print.c (print_core): Likewise.
3592 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
3593 (Resolved SR Conflicts): Update output.
3594 * tests/regression.at (Extra lookahead sets in report): New test case.
3595
3596 2007-10-11 Wojciech Polak <polak@gnu.org>
3597
3598 * src/print-xml.c (print_core): Remove item set
3599 redundancy.
3600 * data/xslt/bison.xsl (bison:ruleNumber): New key.
3601 Improve processing time. Suggested by Joel E. Denny.
3602 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
3603 Write xsl:param "required" attribute as comment.
3604 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
3605 (xsl:template match="rule"): Support new reduced itemset.
3606 (xsl:template match="point"): Remove.
3607 * data/xslt/xml2xhtml.xsl: Likewise.
3608
3609 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
3610
3611 * src/getargs.c (version): Update copyright year.
3612
3613 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
3614
3615 Make xml2dot.xsl and --graph produce the same output.
3616 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
3617 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
3618 escaped later.
3619 (xsl:template name="output-node"): Use the new escape template instead
3620 of the string-replace template directly.
3621 (xsl:template name="output-edge"): Likewise.
3622 (xsl:template name="escape"): New, escapes backslashes and newlines in
3623 addition to quotation marks.
3624 * src/graphviz.c (start_graph, output_node, output_edge): Add
3625 whitespace to output for legibility.
3626
3627 Make xml2text.xsl and --report produce the same output, and remove the
3628 XML "conflicts" element since a conflict summary is easily extracted
3629 from the automaton.
3630 * data/xslt/bison.xsl: New.
3631 (xsl:template match="state" mode="bison:count-conflicts): New.
3632 * data/xslt/xml2text.xsl: Import bison.xsl.
3633 (xsl:template match="bison-xml-report"): Instead of styling the
3634 "conflicts" element, style the "automaton" element with mode
3635 "conflicts". Unlike the former, the latter lists S/R and R/R
3636 conflicts for a state on the same line.
3637 (xsl:template match="conflicts"): Remove.
3638 (xsl:template match="conflict"): Remove.
3639 (xsl:template match="terminal"): Line-wrap the list of rules in which
3640 the terminal is used.
3641 (xsl:template match="nonterminal"): Likewise for nonterminals.
3642 (xsl:template match="automaton" mode="conflicts"): New.
3643 (xsl:template match="state" mode="conflicts"): New.
3644 (xsl:template name="line-wrap"): New.
3645 (xsl:template name="ws-search"): New.
3646 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
3647 (xsl:template match="bison-xml-report"): Instead of styling the
3648 "conflicts" element, style the "automaton" element with mode
3649 "conflicts."
3650 (xsl:template match="conflicts"): Remove.
3651 (xsl:template match="conflict"): Remove.
3652 (xsl:template match="automaton" mode="conflicts"): New.
3653 (xsl:template match="state" mode="conflicts): New.
3654 * src/conflicts.c (conflicts_output_xml): Remove.
3655 * src/conflicts.h (conflicts_output_xml): Remove prototype.
3656 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
3657 * src/print.c (print_grammar): Consistently wrap at the 66th column so
3658 the corresponding XSLT is easier. Also, never wrap between a word and
3659 the comma that follows it.
3660
3661 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
3662
3663 Improve C++ namespace support. Discussed starting at
3664 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
3665 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
3666 b4_namespace_close): New macros that interpret the %define variable
3667 "namespace" so its value can contain "::" to indicate nested
3668 namespaces.
3669 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
3670 the above macros.
3671 * data/lalr1.cc (b4_namespace): Likewise.
3672 * data/location.cc (b4_namespace): Likewise.
3673 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
3674 inside a new table in the general %define entry. Document `%define
3675 namespace' there as well. Point the %name-prefix entry to it since it
3676 explains it more completely in the case of C++.
3677 (C++ Bison Interface): Mention `%define namespace' instead of
3678 %name-prefix.
3679 (Table of Symbols): Remove the `%define push_pull' entry. The %define
3680 entry suffices.
3681 * tests/c++.at (Relative namespace references): New test case.
3682 (Absolute namespace references): New test case.
3683 (Syntactically invalid namespace references): New test case.
3684 * tests/input.at (C++ namespace reference errors): New test case.
3685
3686 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
3687
3688 Add syncline support and location accessor to internal %define
3689 interfaces.
3690 * data/bison.m4 (b4_percent_define_get_loc): New.
3691 (b4_percent_define_get_syncline): New.
3692 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
3693 (b4_percent_define_default): Record defining location as line 1 rather
3694 than 0 for the sake of synchronizing #line's, and define
3695 b4_percent_define_syncline(VARIABLE).
3696 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
3697 * src/muscle_tab.c (muscle_syncline_grow): New.
3698 (muscle_code_grow): Use muscle_syncline_grow.
3699 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
3700 define b4_percent_define_syncline(VARIABLE).
3701 (muscle_percent_define_get_loc): New.
3702 (muscle_percent_define_get_syncline): New.
3703 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
3704 remove some unused variables.
3705 (muscle_percent_define_default): Record defining location as line 1
3706 rather than 0 for the sake of synchronizing #line's, and define
3707 b4_percent_define_syncline(VARIABLE).
3708 (muscle_percent_define_check_values): Use
3709 muscle_percent_define_get_loc.
3710 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
3711 (muscle_percent_define_get_syncline): Prototype.
3712 * tests/skeletons.at (%define Boolean variables: invalid skeleton
3713 defaults): Update output for location change.
3714 (Complaining during macro argument expansion): Extend to test
3715 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
3716
3717 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
3718
3719 Fix some error-reporting macro bugs.
3720 * data/bison.m4 (b4_cat): New.
3721 (b4_error, b4_error_at): Use b4_cat to send error directives directly
3722 to stdout so they don't become arguments to other macros. Update
3723 comments and add examples.
3724 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
3725 add examples.
3726 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
3727 after printing the error directive so that M4 doesn't report subsequent
3728 problems that are induced by this problem.
3729 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
3730 instead of just in them. Recognize @\n in both places. Both expand to
3731 the empty string. Needed by b4_cat.
3732 * tests/skeletons.at (Complaining during macro argument expansion):
3733 New test case.
3734 (Fatal errors make M4 exit immediately): New test case.
3735
3736 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
3737
3738 Implement --print-datadir.
3739 * src/getargs.c (usage): Mention.
3740 (PRINT_DATADIR_OPTION): New anonymous enum member.
3741 (long_options): Add entry for it.
3742 (getargs): Add case for it calling compute_pkgdatadir.
3743 * src/output.c (output_skeleton): Encapsulate data directory
3744 computation from here...
3745 (prepare): ... and from here...
3746 (compute_pkgdatadir): ... into this new function.
3747 * src/output.h (compute_pkgdatadir): Prototype.
3748
3749 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
3750
3751 * src/print-xml.c (escape_bufs): New static global variable
3752 replacing...
3753 (xml_escape_n): ... the static local variable buf here.
3754 (print_xml): Free memory for escape_bufs.
3755 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
3756
3757 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
3758
3759 Replace `%push-parser' and `%push-pull-parser' with
3760 `%define push_pull "push"' and `%define push_pull "both"'.
3761 `%define push_pull "pull"' is the default.
3762 * doc/bison.texinfo (Push Decl, Push Parser Function,
3763 Pull Parser Function, Parser Create Function, Parser Delete Function):
3764 Update declarations.
3765 (Decl Summary, Table of Symbols): Replace %push-parser and
3766 %push-pull-parser entries with a %define push_pull entry.
3767 * data/bison.m4 (b4_percent_define_check_values): New macro.
3768 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
3769 definitions...
3770 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
3771 definitions...
3772 * data/push.c: ... to here and compute them from the value of the
3773 %define variable push_pull.
3774 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
3775 parsing requests here...
3776 * data/yacc.c: ... hack this to switch to push.c any time
3777 b4_use_push_pull_flag or the %define variable push_pull is set. This
3778 will go away when we mv push.c yacc.c.
3779 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
3780 push parsing is not supported since unused %define variables are
3781 reported anyway.
3782 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
3783 * src/muscle_tab.h (muscle_percent_define_check_values): Update
3784 comments for consistency with b4_percent_define_check_values.
3785 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
3786 muscles.
3787 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
3788 Remove.
3789 (prologue_declaration): Remove %push-parser and %push-pull-parser
3790 rules.
3791 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
3792 * tests/calc.at: Update declarations.
3793 * tests/input.at (%define enum variables): New test case.
3794 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
3795 declaration.
3796 (Push Parsing: Multiple impure instances): Update declaration.
3797 (Push Parsing: Unsupported Skeletons): New test case.
3798 * tests/torture.at (Exploding the Stack Size with Alloca): Update
3799 declaration.
3800 (Exploding the Stack Size with Malloc): Update declaration.
3801
3802 2007-09-24 Wojciech Polak <polak@gnu.org>
3803
3804 Add XSLT transformations.
3805
3806 * data/xslt/xml2dot.xsl: Transform XML into DOT.
3807 * data/xslt/xml2text.xsl: Transform XML into plain text.
3808 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
3809 * data/Makefile.am (xsltdir): New variable.
3810 (dist_xslt_DATA): Add xslt/*.xsl files.
3811
3812 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
3813
3814 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
3815 Problem reported by Wojciech Polak.
3816 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
3817 (xml_printf): Undo change I made on 21 September; that is,
3818 indent 2 spaces, not 1.
3819
3820 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
3821
3822 Pacify ./configure --enable-gcc-warnings.
3823 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
3824 `char const *' instead of `char *'.
3825 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
3826 local variable `sep'.
3827
3828 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
3829
3830 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
3831 elsewhere.
3832 * src/print-xml.c: Prefer "const" after types; that's more consistent.
3833 (xml_printf): Indent just 1 space for level.
3834 (e_char, xlate_char): Remove.
3835 (xml_escape_string): Rewrite to avoid undefined behavior (used
3836 storage that was freed from the stack).
3837 (xml_escape_n): Don't bother checking for subscript error.
3838
3839 2007-09-21 Wojciech Polak <polak@gnu.org>
3840
3841 Add Bison XML Automaton Report.
3842
3843 Add support for an -x option to generate an XML report.
3844 It is not documented yet.
3845 * src/print-xml.c: New file.
3846 * src/print-xml.h: Likewise.
3847 * lib/timevar.def (TV_XML): New var.
3848 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
3849 * src/conflicts.c: Include print-xml.h.
3850 (solved_conflicts_xml_obstack): New var.
3851 (log_resolution, conflicts_solve, conflicts_free):
3852 Add support for XML report.
3853 (conflicts_output_val): New function.
3854 * src/conflicts.h (conflicts_output_val): New decl.
3855 * src/files.c (spec_xml_file): New var.
3856 (compute_output_file_names, output_file_names_free): Add XML support.
3857 * src/files.h (spec_xml_file): New decl.
3858 * src/getargs.c (xml_flag): New var.
3859 (usage, short_options, long_options, getargs): Add XML support.
3860 * src/getargs.h (xml_flag): New decl.
3861 * src/gram.c: Include print-xml.h.
3862 (rule_lhs_print_xml, rule_rhs_print_xml):
3863 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
3864 New functions.
3865 * src/gram.h: Declare external ones.
3866 * src/main.c: Include print-xml.h.
3867 (main): Add XML support.
3868 * src/reduce.c: Include print-xml.h.
3869 (reduce_xml): New function.
3870 * src/reduce.h: Declare it.
3871 * src/state.c: Include print-xml.h.
3872 (state_new): Add XML support.
3873 (state_rule_lookahead_tokens_print_xml): New function.
3874 * src/state.h: Declare it.
3875 (struct state): New member solved_conflicts_xml.
3876 * src/symtab.c (symbol_class_get_string): New function.
3877 * src/symtab.h: Declare it.
3878
3879 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
3880
3881 * GNUmakefile: Switch to coreutils's version.
3882 * bootstrap: Likewise.
3883 * Makefile.cfg: Adjust to new GNUmakefile.
3884 * README-hacking: Likewise.
3885
3886 Import from gnulib:
3887
3888 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
3889 Bruno Haible <bruno@clisp.org>
3890
3891 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
3892 and is a script that invokes bison. Tighten the code. Add comments.
3893
3894 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
3895
3896 Spell "boolean" as "Boolean". Reported by Akim Demaille.
3897 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
3898 * doc/bison.texinfo (Decl Summary): Fix.
3899 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
3900 * tests/input.at (Boolean %define variables): Update output.
3901 * tests/skeletons.at (%define boolean variables: invalid skeleton
3902 defaults): Rename to...
3903 (%define Boolean variables: invalid skeleton defaults): ... this and
3904 update output.
3905
3906 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
3907
3908 In impure push mode, don't allow more than one yypstate to be allocated
3909 since multiple impure parsers would corrupt yynerrs.
3910 * data/push.c (yypstate_allocated): New static global variable
3911 initialized to 0.
3912 (yypull_parse): If yypstate_new returns 0, don't report it as memory
3913 exhaustion if yypstate_allocated is 1, but still return 2.
3914 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
3915 already 1. Otherwise, set it to 1.
3916 (yypstate_delete): Set it to 0.
3917 * tests/push.at (Push Parsing: Multiple impure instances): New test
3918 case.
3919
3920 2007-08-17 Bob Rossi <bob@brasko.net>
3921
3922 * doc/bison.texinfo (Push Decl): Document the push parser.
3923 (Table of Symbols): Ditto.
3924 (Pure Decl): Ditto.
3925 (Decl Summary): Ditto.
3926 (Multiple Parsers, Push Parser Function, Pull Parser Function,
3927 Parser Create Function, Parser Delete Function):
3928 Add new push parser symbols.
3929 (Table of Symbols): Document push-parser, push-pull-parser,
3930 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
3931
3932 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
3933
3934 Update to GPLv3.
3935 * doc/gpl-3.0.texi: New file.
3936 * doc/gpl.texi: Remove.
3937 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
3938 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
3939 * README-hacking, TODO, bootstrap, bootstrap.conf:
3940 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
3941 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
3942 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
3943 * data/lalr1.cc, data/lalr1.java, data/location.cc:
3944 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
3945 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
3946 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
3947 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
3948 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
3949 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
3950 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
3951 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
3952 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
3953 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
3954 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
3955 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
3956 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
3957 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
3958 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
3959 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
3960 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
3961 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
3962 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
3963 * src/complain.c, src/complain.h, src/conflicts.c:
3964 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
3965 * src/files.h, src/flex-scanner.h, src/getargs.c:
3966 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
3967 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
3968 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
3969 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
3970 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
3971 * src/print.c, src/print.h, src/print_graph.c:
3972 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
3973 * src/reduce.h, src/relation.c, src/relation.h:
3974 * src/revision.h, src/scan-code.h, src/scan-code.l:
3975 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
3976 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
3977 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
3978 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
3979 * tests/Makefile.am, tests/actions.at, tests/c++.at:
3980 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
3981 * tests/existing.at, tests/glr-regression.at:
3982 * tests/headers.at, tests/input.at, tests/java.at:
3983 * tests/local.at, tests/output.at, tests/push.at:
3984 * tests/reduce.at, tests/regression.at, tests/sets.at:
3985 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
3986 * tests/torture.at:
3987 Update to GPLv3.
3988
3989 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
3990
3991 Get rid of broken %no-parser, -n, and --no-parser implementation and
3992 documentation.
3993 * TODO: Don't mention them.
3994 * doc/bison.1: Likewise.
3995 * doc/bison.texinfo (Decl Summary): Likewise.
3996 (Bison Options): Likewise.
3997 (Option Cross Key): Likewise.
3998 * src/getargs.c (no_parser_flag): Remove global variable.
3999 (usage): Don't print description of -n and --no-parser.
4000 (long_options): Remove --no-parser entry here.
4001 (getargs): Remove -n case in the switch here.
4002 * src/getargs.h (no_parser_flag): Remove extern.
4003 * tests/regression.at (Web2c Actions): Remove comment that mentions
4004 --no-parser.
4005
4006 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4007
4008 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
4009 name user variables starting with `yy'. Just pass NULL instead of a
4010 dummy local &yylval to yypush_parse.
4011 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
4012 starting with `yy'.
4013
4014 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
4015
4016 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
4017 true since it's then always used regardless of whether yyoverflow is
4018 defined. Reported by Christian Burger at
4019 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
4020 * THANKS: Add Christian Burger.
4021
4022 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4023 node names: say "Decl Summary" not "Bison Declaration Summary".
4024
4025 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
4026
4027 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
4028 determine whether this function has already complained about an invalid
4029 value for a %define boolean variable, don't check whether Bison has
4030 ever examined the value. As written, the check was a tautology.
4031 Instead, record and check for this complaint using a separate muscle.
4032
4033 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
4034
4035 Fix push parsing memory leak reported by Brandon Lucia at
4036 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
4037 * THANKS: Add Brandon Lucia.
4038 * data/push.c (yypstate_delete): Free the stack if it was reallocated
4039 but the parse never completed and thus freed it.
4040 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
4041 * tests/testsuite.at: Include push.at.
4042 * test/push.at: New.
4043 (Push Parsing: Memory Leak for Early Deletion): New test case.
4044
4045 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
4046
4047 Improve handling of multiple S/R conflicts in the same state and of S/R
4048 conflicts involving multiple reductions.
4049 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
4050 set for a state here or Bison will abort if it is reassigned on a
4051 later conflicted reduction in the same state.
4052 Similarly, don't finalize and assign the solved conflicts report here
4053 or it will be lost if it is reassigned on a later conflicted reduction
4054 in the same state.
4055 (set_conflicts): Instead, assign them both here after all S/R conflicts
4056 in the state have been fully examined.
4057 * src/print.c (shift_set): Rename to...
4058 (no_reduce_set): ... this.
4059 (print_reductions): Update for rename, and add %nonassoc error action
4060 tokens to no_reduce_set so that, when printing the first remaining
4061 reduction on an error action token, the reduction is enclosed in
4062 brackets.
4063 (print_results): Update for rename.
4064 * tests/conflicts.at (Solved conflicts report for multiple reductions
4065 in a state): New test case.
4066 (%nonassoc error actions for multiple reductions in a state): New test
4067 case.
4068
4069 * src/main.c (main): Don't depend on C99 features.
4070
4071 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
4072
4073 * build-aux/.cvsignore: Add compile.
4074 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
4075 uniwidth.
4076
4077 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
4078
4079 * bootstrap (slurp): Create target directories that don't exist.
4080 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
4081
4082 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
4083
4084 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
4085 than item number.
4086 * closure.c (closure): Likewise.
4087 * state.h (reductions): Comment sorting of rules.
4088 (state): Comment sorting of items.
4089
4090 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
4091
4092 Fix C++ test cases after recent Gnulib changes. Discussed starting at
4093 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
4094 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
4095 definition in order to avoid Gnulib headers since we don't use config.h
4096 here.
4097 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
4098 rather than AT_DATA so that config.h is included.
4099
4100 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
4101
4102 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
4103 instead of fprintf. Guard these functions with #if YYDEBUG instead of
4104 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
4105 and so that YYFPRINTF is guaranteed to be defined here.
4106
4107 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
4108
4109 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
4110 with...
4111 (muscle_percent_define_check_values): ... this more helpful function.
4112 Again, it's not used yet, but it will be.
4113 * src/muscle_tab.h: Likewise.
4114
4115 Improve some comments in parser table construction.
4116 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
4117 (generate_states): Don't mention ruleset, which is internal to closure.
4118 * src/closure.c (closure): Explain sorting of core and itemset, which
4119 is required for this function to behave correctly.
4120 * src/closure.h (closure): Mention sorting.
4121
4122 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
4123
4124 * src/lalr.c (state_lookahead_tokens_count): For code readability,
4125 move the check for disabled transitions to an aver since conflict
4126 resolution hasn't happened yet.
4127
4128 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
4129 labels a state as inconsistent just because it has error transitions.
4130 The original form of this check appeared in revision 1.1 of lalr.c,
4131 which was committed on 1991-12-21. Now (at least), changing the
4132 consistency label on such a state appears to have no useful effect in
4133 any of the places it is examined, which I enumerate below. The key
4134 point to understanding each item in this enumeration is that a state
4135 with an error transition is labelled consistent in the first place only
4136 if it has no rules, so the check cannot matter for states that have
4137 rules. (1) Labelling a state as inconsistent will cause set_conflicts
4138 to try to identify its conflicts, and a state must have *rules* to have
4139 conflicts. (2) Labelling a state as inconsistent will affect how
4140 action_row sets the default *rule* for the state. (3) Labelling a
4141 state as inconsistent will cause build_relations to add lookback edges
4142 to *rules* in that state.
4143 * src/state.h (struct state): Word the comment for member consistent
4144 more carefully.
4145
4146 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
4147
4148 Don't depend on C99 features.
4149 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
4150 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
4151 * src/reader.c (check_and_convert_grammar): Fix for-loop.
4152 * src/state.c (state_mark_reachable_states): Fix for-loop.
4153 (state_remove_unreachable_states): Fix for-loop.
4154
4155 Don't widen struct state with member reachable just to temporarily
4156 record reachability. Instead, use a local bitset.
4157 * src/state.h (struct state): Remove member.
4158 * src/state.c (state_new): Don't initialize it.
4159 (state_mark_reachable_states): Rename to...
4160 (state_record_reachable_states): ... this, and use bitset.
4161 (state_remove_unreachable_states): Use bitset.
4162
4163 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
4164
4165 * src/Makefile.am (yacc): Quote target action commands properly so
4166 that the yacc script isn't corrupt. Reported by Hans Aberg at
4167 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
4168
4169 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
4170 the case of pure parsers. Reported by Frans Englich at
4171 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
4172 * THANKS: Add Frans Englich.
4173
4174 * NEWS (2.3a+): In the %code entry, reference section `Bison
4175 Declaration Summary' from the manual now since the %code summary has
4176 moved there.
4177 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
4178 in the rules section must be terminated by semicolons.
4179
4180 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
4181
4182 Extend the front-end API for %define variables to more completely
4183 mirror the back-end. This will be useful in the future.
4184 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
4185 Update comments to mention the new front-end counterparts of these
4186 macros.
4187 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
4188 for muscle_string_decode and muscle_location_decode.
4189 (muscle_string_decode): New static function.
4190 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
4191 (muscle_percent_define_get, muscle_percent_define_ifdef): New
4192 functions.
4193 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
4194 muscle_percent_define_get to mimic the b4_percent_define_flag_if
4195 implementation more closely.
4196 (muscle_percent_define_invalid_value): New function.
4197 * src/muscle_tab.h (muscle_percent_define_get,
4198 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
4199 Prototype.
4200
4201 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
4202
4203 * NEWS (2.3a+): Mention yesterday's state-removal change.
4204 (2.3a): Remove the %language entry, which was added after 2.3a.
4205 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
4206 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
4207 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
4208 tests/existing.at: Update copyright date.
4209
4210 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4211
4212 If conflict resolution makes states unreachable, remove those states,
4213 report rules that are then unused, and don't report conflicts in those
4214 states.
4215 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
4216 New global function.
4217 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
4218 function.
4219 * src/main.c (main): After conflict resolution, remove the unreachable
4220 states and update all data structures that reference states by number.
4221 * src/state.c (state_new): Initialize each state's reachable member to
4222 false.
4223 (state_mark_reachable_states): New static function.
4224 (state_remove_unreachable_states): New global function.
4225 * src/state.h (struct state): Add member bool reachable.
4226 (state_remove_unreachable_states): Prototype.
4227 * tests/conflicts.at (Unreachable States After Conflict Resolution):
4228 New test case.
4229 * tests/existing.at (GNU pic Grammar): Update test case output now that
4230 an unused rule is discovered.
4231
4232 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4233
4234 Minor code cleanup in parser table construction.
4235 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
4236 (new_itemsets, save_reductions): Update for rename to nitemset.
4237 * src/closure.c (nritemset): Rename to...
4238 (nitemset): ... this since the "r" appears to meaningless and isn't
4239 used in the comments.
4240 (closure): Update for rename.
4241 * src/closure.h (nritemset): Update extern to...
4242 (nitemset): ... this.
4243 * src/lalr.c (LA): Fix a typo in comments.
4244 * src/print.c (print_core): Update for rename to nitemset.
4245 * src/print_graph.c (print_graph): Likewise.
4246 * src/state.h: Fix some typos in header comments.
4247
4248 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
4249
4250 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
4251 still sticks to ASCII. Sorry!
4252
4253 * README-hacking: New file, taken mostly from coreutils, with changes
4254 for Bison. Contains much of the contents of:
4255 * README-cvs: Remove.
4256 * bootstrap: Sync from gnulib.
4257 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
4258 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
4259
4260 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
4261
4262 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
4263 Setzer.
4264 (Java Differences): Fix some typos.
4265 * THANKS: Add Sebastian Setzer.
4266
4267 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
4268
4269 * data/java.m4 (b4_single_class_if): Remove.
4270 (b4_abstract_if): Look at "%define abstract".
4271 (b4_lexer_if): New.
4272 (b4_union_name): Rename...
4273 (b4_yystype): ... to this. Map to "%define stype".
4274 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
4275 b4_maybe_throws): Fix quoting.
4276 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
4277 * data/lalr1.java (Lexer interface): Always define.
4278 (Lexer interface within parser class): Remove.
4279 (YYLexer class): New, used when "%code lexer" is present.
4280 (constructor): When "%code lexer" is used, pass %lex-param
4281 to the lexer constructor.
4282 (yylex, yyparse): Remove %lex-param from method invocations
4283 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
4284
4285 * doc/bison.texinfo (Java Bison Interface): Mention "%define
4286 abstract". Rename "%define union_name" to "%define stype".
4287 Rename method names according to previous patch.
4288 (Java Scanner Interface): Describe "%code lexer" instead of
4289 "%pure-parser" and "%define single_class".
4290 (Java Differences): Mention "%code lexer".
4291
4292 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
4293 Include scanner here, using macros from tests/local.at.
4294 (AT_DATA_CALC_Y): Remove final argument.
4295 (_AT_CHECK_JAVA_CALC): Likewise.
4296 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
4297 of %locations and %error-verbose.
4298 (main): Test with and without %lex-param.
4299 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
4300 (AT_BISON_OPTION_POPDEFS): Pop it.
4301
4302 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4303
4304 DJGPP spefic issue. Inhibit the use of disallowed characters for
4305 file name genertion on Win98, WinXP, etc. These are |<>":?*\
4306 and concern testsuite case 46.
4307 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
4308 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
4309 * djgpp/config.bat: Inhibit the use of disallowed characters.
4310
4311 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4312
4313 Miscellaneous %define and %code cleanup.
4314 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
4315 values are interpreted.
4316 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
4317 documentation a little more.
4318 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
4319 muscle_percent_define_insert, muscle_percent_code_grow): New
4320 functions/macros.
4321 * src/muscle_tab.h (muscle_percent_define_insert,
4322 muscle_percent_code_grow): Prototype.
4323 * src/parse-gram.y (prologue_declaration): Use
4324 muscle_percent_define_insert and muscle_percent_code_grow when parsing
4325 %define and %code directives.
4326
4327 Make it easy to share %define boolean variables between the front-end
4328 and back-end. Though not used yet, this will be useful in the future.
4329 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
4330 Bison uses of names rather than just skeleton uses of names.
4331 (b4_percent_define_get, b4_percent_define_ifdef): Rename
4332 b4_percent_define_skeleton_variables(VARIABLE) to
4333 b4_percent_define_bison_variables(VARIABLE).
4334 (b4_percent_code_get, b4_percent_code_ifdef): Rename
4335 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
4336 b4_percent_code_bison_qualifiers(QUALIFIER).
4337 (b4_check_user_names_wrap): Update for renames.
4338 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
4339 muscle_percent_define_default): New functions mimicking
4340 b4_percent_define_flag_if and b4_percent_define_default.
4341
4342 For %define variables, report locations for invalid values and
4343 redefinitions.
4344 * data/bison.m4 (b4_percent_define_flag_if): Read
4345 b4_percent_define_loc(VARIABLE) to report the location of an invalid
4346 value for VARIABLE.
4347 (b4_percent_define_default): Save a special location in
4348 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
4349 must later be reported as invalid.
4350 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
4351 functions.
4352 (muscle_percent_define_insert): Record the location of VARIABLE in
4353 muscle percent_define_loc(VARIABLE), and use it to report the previous
4354 location for a redefinition.
4355 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
4356 (muscle_percent_define_default): Update like b4_percent_define_default.
4357 (muscle_grow_user_name_list): Rename to...
4358 (muscle_user_name_list_grow): ... this for consistency and use
4359 muscle_location_grow.
4360 * src/muscle_tab.h (muscle_location_grow): Prototype.
4361 * tests/input.at (%define errors): Update expected output.
4362 * tests/skeletons.at (%define boolean variables: invalid skeleton
4363 defaults): New test case.
4364
4365 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
4366
4367 * src/print.c (lookahead_set, state_default_rule): Remove.
4368 (print_reductions): Replace state_default_rule invocation with
4369 equivalent use of yydefact, which was computed in token_actions in
4370 tables.c.
4371 (print_results): Don't allocate lookahead_set.
4372
4373 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
4374
4375 * data/lalr1.java: Prefix all private members with yy.
4376
4377 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
4378
4379 Use YYFPRINTF instead of fprintf where appropriate. Reported by
4380 Sebastien Fricker at
4381 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
4382 * THANKS: Add Sebastien Fricker.
4383 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
4384 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
4385 accept a variable number of arguments.
4386
4387 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
4388
4389 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
4390
4391 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4392
4393 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
4394 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
4395 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
4396
4397 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
4398
4399 Undo my 2007-02-07 change, switching back to the c-strcase module
4400 introduced in the 2007-02-03 change. Bruno Haible reported that
4401 the 2007-02-07 change would be dangerous in Turkish if we add a
4402 language whose name contains "i", since "i" is not lowercase "I"
4403 in Turkish.
4404 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
4405 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
4406 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
4407 * m4/.cvsignore: Remove strcase.m4.
4408 * src/getargs.c: Revert 2007-02-07 change, as follows.
4409 Include c-strcase.h.
4410 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
4411
4412 2007-02-11 Bruno Haible <bruno@clisp.org>
4413
4414 Enable the Java related testsuite tests when the only Java compiler
4415 found is a gcj < 4.3. Discussed at
4416 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
4417 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
4418
4419 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
4420
4421 * data/Makefile.am: Update copyright date.
4422 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
4423 yypstate_new returns NULL.
4424 (yypstate_new): Return NULL if malloc does.
4425 * src/reader.c (packgram): Move translation of rule actions from the
4426 beginning of packgram to...
4427 (check_and_convert_grammar): ... here right before packgram is invoked
4428 so it's easier to write more complete comments, and remove redundant
4429 code.
4430
4431 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
4432
4433 As in semantic actions, make @$ in %initial-action, %destructor, and
4434 %printer imply %locations.
4435 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
4436 scanning @$.
4437 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
4438 (@$ in %initial-action implies %locations,
4439 @$ in %destructor implies %locations,
4440 @$ in %printer implies %locations): ... these new test cases.
4441
4442 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
4443
4444 Undo most of the 2007-02-03 change, switching to the strcase module
4445 now that gnulib strcase has been fixed.
4446 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
4447 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
4448 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
4449 * m4/.cvsignore: Add strcase.m4.
4450 * src/getargs.c: Revert 2007-02-03 change, as follows.
4451 Don't include c-strcase.h.
4452 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
4453 strcasecmp has "unspecified behavior" outside the POSIX locale,
4454 but it works fine in practice if at least one argument is ASCII,
4455 as is the case in Bison.
4456
4457 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
4458
4459 * tests/java.at: Skip tests if only one of javac/java is present.
4460 Reported by Joel E. Denny.
4461 * tests/atlocal.in: Adjust copyright years.
4462
4463 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
4464
4465 * data/lalr1.java (Stack): Work around old verifiers that disallow
4466 access to the private fields of an inner class, from the outer class.
4467 We can make Stack's fields public because user code doesn't have access
4468 to the instance of Stack used by parse(). Reported by Paul Eggert.
4469
4470 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
4471
4472 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
4473 the right spot for these files?
4474 * bootstrap.conf (gnulib_modules): Add c-strcase.
4475 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
4476 c-strncasecmp.c.
4477 * src/getargs.c: Include c-strcase.h.
4478 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
4479 to avoid unspecified behavior.
4480
4481 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
4482
4483 * doc/bison.texinfo (Decl Summary): Correct typo.
4484
4485 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
4486
4487 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
4488 Complain if the value does not match empty, "true" or "false".
4489 * data/c++.m4: Adjust default definitions of %define variables.
4490 * data/java.m4: Adjust default definitions of %define variables.
4491 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
4492 to above behavior.
4493 * tests/input.at (Boolean %define variables): Test new behavior.
4494
4495 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
4496
4497 * NEWS: Mention java.
4498 * TODO: Remove things that are done.
4499 * bootstrap.conf: Add javacomp-script and javaexec-script.
4500 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
4501
4502 * data/Makefile.am: Add new files.
4503 * data/java-skel.m4: New.
4504 * data/java.m4: New.
4505 * data/lalr1.java: New.
4506
4507 * doc/bison.texinfo: Put "A Complete C++ Example" under
4508 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
4509 under Other Languages.
4510
4511 * src/getargs.c (valid_languages): Add Java.
4512 * src/getargs.h (struct bison_language): Update size of string fields.
4513
4514 * tests/Makefile.am: Add java.at.
4515 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
4516 * tests/java.at: New.
4517 * tests/testsuite.at: Include it.
4518
4519 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
4520
4521 Clean up.
4522 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
4523 at_directive_argv arguments so these no longer have to be global
4524 variables. Also, update the implementation for the following changes.
4525 (fail_for_at_directive_too_many_args,
4526 fail_for_at_directive_too_few_args): Add at_directive_name argument.
4527 (at_directive_name): Remove as at_directive_argv[0] will be used for
4528 this now.
4529 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
4530 for the directive name.
4531 (at_directive_argc, at_directive_argv): Make these local within
4532 skel_lex instead of global.
4533 (INITIAL): Update directive start action for above changes.
4534 (SC_AT_DIRECTIVE_ARG): Rename to...
4535 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
4536 (SC_AT_DIRECTIVE_SKIP_WS): Update.
4537 (scan_skel): Move yylex_destroy to...
4538 (skel_scanner_free): ... here.
4539 * tests/skeletons.at (installed skeleton file name): Rename to...
4540 (installed skeleton file names): ... this.
4541
4542 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
4543
4544 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4545 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
4546 Summary" not "Directives".
4547 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
4548 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
4549 since the former is now the more complete one.
4550 (Prologue Alternatives): Likewise and do the same for %defines.
4551 (Table of Symbols): Add summary of %code, add summary of %define, and
4552 move full %code documentation to...
4553 (Decl Summary): ... here for consistency with other entries in these
4554 sections.
4555 Move %define entry in order to keep this list alphabetized.
4556 Reword %define entry a little to put less emphasis on the skeleton
4557 concept, which most users shouldn't have to think about.
4558
4559 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
4560
4561 Adjust to recent gnulib changes.
4562 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
4563 Add string.h, string_.h, unistd_.h, wchar_.h.
4564 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
4565 * src/system.h: Don't include <stpcpy.h>; this is now done by
4566 <string.h>.
4567
4568 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
4569
4570 Simplify implementation of unqualified %code, implement macros for
4571 uniform treatment of boolean %define flags. Document %define.
4572 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
4573 b4_percent_code_ifdef): New.
4574 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
4575 * data/c++.m4: Define default value for global_tokens_and_yystype.
4576 * data/glr.cc: Likewise.
4577 * data/location.cc: Use b4_percent_define_flag_if.
4578
4579 * doc/bison.texinfo (Decl Summary): Document %define.
4580
4581 * src/parse-gram.y (Unqualified %code): Change muscle name to
4582 b4_percent_code().
4583 (content.opt): Default to empty.
4584
4585 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
4586
4587 Implement support for relative and absolute skeleton file names.
4588 Discussed starting at
4589 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
4590 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
4591 (Bison Options): Document in --skeleton entry.
4592 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
4593 full_skeleton can't necessarily hold all of pkgdatadir.
4594 If the specified skeleton file name contains a `/', don't prepend
4595 pkgdatadir.
4596 * src/parse-gram.y (prologue_declaration): If the specified skeleton
4597 file name contains a `/', prepend the grammar file directory.
4598 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
4599 * skeletons.at: New file.
4600 (relative skeleton file names): New test case.
4601 (installed skeleton file names): New test case.
4602 * tests/testsuite.at: Include skeletons.at.
4603
4604 * bootstrap: Update copyright to 2007.
4605
4606 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
4607
4608 * bootstrap: Remove occurrences of .#bootmp from the files.
4609
4610 2007-01-17 Akim Demaille <akim@epita.fr>
4611
4612 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
4613 nonterminals.
4614 Use per-type %printer.
4615
4616 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
4617
4618 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
4619 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4620 djgpp/config.site, src/files.c, src/files.h, src/main.c,
4621 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
4622 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
4623 tests/glr-regression.at, tests/input.at, tests/local.at,
4624 tests/output.at, tests/torture.at: Update copyright to 2007.
4625
4626 2007-01-16 Akim Demaille <akim@epita.fr>
4627
4628 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
4629 error code.
4630 (Calc++ Scanner): Exit with failure if we can't open the input
4631 file.
4632 Accept "-" standing for stdin.
4633 (Calc++ Top Level): Print the result only if the parsing was
4634 successful.
4635
4636 2007-01-16 Akim Demaille <akim@epita.fr>
4637
4638 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
4639
4640 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
4641 and Joel E. Denny <jdenny@ces.clemson.edu>
4642
4643 Clean up %define and %code implementation in M4 some. Most
4644 importantly, rename all related macros to be in the b4_percent_define
4645 and b4_percent_code namespaces. Also, complete support for `.' in
4646 %define variable names and %code qualifiers.
4647 * data/bison.m4 (b4_check_user_names): Check for special
4648 "SKELETON-NAMESPACE(name)" macros instead of using two nested
4649 m4_foreach loops.
4650 (b4_get_percent_define, b4_get_percent_code): Rename to...
4651 (b4_percent_define_get, b4_percent_code_get): ... these.
4652 Extend documentation with examples.
4653 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
4654 b4_percent_define_skeleton_variables and
4655 b4_percent_code_skeleton_qualifiers.
4656 Expect any value for the %define variable `foo' to be stored in the
4657 macro named `b4_percent_define(foo)'; expect any %code blocks for the
4658 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
4659 expect any unqualified %code blocks to be stored in a macro named
4660 `b4_percent_code_unqualified'.
4661 Use m4_indir so that %define variable names and %code qualifiers can
4662 contain `.', which is allowed by the grammar parser.
4663 (b4_percent_define_default): New macro to set a default value for a
4664 %define variable.
4665 (m4_wrap): Update wrapped code, and fix some underquoting.
4666 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
4667 Expect grammar uses of %define variables and %code qualifiers to be
4668 defined in b4_percent_define_user_variables and
4669 b4_percent_code_user_qualifiers.
4670 * data/c++.m4: Use b4_percent_define_default rather than
4671 m4_define_default. Fix some underquoting. Skeleton usage of %define
4672 variable define_location_comparison now implies skeleton usage of
4673 %define variable filename_type.
4674 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4675 data/push.c, data/yacc.c: Update macro names.
4676 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
4677 muscle names.
4678
4679 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4680
4681 DJGPP specific issues.
4682
4683 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
4684 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
4685
4686 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4687
4688 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
4689 run parsers in all tests so that Valgrind is invoked during
4690 maintainer-check-valgrind.
4691 (Duplicate representation of merged trees): Free all semantic values.
4692 (Duplicated user destructor for lookahead): Likewise.
4693
4694 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4695
4696 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
4697 command-line prefix.
4698 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
4699 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
4700 miss Valgrind messages.
4701 (Exploding the Stack Size with Malloc): Likewise.
4702
4703 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4704
4705 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
4706 locals. Reported by Juan Manuel Guerrero at
4707 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
4708 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
4709 Fix some indentation also.
4710 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
4711 explaining this issue.
4712
4713 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
4714 and Joel E. Denny <jdenny@ces.clemson.edu>
4715
4716 Simplify union and prologue handling, and escape union and lex/parse
4717 params with digraphs.
4718 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
4719 values to the empty string since these are no longer guaranteed
4720 initialized by the front-end.
4721 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
4722 braces around b4_user_stype since this is no longer done by the
4723 front-end.
4724 * src/files.c, src/files.h (pre_prologue_obstack,
4725 post_prologue_obstack): Remove.
4726 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
4727 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
4728 with digraphs. This fixes lex params and parse params.
4729 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
4730 * src/output.c (prepare): Remove muscle insertion of the prologues.
4731 (output): Remove freeing of pre_prologue_obstack and
4732 post_prologue_obstack.
4733 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
4734 than prologue_augment for prologue parsing so you don't need prologue
4735 obstacks.
4736 (grammar_declaration): For %union RHS, use `braceless' instead of
4737 "{...}" so that braces are already stripped and code is escaped with
4738 digraphs.
4739 * src/reader.c (prologue_augment): Remove.
4740 (reader): Remove initialization of pre_prologue_obstack and
4741 post_prologue_obstack.
4742 * src/reader.h (prologue_augment): Remove.
4743
4744 * data/c.m4: Remove stray parenthesis.
4745
4746 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4747
4748 Remove quotes from variables names in %define directives and from
4749 qualifiers in %code directives, and restrict the characters that are
4750 allowed in them to M4-friendly ones. For %define, continue to support
4751 the quoted form as a deprecated feature. Discussed starting at
4752 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
4753 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
4754 %code.
4755 * doc/bison.texinfo (Prologue Alternatives): Update.
4756 (Decl Summary): In %defines entry, update mention of `%code requires'
4757 and `%code provides'.
4758 (C++ Location Values): Update %define uses.
4759 (Calc++ Parser Interface): Likewise.
4760 (Calc++ Parser): Likewise, and update `%code requires' uses.
4761 (Table of Symbols): Update %code documentation.
4762 * src/parse-gram.y (prologue_declaration): For %define variables, use
4763 `variable' instead of `STRING'.
4764 (grammar_declaration): For %code qualifiers, use `ID' instead of
4765 `STRING'.
4766 (variable): New nonterminal that takes an `ID' or a `STRING'.
4767 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
4768 and %define uses.
4769 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
4770 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
4771 (%define errors): Update %define uses.
4772
4773 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4774
4775 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
4776 instead of muscle_insert for %define values so that M4-special
4777 characters are replaced with digraphs.
4778 * tests/input.at (%define errors): Extend to check weird values.
4779
4780 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4781
4782 Instead of having skeletons declare all valid %define variables and
4783 %code qualifiers, provide macros that retrieve the associated values
4784 and build these lists automatically. Thus Bison will now warn when a
4785 variable or qualifier is not used by the skeleton in the current
4786 invocation regardless of whether it might sometimes be used by that
4787 skeleton in other invocations. Also, move all %define value macros to
4788 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
4789 form, which is replaced by %code.
4790 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
4791 (b4_check_user_names): ... this, and change the series of valid name
4792 arguments to a single list argument for names used in the skeleton
4793 similar to the existing list argument for names used in the grammar.
4794 Warn instead of complaining.
4795 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
4796 values and %code code, to format %code code properly, and to build
4797 lists of all %define variables and %code qualifiers used in the
4798 skeleton: b4_skeleton_percent_define_variables and
4799 b4_skeleton_percent_code_qualifiers.
4800 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
4801 Remove, and...
4802 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
4803 the skeleton names lists can finish building first. In place of
4804 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
4805 expect the lists b4_user_percent_define_variables and
4806 b4_user_percent_code_qualifiers.
4807 * data/c++.m4: Where setting default values for b4_parser_class_name,
4808 b4_location_type, b4_filename_type, b4_namespace, and
4809 b4_define_location_comparison, update their names to the
4810 b4_percent_define_ namespace.
4811 * data/glr.c: Don't use b4_check_percent_define_variables and
4812 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
4813 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
4814 (b4_parser_class_name, b4_namespace): Define these using
4815 b4_get_percent_define for parser_class_name and namespace.
4816 * data/location.cc: Use b4_get_percent_define.
4817 * data/push.c: Don't use b4_check_percent_define_variables and
4818 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
4819 * data/yacc.c: Likewise, and don't call m4_exit in
4820 b4_use_push_for_pull_if or m4_wrap code will never execute.
4821 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
4822 Rename to...
4823 (muscle_grow_user_name_list): ... this for consistency with the
4824 terminology used in bison.m4.
4825 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
4826 %define variable names, and rename muscle used_percent_define_variables
4827 to user_percent_define_variables.
4828 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
4829 user_percent_code_qualifiers.
4830 (content): Remove.
4831 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
4832 {CODE} form is no longer accepted.
4833 * tests/input.at (Reject bad %code qualifiers): Rename to...
4834 (Reject unused %code qualifiers): ... this, and update test output.
4835 (%define error): Update test output.
4836
4837 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
4838
4839 Check for unrecognized %define variables similar to checking for
4840 unrecognized %code qualifiers. Check for redefined %define variables.
4841 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
4842 generalizes...
4843 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
4844 (b4_check_percent_define_variables): New, also wraps it.
4845 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
4846 variables using b4_check_percent_define_variables.
4847 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
4848 all those exercised in the test suite and all those listed in the
4849 `Default values' section of c++.m4. Are there others?
4850 * data/push.c, data/yacc.c: Declare no valid %define variables.
4851 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
4852 similar to muscle_find, but it works even when the muscle stores a
4853 const value.
4854 (muscle_grow_used_name_list): New function for constructing the used
4855 name list muscles that b4_check_for_unrecognized_names requires.
4856 * src/parse-gram.y (prologue_declaration): Warn if a variable is
4857 %define'd more than once. Define the b4_used_percent_define_variables
4858 muscle with muscle_grow_used_name_list.
4859 (grammar_declaration): Abbreviate %code code with
4860 muscle_grow_used_name_list.
4861 * tests/input.at (%define errors): New.
4862
4863 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4864
4865 Provide warn_at, complain_at, and fatal_at function callbacks to the
4866 skeletons, and use this for %code qualifier complaints.
4867 * data/bison.m4 (b4_error_at): New, invoked by...
4868 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
4869 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
4870 @fatal_at(...@) directives.
4871 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
4872 qualifiers in b4_used_percent_code_qualifiers and to use
4873 b4_complain_at.
4874 * src/location.c, src/location.h (boundary_set_from_string): New global
4875 function.
4876 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
4877 function.
4878 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
4879 to b4_used_percent_code_qualifiers.
4880 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
4881 function.
4882 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
4883 (lineno): Rename to...
4884 (out_lineno): ... this so I don't misunderstand it again.
4885 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
4886 here; these newlines are in the input but not the output file.
4887 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
4888 (at_directive_perform): ... this new static function, and add handling
4889 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
4890 directives.
4891 * tests/input.at (Reject bad %code qualifiers): Update test output with
4892 locations and extend.
4893
4894 * tests/output.at (Output file name: [, Output file name: ]): Remove
4895 bogus comment about these tests failing.
4896
4897 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4898
4899 Clean up b4_check_percent_code_qualifiers a little.
4900 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
4901 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
4902 documentation and add examples.
4903 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
4904 qualifiers here.
4905
4906 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
4907
4908 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
4909 unreliable -- especially when they're hidden inside another macro.
4910 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
4911 data/c.m4: Remove m4_divert(-1).
4912 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4913 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
4914 m4_divert_push(0) and m4_divert_pop(0).
4915 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
4916 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
4917 pushed and popped by m4sugar, should be first on the stack.
4918
4919 Provide warn, complain, and fatal function callbacks to the skeletons.
4920 This provides more flexibility than m4_fatal, improves the error
4921 message format, and captures messages for translation. Discussed
4922 starting at
4923 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
4924 * data/bison.m4 (b4_error): New, invoked by...
4925 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
4926 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
4927 directives. Because these M4 macros might be called when the current
4928 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
4929 the previous removal of uses of m4_divert, which caused trouble.
4930 (b4_check_percent_code_qualifiers): Use b4_complain instead of
4931 m4_fatal to report unrecognized %code qualifiers.
4932 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
4933 push parser requests.
4934 * data/glr.c: Use b4_complain instead of m4_fatal to report
4935 non-deterministic push parser requests.
4936 Update @output usage to @output(...@) form.
4937 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
4938 report missing %defines. Update @output usage to @output(...@) form.
4939 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
4940 @output(...@) form.
4941 * src/main.c (main): Invoke skel_scanner_free.
4942 * src/scan-skel.h (skel_scanner_free): Prototype new function.
4943 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
4944 obstack_for_string from flex-scanner.h.
4945 (YY_DECL): Use to declare skel_lex static.
4946 (decode_at_digraphs): Remove; now handled in the new
4947 SC_AT_DIRECTIVE_ARG start condition.
4948 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
4949 functions.
4950 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
4951 at_directive_argv): New static globals.
4952 (INITIAL): Use fail_for_invalid_at.
4953 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
4954 recognize the start of a generalized `@directive(...@)' form and
4955 start...
4956 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
4957 directive args (using the new obstack_for_string), to decode the
4958 contained @ diagraphs, and to perform the directive. It recognizes
4959 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
4960 @output(...@).
4961 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
4962 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
4963 `@,'.
4964 (scan_skel): Initialize obstack_for_string on the first call.
4965 (skel_scanner_free): New function to free obstack_for_string.
4966 * tests/input.at (Reject bad %code qualifiers): Update test output.
4967
4968 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
4969
4970 Consolidate the 4 prologue alternative directives (%code, %requires,
4971 %provides, and %code-top) into a single %code directive with an
4972 optional qualifier field. Discussed at
4973 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
4974 * NEWS (2.3a+): Rewrite the existing entry for the prologue
4975 alternatives.
4976 * doc/bison.texinfo (Prologue Alternatives): Update.
4977 (Decl Summary): Update to %code "requires" and %code "provides".
4978 (Calc++ Parser): Update to %code "requires".
4979 (Table of Symbols): Remove entries for %requires, %provides, and
4980 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
4981 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
4982 are replaced by b4_percent_code_provides and b4_percent_code_requires,
4983 which are skeleton-specific.
4984 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
4985 declare what %code qualifiers it supports and to complain if any other
4986 qualifiers were used in the grammar.
4987 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
4988 and b4_user_code([b4_percent_code_provides]) in place of
4989 b4_user_requires and b4_user_provides.
4990 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
4991 Add b4_user_code([b4_percent_code_top]) and
4992 b4_user_code([b4_percent_code]).
4993 Invoke b4_check_percent_code_qualifiers.
4994 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
4995 PERCENT_REQUIRES): Remove.
4996 (grammar_declaration): Remove RHS's for %code-top, %provides, and
4997 %requires. Rewrite the %code RHS as the unqualified form defining the
4998 muscle b4_percent_code. Add another RHS for the qualified %code form,
4999 which defines muscles of the form b4_percent_code_QUALIFIER and the
5000 b4_used_percent_code_qualifiers muscle.
5001 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5002 PERCENT_REQUIRES): Remove.
5003 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
5004 %code "requires" and %code "provides".
5005 * tests/input.at (Reject bad %code qualifiers): New.
5006
5007 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5008
5009 Use the new code_props interface for destructors and printers.
5010 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
5011 printer_location members, and change the type of the destructor and
5012 printer members to code_props.
5013 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
5014 symbol_printer_get, semantic_type_destructor_set,
5015 semantic_type_printer_set, default_tagged_destructor_set,
5016 default_tagless_destructor_set, default_tagged_printer_set,
5017 default_tagless_printer_set): Use code_props in arguments and return
5018 types in place of char const * and location.
5019 (symbol_destructor_location_get, symbol_printer_location_get): Remove
5020 since the locations are now contained in the return of
5021 symbol_destructor_get and symbol_printer_get.
5022 * src/output.c (symbol_destructors_output, symbol_printers_output):
5023 Replace with...
5024 (symbol_code_props_output): ... this to eliminate duplicate code.
5025 (output_skeleton): Update to use symbol_code_props_output.
5026 * src/reader.c (symbol_should_be_used): Update use of
5027 symbol_destructor_get.
5028 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
5029 Update uses of the various _destructor_set and _printer_set functions.
5030 * src/symtab.c: (default_tagged_destructor_location,
5031 default_tagless_destructor_location, default_tagged_printer_location,
5032 default_tagless_printer_location): Remove since we...
5033 (default_tagged_destructor, default_tagless_destructor,
5034 default_tagged_printer, default_tagless_printer): ... change the type
5035 of these to code_props.
5036 (symbol_new, semantic_type_new, symbol_destructor_set,
5037 semantic_type_destructor_set, symbol_destructor_get,
5038 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
5039 symbol_check_alias_consistency, default_tagged_destructor_set,
5040 default_tagless_destructor_set, default_tagged_printer_set,
5041 default_tagless_printer_set): Update.
5042 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
5043 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
5044 code_props members.
5045 (symbol_print): Use SYMBOL_CODE_PRINT.
5046
5047 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5048
5049 Use the new code_props interface for rule actions.
5050 * src/symlist.h (symbol_list): Replace action, action_location, and
5051 used members with a code_props action_props member.
5052 * src/reader.c (symbol_should_be_used, grammar_rule_check,
5053 grammar_midrule_action, grammar_current_rule_merge_set,
5054 grammar_current_rule_symbol_append, packgram): Update.
5055 * src/scan-code.h (translate_rule_action): Remove, no longer used.
5056 * src/scan-code.l (handle_action_dollar): Update.
5057 (translate_rule_action): Remove, no longer used.
5058 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
5059
5060 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5061
5062 Use the new code_props interface in parse-gram.y.
5063 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
5064 Update all uses of translate_* functions to use the new code_props
5065 interface and to use gram_scanner_last_string_free and
5066 code_scanner_last_string_free where possible.
5067 (grammar_declaration): symbol_list_destructor_set and
5068 symbol_list_printer_set now perform the translation, so don't do it
5069 here. Use gram_scanner_last_string_free where possible.
5070 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
5071 translate_code): Remove, no longer used.
5072 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
5073 symbol_list_printer_set): Perform code translation here rather than
5074 depending on the caller to do so.
5075
5076 * src/symlist.h (struct symbol_list): Correct some documentation typos.
5077 * src/scan-gram.h (gram_last_string): Remove declaration.
5078 * src/scan-gram.l (last_string): Declare it static.
5079
5080 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5081
5082 Encapsulate code properties and related functionality for the various
5083 destructors, printers, and actions into a code_props structure and
5084 interface. This patch merely implements code_props in scan-code.h and
5085 scan-code.l. Future patches will rewrite other modules to use it.
5086 Discussed starting at
5087 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
5088 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
5089 consistently initialize const structs that have an empty location
5090 field.
5091 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
5092 to ensure consistency.
5093 * src/scan-code.h (code_props): New structure.
5094 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
5095 function, macro, and const global variable for initializing a
5096 code_props with no code.
5097 (code_props_plain_init, code_props_symbol_action_init,
5098 code_props_rule_action_init, code_props_translate_code): The rest of
5099 the new code_props functional interface. Among other things, the init
5100 functions set the code_props kind field so that
5101 code_props_translate_code will know whether to behave like
5102 translate_symbol_action, translate_rule_action, or translate_code.
5103 These old translate functions must remain until all other modules are
5104 updated to use the new code_props interface.
5105 (code_scanner_last_string_free): New function similar to
5106 gram_scanner_last_string_free.
5107 (code_scanner_free): Add documentation.
5108 * src/scan-code.l: Implement the new interface.
5109 (code_lex): Make it static, add a code_props* argument, and remove the
5110 rule argument.
5111 (last_string): New static global similar to the one in scan-gram.l.
5112 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
5113 instead of rule.
5114 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
5115 code_props since Bison may one day use this information for destructors
5116 and printers.
5117 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
5118 (handle_action_dollar): Use symbol_list_n_get and set used flag
5119 directly since symbol_list_n_used_set is removed.
5120 (translate_action): Add a code_props* argument and remove the rule,
5121 action, and location arguments. Pass the code_props* on to code_lex.
5122 (translate_rule_action, translate_symbol_action, translate_code):
5123 Rewrite as wrappers around the new code_props interface.
5124 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
5125 it would eventually need to break the encapsulation of code_props.
5126
5127 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5128
5129 * etc/.cvsignore: New.
5130
5131 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5132
5133 Add maintainer-push-check to run maintainer-check using push parsing in
5134 place of pull parsing where available.
5135 * Makefile.am (maintainer-push-check): New.
5136 * data/bison.m4 (b4_use_push_for_pull_if): New.
5137 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
5138 appropriately based on their existing values.
5139 (yypush_parse): Don't print push-parser-specific diagnostics if push
5140 parsing is being used in place of pull parsing.
5141 * data/yacc.c: If push parsing should replace pull parsing, redirect to
5142 push.c.
5143 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
5144 variable, and insert b4_use_push_for_pull_flag into muscles.
5145 * tests/Makefile.am (maintainer-push-check): New.
5146
5147 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5148
5149 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
5150 (whether successful or failed) so that yypush_parse can be invoked
5151 again to start a new parse using the same yypstate.
5152 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
5153 check multiple yypull_parse invocations on the same yypstate. For pull
5154 mode, extend to check multiple yyparse invocations.
5155 (Exploding the Stack Size with Alloca): Extend to try with
5156 %push-pull-parser.
5157 (Exploding the Stack Size with Malloc): Likewise.
5158
5159 * tests/calc.at (Simple LALR Calculator): Don't specify
5160 %skeleton "push.c" since %push-pull-parser implies that now.
5161 * tests/headers.at (export YYLTYPE): Don't check for the push
5162 declarations. Otherwise, this test case can't be used to see if push
5163 mode can truly emulate pull mode.
5164 * tests/input.at (Torturing the Scanner): Likewise.
5165 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
5166 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
5167 AT_YACC_IF, which now includes the case of push mode since %skeleton
5168 need not be used for push mode. This will be more intuitive once
5169 push.c is renamed to yacc.c.
5170
5171 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5172
5173 For push mode, convert yyparse from a macro to a function, invoke yylex
5174 instead of passing a yylexp argument to yypull_parse, and don't
5175 generate yypull_parse or yyparse unless %push-pull-parser is declared.
5176 Discussed starting at
5177 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
5178 * data/bison.m4 (b4_pull_if): New.
5179 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
5180 * data/push.c: Improve M4 quoting a little.
5181 (b4_generate_macro_args, b4_parenthesize): Remove.
5182 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
5183 any time a pull parser is requested.
5184 Don't #define this as a wrapper around yypull_parse. Instead, when
5185 both push and pull are requested, make it a function that does that
5186 same thing.
5187 (yypull_parse): If there's a b4_prefix, #define this to
5188 b4_prefix[pull_parse] when both push and pull are requested.
5189 Don't define this as a function unless both push and pull are
5190 requested.
5191 Remove the yylexp argument and hard-code yylex invocation instead.
5192 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
5193 %push-parser.
5194 * src/getargs.c (pull_parser): New global initialized to true.
5195 * getargs.h (pull_parser): extern it.
5196 * src/output.c (prepare): Insert pull_flag muscle.
5197 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
5198 (prologue_declaration): Set both push_parser and pull_parser = true for
5199 %push-pull-parser. Set push_parser = true and pull_parser = false for
5200 %push-parser.
5201 * src/scan-gram.l: Don't accept %push_parser as an alternative to
5202 %push-parser since there's no backward-compatibility concern here.
5203 Scan %push-pull-parser.
5204 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
5205 instead of %push-parser.
5206 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
5207 prototype it in the module that calls yyparse.
5208 * tests/input.at (Torturing the Scanner): Likewise.
5209 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
5210
5211 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
5212
5213 Update etc/bench.pl. Optimize push mode a little (the yyn change
5214 deserves most of the credit).
5215 * Makefile.am (SUBDIRS): Add etc subdirectory.
5216 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
5217 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
5218 yytoken, yyval, and yyloc declarations to...
5219 (yyparse or yypush_parse): ... here to improve performance. For
5220 yypush_parse invocations after the first, be sure to assign yyn its old
5221 value again.
5222 (yypstate_new): Don't bother initializing the yyresult field since the
5223 initial value isn't used.
5224 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
5225 remove the #define that, in push mode, set it to yyps->NAME.
5226 * etc/Makefile.am: New.
5227 * etc/bench.pl: Remove and build it instead from...
5228 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
5229 "tests/bison" from the build directory by default rather than just
5230 invoking "bison" from $PATH.
5231 (calc_grammar): Update push parser code: don't declare yylval globally,
5232 don't define yyparse_wrapper, and don't #define yyparse.
5233 (bench_grammar): Update to check all working combinations of yacc.c,
5234 push.c, impure, pure, pull, and push.
5235
5236 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5237
5238 For push mode, add pull wrappers around yypush_parse.
5239 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
5240 (yypull_parse): New function wrapping yypush_parse.
5241 (yyparse): New #define wrapping yypull_parse.
5242 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
5243 is declared.
5244 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
5245 prototype yylex in the module that calls yyparse, and don't prototype
5246 yyparse there. Otherwise, the yyparse expansion won't compile.
5247 * tests/input.at (Torturing the Scanner): Likewise.
5248
5249 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5250
5251 Enable push parsers to operate in impure mode. Thus, %push-parser no
5252 longer implies %pure-parser. The point of this change is to move
5253 towards being able to test the push parser code by running the entire
5254 test suite as if %push-parser had been declared.
5255 * data/push.c (yypush_parse): For impure mode, remove the
5256 yypushed_char, yypushed_val, and yypushed_loc arguments.
5257 Instead, declare these as local variables initialized to the global
5258 yychar, yylval, and yylloc.
5259 For the first yypush_parse invocation only, restore the initial values
5260 of these global variables when it's time to read a token since they
5261 have been overwritten.
5262 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
5263 %push-parser.
5264 * tests/calc.at (Simple LALR(1) Calculator): Always declare
5265 %pure-parser along with %push-parser since this test case was designed
5266 for pure push parsers.
5267 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
5268 (AT_YACC_OR_PUSH_IF): New.
5269 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
5270 add a note that it's still wrong for some cases (as it has been for a
5271 while).
5272 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
5273 %push-parser no longer implies %pure-parser.
5274
5275 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5276
5277 Remove some unnecessary differences between the pull parser code and
5278 the push parser code. This patch enables yynerrs in push mode.
5279 * data/push.c: Reformat M4 a little.
5280 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
5281 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
5282 because push mode is on. Instead, if pure mode is on, move yynerrs
5283 to...
5284 (b4_declare_parser_state_variables): ... here.
5285 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
5286 to yyps->NAME so it can be used in yypush_parse.
5287 (yypush_parse): Don't omit uses of yynerrs in push mode.
5288
5289 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5290
5291 Fix bug such that the first pushed token's value and location are
5292 sometimes overwritten (sometimes by %initial-action) before being used.
5293 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
5294 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
5295 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
5296 more closely mimic the pull parser logic.
5297 Don't copy the pushed token to yychar, yylval, and yylloc until it's
5298 time to read a token, which is after any initialization of yylval and
5299 yylloc.
5300 (gottoken): Rename label to...
5301 (yyread_pushed_token): ... for clarity and to avoid infringing on the
5302 user namespace.
5303
5304 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5305
5306 Rearrange initialization of the parser state variables so that the
5307 skeleton doesn't have to have a copy for pull mode and another for push
5308 mode. This patch also fixes at least a bug such that yylloc was not
5309 initialized (with b4_location_initial_line and
5310 b4_location_initial_column) upon calling yypush_parse. However, that
5311 initialization now overwrites the first token's location;
5312 %initial-action assigning @$ already did the same thing, and both bugs
5313 will be fixed in a later patch.
5314 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
5315 (b4_declare_parser_state_variables): Remove initialization of yytoken,
5316 yyss, yyvs, yyls, and yystacksize.
5317 (yypstate_new): Remove initialization of some yypstate fields: yystate,
5318 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
5319 yylsp.
5320 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
5321 yyps->NAME so it can be used in yypush_parse.
5322 (yyparse or yypush_parse): For yypush_parse, don't print the
5323 "Starting parse" diagnostic for invocations after the first.
5324 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
5325 yypush_parse, only do it for the first invocation.
5326 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
5327 initialization to occur in yypush_parse but only on the first
5328 invocation.
5329
5330 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5331
5332 * data/push.c: Add CPP guards around push parser declarations in both
5333 the header and the code file.
5334 In the code file, move the push parser declarations to the same place
5335 they appear in the header file.
5336 Clean up the M4 some, especially the inconsistent underquoting in
5337 some b4_c_function_def and b4_c_function_decl uses.
5338
5339 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5340
5341 Encapsulate the push parser state variables into an M4 macro so the
5342 push skeleton doesn't have to list them again for pull mode's yyparse.
5343 For push mode, remove yypush_parse's local equivalents of these
5344 variables to eliminate unnecessary copying between the two sets at
5345 run-time. This patch also fixes at least a bug related to multiple
5346 %initial-action invocations in push mode.
5347 * data/push.c (b4_declare_parser_variables): Rename to...
5348 (b4_declare_scanner_communication_variables): ... this for clarity and
5349 update both uses.
5350 (b4_declare_yyparse_variables): Remove and move its contents to the one
5351 spot where it was invoked.
5352 (b4_declare_parser_state_variables): New macro containing the parser
5353 state variables required by push mode.
5354 (struct yypstate): Replace all fields but yynew with
5355 b4_declare_parser_state_variables.
5356 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
5357 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
5358 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
5359 (yyparse or yypush_parse): For yyparse in pull mode, replace local
5360 parser state variable declarations with
5361 b4_declare_parser_state_variables.
5362 Don't initialize parser state variables when calling yypush_parse since
5363 yypstate_new already does that.
5364 Invoke the user's initial action only upon the first yypush_parse
5365 invocation.
5366 Remove all code that copies between the local parser state variables
5367 and the yypstate.
5368
5369 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5370
5371 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
5372 prevent a name collision in a future patch where these names will
5373 sometimes be #define'd.
5374 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
5375 since it no longer has the same name as the existing argument.
5376 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
5377
5378 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
5379 and Joel E. Denny <jdenny@ces.clemson.edu>
5380
5381 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
5382 that the argument is case-insensitive, and there's no `=' here.
5383 For the %skeleton entry, mention that %language is better.
5384 (Bison Options): Likewise for --language and --skeleton. Move the
5385 --skeleton entry so that the `Tuning the parser' section is sorted
5386 alphabetically on long options.
5387 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
5388 %language directive in detail here; cross-reference the %language
5389 documentation instead.
5390 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
5391 `%require "2.3b"' so that the example is always up-to-date.
5392 (Table of Symbols): Add entries for %language and %skeleton.
5393 * examples/extexi (normalize): Instead of replacing every %require
5394 argument with the current Bison version, just substitute for
5395 `@value{VERSION}'. This guarantees that we're testing what actually
5396 appears in the documentation.
5397 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
5398 rather than `@VERSION@'.
5399
5400 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
5401
5402 * NEWS: Reword the %language news a bit, and put it earlier.
5403
5404 * src/getargs.c (skeleton_arg): Last arg is now location const *.
5405 Rewrite to simplify the logic.
5406 (language_argmatch): Likewise.
5407 (program_name): We now own this var.
5408 * src/getargs.h (struct bison_language): Use char[] rather than
5409 const char *.
5410
5411 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
5412 Java is supported.
5413 * src/complain.c (program_name): Remove decl; no longer needed.
5414 * src/main.c (program_name): Remove; now belongs to getargs.
5415
5416 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
5417
5418 * NEWS: Document %language.
5419
5420 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
5421
5422 * data/c-skel.m4, data/c++-skel.m4: New files.
5423 * data/glr.c: Complain on push parsers.
5424
5425 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
5426 over %skeleton.
5427 (Decl Summary): Document %language and %skeleton.
5428 (Command line): Document -L.
5429
5430 * examples/extexi: Rewrite %require directive.
5431 * examples/calc++/Makefile.am: Pass VERSION to extexi.
5432
5433 * src/files.c (compute_exts_from_gc): Look in language structure
5434 for .y extension.
5435 (compute_file_name_parts): Check whether .tab should be added.
5436 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
5437 (language, skeleton_arg, language_argmatch): New.
5438 (long_options): Add --language.
5439 (getargs): Use skeleton_arg, add -L/--language.
5440 * src/getargs.h: Include location.h.
5441 (struct bison_language, language, skeleton_arg, language_argmatch): New.
5442 * src/output.c (prepare): Pick default skeleton from struct language.
5443 Don't dispatch C skeletons here.
5444 * src/parse-gram.y (PERCENT_LANGUAGE): New.
5445 (prologue_declaration): Add "%language" rule, use skeleton_arg.
5446 * src/scan-gram.l ("%language"): New rule.
5447
5448 * tests/calc.at: Test %skeleton and %language.
5449 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
5450 (AT_GLR_IF): Look for %skeleton "glr.cc".
5451 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
5452 (AT_YACC_IF): Reject %language.
5453
5454 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
5455
5456 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
5457 since it wasn't used; only the typedef name 'semantic_type' is needed.
5458 Also, omit trailing white space.
5459
5460 * bootstrap: Sync from coreutils.
5461 (gnulib_extra_files): Add build-aux/announce.gen.
5462 (slurp): Adjust .gitignore files like .cvsignore files.
5463 * build-aux/announce-gen: Remove from CVS, since bootstrap
5464 now creates this.
5465
5466 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
5467
5468 Make %push-parser imply %pure-parser. This fixes several bugs; see
5469 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
5470 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
5471 pure_parser = true.
5472 * data/push.c: Don't bother testing b4_push_if when deciding whether
5473 to expand b4_declare_parser_variables globally.
5474 (yypush_parse): Likewise in here.
5475
5476 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
5477 (yy_reduce_print): Reformat M4 for readability.
5478
5479 2006-12-15 Bob Rossi <bob@brasko.net>
5480 and Joel Denny <jdenny@ces.clemson.edu>
5481
5482 * data/push.c (yypstate): Add typedef, and update all uses of
5483 struct yypstate to just yypstate.
5484 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
5485
5486 2006-12-14 Bob Rossi <bob@brasko.net>
5487
5488 * data/push.c (yypush_parse): Declare prototype regardless of
5489 %locations option.
5490
5491 2006-12-14 Bob Rossi <bob@brasko.net>
5492
5493 * data/push.c (yyparse): Remove the prototype and the #define when in
5494 push-parser mode.
5495
5496 2006-12-13 Bob Rossi <bob@brasko.net>
5497
5498 * data/push.c (yypstate_init): Rename to...
5499 (yypstate_new): ... this and use b4_c_function_def.
5500 (yypstate_delete): New.
5501 (yypush_parse): Change parameters yynval and yynlloc to be const.
5502 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
5503 yypstate_delete functions.
5504
5505 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
5506
5507 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
5508 strange test case titles. Reported by Bob Rossi.
5509
5510 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
5511
5512 * TODO: Add pointer to Sylvain Schmitz's work on static detection
5513 of potential ambiguities in GLR grammers.
5514
5515 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
5516
5517 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
5518 `bison ', use m4_index instead of m4_substr since chopping up a string
5519 containing M4-special characters causes problems here.
5520
5521 Fix a couple of bugs related to special characters in user-specified
5522 file names, and make it easier for skeletons to compute output file
5523 names with the same file name prefix as Bison-computed output file
5524 names.
5525 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
5526 b4_parser_file_name and b4_spec_defines_file instead of
5527 @output_parser_name@ and @output_header_name@, which are now redundant.
5528 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
5529 b4_parser_file_name, b4_spec_defines_file, and the new
5530 @basename(FILENAME@) instead of @output_parser_name@ and
5531 @output_header_name@, which inappropriately escaped the file names as
5532 C string literals.
5533 * src/files.c (all_but_ext): Remove static qualifier.
5534 (compute_output_file_names): Move `free (all_but_ext)' to...
5535 (output_file_names_free): ... here since all_but_ext is needed later.
5536 * src/files.h (all_but_ext): Extern.
5537 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
5538 exactly what MUSCLE_INSERT_STRING used to do.
5539 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
5540 characters are escaped properly.
5541 * src/output.c (prepare): Define muscle file_name_all_but_ext as
5542 all_but_ext.
5543 For pkgdatadir muscle, maintain previous functionality by using
5544 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
5545 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
5546 digraphs would never be expanded. Hopefully no one has M4-special
5547 characters in his Bison installation path.
5548 * src/scan-skel.l: Don't parse @output_header_name@ and
5549 @output_parser_name@ anymore since they're now redundant.
5550 In @output, use decode_at_digraphs.
5551 Parse a new @basename command that invokes last_component.
5552 (decode_at_digraphs): New.
5553 (BASE_QPUTS): Remove unused.
5554 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
5555 (Output file name): New tests.
5556
5557 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
5558
5559 Warn about output files that are generated by the skeletons and that
5560 conflict with other output files.
5561 * data/glr.c: Don't generate the header file here when glr.cc does.
5562 * src/files.c (file_names, file_names_count): New static globals.
5563 (compute_output_file_names): Invoke output_file_name_check for files
5564 not generated by the skeletons and remove existing checks.
5565 (output_file_name_check): New function that warns about conflicting
5566 output file names.
5567 (output_file_names_free): Free file_names.
5568 * src/files.h (output_file_name_check): Declare.
5569 * src/scan-skel.l: Invoke output_file_name_check for files generated by
5570 the skeletons.
5571 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
5572 (Conflicting output files): New tests.
5573
5574 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5575
5576 * doc/bison.texinfo: Fix a couple of typos.
5577
5578 2006-12-08 Bob Rossi <bob@brasko.net>
5579
5580 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
5581 Rename to...
5582 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
5583 update all uses.
5584 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
5585 (yypush_parse): Rename yypvars argument to yyps and remove redundant
5586 local pv.
5587 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
5588 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
5589
5590 2006-12-07 Bob Rossi <bob@brasko.net>
5591 and Joel Denny <jdenny@ces.clemson.edu>
5592
5593 * data/push.c (yypvarsinit): Change return type from void* to struct
5594 yypvars*. No longer cast to void* on return.
5595 (struct yypvars): Remove yylen since it need not be remembered between
5596 yypushparse invocations.
5597 (yypushparse): Don't copy between yylen and pv->yylen.
5598
5599 2006-12-05 Bob Rossi <bob@brasko.net>
5600
5601 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
5602 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
5603 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
5604 (struct yypvars): Remove b4_declare_parser_variables.
5605 (yypvarsinit): Remove init code for removed variables.
5606 (global scope): Do not declare b4_declare_parser_variables if
5607 push or pure mode.
5608 (yypushparse): Add b4_declare_parser_variables.
5609 Init new local variables, and remove init code for removed
5610 yypvars variables.
5611 (yyparse): Delete.
5612 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
5613 and yyparse for other modes.
5614 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
5615 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
5616 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
5617 (AT_PURE_LEX_IF): True if pure or push parser.
5618
5619 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
5620
5621 Document Yacc prologue alternatives and default %destructor's and
5622 %printer's as experimental. Don't mention Java yet. Discussed at
5623 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
5624 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
5625 (2.3a): Annotate this entry to say the old forms of these features were
5626 also experimental.
5627 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
5628 Table of Symbols): Say they're experimental. Comment out any mention
5629 of Java (we'll want this back eventually).
5630
5631 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
5632
5633 Support a file name argument to %defines. Deprecate `=' in
5634 %file-prefix, %name-prefix, and %output. Discussed at
5635 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
5636 * NEWS (2.3a+): Mention.
5637 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
5638 form of %defines, and remove `=' from entries for %file-prefix,
5639 %name-prefix, and %output.
5640 * src/parse-gram.y (prologue_declaration): Implement.
5641 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
5642 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
5643 all but one occurrence of %name-prefix.
5644 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
5645 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
5646 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
5647 occurrence of each of %file-prefix and %output. Add check for %defines
5648 with argument.
5649 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
5650 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
5651 Remove the `=' from %output.
5652
5653 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
5654
5655 Don't escape $ in test case titles since Autoconf 2.61 now does that
5656 correctly.
5657 * tests/actions.at (Default %printer and %destructor are not for error
5658 or $undefined): Here.
5659 (Default %printer and %destructor are not for $accept): Here.
5660 * tests/input.at (Invalid $n and @n): Here.
5661
5662 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
5663
5664 Rename <!> to <>. Discussed starting at
5665 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
5666 * NEWS (2.3a+): Update.
5667 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
5668 Update.
5669 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
5670 * src/scan-gram.l (INITIAL): Implement.
5671 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
5672 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
5673 comment.
5674 * tests/actions.at (Default tagless %printer and %destructor,
5675 Default tagged and per-type %printer and %destructor,
5676 Default %printer and %destructor are not for error or $undefined,
5677 Default %printer and %destructor are not for $accept,
5678 Default %printer and %destructor for mid-rule values): Update.
5679 * tests/input.at (Default %printer and %destructor redeclared,
5680 Unused values with default %destructor): Update.
5681
5682 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
5683
5684 Don't let %prec take a nonterminal.
5685 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
5686 token.
5687 * tests/input.at (%prec takes a token): New test checking that %prec
5688 won't take a nonterminal.
5689
5690 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5691
5692 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
5693 it was double-quoted.
5694 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
5695 grammar is maintained with Bison's highest standards.
5696 * src/getargs.c: Fix some typos in Doxygen comments.
5697
5698 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5699
5700 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
5701 later. Reported by Paul Eggert in
5702 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
5703 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
5704 * src/scan-code.l (translate_action): Don't bother invoking
5705 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
5706 (code_scanner_free): Instead of invoking
5707 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
5708 which frees more.
5709 * src/scan-gram.l (gram_scanner_free): Likewise.
5710 * src/scan-skel.l (scan_skel): Likewise.
5711
5712 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
5713
5714 * src/files.c (tr): Change return type to void.
5715 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
5716 has been called previously for the same key.
5717 (muscle_find): Return storage instead of value so that
5718 --enable-gcc-warnings doesn't produce warnings that the return discards
5719 const. aver that the value and storage are the same since storage
5720 could potentially be NULL when value is not.
5721 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
5722 same as 0.
5723
5724 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
5725
5726 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
5727 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
5728 us a slightly cleaner distribution, and also works.
5729 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
5730 gnulib changes.
5731
5732 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
5733 and Paul Eggert <eggert@cs.ucla.edu>
5734
5735 Don't let Bison leak memory except when it complains.
5736 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
5737 (spec_defines_file, dir_prefix): Now char *, not const char *,
5738 since they are freed.
5739 * src/files.c: Likewise.
5740 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
5741 Likewise.
5742 (tr): Now operates in-place. All uses changed.
5743 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
5744 values.
5745 (compute_file_name_parts, compute_output_file_names): Don't store
5746 read-only data in variables that will be freed.
5747 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
5748 src_extension, and header_extension.
5749 (output_file_names_free): New public function to free
5750 spec_verbose_file, spec_graph_file, spec_defines_file,
5751 parser_file_name, and dir_prefix.
5752 * src/getargs.c (getargs): Don't store read-only data in variables that
5753 will be freed.
5754 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
5755 (which previously existed but was unused), and quotearg_free.
5756 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
5757 * src/muscle_tab.c: Likewise.
5758 (muscle_entry): Make the value char const *,
5759 and add a new storage member that is char * and can be freed.
5760 (muscle_entry_free): New private function.
5761 (muscle_init): Use it instead of free.
5762 (muscle_insert, muscle_grow): Update and use new storage member.
5763 (muscle_code_grow): Free the string passed to muscle_grow
5764 since it's not needed anymore.
5765 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
5766 add a new `char *code' member.
5767 ("{...}"): Declare semantic type as code.
5768 * src/scan-code.h (translate_rule_action):
5769 (translate_symbol_action, translate_code, translate_action): Return
5770 `char const *' rather than `char *' since external code should not free
5771 these strings.
5772 * src/scan-code.l: Likewise.
5773 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
5774 which is "{...}" in the parser.
5775 * tests/Makefile.am (maintainer-check-valgrind): Set
5776 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
5777 Valgrind.
5778 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
5779 complain.
5780 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
5781 expecting a non-zero exit status sets --leak-check=summary and
5782 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
5783 this case, and we don't want to hear about it.
5784
5785 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
5786
5787 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
5788 instead of from the template, to simplify configuration a bit.
5789 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
5790 and m4/wint_t.m4, as they are needed with the latest gnulib.
5791
5792 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5793
5794 Disable unset/unused mid-rule value warnings by default, and recognize
5795 --warnings=midrule-values to enable them. Discussed starting at
5796 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
5797 * NEWS (2.3a+): Mention.
5798 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
5799 warnings): Add entry for midrule-values subargument.
5800 * src/reader.c (symbol_should_be_used): Don't return true just because
5801 the value is a set/used mid-rule value unless
5802 --warnings=midrule-values was specified.
5803 * tests/input.at (Unused values, Unused values before symbol
5804 declarations): Run tests with and without --warnings=midrule-values.
5805
5806 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
5807 than LIST_FREE directly.
5808
5809 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5810
5811 Finish implementing --warnings=error, which should not be implied by
5812 --warnings=all (or by its synonyms -W and --warnings without
5813 subarguments).
5814 * src/complain.c (set_warning_issued): New function to report that
5815 warnings are being treated as errors and to record an error if so.
5816 Invoke...
5817 (warn_at, warn): ... here.
5818 * src/getargs.c (warnings_args, warnings_types): Reorder so that
5819 "error - warnings are errors" does not appear above "all - all of the
5820 above".
5821 (getargs): For -W and --warnings without subarguments, don't let
5822 FLAGS_ARGMATCH set warnings_error in warnings_flag.
5823 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
5824
5825 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5826
5827 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
5828 empty subargument list. For example: `bison --warnings= parser.y'.
5829
5830 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5831
5832 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
5833 the parser header file so that gcc doesn't warn.
5834
5835 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5836
5837 Split the default %destructor/%printer into two kinds: <*> and <!>.
5838 Discussed starting at
5839 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
5840 * NEWS (2.3a+): Mention.
5841 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
5842 previous change today related to mid-rules.
5843 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
5844 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
5845 (TYPE_TAG_ANY): Add as <*>.
5846 (TYPE_TAG_NONE): Add as <!>.
5847 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
5848 for <*> and <!>.
5849 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
5850 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
5851 * src/symlist.c (symbol_list_default_new): Split into tagged and
5852 tagless versions.
5853 (symbol_list_destructor_set, symbol_list_printer_set): Split
5854 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
5855 SYMLIST_DEFAULT_TAGLESS.
5856 * src/symlist.h: Update symbol_list_default*_new prototypes.
5857 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
5858 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
5859 * src/symtab.c (default_destructor, default_destructor_location,
5860 default_printer, default_printer_location): Split each into tagged and
5861 tagless versions.
5862 (symbol_destructor_get, symbol_destructor_location_get,
5863 symbol_printer_get, symbol_printer_location_get): Implement tagged
5864 default and tagless default cases.
5865 (default_destructor_set, default_printer_set): Split each into tagged
5866 and tagless versions.
5867 * src/symtab.h: Update prototypes.
5868 * tests/actions.at (Default %printer and %destructor): Rename to...
5869 (Default tagless %printer and %destructor): ... this, and extend.
5870 (Per-type %printer and %destructor): Rename to...
5871 (Default tagged and per-type %printer and %destructor): ... this, and
5872 extend.
5873 (Default %printer and %destructor for user-defined end token): Extend.
5874 (Default %printer and %destructor are not for error or $undefined):
5875 Update.
5876 (Default %printer and %destructor are not for $accept): Update.
5877 (Default %printer and %destructor for mid-rule values): Extend.
5878 * tests/input.at (Default %printer and %destructor redeclared): Extend.
5879 (Unused values with default %destructor): Extend.
5880
5881 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5882
5883 Don't apply the default %destructor/%printer to an unreferenced midrule
5884 value. Mentioned at
5885 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
5886 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
5887 like $@n instead of just @n so that the default %destructor/%printer
5888 logic doesn't see them as user-defined symbols.
5889 (symbol_is_dummy): Check for both forms of the name.
5890 * src/reader.c (packgram): Remove the `$' from each midrule symbol
5891 name for which the midrule value is referenced in any action.
5892 * tests/actions.at (Default %printer and %destructor for mid-rule
5893 values): New test.
5894 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
5895 for change to dummy symbol names.
5896
5897 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
5898
5899 Warn about unset midrule $$ if the corresponding $n is used.
5900 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
5901 $n usage.
5902 (packgram): Before invoking grammar_rule_check on any rule, make sure
5903 all actions have already been scanned in order to set `used' flags.
5904 Otherwise, checking that a midrule's $$ is set will not always work
5905 properly because the midrule check must forward-reference the midrule's
5906 parent rule.
5907 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
5908 warning.
5909
5910 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
5911
5912 More improvements to the documentation of the prologue alternatives:
5913 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
5914 Bison manual.
5915 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
5916 some text to clarify the relative importance of the new directives and
5917 to show how these directives may be viewed as code labels.
5918
5919 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
5920
5921 Similar to the recently removed %before-header, add %code-top as the
5922 alternative to the pre-prologue. Mentioned at
5923 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
5924 Also, let the prologue alternatives appear in the grammar section.
5925 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
5926 (prologue_declaration): Move the existing prologue alternatives to...
5927 (grammar_declaration): ... here and add %code-top.
5928 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
5929
5930 Clean up and extend documentation for the prologue alternatives.
5931 * NEWS (2.3a+): Describe prologue alternatives.
5932 * doc/bison.texinfo (Prologue): Move discussion of prologue
5933 alternatives to...
5934 (Prologue Alternatives): ... this new section, and extend it to discuss
5935 all 4 directives in detail.
5936 (Table of Symbols): Clean up discussion of prologue alternatives and
5937 add %code-top.
5938
5939 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5940
5941 DJGPP specific issues.
5942
5943 * djgpp/config.bat: config.hin has been moved to lib. Adjust
5944 config.bat accordingly.
5945 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
5946 * djgpp/config.site: Likewise.
5947
5948 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
5949
5950 Replace %*-header with %provides, %requires, %code. See discussion at
5951 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
5952
5953 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
5954 (b4_user_start_header): Remove.
5955 * data/glr.c: Use new macros instead of b4_*start_header
5956 and b4_*end_header.
5957 * data/glr.cc: Likewise.
5958 * data/lalr1.cc: Likewise.
5959 * data/push.c: Likewise.
5960 * data/yacc.c: Likewise.
5961
5962 * doc/bison.texinfo: Remove %before-header, rename
5963 %{start,end,after}-header to %requires, %provides, %code.
5964
5965 * src/parse-gram.y: Likewise (also rename token names accordingly).
5966 * src/scan-gram.l: Likewise.
5967 * tests/actions.at: Likewise.
5968
5969 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
5970
5971 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
5972 Problem reported by Joel E. Denny.
5973
5974 2006-10-14 Jim Meyering <jim@meyering.net>
5975
5976 (Sync from coreutils.)
5977 Work also when the working directory (with e.g. coreutils sources)
5978 is version controlled with git, rather than CVS.
5979 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
5980 rather than CVS.
5981 In messages and comments, say e.g., "checked-out sources",
5982 rather than "CVS sources".
5983 (version_controlled_file): New function. Work for git as well as
5984 for CVS. Don't use grep's -q option.
5985 (slurp): Call it here, in place of CVS-specific code.
5986
5987 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
5988
5989 Fix testsuite for ./configure --enable-gcc-warnings:
5990 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
5991 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
5992 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
5993 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
5994 * test/regression.at (Diagnostic that expects two alternatives):
5995 Likewise.
5996
5997 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
5998
5999 * bootstrap.conf (gnulib_modules): Add config-h.
6000 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
6001 worry about HAVE_CONFIG_H.
6002 * lib/abitset.c: Likewise.
6003 * lib/bitset.c: Likewise.
6004 * lib/bitset_stats.c: Likewise.
6005 * lib/bitsetv-print.c: Likewise.
6006 * lib/bitsetv.c: Likewise.
6007 * lib/ebitset.c: Likewise.
6008 * lib/get-errno.c: Likewise.
6009 * lib/lbitset.c: Likewise.
6010 * lib/subpipe.c: Likewise.
6011 * lib/timevar.c: Likewise.
6012 * lib/vbitset.c: Likewise.
6013 * lib/bitset.c: Include "bitset.h" first, to test interface.
6014 * lib/bitset_stats.c: Include "bitset_stats.h" first.
6015 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
6016 * lib/bitsetv.c: Include "bitsetv.h" first.
6017 * lib/get-errno.c: Include "get-errno.h" first.
6018 * m4/.cvsignore: Add config-h.m4.
6019 * tests/actions.at (Default %printer and %destructor for ...):
6020 Adjust expected line numbers in output to reflect removal of #if
6021 HAVE_CONFIG_H lines.
6022 * tests/glr-regression.at (Missed %merge type warnings when ...):
6023 Likewise.
6024 * tests/regression.at (Braced code in declaration in rules section):
6025 Likewise.
6026 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
6027 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
6028 Include <config.h> unconditionally.
6029
6030 * bootstrap: Sync from coreutils, as follows:
6031
6032 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6033
6034 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
6035 variable was sometimes used without being initialized. This
6036 messed up the installation of the INSTALL file in some cases.
6037
6038 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6039
6040 * bootstrap (usage, main program, symlink_to_gnulib): Add option
6041 --copy. Inspired by a suggestion from Bruno Haible.
6042
6043 2006-10-03 Jim Meyering <jim@meyering.net>
6044
6045 * bootstrap: Undo last change to this file, since now gnulib-tool
6046 sticks with the automake default in generating dependencies.
6047
6048 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6049
6050 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
6051 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
6052
6053 * doc/bison.1: Add copyright notice.
6054
6055 * data/glr.c: Don't include <stdarg.h>; not used.
6056
6057 * NEWS: The -g and --graph options now output graphs in Graphviz
6058 DOT format, not VCG format.
6059 * doc/bison.1: Likewise.
6060 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
6061 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
6062 of this change in
6063 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
6064 * TODO: Remove Graphviz entry.
6065 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
6066 remove vcg.c, vcg.h, vcg_defaults.h.
6067 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
6068 * src/graphviz.c, src/graphviz.h: New files.
6069 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
6070 * src/files.h: Make comment more generic.
6071 * src/main.c (main): Likewise.
6072 * src/print_graph.h: Likewise.
6073 * src/getargs.c (usage): Make usage description more generic.
6074 * src/print_graph.c: Include graphviz.h rather than vcg.h.
6075 (static_graph, fgraph): Remove. All uses changed to pass
6076 arguments instead of sharing a static var.
6077 (print_core, print_actions, print_state, print_graph):
6078 Output graphviz format rather than VCG format.
6079 * tests/.cvsignore: Remove *.vcg; add *.dot.
6080 * tests/output.at: Expect *.dot files, not *.vcg files.
6081
6082 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
6083 accommodates the 2006-10-08 change.
6084
6085 2006-10-11 Bob Rossi <bob@brasko.net>
6086
6087 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
6088 (b4_yyssa, b4_yyerror_range): New macros.
6089 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
6090 (yypvarsinit): Remove init of removed fields.
6091 (yypushparse): Remove use of removed fields; use new macros instead.
6092
6093 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6094
6095 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
6096 in a push parser. Reindent slightly to match yacc.c better.
6097
6098 2006-10-11 Bob Rossi <bob@brasko.net>
6099
6100 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
6101 yymsg_alloc fields.
6102 (yypvarsinit, yypushparse): Remove init of removed fields.
6103 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
6104
6105 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6106
6107 * THANKS: Add Paolo Bonzini and Bob Rossi.
6108
6109 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
6110
6111 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
6112 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
6113 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
6114 b4_define_user_cde and uses): Remove.
6115 (b4_comment, b4_prefix, b4_sync_start): New.
6116 * data/bison.m4: New file, with most of the content removed from c.m4.
6117 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
6118 * src/output.c (output_skeleton): Pass bison.m4.
6119 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
6120 only if specified.
6121
6122 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
6123
6124 Fix test failure reported by Tom Lane in
6125 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
6126 and try to make such failures easier to catch in the future.
6127 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
6128 that's now the caller's responsibility.
6129 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
6130 Set yychar = YYEOF if it's negative.
6131 * tests/actions.at (yylex): Abort if asked to read past EOF.
6132 * tests/conflicts.at (yylex): Likewise.
6133 * tests/cxx-type.at (yylex): Likewise.
6134 * tests/glr-regression.at (yylex): Likewise.
6135 * tests/input.at (yylex): Likewise.
6136 * tests/regression.at (yylex): Likewise.
6137 * tests/torture.at (yylex): Likewise.
6138
6139 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
6140
6141 Fix problems with translating English-language diagnostics.
6142 * bootstrap: Fix bug introduced in recent bootstrap changes, with
6143 respect to bison-runtime pot generation. The YY_ stuff
6144 wasn't being captured.
6145 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
6146 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
6147 * runtime-po/POTFILES.in: Add data/push.c.
6148
6149 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
6150
6151 Merge bootstrap changes from coreutils.
6152
6153 2006-09-28 Jim Meyering <jim@meyering.net>
6154
6155 Automatically generated dependencies are important even
6156 when all of the sources in a directory come from gnulib.
6157 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
6158 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
6159
6160 2006-09-23 Jim Meyering <jim@meyering.net>
6161
6162 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
6163
6164 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6165
6166 * bootstrap: Add support for --force.
6167 (usage): New function. Describe usage less tersely.
6168 (CVS_only_file): New var.
6169
6170 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
6171
6172 * data/push.c (YYPUSH_MORE): Make it an enum instead.
6173 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
6174 Adjust white space and comments to match GNU style better.
6175
6176 2006-09-20 Bob Rossi <bob@brasko.net>
6177
6178 * data/push.c (yyresult_get): Remove function.
6179 (YYPUSH_MORE): Add #define.
6180 (yypushparse): Modify return value.
6181
6182 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6183
6184 * stamp-h.in: Remove; no longer needed.
6185 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
6186 Remove config.h, config.hin, intl (no longer created).
6187 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
6188 stamp-h1.
6189
6190 Sync bootstrap from coreutils, as follows:
6191
6192 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
6193
6194 * bootstrap (symlink_to_gnulib): New function.
6195 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
6196 to copies-of-gnulib.
6197 (cp_mark_as_generated, slurp, gnulib_files):
6198 Avoid making a copy if it's the same as the old version.
6199 (gnulib_files): Add support for this variable (used by Bison).
6200
6201 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6202
6203 * src/getargs.c (usage): Rework to use conventions similar to
6204 coreutils, to make translation a bit easier and the code a bit
6205 smaller. Problem reported by Tim Van Holder.
6206
6207 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
6208
6209 Use some of gnulib's new modules, taken from coreutils.
6210
6211 * bootstrap: Sync from coreutils, except add support for gnulib_files.
6212 * bootstrap.conf: New file.
6213 (gnulib_modules): Add configmake, inttypes, unistd.
6214 (XGETTEXT_OPTIONS): Add complain, complain_at,
6215 fatal, fatal_at, warn, warn_at, unexpected_end.
6216 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
6217 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
6218 (gl_EARLY): Add.
6219 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
6220 (gl_INIT): Add
6221 (GNULIB_AUTOCONF_SNIPPET): Remove.
6222 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
6223 the pickiest.
6224 * lib/.cvsignore: Add inttypes_.h.
6225 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
6226 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
6227 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
6228 no-longer-necessary initializations.
6229 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
6230 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
6231 use the unistd module.
6232 * src/system.h: Likewise.
6233 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
6234 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
6235 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
6236 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
6237 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
6238 * src/system.h: Include inttypes.h unconditionally, now that we
6239 use the inttypes module. Don't bother to include stdint.h, since
6240 inttypes.h now does that for us.
6241 (LOCALEDIR): Remove, now that we use the configmake module.
6242 * src/getargs.c: Include configmake.h.
6243 * src/main.c: Likewise.
6244 * src/output.c: Likewise.
6245 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
6246 not from $abs_top_builddir, since config.h moved.
6247
6248
6249 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
6250 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
6251
6252 * src/parse-gram.y (symbol_declaration): Don't put statements
6253 before declarations; it's not portable to C89.
6254 * src/scan-code.l (handle_action_at): Likewise.
6255
6256 * src/scan-code.l: Always initialize braces_level; the old code
6257 left it uninitialized and therefore had undefined behavior.
6258
6259 Don't attempt to redefine 'assert', since it runs afoul of
6260 systems where standard headers (mistakenly) include <assert.h>.
6261 Instead, define and use our own alternative, called 'aver'.
6262 * src/reader.c: Don't include assert.h, since we no longer
6263 use assert.
6264 * src/scan-code.l: Likewise.
6265 * src/system.h (assert): Remove, replacing with....
6266 (aver): New function, taking a bool arg. All uses changed.
6267 * src/tables.c (pack_vector): Ensure that aver arg is bool,
6268 not merely an integer.
6269
6270 2006-09-15 Bob Rossi <bob@brasko.net>
6271
6272 Add support for push parsing. Based on the original work of
6273 Odd Arild Olsen <oao@fibula.no>.
6274 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
6275 * data/c.m4 (YYPUSH): New.
6276 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
6277 * data/push.c: New file.
6278 * src/getargs.c (push_parser): New var.
6279 * src/getargs.h (push_parser): New declaration.
6280 * src/output.c (prepare): Add macro insertion of `push_flag'.
6281 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
6282 (prologue_declaration): Parse %push-parser.
6283 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
6284 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
6285 list of removed lines from the traces observed.
6286 (AT_CHECK_CALC_LALR): Added push parser tests.
6287
6288 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
6289
6290 * NEWS: Version 2.3a.
6291 * configure.ac (AC_INIT): Likewise.
6292
6293 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
6294 "#define YYSTYPE int" that caused "make maintainer-check" to fail
6295 due to header ordering dependencies. I don't know why the #define
6296 was there.
6297
6298 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
6299 runtime cost when YYDEBUG is not defined, and so that some tests
6300 that used to fail now work. Problem and initial suggestion by
6301 Paolo Bonzini.
6302 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
6303 * data/glr.cc (b4_parser_class_name):
6304 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
6305 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
6306 (yydebug_) [YYDEBUG]: New member.
6307 (yycdebug_): Now defined only if YYDEBUG.
6308 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
6309 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
6310 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
6311 if YYYDEBUG.
6312 (debug_stream, set_debug_stream, debug_level, set_debug_level):
6313 Define only if YYDEBUG.
6314 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
6315 set_debug_level.
6316 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
6317 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
6318 AT_CHECK_CALC_GLR_CC that are working now.
6319
6320 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
6321
6322 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
6323 We don't need them in glr.cc, and glr.c defines them.
6324 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
6325 assumes that defining it to anything is the same as defining
6326 it to 1. Problem reported by Paolo Bonzini.
6327
6328 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
6329
6330 * data/c.m4 (b4_null, b4_case): Define.
6331 * src/output.c (prepare_symbols): Use b4_null.
6332 (user_actions_output): Use b4_case.
6333
6334 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
6335
6336 * data/glr.c (b4_shared_declarations): Put start-header first,
6337 before any #includes that we generate, so that feature-test
6338 macros work. Problem reported by Michael Deutschmann in
6339 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
6340 * data/lalr1.cc: Likewise.
6341 * doc/bison.texinfo (Prologue): Document that feature-test macros
6342 should be defined before any Bison declarations.
6343 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
6344 that depend on location.hh after, not before, Bison decls, since
6345 we now include location.hh after the first user prologue.
6346
6347 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
6348 Sander Brandenburg in
6349 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
6350 Also, fix minor white space and comment issues.
6351 (Prologue): Mention that it's better to define feature-test macros
6352 before Bison declarations. Problem reported by Michael Deutschmann.
6353
6354 * README-cvs: Fix typo: "&" should be "&&". Problem reported
6355 by Jim Meyering.
6356 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
6357 This adjusts to recent gnulib changes.
6358
6359 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
6360
6361 Finish implementation of per-type %destructor/%printer. Discussed
6362 starting at
6363 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
6364 and
6365 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
6366 * NEWS (2.3+): Add a description of this feature to the default
6367 %destructor/%printer description.
6368 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
6369 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
6370 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
6371 list node contains a semantic type.
6372 * src/symtab.c, src/symtab.h: Extend with a table that associates
6373 semantic types with their %destructor's and %printer's.
6374 (semantic_type_from_uniqstr, semantic_type_get,
6375 semantic_type_destructor_set, semantic_type_printer_set): New functions
6376 composing the public interface of that table.
6377 (symbol_destructor_get, symbol_destructor_location_get,
6378 symbol_printer_get, symbol_printer_location_get): If there's no
6379 per-symbol %destructor/%printer, look up the per-type before trying
6380 the default.
6381 * tests/actions.at (Per-type %printer and %destructor): New test case.
6382 * tests/input.at (Default %printer and %destructor redeclared):
6383 Extend to check that multiple occurrences of %symbol-default in a
6384 single %destructor/%printer declaration is an error.
6385 (Per-type %printer and %destructor redeclared, Unused values with
6386 per-type %destructor): New test cases.
6387
6388 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
6389
6390 Require default %destructor/%printer to be declared using
6391 %symbol-default instead of an empty symbol list, and start working on
6392 new per-type %destructor/%printer. Discussed at
6393 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
6394 * NEWS (2.3+): Add %symbol-default to example.
6395 * bison.texinfo (Freeing Discarded Symbols): Likewise.
6396 (Table of Symbols): Add entry for %symbol-default.
6397 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
6398 (generic_symlist, generic_symlist_item): New nonterminals for creating
6399 a list in which each item is a symbol, semantic type, or
6400 %symbol-default.
6401 (grammar_declaration): Use generic_symlist in %destructor and %printer
6402 declarations instead of symbols.1 or an empty list.
6403 (symbol_declaration, precedence_declaration, symbols.1): Update actions
6404 for changes to symbol_list.
6405 * src/reader.c: Update for changes to symbol_list.
6406 * src/scan-code.l: Likewise.
6407 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
6408 * src/symlist.c, src/symlist.h: Extend such that a list node may
6409 represent a semantic type or a %symbol-default in addition to just an
6410 ordinary symbol. Add switched functions for setting %destructor's and
6411 %printer's.
6412 * tests/actions.at, tests/input.at: Add %symbol-default to all default
6413 %destructor/%printer declarations.
6414
6415 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
6416
6417 Whether the default %destructor/%printer applies to a particular symbol
6418 isn't a question of whether the user *declares* that symbol (in %token,
6419 for example). It's a question of whether the user by any means
6420 *defines* the symbol at all (by simply using a char token, for
6421 example). $end is defined by Bison whereas any other token with token
6422 number 0 is defined by the user. The error token is always defined by
6423 Bison regardless of whether the user declares it with %token, but we
6424 may one day let the user define error as a nonterminal instead.
6425 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
6426 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
6427 the meaning of "user-defined".
6428 * tests/actions.at (Default %printer and %destructor for user-declared
6429 end token): Rename to...
6430 (Default %printer and %destructor for user-defined end token): ...
6431 this.
6432
6433 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
6434 computation of whether to apply the default, don't maintain a list of
6435 every Bison-defined symbol. Instead, just check for a first character
6436 of '$', which a user symbol cannot have, and check for the error token.
6437
6438 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
6439
6440 Don't apply the default %destructor or %printer to the error token,
6441 $undefined, or $accept. This change fits the general rule that the
6442 default %destructor and %printer are only for user-declared symbols,
6443 and it solves several difficulties that are described in the new test
6444 cases listed below.
6445 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
6446 * tests/actions.at (Default %printer and %destructor are not for error
6447 or $undefined, Default %printer and %destructor are not for $accept):
6448 New test cases.
6449
6450 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
6451
6452 Allow %start after the first rule.
6453 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
6454 when parsing the first rule.
6455 (check_and_convert_grammar): Search for it here after all grammar
6456 declarations have been parsed. Skip midrules, which have dummy LHS
6457 nonterminals.
6458 * src/symtab.c (symbol_is_dummy): New function.
6459 * src/symtab.h (symbol_is_dummy): Declare it.
6460 * tests/input.at (%start after first rule): New test.
6461
6462 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
6463
6464 Redo some of the previous commit: add back the ability to use
6465 non-aliased/undeclared string literals since it might be useful to
6466 those declaring %token-table.
6467 * src/reader.c (check_and_convert_grammar): Undo changes in previous
6468 commit: don't worry about complaints from symbols_pack.
6469 * src/symtab.c (symbol_new, symbol_class_set,
6470 symbol_check_alias_consistency): Undo changes in previous commit: count
6471 each string literal as a new symbol and token, assign it a symbol
6472 number, and don't complain about non-aliased string literals.
6473 (symbols_pack): Since symbol_make_alias still does not decrement symbol
6474 and token counts but does still set aliased tokens to the same number,
6475 symbol_pack_processor now leaves empty slots in the symbols array.
6476 Remove those slots.
6477 * tests/regression.at (Undeclared string literal): Remove test case
6478 added in previous commit since non-aliased string literals are allowed
6479 again.
6480 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
6481 remove unnecessary string literal declarations.
6482 * tests/sets.at (Firsts): Likewise.
6483
6484 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
6485
6486 Don't allow an undeclared string literal, but allow a string literal to
6487 be used before its declaration.
6488 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
6489 symbols_pack complained.
6490 * src/symtab.c (symbol_new): Don't count a string literal as a new
6491 symbol.
6492 (symbol_class_set): Don't count a string literal as a new token, and
6493 don't assign it a symbol number since symbol_make_alias does that.
6494 (symbol_make_alias): It's not necessary to decrement the symbol and
6495 token counts anymore. Don't assume that an alias declaration occurs
6496 before any uses of the identifier or string, and thus don't assert that
6497 one of them has the highest symbol number so far.
6498 (symbol_check_alias_consistency): Complain if there's a string literal
6499 that wasn't declared as an alias.
6500 (symbols_pack): Bail if symbol_check_alias_consistency failed since
6501 symbol_pack asserts that every token has been assigned a symbol number
6502 although undeclared string literals have not.
6503 * tests/regression.at (String alias declared after use, Undeclared
6504 string literal): New test cases.
6505 (Characters Escapes, Web2c Actions): Declare string literals as
6506 aliases.
6507 * tests/sets.at (Firsts): Likewise.
6508
6509 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
6510
6511 In the grammar scanner, STRING_FINISH unclosed constructs and return
6512 them to the parser in order to improve error messages.
6513 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
6514 SC_BRACED_CODE, SC_PROLOGUE): Implement.
6515 * tests/input.at (Unclosed constructs): New test case.
6516 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
6517 seen.
6518
6519 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
6520 unused global.
6521
6522 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
6523
6524 Handle string aliases for character tokens correctly.
6525 * src/symtab.c (symbol_user_token_number_set): If the token has an
6526 alias, check and set its alias's user token number instead of its own,
6527 which is set to indicate the alias. Previously, every occurrence of
6528 the character token in the grammar overwrote that alias indicator with
6529 the character code.
6530 * tests/input.at (String aliases for character tokens): New test.
6531
6532 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
6533
6534 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
6535
6536 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
6537
6538 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
6539 to prevent failures when building on older platforms.
6540 Check for autopoint failure.
6541 Set XGETTEXT_OPTIONS to values that check for C format strings,
6542 so that translators are warned about them (this also helps
6543 prevent core dumps).
6544
6545 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
6546 function, since it simplifies our code a bit.
6547
6548 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
6549 rather than -W, so we don't get bogus warnings about sign comparisons.
6550 Add -Wpointer-arith, since that warning is useful (it reports code
6551 that does not conform to C89 and that some compilers reject).
6552 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
6553 since it's no longer needed.
6554
6555 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
6556
6557 Clean up scanners a bit.
6558 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
6559 definitions so gcc won't warn when obstack_for_string is unused.
6560 * src/scan-code.l: config.h and system.h are already #include'd by
6561 scan-code-c.c, so get rid of them here.
6562 * src/scan-gram.l: Likewise.
6563 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
6564 definitions rather than duplicating the rest of it.
6565 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
6566
6567 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
6568
6569 Suppress signed/unsigned comparison warnings for yycheck.
6570 * data/c.m4 (b4_safest_int_type): New macro.
6571 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
6572 a signed int type, cast it to b4_safest_int_type first.
6573 * data/yacc.c: Likewise.
6574 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
6575 also overwritten.
6576
6577 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
6578
6579 * doc/bison.texinfo: Fix some typos.
6580
6581 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
6582
6583 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
6584 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
6585
6586 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
6587 the latest gnulib does this a different way.
6588 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
6589 translation was patched, so stop omitting it.
6590
6591 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
6592
6593 Enable declaration of default %printer/%destructor. Make the parser
6594 use these for all user-declared grammar symbols for which the user does
6595 not declare a specific %printer/%destructor. Thus, the parser uses it
6596 for token 0 if the user declares it but not if Bison generates it as
6597 $end. Discussed starting at
6598 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
6599 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
6600 and
6601 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
6602 * NEWS (2.3+): Mention.
6603 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
6604 declare a %destructor for a mid-rule's semantic value. It's just
6605 impossible to declare one specific to it.
6606 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
6607 code. Describe default %destructor form.
6608 * src/parse-gram.y (grammar_declaration): Parse default
6609 %printer/%destructor declarations.
6610 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
6611 and symbol_destructor_location_get rather than accessing the destructor
6612 and destructor_location members of struct symbol.
6613 (symbol_printers_output): Likewise but for %printer's.
6614 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
6615 again.
6616 * src/symtab.c (default_destructor, default_destructor_location,
6617 default_printer, default_printer_location): New static global
6618 variables to record the default %destructor and %printer.
6619 (symbol_destructor_get, symbol_destructor_location_get,
6620 symbol_printer_get, symbol_printer_location_get): New functions to
6621 compute the appropriate %destructor and %printer for a symbol.
6622 (default_destructor_set, default_printer_set): New functions to set the
6623 default %destructor and %printer.
6624 * src/symtab.h: Prototype all those new functions.
6625 * tests/actions.at (Default %printer and %destructor): New test to
6626 check that the right %printer and %destructor are called, that they're
6627 not called for $end, and that $$ and @$ work correctly.
6628 (Default %printer and %destructor for user-declared end token): New
6629 test to check that the default %printer and %destructor are called for
6630 a user-declared end token.
6631 * tests/input.at (Default %printer and %destructor redeclared, Unused
6632 values with default %destructor): New tests to check related grammar
6633 warnings and errors.
6634
6635 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
6636
6637 Clean up handling of %destructor for the end token (token 0).
6638 Discussed starting at
6639 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
6640 and
6641 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
6642
6643 Make the skeletons consistent in how they pop the end token and invoke
6644 its %destructor.
6645 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
6646 state, which has token number 0, since this would invoke the
6647 %destructor for the end token.
6648 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
6649 until after shifting the end token, or else it won't be popped.
6650 * data/yacc.c (yyparse): Likewise.
6651
6652 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
6653 it's the end token. Upon termination, destroy an unshifted lookahead
6654 even when it's the end token.
6655 * data/lalr1.cc (yy::parser::parse): Likewise.
6656 * data/yacc.c (yyparse): Likewise.
6657
6658 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
6659 value warnings for the end token when the user gives the end token a
6660 %destructor.
6661
6662 * tests/actions.at (Printers and Destructors): Test all the above.
6663
6664 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
6665
6666 Update to latest gnulib and gettext versions.
6667 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
6668 Add fopen-safer.
6669 (gnulib_files): Add m4/warning.m4. Don't worry about files
6670 overwritten by autopoint.
6671 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
6672 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
6673 rejects them.
6674 Don't use autoreconf; instead, invoke autopoint etc. by hand,
6675 so that we can remove the intl files at a better time.
6676 (intl_files_to_remove): Remove aclocal.m4, since it gets
6677 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
6678 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
6679 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
6680 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
6681 Remove datarootdir hack; no longer needed.
6682 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
6683 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
6684 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
6685 strdup.h.
6686 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
6687 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
6688
6689 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
6690
6691 * bootstrap: Adjust to today's change to gnulib-tool by invoking
6692 it with --assume-autoconf='latest-stable'.
6693
6694 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
6695
6696 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
6697 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
6698 YYSTYPE' and `{'.
6699 * src/muscle_tab.h (muscle_grow): Replace the header comments with
6700 those from muscle_tab.c since the old ones are misleading.
6701
6702 2006-07-13 Akim Demaille <akim@epita.fr>
6703
6704 Support %define "KEY" {VALUE}.
6705 * src/scan-code.h, src/scan-code.l (translate_action)
6706 (translate_rule_action, translate_symbol_action, translate_code):
6707 Return char *, not const char *.
6708 * src/parse-gram.y (declaration): Rename as...
6709 (prologue_declaration): this.
6710 (string_content): Remove this nonterminal, use STRING.
6711 (braceless, content, content.opt): New nonterminal.
6712 Use them.
6713 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
6714 as value.
6715 * src/scan-gram.l (getargs.h): Don't include it.
6716
6717 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
6718
6719 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
6720 rather than a for-loop that declares a local bool variable. This
6721 should work around a compatibility problem with a Cray x1e C++
6722 compiler reported by Hung Nguyen in
6723 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
6724 The for-loop was introduced in the 2004-11-17 change but I don't
6725 know why it was needed.
6726
6727 2006-07-12 Akim Demaille <akim@epita.fr>
6728
6729 * data/c.m4: Comment changes.
6730
6731 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
6732
6733 * src/complain.c (error_message, ERROR_MESSAGE): New.
6734 To factor...
6735 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
6736 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
6737
6738 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
6739
6740 * NEWS: Instead of %union, you can define and use your own union type
6741 YYSTYPE if your grammar contains at least one <type> tag.
6742 Your YYSTYPE need not be a macro; it can be a typedef.
6743 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
6744 (Union Decl, Decl Summary): Document this.
6745 * data/glr.c (YYSTYPE): Implement this.
6746 * data/glr.cc (YYSTYPE): Likewise.
6747 * data/lalr1.cc (YYSTYPE): Likewise.
6748 * data/yacc.c (YYSTYPE): Likewise.
6749 * src/output.c (prepare): Output tag_seen_flag.
6750 * src/parse-gram.y (declaration, grammar_declaration):
6751 Use 'union_seen' rather than 'typed' to determine whether
6752 %union has been seen, since grammars can now be typed without
6753 %union.
6754 (symbol_declaration, type.opt, symbol_def):
6755 Keep track of whether a tag has been seen.
6756 * src/reader.c (union_seen, tag_seen): New vars.
6757 (typed): remove.
6758 * src/reader.h (union_seen, tag_seen, typed): Likewise.
6759 * src/scan-code.l (untyped_var_seen): New variable.
6760 (handle_action_dollar): Adjust to above changes.
6761 (handle_action_dollar, handle_action_at):
6762 Improve overflow checking for outlandish numbers.
6763 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
6764 avoid new diagnostics generated by above changes.
6765 * tests/regression.at (YYSTYPE typedef): Add test to check
6766 for type tags without %union.
6767
6768 * src/symlist.c (symbol_list_length): Return int, not unsigned
6769 int, since callers expect int. This may need to get revisited
6770 once we have proper integer overflow checking.
6771
6772 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
6773 object is now static.
6774
6775 * src/getargs.c (flags_argmatch): Return void, not int,
6776 to pacify ./configure --enable-gcc-warnings.
6777
6778 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
6779 since last_string is already defined to FLEX_PREFIX (last_string).
6780
6781 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
6782
6783 Implement --warnings/-W.
6784 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
6785 replaced by...
6786 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
6787 Adjust callers.
6788 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
6789 (warnings_args, warnings_types): New.
6790 (getargs, short_options, long_options): Accept -W/--warnings.
6791 Sort the options by alphabetical order, upper case letter right
6792 before its lower case.
6793
6794 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
6795
6796 Change %merge result type clash warnings to errors. Discussed at
6797 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
6798 * src/reader.c (record_merge_function_type): Use complain_at.
6799 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6800 declared later): Update test case results.
6801
6802 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
6803
6804 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
6805 to be in alphabetical order.
6806 (trace_args): Spelling fixes.
6807
6808 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
6809
6810 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
6811 so they don't collide with user-defined macros.
6812 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
6813 this was never guaranteed, and now that we're using gnulib stdint,
6814 which defines int_fast16_t to long int, the problem is exposed.
6815
6816 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
6817
6818 * data/c.m4 (b4_basename): Simplify a bit, since we don't
6819 need the full POSIX semantics (and weren't implementing them
6820 anyway).
6821
6822 Adjust to Autoconf 2.60 and today's gnulib.
6823 * bootstrap (gnulib_modules): Add stdint.
6824 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
6825 no longer copies it.
6826 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
6827 since stdint needs the former and wcwidth (which is now required
6828 by mbswidth) needs the latter.
6829 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
6830 work around a compatibility glitch between gettext 0.14.6 and
6831 Autoconf 2.60.
6832 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
6833 Do not check for uintptr_t, since new stdint module does the right
6834 thing.
6835 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
6836 Add stdint.h, stdint_.h, wcwidth.h.
6837 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
6838 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
6839 stdint.m4, wchar_t.m4, wcwidth.m4.
6840 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
6841 usual order for ../lib/*.h files.
6842 (file_name_split): Use last_component, not base_name, to adjust
6843 to gnulib changes.
6844 * src/parse-gram.h: Include <strverscmp.h> in the usual order
6845 for ../lib/*.h files.
6846 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
6847 Define unconditionally, since we now assume the stdint module.
6848 * src/scan-skel.l: Include <dirname.h>.
6849 (BASE_QPUTS): Use last_component, not base_name.
6850 * src/system.h: Include <unlocked-io.h> in the usual order
6851 for ../lib/*.h files. Include <stdint.h> unconditionally,
6852 since we now use the stdint module.
6853 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
6854 HAVE_UINTPTR_T, since we now use the stdint module.
6855 (base_name): Remove decl, since files now include <dirname.h>
6856 to get the decl.
6857
6858 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
6859
6860 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
6861 New, default to 1.
6862 * data/yacc.c, data/glr.c, data/location.cc: Use them.
6863 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
6864 default.
6865 * tests/calc.at: Adjust.
6866
6867 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
6868
6869 * data/c.m4 (b4_basename): New.
6870 (b4_syncline): Also output the location of its invocation (from
6871 the skeleton).
6872 (b4_user_action, b4_define_user_action, b4_user_actions)
6873 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
6874 (b4_user_stype): New.
6875 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
6876
6877 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
6878
6879 In the grammar file, the first column is 1 not 0 on the first line as
6880 on every other line.
6881 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
6882 * tests/input.at (Torturing the Scanner): Update output.
6883
6884 * src/scan-gram.l (scanner_cursor): Declare it static.
6885
6886 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
6887
6888 In warnings, say "previous declaration" rather than "first
6889 declaration".
6890 * src/symtab.c (redeclaration): Do that here.
6891 * src/reader.c (record_merge_function_type): In the case of a result
6892 type clash, report the previous declaration rather than the very first
6893 one in the grammar file.
6894 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6895 declared later): Add a third declaration to check this behavior.
6896 * tests/input.at (Incompatible Aliases): Update output.
6897
6898 2006-06-27 Akim Demaille <akim@epita.fr>
6899
6900 * doc/Doxyfile.in: New.
6901 * doc/Makefile.am: Use it.
6902 * src/lalr.h, src/symtab.h: Initial doxygenation.
6903
6904 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6905
6906 Don't miss %merge result type warnings just because the LHS types are
6907 declared after the %merge. This continues the effort of the previous
6908 patch.
6909 * src/reader.c (get_merge_function): Don't set the merger type yet.
6910 (record_merge_function_type): New function for setting the merger type
6911 and checking for clashes.
6912 (grammar_current_rule_merge_set): Set the location of the %merge for
6913 the current rule.
6914 (packgram): Invoke record_merge_function_type for each rule now that
6915 all symbol type declarations have been parsed.
6916 * src/reader.h (merger_list.type_declaration_location): New member
6917 storing the location of the first %merge from which the type for this
6918 merging function was derived.
6919 * src/symlist.h (symbol_list.merger_declaration_location): New member
6920 storing the location of a rule's %merge, if any.
6921 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6922 declared later): New test to catch the error fixed by the above patch.
6923
6924 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6925
6926 Get action warnings (grammar_rule_check) right even when symbol
6927 declarations appear after the rules. Discussed at
6928 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
6929 and
6930 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
6931 Don't mistake the type of $$ in a midrule to be that of its parent
6932 rule's $$.
6933 * src/reader.c (grammar_current_rule_end): Don't invoke
6934 grammar_rule_check yet since not all symbol declarations may have been
6935 parsed yet.
6936 (grammar_midrule_action): Likewise.
6937 Don't record whether the midrule's $$ has been used yet since actions
6938 haven't been translated yet.
6939 Record the midrule's parent rule and its RHS index within the parent
6940 rule.
6941 (grammar_current_rule_action_append): Don't translate the action yet
6942 since not all symbol declarations may have been parsed yet and, thus,
6943 warnings about types for $$, $n, @$, and @n can't be reported yet.
6944 (packgram): Translate the action and invoke grammar_rule_check now that
6945 all symbol declarations have been parsed.
6946 * src/scan-code.l (handle_action_dollar): Now that this is invoked
6947 after parsing the entire grammar file, the symbol list here in the case
6948 of a midrule is actually the midrule's empty RHS, so reference its
6949 parent rule's RHS where necessary.
6950 On the other hand, now that you can already know it's a midrule, you
6951 aren't forced to think $$ has the same type as its parent rule's $$.
6952 (handle_action_at): In the case of a midrule, reference the parent rule
6953 where necessary.
6954 * src/symlist.c (symbol_list_new): Initialize new midrule-related
6955 members.
6956 (symbol_list_length): Now that this is invoked after all rules have
6957 been parsed, a NULL symbol (rather than a NULL symbol list node)
6958 terminates a rule. symbol_list_print already does this correctly.
6959 * src/symlist.h (symbol_list.midrule_parent_rule,
6960 symbol_list.midrule_parent_rhs_index): New members so that midrules can
6961 remember their relationships with their parents.
6962 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
6963 fixed by the above patch.
6964 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
6965 implementing...
6966 (Unused values): ... this old test case and...
6967 (Unused values before symbol declarations): ... this new test case.
6968 This one is the same as `Unused values' except that all symbol
6969 declarations appear after the rules in order to catch the rest of the
6970 errors fixed by the above patch.
6971
6972 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6973
6974 More cleanup.
6975 * src/reader.c (current_rule): Declare it static since it's no longer
6976 used outside this file.
6977 (grammar_current_rule_action_append): Remove redundant arguments from
6978 translate_rule_action invocation.
6979 * src/reader.h (current_rule): Remove this unused extern.
6980 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
6981 * src/scan-code.l (translate_rule_action): Likewise.
6982
6983 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
6984
6985 Clean up yesterday's patch.
6986 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
6987 to...
6988 * src/reader.c (grammar_current_rule_action_append): ... here for
6989 consistency with grammar_current_rule_symbol_append.
6990 * tests/regression.at (Braced code in declaration in rules section):
6991 Make yyerror and yylex static as usual.
6992
6993 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
6994
6995 Fix bug that mistakes braced code in a declaration in the rules section
6996 to be a rule action. Mentioned at
6997 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
6998 * src/scan-gram.l: Move midrule action detection from the start of the
6999 scanning of any braced code to...
7000 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
7001 action. For readability, use $2 and @2 rather than the equivalent
7002 global variables.
7003 * tests/regression.at (Braced code in declaration in rules section):
7004 New test to catch the error fixed by the above patch.
7005
7006 Work on code readability some.
7007 * src/scan-code.l (current_rule): Get rid of this misleading and
7008 redundant declaration: it's actually extern'ed in reader.h.
7009 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
7010 translate_action): Add a rule argument and use it instead of the global
7011 current_rule.
7012 (translate_rule_action): This already receives current_rule through an
7013 argument, so pass it on to translate_action instead of assigning
7014 current_rule to current_rule.
7015 (translate_symbol_action, translate_code): Pass rule = NULL to
7016 translate_action.
7017
7018 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
7019
7020 Rename %before-definitions to %start-header and %after-definitions to
7021 %end-header. Don't use these declarations to separate pre-prologue
7022 blocks from post-prologue blocks. Add new order-independent
7023 declarations %before-header and %after-header as alternatives to the
7024 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
7025 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
7026 * NEWS (2.3+): Update for these changes.
7027 * data/glr.c (b4_before_definitions): Update to...
7028 (b4_start_header): ... this.
7029 (b4_after_definitions): Update to...
7030 (b4_end_header): ... this.
7031 * data/glr.cc: Likewise.
7032 * data/lalr1.cc: Likewise.
7033 * data/yacc.c: Likewise.
7034 * doc/bison.texinfo (The prologue): Update names, and replace remaining
7035 prologue blocks with %*-header declarations.
7036 (Calc++ Parser): Likewise.
7037 (Decl Summary): Update names.
7038 (Table of Symbols): Update description.
7039 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
7040 (PERCENT_END_HEADER): ... this.
7041 (PERCENT_BEFORE_DEFINITIONS): Update to...
7042 (PERCENT_START_HEADER): ... this.
7043 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7044 (declaration): Update token names and m4 macro names.
7045 When parsing %end-header and %start-header, invoke translate_code
7046 before muscle_code_grow, and no longer set global booleans to remember
7047 whether these declarations have been seen.
7048 Parse new %after-header and %before-header.
7049 * src/reader.c (before_definitions, after_definitions): Remove.
7050 (prologue_augment): Accept a new bool argument to specify whether to
7051 augment the pre-prologue or post-prologue.
7052 * src/reader.h (before_definitions, after_definitions): Remove these
7053 extern's.
7054 (prologue_augment): Add new bool argument.
7055 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
7056 (PERCENT_END_HEADER): ... this.
7057 (PERCENT_BEFORE_DEFINITIONS): Update to...
7058 (PERCENT_START_HEADER): ... this.
7059 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7060 * tests/actions.at (Printers and Destructors): Update names.
7061
7062 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
7063
7064 Add comparison operators for C++ location classes. Discussed at
7065 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
7066 * data/c++.m4 (b4_define_location_comparison): New boolean %define
7067 declaration indicating whether filename_type has an operator==. If
7068 filename_type is `std::string', it defaults to `1', `0' otherwise.
7069 * data/location.cc: Iff b4_define_location_comparison is `1', add
7070 operator== and operator!= for class position and for class location.
7071
7072 Some minor fixes.
7073 * src/scan-action.l: Remove unused file.
7074 * src/symtab.c (symbol_printer_set): Use printer_location not
7075 destructor_location.
7076 * src/symtab.h (struct symbol): Replace incorrect source comment for
7077 printer members.
7078 * tests/input.at (Incompatible Aliases): Update output with correct
7079 printer location.
7080
7081 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
7082
7083 Don't put the pre-prologue in the header file. For the yacc.c code
7084 file and the glr.c header and code files, move the pre-prologue before
7085 the token definitions. Add new %before-definitions and
7086 %after-definitions to declare code that will go in both the header file
7087 and code file. Discussed at
7088 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
7089 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
7090 and
7091 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
7092 * NEWS (2.3+): Describe these changes.
7093 * data/glr.c (b4_pre_prologue): Move from within to before...
7094 (b4_shared_declarations): ... this.
7095 Add new b4_before_definitions before b4_token_enums.
7096 Add new b4_after_definitions at the end.
7097 * data/glr.cc (b4_pre_prologue): Replace with...
7098 (b4_before_definitions): ... this in the header file.
7099 (b4_after_definitions): New near the end of the header file.
7100 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
7101 code file right before including the header file.
7102 (b4_before_definitions): New in the previous position of
7103 b4_pre_prologue in the header file.
7104 (b4_after_definitions): New near the end of the header file.
7105 * data/yacc.c: Clean up some m4 quoting especially in the header file.
7106 (b4_token_enums_defines): In the code file, move to right before
7107 YYSTYPE for consistency with the header file.
7108 (b4_before_definitions): New right before b4_token_enums_defines in
7109 both the header and code file.
7110 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
7111 header and code file.
7112 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
7113 of prologues for %union dependencies.
7114 (Decl Summary): In %defines description, mention the effect of
7115 %before-definitions and %after-definitions on the header file.
7116 (Calc++ Parser): Forward declare driver in a %before-definitions rather
7117 than in the pre-prologue so that make check succeeds.
7118 (Table of Symbols): Add entries for %before-definitions and
7119 %after-definitions.
7120 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
7121 %before-definitions.
7122 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
7123 (declaration): Parse those declarations and append to
7124 b4_before_definitions and b4_after_definitions, respectively.
7125 * src/reader.c (before_definitions, after_definitions): New bools to
7126 track whether those declarations have been seen.
7127 (prologue_augment): Add to the post-prologue if %union,
7128 %before-definitions, or %after-definitions has been seen.
7129 * src/reader.h (before_definitions, after_definitions): New extern's.
7130 * src/scan-gram.l: Scan the new declarations.
7131 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
7132 prologue block in a %before-definitions or a %after-definitions based
7133 on whether the %union is declared.
7134 * tests/regression.at (Early token definitions with --yacc, Early token
7135 definitions without --yacc): Move tests for token definitions into the
7136 post-prologue since token names are no longer defined in the
7137 pre-prologue.
7138
7139 2006-06-20 Akim Demaille <akim@epita.fr>
7140
7141 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
7142 (symbol_get): Use it.
7143 * src/parse-gram.y: Use it.
7144
7145 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
7146
7147 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
7148 build succeeds when configured with --enable-gcc-warnings.
7149
7150 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
7151
7152 * src/parse-gram.y (char_name): New function.
7153 (CHAR, STRING, string_content): For %printer, properly escape.
7154 (ID): Prefer fputs to fprintf.
7155 (id): Reindent to be consistent with other rules.
7156 Properly quote char.
7157
7158 The Translation Project changed its way of publishing translations
7159 to maintainers. I haven't received any responses to my request
7160 for supporting the old way, or for documenting the new way. I
7161 have modified 'bootstrap' to use screen scraping
7162 (in this case, HTML scraping). This is unreliable and inelegant,
7163 but I don't see any better way. Yuck.
7164 * bootstrap (TP_URL, WGET_COMMAND): New vars.
7165 (get_translations): New function, which uses HTML scraping to
7166 deduce locations of latest translations.
7167 Use this function to grab both bison and bison-runtime .po files.
7168 Don't bother priming the pump for the runtime-po domain any more,
7169 as it's now translated better than bison is.
7170
7171 2006-06-19 Akim Demaille <akim@epita.fr>
7172
7173 * src/scan-gram.l: No longer "parse" things after `%union' until
7174 `{'. Rather, return a single "%union" token.
7175 No longer make symbols: return strings, and leave the conversion
7176 to symbols to the parser.
7177 (SC_PRE_CODE, token_type): Remove.
7178 * src/parse-gram.y (%union): New field `character'.
7179 Sort tokens.
7180 (CHAR): New token.
7181 (ID, ID_COLON): Now that the scanner no longer makes them
7182 identifiers, adjust all uses to invoke symbol_get.
7183 (id_colon): New, wraps the conversion from string to symbol.
7184 (%union): Accept a possible union_name.
7185 (symbol): Now can be a char.
7186 * data/c.m4 (b4_union_name): Leave a default value.
7187 * data/glr.c, data/yacc.c: Use it.
7188
7189 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
7190
7191 For associating token numbers with token names for "yacc.c", don't use
7192 #define statements unless `--yacc' is specified; always use enum
7193 yytokentype. Most important discussions start at:
7194 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
7195 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
7196 and
7197 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
7198 * NEWS (2.3+): Mention.
7199 * data/c.m4 (b4_yacc_if): New.
7200 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
7201 token #define's.
7202 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
7203 on token name definitions.
7204 * src/getargs.c (usage): Capitalize `Yacc' in English.
7205 * src/output.c (prepare): Define b4_yacc_flag.
7206 * tests/regression.at (Early token definitions): Test that tokens names
7207 are defined before the pre-prologue not just before the post-prologue.
7208 Remove this test case and copy to...
7209 (Early token definitions with --yacc): ... this to test #define's.
7210 (Early token definitions without --yacc): ... and this to test enums.
7211
7212 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
7213
7214 * NEWS: Reword the post-2.3 change to not be so optimistic about
7215 removing the old "look-ahead" spelling.
7216 Update previous look-ahead/lookahead change reports.
7217 * REFERENCES: look-ahead -> lookahead (since that's
7218 what he actually wrote).
7219 * doc/refcard.tex: look ahead -> lookahead,
7220 look-ahead -> lookahead
7221
7222 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
7223
7224 For consistency, use `lookahead' instead of `look-ahead' or
7225 `look_ahead'. Discussed starting at
7226 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
7227 and then at
7228 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
7229 * NEWS: For the next release, note the change to `--report'.
7230 * TODO, doc/bison.1: Update English.
7231 * doc/bison.texinfo: Update English.
7232 (Understanding Your Parser, Bison Options): Document as
7233 `--report=lookahead' rather than `--report=look-ahead'.
7234 * src/conflicts.c: Update English in comments.
7235 (lookahead_set): Rename from look_ahead_set.
7236 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
7237 (resolve_sr_conflict): Rename local look_ahead_tokens to
7238 lookahead_tokens, and update other uses.
7239 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
7240 count_rr_conflicts, conflicts_free): Update uses.
7241 * src/getargs.c (report_args): Move "lookahead" before alternate
7242 spellings.
7243 (report_types): Update uses.
7244 (usage): For `--report' usage description, state `lookahead' spelling
7245 rather than `look-ahead'.
7246 * src/getargs.h (report.report_lookahead_tokens): Rename from
7247 report_look_ahead_tokens.
7248 * src/lalr.c: Update English in comments.
7249 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
7250 (state_lookahead_tokens_count): Rename from
7251 state_look_ahead_tokens_count.
7252 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7253 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
7254 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7255 Update other uses.
7256 Update English in output.
7257 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
7258 * src/print.c: Update English in comments.
7259 (lookahead_set): Rename from look_ahead_set.
7260 (print_reduction): Rename argument lookahead_token from
7261 look_ahead_token.
7262 (print_core, state_default_rule, print_reductions, print_results):
7263 Update uses.
7264 * src/print_graph.c: Update English in comments.
7265 (print_core): Update uses.
7266 * src/state.c: Update English in comments.
7267 (reductions_new): Update uses.
7268 (state_rule_lookahead_tokens_print): Rename from
7269 state_rule_look_ahead_tokens_print, and update other uses.
7270 * src/state.h: Update English in comments.
7271 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
7272 (state_rule_lookahead_tokens_print): Rename from
7273 state_rule_look_ahead_tokens_print.
7274 * src/tables.c: Update English in comments.
7275 (conflict_row, action_row): Update uses.
7276 * tests/glr-regression.at
7277 (Incorrect lookahead during deterministic GLR,
7278 Incorrect lookahead during nondeterministic GLR): Rename
7279 print_look_ahead to print_lookahead.
7280 * tests/torture.at: Update English in comments.
7281 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
7282 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
7283 (Many lookahead tokens): Update uses.
7284 * data/glr.c: Update English in comments.
7285 * lalr1.cc: Likewise.
7286 * yacc.c: Likewise.
7287 * src/conflicts.h: Likewise.
7288 * src/lalr.h: Likewise.
7289 * src/main.c: Likewise.
7290 * src/output.c: Likewise.
7291 * src/parse-gram.c: Likewise.
7292 * src/tables.h: Likewise.
7293 * tests/calc.at: Likewise.
7294
7295 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
7296
7297 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
7298
7299 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
7300
7301 * TODO: Add request from Nelson H. F. Beebe to be able to install
7302 Bison without installing the yacc script.
7303
7304 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7305
7306 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
7307 and yytext if they're already #define'd.
7308 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
7309 * src/scan-code-c.c: ... here.
7310 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
7311 <config.h>.
7312
7313 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7314
7315 Get Bison to build again when configured with --enable-gcc-warnings.
7316 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
7317 missing #include's.
7318 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
7319 loc argument as it shadows a global.
7320 * src/scan-gram.l: Remove stray comma that prevents boundary_set
7321 invocation.
7322
7323 * src/.cvsignore: Add scan-code.c.
7324
7325 2006-06-07 Akim Demaille <akim@epita.fr>
7326
7327 * src/scan-gram.l: Move the "add a trailing ; to actions" code
7328 to...
7329 * src/scan-code.l: here.
7330 * tests/input.at (Torturing the Scanner): Fix another location
7331 error.
7332
7333 2006-06-07 Akim Demaille <akim@epita.fr>
7334
7335 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
7336
7337 2006-06-06 Akim Demaille <akim@epita.fr>
7338
7339 Extract the parsing of user actions from the grammar scanner.
7340 As a consequence, the relation between the grammar scanner and
7341 parser is much simpler. We can also split "composite tokens" back
7342 into simple tokens.
7343 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
7344 * src/scan-gram.l (add_column_width, adjust_location): Move to and
7345 rename as...
7346 * src/location.h, src/location.c (add_column_width)
7347 (location_compute): these.
7348 Fix the column count: the initial column is 0.
7349 (location_print): Be robust to ending column being 0.
7350 * src/location.h (boundary_set): New.
7351 * src/main.c: Adjust to scanner_free being renamed as
7352 gram_scanner_free.
7353 * src/output.c: Include scan-code.h.
7354 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
7355 Use boundary_set.
7356 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
7357 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
7358 which is now, again, a separate token.
7359 Adjust all dependencies.
7360 Whereever actions with $ and @ are used, use translate_code.
7361 (action): Remove this nonterminal which is now useless.
7362 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
7363 (grammar_current_rule_action_append): Use translate_code.
7364 (packgram): Bound check ruleno, itemno, and rule_length.
7365 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
7366 (last_string, last_braced_code_loc, max_left_semantic_context)
7367 (scanner_initialize, scanner_free, scanner_last_string_free)
7368 (gram_out, gram_lineno, YY_DECL_): Move to...
7369 * src/scan-gram.h: this new file.
7370 (YY_DECL): Rename as...
7371 (GRAM_DECL): this.
7372 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
7373 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
7374 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
7375 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
7376 Move these declarations, and...
7377 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
7378 these to...
7379 * src/flex-scanner.h: this new file.
7380 * src/scan-gram.l (rule_length, rule_length_overflow)
7381 (increment_rule_length): Remove.
7382 (last_braced_code_loc): Rename as...
7383 (gram_last_braced_code_loc): this.
7384 Adjust to the changes of the parser.
7385 Move all the handling of $ and @ into...
7386 * src/scan-code.l: here.
7387 * src/scan-gram.l (handle_dollar, handle_at): Remove.
7388 (handle_action_dollar, handle_action_at): Move to...
7389 * src/scan-code.l: here.
7390 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
7391 scan-code.h, scan-code-c.c, scan-gram.h.
7392 (EXTRA_bison_SOURCES): Add scan-code.l.
7393 (BUILT_SOURCES): Add scan-code.c.
7394 (yacc): Be robust to white spaces.
7395
7396 * tests/conflicts.at, tests/input.at, tests/reduce.at,
7397 * tests/regression.at: Adjust the column numbers.
7398 * tests/regression.at: Adjust the error message.
7399
7400 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
7401
7402 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
7403 Use Akim's wording from
7404 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
7405
7406 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
7407
7408 Between Bison releases, manually append `+' to the previous Bison
7409 release number, and use that as a signal to automatically print the
7410 ChangeLog's CVS Id keyword from --version. Discussed starting at
7411 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
7412 * ChangeLog: Add Id header.
7413 * configure.ac (AC_INIT): Append `+' to `2.3'.
7414 * src/.cvsignore: Add revision.c.
7415 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
7416 (BUILT_SOURCES): Add revision.c.
7417 (revision.c): New target rule. This file defines a new global variable
7418 named revision. It initializes it with either the Id from ChangeLog
7419 or, if VERSION doesn't contain `+', with the empty string.
7420 * src/getargs.c (version): Print the value of revision.
7421 * src/revision.h: Extern revision.
7422
7423 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
7424
7425 * NEWS: Version 2.3.
7426 * configure.ac (AC_INIT): Likewise.
7427
7428 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
7429
7430 * data/glr.c (YYRECOVERING): Define to be a function-like macro
7431 with no arguments, not as an object-like macro. This is for
7432 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
7433 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
7434 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
7435 Document this.
7436
7437 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
7438
7439 * src/getargs.c (usage): Back out yesterday's modification of the
7440 --help output so that we don't have to wait for translation before
7441 releasing 2.3.
7442
7443 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
7444
7445 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
7446 Problem reported by Akim Demaille.
7447
7448 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
7449
7450 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
7451
7452 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
7453
7454 * data/yacc.c (yy_reduce_print): Omit trailing white space in
7455 generated source code. Problem reported by Frans Englich in
7456 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
7457
7458 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
7459
7460 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
7461 shell, not within 'make', so that 'make' by an ordinary builder
7462 (using GNU make) does not worry about configuring gzip. This also
7463 works around a bug reported independently by Keith Thompson and by
7464 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
7465 stderr rather than stdout, messing up the build logs.
7466
7467 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
7468
7469 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
7470 to make sure that YYID will never be unused. This fixes a 'make
7471 maintainer-check' failure caused by the recent changes to the 'Trivial
7472 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
7473 not used.
7474 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
7475
7476 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
7477
7478 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
7479 state before an empty RHS is always resolved here. Only the location
7480 of that state is guaranteed to be resolved, and that's enough. This
7481 fixes the remaining bug reported by Derek M. Jones in
7482 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
7483 * tests/glr-regression.at (Uninitialized location when reporting
7484 ambiguity): Test the above case.
7485 Also, the embedded comments in this test case claim it checks the case
7486 of an empty RHS that has inherited the initial location. However, the
7487 corresponding LHS was already resolved, so yyresolveLocations didn't
7488 actually have reason to modify it. Fix this by forcing
7489 nondeterministic operation at the beginning of the parse.
7490
7491 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
7492
7493 * data/c.m4 (b4_yy_symbol_print_generate):
7494 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
7495 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
7496 of the bugs reported today by Derek M Jones in
7497 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
7498 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
7499 defined to be a type name without parens or brackets.
7500 (Location Type): Similarly for YYLTYPE.
7501 * tests/regression.at (Trivial grammars): Put in a test for this
7502 bug that will be caught by 'make maintainer-check' (though not,
7503 alas, by 'make check' unless your compiler is picky).
7504
7505 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
7506
7507 * NEWS: Version 2.2.
7508 * configure.ac (AC_INIT): Likewise.
7509
7510 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
7511
7512 * data/glr.c (yyreportTree): Make room in yystates for the state
7513 preceding the RHS. This fixes the segmentation fault reported by Derek
7514 M. Jones in
7515 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
7516 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
7517 to the user. Reported for yyreportTree by Derek M. Jones later in the
7518 same thread.
7519 * THANKS: Add Derek M. Jones.
7520 Update my email address.
7521 Fix typo in Steve Murphy's name.
7522
7523 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
7524
7525 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
7526 checking against YYLAST that caused the parser to miss a potential
7527 alternative in its diagnostic.
7528 Problem reported by Maria Jose Moron Fernandez in
7529 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
7530 * data/lalr1.cc (yysyntax_error_): Likewise.
7531 * data/yacc.c (yysyntax_error): Likewise.
7532 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
7533 tokens, in case we run into an older C compiler.
7534 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
7535 Use them to check for the off-by-one error fixed above.
7536
7537 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
7538 YYSIZE_T, not size_t.
7539 * tests/regression.at (Trivial grammars): New test, to catch
7540 the error fixed by the above patch.
7541
7542 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7543
7544 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
7545 scheme.
7546 Reported by Steve Murphy.
7547
7548 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7549
7550 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
7551 * data/glr.cc: b4_location_flag is now b4_locations_flag.
7552
7553 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7554
7555 Implement --trace=m4.
7556 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
7557 * src/output.c (output_skeleton): When set, pass -dV to m4.
7558
7559 Factor the handling of flags in m4.
7560 * src/output.c (prepare): Rename the muscle names debug, defines,
7561 error_verbose to debug_flag, defines_flag, error_verbose_flag.
7562 * data/c.m4: Adjust.
7563 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
7564 Use b4_define_flag_if to define other b4_FLAG_if macros.
7565 (b4_location_if): As a consequence, rename as...
7566 (b4_locations_if): this, for consistency.
7567 Adjust all the skeletons.
7568
7569 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7570
7571 * etc/bench.pm: Shorten bench names.
7572
7573 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7574
7575 * src/output.h, src/output.c (error_verbose): Move to...
7576 * src/getargs.h, src/getargs.c: here.
7577 Sort the flags.
7578 Adjust dependencies.
7579
7580 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
7581
7582 * data/c.m4 (b4_copyright): Put the special exception for Bison
7583 skeletons here, so we don't have to put it in each skeleton. All
7584 uses changed. Suggested by Akim Demaille. Also, wrap the
7585 copyright notice, in case it is longer than 80 columns. Replace
7586 comma by newline after title.
7587
7588 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
7589
7590 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
7591 incompatibility, not a bug. Mention that it wasn't fixed as of
7592 flex 2.5.33.
7593
7594 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
7595
7596 * examples/extexi: Enforce the precedence of concatenation over
7597 >>.
7598 Reported by Tommy Nordgren.
7599
7600 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
7601
7602 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
7603 with the member "token".
7604 Reported by Martin Nylin.
7605
7606 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
7607
7608 * data/glr.c: Switch to Bison 2.2 special-exception language in
7609 the copyright notice. Use more-regular format for titles and
7610 copyright notices.
7611 * data/glr.cc: Likewise.
7612 * data/location.cc: Likewise.
7613 * data/yacc.cc: Likewise.
7614 * doc/bison.texinfo (Conditions): Document this.
7615 * NEWS: likewise. Upgrade version to 2.2.
7616
7617 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
7618
7619 * data/glr.cc: Remove dead code.
7620
7621 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
7622
7623 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
7624 that variable and the line breaks the bootstrap. Problem reported
7625 by Juan M. Guerrero.
7626
7627 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
7628
7629 * doc/bison.texinfo (Multiple start-symbols): New.
7630
7631 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
7632
7633 * etc/README, etc/bench.pl: New.
7634
7635 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
7636
7637 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
7638 rule.
7639 Reported by Mickael Labau.
7640 * tests/input.at (Torturing the Scanner): Test it.
7641
7642 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
7643
7644 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
7645 Problem reported by Bob Rossi.
7646
7647 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
7648
7649 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
7650 and didn't really work.
7651 For the index, use @ifnotinfo, not @iftex.
7652 Minor cleanups of spacing and terminology.
7653
7654 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
7655
7656 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
7657 of AT_NAME_PREFIX when %name-prefix is not used.
7658
7659 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
7660
7661 Apply --prefix to C++ skeletons too: they change the namespace.
7662 The test suite already exercize these cases.
7663 * data/c++.m4 (b4_namespace): New.
7664 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
7665 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
7666 * data/yacc.c, data/glr.c: Remove a useless `[]'.
7667 * doc/bison.texinfo: Document it.
7668 (Option Cross Key): Use @multitable in all formats. It looks
7669 nicer, even in TeX outputs.
7670 (Rules): Use the same code whatever the output type is.
7671 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
7672 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
7673 * tests/calc.at: Use it, instead of hard coding `yy'.
7674
7675 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
7676
7677 * TODO: Remove dead items.
7678
7679 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
7680
7681 * doc/FAQ: Remove, merged into...
7682 * doc/bison.texinfo (FAQ): this.
7683 * doc/Makefile.am (EXTRA_DIST): Adjust.
7684
7685 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
7686
7687 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
7688 even if empty.
7689 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
7690 * doc/bison.texinfo (Calc++ Scanner): Use it.
7691
7692 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
7693
7694 Fix two nits reported by twlevo, plus one more that I discovered.
7695
7696 * src/assoc.h (assoc_to_string): Give a name to the arg, as
7697 this is the usual Bison style.
7698 * src/location.h (location_print): Likewise.
7699
7700 * src/reader.h (token_name): Likewise.
7701
7702 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
7703
7704 Fix some nits reported by twlevo.
7705 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
7706 and "POSIX". Use more-modern syntax for URLs. Mention C++
7707 and ask for Java. Don't hardwire OS version numbers. Add
7708 copyright notice.
7709 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
7710 * src/conflicts.c (solved_conflicts_obstack): Now static.
7711
7712 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
7713
7714 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
7715 page. Say "you can use it" not "you may use it" as on the web page;
7716 we're describing capabilities not granting permission.
7717
7718 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
7719
7720 * data/glr.c (yyresolveLocations): Rename local variables to avoid
7721 shadowing warnings. Use usual patter for iterating through RHS.
7722 * tests/glr-regression.at
7723 (Uninitialized location when reporting ambiguity):
7724 Modify yylex so that it uses its argument, rather than trying
7725 to rely on ARGSUSED (which doesn't work for gcc with warnings).
7726 const char -> char const.
7727
7728 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
7729 Don't use tabs inside commands; it messes up 'ps'.
7730 Problem reported by twlevo.
7731
7732 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
7733
7734 * tests/glr-regression.at (Uninitialized location when reporting
7735 ambiguity): New test case.
7736 * data/glr.c (yyresolveLocations): New function, which uses
7737 YYLLOC_DEFAULT.
7738 (yyresolveValue): Invoke yyresolveLocations before reporting an
7739 ambiguity.
7740 * doc/bison.texinfo (Default Action for Locations): Note
7741 YYLLOC_DEFAULT's usage for ambiguity locations.
7742 (GLR Semantic Actions): Cross-reference those notes.
7743
7744 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
7745
7746 * tests/glr-regression.at (Leaked semantic values when reporting
7747 ambiguity): Remove unnecessary union and type declarations.
7748 (Leaked lookahead after nondeterministic parse syntax error): New test
7749 case.
7750 * data/glr.c (yyparse): Check for zero stacks remaining before
7751 attempting to shift the lookahead so that you don't lose it.
7752
7753 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
7754
7755 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
7756 * tests/glr-regression.at (Leaked semantic values when reporting
7757 ambiguity): New test case.
7758 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
7759 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
7760 now unnecessary yystackp parameter.
7761 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
7762 destructors can be called.
7763
7764 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
7765 in existing testcases.
7766
7767 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
7768
7769 Don't leak semantic values for parent RHS when a user action cuts the
7770 parser, and clean up related code a bit.
7771 * tests/glr-regression.at (Leaked merged semantic value if user action
7772 cuts parse): Rename to...
7773 (Leaked semantic values if user action cuts parse): ... this. Add check
7774 for leaked parent RHS values.
7775 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
7776 between an unresolved state (non-empty chain of semantic options) and
7777 an incomplete one (signaled by an empty chain).
7778 (yyresolveStates): Document the interface. Move all manipulation of a
7779 successfully or unsuccessfully resolved yyGLRState to...
7780 (yyresolveValue): ... here so that yyresolveValue always leaves a
7781 yyGLRState with consistent data and thus is easier to understand.
7782 Remove the yyvalp and yylocp parameters since they are always just
7783 taken from the yys parameter. When reporting a discarded merged value
7784 in debugging output, note that it is incompletely merged. Document the
7785 interface.
7786 (yyresolveAction): If resolving any of the RHS states fails, destroy
7787 them all rather than leaking them. Thus, as long as user actions are
7788 written to clean up the RHS correctly, yyresolveAction always cleans up
7789 the RHS of a semantic option. Document the interface.
7790
7791 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
7792
7793 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
7794 led to a segmentation fault in GNU Pascal. Problem reported
7795 by Waldek Hebisch.
7796
7797 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
7798
7799 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
7800 mid-rule action inside a nonterminal symbol in order to declare a
7801 destructor for its semantic value.
7802
7803 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
7804
7805 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
7806 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
7807 __cplusplus && ! defined _STDLIB_H && !
7808 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
7809 defined free))]: Include <stdlib.h> rather than rolling our own
7810 declarations of malloc and free, to avoid problems with
7811 incompatible declarations (using 'throw') C++'s stdlib.h. This
7812 should fix Debian bug 340012
7813 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
7814 reported by Guillaume Melquiond.
7815
7816 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
7817
7818 * NEWS: Clarify symbols versus types in unused-value warnings.
7819
7820 * configure.ac (AC_INIT): Bump version number.
7821
7822 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
7823
7824 * NEWS: Version 2.1a.
7825 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
7826 since C99 requires this.
7827
7828 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
7829
7830 * m4/c-working.m4: New file.
7831 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
7832
7833 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
7834
7835 * Makefile.maint: Merge from coreutils.
7836
7837 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
7838
7839 More portability fixes for problems summarized by Nelson H. F. Beebe.
7840
7841 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
7842 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
7843 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
7844 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
7845 messes up because C++ code is compiled in 32-bit mode but linked
7846 in 64-bit mode.
7847
7848 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
7849
7850 More portability fixes for problems summarized by Nelson H. F. Beebe.
7851
7852 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
7853 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
7854
7855 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
7856 nodist_PROGRAMS, since we don't need to actually compile the
7857 example if we're just doing a plain 'make'. This avoids bothering
7858 the installer unnecessarily about problems due to weird C++
7859 compilers.
7860
7861 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
7862
7863 More portability fixes for problems summarized by Nelson H. F. Beebe.
7864
7865 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
7866 than #include "...", and compile with -I'.'. The old method was
7867 not portable, according to Posix and the C standard, and it does
7868 not work with Sun C 5.7, where previous #line directives affect
7869 the working directory used in later #include "..." directives.
7870
7871 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7872
7873 Various DJGGP specific issues in /djgpp
7874
7875 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
7876
7877 More portability fixes for problems summarized by Nelson H. F. Beebe.
7878
7879 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
7880 '#include <map>' works and that you can apply ++ to iterators.
7881
7882 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
7883
7884 Work around portability problems summarized by Nelson H. F. Beebe in
7885 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
7886
7887 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
7888 that '#include <string>' works.
7889
7890 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
7891 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
7892 "warning: sorry: semantics of inline function static data `const
7893 unsigned char translate_table[262]' are wrong (you'll wind up with
7894 multiple copies)".
7895
7896 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
7897 or, xor to not_, and_, or_, and xor_, respectively. This works
7898 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
7899 random system header somewhere that includes the equivalent of
7900 <iso646.h>.
7901
7902 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
7903 -E" works; it apparently doesn't work with PathScale EKO Compiler
7904 Suite Version 2.0.
7905
7906 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
7907
7908 During deterministic GLR operation, user actions should be able to
7909 influence the parse by changing yychar. To make this easier to fix and
7910 to make glr.c easier to evolve in general, don't maintain yytoken in
7911 parallel with yychar; just compute yytoken when needed.
7912 * tests/glr-regression.at (Incorrect lookahead during deterministic
7913 GLR): Check that setting yychar in a user action has the intended
7914 effect.
7915 * data/glr.c (yyGLRStack): Remove yytokenp member.
7916 (yyclearin): Don't set *yytokenp.
7917 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
7918 yychar rather than *yytokenp to determine the current lookahead.
7919 Compute yytoken locally when needed.
7920 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
7921 point to.
7922
7923 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
7924 after `--report' documentation.
7925
7926 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
7927
7928 * src/parse-gram.y (grammar_declaration): Location of printer
7929 symbol is @1, not list->location. Bug reported by twlevo.
7930 * tests/input.at (Incompatible Aliases): Adjust to above change.
7931
7932 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
7933
7934 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
7935 all the test at once. This makes the output easier to read in the
7936 normal case.
7937
7938 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
7939 got from <http://bro-ids.org/download.html>. The bug is that
7940 when two actions appeared in succession, the second one was
7941 scanned before the first one was added to the grammar rule
7942 as a midrule action. Bison then output the incorrect warning
7943 "parse.y:905.17-906.36: warning: unused value: $3".
7944 * src/parse-gram.y (BRACED_CODE, action): These are no longer
7945 associated with a value.
7946 (rhs): Don't invoke grammar_current_rule_action_append.
7947 (action): Invoke it here instead.
7948 * src/reader.c (grammar_midrule_action): Now extern.
7949 (grammar_current_rule_action_append): Don't invoke
7950 grammar_midrule_action; that is now the scanner's job.
7951 * src/reader.h (last_string, last_braced_code_loc):
7952 (grammar_midrule_action): New decls.
7953 * src/scan-gram.l (last_string): Now extern, sigh.
7954 (last_braced_code_loc): New extern variable.
7955 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
7956 rule already has an action.
7957 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
7958 * tests/input.at (AT_CHECK_UNUSED_VALUES):
7959 Add some tests to check that the above changes fixed the bug.
7960
7961 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
7962
7963 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
7964 All used changed. Check whether the symbol has a destructor,
7965 not whether it is typed.
7966 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
7967 that the values are still reported as unused. All line numbers
7968 adjusted.
7969
7970 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
7971
7972 Work around a bug in bro 0.8, which underparenthesizes its
7973 definition of YYLLOC_DEFAULT.
7974 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
7975 their arguments.
7976 * data/lalr1.cc: Likewise.
7977 * data/yacc.cc: Likewise.
7978
7979 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
7980
7981 Work around a bug in Pike 7.0, and give the Pike folks a
7982 better way to override the usual int widths.
7983 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
7984 user can override the types.
7985 (short): #undef, to work around a bug in Pike 7.0.
7986 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
7987 (union yyalloc.yyss): Use yytype_int16 rather than short.
7988 All uses changed.
7989 (yysigned_char): Remove.
7990 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
7991 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
7992 * tests/regression.at (Web2c Actions): Adjust to above changes.
7993
7994 * src/reader.c (check_and_convert_grammar): New function.
7995 (reader): Close the input file even if something went wrong during
7996 parsing. Minor file descriptor leak reported by twlevo.
7997
7998 * src/assoc.c (assoc_to_string): Use a default: abort (); case
7999 to pacify gcc -Wswitch-default.
8000 * src/scan-gram.l (adjust_location): Use a default: break; case
8001 to pacify gcc -Wswitch-default.
8002 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
8003 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
8004 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
8005 Move these decls to scan-skel.l, since they don't need to be
8006 visible elsewhere.
8007 * src/scan-skel.l: Accept the above decls.
8008 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
8009 is used.
8010
8011 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
8012
8013 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
8014 since we don't want to insist on a version number at the start
8015 of the changelog every time.
8016 * Makefile.maint: Sync from coreutils a bit better.
8017 (sc_trailing_blank): Renamed from sc_trailing_space.
8018 All uses changed.
8019 (sc_no_if_have_config_h, sc_require_config_h):
8020 (sc_prohibit_assert_without_use): New rules.
8021 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
8022 (sc_dd_max_sym_length): Fix leading spaces in rule.
8023 (sc_system_h_headers): Prefix with @.
8024 (sc_useless_cpp_parens, m4-check): Output line numbers.
8025 (changelog-check): Allow version only in head.
8026 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
8027 satisfy new Makefile.maint rule.
8028 * data/glr.c: Likewise.
8029 * data/glr.cc: Likewise.
8030 * data/lalr1.cc: Likewise.
8031 * data/yacc.c: Likewise.
8032 * lib/ebitsetv.c: Likewise.
8033 * lib/lbitset.c: Likewise.
8034 * lib/subpipe.c: Likewise.
8035 * lib/timevar.c: Likewise.
8036 * src/system.h: Likewise.
8037 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
8038 * djgpp/Makefile.maint: Add copyright notice.
8039 * djgpp/README.in: Likewise.
8040 * djgpp/config.bat: Likewise.
8041 * djgpp/config.site: Likewise.
8042 * djgpp/config_h.sed: Likewise.
8043 * djgpp/djunpack.bat: Likewise.
8044 * djgpp/config.sed: Fix copyright notice to match standard format.
8045 * djgpp/subpipe.h: Likewise.
8046 * lib/bitsetv-print.c: Likewise.
8047 * lib/bitsetv.c: Likewise.
8048 * lib/subpipe.h: Likewise.
8049 * lib/timevar.c: Likewise.
8050 * lib/timevar.h: Likewise.
8051 * djgpp/subpipe.c: Use standard recipe for config.h.
8052 * lib/abitset.c: Likewise.
8053 * lib/bitset.c: Likewise.
8054 * lib/bitset_stats.c: Likewise.
8055 * lib/bitsetv-print.c: Likewise.
8056 * lib/bitsetv.c: Likewise.
8057 * lib/ebitsetv.c: Likewise.
8058 * lib/get-errno.c: Likewise.
8059 * lib/lbitset.c: Likewise.
8060 * lib/subpipe.c: Likewise.
8061 * lib/timevar.c: Likewise.
8062 * lib/vbitset.c: Likewise.
8063 * tests/local.at: Likewise.
8064 * src/scan-gram.l: Don't include verify.h, since system.h does
8065 that for us.
8066 * .x-sc_require_config_h: New file.
8067 * .x-sc_unmarked_diagnostics: New file.
8068
8069 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
8070
8071 Be a bit more systematic about using 'abort'.
8072 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
8073 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
8074 Put 'default: abort ();' before some other case, to satisfy older
8075 pedantic compilers.
8076 * lib/bitset_stats.c (bitset_stats_init): Likewise.
8077 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
8078 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
8079 * src/conflicts.c (resolve_sr_conflict): Likewise.
8080 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
8081 (get_decision_str, get_orientation_str, get_node_alignment_str):
8082 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
8083 (get_linestyle_str, get_arrowstyle_str): Likewise.
8084 * src/conflicts.c (resolve_sr_conflict):
8085 Use a default case rather than one for the one remaining enum
8086 value, to catch invalid enum values as well.
8087 * src/lalr.c (set_goto_map, map_goto):
8088 Prefer "assert (FOO);" to "if (!FOO) abort ();".
8089 * src/nullable.c (nullable_compute, token_definitions_output):
8090 Likewise.
8091 * src/reader.c (packgram, reader): Likewise.
8092 * src/state.c (transitions_to, state_new, state_reduction_find):
8093 Likewise.
8094 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
8095 (symbol_pack): Likewise.
8096 * src/tables.c (conflict_row, pack_vector): Likewise.
8097 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
8098 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
8099 * src/system.h: Don't include <assert.h>.
8100 (assert): New macro.
8101
8102 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
8103 (Destructor Decl, Parser Function, Pure Calling):
8104 Describe rules for braces inside C code more carefully.
8105
8106 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
8107
8108 Fix some porting glitches found by Nelson H. F. Beebe.
8109 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
8110 compilers that don't understand that abort () does not return.
8111 * src/state.c (transitions_to): Likewise.
8112 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8113 that '#include <cstdlib>' works.
8114 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
8115 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
8116 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
8117 for the benefit of some pre-C99 compilers.
8118
8119 * bootstrap: Undo changes to gnulib files that autoreconf made.
8120
8121 Minor fixups to get 'make maintainer-check' to work.
8122 * configure.ac: Don't use -Wnested-externs, as it's incompatible
8123 with the new verify.h implementation.
8124 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
8125 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
8126 * data/yacc.c (YYUSE): Likewise.
8127 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
8128 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
8129 * src/parse-gram.y (declaration): Don't pass a string constant
8130 to a function that expects char *, since GCC might complain
8131 about the constant value.
8132 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
8133 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
8134 before #defining them.
8135 * tests/glr-regression.at
8136 (Incorrectly initialized location for empty right-hand side in GLR):
8137 In yyerror, use the msg arg.
8138 (Corrupted semantic options if user action cuts parse):
8139 (Incorrect lookahead during deterministic GLR):
8140 (Incorrect lookahead during nondeterministic GLR):
8141 Don't name a local var 'index'; it shadows string.h's 'index'.
8142
8143 2006-01-19 Akim Demaille <akim@epita.fr>
8144
8145 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
8146 location, not just parts of it.
8147
8148 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
8149
8150 * NEWS: Document the fact that multiple %unions are now allowed.
8151 * doc/bison.texinfo (Union Decl): Likewise.
8152 * TODO: This feature is now implemented, so remove it from
8153 the wishlist.
8154
8155 * Makefile.maint: Merge with coreutils Makefile.maint.
8156 (CVS_LIST): Use build-aux version if available.
8157 (VERSION_REGEXP): New macro.
8158 (syntax-check-rules): Add sc_no_if_have_config_h,
8159 sc_prohibit_assert_without_use, sc_require_config_h,
8160 sc_useless_cpp_parens.
8161 (sc_obsolete_symbols): Check for O_NDELAY.
8162 (sc_dd_max_sym_length): Track coreutils.
8163 (sc_unmarked_diagnostics): Look in all files, not just *.c.
8164 (sc_useless_cpp_parens): New rule.
8165 (news-date-check): Look for version or today's date.
8166 (changelog-check): Don't require version number near head.
8167 (copyright-check): Use current year instead of hardwiring 2005.
8168 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
8169 (announcement): Add --gpg-key-ID.
8170
8171 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
8172 with "file system".
8173
8174 Avoid undefined behavior that addressed just before the start of an
8175 array. Problem reported by twlevo.
8176 * src/reader.c (packgram): Prepend a new sentinel before ritem.
8177 * src/lalr.c (build_relations): Rely on new sentinel.
8178 * src/gram.c (gram_free): Adjust to new sentinel.
8179
8180 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
8181
8182 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
8183 yylookaheadNeeds. All uses updated.
8184 (yysplitStack): Rename local yynewLookaheadStatuses to
8185 yynewLookaheadNeeds.
8186 * data/glr-regression.at (Incorrect lookahead during nondeterministic
8187 GLR): In comments, change `lookahead status' to `lookahead need'.
8188
8189 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8190
8191 * data/glr.c (yysplitStack): A little stylistic rewrite.
8192
8193 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8194
8195 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
8196
8197 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
8198
8199 * doc/bison.texinfo: Fix some typos.
8200 (GLR Semantic Actions): New subsection discussing special
8201 considerations because GLR semantic actions might be deferred.
8202 (Actions): Mention look-ahead usage of yylval.
8203 (Actions and Locations): Mention look-ahead usage of yylloc.
8204 (Special Features for Use in Actions): Add YYEOF entry and mention it
8205 in the yychar entry.
8206 In the yychar entry, remove mention of the local yychar case (pure
8207 parser) since this is irrelevant information when writing semantic
8208 actions and since it's already discussed in `Table of Symbols' where
8209 yychar is otherwise described as an external variable.
8210 In the yychar entry, don't call it the `current' look-ahead since it
8211 isn't when semantic actions are deferred.
8212 In the yychar and yyclearin entries, add note about deferred semantic
8213 actions.
8214 Add yylloc and yylval entries discussing look-ahead usage.
8215 (Look-Ahead Tokens): When discussing yychar, don't call it the
8216 `current' look-ahead, and do mention yylval and yylloc.
8217 (Error Recovery): Cross-reference `Action Features' when mentioning
8218 yyclearin.
8219 (Table of Symbols): In the yychar entry, don't call it the `current'
8220 look-ahead.
8221 In the yylloc and yylval entries, mention look-ahead usage.
8222
8223 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
8224
8225 * tests/glr-regression.at: Update copyright year to 2006.
8226
8227 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8228
8229 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
8230 use during nondeterministic operation to track which stacks have
8231 actually needed the current lookahead.
8232 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
8233 Allocate, deallocate, resize, and otherwise shuffle space for
8234 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
8235 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
8236 appropriately during nondeterministic operation.
8237 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
8238 members to store the current lookahead to be used by the deferred
8239 user action.
8240 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
8241 from which the RHS is taken. Set the lookahead members of the new
8242 yySemanticOption according to the lookahead status for stack yyk.
8243 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
8244 yyaddDeferredAction.
8245 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
8246 members of yySemanticOption before invoking yyuserAction, and then set
8247 them back to their current values afterward.
8248 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
8249 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
8250 * tests/glr-regression.at: Remove `.' from the ends of recent test case
8251 titles for consistency.
8252 (Leaked merged semantic value if user action cuts parse): In order to
8253 suppress lint warnings, use arguments in merge function, and assign
8254 char value < 128 in main.
8255 (Incorrect lookahead during deterministic GLR): New test case.
8256 (Incorrect lookahead during nondeterministic GLR): New test case.
8257
8258 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8259
8260 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
8261 !yyvaluep as signal that no semantic value is available to print.
8262 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
8263 to print a semantic value.
8264
8265 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8266
8267 * tests/glr-regression.at: For consistency with my newer test cases,
8268 don't thank myself.
8269
8270 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
8271
8272 * data/glr.c (yyresolveValue): When merging semantic options, if at
8273 least one user action succeeds but a later one cuts the parse, then
8274 destroy the semantic value before returning rather than leaking it.
8275 (yyresolveStates): If a user action cuts the parse and thus
8276 yyresolveValue fails, ignore the (unset) semantic value rather than
8277 corrupting the yyGLRState, and empty the semantic options list since
8278 the user actions should have called all necessary destructors.
8279 Simplify code with YYCHK.
8280 * tests/glr-regression.at (Corrupted semantic options if user action
8281 cuts parse): New test case.
8282 (Undesirable destructors if user action cuts parse): New test case.
8283 Before applying any of this patch, this test case never actually failed
8284 for me... but only because the corrupted semantic options usually
8285 masked this bug.
8286 (Leaked merged semantic value if user action cuts parse): New test
8287 case.
8288
8289 2006-01-05 Akim Demaille <akim@epita.fr>
8290
8291 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
8292
8293 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
8294
8295 * data/c.m4 (b4_c_modern): New macro, with a new provision for
8296 _MSC_VER. Problem reported by Cenzato Marco.
8297 (b4_c_function_def): Use it.
8298 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
8299 b4_c_modern.
8300 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
8301 than rolling our own.
8302
8303 2006-01-04 Akim Demaille <akim@epita.fr>
8304
8305 Also warn about non-used mid-rule values.
8306 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
8307 member.
8308 (symbol_list_new): Adjust.
8309 * src/reader.c (symbol_typed_p): New.
8310 (grammar_rule_check): Use it.
8311 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
8312 Check its rule.
8313 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
8314 Use it.
8315 * tests/actions.at (Exotic Dollars): Adjust.
8316
8317 2006-01-04 Akim Demaille <akim@epita.fr>
8318
8319 * src/reader.c (grammar_midrule_action): If $$ is set in a
8320 mid-rule, move the `used' bit to its lhs.
8321 * tests/input.at (Unused values): New.
8322 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
8323
8324 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
8325
8326 * doc/bison.texinfo (Bison Options): Say more accurately what
8327 --yacc does.
8328 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
8329 about declarations in the grammar when in Yacc mode, as POSIX does
8330 not require a diagnostic when the grammar uses extensions.
8331
8332 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
8333
8334 Warn about dubious constructions like "%token T T".
8335 Reported by twlevo.
8336 * src/symtab.h (struct symbol.declared): New member.
8337 * src/symtab.c (symbol_new): Initialize it to false.
8338 (symbol_class_set): New arg DECLARING, specifying whether
8339 this is a declaration that we want to warn about, if there
8340 is more than one of them. All uses changed.
8341
8342 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
8343 Allow multiple %union directives, whose contents concatenate.
8344 * src/parse-gram.y (grammar_declaration): Likewise.
8345 Use muscle_code_grow, so that we don't need stype_line any more.
8346 All uses changed.
8347
8348 * src/muscle_tab.c (muscle_grow): Fix comment.
8349
8350 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
8351 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
8352 Update copyright year to 2006.
8353
8354 2006-01-03 Akim Demaille <akim@epita.fr>
8355
8356 Have glr.cc pass (some of) the calc.at tests.
8357 * data/glr.cc (b4_parse_param_orig): New.
8358 (b4_parse_param): Improve its definition, and bound it more
8359 clearly in the skeleton.
8360 (b4_epilogue): Append, instead of prepending, in order to keep
8361 #line consistency.
8362 Simplify the generation of auxiliary functions: locations and
8363 purity are mandated.
8364 (b4_global_tokens_and_yystype): Honor it.
8365 * data/location.cc (c++.m4): Don't include it.
8366 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
8367 and AT_SKEL_CC_IF.
8368 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
8369 AT_LALR1_CC_IF.
8370 Be sure to initialize the first position's filename.
8371 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
8372 mandated anyway.
8373 (AT_CHECK_CALC_GLR_CC): New.
8374 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
8375
8376 2006-01-02 Akim Demaille <akim@epita.fr>
8377
8378 * src/output.c (output_skeleton): Don't hard wire the inclusion of
8379 c.m4.
8380 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
8381 * data/glr.cc: Do not include stack.hh.
8382
8383 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
8384
8385 * data/glr.c: Reformat whitespace with tabs.
8386 (b4_lpure_formals): Remove this unused m4 macro.
8387 * tests/cxx-type.at: Reformat whitespace with tabs.
8388 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
8389 since it's a member. Rename type to isNterm for clarity.
8390
8391 2005-12-29 Akim <akim@sulaco.local>
8392
8393 Let glr.cc catch up with symbol_value_print.
8394 * data/glr.cc (b4_yysymprint_generate): Replace by...
8395 (b4_yy_symbol_print_generate): this.
8396 (yy_symbol_print, yy_symbol_value_print): Declare them.
8397
8398 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
8399
8400 * src/location.h (boundary): Note that a line or column equal
8401 to INT_MAX indicates an overflow.
8402 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
8403 (rule_length_overflow, increment_rule_length, add_column_width):
8404 New functions.
8405 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
8406 (<SC_BRACED_CODE>"}"):
8407 Use increment_rule_length rather than incrementing it by hand.
8408 (adjust_location, handle_syncline): Diagnose overflow.
8409 (handle_action_dollar, handle_action_at):
8410 Fix bug with monstrosities like $-2147483648.
8411 Remove now-unnecessary checks.
8412 (scan_integer): Verify assumptions and remove now-unnecessary checks.
8413 (convert_ucn_to_byte): Verify assumptions.
8414 (handle_syncline): New arg LOC. All callers changed.
8415 Don't store through a value derived from char const * pointer.
8416
8417 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
8418 GCC warnings.
8419
8420 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
8421
8422 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
8423 Remove unnecessary forward static decls.
8424
8425 2005-12-27 Akim Demaille <akim@epita.fr>
8426
8427 * src/reader.c (grammar_current_rule_check): Also check that $$
8428 is used.
8429 Take the rule to check as argument, hence rename as...
8430 (grammar_rule_check): this.
8431 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
8432 Rename as...
8433 (grammar_rule_begin, grammar_rule_end): these, for consistency.
8434 (grammar_midrule_action, grammar_symbol_append): Now static.
8435 * tests/torture.at (input): Don't rely on the default action
8436 being always performed.
8437 * tests/calc.at: "Set" $$ even when the action is "cut" with
8438 YYERROR or other.
8439 * tests/actions.at (Exotic Dollars): Instead of using unused
8440 values, check that the warning is issued.
8441
8442 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
8443
8444 * NEWS: Improve wording for unused-value warnings.
8445
8446 2005-12-22 Akim Demaille <akim@epita.fr>
8447
8448 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
8449 (b4_yysymprint_generate): Rename as...
8450 (b4_yy_symbol_print_generate): this.
8451 Generate yy_symbol_print instead of yysymprint.
8452 Generate also yy_symbol_value_print, and use it.
8453
8454 2005-12-22 Akim Demaille <akim@epita.fr>
8455
8456 * NEWS: Warn about unused values.
8457 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
8458 a `used' member.
8459 (symbol_list_n_get, symbol_list_n_used_set): New.
8460 (symbol_list_n_type_name_get): Use symbol_list_n_get.
8461 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
8462 * src/reader.c (grammar_current_rule_check): Check that values are
8463 used.
8464 * src/symtab.c (symbol_print): Accept 0.
8465 * tests/existing.at: Remove the type information.
8466 Empty the actions.
8467 Remove useless actions (beware of mid-rule actions: perl -000
8468 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
8469 * tests/actions.at (Exotic Dollars): Use unused values.
8470 * tests/calc.at: Likewise.
8471 * tests/glr-regression.at (No users destructors if stack 0 deleted):
8472 Likewise.
8473
8474 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
8475 rule_useful_p.
8476
8477 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
8478
8479 Undo 2005-12-01 tentative license wording change. The wording is
8480 still being reviewed by the lawyers, and we don't want to wait for
8481 them before publishing a test release. For now, revert to the
8482 previous wording.
8483 * NEWS: Undo 2005-12-01 change.
8484 * data/glr.c: Revert to previous license wording.
8485 * data/glr.cc: Likewise.
8486 * data/lalr1.cc: Likewise.
8487 * data/location.cc: Likewise.
8488 * data/yacc.c: Likewise.
8489
8490 * NEWS: Reword %destructor vs YYABORT etc.
8491 * data/glr.c: Use American spacing, for consistency.
8492 * data/glr.cc: Likewise.
8493 * data/lalr1.cc: Likewise.
8494 * data/yacc.c: Likewise.
8495 * data/yacc.c: Reformat comments slightly.
8496 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
8497 for consistency. Fix some spelling errors and reword recently-included
8498 text slightly.
8499 * tests/cxx-type.at: Cast results of malloc, for C++.
8500
8501 2005-12-21 Joel E. Denny <address@hidden>
8502
8503 * tests/cxx-type.at: Construct a tree, count the parents of shared
8504 nodes, and free each node once and only once. Previously, the memory
8505 for semantic values was leaked instead.
8506
8507 2005-12-21 Joel E. Denny <address@hidden>
8508
8509 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
8510 (yylval, yylloc): If pure, #define to yystackp->yyval and
8511 yystackp->yyloc similar to yychar and yynerrs.
8512 (yyparse): If pure, remove local yylval and yylloc. Add local
8513 yystackp to accommodate pure definitions of yylval and yylloc.
8514 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
8515 yylvalp and yyllocp to &yylval and &yylloc.
8516 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
8517 namespace. Previously, nerrs and char were missing, but lval and lloc
8518 weren't necessary.
8519 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
8520 yylvalp and yyllocp parameters since, if pure, these are now always
8521 accessible through yystackp. If not pure, they are still accessible
8522 globally.
8523 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
8524 `if (YYID (N))' to pacify lint.
8525
8526 2005-12-21 Akim Demaille <akim@epita.fr>
8527
8528 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
8529 destroy the RHS symbols of a rule.
8530 * data/yacc.c (yylen): Initialize to 0.
8531 Keep its value to the number of items to possibly shift.
8532 In particular, a regular successful parse that ends on YYFINAL by
8533 a (internal) YYACCEPT must not have yylen != 0.
8534 (yyerrorlab, yyreturn): Pop the RHS.
8535 Reorder a bit to emphasize the `shifting' bits of code.
8536 (YYPOPSTACK): Now accept a number of items to pop.
8537 * data/lalr1.cc: Likewise.
8538 * data/glr.c: Formatting changes.
8539 Use goto instead of fall through.
8540 * doc/bison.texinfo (Destructor Decl): Complete.
8541
8542 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8543
8544 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
8545 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
8546 * djgpp/config.bat: Replace every occurence of the file name
8547 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
8548 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
8549 * djgpp/config.sed: Replace every occurence of the file name
8550 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
8551 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
8552 * djgpp/djunpack.bat: DJGPP specific file.
8553 * djgpp/fnchange.lst: DJGPP specific file.
8554 * djgpp/README.in: Add new information about how to unpack the bison
8555 source on MSDOS and other systems which have 8.3 file name restrictions
8556 using djunpack.bat and fnchange.lst.
8557
8558 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
8559
8560 * bootstrap (build_cvs_prefix): Remove; unused.
8561 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
8562 when getting gnulib.
8563
8564 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
8565
8566 * data/glr.c: Reorder typedef declarations for structs to match order
8567 of struct declarations.
8568 Rename yystack everywhere to yystackp except in yyparse where it's not
8569 a pointer.
8570 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
8571 consistency.
8572 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
8573 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
8574 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
8575 lint.
8576
8577 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
8578
8579 * tests/sets.at (Accept): Fix typos in regular expression used to
8580 sed out the final state number.
8581
8582 Work around portability problem on Solaris 10: flex-generated
8583 files include <stdio.h> before <config.h>, which messes up
8584 because the latter defines __EXTENSIONS__. Address the problem
8585 by creating two new little files that include <config.h> first,
8586 then include the flex-generated files. Rewrite everyone else
8587 to include <config.h> first, as well.
8588 * lib/timevar.c: Always include "config.h".
8589 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
8590 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
8591 (EXTRA_bison_SOURCES): New macro.
8592 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
8593 * src/system.h: Don't include config.h.
8594 * src/LR0.c: Include <config.h> first.
8595 * src/assoc.c: Likewise.
8596 * src/closure.c: Likewise.
8597 * src/complain.c: Likewise.
8598 * src/conflicts.c: Likewise.
8599 * src/derives.c: Likewise.
8600 * src/files.c: Likewise.
8601 * src/getargs.c: Likewise.
8602 * src/gram.c: Likewise.
8603 * src/lalr.c: Likewise.
8604 * src/location.c: Likewise.
8605 * src/main.c: Likewise.
8606 * src/muscle_tab.c: Likewise.
8607 * src/nullable.c: Likewise.
8608 * src/output.c: Likewise.
8609 * src/parse-gram.y: Likewise.
8610 * src/print.c: Likewise.
8611 * src/print_graph.c: Likewise.
8612 * src/reader.c: Likewise.
8613 * src/reduce.c: Likewise.
8614 * src/relation.c: Likewise.
8615 * src/state.c: Likewise.
8616 * src/symlist.c: Likewise.
8617 * src/symtab.c: Likewise.
8618 * src/tables.c: Likewise.
8619 * src/uniqstr.c: Likewise.
8620 * src/vcg.c: Likewise.
8621
8622 * src/parse-gram.y: Fix minor problems uncovered by lint.
8623 (current_lhs, current_lhs_location): Now static.
8624 (current_assoc): Remove unused variable.
8625
8626 Cleanups so that Bison-generated parsers have less lint.
8627 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
8628 Prepend /*ARGSUSED*/, for lint's sake.
8629 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
8630 definition if 'lint' is defined.
8631 (YYID): New macro (or function, if lint).
8632 All uses of /*CONSTCOND*/0 replaced by YYID(0).
8633 * data/yacc.c: Likewise.
8634 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
8635 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
8636 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
8637 is C++ only.
8638 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
8639 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
8640 Use YYID(0) rather than 0, for lint.
8641 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
8642 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
8643
8644 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
8645
8646 * tests/glr-regression.at
8647 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
8648 Close memory leak reported by twlevo.
8649
8650 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
8651
8652 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
8653 all stacks.
8654 (yyparse): Iterate another stack in order to call user destructors.
8655 * tests/glr-regression.at (No users destructors if stack 0 deleted):
8656 New test case.
8657 (Duplicated user destructor for lookahead): This test now is expected
8658 to succeed.
8659
8660 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
8661
8662 * NEWS: Document the following change.
8663 * data/yacc.c: Say "parser skeleton" rather than "file", since
8664 it's no longer just a file.
8665 * data/glr.c: Grant a special exception for C GLR parsers, that
8666 reads like the already-existing exception for C LALR(1) parsers.
8667 * data/glr.cc: Likewise.
8668 * data/lalr1.cc: Likewise.
8669 * data/location.cc: Likewise.
8670 * data/yacc.c: Reword the "written by" statement to clarify that
8671 it was the parser skeleton, not the entire output file.
8672 * data/glr.c: Written by Paul Hilfinger.
8673 * data/glr.cc: Written by Akim Demaille.
8674 * data/lalr1.cc: Likewise.
8675
8676 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
8677
8678 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
8679 Fix typos in previous change that broke 'make check'.
8680 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
8681 supported in C.
8682 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
8683 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
8684 We can revert this once things settle down.
8685
8686 * src/conflicts.c (conflicts_print): Don't print file name twice
8687 when %expect fails because there were no conflicts.
8688 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
8689 change.
8690 * tests/conflicts.at (%expect not enough, %expect too much):
8691 (%expect with reduce conflicts): Adjust to new behavior.
8692
8693 2005-11-18 Akim Demaille <akim@epita.fr>
8694
8695 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
8696 errors.
8697 * NEWS: Document this.
8698 * doc/bison.texinfo (Expect Decl): Likewise.
8699
8700 2005-11-16 Akim Demaille <akim@epita.fr>
8701
8702 Generalize the display of semantic values and locations in traces.
8703 * data/glr.c (yy_reduce_print): Fix indices (again).
8704 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
8705 literal integers.
8706 * data/lalr1.cc (yyreduce_print): Rename as...
8707 (yy_reduce_print): this.
8708 Display values and locations.
8709 * data/yacc.c (yy_reduce_print): Likewise.
8710 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
8711 (yysymprint): Move higher to be visible from yy_reduce_print).
8712 (yyparse): Adjust.
8713 * tests/calc.at: Adjust the expected length of the traces.
8714
8715 2005-11-14 Akim Demaille <akim@epita.fr>
8716
8717 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
8718 from 1 to N, while values and location start at 0.
8719 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
8720
8721 2005-11-14 Akim Demaille <akim@epita.fr>
8722
8723 * data/glr.c (yy_reduce_print): Fix the $ number.
8724
8725 2005-11-14 Akim Demaille <akim@epita.fr>
8726
8727 "Use" parse parameters.
8728 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
8729 * data/glr.c, data/glr.cc: Use them.
8730 * data/glr.c (YYUSE): Have a C++ definition that supports
8731 non-pointer types.
8732
8733 2005-11-14 Akim Demaille <akim@epita.fr>
8734
8735 * data/glr.c (yyexpandGLRStack): Declare only if defined.
8736
8737 2005-11-14 Akim Demaille <akim@epita.fr>
8738
8739 * data/glr.cc: New.
8740 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
8741
8742 2005-11-12 Akim Demaille <akim@epita.fr>
8743
8744 Let position and location be PODs.
8745 * data/location.cc (position::initialize, location::initialize): New.
8746 (position::position, location::location): Define only if
8747 b4_location_constructors is defined.
8748 * data/lalr1.cc (b4_location_constructors): Define it for backward
8749 compatibility.
8750 * doc/bison.texinfo (Initial Action Decl): Use initialize.
8751
8752 2005-11-12 Akim Demaille <akim@epita.fr>
8753
8754 * data/lalr1.cc: Move the body of the ctor and dtor into the
8755 parser file (instead of the header).
8756 Wrap the implementations in a "namespace yy".
8757
8758 2005-11-12 Akim Demaille <akim@epita.fr>
8759
8760 Have glr.c include its header file when created.
8761 * data/glr.c (b4_shared_declarations): New.
8762 Output them verbatim in the parser if !%defines, otherwise
8763 output then in the header file, and include it instead.
8764
8765 2005-11-11 Akim Demaille <akim@epita.fr>
8766
8767 * data/glr.c: Comment changes.
8768
8769 2005-11-11 Akim Demaille <akim@epita.fr>
8770
8771 When yydebug, report semantic and location values for reductions.
8772 * data/glr.c (yy_reduce_print): Report the semantic values and the
8773 locations.
8774 (YY_REDUCE_PRINT): Adjust.
8775 (yyglrReduce): Use them.
8776 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
8777 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
8778 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
8779 traces.
8780
8781 2005-11-10 Akim Demaille <akim@epita.fr>
8782
8783 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
8784 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
8785 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
8786
8787 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
8788
8789 * m4/cxx.m4, examples/Makefile.am: Don't build
8790 examples/calc++ if no C++ compiler is available. (trivial change)
8791
8792 2005-11-09 Akim Demaille <akim@epita.fr>
8793
8794 * src/scan-skel.l: Use a couple of asserts.
8795
8796 2005-11-03 Akim Demaille <akim@epita.fr>
8797
8798 In some (weird) cases, the final state number is incorrect.
8799 Reported by Alexandre Duret-Lutz.
8800 * src/LR0.c (state_list_append): Remove the computation of
8801 final_state.
8802 (save_reductions): Do it here.
8803 (get_state): Alpha conversion.
8804 (generate_states): Use a for loop.
8805 * src/gram.h (item_number_is_rule_number)
8806 (item_number_is_symbol_number): New.
8807 * src/state.c: Use assert.
8808 * src/system.h: Include assert.h.
8809 * tests/sets.at (Accept): New.
8810
8811 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8812
8813 * data/glr.c (yyfill): Adjust comment.
8814 (yyresolveAction): Initialize default location properly
8815 for empty right-hand sides.
8816 (yydoAction): Ditto.
8817 Add comment explaining apparently dead code.
8818 * tests/glr-regression.at
8819 (Incorrectly initialized location for empty right-hand side in GLR):
8820 New test.
8821
8822 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
8823
8824 * bootstrap (cleanup_gnulib): New function. Use it to clean up
8825 gnulib when interrupted. This fixes some race conditions and
8826 works around some portability problems (one noted by Paul
8827 Hilfinger).
8828
8829 2005-10-22 Akim <akim@epita.fr>
8830
8831 * Makefile.cfg: Adjust to config -> build-aux.
8832 Reported by twledo.
8833
8834 2005-10-21 Akim Demaille <akim@epita.fr>
8835
8836 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
8837 the %parse-params.
8838 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
8839 * data/yacc.c (b4_Pure_if): Rename as...
8840 (b4_yacc_pure_if): this.
8841 (YY_SYMBOL_PRINT, yyparse): Adjust.
8842 * doc/bison.texinfo: Formatting changes.
8843
8844 2005-10-21 Akim Demaille <akim@epita.fr>
8845
8846 Finish the transition config -> build-aux.
8847 * configure.ac, Makefile.am: Use build-aux.
8848 * config/prev-version, config/announce-gen, config/Makefile.am:
8849 Move to...
8850 * build-aux/prev-version, build-aux/announce-gen,
8851 * build-aux/Makefile.am: here.
8852
8853 2005-10-14 Akim Demaille <akim@epita.fr>
8854
8855 * examples/calc++/test: Use set -x only when VERBOSE.
8856
8857 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
8858
8859 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
8860 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
8861
8862 2005-10-13 Akim Demaille <akim@epita.fr>
8863
8864 * src/scan-skel.l: Output the base name parts of the parser and
8865 header file names.
8866 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
8867 additional checks.
8868 Use this to exercise C++ outputs in subdirs.
8869 Reported by Oleg Smolsky.
8870
8871 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
8872
8873 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
8874 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
8875 Problem reported by John P. Hartmann.
8876 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
8877 already defined it.
8878
8879 2005-10-12 Akim Demaille <akim@epita.fr>
8880
8881 * src/parse-gram.y (version_check): Exit 63 to please missing
8882 (stands for "version mismatch).
8883 * tests/input.at, doc/bison.texinfo: Adjust.
8884
8885 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
8886
8887 Work around portability problems with Visual Age C compiler
8888 (xlc and xlC_r) reported by John P. Hartmann.
8889 * data/location.cc (initial_column, initial_line): Remove.
8890 All uses replaced by 0 and 1.
8891 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
8892 that xlc complains about.
8893 * src/scan-skel.l (skel_wrap): Likewise.
8894 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
8895 as __STDC__.
8896 * data/yacc.c (YYMODERN_C): New macro, which also looks at
8897 __STDC_VERSION__. Use it everywhere instead of looking at
8898 __STDC__ and __cplusplus.
8899
8900 2005-10-10 Akim Demaille <akim@epita.fr>
8901
8902 * examples/calc++/test: Be quiet unless VERBOSE.
8903
8904 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
8905
8906 * data/c.m4 (yydestruct, yysymprint):
8907 Use YYUSE instead of casting to void.
8908 * data/glr.c (YYUSE): New macro.
8909 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
8910 Use it instead of rolling our own.
8911 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
8912 (YYCHK1):
8913 Use /*CONSTCOND*/ to suppress lint warnings.
8914 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
8915 (YY_STACK_PRINT): Use 'false' not '0'.
8916 (YYUSE): New macro.
8917 (yysymprint_, yydestruct_): Use it instead of rolling our own.
8918 * data/yacc.c (YYUSE): New macro.
8919 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
8920 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
8921 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
8922
8923
8924 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
8925 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
8926
8927 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
8928
8929 Undo the parts of the unlocked-I/O change that substituted
8930 putc or puts for printf. This might hurt performance a bit,
8931 but some people prefer the printf style.
8932 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
8933 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
8934 All uses replaced by YYFPRINTF and YYDPRINTF.
8935 * data/yacc.c: Likewise.
8936 * lib/bitset.c (bitset_print): Likewise.
8937 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
8938 putc and puts.
8939 * lib/lbitset.c (debug_lbitset): Likewise.
8940 * src/closure.c (print_firsts, print_fderives): Likewise.
8941 * src/gram.c (grammar_dump): Likewise.
8942 * src/lalr.c (look_ahead_tokens_print): Likewise.
8943 * src/output.c (escaped_output): Likewise.
8944 (user_actions_output): Break apart two printfs.
8945 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
8946 * src/reduce.c (reduce_print): Likewise.
8947 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
8948 * src/system.h: Include unlocked-io.h rathe than stdio.h.
8949
8950 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
8951 Use assignments rather than casts-to-void to suppress
8952 unused-variable warnings. This pacifies 'lint'.
8953 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
8954 unused-variable warnings.
8955
8956 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8957
8958 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
8959
8960 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
8961
8962 Use unlocked I/O for a minor performance improvement on hosts like
8963 GNU/Linux and Solaris that support unlocked I/O. The basic idea
8964 is to use the gnlib unlocked-io module, and to prefer putc and
8965 puts to printf when either will work (since the latter doesn't
8966 come in an unlocked flavor).
8967 * bootstrap (gnulib_modules): Add unlocked-io.
8968 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
8969 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
8970 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
8971 and similarly for puts and putc and printf.
8972 * data/yacc.c: Likewise.
8973 * lib/bitset.c (bitset_print): Likewise.
8974 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
8975 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
8976 to printf.
8977 * lib/lbitset.c (debug_lbitset): Likewise.
8978 * src/closure.c (print_firsts, print_fderives): Likewise.
8979 * src/gram.c (grammar_dump): Likewise.
8980 * src/lalr.c (look_ahead_tokens_print): Likewise.
8981 * src/output.c (escaped_output): Likewise.
8982 (user_actions_output): Coalesce two printfs.
8983 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
8984 * src/reduce.c (reduce_print): Likewise.
8985 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
8986 * src/system.h: Include unlocked-io.h rather than stdio.h.
8987
8988 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
8989 this confuses xgettext.
8990
8991 2005-10-02 Akim Demaille <akim@epita.fr>
8992
8993 * bootstrap (gnulib_modules): Add strverscmp.
8994 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
8995 * m4/.cvsignore: Add strverscmp.m4.
8996 * src/parse-gram.y (%require): New token, new rule.
8997 (version_check): New.
8998 * src/scan-gram.l (%require): Adjust.
8999 * tests/input.at (AT_REQUIRE): New.
9000 Use it.
9001 * doc/bison.texinfo (Require Decl): New.
9002 (Calc++ Parser): Use %require.
9003
9004 2005-10-02 Akim Demaille <akim@epita.fr>
9005
9006 * data/location.cc: New.
9007
9008 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
9009 Akim Demaille <akim@epita.fr>
9010
9011 Make sure -odir/foo.cc creates dir/location.hh etc.
9012 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
9013 (spec_file_prefix, spec_verbose_file, spec_graph_file)
9014 (spec_defines_file): Now const.
9015 (dir_prefix): New.
9016 (short_base_name): Remove.
9017 * src/files.c: Adjust.
9018 (dirname.h): Include.
9019 (base_name): Don't prototype it.
9020 (finput): Remove, duplicates gram_in.
9021 (full_base_name, short_base_name): Replace by...
9022 (all_but_ext, all_but_tab_ext): these.
9023 (compute_base_names): Rename as...
9024 (compute_file_name_parts): this.
9025 Update to compute the new variables, including dir_prefix.
9026 Adjust dependencies.
9027 * src/output.c (prepare): Output them.
9028 * src/reader.c: Adjust to use gram_in, not finput.
9029 * src/scan-skel.l (@dir_prefix@): New.
9030
9031 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9032
9033 * lib/subpipe.c: New function end_of_output_subpipe() added
9034 to allow support for non-posix systems. This is a no-op function
9035 for posix systems.
9036
9037 * lib/subpipe.h: New function end_of_output_subpipe() added
9038 to allow support for non-posix systems. This is a no-op function
9039 for posix systems.
9040
9041 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
9042 handle the lack of pipe/fork functionality on non-posix systems.
9043
9044 * djgpp/Makefile.maint: DJGPP specific file.
9045
9046 * djgpp/README.in: DJGPP specific file.
9047
9048 * djgpp/config.bat: DJGPP specific configuration file.
9049
9050 * djgpp/config.sed: DJGPP specific configuration file.
9051
9052 * djgpp/config.site: DJGPP specific configuration file.
9053
9054 * djgpp/config_h.sed: DJGPP specific configuration file.
9055
9056 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
9057
9058 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
9059
9060 2005-10-02 Akim Demaille <akim@epita.fr>
9061
9062 * data/location.cc: New, extract from...
9063 * data/lalr1.cc: here.
9064 (location.hh): Include it after the user prologue, in case the
9065 filename type is defined by the user.
9066 Forward declation location and position before the pre-prologue.
9067 (yyresult_): Rename as...
9068 (yyresult): this, it's a local variable, not an attribute.
9069 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
9070
9071 2005-10-01 Akim Demaille <akim@epita.fr>
9072
9073 * examples/extexi: Restore the #line generation.
9074
9075 2005-09-30 Akim Demaille <akim@epita.fr>,
9076 Alexandre Duret-Lutz <adl@gnu.org>
9077
9078 Move the token type and YYSTYPE in the parser class.
9079 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
9080 (parser::token): New, from the moved free definition of tokens.
9081 (parser::semantic_value): Now a full definition instead of an
9082 indirection to YYSTYPE.
9083 (b4_post_prologue): No longer included in the header file, but
9084 in the implementation file.
9085 * doc/bison.texi (C+ Language Interface): Update.
9086 * src/parse-gram.y: Support unary %define.
9087 * tests/actions.at: Define global_tokens_and_yystype for backward
9088 compatibility until we update the tests.
9089 * tests/calc.at: Idem.
9090 (first_line, first_column, last_line, last_column): Define for lalr1.cc
9091 to simplify the code.
9092
9093 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
9094
9095 Port to SunOS 4.1.4, which lacks strtoul and strerror.
9096 Ah, the good old days! Problem reported by Peter Klein.
9097 * bootstrap (gnulib_modules): Add strerror, strtoul.
9098 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
9099 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
9100
9101 2005-09-29 Akim Demaille <akim@epita.fr>
9102
9103 * data/c.m4 (b4_error_verbose_if): New.
9104 * data/lalr1.cc: Use it.
9105 (YYERROR_VERBOSE_IF): Remove.
9106 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
9107 parser members, replaced by...
9108 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
9109 local variables.
9110 (yysyntax_error_): Takes the state number as argument.
9111 (yyreduce_print_): Use the argument yyrule, not the former
9112 attribute yyn_.
9113
9114 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
9115
9116 * bootstrap (gnulib_modules): Add verify.
9117 * lib/.cvsignore: Add verify.h.
9118 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
9119 * src/system.h (verify): Remove.
9120 Include verify.h instead.
9121 * src/tables.c (tables_generate): Use new API for 'verify'.
9122
9123 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
9124
9125 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
9126 local variables whose names begin with 'yy'.
9127 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
9128 Trivial changes from Joel E. Denny.
9129
9130 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
9131 it itself.
9132 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
9133 don't use alloca any more.
9134
9135 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
9136 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
9137 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
9138 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
9139 to match yacc.c, to test more hosts.
9140
9141 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
9142
9143 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
9144 doesn't affect behavior.
9145 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
9146 Solaris, AIX, MSC.
9147 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
9148 This works a bit better with glibc, if user code has already included
9149 stdlib.h.
9150 * doc/bison.texinfo (Bison Parser): Document that users can't
9151 arbitrarily use malloc and free for other purposes. Document
9152 that <alloca.h> and <malloc.h> might be included.
9153 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
9154 user must declare alloca.
9155
9156 * HACKING (release): Forwarn the Translation Project about
9157 stable releses.
9158
9159 2005-09-20 Akim Demaille <akim@epita.fr>
9160
9161 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
9162
9163 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
9164
9165 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
9166 (YYSTACK_ALLOC_MAXIMUM): Use it.
9167 (yysyntax_error): New function.
9168 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
9169 multiple syntax errors are reported, and alloca is being used.
9170 Instead, reallocate buffers twice as big each time, so that
9171 we waste at most half the allocated memory. Start with a small
9172 (128-byte) buffer that will suffice in most cases anyway.
9173 Use yysyntax_error to do most of the work.
9174
9175 * doc/bison.texinfo (Error Reporting, Table of Symbols):
9176 yynerrs is the number of errors reported, not the number of
9177 errors encountered.
9178
9179 * tests/glr-regression.at (Duplicated user destructor for lookahead):
9180 Mark it as expected to fail.
9181 Cast result of malloc; problem reported by twlevo@xs4all.nl.
9182 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
9183 Don't start user-code symbols with "yy", to avoid name space problems.
9184
9185 2005-09-19 Akim Demaille <akim@epita.fr>
9186
9187 Remove the traits, failed experiment.
9188 It never proved useful, and anyway because of the current
9189 definition, it was not possible to have several specialization of
9190 this traits, making it useless.
9191 * data/lalr1.cc (yy:traits): Remove.
9192 Inline its definitions in the parser class.
9193
9194 2005-09-19 Akim Demaille <akim@epita.fr>
9195
9196 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
9197 least Mac OSX with a /usr/local install of gettext.
9198
9199 2005-09-19 Akim Demaille <akim@epita.fr>
9200
9201 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
9202 and yytoken for similarity with the other skeletons.
9203
9204 2005-09-19 Akim Demaille <akim@epita.fr>
9205
9206 * NEWS, configure.ac: update version number to 2.1a.
9207
9208 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
9209
9210 * NEWS: Version 2.1.
9211
9212 * NEWS: Remove notice of yytname change, since it was never in an
9213 official release.
9214 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
9215 diagnostic.
9216 * src/output.c (prepare): Likewise.
9217 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
9218 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
9219 is not defined. This is an awful hack, but it's enough for now.
9220 All callers changed.
9221 * tests/glr-regression-at (make_value): Args are const pointers now,
9222 to avoid GCC warning.
9223 (Duplicated user destructor for lookahead): New test. Currently
9224 skipped. It fails on my host but I'm not sure it'll always fail.
9225
9226 2005-09-16 Akim Demaille <akim@epita.fr>
9227
9228 * src/symtab.h (struct symbol): Declare the printer and destructor
9229 as const, to avoid accidental calls to free.
9230 (symbol_destructor_set, symbol_printer_set): Adjust.
9231 * src/symtab.c: Adjust.
9232
9233 2005-09-16 Akim Demaille <akim@epita.fr>
9234
9235 * data/c.m4 (b4_token_enums): New.
9236 (b4_token_defines): Rename as...
9237 (b4_token_enums_defines): this.
9238 (b4_token_defines): New, output only the #defines.
9239 * data/yacc.c, data/glr.c: Adjust.
9240 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
9241 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
9242 as default values.
9243
9244 2005-09-16 Akim Demaille <akim@epita.fr>
9245
9246 * data/lalr1.cc (yylex_): Remove, inline its code.
9247 (yyreport_syntax_error_): Remove, replaced by...
9248 (yysyntax_error_): this which returns a string and leaves to the
9249 caller the call to the users' error function.
9250 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
9251 Move from members of the parser object...
9252 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
9253 to local variables of the parse function.
9254
9255 2005-09-16 Akim Demaille <akim@epita.fr>
9256
9257 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
9258 since it's in Bison's name space.
9259
9260 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
9261
9262 * data/glr.c (yyresolveValue): Add default case to pacify
9263 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
9264
9265 * NEWS: Document when yyparse started to return 2.
9266 * doc/bison.texinfo (Parser Function): Document when yyparse
9267 returns 2.
9268
9269 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
9270 (b4_filename_type): Renamed back from b4_file_name_type. All uses
9271 changed.
9272 (class position): file_name -> filename (reverting). All uses changed.
9273
9274 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
9275
9276 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
9277 do anything if $@ exists. This reverts part of the 2005-07-07
9278 patch.
9279
9280 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
9281
9282 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
9283 contains obsolete information and isn't worth distributing as a
9284 separate file anyway.
9285 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
9286 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
9287 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
9288 (yyparse): Abort if user code uses longjmp to throw an unexpected
9289 value.
9290
9291 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
9292
9293 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
9294 Suggested by twlevo@xs4all.nl.
9295
9296 * data/glr.c (YYCHK1): Do not assume YYE is in range.
9297 This avoids a diagnostic from gcc -Wswitch-enum.
9298 Problem reported by twlevo@xs4all.nl.
9299
9300 * doc/bison.texinfo: Don't use "filename", as per GNU coding
9301 standards. Use "file name" or "file" or "name", depending on
9302 the context.
9303 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
9304 not to hack/foo.tab.c.
9305 (Calc++ Top Level): 2nd arg of main is not const.
9306 * data/glr.c: b4_filename -> b4_file_name.
9307 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
9308 All uses changed.
9309 (class position): filename -> file_name. All uses changed.
9310 * data/yacc.c: b4_filename -> b4_file_name.
9311 * lib/bitset.h: filename -> file_name in local vars.
9312 * lib/bitset_stats.c: Likewise.
9313 * src/files.c: Likewise.
9314 * src/scan-skel.l ("@output ".*\n): Likewise.
9315 * src/files.c (file_name_split): Renamed from filename_split.
9316 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
9317
9318 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
9319
9320 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
9321 to accommodate latest gnulib.
9322
9323 * tests/glr-regression.at (Duplicate representation of merged trees):
9324 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
9325
9326 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
9327 needed.
9328
9329 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
9330
9331 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
9332 All uses changed. Invoke user destructor after an error during a
9333 split parse (trivial change from Joel E. Denny).
9334
9335 * tests/glr-regression.at
9336 (User destructor after an error during a split parse): New test case.
9337 Problem reported by Joel E. Denny in:
9338 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
9339
9340 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
9341
9342 * README-cvs: Give URLs for recommended tools.
9343 Mention Gzip version problem, and bootstrapping issues.
9344 Remove troubleshooting section, as it's somewhat obsolete.
9345
9346 * bootstrap (no_cache): New var, to accommodate different wget
9347 variants. Use it instead of '-C off'. Problem reported by
9348 twlevo@xs4all.nl.
9349
9350 * data/glr.c (yydestroyStackItem): New function.
9351 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
9352 debugging information. Problem reported by Joel E. Denny.
9353
9354 2005-08-25 Akim Demaille <akim@epita.fr>
9355
9356 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
9357
9358 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
9359
9360 * data/glr.c (yyrecoverSyntaxError, yyreturn):
9361 Don't invoke destructor on unresolved entries.
9362 * tests/glr-regression.at
9363 (User destructor for unresolved GLR semantic value): New test case.
9364 Problem reported by Joel E. Denny in:
9365 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
9366
9367 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
9368
9369 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
9370 Add strnlen.c.
9371 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
9372 lib-prefix.m4, po.m4.
9373
9374 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
9375 in yydestruct diagnostic, since it might not be an error.
9376 Problem reported by Joel Denny near end of
9377 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
9378 * data/lalr1.cc (yyerturn): Likewise.
9379 * data/yacc.c (yyreturn): Likewise.
9380 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
9381
9382 * src/files.c: Remove obsolete FIXME comment.
9383
9384 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
9385 with the other templates, and to fix bogus run-on messages such
9386 as the one reported at the end of
9387 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
9388 All callers changed to avoid the newline.
9389 (yyprocessOneStack): Output two lines rather than one, to accommodate
9390 the above change. This changes the debug output format slightly.
9391
9392 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
9393 reported by Joel E. Denny in
9394 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
9395 (trivial change).
9396 * tests/glr-regression.at (Duplicate representation of merged trees):
9397 New test, from Joel E. Denny in:
9398 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
9399 * THANKS: Add Joel E. Denny.
9400
9401 * configure.ac (AC_INIT): Bump to 2.0c.
9402
9403 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
9404
9405 * NEWS: Version 2.0b.
9406
9407 * Makefile.am (SUBDIRS): Put examples before tests, so that
9408 "make check" doesn't finish with "All 1 tests passed".
9409
9410 * tests/regression.at (Token definitions): Don't rely on
9411 AT_PARSER_CHECK for data that contains backslashes. It currently
9412 uses 'echo', and 'echo' isn't portable if its argument contains
9413 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
9414 that the byte '\0xff' is not printable in the C locale; it is,
9415 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
9416 not printable, so use '\0x81' to test.
9417
9418 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
9419 version of GCC, since the macro is used with non-GCC compilers.
9420
9421 Fix core dump reported by Pablo De Napoli in
9422 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
9423 * tests/regression.at (Invalid inputs with {}): New test.
9424 * src/parse-gram.y (token_name): Translate type before using
9425 it as an index.
9426
9427 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
9428 the user's name space. All uses changed to __attribute__
9429 ((__unused__)).
9430 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
9431 Add __attribute__ ((__noreturn__)).
9432
9433 * etc/clcommit: Remove. We weren't using it, and it failed
9434 "make maintainer-distcheck".
9435 * Makefile.maint: Merge from coreutils.
9436 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
9437 (syntax-check-rules): Change list of rules as described below.
9438 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
9439 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
9440 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
9441 (sc_trailing_space): New rules.
9442 (sc_xalloc_h_in_src): Remove.
9443 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
9444 (sc_space_tab, sc_error_exit_success, sc_changelog):
9445 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
9446 (makefile-check, po-check, author_mark_check):
9447 (makefile_path_separator_check, copyright-check):
9448 Use grep -n, to make it easier to find violations.
9449 Use CVS_LIST and CVS_LIST_EXCEPT.
9450 (header_regexp, h_re): Remove.
9451 (dd_c): New macro.
9452 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
9453 (my-distcheck): Use more-modern GCC flags.
9454 (signatures, %.asc): Remove.
9455 (rel-files, announcement): Remove signatures.
9456 Restore old updating code, even though we don't use it, so
9457 that we're the same as coreutils.
9458 (alpha, beta, major): Depend on news-date-check.
9459 Make the upload commands.
9460
9461 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
9462 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
9463 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
9464 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
9465 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
9466 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
9467 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
9468 * tests/sets.at: Likewise.
9469
9470 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
9471 we comment out the Autoconf version number.
9472 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
9473 it's error-prone and "make maintainer-distcheck" rejects it.
9474
9475 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
9476 Indent calls to "error" to pacify "make maintainer-distcheck",
9477 when the calls are not intended to be translated.
9478 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
9479
9480 * src/Makefile.am (DEFS): Use +=, to pacify
9481 "make maintainer-distcheck".
9482 (bison_SOURCES): Add scan-skel.h.
9483 (sc_tight_scope): New rule, from coreutils.
9484
9485 * src/files.c (src_extension, header_extension):
9486 Now static, not extern.
9487 * src/getargs.c (short_options): Likewise.
9488 * src/muscle_tab.c (muscle_table): Likewise.
9489 * src/parse-gram.y (current_class, current_type, current_prec):
9490 Likewise.
9491 * src/reader.c (grammar_end, previous_rule_end): Likewise.
9492 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
9493 * src/main.c (main): Cast bindtextdomain and textdomain calls to
9494 void, to avoid warning when NLS is disabled.
9495 * src/output.c: Include scan-skel.h.
9496 (scan_skel): Remove decl, since scan-skel.h does this.
9497 (output_skeleton):
9498 Indent calls to "error" to pacify "make maintainer-distcheck".
9499 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
9500 * src/reader.h (gram_end, gram_lineno): New decls to pacify
9501 "make maintainer-distcheck".
9502 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
9503 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
9504 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
9505 (skel_lex_destroy, scan_skel): Move these decls to...
9506 * src/scan-skel.h: New file.
9507 * src/uniqstr.c (uniqstr_assert):
9508 Indent calls to "error" to pacify "make maintainer-distcheck".
9509
9510 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
9511 not @VAR@.
9512
9513 * tests/torture.at: Revamp to avoid misuse of atoi that
9514 "make maintainer-distcheck" complained about.
9515
9516 * examples/extexi (message): Don't print a message more than once,
9517 and omit line-number decoration that makes Emacs compile think
9518 that informative messages are worth worrying about.
9519
9520 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
9521
9522 * configure.ac: Update version number.
9523
9524 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
9525 accidentally.
9526 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
9527 autogenerated by the maintainer.
9528 * examples/calc++/.cvsignore: Add *.yy.
9529
9530 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
9531 * lib/bitset_stats.c (bitset_stats_init): Likewise.
9532 * lib/bitsetv.c (bitsetv_alloc): Likewise.
9533
9534 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
9535
9536 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
9537 from maintainer-distcheck about casting the argument of 'free'.
9538
9539 * NEWS: Mention recent yytname changes.
9540 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
9541
9542 * bootstrap: For translations that have not yet been upgraded to
9543 the new runtime-po domain, prime the pump by extracting the
9544 relevant strings from the obsolete translations. This code can be
9545 removed once the bison-runtime domain has been translated by each
9546 team.
9547
9548 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
9549 now that token names are already quoted.
9550
9551 Fix problem reported by Anthony Heading.
9552 * data/glr.c (YYTOKEN_TABLE): New macro.
9553 (yytname): Define if YYTOKEN_TABLE.
9554 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
9555 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
9556 (YYERROR_VERBOSE): Define the same way the other skeletons do.
9557 * src/output.c (prepare_symbols): Output token_table_flag.
9558
9559 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
9560
9561 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
9562 again if the first call fails.
9563
9564 * data/glr.c (yytnamerr): New function.
9565 (yyreportSyntaxError): Use it to dequote most string literals.
9566 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
9567 with other skeletons. All uses changed.
9568 (yytnameerr_): New function.
9569 (yyreport_syntax_error): Use it to dequote most string literals.
9570 * data/yacc.c (yytnamerr): New function.
9571 (yyerrlab): Use it to decode most string literals.
9572 * doc/bison.texinfo (Decl Summary, Calling Convention):
9573 Clarify quoting convention of yytname.
9574 * src/output.c (prepare_symbols): Quote all names. This undoes
9575 the 2005-04-17 change, which is now accomplished (mostly) via
9576 changes in the parsers as described above.
9577 * tests/regression.at (Token definitions, Web2c Actions):
9578 Undo most 2005-04-17 change here, too.
9579
9580 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
9581
9582 Fix more problems reported by twlevo@xs4all.nl.
9583 * tests/cxx-type.at: Don't pipe output of ./types through sed to
9584 remove trailing spaces. This loses the exit status of ./types,
9585 and isn't needed since ./types shouldn't be emitting trailing
9586 spaces.
9587 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
9588 as the stack isn't valid in that case.
9589
9590 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
9591 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
9592 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
9593 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
9594 is used.
9595 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
9596 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
9597 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
9598 Likewise.
9599
9600 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
9601 overly-picky compilers that reject 'char *foo = "bar";'.
9602
9603 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
9604 to FILE * parameter, not to stderr. This fixes a typo introduced
9605 in the 2005-07-12 change.
9606
9607 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
9608 warnings from GCC 4.
9609
9610 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
9611 (yyglrShiftDefer, yysplitStack):
9612 Remove unused parameters b4_pure_formals. All uses changed.
9613 (yyglrShift): Remove unused parameters b4_user_formals.
9614 All uses changed.
9615 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
9616
9617 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
9618
9619 Destructor cleanups and regularization among the three skeletons.
9620 * NEWS: Document the behavior changes.
9621 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
9622 stack before failing, as the cleanup code will do it for us now.
9623 * data/lalr1.cc (yyerrlab): Likewise.
9624 * data/glr.c (yyparse): Pop everything off the stack before
9625 freeing it, so that destructors get called properly.
9626 * data/lalr1.cc (yyreturn): Likewise.
9627 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
9628 This is more consistent.
9629 * doc/bison.texinfo (Destructor Decl): Mention more reasons
9630 why destructors might be called. 1.875 -> 2.1.
9631 (Destructor Decl, Decl Summary, Table of Symbols):
9632 Some English-language cleanups for %destructor.
9633 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
9634 Add output line for destructor of start symbol.
9635 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
9636 because of that same extra output line.
9637
9638 * NEWS: Document minor wording changes in diagnostics of
9639 Bison-generated parsers.
9640 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
9641 Remove unused formals. All uses changed.
9642 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
9643 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
9644 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
9645 Rename yyoverflowab to yyexhaustedlab.
9646 When memory exhaustion occurs during syntax-error reporting,
9647 report it separately rather than in a single diagnostic; this
9648 eases translation.
9649 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
9650 (Memory Exhausted): Renamed from Parser Stack Overflow.
9651 Revamp wording slightly to prefer "memory exhaustion".
9652 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
9653
9654 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
9655
9656 Add i18n support to the GLR skeleton. Partially fix the C++
9657 skeleton; a C++ expert needs to finish this. Remove debugging
9658 msgids; there's little point to having them translated, since they
9659 can be understood only by someone who can read the
9660 (English-language) source code.
9661
9662 Generate runtime-po/bison-runtime.pot automatically, so that we
9663 don't have to worry about garbage getting in that file. We'll
9664 make sure after the next official release that old msgids don't
9665 get lost. See
9666 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
9667
9668 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
9669 Now auto-generated.
9670 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
9671 Fix typos in explanations of the runtime file.
9672 * bootstrap: Change gettext keyword from YYI18N to YY_.
9673 Use standard Makefile.in.in in runtime-po, since we'll arrange
9674 for backward-compatible bison-runtime.po files in a different way.
9675 * data/glr.c (YY_): New macro, from yacc.c.
9676 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
9677 Translate messages intended for users.
9678 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
9679 the wording in the other skeletons. We don't know that the memory
9680 is virtual.
9681 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
9682 Use same method that yacc.c uses.
9683 Don't translate debugging messages.
9684 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
9685 it doesn't work (yet), and requires C++ expertise to fix.
9686 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
9687 Move defn to a more logical place, to be consistent with other
9688 skeletons.
9689 Don't translate debugging messages.
9690 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
9691 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
9692 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
9693 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
9694
9695 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
9696 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
9697 void, not int.
9698 * tests/glr-regression.at (Badly Collapsed GLR States):
9699 Likewise.
9700 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9701 yylex should return 0 at EOF rather than aborting.
9702
9703 Improve tests for stack overflow in GLR parser.
9704 Problem reported by twlevo@xs4all.nl.
9705 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
9706 All uses removed.
9707 (yyStackOverflow): Just longjmp, but with value 2 so that caller
9708 can handle the problem.
9709 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
9710 (yyparse): New local variable yyresult to record the result.
9711 Use result of setjmp to set it, rather than storing itinto
9712 struct.
9713 (yyDone): Remove label.
9714 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
9715 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
9716 if YYABORT is used).
9717 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
9718 yyparse status; put status > 1 into diagnostic.
9719 Check that status==2 works.
9720 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
9721 Use exit status 3 for failure to open (which shouldn't happen).
9722
9723 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
9724
9725 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
9726 1 on syntax error; just let yyparse do its thing.
9727 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
9728 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
9729 (Exploding the Stack Size with Alloca):
9730 (Exploding the Stack Size with Malloc):
9731 Expect exit status 2, not 1, since the parser is supposed to blow
9732 its stack. Problem reported by twlevo@xs4all.nl.
9733
9734 * data/glr.c (yyparse): Don't assume that the initial calls
9735 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
9736 Print a stack-overflow message and fail instead.
9737 Initialize the line-number information before creating the stack,
9738 so that the stack-overflow message can report line zero safely.
9739
9740 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
9741
9742 Fix problems reported by twlevo@xs4all.nl.
9743 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
9744 (yyuserMerge): Provide a default case if b4_mergers is empty.
9745 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
9746 * tests/glr-regression.at
9747 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9748 Add casts to pacify C++ compilers.
9749 * tests/glr-regression.at (Improper merging of GLR delayed action
9750 sets): Declare yylex before using it.
9751 * tests/Makefile.am (maintainer-check-g++): Fix a stray
9752 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
9753 test for valgrind; valgrind is independent of g++.
9754 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
9755 for compatibility with POSIX 1003.1-2001 (if running coreutils).
9756 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
9757 Use a destructor, so that we can expand the stack. Change
9758 YYSTYPE to char * so that we can free it. Cast result of malloc.
9759
9760 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9761
9762 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
9763 a valgrind failure. Problem reported by twlevo@xs4all.nl.
9764
9765 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
9766
9767 * PACKAGING: New file, suggested by Bruno Haible and taken from
9768 similar wording in gettext's PACKAGING file.
9769 * NEWS: Mention PACKAGING.
9770 * Makefile.am (EXTRA_DIST): Add PACKAGING.
9771
9772 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
9773
9774 * NEWS: Document recent i18n improvements.
9775 * bootstrap: Get runtime translations into runtime-po.
9776 Create runtime-po files automatically, if possible.
9777 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
9778 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
9779 does not infringe on the user's name space.
9780 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
9781 * doc/bison.texinfo (Internationalization): Revamp the English
9782 and Texinfo syntax a bit, to try to make it clearer.
9783 (Bison Options, Option Cross Key): Mention --print-localedir.
9784 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
9785 YYENABLE_NLS. Quote a bit more.
9786 * runtime-po/.cvsignore: New file.
9787 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
9788 * runtime-po/Rules-quot: Remove; now created by bootstrap.
9789 * runtime-po/quot.sed: Likewise.
9790 * runtime-po/boldquot.sed: Likewise.
9791 * runtime-po/en@quot.header: Likewise.
9792 * runtime-po/en@boldquot.header: Likewise.
9793 * runtime-po/insert-header.sin: Likewise.
9794 * runtime-po/remove-potcdate.sin: Likewise.
9795 * runtime-po/Makevars: Likewise.
9796 * runtime-po/LINGUAS: Likewise.
9797 * runtime-po/de.po: Likewise; we will rely on the translation project
9798 to maintain this, so "bootstrap" should get it.
9799 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
9800 its value.
9801 * src/main.c (main): Bind the bison-runtime domain, too.
9802
9803 2005-07-12 Bruno Haible <bruno@clisp.org>
9804
9805 * data/yacc.c: Include <libintl.h> when NLS is enabled.
9806 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
9807 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
9808 * runtime-po: New directory.
9809 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
9810 $(DOMAIN).pot-update rule, so that old messages are never dropped.
9811 * runtime-po/Rules-quot: New file, copied from po/.
9812 * runtime-po/quot.sed: Likewise.
9813 * runtime-po/boldquot.sed: Likewise.
9814 * runtime-po/en@quot.header: Likewise.
9815 * runtime-po/en@boldquot.header: Likewise.
9816 * runtime-po/insert-header.sin: Likewise.
9817 * runtime-po/remove-potcdate.sin: Likewise.
9818 * runtime-po/Makevars: New file.
9819 * runtime-po/POTFILES.in: New file.
9820 * runtime-po/LINGUAS: New file.
9821 * runtime-po/bison-runtime.pot: New file.
9822 * runtime-po/de.po: New file.
9823 * m4/bison.m4: New file.
9824 * Makefile.am (SUBDIRS): Add runtime-po.
9825 (aclocaldir, aclocal_DATA): New variables.
9826 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
9827 Define aclocaldir.
9828 * src/getargs.c (usage): Document --print-localedir option.
9829 (PRINT_LOCALEDIR_OPTION): New enum item.
9830 (long_options): Add --print-localedir option.
9831 (getargs): Handle --print-localedir option.
9832 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
9833 (Internationalization): New section.
9834
9835 2005-07-12 Akim Demaille <akim@epita.fr>
9836
9837 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
9838 for consistency with the rest of the code.
9839 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
9840 Add separators.
9841
9842 2005-07-12 Akim Demaille <akim@epita.fr>
9843
9844 * src/parse-gram.y: Use %printer instead of YYPRINT.
9845
9846 2005-07-12 Akim Demaille <akim@epita.fr>
9847
9848 * src/symtab.h, src/symtab.c (symbol_print): New.
9849 * src/symlist.h, src/symlist.c (symbol_list_print): New.
9850 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
9851
9852 2005-07-12 Akim Demaille <akim@epita.fr>
9853
9854 * data/glr.c (b4_syncline): Fix (swap) the definitions of
9855 b4_at_dollar and b4_dollar_dollar.
9856
9857 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
9858
9859 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
9860 and Pennello's paper.
9861
9862 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
9863
9864 * data/yacc.c (yyparse): Undo previous patch. Instead,
9865 set yylsp[0] and yyvsp[0] only if the initial action
9866 sets yylloc and yylval, respectively.
9867
9868 * data/yacc.c (yyparse): In the initial action, set
9869 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
9870 This avoids the use of undefined variables if the initial
9871 action does not set yylloc and/or yylval.
9872
9873 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
9874
9875 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
9876 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
9877 Remove from CVS. These files are automatically generated.
9878 * examples/extexi: Clarify that this file is now part of Bison,
9879 not GNU M4, and that it works with any POSIX-compatible Awk.
9880 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
9881 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
9882 so that we also get calc++-parser.yy. Geneate it.
9883 Use $(AWK), not gawk, since any conforming Awk will do.
9884 Put comment before action, since older 'make' can't handle comment
9885 in action.
9886 $(BUILT_SOURCES): List all built sources, not just some of them.
9887 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
9888 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
9889 $($(calc_sources_generated)): Remove unnecessary test for existence
9890 of target. (This had a shell syntax error anyway; a stray "x".)
9891 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
9892 calc++-parser.yy.
9893 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
9894
9895 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
9896 implied by the other modules.
9897
9898 2005-07-06 Akim Demaille <akim@epita.fr>
9899
9900 Bind examples/calc++ to the package.
9901 * examples/calc++/Makefile: Remove, replaced by...
9902 * examples/calc++/Makefile.am: ... this new file.
9903 * examples/calc++/test: Remove input.
9904 * examples/calc++/compile: Remove.
9905 * examples/Makefile.am: New.
9906 * configure.ac, Makefile.am: Adjust.
9907 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
9908
9909 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
9910
9911 * data/glr.c (yyFail): Drastically simplify; since the format argument
9912 never had any % directives, we can simply pass it to yyerror.
9913 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
9914 be modified later, as that is the usual style in glr.c.
9915 Problems reported by Paul Hilfinger.
9916
9917 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
9918 and size overflow errors.
9919 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
9920 in case the user prolog sets feature-test macros like _GNU_SOURCE.
9921 (YYSIZEMAX): New macro.
9922 (yystpcpy): New function, taken from yacc.c.
9923 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
9924 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
9925 so that we don't have to maintain their signatures.
9926 (yyFail): Check for buffer overflow, by using vsnprintf rather
9927 than vsprintf. Allocate a bigger buffer if possible.
9928 Report an error if buffer allocation fails.
9929 (yyStackOverflow): New function.
9930 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
9931 the initialization was successful. It might fail if storage was
9932 exhausted.
9933 (yyexpandGLRStack): Add more checks for storage allocation failure.
9934 Use yyStackOverflow to report failures.
9935 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
9936 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
9937 Don't assume stack number fits in int.
9938 (yysplitStack): Check for storage allocation failure.
9939 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
9940 can print diagnostics on storage allocation failure. All callers
9941 changed.
9942 (yyresolveValue): Use yybool for boolean.
9943 (yyreportSyntaxError): Check for size-calculation overflow.
9944 This code is taken from yacc.c.
9945 (yyparse): Check for storage allocation errors when allocating
9946 the initial stack.
9947
9948 2005-07-05 Akim Demaille <akim@epita.fr>
9949
9950 Extract calc++ from the documentation.
9951 * doc/bison.texinfo (Calc++): Add the extraction marks.
9952 * examples/extexi: New, from the aborted GNU Programming 2E.
9953 Separate the different paragraph of a file with empty lines.
9954 * examples/Makefile: Use it to extract the whole calc++ example.
9955
9956 2005-06-24 Akim Demaille <akim@epita.fr>
9957
9958 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
9959 class typedefs.
9960
9961 2005-06-22 Akim Demaille <akim@epita.fr>
9962
9963 * doc/bison.texinfo (C++ Language Interface): First stab.
9964 (C++ Parsers): Remove.
9965
9966 2005-06-22 Akim Demaille <akim@epita.fr>
9967
9968 * data/lalr1.cc (yylex_): Honor %lex-param.
9969
9970 2005-06-22 Akim Demaille <akim@epita.fr>
9971
9972 Start a set of simple examples.
9973 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
9974 * examples/calc++/calc++-driver.hh,
9975 * examples/calc++/calc++-parser.yy,
9976 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
9977 * examples/calc++/compile, examples/calc++/test: New.
9978
9979 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
9980
9981 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
9982 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
9983 which stems from the 2005-05-27 patch.
9984
9985 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9986
9987 * data/glr.c: Modify treatment of unused parameters to permit use
9988 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
9989
9990 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
9991
9992 Fix infringement on user name space reported by Janos Zoltan Szabo.
9993 * data/yacc.c (yyparse): strlen -> yystrlen.
9994
9995 2005-05-30 Akim Demaille <akim@epita.fr>
9996
9997 * data/lalr1.cc (_): New.
9998 Translate the various messages.
9999
10000 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
10001
10002 Fix infringement on user name space reported by Bruno Haible.
10003 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
10004 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
10005 the user's name space.
10006 (alloca): Include <stdlib.h> to get it, if it's not built in.
10007 (YYMALLOC, YYFREE): Define only if needed.
10008 (malloc, free): Declare, but only if needed, as this infringes on
10009 the user name space.
10010
10011 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
10012
10013 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
10014 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
10015 with %d format.
10016 * lib/ebitset.c (min, max): Undef before defining.
10017 * lib/vbitset.c (min, max): Likewise.
10018 * lib/subpipe.c (create_subpipe): Save local variables in case
10019 vfork clobbers them.
10020
10021 2005-05-24 Bruno Haible <bruno@clisp.org>
10022
10023 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
10024 error message syntax used by gcc-4.0.
10025
10026 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
10027
10028 * README: Mention m4 1.4.3. Remove obsolete advice about
10029 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
10030
10031 * bootstrap: Remove workaround for problem I encountered with
10032 gettext 0.14.1; it seems to be fixed now.
10033
10034 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
10035
10036 * NEWS: Version 2.0a.
10037
10038 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
10039 the previous change.
10040
10041 Various maintainer cleanups.
10042 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
10043 conftest*, for benefit of CVS commands run at the same time as
10044 "configure". Add build-aux, since "bootstrap" now creates it and
10045 its subfiles.
10046 * Makefile.cfg (move_if_change): Remove.
10047 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
10048 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
10049 (po_repo, do-po-update, po-update, wget_files, get-targets):
10050 (config.guess-url_prefix, config.sub-url_prefix):
10051 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
10052 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
10053 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
10054 Remove.
10055 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
10056 this is now the recommended name.
10057 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
10058 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
10059 ylwrap. These files now go into build-aux.
10060 * config/move-if-change: Remove.
10061 * config/prev-version.txt: Bump from 1.75 to 2.0.
10062
10063 * bootstrap: Add stdio-safer, unistd-safer modules.
10064 Remove m4/glibc2.m4 (introduced by latest gnulib, but
10065 we don't need it).
10066 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
10067 fopen-safer.c, stdio-safer.h, unistd-safer.h.
10068 * lib/subpipe.c: Include "unistd-safer.h".
10069 (create_subpipe): Make sure all the newly-created
10070 file descriptors are > 2, so that diagnostics don't
10071 get sent down them (which might cause Bison to hang, in theory).
10072 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
10073 * src/files.c (xfopen): Use fopen_safer, not fopen.
10074
10075 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
10076 yesterday's yacc.c fix.
10077
10078 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
10079
10080 * data/glr.c, data/lalr1.cc: Update copyright date.
10081
10082 Fix a destructor bug reported by Wolfgang Spraul in
10083 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
10084 * data/yacc.c (yyabortlab): Don't call destructor, and
10085 don't set yychar to EMPTY.
10086 (yyoverflowlab): Don't call destructor.
10087 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
10088 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
10089 since we no longer output the message "discarding lookahead token
10090 end of input ()".
10091
10092 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10093
10094 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
10095 fix a small glitch in debugging output.
10096 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
10097 after YY_SYMBOL_PRINT where needed.
10098
10099 (struct yyGLRState): Add some comments.
10100 (struct yySemanticOption): Add some comments.
10101 (union yyGLRStackItem): Add comment.
10102
10103 (yymergeOptionSets): Correct this to properly perform the union,
10104 avoiding infinite reported by Michael Rosien.
10105 Update comment.
10106
10107 * tests/glr-regression.at: Add test for GLR merging error reported
10108 by M. Rosien.
10109
10110 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
10111
10112 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
10113 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
10114 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
10115 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
10116 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
10117 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
10118 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
10119 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
10120 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
10121 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
10122 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
10123 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
10124 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
10125 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
10126 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
10127 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
10128 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
10129 src/derives.h, src/files.c, src/files.h, src/getargs.c,
10130 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
10131 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
10132 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
10133 src/output.h, src/parse-gram.c, src/parse-gram.h,
10134 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
10135 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
10136 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
10137 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
10138 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
10139 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
10140 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
10141 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
10142 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
10143 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
10144 tests/reduce.at, tests/regression.at, tests/sets.at,
10145 tests/synclines.at, tests/testsuite.at, tests/torture.at:
10146 Update FSF postal mail address.
10147
10148 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
10149
10150 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
10151 Problem reported by Ralf Menzel.
10152
10153 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
10154
10155 * tests/actions.at: Test that stack overflow invokes destructors.
10156 From Marcus Holland-Moritz.
10157 * data/yacc.c (yyerrlab): Move the code that destroys the stack
10158 from here....
10159 (yyreturn): to here. That way, destructors are called properly
10160 even if the stack overflows, or the user calls YYACCEPT or
10161 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
10162 (yyoverflowlab): Destroy the lookahead.
10163
10164 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
10165
10166 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
10167
10168 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
10169
10170 * NEWS: Bison-generated C parsers no longer quote literal strings
10171 associated with tokens.
10172 * src/output.c (prepare_symbols): Don't escape strings,
10173 since users don't want to see C escapes.
10174 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
10175 in diagnostics.
10176 * tests/input.at (Torturing the Scanner): Likewise.
10177 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
10178
10179 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
10180
10181 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
10182 the data size is known to be too small and we can't increase it.
10183 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
10184
10185 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
10186
10187 * src/parse-gram.y: Include quotearg.h.
10188 (string_as_id): Quote $1 before using it as a key, since the
10189 lexer no longer quotes it for us.
10190 (string_content): Don't strip quotes, since lexer no longer
10191 quotes it for us.
10192 * src/scan-gram.l: Include quotearg.h.
10193 ("\""): Omit quote.
10194 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
10195 a key, since the rest of the lexer doesn't quote it.
10196 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
10197 * tests/regression.at (Token definitions): Check for backslashes
10198 in token strings.
10199
10200 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
10201 (YYSIZE_T): Define to unsigned long int when using an older compiler.
10202 (yyparse): Revamp code to generate long syntax error message, to
10203 make it easier to translate, and to avoid problems with arithmetic
10204 overflow. Change "virtual memory" to "memory" in diagnostic, since
10205 we don't know whether the memory is virtual.
10206
10207 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
10208
10209 * NEWS: Bison-generated C parsers now use the _ macro to
10210 translate strings.
10211 * data/yacc.c (_) [!defined _]: New macro.
10212 All English strings wrapped inside this macro.
10213 * doc/bison.texinfo (Bison Parser): Document _.
10214 * po/POTFILES.in: Include src/parse-gram.c, since it now
10215 includes translateable strings that parse-gram.y doesn't.
10216
10217 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
10218
10219 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
10220 reverting the 2004-10-11 change to this function.
10221 (symbol_check_alias_consistency): Don't call symbol_type_set
10222 if the type name is already correct.
10223 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
10224
10225 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
10226
10227 * tests/regression.at (Token definitions): Don't use a token named
10228 c, as that generates a "#define c ..." that runs afoul of buggy
10229 stdlib.h that uses the identifier c as a member of struct
10230 drand48_data. Problem reported by Horst Wente.
10231
10232 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
10233
10234 * bootstrap: Change translation URL from
10235 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
10236 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
10237 redirection glitches. Problem reported by twlevo@xs4all.nl.
10238
10239 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
10240
10241 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
10242 after operands; POSIX says this isn't portable for the c99 command.
10243
10244 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
10245
10246 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
10247 immediately if a data overrun has occurred; this may help us track
10248 down what may be a spurious failure on MacOS.
10249
10250 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
10251
10252 Respond to problems reported by twlevo@xs4all.nl.
10253
10254 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
10255
10256 * src/vcg.h: Comment fix.
10257 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
10258 (G_CMAX): Change to -1 instead of INT_MAX.
10259
10260 * data/yacc.c (yyparse): Omit spaces before #line.
10261
10262 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
10263
10264 * src/tables.c (state_number_to_vector_number): Put it inside an
10265 "#if 0", since it's not currently used. Problem reported by
10266 Roland McGrath.
10267
10268 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
10269
10270 * src/output.c (escaped_output): Renamed from
10271 escaped_file_name_output, since we now use it for symbol tags as
10272 well. All uses changed.
10273 (symbol_destructors_output, symbol_printers_output):
10274 Escape symbol tags too.
10275 Problem reported by Matyas Forstner in
10276 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
10277
10278 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
10279 not needed.
10280 * src/output.c (user_actions_output, token_definitions_output,
10281 symbol_destructors_output, symbol_printers_output): Likewise.
10282 * src/reader.c (prologue_augment): Likewise.
10283 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
10284
10285 * src/vcg.c (output_edge): Don't quote linestyle arg.
10286 Problem reported by twlevo@xs4all.nl.
10287
10288 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
10289
10290 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
10291 example, reported by Derek M Jones. Also, make the example even
10292 more outrageous, to better illustrate how bad the problem is.
10293
10294 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
10295
10296 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
10297 putsym. Typo reported by Sebastian Piping.
10298
10299 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
10300
10301 * doc/bison.texinfo (Language and Grammar): some -> same
10302 (Epilogue): int he -> in the
10303 Typos reported by Sebastian Piping via Justin Pence.
10304
10305 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
10306
10307 * tests/glr-regression.at (Improper handling of embedded actions
10308 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
10309 embedded actions and $-N in GLR parsers", work around an Autoconf bug
10310 with dollar signs in test names.
10311 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
10312 for a similar reason.
10313
10314 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
10315
10316 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
10317 wants to redefine G_VIEW.
10318
10319 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
10320
10321 * src/vcg.c (get_view_str): Remove case for normal_view.
10322 Problem reported by twlevo@xs4all.nl.
10323
10324 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
10325
10326 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
10327 Problem reported by twlevo@xs4all.nl.
10328
10329 * doc/bison.texinfo: Change @dircategory from "GNU programming
10330 tools" to "Software development". Requested by Richard Stallman
10331 via Karl Berry.
10332
10333 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
10334
10335 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
10336 Problem reported by twlevo@xs4all.nl.
10337
10338 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
10339
10340 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
10341 keyword; it's not needed with modern compilers, and it doesn't
10342 affect correctness with older compilers. Suggested by
10343 twlevo@xs4all.nl.
10344
10345 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
10346
10347 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
10348 gcc -Wswitch-default.
10349 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
10350 * data/yacc.c (yyparse): Likewise.
10351
10352 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
10353
10354 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
10355 already. Let config.h define any nonstandard values.
10356
10357 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
10358
10359 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
10360 for the benefit of slower hosts. Problem reported by
10361 Nelson H. F. Beebe.
10362
10363 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
10364
10365 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
10366 being defined and not used.
10367 * data/lalr1.cc (yyparse): Likewise.
10368 Use "if (false)" rather than "if (0)".
10369
10370 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
10371
10372 * TODO: Mention that we should allow NUL bytes in tokens.
10373
10374 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
10375
10376 * src/scan-skel.l (<<EOF>>): Don't close standard output.
10377 Problem reported by Hans Aberg.
10378
10379 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
10380
10381 * src/getargs.c (version): Happy new year; update overall
10382 program copyright date from 2004 to 2005.
10383
10384 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
10385 Problem reported by Hans Aberg.
10386 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
10387 (Output file names.): Add a test for the case when standard output
10388 is closed.
10389
10390 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
10391
10392 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
10393 to fix an oversight in the Bison 2.0 manual.
10394
10395 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
10396
10397 * NEWS: Version 2.0. Reformat the existing news items since
10398 1.875, so that related items are grouped together.
10399 * configure.ac (AC_INIT): Bump version to 2.0.
10400 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
10401
10402 * tests/torture.at (Exploding the Stack Size with Alloca): Set
10403 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
10404 otherwise, we're not testing alloca. Unfortunately there's no
10405 simple way to consult HAVE_ALLOCA here.
10406
10407 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
10408 for yymsg, too.
10409
10410 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
10411 hand. This avoids a warning about comparing int to size_t when
10412 GCC warnings are enabled.
10413
10414 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
10415
10416 * NEWS: Bison-generated parsers no longer default to using the
10417 alloca function (when available) to extend the parser stack, due
10418 to widespread problems in unchecked stack-overflow detection.
10419 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
10420 responsibility to set it to a positive value. This lets the user
10421 specify a value that is not a preprocessor constant.
10422 * data/yacc.c (YYMAXDEPTH): Likewise.
10423 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
10424 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
10425 to be a compile-time constant. However, explain the constraints on it.
10426 Also, explain the constraints on YYINITDEPTH.
10427 (Table of Symbols): Explain that alloca is no longer the default.
10428 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
10429 to 1.
10430
10431 * doc/bison.texinfo (Location Default Action): Mention that n must
10432 be zero when k is zero. Suggested by Frank Heckenbach.
10433
10434 2004-12-22 Akim Demaille <akim@epita.fr>
10435
10436 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
10437 (parser::state_type, parser::semantic_type, parser::location_type):
10438 Private, not public.
10439 (parser::parse): Return ints, not bool.
10440 Returning a bool introduces a problem: 0 corresponds to false, and
10441 it seems weird to return false on success. Returning true changes
10442 the conventions for yyparse.
10443 Alternatively we could return void and send an exception.
10444 There is no clear consensus (yet?).
10445 (state_stack, semantic_stack, location_stack): Rename as...
10446 (state_stack_type, semantic_stack_type, location_stack_type): these.
10447 Private, not public.
10448 * tests/c++.at: New.
10449 * tests/testsuite.at, tests/Makefile.am: Adjust.
10450
10451 2004-12-21 Akim Demaille <akim@epita.fr>
10452
10453 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
10454
10455 2004-12-21 Akim Demaille <akim@epita.fr>
10456
10457 Don't impose std::string for filenames.
10458
10459 * data/lalr1.cc (b4_filename_type): New.
10460 (position::filename): Use it.
10461 (parser.hh): Move the inclusion of stack.hh and location.hh below
10462 the user code, so that needed headers for the filename type can be
10463 included first.
10464 Forward declare them before the user code.
10465 * tests/Makefile.am (check-local, installcheck-local): Pass
10466 TESTSUITEFLAGS to the TESTSUITE.
10467
10468 2004-12-20 Akim Demaille <akim@epita.fr>
10469
10470 Use more STL like names: my_class instead of MyClass.
10471
10472 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
10473 (SemanticStack, SemanticType, StateStack, StateType)
10474 (TokenNumberType, Stack, Slice, Traits, Parser::location)
10475 (Parser::value): Rename as...
10476 (location_stack, location_type, rhs_number_type, semantic_stack)
10477 (semantic_type, state_stack, state_type, token_number_type, stack)
10478 (slice, traits, parser::yylloc, parser::yylval): these.
10479
10480 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
10481
10482 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
10483
10484 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
10485 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
10486
10487 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
10488
10489 Remove uses of 'short int' and 'unsigned short int'. This raises
10490 some arbitrary limits. It uses more memory but nowadays that's
10491 not much of an issue.
10492
10493 This change does not affect the generated parsers; that's a different
10494 task, as some users will want to conserve memory there.
10495
10496 Ideally we should use size_t to represent all object counts, and
10497 something like ptrdiff_t to represent signed differences of object
10498 counts; but that will require more code-cleanup than I have the
10499 time to do right now.
10500
10501 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
10502 Use size_t, not int or short int, to count objects.
10503 * src/closure.c (nritemset, closure): Likewise.
10504 * src/closure.h (nritemset, closure): Likewise.
10505 * src/nullable.c (nullable_compute): Likewise.
10506 * src/print.c (print_core): Likewise.
10507 * src/print_graph.c (print_core): Likewise.
10508 * src/state.c (state_compare, state_hash): Likewise.
10509 * src/state.h (struct state): Likewise.
10510 * src/tables.c (default_goto, goto_actions): Likewise.
10511
10512 * src/gram.h (rule_number, rule): Use int, not short int.
10513 * src/output.c (prepare_rules): Likewise.
10514 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
10515 errs, reductions): Likewise.
10516 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
10517 Likewise.
10518 * src/tables.c (vector_number, tally, action_number,
10519 ACTION_NUMBER_MINIMUM): Likewise.
10520 * src/output.c (muscle_insert_short_int_table): Remove.
10521
10522 2004-12-17 Akim Demaille <akim@epita.fr>
10523
10524 * data/lalr1.cc: Extensive Doxygenation.
10525 (error_): Rename as...
10526 (error): this, since it is visible to the user.
10527 Adjust callers.
10528 (Parser::message): Now an automatic variable from...
10529 (Parser::yyreport_syntax_error_): here.
10530 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
10531 Parser::error.
10532 * tests/input.at: Escape $.
10533
10534 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
10535
10536 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
10537 Parenthesize rhs to avoid obscure problems with mistakes like
10538 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
10539 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
10540 b4_rhs_location): Likewise.
10541 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
10542 b4_rhs_location): Likewise.
10543
10544 2004-12-16 Akim Demaille <akim@epita.fr>
10545
10546 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
10547 yacc.c: be sure to stay within yycheck_.
10548 * tests/actions.at: Re-enable C++ tests.
10549
10550 2004-12-16 Akim Demaille <akim@epita.fr>
10551
10552 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
10553 real.
10554
10555 2004-12-16 Akim Demaille <akim@epita.fr>
10556
10557 Use #define to handle the %name-prefix.
10558
10559 * data/glr.c, data/yacc.c: Comment changes.
10560 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
10561 so that one can refer to yylex in the parser file, and have it
10562 renamed, as is the case with other skeletons.
10563
10564 2004-12-16 Akim Demaille <akim@epita.fr>
10565
10566 Move lalr1.cc internals into yy*.
10567
10568 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
10569 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
10570 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
10571 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
10572 (empty_, final_, terror_, errcode_, ntokens_)
10573 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
10574 (looka_, ilooka_, error_range_, nerrs_):
10575 Rename as...
10576 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
10577 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
10578 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
10579 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
10580 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
10581 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
10582 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
10583 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
10584 these.
10585
10586 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
10587
10588 Fix some problems reported by twlevo at xs4all.
10589 * src/symtab.c (symbol_new): Report an error if the input grammar
10590 contains too many symbols. This is better than calling abort() later.
10591 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
10592 (struct node, struct graph):
10593 Rename member expand to stretch. All uses changed.
10594 (struct graph): Remove member layoutalgorithm. All uses removed.
10595 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
10596 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
10597 All uses changed.
10598 (N_STRETCH): Rename from N_EXPAND. All uses changed.
10599
10600 2004-12-15 Akim Demaille <akim@epita.fr>
10601
10602 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
10603 Add more Doxygen comments.
10604 (symprint_, stack_print_, reduce_print_, destruct_, pop)
10605 (report_syntax_error_, translate_): Rename as...
10606 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
10607 (yypop_, yyreport_syntax_error_, yytranslate_): this.
10608
10609 2004-12-15 Akim Demaille <akim@epita.fr>
10610
10611 * data/lalr1.cc (lex_): Rename as...
10612 (yylex_): this.
10613 Move the trace here.
10614 Take the %name-prefix into account.
10615 Reported by Alexandre Duret-Lutz.
10616
10617 2004-12-15 Akim Demaille <akim@epita.fr>
10618
10619 Simplify the C++ parser constructor.
10620
10621 * data/lalr1.cc (debug_): Rename as...
10622 (yydebug_): so that the parser's internals are always in the yy*
10623 pseudo namespace.
10624 Adjust uses.
10625 (b4_parse_param_decl): Remove the leading comma as it is now only
10626 called as unique argument list.
10627 (Parser::Parser): Remove the constructor accepting a location and
10628 an initial debugging level.
10629 Remove from the other ctor the argument for the debugging level.
10630 (debug_level_type, debug_level, set_debug_level): New.
10631
10632 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
10633 constructor calls.
10634
10635 2004-12-15 Akim Demaille <akim@epita.fr>
10636
10637 Remove b4_root related material: failure experiment
10638 (which goal was to allow to derive from a class).
10639
10640 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
10641 definitions and uses.
10642
10643 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
10644
10645 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
10646 not 2, since it's not portable to subtract 1 from the start of an
10647 array. The new item 0 is never set or used. All uses changed.
10648
10649 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
10650 the default definition of YYLLOC_DEFAULT. Problem reported
10651 by Frank Heckenbach.
10652
10653 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
10654
10655 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
10656 the normal case and one for the error case. Just use the
10657 first one uniformly. Problem reported by Frank Heckenbach.
10658 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
10659 use exactly the same macro in both places.
10660 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
10661 so that the normal-case YYRHSLOC works for the error case too.
10662 All uses changed.
10663 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
10664 (YYLLOC_DEFAULT): Use the same macro as glr.c.
10665 * doc/bison.texinfo (Location Default Action): Don't claim that
10666 we have an array of locations. Use the same macro for both glr
10667 and lalr parsers. Mention YYRHSLOC. Mention what happens when
10668 the index is 0.
10669
10670 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
10671
10672 * HACKING: Update email addresses to send announcements to.
10673
10674 * configure.ac (AC_INIT): Bump version to 1.875f.
10675
10676 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
10677
10678 * NEWS: Version 1.875e.
10679 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
10680
10681 * src/scan-skel.l: Include "complain.h", for "fatal".
10682
10683 * src/relation.h (relation_print, relation_digraph):
10684 Relation sizes are of type relation_node, not size_t (this is
10685 merely a doc fix, since the two types are equivalent).
10686 (relation_transpose): Relation sizes are of type relation_node,
10687 not int.
10688 * src/relation.c: Likewise.
10689 (top, infinity): Now of type relation_node, not int.
10690 (traverse, relation_transpose): Use relation_node, not int.
10691
10692 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
10693 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
10694 (yyparse): Remove unused local introduced in 2004-10-25 patch.
10695
10696 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
10697 specifying whether the test should be skipped. Use it tp
10698 specify that the [%defines %skeleton "lalr1.cc"] tests currently
10699 fail on some hosts, and should be skipped.
10700
10701 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
10702
10703 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
10704 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
10705 unless otherwise specified below.
10706
10707 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
10708 to allocate kernel_base, kernel_items, kernel_size, since
10709 they needn't be initialized to 0.
10710 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
10711 * src/closure.c (new_closure): Likewise, for itemset.
10712 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
10713 * src/lalr.c (set_goto_map): Likewise, for temp_map.
10714 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
10715 (build_relations): Likewise for edge, states1, includes.
10716 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
10717 * src/reader.c (packgram): Likewise, for ritem, rules.
10718 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
10719 * src/relation.c (relation_digraph): Likewise for VERTICES.
10720 (relation_transpose): Likewise for new_R, end_R.
10721 * src/symtab.c (symbols_token_translations_init): Likewise for
10722 token_translations.
10723 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
10724 (token_actions): Likewise for yydefact, actrow, conflrow,
10725 conflict_list.
10726 (save_column): Likewise for froms[symno], tos[symno].
10727 (goto_actions): Likewise for state_count.
10728 (pack_table): Likewise for base, pos, check.
10729 (tables_generate): Likewise for width.
10730
10731 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
10732 for initial core. Just have a separate core, so we needn't worry
10733 about whether kernel_size and kernel_base are initialized.
10734
10735 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
10736 kernel_size, kernel_items): Remove unnecessary initialization.
10737 * src/conflicts.c (conflicts): Likewise.
10738 * src/derives.c (derives): Likewise.
10739 * src/muscle_tablc (muscle_insert): Likewise.
10740 * src/relation.c (relation_digraph): Likewise.
10741 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
10742 conflrow, conflict_table, conflict_list, table, check):
10743 Likewise.
10744
10745 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
10746 This is because all callers pass unsigned int.
10747 * src/closure.h (new_closure): Likewise.
10748
10749 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
10750 (build_relations): Initialize includes[i] in all cases.
10751 * src/reader.c (packgram): Always initialize rules[ruleno].prec
10752 and rules[ruleno].precsym. Initialize members in order.
10753 * src/relation.c (relation_transpose): Always initialize new_R[i]
10754 and end_R[i].
10755 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
10756
10757 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
10758 conflict_list[0] was always 0, but now it isn't initialized.
10759
10760 * src/table.c (table_grow): When conflict_table grew, the grown
10761 area wasn't cleared. Fix this.
10762
10763 * lib/.cvsignore: Add strdup.c, strdup.h.
10764 * m4/.cvsignore: Add strdup.m4.
10765
10766 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
10767
10768 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
10769 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
10770 GOTO_NUMBER_MAXIMUM, since we occasionally compute
10771 ngotos + 1 without checking for overflow.
10772 (build_relations): Use END_NODE, not -1, to denote end of edges.
10773 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
10774 build_relations): Use goto_number, not int, for goto numbers.
10775 * src/tables.c (save_column, default_goto): Likewise.
10776
10777 2004-11-23 Akim Demaille <akim@epita.fr>
10778
10779 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
10780 of #defining from yystype.
10781 Don't typedef yystype, C++ does not need it.
10782 This lets it possible to forward declare it as union.
10783
10784 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
10785
10786 * bootstrap (gnulib_modules): Add extensions.
10787 Problem reported by Jim Meyering.
10788
10789 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
10790
10791 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
10792 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
10793 src/system.h, src/tables.c: XFREE -> free, to accommodate
10794 recent change to gnulib xalloc.h.
10795 Problem reported by Jim Meyering.
10796
10797 2004-11-17 Akim Demaille <akim@epita.fr>
10798
10799 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
10800
10801 2004-11-17 Akim Demaille <akim@epita.fr>,
10802 Alexandre Duret-Lutz <adl@gnu.org>
10803
10804 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
10805 changes.
10806 (YYCDEBUG): Adjust.
10807 Use it instead of cdebug_.
10808 (Parser::debug_stream, Parser::set_debug_stream): New.
10809 (Parser::symprint_): Define cdebug_ for temporary backward
10810 compatibility.
10811 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
10812 debug_stream ().
10813
10814 2004-11-17 Akim Demaille <akim@epita.fr>
10815
10816 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
10817 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
10818 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
10819 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
10820
10821 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
10822
10823 * data/glr.c (yyloc_default): Remove; not used.
10824 Problem reported by Frank Heckenbach.
10825
10826 2004-10-25 Akim Demaille <akim@epita.fr>
10827
10828 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
10829 Introduce another definition to address simple location arrays.
10830 (yyGLRStack): New member: yyerror_range.
10831 (yyrecoverSyntaxError, yyparse): Update it.
10832 (yyrecoverSyntaxError): Use it when shifting the error token to
10833 have an accurate range, equivalent to the one computed by both
10834 yacc.c and lalr1.cc.
10835 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
10836 that column numbers start at column 0, as per GNU Coding
10837 Standards, the others tests, and the doc.
10838 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
10839 Adjust to the above change (first column is 0).
10840 And adjust the location of the "<error>", now covering the whole
10841 line.
10842
10843 2004-10-22 Akim Demaille <akim@epita.fr>
10844 and Paul Eggert <eggert@cs.ucla.edu>
10845
10846 Remove some arbitrary limits on goto numbers and relations.
10847 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
10848 initial values, since they're never used.
10849 (set_goto_map): ngotos is now unsigned, so test for overflow
10850 by seeing whether it wraps around to zero.
10851 * src/lalr.h (goto_number): Now size_t, not short int.
10852 (GOTO_NUMBER_MAXIMUM): Remove.
10853 * src/relation.c (relation_print, traverse, relation_transpose):
10854 Check for END_NODE rather than looking at sign.
10855 * src/relation.h (END_NODE): New macro.
10856 (relation_node): Now size_t, not short int.
10857
10858 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
10859
10860 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
10861 keyword, not an identifier. Problem reported by Baron Schwartz in
10862 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
10863
10864 2004-10-11 Akim Demaille <akim@epita.fr>
10865
10866 * src/symtab.c (symbol_check_alias_consistency): Also check
10867 type names, destructors, and printers.
10868 Reported by Alexandre Duret-Lutz.
10869 Recode the handling of associativity and precedence in terms
10870 of symbol_precedence_set.
10871 Accept no redeclaration at all, not even equal to the previous
10872 value.
10873 (redeclaration): New.
10874 Use it to factor redeclaration complaints.
10875 (symbol_make_alias): Don't set the type of the alias, let
10876 symbol_check_alias_consistency do it as for other features.
10877 * src/symtab.h (symbol): Add new member prec_location, and
10878 type_location.
10879 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
10880 * tests/input.at (Incompatible Aliases): New.
10881
10882 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
10883
10884 .cvsignore fixes to accommodate gnulib changes,
10885 and the practice of naming build directories "_build".
10886 * .cvsignore: Add "_*". Sort.
10887 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
10888 * m4/.cvsignore: Add "*_gl.m4".
10889
10890 2004-10-06 Akim Demaille <akim@epita.fr>
10891
10892 * src/parse-gram.y (add_param): Fix the truncation of trailing
10893 spaces.
10894
10895 2004-10-05 Akim Demaille <akim@epita.fr>
10896
10897 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
10898 whether the reducion was empty or not. This leaves room to
10899 improve the use of YYLLOC_DEFAULT in such a case.
10900 lalr1.cc is still experimental, so changing this is acceptable.
10901 And finally, there are probably not many users who changed the
10902 handling of locations in GLR, so changing is admissible too.
10903
10904 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
10905 empty reduction, set @$ to an empty location ending the previously
10906 stacked symbol.
10907 Adjust uses to make sure the code is triggered on empty
10908 reductions.
10909 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
10910 expected output: empty reductions have empty locations.
10911
10912 2004-09-29 Akim Demaille <akim@epita.fr>
10913
10914 * data/lalr1.cc: Move towards a more standard C++ coding style
10915 for templates: Class < T > -> Class<T>.
10916
10917 2004-09-29 Akim Demaille <akim@epita.fr>
10918
10919 * data/lalr1.cc: Reinstall the former ctor, for sake of
10920 compatibility, but warn it will be removed.
10921 Move towards a more standard C++ coding style (i.e., type *var ->
10922 type* var).
10923
10924 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
10925
10926 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
10927 since it's less likely to work if NULs are involved in the future.
10928
10929 2004-09-27 Akim Demaille <akim@epita.fr>
10930
10931 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
10932
10933 2004-09-27 Akim Demaille <akim@epita.fr>
10934
10935 * data/lalr1.cc (b4_parse_param_decl_1): New.
10936 (b4_parse_param_decl): Use it to have different names between attribute
10937 and argument names.
10938 (b4_cc_constructor_call): Likewise.
10939
10940 2004-09-24 Akim Demaille <akim@epita.fr>
10941
10942 * src/parse-gram.y (add_param): Strip the leading and trailing
10943 blanks from a formal argument declaration.
10944 (YY_LOCATION_PRINT): New.
10945
10946 2004-09-24 Akim Demaille <akim@epita.fr>
10947
10948 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
10949 after the location.
10950
10951 2004-09-24 Akim Demaille <akim@epita.fr>
10952
10953 * doc/bison.texinfo (Table of Symbols): Sort.
10954
10955 2004-09-21 Akim Demaille <akim@epita.fr>
10956
10957 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
10958 the useless parentheses.
10959 Suggested by Paul Eggert.
10960
10961 2004-09-20 Akim Demaille <akim@epita.fr>
10962
10963 Let the initial-action act on the look-ahead, and use it for the
10964 "initial push" (corresponding to an hypothetical beginning-of-file).
10965 And let lalr1.cc honor %initial-action.
10966
10967 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
10968 example.
10969 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
10970 (Parser::Parser): Remove the ctor that used to initialize it.
10971 (Parser::parse): Like in the other skeletons, issue the "starting
10972 parse" message before any action.
10973 Honor %initial-action.
10974 Initialize the stacks with the lookahead.
10975 * data/yacc.c: Let $$ and @$ in %initial-action designate the
10976 look-ahead.
10977 Push them in the stacks.
10978 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
10979
10980 2004-09-20 Akim Demaille <akim@epita.fr>
10981
10982 * doc/bison.texinfo (Initial Action Decl): New.
10983
10984 2004-09-20 Akim Demaille <akim@epita.fr>
10985
10986 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
10987 clearer criterion to define it.
10988 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
10989 When reducing on an empty RHS, use the latest stacked location as
10990 location.
10991 yylloc is not always available.
10992 * data/glr.c: Likewise.
10993 Also, honor initial-actions.
10994
10995 2004-09-20 Akim Demaille <akim@epita.fr>
10996
10997 * data/yacc.c (YY_LOCATION_PRINT): New.
10998 Define when we know YYLTYPE's structure, i.e., when the default
10999 YYLLOC_DEFAULT is used.
11000 * data/c.m4 (b4_yysymprint_generate): Use it.
11001 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
11002 value of the result.
11003 (error_start_): Replace with...
11004 (error_range_): this location array.
11005 This allows to replace code relying on the implementation of
11006 locations by portable code.
11007 * data/yacc.c (yylerrsp): Replace with...
11008 (yyerror_range): this.
11009 Every time a token is popped, update yyerror_range[0], to have an
11010 accurate location for the error token.
11011 * data/glr.c (YY_LOCATION_PRINT): New.
11012 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
11013 deference a pointer.
11014 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
11015 report the location in %printers.
11016
11017 * src/scan-skel.l: Instead of abort, report error messages to ease
11018 understanding skeleton scanning failures.
11019
11020 2004-09-16 Akim Demaille <akim@epita.fr>
11021
11022 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
11023 (iterator, const_iterator): these, to be more in the C++ spirit.
11024 Also, return reverse iterators so that when displaying the stack
11025 we display its bottom first.
11026 (Parser::stack_print_, Parser::reduce_print_): Match the messages
11027 from yacc.c.
11028 We should probably use vector here though.
11029
11030 2004-09-16 Akim Demaille <akim@epita.fr>
11031
11032 Have more complete shift traces.
11033
11034 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
11035 to report Shifts instead of ad hoc YYDPRINTF invocations,
11036 including for the error token.
11037 * data/lalr1.cc (symprint_): Output the location.
11038 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
11039 output the location within the %printer.
11040 Activate GLR tests, at least to make sure they compile properly.
11041 They still don't pass though.
11042 * tests/calc.at: Adjust expect verbose output, since now "Entering
11043 state..." is on a different line than the "Shifting" message.
11044
11045 2004-09-08 Akim Demaille <akim@epita.fr>
11046
11047 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
11048 Bison directive from the Bison file to the invocation of this
11049 macro, so that these directives are passed to
11050 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
11051 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
11052 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
11053 the extra Bison directives instead of the whole series.
11054 Change the grammar so that there are recoverable errors, and
11055 unrecoverable errors. Now we can have the parser give up before
11056 consuming the whole input. As a result we now can observe that
11057 the lookahead is freed when needed.
11058 Change the parser source to parse argv[1] instead of a hard coded
11059 string.
11060 Simplify yylex, and give a value and location to EOF.
11061 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
11062 passed directives already coded in the file.
11063 Add some tests to check the location of "error".
11064 For some tests, the C++ parser is correct, and not yacc.c.
11065 For other tests, they provide different, but unsatisfying, values,
11066 so keep the C++ value so that at least one parser is "correct"
11067 according to the test suite.
11068 (Actions after errors): Remove, this is subsumed by the
11069 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
11070
11071 2004-09-06 Akim Demaille <akim@epita.fr>
11072
11073 * data/lalr1.cc: Adjust the indentation of the labels.
11074 (Parser::pop): New.
11075 Use it.
11076
11077 2004-09-06 Akim Demaille <akim@epita.fr>
11078
11079 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
11080 argument, an informative message.
11081 Call YY_SYMBOL_PRINT.
11082 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
11083 * data/lalr1.cc (destruct_): Likewise.
11084 In addition, no longer depend on b4_yysymprint_generate and
11085 b4_yydestruct_generate to generate these functions, do it "by
11086 hand".
11087
11088 2004-09-03 Akim Demaille <akim@epita.fr>
11089
11090 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
11091 invoked, yydestruct the lookahead.
11092 * tests/calc.at (Calculator $1): Update the expected lengths of
11093 traces: there is an added line for the discarded lookahead.
11094 * doc/bison.texinfo (Destructor Decl): Some rewording.
11095 Define "discarded" symbols.
11096
11097 2004-09-02 Akim Demaille <akim@epita.fr>
11098
11099 * data/lalr1.cc (translate_, destruct_): No reason to be static.
11100
11101 2004-09-02 Akim Demaille <akim@epita.fr>
11102
11103 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
11104 (YYDSYMPRINTF): Rename as...
11105 (YY_SYMBOL_PRINT): this.
11106 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
11107 two.
11108 Use it instead of direct symprint_ calls.
11109 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
11110 one.
11111
11112 2004-09-02 Akim Demaille <akim@epita.fr>
11113
11114 * data/lalr1.cc (b4_yysymprint_generate): New.
11115 (symprint_): New member function, defined when YYDEBUG.
11116 Use it consistently instead of token/nterm debugging output by
11117 hand.
11118 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
11119 %printer calls to use cdebug_ when using lalr1.cc.
11120
11121 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
11122
11123 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
11124 with #ifdef YYDEBUG.
11125
11126 2004-08-26 Akim Demaille <akim@epita.fr>
11127
11128 * doc/bison.texinfo (Implementing Loops): Rename as...
11129 (Implementing Gotos/Loops): this.
11130
11131 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
11132
11133 Adjust to latest gnulib.
11134 * bootstrap (gnulib_modules): Add xalloc-die.
11135 Set LC_ALL=C so that file names sort consistently.
11136 Prefer the gnulib copies of gettext.m4, glibc21.m4,
11137 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
11138 uintmax_t.m4, ulonglong.m4.
11139 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
11140 po.m4 since we are now using _gl.m4 instead.
11141
11142 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
11143
11144 * src/scan-action.l: Remove. Scanning of semantic actions is
11145 handled in scan-gram.l.
11146
11147 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
11148
11149 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
11150
11151 * src/location.h (struct): The file member is a uniqstr.
11152 (equal_boundaries): Use UNIQSTR_EQ for comparison.
11153
11154 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
11155
11156 Fix bug with non-%union parsers that have printers or destructors,
11157 which led to a Bison core dump. Reported by Peter Fales in
11158 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
11159
11160 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
11161 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
11162 not to our own type.
11163 * src/output.c (symbol_destructors_output, symbol_printers_output):
11164 Don't assume %union.
11165 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
11166 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
11167 UNION-FLAG. All callers changed.
11168 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
11169 Use type char, not unsigned int, when declaring an array of char;
11170 this lets us remove a cast.
11171 (Printers and Destructors): Add non-%union test cases.
11172
11173 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11174
11175 * doc/bison.texinfo: Minor editorial changes, mostly to the new
11176 GLR writeups. E.g., avoid frenchspacing and the future tense,
11177 change "lookahead" to "look-ahead", and change "wrt" to "with
11178 respect to".
11179
11180 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11181
11182 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
11183 New sections, split off from the GLR Parsers section. Put the new
11184 Simple GLR Parser near the start of the GLR section, for clarity.
11185 Rewrite connective text.
11186
11187 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
11188
11189 * doc/bison.texinfo (Simple GLR Parsers): New section.
11190
11191 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11192
11193 * NEWS, TODO, doc/bison.texinfo:
11194 Use "look-ahead" instead of "lookahead", to be consistent.
11195 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
11196 while we're fixing "look-ahead".
11197 * src/conflicts.c (shift_set): Renamed from shiftset.
11198 (look_ahead_set): Renamed from lookaheadset.
11199 * src/print.c: Likewise.
11200 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
11201 name for "lookahead".
11202 (report_types, usage): Likewise.
11203 * src/getargs.h (report_look_ahead_tokens): Renamed from
11204 report_lookaheads.
11205 * src/lalr.c (compute_look_ahead_tokens): Renamed from
11206 compute_lookaheads.
11207 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
11208 (look_ahead_tokens_print): Renamed from lookaheads_print.
11209 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
11210 state_rule_lookaheads_print.
11211 * src/state.h: Likewise.
11212 (reductions.look_ahead_tokens): Renamed from lookaheads.
11213 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
11214 AT_DATA_LOOKAHEADS_GRAMMAR.
11215
11216 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
11217
11218 * README: Update location of patched M4 distribution.
11219
11220 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
11221
11222 Don't assume the C++ compiler takes the same arguments as the C compiler
11223 (trivial change).
11224 * configure.ac (O0CXXFLAGS): New var.
11225 * tests/atlocal.in (CXXFLAGS): Use it.
11226
11227 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
11228
11229 Fix some "make check" problems with C++ reported by
11230 Albert Chin-A-Young for Tru64 C++ in this thread:
11231 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
11232
11233 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
11234 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
11235 Output to a .cc file for C++, not to a .c file.
11236 * tests/calc.at (AT_CHECK_CALC): Likewise.
11237 * tests/regression.at (AT_CHECK_DANCER): Likewise.
11238 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
11239
11240 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
11241
11242 * tests/calc.at, tests/actions.at: Workaround for SGI
11243 C++ compiler. (trivial change)
11244
11245 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
11246
11247 Spent a few hours checking out which prerequisite versions the
11248 current sources actually require. I went all the way back to
11249 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
11250 a seemingly endless set of combinations of versions more recent
11251 than that. The bottom line is that the current sources require
11252 fairly recent versions of the build tools, and it'll be some work
11253 to change this.
11254 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
11255 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
11256 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
11257 Add comments explaining why those particular versions are
11258 currently needed.
11259
11260 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
11261 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
11262 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
11263
11264 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
11265 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
11266
11267 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
11268
11269 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
11270 0.11.5. Suggested by Bruno Haible.
11271 * bootstrap: Remove gettext version checking.
11272
11273 * doc/bison.texinfo (Decl Summary): Also mention that %union
11274 can depend on prerequisite types. Problem reported by Tim
11275 Van Holder.
11276
11277 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
11278
11279 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
11280 * README-alpha: Don't tell people not to package this.
11281
11282 * bootstrap: Don't assume $(...) works; use `...` instead.
11283 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
11284 gettext better.
11285
11286 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
11287 put into the -d output file, and mention what to do if YYSTYPE is
11288 defined as a macro.
11289
11290 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
11291
11292 Undo change made earlier today: it caused autopoint to not bring
11293 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
11294 autopoint's.
11295
11296 * bootstrap: Check that gettext version matches what's in
11297 configure.ac. Warn users to ignore robots.txt ERROR 404.
11298 * bootstrap: Undo today's earlier change (logged below).
11299 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
11300
11301 The gettext version checking is causing more trouble than it's
11302 curing; remove it. Problem reported by Paul Hilfinger.
11303
11304 * bootstrap: Issue a warning that one can expect a message
11305 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
11306 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
11307
11308 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
11309
11310 Ensure that the C++ compiler used for testing actually works on a
11311 simple test program; if not, skip the C++-related tests. Problem
11312 reported by Vin Shelton in:
11313 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
11314
11315 * m4/cxx.m4: New file.
11316 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
11317 * tests/atlocal.in (BISON_CXX_WORKS): Add.
11318 * tests/local.at (AT_COMPILE_CXX): Use it.
11319
11320 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11321
11322 * data/glr.c (yylloc): Output this macro even if locations are not
11323 being generated, as the GLR parser needs it even in that case.
11324 Problem reported by Troy A. Johnson
11325 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
11326
11327 * configure.ac (AC_INIT): Update to 1.875e.
11328
11329 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11330
11331 * NEWS: Version 1.875d.
11332 * configure.ac (AC_INIT): Likewise.
11333 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
11334
11335 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
11336 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
11337 lalr1.cc runs afoul of the first, and the last two are no longer
11338 supported by GCC 3.4.0.
11339 * README: Mention GNU m4 1.4 or later; mention m4 patches.
11340 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
11341
11342 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
11343
11344 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
11345 unsigned int, for compatibility with latest gnulib hash module.
11346 * src/state.c (state_hash, state_hasher): Likewise.
11347 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
11348 * src/uniqstr.c (hash_uniqstr): Likewise.
11349
11350 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
11351
11352 * NEWS: Unescaped newlines are no longer allowed in char & strings.
11353
11354 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
11355 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
11356 character and string literals.
11357 (unexpected_end): New function.
11358 (unexpected_eof): Use it.
11359 (unexpected_newline): New function.
11360 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
11361 actions.
11362
11363 * NEWS: Document %expect-rr.
11364
11365 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
11366 Fix typo by replacing $1 with $option.
11367 Remove more 'intl'-related files.
11368 Don't DEFUN AM_INTL_SUBDIR twice.
11369
11370 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
11371 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
11372 strtoul.c.
11373 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
11374 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
11375 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
11376 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
11377 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
11378 * src/.cvsignore: Add *.output.
11379
11380 * src/parse-gram.y: Put copyright notice inside %{ %} so it
11381 gets copied to the output file.
11382
11383 2004-04-28 Paul Eggert <eggert@twinsun.com>
11384
11385 Get files from the gnulib and po repositories, instead of relying
11386 on them being in our CVS. Upgrade to latest versions of gnulib
11387 and Automake.
11388
11389 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
11390 * bootstrap: Bootstrap from gnulib and po repositories.
11391 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
11392 * README-cvs: Document these changes. Remove version numbers from
11393 mentions of build tools, since they change so often. Mention Flex.
11394
11395 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
11396 (gl_USE_SYSTEM_EXTENSIONS): Add.
11397 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
11398 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
11399 does this for us.
11400 (AC_ISC_POSIX): Remove; we no longer support this
11401 ancient OS, as it gets in the way of latest Autoconf & gnulib.
11402 (AC_HEADER_STDC): Remove: we now assume C89 or better.
11403 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
11404 Do not check for C89 headers, except for locale.h which is used
11405 by the Yacc library and must port to K&R hosts.
11406 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
11407 Do not check for C89 functions, except for setlocale which is
11408 used by the Yacc library.
11409 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
11410 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
11411 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
11412 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
11413 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
11414 AM_GNU_GETTEXT): Remove; now done by:
11415 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
11416 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
11417 for us.
11418
11419 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
11420 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
11421 Define to empty, as gnulib.mk will do the rest for us.
11422 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
11423 for us.
11424 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
11425 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
11426
11427 * src/files.c: Include gnulib's xstrndup.h.
11428
11429 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
11430 (REALLOC): Use xnrealloc, for likewise.
11431 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
11432 (strnlen, memrchr): Remove decls; functions no longer used.
11433 Include <stpcpy.h>.
11434
11435 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
11436 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
11437 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
11438 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
11439 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
11440 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
11441 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
11442 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
11443 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
11444 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
11445 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
11446 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
11447 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
11448 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
11449 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
11450 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
11451 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
11452 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
11453 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
11454 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
11455 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
11456 Remove, as these files are now generated automatically
11457 by bootstrap or automake.
11458
11459 * po/ChangeLog: Remove: all but one entry was a duplicate
11460 of this file, and I moved that 2000-11-02 entry here.
11461
11462 * config/.cvsignore: Add Makefile, depcomp, install-sh.
11463 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
11464 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
11465 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
11466 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
11467 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
11468 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
11469 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
11470 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
11471 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
11472 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
11473 xstrndup.h.
11474 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
11475 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
11476 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
11477 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
11478 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
11479 * src/.cvsignore: Remove *_.c.
11480
11481
11482 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
11483 support it. (The latest stable gzip doesn't.)
11484
11485 2004-04-27 Paul Eggert <eggert@twinsun.com>
11486
11487 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
11488 case, as stos_ is now used by destructors due to the 2004-02-09
11489 change.
11490
11491 Remove more K&R C support.
11492 * lib/libiberty.y (PARAMS): Remove. All uses removed.
11493 * lib/subpipe.c (errno): Remove decl.
11494 Include <stdlib.h> unconditionally.
11495 (EXIT_FAILURE): Remove macro.
11496 * src/complain.c (vfprintf, strerror): Remove.
11497 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
11498 unconditionally.
11499 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
11500 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
11501 (strchr, strspn, memchr): Remove decls.
11502 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
11503 unconditionally. Do not declare perror.
11504 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
11505 unconditionally.
11506
11507 * src/complain.c (_): Remove useless defn, as system.h defines this.
11508
11509 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
11510 with latest obstack.h.
11511 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
11512 to procedure types, as obstack.h now does that for us.
11513 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
11514
11515 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
11516 so that this include file can stand alone.
11517 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
11518 does this now. Include subpipe.h first after config.h, to
11519 test whether it can stand alone.
11520
11521 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
11522 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
11523 unused declaration.
11524
11525 * tests/synclines.at (%union synch line): Put a dummy member in
11526 the union, because empty unions aren't allowed in C. Caught
11527 by GCC 3.4.0.
11528
11529 2004-04-13 Jim Meyering <jim@meyering.net>
11530
11531 * src/conflicts.c (conflicts_print): Correct format string typo:
11532 use `%%' to produce literal `%'. (trivial change)
11533
11534 2004-03-30 Paul Eggert <eggert@twinsun.com>
11535
11536 * src/getargs.c (version): Update copyright year to 2004.
11537
11538 * data/c.m4 (b4_int_type): Use 'short int' rather than
11539 'short', and similarly for 'long', 'unsigned', etc.
11540 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
11541 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
11542 yy_yypstack, yydumpstack): Likewise.
11543 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
11544 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
11545 Likewise.
11546 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
11547 yy_stack_print, yyparse): Likewise.
11548 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
11549 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
11550 * lib/bitset.c (bitset_print): Likewise.
11551 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
11552 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
11553 * lib/bitsetv.c (bitsetv_dump): Likewise.
11554 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
11555 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
11556 Likewise.
11557 * src/LR0.c (allocate_itemsets): Likewise.
11558 * src/gram.h (rule_number, rule): Likewise.
11559 * src/lalr.h (goto_number): Likewise.
11560 * src/nullable.c (nullable_compute): Likewise.
11561 * src/output.c (prepare_rules): Likewise.
11562 * src/relation.c (relation_print, relation_digraph): Likewise.
11563 * src/relation.h (relation_node): Likewise.
11564 * src/state.h (state_number, transitions, errs, reductions,
11565 struct state): Likewise.
11566 * src/symtab.h (symbol_number, struct symbol): Likewise.
11567 * src/tables.c (vector_number, tally, action_number,
11568 default_goto, goto_actions): Likewise.
11569 * tests/existing.at (GNU Cim Grammar): Likewise.
11570 * tests/regression.at (Web2c Actions): Likewise.
11571
11572 * src/output.c (muscle_insert_short_int_table): Renamed from
11573 muscle_insert_short_table. All uses changed.
11574
11575 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11576
11577 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
11578 (declaration): Replace expected_conflicts with expected_sr_conflicts.
11579 Add %expect-rr rule.
11580
11581 * src/scan-gram.l: Recognize %expect-rr.
11582
11583 * src/conflicts.h (expected_sr_conflicts): Rename from
11584 expected_conflicts.
11585 (expected_rr_conflicts): Declare.
11586
11587 * src/conflicts.c (expected_sr_conflicts): Rename from
11588 expected_conflicts.
11589 (expected_rr_conflicts): Define.
11590 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
11591 for GLR parsers.
11592 Use expected_sr_conflicts in place of expected_conflicts.
11593 Warn if expected_rr_conflicts used in non-GLR parser.
11594
11595 * doc/bison.texinfo: Add documentation for %expect-rr.
11596
11597 2004-03-08 Paul Eggert <eggert@gnu.org>
11598
11599 Add support for hex token numbers. Suggested by Odd Arild Olsen in
11600 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
11601
11602 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
11603 in lalr1.cc.
11604 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
11605 * src/scan-gram.l (scan_integer): New function.
11606 ({int}): Use it.
11607 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
11608 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
11609 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
11610 Say "long int", not "long", for uniformity with GNU style.
11611
11612 2004-02-25 Paul Eggert <eggert@twinsun.com>
11613
11614 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
11615 compilers. This fixes a problem with Intel's C++ compiler being
11616 chatty, reported by Guido Trentalancia in
11617 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
11618
11619 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
11620
11621 Support %destructor and merge error locations in lalr1.cc.
11622
11623 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
11624 (Parser::stos_): Define unconditionally.
11625 (Parser::destruct_): New method. Generate its body with
11626 b4_yydestruct_generate.
11627 (Parser::error_start_): New attribute.
11628 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
11629 token which are discarded.
11630 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
11631 error_start_ when erroneous token are discarded.
11632 (Parser::parse) <yyerrlab1>: Compute the location of the error
11633 token so that it covers all the discarded tokens.
11634 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
11635 it can be called with `%skeleton "lalr1.cc"', and do that.
11636
11637 2004-02-02 Paul Eggert <eggert@twinsun.com>
11638
11639 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
11640 $(top_srcdir)/lib and ../lib. This fixes a bug reported
11641 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
11642 There's no need to mention top_builddir since Automake does that
11643 for us.
11644 (INCLUDES): Remove, as Automake says it's obsolescent.
11645 Contents migrated into AM_CPPFLAGS as described above.
11646 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
11647
11648 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11649
11650 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
11651 (yyreportSyntaxError): Handle case where lookahead token is
11652 YYEMPTY.
11653
11654 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11655
11656 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
11657 resulting parsers are compilable with C++.
11658
11659 2003-12-23 Paul Eggert <eggert@twinsun.com>
11660
11661 * config/depcomp, config/install-sh: Sync with Automake 1.8.
11662 * src/output.c (output_skeleton): Rename local var.
11663 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
11664 Bison tokens, as this runs afoul of the 2003-10-07 change that
11665 disallowed NUL bytes in character constants or string literals.
11666
11667 * tests/local.at: Require Autoconf 2.59's Autotest.
11668 * tests/testsuite.at: Don't include local.at, since we now assume
11669 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
11670 including it.
11671 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
11672 multiple inclusion warnings.
11673
11674 2003-12-02 Akim Demaille <akim@epita.fr>
11675
11676 * doc/bison.texinfo (How Can I Reset the Parser): More about start
11677 conditions.
11678 From Bruno Haible.
11679
11680 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
11681
11682 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
11683
11684 2003-10-07 Paul Eggert <eggert@twinsun.com>
11685
11686 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
11687 if testsuite doesn't exist.
11688
11689 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
11690 literals, unfortunately.
11691 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
11692 Complain about NUL bytes in character constants or string literals.
11693
11694 2003-10-05 Paul Eggert <eggert@twinsun.com>
11695
11696 * NEWS: Don't document %no-default-prec, as it's still
11697 too experimental.
11698 * doc/bison.texinfo: Document %no-default-prec only if
11699 the defaultprec flag is set. Normally it's not.
11700
11701 2003-10-04 Paul Eggert <eggert@twinsun.com>
11702
11703 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
11704 non-modifiable lvalue, instead of a modifiable one.
11705 * doc/bison.texinfo (Actions): Document that $$ can
11706 be assigned to. Do not claim that $$ and $N are
11707 array element references: user code should not rely on this.
11708
11709 2003-10-01 Paul Eggert <eggert@twinsun.com>
11710
11711 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
11712 (grammar_declaration): Use it.
11713 * src/scan-gram.l: New token %no-default-prec.
11714 * tests/conflicts.at: Revamp tests to use %no-default-prec.
11715 * NEWS, doc/bison.texinfo: Document the above.
11716
11717 2003-10-01 Akim Demaille <akim@epita.fr>
11718
11719 VCG no longer supports long_straight_phase.
11720
11721 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
11722 * src/print_graph.c (print_graph): Adjust.
11723
11724 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
11725 and Paul Eggert <eggert@twinsun.com>
11726
11727 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
11728 Table of Symbols): Document %default-prec.
11729 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
11730 (grammar_declaration): Set default_prec on %default-prec.
11731 * src/scan-gram.l (%default-prec): New token.
11732 * src/reader.h (default_prec): New flag.
11733 * src/reader.c: Likewise.
11734 (packgram): Handle it.
11735 * tests/conflicts.at (%default-prec without %prec,
11736 %default-prec with %prec, %default-prec 1): New tests.
11737
11738 2003-09-30 Paul Eggert <eggert@twinsun.com>
11739
11740 * tests/testsuite.at: Include local.at, not input.at, fixing
11741 a typo in the 2003-08-25 patch.
11742
11743 2003-08-27 Akim Demaille <akim@epita.fr>
11744
11745 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
11746 GCC warnings.
11747
11748 2003-08-26 Akim Demaille <akim@epita.fr>
11749
11750 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
11751 "<\#" to avoid magic from Gnus when posting parts of this script.
11752
11753 2003-08-26 Akim Demaille <akim@epita.fr>
11754
11755 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
11756 (Parser::parse): here.
11757 Adjust: nerrs and errstatus is now replaced by...
11758 (Parser::nerrs_, Parser::errstatus_): New.
11759
11760 2003-08-25 Akim Demaille <akim@epita.fr>
11761
11762 * config/announce-gen, Makefile.cfg: New.
11763 * Makefile.am: Adjust.
11764 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
11765 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
11766
11767 2003-08-25 Akim Demaille <akim@epita.fr>
11768
11769 When reducing initial empty rules, Bison parser read an initial
11770 location that is not defined. This results in garbage, and that
11771 affects Bison's own parser. Therefore we need (i) to extend Bison
11772 to support a means to initialize this location, and (ii) to use
11773 this CVS Bison to fix CVS Bison's parser.
11774
11775 * src/reader.h, reader.c (epilogue_augment): Remove, replace
11776 with...
11777 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
11778 * src/parse-gram.y: Adjust.
11779 (%initial-action): New.
11780 (%error-verbose): Since we require CVS Bison, there is no reason
11781 not to use it.
11782 * src/scan-gram.l: Adjust.
11783 * src/Makefile.am (YACC): New, to make sure we use our own parser.
11784 * data/yacc.c (yyparse): Use b4_initial_action.
11785
11786 2003-08-25 Akim Demaille <akim@epita.fr>
11787
11788 * doc/bison.texinfo: Don't promote stdout for error messages.
11789
11790 2003-08-25 Akim Demaille <akim@epita.fr>
11791
11792 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
11793 From Alexandre Duret-Lutz.
11794
11795 2003-08-25 Akim Demaille <akim@epita.fr>
11796
11797 Version 1.875c.
11798
11799 2003-08-25 Akim Demaille <akim@epita.fr>
11800
11801 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
11802 Use them.
11803
11804 2003-08-25 Akim Demaille <akim@epita.fr>
11805
11806 * data/lalr1.cc (Parser::reduce_print_): New.
11807 Use it.
11808
11809 2003-08-25 Akim Demaille <akim@epita.fr>
11810
11811 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
11812 error recovery loops. This patch is based on
11813 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
11814 Also, augment the similarity between lalr1.cc and yacc.c.
11815 Note: the locations of error recovery rules are not correct yet.
11816
11817 * data/lalr1.cc: Comment changes to augment the similarity between
11818 lalr1.cc and yacc.c.
11819 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
11820 (yyerrlab1): Remove, but where it used to be (now the bottom part of
11821 yyerrlab), when hitting EOF, pop the whole stack here instead of
11822 merely falling thru the default error handling mechanism.
11823 (yyerrorlab): New label, with the old contents of YYERROR,
11824 plus the following change: pop the stack of rhs corresponding
11825 to the production that invoked YYERROR. That is how Yacc
11826 behaves (required by POSIX).
11827 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
11828 fail.
11829
11830 2003-08-25 Akim Demaille <akim@epita.fr>
11831
11832 Tune local.at so that people can "autom4te -l autotest calc.at -o
11833 calc" for instance, to extract a sub test suite.
11834
11835 * tests/testsuite.at: Move the initialization, Autotest version
11836 requirement, and AT_TESTED invocation into...
11837 * tests/local.at: here.
11838 * tests/testsuite.at: Include it for compatibility with Autoconf
11839 2.57.
11840 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
11841 be ignore.
11842
11843 2003-08-04 Paul Eggert <eggert@twinsun.com>
11844
11845 Rework code slightly to avoid gcc -Wtraditional warnings.
11846 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
11847 The returned value is now stored in *YY0. All callers changed.
11848 * src/output.c (merge_output): Adjust to the above change.
11849
11850 2003-07-26 Paul Eggert <eggert@twinsun.com>
11851
11852 * data/glr.c (YYASSERT): New macro.
11853 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
11854 yyresolveStates, yyprocessOneStack):
11855 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
11856 Derived from a suggestion by Frank Heckenbach.
11857
11858 2003-07-25 Paul Eggert <eggert@twinsun.com>
11859
11860 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
11861 for portability to K&R C (after ansi2knr, presumably). See
11862 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
11863 by Frank Heckenbach, though I have omitted the structure-initialization
11864 part of his glr-knr.diff patch since I recall that the Portable
11865 C Compiler didn't require that change.
11866
11867 Let the user specify how to allocate and free memory.
11868 Derived from a suggestion by Frank Heckenbach in
11869 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
11870 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
11871 All uses of free, malloc, realloc changed to use these macros,
11872 and unnecessary casts removed.
11873 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
11874
11875 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
11876
11877 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
11878 use s.empty() rather than s == "" to test for empty string; see
11879 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
11880 (trivial change)
11881
11882 2003-06-25 Akim Demaille <akim@epita.fr>
11883
11884 * config/depcomp, config/install-sh: Update from masters.
11885
11886 2003-06-20 Paul Eggert <eggert@twinsun.com>
11887
11888 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
11889 and return properly parenthesized result.
11890 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
11891 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
11892 Remove unnecessary parentheses from uses.
11893 * doc/bison.texinfo (Location Default Action): Describe the
11894 conventions for parentheses.
11895
11896 2003-06-19 Paul Eggert <eggert@twinsun.com>
11897
11898 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
11899 yyreportTree): Do not assume that size_t is the same width as int,
11900 when printing sizes. Print sizes using an unsigned format.
11901 Problem reported by Frank Heckenbach in
11902 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
11903
11904 Port to Forte Developer 7 C compiler.
11905 * data/glr.c (struct YYLTYPE): If locations are not being used,
11906 declare a single dummy member, as empty structs do not conform
11907 to the C standard.
11908 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
11909 the Forte Developer 7 C compiler complains that end-of-loop
11910 code is not reached.
11911
11912 2003-06-17 Paul Eggert <eggert@twinsun.com>
11913
11914 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
11915 avoid warnings from picky compilers about redefinition of PARAMS.
11916
11917 2003-06-17 Paul Eggert <eggert@twinsun.com>
11918
11919 Version 1.875b.
11920
11921 * NEWS: Document 1.875b.
11922
11923 * lib/bbitset.h: Do not include config.h; that's the includer's job.
11924 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
11925 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
11926 Don't use 'index' in comments, as it's a builtin fn on some hosts.
11927 * lib/bitset_stats.c: Include gettext.h unconditionally, as
11928 per recent gettext manual's suggestion.
11929 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
11930 Use prototypes, not old-style definitions.
11931 * lib/lbitset.c (lbitset_unused_clear): Likewise.
11932 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
11933 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
11934 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
11935 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
11936 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
11937 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
11938 vbitset_or_and_cmp, vbitset_copy): Likewise.
11939
11940 * lib/libiberty.h: Do not include config.h; that's the includer's job.
11941 Do not include <stdlib.h>.
11942 (PARAMS): Define unconditionally for C89.
11943 (ATTRIBUTE_NORETURN): Remove.
11944 (ATTRIBUTE_UNUSED): Define unconditionally.
11945
11946 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
11947 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
11948 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
11949 * lib/vbitset.c, lib/vbitset.h: New files.
11950 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
11951 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
11952 from libbitset.
11953
11954 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
11955 `How Can I Reset @code{yyparse}', since texinfo does not allow
11956 arbitrary @ in node names.
11957
11958 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
11959 shouldn't be needed according to the gettext 0.12.1 documentation
11960 but which seem to be needed anyway: codeset.m4 glibc21.m4
11961 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
11962 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
11963 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
11964
11965 * lib/.cvsignore: Add stdbool.h.
11966 * m4/.cvsignore: Add nls.m4, po.m4.
11967
11968 Upgrade to CVS gnulib.
11969 * stdbool_.h: File renamed from stdbool.h.in.
11970 * configure.ac (AM_STDBOOL_H): Invoke this instead of
11971 AC_HEADER_STDBOOL.
11972 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
11973 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
11974 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
11975 (MOSTLYCLEANFILES): New var.
11976 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
11977 (stdbool.h): New rule.
11978 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
11979 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
11980 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
11981 m4/quote.m4: Upgrade to today's gnulib.
11982
11983 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
11984 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
11985 the tests right now.
11986 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
11987 yyerror are declared before use; C99 requires this.
11988
11989 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11990
11991 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
11992 first.
11993 (yyrecoverSyntaxError): Correct the logic for setting and testing
11994 yyerrState.
11995 Correct comment on handling EOF.
11996 Allow states with only a default reduction, rather than failing
11997 (I can't quite reconstruct why these were not allowed before).
11998
11999 Fixes to avoid problem that $-N rules in GLR parsers can cause
12000 buffer overruns, corrupting state.
12001
12002 * src/output.c (prepare_rules): Output max_left_semantic_context
12003 definition.
12004 * src/reader.h (max_left_semantic_context): New variable declaration.
12005 * src/scan-gram.l (max_left_semantic_context): Define.
12006 (handle_action_dollar): Update max_left_semantic_context.
12007 * data/glr.c (YYMAXLEFT): New definition.
12008 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
12009 (yyresolveAction): Ditto.
12010
12011 Fixes to problems with location handling in GLR parsers reported by
12012 Frank Heckenbach (2003/06/05).
12013
12014 * data/glr.c (YYLTYPE): Make trivial if locations not used.
12015 (YYRHSLOC): Add parentheses, and define only if locations used.
12016 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
12017 locations not used.
12018 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
12019 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
12020
12021 * tests/cxx-type.at: Exercise location information; update tests
12022 to differentiate output with and without locations.
12023 Remove forward declarations of yylex and yyerror---caused errors
12024 because default YYLTYPE not yet defined.
12025 Change semantic actions to compute strings, rather than printing
12026 them directly (to test proper passing of semantics values). Change
12027 output to prefix notation and update test data and expected results.
12028 (yylex): Track locations.
12029 (stmtMerge): Return value rather than printing, and include arguments
12030 in value.
12031
12032 2003-06-03 Paul Eggert <eggert@twinsun.com>
12033
12034 Avoid warnings generated by GCC 2.95.4 when Bison is
12035 configured with --enable-gcc-warnings.
12036 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
12037 yy::]b4_parser_class_name[::translate_,
12038 yy::Stack::operator[] (unsigned),
12039 yy::Stack::operator[] (unsigned) const,
12040 yy::Slice::operator[] (unsigned),
12041 yy::Slice::operator[] (unsigned) const):
12042 Rename local vars to avoid warnings.
12043 * tests/glr-regression.at (Improper handling of embedded actions
12044 and $-N in GLR parsers): Remove unused local variable from yylex.
12045 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
12046 (void) as arg when not pure, since we now assume C89 when building
12047 Bison. Pacify GCC by using parameter.
12048
12049 2003-06-02 Paul Eggert <eggert@twinsun.com>
12050
12051 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
12052 yy::Location::lines, yy::Location::columns): Rename arguments
12053 to avoid shadowing; this removes a warning generated by GCC 3.3.
12054
12055 2003-06-01 Paul Eggert <eggert@twinsun.com>
12056
12057 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
12058 to g++, as GCC 3.3 complains if you do it.
12059 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
12060 everything that WARNING_CFLAGS has, except omit warnings
12061 not suitable for C++.
12062 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
12063 * tests/atlocal.in (CXXFLAGS): New var.
12064 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
12065
12066 Fix a GLR parser bug I reported in February; see
12067 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
12068 The problem was that GLR parsers did not conform to the C standard,
12069 because actions like { $1 = $2 + $3; } expanded to expressions
12070 that invoked YYFILL in separate subexpressions, and YYFILL assigned
12071 to a local variable. The C standard says that expressions
12072 like (var = f ()) + (var = f ()) have undefined behavior.
12073 Another problem was that GCC sometimes issues warnings that
12074 yyfill and its parameters are unused.
12075
12076 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
12077 as possibly unused.
12078 (yyfill): New function.
12079 (YYFILL): Use it.
12080 (yyuserAction): Change type of yynormal to bool, so that it matches
12081 the new yyfill signature. Mark it as possibly unused.
12082
12083
12084 Follow up on a bug I reported in February, where a Bison-generated
12085 parser can loop. Provide a test case and a fix for yacc.c. I
12086 don't have a fix for lalr1.cc or for glr.c, unfortunately.
12087 The original bug report is in:
12088 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
12089
12090 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
12091 macro's size was becoming unwieldy.
12092 (yyerrlab): Do not discard an empty lookahead symbol, as this
12093 might destroy garbage.
12094 (yyerrorlab): New label, with the old contents of YYERROR,
12095 plus the following change: pop the stack of rhs corresponding
12096 to the production that invoked YYERROR. That is how Yacc
12097 behaves, and POSIX requires this behavior.
12098 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
12099 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
12100 Define 'alarm' to do nothing if unistd.h is not available.
12101 Add a new rule "exp: '-' error;" to test the above change to
12102 data/yacc.c. Use 'alarm' to abort any test taking longer than
12103 10 seconds, as it's probably looping.
12104 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
12105 Also, the new yacc.c generates two fewer diagnostics for an
12106 existing test.
12107
12108 2003-05-24 Paul Eggert <eggert@twinsun.com>
12109
12110 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
12111 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
12112 This fixes a problem reported by John Bowman when the Compaq/HP
12113 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
12114 -ansi -Wall -gall).
12115 * data/yacc.c (union yyalloc): Likewise.
12116 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
12117
12118 Switch from 'int' to 'bool' where that makes sense.
12119
12120 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
12121 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
12122 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
12123 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
12124 Return or accept bool, not int. All callers changed.
12125 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
12126 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
12127 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
12128 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
12129 bitset_or_and_cmp_): Likewise.
12130 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
12131 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
12132 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
12133 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
12134 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
12135 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
12136 bitset_stats_or_and_cmp): Likewise.
12137 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
12138 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
12139 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
12140 ebitset_xor_cmp): Likewise.
12141 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
12142 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
12143 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
12144 lbitset_xor_cmp): Likewise.
12145 * lib/bbitset.h: Include <stdbool.h>.
12146 (struct bitset_vtable): The following members now return bool, not
12147 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
12148 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
12149 or_and_cmp).
12150 * src/conflicts.c (count_rr_conflicts): Likewise.
12151 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
12152 All uses changed.
12153 * lib/ebitset.c (ebitset_obstack_init): Likewise.
12154 * lib/lbitset.c (lbitset_obstack_init): Likewise.
12155 * src/getargs.c (debug_flag, defines_flag, locations_flag,
12156 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12157 graph_flag): Likewise.
12158 * src/getargs.h (debug_flag, defines_flag, locations_flag,
12159 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12160 graph_flag): Likewise.
12161 * src/output.c (error_verbose): Likewise.
12162 * src/output.h (error_verbose): Likewise.
12163 * src/reader.c (start_flag, typed): Likewise.
12164 * src/reader.h (typed): Likewise.
12165 * src/getargs.c (LOCATIONS_OPTION): New constant.
12166 (long_options, getargs): Use it.
12167 * src/lalr.c (build_relations): Use bool, not int.
12168 * src/nullable.c (nullable_compute): Likewise.
12169 * src/print.c (print_reductions): Likewise.
12170 * src/tables.c (action_row, pack_vector): Likewise.
12171 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
12172 * src/output.c (prepare): Use it.
12173 * src/output.c (token_definitions_output,
12174 symbol_destructors_output, symbol_destructors_output): Use string,
12175 not boolean integer, to keep track of whether to output separator.
12176 * src/print_graph.c (print_core): Likewise.
12177 * src/state.c (state_rule_lookaheads_print): Likewise.
12178
12179 * config/install-sh: Sync from automake 1.7.5.
12180
12181 2003-05-14 Paul Eggert <eggert@twinsun.com>
12182
12183 * src/parse-gram.y (rules_or_grammar_declaration): Require a
12184 semicolon after a grammar declaration, in the interest of possible
12185 future changes to the Bison input language.
12186 Do not allow a stray semicolon at the start of the grammar.
12187 (rhses.1): Allow one or more semicolons after any rule, including
12188 just before "|" as required by POSIX.
12189 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
12190 grammar.
12191
12192 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
12193
12194 %parse-param support for lalr1.cc.
12195
12196 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
12197 b4_cc_constructor_calls, b4_cc_constructor_call,
12198 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
12199 definitions.
12200 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
12201 parse-param arguments.
12202 (yy::b4_parser_class_name): Declare instance variables to
12203 hold parse-param arguments.
12204 * tests/calc.at: s/value/semantic_value/ because value clashes
12205 with a member of yy::b4_parser_class_name. Adjust C++ code
12206 to handle %parse-param. Enable %parse-param test in C++.
12207
12208 2003-05-12 Paul Eggert <eggert@twinsun.com>
12209
12210 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
12211 English a bit. Fix fclose typo. Change "const char" to "char
12212 const", and use ANSI C rather than K&R for "main". Suggest
12213 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
12214 and suggest yy_switch_to_buffer.
12215
12216 2003-05-05 Paul Eggert <eggert@twinsun.com>
12217
12218 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
12219 C89. This avoids a diagnostic on compilers that define __STDC__
12220 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
12221 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
12222
12223 2003-05-03 Paul Eggert <eggert@twinsun.com>
12224
12225 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
12226 Do not overrun array bounds.
12227 This should fix a bug reported today by Olatunji Oluwabukunmi in
12228 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
12229
12230 2003-04-29 Akim Demaille <akim@epita.fr>
12231
12232 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
12233 * src/getargs.c, src/getargs.h: here, as bool, not int.
12234 (nondeterministic_parser): New.
12235 * src/parse-gram.y, src/scan-gram.l: Support
12236 %nondeterministic-parser.
12237 * src/output.c (prepare): Use nondeterministic_parser instead
12238 of glr_parser where appropriate.
12239 * src/tables.c (conflict_row, action_row, save_row)
12240 (token_actions, token_actions, pack_vector): Ditto.
12241
12242 2003-04-29 Akim Demaille <akim@epita.fr>
12243
12244 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
12245
12246 2003-04-29 Akim Demaille <akim@epita.fr>
12247
12248 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
12249 with %pure-parser and %locations to exercise the patch from Yakov
12250 Markovitch below.
12251
12252 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
12253
12254 * data/yacc.c: (b4_lex_param): Corrected for the case where
12255 %lex-param is provided and %pure-parser isn't.
12256
12257 2003-04-27 Paul Eggert <eggert@twinsun.com>
12258
12259 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
12260 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
12261 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
12262 if it is not defined.
12263 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
12264
12265 2003-04-26 Paul Eggert <eggert@twinsun.com>
12266
12267 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
12268 Declare to be of type suitable for the ninf value itself, not of
12269 type suitable for the corresponding table, since the latter might
12270 be unsigned but the ninf value might be negative. This fixes a
12271 bug reported by Alexandre Duret-Lutz in
12272 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
12273
12274 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
12275 invokes it. We shouldn't invoke it twice because it will attempt
12276 to put error.o in the archive twice. This fixes a glitch reported
12277 by Martin Mokrejs in
12278 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
12279
12280 2003-04-21 Paul Eggert <eggert@twinsun.com>
12281
12282 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
12283 to gnulib.
12284
12285 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
12286
12287 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
12288 Fix obvious typo that results in uncompilable GLR parsers
12289 when both %pure-parser and %locations are used. (trivial change)
12290
12291 2003-04-17 Paul Eggert <eggert@twinsun.com>
12292
12293 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
12294 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
12295 Do not insert the expected token via unput, as this runs afoul
12296 of a POSIX-compatibility bug in flex 2.5.31.
12297 All uses changed to BEGIN the parent state,
12298 since we no longer insert the expected token via unput.
12299 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
12300 that is no longer emitted after the above change.
12301
12302 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
12303 the first one. This change is from Paul Hilfinger, and it fixes
12304 regression reported by Werner Lemberg in
12305 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
12306
12307 (resolve_sr_conflict): Don't invoke state_errs_set
12308 unless one or more tokens have been explicitly made errors.
12309 Otherwise, the above change causes Bison to abort.
12310
12311 * tests/existing.at (GNU pic Grammar): New test case, taken from
12312 Lemberg's email.
12313
12314 2003-03-31 Akim Demaille <akim@epita.fr>
12315
12316 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
12317
12318 2003-03-31 Akim Demaille <akim@epita.fr>
12319
12320 * src/output.c (prepare_symbols): Avoid trailing spaces in the
12321 output.
12322
12323 2003-03-31 Akim Demaille <akim@epita.fr>
12324
12325 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
12326 From Paul Hilfinger.
12327
12328 2003-03-29 Akim Demaille <akim@epita.fr>
12329
12330 * m4/error.m4: Do not put under dynamic conditions some code which
12331 expansion is under static control.
12332
12333 2003-03-29 Akim Demaille <akim@epita.fr>
12334
12335 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
12336
12337 2003-03-29 Akim Demaille <akim@epita.fr>
12338
12339 * doc/bison.texinfo (Strings are Destroyed): New.
12340
12341 2003-03-13 Paul Eggert <eggert@twinsun.com>
12342
12343 * .cvsignore: Add configure.lineno.
12344 * src/.cvsignore: Add yacc.
12345 * tests/.cvsignore: Add testsuite.log.
12346 * doc/fdl.texi: Sync with latest FSF version.
12347
12348 2003-03-12 Paul Eggert <eggert@twinsun.com>
12349
12350 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
12351 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
12352 cursor, instead of leaving it undefined. This fixes a bug
12353 reported by Tim Van Holder in
12354 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
12355 * tests/input.at (Torturing the Scanner): Test the scanner on
12356 an empty input file, which was Tim Van Holder's test case.
12357
12358 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
12359 <sys/resource.h> can be included, include sys/time.h and
12360 sys/times.h first, if available. This works around the SunOS
12361 4.1.4 porting bug reported by Bruce Becker in
12362 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
12363
12364 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
12365 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
12366 AC_HEADER_SYS_WAIT.
12367
12368 Merge changes from gnulib. This was prompted because the CVS
12369 snapshot didn't build on Solaris 7 due to strnlen problems.
12370
12371 These changes need to be merged back into gnulib:
12372 * lib/hash.c: Include <stdbool.h> unconditionally.
12373 * m4/onceonly.m4 (m4_quote): New macro.
12374 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
12375 Quote AC_FOREACH variable-expansions properly.
12376 The 2003-01-03 obstack.h change also needs merging.
12377 {end of changes requiring merging}
12378
12379 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
12380 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
12381 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
12382 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
12383 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
12384 New files, imported from gnulib.
12385 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
12386 above.
12387
12388 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
12389 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
12390 gnulib sources.
12391
12392 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
12393 Add.
12394 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
12395 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
12396 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
12397 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
12398 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
12399 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
12400 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
12401 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
12402 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
12403 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
12404 (jm_PREREQ_ARGMATCH): Remove.
12405 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
12406 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
12407
12408 * src/system.h: Include <stdbool.h> unconditionally.
12409
12410 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
12411 assuming at least C89 in the bitset code for some time now.
12412
12413 2003-03-03 Akim Demaille <akim@epita.fr>
12414
12415 * ro.po: New.
12416
12417 2003-03-02 Akim Demaille <akim@epita.fr>
12418
12419 * doc/bison.texinfo (Table of Symbols): Reactivate the
12420 documentation for %lex-param, and %parse-param.
12421
12422 2003-03-02 Akim Demaille <akim@epita.fr>
12423
12424 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
12425 generate verbose error messages.
12426 Use the number of tokens as an upper bound in yytname, as it
12427 cannot be a non terminal.
12428
12429 2003-03-02 Akim Demaille <akim@epita.fr>
12430
12431 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
12432 message.
12433
12434 2003-03-02 Akim Demaille <akim@epita.fr>
12435
12436 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
12437 Use them to exercise yycheck overrun.
12438 Based on Andrew Suffield's grammar.
12439
12440 2003-03-02 Akim Demaille <akim@epita.fr>
12441
12442 Create tests/local.at for Bison generic testing macros.
12443
12444 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
12445 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
12446 This new file.
12447 * tests/calc.at (AT_CHECK_CALC): Adjust.
12448 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
12449 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
12450 * tests/local.at: here.
12451 (AT_COMPILE_CXX): Tags the tests using it as c++.
12452 Ignore the test if CXX is not functional.
12453
12454 2003-03-01 Paul Eggert <eggert@twinsun.com>
12455
12456 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
12457 not loc->end, since loc->end might contain garbage and this leads
12458 to undefined behavior on some platforms.
12459 (id_loc, token_start): Use (IF_LINTed) initial values that do not
12460 depend on *loc, so that the reader doesn't give the the false
12461 impression that *loc is initialized.
12462 (<INITIAL>"%%"): Do not bother setting code_start, since its value
12463 does not survive the return.
12464
12465 2003-03-01 Akim Demaille <akim@epita.fr>
12466
12467 * src/scan-gram.l (code_start): Always initialize it when entering
12468 into yylex, as SC_EPILOGUE is activated *before* the corresponding
12469 yylex invocation. An alternative would be making it static, but
12470 then it starts with the second %%'s beginning, instead of its end.
12471
12472 2003-02-28 Paul Eggert <eggert@twinsun.com>
12473
12474 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
12475 around a UnixWare 7.1.1 porting bug reported by John Hughes in
12476 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
12477
12478 2003-02-26 Paul Eggert <eggert@twinsun.com>
12479
12480 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
12481 Remove Sequent/Pyramid discussion (nobody uses them any more).
12482 Merge VMS and MS-DOS discussion; these ports may well be dead
12483 but let's keep mentioning them for now. Put <> around email
12484 addresses. Add copyright notice.
12485
12486 2003-02-24 Paul Eggert <eggert@twinsun.com>
12487
12488 * data/glr.c (yy_reduce_print): yylineno -> yylno,
12489 to avoid collision with flex use of yylineno.
12490 Problem reported by Bruce Lilly in
12491 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
12492 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
12493 * data/yacc.c (yy_reduce_print): Likewise.
12494
12495 * config/depcomp: Sync with Automake 1.7.3.
12496
12497 2003-02-21 Akim Demaille <akim@epita.fr>
12498
12499 * data/lalr1.cc: Use temporary variables instead of casts to
12500 change integer types.
12501 Suggested by Paul Eggert.
12502
12503 2003-02-21 Akim Demaille <akim@epita.fr>
12504
12505 * doc/bison.texinfo: Use "location" consistently to refer to @n,
12506 to avoid confusions with lalr1.cc's notion of Position.
12507 Suggested by Paul Eggert.
12508
12509 2003-02-20 Akim Demaille <akim@epita.fr>
12510
12511 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
12512 before initial_columns.
12513 (location.hh): Use consistent variable names when defining the
12514 operator<<.
12515 Use "last" so that we subtract from Positions, not from unsigned.
12516
12517 2003-02-20 Akim Demaille <akim@epita.fr>
12518
12519 * data/lalr1.cc (position.hh): New subfile, including the extended
12520 and Doxygen'ed documentation of class Position.
12521 (location.hh): Use it.
12522 Document a` la Doxygen.
12523 With the help of Benoit Perrot.
12524
12525 2003-02-20 Akim Demaille <akim@epita.fr>
12526
12527 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
12528 AT_YACC_IF.
12529 Redefine AT_YYERROR_SEES_LOC_IF using it.
12530 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
12531 not defined.
12532 Don't use the location in yy::Parser::error_ and
12533 yy::Parser::print_ when not %locations.
12534 Activate more lalr1.cc tests.
12535
12536 2003-02-19 Akim Demaille <akim@epita.fr>
12537
12538 * data/lalr1.cc: When displaying a line number, be sure to make it
12539 an int.
12540
12541 2003-02-19 Akim Demaille <akim@epita.fr>
12542
12543 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
12544 Remove, useless.
12545 (YYABORT, YYACCEPT, YYERROR): New.
12546 * tests/calc.at: Renable the lalr1.cc test.
12547
12548 2003-02-19 Akim Demaille <akim@epita.fr>
12549
12550 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
12551 error recovery, mixing with/without pops and discarding of the
12552 lookahead.
12553 Exercise YYERROR.
12554 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
12555
12556 2003-02-17 Paul Eggert <eggert@twinsun.com>
12557
12558 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
12559 * tests/testsuite.at (AT_COMPILE): Use them.
12560 This fixes the testsuite problem reported by Robert Lentz in
12561 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
12562
12563 2003-02-12 Paul Eggert <eggert@twinsun.com>
12564
12565 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
12566 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
12567 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
12568 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
12569 Check for malloc failure, for consistency with yacc.c.
12570 (yytname_size): Remove, for consistency with yacc.c.
12571
12572 The bug still remains in data/lalr1.cc, as I didn't have time
12573 to fix it there.
12574
12575 2003-02-06 Akim Demaille <akim@epita.fr>
12576
12577 * configure.ac (GXX): Rename as...
12578 (CXX): this, to keep the original Autoconf semantics.
12579 Require 2.57.
12580 * data/lalr1.cc: Fix b4_copyright invocations.
12581 If YYDEBUG is not defined, don't depend upon name_ being defined.
12582 (location.hh): Include string and iostream.
12583 (Position::filename): New member.
12584 (Position::Position ()): New.
12585 (operator<< (Position)): New.
12586 (operator- (Position, int)): New.
12587 (Location::first, Location::last): Rename as...
12588 (Location::begin, Location::end): these, to mock the conventional
12589 iterator names.
12590 (operator<< (Location)): New.
12591 * tests/atlocal.in (CXX): New.
12592 * tests/testsuite.at (AT_COMPILE_CXX): New.
12593 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
12594 locations in a more synthetic way.
12595 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
12596 lalr1.cc is used.
12597 Adjust the C locations to match those from Emacs: first column is
12598 column 0.
12599 Change all the expected results.
12600 Conform to the GCS: simplify the locations when applicable.
12601 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
12602 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
12603 these CPP macros with the m4 macros new defined by...
12604 (AT_CHECK_PUSHDEFS): this, i.e.:
12605 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
12606 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
12607 New macros.
12608 (AT_CHECK_POPDEFS): Undefine them.
12609 (AT_CHECK_CALC_LALR1_CC): New.
12610 Use it for the first lalr1.cc test.
12611
12612 2003-02-04 Akim Demaille <akim@epita.fr>
12613
12614 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
12615 Location as is defined.
12616
12617 2003-02-04 Akim Demaille <akim@epita.fr>
12618
12619 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
12620 name_ being defined.
12621
12622 2003-02-03 Paul Eggert <eggert@twinsun.com>
12623
12624 * src/gram.h (start_symbol): Remove unused decl.
12625
12626 Use more-consistent naming conventions for local vars.
12627
12628 * src/derives.c (derives_compute): Change type of local var from
12629 int to rule_number.
12630 * src/gram.c (grammar_rules_partial_print): Likewise.
12631 * src/print.c (print_core): Likewise.
12632 * src/reduce.c (reduce_grammar_tables): Likewise.
12633
12634 * src/gram.c (grammar_dump): Change name of item_number *
12635 local var from r to rp.
12636 * src/nullable.c (nullable_compute): Likewise.
12637
12638 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
12639
12640 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
12641 for symbol or symbol_number var.
12642 * src/reader.c (grammar_start_symbol_set): Likewise.
12643 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
12644 Likewise.
12645 * src/state.c (transitions_to): Likewise.
12646 * src/state.h: Likewise.
12647 * src/tables.c (symbol_number_to_vector_number): Likewise.
12648
12649 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
12650 char * var.
12651
12652 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
12653 var.
12654
12655 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
12656 var.
12657
12658 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
12659 Use str, not s, for char * var. Use ch, not c, for character var.
12660 Use size for size var.
12661
12662 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
12663 char * var.
12664 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
12665 uniqstr var.
12666 * src/uniqstr.h: Likewise.
12667
12668 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
12669 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
12670 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
12671 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
12672 param to have same name as that of enum, so that we don't use
12673 "s" to stand for a non-state.
12674
12675 2003-02-02 Akim Demaille <akim@epita.fr>
12676
12677 * src/scan-skel.l: Scan more than one inert character per yylex
12678 invocation.
12679
12680 2003-02-01 Paul Eggert <eggert@twinsun.com>
12681
12682 Version 1.875a.
12683
12684 * po/LINGUAS: Add ms.
12685
12686 2003-01-30 Akim Demaille <akim@epita.fr>
12687
12688 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
12689
12690 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12691
12692 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
12693 of $1.
12694
12695 Changes in response to error report by S. Eken: GLR mode does not
12696 handle negative $ indices or $ indices in embedded rules correctly.
12697 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
12698
12699 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
12700 (b4_rhs_location): Ditto.
12701 (yyfill): New function to copy from stack tree into array
12702 incrementally.
12703 (yyuserAction): Modify to allow incremental move of semantic values
12704 to rhs array when in GLR mode.
12705 Define YYFILL to use in user-defined actions to fill semantic array
12706 as needed.
12707 Remove dummy use of yystack, as there is now a guaranteed use.
12708 (yydoAction): Modify to allow incremental move of semantic values
12709 to rhs array when in GLR mode.
12710 (yyresolveAction): Ditto.
12711 (yyglrShiftDefer): Update comment.
12712 (yyresolveStates): Use X == NULL for pointers, not !X.
12713 (yyglrReduce): Ditto.
12714 (yydoAction): Ditto
12715
12716 * tests/glr-regr1.at: Rename to ...
12717 * tests/glr-regression.at: Add new regression test for the problems
12718 described above (adapted from S. Eken).
12719 Update copyright notice.
12720 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
12721 * tests/Makefile.am: Ditto.
12722
12723 2003-01-28 Paul Eggert <eggert@twinsun.com>
12724
12725 * data/lalr1.cc: Do not use @output_header_name@ unless
12726 b4_defines_flag is set. This fixes two bugs reported by
12727 Tim Van Holder in
12728 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
12729 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
12730
12731 2003-01-21 Paul Eggert <eggert@twinsun.com>
12732
12733 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
12734 we don't need to worry about yyerrlab1 being reported as an
12735 "unused label" by non-GCC C compilers. The downside is that if
12736 locations are used then a couple of statements are duplicated each
12737 time YYERROR is invoked, but the upside is that the warnings
12738 should vanish.
12739 (yyerrlab1): Move code to YERROR.
12740 (yyerrlab2): Remove. Change uses back to yyerrlab1.
12741 This reverts some of the 2002-12-27 change.
12742
12743 2003-01-17 Paul Eggert <eggert@twinsun.com>
12744
12745 * src/output.c (symbol_printers_output): Fix typo that led
12746 to core dump. Problem reported by Antonio Rus in
12747 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
12748
12749 2003-01-13 Akim Demaille <akim@epita.fr>,
12750 Quoc Peyrot <chojin@lrde.epita.fr>,
12751 Robert Anisko <anisko_r@lrde.epita.fr>
12752
12753 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
12754 when the stacks contain one element, as the loop would otherwise
12755 free the last state, and then use the top state (the one we just
12756 popped). This means that the initial elements will not be freed
12757 explicitly, as is the case in yacc.c; it is not a problem, as
12758 these elements have fake values.
12759
12760 2003-01-11 Paul Eggert <eggert@twinsun.com>
12761
12762 * NEWS: %expect-violations are now just warnings, reverting
12763 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
12764 bootstrapping problem reported by Matthias Klose; see
12765 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
12766 * src/conflicts.c (conflicts_print): Likewise.
12767 * tests/conflicts.at (%expect not enough, %expect too much,
12768 %expect with reduce conflicts): Likewise.
12769 * doc/bison.texinfo (Expect Decl): Document this. Also mention
12770 that the warning is enabled if the number of conflicts changes
12771 (not necessarily increases).
12772
12773 * src/getargs.c (version): Update copyright year.
12774
12775 2003-01-09 Akim Demaille <akim@epita.fr>
12776
12777 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
12778
12779 2003-01-08 Paul Eggert <eggert@twinsun.com>
12780
12781 * Makefile.maint (WGETFLAGS):
12782 New macro, containing "-C off" to disable proxy caches.
12783 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
12784 (rel-check): Use $(WGET) instead of wget.
12785
12786 2003-01-06 Paul Eggert <eggert@twinsun.com>
12787
12788 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
12789 the GLR paper of Scott, Johnstone and Hussain.
12790
12791 2003-01-04 Paul Eggert <eggert@twinsun.com>
12792
12793 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
12794 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
12795 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
12796 (EXTRA_LIBRARIES): New var, for liby.a.
12797 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
12798 (EXTRA_SCRIPTS): New var, for yacc.
12799
12800 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
12801 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
12802 Problem reported by Nelson H. F. Beebe.
12803
12804 2003-01-03 Paul Eggert <eggert@twinsun.com>
12805
12806 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
12807 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
12808 when compiling Bison 1.875's `bitset bset = obstack_alloc
12809 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
12810
12811 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
12812 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
12813 grow to a huge size with typical invocation.
12814
12815 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
12816 Use the pattern recommended by Autoconf 2.57, except also protect
12817 against double-definition.
12818 * src/system.h: Likewise.
12819 Portability issues reported by Nelson H. F. Beebe.
12820
12821 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
12822 All uses changed. Provide a definition in both C and C++.
12823 (yytrue, yyfalse): Define even if defined (__cplusplus).
12824
12825 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
12826 Reported by Nelson H. F. Beebe.
12827
12828 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
12829
12830 2003-01-02 Paul Eggert <eggert@twinsun.com>
12831
12832 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
12833 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
12834 Bug reported by Nelson H. F. Beebe.
12835
12836 2003-01-01 Paul Eggert <eggert@twinsun.com>
12837
12838 * Version 1.875.
12839
12840 2002-12-30 Paul Eggert <eggert@twinsun.com>
12841
12842 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
12843 Moved here from...
12844 (<INITIAL>","): Here. This causes stray "," to be treated
12845 more uniformly.
12846
12847 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
12848 last brace in braced code when not in Yacc mode, for compatibility
12849 with Bison 1.35. This resurrects the 2001-12-15 patch to
12850 src/reader.c.
12851
12852 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
12853 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
12854
12855 2002-12-28 Paul Eggert <eggert@twinsun.com>
12856
12857 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
12858 that of SYM's type. This fixes Debian bug 168069, reported by
12859 Thomas Olsson.
12860
12861 2002-12-28 Paul Eggert <eggert@twinsun.com>
12862
12863 Version 1.75f.
12864
12865 Switch back to the Yacc style of conflict reports, undoing some
12866 of the 2002-07-30 change.
12867 * doc/bison.texinfo (Understanding): Use Yacc style for
12868 conflict reports. Also, use new way of locating rules.
12869 * src/conflicts.c (conflict_report):
12870 Renamed from conflict_report_yacc, removing the old
12871 'conflict_report'. Translate the entire conflict report at once,
12872 so that we don't assume that "," has the same interpretation in
12873 all languages.
12874 (conflicts_output): Use Yacc-style conflict report for each state,
12875 instead of our more-complicated style.
12876 (conflicts_print): Use Yacc-style conflict report, except print
12877 the input file name when not emulating Yacc.
12878 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
12879 Conflicted Reduction, %expect not enough, %expect too much,
12880 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
12881 * tests/existing.at (GNU Cim Grammar): Likewise.
12882 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
12883
12884 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
12885 fatal): Don't invoke fflush; it's not needed and it might even be
12886 harmful for stdout, as stdout might not be open.
12887 * src/reduce.c (reduce_print): Likewise.
12888
12889 2002-12-27 Paul Eggert <eggert@twinsun.com>
12890
12891 Fix a bug where error locations were not being recorded correctly.
12892 This problem was originally reported by Paul Hilfinger in
12893 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
12894
12895 * data/yacc.c (yyparse): New local var yylerrsp, to record the
12896 top of the location stack's error locations.
12897 (yyerrlab): Set it. When discarding a token, push its location
12898 onto yylerrsp so that we don't lose track of the error's end.
12899 (yyerrlab1): Now is only the target of YYERROR, so that we can
12900 properly record the location of the action that failed. For GCC
12901 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
12902 GCC warning about yyerrlab1 being unused if YYERROR is unused.
12903 (yyerrlab2): New label, which yyerrlab now falls through to.
12904 Compute the error's location by applying YYLLOC_DEFAULT to
12905 the locations of all the symbols that went into the error.
12906 * doc/bison.texinfo (Location Default Action): Mention that
12907 YYLLOC_DEFAULT is also invoked for syntax errors.
12908 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
12909 Error locations include the locations of all the tokens that were
12910 discarded, not just the last token.
12911
12912 2002-12-26 Paul Eggert <eggert@twinsun.com>
12913
12914 * src/files.c: Include quote.h.
12915 (compute_output_file_names): Warn if we detect conflicting
12916 outputs to the same file. This should catch the misunderstanding
12917 exemplified by Debian Bug 165349, reported by Bruce Stephens..
12918
12919 * src/conflicts.c (conflicts_print): If the user specifies
12920 "%expect N", report an error if there are any reduce/reduce
12921 conflicts. This is what the manual says should happen.
12922 This fixes Debian bug 130890, reported by Anthony DeRobertis.
12923 * tests/conflicts.at (%expect with reduce conflicts): New test.
12924
12925 Don't use m4_include on relative file names, as it doesn't work as
12926 desired if there happens to be a file with that name under ".".
12927
12928 * m4sugar/version.m4: Remove; it was included but it wasn't used.
12929 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
12930 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
12931 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
12932 * src/output.c (output_skeleton): Use full path names when
12933 specifying a file to include; don't rely on include path, as
12934 it's unreliable when the working file contains a file with
12935 that name.
12936
12937 2002-12-25 Paul Eggert <eggert@twinsun.com>
12938
12939 Remove obsolete references to bison.simple and bison.hairy.
12940 Problem mentioned by Aubin Mahe in
12941 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
12942 * data/glr.c: Comment fix.
12943 * doc/bison.1: Remove references. Also, mention "yacc".
12944
12945 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
12946 with -g option.
12947
12948 * src/parse-gram.y (declaration): Use enum "report_states" rather
12949 than its numeric value 1.
12950
12951 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
12952 opening a new one. This fixes Debian bug 165349, reported by
12953 Bruce Stephens.
12954
12955 2002-12-24 Paul Eggert <eggert@twinsun.com>
12956
12957 Version 1.75e.
12958
12959 * Makefile.maint (cvs-update): Don't assume that the shell
12960 supports $(...), as Solaris sh doesn't.
12961
12962 * src/parse-gram.y (lloc_default): Remove test for empty
12963 nonterminals at the end, since it didn't change the result.
12964
12965 2002-12-24 Paul Eggert <eggert@twinsun.com>
12966
12967 If the user does not define YYSTYPE as a macro, Bison now declares it
12968 using typedef instead of defining it as a macro. POSIX requires this.
12969 For consistency, YYLTYPE is also declared instead of defined.
12970
12971 %union directives can now have a tag before the `{', e.g., the
12972 directive `%union foo {...}' now generates the C code
12973 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
12974 The default union tag is `YYSTYPE', for compatibility with Solaris 9
12975 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
12976 instead of `yyltype'.
12977
12978 `yystype' and `yyltype' are now obsolescent macros instead of being
12979 typedefs or tags; they are no longer documented and will be
12980 withdrawn in a future release.
12981
12982 * data/glr.c (b4_location_type): Remove.
12983 (YYSTYPE): Renamed from yystype.
12984 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
12985 (struct YYLTYPE): Renamed from struct yyltype.
12986 (YYLTYPE): Renamed from yyltype.
12987 (yyltype, yystype): New (and obsolescent) macros,
12988 for backward compatibility.
12989 * data/yacc.c: Likewise.
12990
12991 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
12992 does not specify a union tag. This is for compatibility with
12993 Solaris 9 yacc.
12994
12995 * src/parse-gram.y (add_param): 2nd arg is now char * not char
12996 const *, since it is now modified by stripping surrounding { }.
12997 (current_braced_code): Remove.
12998 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
12999 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
13000 trailing " {...}". Now of type <chars>.
13001 (grammar_declaration): Adjust to bundled tokens.
13002 (code_content): Remove; stripping is now done by add_param.
13003 (print_token_value): Print contents of bundled tokens.
13004 (token_name): New function.
13005
13006 * src/reader.h (braced_code, current_braced_code): Remove.
13007 (token_name): New decl.
13008
13009 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
13010 token_type, not braced_code code_kind. All uses changed.
13011 (SC_PRE_CODE): New state, for scanning after a keyword that
13012 has (or usually has) an immediately-following braced code.
13013 (token_type): New local var, to keep track of which token type
13014 to return when scanning braced code.
13015 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
13016 <INITIAL>"%parse-param", <INITIAL>"%printer",
13017 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
13018 instead of returning a token type immediately.
13019 (<INITIAL>"{"): Set token type.
13020 (<SC_BRACED_CODE>"}"): Use it.
13021 (handle_action_dollar, handle_action_at): Now returns bool
13022 indicating success. Fail if ! current_rule; this prevents a core dump.
13023 (handle_symbol_code_dollar, handle_symbol_code_at):
13024 Remove; merge body into caller.
13025 (handle_dollar, handle_at): Complain in invalid contexts.
13026
13027 * NEWS, doc/bison.texinfo: Document the above.
13028 * NEWS: Fix years and program names in copyright notice.
13029
13030 2002-12-17 Paul Eggert <eggert@twinsun.com>
13031
13032 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
13033 Reporting, Table of Symbols): Omit mentions of %lex-param and
13034 %parse-param from the documentation for now.
13035
13036 2002-12-15 Paul Eggert <eggert@twinsun.com>
13037
13038 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
13039 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
13040 lookahead symbol, and which sets yychar in parser actions) and it
13041 disagreed with the Bison documentation. Bug
13042 reported by Andrew Walrond.
13043
13044 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
13045 as the caller now does that.
13046 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
13047 (YYEMPTY): Parenthesize right hand side, since others use it.
13048 (yyparse): Don't assume that our generated code is the only code
13049 that sets yychar.
13050
13051 2002-12-13 Paul Eggert <eggert@twinsun.com>
13052
13053 Version 1.75d.
13054
13055 POSIX requires a "yacc" command.
13056 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
13057 (MOSTLYCLEANFILES): Add yacc.
13058 (yacc): New rule.
13059 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
13060 as an alias for bison y.
13061
13062 * po/LINGUAS: Add da.
13063
13064 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
13065 problem with latest <getopt.h>.
13066 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
13067
13068 * doc/fdl.texi: Upgrade to 1.2.
13069 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
13070 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
13071 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
13072 gnulib.
13073 * config/install-sh: Sync with autotools.
13074
13075 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
13076 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
13077 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
13078 locations are requested.
13079 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
13080 locations are requested.
13081
13082 2002-12-12 Paul Eggert <eggert@twinsun.com>
13083
13084 Remove unportable casts and storage allocation tricks.
13085 While we're at it, remove almost all casts, since they
13086 usually aren't needed and are a sign of trouble.
13087
13088 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
13089
13090 * src/derives.c (derives_compute): Do not subtract NTOKENS from
13091 the pointer DSET returned by malloc; this isn't portable.
13092 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
13093 Similarly for DERIVES.
13094 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
13095 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
13096 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
13097
13098 * src/derives.c (derives_compute): Do not bother invoking
13099 int_of_rule_number, since rule numbers are integers.
13100
13101 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
13102 rather than XMALLOC (char, N).
13103
13104 * src/files.c (filename_split): Rewrite to avoid cast.
13105
13106 * src/gram.h (symbol_number_as_item_number,
13107 item_number_as_symbol_number, rule_number_as_item_number,
13108 item_number_as_rule_number):
13109 Now inline functions rather than macros, to avoid casts.
13110 * src/state.h (state_number_as_int): Likewise.
13111 * src/tables.c (state_number_to_vector_number,
13112 symbol_number_to_vector_number): Likewise.
13113
13114 * src/gram.h (int_of_rule_number): Remove; no longer used.
13115
13116 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
13117 since the resulting storage is always stored into.
13118
13119 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
13120 where it's needed.
13121
13122 * src/muscle_tab.c (muscle_m4_output):
13123 Now inline. Return bool, not int.
13124 * src/state.c (state_compare): Likewise.
13125 * src/symtab.c (symbol_check_defined,
13126 symbol_check_alias_consistency, symbol_pack, symbol_translation,
13127 hash_compare_symbol, hash_symbol):
13128 Likewise.
13129 * src/uniqstr.c (uniqstr_print): Likewise.
13130 * src/muscle_tab.c (muscle_m4_output_processor):
13131 New function, to avoid casts.
13132 * src/state.c (state_comparator, stage_hasher): Likewise.
13133 * src/symtab.c (symbol_check_defined_processor,
13134 symbol_check_alias_consistency_processor, symbol_pack_processor,
13135 symbol_translation_processor, hash_symbol_comparator,
13136 hash_symbol_hasher): Likewise.
13137 * src/uniqstr.c (uniqstr_print_processor): Likewise.
13138 * src/muscle_tab.c (muscles_m4_output):
13139 Use new functions instead of casting old functions unportably.
13140 * src/state.c (state_hash_new): Likewise.
13141 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
13142 symbols_token_translations_init):
13143 Likewise.
13144 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
13145
13146 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
13147 var instead of casting to long, to avoid casts.
13148 (prepare_states): Use MALLOC rather than alloca, so that we don't
13149 have to worry about alloca.
13150 * src/state.c (state_hash_lookup): Likewise.
13151
13152 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
13153 local var instead of casting to unsigned char, to avoid casts.
13154
13155 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
13156 STATE_ALLOC): Remove.
13157 (transitions_new, errs_new, reductions_new, state_new): Use malloc
13158 rather than calloc, and use offsetof to avoid allocating slightly
13159 too much storage.
13160 (state_new): Initialize all members.
13161
13162 * src/state.c (state_hash): Use unsigned accumulator, not signed.
13163
13164 * src/symtab.c (symbol_free): Remove; unused.
13165 (symbol_get): Remove cast in lhs of assignment.
13166 (symbols_do): Now static. Accept generic arguments, not
13167 hashing-related ones.
13168
13169 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
13170 (symbol_processor): Remove.
13171 (symbols_do): Remove decl; now static.
13172
13173 * src/system.h (alloca): Remove; decl no longer needed.
13174 (<stddef.h>): Include, for offsetof.
13175 (<inttypes.>, <stdint.h>): Include if available.
13176 (uintptr_t): New type, if system lacks it.
13177 (CALLOC, MALLOC, REALLOC): New macros.
13178 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
13179 new macros.
13180
13181 * src/tables.c (table_size): Now int, to pacify GCC.
13182 (table_grow, table_ninf_remap): Use signed table size.
13183 (save_row): Don't bother initializing locals when not needed.
13184 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
13185 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
13186
13187 * src/vcg.h: Correct misspellings.
13188
13189 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
13190
13191
13192 * src/getargs.c (getargs): Don't assume EOF == -1.
13193
13194 2002-12-09 Paul Eggert <eggert@twinsun.com>
13195
13196 Change identifier spellings to avoid collisions with names
13197 that are reserved by POSIX.
13198
13199 Don't use names ending in _t, since POSIX reserves them.
13200 For consistency, remove _e and _s endings -- they're weren't
13201 needed to remove ambiguity. All uses changed.
13202 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
13203 turn was just renamed from struniq_t.
13204 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
13205 which in turn was just renamed from struniq_processor_t.
13206 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
13207 in turn was renamed from hash_compare_struniq_t.
13208 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
13209 (state_list): Renamed from state_list_t.
13210 * src/assoc.h (assoc): Renamed from assoc_t.
13211 * src/conflicts.c (enum conflict_resolution): Renamed from
13212 enum conflict_resolution_e.
13213 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
13214 (rule_list): Renamed from rule_list_t.
13215 * src/getargs.h (enum trace): Renamed from enum trace_e.
13216 (enum report): Renamed from enum report_e.
13217 * src/gram.h (item_number): Renamed from item_number_t.
13218 (rule_number): Renamed from rule_number_t.
13219 (struct rule_s): Remove the "rule_s" part; not used.
13220 (rule): Renamed from rule_t.
13221 (rule_filter): Renamed from rule_filter_t.
13222 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
13223 (goto_list): Renamed from goto_list_t.
13224 * src/lalr.h (goto_number): Renamed from goto_number_t.
13225 * src/location.h (location): Renamed from location_t.
13226 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
13227 and moved here from:
13228 * src/muscle_tab.h (muscle_entry_t): here.
13229 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
13230 (rule_list): Renamed from rule_list_t.
13231 * src/print_graph.c (static_graph): Renamed from graph.
13232 * src/reader.h (braced_code): Renamed from braced_code_t.
13233 Remove brace_code_e tag.
13234 * src/relation.h (relation_node): Renamed from relation_node_t.
13235 (relation_nodes): Renamed from relation_nodes_t.
13236 (relation): Renamed from relation_t.
13237 * src/state.h (state_number): Renamed from state_number_t.
13238 (struct state): Renamed from struct state_s.
13239 (state): Renamed from state_t.
13240 (transitions): Renamed from transitions_t. Unused (and
13241 misspelled) transtion_s tag removed.
13242 (errs): Renamed from errs_t. Unused errs_s tag removed.
13243 (reductions): Renamed from reductions_t. Unused tag
13244 reductions_s removed.
13245 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
13246 (struct symbol_list): Renamed from struct symbol_list_s.
13247 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
13248 (struct symbol): Renamed from struct symbol_s.
13249 (symbol): Renamed from symbol_t.
13250 * src/tables.c (vector_number): Renamed from vector_number_t.
13251 (action_number): Renamed from action_t.
13252 * src/tables.h (base_number): Renamed from base_t.
13253 * src/vcg.h (enum color): Renamed from enum color_e.
13254 (enum textmode): Renamed from enum textmode_e.
13255 (enum shape): Renamed from enum shape_e.
13256 (struct colorentry): Renamed from struct colorentry_s.
13257 (struct classname): Renamed from struct classname_s.
13258 (struct infoname): Renamed from struct infoname_s.
13259 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
13260 (enum decision): Renamed from enum decision_e.
13261 (enum orientation): Renamed from enum orientation_e.
13262 (enum alignment): Renamed from enum alignment_e.
13263 (enum arrow_mode): Renamed from enum arrow_mode_e.
13264 (enum crossing_type): Renamed from enum crossing_type_e.
13265 (enum view): Renamed from enum view_e.
13266 (struct node): Renamed from struct node_s.
13267 (node): Renamed from node_t.
13268 (enum linestyle): Renamed from enum linestyle_e.
13269 (enum arrowstyle): Renamed from enum arrowstyle_e.
13270 (struct edge): Renamed from struct edge.
13271 (edge): Renamed from edge_t.
13272 (struct graph): Renamed from struct graph_s.
13273 (graph): Renamed from graph_t.
13274 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
13275 Rename value_t -> value.
13276 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
13277 value_t_as_yystype -> value_as_yystype.
13278
13279 Don't include <errno.h> in the mainstream code, since it
13280 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
13281 * lib/get-errno.c, lib/get-errno.h: New files.
13282 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
13283 get-errno.c.
13284 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
13285 * src/output.c (output_skeleton): Likewise.
13286 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
13287 instead of errno.
13288 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
13289 Likewise.
13290 (handle_action_dollar, handle_action_at): Likewise.
13291 * src/system.h: Do not include <errno.h>.
13292 (TAB_EXT): Renamed from EXT_TAB.
13293 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
13294
13295 Avoid str[a-z]*, since <string.h> reserves that name space.
13296 Change all instances of "struniq" in names to "uniqstr", and
13297 likewise for "STRUNIQ" and "UNIQSTR".
13298 * src/uniqstr.c: Renamed from src/struniq.c.
13299 * src/uniqstr.h: Renamed from src/struniq.h.
13300 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
13301 * src/files.c (strsuffix): Remove; unused.
13302 (concat2): Renamed from stringappend. Now static.
13303 * src/files.h (strsuffix, stringappend): Remove; unused.
13304 * src/parse-gram.y (<chars>): Renamed from <string>.
13305 (<uniqstr>): Renamed from <struniq>.
13306 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
13307 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
13308 (struct graph_s.expand): Renamed from struct graph_s.stretch.
13309 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
13310 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
13311 (N_EXPAND): Renamed from N_STRETCH.
13312
13313 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
13314 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
13315 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
13316 Remove; unused.
13317 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
13318 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
13319 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
13320 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
13321 (BASE_MAXIMUM): Renamed from BASE_MAX.
13322 (BASE_MINIMUM): Renamed from BASE_MIN.
13323 (ACTION_MAX): Remove; unused.
13324 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
13325 Unnecessary casts removed from above defines.
13326
13327
13328 Fix misspelling in names.
13329 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
13330 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
13331 G_NODE_ALIGNEMENT.
13332
13333
13334 * lib/timevar.c (timevar_report): Renamed from time_report,
13335 for consistency with other names.
13336 * lib/timevar.h (timevar_report): New decl.
13337 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
13338
13339
13340 Sort include-file uses.
13341
13342 Reorder all include files under src to be in the order "system.h".
13343 then the ../lib include files in angle brackets (alphabetized),
13344 then the . include files in double-quotes (alphabetized). Fix
13345 dependency breakages encountered in this process, as follows:
13346 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
13347 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
13348 * src/state.h: Include "symtab.h".
13349
13350 2002-12-08 Paul Eggert <eggert@twinsun.com>
13351
13352 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
13353 since this causes problems when __file__ contains character
13354 sequences like "@" that are treated specially by src/scan-skel.l.
13355 Instead, just use the file's basename. This fixes the bug
13356 reported by Martin Mokrejs in
13357 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
13358
13359 2002-12-06 Paul Eggert <eggert@twinsun.com>
13360
13361 Add support for rules that do not have trailing semicolons, as
13362 POSIX requires. Improve the quality of locations in Bison
13363 diagnostics.
13364
13365 * src/location.c: Include <quotearg.h>.
13366 (empty_location): Now const.
13367 (location_print): New function. Follow the recommendation of the
13368 GNU Coding Standards for locations that span file boundaries.
13369 * src/location.h: Do not include <quotearg.h>; no longer needed.
13370 (boundary): New type.
13371 (location_t): Use it. This allows locations to span file boundaries.
13372 All member uses changed: file -> start.file or end.file (as needed),
13373 first_line -> start.line, first_column -> start.column,
13374 last_line -> end.line, last_column -> end.column.
13375 (equal_boundaries): New function.
13376 (LOCATION_RESET, LOCATION_STEP): Remove.
13377 (LOCATION_PRINT): Remove. All callers changed to use location_print.
13378 (empty_location): Now const.
13379 (location_print): New decl.
13380 * src/parse-gram.y (lloc_default): New function, which handles
13381 empty locations more accurately.
13382 (YYLLOC_DEFAULT): Use it.
13383 (%token COLON): Remove.
13384 (%token ID_COLON): New token.
13385 (rules): Use it.
13386 (declarations, rules): Remove trailing semicolon.
13387 (declaration, rules_or_grammar_declaration):
13388 Allow empty (";") declaration.
13389 (symbol_def): Remove empty actions; no longer needed.
13390 (rules_or_grammar_declaration): Remove trailing semicolon.
13391 (semi_colon.opt): Remove.
13392 * src/reader.h: Include location.h.
13393 (scanner_cursor): New decl.
13394 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
13395 rolling our own.
13396 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
13397 of *loc.
13398 (STEP): Remove. No longer needed, now that adjust_location does
13399 the work. All uses removed.
13400 (scanner_cursor): New var.
13401 (adjust_location): Renamed from extend_location. It now sets
13402 *loc and adjusts the scanner cursor. All uses changed.
13403 Don't bother testing for CR.
13404 (handle_syncline): Remove location arg; now updates scanner cursor.
13405 All callers changed.
13406 (unexpected_end_of_file): Now accepts start boundary of token or
13407 comment, not location. All callers changed. Update scanner cursor,
13408 not the location.
13409 (SC_AFTER_IDENTIFIER): New state.
13410 (context_state): Renamed from c_context. All uses changed.
13411 (id_loc, code_start, token_start): New local vars.
13412 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
13413 processing of Yacc white space and equivalents here.
13414 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
13415 instead of returning ID immediately, since we need to search for
13416 a subsequent colon.
13417 (<INITIAL>"'", "\""): Save token_start.
13418 (<INITIAL>"%{", "{", "%%"): Save code_start.
13419 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
13420 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
13421 BEGIN context_state at end, not INITIAL.
13422 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
13423 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
13424 Return correct token start.
13425 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
13426 the start of a character, string or multiline comment is found.
13427 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
13428 Reduction): Adjust reported locations to match the more-precise
13429 results now expected.
13430 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
13431 * tests/reduce.at (Useless Rules, Reduced Automaton,
13432 Underivable Rules): Likewise.
13433 * tests/regression.at (Invalid inputs): No longer `expecting ";"
13434 or "|"' now that so many other tokens are allowed by the new grammar.
13435
13436 * src/complain.h (current_file): Remove duplicate decl;
13437 current_file is now owned by files.h.
13438 * src/complain.c, src/scan-gram.l: Include files.h.
13439
13440 2002-12-06 Paul Eggert <eggert@twinsun.com>
13441
13442 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
13443 promotes to int; it might be unsigned int.
13444 * data/yacc.c (yy_reduce_print): Likewise.
13445
13446 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
13447 be #defined in the prologue, not in the Bison declarations.
13448 This fixes Debian Bug 102878, reported by Shaul Karl.
13449
13450 2002-12-02 Paul Eggert <eggert@twinsun.com>
13451
13452 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
13453 * lib/strtoul.c: New file, from gnulib.
13454 This fixes a porting bug reported by Peter Klein in
13455 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
13456
13457 2002-11-30 Paul Eggert <eggert@twinsun.com>
13458
13459 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
13460 and put only a forward declaration in the prologue. This is for
13461 consistency with the other scanner helper functions.
13462
13463 Type clashes now generate warnings, not errors, since it
13464 appears that POSIX may allow some grammars with type clashes.
13465 * src/reader.c (grammar_current_rule_check): Warn about
13466 type clashes instead of complaining.
13467 * tests/input.at (Type Clashes): Expect warnings, not complaints.
13468
13469 Add Yacc library, since POSIX requires it.
13470 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
13471 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
13472 * lib/main.c, lib/yyerror.c: New files.
13473
13474 gram_error can be static; it need not be extern.
13475 * src/reader.h (gram_error): Remove decl.
13476 * src/parse-gram.y (gram_error): Now static. Add static decl.
13477 (print_token_value): Omit parameter names from forward decl,
13478 for consistency.
13479
13480 2002-11-29 Paul Eggert <eggert@twinsun.com>
13481
13482 * doc/bison.texinfo: Emphasize that yylex and yyerror must
13483 be declared before being used. E.g., one should typically
13484 declare them in the prologue. Use GNU coding style in examples.
13485 Put "const" consistently after the type it modifies. Mention
13486 that C99 supports "inline". Mention that yyerror traditionally
13487 returns "int".
13488
13489 %parse-param and %lex-param now take just one argument, the
13490 declaration; the argument name is deduced from the declaration.
13491
13492 * doc/bison.texinfo (Parser Function, Pure Calling, Error
13493 Reporting, Table of Symbols): Document this.
13494 * src/parse-gram.y (add_param): New function.
13495 (COMMA): Remove.
13496 (declaration): Implement new rule for %parse-param and %lex-param.
13497 * src/scan-gram.l: "," now elicits a warning, rather than being
13498 a token; this is more compatible with byacc.
13499 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
13500
13501 2002-11-27 Paul Eggert <eggert@twinsun.com>
13502
13503 Rename identifiers to avoid real and potential collisions.
13504
13505 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
13506 to avoid collision with lex macro described by Bruce Lilly in
13507 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
13508 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
13509 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
13510 * src/parse-gram.y (print_token_value): Renamed from yyprint.
13511 All uses changed.
13512 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
13513 The name "yycontrol" violates the name space rules, and this stuff
13514 wasn't being used anyway.
13515 (input): Remove action; this stuff wasn't being used.
13516 (gram_error): Rename local variable yylloc -> loc.
13517 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
13518 (YY_DECL): Don't use "yy" at start of local variables.
13519 All uses changed, e.g., yylloc -> loc.
13520 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
13521 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
13522 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
13523 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
13524
13525 * src/parse-gram.y (gram_error): loc is now const *.
13526 * src/reader.h (gram_error): Likewise.
13527
13528 2002-11-24 Paul Eggert <eggert@twinsun.com>
13529
13530 Version 1.75c.
13531
13532 * tests/actions.at (Actions after errors): Use an output format
13533 more similar to that of the Printers and Destructors test.
13534 Test the position of the ';' token too.
13535 (Printers and Destructors): Likewise.
13536 (Printers and Destructors: %glr-parser): Remove for now, to avoid
13537 unnecessarily alarming people when the test fails.
13538
13539 * data/yacc.c (yyerrlab1): Move this label down, so that the
13540 parser does not discard the lookahead token if the user code
13541 invokes YYERROR. This change is required for POSIX conformance.
13542
13543 * lib/error.c: Sync with gnulib.
13544
13545 2002-11-22 Paul Eggert <eggert@twinsun.com>
13546
13547 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
13548 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
13549 * lib/xmalloc.c: Likewise.
13550
13551 2002-11-20 Paul Eggert <eggert@twinsun.com>
13552
13553 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
13554
13555 2002-11-20 Paul Eggert <eggert@twinsun.com>
13556
13557 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
13558 should use `if (! x) abort ();' rather than `assert (x);', and
13559 anyway it's one less thing to worry about configuring.
13560
13561 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
13562 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
13563 and replace all instances of assert with abort.
13564 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
13565 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
13566
13567 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
13568 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
13569 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
13570 hash_find_entry, hash_rehash, hash_insert): Likewise.
13571 * src/conflicts.c (resolve_sr_conflict): Likewise.
13572 * src/lalr.c (set_goto_map, map_goto): Likewise.
13573 * src/nullable.c (nullable_compute): Likewise.
13574 * src/output.c (prepare_rules, token_definitions_output): Likewise.
13575 * src/reader.c (packgram, reader): Likewise.
13576 * src/state.c (state_new, state_free, state_transitions_set,
13577 state_reduction_find): Likewise.
13578 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
13579 symbol_pack): Likewise.
13580 * src/tables.c (conflict_row, pack_vector): Likewise.
13581 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
13582 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
13583 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
13584 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
13585
13586 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
13587 (ARGMATCH_CONSTRAINT): New macro.
13588 (ARGMATCH_ASSERT): Use it.
13589
13590 * src/system.h (verify): New macro.
13591 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
13592 rather than assert.
13593 * src/tables.c (tables_generate): Likewise.
13594
13595 * src/struniq.c (struniq_assert): Now returns void, and aborts
13596 if the assertion is false.
13597 (struniq_assert_p): Remove.
13598 * src/struniq.h: Likewise.
13599
13600 2002-11-18 Paul Eggert <eggert@twinsun.com>
13601
13602 * data/glr.c (yygetLRActions): Replace `yyindex' with
13603 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
13604 This fixes the regression with Sun ONE Studio 7 cc that I reported in
13605 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
13606
13607 2002-11-18 Akim Demaille <akim@epita.fr>
13608
13609 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
13610 space.
13611 From Tim Van Holder.
13612
13613 2002-11-17 Paul Eggert <eggert@twinsun.com>
13614
13615 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
13616 to "SyntaxError" for consistency with my 2002-11-15 change.
13617
13618 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
13619 not define to {}, since this breaks the common use of `YYDPRINTF
13620 ((...));' if a single statement is desired (e.g. before `else').
13621 Work around GCC warnings by surrounding corresponding calls with
13622 {} if needed.
13623 (yyhasResolvedValue): Remove unused function.
13624 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
13625 loop body.
13626 (yyreportSyntaxError): Renamed from yyreportParseError.
13627 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
13628 All uses changed.
13629 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
13630 extern when possible. Remove unused initializations.
13631
13632 2002-11-16 Akim Demaille <akim@epita.fr>
13633
13634 Augment the similarity between GLR and LALR traces.
13635
13636 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
13637 (YY_REDUCE_PRINT): New.
13638 (yyparse): Use them.
13639 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
13640 YYDPRINT here.
13641 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
13642 state reached after the reduction/recovery, since...
13643 (yyparse, yyprocessOneStack): Report the state we are entering in.
13644
13645 2002-11-16 Akim Demaille <akim@epita.fr>
13646
13647 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
13648 Add support for --trace=skeleton.
13649 * src/scan-skel.l: %option debug.
13650 Scan strings of non-@ or \n instead of character by character.
13651 (scan_skel): Handle trace_skeleton.
13652 (QPUTS): New.
13653 (@output_parser_name@, @output_header_name@): ``Restore'' their
13654 support (used to be M4 macros).
13655 * data/yacc.c: Quote larger chunks, a la glr.c.
13656 * data/lalr1.cc: Likewise.
13657 The header guards are no longer available, so use some other
13658 string than `YYLSP_NEEDED'.
13659
13660 2002-11-16 Akim Demaille <akim@epita.fr>
13661
13662 Make the ``Printers and Destructors'' test more verbose, taking
13663 `yacc.c''s behavior as (possibly wrong) reference.
13664
13665 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
13666 instead of fprint on stdout.
13667 Set and report the last_line of the symbols.
13668 Consistently display values and locations.
13669
13670 2002-11-16 Paul Eggert <eggert@twinsun.com>
13671
13672 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
13673
13674 2002-11-15 Paul Eggert <eggert@twinsun.com>
13675
13676 * tests/actions.at (Actions after errors): New test case.
13677
13678 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
13679 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
13680 tests/action.at, tests/calc.at, tests/conflicts.at,
13681 tests/cxx-type.at, tests/regression.at:
13682 "parse error" -> "syntax error" for POSIX compatibility.
13683 "parsing stack overflow..." -> "parser stack overflow" so
13684 that code matches Bison documentation.
13685
13686 2002-11-15 Akim Demaille <akim@epita.fr>
13687
13688 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
13689 take two BRACED_CODE, not two string_content.
13690 Free the scanner's obstack when we are done.
13691 (code_content): New.
13692 * tests/calc.at: Adjust.
13693 * doc/bison.texinfo: Adjust.
13694 Also, make sure to include the `,' for these declarations.
13695
13696 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
13697
13698 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
13699 definition; avoids potential autoreconf problems.
13700
13701 2002-11-15 Akim Demaille <akim@epita.fr>
13702
13703 Always check the value returned by yyparse.
13704
13705 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
13706 returned by yyparse.
13707 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
13708 Adjust calls.
13709 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
13710 returned by yyparse.
13711
13712 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13713
13714 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
13715 on input.at test.
13716
13717 2002-11-14 Paul Eggert <eggert@twinsun.com>
13718
13719 * src/output.c (output_skeleton): Call xfopen instead of
13720 duplicating xfopen's body.
13721
13722 Fix bugs reported by Nelson H. F. Beebe in
13723 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
13724
13725 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
13726 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
13727 Group compiler. Instead, use "$CC -E bar.c". Include the .h
13728 file twice in the grammar, as an extra check.
13729
13730 * tests/input.at (Torturing the Scanner): Surround the
13731 backslash-newline tests with "#if 0", to make it less likely that
13732 we'll run into compiler bugs. Bring back solitary \ inside
13733 comment, but add a closing comment to work around HP C bug. Don't
13734 test backslash-newline in C character constant.
13735
13736 2002-11-14 Akim Demaille <akim@epita.fr>
13737
13738 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
13739 status of the compiler.
13740 Calling `exit 1' is no longer needed.
13741 Reported by Nelson H. F. Beebe.
13742
13743 2002-11-14 Akim Demaille <akim@epita.fr>
13744
13745 * tests/atlocal.in (CPPFLAGS): We have config.h.
13746 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
13747 New.
13748 * tests/actions.at, tests/calc.at, tests/conflicts.at,
13749 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
13750 * tests/regression.at, tests/torture.at: Use them for all the
13751 grammars that are to be compiled.
13752 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
13753 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
13754 * doc/bison.texinfo (GLR Parsers): Document `inline'.
13755
13756 2002-11-14 Akim Demaille <akim@epita.fr>
13757
13758 * doc/bison.texinfo: Various formatting changes (alignments in
13759 samples, additional @group/@end group, GCS in samples.
13760 Use @deffn instead of simple @table to define the directives,
13761 macros, variables etc.
13762
13763 2002-11-13 Paul Eggert <eggert@twinsun.com>
13764
13765 Fix some bugs reported by Albert Chin-A-Young in
13766 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
13767
13768 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
13769 -o c"; the HP C compiler chatters during compilation.
13770 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
13771 * tests/headers.at (export YYLTYPE): Likewise.
13772
13773 * tests/input.at (Torturing the Scanner): Remove lines containing
13774 solitary backslashes, as they tickle a bug in the HP C compiler.
13775
13776 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
13777 comments, since they're not portable. Use GNU coding style.
13778
13779 2002-11-13 Akim Demaille <akim@epita.fr>
13780
13781 * data/yacc.c: Leave bigger chunks of quoted text.
13782 (YYDSYMPRINTF): New.
13783 Use it to report symbol activities.
13784 * data/glr.c (YYDSYMPRINTF): New.
13785 Use it.
13786
13787 2002-11-12 Paul Eggert <eggert@twinsun.com>
13788
13789 Version 1.75b.
13790
13791 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
13792 (yyglrReduce): Return yyok, not 0.
13793 This should avoid the enumerated-type warnings reported
13794 by Nelson H. F. Beebe in
13795 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
13796
13797 * lib/bbitset.h (BITSET_INLINE): Remove.
13798 * lib/bitset.h [! BITSET_INLINE]: Remove.
13799 (bitset_set, bitset_reset, bitset_test): Rename local vars
13800 to avoid shadowing warnings by GCC.
13801
13802 * data/glr.c (inline): Remove #define. It's the user's
13803 responsibility to #define it away, just like 'const'.
13804 This fixes one of the bugs reported by Nelson H. F. Beebe in
13805 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
13806
13807 * Makefile.maint (po-check): Scan .l and .y files instead of the
13808 .c and the .h files that they generate. This fixes the bug
13809 reported by Tim Van Holder in:
13810 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
13811 Look for N_ as well as for _. Try to avoid matching #define for
13812 N_ and _.
13813 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
13814 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
13815 * src/scan-gram.l: Revamp regular expressions so that " and '
13816 do not confuse xgettext.
13817
13818 * src/struniq.h (struniq_new): Do not declare the return type
13819 to be 'const'; this violates the C standard.
13820 * src/struniq.c (struniq_new): Likewise.
13821
13822 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
13823
13824 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
13825 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
13826 linker.
13827
13828 2002-11-12 Akim Demaille <akim@epita.fr>
13829
13830 * Makefile.maint: Sync with Autoconf:
13831 (local_updates): New.
13832
13833 2002-11-12 Akim Demaille <akim@epita.fr>
13834
13835 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
13836
13837 2002-11-12 Akim Demaille <akim@epita.fr>
13838
13839 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
13840 locations.
13841
13842 2002-11-12 Akim Demaille <akim@epita.fr>
13843
13844 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
13845 not yyvalue.
13846
13847 2002-11-12 Akim Demaille <akim@epita.fr>
13848
13849 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
13850 Use it to test the GLR parser.
13851
13852 2002-11-12 Akim Demaille <akim@epita.fr>
13853
13854 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
13855 defines it.
13856 * data/glr.c (yystos): New.
13857 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
13858 (YYDSYMPRINT): New.
13859 (yyval): Don't define it, it is handled via M4.
13860 (yyrecoverParseError): Free verbosely the discarded symbols.
13861 * data/yacc.c (yysymprint): Remove, rather...
13862 (b4_yysymprint_generate): invoke.
13863 * data/c.m4 (b4_yysymprint_generate): New.
13864 Accept pointers as arguments, as opposed to the version from
13865 yacc.c.
13866 (b4_yydestruct_generate): Likewise.
13867 * tests/cations.at (Printers and Destructors): Use Bison directives
13868 instead of CPP macros.
13869 Don't rely on internal details.
13870
13871 2002-11-12 Akim Demaille <akim@epita.fr>
13872
13873 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
13874 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
13875 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
13876 it against YYEMPTY and so forth), work on yytoken (i.e., set
13877 it to YYEMPTY etc.).
13878 (yydestruct): Replace with a b4_yydestruct_generate invocation.
13879 (b4_symbol_actions): Remove.
13880 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
13881 for 0, end-of-input.
13882
13883 2002-11-12 Akim Demaille <akim@epita.fr>
13884
13885 * doc/bison.texinfo (Destructor Decl): New.
13886
13887 2002-11-12 Akim Demaille <akim@epita.fr>
13888
13889 * src/tables.c (tables_generate): Use free for pointers that
13890 cannot be NULL, not XFREE.
13891 (pack_vector): Use assert, not fatal, for bound violations.
13892 * src/state.c (state_new): Likewise.
13893 * src/reader.c (reader): Likewise.
13894 * src/lalr.c (set_goto_map): Likewise.
13895 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
13896 the file name.
13897
13898 2002-11-12 Akim Demaille <akim@epita.fr>
13899
13900 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
13901 Restore.
13902 * src/scan-gram.l (last_string): Is global to the file, not to
13903 yylex.
13904 * src/parse-gram.y (input): Don't append the epilogue here,
13905 (epilogue.opt): do it here, and free the scanner's obstack.
13906 * src/reader.c (epilogue_set): Rename as...
13907 (epilogue_augment): this.
13908 * data/c.m4 (b4_epilogue): Defaults to empty.
13909
13910 2002-11-12 Akim Demaille <akim@epita.fr>
13911
13912 * src/getargs.c (long_options): Remove duplicates.
13913 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
13914 Remove.
13915 * doc/bison.rnh: Remove.
13916 * doc/bison.texinfo (VMS Invocation): Remove.
13917
13918 2002-11-12 Akim Demaille <akim@epita.fr>
13919
13920 * src/struniq.h, src/struniq.c (struniq_t): Is const.
13921 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
13922
13923 Use struniq for symbols.
13924
13925 * src/symtab.h (symbol_t): The tag member is a struniq.
13926 (symbol_type_set): Adjust.
13927 * src/symtab.c (symbol_new): Takes a struniq.
13928 (symbol_free): Don't free the tag member.
13929 (hash_compare_symbol_t, hash_symbol_t): Rename as...
13930 (hash_compare_symbol, hash_symbol): these.
13931 Use the fact that tags as struniqs.
13932 (symbol_get): Use struniq_new.
13933 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
13934 Returns a strniq.
13935 * src/reader.h (merger_list, grammar_currentmerge_set): The name
13936 and type members are struniqs.
13937 * src/reader.c (get_merge_function)
13938 (grammar_current_rule_merge_set): Adjust.
13939 (TYPE, current_type): Are struniq.
13940
13941 Use struniq for file names.
13942
13943 * src/files.h, src/files.c (infile): Split into...
13944 (grammar_file, current_file): these.
13945 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
13946 * src/reduce.c (reduce_print): Likewise.
13947 * src/getargs.c (getargs): Likewise.
13948 * src/complain.h, src/complain.c: Likewise.
13949 * src/main.c (main): Call struniqs_new early enough to use it for
13950 file names.
13951 Don't free the input file name.
13952
13953 2002-11-12 Akim Demaille <akim@epita.fr>
13954
13955 * src/symtab.c (symbol_free): Remove dead deactivated code:
13956 type_name are properly removed.
13957 Don't use XFREE to free items that cannot be NULL.
13958 * src/struniq.h, src/struniq.c: New.
13959 * src/main.c (main): Initialize/free struniqs.
13960 * src/parse-gram.y (%union): Add astruniq member.
13961 (yyprint): Adjust.
13962 * src/scan-gram.l (<{tag}>): Return a struniq.
13963 Free the obstack bit that used to store it.
13964 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
13965
13966 2002-11-11 Paul Eggert <eggert@twinsun.com>
13967
13968 Revamp to fix many (but not all) of the C- and M4-related quoting
13969 problems. Among other things, this fixes the Bison bug reported
13970 by Jan Hubicka when processing the Bash grammar; see:
13971 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
13972
13973 Use new @ escapes consistently. Represent brackets with @{ and @}
13974 rather than @<:@ and @:>@, since this works a bit better with dumb
13975 editors like vi. Represent @ with @@, since @ is now consistently
13976 an escape. Use @oline@ and @ofile@ rather than __oline__ and
13977 __ofile__, to avoid unexpected expansions. Similarly, use @output
13978 rather than #output.
13979
13980 * data/c.m4 (b4_copyright): Omit file name from comment, since
13981 the file name could contain "*/".
13982 (b4_synclines_flag): Don't quote the 2nd argument; it should already
13983 be quoted. All uses changed.
13984
13985 * data/glr.c: Use new @ escapes consistently.
13986 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
13987 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
13988 Remove, since they couldn't handle arbitrary characters in file
13989 names.
13990 * data/lalr1.cc: Likewise.
13991 * data/yacc.c: Likewise.
13992
13993 * src/files.c (output_infix): Remove; all uses removed.
13994 * src/files.h: Likewise.
13995
13996 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
13997 mishandled funny characters in file names, and anyway it isn't
13998 needed any more.
13999 * data/yacc.c: Likewise.
14000 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
14001
14002 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
14003 * data/yacc.c: Likewise.
14004
14005 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
14006 strings now.
14007 (muscle_init): Quote filename as a C string.
14008 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
14009 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
14010 * src/output.c (escaped_file_name_output): New function.
14011 (prepare_symbols): Quote tokens for M4.
14012 (prepare): Don't insert output_infix, output_prefix,
14013 output_parser_name, output_header_name; this is now down by scan-skel.
14014 Insert skeleton as a C string.
14015
14016 * src/output.c (user_actions_output, symbol_destructors_output,
14017 symbol_printers_output): Quote filenames for C and M4.
14018 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14019
14020 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
14021 escapes other than \\ and \'; this simplifies the code.
14022 (<SC_STRING>): Likewise, for \\ and \".
14023 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
14024 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
14025 Use new escapes @{ and @} for [ and ].
14026
14027 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
14028 them with auto vars.
14029 Switch to new escape scheme, where @ is the escape character uniformly.
14030 Abort if a stray escape character is found. Avoid unbounded input
14031 buffer when parsing non-escaped text.
14032
14033 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
14034 __oline__, #output, $@, and @{ do not have unintended meanings.
14035
14036 2002-11-09 Paul Eggert <eggert@twinsun.com>
14037
14038 Fix the test failure due to GCC warnings described in
14039 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
14040 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
14041 evaluate to 0 if it's impossible for NINF to be in the respective
14042 table.
14043 (yygetLRActions, yyrecoverParseError): Use them.
14044
14045 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
14046 counted in the token inserted at end of file. Now takes
14047 location_t *, not location_t, so that the location can be
14048 adjusted. All uses changed.
14049
14050 * tests/regression.at (Invalid inputs): Adjust wording in
14051 diagnostic to match the new behavior.
14052
14053 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
14054 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
14055 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
14056 abort ();'. This reduces the runtime of the "Many lookaheads"
14057 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
14058 GCC 3.2.
14059
14060 2002-11-07 Paul Eggert <eggert@twinsun.com>
14061
14062 * src/parse-gram.y (CHARACTER): Remove unused token.
14063 All uses removed.
14064
14065 * src/scan-gram.l: Remove stack option. We no longer use the
14066 stack, since the stack was never deeper than 1; instead, use the
14067 new auto var c_context to record the stacked value.
14068
14069 Remove nounput option. At an unexpected end of file, we now unput
14070 the minimal input necessary to end cleanly; this simplifies the
14071 code.
14072
14073 Avoid unbounded token sizes where this is easy.
14074
14075 (unexpected_end_of_file): New function.
14076 Use it to systematize the error message on unexpected EOF.
14077 (last-string): Now auto, not static.
14078 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
14079 (scanner_last_string_free): Remove; not used.
14080 (percent_percent_count): Move decl to just before use.
14081 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
14082 not the (never otherwised-used) CHARACTER.
14083
14084 2002-11-07 Akim Demaille <akim@epita.fr>
14085
14086 Let yyerror always receive the msg as last argument, so that
14087 yyerror can be variadic.
14088
14089 * data/yacc.c (b4_yyerror_args): New.
14090 Use it when calling yyerror.
14091 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
14092 Use it when calling yyerror.
14093 * doc/bison.texinfo (Error Reporting): Adjust.
14094 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
14095 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
14096
14097 2002-11-06 Akim Demaille <akim@epita.fr>
14098
14099 #line should have quoted strings.
14100 Ideally, this should be done by m4_quotearg.
14101
14102 * src/scan-skel.l: Include quotearg.h.
14103 Quote __ofile__.
14104 * src/output.c (symbol_printers_output)
14105 (symbol_destructors_output): Quote the file name.
14106
14107 2002-11-06 Akim Demaille <akim@epita.fr>
14108
14109 * tests/regression.at (Invalid inputs): Adjust to the recent
14110 messages.
14111
14112 2002-11-06 Akim Demaille <akim@epita.fr>
14113
14114 Restore --no-lines.
14115 Reported by Jim Kent.
14116
14117 * data/c.m4 (b4_syncline): New.
14118 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
14119 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
14120 * src/output.c (user_actions_output): Likewise.
14121 (prepare): Define 'b4_synclines_flag'.
14122 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
14123
14124 2002-11-06 Akim Demaille <akim@epita.fr>
14125
14126 * src/main.c (main): Free `infile'.
14127 * src/scan-gram.l (handle_syncline): New.
14128 Recognize `#line'.
14129 * src/output.c (user_actions_output, symbol_destructors_output)
14130 (symbol_printers_output): Use the location's file name, not
14131 infile.
14132 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14133
14134 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14135
14136 * src/tables.c (matching_state): Don't allow states to match if
14137 either has GLR conflict entries.
14138
14139 2002-11-05 Paul Eggert <eggert@twinsun.com>
14140
14141 * src/scan-gram.l: Use more accurate diagnostics, e.g.
14142 "integer out of range" rather than "invalid value".
14143 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
14144 accordingly.
14145
14146 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
14147 Also, remove one static variable in the scanner.
14148
14149 * src/scan-gram.l (braces_level): Now auto, not static.
14150 Initialize to zero if the compiler is being picky.
14151 (INITIAL): Clear braces_level instead of incrementing it.
14152 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
14153 as POSIX 1003.1-2001 requires.
14154 * src/system.h (IF_LINT): New macro, taken from coreutils.
14155 * configure.ac: Define "lint" if --enable-gcc-warnings.
14156
14157 2002-11-05 Akim Demaille <akim@epita.fr>
14158
14159 * src/scan-gram.l: When it starts with `%', complain about the
14160 whole directive, not just that `invalid character: %'.
14161
14162 2002-11-04 Akim Demaille <akim@epita.fr>
14163
14164 * Makefile.maint: Update from Autoconf.
14165 (update, cvs-update, po-update, do-po-update): New.
14166
14167 2002-11-04 Akim Demaille <akim@epita.fr>
14168
14169 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
14170 and yyerror.
14171 Have yyerror `use' its arguments.
14172 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
14173 returns true when location & yacc & pure & parse-param.
14174 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
14175
14176 2002-11-04 Akim Demaille <akim@epita.fr>
14177
14178 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
14179 clashes.
14180 * src/scan-gram.l: Use [\'] instead of ['] to pacify
14181 font-lock-mode.
14182 Use complain_at.
14183 Use quote, not quote_n since LOCATION_PRINT no longer uses the
14184 slot 0.
14185
14186 2002-11-03 Paul Eggert <eggert@twinsun.com>
14187
14188 * src/reader.c (get_merge_function, grammar_current_rule_check):
14189 Use consistent diagnostics for reporting type name clashes.
14190 Quote the types with <>, for consistency with Yacc.
14191 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
14192
14193 2002-11-03 Akim Demaille <akim@epita.fr>
14194
14195 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
14196 New.
14197 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
14198 (b4_parse_param): Remove.
14199 Use b4_identification.
14200 Propagate b4_pure_args where needed to pass them to yyerror.
14201 * data/glr.m4 (b4_parse_param): Remove.
14202 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
14203 (b4_lpure_formals): New.
14204 Use b4_identification.
14205 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
14206 b4_user_formals and b4_user_args.
14207 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
14208 (yyreportAmbiguity): When using a pure parser, also need
14209 the location, and the parse-params.
14210 Adjust callers.
14211 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
14212 When using a pure parser, also need the parse-params.
14213 Adjust callers.
14214 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
14215 (%pure-parser + %parse-param) LALR and GLR parsers.
14216 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
14217 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
14218 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
14219 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
14220 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
14221 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
14222 * doc/bison.texinfo: Untabify the whole file.
14223 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
14224 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
14225 (Error Reporting): Adjust to these new directives.
14226 Document %error-verbose, deprecate YYERROR_VERBOSE.
14227
14228 2002-11-03 Akim Demaille <akim@epita.fr>
14229
14230 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
14231 AT_CHECK_CALC_GLR invocations to use % directives, instead of
14232 command line options.
14233 * tests/cxx-type.at: Formatting changes.
14234
14235 2002-11-03 Paul Eggert <eggert@twinsun.com>
14236
14237 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
14238 to count columns correctly, and to check for invalid inputs.
14239
14240 Use mbsnwidth to count columns correctly. Account for tabs, too.
14241 Include mbswidth.h.
14242 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
14243 (extend_location): New function.
14244 (YY_LINES): Remove.
14245
14246 Handle CRLF in C code rather than in Lex code.
14247 (YY_INPUT): New macro.
14248 (no_cr_read): New function.
14249
14250 Scan UCNs, even though we don't fully handle them yet.
14251 (convert_ucn_to_byte): New function.
14252
14253 Handle backslash-newline correctly in C code.
14254 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
14255 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
14256 all uses changed.
14257 (tag, splice): New EREs. Do not allow NUL or newline in tags.
14258 Use {splice} wherever C allows backslash-newline.
14259 YY_STEP after space, newline, vertical-tab.
14260 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
14261
14262 (letter, id): Don't assume ASCII; e.g., spell out a-z.
14263
14264 ({int}, handle_action_dollar, handle_action_at): Check for integer
14265 overflow.
14266
14267 (YY_STEP): Omit trailing semicolon, so that it's more like C.
14268
14269 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
14270 as well as \000. Check for UCHAR_MAX, not 255.
14271 Allow \x with an arbitrary positive number of digits, as in C.
14272 Check for overflow here.
14273 Allow \? and UCNs, for compatibility with C.
14274
14275 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
14276 with quote slot used by complain_at.
14277
14278 * tests/input.at: Add tests for backslash-newline, m4 quotes
14279 in symbols, long literals, and funny escapes in strings.
14280
14281 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
14282 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
14283 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
14284 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
14285 * m4/mbswidth.m4: New file, from GNU coreutils.
14286
14287 * doc/bison.texinfo (Grammar Outline): Document // comments.
14288 (Symbols): Document that trigraphs have no special meaning in Bison,
14289 nor is backslash-newline allowed.
14290 (Actions): Document that trigraphs have no special meaning.
14291
14292 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
14293 no longer used.
14294
14295 2002-11-02 Paul Eggert <eggert@twinsun.com>
14296
14297 * src/reader.c: Don't include quote.h; not needed.
14298 (get_merge_function): Reword warning to be consistent with
14299 type clash diagnostic in grammar_current_rule_check.
14300
14301 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
14302 bug in trigraph handling.
14303
14304 * src/output.c (prepare_symbols): When printing token names,
14305 escape "[" as "@<:@" and likewise for "]".
14306
14307 * src/system.h (errno): Remove declaration, as we are now
14308 assuming C89 or better, and C89 guarantees errno.
14309
14310 2002-10-30 Paul Eggert <eggert@twinsun.com>
14311
14312 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
14313 Check for close failures.
14314 * src/files.h (xfclose): Return void, not int, since it always
14315 returned zero.
14316 * src/files.c (xfclose): Likewise. Report I/O error if ferror
14317 indicates one.
14318 * src/output.c (output_skeleton): Use xfclose rather than fclose
14319 and ferror. xfclose now checks ferror.
14320
14321 * data/glr.c (YYLEFTMOST_STATE): Remove.
14322 (yyreportTree): Use a stack-based leftmost state. This avoids
14323 our continuing battles with bogus warnings about initializers.
14324
14325 2002-10-30 Akim Demaille <akim@epita.fr>
14326
14327 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
14328 #if.
14329
14330 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14331
14332 * tests/glr-regr1.at: New test for reported regressions.
14333 * tests/testsuite.at: Add glr-regr1.at test.
14334 * tests/Makefile.am: Add glr-regr1.at test.
14335
14336 2002-10-24 Paul Eggert <eggert@twinsun.com>
14337
14338 Version 1.75a.
14339
14340 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
14341 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
14342 we use malloc. Don't assume 'A' through 'Z' are contiguous.
14343 Don't assume strdup exists; POSIX says its an XSI extension.
14344 Check for buffer overflow on input.
14345
14346 2002-10-24 Akim Demaille <akim@epita.fr>
14347
14348 * src/output.c (output_skeleton): Don't disable M4sugar comments
14349 too soon: it results in comments being expanded.
14350 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
14351 first output.
14352
14353 2002-10-24 Akim Demaille <akim@epita.fr>
14354
14355 * data/yacc.c (m4_int_type): New.
14356 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
14357 char' as only yacc.c wants K&R portability.
14358 * data/glr.c (yysigned_char): Remove.
14359 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
14360 Reported by Quoc Peyrot.
14361
14362 2002-10-23 Paul Eggert <eggert@twinsun.com>
14363
14364 * src/main.c (main): With --trace=time, report times even if a
14365 non-fatal error occurs. Formerly, the times were reported in some
14366 such cases but not in others.
14367 * src/reader.c (reader): Just return if a complaint has been issued,
14368 instead of exiting, so that 'main' can report times.
14369
14370 2002-10-22 Akim Demaille <akim@epita.fr>
14371
14372 * src/system.h: Include sys/types.
14373 Reported by Bert Deknuydt.
14374
14375 2002-10-23 Paul Eggert <eggert@twinsun.com>
14376
14377 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
14378 Suggested by Art Haas.
14379
14380 2002-10-22 Paul Eggert <eggert@twinsun.com>
14381
14382 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
14383 decl; not needed any more.
14384 * src/main.c (main): Use return to exit, undoing yesterday's change.
14385 The last OS that we could find where this wouldn't work is
14386 SunOS 3.5, and that's too old to worry about now.
14387
14388 * data/glr.c (struct yyltype): Define members even when not
14389 doing locations. This is more consistent with yacc.c, and it
14390 works around the following bug reports:
14391 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
14392 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
14393
14394 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
14395 @acronym consistently. Standardize on "Yacc" instead of "YACC",
14396 "Algol" instead of "ALGOL". Give a bit more history about BNF.
14397
14398 2002-10-22 Akim Demaille <akim@epita.fr>
14399
14400 * data/README: New.
14401
14402 2002-10-21 Paul Eggert <eggert@twinsun.com>
14403
14404 Be consistent about 'bool'; the old code used an enum in one
14405 module and an int in another, and this violates the C standard.
14406 * m4/stdbool.m4: New file, from coreutils 4.5.3.
14407 * configure.ac (AC_HEADER_STDBOOL): Add.
14408 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
14409 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
14410 * src/symtab.c (hash_compare_symbol_t): Likewise.
14411 * src/system.h (bool, false, true): Use a definition consistent
14412 with ../lib/hash.c. All uses changed.
14413
14414 * src/complain.c (warning_issued): Renamed from warn_message_count,
14415 so that we needn't worry about integer overflow (!).
14416 Now of type bool. All uses changed.
14417 (complaint_issued): Renamed from complain_message_count; likewise.
14418
14419 * src/main.c (main): Use exit to exit with failure.
14420
14421 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
14422 rather than 1 and 0.
14423 * src/main.c (main): Likewise.
14424 * src/getargs.c (getargs): Likewise.
14425 * src/reader.c (reader): Likewise.
14426
14427 * src/getarg.c (getargs): Remove duplicate code for
14428 "Try `bison --help'".
14429
14430 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
14431 What was that "2" for?
14432
14433 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
14434 * src/getargs.c (usage): Likewise.
14435
14436 * src/getargs.c (getargs): When there are too few operands, report
14437 the last one. When there are too many, report the first extra
14438 one. This is how diffutils does it.
14439
14440 2002-10-20 Paul Eggert <eggert@twinsun.com>
14441
14442 Remove K&R vestiges.
14443 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
14444 * src/complain.c (VA_START): Remove. Assume prototypes.
14445 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
14446 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
14447 fatal): Assume prototypes.
14448 * src/complain.h: Assume prototypes.
14449 * src/system.h (PARAMS): Remove.
14450 Include <limits.h> unconditionally, since it's guaranteeed even
14451 for a freestanding C89 compiler.
14452 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
14453 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
14454
14455 2002-10-20 Akim Demaille <akim@epita.fr>
14456
14457 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
14458 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
14459 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
14460 (yyresolveStates, yyresolveAction, yyresolveStack)
14461 (yyprocessOneStack): Use them.
14462 (yy_reduce_print): New.
14463 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
14464
14465 2002-10-20 Akim Demaille <akim@epita.fr>
14466
14467 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
14468 arguments and output `void'.
14469 (b4_c_function): Rename as...
14470 (b4_c_function_def): this.
14471 (b4_c_function_decl, b4_c_ansi_function_def)
14472 (b4_c_ansi_function_decl): New.
14473 Change the interpretation of the arguments: before `int, foo', now
14474 `int foo, foo'.
14475 * data/yacc.c (yyparse): Prototype and define thanks to these.
14476 Adjust b4_c_function_def uses.
14477 * data/glr.c (yyparse): Likewise, but ANSI only.
14478
14479 2002-10-20 Akim Demaille <akim@epita.fr>
14480
14481 * src/output.c (prepare): Move the definition of `tokens_number',
14482 `nterms_number', `undef_token_number', `user_token_number_max'
14483 to...
14484 (prepare_tokens): Here.
14485 (prepare_tokens): Rename as...
14486 (prepare_symbols): this.
14487 (prepare): Move the definition of `rules_number' to...
14488 (prepare_rules): here.
14489 (prepare): Move the definition of `last', `final_state_number',
14490 `states_number' to...
14491 (prepare_states): here.
14492 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
14493
14494 2002-10-20 Akim Demaille <akim@epita.fr>
14495
14496 * src/tables.h, src/tables.c, src/output.c: Comment changes.
14497
14498 2002-10-20 Akim Demaille <akim@epita.fr>
14499
14500 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
14501 * data/c.m4: here.
14502
14503 2002-10-20 Akim Demaille <akim@epita.fr>
14504
14505 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
14506 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
14507 `pair'.
14508 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
14509 `name' to...
14510 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
14511 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
14512 These.
14513
14514 2002-10-19 Paul Eggert <eggert@twinsun.com>
14515
14516 Do not create a temporary file, as that involves security and
14517 cleanup headaches. Instead, use a pair of pipes.
14518 Derived from a suggestion by Florian Krohm.
14519 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
14520 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
14521 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
14522 (BISON_PREREQ_SUBPIPE): Add.
14523 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
14524 Add subpipe.h, subpipe.c.
14525 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
14526 * po/POTFILES.in: Add lib/subpipe.c.
14527 * src/output.c: Include "subpipe.h".
14528 (m4_invoke): Remove decl.
14529 (scan_skel): New decl.
14530 (output_skeleton): Use pipe rather than temporary file for m4 input.
14531 Check that m4sugar.m4 is readable, to avoid deadlock.
14532 Check for pipe I/O error.
14533 * src/scan-skel.l (readpipe): Remove decl.
14534 (scan_skel): New function, to be used in place of m4_invoke.
14535 Read from stream rather than file.
14536
14537 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
14538 float, as this generates a warning on Solaris 8 + GCC 3.2 with
14539 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
14540 this generates a more-accurate value anyway.
14541
14542 * lib/timevar.c (timervar_accumulate): Rename locals to
14543 avoid confusion with similarly-named more-global.
14544 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
14545
14546 * src/output.c (prepare): Use xstrdup to convert char const *
14547 to char *, to avoid GCC warning.
14548
14549 2002-10-19 Akim Demaille <akim@epita.fr>
14550
14551 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
14552 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
14553 Use them to have `calc.y' ready for %pure-parser.
14554 * data/yacc.c (YYLEX): Pass a yylex return type to
14555 b4_c_function_call.
14556
14557 2002-10-19 Akim Demaille <akim@epita.fr>
14558
14559 Prototype support of %lex-param and %parse-param.
14560
14561 * src/parse-gram.y: Add the definition of the %lex-param and
14562 %parse-param tokens, plus their rules.
14563 Drop the `_' version of %glr-parser.
14564 Add the "," token.
14565 * src/scan-gram.l (INITIAL): Scan them.
14566 * src/muscle_tab.c: Comment changes.
14567 (muscle_insert, muscle_find): Rename `pair' as `probe'.
14568 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
14569 (muscle_entry_s): The `value' member is no longer const.
14570 Adjust all dependencies.
14571 * src/muscle_tab.c (muscle_init): Adjust: use
14572 MUSCLE_INSERT_STRING.
14573 Initialize the obstack earlier.
14574 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
14575 (muscle_pair_list_grow): New.
14576 * data/c.m4 (b4_c_function_call, b4_c_args): New.
14577 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
14578 * tests/calc.at: Use %locations, not --locations.
14579 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
14580
14581 2002-10-19 Akim Demaille <akim@epita.fr>
14582
14583 * src/getargs.c (usage): Take status as argument and exit
14584 accordingly.
14585 Report the traditional `Try ... --help' message when status != 0.
14586 (usage, version): Don't take a FILE * as arg, it is pointless.
14587 (getargs): When there is an incorrect number of arguments, make it
14588 an error, and report it GNUlically thanks to `usage ()'.
14589
14590 2002-10-18 Paul Eggert <eggert@twinsun.com>
14591
14592 * data/glr.c (yyreportParseError): Don't assume that sprintf
14593 yields the length of the printed string, as this is not true
14594 on SunOS 4.1.4. Reported by Peter Klein.
14595
14596 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
14597 * tests/conflicts.at (%nonassoc and eof): Likewise.
14598 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
14599
14600 2002-10-17 Akim Demaille <akim@epita.fr>
14601
14602 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
14603 * src/getargs.c (trace_types, trace_args): Adjust.
14604 * src/reader.c (grammar_current_rule_prec_set)
14605 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
14606 Standardize error messages.
14607 And s/@prec/%prec/!
14608 (reader): Use trace_flag to enable scanner/parser debugging,
14609 instead of an adhoc scheme.
14610 * src/scan-gram.l: Remove trailing debugging code.
14611
14612 2002-10-16 Paul Eggert <eggert@twinsun.com>
14613
14614 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
14615 MUSCLE_TAB_H.
14616
14617 * NEWS: Officially drop support for building Bison with K&R C,
14618 since it didn't work anyway and it's not worth worrying about.
14619 * Makefile.maint (wget_files): Remove ansi2knr.c.
14620 (ansi2knr.c-url_prefix): Remove.
14621 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
14622 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14623 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14624
14625 2002-10-15 Paul Eggert <eggert@twinsun.com>
14626
14627 Stop using the "enum_" trick for K&R-style function definitions;
14628 it confused me, and I was the author! Instead, assume that people
14629 who want to use K&R C compilers (when using these modules in GCC,
14630 perhaps?) will run ansi2knr.
14631
14632 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
14633 All uses of "enum_" changed to "enum ".
14634 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
14635 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
14636
14637 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
14638 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
14639 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
14640 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
14641 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
14642 abitset_not, abitset_ones, abitset_or, abitset_or_and,
14643 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
14644 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
14645 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
14646 Use function prototypes; this removes the need for declaring
14647 static functions simply to provide their prototypes.
14648 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
14649 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
14650 bitset_count_, bitset_create, bitset_dump, bitset_first,
14651 bitset_free, bitset_init, bitset_last, bitset_next,
14652 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
14653 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
14654 bitset_print, bitset_release_memory, bitset_toggle_,
14655 bitset_type_choose, bitset_type_get, bitset_type_name_get,
14656 debug_bitset): Likewise.
14657 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
14658 * lib/bitset_stats.c (bitset_log_histogram_print,
14659 bitset_percent_histogram_print, bitset_stats_and,
14660 bitset_stats_and_cmp, bitset_stats_and_or,
14661 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
14662 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
14663 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
14664 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
14665 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
14666 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
14667 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
14668 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
14669 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
14670 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
14671 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
14672 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
14673 bitset_stats_zero): Likewise.
14674 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
14675 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
14676 bitsetv_dump, debug_bitsetv): Likewise.
14677 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
14678 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
14679 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
14680 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
14681 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
14682 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
14683 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
14684 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
14685 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
14686 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
14687 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
14688 Likewise.
14689 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
14690 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
14691 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
14692 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
14693 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
14694 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
14695 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
14696 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
14697 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
14698 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
14699 lbitset_xor_cmp, lbitset_zero): Likewise.
14700
14701 2002-10-14 Akim Demaille <akim@epita.fr>
14702
14703 Version 1.75.
14704
14705 2002-10-14 Akim Demaille <akim@epita.fr>
14706
14707 * tests/Makefile.am (maintainer-check-posix): New.
14708
14709 2002-10-14 Akim Demaille <akim@epita.fr>
14710
14711 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
14712 member.
14713
14714 2002-10-14 Akim Demaille <akim@epita.fr>
14715
14716 * src/tables.c (table_ninf_remap): base -> tab.
14717 Reported by Matt Rosing.
14718
14719 2002-10-14 Paul Eggert <eggert@twinsun.com>
14720
14721 * tests/action.at, tests/calc.at, tests/conflicts.at,
14722 tests/cxx-type.at, tests/headers.at, tests/input.at,
14723 tests/regression.at, tests/synclines.at, tests/torture.at:
14724 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
14725 so that the tests still work even if POSIXLY_CORRECT is set.
14726 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
14727
14728 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
14729 for portability to K&R hosts. Fix typo: signed char is guaranteed
14730 only to 127, not to 128.
14731 * data/glr.c (yysigned_char): New type.
14732 * data/yacc.c (yysigned_char): Likewise.
14733 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
14734
14735 2002-10-13 Paul Eggert <eggert@twinsun.com>
14736
14737 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
14738 true due to limited range of data type" warning from GCC.
14739
14740 * data/c.m4 (b4_token_defines): Protect against double-inclusion
14741 by wrapping enum yytokentype's definition inside #ifndef
14742 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
14743
14744 2002-10-13 Akim Demaille <akim@epita.fr>
14745
14746 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
14747 Un yy- yyrhs to avoid the name clash with the global YYRHS.
14748
14749 2002-10-13 Akim Demaille <akim@epita.fr>
14750
14751 * Makefile.maint: Update from Autoconf 2.54.
14752 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
14753
14754 2002-10-13 Akim Demaille <akim@epita.fr>
14755
14756 * src/print.c (print_state): Separate the list of solved conflicts
14757 from the other items.
14758 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
14759
14760 2002-10-13 Akim Demaille <akim@epita.fr>
14761
14762 Let nondeterministic skeletons be usable with deterministic
14763 tables.
14764
14765 With the patch, GAWK compiled by GCC without -O2 passes its test
14766 suite using a GLR parser driven by LALR tables. It fails with -O2
14767 because `struct stat' gives two different answers on my machine:
14768 88 (definition of an auto var) and later 96 (memset on this var).
14769 Hence the stack is badly corrumpted. The headers inclusion is to
14770 blame: if I move the awk.h inclusion before GLR's system header
14771 inclusion, the two struct stat have the same size.
14772
14773 * src/tables.c (pack_table): Always create conflict_table.
14774 (token_actions): Always create conflict_list.
14775 * data/glr.c (YYFLAG): Remove, unused.
14776
14777 2002-10-13 Akim Demaille <akim@epita.fr>
14778
14779 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
14780 (O0FLAGS): New.
14781 (VALGRIND, GXX): New.
14782 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
14783 * tests/bison.in: Run $PREBISON a pre-command.
14784 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
14785 (maintainer-check-g++): New.
14786 * Makefile.am (maintainer-check): New.
14787
14788 2002-10-13 Akim Demaille <akim@epita.fr>
14789
14790 * data/glr.c: Formatting changes.
14791 Tweak some trace messages to match yacc.c's.
14792
14793 2002-10-13 Akim Demaille <akim@epita.fr>
14794
14795 GLR parsers sometimes raise parse errors instead of performing the
14796 default reduction.
14797 Reported by Charles-Henry de Boysson.
14798
14799 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
14800 check the length of the traces when %glr.
14801 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
14802 GLR's traces.
14803 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
14804 Test GLR parsers.
14805 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
14806 (yyltype): Remove the yy prefix from the member names.
14807 (yytable): Complete its comment.
14808 (yygetLRActions): Map error action number from YYTABLE from
14809 YYTABLE_NINF to 0.
14810 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
14811 (which was a bug: it should have been YYTABEL_NINF, and yet it was
14812 not satisfying as we could compare an YYACTION computed from
14813 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
14814 only value for error actions.
14815 (yyreportParseError): In verbose parse error messages, don't issue
14816 `error' in the list of expected tokens.
14817 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
14818 next action to perform to match glr.c's decoding.
14819 (yytable): Complete its comment.
14820
14821 2002-10-13 Paul Eggert <eggert@twinsun.com>
14822
14823 Fix problem reported by Henrik Grubbstroem in
14824 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
14825 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
14826 because the Bison parser reads the second action before reducing
14827 the first one.
14828 * src/scan-gram.l (rule_length): New static var.
14829 Use it to keep track of the rule length in the scanner, since
14830 we can't expect the parser to be in lock-step sync with the scanner.
14831 (handle_action_dollar, handle_action_at): Use this var.
14832 * tests/actions.at (Exotic Dollars): Test for the problem.
14833
14834 2002-10-12 Paul Eggert <eggert@twinsun.com>
14835
14836 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
14837 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
14838 Include <sys/time.h> when checking for clock_t and struct tms.
14839 Use same include order as source.
14840 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
14841 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
14842
14843 * lib/timevar.c: Update copyright date and clarify comments.
14844 (get_time) [IN_GCC]: Keep the GCC version for reference.
14845
14846 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
14847 GCC version as of today, then merge Bison's changes.
14848 Change "GCC" to "Bison" in copyright notice. timevar.def's
14849 author is Akim, so change that too.
14850
14851 * src/reader.c (grammar_current_rule_check):
14852 Don't worry about the default action if $$ is untyped.
14853 Prevents bogus warnings reported by Jim Gifford in
14854 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
14855
14856 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
14857 * data/glr.c, data/lalr1.cc, data/yacc.c:
14858 Output token definitions before the first part of user declarations.
14859 Fixes compatibility problem reported by Jim Gifford for kbd in
14860 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14861
14862 2002-10-11 Paul Eggert <eggert@twinsun.com>
14863
14864 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
14865 (yyparse): here. This undoes some of the 2002-07-25 change.
14866 Compatibility problem reported by Ralf S. Engelschall with
14867 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
14868
14869 2002-10-11 Akim Demaille <akim@epita.fr>
14870
14871 * tests/regression.at Characters Escapes): New.
14872 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
14873 characters.
14874 Reported by Jan Nieuwenhuizen.
14875
14876 2002-10-11 Akim Demaille <akim@epita.fr>
14877
14878 * po/id.po: New.
14879
14880 2002-10-10 Paul Eggert <eggert@twinsun.com>
14881
14882 Portability fixes for bitsets; this also avoids several GCC
14883 warnings.
14884
14885 * lib/abitset.c: Include <stddef.h>, for offsetof.
14886 * lib/lbitset.c: Likewise.
14887
14888 * lib/abitset.c (abitset_bytes): Return a size that is aligned
14889 properly for vectors of objects. Do not assume that adding a
14890 header size to a multiple of a word size yields a value that is
14891 properly aligned for the whole union.
14892 * lib/bitsetv.c (bitsetv_alloc): Likewise.
14893
14894 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
14895 unique names for structures.
14896 * lib/ebitset.c (ebitset_bytes): Likewise.
14897 * lib/lbitset.c (lbitset_bytes): Likewise.
14898
14899 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
14900 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
14901 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
14902 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
14903 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
14904 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
14905 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
14906 to improve the type-checking that GCC can do.
14907 * lib/bitset.c (bitset_op4_cmp): Likewise.
14908 * lib/bitset_stats.c (bitset_stats_count,
14909 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
14910 bitset_stats_copy, bitset_stats_disjoint_p,
14911 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
14912 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
14913 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
14914 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
14915 bitset_stats_and_or_cmp, bitset_stats_andn_or,
14916 bitset_stats_andn_or_cmp, bitset_stats_or_and,
14917 bitset_stats_or_and_cmp): Likewise.
14918 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
14919 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
14920 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
14921 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
14922
14923 * lib/abitset.h: Include bitset.h, not bbitset.h.
14924 * lib/ebitset.h: Likewise.
14925 * lib/lbitset.h: Likewise.
14926
14927 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
14928 All instances of parameters of type enum bitset_opts are now of
14929 type enum_bitset_opts, to conform to the C Standard, and similarly
14930 for enum_bitset_type.
14931 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
14932 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
14933
14934 Do not use "struct bitset_struct" to mean different things in
14935 different modules. Not only is this confusing, it violates
14936 the C Standard, which requires that structure types in different
14937 modules must be compatible if one is to be passed to the other.
14938 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
14939 All instances of "struct bitset_struct *" replaced with "bitset".
14940 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
14941 (union bitset_union, struct abitset_struct, struct ebitset_struct,
14942 struct lbitset_struct, struct bitset_stats_struct): New types.
14943 All uses of struct bitset_struct changed to union bitset_union,
14944 etc.
14945 * lib/abitset.c (struct abitset_struct, abitset,
14946 struct bitset_struct): Remove.
14947 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
14948 struct bitset_struct): Remove.
14949 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
14950 bitset_struct): Remove.
14951 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
14952 Likewise.
14953
14954 Do not call a function of type T using a call that assumes the
14955 function is of a different type U. Standard C requires that a
14956 function must be called with a type that is compatible with its
14957 definition.
14958 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
14959 New decls.
14960 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
14961 New functions.
14962 * lib/ebitset.c (PFV): Remove.
14963 * lib/lbitset.c (PFV): Likewise.
14964 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
14965 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
14966 decls.
14967 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
14968 (ebitset_vtable): Use them.
14969 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
14970 lbitset_xor): New functions.
14971 (lbitset_vtable): Use them.
14972
14973 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
14974 Declare.
14975
14976 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
14977 GCC warning.
14978 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
14979 Use offsetof, for simplicity.
14980
14981 2002-10-06 Paul Eggert <eggert@twinsun.com>
14982
14983 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
14984 the same width as int. This reapplies a hunk of the 2002-08-12 patch
14985 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
14986 which was inadvertently undone by the 2002-09-30 patch.
14987 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
14988 the same width as int.
14989
14990 2002-10-04 Paul Eggert <eggert@twinsun.com>
14991
14992 Version 1.50.
14993
14994 * configure.ac (AC_INIT), NEWS: Increment version number.
14995
14996 * doc/bison.texinfo: Minor spelling, grammar, and white space
14997 fixes.
14998 (Symbols): Mention that any negative value returned from yylex
14999 signifies end-of-input. Warn about negative chars. Mention
15000 the portable Standard C character set.
15001
15002 The GNU coding standard says CFLAGS and YFLAGS are reserved
15003 for the installer to set.
15004 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
15005 * src/Makefile.am (AM_CFLAGS): Likewise.
15006 (AM_YFLAGS): Renamed from YFLAGS.
15007
15008 Fix some MAX and MIN problems.
15009 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
15010 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
15011 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
15012 * src/reader.c (reader): Use it.
15013
15014 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
15015 POSIX 1003.1-2001 has removed fgrep.
15016
15017 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
15018
15019 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
15020 interpreted as signed.
15021 * lib/ebitset.c (ebitset_list): Fix bug.
15022
15023 2002-10-01 Paul Eggert <eggert@twinsun.com>
15024
15025 More fixes for 64-bit hosts and large bitsets.
15026
15027 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
15028 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
15029 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
15030 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
15031 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
15032 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
15033 bitset_count_): Likewise.
15034 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
15035 bitset_first, bitset_last): Likewise.
15036 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
15037 bitset_stats_list_reverse, bitset_stats_size,
15038 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
15039 Likewise.
15040 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15041 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15042 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15043 bitsetv_reflexive_transitive_closure): Likewise.
15044 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
15045 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
15046 Likewise.
15047 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
15048 Likewise.
15049
15050 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
15051 Use size_t, not unsigned int, to count bytes.
15052 * lib/abitset.h (abitset_bytes): Likewise.
15053 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
15054 Likewise.
15055 * lib/bitset.h (bitset_bytes): Likewise.
15056 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
15057 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
15058 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15059 * lib/ebitset.c (ebitset_bytes): Likewise.
15060 * lib/ebitset.h (ebitset_bytes): Likewise.
15061 * lib/lbitset.c (lbitset_bytes): Likewise.
15062 * lib/lbitset.h (lbitset_bytes): Likewise.
15063
15064 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
15065 abitset_subset_p, abitset_disjoint_p, abitset_and,
15066 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
15067 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
15068 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
15069 abitset_or_and, abitset_or_and_cmp):
15070 Use bitset_windex instead of unsigned int.
15071 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15072 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
15073 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
15074 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
15075 Likewise.
15076 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
15077
15078 * lib/bitset.c (bitset_print):
15079 Use proper printf formats for widths of integer types.
15080 * lib/bitset_stats.c (bitset_percent_histogram_print,
15081 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
15082 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15083 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15084 * lib/lbitset.c (lbitset_bytes): Likewise.
15085
15086 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
15087 BITSET_SIZE_MAX): New macros.
15088 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
15089 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
15090 to BITSET_WINDEX_MAX.
15091
15092 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
15093 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
15094 since we now return the bitset_bindex type (not int).
15095
15096 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
15097 when computing sizes.
15098 * lib/ebitset.c (ebitset_elts_grow): Likewise.
15099
15100 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
15101 and avoid cast to unsigned.
15102
15103 2002-09-30 Akim Demaille <akim@epita.fr>
15104
15105 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
15106 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
15107 Updates from Michael Hayes.
15108
15109 2002-09-30 Art Haas <ahaas@neosoft.com>
15110
15111 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
15112 invocations.
15113 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
15114 defined.
15115
15116 2002-09-27 Akim Demaille <akim@epita.fr>
15117
15118 Version 1.49c.
15119
15120 2002-09-27 Akim Demaille <akim@epita.fr>
15121
15122 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
15123 (Because of AC_LIBSOURCE).
15124
15125 2002-09-27 Akim Demaille <akim@epita.fr>
15126
15127 Playing with Autoscan.
15128
15129 * configure.ac: Remove the old LIBOBJ tweaks.
15130 (AC_REPLACE_FUNCS): Add strrchr and strtol.
15131 * lib/strrchr.c: New.
15132 * lib/strtol.c: New, from the Coreutils 4.5.1.
15133
15134 2002-09-27 Akim Demaille <akim@epita.fr>
15135
15136 Playing with Autoscan.
15137
15138 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
15139 * lib/Makefile.am (libbison_a_SOURCES): No longer include
15140 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
15141 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
15142 Coreutils 4.5.1.
15143
15144 2002-09-24 Akim Demaille <akim@epita.fr>
15145
15146 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
15147 (Frequently Asked Questions, Parser Stack Overflow): New.
15148
15149 2002-09-13 Akim Demaille <akim@epita.fr>
15150
15151 Playing with autoscan.
15152
15153 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
15154 * src/files.c (skeleton_find): Remove, unused.
15155 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
15156 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
15157
15158 2002-09-13 Akim Demaille <akim@epita.fr>
15159
15160 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
15161 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
15162
15163 2002-09-13 Akim Demaille <akim@epita.fr>
15164
15165 * configure.ac: Require 2.54.
15166 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
15167 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
15168 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
15169 Remove, provided by Autoconf macros.
15170
15171 2002-09-12 Akim Demaille <akim@epita.fr>
15172
15173 * m4/prereq.m4: Update, from Coreutils 4.5.1.
15174
15175 2002-09-12 Akim Demaille <akim@epita.fr>
15176
15177 * m4/prereq.m4: Update, from Fileutils 4.1.5.
15178 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
15179 Reported by Martin Mokrejs.
15180
15181 2002-09-10 Akim Demaille <akim@epita.fr>
15182
15183 * src/parse-gram.y: Associate a human readable string to each
15184 token type.
15185 * tests/regression.at (Invalid inputs): Adjust.
15186
15187 2002-09-10 Gary V. Vaughan <gary@gnu.org>
15188
15189 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
15190 with an Autoconf-2.5x style configure.ac.
15191
15192 2002-09-06 Paul Eggert <eggert@twinsun.com>
15193
15194 * doc/bison.texinfo (Conditions): Make explicit that the GPL
15195 exception applies only to yacc.c. This is a modification of a
15196 patch originally suggested by Akim Demaille.
15197
15198 2002-09-06 Akim Demaille <akim@epita.fr>
15199
15200 * data/c.m4 (b4_copyright): Move the GPL exception comment from
15201 here to...
15202 * data/yacc.c: here.
15203
15204 * data/lalr1.cc (struct yyltype): Don't define it, since we use
15205 LocationType.
15206 (b4_ltype): Default to yy::Location from location.hh.
15207
15208 2002-09-04 Jim Meyering <jim@meyering.net>
15209
15210 * data/yacc.c: Guard the declaration of yytoknum also with
15211 `#ifdef YYPRINT', so it is declared only when used.
15212
15213 2002-09-04 Akim Demaille <akim@epita.fr>
15214
15215 * configure.in: Rename as...
15216 * configure.ac: this.
15217 Bump to 1.49c.
15218
15219 2002-09-04 Akim Demaille <akim@epita.fr>
15220
15221 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
15222 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
15223 translate maintainer only messages.
15224
15225 2002-08-12 Paul Eggert <eggert@twinsun.com>
15226
15227 Version 1.49b.
15228
15229 * Makefile.am (SUBDIRS): Remove intl.
15230 (DISTCLEANFILES): Remove.
15231 * NEWS: Mention that GNU M4 is now required. Clarify what is
15232 meant by "larger grammars". Mention the pt_BR translation.
15233 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
15234 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
15235 Bump version from 0.11.2 to 0.11.5.
15236 (BISON_PREREQ_STAGE): Remove.
15237 (AM_GNU_GETTEXT): Use external gettext.
15238 (AC_OUTPUT): Remove intl/Makefile.
15239
15240 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
15241
15242 * data/glr.c: Include string.h, for strlen.
15243 (yyreportParseError): Use size_t for yysize.
15244 (yy_yypstack): No longer nested inside yypstates, as nested
15245 functions are not portable. Do not assume size_t is the
15246 same width as int.
15247 (yypstates): Do not assume that ptrdiff_t is the same width
15248 as int, and similarly for yyposn and YYINDEX.
15249
15250 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
15251
15252 * lib/Makefile.am (INCLUDES): Do not include from the intl
15253 directory, which has been removed.
15254 * src/Makefile.am (INCLUDES): Likewise.
15255
15256 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
15257 (bitsets_sources, additional_bitsets_sources, timevars_sources):
15258 New vars.
15259
15260 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
15261 * tests/Makefile.am (EXTRA_DIST): Likewise.
15262
15263 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
15264 Do not assume that bitset_windex is the same width as unsigned.
15265
15266 * lib/abitset.c (abitset_unused_clear): Do not assume that
15267 bitset_word is the same width as int.
15268 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
15269 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
15270 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
15271 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
15272 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
15273
15274 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
15275 portability to one's complement hosts!).
15276 * lib/ebitset.c (ebitset_op1): Likewise.
15277 * lib/lbitset.c (lbitset_op1): Likewise.
15278
15279 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
15280 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
15281 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
15282 Sync with fileutils.
15283 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
15284 lib/gettext.h: Sync with diffutils.
15285
15286 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
15287 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
15288
15289 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
15290 PROTOTYPES to check for prototypes, and "defined __STDC__" to
15291 check for void *.
15292
15293 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
15294 size_t; the old version tried to do this but casted improperly.
15295 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
15296 (bitset_test): Now returns int, not unsigned long.
15297
15298 * lib/bitset_stats.c: Include "gettext.h".
15299 (_): New macro.
15300 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
15301 name locals "index", as it generates unnecessary warnings on some
15302 hosts that have an "index" function.
15303
15304 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
15305 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
15306 they need translation.
15307 * src/LR0.c (state_list_append, new_itemsets, get_state,
15308 append_states, generate_states): Likewise.
15309 * src/assoc.c (assoc_to_string): Likewise.
15310 * src/closure.c (print_closure, set_firsts, closure): Likewise.
15311 * src/gram.c (grammar_dump): Likewise.
15312 * src/injections.c (injections_compute): Likewise.
15313 * src/lalr.c (lookaheads_print): Likewise.
15314 * src/relation.c (relation_transpose): Likewise.
15315 * src/scan-gram.l: Likewise.
15316 * src/tables.c (table_grow, pack_vector): Likewise.
15317
15318 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
15319 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
15320 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
15321 * m4/mbstate_t.m4: Sync with fileutils.
15322 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
15323
15324 * po/LINGUAS: Add pt_BR.
15325 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
15326 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
15327 lib/timevar.c.
15328 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
15329 manual recommends.
15330 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
15331
15332 * src/complain.c (strerror_r): Remove decl; not needed.
15333 (strerror): Use same pattern as ../lib/error.c.
15334
15335 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
15336
15337 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
15338
15339 * src/main.c (main): Cast result of bindtextdomain and textdomain
15340 to void, to avoid a GCC warning when --disable-nls is in effect.
15341
15342 * src/scan-gram.l: Use strings rather than escapes when possible,
15343 to minimize the number of warnings from xgettext.
15344 (handle_action_dollar, handle_action_at): Don't use isdigit,
15345 as it mishandles negative chars and it may not work as expected
15346 outside the C locale.
15347
15348 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
15349 this is a GCC extension and is not portable to other compilers.
15350
15351 * src/system.h (alloca): Use same pattern as ../lib/error.c.
15352 Do not include <ctype.h>; no longer needed.
15353 Do not include <malloc.h>; no longer needed (and generates
15354 warnings on OpenBSD 3.0).
15355
15356 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
15357 it's not portable.
15358
15359 * tests/regression.at: Do not use 'cc -c input.c -o input';
15360 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
15361
15362 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
15363 exit status as failure, not just exit status 1. Sun C exits
15364 with status 2 sometimes.
15365
15366 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
15367 Use it for the two large tests.
15368
15369 2002-08-02 Akim Demaille <akim@epita.fr>
15370
15371 * src/conflicts.c (conflicts_output): Don't output rules never
15372 reduced here, since anyway that computation doesn't work.
15373 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
15374 (rule_useless_p, rule_never_reduced_p): New.
15375 (grammar_rules_partial_print): Use a filter instead of a range.
15376 Display the title only if needed.
15377 (grammar_rules_print): Adjust.
15378 (grammar_rules_never_reduced_report): New.
15379 * src/tables.c (action_row): Move the computation of rules never
15380 reduced to...
15381 (token_actions): here.
15382 * src/main.c (main): Make the parser before making the report, so
15383 that rules never reduced are computed.
15384 Call grammar_rules_never_reduced_report.
15385 * src/print.c (print_results): Report rules never reduced.
15386 * tests/conflicts.at, tests/reduce.at: Adjust.
15387
15388 2002-08-01 Akim Demaille <akim@epita.fr>
15389
15390 Instead of attaching lookaheads and duplicating the rules being
15391 reduced by a state, attach the lookaheads to the reductions.
15392
15393 * src/state.h (state_t): Remove the `lookaheads',
15394 `lookaheads_rule' member.
15395 (reductions_t): Add a `lookaheads' member.
15396 Use a regular array for the `rules'.
15397 * src/state.c (reductions_new): Initialize the lookaheads member
15398 to 0.
15399 (state_rule_lookaheads_print): Adjust.
15400 * src/state.h, src/state.c (state_reductions_find): New.
15401 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
15402 (count_rr_conflicts): Adjust.
15403 * src/lalr.c (LArule): Remove.
15404 (add_lookback_edge): Adjust.
15405 (state_lookaheads_count): New.
15406 (states_lookaheads_initialize): Merge into...
15407 (initialize_LA): this.
15408 (lalr_free): Adjust.
15409 * src/main.c (main): Don't free nullable and derives too early: it
15410 is used by --verbose.
15411 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
15412
15413 2002-08-01 Akim Demaille <akim@epita.fr>
15414
15415 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
15416 `rule_number_t**'.
15417 (set_derives, free_derives): Rename as...
15418 (derives_compute, derives_free): this.
15419 Adjust all dependencies.
15420 * src/nullable.c (set_nullable, free_nullable): Rename as...
15421 (nullable_compute, nullable_free): these.
15422 (rule_list_t): Store rule_t *, not rule_number_t.
15423 * src/state.c (state_rule_lookaheads_print): Directly compare rule
15424 pointers, instead of their numbers.
15425 * src/main.c (main): Call nullable_free, and derives_free earlier,
15426 as they were lo longer used.
15427
15428 2002-08-01 Akim Demaille <akim@epita.fr>
15429
15430 * lib/timevar.c (get_time): Include children time.
15431 * src/lalr.h (LA, LArule): Don't export them: used with the
15432 state_t.
15433 * src/lalr.c (LA, LArule): Static.
15434 * src/lalr.h, src/lalr.c (lalr_free): New.
15435 * src/main.c (main): Call it.
15436 * src/tables.c (pack_vector): Check whether loc is >= to the
15437 table_size, not >.
15438 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
15439 (tables_generate): do it, since that's also it which allocates
15440 them.
15441 Don't free LA and LArule, main does.
15442
15443 2002-07-31 Akim Demaille <akim@epita.fr>
15444
15445 Separate parser tables computation and output.
15446
15447 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
15448 (conflict_list, conflict_list_cnt, table, check, table_ninf)
15449 (yydefgoto, yydefact, high): Move to...
15450 * src/tables.h, src/tables.c: here.
15451 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
15452 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
15453 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
15454 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
15455 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
15456 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
15457 (action_row, save_row, token_actions, save_column, default_goto)
15458 (goto_actions, sort_actions, matching_state, pack_vector)
15459 (table_ninf_remap, pack_table, prepare_actions): Move to...
15460 * src/tables.c: here.
15461 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
15462 * src/output.c (token_actions, output_base, output_conflicts)
15463 (output_check): Merge into...
15464 (prepare_actions): this.
15465 (actions_output): Rename as...
15466 (user_actions_output): this.
15467 * src/main.c (main): Call tables_generate and tables_free.
15468
15469 2002-07-31 Akim Demaille <akim@epita.fr>
15470
15471 Steal GCC's --time-report support.
15472
15473 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
15474 stolen/adjusted from GCC.
15475 * m4/stage.m4: Remove time related checks.
15476 * m4/timevar.m4: New.
15477 * configure.in: Adjust.
15478 * src/system.h: Adjust to using timevar.h.
15479 * src/getargs.h, src/getargs.c: Support trace_time for
15480 --trace=time.
15481 * src/main.c (stage): Remove.
15482 (main): Replace `stage' invocations with timevar calls.
15483 * src/output.c: Insert pertinent timevar calls.
15484
15485 2002-07-31 Akim Demaille <akim@epita.fr>
15486
15487 Let --trace have arguments.
15488
15489 * src/getargs.h (enum trace_e): New.
15490 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
15491 (long_options, short_options): --trace/-T takes an optional
15492 argument.
15493 Change all the uses of trace_flag to reflect the new flags.
15494 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
15495
15496 Strengthen `stage' portability.
15497
15498 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
15499 * configure.in: Use it.
15500 Don't check for malloc.h and sys/times.h.
15501 * src/system.h: Include them when appropriate.
15502 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
15503 times and struct tms are available.
15504
15505 2002-07-30 Akim Demaille <akim@epita.fr>
15506
15507 In verbose parse error message, don't report `error' as an
15508 expected token.
15509 * tests/actions.at (Printers and Destructors): Adjust.
15510 * tests/calc.at (Calculator $1): Adjust.
15511 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
15512 error message, do not report the parser accepts the error token in
15513 that state.
15514
15515 2002-07-30 Akim Demaille <akim@epita.fr>
15516
15517 Normalize conflict related messages.
15518
15519 * src/complain.h, src/complain.c (warn, complain): New.
15520 * src/conflicts.c (conflicts_print): Use them.
15521 (conflict_report_yacc): New, extracted from...
15522 (conflicts_print): here.
15523 * tests/conflicts.at, tests/existing.at: Adjust.
15524
15525 2002-07-30 Akim Demaille <akim@epita.fr>
15526
15527 Report rules which are never reduced by the parser: those hidden
15528 by conflicts.
15529
15530 * src/LR0.c (save_reductions): Don't make the final state too
15531 different: save its reduction (accept) instead of having a state
15532 without any action (no shift or goto, no reduce).
15533 Note: the final state is now a ``regular'' state, i.e., the
15534 parsers now contain `reduce 0' as default reduction.
15535 Nevertheless, since they decide to `accept' when yystate =
15536 final_state, they still will not reduce rule 0.
15537 * src/print.c (print_actions, print_reduction): Adjust.
15538 * src/output.c (action_row): Track reduced rules.
15539 (token_actions): Report rules never reduced.
15540 * tests/conflicts.at, tests/regression.at: Adjust.
15541
15542 2002-07-30 Akim Demaille <akim@epita.fr>
15543
15544 `stage' was accidently included in a previous patch.
15545 Initiate its autoconfiscation.
15546
15547 * configure.in: Look for malloc.h and sys/times.h.
15548 * src/main.c (stage): Adjust.
15549 Report only when trace_flag.
15550
15551 2002-07-29 Akim Demaille <akim@epita.fr>
15552
15553 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
15554 state_number_t.
15555 (errs_t): symbol_t*, not symbol_number_t.
15556 (reductions_t): rule_t*, not rule_number_t.
15557 (FOR_EACH_SHIFT): New.
15558 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
15559 * src/print.c, src/print_graph.c: Adjust.
15560
15561 2002-07-29 Akim Demaille <akim@epita.fr>
15562
15563 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
15564
15565 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
15566 (endtoken, accept): these.
15567 * src/reader.c (reader): Set endtoken's default tag to "$end".
15568 Set undeftoken's tag to "$undefined" instead of "$undefined.".
15569 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
15570 Adjust.
15571
15572 2002-07-29 Akim Demaille <akim@epita.fr>
15573
15574 * src/reduce.c (reduce_grammar): When the language is empty,
15575 complain about the start symbol, not the axiom.
15576 Use its location.
15577 * tests/reduce.at (Empty Language): New.
15578
15579 2002-07-26 Akim Demaille <akim@epita.fr>
15580
15581 * src/reader.h, src/reader.c (gram_error): ... can't get
15582 yycontrol without making too strong assumptions on the parser
15583 itself.
15584 * src/output.c (prepare_tokens): Use the real 0th value of
15585 token_translations instead of `0'.
15586 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
15587 visible here.
15588 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
15589 for the time being: %locations ought to provide it to yyerror.
15590
15591 2002-07-25 Akim Demaille <akim@epita.fr>
15592
15593 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
15594 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
15595 * tests/regression.at (Web2c Actions): Adjust.
15596
15597 2002-07-25 Akim Demaille <akim@epita.fr>
15598
15599 Stop storing rules from 1 to nrules + 1.
15600
15601 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
15602 * src/nullable.c, src/output.c, src/print.c, src/reader.c
15603 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
15604 Iterate from 0 to nrules.
15605 Use rule_number_as_item_number and item_number_as_rule_number.
15606 Adjust to `derive' now containing possibly 0.
15607 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
15608 Handle the `- 1' part in rule numbers from/to item numbers.
15609 * src/conflicts.c (log_resolution): Fix the message which reversed
15610 shift and reduce.
15611 * src/output.c (action_row): Initialize default_rule to -1.
15612 (token_actions): Adjust.
15613 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
15614 expected output.
15615 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
15616
15617 2002-07-25 Akim Demaille <akim@epita.fr>
15618
15619 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
15620 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
15621 (b4_c_knr_arg_decl): New.
15622 * data/yacc.c: Use it to define yysymprint, yydestruct, and
15623 yyreport_parse_error.
15624
15625 2002-07-25 Akim Demaille <akim@epita.fr>
15626
15627 * data/yacc.c (yyreport_parse_error): New, extracted from...
15628 (yyparse): here.
15629 (yydestruct, yysymprint): Move above yyparse.
15630 Be K&R compliant.
15631
15632 2002-07-25 Akim Demaille <akim@epita.fr>
15633
15634 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
15635 replace...
15636 (b4_sint_type, b4_uint_type): these.
15637 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
15638 * tests/regression.at (Web2c Actions): Adjust.
15639
15640 2002-07-25 Akim Demaille <akim@epita.fr>
15641
15642 * src/gram.h (TIEM_NUMBER_MAX): New.
15643 (item_number_of_rule_number, rule_number_of_item_number): Rename
15644 as...
15645 (rule_number_as_item_number, item_number_as_rule_number): these.
15646 Adjust dependencies.
15647 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
15648 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
15649 (symbol_number_to_vector_number): New.
15650 (order): Of vector_number_t* type.
15651 (base_t, BASE_MAX, BASE_MIN): New.
15652 (froms, tos, width, pos, check): Of base_t type.
15653 (action_number_t, ACTION_MIN, ACTION_MAX): New.
15654 (actrow): Of action_number_t type.
15655 (conflrow): Of unsigned int type.
15656 (table_ninf, base_ninf): New.
15657 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
15658 (muscle_insert_int_table, muscle_insert_base_table)
15659 (muscle_insert_rule_number_table): New.
15660 (prepare_tokens): Output `toknum' as int_table.
15661 (action_row): Returns a rule_number_t.
15662 Use ACTION_MIN, not SHRT_MIN.
15663 (token_actions): yydefact is rule_number_t*.
15664 (table_ninf_remap): New.
15665 (pack_table): Use it for `base' and `table'.
15666 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
15667 replaced with...
15668 (YYPACT_NINF, YYTABLE_NINF): these.
15669 (yypact, yytable): Compute their types instead of hard-coded
15670 `short'.
15671 * tests/regression.at (Web2c Actions): Adjust.
15672
15673 2002-07-19 Akim Demaille <akim@epita.fr>
15674
15675 * src/scan-gram.l (id): Can start with an underscore.
15676
15677 2002-07-16 Akim Demaille <akim@epita.fr>
15678
15679 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
15680 Adjust all former `associativity' dependencies.
15681 * src/symtab.c (symbol_new): Default associativity is `undef', not
15682 `right'.
15683 (symbol_check_alias_consistence): Adjust.
15684
15685 2002-07-09 Akim Demaille <akim@epita.fr>
15686
15687 * doc/bison.texinfo: Properly set the ``header'' part.
15688 Use @dircategory ``GNU programming tools'' as per Texinfo's
15689 documentation.
15690 Use @copying.
15691
15692 2002-07-09 Akim Demaille <akim@epita.fr>
15693
15694 * lib/quotearg.h: Protect against multiple inclusions.
15695 * src/location.h (location_t): Add a `file' member.
15696 (LOCATION_RESET, LOCATION_PRINT): Adjust.
15697 * src/complain.c (warn_at, complain_at, fatal_at): Drop
15698 `error_one_per_line' support.
15699
15700 2002-07-09 Akim Demaille <akim@epita.fr>
15701
15702 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
15703 * src/reader.c (lineno): Remove.
15704 Adjust all dependencies.
15705 (get_merge_function): Take a location and use complain_at.
15706 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
15707 * tests/regression.at (Invalid inputs, Mixing %token styles):
15708 Adjust.
15709
15710 2002-07-09 Akim Demaille <akim@epita.fr>
15711
15712 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
15713 recovery rule, and forbid extensions when --yacc.
15714 (gram_error): Use complain_at.
15715 * src/reader.c (reader): Exit if there were parse errors.
15716
15717 2002-07-09 Akim Demaille <akim@epita.fr>
15718
15719 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
15720 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
15721 Reported by R Blake <blakers@mac.com>.
15722
15723 2002-07-09 Akim Demaille <akim@epita.fr>
15724
15725 * data/yacc.c: Output the copyright notive in the header.
15726
15727 2002-07-03 Akim Demaille <akim@epita.fr>
15728
15729 * src/output.c (froms, tos): Are state_number_t.
15730 (save_column): sp, sp1, and sp2 are state_number_t.
15731 (prepare): Rename `final' as `final_state_number', `nnts' as
15732 `nterms_number', `nrules' as `rules_number', `nstates' as
15733 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
15734 unused.
15735 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
15736 * data/lalr1.cc (nsym_): Remove, unused.
15737
15738 2002-07-03 Akim Demaille <akim@epita.fr>
15739
15740 * src/lalr.h, src/lalr.c (goto_number_t): New.
15741 * src/lalr.c (goto_list_t): New.
15742 Propagate them.
15743 * src/nullable.c (rule_list_t): New.
15744 Propagate.
15745 * src/types.h: Remove.
15746
15747 2002-07-03 Akim Demaille <akim@epita.fr>
15748
15749 * src/closure.c (print_fderives): Use rule_rhs_print.
15750 * src/derives.c (print_derives): Use rule_rhs_print.
15751 (rule_list_t): New, replaces `shorts'.
15752 (set_derives): Add comments.
15753 * tests/sets.at (Nullable, Firsts): Adjust.
15754
15755 2002-07-03 Akim Demaille <akim@epita.fr>
15756
15757 * src/output.c (prepare_actions): Free `tally' and `width'.
15758 (prepare_actions): Allocate and free `order'.
15759 * src/symtab.c (symbols_free): Free `symbols'.
15760 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
15761 * src/output.c (m4_invoke): Move to...
15762 * src/scan-skel.l: here.
15763 (<<EOF>>): Close yyout, and free its name.
15764
15765 2002-07-03 Akim Demaille <akim@epita.fr>
15766
15767 Fix some memory leaks, and fix a bug: state 0 was examined twice.
15768
15769 * src/LR0.c (new_state): Merge into...
15770 (state_list_append): this.
15771 (new_states): Merge into...
15772 (generate_states): here.
15773 (set_states): Don't ensure a proper `errs' state member here, do it...
15774 * src/conflicts.c (conflicts_solve): here.
15775 * src/state.h, src/state.c: Comment changes.
15776 (state_t): Rename member `shifts' as `transitions'.
15777 Adjust all dependencies.
15778 (errs_new): For consistency, also take the values as argument.
15779 (errs_dup): Remove.
15780 (state_errs_set): New.
15781 (state_reductions_set, state_transitions_set): Assert that no
15782 previous value was assigned.
15783 (state_free): New.
15784 (states_free): Use it.
15785 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
15786 temporary storage: use `errs' and `nerrs' as elsewhere.
15787 (set_conflicts): Allocate and free this `errs'.
15788
15789 2002-07-02 Akim Demaille <akim@epita.fr>
15790
15791 * lib/libiberty.h: New.
15792 * lib: Update the bitset implementation from upstream.
15793 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
15794 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
15795 * src/main.c: Adjust bitset stats calls.
15796
15797 2002-07-01 Paul Eggert <eggert@twinsun.com>
15798
15799 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
15800 char, so that negative chars don't collide with $.
15801
15802 2002-06-30 Akim Demaille <akim@epita.fr>
15803
15804 Have the GLR tests be `warning' checked, and fix the warnings.
15805
15806 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
15807 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
15808 (yyremoveDeletes): `yyi' and `yyj' are size_t.
15809 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
15810 (yyaddDeferredAction): static.
15811 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
15812 (yyreportParseError): yyprefix is const.
15813 yytokenp is used only when verbose.
15814 (yy__GNUC__): Replace with __GNUC__.
15815 (yypdumpstack): yyi is size_t.
15816 (yypreference): Un-yy local variables and arguments, to avoid
15817 clashes with `yyr1'. Anyway, we are not in the user name space.
15818 (yytname_size): be an int, as is compared with ints.
15819 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
15820 Use them.
15821 * tests/cxx-gram.at: Use quotation to protect $1.
15822 Use AT_COMPILE to enable warnings hunts.
15823 Prototype yylex and yyerror.
15824 `Use' argc.
15825 Include `string.h', not `strings.h'.
15826 Produce and prototype stmtMerge only when used.
15827 yylex takes a location.
15828
15829 2002-06-30 Akim Demaille <akim@epita.fr>
15830
15831 We spend a lot of time in quotearg, in particular when --verbose.
15832
15833 * src/symtab.c (symbol_get): Store a quoted version of the key.
15834 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
15835 Adjust all callers.
15836
15837 2002-06-30 Akim Demaille <akim@epita.fr>
15838
15839 * src/state.h (reductions_t): Rename member `nreds' as num.
15840 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
15841 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
15842
15843 2002-06-30 Akim Demaille <akim@epita.fr>
15844
15845 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
15846 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
15847 (shifts_to): Rename as...
15848 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
15849 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
15850 (TRANSITION_IS_DISABLED, transitions_to): these.
15851
15852 2002-06-30 Akim Demaille <akim@epita.fr>
15853
15854 * src/print.c (print_shifts, print_gotos): Merge into...
15855 (print_transitions): this.
15856 (print_transitions, print_errs, print_reductions): Align the
15857 lookaheads columns.
15858 (print_core, print_transitions, print_errs, print_state,
15859 print_grammar): Output empty lines separator before, not after.
15860 (state_default_rule_compute): Rename as...
15861 (state_default_rule): this.
15862 * tests/conflicts.at (Defaulted Conflicted Reduction),
15863 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
15864 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
15865
15866 2002-06-30 Akim Demaille <akim@epita.fr>
15867
15868 Display items as we display rules.
15869
15870 * src/gram.h, src/gram.c (rule_lhs_print): New.
15871 * src/gram.c (grammar_rules_partial_print): Use it.
15872 * src/print.c (print_core): Likewise.
15873 * tests/conflicts.at (Defaulted Conflicted Reduction),
15874 (Unresolved SR Conflicts): Adjust.
15875 (Unresolved SR Conflicts): Adjust and rename as...
15876 (Resolved SR Conflicts): this, as was meant.
15877 * tests/regression.at (Web2c Report): Adjust.
15878
15879 2002-06-30 Akim Demaille <akim@epita.fr>
15880
15881 * src/print.c (state_default_rule_compute): New, extracted from...
15882 (print_reductions): here.
15883 Pessimize, but clarify the code.
15884 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
15885
15886 2002-06-30 Akim Demaille <akim@epita.fr>
15887
15888 * src/output.c (action_row): Let default_rule be always a rule
15889 number.
15890
15891 2002-06-30 Akim Demaille <akim@epita.fr>
15892
15893 * src/closure.c (print_firsts, print_fderives, closure):
15894 Use BITSET_EXECUTE.
15895 * src/lalr.c (lookaheads_print): Likewise.
15896 * src/state.c (state_rule_lookaheads_print): Likewise.
15897 * src/print_graph.c (print_core): Likewise.
15898 * src/print.c (print_reductions): Likewise.
15899 * src/output.c (action_row): Likewise.
15900 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
15901
15902 2002-06-30 Akim Demaille <akim@epita.fr>
15903
15904 * src/print_graph.c: Use report_flag.
15905
15906 2002-06-30 Akim Demaille <akim@epita.fr>
15907
15908 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
15909 to...
15910 * src/relation.h, src/relation.c (traverse, relation_digraph)
15911 (relation_print, relation_transpose): New.
15912
15913 2002-06-30 Akim Demaille <akim@epita.fr>
15914
15915 * src/state.h, src/state.c (shifts_to): New.
15916 * src/lalr.c (build_relations): Use it.
15917
15918 2002-06-30 Akim Demaille <akim@epita.fr>
15919
15920 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
15921 (item_number_of_rule_number, rule_number_of_item_number): New.
15922 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
15923 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
15924 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
15925 Propagate their use.
15926 Much remains to be done, in particular wrt `shorts' from types.h.
15927
15928 2002-06-30 Akim Demaille <akim@epita.fr>
15929
15930 * src/symtab.c (symbol_new): Initialize the `printer' member.
15931
15932 2002-06-30 Akim Demaille <akim@epita.fr>
15933
15934 * src/LR0.c (save_reductions): Remove, replaced by...
15935 * src/state.h, src/state.c (state_reductions_set): New.
15936 (reductions, errs): Rename as...
15937 (reductions_t, errs_t): these.
15938 Adjust all dependencies.
15939
15940 2002-06-30 Akim Demaille <akim@epita.fr>
15941
15942 * src/LR0.c (state_list_t, state_list_append): New.
15943 (first_state, last_state): Now symbol_list_t.
15944 (this_state): Remove.
15945 (new_itemsets, append_states, save_reductions): Take a state_t as
15946 argument.
15947 (set_states, generate_states): Adjust.
15948 (save_shifts): Remove, replaced by...
15949 * src/state.h, src/state.c (state_shifts_set): New.
15950 (shifts): Rename as...
15951 (shifts_t): this.
15952 Adjust all dependencies.
15953 * src/state.h (state_t): Remove the `next' member.
15954
15955 2002-06-30 Akim Demaille <akim@epita.fr>
15956
15957 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
15958 escaped in slot 0.
15959
15960 2002-06-30 Akim Demaille <akim@epita.fr>
15961
15962 Use hash.h for the state hash table.
15963
15964 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
15965 (allocate_storage): Use state_hash_new.
15966 (free_storage): Use state_hash_free.
15967 (new_state, get_state): Adjust.
15968 * src/lalr.h, src/lalr.c (states): Move to...
15969 * src/states.h (state_t): Remove the `link' member, no longer
15970 used.
15971 * src/states.h, src/states.c: here.
15972 (state_hash_new, state_hash_free, state_hash_lookup)
15973 (state_hash_insert, states_free): New.
15974 * src/states.c (state_table, state_compare, state_hash): New.
15975 * src/output.c (output_actions): Do not free states now, since we
15976 still need to know the final_state number in `prepare', called
15977 afterwards. Do it...
15978 * src/main.c (main): here: call states_free after `output'.
15979
15980 2002-06-30 Akim Demaille <akim@epita.fr>
15981
15982 * src/state.h, src/state.c (state_new): New, extracted from...
15983 * src/LR0.c (new_state): here.
15984 * src/state.h (STATE_ALLOC): Move to...
15985 * src/state.c: here.
15986 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
15987 * src/state.h, src/state.c: here.
15988
15989 2002-06-30 Akim Demaille <akim@epita.fr>
15990
15991 * src/reader.c (gensym): Rename as...
15992 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
15993 (getsym): Rename as...
15994 (symbol_get): this.
15995
15996 2002-06-30 Akim Demaille <akim@epita.fr>
15997
15998 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
15999 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
16000 * src/output.c, src/print.c, src/print_graph.c: Propagate.
16001 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
16002
16003 2002-06-30 Akim Demaille <akim@epita.fr>
16004
16005 Make the test suite pass with warnings checked.
16006
16007 * tests/actions.at (Printers and Destructors): Improve.
16008 Avoid unsigned vs. signed issues.
16009 * tests/calc.at: Don't exercise the scanner here, do it...
16010 * tests/input.at (Torturing the Scanner): here.
16011
16012 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16013
16014 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
16015 reorganize first lines parallel to yacc.c.
16016
16017 2002-06-28 Akim Demaille <akim@epita.fr>
16018
16019 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
16020 (b4_token_enum, b4_token_defines): New, factored from...
16021 * data/lalr1.cc, data/yacc.c, glr.c: here.
16022
16023 2002-06-28 Akim Demaille <akim@epita.fr>
16024
16025 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
16026 unused variables.
16027 * src/output.c (merger_output): static.
16028
16029 2002-06-28 Akim Demaille <akim@epita.fr>
16030
16031 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
16032 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
16033 pacify GCC.
16034 * src/output.c (save_row): Initialize all the variables to pacify GCC.
16035
16036 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16037
16038 Accumulated changelog for new GLR parsing features.
16039
16040 * src/conflicts.c (count_total_conflicts): Change name to
16041 conflicts_total_count.
16042 * src/conflicts.h: Ditto.
16043 * src/output.c (token_actions): Use the new name.
16044 (output_conflicts): Change conflp => conflict_list_heads, and
16045 confl => conflict_list for better readability.
16046 * data/glr.c: Use the new names.
16047 * NEWS: Add self to GLR announcement.
16048
16049 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
16050
16051 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
16052 Akim Demaille.
16053
16054 * data/bison.glr: Change name to glr.c
16055 * data/glr.c: Renamed from bison.glr.
16056 * data/Makefile.am: Add glr.c
16057
16058 * src/getargs.c:
16059
16060 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
16061 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
16062
16063 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16064
16065 * data/bison.glr: Be sure to restore the
16066 current #line when returning to the skeleton contents after having
16067 exposed the input file's #line.
16068
16069 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16070
16071 * data/bison.glr: Bring up to date with changes to bison.simple.
16072
16073 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16074
16075 * data/bison.glr: Correct definitions that use b4_prefix.
16076 Various reformatting.
16077 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
16078 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
16079 yytokenp argument; now part of stack.
16080 (yychar): Define to behave as documented.
16081 (yyclearin): Ditto.
16082
16083 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16084
16085 * src/reader.h: Add declaration for free_merger_functions.
16086
16087 * src/reader.c (merge_functions): New variable.
16088 (get_merge_function): New function.
16089 (free_merger_functions): New function.
16090 (readgram): Check for %prec that is not followed by a symbol.
16091 Handle %dprec and %merge declarations.
16092 (packgram): Initialize dprec and merger fields in rules array.
16093
16094 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
16095 conflict_list_cnt, conflict_list_free): New variables.
16096 (table_grow): Also grow conflict_table.
16097 (prepare_rules): Output dprec and merger tables.
16098 (conflict_row): New function.
16099 (action_row): Output conflict lists for GLR parser. Don't use
16100 default reduction in conflicted states for GLR parser so that there
16101 are spaces for the conflict lists.
16102 (save_row): Also save conflict information.
16103 (token_actions): Allocate conflict list.
16104 (merger_output): New function.
16105 (pack_vector): Pack conflict table, too.
16106 (output_conflicts): New function to output yyconflp and yyconfl.
16107 (output_check): Allocate conflict_tos.
16108 (output_actions): Output conflict tables, also.
16109 (output_skeleton): Output b4_mergers definition.
16110 (prepare): Output b4_max_rhs_length definition.
16111 Use 'bison.glr' as default skeleton for GLR parsers.
16112
16113 * src/gram.c (glr_parser): New flag.
16114 (grammar_free): Call free_merger_functions.
16115
16116 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
16117 all pairs of conflicting reductions, rather than just all tokens
16118 causing conflicts. Needed to size conflict tables.
16119 (conflicts_output): Modify call to count_rr_conflicts for new
16120 interface.
16121 (conflicts_print): Ditto.
16122 (count_total_conflicts): New function.
16123
16124 * src/reader.h (merger_list): New type.
16125 (merge_functions): New variable.
16126
16127 * src/lex.h (tok_dprec, tok_merge): New token types.
16128
16129 * src/gram.h (rule_s): Add dprec and merger fields.
16130 (glr_parser): New flag.
16131
16132 * src/conflicts.h (count_total_conflicts): New function.
16133
16134 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
16135
16136 * doc/bison.texinfo (Generalized LR Parsing): New section.
16137 (GLR Parsers): New section.
16138 (Language and Grammar): Mention GLR parsing.
16139 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
16140 Correct typo ("tge" -> "the").
16141
16142 * data/bison.glr: New skeleton for GLR parsing.
16143
16144 * tests/cxx-gram.at: New tests for GLR parsing.
16145
16146 * tests/testsuite.at: Include cxx-gram.at.
16147
16148 * tests/Makefile.am: Add cxx-gram.at.
16149
16150 * src/parse-gram.y:
16151
16152 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
16153
16154 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
16155
16156 2002-06-27 Akim Demaille <akim@epita.fr>
16157
16158 * src/options.h, src/options.c: Remove.
16159 * src/getargs.c (short_options, long_options): New.
16160
16161 2002-06-27 Akim Demaille <akim@epita.fr>
16162
16163 * data/bison.simple, data/bison.c++: Rename as...
16164 * data/yacc.c, data/lalr1.cc: these.
16165 * doc/bison.texinfo (Environment Variables): Remove.
16166
16167 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
16168
16169 * src/getargs.c (report_argmatch): Initialize strtok().
16170
16171 2002-06-20 Akim Demaille <akim@epita.fr>
16172
16173 * data/bison.simple (b4_symbol_actions): New, replaces...
16174 (b4_symbol_destructor, b4_symbol_printer): these.
16175 (yysymprint): Be sure to call YYPRINT only for tokens, and using
16176 user token numbers.
16177
16178 2002-06-20 Akim Demaille <akim@epita.fr>
16179
16180 * data/bison.simple (yydestructor): Rename as...
16181 (yydestruct): this.
16182
16183 2002-06-20 Akim Demaille <akim@epita.fr>
16184
16185 * src/symtab.h, src/symtab.c (symbol_type_set)
16186 (symbol_destructor_set, symbol_precedence_set): The location is
16187 the last argument.
16188 Adjust all callers.
16189
16190 2002-06-20 Akim Demaille <akim@epita.fr>
16191
16192 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
16193 internals.
16194 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
16195 Takes a location.
16196 * src/symtab.h, src/symtab.c (symbol_class_set)
16197 (symbol_user_token_number_set): Likewise.
16198 Adjust all callers.
16199 Promote complain_at.
16200 * tests/input.at (Type Clashes): Adjust.
16201
16202 2002-06-20 Akim Demaille <akim@epita.fr>
16203
16204 * data/bison.simple (YYLEX): Fix the declaration when
16205 %pure-parser.
16206
16207 2002-06-20 Akim Demaille <akim@epita.fr>
16208
16209 * data/bison.simple (yysymprint): Don't print the token number,
16210 just its name.
16211 * tests/actions.at (Destructors): Rename as...
16212 (Printers and Destructors): this.
16213 Also exercise %printer.
16214
16215 2002-06-20 Akim Demaille <akim@epita.fr>
16216
16217 * data/bison.simple (YYDSYMPRINT): New.
16218 Use it to remove many of the #if YYDEBUG/if (yydebug).
16219
16220 2002-06-20 Akim Demaille <akim@epita.fr>
16221
16222 * src/symtab.h, src/symtab.c (symbol_t): printer and
16223 printer_location are new members.
16224 (symbol_printer_set): New.
16225 * src/parse-gram.y (PERCENT_PRINTER): New token.
16226 Handle its associated rule.
16227 * src/scan-gram.l: Adjust.
16228 (handle_destructor_at, handle_destructor_dollar): Rename as...
16229 (handle_symbol_code_at, handle_symbol_code_dollar): these.
16230 * src/output.c (symbol_printers_output): New.
16231 (output_skeleton): Call it.
16232 * data/bison.simple (yysymprint): New. Cannot be named yyprint
16233 since there are already many grammar files with a user `yyprint'.
16234 Replace the calls to YYPRINT to calls to yysymprint.
16235 * tests/calc.at: Adjust.
16236 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
16237 taking advantage of parser very internal details (stack size!).
16238
16239 2002-06-20 Akim Demaille <akim@epita.fr>
16240
16241 * src/scan-gram.l: Complete the scanner with the missing patterns
16242 to pacify Flex.
16243 Use `quote' and `symbol_tag_get' where appropriate.
16244
16245 2002-06-19 Akim Demaille <akim@epita.fr>
16246
16247 * tests/actions.at (Destructors): Augment to test locations.
16248 * data/bison.simple (yydestructor): Pass it the current location
16249 if locations are enabled.
16250 Prototype only when __STDC__ or C++.
16251 Change the argument names to move into the yy name space: there is
16252 user code here.
16253
16254 2002-06-19 Akim Demaille <akim@epita.fr>
16255
16256 * data/bison.simple (b4_pure_if): New.
16257 Use it instead of #ifdef YYPURE.
16258
16259 2002-06-19 Akim Demaille <akim@epita.fr>
16260
16261 * data/bison.simple (b4_location_if): New.
16262 Use it instead of #ifdef YYLSP_NEEDED.
16263
16264 2002-06-19 Akim Demaille <akim@epita.fr>
16265
16266 Prepare @$ in %destructor, but currently don't bind it in the
16267 skeleton, as %location use is not cleaned up yet.
16268
16269 * src/scan-gram.l (handle_dollar, handle_destructor_at)
16270 (handle_action_at): New.
16271 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
16272 a braced_code_t and a location as additional arguments.
16273 (handle_destructor_dollar): Instead of requiring `b4_eval', just
16274 unquote one when outputting `b4_dollar_dollar'.
16275 Adjust callers.
16276 * data/bison.simple (b4_eval): Remove.
16277 (b4_symbol_destructor): Adjust.
16278 * tests/input.at (Invalid @n): Adjust.
16279
16280 2002-06-19 Zack Weinberg <zack@codesourcery.com>
16281
16282 * doc/bison.texinfo: Document ability to have multiple
16283 prologue sections.
16284
16285 2002-06-18 Akim Demaille <akim@epita.fr>
16286
16287 * src/files.c (compute_base_names): When computing the output file
16288 names from the input file name, strip the directory part.
16289
16290 2002-06-18 Akim Demaille <akim@epita.fr>
16291
16292 * data/bison.simple.new: Comment changes.
16293 Reported by Andreas Schwab.
16294
16295 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
16296
16297 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
16298 there are no `label `yyoverflowlab' defined but not used' warnings
16299 when yyoverflow is defined.
16300
16301 2002-06-18 Akim Demaille <akim@epita.fr>
16302
16303 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
16304 new member.
16305 (symbol_destructor_set): Adjust.
16306 * src/output.c (symbol_destructors_output): Output the destructor
16307 locations.
16308 Output the symbol name.
16309 * data/bison.simple (b4_symbol_destructor): Adjust.
16310
16311 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
16312 and Akim Demaille <akim@epita.fr>
16313
16314 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
16315 what's left on the stack when the error recovery hits EOF.
16316 * tests/actions.at (Destructors): Complete to exercise this case.
16317
16318 2002-06-17 Akim Demaille <akim@epita.fr>
16319
16320 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
16321 arguments is really empty, not only equal to `[]'.
16322 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
16323 member.
16324 (symbol_destructor_set): New.
16325 * src/output.c (symbol_destructors_output): New.
16326 * src/reader.h (brace_code_t, current_braced_code): New.
16327 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
16328 (handle_dollar): Rename as...
16329 (handle_action_dollar): this.
16330 (handle_destructor_dollar): New.
16331 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
16332 (grammar_declaration): Use it.
16333 * data/bison.simple (yystos): Is always defined.
16334 (yydestructor): New.
16335 * tests/actions.at (Destructors): New.
16336 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
16337
16338 2002-06-17 Akim Demaille <akim@epita.fr>
16339
16340 * src/symlist.h, src/symlist.c (symbol_list_length): New.
16341 * src/scan-gram.l (handle_dollar, handle_at): Compute the
16342 rule_length only when needed.
16343 * src/output.c (actions_output, token_definitions_output): Output
16344 the full M4 block.
16345 * src/symtab.c: Don't access directly to the symbol tag, use
16346 symbol_tag_get.
16347 * src/parse-gram.y: Use symbol_list_free.
16348
16349 2002-06-17 Akim Demaille <akim@epita.fr>
16350
16351 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
16352 (symbol_list_prepend, get_type_name): Move to...
16353 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
16354 (symbol_list_prepend, symbol_list_n_type_name_get): here.
16355 Adjust all callers.
16356 (symbol_list_free): New.
16357 * src/scan-gram.l (handle_dollar): Takes a location.
16358 * tests/input.at (Invalid $n): Adjust.
16359
16360 2002-06-17 Akim Demaille <akim@epita.fr>
16361
16362 * src/reader.h, src/reader.c (symbol_list_new): Export it.
16363 (symbol_list_prepend): New.
16364 * src/parse-gram.y (%union): `list' is a new member.
16365 (symbols.1): New, replaces...
16366 (terms_to_prec.1, nterms_to_type.1): these.
16367 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
16368 Take a location as additional argument.
16369 Adjust all callers.
16370
16371 2002-06-15 Akim Demaille <akim@epita.fr>
16372
16373 * src/parse-gram.y: Move %token in the declaration section so that
16374 we don't depend upon CVS Bison.
16375
16376 2002-06-15 Akim Demaille <akim@epita.fr>
16377
16378 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
16379 * src/print.c (print_core): Use it.
16380
16381 2002-06-15 Akim Demaille <akim@epita.fr>
16382
16383 * src/conflicts.c (log_resolution): Accept the rule involved in
16384 the sr conflicts instead of the lookahead number that points to
16385 that rule.
16386 (flush_reduce): Accept the current lookahead vector as argument,
16387 instead of the index in LA.
16388 (resolve_sr_conflict): Accept the current number of lookahead
16389 bitset to consider for the STATE, instead of the index in LA.
16390 (set_conflicts): Adjust.
16391 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
16392
16393 2002-06-15 Akim Demaille <akim@epita.fr>
16394
16395 * src/state.h (state_t): Replace the `lookaheadsp' member, a
16396 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
16397 Adjust all dependencies.
16398 * src/lalr.c (initialize_lookaheads): Split into...
16399 (states_lookaheads_count, states_lookaheads_initialize): these.
16400 (lalr): Adjust.
16401
16402 2002-06-15 Akim Demaille <akim@epita.fr>
16403
16404 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
16405 out of...
16406 (grammar_rules_print): here.
16407 * src/reduce.c (reduce_output): Use it.
16408 * tests/reduce.at (Useless Rules, Reduced Automaton)
16409 (Underivable Rules): Adjust.
16410
16411 2002-06-15 Akim Demaille <akim@epita.fr>
16412
16413 Copy BYacc's nice way to report the grammar.
16414
16415 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
16416 New.
16417 Don't print the rules' location, it is confusing and useless.
16418 (rule_print): Use grammar_rhs_print.
16419 * src/print.c (print_grammar): Use grammar_rules_print.
16420
16421 2002-06-15 Akim Demaille <akim@epita.fr>
16422
16423 Complete and rationalize `useless thing' warnings.
16424
16425 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
16426 (symbol_tag_print): New.
16427 Use them everywhere in place of accessing directly the tag member.
16428 * src/gram.h, src/gram.c (rule_print): New.
16429 Use it where a rule used to be printed `by hand'.
16430 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
16431 (reduce_grammar_tables): Report the useless rules.
16432 (reduce_print): Useless things are a warning, not an error.
16433 Report it as such.
16434 * tests/reduce.at (Useless Nonterminals, Useless Rules):
16435 (Reduced Automaton, Underivable Rules): Adjust.
16436 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
16437 * tests/conflicts.at (Unresolved SR Conflicts)
16438 (Solved SR Conflicts): Adjust.
16439
16440 2002-06-15 Akim Demaille <akim@epita.fr>
16441
16442 Let symbols have a location.
16443
16444 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
16445 (getsym): Adjust.
16446 Adjust all callers.
16447 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
16448 Use location_t, not int.
16449 * src/symtab.c (symbol_check_defined): Take advantage of the
16450 location.
16451 * tests/regression.at (Invalid inputs): Adjust.
16452
16453 2002-06-15 Akim Demaille <akim@epita.fr>
16454
16455 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
16456 (input): Don't try to initialize yylloc here, do it in the
16457 scanner.
16458 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
16459 * src/gram.h (rule_t): Change line and action_line into location
16460 and action_location, of location_t type.
16461 Adjust all dependencies.
16462 * src/location.h, src/location.c (empty_location): New.
16463 * src/reader.h, src/reader.c (grammar_start_symbol_set)
16464 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
16465 (grammar_current_rule_symbol_append)
16466 (grammar_current_rule_action_append): Expect a location as argument.
16467 * src/reader.c (grammar_midrule_action): Adjust to attach an
16468 action's location as dummy symbol location.
16469 * src/symtab.h, src/symtab.c (startsymbol_location): New.
16470 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
16471 the line numbers.
16472
16473 2002-06-14 Akim Demaille <akim@epita.fr>
16474
16475 Grammar declarations may be found in the grammar section.
16476
16477 * src/parse-gram.y (rules_or_grammar_declaration): New.
16478 (declarations): Each declaration may end with a semicolon, not
16479 just...
16480 (grammar_declaration): `"%union"'.
16481 (grammar): Branch to rules_or_grammar_declaration.
16482
16483 2002-06-14 Akim Demaille <akim@epita.fr>
16484
16485 * src/main.c (main): Invoke scanner_free.
16486
16487 2002-06-14 Akim Demaille <akim@epita.fr>
16488
16489 * src/output.c (m4_invoke): Extracted from...
16490 (output_skeleton): here.
16491 Free tempfile.
16492
16493 2002-06-14 Akim Demaille <akim@epita.fr>
16494
16495 * src/parse-gram.y (directives, directive, gram)
16496 (grammar_directives, precedence_directives, precedence_directive):
16497 Rename as...
16498 (declarations, declaration, grammar, grammar_declaration)
16499 (precedence_declaration, precedence_declarator): these.
16500 (symbol_declaration): New.
16501
16502 2002-06-14 Akim Demaille <akim@epita.fr>
16503
16504 * src/files.c (action_obstack): Remove, unused.
16505 (output_obstack): Remove it, and all its dependencies, as it is no
16506 longer needed.
16507 * src/reader.c (epilogue_set): Build the epilogue in the
16508 muscle_obstack.
16509 * src/output.h, src/output.c (muscle_obstack): Move to...
16510 * src/muscle_tab.h, src/muscle_tab.h: here.
16511 (muscle_init): Initialize muscle_obstack.
16512 (muscle_free): New.
16513 * src/main.c (main): Call it.
16514
16515 2002-06-14 Akim Demaille <akim@epita.fr>
16516
16517 * src/location.h: New, extracted from...
16518 * src/reader.h: here.
16519 * src/Makefile.am (noinst_HEADERS): Merge into
16520 (bison_SOURCES): this.
16521 Add location.h.
16522 * src/parse-gram.y: Use location_t instead of Bison's.
16523 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
16524 Use location_t instead of ints.
16525
16526 2002-06-14 Akim Demaille <akim@epita.fr>
16527
16528 * data/bison.simple, data/bison.c++: Be sure to restore the
16529 current #line when returning to the skeleton contents after having
16530 exposed the input file's #line.
16531
16532 2002-06-12 Akim Demaille <akim@epita.fr>
16533
16534 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
16535 eager.
16536 * tests/actions.at (Exotic Dollars): New.
16537
16538 2002-06-12 Akim Demaille <akim@epita.fr>
16539
16540 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
16541 ['"/] too eagerly.
16542 * tests/input.at (Torturing the Scanner): New.
16543
16544 2002-06-11 Akim Demaille <akim@epita.fr>
16545
16546 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
16547 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
16548 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
16549 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
16550 * src/reader.c (reader): Use it.
16551
16552 2002-06-11 Akim Demaille <akim@epita.fr>
16553
16554 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
16555 Adjust all callers.
16556 (scanner_last_string_free): New.
16557
16558 2002-06-11 Akim Demaille <akim@epita.fr>
16559
16560 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
16561 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
16562 (last_string, YY_OBS_FREE): New.
16563 Use them when returning an ID.
16564
16565 2002-06-11 Akim Demaille <akim@epita.fr>
16566
16567 Have Bison grammars parsed by a Bison grammar.
16568
16569 * src/reader.c, src/reader.h (prologue_augment): New.
16570 * src/reader.c (copy_definition): Remove.
16571
16572 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
16573 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
16574 (grammar_current_rule_prec_set, grammar_current_rule_check)
16575 (grammar_current_rule_symbol_append)
16576 (grammar_current_rule_action_append): Export.
16577 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
16578 (symbol_list_action_append): Remove.
16579 Hook the routines from reader.
16580 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
16581 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
16582
16583 * src/reader.c (read_declarations): Remove, unused.
16584
16585 * src/parse-gram.y: Handle the epilogue.
16586 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
16587 (grammar_start_symbol_set): this.
16588 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
16589 * src/reader.c (readgram): Remove, unused.
16590 (reader): Adjust to insert eoftoken and axiom where appropriate.
16591
16592 * src/reader.c (copy_dollar): Replace with...
16593 * src/scan-gram.h (handle_dollar): this.
16594 * src/parse-gram.y: Remove `%thong'.
16595
16596 * src/reader.c (copy_at): Replace with...
16597 * src/scan-gram.h (handle_at): this.
16598
16599 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
16600 New.
16601
16602 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
16603 time being.
16604
16605 * src/reader.h, src/reader.c (grammar_rule_end): New.
16606
16607 * src/parse.y (current_type, current_class): New.
16608 Implement `%nterm', `%token' support.
16609 Merge `%term' into `%token'.
16610 (string_as_id): New.
16611 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
16612 type name.
16613
16614 * src/parse-gram.y: Be sure to handle properly the beginning of
16615 rules.
16616
16617 * src/parse-gram.y: Handle %type.
16618 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
16619
16620 * src/parse-gram.y: More directives support.
16621 * src/options.c: No longer handle source directives.
16622
16623 * src/parse-gram.y: Fix %output.
16624
16625 * src/parse-gram.y: Handle %union.
16626 Use the prologue locations.
16627 * src/reader.c (parse_union_decl): Remove.
16628
16629 * src/reader.h, src/reader.c (epilogue_set): New.
16630 * src/parse-gram.y: Use it.
16631
16632 * data/bison.simple, data/bison.c++: b4_stype is now either not
16633 defined, then default to int, or to the contents of %union,
16634 without `union' itself.
16635 Adjust.
16636 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
16637
16638 * src/output.c (actions_output): Don't output braces, as they are
16639 already handled by the scanner.
16640
16641 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
16642 characters to themselves.
16643
16644 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
16645 that the epilogue has a proper #line.
16646
16647 * src/parse-gram.y: Handle precedence/associativity.
16648
16649 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
16650 a terminal.
16651 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
16652 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
16653 at all to define terminals that cannot be emitted.
16654
16655 * src/scan-gram.l: Escape M4 characters.
16656
16657 * src/scan-gram.l: Working properly with escapes in user
16658 strings/characters.
16659
16660 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
16661 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
16662 grammar.
16663 Use more modest sizes, as for the time being the parser does not
16664 release memory, and therefore the process swallows a huge amount
16665 of memory.
16666
16667 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
16668 stricter %token grammar.
16669
16670 * src/symtab.h (associativity): Add `undef_assoc'.
16671 (symbol_precedence_set): Do nothing when passed an undef_assoc.
16672 * src/symtab.c (symbol_check_alias_consistence): Adjust.
16673
16674 * tests/regression.at (Invalid %directive): Remove, as it is now
16675 meaningless.
16676 (Invalid inputs): Adjust to the new error messages.
16677 (Token definitions): The new grammar doesn't allow too many
16678 eccentricities.
16679
16680 * src/lex.h, src/lex.c: Remove.
16681 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
16682 (copy_character, copy_string2, copy_string, copy_identifier)
16683 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
16684 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
16685 (parse_action): Remove.
16686 * po/POTFILES.in: Adjust.
16687
16688 2002-06-11 Akim Demaille <akim@epita.fr>
16689
16690 * src/reader.c (parse_action): Don't store directly into the
16691 rule's action member: return the action as a string.
16692 Don't require `rule_length' as an argument: compute it.
16693 (grammar_current_rule_symbol_append)
16694 (grammar_current_rule_action_append): New, eved out from
16695 (readgram): here.
16696 Remove `action_flag', `rulelength', unused now.
16697
16698 2002-06-11 Akim Demaille <akim@epita.fr>
16699
16700 * src/reader.c (grammar_current_rule_prec_set).
16701 (grammar_current_rule_check): New, eved out from...
16702 (readgram): here.
16703 Remove `xaction', `first_rhs': useless.
16704 * tests/input.at (Type clashes): New.
16705 * tests/existing.at (GNU Cim Grammar): Adjust.
16706
16707 2002-06-11 Akim Demaille <akim@epita.fr>
16708
16709 * src/reader.c (grammar_midrule_action): New, Eved out from
16710 (readgram): here.
16711
16712 2002-06-11 Akim Demaille <akim@epita.fr>
16713
16714 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
16715 New.
16716 (readgram): Use them as replacement of inlined code, crule and
16717 crule1.
16718
16719 2002-06-11 Akim Demaille <akim@epita.fr>
16720
16721 * src/reader.c (grammar_end, grammar_symbol_append): New.
16722 (readgram): Use them.
16723 Make the use of `p' as local as possible.
16724
16725 2002-06-10 Akim Demaille <akim@epita.fr>
16726
16727 GCJ's parser requires the tokens to be defined before the prologue.
16728
16729 * data/bison.simple: Output the token definition before the user's
16730 prologue.
16731 * tests/regression.at (Braces parsing, Duplicate string)
16732 (Mixing %token styles): Check the output from bison.
16733 (Early token definitions): New.
16734
16735 2002-06-10 Akim Demaille <akim@epita.fr>
16736
16737 * src/symtab.c (symbol_user_token_number_set): Don't complain when
16738 assigning twice the same user number to a token, so that we can
16739 use it in...
16740 * src/lex.c (lex): here.
16741 Also use `symbol_class_set' instead of hand written code.
16742 * src/reader.c (parse_assoc_decl): Likewise.
16743
16744 2002-06-10 Akim Demaille <akim@epita.fr>
16745
16746 * src/symtab.c, src/symtab.c (symbol_class_set)
16747 (symbol_user_token_number_set): New.
16748 * src/reader.c (parse_token_decl): Use them.
16749 Use a switch instead of ifs.
16750 Use a single argument.
16751
16752 2002-06-10 Akim Demaille <akim@epita.fr>
16753
16754 Remove `%thong' support as it is undocumented, unused, duplicates
16755 `%token's job, and creates useless e-mail traffic with people who
16756 want to know what it is, why it is undocumented, unused, and
16757 duplicates `%token's job.
16758
16759 * src/reader.c (parse_thong_decl): Remove.
16760 * src/options.c (option_table): Remove "thong".
16761 * src/lex.h (tok_thong): Remove.
16762
16763 2002-06-10 Akim Demaille <akim@epita.fr>
16764
16765 * src/symtab.c, src/symtab.c (symbol_type_set)
16766 (symbol_precedence_set): New.
16767 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
16768 (value_components_used): Remove, unused.
16769
16770 2002-06-09 Akim Demaille <akim@epita.fr>
16771
16772 Move symbols handling code out of the reader.
16773
16774 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
16775 (axiom): Move to...
16776 * src/symtab.h, src/symtab.c: here.
16777
16778 * src/gram.c (start_symbol): Remove: use startsymbol->number.
16779 * src/reader.c (startval): Rename as...
16780 * src/symtab.h, src/symtab.c (startsymbol): this.
16781 * src/reader.c: Adjust.
16782
16783 * src/reader.c (symbol_check_defined, symbol_make_alias)
16784 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
16785 (token_translations_init)
16786 Move to...
16787 * src/symtab.c: here.
16788 * src/reader.c (packsymbols): Move to...
16789 * src/symtab.h, src/symtab.c (symbols_pack): here.
16790 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
16791 argument.
16792
16793 2002-06-03 Akim Demaille <akim@epita.fr>
16794
16795 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
16796 then statements.
16797
16798 2002-06-03 Akim Demaille <akim@epita.fr>
16799
16800 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
16801 structs with non literals.
16802 * src/scan-skel.l: never-interactive.
16803 * src/conflicts.c (enum conflict_resolution_e): No trailing
16804 comma.
16805 * src/getargs.c (usage): Split long literal strings.
16806 Reported by Hans Aberg.
16807
16808 2002-05-28 Akim Demaille <akim@epita.fr>
16809
16810 * data/bison.c++: Use C++ ostreams.
16811 (cdebug_): New member.
16812
16813 2002-05-28 Akim Demaille <akim@epita.fr>
16814
16815 * src/output.c (output_skeleton): Be sure to allocate enough room
16816 for `/' _and_ for `\0' in full_skeleton.
16817
16818 2002-05-28 Akim Demaille <akim@epita.fr>
16819
16820 * data/bison.c++: Catch up with bison.simple:
16821 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16822 and Paul Eggert <eggert@twinsun.com>: `error' handing.
16823 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
16824 and popping traces.
16825
16826 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16827
16828 * src/output.c (output_skeleton): Put an explicit path in front of
16829 the skeleton file name, rather than relying on the -I directory,
16830 to partially alleviate effects of having a skeleton file lying around
16831 in the current directory.
16832
16833 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16834
16835 * src/conflicts.c (log_resolution): Correct typo:
16836 obstack_printf should be obstack_fgrow1.
16837
16838 2002-05-26 Akim Demaille <akim@epita.fr>
16839
16840 * src/state.h (state_t): `solved_conflicts' is a new member.
16841 * src/LR0.c (new_state): Set it to 0.
16842 * src/conflicts.h, src/conflicts.c (print_conflicts)
16843 (free_conflicts, solve_conflicts): Rename as...
16844 (conflicts_print, conflicts_free, conflicts_solve): these.
16845 Adjust callers.
16846 * src/conflicts.c (enum conflict_resolution_e)
16847 (solved_conflicts_obstack): New, used by...
16848 (log_resolution): this.
16849 Adjust to attach the conflict resolution to each state.
16850 Complete the description with the precedence/associativity
16851 information.
16852 (resolve_sr_conflict): Adjust.
16853 * src/print.c (print_state): Output its solved_conflicts.
16854 * tests/conflicts.at (Unresolved SR Conflicts)
16855 (Solved SR Conflicts): Exercise --report=all.
16856
16857 2002-05-26 Akim Demaille <akim@epita.fr>
16858
16859 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
16860 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
16861 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
16862 (token_number_t, item_number_as_token_number)
16863 (token_number_as_item_number, muscle_insert_token_number_table):
16864 Rename as...
16865 (symbol_number_t, item_number_as_symbol_number)
16866 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
16867 these, since it is more appropriate.
16868
16869 2002-05-26 Akim Demaille <akim@epita.fr>
16870
16871 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
16872 `Error:' lines.
16873 * data/bison.simple (yystos) [YYDEBUG]: New.
16874 (yyparse) [YYDEBUG]: Display the symbols which are popped during
16875 error recovery.
16876 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
16877
16878 2002-05-25 Akim Demaille <akim@epita.fr>
16879
16880 * doc/bison.texinfo (Debugging): Split into...
16881 (Tracing): this new section, its former contents, and...
16882 (Understanding): this new section.
16883 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
16884 by...
16885 (report_flag): this.
16886 Adjust all dependencies.
16887 (report_args, report_types, report_argmatch): New.
16888 (usage, getargs): Report/support -r, --report.
16889 * src/options.h
16890 (struct option_table_struct): Rename as..,
16891 (struct option_table_s): this.
16892 Rename the `set_flag' member to `flag' to match with getopt_long's
16893 struct.
16894 * src/options.c (option_table): Split verbose into an entry for
16895 %verbose, and another for --verbose.
16896 Support --report/-r, so remove -r from the obsolete --raw.
16897 * src/print.c: Attach full item sets and lookaheads reports to
16898 report_flag instead of trace_flag.
16899 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
16900
16901 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16902 and Paul Eggert <eggert@twinsun.com>
16903
16904 * data/bison.simple (yyparse): Correct error handling to conform to
16905 POSIX and yacc. Specifically, after syntax error is discovered,
16906 do not reduce further before shifting the error token.
16907 Clean up the code a bit by removing the labels yyerrdefault,
16908 yyerrhandle, yyerrpop.
16909 * NEWS: Document the above.
16910
16911 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16912
16913 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
16914 type; it isn't always big enough, since it doesn't necessarily
16915 include non-terminals.
16916 (yytranslate): Expand definition of yy_token_number_type, so that
16917 the latter can be removed.
16918 (yy_token_number_type): Remove, only one use.
16919 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
16920 don't use TokenNumberType as element type.
16921
16922 * tests/regression.at: Modify expected output to agree with change
16923 to yyr1 and yytranslate.
16924
16925 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
16926
16927 * src/reader.c (parse_action): Use copy_character instead of
16928 obstack_1grow.
16929
16930 2002-05-13 Akim Demaille <akim@epita.fr>
16931
16932 * tests/regression.at (Token definitions): Prototype yylex and
16933 yyerror.
16934
16935 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16936
16937 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
16938 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
16939 32-bit arithmetic.
16940 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
16941
16942 2002-05-07 Akim Demaille <akim@epita.fr>
16943
16944 * tests/synclines.at: Be sure to prototype yylex and yyerror to
16945 avoid GCC warnings.
16946
16947 2002-05-07 Akim Demaille <akim@epita.fr>
16948
16949 Kill GCC warnings.
16950
16951 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
16952 over the RHS of each rule.
16953 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
16954 * src/state.h (state_t): Member `nitems' is unsigned short.
16955 * src/LR0.c (get_state): Adjust.
16956 * src/reader.c (packgram): Likewise.
16957 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
16958 `Type'.
16959 (muscle_insert_int_table): Remove, unused.
16960 (prepare_rules): Remove `max'.
16961
16962 2002-05-06 Akim Demaille <akim@epita.fr>
16963
16964 * src/closure.c (print_firsts): Display of the symbol tags.
16965 (bitmatrix_print): Move to...
16966 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
16967 here.
16968 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
16969
16970 2002-05-06 Akim Demaille <akim@epita.fr>
16971
16972 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
16973 hash_do_for_each.
16974
16975 2002-05-06 Akim Demaille <akim@epita.fr>
16976
16977 * src/LR0.c (new_state, get_state): Instead of using the global
16978 `kernel_size' and `kernel_base', have two new arguments:
16979 `core_size' and `core'.
16980 Adjust callers.
16981
16982 2002-05-06 Akim Demaille <akim@epita.fr>
16983
16984 * src/reader.c (packgram): No longer end `ritem' with a 0
16985 sentinel: it is not used.
16986
16987 2002-05-05 Akim Demaille <akim@epita.fr>
16988
16989 New experimental feature: display the lookaheads in the report and
16990 graph.
16991
16992 * src/print (print_core): When --trace-flag, display the rules
16993 lookaheads.
16994 * src/print_graph.c (print_core): Likewise.
16995 Swap the arguments.
16996 Adjust caller.
16997
16998 2002-05-05 Akim Demaille <akim@epita.fr>
16999
17000 * tests/torture.at (Many lookaheads): New test.
17001
17002 2002-05-05 Akim Demaille <akim@epita.fr>
17003
17004 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
17005 (GENERATE_MUSCLE_INSERT_TABLE): this.
17006 (output_int_table, output_unsigned_int_table, output_short_table)
17007 (output_token_number_table, output_item_number_table): Replace with...
17008 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
17009 (muscle_insert_short_table, muscle_insert_token_number_table)
17010 (muscle_insert_item_number_table): these.
17011 Adjust all callers.
17012 (prepare_tokens): Don't free `translations', since...
17013 * src/reader.h, src/reader.c (grammar_free): do it.
17014 Move to...
17015 * src/gram.h, src/gram.c (grammar_free): here.
17016 * data/bison.simple, data/bison.c++: b4_token_number_max is now
17017 b4_translate_max.
17018
17019 2002-05-05 Akim Demaille <akim@epita.fr>
17020
17021 * src/output.c (output_unsigned_int_table): New.
17022 (prepare_rules): `i' is unsigned.
17023 `prhs', `rline', `r2' are unsigned int.
17024 Rename muscle `rhs_number_max' as `rhs_max'.
17025 Output muscles `prhs_max', `rline_max', and `r2_max'.
17026 Free rline and r1.
17027 * data/bison.simple, data/bison.c++: Adjust to use these muscles
17028 to compute types instead of constant types.
17029 * tests/regression.at (Web2c Actions): Adjust.
17030
17031 2002-05-04 Akim Demaille <akim@epita.fr>
17032
17033 * src/symtab.h (SALIAS, SUNDEF): Rename as...
17034 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
17035 Adjust dependencies.
17036 * src/output.c (token_definitions_output): Be sure not to output a
17037 `#define 'a'' when fed with `%token 'a' "a"'.
17038 * tests/regression.at (Token definitions): New.
17039
17040 2002-05-03 Paul Eggert <eggert@twinsun.com>
17041
17042 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
17043 for K&R C.
17044
17045 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
17046
17047 * Makefile.am (SUBDIRS): Remove intl.
17048 (EXTRA_DIST): Add config/config.rpath.
17049
17050 2002-05-03 Akim Demaille <akim@epita.fr>
17051
17052 * data/bison.simple (m4_if): Don't output empty enums.
17053 And actually, output valid enum definitions :(.
17054
17055 2002-05-03 Akim Demaille <akim@epita.fr>
17056
17057 * configure.bat: Remove, completely obsolete.
17058 * Makefile.am (EXTRA_DIST): Adjust.
17059 Don't distribute config.rpath...
17060 * config/Makefile.am (EXTRA_DIST): Do it.
17061
17062 2002-05-03 Akim Demaille <akim@epita.fr>
17063
17064 * configure.in (GETTEXT_VERSION): New.
17065 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
17066
17067 2002-05-03 Akim Demaille <akim@epita.fr>
17068
17069 * data/bison.simple (b4_token_enum): New.
17070 (b4_token_defines): Use it to output tokens both as #define and
17071 enums.
17072 Suggested by Paul Eggert.
17073 * src/output.c (token_definitions_output): Don't output spurious
17074 white spaces.
17075
17076 2002-05-03 Akim Demaille <akim@epita.fr>
17077
17078 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17079
17080 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
17081
17082 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
17083 Update the stack class, give a try to deque as the default container.
17084
17085 2002-05-02 Akim Demaille <akim@epita.fr>
17086
17087 * data/bison.simple (yyparse): Do not implement @$ = @1.
17088 (YYLLOC_DEFAULT): Adjust to do it.
17089 * doc/bison.texinfo (Location Default Action): Fix.
17090
17091 2002-05-02 Akim Demaille <akim@epita.fr>
17092
17093 * src/reader.c (parse_braces): Merge into...
17094 (parse_action): this.
17095
17096 2002-05-02 Akim Demaille <akim@epita.fr>
17097
17098 * configure.in (ALL_LINGUAS): Remove.
17099 * po/LINGUAS, hr.po: New.
17100
17101 2002-05-02 Akim Demaille <akim@epita.fr>
17102
17103 Remove the so called hairy (semantic) parsers.
17104
17105 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
17106 * src/gram.h, src/gram.c (semantic_parser): Remove.
17107 (rule_t): Remove the guard and guard_line members.
17108 * src/lex.h (token_t): remove tok_guard.
17109 * src/options.c (option_table): Remove %guard and %semantic_parser
17110 support.
17111 * src/output.c, src/output.h (guards_output): Remove.
17112 (prepare): Adjust.
17113 (token_definitions_output): Don't output the `T'
17114 tokens (???).
17115 (output_skeleton): Don't output the guards.
17116 * src/files.c, src/files.c (attrsfile): Remove.
17117 * src/reader.c (symbol_list): Remove the guard and guard_line
17118 members.
17119 Adjust dependencies.
17120 (parse_guard): Remove.
17121 * data/bison.hairy: Remove.
17122 * doc/bison.texinfo (Environment Variables): Remove occurrences of
17123 BISON_HAIRY.
17124
17125 2002-05-02 Akim Demaille <akim@epita.fr>
17126
17127 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
17128 (parse_guard): Rename the formal argument `stack_offset' as
17129 `rule_length', which is more readable.
17130 Adjust callers.
17131 (copy_at, copy_dollar): Instead of outputting the hard coded
17132 values of $$, $n and so forth, output invocation to b4_lhs_value,
17133 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
17134 Note: this patch partially drops `semantic-parser' support: it
17135 always does `rule_length - n', where semantic parsers ought to
17136 always use `-n'.
17137 * data/bison.simple, data/bison.c++ (b4_lhs_value)
17138 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
17139
17140 2002-05-02 Akim Demaille <akim@epita.fr>
17141
17142 * configure.in (AC_INIT): Bump to 1.49b.
17143 (AM_INIT_AUTOMAKE): Short invocation.
17144
17145 2002-05-02 Akim Demaille <akim@epita.fr>
17146
17147 Version 1.49a.
17148
17149 2002-05-01 Akim Demaille <akim@epita.fr>
17150
17151 * src/skeleton.h: Remove.
17152
17153 2002-05-01 Akim Demaille <akim@epita.fr>
17154
17155 * src/skeleton.h: Fix the #endif.
17156 Reported by Magnus Fromreide.
17157
17158 2002-04-26 Paul Eggert <eggert@twinsun.com>
17159
17160 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
17161 Define if we define YYSTYPE and YYLTYPE, respectively.
17162 (YYCOPY): Fix [] quoting problem in the non-GCC case.
17163
17164 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
17165
17166 * src/scan-skel.l: Postprocess quadrigraphs.
17167
17168 * src/reader.c (copy_character): New function, used to output
17169 single characters while replacing `[' and `]' with quadrigraphs, to
17170 avoid troubles with M4 quotes.
17171 (copy_comment): Output characters with copy_character.
17172 (read_additionnal_code): Likewise.
17173 (copy_string2): Likewise.
17174 (copy_definition): Likewise.
17175
17176 * tests/calc.at: Exercise M4 quoting.
17177
17178 2002-04-25 Akim Demaille <akim@epita.fr>
17179
17180 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
17181 between `!' and the command.
17182 Reported by Paul Eggert.
17183
17184 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
17185
17186 * tests/calc.at: Exercise prologue splitting.
17187
17188 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
17189 `b4_post_prologue' instead of `b4_prologue'.
17190
17191 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
17192 muscles.
17193 (output): Free pre_prologue_obstack and post_prologue_obstack.
17194 * src/files.h, src/files.c (attrs_obstack): Remove.
17195 (pre_prologue_obstack, post_prologue_obstack): New.
17196 * src/reader.c (copy_definition): Add a parameter to specify the
17197 obstack to fill, instead of using attrs_obstack unconditionally.
17198 (read_declarations): Pass pre_prologue_obstack to copy_definition if
17199 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
17200
17201 2002-04-23 Paul Eggert <eggert@twinsun.com>
17202
17203 * data/bison.simple: Remove unnecessary commentary and white
17204 space differences from 1_29-branch.
17205 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
17206
17207 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
17208 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
17209 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
17210 constructors or destructors.
17211
17212 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
17213
17214 2002-04-23 Akim Demaille <akim@epita.fr>
17215
17216 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
17217 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
17218 location with columns.
17219 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
17220 All reported by Paul Eggert.
17221
17222 2002-04-22 Akim Demaille <akim@epita.fr>
17223
17224 * src/reduce.c (dump_grammar): Move to...
17225 * src/gram.h, src/gram.c (grammar_dump): here.
17226 Be sure to separate long item numbers.
17227 Don't read the members of a rule's prec if its nil.
17228
17229 2002-04-22 Akim Demaille <akim@epita.fr>
17230
17231 * src/output.c (table_size, table_grow): New.
17232 (MAXTABLE): Remove, replace uses with table_size.
17233 (pack_vector): Instead of dying when the table is too big, grow it.
17234
17235 2002-04-22 Akim Demaille <akim@epita.fr>
17236
17237 * data/bison.simple (yyr1): Its type is that of a token number.
17238 * data/bison.c++ (r1_): Likewise.
17239 * tests/regression.at (Web2c Actions): Adjust.
17240
17241 2002-04-22 Akim Demaille <akim@epita.fr>
17242
17243 * src/reader.c (token_translations_init): 256 is now the default
17244 value for the error token, i.e., it will be assigned another
17245 number if the user assigned 256 to one of her tokens.
17246 (reader): Don't force 256 to error.
17247 * doc/bison.texinfo (Symbols): Adjust.
17248 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
17249 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
17250 etc. instead of 10, 20, 30 (which was used to `jump' over error
17251 (256) and undefined (2)).
17252
17253 2002-04-22 Akim Demaille <akim@epita.fr>
17254
17255 Propagate more token_number_t.
17256
17257 * src/gram.h (token_number_as_item_number)
17258 (item_number_as_token_number): New.
17259 * src/output.c (GENERATE_OUTPUT_TABLE): New.
17260 Use it to create output_item_number_table and
17261 output_token_number_table.
17262 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17263 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
17264 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
17265 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
17266
17267 2002-04-22 Akim Demaille <akim@epita.fr>
17268
17269 * src/output.h, src/output.c (get_lines_number): Remove.
17270
17271 2002-04-19 Akim Demaille <akim@epita.fr>
17272
17273 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
17274 as Lex/Flex'.
17275 (Debugging): More details about enabling the debugging features.
17276 (Table of Symbols): Describe $$, $n, @$, and @n.
17277 Suggested by Tim Josling.
17278
17279 2002-04-19 Akim Demaille <akim@epita.fr>
17280
17281 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
17282
17283 2002-04-10 Akim Demaille <akim@epita.fr>
17284
17285 * src/system.h: Rely on HAVE_LIMITS_H.
17286 Suggested by Paul Eggert.
17287
17288 2002-04-09 Akim Demaille <akim@epita.fr>
17289
17290 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
17291 full stderr, and strip it according to the bison options, instead
17292 of composing the error message from different bits.
17293 This makes it easier to check for several error messages.
17294 Adjust all the invocations.
17295 Add an invocation exercising the error token.
17296 Add an invocation demonstrating a stupid error message.
17297 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
17298 Adjust the tests.
17299 Error message are for stderr, not stdout.
17300
17301 2002-04-09 Akim Demaille <akim@epita.fr>
17302
17303 * src/gram.h, src/gram.c (error_token_number): Remove, use
17304 errtoken->number.
17305 * src/reader.c (reader): Don't specify the user token number (2)
17306 for $undefined, as it uselessly prevents using it.
17307 * src/gram.h (token_number_t): Move to...
17308 * src/symtab.h: here.
17309 (state_t.number): Is a token_number_t.
17310 * src/print.c, src/reader.c: Use undeftoken->number instead of
17311 hard coded 2.
17312 (Even though this 2 is not the same as above: the number of the
17313 undeftoken remains being 2, it is its user token number which
17314 might not be 2).
17315 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
17316 `user_token_number_max'.
17317 Output `undef_token_number'.
17318 * data/bison.simple, data/bison.c++: Use them.
17319 Be sure to map invalid yylex return values to
17320 `undef_token_number'. This saves us from gratuitous SEGV.
17321
17322 * tests/conflicts.at (Solved SR Conflicts)
17323 (Unresolved SR Conflicts): Adjust.
17324 * tests/regression.at (Web2c Actions): Adjust.
17325
17326 2002-04-08 Akim Demaille <akim@epita.fr>
17327
17328 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
17329 Adding #line.
17330 Remove the duplicate `typedefs'.
17331 (RhsNumberType): Fix the declaration and various other typos.
17332 Use __ofile__.
17333 * data/bison.simple: Use __ofile__.
17334 * src/scan-skel.l: Handle __ofile__.
17335
17336 2002-04-08 Akim Demaille <akim@epita.fr>
17337
17338 * src/gram.h (item_number_t): New, the type of item numbers in
17339 RITEM. Note that it must be able to code symbol numbers as
17340 positive number, and the negation of rule numbers as negative
17341 numbers.
17342 Adjust all dependencies (pretty many).
17343 * src/reduce.c (rule): Remove this `short *' pointer: use
17344 item_number_t.
17345 * src/system.h (MINSHORT, MAXSHORT): Remove.
17346 Include `limits.h'.
17347 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
17348 (shortcpy): Remove.
17349 (MAXTABLE): Move to...
17350 * src/output.c (MAXTABLE): here.
17351 (prepare_rules): Use output_int_table to output rhs.
17352 * data/bison.simple, data/bison.c++: Adjust.
17353 * tests/torture.at (Big triangle): Move the limit from 254 to
17354 500.
17355 * tests/regression.at (Web2c Actions): Ajust.
17356
17357 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
17358 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
17359 passes, but produces negative #line number, once fixed, GCC is
17360 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
17361 C), it passes.
17362 * src/state.h (state_h): Code input lines on ints, not shorts.
17363
17364 2002-04-08 Akim Demaille <akim@epita.fr>
17365
17366 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
17367 and then the grammar.
17368
17369 2002-04-08 Akim Demaille <akim@epita.fr>
17370
17371 * src/system.h: No longer using strndup.
17372
17373 2002-04-07 Akim Demaille <akim@epita.fr>
17374
17375 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
17376 * src/output.c (output_table_data): Return the longest number.
17377 (prepare_tokens): Output `token_number_max').
17378 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
17379 New.
17380 Use them to define yy_token_number_type/TokenNumberType.
17381 Use this type for yytranslate.
17382 * tests/torture.at (Big triangle): Push the limit from 124 to
17383 253.
17384 * tests/regression.at (Web2c Actions): Adjust.
17385
17386 2002-04-07 Akim Demaille <akim@epita.fr>
17387
17388 * tests/torture.at (Big triangle): New.
17389 (GNU AWK Grammar, GNU Cim Grammar): Move to...
17390 * tests/existing.at: here.
17391
17392 2002-04-07 Akim Demaille <akim@epita.fr>
17393
17394 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
17395 nritems.
17396 Adjust dependencies.
17397
17398 2002-04-07 Akim Demaille <akim@epita.fr>
17399
17400 * src/reader.c: Normalize increments to prefix form.
17401
17402 2002-04-07 Akim Demaille <akim@epita.fr>
17403
17404 * src/reader.c, symtab.c: Remove debugging code.
17405
17406 2002-04-07 Akim Demaille <akim@epita.fr>
17407
17408 Rename all the `bucket's as `symbol_t'.
17409
17410 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
17411 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
17412 * src/symtab.c, src/symtab.h (bucket): Rename as...
17413 (symbol_t): this.
17414 (symbol_list_new, bucket_check_defined, bucket_make_alias)
17415 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
17416 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
17417 (buckets_new, buckets_free, buckets_do): Rename as...
17418 (symbol_list_new, symbol_check_defined, symbol_make_alias)
17419 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
17420 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
17421 (symbols_new, symbols_free, symbols_do): these.
17422
17423 2002-04-07 Akim Demaille <akim@epita.fr>
17424
17425 Use lib/hash for the symbol table.
17426
17427 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
17428 EOF.
17429 * src/lex.c (lex): Set the `number' member of new terminals.
17430 * src/reader.c (bucket_check_defined, bucket_make_alias)
17431 (bucket_check_alias_consistence, bucket_translation): New.
17432 (reader, grammar_free, readgram, token_translations_init)
17433 (packsymbols): Adjust.
17434 (reader): Number the predefined tokens.
17435 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
17436 for predefined tokens.
17437 * src/symtab.h (bucket): Remove all the hash table related
17438 members.
17439 * src/symtab.c (symtab): Replace by...
17440 (bucket_table): this.
17441 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
17442 (buckets_new, buckets_do): New.
17443
17444 2002-04-07 Akim Demaille <akim@epita.fr>
17445
17446 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
17447 (start_symbol, max_user_token_number, semantic_parser)
17448 (error_token_number): Initialize.
17449 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
17450 Initialize.
17451 (reader): Don't.
17452 (errtoken, eoftoken, undeftoken, axiom): Extern.
17453
17454 2002-04-07 Akim Demaille <akim@epita.fr>
17455
17456 * src/gram.h (rule_s): prec and precsym are now pointers
17457 to the bucket giving the priority/associativity.
17458 Member `associativity' removed: useless.
17459 * src/reduce.c, src/conflicts.c: Adjust.
17460
17461 2002-04-07 Akim Demaille <akim@epita.fr>
17462
17463 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
17464 Properly escape the symbols' TAG when outputting them.
17465
17466 2002-04-07 Akim Demaille <akim@epita.fr>
17467
17468 * src/lalr.h (LA): Is a bitsetv, not bitset*.
17469
17470 2002-04-07 Akim Demaille <akim@epita.fr>
17471
17472 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
17473 (LArule): this, which is an array to rule_t*.
17474 * src/print.c, src/conflicts.c: Adjust.
17475
17476 2002-04-07 Akim Demaille <akim@epita.fr>
17477
17478 * src/gram.h (rule_t): Rename `number' as `user_number'.
17479 `number' is a new member.
17480 Adjust dependencies.
17481 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
17482
17483 2002-04-07 Akim Demaille <akim@epita.fr>
17484
17485 As a result of the previous patch, it is no longer needed
17486 to reorder ritem itself.
17487
17488 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
17489
17490 2002-04-07 Akim Demaille <akim@epita.fr>
17491
17492 Be sure never to walk through RITEMS, but use only data related to
17493 the rules themselves. RITEMS should be banished.
17494
17495 * src/output.c (output_token_translations): Rename as...
17496 (prepare_tokens): this.
17497 In addition to `translate', prepare the muscles `tname' and
17498 `toknum', which were handled by...
17499 (output_rule_data): this.
17500 Remove, and move the remainder of its outputs into...
17501 (prepare_rules): this new routines, which also merges content from
17502 (output_gram): this.
17503 (prepare_rules): Be sure never to walk through RITEMS.
17504 (output_stos): Rename as...
17505 (prepare_stos): this.
17506 (output): Always invoke prepare_states, after all, just don't use it
17507 in the output if you don't need it.
17508
17509 2002-04-07 Akim Demaille <akim@epita.fr>
17510
17511 * src/LR0.c (new_state): Display `nstates' as the name of the
17512 newly created state.
17513 Adjust to initialize first_state and last_state if needed.
17514 Be sure to distinguish the initial from the final state.
17515 (new_states): Create the itemset of the initial state, and use
17516 new_state.
17517 * src/closure.c (closure): Now that the initial state has its
17518 items properly set, there is no need for a special case when
17519 creating `ruleset'.
17520
17521 As a result, now the rule 0, reducing to $axiom, is visible in the
17522 outputs. Adjust the test suite.
17523
17524 * tests/conflicts.at (Solved SR Conflicts)
17525 (Unresolved SR Conflicts): Adjust.
17526 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
17527 * tests/conflicts.at (S/R in initial): New.
17528
17529 2002-04-07 Akim Demaille <akim@epita.fr>
17530
17531 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
17532 the RHS of the rules.
17533 * src/output.c (output_gram): Likewise.
17534
17535 2002-04-07 Akim Demaille <akim@epita.fr>
17536
17537 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
17538 bucket.
17539 Adjust all dependencies.
17540 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
17541 `number' of the buckets too.
17542 * src/gram.h: Include `symtab.h'.
17543 (associativity): Move to...
17544 * src/symtab.h: here.
17545 No longer include `gram.h'.
17546
17547 2002-04-07 Akim Demaille <akim@epita.fr>
17548
17549 * src/gram.h, src/gram.c (rules_rhs_length): New.
17550 (ritem_longest_rhs): Use it.
17551 * src/gram.h (rule_t): `number' is a new member.
17552 * src/reader.c (packgram): Set it.
17553 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
17554 the end of `rules', and count them out of `nrules'.
17555 (reduce_output, dump_grammar): Adjust.
17556 * src/print.c (print_grammar): It is no longer needed to check for
17557 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
17558 * tests/reduce.at (Reduced Automaton): New test.
17559
17560 2002-04-07 Akim Demaille <akim@epita.fr>
17561
17562 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
17563 lacking `+ 1' to nrules, Bison reported as useless a token if it
17564 was used solely to set the precedence of the last rule...
17565
17566 2002-04-07 Akim Demaille <akim@epita.fr>
17567
17568 * data/bison.c++, data/bison.simple: Don't output the current file
17569 name in #line, to avoid useless diffs between two identical
17570 outputs under different names.
17571
17572 2002-04-07 Akim Demaille <akim@epita.fr>
17573
17574 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
17575 Normalize loops to using `< nrules + 1', not `<= nrules'.
17576
17577 2002-04-07 Akim Demaille <akim@epita.fr>
17578
17579 * TODO: Update.
17580
17581 2002-04-07 Akim Demaille <akim@epita.fr>
17582
17583 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
17584 bucket.value as bucket.number.
17585
17586 2002-04-07 Akim Demaille <akim@epita.fr>
17587
17588 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
17589 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
17590 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
17591 RHS, instead of being an index in RITEMS.
17592
17593 2002-04-04 Paul Eggert <eggert@twinsun.com>
17594
17595 * doc/bison.texinfo: Update copyright date.
17596 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
17597 (Symbols): Warn about running Bison in one character set,
17598 but compiling and/or running in an incompatible one.
17599 Warn about character code 256, too.
17600
17601 2002-04-03 Paul Eggert <eggert@twinsun.com>
17602
17603 * src/bison.data (YYSTACK_ALLOC): Depend on whether
17604 YYERROR_VERBOSE is nonzero, not whether it is defined.
17605
17606 Merge changes from bison-1_29-branch.
17607
17608 2002-03-20 Paul Eggert <eggert@twinsun.com>
17609
17610 Merge fixes from Debian bison_1.34-1.diff.
17611
17612 * configure.in (AC_PREREQ): 2.53.
17613
17614 2002-03-20 Akim Demaille <akim@epita.fr>
17615
17616 * src/conflicts.c (log_resolution): Argument `resolution' is const.
17617
17618 2002-03-19 Paul Eggert <eggert@twinsun.com>
17619
17620 * src/bison.simple (YYCOPY): New macro.
17621 (YYSTACK_RELOCATE): Use it.
17622 Remove Type arg; no longer needed. All callers changed.
17623 (yymemcpy): Remove; no longer needed.
17624
17625 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
17626 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
17627
17628 2002-03-19 Akim Demaille <akim@epita.fr>
17629
17630 Test and fix the #line outputs.
17631
17632 * tests/atlocal.at (GCC): New.
17633 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
17634 (Prologue synch line, %union synch line, Postprologue synch line)
17635 (Action synch line, Epilogue synch line): New tests.
17636 * src/reader.c (parse_union_decl): Define the muscle stype_line.
17637 * data/bison.simple, data/bison.c++: Use it.
17638
17639 2002-03-19 Akim Demaille <akim@epita.fr>
17640
17641 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
17642 (Solved SR Conflicts, %expect not enough, %expect right)
17643 (%expect too much): Move to...
17644 * tests/conflicts.at: this new file.
17645
17646 2002-03-19 Akim Demaille <akim@epita.fr>
17647
17648 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17649 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
17650 that we can move to enums for instance.
17651 * src/output.c (token_definitions_output): Output a list of
17652 `token-name, token-number' instead of the #define.
17653 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
17654
17655 2002-03-14 Akim Demaille <akim@epita.fr>
17656
17657 Use Gettext 0.11.1.
17658
17659 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
17660
17661 * data/bison.c++: Make the user able to add members to the generated
17662 parser by subclassing.
17663
17664 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
17665
17666 * src/reader.c (read_additionnal_code): `c' should be an integer, not
17667 a character.
17668 Reported by Nicolas Tisserand and Nicolas Burrus.
17669
17670 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
17671
17672 * src/reader.c: Warn about lacking semi-colons, do not complain.
17673
17674 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
17675
17676 * data/bison.c++: Remove a debug line.
17677
17678 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
17679
17680 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
17681 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
17682 provide a default implementation.
17683
17684 2002-03-04 Akim Demaille <akim@epita.fr>
17685
17686 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
17687 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
17688 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
17689 * tests/semantic.at (Parsing Guards): Similarly.
17690 * src/reader.at (readgram): Complain if the last rule is not ended
17691 with a semi-colon.
17692
17693 2002-03-04 Akim Demaille <akim@epita.fr>
17694
17695 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
17696 * src/closure.c: here.
17697 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
17698 RTC.
17699 * src/warshall.h, src/warshall.c: Remove.
17700 * tests/sets.at (Broken Closure): Adjust.
17701
17702 2002-03-04 Akim Demaille <akim@epita.fr>
17703
17704 * src/output.c (output_skeleton): tempdir is const.
17705 bytes_read is unused.
17706
17707 2002-03-04 Akim Demaille <akim@epita.fr>
17708
17709 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
17710 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
17711 Update.
17712 From Michael Hayes.
17713
17714 2002-03-04 Akim Demaille <akim@epita.fr>
17715
17716 * src/closure.c (closure): `r' is unused.
17717
17718 2002-03-04 Akim Demaille <akim@epita.fr>
17719
17720 * tests/sets.at (Broken Closure): Add the ending `;'.
17721 * src/reader.at (readgram): Complain if a rule is not ended with a
17722 semi-colon.
17723
17724 2002-03-04 Akim Demaille <akim@epita.fr>
17725
17726 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
17727 (count_sr_conflicts): Use bitset_count.
17728 * src/reduce.c (inaccessable_symbols): Ditto.
17729 (bits_size): Remove.
17730 * src/warshall.h, src/warshall.c: Convert to bitsetv.
17731
17732 2002-03-04 Akim Demaille <akim@epita.fr>
17733
17734 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
17735 * src/reduce.c: Remove the `bitset_zero's following the
17736 `bitset_create's, as now it is performed by the latter.
17737
17738 2002-03-04 Akim Demaille <akim@epita.fr>
17739
17740 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
17741 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
17742 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
17743 latest sources from Michael.
17744
17745 2002-03-04 Akim Demaille <akim@epita.fr>
17746
17747 * src/output.c (output): Don't free the grammar.
17748 * src/reader.c (grammar_free): New.
17749 * src/main.c (main): Call it and don't free symtab here.
17750
17751 2002-03-04 Akim Demaille <akim@epita.fr>
17752
17753 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
17754 before returning.
17755 Reported by Benoit Perrot.
17756
17757 2002-03-04 Akim Demaille <akim@epita.fr>
17758
17759 Use bitset operations when possible, not loops over bits.
17760
17761 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
17762 bitset_or.
17763 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
17764 * src/reduce.c (useless_nonterminals): Formatting changes.
17765 * src/warshall.c (TC): Use bitset_or.
17766
17767 2002-03-04 Akim Demaille <akim@epita.fr>
17768
17769 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
17770 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
17771 Ditto.
17772
17773 2002-03-04 Akim Demaille <akim@epita.fr>
17774
17775 * src/lalr.c (F): Now a bitset*.
17776 Adjust all dependencies.
17777
17778 2002-03-04 Akim Demaille <akim@epita.fr>
17779
17780 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
17781 Adjust all dependencies.
17782
17783 2002-03-04 Akim Demaille <akim@epita.fr>
17784
17785 * src/L0.c, src/LR0.h (nstates): Be size_t.
17786 Adjust comparisons (signed vs unsigned).
17787 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
17788 bitset*.
17789 Adjust all dependencies.
17790
17791 2002-03-04 Akim Demaille <akim@epita.fr>
17792
17793 * src/closure.c (firsts): Now, also a bitset.
17794 Adjust all dependencies.
17795 (varsetsize): Remove, now unused.
17796 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
17797
17798 2002-03-04 Akim Demaille <akim@epita.fr>
17799
17800 * src/print.c: Convert to use bitset.h, not hand coded iterations
17801 over ints.
17802
17803 2002-03-04 Akim Demaille <akim@epita.fr>
17804
17805 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
17806
17807 2002-03-04 Akim Demaille <akim@epita.fr>
17808
17809 * src/closure.c (ruleset): Be a bitset.
17810 (rulesetsize): Remove.
17811
17812 2002-03-04 Akim Demaille <akim@epita.fr>
17813
17814 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
17815 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
17816 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
17817 * src/closure.c (fderives): Be an array of bitsets.
17818
17819 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
17820
17821 * data/bison.c++: Merge the two generated headers. Insert a copyright
17822 notice in each output file.
17823
17824 2002-02-28 Akim Demaille <akim@epita.fr>
17825
17826 * data/bison.c++: Copy the prologue of bison.simple to fetch
17827 useful M4 definitions, such as b4_header_guard.
17828
17829 2002-02-25 Akim Demaille <akim@epita.fr>
17830
17831 * src/getargs.c (version): Give the name of the authors, and use a
17832 translator friendly scheme for the bgr
17833 copyright notice.
17834
17835 2002-02-25 Akim Demaille <akim@epita.fr>
17836
17837 * src/output.c (header_output): Remove, now handled completely via
17838 M4.
17839
17840 2002-02-25 Akim Demaille <akim@epita.fr>
17841
17842 * m4/m4.m4: New, from CVS Autoconf.
17843 * configure.in: Invoke it.
17844 * src/output.c (output_skeleton): Use its result instead of the
17845 hard coded name.
17846
17847 2002-02-25 Akim Demaille <akim@epita.fr>
17848
17849 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
17850 Fileutils 4.1.5.
17851 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
17852 * src/output.c (output_skeleton): Use mkstemp to create a real
17853 temporary file.
17854 Move the filling of `skeleton' and its muscle to...
17855 (prepare): here.
17856 (output): Move the definition of the prologue muscle to...
17857 (prepare): here.
17858 * src/system.h (DEFAULT_TMPDIR): New.
17859
17860 2002-02-14 Paul Eggert <eggert@twinsun.com>
17861
17862 Remove the support for C++ namespace cleanliness; it was
17863 causing more problems than it was curing, since it didn't work
17864 properly on some nonstandard C++ compilers. This can wait
17865 for a proper C++ parser.
17866
17867 * NEWS: Document this.
17868 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
17869 of C++, as it's treated like C now.
17870 * src/bison.simple (YYSTD): Remove.
17871 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
17872 Treat C++ just like Standard C instead of trying to support
17873 namespace cleanliness.
17874
17875 2002-02-14 Akim Demaille <akim@epita.fr>
17876
17877 * tests/regression.at (else): Adjust to Andreas' change.
17878
17879 2002-02-14 Akim Demaille <akim@epita.fr>
17880
17881 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
17882
17883 2002-02-13 Andreas Schwab <schwab@suse.de>
17884
17885 * src/output.c (output_rule_data): Don't output NULL, it might
17886 not be defined yet.
17887
17888 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
17889
17890 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
17891 (Copyright notice): Update.
17892
17893 2002-02-11 Akim Demaille <akim@epita.fr>
17894
17895 * tests/regression.at (%nonassoc and eof): Don't include
17896 nonportable headers.
17897
17898 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
17899
17900 * data/bison.c++: Correct error recovery. Make the user able to
17901 initialize the starting location.
17902
17903 2002-02-07 Akim Demaille <akim@epita.fr>
17904
17905 * tests/input.at: New.
17906
17907 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17908
17909 * data/bison.c++: Replace some direct m4 expansions by constants. Be
17910 more consistent when naming methods and variables. Put preprocessor
17911 directives around tables only needed for debugging.
17912
17913 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17914
17915 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
17916 C++ parsers.
17917 (yy::b4_name::parse): Use print_.
17918
17919 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17920
17921 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
17922
17923 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17924
17925 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
17926 C++ parsers.
17927 (yy::b4_name::parse): Build verbose error messages, and use error_.
17928
17929 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
17930
17931 * data/bison.c++: Fix m4 quoting in comments.
17932
17933 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
17934
17935 * data/bison.c++: Adjust the parser code. Fix some muscles that were
17936 not expanded by m4.
17937
17938 2002-02-05 Akim Demaille <akim@epita.fr>
17939
17940 * data/bison.c++: Adjust to the M4 back end.
17941 More is certainly needed.
17942
17943 2002-02-05 Akim Demaille <akim@epita.fr>
17944
17945 Give a try to M4 as a back end.
17946
17947 * lib/readpipe.c: New, from wdiff.
17948 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
17949 BISON_HAIRY.
17950 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
17951 specific values. Now it is m4 that performs the lookup.
17952 * src/parse-skel.y: Remove.
17953 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
17954 * src/output.c (actions_output, guards_output)
17955 (token_definitions_output): No longer keeps track of the output
17956 line number, hence remove the second argument.
17957 (guards_output): Check against the guard member of a rule, not the
17958 action member.
17959 Adjust callers.
17960 (output_skeleton): Don't look for the skeleton location, let m4 do
17961 that.
17962 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
17963 file will be used.
17964 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
17965 (prepare): Given that for the time being changesyntax is not
17966 usable in M4, rename the muscles using `-' to `_'.
17967 Define `defines_flag', `output_parser_name' and `output_header_name'.
17968 * src/output.h (actions_output, guards_output)
17969 (token_definitions_output): Adjust prototypes.
17970 * src/scan-skel.l: Instead of scanning the skeletons, it now
17971 processes the output of m4: `__oline__' and `#output'.
17972 * data/bison.simple: Adjust to be used by M4(sugar).
17973 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
17974 to date.
17975 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
17976 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
17977 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
17978 shamelessly stolen from CVS Autoconf.
17979
17980 2002-02-05 Akim Demaille <akim@epita.fr>
17981
17982 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
17983 * configure.in: Check for the declarations of free and malloc.
17984 * src/muscle_tab.c: Adjust.
17985
17986 2002-02-05 Akim Demaille <akim@epita.fr>
17987
17988 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
17989 which have no values.
17990
17991 2002-02-05 Akim Demaille <akim@epita.fr>
17992
17993 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
17994 * data/: here.
17995
17996 2002-01-29 Paul Eggert <eggert@twinsun.com>
17997
17998 * src/bison.simple (YYSIZE_T): Do not define merely because
17999 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
18000 On some platforms, <alloca.h> does not declare YYSTD (size_t).
18001
18002 2002-01-27 Akim Demaille <akim@epita.fr>
18003
18004 Fix `%nonassoc and eof'.
18005
18006 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
18007 which were not properly copied! Replace
18008 memcpy (res->errs, src->errs, src->nerrs);
18009 with
18010 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
18011 !!!
18012 * tests/regression.at (%nonassoc and eof): Adjust to newest
18013 Autotest: `.' is not in the PATH.
18014
18015 2002-01-27 Akim Demaille <akim@epita.fr>
18016
18017 * tests/sets.at (AT_EXTRACT_SETS): New.
18018 (Nullable): Use it.
18019 (Firsts): New.
18020
18021 2002-01-26 Akim Demaille <akim@epita.fr>
18022
18023 * tests/actions.at, tests/calc.at, tests/headers.at,
18024 * tests/torture.at: Adjust to the newest Autotest which no longer
18025 forces `.' in the PATH.
18026
18027 2002-01-25 Akim Demaille <akim@epita.fr>
18028
18029 * tests/regression.at (%nonassoc and eof): New.
18030 Suggested by Robert Anisko.
18031
18032 2002-01-24 Akim Demaille <akim@epita.fr>
18033
18034 Bison dumps core when trying to complain about broken input files.
18035 Reported by Cris van Pelt.
18036
18037 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
18038 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
18039 into...
18040 (Invalid inputs): Strengthen: exercise parse_percent_token.
18041
18042 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
18043
18044 * src/Makefile.am: Add bison.c++.
18045 * src/bison.c++: New skeleton.
18046
18047 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
18048
18049 * po/it.po: New.
18050
18051 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
18052
18053 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
18054
18055 2002-01-20 Marc Autret <marc@gnu.org>
18056
18057 * src/files.c (compute_output_file_names): Fix
18058
18059 2002-01-20 Marc Autret <marc@gnu.org>
18060
18061 * tests/output.at: New test.
18062 * src/files.c (compute_base_names): Don't map extensions when
18063 the YACC flag is set, use defaults.
18064 Reported by Evgeny Stambulchik.
18065
18066 2002-01-20 Marc Autret <marc@gnu.org>
18067
18068 * src/system.h: Need to define __attribute__ away for non-GCC
18069 compilers as well (i.e., the vendor C compiler).
18070 Suggested by Albert Chin-A-Young.
18071
18072 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
18073
18074 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
18075 canonical definition.
18076 * src/system.h: Use the canonical definition for PARAMS (avoids
18077 a conflict with the macro from lib/hash.h).
18078
18079 2002-01-11 Akim Demaille <akim@epita.fr>
18080
18081 * configure.in: Use AC_FUNC_STRNLEN.
18082 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
18083
18084 2002-01-09 Akim Demaille <akim@epita.fr>
18085
18086 * src/files.c, src/files.h (output_infix): New.
18087 (tab_extension): Remove.
18088 (compute_base_names): Compute the former, drop the latter.
18089 * src/output.c (prepare): Insert the muscles `output-infix', and
18090 `output-suffix'.
18091 * src/parse-skel.y (string, string.1): New.
18092 (section.header): Use it.
18093 (section.yacc): Remove.
18094 (prefix): Remove too.
18095 * src/scan-skel.l: Adjust.
18096 * src/bison.simple, src/bison.hairy: Adjust.
18097
18098 2002-01-09 Akim Demaille <akim@epita.fr>
18099
18100 * configure.in (WERROR_CFLAGS): Compute it.
18101 * src/Makefile.am (CFLAGS): Pass it.
18102 * tests/atlocal.in (CFLAGS): Idem.
18103 * src/files.c: Fix a few warnings.
18104 (get_extension_index): Remove, unused.
18105
18106 2002-01-08 Akim Demaille <akim@epita.fr>
18107
18108 * src/getargs.c (AS_FILE_NAME): New.
18109 (getargs): Use it to convert DOSish file names.
18110 * src/files.c (base_name): Rename as full_base_name to avoid
18111 clashes with `base_name ()'.
18112 (filename_split): New.
18113 (compute_base_names): N-th rewrite, using filename_split.
18114
18115 2002-01-08 Akim Demaille <akim@epita.fr>
18116
18117 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
18118 New, stolen from the Fileutils 4.1.
18119 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
18120 * configure.in: Check for the presence of memrchr, and of its
18121 prototype.
18122
18123 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
18124
18125 * lib/hash.h (__P): Added definition for this macro.
18126 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
18127 BUILT_SOURCES, to ensure they are generated first.
18128 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
18129 %error-verbose to allow bootstrapping with bison 1.30x.
18130
18131 2002-01-06 Akim Demaille <akim@epita.fr>
18132
18133 * src/reader.c (parse_braces): Don't fetch the next char, the
18134 convention is to fetch on entry.
18135 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
18136 'switch' without a following semicolon.
18137 * tests/regression.at (braces parsing): New.
18138
18139 2002-01-06 Akim Demaille <akim@epita.fr>
18140
18141 Bison is dead wrong in its RR conflict reports.
18142
18143 * tests/torture.at (GNU Cim Grammar): New.
18144 * src/conflicts.c (count_rr_conflicts): Fix.
18145
18146 2002-01-06 Akim Demaille <akim@epita.fr>
18147
18148 Creating package.m4 from configure.ac causes too many problems.
18149
18150 * tests/Makefile.am (package.m4): Create it by hand,
18151 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
18152
18153 2002-01-06 Akim Demaille <akim@epita.fr>
18154
18155 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
18156 skeleton.h.
18157
18158 2002-01-04 Paul Eggert <eggert@twinsun.com>
18159
18160 * doc/bison.texinfo (Debugging):
18161 Remove YYSTDERR; it's no longer defined or used.
18162 Also, s/cstdio.h/cstdio/.
18163
18164 2002-01-03 Akim Demaille <akim@epita.fr>
18165
18166 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
18167
18168 2002-01-03 Akim Demaille <akim@epita.fr>
18169
18170 * src/parse-skel.y (process_skeleton): Don't bind the parser's
18171 tracing code to --trace, wait for a better --trace option, with
18172 args.
18173
18174 2002-01-03 Akim Demaille <akim@epita.fr>
18175
18176 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
18177 The ISO C++ standard is extremely clear about it: stderr is
18178 considered a macro, not a regular symbol (see table 94 `Header
18179 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
18180 Therefore std:: does not apply to it. It still does with fprintf.
18181 Also, s/cstdio.h/cstdio/.
18182
18183 2002-01-03 Akim Demaille <akim@epita.fr>
18184
18185 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
18186 for non system headers.
18187
18188 2002-01-02 Akim Demaille <akim@epita.fr>
18189
18190 Equip the skeleton chain with location tracking, runtime trace,
18191 pure parser and scanner.
18192
18193 * src/parse-skel.y: Request a pure parser, locations, and prefix
18194 renaming.
18195 (%union): Having several members with the same type does not help
18196 type mismatches, simplify.
18197 (YYPRINT, yyprint): New.
18198 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
18199 (skel_error): this.
18200 Handle locations.
18201 * src/scan-skel.l: Adjust to these changes.
18202 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
18203 (LOCATION_PRINT, skel_control_t): New.
18204
18205 2001-12-30 Akim Demaille <akim@epita.fr>
18206
18207 * src/parse-skel.y: Get rid of the shift/reduce conflict:
18208 replace `gb' with BLANKS.
18209 * src/scan-skel.l: Adjust.
18210
18211 2001-12-30 Akim Demaille <akim@epita.fr>
18212
18213 * src/system.h: We don't need nor want bcopy.
18214 Throw away MS-DOS crap: we don't need getpid.
18215 * configure.in: We don't need strndup. It was even causing
18216 problems: because Flex includes the headers *before* us,
18217 _GNU_SOURCE is not defined by config.h, and therefore strndup was
18218 not visible.
18219 * lib/xstrndup.c: New.
18220 * src/scan-skel.l: Use it.
18221 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
18222 * src/parse-skel.y: Use %directives instead of #defines.
18223
18224 2001-12-30 Akim Demaille <akim@epita.fr>
18225
18226 * src/skeleton.h: New.
18227 * src/output.c (output_parser, output_master_parser): Remove, dead
18228 code.
18229 * src/output.h (get_lines_number, actions_output, guards_output)
18230 (token_definitions_output): Prototype them.
18231 * src/parse-skel.y: Add the license notice.
18232 Include output.h and skeleton.h.
18233 (process_skeleton): Returns void, and takes a single parameter.
18234 * src/scan-skel.l: Add the license notice.
18235 Include skeleton.h.
18236 Don't use %option yylineno: it seems that then Flex imagines
18237 REJECT has been used, and therefore it won't reallocate its
18238 buffers (which makes no other sense to me than a bug). It results
18239 in warnings for `unused: yy_flex_realloc'.
18240
18241 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
18242
18243 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18244 (MUSCLE_INSERT_PREFIX): ...to there.
18245 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18246 (MUSCLE_INSERT_PREFIX): Move from here...
18247
18248 * src/bison.hairy: Add a section directive. Put braces around muscle
18249 names. This parser skeleton is still broken, but Bison should not
18250 choke on a bad muscle 'syntax'.
18251 * src/bison.simple: Add a section directive. Put braces around muscle
18252 names.
18253
18254 * src/files.h (strsuffix, stringappend): Add declarations.
18255 (tab_extension): Add declaration.
18256 (short_base_name): Add declaration.
18257
18258 * src/files.c (strsuffix, stringappend): No longer static. These
18259 functions are used in the skeleton parser.
18260 (tab_extension): New.
18261 (compute_base_names): Use the computations done in this function
18262 to guess if the generated parsers should have '.tab' in their
18263 names.
18264 (short_base_name): No longer static.
18265
18266 * src/output.c (output_skeleton): New.
18267 (output): Disable call to output_master_parser, and give a try to
18268 a new skeleton handling system.
18269 (guards_output, actions_output): No longer static.
18270 (token_definitions_output, get_lines_number): No longer static.
18271
18272 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
18273
18274 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
18275 parse-skel.y.
18276
18277 * src/parse-skel.y: New file.
18278 * src/scan-skel.l: New file.
18279
18280 2001-12-29 Akim Demaille <akim@epita.fr>
18281
18282 %name-prefix is broken.
18283
18284 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
18285 Adjust all dependencies.
18286 * tests/headers.at (export YYLTYPE): Strengthen this test: use
18287 %name-prefix.
18288
18289 Renaming yylval but not yylloc is not consistent. Now we do.
18290
18291 * src/bison.simple: Prefix yylloc if used.
18292 * doc/bison.texinfo (Decl Summary): Document that.
18293
18294 2001-12-29 Akim Demaille <akim@epita.fr>
18295
18296 * doc/bison.texinfo: Promote `%long-directive' over
18297 `%long_directive'.
18298 Remove all references to fixed-output-files, yacc is enough.
18299
18300 2001-12-29 Akim Demaille <akim@epita.fr>
18301
18302 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
18303 user prologue. These are defaults.
18304 * tests/actions.at (Mid-rule actions): Make sure the user can
18305 define YYDEBUG and YYERROR_VERBOSE.
18306
18307 2001-12-29 Akim Demaille <akim@epita.fr>
18308
18309 * src/output.c (header_output): Don't forget to export YYLTYPE and
18310 yylloc.
18311 * tests/headers.at (export YYLTYPE): New, make sure it does.
18312 * tests/regression.at (%union and --defines, Invalid CPP headers):
18313 Move to...
18314 * tests/headers.at: here.
18315
18316 2001-12-29 Akim Demaille <akim@epita.fr>
18317
18318 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
18319
18320 2001-12-29 Akim Demaille <akim@epita.fr>
18321
18322 * tests/actions.at (Mid-rule actions): Output on a single line
18323 instead of several.
18324
18325 2001-12-29 Akim Demaille <akim@epita.fr>
18326
18327 * doc/bison.texinfo: Formatting changes.
18328
18329 2001-12-29 Akim Demaille <akim@epita.fr>
18330
18331 Don't store the token defs in a muscle, just be ready to output it
18332 on command. Now possible via `symbols'. Fixes a memory leak.
18333
18334 * src/output.c (token_definitions_output): New.
18335 (output_parser, header_output): Use it.
18336 * src/reader.c (symbols_save): Remove.
18337
18338 2001-12-29 Akim Demaille <akim@epita.fr>
18339
18340 * src/bison.simple: Do not provide a default for YYSTYPE and
18341 YYLTYPE before the user's prologue. Otherwise it's hardly... a
18342 default.
18343
18344 2001-12-29 Akim Demaille <akim@epita.fr>
18345
18346 Mid-rule actions are simply... ignored!
18347
18348 * src/reader.c (readgram): Be sure to attach mid-rule actions to
18349 the empty-rule associated to the dummy symbol, not to the host
18350 rule.
18351 * tests/actions.at (Mid-rule actions): New.
18352
18353 2001-12-29 Akim Demaille <akim@epita.fr>
18354
18355 Memory leak.
18356
18357 * src/reader.c (reader): Free grammar.
18358
18359 2001-12-29 Akim Demaille <akim@epita.fr>
18360
18361 Memory leak.
18362
18363 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
18364 since it allocates it for each state, although only one is needed.
18365 (allocate_storage): Do it here.
18366
18367 2001-12-29 Akim Demaille <akim@epita.fr>
18368
18369 * src/options.h, src/options.c (create_long_option_table): Rename
18370 as...
18371 (long_option_table_new): this, with a clearer prototype.
18372 (percent_table): Remove, unused,
18373 * src/getargs.c (getargs): Adjust.
18374
18375 2001-12-29 Akim Demaille <akim@epita.fr>
18376
18377 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
18378 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
18379 as states.
18380
18381 2001-12-29 Akim Demaille <akim@epita.fr>
18382
18383 * src/lalr.c (build_relations): Rename `states' as `states1'.
18384 Sorry, I don't understand exactly what it is, no better name...
18385
18386 2001-12-29 Akim Demaille <akim@epita.fr>
18387
18388 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
18389 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
18390 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
18391 as rules.
18392
18393 2001-12-29 Akim Demaille <akim@epita.fr>
18394
18395 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
18396 ago.
18397
18398 2001-12-29 Akim Demaille <akim@epita.fr>
18399
18400 * src/reader.c, src/reader.h (user_toknums): Remove.
18401 Adjust all users to use symbols[i]->user_token_number.
18402
18403 2001-12-29 Akim Demaille <akim@epita.fr>
18404
18405 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
18406 Adjust all users to use symbols[i]->prec or ->assoc.
18407
18408 2001-12-29 Akim Demaille <akim@epita.fr>
18409
18410 * src/reader.c, src/reader.h (tags): Remove.
18411 Adjust all users to use symbols[i]->tag.
18412
18413 2001-12-29 Akim Demaille <akim@epita.fr>
18414
18415 * src/gram.h, src/gram.c (symbols): New, similar to state_table
18416 and rule_table.
18417 * src/reader.c (packsymbols): Fill this table.
18418 Drop sprec.
18419 * src/conflicts.c (resolve_sr_conflict): Adjust.
18420 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
18421 single table.
18422 Use symbols[i]->tag instead of tags[i].
18423
18424 2001-12-29 Akim Demaille <akim@epita.fr>
18425
18426 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
18427 In addition, put a comment in there, to replace...
18428 * tests/regression.at (%union and C comments): Remove.
18429
18430 2001-12-29 Akim Demaille <akim@epita.fr>
18431
18432 * tests/regression.at (Web2c Actions): Blindly move the actual
18433 output as expected output. The contents *seem* right to me, but I
18434 can't pretend reading perfectly parser tables... Nonetheless, all
18435 the other tests pass correctly, the table look OK, even though the
18436 presence of `$axiom' is to be noted: AFAICS it is useless (but
18437 harmless).
18438
18439 2001-12-29 Akim Demaille <akim@epita.fr>
18440
18441 * src/reader.c (readgram): Don't add the rule 0 if there were no
18442 rules read. In other words, add it _after_ having performed
18443 grammar sanity checks.
18444 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
18445
18446 2001-12-29 Akim Demaille <akim@epita.fr>
18447
18448 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
18449 visible, and some states have now a different number.
18450
18451 2001-12-29 Akim Demaille <akim@epita.fr>
18452
18453 * src/reader.c (readgram): Bind the initial rule's lineno to that
18454 of the first rule.
18455 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
18456 (Solved SR Conflicts): Adjust rule 0's line number.
18457
18458 2001-12-29 Akim Demaille <akim@epita.fr>
18459
18460 Fix the `GAWK Grammar' failure.
18461
18462 * src/LR0.c (final_state): Initialize to -1 so that we do compute
18463 the reductions of the first state which was mistakenly confused
18464 with the final state because precisely final_state was initialized
18465 to 0.
18466 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
18467 now noticed by Bison.
18468 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
18469 have a reduction on $default.
18470
18471 2001-12-29 Akim Demaille <akim@epita.fr>
18472
18473 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
18474 rule line numbers.
18475 * src/closure.c (print_closure): Likewise.
18476 * src/derives.c (print_derives): Likewise.
18477 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
18478 now.
18479
18480 2001-12-29 Akim Demaille <akim@epita.fr>
18481
18482 * src/lalr.c (lookaheads_print): New.
18483 (lalr): Call it when --trace-flag.
18484 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
18485 are dumped.
18486
18487 2001-12-29 Akim Demaille <akim@epita.fr>
18488
18489 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
18490 when walking through ritem, even via rule->rhs.
18491 * src/reduce.c (dump_grammar, useful_production, reduce_output)
18492 (useful_production, useless_nonterminals): Likewise.
18493 (reduce_grammar_tables): Likewise, plus update nritems.
18494 * src/nullable.c (set_nullable): Likewise.
18495 * src/lalr.c (build_relations): Likewise.
18496 * tests/sets.at (Nullable): Adjust.
18497 Fortunately, now, the $axiom is no longer nullable.
18498
18499 2001-12-29 Akim Demaille <akim@epita.fr>
18500
18501 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
18502 the 0-sentinel.
18503 * src/gram.c (ritem_longest_rhs): Likewise.
18504 * src/reduce.c (nonterminals_reduce): Likewise.
18505 * src/print_graph.c (print_graph): Likewise.
18506 * src/output.c (output_rule_data): Likewise.
18507 * src/nullable.c (set_nullable): Likewise.
18508
18509 2001-12-29 Akim Demaille <akim@epita.fr>
18510
18511 * src/output.c: Comment changes.
18512
18513 2001-12-27 Paul Eggert <eggert@twinsun.com>
18514
18515 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
18516 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
18517 Sparc, as they were causing more porting problems than the
18518 (minor) performance improvement was worth.
18519
18520 Also, catch up with 1.31's YYSTD.
18521
18522 2001-12-27 Akim Demaille <akim@epita.fr>
18523
18524 * src/output.c (output_gram): Rely on nritems, not the
18525 0-sentinel. See below.
18526 Use -1 as separator, not 0.
18527 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
18528 Rely on -1 as separator in yyrhs, instead of 0.
18529 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
18530 twice `Now at end of input', therefore there are two lines less to
18531 expect.
18532
18533 2001-12-27 Akim Demaille <akim@epita.fr>
18534
18535 * tests/regression.at (Unresolved SR Conflicts):
18536 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
18537 below.
18538
18539 2001-12-27 Akim Demaille <akim@epita.fr>
18540
18541 * src/LR0.c (new_state): Recognize the final state by the fact it
18542 is reached by eoftoken.
18543 (insert_start_shifting_state, insert_eof_shifting_state)
18544 (insert_accepting_state, augment_automaton): Remove, since now
18545 these states are automatically computed from the initial state.
18546 (generate_states): Adjust.
18547 * src/print.c: When reporting a rule number to the user, substract
18548 1, so that the axiom rule is rule 0, and the first user rule is 1.
18549 * src/reduce.c: Likewise.
18550 * src/print_graph.c (print_core): For the time being, just as for
18551 the report, depend upon --trace-flags to dump the full set of
18552 items.
18553 * src/reader.c (readgram): Once the grammar read, insert the rule
18554 0: `$axiom: START-SYMBOL $'.
18555 * tests/set.at: Adjust: rule 0 is now displayed, and since the
18556 number of the states has changed (the final state is no longer
18557 necessarily the last), catch up.
18558
18559 2001-12-27 Akim Demaille <akim@epita.fr>
18560
18561 Try to make the use of the eoftoken valid. Given that its value
18562 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
18563 is used instead of > 0 where appropriate, (ii), depend upon nritems
18564 instead of the 0-sentinel.
18565
18566 * src/gram.h, src/gram.c (nritems): New.
18567 Expected to be duplication of nitems, but for the time being...
18568 * src/reader.c (packgram): Assert nritems and nitems are equal.
18569 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
18570 * src/closure.c (print_closure, print_fderives): Likewise.
18571 * src/gram.c (ritem_print): Likewise.
18572 * src/print.c (print_core, print_grammar): Likewise.
18573 * src/print_graph.c: Likewise.
18574
18575 2001-12-27 Akim Demaille <akim@epita.fr>
18576
18577 * src/main.c (main): If there are complains after grammar
18578 reductions, then output the report anyway if requested, then die.
18579 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
18580 * src/reader.c (eoftoken): New.
18581 (parse_token_decl): If the token being defined has value `0', it
18582 is the eoftoken.
18583 (packsymbols): No longer hack `tags' to insert `$' by hand.
18584 Be sure to preserve the value of the eoftoken.
18585 (reader): Make sure eoftoken is defined.
18586 Initialize nsyms to 0: now eoftoken is created just like the others.
18587 * src/print.c (print_grammar): Don't special case the eof token.
18588 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
18589 lie anyway, albeit pleasant.
18590 * tests/calc.at: Exercise error messages with eoftoken.
18591 Change the grammar so that empty input is invalid.
18592 Adjust expectations.
18593 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
18594
18595 2001-12-27 Akim Demaille <akim@epita.fr>
18596
18597 * configure.in: Check the protos of strchr ans strspn.
18598 Replace strchr if needed.
18599 * src/system.h: Provide the protos of strchr, strspn and memchr if
18600 missing.
18601 * lib/strchr.c: New.
18602 * src/reader.c (symbols_save): Use strchr.
18603
18604 2001-12-27 Akim Demaille <akim@epita.fr>
18605
18606 * src/print.c, src/print_graph.c (escape): New.
18607 Use it to quote the TAGS outputs.
18608 * src/print_graph.c (print_state): Now errors are in red, and
18609 reductions in green.
18610 Prefer high to wide: output the state number on a line of its own.
18611
18612 2001-12-27 Akim Demaille <akim@epita.fr>
18613
18614 * src/state.h, src/state.c (reductions_new): New.
18615 * src/LR0.c (set_state_table): Let all the states have a
18616 `reductions', even if reduced to 0.
18617 (save_reductions): Adjust.
18618 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
18619 * src/print.c (print_reductions, print_actions): Adjust.
18620 * src/output.c (action_row): Adjust.
18621
18622 2001-12-27 Akim Demaille <akim@epita.fr>
18623
18624 * src/state.h, src/state.c (errs_new, errs_dup): New.
18625 * src/LR0.c (set_state_table): Let all the states have an errs,
18626 even if reduced to 0.
18627 * src/print.c (print_errs, print_reductions): Adjust.
18628 * src/output.c (output_actions, action_row): Adjust.
18629 * src/conflicts.c (resolve_sr_conflict): Adjust.
18630
18631 2001-12-27 Akim Demaille <akim@epita.fr>
18632
18633 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
18634
18635 2001-12-27 Akim Demaille <akim@epita.fr>
18636
18637 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
18638 * src/print.c: here.
18639 (lookaheadset, shiftset): New, used as additional storage by
18640 print_reductions.
18641 (print_results): Adjust.
18642 (print_shifts, print_gotos, print_errs): New, extracted from...
18643 (print_actions): here.
18644 * src/print_graph.c (print_actions): Remove dead code.
18645
18646 2001-12-27 Akim Demaille <akim@epita.fr>
18647
18648 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
18649 `$n' and `@n'.
18650
18651 2001-12-27 Akim Demaille <akim@epita.fr>
18652
18653 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
18654 (build_relations): Adjust.
18655
18656 2001-12-27 Akim Demaille <akim@epita.fr>
18657
18658 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
18659 duplication.
18660
18661 2001-12-27 Akim Demaille <akim@epita.fr>
18662
18663 * src/reader.c (packgram): Catch nitems overflows.
18664
18665 2001-12-27 Akim Demaille <akim@epita.fr>
18666
18667 * src/files.c, src/files.h (guard_obstack): Remove.
18668 * src/output.c (output): Adjust.
18669 * src/reader.c (parse_braces): New, factoring...
18670 (copy_action, copy_guard): these two which are renamed as...
18671 (parse_action, parse_guard): these.
18672 As a voluntary consequence, using braces around guards is now
18673 mandatory.
18674
18675 2001-12-27 Akim Demaille <akim@epita.fr>
18676
18677 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
18678 * src/reader.c (symbol_list): `guard' and `guard_line' are new
18679 members.
18680 (symbol_list_new): Adjust.
18681 (copy_action): action_line is the first line, not the last.
18682 (copy_guard): Just as for actions, store the `action' only, not
18683 the switch/case/break flesh.
18684 Don't parse the user action that might follow the guard, let...
18685 (readgram): do it, i.e., now, there can be an action after a
18686 guard.
18687 In other words the guard is just explicitly optional.
18688 (packgram): Adjust.
18689 * src/output.c (guards_output): New.
18690 (output_parser): Call it when needed.
18691 (output): Also free the guard and attrs obstacks.
18692 * src/files.c, src/files.h (obstack_save): Remove.
18693 (output_files): Remove.
18694 As a result, if one needs the former `.act' file, using an
18695 appropriate skeleton which requires actions and guards is now
18696 required.
18697 * src/main.c (main): Adjust.
18698 * tests/semantic.at: New.
18699 * tests/regression.at: Use `input.y' as input file name.
18700 Avoid 8+3 problems by requiring input.c when the test needs the
18701 parser.
18702
18703 2001-12-27 Akim Demaille <akim@epita.fr>
18704
18705 * src/reader.c (symbol_list_new): Be sure to initialize all the
18706 fields.
18707
18708 2001-12-27 Akim Demaille <akim@epita.fr>
18709
18710 All the hacks using a final pseudo state are now useless.
18711
18712 * src/LR0.c (set_state_table): state_table holds exactly nstates.
18713 * src/lalr.c (nLA): New.
18714 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
18715 instead of lookaheadsp from the pseudo state (nstate + 1).
18716
18717 2001-12-27 Akim Demaille <akim@epita.fr>
18718
18719 * src/output.c (action_row, token_actions): Use a state_t instead
18720 of a integer, and nlookaheads instead of the following state's
18721 lookaheadsp.
18722
18723 2001-12-27 Akim Demaille <akim@epita.fr>
18724
18725 * src/conflicts.c (log_resolution, flush_shift)
18726 (resolve_sr_conflict, set_conflicts, solve_conflicts)
18727 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
18728 (conflicts_print, print_reductions): Use a state_t instead of an
18729 integer when referring to a state.
18730 As much as possible, depend upon nlookaheads, instead of the
18731 `lookaheadsp' member of the following state (since lookaheads of
18732 successive states are successive, the difference between state n + 1
18733 and n served as the number of lookaheads for state n).
18734 * src/lalr.c (add_lookback_edge): Likewise.
18735 * src/print.c (print_core, print_actions, print_state)
18736 (print_results): Likewise.
18737 * src/print_graph.c (print_core, print_actions, print_state)
18738 (print_graph): Likewise.
18739 * src/conflicts.h: Adjust.
18740
18741 2001-12-27 Akim Demaille <akim@epita.fr>
18742
18743 * src/bison.hairy: Formatting/comment changes.
18744 ANSIfy.
18745 Remove `register' indications.
18746 Add plenty of `static'.
18747
18748 2001-12-27 Akim Demaille <akim@epita.fr>
18749
18750 * src/output.c (prepare): Drop the muscle `ntbase' which
18751 duplicates ntokens.
18752 * src/bison.simple: Formatting/comment changes.
18753 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
18754 is an undocumented synonym.
18755
18756 2001-12-22 Akim Demaille <akim@epita.fr>
18757
18758 * src/output.c (output_table_data): Change the prototype to use
18759 `int' for array ranges: some invocations do pass an int, not a
18760 short.
18761 Reported by Wayne Green.
18762
18763 2001-12-22 Akim Demaille <akim@epita.fr>
18764
18765 Some actions of web2c.y are improperly triggered.
18766 Reported by Mike Castle.
18767
18768 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
18769 * tests/regression.at (Web2c): Rename as...
18770 (Web2c Report): this.
18771 (Web2c Actions): New.
18772
18773 2001-12-22 Akim Demaille <akim@epita.fr>
18774
18775 Reductions in web2c.y are improperly reported.
18776 Reported by Mike Castle.
18777
18778 * src/conflicts.c (print_reductions): Fix.
18779 * tests/regression.at (Web2c): New.
18780
18781 2001-12-18 Akim Demaille <akim@epita.fr>
18782
18783 Some host fail on `assert (!"foo")', which expands to
18784 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
18785 Reported by Nelson Beebee.
18786
18787 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
18788 `#define it_succeeded 0' and `assert (it_succeeded)'.
18789
18790 2001-12-17 Marc Autret <autret_m@epita.fr>
18791
18792 * src/bison.simple: Don't hard code the skeleton line and filename.
18793 * src/output.c (output_parser): Rename 'line' as 'output_line'.
18794 New line counter 'skeleton_line' (skeleton-line muscle).
18795
18796 2001-12-17 Paul Eggert <eggert@twinsun.com>
18797
18798 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
18799 YYDEBUG must be defined to a nonzero value.
18800
18801 * src/bison.simple (yytname): Do not assume that the user defines
18802 YYDEBUG to a properly parenthesized expression.
18803
18804 2001-12-17 Akim Demaille <akim@epita.fr>
18805
18806 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
18807 nlookaheads is a new member.
18808 Adjust all users.
18809 * src/lalr.h (nlookaheads): Remove this orphan declaration.
18810 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
18811 state.
18812
18813 2001-12-17 Akim Demaille <akim@epita.fr>
18814
18815 * src/files.h, src/files.c (open_files, close_files): Remove.
18816 * src/main.c (main): Don't open/close files, nor invoke lex_free,
18817 let...
18818 * src/reader.c (reader): Do it.
18819
18820 2001-12-17 Akim Demaille <akim@epita.fr>
18821
18822 * src/conflicts.c (print_reductions): Formatting changes.
18823
18824 2001-12-17 Akim Demaille <akim@epita.fr>
18825
18826 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
18827 (flush_reduce): New.
18828 (resolve_sr_conflict): Adjust.
18829
18830 2001-12-17 Akim Demaille <akim@epita.fr>
18831
18832 * src/output.c (output_obstack): Be static and rename as...
18833 (format_obstack): this, to avoid any confusion with files.c's
18834 output_obstack.
18835 * src/reader.h (muscle_obstack): Move to...
18836 * src/output.h: here, since it's defined in output.c.
18837
18838 2001-12-17 Akim Demaille <akim@epita.fr>
18839
18840 * src/output.c (action_row, save_column, default_goto)
18841 (sort_actions, matching_state, pack_vector): Better variable
18842 locality.
18843
18844 2001-12-17 Akim Demaille <akim@epita.fr>
18845
18846 * src/output.c: Various formatting changes.
18847
18848 2001-12-17 Akim Demaille <akim@epita.fr>
18849
18850 * src/files.c (output_files): Free the output_obstack.
18851 * src/main.c (main): Call print and print_graph conditionally.
18852 * src/print.c (print): Work unconditionally.
18853 * src/print_graph.c (print_graph): Work unconditionally.
18854 * src/conflicts.c (log_resolution): Output only if verbose_flag.
18855
18856 2001-12-16 Marc Autret <autret_m@epita.fr>
18857
18858 * src/output.c (actions_output): Fix. When we use %no-lines,
18859 there is one less line per action.
18860
18861 2001-12-16 Marc Autret <autret_m@epita.fr>
18862
18863 * src/bison.simple: Remove a useless #line directive.
18864 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
18865 * src/output.c (get_lines_number): New.
18866 (output_parser): Adjust, now takes care about the lines of a
18867 output muscles.
18868 Fix line numbering.
18869 (actions_output): Computes the number of lines taken by actions.
18870 (output_master_parser): Insert new skeleton which is the name of
18871 the output parser file name.
18872
18873 2001-12-15 Marc Autret <autret_m@epita.fr>
18874
18875 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
18876
18877 2001-12-15 Marc Autret <autret_m@epita.fr>
18878
18879 * src/output.c (output_gram): Keep track of the hairy one.
18880
18881 2001-12-15 Akim Demaille <akim@epita.fr>
18882
18883 Make `make distcheck' work.
18884
18885 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
18886 system.h which uses libgettext.h.
18887
18888 2001-12-15 Akim Demaille <akim@epita.fr>
18889
18890 * src/nullable.c (set_nullable): Useless rules must be skipped,
18891 otherwise, since we range over their symbols, we might look at a
18892 nonterminal which no longer ``exists'', i.e., it is not counted in
18893 `nvars', hence we overflow our arrays.
18894
18895 2001-12-15 Akim Demaille <akim@epita.fr>
18896
18897 The header can also be produced directly, without any obstack!
18898 Yahoo!
18899
18900 * src/files.c, src/files.h (defines_obstack): Remove.
18901 (compute_header_macro): Global.
18902 (defines_obstack_save): Remove.
18903 * src/reader.c (parse_union_decl): No longer output to
18904 defines_obstack: its content can be found in the `stype' muscle
18905 anyway.
18906 (output_token_translations): Merge into...
18907 (symbols_output): this.
18908 Rename as...
18909 (symbols_save): this.
18910 (reader): Adjust.
18911 * src/output.c (header_output): New.
18912 (output): Call it.
18913
18914 2001-12-15 Akim Demaille <akim@epita.fr>
18915
18916 * src/reader.c (parse_union_decl): Instead of handling two obstack
18917 simultaneously, use one to define the `stype' muscle, and use the
18918 value of the latter to fill defines_obstack.
18919 (copy_comment): Remove.
18920 (copy_comment2): Work for a single obstack.
18921 Rename as...
18922 (copy_comment): this.
18923
18924 2001-12-15 Akim Demaille <akim@epita.fr>
18925
18926 * src/lex.c, src/lex.h (xgetc): No longer static.
18927 * src/reader.c (parse_union_decl): Revamp.
18928
18929 2001-12-15 Akim Demaille <akim@epita.fr>
18930
18931 Still making progress in separating Bison into (i) input, (ii)
18932 process, (iii) output: now we can directly output the parser file
18933 without using table_obstack at all.
18934
18935 * src/files.c, src/files.h (table_obstack): Bye bye.
18936 (parser_file_name): New.
18937 * src/files.c (compute_output_file_names): Compute it.
18938 * src/output.c (actions_output, output_parser)
18939 (output_master_parser): To a file instead of an obstack.
18940
18941 2001-12-15 Akim Demaille <akim@epita.fr>
18942
18943 Attach actions to rules, instead of pre-outputting them to
18944 actions_obstack.
18945
18946 * src/gram.h (rule_t): action and action_line are new members.
18947 * src/reader.c (symbol_list): Likewise.
18948 (copy_action): Save the actions within the rule.
18949 (packgram): Save them in rule_table.
18950 * src/output.c (actions_output): New.
18951 (output_parser): Use it on `%%actions'.
18952 (output_rule_data): Don't free rule_table.
18953 (output): Do it.
18954 (prepare): Don't save the `action' muscle.
18955 * src/bison.simple: s/%%action/%%actions/.
18956
18957 2001-12-15 Akim Demaille <akim@epita.fr>
18958
18959 * src/reader.c (copy_action): When --yacc, don't append a `;'
18960 to the user action: let it fail if lacking.
18961 Suggested by Arnold Robbins and Tom Tromey.
18962
18963 2001-12-14 Akim Demaille <akim@epita.fr>
18964
18965 * src/lex.c (literalchar): Simply return the char you decoded, non
18966 longer mess around with obstacks and int pointers.
18967 Adjust all callers.
18968
18969 2001-12-14 Akim Demaille <akim@epita.fr>
18970
18971 * src/lex.c (literalchar): Don't escape the special characters,
18972 just decode them, and keep them as char (before, eol was output as
18973 the 2 char string `\n' etc.).
18974 * src/output.c (output_rule_data): Use quotearg to output the
18975 token strings.
18976
18977 2001-12-13 Paul Eggert <eggert@twinsun.com>
18978
18979 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
18980 Do not infringe on the global user namespace when using C++.
18981 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
18982 All uses of `fprintf' and `stderr' changed.
18983
18984 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
18985
18986 2001-12-13 Akim Demaille <akim@epita.fr>
18987
18988 The computation of nullable is broken: it doesn't handle empty
18989 RHS's properly.
18990
18991 * tests/torture.at (GNU AWK Grammar): New.
18992 * tests/sets.at (Nullable): New.
18993 * src/nullable.c (set_nullable): Instead of blindly looping over
18994 `ritems', loop over the rules, and then over their rhs's.
18995
18996 Work around Autotest bugs.
18997
18998 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
18999 frame, because Autotest understand lines starting with a `+' as
19000 traces from the shell. Then, they are not processed properly.
19001 Admittedly an Autotest bug, but we don't have time to wait for
19002 Autotest to catch up.
19003 * tests/regression.at (Broken Closure): Adjust to the new table
19004 frames.
19005 Move to...
19006 * tests/sets.at: here.
19007
19008 2001-12-13 Akim Demaille <akim@epita.fr>
19009
19010 * src/closure.c (closure): Use nrules instead of playing tricks
19011 with BITS_PER_WORD.
19012
19013 2001-12-13 Akim Demaille <akim@epita.fr>
19014
19015 * src/print.c (print_actions): Output the handling of `$' as the
19016 traces do: shifting the token EOF. Before EOF was treated as a
19017 nonterminal.
19018 * tests/regression.at: Adjust some tests.
19019 * src/print_graph.c (print_core): Complete the set of items via
19020 closure. The next-to-final and final states are still unsatisfying,
19021 but that's to be addressed elsewhere.
19022 No longer output the rule numbers, but do output the state number.
19023 A single loop for the shifts + gotos is enough, but picked a
19024 distinct color for each.
19025 (print_graph): Initialize and finalize closure.
19026
19027 2001-12-13 Akim Demaille <akim@epita.fr>
19028
19029 * src/reader.c (readgram): Remove dead code, an strip useless
19030 braces.
19031 (get_type): Remove, unused.
19032
19033 2001-12-12 Akim Demaille <akim@epita.fr>
19034
19035 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
19036 on that of lib/error.c.
19037
19038 2001-12-12 Akim Demaille <akim@epita.fr>
19039
19040 Some hosts don't like `/' in includes.
19041
19042 * src/system.h: Include libgettext.h without qualifying the path.
19043 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
19044 $(top_srcdir).
19045
19046 2001-12-11 Marc Autret <autret_m@epita.fr>
19047
19048 * src/output.c (output_parser): Remove useless muscle.
19049
19050 2001-12-11 Marc Autret <autret_m@epita.fr>
19051
19052 * src/bison.simple: Remove #line just before %%epilogue. It
19053 is now handled in ...
19054 * src/reader.c (read_additionnal_code): Add the output of a
19055 #line for the epilogue.
19056
19057 2001-12-10 Marc Autret <autret_m@epita.fr>
19058
19059 * src/reader.c (copy_definition): Re-use CPP-outed code which
19060 replace precedent remove.
19061 * src/bison.simple: Remove #line before %%prologue because
19062 %%input-line is wrong at this time.
19063
19064 2001-12-10 Marc Autret <autret_m@epita.fr>
19065
19066 * src/reader.c (symbols_output): Clean up.
19067 * src/output.c (output_gram, output): Clean up.
19068
19069 2001-12-10 Akim Demaille <akim@epita.fr>
19070
19071 * src/lalr.c (initialize_lookaheads): New. Extracted from...
19072 * src/LR0.c (set_state_table): here.
19073 * src/lalr.c (lalr): Call it.
19074
19075 2001-12-10 Akim Demaille <akim@epita.fr>
19076
19077 * src/state.h (shifts): Remove the `number' member: shifts are
19078 attached to state, hence no longer need to be labelled with a
19079 state number.
19080
19081 2001-12-10 Akim Demaille <akim@epita.fr>
19082
19083 Now that states have a complete set of members, the linked list of
19084 shifts is useless: just fill directly the state's shifts member.
19085
19086 * src/state.h (shifts): Remove the `next' member.
19087 * src/LR0.c (first_state, last_state): Remove.
19088 Adjust the callers.
19089 (augment_automaton): Don't look for the shifts that must be added
19090 a shift on EOF: it is those of the state we looked for! But now,
19091 since shifts are attached, it is no longer needed to looking
19092 merely by its id: its number.
19093
19094 2001-12-10 Akim Demaille <akim@epita.fr>
19095
19096 * src/LR0.c (augment_automaton): Better variable locality.
19097 Remove an impossible branch: if there is a state corresponding to
19098 the start symbol being shifted, then there is shift for the start
19099 symbol from the initial state.
19100
19101 2001-12-10 Akim Demaille <akim@epita.fr>
19102
19103 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
19104 only when appropriate: when insert_start_shifting_state' is not
19105 invoked.
19106 * tests/regression.at (Rule Line Numbers): Adjust.
19107
19108 2001-12-10 Akim Demaille <akim@epita.fr>
19109
19110 * src/LR0.c (augment_automaton): Now that all states have shifts,
19111 merge the two cases addition shifts to the initial state.
19112
19113 2001-12-10 Akim Demaille <akim@epita.fr>
19114
19115 * src/lalr.c (set_state_table): Move to...
19116 * src/LR0.c: here.
19117 * src/lalr.c (lalr): Don't call it...
19118 * src/LR0.c (generate_states): do it.
19119 * src/LR0.h (first_state): Remove, only the table is used.
19120
19121 2001-12-10 Akim Demaille <akim@epita.fr>
19122
19123 * src/LR0.h (first_shift, first_reduction): Remove.
19124 * src/lalr.c: Don't use first_shift: find shifts through the
19125 states.
19126
19127 2001-12-10 Akim Demaille <akim@epita.fr>
19128
19129 * src/LR0.c: Attach shifts to states as soon as they are
19130 computed.
19131 * src/lalr.c (set_state_table): Instead of assigning shifts to
19132 state, just assert that the mapping was properly done.
19133
19134 2001-12-10 Akim Demaille <akim@epita.fr>
19135
19136 * src/LR0.c (insert_start_shift): Rename as...
19137 (insert_start_shifting_state): this.
19138 (insert_eof_shifting_state, insert_accepting_state): New.
19139 (augment_automaton): Adjust.
19140 Better locality of the variables.
19141 When looking if the start_symbol is shifted from the initial
19142 state, using `while (... symbol != start_symbol ...)' sounds
19143 better than `while (... symbol < start_symbol ...)': If fail
19144 to see how the order between symbols could be relevant!
19145
19146 2001-12-10 Akim Demaille <akim@epita.fr>
19147
19148 * src/getargs.h: Don't declare `spec_name_prefix' and
19149 `spec_file_prefix', declared by src/files.h.
19150 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
19151 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
19152 * src/output.c (prepare): Adjust.
19153 * src/reader.c (symbols_output): Likewise.
19154 * src/vmsgetargs.c: Vaguely adjust, but who cares?
19155
19156 2001-12-10 Akim Demaille <akim@epita.fr>
19157
19158 * src/muscle_tab.c (muscle_init): NULL is a better default than
19159 `"0"'.
19160
19161 2001-12-10 Akim Demaille <akim@epita.fr>
19162
19163 * src/reader.c (reader): Calling symbols_output once is enough.
19164
19165 2001-12-10 Akim Demaille <akim@epita.fr>
19166
19167 Now that states have a complete set of members, the linked list of
19168 reductions is useless: just fill directly the state's reductions
19169 member.
19170
19171 * src/state.h (struct reductions): Remove member `number' and
19172 `next'.
19173 * src/LR0.c (first_reduction, last_reduction): Remove.
19174 (save_reductions): Don't link the new reductions, store them in
19175 this_state.
19176 * src/lalr.c (set_state_table): No need to attach reductions to
19177 states, it's already done.
19178 * src/output.c (output_actions): No longer free the shifts, then
19179 the reductions, then the states: free all the states and their
19180 members.
19181
19182 2001-12-10 Akim Demaille <akim@epita.fr>
19183
19184 * src/options.c (OPTN, DRTV, BOTH): New.
19185 (option_table): Use them.
19186
19187 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
19188 the job of system.h.
19189 * src/options.c: Don't include stdio.h and xalloc.h for the same
19190 reasons.
19191
19192 2001-12-10 Akim Demaille <akim@epita.fr>
19193
19194 * src/output.c (output, prepare): Make sure the values of the
19195 muscles `action' and `prologue' are 0-terminated.
19196
19197 2001-12-10 Akim Demaille <akim@epita.fr>
19198
19199 Clean up GCC warnings.
19200
19201 * src/reader.c (copy_action): `buf' is not used.
19202 (parse_skel_decl): Be static.
19203 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
19204 * src/options.h (create_long_option_table): Have a real prototype.
19205 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
19206 (hash_delete_at): Return const void *.
19207 Adjust casts to preserve the const.
19208
19209 2001-12-10 Akim Demaille <akim@epita.fr>
19210
19211 * configure.in: Require 2.52g.
19212 M4 is not needed, but AUTOM4TE is.
19213 * m4/m4.m4: Remove.
19214 * tests/Makefile.am: Adjust.
19215
19216 2001-12-10 Akim Demaille <akim@epita.fr>
19217
19218 One structure for states is enough, even though theoretically
19219 there are LR(0) states and LALR(1) states.
19220
19221 * src/lalr.h (state_t): Remove.
19222 (state_table): Be state_t **, not state_t *.
19223 * src/state.h (core, CORE_ALLOC): Rename as...
19224 (state_t, STATE_ALLOC): this.
19225 Add the LALR(1) members: shifts, reductions, errs.
19226 * src/LR0.c (state_table): Rename as...
19227 (state_hash): this, to avoid name clashes with the global
19228 `state_table'.
19229 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
19230 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
19231
19232 2001-12-10 Akim Demaille <akim@epita.fr>
19233
19234 Bison dumps core on bash.y.
19235 Reported by Pascal Bart.
19236
19237 * src/warshall.c (bitmatrix_print): New.
19238 (TC): Use it.
19239 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
19240 j must be the outer loop.
19241 * tests/regression.at (Broken Closure): New.
19242
19243 2001-12-05 Akim Demaille <akim@epita.fr>
19244
19245 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
19246 its argument.
19247 Reported by Peter Hamorsky.
19248
19249 2001-12-05 Akim Demaille <akim@epita.fr>
19250
19251 * src/conflicts.c (err_table): Remove.
19252 (resolve_sr_conflict): Adjust.
19253 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
19254 Rename as...
19255 (state_t.reductions, state_t.shifts): this.
19256
19257 2001-12-05 Akim Demaille <akim@epita.fr>
19258
19259 * src/reduce.c (reduce_grammar_tables): No longer disable the
19260 removal of useless rules via CPP but via `if (0)', so that the
19261 compiler still check the code is valid.
19262 For instance, it should have noticed `rline' no longer exists: use
19263 the `line' member of rule_t.
19264 * src/gram.c (dummy, rline): Remove, unused.
19265
19266 2001-12-05 Akim Demaille <akim@epita.fr>
19267
19268 * src/output.c (pack_vector): Use assert, not berror.
19269 * src/main.c (berror): Remove, unused.
19270
19271 2001-12-05 Akim Demaille <akim@epita.fr>
19272
19273 New experimental feature: if --verbose --trace output all the
19274 items of a state, not only its kernel.
19275
19276 * src/print.c (print_core): If `trace_flag', then invoke closure
19277 before outputting the items of the state (print_core is no longer
19278 a correct name them).
19279 (print_results): Invoke new_closure/free_closure if needed.
19280
19281 2001-12-05 Akim Demaille <akim@epita.fr>
19282
19283 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
19284 * src/closure.c, src/closure.h (itemsetsize): Rename as...
19285 (nitemset): for consistency with the rest of the project.
19286
19287 2001-12-05 Akim Demaille <akim@epita.fr>
19288
19289 * src/closure.c (print_closure): Improve.
19290 (closure): Use it for printing input and output.
19291
19292 2001-12-05 Akim Demaille <akim@epita.fr>
19293
19294 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
19295 indexed by nonterminals.
19296
19297 2001-12-05 Akim Demaille <akim@epita.fr>
19298
19299 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
19300 what it was!).
19301 * src/warshall.h: Remove accidental duplication of the content.
19302
19303 2001-12-05 Akim Demaille <akim@epita.fr>
19304
19305 * src/closure.c (set_fderives): De-obfuscate.
19306
19307 2001-12-05 Akim Demaille <akim@epita.fr>
19308
19309 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
19310
19311 2001-12-05 Akim Demaille <akim@epita.fr>
19312
19313 * src/closure.c (set_firsts): De-obfuscate.
19314
19315 2001-12-05 Akim Demaille <akim@epita.fr>
19316
19317 * src/output.c (action_row): De-obfuscate
19318 using the good o' techniques: arrays not pointers, variable
19319 locality, BITISSET, RESETBIT etc.
19320
19321 2001-12-05 Akim Demaille <akim@epita.fr>
19322
19323 Pessimize the code to simplify it: from now on, all the states
19324 have a valid SHIFTS, which NSHIFTS is possibly 0.
19325
19326 * src/LR0.c (shifts_new): Be global and move to..
19327 * src/state.c, src/state.h: here.
19328 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
19329 * src/print_graph: Adjust.
19330
19331 2001-12-05 Akim Demaille <akim@epita.fr>
19332
19333 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
19334 * src/conflicts.c: Use it.
19335 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
19336 incorrectly ``simplified''.
19337
19338 2001-12-05 Akim Demaille <akim@epita.fr>
19339
19340 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
19341 using the good o' techniques: arrays not pointers, variable
19342 locality, BITISSET, RESETBIT etc.
19343
19344 2001-12-05 Akim Demaille <akim@epita.fr>
19345
19346 * src/state.h (SHIFT_SYMBOL): New.
19347 * src/conflicts.c: Use it to deobfuscate.
19348
19349 2001-12-05 Akim Demaille <akim@epita.fr>
19350
19351 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
19352 (print_reductions): De-obfuscate using the good o' techniques:
19353 arrays not pointers, variable locality, BITISSET.
19354
19355 2001-12-05 Akim Demaille <akim@epita.fr>
19356
19357 * src/conflicts.c (print_reductions): Arrays, not pointers.
19358 Use BITISSET.
19359
19360 2001-12-05 Akim Demaille <akim@epita.fr>
19361
19362 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19363
19364 2001-12-05 Akim Demaille <akim@epita.fr>
19365
19366 * src/conflicts.c (print_reductions): Improve variable locality.
19367
19368 2001-12-05 Akim Demaille <akim@epita.fr>
19369
19370 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19371
19372 2001-12-05 Akim Demaille <akim@epita.fr>
19373
19374 * src/conflicts.c (print_reductions): Improve variable locality.
19375
19376 2001-12-05 Akim Demaille <akim@epita.fr>
19377
19378 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
19379 * src/lalr.c: Use them.
19380
19381 2001-12-05 Akim Demaille <akim@epita.fr>
19382
19383 * src/LR0.c (augment_automaton): Formatting changes.
19384 Better variable locality.
19385
19386 2001-12-05 Akim Demaille <akim@epita.fr>
19387
19388 * src/lalr.c (matrix_print): New.
19389 (transpose): Use it.
19390 Use arrays instead of pointers.
19391
19392 2001-12-05 Akim Demaille <akim@epita.fr>
19393
19394 * src/lalr.c (maxrhs): Move to...
19395 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
19396 * src/lalr.c (build_relations): Adjust.
19397
19398 2001-12-05 Akim Demaille <akim@epita.fr>
19399
19400 * src/lalr.c (transpose): Free the memory allocated to the
19401 argument, as it is replaced by the results by the unique caller.
19402 (build_relations): Merely invoke transpose: it handles the memory
19403 deallocation.
19404 Improve variable locality.
19405 Avoid variables used as mere abbreviations.
19406 (compute_lookaheads): Use arrays instead of pointers.
19407
19408 2001-12-05 Akim Demaille <akim@epita.fr>
19409
19410 * src/lalr.c (initialize_F): Improve variable locality.
19411 Avoid variables used as mere abbreviations.
19412
19413 2001-12-05 Akim Demaille <akim@epita.fr>
19414
19415 * src/derives.c (print_derives): Display the ruleno.
19416 * src/lalr.c (initialize_F, transpose): Better variable locality
19417 to improve readability.
19418 Avoid variables used as mere abbreviations.
19419
19420 2001-12-05 Akim Demaille <akim@epita.fr>
19421
19422 * src/lalr.c (traverse): Use arrays instead of pointers.
19423
19424 2001-12-05 Akim Demaille <akim@epita.fr>
19425
19426 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
19427 the handling of squeue.
19428 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
19429
19430 2001-12-05 Akim Demaille <akim@epita.fr>
19431
19432 Because useless nonterminals are now kept alive (instead of being
19433 `destroyed'), we now sometimes examine them, and store information
19434 related to them. Hence we need to know their number, and adjust
19435 memory allocations.
19436
19437 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
19438 static.
19439 * src/LR0.c (allocate_itemsets): The memory allocated to
19440 `symbol_count' was used for two different purpose: once to count
19441 the number of occurrences of each symbol, and later reassigned to
19442 `shift_symbol', containing the symbol that can be shifted from a
19443 given state.
19444 Deobfuscate, i.e., allocate, use and free `symbol_count' here
19445 only, and...
19446 (new_itemsets): Allocate `shift_symbol' here.
19447 (allocate_itemsets): symbol_count includes useless nonterminals.
19448 Make room for them.
19449 (free_storage): Use `free', not `XFREE', for pointers that cannot
19450 be null.
19451
19452 2001-12-05 Akim Demaille <akim@epita.fr>
19453
19454 * src/nullable.c (set_nullable): Deobfuscate the handling of
19455 ritem.
19456 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
19457
19458 2001-12-05 Akim Demaille <akim@epita.fr>
19459
19460 * src/gram.c, src/gram.h (ritem_print): New.
19461 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
19462 (This useless function was defined only to work around VMS linkers
19463 that can't handle compilation units with variables only).
19464 * src/reduce.c (dump_grammar): Use it to trace the construction of
19465 ritem.
19466
19467 2001-12-04 Paul Eggert <eggert@twinsun.com>
19468
19469 * src/bison.simple (union yyalloc): Change member names
19470 to be the same as the stack names.
19471 (yyparse): yyptr is now union yyalloc *, not char *.
19472 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
19473 and may generate better code on some machines.
19474 (yystpcpy): Use prototype if __STDC__ is defined, not just
19475 if __cplusplus is defined.
19476
19477 2001-11-30 Akim Demaille <akim@epita.fr>
19478
19479 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
19480 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
19481 Gettext doesn't compile cleanly, and dies with -Werror.
19482 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
19483 Include WARNING_CFLAGS here.
19484 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
19485 before being defined.
19486
19487 2001-11-27 Paul Eggert <eggert@twinsun.com>
19488
19489 * lib/quotearg.h (quotearg_n, quotearg_n_style):
19490 First arg is int, not unsigned.
19491 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
19492 (SIZE_MAX, UINT_MAX): New macros.
19493 (quotearg_n_options): Abort if N is negative.
19494 Avoid overflow check on hosts where size_t is 64 bits and int
19495 is 32 bits, as overflow is impossible there.
19496 Fix off-by-one typo that caused unnecessary reallocation.
19497
19498 2001-11-29 Paul Eggert <eggert@twinsun.com>
19499
19500 Name space cleanup in generated parser.
19501
19502 * doc/bison.texinfo (Bison Parser): Discuss system headers
19503 and their effect on the user name space.
19504
19505 * src/bison.simple:
19506 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
19507 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
19508 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
19509
19510 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
19511 on user names when possible.
19512
19513 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
19514 Simplify test for whather <alloca.h> exists.
19515
19516 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
19517
19518 (<stdio.h>): Include if YYDEBUG.
19519
19520 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
19521 ! defined (yyoverflow) && ! defined (yymemcpy).
19522
19523 (yymemcpy, yyparse): Rename local variables as needed so that
19524 they all begin with 'yy'.
19525
19526 (yystrlen, yystpcpy): New functions.
19527
19528 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
19529 All uses changed.
19530
19531 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
19532 instead of relying on string.h functions. Use YYSTACK_ALLOC
19533 and YYSTACK_FREE instead of malloc and free.
19534
19535 2001-11-30 Akim Demaille <akim@epita.fr>
19536
19537 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
19538 before their first uses.
19539 (YYBISON, YYPURE): Move to the top of the output.
19540
19541 2001-11-30 Akim Demaille <akim@epita.fr>
19542
19543 * tests/reduce.at (Useless Nonterminals): Fix.
19544
19545 2001-11-30 Akim Demaille <akim@epita.fr>
19546
19547 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
19548 if body instead of `;' to pacify GCC's warnings.
19549
19550 2001-11-30 Akim Demaille <akim@epita.fr>
19551
19552 Instead of mapping the LHS of unused rules to -1, keep the LHS
19553 valid, but flag the rules as invalid.
19554
19555 * src/gram.h (rule_t): `useful' is a new member.
19556 * src/print.c (print_grammar): Adjust.
19557 * src/derives.c (set_derives): Likewise.
19558 * src/reader.c (packgram, reduce_output): Likewise.
19559 * src/reduce.c (reduce_grammar_tables): Likewise.
19560 * tests/reduce.at (Underivable Rules, Useless Rules): New.
19561
19562 2001-11-30 Akim Demaille <akim@epita.fr>
19563
19564 * src/reduce.c (reduce_output): Formatting changes.
19565 * src/print.c (print_results, print_grammar): Likewise.
19566 * tests/regression.at (Rule Line Numbers)
19567 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
19568
19569 2001-11-30 Akim Demaille <akim@epita.fr>
19570
19571 * src/reduce.c (nonterminals_reduce): Instead of throwing away
19572 useless nonterminals, move them at the end of the symbol arrays.
19573 (reduce_output): Adjust.
19574 * tests/reduce.at (Useless Nonterminals): Adjust.
19575
19576 2001-11-30 Akim Demaille <akim@epita.fr>
19577
19578 * src/reduce.c: Various comment/formatting changes.
19579 (nonterminals_reduce): New, extracted from...
19580 (reduce_grammar_tables): here.
19581 (reduce_grammar): Call nonterminals_reduce.
19582
19583 2001-11-29 Paul Eggert <eggert@twinsun.com>
19584
19585 * src/bison.simple (YYSTACK_REALLOC): Remove.
19586 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
19587 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
19588 New macros.
19589 (union yyalloc): New type.
19590 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
19591 an arbitrary restriction on hosts where size_t is wider than int.
19592
19593 (yyparse): Don't dump core if alloca or malloc fails; instead, report
19594 a parser stack overflow. Allocate just one block of memory for all
19595 three stacks, instead of allocating three blocks; this typically is
19596 faster and reduces fragmentation.
19597
19598 Do not limit the number of items in the stack to a value that fits
19599 in 'int', as this is an arbitrary limit on hosts with 64-bit
19600 size_t and 32-bit int.
19601
19602 2001-11-29 Marc Autret <autret_m@epita.fr>
19603
19604 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
19605 of defining YYERROR_VERBOSE.
19606 [AT_DATA]: $4 is now out of C declarations in the prologue.
19607
19608 2001-11-28 Marc Autret <autret_m@epita.fr>
19609
19610 * src/reader.c (parse_dquoted_param): New.
19611 (parse_skel_decl): Use it.
19612 * src/lex.h: Add its prototype.
19613 * src/lex.c (literalchar): Become not static.
19614
19615 2001-11-28 Marc Autret <autret_m@epita.fr>
19616
19617 * src/output.h: And put its extern declaration here.
19618 * src/output.c (error_verbose): Define here.
19619 (prepare): Echo name modification.
19620 * src/getargs.h: Clean its extern declaration.
19621 * src/getargs.c (error_verbose_flag): Remove.
19622 (getargs): Remove case 'e'.
19623 * src/options.c (option_table): 'error-verbose' is now seen as simple
19624 percent option.
19625 Include output.h.
19626
19627 * src/reader.c (read_declarations): Remove case tok_include.
19628 (parse_include_decl): Remove.
19629 * src/lex.h (token_t): Remove tok_include.
19630 * src/options.c (option_table): 'include' is now a simple command line
19631 option.
19632
19633 2001-11-28 Marc Autret <autret_m@epita.fr>
19634
19635 * src/bison.simple: Adjust muscle names.
19636 * src/muscle_tab.c (muscle_init): Also rename the muscles.
19637 * src/output.c (prepare): s/_/-/ for the muscles names.
19638 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
19639
19640 2001-11-28 Marc Autret <autret_m@epita.fr>
19641
19642 * src/bison.simple: Fix debug.
19643 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
19644
19645 2001-11-28 Akim Demaille <akim@epita.fr>
19646
19647 * src/LR0.c (shifts_new): New.
19648 (save_shifts, insert_start_shift, augment_automaton): Use it.
19649
19650 2001-11-28 Akim Demaille <akim@epita.fr>
19651
19652 * src/closure.c (closure): `b' and `ruleno' denote the same value:
19653 keep ruleno only.
19654
19655 2001-11-28 Akim Demaille <akim@epita.fr>
19656
19657 * src/closure.c (closure): Instead of looping over word in array
19658 then bits in words, loop over bits in array.
19659
19660 2001-11-28 Akim Demaille <akim@epita.fr>
19661
19662 * src/closure.c (closure): No longer optimize the special case
19663 where all the bits of `ruleset[r]' are set to 0, to make the code
19664 clearer.
19665
19666 2001-11-28 Akim Demaille <akim@epita.fr>
19667
19668 * src/closure.c (closure): `r' and `c' are new variables, used to
19669 de-obfuscate accesses to RULESET and CORE.
19670
19671 2001-11-28 Akim Demaille <akim@epita.fr>
19672
19673 * src/reduce.c (reduce_print): Use ngettext.
19674 (dump_grammar): Improve the trace accuracy.
19675
19676 2001-11-28 Akim Demaille <akim@epita.fr>
19677
19678 * src/reduce.c (dump_grammar): Don't translate trace messages.
19679
19680 2001-11-28 Akim Demaille <akim@epita.fr>
19681
19682 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
19683 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
19684 as all tags are free'ed afterwards.
19685 From Enrico Scholz.
19686
19687 2001-11-27 Paul Eggert <eggert@twinsun.com>
19688
19689 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
19690 use alloca when we didn't want to, and vice versa.
19691
19692 2001-11-27 Marc Autret <autret_m@epita.fr>
19693
19694 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
19695 initialization.
19696 * src/output.c (prepare): Remove its update.
19697
19698 2001-11-27 Marc Autret <autret_m@epita.fr>
19699
19700 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
19701 Use %error-verbose.
19702
19703 2001-11-27 Marc Autret <autret_m@epita.fr>
19704
19705 * src/bison.simple: Remove YYERROR_VERBOSE using.
19706 Use %%error_verbose.
19707 (yyparse): Likewise.
19708 * src/output.c (prepare): Give its final value.
19709 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
19710 * src/getargs.h: Add its extern declaration.
19711 * src/getargs.c (error_verbose_flag): New int.
19712 (getargs): Update to catch new case.
19713 * src/options.c (option_table): 'error-verbose' is a new option.
19714 (shortopts): Update.
19715
19716 2001-11-27 Akim Demaille <akim@epita.fr>
19717
19718 * src/system.h: Use intl/libgettext.h.
19719 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
19720
19721 2001-11-27 Akim Demaille <akim@epita.fr>
19722
19723 * tests/torture.at (Exploding the Stack Size with Malloc):
19724 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
19725
19726 2001-11-27 Akim Demaille <akim@epita.fr>
19727
19728 * src/files.c: Include error.h.
19729 Reported by Hans Aberg.
19730
19731 2001-11-26 Marc Autret <autret_m@epita.fr>
19732
19733 * src/reader.c (parse_include_decl): New, not yet implemented.
19734 (read_declarations): Add case tok_include.
19735 * src/getargs.h (include): Add its extern definition.
19736 * src/getargs.c (include): New const char *.
19737 (getargs): Add case '-I'.
19738 * src/options.c (option_table): Add include as command line and
19739 percent option.
19740 * src/lex.h (token_t): Add tok_include.
19741
19742 2001-11-26 Akim Demaille <akim@epita.fr>
19743
19744 * src/reader.c (readgram): Make sure rules for mid-rule actions
19745 have a lineno equal to that of their host rule.
19746 Reported by Hans Aberg.
19747 * tests/regression.at (Rule Line Numbers): New.
19748
19749 2001-11-26 Akim Demaille <akim@epita.fr>
19750
19751 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
19752 size_ts.
19753
19754 2001-11-26 Akim Demaille <akim@epita.fr>
19755
19756 * src/complain.c, src/complain.h (error): Remove, provided by
19757 lib/error.[ch].
19758
19759 2001-11-26 Akim Demaille <akim@epita.fr>
19760
19761 * src/reader.c (read_declarations): Don't abort on tok_illegal,
19762 issue an error message.
19763 * tests/regression.at (Invalid %directive): New.
19764 Reported by Hans Aberg.
19765
19766 2001-11-26 Akim Demaille <akim@epita.fr>
19767
19768 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
19769 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
19770
19771 2001-11-26 Akim Demaille <akim@epita.fr>
19772
19773 * src/conflicts.c (conflicts_print): Don't complain at all when
19774 there are no reduce/reduce conflicts, and as many shift/reduce
19775 conflicts as expected.
19776 * tests/regression.at (%expect right): Adjust.
19777
19778 2001-11-23 Akim Demaille <akim@epita.fr>
19779
19780 * lib/alloca.c: Update, from fileutils.
19781
19782 2001-11-23 Akim Demaille <akim@epita.fr>
19783
19784 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
19785
19786 2001-11-23 Akim Demaille <akim@epita.fr>
19787
19788 * src/system.h: Include alloca.h.
19789 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
19790
19791 2001-11-23 Akim Demaille <akim@epita.fr>
19792
19793 * src/print_graph.c (print_actions): Remove `rule', unused.
19794 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
19795 pacify GCC's signed < unsigned warnings.
19796 * src/closure.c (itemsetsize): Likewise.
19797 * src/reader.c (symbol_list_new): Static.
19798
19799 2001-11-23 Akim Demaille <akim@epita.fr>
19800
19801 Attaching lineno to buckets is stupid, since only one copy of each
19802 symbol is kept, only the line of the first occurrence is kept too.
19803
19804 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
19805 * src/reader.c (rline_allocated): Remove, unused.
19806 (symbol_list): Have a `line' member.
19807 (symbol_list_new): New.
19808 (readgram): Use it.
19809 * src/print.c (print_grammar): Output the rule line numbers.
19810 * tests/regression.at (Solved SR Conflicts)
19811 (Unresolved SR Conflicts): Adjust.
19812 Reported by Hans Aberg.
19813
19814 2001-11-22 Marc Autret <autret_m@epita.fr>
19815
19816 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
19817
19818 2001-11-22 Marc Autret <autret_m@epita.fr>
19819
19820 * src/muscle_tab.c (muscle_init): Remove initialization of
19821 skeleton muscle.
19822 * src/output.c (output_master_parser): Do it here.
19823
19824 2001-11-20 Akim Demaille <akim@epita.fr>
19825
19826 * po/sv.po: New.
19827 * configure.in (ALL_LINGUAS): Adjust.
19828 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
19829 longer contains strings to translate.
19830
19831 2001-11-19 Akim Demaille <akim@epita.fr>
19832
19833 * src/conflicts.c (conflicts_print): Add a missing \n.
19834
19835 2001-11-19 Akim Demaille <akim@epita.fr>
19836
19837 * src/nullable.c (nullable_print): New.
19838 (set_nullable): Call it when tracing.
19839 Better locality of variables.
19840
19841 2001-11-19 Akim Demaille <akim@epita.fr>
19842
19843 * src/print.c (print_actions): Better locality of variables.
19844
19845 2001-11-19 Akim Demaille <akim@epita.fr>
19846
19847 * src/derives.c (print_derives): Fix and enrich.
19848 * src/closure.c (print_fderives): Likewise.
19849
19850 2001-11-19 Akim Demaille <akim@epita.fr>
19851
19852 * src/closure.c (itemsetend): Remove, replaced with...
19853 (itemsetsize): new.
19854
19855 2001-11-19 Akim Demaille <akim@epita.fr>
19856
19857 * src/LR0.c (kernel_end): Remove, replaced with...
19858 (kernel_size): new.
19859
19860 2001-11-19 Akim Demaille <akim@epita.fr>
19861
19862 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
19863 to clarify.
19864
19865 2001-11-19 Akim Demaille <akim@epita.fr>
19866
19867 * src/closure.c (closure): Use arrays instead of pointers to clarify.
19868
19869 2001-11-19 Akim Demaille <akim@epita.fr>
19870
19871 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
19872 trace messages.
19873 * src/LR0.c: Likewise.
19874 (allocate_itemsets): Use arrays instead of pointers to clarify.
19875
19876 2001-11-19 Akim Demaille <akim@epita.fr>
19877
19878 * src/getargs.c (statistics_flag): Replace with...
19879 (trace_flag): New.
19880 (longopts): Accept --trace instead of --statistics.
19881 * src/getargs.h, src/options.c: Adjust.
19882 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
19883 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
19884
19885 2001-11-19 Akim Demaille <akim@epita.fr>
19886
19887 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
19888 pointers to clarify the code.
19889 (save_reductions, save_shifts): Factor common parts of alternatives.
19890
19891 2001-11-19 Akim Demaille <akim@epita.fr>
19892
19893 * src/LR0.c (new_state, get_state): Complete TRACE code.
19894 * src/closure.c: Include `reader.h' to get `tags', needed by the
19895 trace code.
19896 Rename the conditional DEBUG as TRACE.
19897 Output consistently TRACEs to stderr, not stdout.
19898 * src/derives.c: Likewise.
19899 * src/reduce.c: (inaccessable_symbols): Using if is better style
19900 than goto.
19901 Use `#if TRACE' instead of `#if 0' for tracing code.
19902
19903 2001-11-19 Akim Demaille <akim@epita.fr>
19904
19905 * src/system.h (LIST_FREE, shortcpy): New.
19906 * src/LR0.c: Use them.
19907 * src/output.c (free_itemsets, free_reductions, free_shifts):
19908 Remove, replaced by LIST_FREE.
19909
19910 2001-11-19 Akim Demaille <akim@epita.fr>
19911
19912 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
19913 (REDUCTIONS_ALLOC): New.
19914 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
19915 allocation.
19916
19917 2001-11-19 Akim Demaille <akim@epita.fr>
19918
19919 * src/LR0.c (new_state): Complete trace code.
19920 * src/nullable.c (set_nullable): Don't translate traces.
19921
19922 2001-11-19 Akim Demaille <akim@epita.fr>
19923
19924 * src/print_graph.c (print_core): Better locality of variables.
19925 * src/print.c (print_core): Likewise.
19926
19927 2001-11-19 Akim Demaille <akim@epita.fr>
19928
19929 * src/vcg.c: You do the output, so you are responsible of the
19930 handling of VCG syntax, in particular: use quotearg.
19931 * src/print_graph.c: Don't.
19932 (print_actions): Don't output the actions as part of the nodes,
19933 since that's the job of the edges.
19934 (print_state): Don't output by hand: fill the node description,
19935 and ask for its output.
19936
19937 2001-11-19 Akim Demaille <akim@epita.fr>
19938
19939 * src/bison.simple (yyparse): When verbosely reporting an error,
19940 no longer put additional quotes around token names.
19941 * tests/calc.at: Adjust.
19942
19943 2001-11-19 Akim Demaille <akim@epita.fr>
19944
19945 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
19946 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
19947 * src/output.c: Adjust.
19948
19949 2001-11-19 Akim Demaille <akim@epita.fr>
19950
19951 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
19952 (rule_t): this.
19953 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
19954
19955 2001-11-19 Akim Demaille <akim@epita.fr>
19956
19957 * src/gram.h (rule_t): New.
19958 (rule_table): New.
19959 (rrhs, rlhs): Remove, part of state_t.
19960 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
19961 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
19962 * src/reader.c, src/reduce.c: Adjust.
19963
19964 2001-11-19 Akim Demaille <akim@epita.fr>
19965
19966 * src/reader.c (symbols_output): New, extracted from...
19967 (packsymbols): Here.
19968 (reader): Call it.
19969
19970 2001-11-19 Akim Demaille <akim@epita.fr>
19971
19972 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
19973 (maxrhs): this new function.
19974
19975 2001-11-19 Akim Demaille <akim@epita.fr>
19976
19977 * src/lalr.c (F): New macro to access the variable F.
19978 Adjust.
19979
19980 2001-11-19 Akim Demaille <akim@epita.fr>
19981
19982 * src/lalr.h (LA): New macro to access the variable LA.
19983 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19984 * src/lalr.c: Adjust.
19985
19986 2001-11-19 Akim Demaille <akim@epita.fr>
19987
19988 * src/lalr.c (initialize_LA): Only initialize LA. Let...
19989 (set_state_table): handle the `lookaheads' members.
19990
19991 2001-11-19 Akim Demaille <akim@epita.fr>
19992
19993 * src/lalr.h (lookaheads): Removed array, whose contents is now
19994 a member of...
19995 (state_t): this structure.
19996 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19997 Adjust.
19998
19999 2001-11-19 Akim Demaille <akim@epita.fr>
20000
20001 * src/lalr.h (consistent): Removed array, whose contents is now
20002 a member of...
20003 (state_t): this structure.
20004 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20005 Adjust.
20006
20007 2001-11-19 Akim Demaille <akim@epita.fr>
20008
20009 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
20010 contents are now members of...
20011 (state_t): this structure.
20012 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20013 Adjust.
20014
20015 2001-11-19 Akim Demaille <akim@epita.fr>
20016
20017 * src/lalr.h (state_t): New.
20018 (state_table): Be a state_t * instead of a core **.
20019 (accessing_symbol): Remove, part of state_t.
20020 * src/lalr.c: Adjust.
20021 (set_accessing_symbol): Merge into...
20022 (set_state_table): this.
20023 * src/print_graph.c, src/conflicts.c: Adjust.
20024
20025 2001-11-14 Akim Demaille <akim@epita.fr>
20026
20027 * tests/calc.at, tests/output.at, tests/regression.at,
20028 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
20029 now the tests are run in private dirs, therefore AC_CLEANUP and
20030 family can be simplified to 0-ary.
20031 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
20032 use abs. path to find config.h.
20033 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
20034 stderr, there can be way too much random noise.
20035 Instead pass -Werror to GCC and rely on the exit status.
20036 Reported by Wolfram Wagner.
20037
20038 2001-11-14 Akim Demaille <akim@epita.fr>
20039
20040 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
20041 defined only if yyoverflow is defined, to avoid `warning: unused
20042 variable `yyvs1''.
20043 Reported by The Test Suite.
20044
20045 2001-11-14 Akim Demaille <akim@epita.fr>
20046
20047 * src/print.c: Include reduce.h.
20048 Reported by Hans Aberg.
20049
20050 2001-11-14 Akim Demaille <akim@epita.fr>
20051
20052 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
20053 Revert a previous patch: these are really const.
20054 * src/conflicts.c (conflict_report): Additional useless pair of
20055 braces to pacify GCC's warnings for `if () if () {} else {}'.
20056 * src/lex.c (parse_percent_token): Replace equal_offset with
20057 arg_offset.
20058 arg is const.
20059 Be sure to strdup `arg' when used, since there is no reason for
20060 token_buffer not to change.
20061
20062 2001-11-14 Akim Demaille <akim@epita.fr>
20063
20064 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
20065 definition.
20066 * src/main.c (main): Use them.
20067 Suggested by Hans Aberg.
20068
20069 2001-11-12 Akim Demaille <akim@epita.fr>
20070
20071 * src/system.h (ngettext): Now that we use ngettext, be sure to
20072 provide a default definition when NLS are not used.
20073
20074 2001-11-12 Akim Demaille <akim@epita.fr>
20075
20076 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
20077 Use @kbd to denote user input.
20078 (Language and Grammar): ANSIfy the example.
20079 Adjust its layout for info/notinfo.
20080 (Location Tracking Calc): Output error messages to stderr.
20081 Output locations in a more GNUtically correct way.
20082 Fix a couple of Englishos.
20083 Adjust @group/@end group pairs.
20084
20085 2001-11-12 Akim Demaille <akim@epita.fr>
20086
20087 %expect was not functioning at all.
20088
20089 * src/conflicts.c (expected_conflicts): Set to -1.
20090 (conflict_report): Use ngettext.
20091 (conflicts_print): Check %expect and make its violation an error.
20092 * doc/bison.texinfo (Expect Decl): Adjust.
20093 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
20094 * tests/regression.at (%expect not enough, %expect right)
20095 (%expect too much): New.
20096
20097 2001-11-12 Akim Demaille <akim@epita.fr>
20098
20099 * tests/regression.at (Conflicts): Rename as...
20100 (Unresolved SR Conflicts): this.
20101 (Solved SR Conflicts): New.
20102
20103 2001-11-12 Akim Demaille <akim@epita.fr>
20104
20105 * src/reduce.c (print_results): Rename as...
20106 (reduce_output): This.
20107 Output to OUT, passed as argument, instead of output_obstack.
20108 (dump_grammar): Likewise.
20109 (reduce_free): New.
20110 Also free V1.
20111 (reduce_grammar): No longer call reduce_output, since...
20112 * src/print.c (print_results): do it.
20113 * src/main.c (main): Call reduce_free;
20114
20115 2001-11-12 Akim Demaille <akim@epita.fr>
20116
20117 * src/conflicts.c (print_reductions): Accept OUT as argument.
20118 Output to it, not to output_obstack.
20119 * src/print.c (print_actions): Adjust.
20120
20121 2001-11-12 Akim Demaille <akim@epita.fr>
20122
20123 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
20124 the result instead of using...
20125 (src_total, rrc_total, src_count, rrc_count): Remove.
20126 (any_conflicts): Remove.
20127 (print_conflicts): Split into...
20128 (conflicts_print, conflicts_output): New.
20129 * src/conflicts.h: Adjust.
20130 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
20131 * src/print.c (print_grammar): Issue `\n' between two rules.
20132 * tests/regression.at (Conflicts): New.
20133 Reported by Tom Lane.
20134
20135 2001-11-12 Akim Demaille <akim@epita.fr>
20136
20137 * tests/regression.at (Invalid input): Remove, duplicate with
20138 ``Invalid input: 1''.
20139
20140 2001-11-12 Akim Demaille <akim@epita.fr>
20141
20142 * tests/torture.at (AT_DATA_STACK_TORTURE)
20143 (Exploding the Stack Size with Alloca)
20144 (Exploding the Stack Size with Malloc): New.
20145
20146 2001-11-12 Akim Demaille <akim@epita.fr>
20147
20148 * src/bison.simple (YYSTACK_REALLOC): New.
20149 (yyparse) [!yyoverflow]: Use it and free the old stack.
20150 Reported by Per Allansson.
20151
20152 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
20153
20154 * src/bison.simple: Define type yystype instead of YYSTYPE, and
20155 define CPP macro, which substitute YYSTYPE by yystype.
20156 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
20157 with yyltype/YYLTYPE. This allows inclusion of the generated
20158 header within the parser if the compiler, such as GGC, accepts
20159 multiple equivalent #defines.
20160 From Akim.
20161
20162 2001-11-05 Akim Demaille <akim@epita.fr>
20163
20164 * src/reader.c (symbols_output): New, extracted from...
20165 (packsymbols): here.
20166 (reader): Adjust.
20167
20168 2001-11-05 Akim Demaille <akim@epita.fr>
20169
20170 * src/lex.c (parse_percent_token): s/quotearg/quote/.
20171
20172 2001-11-05 Akim Demaille <akim@epita.fr>
20173
20174 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
20175 pattern.
20176
20177 2001-11-05 Akim Demaille <akim@epita.fr>
20178
20179 * src/options.h (struct option_table_struct): set_flags is void*.
20180 * src/options.c (longopts): Support `--output' and `%output'.
20181 (usage): Adjust.
20182 * src/lex.h (tok_setopt): Remove, replaced with...
20183 (tok_intopt, tok_stropt): these new guys.
20184 * src/lex.c (getopt.h): Not needed.
20185 (token_buffer, unlexed_token_buffer): Not const.
20186 (percent_table): Promote `-' over `_' in directive names.
20187 Active `%name-prefix', `file-prefix', and `output'.
20188 (parse_percent_token): Accept possible arguments to directives.
20189 Promote `-' over `_' in directive names.
20190
20191 2001-11-04 Akim Demaille <akim@epita.fr>
20192
20193 * doc/bison.texinfo (Decl Summary): Split the list into
20194 `directives for grammars' and `directives for bison'.
20195 Sort'em.
20196 Add description of `%name-prefix', `file-prefix', and `output'.
20197 Promote `-' over `_' in directive names.
20198 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
20199 Simplify the description of `--name-prefix'.
20200 Promote `-' over `_' in directive names.
20201 Promote `--output' over `--output-file'.
20202 Fix the description of `--defines'.
20203 * tests/output.at: Exercise %file-prefix and %output.
20204
20205 2001-11-02 Akim Demaille <akim@epita.fr>
20206
20207 * doc/refcard.tex: Update.
20208
20209 2001-11-02 Akim Demaille <akim@epita.fr>
20210
20211 * src/symtab.h (SUNDEF): New.
20212 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
20213 stand for `uninitialized', instead of 0.
20214 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
20215 * src/lex.c (lex): Adjust.
20216
20217 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
20218 Number it 0.
20219 Let yylex return it instead of a plain 0.
20220 Reported by Dick Streefland.
20221
20222 2001-11-02 Akim Demaille <akim@epita.fr>
20223
20224 * tests/regression.at (Mixing %token styles): New test.
20225
20226 2001-11-02 Akim Demaille <akim@epita.fr>
20227
20228 * src/reader.c (parse_thong_decl): Formatting changes.
20229 (token_translations_init): New, extracted from...
20230 (packsymbols): Here.
20231 Adjust.
20232
20233 2001-11-01 Akim Demaille <akim@epita.fr>
20234
20235 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
20236 Check that `9foo.y' produces correct cpp guards.
20237 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
20238 guards.
20239 Reported by Wwp.
20240
20241 2001-11-01 Akim Demaille <akim@epita.fr>
20242
20243 * tests/regression.at (Invalid input: 2): New.
20244 * src/lex.c (unlexed_token_buffer): New.
20245 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
20246 too.
20247 Reported by Wwp.
20248
20249 2001-11-01 Akim Demaille <akim@epita.fr>
20250
20251 * tests/calc.at: Catch up with 1.30.
20252 * configure.in: Bump to 1.49a.
20253 Adjust to newer Autotest.
20254
20255 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
20256
20257 * src/conflicts.c: Move global variables rrc_total and src_total ...
20258 (print_conflicts): here.
20259 * src/output.c (output): Free global variable user_toknums.
20260 * src/lex.c (token_obstack): Become static.
20261
20262 2001-10-18 Akim Demaille <akim@epita.fr>
20263
20264 * tests/atlocal.in (GCC): Add.
20265 * tests/calc.at: s/m4_match/m4_bmatch/.
20266 s/m4_patsubst/m4_bpatsubst/.
20267 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
20268 * configure.in: AC_SUBST(GCC).
20269
20270 2001-10-14 Marc Autret <autret_m@epita.fr>
20271
20272 * src/options.c (create_long_option_table): Fix.
20273
20274 2001-10-10 Akim Demaille <akim@epita.fr>
20275
20276 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
20277
20278 2001-10-04 Akim Demaille <akim@epita.fr>
20279
20280 * src/reader.c (parse_union_decl): Push the caracters in
20281 union_obstack, not attrs_obstack.
20282
20283 2001-10-04 Akim Demaille <akim@epita.fr>
20284
20285 Merge in the branch 1.29.
20286
20287 * src/reader.c (packsymbols): Use a temporary obstack for
20288 `%%tokendef', since output_stack is already used elsewhere.
20289
20290 2001-10-02 Akim Demaille <akim@epita.fr>
20291
20292 Bump 1.29d.
20293
20294 2001-10-02 Akim Demaille <akim@epita.fr>
20295
20296 Version 1.29c.
20297
20298 2001-10-02 Akim Demaille <akim@epita.fr>
20299
20300 * tests/regression.at (Invalid CPP headers): New.
20301 From Alexander Belopolsky.
20302 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
20303
20304 2001-10-02 Akim Demaille <akim@epita.fr>
20305
20306 * tests/regression.at (Invalid input): New.
20307 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
20308 Reported by Shura.
20309
20310 2001-10-02 Akim Demaille <akim@epita.fr>
20311
20312 * tests/calc.at: Now that --debug works, the tests must be adjusted.
20313
20314 2001-10-02 Akim Demaille <akim@epita.fr>
20315
20316 * src/output.c (output_parser): Assert `skeleton'.
20317 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
20318 systems.
20319 From Shura.
20320
20321 2001-10-01 Marc Autret <autret_m@epita.fr>
20322
20323 * src/lex.h: Echo modifications.
20324 * src/lex.c (unlex): Parameter is now token_t.
20325 From Hans Aberg.
20326
20327 2001-10-01 Marc Autret <autret_m@epita.fr>
20328
20329 * src/main.c: Include lex.h.
20330 From Hans Aberg.
20331
20332 2001-09-29 Akim Demaille <akim@epita.fr>
20333
20334 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
20335
20336 2001-09-28 Akim Demaille <akim@epita.fr>
20337
20338 * tests/testsuite.at: Update to newer Autotest.
20339 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
20340
20341 2001-09-27 Akim Demaille <akim@epita.fr>
20342
20343 Position independent wrapper.
20344
20345 * tests/bison: Remove.
20346 * tests/bison.in: New.
20347 * configure.in: Adjust.
20348
20349 2001-09-27 Paul Eggert <eggert@twinsun.com>
20350
20351 Port quotearg fixes from tar 1.13.24.
20352
20353 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
20354 tm to be declared.
20355 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
20356 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
20357
20358 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
20359 * m4/mbrtowc.m4: New file.
20360 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
20361 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
20362
20363 2001-09-27 Akim Demaille <akim@epita.fr>
20364
20365 Bump to 1.29c.
20366
20367 2001-09-27 Akim Demaille <akim@epita.fr>
20368
20369 Version 1.29b.
20370
20371 2001-09-25 Akim Demaille <akim@epita.fr>
20372
20373 * src/system.h: Include `xalloc.h'.
20374 Remove it from the C files.
20375 * src/files.c (output_files): Free the obstacks.
20376 * src/lex.c (init_lex): Rename as...
20377 (lex_init): this.
20378 (lex_free): New.
20379 * src/main.c (main): Use it.
20380
20381 2001-09-24 Marc Autret <autret_m@epita.fr>
20382
20383 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
20384 to output informations in fout (FILE*).
20385 (open_graph, close_graph): Likewise.
20386 (output_graph, output_edge, output_node): Likewise.
20387 * src/vcg.h: Update function prototypes.
20388 * src/print_graph.c (print_graph): Open output graph file.
20389 (print_actions): Adjust.
20390 * src/files.h: Remove extern declaration.
20391 * src/files.c: Remove graph_obstack declaration.
20392 (open_files): Remove graph_obstack initialization.
20393 (output_files): Remove graph_obstack saving.
20394
20395 2001-09-24 Marc Autret <autret_m@epita.fr>
20396
20397 * src/files.c (compute_output_file_names): Fix.
20398
20399 2001-09-24 Marc Autret <autret_m@epita.fr>,
20400 Akim Demaille <akim@epita.fr>
20401
20402 * src/reader.c (reader): Remove call to free_symtab ().
20403 * src/main.c (main): Call it here.
20404 Include symtab.h.
20405 * src/conflicts.c (initialize_conflicts): Rename as...
20406 (solve_conflicts): this.
20407 * src/print.c (print_core, print_actions, print_state)
20408 (print_grammar): Dump to a file instead a `output_obstack'.
20409 (print_results): Dump `output_obstack', and then proceed with the
20410 FILE *.
20411 * src/files.c (compute_output_file_names, close_files): New.
20412 (output_files): Adjust.
20413 * src/main.c (main): Adjust.
20414
20415 2001-09-23 Marc Autret <autret_m@epita.fr>
20416
20417 * src/files.c (compute_header_macro): Computes header macro name
20418 from spec_defines_file when given.
20419
20420 2001-09-23 Marc Autret <autret_m@epita.fr>
20421
20422 * src/files.c (output_files): Add default extensions.
20423
20424 2001-09-22 Akim Demaille <akim@epita.fr>
20425
20426 * src/conflicts.c (finalize_conflicts): Rename as...
20427 (free_conflicts): this.
20428
20429 2001-09-22 Akim Demaille <akim@epita.fr>
20430
20431 * src/gram.c (gram_free): Rename back as...
20432 (dummy): this.
20433 (output_token_translations): Free `token_translations'.
20434 * src/symtab.c (free_symtab): Free the tag field.
20435
20436 2001-09-22 Akim Demaille <akim@epita.fr>
20437
20438 Remove `translations' as it is always set to true.
20439
20440 * src/gram.h: Adjust.
20441 * src/reader.c (packsymbols, parse_token_decl): Adjust
20442 * src/print.c (print_grammar): Adjust.
20443 * src/output.c (output_token_translations): Adjust.
20444 * src/lex.c (lex): Adjust.
20445 * src/gram.c: Be sure the set pointers to NULL.
20446 (dummy): Rename as...
20447 (gram_free): this.
20448
20449 2001-09-22 Akim Demaille <akim@epita.fr>
20450
20451 * configure.in: Invoke AM_LIB_DMALLOC.
20452 * src/system.h: Use dmalloc.
20453 * src/LR0.c: Be sure to have pointers initialized to NULL.
20454 (allocate_itemsets): Allocate kernel_items only if needed.
20455
20456 2001-09-22 Akim Demaille <akim@epita.fr>
20457
20458 * configure.in: Bump to 1.29b.
20459 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
20460 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
20461 need xmalloc.c in calc.y.
20462 From Pascal Bart.
20463
20464 2001-09-21 Akim Demaille <akim@epita.fr>
20465
20466 Version 1.29a.
20467 * Makefile.maint, config/config.guess, config/config.sub,
20468 * config/missing: Update from masters.
20469 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
20470 upon package.m4.
20471 * configure.in (ALL_LINGUAS): Add `tr'.
20472
20473 2001-09-21 Akim Demaille <akim@epita.fr>
20474
20475 * tests/Makefile.am (package.m4): Move to...
20476 ($(srcdir)/$(TESTSUITE)): here.
20477
20478 2001-09-20 Akim Demaille <akim@epita.fr>
20479
20480 * src/complain.c: No longer try to be standalone: use system.h.
20481 Don't assume __STDC__ is defined to 1. Just test if it is defined.
20482 * src/complain.h: Likewise.
20483 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
20484 Remove the unused variable `n'.
20485 From Albert Chin-A-Young.
20486
20487 2001-09-18 Marc Autret <autret_m@epita.fr>
20488
20489 * doc/bison.1: Update.
20490 * doc/bison.texinfo (Bison Options): Update --defines and --graph
20491 descriptions.
20492 (Option Cross Key): Update.
20493 Add --graph.
20494
20495 2001-09-18 Marc Autret <autret_m@epita.fr>
20496
20497 * tests/regression.at: New test (comment in %union).
20498
20499 2001-09-18 Marc Autret <autret_m@epita.fr>
20500
20501 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
20502 do that.
20503 Reported by Keith Browne.
20504
20505 2001-09-18 Marc Autret <autret_m@epita.fr>
20506
20507 * tests/output.at: Add tests for --defines and --graph.
20508
20509 2001-09-18 Marc Autret <autret_m@epita.fr>
20510
20511 * tests/output.at: Removes tests of %{header,src}_extension features.
20512
20513 2001-09-18 Akim Demaille <akim@epita.fr>
20514
20515 * tests/Makefile.am (package.m4): New.
20516 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
20517 (_AT_CHECK_CALC_ERROR): Likewise.
20518 Factor the `, ' part of verbose error messages.
20519
20520 2001-09-18 Marc Autret <autret_m@epita.fr>
20521
20522 * src/getargs.c (longopts): Declare --defines and --graph as options
20523 with optional arguments.
20524 * src/files.h: Add extern declarations.
20525 * src/files.c (spec_graph_file, spec_defines_file): New.
20526 (output_files): Update.
20527 Remove CPP-outed code.
20528
20529 2001-09-18 Marc Autret <autret_m@epita.fr>
20530
20531 Turn off %{source,header}_extension feature.
20532
20533 * src/files.c (compute_exts_from_gf): Update.
20534 (compute_exts_from_src): Update.
20535 (output_files): CPP-out useless code.
20536 * src/files.h: Remove {header,source}_extension extern declarations.
20537 * src/reader.c (parse_dquoted_param): CPP-out.
20538 (parse_header_extension_decl): Remove.
20539 (parse_source_extension_decl): Remove.
20540 (read_declarations): Remove cases tok_{hdrext,srcext}.
20541 * src/lex.c (percent_table): Remove {header,source}_extension entries.
20542 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
20543
20544 2001-09-10 Akim Demaille <akim@epita.fr>
20545
20546 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
20547 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
20548 (AT_CHECK_OUTPUT): this.
20549 Merely check ls' exit status, its output is useless.
20550
20551 2001-09-10 Akim Demaille <akim@epita.fr>
20552
20553 * tests/calc.at: Use m4_match.
20554 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
20555
20556 2001-09-10 Marc Autret <autret_m@epita.fr>,
20557 Akim Demaille <akim@epita.fr>
20558
20559 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
20560 enum color_e.
20561 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
20562 to `normal'.
20563 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
20564 * src/lex.h: Adjust prototype.
20565 (token_t): Add `tok_undef'.
20566 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
20567 (parse_percent_token): Now returns token_t.
20568 Add default statement in switch.
20569 (lex): Separate `c' as an input variable, from the token_t result
20570 part.
20571 (unlexed): Is a token_t.
20572
20573 2001-09-10 Akim Demaille <akim@epita.fr>
20574
20575 * configure.in: Bump to 1.29a.
20576
20577 2001-09-07 Akim Demaille <akim@epita.fr>
20578
20579 Version 1.29.
20580
20581 2001-08-30 Akim Demaille <akim@epita.fr>
20582
20583 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
20584 * m4/atconfig.m4: Remove.
20585 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
20586 * tests/bison: New.
20587 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
20588 m4_if, m4_patsubst, and m4_regexp.
20589 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
20590 `input' file instead of echo.
20591
20592 2001-08-29 Akim Demaille <akim@epita.fr>
20593
20594 Bump to 1.28e.
20595
20596 2001-08-29 Akim Demaille <akim@epita.fr>
20597
20598 Version 1.28d.
20599
20600 2001-08-29 Paul Eggert <eggert@twinsun.com>
20601
20602 * src/bison.simple (yyparse): Don't take the address of an
20603 item before the start of an array, as that doesn't conform to
20604 the C Standard.
20605
20606 2001-08-29 Robert Anisko <anisko_r@epita.fr>
20607
20608 * doc/bison.texinfo (Location Tracking Calc): New node.
20609
20610 2001-08-29 Paul Eggert <eggert@twinsun.com>
20611
20612 * src/output.c (output): Do not define const, as this now
20613 causes more problems than it cures.
20614
20615 2001-08-29 Akim Demaille <akim@epita.fr>
20616
20617 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
20618 the nodes.
20619 Be sure to tag the `detailmenu'.
20620
20621 2001-08-29 Akim Demaille <akim@epita.fr>
20622
20623 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
20624 download in a tmp dir.
20625
20626 2001-08-28 Marc Autret <autret_m@epita.fr>
20627
20628 * config/depcomp: New file.
20629
20630 2001-08-28 Marc Autret <autret_m@epita.fr>
20631
20632 * doc/bison.1 (mandoc): Adjust.
20633 From Juan Manuel Guerrero.
20634
20635 2001-08-28 Marc Autret <autret_m@epita.fr>
20636
20637 * src/print_graph.c (print_state): Fix.
20638
20639 2001-08-27 Marc Autret <autret_m@epita.fr>
20640
20641 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
20642 char * members.
20643 Echo modifications to the functions prototypes.
20644 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
20645
20646 2001-08-27 Marc Autret <autret_m@epita.fr>
20647
20648 * src/vcg.c: Include `xalloc.h'.
20649 (add_colorentry): New.
20650 (add_classname): New.
20651 (add_infoname): New.
20652 * src/vcg.h: Add new prototypes.
20653
20654 2001-08-27 Akim Demaille <akim@epita.fr>
20655
20656 * Makefile.maint: Sync. again with CVS Autoconf.
20657
20658 2001-08-27 Akim Demaille <akim@epita.fr>
20659
20660 * Makefile.maint: Formatting changes.
20661 (po-update, cvs-update, update): New targets.
20662 (AMTAR): Remove.
20663
20664 2001-08-27 Akim Demaille <akim@epita.fr>
20665
20666 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
20667 * Makefile.maint: Sync. with CVS Autoconf.
20668
20669 2001-08-27 Marc Autret <autret_m@epita.fr>
20670
20671 * src/vcg.h (struct infoname_s): New.
20672 (struct colorentry_s): New.
20673 (graph_s): New fields {vertical,horizontal}_order in structure.
20674 Add `infoname' field.
20675 Add `colorentry' field;
20676 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
20677 (G_HORIZONTAL_ORDER): New.
20678 (G_INFONAME): New.
20679 (G_COLORENTRY): New.
20680 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
20681 Add output of `infoname'.
20682 Add output of `colorentry'.
20683
20684 2001-08-27 Marc Autret <autret_m@epita.fr>
20685
20686 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
20687 This one shadowed a global parameter.
20688
20689 2001-08-24 Marc Autret <autret_m@epita.fr>
20690
20691 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
20692 instead of `unsigned'.
20693 (print_state): Do not call obstack_object_size () in obstack_grow ()
20694 to avoid macro variables shadowing.
20695
20696 2001-08-23 Marc Autret <autret_m@epita.fr>
20697
20698 * src/lex.c (percent_table): Typo: s/naem/name/.
20699 Add graph option.
20700 Normalize new options declarations.
20701
20702 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
20703
20704 * tests/suite.at: Exercise %header_extension and %source_extension.
20705
20706 2001-08-16 Marc Autret <autret_m@epita.fr>
20707
20708 * src/reader.c (parse_dquoted_param): New.
20709 (parse_header_extension_decl): Use it.
20710 (parse_source_extension_decl): Likewise.
20711
20712 2001-08-16 Marc Autret <autret_m@epita.fr>
20713
20714 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
20715 (get_xxxx_str): Use assert () instead of complain ().
20716 Remove return invokations in default cases.
20717 (get_decision_str): Modify default behaviour. Remove second argument.
20718 Echo modifications on calls.
20719 (output_graph): Fix.
20720
20721 2001-08-16 Marc Autret <autret_m@epita.fr>
20722
20723 * src/getargs.c (usage): Update with ``-g, --graph''.
20724
20725 2001-08-16 Marc Autret <autret_m@epita.fr>
20726
20727 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
20728 (Option Cross Key): Likewise.
20729 * doc/bison.1: Update.
20730
20731 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
20732
20733 * src/output.c (output_master_parser): Don't finish action_obstack.
20734 (output_parser): Don't care about the muscle action, here.
20735 (prepare): Copy the action_obstack in the action muscle.
20736 (output): Free action_obstack.
20737
20738 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
20739
20740 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
20741 will contain `%union' declaration.
20742 (parse_union_decl): Delete #line directive output.
20743 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
20744 informations about %union.
20745 (parse_union_decl): Copy the union_obstack in the muscle stype.
20746 * src/bison.simple: Add new #line directive.
20747 Add typdef %%stype YYSTYPE.
20748
20749 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
20750
20751 * src/bison.simple: Add new `#line' directive.
20752
20753 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
20754
20755 * src/bison.simple: New `#line' directive.
20756 * src/output.c (output_parser): Support new dynamic muscle input_line.
20757
20758 2001-09-22 Marc Autret <autret_m@epita.fr>
20759
20760 * src/output.c (output_master_parser): New.
20761 (output_parser): Be more re-entrant.
20762
20763 2001-09-21 Marc Autret <autret_m@epita.fr>
20764
20765 * src/reader.c (copy_definition, parse_union_decl): Update and use
20766 `linef' muscle.
20767 (copy_action): Likewise.
20768 Use obstack_1grow ().
20769 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
20770
20771 2001-09-21 Marc Autret <autret_m@epita.fr>
20772
20773 * src/options.c (option_table): Adjust.
20774 * src/lex.c (parse_percent_token): Fix.
20775
20776 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
20777
20778 * src/options.c (symtab.h): Include it, need by lex.h.
20779
20780 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
20781
20782 * src/lex.c (parse_percent_token): Change type of variable `tx', which
20783 is now an option_table_struct*.
20784 (option_strcmp): New function option_strcmp.
20785 (parse_percent_token): Call option_strcmp.
20786 * src/getargs.c (xalloc.h, options.h): Include it.
20787 (getargs): Call create_long_option_table.
20788 (getargs): Free longopts at the end of the function.
20789 (shortopts): Move in options.c.
20790 * src/options.c (create_long_option_table): New function. Convert
20791 information from option_table to option structure.
20792 * src/reader.c (options.h): Include it.
20793
20794 * src/Makefile.am: Adjust.
20795 * src/options.c (option_table): Create from longopts and percent_table.
20796 * src/getargs.c (longopts): Delete.
20797 * src/lex.c (struct percent_table_struct): Delete.
20798 (percent_table): Delete.
20799 (options.h): Include it.
20800 * src/options.c: Create.
20801 * src/options.h: Create.
20802 Declare enum opt_access_e.
20803 Define struct option_table_struct.
20804
20805 2001-09-20 Marc Autret <autret_m@epita.fr>
20806
20807 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
20808 sections of Bison.
20809
20810 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
20811
20812 * src/bison.simple: s/%%filename/%%skeleton.
20813 * src/muscle_tab.c (getargs.h): Include it.
20814 (muscle_init): Insert new muscle skeleton.
20815
20816 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
20817
20818 * src/output.c (output_parser): Delete unused variable actions_dumped.
20819
20820 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
20821
20822 * src/output.c (output): Delete call to reader_output_yylsp.
20823 * src/reader.c (reader): Likewise.
20824 * src/reader.h: Delete declaration of reader_output_yylsp.
20825
20826 2001-09-02 Marc Autret <autret_m@epita.fr>
20827
20828 * src/reader.c: Include muscle_tab.h.
20829 (parse_union_decl): Update.
20830 (parse_macro_decl): Rename parse_muscle_decl.
20831 Update to use renamed functions and variable.
20832 (read_declarations, copy_action, read_additionnal_code, : Updated
20833 with correct variables and functions names.
20834 (packsymbols, reader): Likewise.
20835
20836 * src/reader.h (muscle_obstack): Extern declaration update.
20837
20838 * src/output.c: Include muscle_tab.h
20839 In all functions using macro_insert, change by using muscle_insert ().
20840 (macro_obstack): Rename muscle_obstack.
20841 Echo modifications in the whole file.
20842 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
20843 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
20844 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
20845
20846 * src/muscle_tab.h: Update double inclusion macros.
20847 (macro_entry_s): Rename muscle_entry_s.
20848 Update prototypes.
20849
20850 * src/muscle_tab.c: Include muscle_tab.h.
20851 Rename macro_tabble to muscle_table.
20852 (mhash1, mhash2, mcmp): Use muscle_entry.
20853 (macro_init): Rename muscle_init. Update.
20854 (macro_insert): Rename muscle_insert. Update.
20855 (macro_find): Rename muscle_find. Update.
20856
20857 * src/main.c: Include muscle_tab.h.
20858 (main): Call muscle_init ().
20859 * src/Makefile.am (bison_SOURCES): Echo modifications.
20860
20861 2001-09-02 Marc Autret <autret_m@epita.fr>
20862
20863 Now the files macro_tab.[ch] are named muscle_tab.[ch].
20864
20865 * src/muscle_tab.c, src/muscle_tab.h: Add files.
20866
20867 2001-09-02 Marc Autret <autret_m@epita.fr>
20868
20869 * src/macrotab.c, src/macrotab.h: Remove.
20870
20871 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
20872
20873 * src/reader.c (copy_guard): Use muscle to specify the `#line'
20874 filename.
20875
20876 2001-09-01 Marc Autret <autret_m@epita.fr>
20877
20878 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
20879 to an explicit value to activate the feature. We do it here.
20880
20881 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20882
20883 * src/output.c (prepare): Delete the `filename' muscule insertion.
20884 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
20885 (parse_union_decl): Likewise.
20886 * src/macrotab.c (macro_init): Initialize filename by infile.
20887
20888 2001-08-31 Marc Autret <autret_m@epita.fr>
20889
20890 * src/bison.simple (YYLSP_NEEDED): New definition.
20891 * src/output.c (prepare): Add macro insertion of `locations_flag'
20892
20893 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20894
20895 * src/output.c (prepare): Delete insertion of previous muscles,
20896 and insert the `prefix' muscles.
20897 * src/macrotab.c (macro_init): Likewise.
20898 (macro_init): Initialization prefix directive by `yy'.
20899 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
20900 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
20901 yylval, yydebug, yyerror, yynerrs and yyparse.
20902 New directive `#define' to substitute yydebug, ... with option
20903 name_prefix.
20904
20905 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20906
20907 * src/main.c (main): Standardize.
20908 * src/output.c (output_table_data, output_parser): Likewise.
20909 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
20910
20911 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
20912
20913 * src/reader.c (read_additionnal_code): Rename %%user_code to
20914 %%epilogue.
20915 * src/output.c (output): Rename %%declarations to %%prologue.
20916 * src/bison.simple: Echo modifications.
20917
20918 2001-08-31 Marc Autret <autret_m@epita.fr>
20919
20920 * src/reader.c (readgram): CleanUp.
20921 (output_token_defines): Likewise.
20922 (packsymbols): Likewise.
20923 (reader): Likewise.
20924 * src/output.c (output): CPP-out useless code.
20925
20926 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20927
20928 * src/reader.c (reader): Delete obsolete call to function
20929 output_trailers and output_headers.
20930 * src/output.h: Remove obsolete functions prototypes of output_headers
20931 and output_trailers.
20932
20933 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
20934
20935 * src/main.c: Include macrotab.h.
20936 * src/macrotab.h (macro_entry_s): Constify fields.
20937 Adjust functions prototypes.
20938 * src/macrotab.c (macro_insert): Constify key and value.
20939 (macro_find): Constify key.
20940 (macro_insert): Include 'xalloc.h'
20941 (macro_insert): Use XMALLOC.
20942 (macro_find): Constify return value.
20943 * src/output.c (output_table_data): Rename table to table_data.
20944 (output_parser): Constify macro_key, macro_value.
20945
20946 2001-08-30 Marc Autret <autret_m@epita.fr>
20947
20948 * src/reader.c (parse_skel_decl): New.
20949 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
20950 * src/lex.h (token_t): New token `tok_skel'.
20951 * src/lex.c (percent_table): Add skeleton option entry.
20952 Standardize.
20953
20954 2001-08-29 Marc Autret <autret_m@epita.fr>
20955
20956 * src/bison.simple: Add %%user_code directive at the end.
20957 * src/reader.c (read_additionnal_code): New.
20958 (reader): Use it.
20959 * src/output.c (output_program): Remove.
20960 (output): Update.
20961
20962 2001-08-28 Marc Autret <autret_m@epita.fr>
20963
20964 * src/output.c (output_actions): Clean up.
20965 (output_gram): CPP-out useless code.
20966 * src/reader.c (reader): Clean up, CPP-out useless code.
20967
20968 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
20969
20970 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
20971 directive.
20972 * src/bison.simple: Add `%%definitions'.
20973
20974 2001-08-28 Marc Autret <autret_m@epita.fr>
20975
20976 * config/depcomp: New file.
20977
20978 2001-08-27 Paul Eggert <eggert@twinsun.com>
20979
20980 * src/bison.simple (yyparse): Don't take the address of an
20981 item before the start of an array, as that doesn't conform to
20982 the C Standard.
20983
20984 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
20985
20986 * src/output.c (output): Remove the initialization of the macro
20987 obstack. It was done too late here.
20988
20989 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
20990 completely wrong.
20991 (reader): Initialize the macro obstack here, since we need it to grow
20992 '%define' directives.
20993
20994 * src/reader.h: Declare the macro obstack as extern.
20995
20996 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
20997
20998 * src/output.c (output_parser): Fix. Store single '%' characters in
20999 the output obstack instead of throwing them away.
21000
21001 2001-08-27 Akim Demaille <akim@epita.fr>
21002
21003 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21004
21005 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21006
21007 * lib/Makefile.am: Adjust.
21008
21009 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21010
21011 * src/bison.simple: Update and add '%%' directives.
21012
21013 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21014
21015 * src/reader.c (reader): Remove calls to 'output_headers' and
21016 'output_trailers'. Remove some C output.
21017 (readgram): Disable a piece of code that was writing a default
21018 definition for 'YYSTYPE'.
21019 (reader_output_yylsp): Remove.
21020 (packsymbols): Output token defintions to a macro.
21021 (copy_definition): Disable C output.
21022
21023 * src/reader.c (parse_macro_decl): New function used to parse macro
21024 declarations.
21025 (copy_string2): Put the body of copy_string into this new function.
21026 Add a parameter to let the caller choose whether he wants to copy the
21027 string delimiters or not.
21028 (copy_string): Be a simple call to copy_string2 with the last argument
21029 bound to true.
21030 (read_declarations): Add case for macro definition.
21031 (copy_identifier): New.
21032 (parse_macro_decl): Read macro identifiers using copy_identifier
21033 rather than lex.
21034
21035 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21036
21037 * src/output.c (prepare): Add prefixed names.
21038 (output_parser): Output semantic actions.
21039 (output_parser): Fix bug on '%%line' directives.
21040
21041 * src/output.c (output_headers): Remove. The C code printed by this
21042 function should now be in the skeletons.
21043 (output_trailers): Remove.
21044 (output): Disable call to 'reader_output_yylsp'.
21045 (output_rule_data): Do not output tables to the table obstack.
21046
21047 * src/output.c: Remove some C dedicated output.
21048 Improve the use of macro and output obstacks.
21049 (output_defines): Remove.
21050
21051 * src/output.c (output_token_translations): Associate 'translate'
21052 table with a macro. No output to the table obstack.
21053 (output_gram): Same for 'rhs' and 'prhs'.
21054 (output_stos): Same for 'stos'.
21055 (output_rule_data): Same for 'r1' and 'r2'.
21056 (token_actions): Same for 'defact'.
21057 (goto_actions): Same for 'defgoto'.
21058 (output_base): Same for 'pact' and 'pgoto'.
21059 (output_table): Same for 'table'.
21060 (output_check): Same for 'check'.
21061
21062 * src/output.c (output_table_data): New function.
21063 (output_short_table): Remove.
21064 (output_short_or_char_table): Remove.
21065
21066 * src/output.c (output_parser): Replace most of the skeleton copy code
21067 with something new. Skeletons are now processed character by character
21068 rather than line by line, and Bison looks for '%%' macros. This is the
21069 first step in making Bison's output process (a lot) more flexible.
21070 (output_parser): Use the macro table.
21071
21072 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21073
21074 * src/main.c (main): Initialize the macro table.
21075
21076 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21077
21078 * src/lex.c (percent_table): Add tok_define.
21079 * src/lex.h: Add tok_define.
21080
21081 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21082
21083 * src/macrotab.c: New file.
21084 * src/macrotab.h: New file.
21085 * src/Makefile.am: Update.
21086
21087 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21088
21089 * lib/hash.c: New file.
21090 * lib/hash.h: New file.
21091 * lib/Makefile.am: Update.
21092
21093 2001-08-15 Akim Demaille <akim@epita.fr>
21094
21095 Version 1.28c.
21096
21097 2001-08-15 Marc Autret <autret_m@epita.fr>
21098
21099 * src/reader.c (readgram): Indent output macro YYSTYPE.
21100 (packsymbols): Likewise.
21101 (output_token_defines): Likewise.
21102 * src/files.c: Standardize.
21103 (compute_header_macro): New.
21104 (defines_obstack_save): New. Use compute_header_macro.
21105 (output_files): Update. Use defines_obstack_save.
21106
21107 2001-08-15 Akim Demaille <akim@epita.fr>
21108
21109 * doc/bison.texinfo (Table of Symbols): Document
21110 YYSTACK_USE_ALLOCA.
21111
21112 2001-08-15 Akim Demaille <akim@epita.fr>
21113
21114 * missing: Update from CVS Automake.
21115 * config/config.guess, config/config.sub, config/texinfo.tex:
21116 Update from gnu.org.
21117
21118 2001-08-15 Akim Demaille <akim@epita.fr>
21119
21120 * Makefile.maint: Sync with CVS Autoconf.
21121
21122 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
21123
21124 * doc/bison.texinfo: Include GNU Free Documentation License from
21125 `fdl.texi'.
21126 * doc/fdl.texi: Add to package.
21127
21128 2001-08-14 Marc Autret <autret_m@epita.fr>
21129
21130 Turn on %{source,header}_extension features.
21131
21132 * src/lex.c (percent_table): Un-CPP out header_extension and
21133 source_extension.
21134 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
21135 (compute_exts_from_src): Remove conditions. It restores priorities
21136 between options.
21137
21138 2001-08-14 Marc Autret <autret_m@epita.fr>
21139
21140 * src/files.c (compute_base_names): Add extensions computing when
21141 `--file-prefix' used.
21142 Standardize function calls.
21143
21144 2001-08-13 Marc Autret <autret_m@epita.fr>
21145
21146 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
21147 defining it (defined but null disables alloca).
21148
21149 2001-08-13 Marc Autret <autret_m@epita.fr>
21150
21151 * src/bison.simple (_yy_memcpy): CPP reformat.
21152
21153 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
21154
21155 * tests/atconfig.in (CPPFLAGS): Fix.
21156
21157 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
21158
21159 * doc/bison.texinfo: Include GNU General Public License from
21160 `gpl.texi'.
21161 * doc/gpl.texi: Add to package.
21162
21163 2001-08-10 Marc Autret <autret_m@epita.fr>
21164
21165 * src/print_graph.h: Fix.
21166 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
21167
21168 2001-08-10 Akim Demaille <akim@epita.fr>
21169
21170 * src/system.h: Provide default declarations for stpcpy, strndup,
21171 and strnlen.
21172
21173 2001-08-10 Robert Anisko <anisko_r@epita.fr>
21174
21175 * doc/bison.texinfo (Locations): Update @$ stuff.
21176
21177 2001-08-09 Robert Anisko <anisko_r@epita.fr>
21178
21179 * src/bison.simple (YYLLOC_DEFAULT): Update.
21180 (yyparse): Adjust.
21181
21182 2001-08-08 Marc Autret <autret_m@epita.fr>
21183
21184 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
21185 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
21186 Reported by Fabrice Bauzac.
21187
21188 2001-08-08 Marc Autret <autret_m@epita.fr>
21189
21190 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
21191 * src/vcg.c (output_node): Fix.
21192 * src/vcg.h: Cleanup.
21193 * src/print_graph.c: Add comments.
21194 (node_output_size): New global variable. Simplify the formatting of
21195 the VCG graph output.
21196 (print_actions): Unused code is now used. It notifies the final state
21197 and no action states in the VCG graph. It also give the reduce actions.
21198 The `shift and goto' edges are red and the `go to state' edges are
21199 blue.
21200 Get the current node name and node_obstack by argument.
21201 (node_obstack): New variable.
21202 (print_state): Manage node_obstack.
21203 (print_core): Use node_obstack given by argument.
21204 A node is not only computed here but in print_actions also.
21205 (print_graph): CPP out useless code instead of commenting it.
21206
21207 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
21208
21209 * tests/atconfig.in (CPPFLAGS): Fix.
21210
21211 2001-08-07 Akim Demaille <akim@epita.fr>
21212
21213 * src/print_graph.c (quote): New.
21214 (print_core): Use it.
21215
21216 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
21217
21218 * src/vcg.c (complain.h): Include it.
21219 Unepitaize `return' invocations.
21220 [NDEBUG] (main): Remove.
21221 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
21222 * src/files.c (open_files): Initialize graph_obstack.
21223 * src/print_graph.c (print_actions): CPP out useless code.
21224 (print_core): Don't output the last `\n' in labels.
21225 Use `quote'.
21226 * src/files.c (output_files): Output the VCG file.
21227 * src/main.c (main): Invoke print_graph ();
21228
21229 2001-08-06 Marc Autret <autret_m@epita.fr>
21230
21231 Automaton VCG graph output.
21232 Using option ``-g'' or long option ``--graph'', you can generate
21233 a gram_filename.vcg file containing a VCG description of the LALR (1)
21234 automaton of your grammar.
21235
21236 * src/main.c: Call to print_graph() function.
21237 * src/getargs.h: Update.
21238 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
21239 (graph_flag): New flag.
21240 (longopts): Update.
21241 (getargs): Add case `g'.
21242 * src/files.c (graph_obstack): New obstack struct.
21243 (open_files): Initialize new obstack.
21244 (output_files): Saves graph_obstack if required.
21245 * src/files.h (graph_obstack): New extern declaration.
21246 * src/Makefile.am: Add new source files.
21247
21248 2001-08-06 Marc Autret <autret_m@epita.fr>
21249
21250 * src/print_graph.c, src/print_graph.h (graph): New.
21251 * src/vcg.h: New file.
21252 * src/vcg.c: New file, VCG graph handling.
21253
21254 2001-08-06 Marc Autret <autret_m@epita.fr>
21255
21256 Add of %source_extension and %header_extension which specify
21257 the source or/and the header output file extension.
21258
21259 * src/files.c (compute_base_names): Remove initialisation of
21260 src_extension and header_extension.
21261 (compute_exts_from_gf): Update.
21262 (compute_exts_from_src): Update.
21263 (output_files): Update.
21264 * src/reader.c (parse_header_extension_decl): New.
21265 (parse_source_extension_decl): New.
21266 (read_declarations): New case statements for the new tokens.
21267 * src/lex.c (percent_table): Add entries for %source_extension
21268 and %header_extension.
21269 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
21270
21271 2001-08-06 Marc Autret <autret_m@epita.fr>
21272
21273 * configure.in: Bump to 1.28c.
21274 * doc/bison.texinfo: Texinfo thingies.
21275
21276 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
21277
21278 * tests/atconfig.in (CPPFLAGS): Add.
21279 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
21280
21281 2001-08-03 Akim Demaille <akim@epita.fr>
21282
21283 Version 1.28b.
21284
21285 2001-08-03 Akim Demaille <akim@epita.fr>
21286
21287 * tests/Makefile.am (check-local): Ship testsuite.
21288 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
21289 Include `string.h'.
21290
21291 2001-08-03 Akim Demaille <akim@epita.fr>
21292
21293 * configure.in: Try using -Wformat when compiling.
21294
21295 2001-08-03 Akim Demaille <akim@epita.fr>
21296
21297 * configure.in: Bump to 1.28b.
21298
21299 2001-08-03 Akim Demaille <akim@epita.fr>
21300
21301 * src/complain.c: Adjust strerror_r portability issues.
21302
21303 2001-08-03 Akim Demaille <akim@epita.fr>
21304
21305 Version 1.28a.
21306
21307 2001-08-03 Akim Demaille <akim@epita.fr>
21308
21309 * src/getargs.c, src/getarg.h (skeleton)): Constify.
21310 * src/lex.c (literalchar): Avoid name clashes on `buf'.
21311 * src/getargs.c: Include complain.h.
21312 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
21313 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
21314
21315 2001-08-03 Akim Demaille <akim@epita.fr>
21316
21317 * src/reader.c (readgram): Display hidden chars in error messages.
21318
21319 2001-08-03 Akim Demaille <akim@epita.fr>
21320
21321 Update to gettext 0.10.39.
21322
21323 2001-08-03 Akim Demaille <akim@epita.fr>
21324
21325 * lib/strspn.c: New.
21326
21327 2001-08-01 Marc Autret <autret_m@epita.fr>
21328
21329 * doc/bison.texinfo: Update.
21330 * doc/bison.1 (mandoc): Update.
21331 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
21332 * src/files.c: Support output files extensions computing.
21333 (src_extension): New static variable.
21334 (header_extension): New static variable.
21335 (tr): New function.
21336 (get_extension_index): New function, gets the index of an extension
21337 filename in a string.
21338 (compute_exts_from_gf): New function, computes extensions from the
21339 grammar file extension.
21340 (compute_exts_from_src): New functions, computes extensions from the
21341 C source file extension, file given by ``-o'' option.
21342 (compute_base_names): Update.
21343 (output_files): Update.
21344
21345 2001-08-01 Robert Anisko <anisko_r@epita.fr>
21346
21347 * doc/bison.texi: Document @$.
21348 (Locations): New section.
21349
21350 2001-07-18 Akim Demaille <akim@epita.fr>
21351
21352 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
21353 * config/prev-version.txt, config/move-if-change: New.
21354 * Makefile.am: Adjust.
21355
21356 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
21357
21358 * src/bison.simple (yyparse): Suppress warning `comparaison
21359 between signed and unsigned'.
21360
21361 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
21362
21363 * src/getargs.h (raw_flag): Remove.
21364 * src/getargs.c: Die on `-r'/`--raw'.
21365 * src/lex.c (parse_percent_token): Die on `%raw'.
21366 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
21367 * tests/calc.at: Suppress test with option `--raw'.
21368
21369 2001-07-14 Akim Demaille <akim@epita.fr>
21370
21371 * config/: New.
21372 * configure.in: Require Autoconf 2.50.
21373 Update to gettext 0.10.38.
21374
21375 2001-03-16 Akim Demaille <akim@epita.fr>
21376
21377 * doc/bison.texinfo: ANSIfy the examples.
21378
21379 2001-03-16 Akim Demaille <akim@epita.fr>
21380
21381 * getargs.c (skeleton): New variable.
21382 (longopts): --skeleton is a new option.
21383 (shortopts, getargs): -S is a new option.
21384 * getargs.h: Declare skeleton.
21385 * output.c (output_parser): Use it.
21386
21387 2001-03-16 Akim Demaille <akim@epita.fr>
21388
21389 * m4/strerror_r.m4: New.
21390 * m4/error.m4: Run AC_FUNC_STRERROR_R.
21391 * lib/error.h, lib/error.c: Update.
21392
21393 2001-03-16 Akim Demaille <akim@epita.fr>
21394
21395 * src/getargs.c (longopts): Clean up.
21396
21397 2001-02-21 Akim Demaille <akim@epita.fr>
21398
21399 * src/reader.c (gensym): `gensym_count' is your own.
21400 Use a static buf to create the symbol name, as token_buffer is no
21401 longer a buffer.
21402
21403 2001-02-08 Akim Demaille <akim@epita.fr>
21404
21405 * src/conflicts.c (conflict_report): Be sure not to append to res
21406 between two calls, which could happen if both first sprintf were
21407 skipped, but not the first cp += strlen.
21408
21409 2001-02-08 Akim Demaille <akim@epita.fr>
21410
21411 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
21412 New, from fileutils 4.0.37.
21413 * configure.in: Require Autoconf 2.49c. I took some time before
21414 making this decision. This is the only way out for portability
21415 issues in Bison, it would mean way too much duplicate effort to
21416 import in Bison features implemented in 2.49c since 2.13.
21417 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
21418
21419 2001-02-02 Akim Demaille <akim@epita.fr>
21420
21421 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
21422 * lib/xalloc.h, lib/xmalloc.c: Update.
21423
21424 2001-01-19 Akim Demaille <akim@epita.fr>
21425
21426 Get rid of the ad hoc handling of token_buffer in the scanner: use
21427 the obstacks.
21428
21429 * src/lex.c (token_obstack): New.
21430 (init_lex): Initialize it. No longer call...
21431 (grow_token_buffer): this. Remove it.
21432 Adjust all the places which used it to use the obstack.
21433
21434 2001-01-19 Akim Demaille <akim@epita.fr>
21435
21436 * src/lex.h: Rename all the tokens:
21437 s/\bENDFILE\b/tok_eof/g;
21438 s/\bIDENTIFIER\b/tok_identifier/g;
21439 etc.
21440 Let them be enums, not #define, to ease debugging.
21441 Adjust all the code.
21442
21443 2001-01-18 Akim Demaille <akim@epita.fr>
21444
21445 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
21446 * src/lex.c (maxtoken, grow_token_buffer): Static.
21447
21448 2001-01-18 Akim Demaille <akim@epita.fr>
21449
21450 Since we now use obstacks, more % directives can be enabled.
21451
21452 * src/lex.c (percent_table): Also accept `%yacc',
21453 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
21454 `%debug'.
21455 Handle the actions for `%semantic_parser' and `%pure_parser' here,
21456 instead of returning a token.
21457 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
21458 * src/reader.c (read_declarations): Adjust.
21459 * src/files.c (open_files): Don't call `compute_base_names', don't
21460 compute `attrsfile' since they depend upon data which might be
21461 *in* the input file now.
21462 (output_files): Do it here.
21463 * src/output.c (output_headers): Document the fact that this patch
21464 introduces a guaranteed SEGV for semantic parsers.
21465 * doc/bison.texinfo: Document them.
21466 * tests/suite.at: Exercise these %options.
21467
21468 2000-12-20 Akim Demaille <akim@epita.fr>
21469
21470 Also handle the output file (--verbose) with obstacks.
21471
21472 * files.c (foutput): Remove.
21473 (output_obstack): New.
21474 Adjust all dependencies.
21475 * src/conflicts.c: Return a string.
21476 * src/system.h (obstack_grow_string): Rename as...
21477 (obstack_sgrow): this. Be ready to work with non literals.
21478 (obstack_fgrow4): New.
21479
21480 2000-12-20 Akim Demaille <akim@epita.fr>
21481
21482 * src/files.c (open_files): Fix the computation of short_base_name
21483 in the case of `-o foo.tab.c'.
21484
21485 2000-12-20 Akim Demaille <akim@epita.fr>
21486
21487 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
21488 (copy_dollar): Now that everything uses obstacks, get rid of the
21489 FILE * parameters.
21490
21491 2000-12-20 Akim Demaille <akim@epita.fr>
21492
21493 * src/files.c (open_files): Actually the `.output' file is based
21494 on the short_base_name, not base_name.
21495 * tests/suite.at (Checking output file names): Adjust.
21496
21497 2000-12-20 Akim Demaille <akim@epita.fr>
21498
21499 * src/bison.s1: Remove, we now use directly...
21500 * src/bison.simple: this.
21501 * src/Makefile.am: Use pkgdata instead of data.
21502
21503 2000-12-20 Akim Demaille <akim@epita.fr>
21504
21505 * src/files.c (guard_obstack): New.
21506 (open_files): Initialize it.
21507 (output_files): Dump it...
21508 * src/files.h: Export it.
21509 * src/reader.c (copy_guard): Use it.
21510
21511 2000-12-19 Akim Demaille <akim@epita.fr>
21512
21513 * src/files.c (outfile, defsfile, actfile): Removed as global
21514 vars.
21515 (open_files): Don't compute them.
21516 (output_files): Adjust.
21517 (base_name, short_base_name): Be global.
21518 Adjust dependencies.
21519
21520 2000-12-19 Akim Demaille <akim@epita.fr>
21521
21522 * src/files.c (strsuffix): New.
21523 (stringappend): Be just like strcat but allocate.
21524 (base_names): Eve out from open_files.
21525 Try to simplify the rather hairy computation of base_name and
21526 short_base_name.
21527 (open_files): Use it.
21528 * tests/suite.at (Checking output file names): New test.
21529
21530 2000-12-19 Akim Demaille <akim@epita.fr>
21531
21532 * src/system.h (obstack_grow_literal_string): Rename as...
21533 (obstack_grow_string): this.
21534 * src/output.c (output_parser): Recognize `%% actions' instead of
21535 `$'.
21536 * src/bison.s1: s/$/%% actions/.
21537 * src/bison.hairy: Likewise.
21538
21539 2000-12-19 Akim Demaille <akim@epita.fr>
21540
21541 * src/output.c (output_parser): Compute the `#line' lines when
21542 there are.
21543 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
21544 Suggested by Hans Aberg.
21545
21546 2000-12-19 Akim Demaille <akim@epita.fr>
21547
21548 Let the handling of the skeleton files be local to the procedures
21549 that use it.
21550
21551 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
21552 longer static.
21553 (fparser, open_extra_files): Remove.
21554 (open_files, output_files): Don't take care of fparser.
21555 * src/files.h: Adjust.
21556 * src/output.c (output_parser): Open and close the file to the
21557 skeleton.
21558 * src/reader.c (read_declarations): When %semantic_parser, open
21559 fguard.
21560
21561 2000-12-19 Akim Demaille <akim@epita.fr>
21562
21563 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
21564 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
21565
21566 2000-12-19 Akim Demaille <akim@epita.fr>
21567
21568 * src/files.c (open_files): Yipee! We no longer need all the code
21569 looking for `/tmp' since we have no tmp file.
21570
21571 2000-12-19 Akim Demaille <akim@epita.fr>
21572
21573 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
21574 New macros.
21575 * src/files.c (open_files): Less dependency on MSDOS etc.
21576
21577 2000-12-14 Akim Demaille <akim@epita.fr>
21578
21579 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
21580 Provide a default definition.
21581 Use it when executing the default @ action.
21582 * src/reader.c (reader_output_yylsp): No longer include
21583 `timestamp' and `text' in the default YYLTYPE.
21584
21585 2000-12-12 Akim Demaille <akim@epita.fr>
21586
21587 * src/reader.c (copy_definition, parse_union_decl, copy_action)
21588 (copy_guard): Quote the file names.
21589 Reported by Laurent Mascherpa.
21590
21591 2000-12-12 Akim Demaille <akim@epita.fr>
21592
21593 * src/output.c (output_headers, output_program, output): Be sure
21594 to escape special characters when outputting filenames.
21595 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
21596 (output_headers): Don't depend on them, Use ACTSTR.
21597
21598 2000-11-17 Akim Demaille <akim@epita.fr>
21599
21600 * lib/obstack.h: Formatting changes.
21601 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
21602 prevents type checking.
21603 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
21604 cast the value to (void *): assigning a `foo *' to a `void *'
21605 variable is valid.
21606 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
21607 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
21608 append characters.
21609
21610 2000-11-17 Akim Demaille <akim@epita.fr>
21611
21612 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
21613 as...
21614 (suite.m4, regression.m4, calc.m4): these.
21615 * tests/atgeneral.m4: Update from CVS Autoconf.
21616
21617 2000-11-17 Akim Demaille <akim@epita.fr>
21618
21619 * tests/regression.m4 (%union and --defines): New test,
21620 demonstrating a current bug in the obstack implementation.
21621
21622 2000-11-17 Akim Demaille <akim@epita.fr>
21623
21624 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
21625 macros.
21626 Use them to declare the variables which are global or local to
21627 `yyparse'.
21628
21629 2000-11-17 Akim Demaille <akim@epita.fr>
21630
21631 * acconfig.h: Remove, no longer used.
21632
21633 2000-11-07 Akim Demaille <akim@epita.fr>
21634
21635 * src: s/Copyright (C)/Copyright/g.
21636
21637 2000-11-07 Akim Demaille <akim@epita.fr>
21638
21639 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
21640 defining.
21641 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
21642
21643 2000-11-07 Akim Demaille <akim@epita.fr>
21644
21645 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
21646 Merge in a single CPP if/else.
21647
21648 2000-11-07 Akim Demaille <akim@epita.fr>
21649
21650 * src/output.c (output): Remove useless variables.
21651 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
21652 argument `data' for consistency with the prototypes.
21653 Qualify it `const'.
21654 (obstack_copy, obstack_copy0): Rename the second argument as
21655 `address' for consistency. Qualify it `const'.
21656 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
21657 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
21658 `const' their input argument (`data' or `address').
21659 Adjust the corresponding macros to include `const' in casts.
21660
21661 2000-11-03 Akim Demaille <akim@epita.fr>
21662
21663 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
21664 s/PFILE1/BISON_HAIRY/.
21665 Adjust dependencies.
21666
21667 2000-11-03 Akim Demaille <akim@epita.fr>
21668
21669 For some reason, this was not applied.
21670
21671 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
21672 `unlink': it's no longer used.
21673
21674 2000-11-03 Akim Demaille <akim@epita.fr>
21675
21676 * src/files.c (skeleton_find): New function, eved out of...
21677 (open_files, open_extra_files): here.
21678
21679 2000-11-03 Akim Demaille <akim@epita.fr>
21680
21681 Don't use `atexit'.
21682
21683 * src/files.c (obstack_save): New function.
21684 (done): Rename as...
21685 (output_files): this.
21686 Use `obstack_save'.
21687 * src/main.c (main): Don't use `atexit' to register `done', since
21688 it no longer has to remove tmp files, just call `output_files'
21689 when there are no errors.
21690
21691 2000-11-02 Akim Demaille <akim@epita.fr>
21692
21693 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
21694 `unlink': it's no longer used.
21695 * src/files.h: Formatting changes.
21696
21697 2000-11-02 Akim Demaille <akim@epita.fr>
21698
21699 Remove the last uses of mktemp and unlink/delete.
21700
21701 * src/files.c (fdefines, ftable): Removed.
21702 (defines_ostack, table_obstack): New.
21703 Adjust dependencies of the former into uses of the latter.
21704 * src/output.c (output_short_or_char_table, output_short_table):
21705 Convert to using obstacks.
21706 * src/reader.c (copy_comment2): Accept one FILE * and two
21707 obstacks.
21708 (output_token_defines, reader_output_yylsp): Use obstacks.
21709 * src/system.h (obstack_fgrow3): New.
21710 * po/POTFILES.in: Adjust.
21711
21712 2000-11-01 Akim Demaille <akim@epita.fr>
21713
21714 Change each use of `fattrs' into a use of `attrs_obstack'.
21715
21716 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
21717 * src/files.c (fattrs): Remove.
21718 (attrs_obstack): New.
21719 Adjust all dependencies.
21720 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
21721
21722 2000-11-01 Akim Demaille <akim@epita.fr>
21723
21724 Introduce obstacks.
21725 Change each use of `faction' into a use of `action_obstack'.
21726
21727 * lib/obstack.h, lib/obstack.c: New files.
21728 * src/files.c (faction): Remove.
21729 (action_obstack): New.
21730 Adjust all dependencies.
21731
21732 2000-10-20 Akim Demaille <akim@epita.fr>
21733
21734 * lib/quote.h (PARAMS): New macro. Use it.
21735
21736 2000-10-16 Akim Demaille <akim@epita.fr>
21737
21738 * src/output.c (output_short_or_char_table): New function.
21739 (output_short_table, output_token_translations): Use it.
21740 (goto_actions): Use output_short_table.
21741
21742 2000-10-16 Akim Demaille <akim@epita.fr>
21743
21744 * src/symtab.c (bucket_new): New function.
21745 (getsym): Use it.
21746
21747 * src/output.c (output_short_table): New argument to display the
21748 comment associated with the table.
21749 Adjust dependencies.
21750 (output_gram): Use it.
21751 (output_rule_data): Nicer output layout for YYTNAME.
21752
21753 2000-10-16 Akim Demaille <akim@epita.fr>
21754
21755 * src/lex.c (read_typename): New function.
21756 (lex): Use it.
21757 * src/reader.c (copy_dollar): Likewise.
21758
21759 2000-10-16 Akim Demaille <akim@epita.fr>
21760
21761 * src/reader.c (copy_comment2): Expect the input stream to be on
21762 the `/' which is suspected to open a comment, instead of being
21763 called after `//' or `/*' was read.
21764 (copy_comment, copy_definition, parse_union_decl, copy_action)
21765 (copy_guard): Adjust.
21766
21767 2000-10-16 Akim Demaille <akim@epita.fr>
21768
21769 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
21770 `read_signed_integer'.
21771
21772 2000-10-16 Akim Demaille <akim@epita.fr>
21773
21774 * src/reader.c (copy_dollar): New function.
21775 (copy_guard, copy_action): Use it.
21776
21777 2000-10-16 Akim Demaille <akim@epita.fr>
21778
21779 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
21780 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
21781 New files, from Fileutils 4.0.27.
21782 * src/main.c (printable_version): Remove.
21783 * src/lex.c, src/reader.c: Use `quote'.
21784
21785 2000-10-04 Akim Demaille <akim@epita.fr>
21786
21787 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
21788
21789 2000-10-04 Akim Demaille <akim@epita.fr>
21790
21791 * doc/bison.texinfo: Various typos spotted by Neil Booth.
21792
21793 2000-10-04 Akim Demaille <akim@epita.fr>
21794
21795 When a literal string is used to define two different tokens,
21796 `bison -v' segfaults.
21797 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
21798
21799 * tests/regression.m4: New file.
21800 Include the core of the sample provided by Piotr Gackiewicz.
21801 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
21802 properly.
21803
21804 2000-10-04 Akim Demaille <akim@epita.fr>
21805
21806 * src/reader.c (parse_expect_decl): Keep `count' within the size
21807 of `buffer'.
21808 From Neil Booth.
21809
21810 2000-10-02 Paul Eggert <eggert@twinsun.com>
21811
21812 * bison.s1 (yyparse): Assign the default value
21813 unconditionally, to avoid a GCC warning and make the parser a
21814 tad smaller.
21815
21816 2000-10-02 Akim Demaille <akim@epita.fr>
21817
21818 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
21819 options.
21820
21821 2000-10-02 Akim Demaille <akim@epita.fr>
21822
21823 * src/derives.c, src/print.c, src/reduce.c: To ease the
21824 translation, move some `\n' out of the translated strings.
21825
21826 2000-10-02 Akim Demaille <akim@epita.fr>
21827
21828 The location tracking mechanism is precious for parse error
21829 messages. Nevertheless, it is enabled only when `@n' is used in
21830 the grammar, which is a different issue (you can use it in error
21831 message, but not in the grammar per se). Therefore, there should
21832 be another means to enable it.
21833
21834 * src/getargs.c (getargs): Support `--locations'.
21835 (usage): Report it.
21836 * src/getargs.h (locationsflag): Export it.
21837 * src/lex.c (percent_table): Support `%locations'.
21838 * src/reader.c (yylsp_needed): Remove this variable, now replaced
21839 with `locationsflag'.
21840 * doc/bison.texinfo: Document `--locations' and `%locations'.
21841 Sort the options.
21842 * tests/calc.m4: Test it.
21843
21844 For regularity of the names, replace each
21845 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
21846 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
21847 In addition replace each `flag' with `_flag'.
21848
21849 2000-10-02 Akim Demaille <akim@epita.fr>
21850
21851 Also test parse error messages, including with YYERROR_VERBOSE.
21852
21853 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
21854 associative).
21855 Use it to check the computations.
21856 Use it to check `nonassoc' is honored.
21857 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
21858 `--yyerror-verbose'.
21859 (_AT_CHECK_CALC): Adjust to this option.
21860 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
21861
21862 2000-10-02 Akim Demaille <akim@epita.fr>
21863
21864 Test also `--verbose', `--defines' and `--name-prefix'. Testing
21865 the latter demonstrates a flaw in the handling of non debugging
21866 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
21867 was used in order to simplify:
21868
21869 #if YYDEBUG
21870 if (yydebug)
21871 {
21872 ...
21873 }
21874 #endif
21875
21876 into
21877
21878 if (yydebug)
21879 {
21880 ...
21881 }
21882
21883 unfortunately this leads to a CPP conflict when
21884 `--name-prefix=foo' is used since it produces `#define yydebug
21885 foodebug'.
21886
21887 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
21888 (YYDPRINTF): New macro.
21889 Spread its use.
21890 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
21891 the bison options.
21892 Also test `--verbose', `--defines' and `--name-prefix'.
21893
21894 2000-10-02 Akim Demaille <akim@epita.fr>
21895
21896 Improve the readability of the produced parsers.
21897
21898 * src/bison.s1: Formatting changes.
21899 Improve the comment related to the `$' mark.
21900 (yydefault): Don't fall through to `yyresume': `goto' there.
21901 * src/output.c (output_parser): When the `$' is met, skip the end
21902 of its line.
21903 New variable, `number_of_dollar_signs', to check there's exactly
21904 one `$' in the parser skeleton.
21905
21906 2000-10-02 Akim Demaille <akim@epita.fr>
21907
21908 * lib/xstrdup.c: New file, from the fileutils.
21909 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
21910 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
21911 instead of strlen + xmalloc + strcpy.
21912 * src/symtab.c (copys): Remove, use xstrdup instead.
21913
21914 2000-10-02 Akim Demaille <akim@epita.fr>
21915
21916 * src/gram.h (associativity): New enum type which replaces the
21917 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
21918 `right_assoc', `left_assoc' and `non_assoc'.
21919 Adjust all dependencies.
21920 * src/reader.c: Formatting changes.
21921 (LTYPESTR): Don't define it, use it as a literal in
21922 `reader_output_yylsp'.
21923 * src/symtab.h (symbol_class): New enum type which replaces the
21924 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
21925 `sunknown', `stoken and `snterm'.
21926
21927 2000-10-02 Akim Demaille <akim@epita.fr>
21928
21929 * src/getargs.c (fixed_outfiles): Rename as...
21930 (yaccflag): for consistency and accuracy.
21931 Adjust dependencies.
21932
21933 2000-10-02 Akim Demaille <akim@epita.fr>
21934
21935 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
21936 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
21937 difficult and introduced a lot of core dump. It turns out that
21938 Bison used an implementation of `xmalloc' based on `calloc', and
21939 at various places it does depend upon the initialization to 0. I
21940 have not tried to isolate the pertinent places, and all the former
21941 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
21942 someone should address this issue.
21943
21944 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
21945 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
21946 files.
21947 Adjust dependencies.
21948 * src/warshall.h: New file.
21949 Propagate.
21950
21951 2000-10-02 Akim Demaille <akim@epita.fr>
21952
21953 Various anti-`extern in *.c' changes.
21954
21955 * src/system.h: Include `assert.h'.
21956
21957 2000-10-02 Akim Demaille <akim@epita.fr>
21958
21959 * src/state.h (nstates, final_state, first_state, first_shift)
21960 (first_reduction): Move their exportation from here...
21961 * src/LR0.h: to here.
21962 Adjust dependencies.
21963 * src/getargs.c (statisticsflag): New variable.
21964 Add support for `--statistics'.
21965 Adjust dependencies.
21966
21967 Remove a lot of now useless `extern' statements in most files.
21968
21969 2000-10-02 Akim Demaille <akim@epita.fr>
21970
21971 * src/LR0.h: New file.
21972 Propagate its use.
21973
21974 2000-10-02 Akim Demaille <akim@epita.fr>
21975
21976 * src/print.h: New file.
21977 Propagate its use.
21978 * src/print.c: Formatting and ordering changes.
21979 (verbose, terse): Replace with...
21980 (print_results): this new function.
21981 Adjust dependencies.
21982
21983 2000-10-02 Akim Demaille <akim@epita.fr>
21984
21985 * src/conflicts.c (conflict_report): New function.
21986 (conflict_log, verbose_conflict_log): Replace with...
21987 (print_conflicts): this function.
21988 Adjust dependencies.
21989 * src/conflicts.h: New file.
21990 Propagate its inclusion.
21991
21992 2000-10-02 Akim Demaille <akim@epita.fr>
21993
21994 * src/nullable.h: New file.
21995 Propagate its inclusion.
21996 * src/nullable.c: Formatting changes.
21997
21998 2000-10-02 Akim Demaille <akim@epita.fr>
21999
22000 * src/reduce.h: New file.
22001 Propagate its inclusion.
22002 * src/reduce.c: Topological sort and other formatting changes.
22003 (bool, TRUE, FALSE): Move their definition to...
22004 * src/system.h: here.
22005
22006 2000-10-02 Akim Demaille <akim@epita.fr>
22007
22008 * src/files.c: Formatting changes.
22009 (tryopen, tryclose, openfiles): Rename as...
22010 (xfopen, xfclose, open_files): this.
22011 (stringappend): static.
22012 * src/files.h: Complete the list of exported symbols.
22013 Propagate its use.
22014
22015 2000-10-02 Akim Demaille <akim@epita.fr>
22016
22017 * src/reader.h: New file.
22018 Propagate its use instead of tedious list of `extern' and
22019 prototypes.
22020 * src/reader.c: Formatting changes, topological sort,
22021 s/register//.
22022
22023 2000-10-02 Akim Demaille <akim@epita.fr>
22024
22025 * src/lex.h: Prototype `lex.c' exported functions.
22026 * src/reader.c: Adjust.
22027 * src/lex.c: Formatting changes.
22028 (safegetc): Rename as...
22029 (xgetc): this.
22030
22031 2000-10-02 Akim Demaille <akim@epita.fr>
22032
22033 * src/lalr.h: New file.
22034 Propagate its inclusion instead of prototypes and `extern'.
22035 * src/lalr.c: Formatting changes, topological sorting etc.
22036
22037 2000-10-02 Akim Demaille <akim@epita.fr>
22038
22039 * src/output.c (token_actions): Introduce a temporary array,
22040 YYDEFACT, that makes it possible for this function to use
22041 output_short_table.
22042
22043 2000-10-02 Akim Demaille <akim@epita.fr>
22044
22045 `user_toknums' is output as a `short[]' in `output.c', while it is
22046 defined as a `int[]' in `reader.c'. For consistency with the
22047 other output tables, `user_toknums' is now defined as a table of
22048 shorts.
22049
22050 * src/reader.c (user_toknums): Be a short table instead of an int
22051 table.
22052 Adjust dependencies.
22053
22054 Factor the short table outputs.
22055
22056 * src/output.c (output_short_table): New function.
22057 * src/output.c (output_gram, output_stos, output_rule_data)
22058 (output_base, output_table, output_check): Use it.
22059
22060 2000-10-02 Akim Demaille <akim@epita.fr>
22061
22062 * src/output.c (output): Topological sort of the functions, in
22063 order to get rid of the `static' prototypes.
22064 No longer use `register'.
22065 * src/output.h: New file.
22066 Propagate its inclusion in files explicitly prototyping functions
22067 from output.c.
22068
22069 2000-09-21 Akim Demaille <akim@epita.fr>
22070
22071 * src/atgeneral.m4: Update from Autoconf.
22072
22073 2000-09-21 Akim Demaille <akim@epita.fr>
22074
22075 * src/closure.h: New file.
22076 * src/closure.c: Formatting changes, topological sort over the
22077 functions, use of closure.h.
22078 (initialize_closure, finalize_closure): Rename as...
22079 (new_closure, free_closure): these. Adjust dependencies.
22080 * src/LR0.c: Formatting changes, topological sort, use of
22081 cloture.h.
22082 (initialize_states): Rename as...
22083 (new_states): this.
22084 * src/Makefile.am (noinst_HEADERS): Adjust.
22085
22086 2000-09-20 Akim Demaille <akim@epita.fr>
22087
22088 * src/acconfig.h: Don't protect config.h against multiple
22089 inclusion.
22090 Don't define PARAMS.
22091 * src/system.h: Define PARAMS.
22092 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
22093 purpose of config.h. system.h must not try to fix wrong
22094 definitions in config.h.
22095
22096 2000-09-20 Akim Demaille <akim@epita.fr>
22097
22098 * src/derives.h: New file.
22099 * src/main.c, src/derives.h: Use it.
22100 Formatting changes.
22101 * src/Makefile.am (noinst_HEADERS): Adjust.
22102
22103 2000-09-20 Akim Demaille <akim@epita.fr>
22104
22105 * tests/atgeneral.m4: Update from Autoconf.
22106 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
22107 (AT_CHECK_CALC): New macros.
22108 Use these macros to test bison with options `', `--raw',
22109 `--debug', `--yacc', `--yacc --debug'.
22110
22111 2000-09-19 Akim Demaille <akim@epita.fr>
22112
22113 * src/output.c: Formatting changes.
22114 * src/machine.h: Remove, leaving its contents in...
22115 * src/system.h: here.
22116 Include stdio.h.
22117 Adjust all dependencies on stdio.h and machine.h.
22118 * src/getargs.h: New file.
22119 Let all `extern' declarations about getargs.c be replaced with
22120 inclusion of `getargs.h'.
22121 * src/Makefile.am (noinst_HEADERS): Adjust.
22122
22123 * tests/calc.m4 (yyin): Be initialized in main, not on the global
22124 scope.
22125 (yyerror): Returns void, not int.
22126 * doc/bison.texinfo: Formatting changes.
22127
22128 2000-09-19 Akim Demaille <akim@epita.fr>
22129
22130 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
22131 portable.
22132
22133 2000-09-18 Akim Demaille <akim@epita.fr>
22134
22135 * configure.in: Append WARNING_CFLAGS to CFLAGS.
22136 * src/Makefile.am (INCLUDES): Don't.
22137 Be ready to fetch headers in lib/.
22138
22139 2000-09-18 Akim Demaille <akim@epita.fr>
22140
22141 * doc/bison.texinfo: Update the copyright.
22142 ANSIfy and GNUify the examples.
22143 Remove the old menu.
22144
22145 2000-09-18 Akim Demaille <akim@epita.fr>
22146
22147 First set of tests: use the `calc' example from the documentation.
22148
22149 * src/bison.s1 (yyparse): Condition the code using `yytname' which
22150 is defined only when YYDEBUG is.
22151 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
22152 * src/files.c (tryopen, tryclose): Formatting changes.
22153 Move to the top and be static.
22154 * src/reader.c (read_signed_integer): Likewise.
22155 * tests/calc.m4: New file.
22156 * Makefile.am, suite.m4: Adjust.
22157 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
22158
22159 2000-09-18 Akim Demaille <akim@epita.fr>
22160
22161 Add support for an Autotest test suite for Bison.
22162
22163 * m4/m4.m4, m4/atconfig.m4: New files.
22164 * m4/Makefile.am (EXTRA_DIST): Adjust.
22165 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
22166 files.
22167 * src/getargs.c: Display a more standard --version message.
22168 * src/reader.c (reader): Formatting changes.
22169 No longer depend upon VERSION_STRING.
22170 * configure.in: No longer use `dnl'.
22171 Set up the test suite and the new directory `tests/.
22172 (VERSION_STRING): Remove.
22173
22174 2000-04-14 Akim Demaille <akim@epita.fr>
22175
22176 * src/reader.c (copy_comment2): New function, same as former
22177 `copy_comment', but outputs into two FILE *.
22178 (copy_comment): Use it.
22179 (parse_union_decl): Use it.
22180 (get_type, parse_start_decl): Use the same `invalid' message.
22181 (parse_start_decl, parse_union_decl): Use the same `multiple'
22182 message.
22183 (parse_union_decl, copy_guard, copy_action): Use the same
22184 `unmatched' message.
22185 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
22186
22187 2000-03-31 Akim Demaille <akim@epita.fr>
22188
22189 * src/files.c (tryopen, tryclose): Move to the top.
22190 Be static.
22191
22192 2000-03-31 Akim Demaille <akim@epita.fr>
22193
22194 * src/main.c (main): Don't call `done', exit does it.
22195
22196 2000-03-31 Akim Demaille <akim@epita.fr>
22197
22198 * allocate.c: s/return (foo)/return foo/.
22199 * lalr.c: Likewise.
22200 * LR0.c: Likewise.
22201 * output.c: Likewise.
22202 * reader.c: Likewise.
22203 * symtab.c: Likewise.
22204 * vmsgetargs.c: Likewise.
22205
22206 2000-03-31 Akim Demaille <akim@epita.fr>
22207
22208 Clean up the error reporting functions.
22209
22210 * src/report.c: New file.
22211 * src/report.h: Likewise.
22212 * src/Makefile.am: Adjust.
22213 * m4/error.m4: New file.
22214 * m4/Makefile.am: Adjust.
22215 * configure.in (jm_PREREQ_ERROR): Call it.
22216 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
22217 Remove.
22218 (fatal, fatals): Remove. All callers use complain.c::fatal.
22219 (warn, warni, warns, warnss, warnss): Remove. All callers use
22220 complain.c::complain.
22221 (toomany): Remove, use fatal instead.
22222 * src/files.c (done): No argument, use complain_message_count.
22223 * src/main.c (main): Register `done' to `atexit'.
22224
22225 * src/getargs.c (usage): More `fputs', less `fprintf'.
22226
22227 2000-03-28 Akim Demaille <akim@epita.fr>
22228
22229 * lib/: New directory.
22230 * Makefile.am (SUBDIRS): Adjust.
22231 * configure.in: Adjust.
22232 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
22233 useless.
22234 * src/alloca.c: Moved to lib/.
22235 * src/getopt.c: Likewise.
22236 * src/getopt1.c: Likewise.
22237 * src/getopt.h: Likewise.
22238 * src/ansi2knr.c: Likewise.
22239 * src/ansi2knr.1: Likewise.
22240 * src/Makefile.am: Adjust.
22241 * lib/Makefile.am: New file.
22242
22243 2000-03-28 Akim Demaille <akim@epita.fr>
22244
22245 * src/getargs.c (usage): Refresh the help message.
22246
22247 2000-03-17 Akim Demaille <akim@epita.fr>
22248
22249 * src/getopt1.c: Updated from textutils 2.0e
22250 * src/getopt.c: Likewise.
22251 * src/getopt.h: Likewise.
22252
22253 2000-03-17 Akim Demaille <akim@epita.fr>
22254
22255 * src/Makefile.am (bison.simple): Fix the awk program: quote only
22256 the file name, not the whole `#line LINE FILE'.
22257
22258 2000-03-17 Akim Demaille <akim@epita.fr>
22259
22260 On syntax errors, report the token on which we choked.
22261
22262 * src/bison.s1 (yyparse): In the label yyerrlab, when
22263 YYERROR_VERBOSE, add yychar in msg.
22264
22265 2000-03-17 Akim Demaille <akim@epita.fr>
22266
22267 * src/reader.c (copy_at): New function.
22268 (copy_guard): Use it.
22269 (copy_action): Use it.
22270
22271 2000-03-17 Akim Demaille <akim@epita.fr>
22272
22273 Be kind to translators, save some useless translations.
22274
22275 * src/main.c (banner): New function.
22276 (fatal_banner): Use it.
22277 (warn_banner): Use it.
22278
22279 2000-03-17 Akim Demaille <akim@epita.fr>
22280
22281 * src/reader.c (copy_definition): Use copy_string and
22282 copy_comment. Removed now unused `match', `ended',
22283 `cplus_comment'.
22284 (copy_comment, copy_string): Moved, to be visible from
22285 copy_definition.
22286
22287 2000-03-17 Akim Demaille <akim@epita.fr>
22288
22289 * src/reader.c (copy_string): Declare `static inline'. No
22290 problems with inline, since it is checked by configure.
22291 (copy_comment): Likewise.
22292
22293 2000-03-17 Akim Demaille <akim@epita.fr>
22294
22295 * src/reader.c (packsymbols): Formatting changes.
22296
22297 2000-03-17 Akim Demaille <akim@epita.fr>
22298
22299 * src/reader.c (copy_comment): New function, factored out from:
22300 (copy_action): Use it. Removed now unused `match', `ended',
22301 `cplus_comment'.
22302 (copy_guard): Likewise.
22303
22304 2000-03-17 Akim Demaille <akim@epita.fr>
22305
22306 * src/reader.c (copy_string): New function, factored out from:
22307 (copy_action): Use it.
22308 (copy_guard): Likewise.
22309
22310 2000-03-17 Akim Demaille <akim@epita.fr>
22311
22312 Change the handling of @s so that they behave exactly like $s.
22313 There is now a pseudo variable @$ (readble and writable), location
22314 of the lhs of the rule (by default ranging from the location of
22315 the first symbol of the rhs, to the location of the last symbol,
22316 or, if the rhs is empty, YYLLOC).
22317
22318 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
22319 yyval.
22320 (yyparse): When providing a default semantic action, provide a
22321 default location action.
22322 (after the $): No longer change `*YYLSP', just stack YYLOC the
22323 same way you stack YYVAL.
22324 * src/reader.c (read_declarations): Use warns.
22325 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
22326 (copy_action, case '@'): Likewise.
22327 Use a standard error message, to save useless work from
22328 translators.
22329
22330 2000-03-17 Akim Demaille <akim@epita.fr>
22331
22332 * src/bison.s1: Formatting and cosmetics changes.
22333 * src/reader.c: Likewise.
22334 Update the Copyright notice.
22335
22336 2000-03-17 Akim Demaille <akim@epita.fr>
22337
22338 * src/bison.s1 (#line): All set to `#line' only, since the
22339 Makefile now handles them.
22340
22341 2000-03-16 Akim Demaille <akim@epita.fr>
22342
22343 * src/output.c (output_rule_data): Output the documentation of
22344 some of the tables.
22345 (Copyright notice): Update.
22346 Formatting changes.
22347
22348 2000-03-16 Akim Demaille <akim@epita.fr>
22349
22350 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
22351 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
22352 One `#if YYDEBUG' remains, since it uses variables which are
22353 defined only if `YYDEBUG != 0'.
22354
22355 2000-03-16 Akim Demaille <akim@epita.fr>
22356
22357 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
22358 and related variables so that the similarities are highlighted.
22359
22360 2000-03-16 Akim Demaille <akim@epita.fr>
22361
22362 * src/bison.s1: Properly indent CPP directives.
22363
22364 2000-03-16 Akim Demaille <akim@epita.fr>
22365
22366 * src/bison.s1: Properly indent the `alloca' CPP section.
22367
22368 2000-03-16 Akim Demaille <akim@epita.fr>
22369
22370 Do not hard code values of directories in `configure.in'.
22371 Update the `configure' tool chain.
22372
22373 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
22374 src/makefile.am.
22375 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
22376 (AC_OUTPUT): Add m4/Makefile.
22377 Bump to bison 1.28a, 1.29 has never been released.
22378 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
22379 handled via src/Makefile.am.
22380 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
22381 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
22382 autoheader.
22383 * Makefile.am (SUBDIRS): Add m4.
22384 (ACLOCAL_AM_FLAGS): New variable.
22385 (AUTOMAKE_OPTIONS): Add check-news.
22386 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
22387 the proper line number and file name.
22388 (DEFS): Propagate the location of bison library files and of the
22389 locale files.
22390 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
22391 builddir.
22392 * acinclude.m4: Remove, replaced by the directory m4.
22393 * m4/Makefile.am (EXTRA_DIST): New variable.
22394 * m4/gettext.m4: New file, from the fileutils.
22395 * m4/lcmessage.m4: Likewise
22396 * m4/progtest.m4: Likewise.
22397 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
22398
22399 2000-03-10 Akim Demaille <akim@epita.fr>
22400
22401 * src/closure.c:
22402 Formatting changes of various comments.
22403 Respect the GNU coding standards at various places.
22404 Don't use `_()' when no translation is needed.
22405
22406 1999-12-13 Jesse Thilo <jthilo@gnu.org>
22407
22408 * src/files.c:
22409 OS/2 honors TMPDIR environment variable.
22410
22411 1999-12-13 Jesse Thilo <jthilo@gnu.org>
22412
22413 * doc/bison.texinfo: Tweaked spelling and grammar.
22414 Updated ISBN.
22415 Removed reference to price of printed copy.
22416 Mention BISON_SIMPLE and BISON_HAIRY.
22417
22418 1999-12-13 Jesse Thilo <jthilo@gnu.org>
22419
22420 * configure.in, NEWS:
22421 Bison 1.29 released.
22422
22423 1999-10-27 Jesse Thilo <jthilo@gnu.org>
22424
22425 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
22426 Added reference card.
22427
22428 1999-07-26 Jesse Thilo <jthilo@gnu.org>
22429
22430 * po/ru.po: Added Russian translation.
22431
22432 1999-07-26 Jesse Thilo <jthilo@gnu.org>
22433
22434 * configure.in: Added Russian translation.
22435
22436 1999-07-06 Jesse Thilo <jthilo@gnu.org>
22437
22438 * configure.in, NEWS, README:
22439 Released version 1.28.
22440
22441 1999-06-14 Jesse Thilo <jthilo@gnu.org>
22442
22443 * src/system.h:
22444 Squashed redefinition warning on some systems.
22445
22446 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
22447 Have configure build version string instead of relying on ANSI string
22448 concatentation.
22449
22450 1999-06-14 Jesse Thilo <jthilo@gnu.org>
22451
22452 * po/POTFILES.in: Got rid of version.c.
22453
22454 1999-06-14 Jesse Thilo <jthilo@gnu.org>
22455
22456 * acconfig.h, configure.in:
22457 Have configure build version string instead of relying on ANSI string
22458 concatentation.
22459
22460 1999-06-08 Jesse Thilo <jthilo@gnu.org>
22461
22462 * doc/bison.1:
22463 Dropped mention of `+' for long-named options.
22464
22465 1999-05-30 Jesse Thilo <jthilo@gnu.org>
22466
22467 * src/files.c: Added <unistd.h> for unlink().
22468
22469 * src/Makefile.am, src/system.h:
22470 I18n fixes.
22471
22472 1999-05-30 Jesse Thilo <jthilo@gnu.org>
22473
22474 * README: Added a FAQ list.
22475
22476 * configure.in, acconfig.h:
22477 I18n fixes.
22478
22479 1999-05-30 Jesse Thilo <jthilo@gnu.org>
22480
22481 * doc/FAQ, doc/Makefile.am:
22482 Added a FAQ list.
22483
22484 1999-05-19 Jesse Thilo <jthilo@gnu.org>
22485
22486 * src/alloc.h, src/symtab.h, src/version.c:
22487 Protected inclusion of "config.h" with HAVE_CONFIG_H.
22488
22489 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22490
22491 * src/.cvsignore, src/Makefile.am:
22492 Reorganized: sources in `src', documentation in `doc'.
22493
22494 * src/lex.c (literalchar):
22495 fixed the code for escaping double quotes (thanks
22496 Jonathan Czisny.)
22497
22498 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22499
22500 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
22501 Adjusted paths to reflect directory reorganization.
22502
22503 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22504
22505 * doc/.cvsignore, doc/Makefile.am:
22506 Reorganized: sources in `src', documentation in `doc'.
22507
22508 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22509
22510 * configure.in:
22511 Updated AC_INIT file to reflect directory reorganization.
22512
22513 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
22514 Reorganized: sources in `src', documentation in `doc'.
22515
22516 1999-04-13 Jesse Thilo <jthilo@gnu.org>
22517
22518 * src/allocate.c:
22519 Don't declare calloc() and realloc() if not necessary.
22520
22521 1999-04-13 Jesse Thilo <jthilo@gnu.org>
22522
22523 * configure.in, acconfig.h, acinclude.m4:
22524 Don't declare calloc() and realloc() if not necessary.
22525
22526 1999-03-23 Jesse Thilo <jthilo@gnu.org>
22527
22528 * po/.cvsignore: Added i18n support.
22529
22530 1999-03-23 Jesse Thilo <jthilo@gnu.org>
22531
22532 * acconfig.h, configure.in, Makefile.am:
22533 Added i18n support.
22534
22535 1999-03-22 Jesse Thilo <jthilo@gnu.org>
22536
22537 * src/bison.s1: Fixed #line numbers.
22538
22539 1999-03-15 Jesse Thilo <jthilo@gnu.org>
22540
22541 * po/es.po, po/fr.po, po/nl.po, po/de.po:
22542 Added PO files from Translation Project.
22543
22544 1999-03-03 Jesse Thilo <jthilo@gnu.org>
22545
22546 * Makefile.am:
22547 Added support for non-ANSI compilers (ansi2knr).
22548
22549 1999-02-16 Jesse Thilo <jthilo@gnu.org>
22550
22551 * configure.in: Bumped version number to 1.27.
22552
22553 * Makefile.am:
22554 Added `bison.simple' to list of files removed by `make distclean'.
22555
22556 1999-02-12 Jesse Thilo <jthilo@gnu.org>
22557
22558 * src/files.c, src/files.h:
22559 Defined locations of parser files in config.h instead of Makefile.
22560
22561 1999-02-12 Jesse Thilo <jthilo@gnu.org>
22562
22563 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
22564 Defined locations of parser files in config.h instead of Makefile.
22565
22566 1999-02-09 Jesse Thilo <jthilo@gnu.org>
22567
22568 * Makefile.am:
22569 Removed inappropriate use of $< macro.
22570
22571 1999-02-05 Jesse Thilo <jthilo@gnu.org>
22572
22573 * po/Makefile.in.in, po/POTFILES.in:
22574 Add `po' directory skeleton.
22575
22576 1999-01-27 Jesse Thilo <jthilo@gnu.org>
22577
22578 * README: Document help-bison list.
22579
22580 * configure.in: Add check for mkstemp().
22581
22582 1999-01-20 Jesse Thilo <jthilo@gnu.org>
22583
22584 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
22585 Hush a few compiler warnings.
22586
22587 * src/files.c:
22588 Add tryclose(), which verifies that fclose was successful.
22589 Hush a couple of compiler warnings.
22590
22591 1999-01-20 Jesse Thilo <jthilo@gnu.org>
22592
22593 * Makefile.am, OChangeLog:
22594 ChangeLog is now automatically generated. Include the old version as
22595 OChangeLog.
22596
22597 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22598
22599 * 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:
22600 Update FSF address.
22601
22602 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22603
22604 * doc/bison.texinfo: Fix formatting glitch.
22605
22606 * doc/bison.texinfo: Update FSF address.
22607
22608 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22609
22610 * acconfig.h: Update FSF address.
22611
22612 1999-01-08 Jesse Thilo <jthilo@gnu.org>
22613
22614 * src/system.h:
22615 Don't define PACKAGE here, since config.h defines it.
22616
22617 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22618
22619 * src/reader.c: Update copyright date.
22620
22621 * src/main.c:
22622 Ditch sprintf to statically-sized buffers in fatal/warn functions in
22623 favor of output directly to stderr (avoids buffer overruns).
22624
22625 * src/reader.c: Some checks for premature EOF.
22626
22627 * 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:
22628 Use prototypes if the compiler understands them.
22629
22630 * src/files.c: Honor TMPDIR on Unix hosts.
22631 Use prototypes if the compiler understands them.
22632
22633 * src/reader.c:
22634 Fix a couple of buffer overrun bugs.
22635 Use prototypes if the compiler understands them.
22636
22637 * src/system.h: Include unistd.h and ctype.h.
22638 Use #ifdef instead of #if for NLS symbols.
22639
22640 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22641
22642 * doc/bison.texinfo:
22643 Delete comment "consider using @set for edition number, etc..." since
22644 we now are doing so.
22645
22646 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22647
22648 * configure.in:
22649 Use prototypes if the compiler understands them.
22650
22651 * NEWS: Document 1.26 highlights.
22652
22653 * Makefile.am: Require Automake 1.3 or later.
22654
22655 * acconfig.h:
22656 Use prototypes if the compiler understands them.
22657
22658 1998-12-29 Jesse Thilo <jthilo@gnu.org>
22659
22660 * src/version.c:
22661 Use VERSION symbol from automake for version number.
22662
22663 1998-12-29 Jesse Thilo <jthilo@gnu.org>
22664
22665 * acconfig.h, configure.in, version.cin:
22666 Use VERSION symbol from automake for version number.
22667
22668 1998-11-28 Jesse Thilo <jthilo@gnu.org>
22669
22670 * Makefile.am:
22671 Distribute original version of simple parser (bison.s1), not built
22672 version (bison.simple).
22673
22674 1998-11-28 Jesse Thilo <jthilo@gnu.org>
22675
22676 * doc/bison.texinfo: Add info dir entry.
22677
22678 * doc/bison.texinfo:
22679 Let automake put version number into documentation.
22680
22681 1998-11-26 Jesse Thilo <jthilo@gnu.org>
22682
22683 * src/bison.cld, src/build.com, src/vmshlp.mar:
22684 Add non-RCS files from /gd/gnu/bison.
22685
22686 1998-11-26 Jesse Thilo <jthilo@gnu.org>
22687
22688 * doc/bison.1:
22689 Document the BISON_HAIRY and BISON_SIMPLE variables.
22690
22691 1998-11-25 Jesse Thilo <jthilo@gnu.org>
22692
22693 * src/version.c: Build version.c automatically.
22694
22695 * src/reader.c:
22696 Fix token numbering (used to start at 258, not 257).
22697
22698 * src/system.h: Include config.h.
22699
22700 * src/getargs.c: Update bug report address.
22701
22702 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
22703 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
22704
22705 1998-11-25 Jesse Thilo <jthilo@gnu.org>
22706
22707 * Makefile.am:
22708 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
22709
22710 * configure.in, version.cin:
22711 Build version.c automatically.
22712
22713 * AUTHORS: Add AUTHORS file.
22714
22715 * README: Update bug report address.
22716
22717 * bison.simple:
22718 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
22719
22720 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
22721 Add automake stuff.
22722
22723 1998-11-25 Jesse Thilo <jthilo@gnu.org>
22724
22725 * doc/bison.texinfo: Clean up some formatting.
22726
22727 1998-05-05 Richard Stallman <rms@gnu.org>
22728
22729 * doc/bison.texinfo:
22730 Explain better why to make a pure parser.
22731
22732 1998-01-05 Richard Stallman <rms@gnu.org>
22733
22734 * src/files.c (openfiles):
22735 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
22736 find a temporary directory, if possible. Do not unlink files while
22737 they are open.
22738
22739 1997-08-25 Richard Stallman <rms@gnu.org>
22740
22741 * src/reader.c (stack_offset;):
22742 Change some warni to warns.
22743
22744 * src/lex.c (literalchar): Use warns, not warni.
22745
22746 1997-06-28 Richard Stallman <rms@gnu.org>
22747
22748 * src/bison.s1: Add a Bison version comment.
22749
22750 * src/main.c (fatal, warn, berror):
22751 Use program_name.
22752
22753 1997-06-28 Richard Stallman <rms@gnu.org>
22754
22755 * Makefile.in (bison_version): New variable.
22756 (dist): Use that variable.
22757 (bison.s1): Substitute the Bison version into bison.simple.
22758
22759 * bison.simple: Add a Bison version comment.
22760
22761 1997-06-18 Richard Stallman <rms@gnu.org>
22762
22763 * src/main.c (fatal, warn, berror):
22764 Make error messages standard.
22765 (toomany): Improve error message text.
22766
22767 * 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:
22768 new.h renamed to alloc.h.
22769
22770 1997-06-18 Richard Stallman <rms@gnu.org>
22771
22772 * Makefile.in: new.h renamed to alloc.h.
22773
22774 1997-05-24 Richard Stallman <rms@gnu.org>
22775
22776 * src/lex.c (literalchar):
22777 Fix the code for escaping \, " and '.
22778
22779 (lex): Avoid trouble when there are many chars
22780 to discard in a char literal with just several chars in it.
22781
22782 1997-05-17 Richard Stallman <rms@gnu.org>
22783
22784 * src/bison.s1:
22785 Use malloc, if using alloca is troublesome.
22786 (YYSTACK_USE_ALLOCA): New flag macro.
22787 Define it for some systems and compilers.
22788 (YYSTACK_ALLOC): New macro.
22789 (yyparse): Use YYSTACK_ALLOC to allocate stack.
22790 If it was malloc'd, free it.
22791
22792 1997-05-17 Richard Stallman <rms@gnu.org>
22793
22794 * bison.simple:
22795 Use malloc, if using alloca is troublesome.
22796 (YYSTACK_USE_ALLOCA): New flag macro.
22797 Define it for some systems and compilers.
22798 (YYSTACK_ALLOC): New macro.
22799 (yyparse): Use YYSTACK_ALLOC to allocate stack.
22800 If it was malloc'd, free it.
22801
22802 1997-04-23 Richard Stallman <rms@gnu.org>
22803
22804 * src/bison.s1:
22805 (alloca) [__hpux]: Always define as __builtin_alloca.
22806
22807 1997-04-23 Richard Stallman <rms@gnu.org>
22808
22809 * bison.simple:
22810 (alloca) [__hpux]: Always define as __builtin_alloca.
22811
22812 1997-04-22 Richard Stallman <rms@gnu.org>
22813
22814 * src/bison.s1:
22815 [__hpux]: Include alloca.h (right for HPUX 10)
22816 instead of declaring alloca (right for HPUX 9).
22817
22818 * src/bison.s1 (__yy_memcpy):
22819 Declare arg `count' as unsigned int.
22820 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
22821
22822 1997-04-22 Richard Stallman <rms@gnu.org>
22823
22824 * bison.simple:
22825 [__hpux]: Include alloca.h (right for HPUX 10)
22826 instead of declaring alloca (right for HPUX 9).
22827
22828 * bison.simple (__yy_memcpy):
22829 Declare arg `count' as unsigned int.
22830 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
22831
22832 1997-01-03 Richard Stallman <rms@gnu.org>
22833
22834 * src/allocate.c: [__STDC__ or _MSC_VER]:
22835 Declare calloc and realloc to return void *.
22836
22837 1997-01-02 Richard Stallman <rms@gnu.org>
22838
22839 * src/system.h:
22840 [_MSC_VER]: Include stdlib.h and process.h.
22841 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
22842
22843 * src/main.c (main): Return FAILURE as a value.
22844 (printable_version): Declare arg as int, not char.
22845
22846 1997-01-02 Richard Stallman <rms@gnu.org>
22847
22848 * Makefile.in (dist):
22849 Explicitly check for symlinks, and copy them.
22850
22851 1996-12-19 Richard Stallman <rms@gnu.org>
22852
22853 * src/files.c:
22854 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
22855
22856 1996-12-18 Paul Eggert <eggert@gnu.org>
22857
22858 * src/bison.s1 (yyparse):
22859 If __GNUC__ and YYPARSE_PARAM are both defined,
22860 declare yyparse to have a void * argument.
22861
22862 1996-12-18 Paul Eggert <eggert@gnu.org>
22863
22864 * bison.simple (yyparse):
22865 If __GNUC__ and YYPARSE_PARAM are both defined,
22866 declare yyparse to have a void * argument.
22867
22868 1996-12-17 Richard Stallman <rms@gnu.org>
22869
22870 * src/reduce.c (nbits): Add some casts.
22871
22872 1996-08-12 Richard Stallman <rms@gnu.org>
22873
22874 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
22875
22876 1996-08-12 Richard Stallman <rms@gnu.org>
22877
22878 * bison.simple: Test _MSDOS as well as _MSDOS_.
22879
22880 1996-07-31 Richard Stallman <rms@gnu.org>
22881
22882 * src/bison.s1:
22883 [__sun && __i386]: Include alloca.h.
22884
22885 1996-07-31 Richard Stallman <rms@gnu.org>
22886
22887 * bison.simple:
22888 [__sun && __i386]: Include alloca.h.
22889
22890 1996-07-30 Richard Stallman <rms@gnu.org>
22891
22892 * src/bison.s1: Comment change.
22893
22894 * src/bison.s1: Test _MSDOS_, not MSDOS.
22895
22896 1996-07-30 Richard Stallman <rms@gnu.org>
22897
22898 * bison.simple: Comment change.
22899
22900 * bison.simple: Test _MSDOS_, not MSDOS.
22901
22902 1996-06-01 Richard Stallman <rms@gnu.org>
22903
22904 * 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:
22905 Insert `_' macro around many string constants.
22906
22907 * src/main.c:
22908 Insert `_' macro around many string constants.
22909
22910 (main): Call setlocale, bindtextdomain and textdomain.
22911
22912 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
22913 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
22914 [ENABLE_NLS]: Include libintl.h.
22915 [ENABLE_NLS] (gettext): Define.
22916 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
22917 (N_, PACKAGE, LOCALEDIR): New macros.
22918
22919 1996-06-01 Richard Stallman <rms@gnu.org>
22920
22921 * POTFILES.in: New file.
22922
22923 * Makefile.in (allocate.o):
22924 Define target explicitly.
22925
22926 * Makefile.in (CFLAGS): Set to @CFLAGS@.
22927 (LDFLAGS): Set to @LDFLAGS@.
22928 (configure): Run autoconf only if preceding `cd' succeeds.
22929 (bison.s1): Redirect output to temporary file then move the
22930 temporary to the target, rather than redirecting directly to bison.s1.
22931 (clean): Remove config.status and config.log.
22932 (distclean): Don't remove config.status here.
22933
22934 1996-05-12 Richard Stallman <rms@gnu.org>
22935
22936 * src/bison.s1:
22937 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
22938
22939 1996-05-12 Richard Stallman <rms@gnu.org>
22940
22941 * bison.simple:
22942 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
22943
22944 1996-05-11 Richard Stallman <rms@gnu.org>
22945
22946 * src/bison.s1 (__yy_memcpy):
22947 Really reorder the args, as was supposedly done on Feb 14 1995.
22948 (yyparse): Calls changed accordingly.
22949
22950 1996-05-11 Richard Stallman <rms@gnu.org>
22951
22952 * Makefile.in (dist): Don't use $(srcdir).
22953
22954 * bison.simple (__yy_memcpy):
22955 Really reorder the args, as was supposedly done on Feb 14 1995.
22956 (yyparse): Calls changed accordingly.
22957
22958 1996-01-27 Richard Stallman <rms@gnu.org>
22959
22960 * src/output.c (output_rule_data):
22961 Test YYERROR_VERBOSE in the conditional
22962 around the definition of ttyname.
22963
22964 1995-12-29 Richard Stallman <rms@gnu.org>
22965
22966 * src/bison.s1:
22967 Fix line numbers in #line commands.
22968
22969 1995-12-29 Richard Stallman <rms@gnu.org>
22970
22971 * bison.simple:
22972 Fix line numbers in #line commands.
22973
22974 1995-12-27 Richard Stallman <rms@gnu.org>
22975
22976 * src/bison.s1 (YYPARSE_PARAM_DECL):
22977 In C++, make it always null.
22978 (YYPARSE_PARAM_ARG): New macro.
22979 (yyparse): Use YYPARSE_PARAM_ARG.
22980
22981 1995-12-27 Richard Stallman <rms@gnu.org>
22982
22983 * bison.simple (YYPARSE_PARAM_DECL):
22984 In C++, make it always null.
22985 (YYPARSE_PARAM_ARG): New macro.
22986 (yyparse): Use YYPARSE_PARAM_ARG.
22987
22988 1995-11-29 Richard Stallman <rms@gnu.org>
22989
22990 * doc/bison.texinfo:
22991 Describe literal string tokens, %raw, %no_lines, %token_table.
22992
22993 1995-11-29 Daniel Hagerty <hag@gnu.org>
22994
22995 * doc/bison.texinfo: Fixed update date
22996
22997 1995-10-16 Richard Stallman <rms@gnu.org>
22998
22999 * src/version.c: Version 1.25.
23000
23001 1995-10-16 Richard Stallman <rms@gnu.org>
23002
23003 * NEWS: *** empty log message ***
23004
23005 1995-10-16 Richard Stallman <rms@gnu.org>
23006
23007 * doc/bison.1, doc/bison.rnh:
23008 Add new options.
23009
23010 1995-10-15 Richard Stallman <rms@gnu.org>
23011
23012 * src/vmsgetargs.c, src/getargs.c:
23013 Added -n, -k, and -raw switches.
23014 (noparserflag, toknumflag, rawtoknumflag): New variables.
23015
23016 * src/symtab.h (SALIAS):
23017 New #define for adding aliases to %token.
23018 (struct bucket): Added `alias' field.
23019
23020 * src/reduce.c (reduce_grammar):
23021 Revise error message.
23022 (print_notices): Remove final `.' from error message.
23023
23024 * src/reader.c (reader_output_yylsp):
23025 New function.
23026 (readgram): Use `#if 0' around code that accepted %command
23027 inside grammar rules: The documentation doesn't allow it,
23028 and it will fail since the %command processors scan for the next %.
23029 (parse_token_decl): Extended the %token
23030 declaration to allow a multi-character symbol as an alias.
23031 (parse_thong_decl): New function.
23032 (read_declarations): Added %thong declarations.
23033 (read_declarations): Handle NOOP to deal with allowing
23034 % declarations as another means to specify the flags.
23035 (readgram): Allow %prec prior to semantics embedded in a rule.
23036 (skip_to_char, read_declarations, copy_definition)
23037 (parse_token_decl, parse_start_decl, parse_type_decl)
23038 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
23039 (get_type_name, copy_guard, copy_action, readgram)
23040 (get_type, packsymbols): Revised most error messages.
23041 Changed `fatal' to `warnxxx' to avoid aborting for error.
23042 Revised and use multiple warnxxx functions to avoid using VARARGS1.
23043 (read_declarations): Improve the error message for
23044 an invalid character. Do not abort.
23045 (read_declarations, copy_guard, copy_action): Use
23046 printable_version to avoid unprintable characters in printed output.
23047 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
23048 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
23049 Allow the type of a non-terminal can be given
23050 more than once, as long as all specifications give the same type.
23051
23052 * src/output.c:
23053 (output_headers, output_trailers, output, output_gram)
23054 (output_rule_data): Implement noparserflag variable.
23055 Implement toknumflag variable.
23056 (output): Call reader_output_yylsp to output LTYPESTR.
23057
23058 * src/main.c (main):
23059 If reader sees an error, don't process the grammar.
23060 (fatals): Updated to not use VARARGS1.
23061 (printable_version, int_to_string, warn, warni, warns, warnss)
23062 (warnsss): New error reporting functions. Avoid abort for error.
23063
23064 * src/lex.h:
23065 Added THONG and NOOP for alias processing.
23066 Added SETOPT for the new code that allows setting options with %flags.
23067
23068 * src/lex.c:
23069 Include getopt.h. Add some extern decls.
23070 (safegetc): New function to deal with EOF gracefully.
23071 (literalchar); new function to deal with reading \ escapes.
23072 (lex): Use literalchar.
23073 (lex): Implemented "..." tokens.
23074 (literalchar, lex, parse_percent_token): Made tokenbuffer
23075 always contain the token. This includes growing the token
23076 buffer while reading an integer.
23077 (parse_percent_token): Replaced if-else statement with percent_table.
23078 (parse_percent_token): Added % declarations as another
23079 way to specify the flags -n, -l, and -r. Also added hooks for
23080 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
23081 major changes to files.c.
23082 (lex) Retain in the incoming stream a character following
23083 an incorrect '/'.
23084 (skip_white_space, lex): Revised most error messages
23085 and changed fatal to warn to avoid aborting.
23086 (percent_table): Added %thong declarations.
23087
23088 * src/gram.h: Comment changes.
23089
23090 * src/files.c (openfiles, open_extra_files, done):
23091 Add faction flag
23092 and actfile file. Handle noparserflag. Both for -n switch.
23093
23094 * src/conflicts.c (resolve_sr_conflict):
23095 Remove use of alloca.
23096
23097 1995-06-01 Jim Meyering <meyering@gnu.org>
23098
23099 * doc/bison.texinfo: *** empty log message ***
23100
23101 1995-05-06 Richard Stallman <rms@gnu.org>
23102
23103 * src/bison.s1: Comment change.
23104
23105 1995-05-06 Richard Stallman <rms@gnu.org>
23106
23107 * bison.simple: Comment change.
23108
23109 1995-05-03 Richard Stallman <rms@gnu.org>
23110
23111 * src/version.c: Version now 1.24.
23112
23113 * src/bison.s1: Change distribution terms.
23114
23115 * src/version.c: Version now 1.23.
23116
23117 1995-05-03 Richard Stallman <rms@gnu.org>
23118
23119 * doc/bison.texinfo:
23120 Rewrite "Conditions for Using Bison".
23121 Update version to 1.24.
23122
23123 1995-05-03 Richard Stallman <rms@gnu.org>
23124
23125 * bison.simple: Change distribution terms.
23126
23127 1995-02-23 Richard Stallman <rms@gnu.org>
23128
23129 * src/files.c: Test __VMS_POSIX as well as VMS.
23130
23131 1995-02-14 Jim Meyering <meyering@gnu.org>
23132
23133 * src/bison.s1 (__yy_memcpy):
23134 Renamed from __yy_bcopy to avoid
23135 confusion. Reverse FROM and TO arguments to be consistent with
23136 those of memcpy.
23137
23138 1995-02-14 Jim Meyering <meyering@gnu.org>
23139
23140 * bison.simple (__yy_memcpy):
23141 Renamed from __yy_bcopy to avoid
23142 confusion. Reverse FROM and TO arguments to be consistent with
23143 those of memcpy.
23144
23145 1994-11-10 David J. MacKenzie <djm@gnu.org>
23146
23147 * NEWS: reformat
23148
23149 * NEWS: New file.
23150
23151 * Makefile.in (DISTFILES): Include NEWS.
23152
23153 * Makefile.in (DISTFILES):
23154 Include install-sh, not install.sh.
23155
23156 * configure.in: Update to Autoconf v2 macro names.
23157
23158 1994-10-05 David J. MacKenzie <djm@gnu.org>
23159
23160 * Makefile.in: fix typo
23161
23162 * Makefile.in (prefix, exec_prefix):
23163 Let configure set them.
23164
23165 1994-09-28 David J. MacKenzie <djm@gnu.org>
23166
23167 * Makefile.in: Set datadir to $(prefix)/share.
23168
23169 1994-09-15 Richard Stallman <rms@gnu.org>
23170
23171 * src/bison.s1:
23172 Update copyright notice and GPL version.
23173
23174 1994-09-15 Richard Stallman <rms@gnu.org>
23175
23176 * bison.simple:
23177 Update copyright notice and GPL version.
23178
23179 1994-07-12 Richard Stallman <rms@gnu.org>
23180
23181 * src/reduce.c, src/reader.c:
23182 entered into RCS
23183
23184 1994-05-05 David J. MacKenzie <djm@gnu.org>
23185
23186 * Makefile.in: entered into RCS
23187
23188 1994-03-26 Richard Stallman <rms@gnu.org>
23189
23190 * src/bison.s1: entered into RCS
23191
23192 1994-03-26 Richard Stallman <rms@gnu.org>
23193
23194 * bison.simple: entered into RCS
23195
23196 1994-03-25 Richard Stallman <rms@gnu.org>
23197
23198 * src/main.c: entered into RCS
23199
23200 1994-03-24 Richard Stallman <rms@gnu.org>
23201
23202 * src/conflicts.c: entered into RCS
23203
23204 1994-01-02 Richard Stallman <rms@gnu.org>
23205
23206 * Makefile.in: *** empty log message ***
23207
23208 1993-11-21 Richard Stallman <rms@gnu.org>
23209
23210 * src/bison.s1: *** empty log message ***
23211
23212 1993-11-21 Richard Stallman <rms@gnu.org>
23213
23214 * doc/bison.texinfo: entered into RCS
23215
23216 * doc/bison.texinfo: *** empty log message ***
23217
23218 1993-11-21 Richard Stallman <rms@gnu.org>
23219
23220 * bison.simple: *** empty log message ***
23221
23222 1993-10-25 David J. MacKenzie <djm@gnu.org>
23223
23224 * doc/bison.texinfo: *** empty log message ***
23225
23226 1993-10-19 Richard Stallman <rms@gnu.org>
23227
23228 * src/bison.s1: *** empty log message ***
23229
23230 1993-10-19 Richard Stallman <rms@gnu.org>
23231
23232 * bison.simple: *** empty log message ***
23233
23234 1993-10-14 Richard Stallman <rms@gnu.org>
23235
23236 * src/bison.s1: *** empty log message ***
23237
23238 1993-10-14 Richard Stallman <rms@gnu.org>
23239
23240 * bison.simple: *** empty log message ***
23241
23242 1993-09-14 David J. MacKenzie <djm@gnu.org>
23243
23244 * doc/bison.texinfo: *** empty log message ***
23245
23246 1993-09-13 Noah Friedman <friedman@gnu.org>
23247
23248 * Makefile.in: *** empty log message ***
23249
23250 1993-09-10 Richard Stallman <rms@gnu.org>
23251
23252 * src/conflicts.c: *** empty log message ***
23253
23254 * src/system.h: entered into RCS
23255
23256 1993-09-10 Richard Stallman <rms@gnu.org>
23257
23258 * doc/bison.1: entered into RCS
23259
23260 1993-09-06 Noah Friedman <friedman@gnu.org>
23261
23262 * src/version.c: entered into RCS
23263
23264 1993-09-06 Noah Friedman <friedman@gnu.org>
23265
23266 * Makefile.in: *** empty log message ***
23267
23268 1993-07-30 David J. MacKenzie <djm@gnu.org>
23269
23270 * Makefile.in: *** empty log message ***
23271
23272 1993-07-24 Richard Stallman <rms@gnu.org>
23273
23274 * src/bison.s1: *** empty log message ***
23275
23276 1993-07-24 Richard Stallman <rms@gnu.org>
23277
23278 * bison.simple: *** empty log message ***
23279
23280 1993-07-08 David J. MacKenzie <djm@gnu.org>
23281
23282 * Makefile.in: *** empty log message ***
23283
23284 1993-07-04 Richard Stallman <rms@gnu.org>
23285
23286 * src/bison.s1: *** empty log message ***
23287
23288 1993-07-04 Richard Stallman <rms@gnu.org>
23289
23290 * bison.simple: *** empty log message ***
23291
23292 1993-06-26 David J. MacKenzie <djm@gnu.org>
23293
23294 * src/getargs.c: entered into RCS
23295
23296 1993-06-26 David J. MacKenzie <djm@gnu.org>
23297
23298 * doc/bison.texinfo: *** empty log message ***
23299
23300 * doc/bison.1: New file.
23301
23302 1993-06-25 Richard Stallman <rms@gnu.org>
23303
23304 * src/getargs.c: New file.
23305
23306 1993-06-16 Richard Stallman <rms@gnu.org>
23307
23308 * src/bison.s1: *** empty log message ***
23309
23310 1993-06-16 Richard Stallman <rms@gnu.org>
23311
23312 * bison.simple: *** empty log message ***
23313
23314 1993-06-03 Richard Stallman <rms@gnu.org>
23315
23316 * src/bison.s1: New file.
23317
23318 1993-06-03 Richard Stallman <rms@gnu.org>
23319
23320 * doc/bison.texinfo: *** empty log message ***
23321
23322 1993-06-03 Richard Stallman <rms@gnu.org>
23323
23324 * bison.simple: New file.
23325
23326 1993-05-19 Richard Stallman <rms@gnu.org>
23327
23328 * doc/bison.texinfo: New file.
23329
23330 1993-05-07 Noah Friedman <friedman@gnu.org>
23331
23332 * Makefile.in: *** empty log message ***
23333
23334 1993-04-28 Noah Friedman <friedman@gnu.org>
23335
23336 * src/reader.c: *** empty log message ***
23337
23338 1993-04-23 Noah Friedman <friedman@gnu.org>
23339
23340 * src/alloc.h: entered into RCS
23341
23342 1993-04-20 David J. MacKenzie <djm@gnu.org>
23343
23344 * src/version.c: *** empty log message ***
23345
23346 * src/files.c, src/allocate.c:
23347 entered into RCS
23348
23349 * src/reader.c: *** empty log message ***
23350
23351 * src/lex.c: entered into RCS
23352
23353 * src/conflicts.c: New file.
23354
23355 * src/symtab.c: entered into RCS
23356
23357 * src/alloc.h: New file.
23358
23359 * src/LR0.c: entered into RCS
23360
23361 1993-04-18 Noah Friedman <friedman@gnu.org>
23362
23363 * src/reader.c: New file.
23364
23365 * src/version.c: *** empty log message ***
23366
23367 1993-04-18 Noah Friedman <friedman@gnu.org>
23368
23369 * Makefile.in: *** empty log message ***
23370
23371 1993-04-17 Noah Friedman <friedman@gnu.org>
23372
23373 * Makefile.in: *** empty log message ***
23374
23375 1993-04-15 Richard Stallman <rms@gnu.org>
23376
23377 * src/main.c, src/files.c:
23378 New file.
23379
23380 1993-04-15 Noah Friedman <friedman@gnu.org>
23381
23382 * configure.in: entered into RCS
23383
23384 * configure.in: *** empty log message ***
23385
23386 * configure.in: New file.
23387
23388 1993-04-14 Richard Stallman <rms@gnu.org>
23389
23390 * Makefile.in: New file.
23391
23392 1993-04-13 Richard Stallman <rms@gnu.org>
23393
23394 * src/version.c: New file.
23395
23396 1993-03-25 Richard Stallman <rms@gnu.org>
23397
23398 * src/output.c: entered into RCS
23399
23400 1992-09-25 Richard Stallman <rms@gnu.org>
23401
23402 * configure.bat: entered into RCS
23403
23404 1992-06-22 Richard Stallman <rms@gnu.org>
23405
23406 * src/vmsgetargs.c: entered into RCS
23407
23408 1992-06-22 Richard Stallman <rms@gnu.org>
23409
23410 * doc/bison.rnh: entered into RCS
23411
23412 1992-04-20 David J. MacKenzie <djm@gnu.org>
23413
23414 * README: entered into RCS
23415
23416 1992-01-22 Richard Stallman <rms@gnu.org>
23417
23418 * src/machine.h: entered into RCS
23419
23420 1991-12-21 Richard Stallman <rms@gnu.org>
23421
23422 * src/lalr.c, src/closure.c:
23423 entered into RCS
23424
23425 1991-12-20 Richard Stallman <rms@gnu.org>
23426
23427 * src/state.h: entered into RCS
23428
23429 1991-12-18 Richard Stallman <rms@gnu.org>
23430
23431 * src/print.c, src/nullable.c, src/derives.c:
23432 entered into RCS
23433
23434 1991-11-03 David J. MacKenzie <djm@gnu.org>
23435
23436 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
23437 entered into RCS
23438
23439 1988-09-09 Richard Stallman <rms@gnu.org>
23440
23441 * src/bison.hairy: entered into RCS
23442
23443 1987-12-16 Richard Stallman <rms@gnu.org>
23444
23445 * REFERENCES: entered into RCS
23446
23447
23448 -----
23449
23450 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
23451 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
23452 2008, 2009, 2010 Free Software Foundation, Inc.
23453
23454 Copying and distribution of this file, with or without
23455 modification, are permitted provided the copyright notice and this
23456 notice are preserved.