]> git.saurik.com Git - bison.git/blob - ChangeLog
017deb6d6c30c8ea381955c23b13f87d7fef38f0
[bison.git] / ChangeLog
1 2010-12-11 Joel E. Denny <jdenny@clemson.edu>
2
3 parse.lac: implement as %define variable.
4 LAC = lookahead correction. See discussion at
5 <http://lists.gnu.org/archive/html/bison-patches/2009-09/msg00034.html>.
6 However, one point there must be corrected: because of %nonassoc,
7 LAC is *not* always redundant for lr.type=canonical-lr.
8 * data/yacc.c: Accept values of "none" (default) or "full" for
9 parse.lac. Accept %define parse.lac.es-capacity to specify
10 capacity of LAC's temporary exploratory stack. It defaults to 20
11 and, for now, will not grow dynamically.
12 (b4_lac_flag, b4_lac_if): New m4 macros. Evaluate as true for
13 parse.lac!=none.
14 (YYBACKUP): Invoke YY_LAC_DISCARD.
15 (YY_LAC_ESTABLISH, YY_LAC_DISCARD): New cpp macros that invoke
16 yy_lac and track when it needs to be invoked
17 (yy_lac): New function that, given the current stack, determines
18 whether a token can eventually be shifted. Return status mimics
19 yyparse return status.
20 (yysyntax_error): Change yystate argument to yyssp so stack top
21 can be passed to yy_lac. If LAC is requested, build expected
22 token list by invoking yy_lac for every token instead of just
23 checking the current state for lookaheads. Return 2 if yy_lac
24 exhausts memory.
25 (yyparse, yypush_parse): Use local variable yy_lac_established and
26 cpp macros YY_LAC_ESTABLISH and YY_LAC_DISCARD to implement LAC.
27 Update yysyntax_error invocation. Add yyexhaustedlab code if LAC
28 is requested.
29 * tests/conflicts.at (%nonassoc and eof): Extend to check the
30 effect of each of -Dlr.type=canonical-lr and -Dparse.lac=full.
31 (%error-verbose and consistent errors): Likewise.
32 (LAC: %nonassoc requires splitting canonical LR states): New test
33 group demonstrating how LAC can fix canonical LR.
34 * tests/input.at (LAC: Errors for %define): New test group.
35 * tests/regression.at (LAC: Exploratory stack): New test group.
36 (LAC: Memory exhaustion): New test group.
37
38 2010-11-21 Joel E. Denny <jdenny@clemson.edu>
39
40 build: use gnulib's new bootstrap_sync option.
41 Now, whenever we update bison's copy of gnulib, bootstrap will
42 update itself the next time it's run.
43 * bootstrap: Copy from latest gnulib for bootstrap_sync support.
44 * bootstrap.conf (bootstrap_sync): Set to true.
45 * gnulib: Update to latest so bootstrap is in sync now.
46
47 2010-11-07 Joel E. Denny <jdenny@clemson.edu>
48
49 yysyntax_error: adjust prior fixes for branch-2.5's lalr1.cc.
50 On master, there is no yychar in lalr1.cc, but there is on
51 branch-2.5, and the prior cherry-pick of "Fix handling of yychar
52 manipulation in user semantic actions" wasn't adjusted for that
53 difference.
54 * data/lalr1.cc (yy::parser::parse): Translate yychar before
55 every use of yytoken, and add comments explaining this approach.
56 * tests/conflicts.at (%error-verbose and consistent errors):
57 Extend to test yychar manipulation with lalr1.cc.
58
59 2010-11-07 Joel E. Denny <jdenny@clemson.edu>
60
61 yysyntax_error: fix for consistent error with lookahead.
62 * NEWS (2.5): Document.
63 * data/yacc.c (yysyntax_error): In a verbose syntax error
64 message while in a consistent state with a default action (which
65 must be an error action given that yysyntax_error is being
66 invoked), continue to drop the expected token list, but don't
67 drop the unexpected token unless there actually is no lookahead.
68 Moreover, handle that internally instead of returning 1 to tell
69 the caller to do it. With that meaning of 1 gone, renumber
70 return codes more usefully.
71 (yyparse, yypush_parse): Update yysyntax_error usage. Most
72 importantly, set yytoken to YYEMPTY when there's no lookahead.
73 * data/glr.c (yyreportSyntaxError): As in yacc.c, don't drop the
74 unexpected token unless there actually is no lookahead.
75 * data/lalr1.cc (yy::parser::parse): If there's no lookahead,
76 set yytoken to yyempty_ before invoking yysyntax_error_.
77 (yy::parser::yysyntax_error_): Again, don't drop the unexpected
78 token unless there actually is no lookahead.
79 * data/lalr1.java (YYParser::parse): If there's no lookahead,
80 set yytoken to yyempty_ before invoking yysyntax_error.
81 (YYParser::yysyntax_error): Again, don't drop the unexpected
82 token unless there actually is no lookahead.
83 * tests/conflicts.at (%error-verbose and consistent
84 errors): Extend test group to further reveal how the previous
85 use of the simple "syntax error" message was too general. Test
86 yacc.c, glr.c, lalr1.cc, and lalr1.java. No longer an expected
87 failure.
88 * tests/java.at (AT_JAVA_COMPILE, AT_JAVA_PARSER_CHECK): Move
89 to...
90 * tests/local.at: ... here.
91 (_AT_BISON_OPTION_PUSHDEFS): Push AT_SKEL_JAVA_IF definition.
92 (AT_BISON_OPTION_POPDEFS): Pop it.
93 (AT_FULL_COMPILE): Extend to handle Java.
94
95 2010-11-07 Joel E. Denny <jdenny@clemson.edu>
96
97 yysyntax_error: more preparation for readability of next patch.
98 There are no behavioral changes here.
99 * data/glr.c (yyreportSyntaxError): Reorganize.
100 * data/lalr1.cc (yy::parser::yysyntax_error_): Reorganize.
101 * tests/conflicts.at (%error-verbose and consistent errors):
102 Reorganize.
103
104 2010-11-07 Joel E. Denny <jdenny@clemson.edu>
105
106 yysyntax_error: prepare for readability of next patches.
107 These are purely whitespace changes that result in ugly code
108 but that make the next couple of patches much easier to read.
109 * data/glr.c (yyreportSyntaxError): Reindent.
110 * data/lalr1.cc (yy::parser::yysyntax_error_): Reindent.
111 * data/lalr1.java (YYParser::yysyntax_error): Reindent.
112 * data/yacc.c (yysyntax_error): Reindent.
113
114 2010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
115
116 yysyntax_error: improve invocation readability.
117 * data/yacc.c (yyparse, yypush_parse): For yysyntax_error
118 invocation, get rid of the while loop, which is misleading
119 because there are really at most two iterations.
120
121 2010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
122
123 * ChangeLog: Correct some errors in previous entries.
124
125 2010-10-17 Joel E. Denny <joeldenny@joeldenny.org>
126
127 maint: re-anchor all .gitignore entries.
128 * bootstrap: Copy from gnulib's latest for the fix to
129 automatically anchor entries it constructs.
130 * gnulib: Update to latest just so it has the same bootstrap.
131 * .gitignore, build-aux/.gitignore, doc/.gitignore:
132 * lib/.gitignore, m4/.gitignore, po/.gitignore:
133 * runtime-po/.gitignore: Re-anchor all entries.
134
135 2010-10-08 Paul Eggert <eggert@cs.ucla.edu>
136
137 Fix portability problem on OpenBSD 4.7.
138
139 Jim Meyering reported this in
140 <http://lists.gnu.org/archive/html/bug-bison/2010-10/msg00007.html>.
141 * data/yacc.c: Use EXIT_SUCCESS as a witness for stdlib.h,
142 not _STDLIB_H. EXIT_SUCCESS has been defined by the standard
143 for quite some time.
144 * src/parse-gram.c, src/parse-gram.h: Regenerate.
145 * tests/regression.at: Tamper with the renamed witness.
146
147 Adjust to recent changes to gnulib bootstrap.
148
149 * .cvsignore, build-aux/.cvsignore, doc/.cvsignore, etc/.cvsignore:
150 * examples/calc++/.cvsignore, lib/.cvsignore, m4/.cvsignore:
151 * po/.cvsignore, runtime-po/.cvsignore, src/.cvsignore:
152 * tests/.cvsignore: Remove; I don't use CVS to maintain Bison
153 anymore and don't know of anybody else who does. If someone needs
154 these files, they can resurrect them.
155 * .gitignore, build-aux/.gitignore, doc/.gitignore, lib/.gitignore:
156 * m4/.gitignore, po/.gitignore, runtime-po/.gitignore:
157 Omit leading '/', since bootstrap omits it.
158 Adjust file names to match current contents better.
159 * bootstrap: Sync from gnulib: this contains the new gnulib_mk_hook
160 installed just for us.
161 * bootstrap.conf (excluded_files): Don't exclude codeset.m4,
162 glibc21.m4, inttypes_h.m4, size_max.m4, xsize.m4, as they are now
163 needed somehow. Don't have time to look into why.
164 (gnulib_modules): Change malloc to malloc-gnu. Do we really assume
165 the GNU malloc behavior, where malloc (0) != NULL unless we're
166 out of storage? If not, we can omit malloc-gnu; but for now I left
167 it in to be safe.
168 (vc_ignore): Remove.
169 * README-hacking: Renamed from HACKING, since gnulib bootstrap now
170 uses that convention.
171
172 2010-08-05 Joel E. Denny <joeldenny@joeldenny.org>
173
174 Version 2.4.3.
175 * NEWS (2.4.3): Set date.
176
177 2010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
178
179 maint: add gettext version to release announcements.
180 Suggested by Paul Hilfinger at
181 <http://lists.gnu.org/archive/html/bison-patches/2010-07/msg00019.html>
182 <http://lists.gnu.org/archive/html/bison-patches/2010-08/msg00002.html>.
183 * cfg.mk (bootstrap-tools): Add gettext.
184
185 2010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
186
187 doc: fix -W and %expect documentation some.
188 * NEWS (2.4.3): Mention that there are documentation fixes.
189 * doc/bison.texinfo (Expect Decl): Make it clear that %expect
190 turns conflicts into errors not warnings.
191 (Shift/Reduce): Likewise.
192 (Bison Options): Don't mention -Wsyntax. It doesn't exist.
193
194 2010-08-01 Joel E. Denny <joeldenny@joeldenny.org>
195
196 -Werror: fix for rules useless in parser after conflicts.
197 * NEWS (2.4.3): Document fix.
198 * src/complain.c (error_message): Extend to handle incomplete
199 error messages so warn and warn_at can be used in more cases.
200 * src/gram.c (grammar_rules_useless_report): Use warn_at so that
201 -Werror is always obeyed.
202 * src/reduce.c (reduce_print): Use warn so that the "warnings
203 being treated as errors" message is printed consistently before
204 the first warning message. This makes testing easier.
205 * tests/local.at (AT_BISON_WERROR_MSG): New macro.
206 (AT_BISON_CHECK_NO_XML): Extend to check -Werror and
207 --warnings=error when warnings appear in bison's stderr.
208
209 2010-07-29 Joel E. Denny <joeldenny@joeldenny.org>
210
211 maint: enable gnits only at stable releases.
212 * configure.ac (AM_INIT_AUTOMAKE): Underscore or dash in a
213 version string should disable gnits. Explain in comments.
214
215 2010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
216
217 i18n: update.
218 * po/POTFILES.in: Add src/graphviz.c.
219
220 2010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
221
222 i18n: fix for gnulib.
223 * po/POTFILES.in: Add remaining gnulib files that have
224 translatable strings.
225
226 2010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
227
228 maint: use announce-gen's new --mail-headers.
229 * HACKING (Announce): Update instructions.
230 * cfg.mk (announcement_Cc_): Define.
231 * configure.ac (AM_GNU_GETTEXT_VERSION): Update to 0.18 as
232 required by latest gnulib.
233 * gnulib: Update to latest.
234
235 2010-07-24 Joel E. Denny <joeldenny@joeldenny.org>
236
237 tests: handle Valgrind that complains about >&-.
238 * tests/output.at (AT_CHECK_OUTPUT): Extend to accept pre-tests.
239 (Output files: -dv >&-): Skip test group if running
240 maintainer-check-valgrind.
241
242 2010-06-17 Paul Eggert <eggert@cs.ucla.edu>
243
244 Update from GFDL GFDL 1.2 to 1.3.
245 * doc/bison.texinfo: Update GFDL version number.
246 * doc/fdl.texi: Update to version 1.3, taken from:
247 http://www.gnu.org/licenses/fdl.texi
248
249 2010-06-17 Paul Eggert <eggert@cs.ucla.edu>
250
251 Do not use date ranges in copyright notices.
252 See http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices
253
254 * HACKING, Makefile.am, NEWS, PACKAGING, README, README-alpha:
255 * TODO, bootstrap, bootstrap.conf:
256 * build-aux/update-b4-copyright, cfg.mk, configure.ac:
257 * data/README, data/bison.m4, data/c++-skel.m4, data/c++.m4:
258 * data/c-skel.m4, data/c.m4, data/glr.c, data/glr.cc:
259 * data/java-skel.m4, data/java.m4, data/lalr1.cc:
260 * data/lalr1.java, data/location.cc:
261 * data/xslt/bison.xsl:
262 * data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl:
263 * data/xslt/xml2xhtml.xsl, data/yacc.c, djgpp/Makefile.maint:
264 * djgpp/README.in, djgpp/config.bat, djgpp/config.sed:
265 * djgpp/config.site, djgpp/config_h.sed, djgpp/djunpack.bat:
266 * djgpp/subpipe.c, djgpp/subpipe.h:
267 * djgpp/testsuite.sed, doc/bison.texinfo:
268 * doc/refcard.tex, etc/README, etc/bench.pl.in:
269 * examples/calc++/Makefile.am, examples/extexi:
270 * lib/abitset.c, lib/abitset.h:
271 * lib/bbitset.h, lib/bitset.c, lib/bitset.h:
272 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
273 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
274 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
275 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
276 * lib/libiberty.h, lib/main.c, lib/timevar.c:
277 * lib/timevar.def, lib/timevar.h, lib/vbitset.c:
278 * lib/vbitset.h, lib/yyerror.c, m4/bison-i18n.m4:
279 * m4/c-working.m4, m4/cxx.m4, m4/subpipe.m4, m4/timevar.m4:
280 * src/AnnotationList.c, src/AnnotationList.h:
281 * src/InadequacyList.c, src/InadequacyList.h, src/LR0.c:
282 * src/LR0.h, src/Sbitset.c, src/Sbitset.h, src/assoc.c:
283 * src/assoc.h, src/closure.c, src/closure.h, src/complain.c:
284 * src/complain.h, src/conflicts.c, src/conflicts.h:
285 * src/derives.c, src/derives.h, src/files.c, src/files.h:
286 * src/flex-scanner.h, src/getargs.c, src/getargs.h:
287 * src/gram.c, src/gram.h, src/graphviz.c, src/ielr.c:
288 * src/ielr.h, src/lalr.c, src/lalr.h:
289 * src/location.c, src/location.h, src/main.c:
290 * src/muscle-tab.c, src/muscle-tab.h, src/named-ref.c:
291 * src/named-ref.h, src/nullable.c, src/nullable.h:
292 * src/output.c, src/output.h, src/parse-gram.y:
293 * src/print-xml.c, src/print-xml.h, src/print.c, src/print.h:
294 * src/print_graph.c, src/print_graph.h, src/reader.c:
295 * src/reader.h, src/reduce.c, src/reduce.h, src/relation.c:
296 * src/relation.h, src/scan-code.h, src/scan-code.l:
297 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
298 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
299 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
300 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
301 * tests/actions.at, tests/atlocal.in, tests/c++.at:
302 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
303 * tests/existing.at, tests/glr-regression.at:
304 * tests/headers.at, tests/input.at, tests/java.at:
305 * tests/local.at, tests/named-refs.at:
306 * tests/output.at, tests/push.at, tests/reduce.at:
307 * tests/regression.at, tests/sets.at, tests/skeletons.at:
308 * tests/synclines.at, tests/testsuite.at, tests/torture.at:
309 * data/Makefile.am, data/location.cc, doc/Makefile.am, src/Makefile.am:
310 * tests/Makefile.am, lib/Makefile.am, examples/Makefile.am:
311 * etc/Makefile.am:
312 Don't use date ranges in copyright notices.
313
314 2010-05-11 Akim Demaille <demaille@gostai.com>
315
316 lalrl1.cc: give a chance to user defined YYLLOC_DEFAULT.
317 * data/lalr1.cc (YYLLOC_DEFAULT): Move its definition from the
318 header file to the implementation file, after the user %code
319 sections.
320 * NEWS (2.5): Document this.
321
322 2010-05-07 Akim Demaille <demaille@gostai.com>
323
324 c++: use YYRHSLOC.
325 * data/lalr1.cc (YYRHSLOC): New.
326 (YYLLOC_DEFAULT): Use it.
327 * data/glr.cc: If location_type was user defined, do not include
328 location.hh, and do not produce location.hh and position.hh.
329 * tests/calc.at (YYLLOC_DEFAULT): Use YYRHSLOC.
330 Check that glr.cc supports user defined location_type.
331 * NEWS: Document this.
332
333 2010-05-10 Akim Demaille <demaille@gostai.com>
334
335 doc: fix lalr1.cc documentation.
336 * doc/bison.texinfo (C++ Scanner Interface): Fix yylex signature.
337 (C++ Bison Interface): Fix lalr1.cc skeleton name.
338 (C++ Parser Interface): Fix semantic_type and location_type names.
339 Document yy::parser::token.
340 Reported by Jerry Quinn.
341
342 2010-05-04 Akim Demaille <demaille@gostai.com>
343
344 lalr1.cc: don't generate location.hh when location_type is defined
345 * data/bison.m4 (b4_percent_define_use): New.
346 (b4_percent_define_get): Use it.
347 Accept a default value.
348 * data/c++.m4: Do not provide a default value for the %define
349 variable location_type, rather, use b4_percent_define_get with a
350 default argument where its value is needed.
351 * data/lalr1.cc: Do not load location.cc (which outputs both
352 location.hh and position.hh) if the user defined location_type.
353 Do not include location.hh either.
354 * data/glr.cc: Likewise.
355
356 2010-05-04 Akim Demaille <demaille@gostai.com>
357
358 lalr1.cc: location_type: make sure we don't depend on loc.(begin|end).
359 * tests/calc.at (Span): Instead of begin/end, as in the built-in
360 location class, use first and last.
361 Define YYLLOC_DEFAULT to adjust to these changes.
362 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Adjust to the
363 location_type changes.
364
365 2010-05-04 Akim Demaille <demaille@gostai.com>
366
367 tests: enhance AT_SYNCLINES_COMPILE.
368 * tests/synclines.at (AT_TEST_SYNCLINE): Move GCC 4.5 protection
369 into...
370 (AT_SYNCLINES_COMPILE): here.
371 Add more distcc patterns.
372
373 2010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
374
375 tests: fix maintainer-xml-check.
376 * data/xslt/xml2dot.xsl (xsl:template match="bison-xml-report"):
377 Update output to include comments now produced by --graph.
378 (xsl:template match="automaton"): As for --graph, name the
379 digraph after the grammar file.
380 * src/print-xml.c (escape_bufs): Enlarge array.
381 (print_xml): Add bug-report and url attributes to
382 bison-xml-report element.
383
384 2010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
385
386 In DOT output, convert from "/*" comments to "//" comments.
387 This handles the possibility that a "*/" might appear in
388 variable portions of those comments at some point in the future.
389 * src/graphviz.c (start_graph): Implement.
390
391 2010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
392
393 Document that undefined %prec identifier warnings will remain.
394 * NEWS (2.4.3): Here.
395 (2.4.2): Here.
396
397 2010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
398
399 Revert 2009-12-30 change for undefined %prec token complaints.
400 That is, keep them as warnings because that should be sufficient
401 to satisfy POSIX without creating backward compatibility issues.
402 Suggested by Richard Stallman at
403 <http://lists.gnu.org/archive/html/bison-patches/2010-03/msg00033.html>.
404 * NEWS (2.5): Remove mention of complaint.
405 * src/reader.c (grammar_rule_check): Convert complaint back to
406 warning.
407 * tests/input.at (%prec's token must be defined): Update.
408
409 2010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
410
411 build: don't require src/bison during bootstrap.
412 Suggested by Eric Blake at
413 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00003.html>.
414 * bootstrap.conf (bootstrap_epilogue): New function to make sure
415 src/parse-gram.[ch] are stamped later than src/parse-gram.y.
416
417 2010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
418
419 i18n: fix untranslatable string.
420 Reported by Goran Uddeborg at
421 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00000.html>.
422 * src/muscle-tab.c (muscle_percent_define_insert): Here.
423
424 2010-04-13 Akim Demaille <demaille@gostai.com>
425
426 tests: calc: minor refactoring.
427 * tests/calc.at (_AT_DATA_CALC_Y): Simplify yylex.
428
429 2010-04-13 Akim Demaille <demaille@gostai.com>
430
431 tests: calc: simplify location management.
432 * tests/local.at (AT_LOC_PUSHDEF, AT_LOC_POPDEF): New.
433 (_AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS): Use them to
434 define the appropriate AT_LOC accessors.
435 * tests/calc.at: Use AT_LOC accessors.
436
437 2010-04-13 Akim Demaille <demaille@gostai.com>
438
439 test location_type.
440 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS):
441 Define AT_LOCATION_TYPE_IF.
442 (_AT_BISON_OPTION_POPDEFS): Undefine AT_LOCATION_TYPE_IF.
443 * tests/calc.at (_AT_DATA_CALC_Y): When %define location_type is
444 used, provide a user location type and use it.
445 (Simple LALR1 C++ Calculator): Add a test case for location_type.
446
447 2010-04-13 Akim Demaille <demaille@gostai.com>
448
449 tests: check fclose's return value.
450 * tests/calc.at (_AT_DATA_CALC_Y): Check fclose's return status.
451
452 2010-04-13 Akim Demaille <demaille@gostai.com>
453
454 tests: don't depend on the actual location type.
455 * tests/calc.at: Use yy::parser::location_type rather than
456 yy::location, since the former is always right, and might point to
457 another type than the latter.
458
459 2010-04-13 Akim Demaille <demaille@gostai.com>
460
461 formatting changes.
462 * tests/calc.at: Formatting changes.
463
464 2010-04-13 Akim Demaille <demaille@gostai.com>
465
466 lalr1.cc: remove useless forward declaration.
467 * data/lalr1.cc: Include location.hh before stack.hh.
468 Remove the useless forward declarations of position and location.
469 Reported by Chris Morley.
470 * data/glr.cc: Likewise.
471
472 2010-04-11 Joel E. Denny <joeldenny@joeldenny.org>
473
474 * NEWS (2.4.3): Mention fix for Sun Studio C++.
475
476 2010-04-10 Joel E. Denny <joeldenny@joeldenny.org>
477
478 tests: fix for newer Sun Studio C++.
479 Reported by Dagobert Michelsen at
480 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00023.html>.
481 * THANKS (Dagobert Michelsen): Add.
482 * configure.ac (AC_PREREQ): Set to 2.64 so we get the latest
483 Autoconf macro for handling the restrict keyword.
484 * gnulib: Update to latest, which no longer overrides that macro
485 from Autoconf.
486
487 2010-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
488
489 portability: fix pointer arithmetic to conform to C standard.
490 Reported by Tys Lefering at
491 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00035.html>.
492 This fix is already implemented in glr.c and does not apply to
493 lalr1.java.
494 * data/lalr1.cc (yy::parser::parse): Increase size of
495 yyerror_range and adjust subscripting so you don't have to
496 subtract one from the beginning of the array.
497 * data/yacc.c (b4_declare_parser_state_variables,
498 yyparse, yypush_parse): Likewise.
499
500 2010-04-05 Akim Demaille <demaille@gostai.com>
501
502 remove useless include.
503 * src/graphviz.h: Don't include stdbool.h.
504
505 2010-04-05 Akim Demaille <demaille@gostai.com>
506
507 graph: sign the output file.
508 * src/graphviz.c (start_graph): Issue comments about Bison.
509 Suggested by Tys Lefering.
510
511 2010-03-31 Joel E. Denny <jdenny@ces.clemson.edu>
512
513 portability: fix test suite for GCC 4.5's new #error message.
514 Reported by Tys Lefering at
515 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00030.html>.
516 * NEWS (2.4.3): Mention.
517 * tests/synclines.at (AT_TEST_SYNCLINE): Implement.
518
519 2010-03-30 Akim Demaille <demaille@gostai.com>
520
521 fix comments.
522 * src/graphviz.h: Add missing license notice.
523 Document.
524
525 2010-03-25 Akim Demaille <demaille@gostai.com>
526
527 tests: fix 250: parse.error=verbose overflow.
528 * tests/regression.at (parse.error=verbose overflow): Avoid the
529 double inclusion of stdlib.h as it triggers hard errors.
530
531 2010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
532
533 portability: fix for BSD make.
534 Reported by Johan van Selst at
535 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00016.html>.
536 * tests/Makefile.am ($(TESTSUITE)): Qualify package.m4 in
537 this dependency list as in package.m4's target rule.
538
539 2010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
540
541 portability: fix spawning on at least FreeBSD 8 and FreeBSD 9.
542 Reported by Johan van Selst at
543 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00014.html>.
544 * NEWS (2.4.3): New.
545 * THANKS (Johan van Selst): Add.
546 * gnulib: Update to latest.
547
548 2010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
549
550 maint: update for changes to gnulib's announce-gen.
551 * HACKING (Announce): RELEASE_TYPE=major must now be written
552 RELEASE_TYPE=stable.
553
554 2010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
555
556 Version 2.4.2.
557 * NEWS (2.4.2): Set version and date. For the recent test suite
558 portability fixes, don't be so optimistic about their success
559 given the lack of feedback on the affected platforms.
560
561 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
562
563 tests: fix maintainer-xml-check for recent changes.
564 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Use
565 AT_BISON_CHECK_NO_XML rather than AT_BISON_CHECK because an
566 output file whose name conflicts with a previous output file
567 is now never generated.
568
569 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
570
571 portability: fix several issues with M4 subprocess.
572
573 M4's output pipe was not being drained upon fatal errors during
574 scan_skel. As a result, broken-pipe messages from M4 were seen
575 on at least AIX, HP-UX, Solaris, and RHEL4, and this caused a
576 failure in the test suite. The problem was that, on platforms
577 where the default disposition for SIGPIPE is ignore instead of
578 terminate, M4 sometimes saw fwrite fail with errno=EPIPE and
579 then reported it. However, there's some sort of race condition,
580 because the new test group occasionally succeeded.
581 Reported by Albert Chin at
582 <http://lists.gnu.org/archive/html/bug-bison/2010-02/msg00004.html>.
583
584 There were also problems with the test suite livelocking on
585 Tru64 5.1b. Reported by Didier Godefroy at
586 <http://lists.gnu.org/archive/html/bug-bison/2009-05/msg00005.html>.
587 Switching to create_pipe_bidi suggested by Akim Demaille.
588
589 To attempt to solve both of these problems, switch to gnulib's
590 create_pipe_bidi and register M4 process as a slave. Along the
591 way, clean up file name conflict handling, which was affected by
592 the broken-pipe problem before the switch.
593 * NEWS (2.4.2): Document.
594 * THANKS (Didier Godefroy): Add.
595 * bootstrap.conf (gnulib_modules): Add pipe.
596 * gnulib: Update to latest to make sure we have all the latest
597 fixes.
598 * lib/Makefile.am (libbison_a_SOURCES): Remove subpipe.h and
599 subpipe.c.
600 * po/POTFILES.in (lib/subpipe.c): Remove.
601 * src/files.c (compute_output_file_names): Update invocations
602 of output_file_name_check.
603 (output_file_name_check): In the case that the grammar file
604 would be overwritten, use complain instead of fatal, but replace
605 the output file name with /dev/null. Use the /dev/null solution
606 for the case of two conflicting output files as well because it
607 seems safer in case Bison one day tries to open both files at
608 the same time.
609 * src/files.h (output_file_name_check): Update prototype.
610 * src/output.c (output_skeleton): Use create_pipe_bidi and
611 wait_subprocess. Assert that scan_skel completely drains the
612 pipe.
613 * src/scan-skel.l (at_directive_perform): Update
614 output_file_name_check invocation.
615 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Check that the
616 grammar file actually isn't overwritten.
617 (Conflicting output files: -o foo.y): Update expected output.
618 * tests/skeletons.at (Fatal errors but M4 continues producing
619 output): New test group.
620
621 2010-02-04 Joel E. Denny <jdenny@ces.clemson.edu>
622
623 Update POTFILES.
624 * HACKING (Release Procedure): Add reminder about keeping
625 POTFILES files up-to-date.
626 * po/POTFILES.in (src/muscle-tab.c, src/scan-skel.l): Add.
627
628 2010-02-01 Joel E. Denny <jdenny@clemson.edu>
629
630 Code cleanup.
631 * tests/atlocal.in (abs_top_srcdir): Remove shell variable,
632 which is already defined in atconfig.
633
634 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
635
636 * cfg.mk (gnulib_dir): Assume gnulib is a subdirectory.
637
638 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
639
640 maint: automate PACKAGE_COPYRIGHT_YEAR update, and update it.
641 * HACKING (Release Procedure): Update notes on copyright years.
642 * Makefile.am (update-package-copyright-year): New target rule.
643 * build-aux/update-package-copyright-year: New file.
644 * cfg.mk (update-copyright): Add update-package-copyright-year
645 as a dependency.
646
647 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
648
649 * bootstrap: Import improvements from latest gnulib.
650
651 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
652
653 build: require Automake 1.11.1 to avoid a security flaw.
654 * HACKING (Release Procedure): Don't document Automake security
655 flaw here.
656 * configure.ac (AM_INIT_AUTOMAKE): Require 1.11.1, and explain
657 why here.
658
659 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
660
661 gnulib: update to latest.
662
663 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
664
665 ChangeLog (2006-09-15): add Odd Arild Olsen's role for push.c.
666
667 2010-01-15 Joel E. Denny <jdenny@clemson.edu>
668
669 Thank the developer of the initial push parser implementation.
670 This unfortunate oversight is several years old.
671 * THANKS (Odd Arild Olsen): Add.
672
673 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
674
675 Fix some comments concerning LR(0) versus LALR(1).
676
677 Stop equating LR(0) with nondeterminism and LALR(1) with
678 determinism. That is, if all states are consistent, then LR(0)
679 tables are deterministic. On the other hand, LALR(1) tables
680 might be nondeterministic before conflict resolution, and GLR
681 permits LALR(1) tables to remain nondeterministic.
682 * src/LR0.c, src/LR0.h: Here.
683 * src/lalr.c, src/lalr.h: Here.
684 * src/main.c (main): Here.
685 * src/state.c, src/state.h: Here.
686
687 * src/ielr.h (ielr): In preconditions, expect LR(0) not LALR(1)
688 parser tables.
689
690 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
691
692 maint: run "make update-copyright"
693
694 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
695
696 POSIX: complain if %prec's token was not defined.
697 * NEWS (2.5): Document.
698 * src/reader.c (grammar_rule_check): Convert warning to
699 complaint.
700 * tests/input.at (%prec's token must be defined): Update.
701
702 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
703
704 POSIX: warn if %prec's token was not defined.
705 Reported by Florian Krohm at
706 <http://lists.gnu.org/archive/html/bug-bison/2009-12/msg00005.html>.
707 * NEWS (2.4.2): Document.
708 * src/reader.c (grammar_rule_check): Implement.
709 (grammar_current_rule_prec_set): Add comments explaining that we
710 here assume a %prec identifier is a token, but we still manage
711 to support POSIX.
712 * tests/input.at (%prec's token must be defined): New test
713 group.
714
715 2009-12-31 Joel E. Denny <jdenny@clemson.edu>
716
717 * HACKING (Release Procedure): Recommend a secure automake.
718
719 2008-12-11 Akim Demaille <demaille@gostai.com>
720
721 Propagate i18n changes into glr.c.
722 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
723 building the error message format dynamically.
724 * data/lalr1.java: Formatting changes.
725
726 2009-12-22 Joel E. Denny <jdenny@clemson.edu>
727
728 Port small part of master's 11707b2b so future ports are easier.
729 * data/lalr1.java (YYParser::yysyntax_error): Untabify.
730
731 2008-12-11 Akim Demaille <demaille@gostai.com>
732
733 Simplify the i18n of the error messages.
734 * data/lalr1.cc: Comment changes.
735
736 2008-11-11 Akim Demaille <demaille@gostai.com>
737
738 Prefer M4 to CPP.
739 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
740 YYERROR_VERBOSE.
741
742 2008-11-11 Akim Demaille <demaille@gostai.com>
743
744 Support i18n of the parse error messages.
745 * TODO (lalr1.cc/I18n): Remove.
746 * data/lalr1.cc (yysyntax_error_): Support the translation of the
747 error messages, as done in yacc.c.
748 Stay within the yy* pseudo namespace.
749
750 2009-12-22 Joel E. Denny <jdenny@clemson.edu>
751
752 Port small part of master's 8901f32e so future ports are easier.
753 * data/lalr1.cc (yy::parser::yysyntax_error_): Always add second
754 argument, but name it in the function definition only when
755 verbose error messages are enabled and it'll thus be used.
756 (yy::parser::parse): Update use of yysyntax_error_.
757
758 2009-12-29 Joel E. Denny <jdenny@clemson.edu>
759
760 portability: `<' and `>' are not always defined on addresses.
761 Specifically, don't sort objects by their memory addresses when
762 they're not allocated in the same array or other object. Though
763 I haven't found a test case where that fails on my platform, C
764 says the behavior is undefined.
765 * src/AnnotationList.c (AnnotationList__insertInto): Remove
766 FIXME. Use new id field of InadequacyList nodes rather than
767 their memory addresses when sorting.
768 (AnnotationList__compute_from_inadequacies): Add
769 inadequacy_list_node_count argument to pass to
770 InadequacyList__new_conflict.
771 * src/AnnotationList.h
772 (AnnotationList__compute_from_inadequacies): Update prototype
773 and documentation for new argument.
774 * src/InadequacyList.c (InadequacyList__new_conflict): Add
775 node_count argument and use it to assign a unique ID.
776 * src/InadequacyList.h (InadequacyListNodeCount): New typedef.
777 (InadequacyList): Add id field.
778 (InadequacyList__new_conflict): Update prototype and
779 documentation for new argument.
780 * src/ielr.c (ielr_compute_annotation_lists): Update
781 AnnotationList__compute_from_inadequacies invocation.
782
783 2009-12-20 Joel E. Denny <jdenny@clemson.edu>
784
785 Fix handling of yychar manipulation in user semantic actions.
786 The problem was that yacc.c didn't always update the yychar
787 translation afterwards. However, other skeletons appear to be
788 fine. glr.c appears to already translate yychar before every
789 use. lalr1.cc does not define yychar and does not document its
790 replacement, yyla, for users. It does provide yyclearin, but
791 that does not manipulate yyla and thus requires no translation
792 update. In lalr1.java, yychar is out of scope during semantic
793 actions.
794 * NEWS (2.5): Document.
795 * data/yacc.c (YYBACKUP): Don't bother translating yychar into
796 yytoken here.
797 (yyparse, yypush_parse): Instead, translate before every use of
798 yytoken, and add comments explaining this approach.
799 * tests/actions.at (Destroying lookahead assigned by semantic
800 action): New test group checking that translation happens before
801 lookahead destructor calls at parser return. Previously,
802 incorrect destructors were called.
803 * tests/conflicts.at (%error-verbose and consistent
804 errors): New test group checking that translation happens at
805 syntax error detection before the associated verbose error
806 message and the associated lookahead destructor calls. While
807 the destructor call is fixed by this patch, the verbose error
808 message is currently incorrect due to another bug (see
809 comments in test group), so this is an expected failure for now.
810
811 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
812
813 YYFAIL: warn about uses and remove from lalr1.java.
814 * NEWS (2.5): Document.
815 * data/lalr1.java (YYParser::YYFAIL): Rename to YYERRLAB,
816 and make it private. Update all uses.
817 * src/scan-code.l (SC_RULE_ACTION): Implement warning.
818
819 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
820
821 YYFAIL: deprecate.
822 * NEWS (2.4.2): Document deprecation and the phase-out plan.
823 * data/lalr1.java (YYParser::YYFAIL): Add comment about
824 deprecation.
825 * data/yacc.c (YYFAIL): Likewise, and suppress warnings about
826 YYFAIL from GCC cpp's -Wunused-macros.
827 * doc/bison.texinfo (Java Action Features): Remove YYFAIL
828 documentation.
829 (LocalWords): Remove YYFAIL.
830
831 2009-12-17 Joel E. Denny <jdenny@clemson.edu>
832
833 Code cleanup.
834 * src/symtab.c, src/symtab.h (symbol_class_get_string): Remove
835 function, which is no longer used.
836
837 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
838
839 Add gcc's -Wundef to test suite and fix another warning from it.
840 * NEWS (2.4.2): Update description of -Wundef fix.
841 * configure.ac (WARN_CXXFLAGS_TEST): New substitution.
842 (WARN_CFLAGS_TEST): New substitution.
843 * data/glr.c: Avoid warning about __STRICT_ANSI__.
844 * tests/atlocal.in (CFLAGS): Use WARN_CFLAGS_TEST instead of
845 WARN_CFLAGS.
846 (NO_WERROR_CFLAGS): Likewise.
847 (CXXFLAGS): Use WARN_CXXFLAGS_TEST instead of WARN_CXXFLAGS.
848
849 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
850
851 * data/yacc.c: Reformat m4 a little.
852
853 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
854
855 Document gcc -Wundef fix.
856 * NEWS (2.4.2): Here.
857 * THANKS (Jonathan Nieder): Add.
858
859 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
860
861 Simplify y.tab.c when location tracking is disabled.
862 * data/yacc.c: Do not check YYLTYPE_IS_TRIVIAL if location
863 tracking is not enabled. Instead, unconditionally define
864 YY_LOCATION_PRINT as a no-op for backward compatibility.
865
866 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
867
868 Avoid warnings from gcc -Wundef y.tab.c.
869 * data/glr.c: Check if YYENABLE_NLS and YYLTYPE_IS_TRIVIAL are
870 defined before using them.
871 * data/lalr1.cc: Likewise.
872 * data/yacc.c: Likewise.
873
874 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
875
876 autoconf: update to latest for fix of M4 detection.
877 Reported by Eric Blake.
878 * submodules/autoconf: Update.
879
880 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
881
882 portability: use -DGNULIB_POSIXCHECK.
883 Reported by Eric Blake. See discussions at
884 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00008.html>
885 and
886 <http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00108.html>.
887 * HACKING (Release checks): Suggest -DGNULIB_POSIXCHECK.
888 * bootstrap.conf (gnulib_modules): Add all the printf modules
889 suggested by -DGNULIB_POSIXCHECK. Add realloc-posix as
890 suggested by -DGNULIB_POSIXCHECK for gnulib's own vasnprintf.c.
891 (excluded_files): Remove m4/printf-posix.m4.
892 * tests/atlocal.in (LIBS): As for LDADD in src/local.mk, add
893 lib/libbison.a so gnulib libraries can be linked.
894
895 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
896
897 Enable assertion output and --disable-assert for configure.
898 * bootstrap.conf (gnulib_modules): Add assert module.
899 * src/system.h (aver): Define as assert, and summarize the
900 discussion on this issue.
901
902 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
903
904 Expand GLR acronym in summary of Bison.
905 Based on discussion with Akim Demaille starting at
906 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00087.html>.
907 * doc/bison.texinfo (Introduction): Here.
908 * src/getargs.c (usage): Here.
909
910 2009-10-03 Alex Rozenman <rozenman@gmail.com>
911
912 Document named references.
913 * doc/bison.texinfo (Actions): Add new example and xref to
914 Using Named References node.
915 (Using Named References): New node.
916
917 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
918
919 cleanup.
920 * src/Sbitset.c (Sbitset__new_on_obstack): Use Sbitset instead
921 of char*.
922 (Sbitset__isEmpty): Use Sbitset instead of char*.
923 * src/Sbitset.h (Sbitset): Make it a pointer to unsigned char
924 instead of char. This helps to avoid casting errors.
925 (Sbitset__or): Use Sbitset instead of char*.
926
927 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
928
929 portability: don't assume 8-bit bytes.
930 That is, use CHAR_BIT and UCHAR_MAX instead of 8 and 0xff.
931 * src/Sbitset.h (Sbitset__nbytes): Here.
932 (Sbitset__byteAddress): Here.
933 (Sbitset__bit_mask): Here.
934 (Sbitset__last_byte_mask): Here.
935 (Sbitset__ones): Here.
936 (SBITSET__FOR_EACH): Here.
937
938 2009-10-11 Joel E. Denny <jdenny@clemson.edu>
939
940 portability: use va_start and va_end in the same function.
941 * src/complain.c (error_message): Move va_end from here...
942 (ERROR_MESSAGE): ... to here.
943
944 2009-10-08 Joel E. Denny <jdenny@clemson.edu>
945
946 * data/bison.m4: Update comments for rename to muscle-tab.h.
947
948 2009-10-08 Joel E. Denny <jdenny@clemson.edu>
949
950 Rename muscle_tab.* to muscle-tab.* for consistency with master.
951 * src/Makefile.am (bison_SOURCES): Update.
952 * src/getargs.c, src/ielr.c, src/lalr.c, src/main.c,
953 src/output.c, src/parse-gram.y, src/print.c, src/reader.c,
954 src/tables.c: Update include.
955 * src/muscle_tab.c, src/muscle_tab.h: Rename to...
956 * src/muscle-tab.c, src/muscle-tab.h: ... these and update
957 include.
958
959 2009-10-07 Joel E. Denny <jdenny@clemson.edu>
960
961 Minor code cleanup.
962 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT): Remove macro and
963 replace all uses with UNIQSTR_CONCAT.
964 * src/uniqstr.c (uniqstr_vsprintf): New function.
965 * src/uniqstr.h (uniqstr_vsprintf): Add prototype.
966 (UNIQSTR_CONCAT, UNIQSTR_GEN_FORMAT, UNIQSTR_GEN_FORMAT_): New
967 macros.
968
969 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
970
971 Minor code cleanup.
972 * src/parse-gram.y: Clean up sorting of declarations.
973 Use types to simplify %printer declarations where possible.
974 Provide %printer for BRACKETED_ID and symbol.prec.
975 * src/symtab.c: Whitespace change.
976
977 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
978
979 tests: skip tests of file names that platform does not support.
980 Reported by Michael Raskin at
981 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00001.html>.
982 * THANKS (Michael Raskin): Add.
983 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Fix. Cygwin used
984 to fail at least for file names containing ":" or "\".
985
986 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
987
988 yysyntax_error: avoid duplicate lookahead collection.
989 Except when memory reallocation is required, this change
990 eliminates the need to invoke yysyntax_error twice and thus to
991 repeat the collection of lookaheads. It also prepares for
992 future extensions that will make those repetitions more
993 expensive and that will require additional memory management in
994 yysyntax_error. Finally, it fixes an obscure bug already
995 exercised in the test suite.
996 * data/yacc.c (yysyntax_error): Add arguments for message
997 buffer variables stored in the parser. Instead of size, return
998 status similar to yyparse status but indicating success of
999 message creation. Other than the actual reallocation of the
1000 message buffer, import and clean up memory management code
1001 from...
1002 (yyparse, yypush_parse): ... here.
1003 * tests/regression.at (%error-verbose overflow): No longer an
1004 expected failure.
1005
1006 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
1007
1008 yysyntax_error: test memory management more.
1009 * tests/atlocal.in (NO_WERROR_CFLAGS): New cpp macro.
1010 * tests/regression.at (%error-verbose and YYSTACK_USE_ALLOCA):
1011 New test group.
1012 (%error-verbose overflow): New test group that reveals an
1013 obscure bug. Expected fail for now.
1014
1015 2008-12-11 Akim Demaille <demaille@gostai.com>
1016
1017 Pass the token type to yysyntax_error.
1018 * data/yacc.c (yysyntax_error): Take the transated token instead
1019 of the raw number.
1020 Adjust callers.
1021
1022 2008-12-11 Akim Demaille <demaille@gostai.com>
1023
1024 Simplify the i18n of the error messages.
1025 * data/yacc.c (yysyntax_error): Rewrite, using a switch instead
1026 of building dynamically the format string.
1027
1028 2009-10-03 Joel E. Denny <jdenny@clemson.edu>
1029
1030 Remove dead code.
1031 * src/symtab.c (symbol_pack): Here because every symbol's number
1032 is always defined by this time.
1033
1034 2009-10-03 Alex Rozenman <rozenman@gmail.com>
1035
1036 Add additional space after periods in NEWS.
1037 * NEWS (2.5): here.
1038
1039 2009-09-29 Joel E. Denny <jdenny@clemson.edu>
1040
1041 Use the correct conversion specifier for size_t.
1042 Reported by Jim Meyering.
1043 * src/Sbitset.h (SBITSET__INDEX__CONVERSION_SPEC): New, "zu"
1044 because Sbitset__Index is size_t.
1045 * src/Sbitset.c (Sbitset__fprint): Use it instead of %d.
1046
1047 2009-09-27 Joel E. Denny <jdenny@clemson.edu>
1048
1049 tests: don't abuse AT_BISON_CHECK.
1050 * tests/regression.at (parse-gram.y: LALR = IELR): Move
1051 additional shell commands outside of AT_BISON_CHECK.
1052
1053 2009-09-26 Joel E. Denny <jdenny@clemson.edu>
1054
1055 tests: check that parse-gram.y's IELR and LALR are identical.
1056 * tests/atlocal.in (abs_top_srcdir): New shell variable.
1057 * tests/regression.at (parse-gram.y: LALR = IELR): New test
1058 group.
1059
1060 2009-09-16 Akim Demaille <demaille@gostai.com>
1061
1062 doc: comment changes.
1063 * doc/bison.texinfo: Comment changes.
1064
1065 2009-09-16 Akim Demaille <demaille@gostai.com>
1066
1067 doc: spell checking.
1068 * doc/bison.texinfo: here.
1069
1070 2009-09-19 Alex Rozenman <rozenman@gmail.com>
1071
1072 Keep sub-messages aligned. Fix strings for translation.
1073 * src/location.h (location_print): Add return value.
1074 * src/location.c (location_print): Return number of printed
1075 characters.
1076 * src/complain.h (complain_at_indent, warn_at_indent): Prototype
1077 new functions.
1078 * src/complain.cpp (indent_ptr): New static variable.
1079 (error_message, complain_at_indent, warn_at_indent): Implement
1080 the alignment mechanism.
1081 * src/scan-code.l (parse_ref, show_sub_messages): Fix strings
1082 for translations. Use new alignment mechanism.
1083 * tests/named-ref.at: Adjust test-cases.
1084 * NEWS (2.5): Add an announcement about named references.
1085
1086 2009-09-13 Joel E. Denny <jdenny@clemson.edu>
1087
1088 tests: clean up push.at test group titles.
1089 * tests/push.at: Remove "Push Parsing: " from test group titles
1090 because these are already under the banner "Push Parsing Tests".
1091
1092 2009-09-12 Alex Rozenman <rozenman@gmail.com>
1093
1094 Provide an additional sub-message for clarity.
1095 Add "symbol not found in production" error message when
1096 an "invalid reference" is detected in named references
1097 resolution.
1098 * src/scan-code.l: Update "invalid reference" case.
1099 * tests/named-ref.at: Adjust test-cases.
1100
1101 2009-09-10 Joel E. Denny <jdenny@clemson.edu>
1102
1103 Clean up yacc.c a little.
1104 * data/yacc.c: Clean up M4 for readability, and make output
1105 whitespace more consistent. For the main parse function
1106 comment, instead of saying "yyparse or yypush_parse", say either
1107 "yyparse" or "yypush_parse" depending on which it actually is.
1108
1109 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
1110
1111 Complain about unused %define variables and %code qualifiers.
1112 * NEWS (2.5): Document.
1113 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
1114 * doc/bison.texinfo (Decl Summary): Document complaint, and
1115 improve %define documentation a little otherwise.
1116 * tests/input.at (Reject unused %code qualifiers): Update.
1117 (%define errors): Update.
1118 (%define, --define, --force-define): Update.
1119 (%define backward compatibility): Update.
1120 (Unused %define api.pure): Update.
1121 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
1122
1123 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
1124
1125 Use aver not assert.
1126 * src/output.c: Don't include assert.h.
1127 (output_skeleton): Use aver not assert.
1128 * src/system.h (aver): In documentation of why, add links to
1129 Paul Eggert's explanations in the mailing lists.
1130
1131 2009-09-05 Alex Rozenman <rozenman@gmail.com>
1132
1133 Use "Unresolved reference" error message when no symbols were found
1134 in a symbolic reference resolution. Remove .expr and -expr from
1135 the shown reference when the reference is unresolved.
1136 * src/scan-code.l: Change the error message, adjust location columns,
1137 rename variable "exact_mode" to "explicit_bracketing".
1138 * tests/named-ref.at: Adjust existing tests and add a new one.
1139
1140 2009-09-03 Akim Demaille <demaille@gostai.com>
1141
1142 * NEWS (2.4.2): Add "Internationalization" item.
1143
1144 2009-09-03 Akim Demaille <demaille@gostai.com>
1145
1146 bootstrap: fix/improve find_tool.
1147 * bootstrap (find_tool): Improve error messages.
1148 Fix typo about find_tool_names.
1149
1150 2009-08-29 Joel E. Denny <jdenny@clemson.edu>
1151
1152 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
1153 See
1154 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
1155 * src/scan-code.h (code_props_rule_action_init): Rename
1156 named_ref arg to name so it doesn't shadow named_ref type. This
1157 makes it consistent with the function definition in scan-code.l
1158 anyway.
1159
1160 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
1161
1162 %define: accept unquoted values.
1163 * NEWS (2.5): Group all %define changes together, and document
1164 this one. Remove quotes in IELR and canonical LR entry.
1165 * doc/bison.texinfo: Remove quotes in most examples throughout.
1166 (Decl Summary): Update %define documentation.
1167 (Table of Symbols): Likewise.
1168 * src/ielr.c (LrType): Update documentation.
1169 * src/parse-gram.y (content.opt): Add production for ID.
1170 * tests/calc.at: Remove quotes in most tests.
1171 * tests/existing.at: Likewise.
1172 * tests/input.at: Likewise.
1173 * tests/local.at: Likewise.
1174 * tests/push.at: Likewise.
1175 * tests/reduce.at: Likewise.
1176 * tests/torture.at: Likewise.
1177
1178 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
1179
1180 %define lr.type: make values lowercase IDs.
1181 That is, "LALR" => "lalr", "IELR" => "ielr", and
1182 "canonical LR" => "canonical-lr".
1183 * NEWS (2.5): Update documentation.
1184 * doc/bison.texinfo (Decl Summary): Likewise.
1185 * src/ielr.c (ielr): Use new values.
1186 * src/ielr.h (ielr): Update documentation.
1187 * src/reader.c (prepare_percent_define_front_end_variables): Use
1188 and validate new values.
1189 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
1190 grammars.
1191 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
1192
1193 2009-08-27 Eric Blake <ebb9@byu.net>
1194
1195 scan-gram: avoid portability trap with ctype usage.
1196 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
1197 Avoid compiler warning.
1198
1199 2009-08-27 Joel E. Denny <jdenny@clemson.edu>
1200
1201 tests: use perl for printing special sequences to files.
1202 And skip tests if perl is not available. This is better than
1203 playing tricks with shell portability. Suggested by Akim
1204 Demaille.
1205 * tests/input.at (Bad character literals): Use it here for
1206 omitting final newlines.
1207 (Bad escapes in literals): Use it here for special characters.
1208
1209 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
1210
1211 tests: show a use of %define lr.default-reductions "consistent"
1212 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
1213 prevents the omission of expected tokens for %error-verbose.
1214
1215 2009-08-26 Akim Demaille <demaille@gostai.com>
1216
1217 tests: portability fix.
1218 * tests/input.at (Bad escapes in literals): Don't expect "echo
1219 '\0'" to output \ then 0.
1220
1221 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
1222
1223 Actually handle the yytable zero value correctly this time.
1224 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Don't
1225 mention zero values in the YYTABLE comments.
1226 * data/glr.c (yytable_value_is_error): Don't check for zero
1227 value.
1228 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
1229 * data/yacc.c (yytable_value_is_error): Likewise.
1230 * data/lalr1.java (yy_table_value_is_error_): Likewise.
1231 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
1232 * src/tables.h: In header comments, explain why it's useless to
1233 check for a zero value in yytable.
1234
1235 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1236
1237 More fixes related to last two patches.
1238 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
1239 defined.
1240 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Fix
1241 yytable comments: zero indicates syntax error not default
1242 action.
1243 * data/glr.c (yyis_pact_ninf): Rename to...
1244 (yypact_value_is_default): ... this.
1245 (yyisDefaultedState): Update for rename.
1246 (yyis_table_ninf): Rename to...
1247 (yytable_value_is_error): ... this, and check for value zero
1248 besides just YYTABLE_NINF.
1249 (yygetLRActions): Check for default value from yypact. It
1250 appears that this check is always performed before this function
1251 is invoked, and so adding the check here is probably redundant.
1252 However, the code may evolve after this subtlety is forgotten.
1253 Also, update for rename to yytable_value_is_error. Because that
1254 macro now checks for zero, a different but equivalent branch of
1255 the if-then-else here is evaluated.
1256 (yyreportSyntaxError): Update for rename to
1257 yytable_value_is_error. The zero condition was mishandled
1258 before.
1259 (yyrecoverSyntaxError): Update for renames. No behavioral
1260 changes.
1261 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
1262 New function.
1263 (yy_table_value_is_error_): New function.
1264 (parse): Use new functions where possible. No behavioral
1265 changes.
1266 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
1267 The zero condition was mishandled before.
1268 * data/yacc.c (yyis_pact_ninf): Rename to...
1269 (yypact_value_is_default): ... this.
1270 (yyis_table_ninf): Rename to...
1271 (yytable_value_is_error): ... this, and check for value zero
1272 besides just YYTABLE_NINF.
1273 (yysyntax_error): Update for rename to yytable_value_is_error.
1274 The zero condition was mishandled before.
1275 (yyparse): Update for renames. No behavioral changes.
1276 * src/tables.h: Improve comments about yypact, yytable, etc.
1277 more. Most importantly, say yytable value of zero means syntax
1278 error not default action.
1279
1280 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1281
1282 Fix %error-verbose for conflicts resolved by %nonassoc.
1283 * NEWS (2.5): Document.
1284 * data/glr.c (yyreportSyntaxError): Fix this by checking
1285 yyis_table_ninf.
1286 * data/yacc.c (yysyntax_error): Likewise.
1287 * data/lalr1.cc (yysyntax_error_): Fix this by checking
1288 yytable_ninf_.
1289 * data/lalr1.java (yysyntax_error): Likewise.
1290 * tests/conflicts.at (%nonassoc and eof): Update expected output
1291 and remove FIXME.
1292
1293 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1294
1295 Some code and documentation improvements.
1296 * data/c.m4 (b4_table_value_equals): New macro to capture
1297 some repeated code.
1298 * data/glr.c (yyis_pact_ninf): Use it here.
1299 (yyis_table_ninf): Likewise.
1300 (yyreportSyntaxError): Improve internal comments.
1301 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
1302 Use it everywhere possible.
1303 (yyis_table_ninf): Likewise.
1304 (yysyntax_error): Improve internal comments.
1305 * data/lalr1.cc (yysyntax_error_): Likewise.
1306 * data/lalr1.java (yysyntax_error): Likewise.
1307 * src/tables.h: Improve comments about yypact, yytable, etc.
1308
1309 2009-08-21 Joel E. Denny <jdenny@clemson.edu>
1310
1311 Use locale when quoting.
1312 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
1313 quote rather than implementing quoting here.
1314
1315 2009-08-20 Eric Blake <ebb9@byu.net>
1316
1317 Make previous patch more robust.
1318 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
1319 argmatch.h.
1320 (output_skeleton): Use it.
1321 Suggested by Akim Demaille.
1322
1323 Import latest m4/m4.m4.
1324 * submodules/autoconf: Update to autoconf 2.64.
1325 * configure.ac (M4_GNU_OPTION): New define.
1326 * src/output.c (output_skeleton): Use it to resolve FIXME.
1327 * NEWS: Mention this.
1328
1329 2009-08-19 Joel E. Denny <jdenny@clemson.edu>
1330
1331 Fix complaints about escape sequences.
1332 Discussed starting at
1333 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
1334 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
1335 For a \0 and similar escape sequences meaning the null
1336 character, report an invalid escape sequence instead of an
1337 invalid null character because the latter does not actually
1338 appear in the user's input.
1339 In all escape sequence complaints, don't escape the initial
1340 backslash, and don't quote when the sequence appears at the end
1341 of the complaint line unless there's whitespace that quotearg
1342 won't escape.
1343 Consistently say "invalid" not "unrecognized".
1344 Consistently prefer "empty character literal" over "extra
1345 characters in character literal" warning for invalid escape
1346 sequences; that is, consistently discard those sequences.
1347 * tests/input.at (Bad escapes in literals): New.
1348
1349 2009-08-19 Akim Demaille <demaille@gostai.com>
1350
1351 doc: fixes.
1352 * doc/bison.texinfo: Fix minor Texinfo errors.
1353
1354 2009-08-19 Akim Demaille <demaille@gostai.com>
1355
1356 doc: %initial-action to initialize yylloc.
1357 Reported by Bill Allombert.
1358 * doc/bison.texinfo: Set fill-column to 76.
1359 (Location Type): Document the use of %initial-action to initialize
1360 yylloc.
1361
1362 2009-08-18 Joel E. Denny <jdenny@clemson.edu>
1363
1364 maint: update for gnulib's recent update-copyright changes
1365 * gnulib: Update.
1366 * .x-update-copyright (COPYING): Add as it's no longer implied
1367 when .x-update-copyright is present.
1368 * cfg.mk (update-copyright-local): Remove, now ignored.
1369 (update-copyright): Declare update-b4-copyright as a dependency.
1370
1371 2009-08-17 Akim Demaille <demaille@gostai.com>
1372
1373 build: require gettext 0.17.
1374
1375 Suggested by Bruno Haible.
1376 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
1377 * configure.ac: require gettext 0.17 to ensure compatibility with
1378 gnulib.
1379
1380 2009-08-17 Akim Demaille <demaille@gostai.com>
1381
1382 build: lower gettext requirements.
1383
1384 Bison was uselessly requiring the formatstring macros from
1385 gettext, which resulted in mo files not being installed on systems
1386 that perfectly supported Bison mo files. Lower the requirement.
1387 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
1388
1389 * configure.ac: Require need-ngettext instead of
1390 need-formatstring-macros.
1391 Reported by Martin Jabocs.
1392 Suggested by Bruno Haible.
1393 * INSTALL: Restructure.
1394 (Internationalization): New.
1395
1396 2009-08-14 Joel E. Denny <jdenny@clemson.edu>
1397
1398 maint: fix use of copyright year intervals.
1399 * gnulib: Update.
1400 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
1401 as now recommended in gnulib/NEWS.
1402 * build-aux/update-b4-copyright: Fix.
1403 * cfg.mk (update-copyright-env): Configure update-copyright.
1404
1405 2009-08-13 Joel E. Denny <jdenny@clemson.edu>
1406
1407 Make it easier to write deterministic tests.
1408 Continues Akim's work from his 2009-06-10 commits.
1409 * src/reader.c (check_and_convert_grammar): Don't add any
1410 symbols after the first symbols_do invocation.
1411 * src/symtab.c (symbols_sorted): New static global.
1412 (user_token_number_redeclaration): Update comments.
1413 (symbol_from_uniqstr): If a new symbol is being created, assert
1414 that symbols_sorted hasn't been allocated yet.
1415 (symbols_free): Free symbols_sorted.
1416 (symbols_cmp, symbols_cmp_qsort): New functions.
1417 (symbols_do): Sort symbol_table into symbols_sorted on first
1418 invocation.
1419 * tests/input.at (Numbered tokens): Recombine tests now that the
1420 output should be deterministic across multiple numbers.
1421
1422 2009-08-12 Akim Demaille <demaille@gostai.com>
1423
1424 distcheck: fix.
1425
1426 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
1427
1428 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
1429
1430 * tests/Makefile.am (TESTSUITE_AT): Add named-refs.at.
1431
1432 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
1433
1434 Miscellaneous code readability improvements.
1435
1436 * src/reader.c (reader): Move %define front-end variable
1437 defaults and checking into...
1438 (prepare_percent_define_front_end_variables): ... this new
1439 function.
1440
1441 * src/scan-gram.l (INITIAL): For consistency with string
1442 literals, don't store open quote on character literal. It's
1443 discarded before returning anyway.
1444 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
1445 Make length test more readable, and make the character stored
1446 for an empty literal more obvious while consistent with the
1447 previous behavior.
1448
1449 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
1450 USER_NUMBER_HAS_STRING_ALIAS throughout.
1451 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
1452 that is repeated in symtab.h. Improve argument names to make it
1453 clear which side of the symbol-string alias pair is which.
1454 (symbol_check_alias_consistency): Improve local variable names
1455 for the same purpose.
1456 * src/symtab.h (struct symbol): Make comments about aliases
1457 clearer.
1458 (symbol_make_alias): Improve comments and argument name.
1459 * src/output.c (token_definitions_output): Update for rename to
1460 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
1461
1462 2009-08-08 Alex Rozenman <rozenman@gmail.com>
1463
1464 Convert "misleading reference" messages to warnings.
1465 * src/scan-code.l: New function 'show_sub_messages', more
1466 factoring.
1467 * tests/named-ref.at: Adjust tests.
1468
1469 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
1470
1471 maint: run "make update-copyright"
1472
1473 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
1474
1475 maint: make update-b4-copyright easier to use
1476 * build-aux/update-b4-copyright: In warnings, report line
1477 numbers rather than character positions.
1478 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
1479 that update-copyright runs it.
1480 * gnulib: Update.
1481
1482 2009-08-05 Joel E. Denny <jdenny@clemson.edu>
1483
1484 maint: clean up update-b4-copyright code
1485 * build-aux/update-b4-copyright: Do not accept 2-digit
1486 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
1487 Don't accept a `[' in a b4_copyright argument.
1488 Format code more consistently.
1489 Don't assume b4*copyright never occurs.
1490
1491 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1492
1493 maint: automate b4_copyright updates.
1494 * Makefile.am (update-b4-copyright): New target rule.
1495 * build-aux/Makefile.am (EXTRA_DIST): Add update-b4-copyright.
1496 * build-aux/update-b4-copyright: New.
1497 * data/yacc.c: Remove stray characters around b4_copyright
1498 invocations.
1499
1500 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1501
1502 maint: automate annual package-wide copyright-year update.
1503 * .x-update-copyright: New.
1504 * Makefile.am (EXTRA_DIST): Remove maint.mk.
1505 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
1506 update-copyright. Remove gnumakefile, which is implied by
1507 maintainer-makefile.
1508 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
1509 * gnulib: Update.
1510 * maint.mk: Remove, now copied from gnulib.
1511 * examples/extexi: Add missing "(C)" in copyright statement so
1512 update-copyright can recognize it.
1513 * src/LR0.h: Likewise.
1514 * src/print.h: Likewise.
1515 * src/print_graph.h: Likewise.
1516 * src/gram.c: Add missing comma in copyright statement.
1517 * src/gram.h: Likewise.
1518
1519 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1520
1521 Fix "make distcheck".
1522 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
1523 of just calc.stamp.
1524
1525 2009-08-01 Joel E. Denny <jdenny@clemson.edu>
1526
1527 Pacify "gcc -Wunused" for the input function from Flex.
1528 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
1529 and later.
1530 * src/scan-code.l: Add "%option noinput", which I cannot find in
1531 the Flex manual, but which Flex has supported since at least as
1532 far back as 2.5.4. However, if any of our developers still use
1533 Flex 2.5.4, they'll need to stop configuring with
1534 --enable-gcc-warnings because "%option noinput" didn't work
1535 correctly until Flex 2.5.6.
1536 * src/scan-gram.l: Likewise.
1537 * src/scan-skel.l: Likewise.
1538
1539 2009-07-31 Alex Rozenman <rozenman@gmail.com>
1540
1541 Fix --enable-gcc-warnings problems.
1542 * src/reader.c: Adjust variable names.
1543 * src/scan-code.l: Fix prototypes and adjust names.
1544 * src/named-ref.c: Remove redundant "if".
1545
1546 2009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
1547
1548 Fix a --enable-gcc-warnings problem.
1549 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
1550 variable.
1551
1552 2009-07-24 Alex Rozenman <rozenman@gmail.com>
1553
1554 Fix some memory leaks.
1555 * src/named-ref.c: Add a pointer check (named_ref_free).
1556 * src/scan-code.l: New function (variant_table_free). Called in
1557 code_scanner_free.
1558 * src/symlist.c: Call to named_ref_free (symbol_list_free).
1559
1560 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
1561
1562 Warn about character literals not of length one.
1563 * NEWS (2.5): Document.
1564 * src/scan-gram.l (INITIAL): Remove comment that we don't check
1565 the length.
1566 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
1567 * tests/input.at (Bad character literals): New test group.
1568
1569 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
1570
1571 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
1572
1573 2009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
1574
1575 Some M4 cleanup in the testsuite.
1576 Suggested by Eric Blake at
1577 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
1578 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
1579 complicate the code by distinguishing between a missing value
1580 and an empty string value for an optional argument. This fix is
1581 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
1582 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
1583 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
1584 arguments are not needed because of the following changes.
1585 Fix stale comments.
1586 Bison developers should use GNU M4 and should not use
1587 POSIXLY_CORRECT when building the test suite, so do not
1588 complicate the code by avoiding $10 and above.
1589 Do not quote an empty string value for an optional argument, and
1590 do not distinguish between a missing value and an empty string
1591 value.
1592
1593 2009-07-21 Joel E. Denny <jdenny@ces.clemson.edu>
1594
1595 * m4/m4.m4: Make it a sym link to submodules/autoconf/m4/m4.m4.
1596
1597 2009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
1598
1599 Revert unnecessary column realignment in --help output.
1600 Reported by Akim Demaille at
1601 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
1602 * src/getargs.c (usage): Here.
1603
1604 2009-07-04 Alex Rozenman <rozenman@gmail.com>
1605
1606 Alphabetical order in src/Makefile.am.
1607 * src/Makefile.am: Adjust.
1608
1609 2009-07-04 Alex Rozenman <rozenman@gmail.com>
1610
1611 Style changes and factoring.
1612 * src/named-ref.h: Add comments.
1613 * src/parse-gram.y: Readability and style changes.
1614 * src/reader.c: Factoring: assign_named_ref function.
1615 * src/scan-code.l: Factoring and style changes. Rename
1616 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
1617 Use "unsigned" type for variant index. Improve readablity.
1618 * src/scan-gram.l: Change error messages and add comments.
1619 * src/symlist.h: symbol_list_null: New function decl.
1620 * src/symlist.c: symbol_list_null: Implement here.
1621 * tests/named-refs.at: Adjust for new error messages.
1622
1623 2009-06-29 Eric Blake <ebb9@byu.net>
1624
1625 scan-code: avoid compiler warnings
1626 * src/scan-code.l (parse_named_ref): Use correct specifiers.
1627
1628 2009-06-29 Akim Demaille <demaille@gostai.com>
1629
1630 build: avoid concurrent extraction of calc++.
1631 * examples/calc++/Makefile.am (calc.stamp): New.
1632 Depend on it to create the sources of calc++ so that concurrent
1633 builds don't launch several "extexi" in parallel.
1634 Not only this is inefficient, this also builds incorrect sources
1635 with several extractions mixed together.
1636
1637 2009-06-27 Alex Rozenman <rozenman@gmail.com>
1638
1639 Implement support for named symbol references.
1640 * src/parse-gram.y: Add new syntax (named_ref.opt).
1641 * src/reader.c: Store named refs in symbol lists.
1642 * src/reader.h: New argument for symbol_append and
1643 action_append functions.
1644 * src/scan-code.h: Add new field (named_ref) into
1645 code_props data structure. Keeps named ref of midrule
1646 actions.
1647 * src/scan-code.l: Support for named refs in semantic
1648 action code. New function 'parse_named_ref'.
1649 * src/scan-gram.l: Support bracketed id.
1650 * src/symlist.c: Store named refs in symbol lists.
1651 * src/symlist.h: New field in symbol list: named_ref.
1652 * src/named-ref.h: New file, a struct for named_ref.
1653 * src/named-ref.cp: New file, named_ref_new function.
1654 * src/local.mk: Add two new files.
1655 * tests/testsuite.at: Include new test group:
1656 * tests/named-refs.at: this new file.
1657
1658 2009-06-25 Akim Demaille <demaille@gostai.com>
1659
1660 hash: check insertion for memory exhaustion.
1661 * src/uniqstr.c (uniqstr_new): New.
1662
1663 2009-06-11 Akim Demaille <demaille@gostai.com>
1664
1665 style changes.
1666 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
1667 * src/print-xml.c: Style changes.
1668 * tests/conflicts.at: Comment changes.
1669
1670 2009-06-11 Akim Demaille <demaille@gostai.com>
1671
1672 xml: beware of user strings used to give a %prec to rules.
1673 * tests/conflicts.at (%prec with user strings): New.
1674 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
1675 XML output.
1676
1677 2009-06-11 Akim Demaille <demaille@gostai.com>
1678
1679 hash: check insertion for memory exhaustion.
1680 * src/muscle-tab.c (muscle_insert, muscle_grow)
1681 * src/state.c (state_hash_insert): Check the return value of
1682 hash_insert.
1683
1684 2009-06-10 Akim Demaille <demaille@gostai.com>
1685
1686 deterministic test suite.
1687 Some consistency checks on symbols are performed after all the
1688 symbols were read, by an iteration over the symbol table. This
1689 traversal is nondeterministic, which can be a problem for test
1690 cases.
1691 Avoid this.
1692 Addresses another form of nondeterminism reported by Joel E. Denny.
1693 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
1694
1695 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
1696 test in two.
1697 Use different file names for the three tests to make the
1698 maintenance easier.
1699
1700 2009-06-10 Akim Demaille <demaille@gostai.com>
1701
1702 deterministic user-token-number redeclaration errors.
1703 Address nondeterminism reported by Joel E. Denny.
1704 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
1705
1706 * src/uniqstr.h: Comment changes.
1707 * src/location.h (boundary_cmp, location_cmp): New.
1708 * src/symtab.c (user_token_number_redeclaration): New.
1709 (symbol_translation): Use it.
1710 * tests/input.at (Numbered tokens): Adjust the expected output.
1711
1712 2009-05-25 Akim Demaille <demaille@gostai.com>
1713
1714 gnulib: update.
1715 * gnulib: Update to latest.
1716 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
1717 * m4/.gitignore: Regen.
1718 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
1719 Call xalloc_die on hash_insert failures.
1720 Requested by the new __warn_unused_result__ attribute of
1721 hash_insert.
1722
1723 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1724
1725 Convert multiple variable definition warnings to complaints.
1726 * NEWS (2.5): Add a new entry for that change.
1727 * doc/bison.texinfo (Decl Summary): Update %define entry.
1728 (Bison Options): Update -D/--define/-F/--force-define entry.
1729 * src/muscle_tab.c (muscle_percent_define_insert): Implement.
1730 * src/muscle_tab.h (muscle_percent_define_insert): Update
1731 comments.
1732 * tests/input.at (`%define errors'): Update.
1733 (`%define, --define, --force-define'): Update.
1734
1735 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1736
1737 -F/--force-define and relative %define/-D/--define priorities.
1738 * NEWS (2.5): Add documentation to -D/--define entry.
1739 * build-aux/cross-options.pl: Hard-code association of
1740 --force-define with %define.
1741 * doc/bison.texinfo (Decl Summary): In %define entry,
1742 cross-reference command-line options.
1743 (Bison Options): Add documentation to -D/--define entry.
1744 (Option Cross Key): Widen column for --force-define row.
1745 * src/getargs.c (usage): Document -F/--force-define. Realign
1746 options in output.
1747 (short_options, long_options, getargs): Parse -F/--force-define,
1748 and update muscle_percent_define_insert invocation.
1749 * src/muscle_tab.h (muscle_percent_define_how): New enum type.
1750 (muscle_percent_define_insert): Add argument with that type.
1751 * src/muscle_tab.c (muscle_percent_define_insert): Implement
1752 -F/--force-define behavior and priorities.
1753 * src/parse-gram.y (prologue_declaration): Update
1754 muscle_percent_define_insert invocations.
1755 * tests/input.at (`%define, --define'): Rename to...
1756 (`%define, --define, --force-define'): ... this and extend.
1757
1758 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1759
1760 Update some comments to make sense for -D.
1761 * data/bison.m4 (b4_check_user_names): In header comments, say
1762 "user occurrence" instead of "grammar occurrence".
1763 * src/muscle_tab.h (muscle_percent_define_insert): Likewise.
1764 (muscle_percent_code_grow): Likewise just for consistency.
1765
1766 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1767
1768 * data/c++.m4: Update copyright year.
1769
1770 2009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
1771
1772 * data/c++.m4 (b4_namespace_close): Simplify slightly.
1773
1774 2009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
1775
1776 Handle a trailing `:' in a user-supplied C++ namespace better.
1777 * data/c++.m4 (b4_namespace_close): Don't let it be printed
1778 among the closing braces here. This fix might make the
1779 generated code easier to debug, but otherwise it should be
1780 insignificant because a trailing `:' is a C++ error already.
1781
1782 2009-05-19 Akim Demaille <demaille@gostai.com>
1783
1784 remove useless variable.
1785 * src/getargs.c (skeleton_arg): Remove now useless variable.
1786 Should help the compiler see that this printf-like call is sane.
1787
1788 2009-05-11 Akim Demaille <demaille@gostai.com>
1789
1790 doc: use C++ headers.
1791 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
1792 headers.
1793
1794 2009-05-05 Akim Demaille <demaille@gostai.com>
1795
1796 fix hexadecimal token number support.
1797 * src/scan-gram.l: Catch incorrect ids after hexadecimal numbers.
1798
1799 2009-05-05 Akim Demaille <demaille@gostai.com>
1800
1801 tests: check token numbers.
1802 * tests/input.at (Numbered tokens): New.
1803
1804 2009-05-04 Akim Demaille <demaille@gostai.com>
1805
1806 bison: catch bad symbol names.
1807 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
1808 * tests/input.at: Adjust.
1809
1810 2009-05-04 Akim Demaille <demaille@gostai.com>
1811
1812 space changes.
1813 * src/scan-gram.l: Untabify to be robust to zealous editors.
1814
1815 2009-05-04 Akim Demaille <demaille@gostai.com>
1816
1817 identifiers: dashes are letters.
1818 Dashes can now start identifiers (symbols and directives).
1819
1820 * src/scan-gram.l ({letter}): Add dash.
1821 ({id}): Remove it.
1822 * tests/input.at (Symbols): Adjust.
1823 Remove stray comment.
1824 * tests/regression.at (Invalid inputs): Adjust error message.
1825 * doc/bison.texinfo (Symbols): Update.
1826
1827 2009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
1828
1829 Declare %code to be a permanent feature.
1830 * NEWS (2.4.2): Here.
1831 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
1832 experimental.
1833 (Decl Summary): Likewise.
1834
1835 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
1836
1837 Convert underscores to dashes in some %define variable names.
1838 For now, just api.push-pull and lr.keep-unreachable-states.
1839 Maintain old names for backward compatibility.
1840 * NEWS (2.5): Document.
1841 * data/c.m4 (b4_identification): Update comment.
1842 * data/yacc.c: Update access.
1843 * doc/bison.texinfo: Update.
1844 * etc/bench.pl.in (bench_grammar): Update use.
1845 * src/files.c (tr): Move to...
1846 * src/getargs.c, src/getargs.h (tr): ... here because I can't
1847 think of a better place to expose it. My logic is that, for all
1848 uses of tr so far, command-line arguments can be involved, and
1849 getargs.h is already included.
1850 * src/main.c (main): Update access.
1851 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
1852 variable names to new variable names before assigning value.
1853 * src/reader.c (reader): Update setting default.
1854 * tests/calc.at: Update uses.
1855 * tests/conflicts.at (Unreachable States After Conflict
1856 Resolution): Update use.
1857 * tests/input.at (%define enum variables): Update use.
1858 (%define backward compatibility): New test group.
1859 * tests/push.at: Update uses.
1860 * tests/reduce.at: Update uses.
1861 * tests/torture.at: Update uses.
1862
1863 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
1864
1865 Set all front-end %define defaults in one place.
1866 * src/main.c (main): Move lr.keep_unreachable_states default...
1867 * src/reader.c (reader): ... to here.
1868
1869 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1870
1871 Rename lr.default_reductions to lr.default-reductions.
1872 * NEWS (2.5): Here.
1873 * doc/bison.texinfo: Here.
1874 * src/lalr.c (initialize_LA): Here.
1875 * src/print.c (print_reductions): Here.
1876 * src/reader.c (reader): Here.
1877 * src/tables.c (action_row): Here.
1878 * tests/input.at (%define enum variables): Here.
1879 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
1880
1881 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1882
1883 Pacify ./configure --enable-gcc-warnings.
1884 * tests/input.at (Symbols): Prototype yyerror and yylex.
1885
1886 2009-04-21 Akim Demaille <demaille@gostai.com>
1887
1888 tests: check the use of dashes and periods in symbols.
1889 * tests/input.at (Symbol): New test group.
1890
1891 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1892
1893 Document how `%define "var" "value"' is not M4-friendly.
1894 * src/parse-gram.y (variable): In comments here.
1895
1896 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1897
1898 Add copyright updates missed during previous cherry pick.
1899 * src/output.c: Here.
1900 * src/parse-gram.y: Here.
1901 * src/scan-gram.l: Here.
1902
1903 2009-04-20 Akim Demaille <demaille@gostai.com>
1904
1905 variables: accept dashes.
1906 * src/scan-gram.l ({id}): Also accept dashes after the initial
1907 letter.
1908 ({directive}): Use {id}.
1909 * src/parse-gram.y: Comment and formatting changes.
1910 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
1911 symbols.
1912 * src/complain.h, src/complain.c (yacc_at): New.
1913 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
1914 symbol names.
1915 * src/output.c (token_definitions_output): Do not #define token
1916 names with dashes.
1917
1918 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
1919
1920 Clean up recent patches a little.
1921 Reported by Akim Demaille.
1922 * doc/bison.texinfo (Understanding): Fix typos.
1923 * src/print.c (print_reductions): Don't use negated variable.
1924
1925 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
1926
1927 List accepted values for a %define enum variable with an invalid value.
1928 Suggested by Akim Demaille at
1929 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
1930 * data/bison.m4 (_b4_percent_define_check_values): Implement.
1931 * src/muscle_tab.c (muscle_percent_define_check_values): Implement.
1932 * tests/input.at (%define lr.default_reductions invalid values): Merge
1933 into...
1934 (%define enum variables): ... here, and update output.
1935
1936 2009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
1937
1938 Rename "default rule" to "default reduction".
1939 This includes changing variable names in code, changing
1940 comments, and renaming %define lr.default_rules to %define
1941 lr.default_reductions.
1942 * NEWS (2.5): Update IELR documentation.
1943 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c:
1944 Adjust YYDEFACT and yydefact_ documentation.
1945 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
1946 and lr.type documentation. Make some other wording
1947 improvements.
1948 (Glossary): Adjust cross-references and Default Reduction
1949 definition.
1950 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
1951 Remove a confusing comment pointed out by Akim Demaille.
1952 (initialize_LA): Adjust code.
1953 * src/print-xml.c (print_reductions): Adjust code.
1954 * src/print.c (print_reductions): Adjust code.
1955 * src/reader.c (reader): Adjust code.
1956 * src/tables.c (action_row): Adjust code.
1957 (token_actions): Adjust code.
1958 * src/tables.h: Adjust YYDEFACT documentation.
1959 * tests/input.at (%define lr.default_rules invalid values):
1960 Rename test group to...
1961 (%define lr.default_reductions invalid values): ... this, and
1962 update grammar file and expected output.
1963 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
1964 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
1965
1966 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1967
1968 Document %define lr.type and lr.default_rules.
1969 * NEWS (2.5): Add an entry.
1970 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
1971 besides just LALR(1) and GLR(1).
1972 * doc/bison.texinfo (Introduction): Likewise.
1973 (Language and Grammar): Bison is no longer limited to LALR(1)
1974 restrictions.
1975 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
1976 when trying to distinguish from GLR. Talk about LR(1) grammars
1977 rather than LALR(1) grammars.
1978 (Decl Summary): In %define api.push_pull entry, say it applies
1979 to deterministic parsers in C rather than LALR(1) parsers in C.
1980 Add lr.default_rules entry.
1981 Add lr.type entry.
1982 (Mystery Conflicts): Bison is no longer limited to LALR(1)
1983 restrictions.
1984 (Generalized LR Parsing): Same changes as for the previous GLR
1985 section.
1986 (Memory Management): Say deterministic rather than LALR(1).
1987 (Understanding): Correct some bison output.
1988 Index discussion of "accepting state".
1989 Say deterministic rather than LALR(1).
1990 (Bison Options): In --yacc entry, say deterministic rather than
1991 LALR(1).
1992 In --report, --graph, and --xml entries, just don't mention
1993 LALR(1).
1994 (C++ Parsers): Say deterministic rather than LALR(1).
1995 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
1996 (Glossary): Add Accepting State, Consistent State, Default Rule,
1997 and IELR(1) definitions.
1998 In Generalized LR (GLR) definition, make same changes as in
1999 previous GLR sections.
2000 In LALR(1) definition, say Bison uses LALR(1) by default rather
2001 than implying Bison is limited to LALR(1).
2002 (LocalWords): Add IELR.
2003
2004 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2005
2006 Finish implementing %define lr.type.
2007 Its value can be "LALR", "IELR", or "canonical LR".
2008 * lib/timevar.def (TV_IELR_PHASE1): New var.
2009 (TV_IELR_PHASE2): New var.
2010 (TV_IELR_PHASE3): New var.
2011 (TV_IELR_PHASE4): New var.
2012 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
2013 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
2014 Sbitset.h, ielr.h, and ielr.c.
2015 * src/getargs.h, src/getargs.c (enum trace, trace_args,
2016 trace_types): Add trace_ielr.
2017 * src/lalr.h, src/lalr.c (ngotos): Export it.
2018 (F): Rename to...
2019 (goto_follows): ... this, update all uses, and export it.
2020 (set_goto_map): Export it.
2021 (map_goto): Export it.
2022 (compute_lookahead_tokens): Don't free goto_follows yet. Now
2023 handled in ielr.
2024 (initialize_LA): Export it. Move lookback allocation to...
2025 (lalr): ... here because, for canonical LR, initialize_LA must
2026 be invoked but lookback and much of the rest of LALR isn't
2027 needed.
2028 * main.c (main): Instead of lalr, invoke ielr, which invokes
2029 lalr.
2030 * src/reader.c (reader): Default lr.type to "LALR".
2031 Default lr.default_rules to "accepting" if lr.type is "canonical
2032 LR". Leave the default as "all" otherwise.
2033 Check for a valid lr.type value.
2034 * src/state.h, src/state.c (struct state_list): Add state_list
2035 member.
2036 (state_new): Initialize state_list member to NULL.
2037 (state_new_isocore): New function, exported.
2038 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
2039 exercises all values of lr.type.
2040 (GNU AWK Grammar): Rename test group to...
2041 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
2042 AT_TEST_EXISTING_GRAMMAR.
2043 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
2044 (GNU pic Grammar): Rename test group to...
2045 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
2046 AT_TEST_EXISTING_GRAMMAR.
2047 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
2048 all values of lr.type.
2049 (Single State Split): New test groups using AT_TEST_LR_TYPE.
2050 (Lane Split): Likewise.
2051 (Complex Lane Split): Likewise.
2052 (Split During Added Lookahead Propagation): Likewise.
2053
2054 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2055
2056 Add new files for IELR and canonical LR implementation.
2057 * src/AnnotationList.c: New.
2058 * src/AnnotationList.h: New.
2059 * src/InadequacyList.c: New.
2060 * src/InadequacyList.h: New.
2061 * src/Sbitset.c: New.
2062 * src/Sbitset.h: New.
2063 * src/ielr.c: New.
2064 * src/ielr.h: New.
2065
2066 2009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
2067
2068 Implement %define lr.default_rules.
2069 Its value describes the states that are permitted to contain
2070 default rules: "all", "consistent", or "accepting".
2071 * src/reader.c (reader): Default lr.default_rules to "all".
2072 Check for a valid lr.default_rules value.
2073 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
2074 is "accepting", then only mark the accepting state as
2075 consistent.
2076 (initialize_LA): Tell state_lookahead_tokens_count whether
2077 lr.default_rules is "accepting".
2078 * src/tables.c (action_row): If lr.default_rules is not "all",
2079 then disable default rules in inconsistent states.
2080 * src/print.c (print_reductions): Use this opportunity to
2081 perform some assertions about whether lr.default_rules was
2082 obeyed correctly.
2083 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
2084 helps with checking the parser tables for a grammar.
2085 * tests/input.at (%define lr.default_rules invalid values): New
2086 test group.
2087 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
2088 AT_TEST_TABLES_AND_PARSE.
2089 (`no %define lr.default_rules'): New test group generated by
2090 AT_TEST_LR_DEFAULT_RULES.
2091 (`%define lr.default_rules "all"'): Likewise.
2092 (`%define lr.default_rules "consistent"'): Likewise.
2093 (`%define lr.default_rules "accepting"'): Likewise.
2094
2095 2009-04-20 Akim Demaille <demaille@gostai.com>
2096
2097 Consistently refer to Yacc, not YACC.
2098 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
2099
2100 2009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
2101
2102 Pacify make maintainer-check-posix.
2103 * tests/input.at (%define, --define): Move bison command-line
2104 options before grammar file name.
2105
2106 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2107
2108 Document semicolon warnings.
2109 * NEWS (2.5): Here.
2110
2111 2008-12-08 Akim Demaille <demaille@gostai.com>
2112
2113 Fix portability issue in the test suite.
2114 * tests/local.at (AT_MATCHES_CHECK): New.
2115 Based on Perl instead of Sed. Sed has too many portability
2116 pitfalls, not ever Sed is GNU Sed.
2117 * tests/actions.at (Fix user actions without a trailing semicolon):
2118 Use it.
2119
2120 2008-12-07 Di-an Jan <dianj@freeshell.org>
2121
2122 Implement the FIXME that ends an user action with a semicolon
2123 if it seems necessary.
2124 * src/scan-code.l (flex rules section): Flag cpp directive from
2125 any `#' to the first unescaped end-of-line. Semicolon is not
2126 needed after `;', `{', '}', or cpp directives and is needed after
2127 any other token (whitespaces and comments have no effect).
2128 * tests/actions.at (Fix user actions without a trailing semicolon):
2129 New test.
2130 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
2131 to make user actions complete statements.
2132 Adjust column numbers in error messages.
2133 * tests/regression.at (Fix user actions without a trailing semicolon):
2134 Remove. Covered by new test.
2135
2136 2009-04-14 Akim Demaille <demaille@gostai.com>
2137
2138 doc: minor fixes.
2139 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
2140 (Table of Symbols): Remove duplicate entry for %debug.
2141
2142 2009-04-10 Eric Blake <ebb9@byu.net>
2143
2144 submodules: update to latest
2145 * submodules/autoconf: Use latest upstream Autoconf.
2146
2147 2009-04-06 Eric Blake <ebb9@byu.net>
2148
2149 Work around autoconf 2.63b bug in testsuite.
2150 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
2151 autoconf bug related to # in test.
2152
2153 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2154
2155 * NEWS (2.5): Describe new -D/--define feature.
2156
2157 2008-11-10 Akim Demaille <demaille@gostai.com>
2158
2159 --trace=muscles
2160 * src/getargs.h, src/getargs.c (trace_muscle): New.
2161 (trace_types, trace_args): Support it.
2162 * src/output.c (output_skeleton): Use it.
2163
2164 2008-11-10 Akim Demaille <demaille@gostai.com>
2165
2166 muscles_output.
2167 * src/output.c (muscles_output): New, extracted from...
2168 (output_skeleton): here.
2169 Adjust.
2170
2171 2008-11-21 Akim Demaille <demaille@gostai.com>
2172
2173 Display the changes in cross-options.texi.
2174 * build-aux/cross-options.pl ($sep): New, to separate items.
2175 * doc/Makefile.am ($(srcdir)/cross-options.texi): Use diff to display
2176 the changes.
2177
2178 2008-11-20 Di-an Jan <dianj@freeshell.org>
2179
2180 Improves options in the manual.
2181 * doc/bison.texinfo (-g, -x): Add space before argument.
2182 (Option Cross Key): Implement FIXME: listing directives also.
2183 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
2184 (Short Option): Special case -d. Put arguments inside @option.
2185 (Bison Directive): Add column, automatically extracted from
2186 src/scan-gram.l (actual name passed as the first argument)
2187 with special case for %define.
2188 * doc/Makefile.am (doc/cross-options.texi): Pass src/scan-gram.l
2189 to build-aux/cross-options.pl.
2190 * src/getargs.c (usage): Document limitations of cross-options.pl.
2191 * src/scan-gram.l: Likewise.
2192
2193 2009-02-25 Akim Demaille <demaille@gostai.com>
2194
2195 Copyright years.
2196 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
2197
2198 2008-12-08 Akim Demaille <demaille@gostai.com>
2199
2200 Install autoconf as a submodule to get m4sugar.
2201 * .gitmodules: Add submodules/autoconf.
2202 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
2203 submodules/autoconf.
2204
2205 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2206
2207 Simplify last patch slightly.
2208 * src/getargs.c (getargs): Here.
2209
2210 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2211
2212 Fix last warning from --enable-gcc-warnings.
2213 * src/getargs.c (getargs): Don't assign const address to non-const
2214 pointer.
2215
2216 2008-11-17 Di-an Jan <dianj@freeshell.org>
2217
2218 Handle --enable-gcc-warnings.
2219 * src/getargs.c (command_line_location): Set parameters to void.
2220
2221 2008-11-11 Akim Demaille <demaille@gostai.com>
2222
2223 AT_FULL_COMPILE.
2224 * tests/actions.at, tests/regression.at: Use it.
2225
2226 2008-11-07 Akim Demaille <demaille@gostai.com>
2227
2228 Pass command line location to skeleton_arg and language_argmatch.
2229 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
2230 The location argument is now mandatory.
2231 Adjust all dependencies.
2232 (getargs): Use command_line_location.
2233
2234 2008-11-07 Akim Demaille <demaille@gostai.com>
2235
2236 -D, --define.
2237 * src/getargs.c (usage): Document -D.
2238 Fix help string for --locations.
2239 (command_line_location): New.
2240 (short_options, long_options, getargs): Support -D, --define.
2241 (getargs): Move -d support at the right place.
2242 * doc/bison.texinfo (Bison Options): Update.
2243 * tests/input.at (%define, --define): New.
2244
2245 2008-11-07 Akim Demaille <demaille@gostai.com>
2246
2247 Initialize the muscle table before parsing the command line.
2248 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
2249 (getargs): Define file_name.
2250 * src/main.c (main): Initialize muscle_tab before calling
2251 getargs.
2252 * src/muscle_tab.c (muscle_init): No longer define file_name, as
2253 its value is not available yet.
2254
2255 2008-11-09 Akim Demaille <demaille@gostai.com>
2256
2257 Require the generation of parse-gram.output.
2258 * src/Makefile.am (YACC): Pass --report=all.
2259
2260 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2261
2262 * NEWS (2.5): New stub.
2263
2264 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2265
2266 Fix options documentation.
2267 * build-aux/cross-options.pl: As in --help output, write optional
2268 arguments as [=ARG] not =[ARG].
2269 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
2270
2271 2008-11-07 Akim Demaille <demaille@gostai.com>
2272
2273 Fix --help.
2274 * src/getargs.c (usage): Fix help string for -W.
2275
2276 2008-11-07 Akim Demaille <demaille@gostai.com>
2277
2278 Handle more general types of option arguments.
2279 * build-aux/cross-options.pl: The argument ends at the first
2280 space, not the first non-symbol character.
2281 Use @var for each word appearing the argument description.
2282
2283 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2284
2285 Remove spurious initial empty lines.
2286 * data/location.cc: End the @output lines with an @.
2287
2288 2008-11-04 Akim Demaille <demaille@gostai.com>
2289
2290 Remove spurious initial empty lines.
2291 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
2292 * data/yacc.c: End the @output lines with an @.
2293
2294 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2295
2296 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
2297 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
2298 requirements for a correct m4 are stricter.
2299 * m4/m4.m4: Replace with Autoconf 2.63's m4/m4.m4.
2300 * configure.ac: Update to use AC_PROG_GNU_M4.
2301 Reported by Eric Blake.
2302
2303 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2304
2305 Help with updating web manual.
2306 * HACKING: Incorporate instructions from gnulib/doc/README.
2307 * bootstrap.conf (gnulib_modules): Add gendocs.
2308
2309 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2310
2311 Fix strange %define locations for default values.
2312 Reported by Akim Demaille at
2313 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
2314 and discussed again starting at
2315 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
2316 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
2317 because location information is bogus.
2318 Use angle brackets to delimit fake file name because square brackets
2319 look like underexpanded m4. Choose a better fake file name.
2320 Use negative line numbers.
2321 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
2322 * src/location.c (location_print): If line for a boundary is negative,
2323 only print that boundary's file name.
2324 * src/location.h: Document that.
2325 * tests/skeletons.at (%define Boolean variables: invalid skeleton
2326 defaults): Update output.
2327
2328 2008-11-07 Akim Demaille <demaille@gostai.com>
2329
2330 Locations without columns for command line arguments.
2331 * src/location.c (location_print): Don't display negative columns.
2332 * src/location.h: Document this.
2333
2334 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
2335
2336 Add reminder about uploading public key to keys.gnupg.net.
2337 * HACKING (Release Procedure): Here.
2338
2339 2009-03-31 Akim Demaille <demaille@gostai.com>
2340
2341 bootstrap: --help to stdout.
2342 * bootstrap (usage): Don't send --help to stderr.
2343 Use a here doc instead of a long string.
2344
2345 2009-03-31 Akim Demaille <demaille@gostai.com>
2346
2347 bootstrap: README-hacking no longer exists
2348 * bootstrap (checkout_only_file): Set to HACKING.
2349
2350 2009-03-26 Akim Demaille <demaille@gostai.com>
2351
2352 doc: merge HACKING and README-hacking.
2353 Two files is confusing.
2354 Reported by Alexandre Duret-Lutz.
2355
2356 * README-hacking: Merge into...
2357 * HACKING (Working from the repository): here.
2358
2359 2009-03-26 Akim Demaille <demaille@gostai.com>
2360
2361 doc: update README-hacking.
2362 * README-hacking: We now use git and git submodules.
2363 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
2364
2365 2009-03-26 Akim Demaille <demaille@gostai.com>
2366
2367 lalr1.cc: avoid GCC 4.3 warnings.
2368 GCC 4.3 now warns about "a || b && c" and asks for explicit
2369 parentheses.
2370 Reported by Alexandre Duret-Lutz.
2371 * data/location.cc: Update copyright years.
2372 (Position::operator==): Use parens to make precedence explicit.
2373 Compare lines and columns first, as they are more likely to be
2374 different, and they are faster to compare.
2375
2376 2009-03-26 Akim Demaille <demaille@gostai.com>
2377
2378 gnulib: update.
2379 * gnulib: Update to latest.
2380 * lib/Makefile.am (AM_CPPFLAGS): It is now defined by gnulib, so
2381 use +=.
2382
2383 2009-01-08 Akim Demaille <demaille@gostai.com>
2384
2385 Fix grep portability issues.
2386 Grep on Solaris does not support -q.
2387 Reported by Summum Bonum.
2388
2389 * NEWS: Add a stub for 2.4.2.
2390 * THANKS: Add Summum Bonum.
2391 * tests/atlocal.in (EGREP): New.
2392 (CC, CXX, XSLTPROC): Make it possible to override them via
2393 envvars.
2394 * tests/java.at: Use $EGREP instead of egrep.
2395 Use AT_CHECK's ignore instead of grep's -q.
2396
2397 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
2398
2399 Version 2.4.1.
2400 * NEWS: Set version and date.
2401 * lib/Makefile.am: Update copyright year.
2402 * tests/atlocal.in: Update copyright year.
2403
2404 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
2405
2406 Semicolon feature removal is not about future language support.
2407 * NEWS: The semicolon feature is no longer active for newer languages,
2408 so don't claim that it causes trouble for them.
2409
2410 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
2411
2412 * gnulib: Update submodule to HEAD.
2413
2414 2008-12-09 Akim Demaille <demaille@gostai.com>
2415
2416 Update data/README.
2417 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
2418
2419 2008-12-05 Eric Blake <ebb9@byu.net>
2420
2421 Build testsuite with newer autoconf.
2422 * tests/output.at (m4_expand): Don't override in newer autoconf,
2423 where the underlying implementation changed.
2424 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
2425 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
2426 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
2427 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
2428 since some of them contain unbalanced ')'.
2429
2430 2008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
2431
2432 * NEWS: Clarify a little.
2433
2434 2008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
2435
2436 * NEWS: Update for recent changes.
2437
2438 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
2439
2440 Fix unexpanded macros in GLR defines file.
2441 Reported by Csaba Raduly at
2442 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
2443 * THANKS (Csaba Raduly): Add.
2444 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
2445 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
2446 lexer in a separate module that includes the defines file.
2447 (AT_CHECK_CALC): Use AT_FULL_COMPILE and request compilation of lexer
2448 source.
2449 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
2450 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
2451 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
2452 (AT_DATA_SOURCE_PROLOGUE): New.
2453 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
2454 (AT_DATA_SOURCE): New.
2455 (AT_FULL_COMPILE): New, copied from master branch and extended to
2456 support an additional source file.
2457
2458 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2459
2460 Don't let maintainer-*-check targets force a version update.
2461 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
2462 handled.
2463
2464 2008-11-17 Di-an Jan <dianj@freeshell.org>
2465
2466 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
2467 Align menus. Adjust word wrapping. Use node names for menu names.
2468 (Examples): Don't abbreviate node names.
2469 (LocalWords): Remove abbreviations.
2470 (Copying): Make description a sentence.
2471 (Java Action Features): Remove period to match the rest of menu.
2472
2473 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
2474
2475 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
2476 * configure.ac: Adjust usage.
2477 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2478 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2479 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
2480
2481 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2482
2483 Don't add a semicolon to actions for %skeleton or %language.
2484 It breaks Java test cases as reported by Akim Demaille.
2485 * src/scan-code.l: Implement.
2486
2487 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2488
2489 Clean up %skeleton and %language priority implementation.
2490 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
2491 remove static qualifier because others will soon need to see it.
2492 (language_prio): Likewise.
2493 (getargs): Use command_line_prio rather than 0.
2494 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
2495 enum fields.
2496 (skeleton_prio): Extern it.
2497 (language_prio): Extern it.
2498 * src/parse-gram.y: Use grammar_prio rather than 1.
2499
2500 2008-11-04 Akim Demaille <demaille@gostai.com>
2501
2502 * NEWS: Mention the trailing semicolon in action.
2503
2504 2008-11-04 Akim Demaille <demaille@gostai.com>
2505
2506 Reformat NEWS.
2507 * NEWS: Use more outline-mode markup.
2508 Suggested by Jim Meyering.
2509
2510 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
2511
2512 Fix user actions without a trailing semicolon.
2513 Reported by Sergei Steshenko at
2514 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
2515 * THANKS (Sergei Steshenko): Add.
2516 * src/scan-code.l (SC_RULE_ACTION): Fix it.
2517 * tests/regression.at (Fix user actions without a trailing semicolon):
2518 New test case.
2519
2520 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2521
2522 Initiate further development.
2523 * NEWS: Create an empty section for new entries.
2524 * gnulib: Update submodule to HEAD.
2525
2526 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2527
2528 * NEWS: Version 2.4.
2529
2530 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2531
2532 Prepare for next release.
2533 * NEWS: Briefly mention changes since 2.3b.
2534 * README: Say GNU m4 1.4.6, which we've been requiring in release
2535 announcements already, not 1.4.3, which breaks the build.
2536
2537 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2538
2539 Say %language is experimental.
2540 We're thinking of extending it's effect on output file naming. See the
2541 thread at
2542 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
2543 * NEWS: Say it's experimental.
2544 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
2545 recommend it over %skeleton for now.
2546 (Bison Options): Likewise.
2547 (C++ Bison Interface): Use %skeleton not %language.
2548 (Calc++ Parser): Use %skeleton not %language.
2549 * src/getargs.c (usage): Say it's experimental.
2550
2551 2008-11-01 Di-an Jan <dianj@freeshell.org>
2552 Paolo Bonzini <bonzini@gnu.org>
2553
2554 Support all Java parser class modifiers.
2555 * data/java.m4 (b4_percent_define_get3): New.
2556 (b4_final_if, b4_strictfp_if): New.
2557 * data/lalr1.java (final, strictfp, extends, implements): Support.
2558 * doc/bison.texinfo (final, strictfp, extends, implements): Add
2559 documentation.
2560 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
2561 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
2562 (AT_CHECK_JAVA_GREP): New.
2563 (Java parser class modifiers): New test.
2564 (Java parser class extends and implements): New test.
2565
2566 Model exception propagation better with throws and lex_throws.
2567 * data/java.m4 (b4_list2): New.
2568 (throws): Change default.
2569 * data/lalr1.java (yyaction): Add throws.
2570 (parse): Add lex_throws in addition to throws.
2571 * doc/bison.texinfo (throws, lex_throws): Add documentation.
2572 * tests/java.at (Java throws specifications): New test.
2573
2574 Improve documentation for Java parsers.
2575 * doc/bison.texinfo (Java Parsers): Add subsections.
2576 Don't quote first argument of %define.
2577 (Java Bison Interface): Document output files. Move documentation
2578 of parser class and merge into Java Parser Interface. Document
2579 features that error out. Document directives with no effect.
2580 Move note about Javadoc higher.
2581 (Java Semantic Values): Explicitly mention stype.
2582 Document that generic types cannot be used.
2583 (Java Location Values): Use @deftypeivar. Document constructors.
2584 Correct return value for toString.
2585 (Java Parser Interface): List undocumented constants/fields.
2586 Move documentation of fields added by %parse-param closer to list
2587 of members. Document that token names are added as fields.
2588 Document constructors accurately. Remove error method.
2589 (Java Scanner Interface): Move note on %pure-parser to Java Bison
2590 Interface. Describe %code lexer and yylex accutately.
2591 Remove documentation that does not match the code.
2592 (Java Action Features): New.
2593 (Java Differences): Add reference. Add item on semantic values.
2594 Add note about @{ ... @}. Clarify %% epilogue placement.
2595 (Java Declarations Summary): New.
2596
2597 Fix Java skeleton.
2598 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
2599 (b4_remove_comma): Quote test argument.
2600 (b4_identification): Remove "bison" field.
2601 * tests/java.at (Java parser class and package names): New test.
2602 (Java %parse-param and %lex-param): New test.
2603 (Java stype, position_class and location_class): New test.
2604
2605 2008-10-31 Di-an Jan <dianj@freeshell.org>
2606
2607 * data/lalr1.jave: Update copyright years.
2608 (YYParser): Correct name of "generated from" file in Javadoc:
2609 use b4_file_name instead of @ofile@.
2610 (Location constructor): Correct Javadoc parameter name.
2611 (yylloc): Add missing opening m4 quote after b4_location_if.
2612 This removes a stray [ in the Javadoc of Lexer.getStartPos.
2613 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
2614 (YYParser constructor): Correct Javadoc parameter name.
2615
2616 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
2617
2618 Always put auxiliary code files in the same dir as other output files.
2619 * src/files.c (compute_file_name_parts): When the user specifies
2620 --output but not --file-prefix, extract the directory prefix from the
2621 file prefix not from the grammar file name. This affects the location
2622 of files like location.hh generated by the C++ skeleton. The includes
2623 in the other output files require this fix.
2624 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
2625 for expected output files.
2626 (Output files): Add a test for the above.
2627
2628 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
2629
2630 * gnulib: Update submodule to HEAD.
2631
2632 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
2633
2634 Update copyright year.
2635 * src/files.c: Here.
2636
2637 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
2638
2639 Don't overwrite the input file.
2640 * src/files.c (output_file_name_check): Fatal error if using input file
2641 for output.
2642 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
2643 argument.
2644 (Conflicting output files): Add test.
2645
2646 2008-10-28 Akim Demaille <demaille@gostai.com>
2647
2648 Space changes.
2649 * data/lalr1.cc: Formatting changes.
2650
2651 2008-10-28 Akim Demaille <demaille@gostai.com>
2652
2653 Don't define debugging functions when !YYDEBUG.
2654 * data/lalr1.cc (debug_stream, set_debug_stream)
2655 (debug_level_type, debug_level, set_debug_level): Don't
2656 declare them when YYDEBUG is not defined.
2657 The implementation are already YYDEBUG-aware.
2658
2659 2008-10-28 Akim Demaille <demaille@gostai.com>
2660
2661 Prefer "continue" for empty loop bodies.
2662 * etc/bench.pl.in: Use "continue" instead of {}.
2663
2664 2008-10-28 Akim Demaille <demaille@gostai.com>
2665
2666 Space and comments changes.
2667 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
2668 * data/c.m4, data/lalr1.cc: Space changes.
2669
2670 2008-10-28 Akim Demaille <demaille@gostai.com>
2671
2672 Make gnulib a submodule.
2673 * gnulib: New.
2674 * .gitmodules (gnulib): New.
2675
2676 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
2677
2678 Fix yyerror_range for user-defined location type in C++. Reported by
2679 Georg Sauthoff at
2680 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
2681 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
2682 * THANKS (Georg Sauthoff): Add.
2683
2684 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
2685
2686 Update several administrative files mainly to facilitate releasing.
2687 * HACKING (Administrivia): Make the git-merge-changelog notes more
2688 helpful.
2689 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
2690 (Release Procedure): Update for git and add numerous details that were
2691 previously missing.
2692 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
2693 * maint.mk (announcement): Don't list bison as a bootstrap tool so
2694 that announcements don't claim we bootstrapped with whatever bison
2695 happened to be in PATH. Add flex as a bootstrap tool.
2696 * Makefile.maint: Remove, previously replaced by maint.mk.
2697 * Makefile.cfg: Remove, and migrate settings to...
2698 * cfg.mk: ... here for the sake of `make announcement'.
2699 * bootstrap.conf (gnulib_modules): Add announce-gen.
2700 * README: Say GNU Bison instead of just Bison. Suggested by Karl
2701 Berry.
2702
2703 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
2704
2705 Small but important bugfixes for the Java skeleton.
2706 * data/lalr1.java (yyerror): Change Location to b4_location_type.
2707 (yy_symbol_print): Call toString on yyvaluep.
2708
2709 2008-08-29 Akim Demaille <demaille@gostai.com>
2710
2711 Clarify UPDATED use.
2712 * doc/bison.texinfo: It refers to the last edition of this file,
2713 not to the release date of Bison.
2714 Reported by Joel E. Denny.
2715
2716 2008-08-29 Akim Demaille <demaille@gostai.com>
2717
2718 * README: Update FAQ pointer.
2719 Reported by Joel E. Denny.
2720
2721 2008-08-27 Eric Blake <ebb9@byu.net>
2722
2723 Resync m4sugar from autoconf.
2724 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
2725 (m4_init): Adjust to latest m4.git changes.
2726 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
2727 effects.
2728 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
2729 (_m4_list_cmp): Reduce side effects.
2730
2731 2008-08-27 Akim Demaille <demaille@gostai.com>
2732
2733 Check yyerrok in calc.at.
2734 * tests/calc.at (calc.y): Use yyerrok on "( error )".
2735 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
2736 expected.
2737
2738 2008-08-27 Akim Demaille <demaille@gostai.com>
2739
2740 Support yyerrok in lalr1.cc.
2741 YYBACKUP is still to import back into lalr1.cc.
2742 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
2743
2744 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
2745
2746 For maintainer-check*, don't recompile for a $(VERSION) update.
2747 * cfg.mk: New file.
2748 (_is-dist-target): Override the one in GNUmakefile.
2749 * Makefile.am (EXTRA_DIST): Add cfg.mk.
2750
2751 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
2752
2753 Update for recent change to gnulib.
2754 * src/parse-gram.y: Don't include strverscmp.h. It comes from
2755 string.h now.
2756
2757 2008-08-15 Eric Blake <ebb9@byu.net>
2758
2759 Remaining m4sugar merge from autoconf.
2760 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
2761 * data/m4sugar/foreach.m4: New file, copied from autoconf.
2762 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
2763 * src/output.c (output_skeleton): Tell m4 how to find it.
2764
2765 Partial m4sugar merge from autoconf: m4_map.
2766 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
2767 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
2768 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
2769 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
2770 for empty list.
2771 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
2772 Likewise.
2773 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
2774 declares it.
2775
2776 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
2777
2778 Keep .version and PACKAGE_VERSION in sync.
2779 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
2780 dependency, and add comments justifying this in more detail. Discussed
2781 starting at
2782 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
2783
2784 2008-08-06 Eric Blake <ebb9@byu.net>
2785
2786 Partial m4sugar merge from autoconf: m4_shiftn.
2787 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
2788 (m4_shift2, m4_shift3): New macros.
2789 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
2790 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
2791 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
2792 * data/java.m4 (b4_remove_comma): Likewise.
2793
2794 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
2795 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
2796 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
2797 (m4_init): Consolidate wrapped text into single m4_wrap.
2798 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
2799 in wrapped text.
2800
2801 2008-08-05 Eric Blake <ebb9@byu.net>
2802
2803 Partial m4sugar merge from autoconf: builtins, version.m4.
2804 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
2805 (m4_prepend): Remove, as it is unused and inherently quadratic,
2806 whereas m4_append is linear in newer m4.
2807 (m4_mkstemp): New builtin.
2808 (m4_symbols): Make rename conditional.
2809 (m4_version_prereq): Ensure fatal error if used in bison, which
2810 intentionally lacks version.m4.
2811
2812 Fix comments in m4sugar.
2813 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
2814
2815 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
2816
2817 Update for recent .gitignore fix in Gnulib.
2818 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
2819 anchored .gitignore entries.
2820
2821 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
2822
2823 Set gnu or gnits strictness.
2824 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
2825 development and gnits strictness for releases. Based on Eric Blake's
2826 suggestion at
2827 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
2828
2829 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
2830
2831 * NEWS: Clarify documentation of %language.
2832
2833 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
2834
2835 Support usage of git-merge-changelog.
2836 * .gitattributes: New.
2837 * HACKING: Document usage of git-merge-changelog.
2838 * bootstrap: Install git-merge-changelog entries in .git/config
2839 if appropriate.
2840
2841 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
2842
2843 Remove remaining dependence on CVS Id keyword.
2844 * ChangeLog: For the sake of people still using CVS, don't use dollars
2845 when mentioning Id.
2846 * data/xslt/bison.xsl: Remove Id from header comments, where it was
2847 unusual anyway.
2848 * data/xslt/xml2dot.xsl: Likewise.
2849 * data/xslt/xml2text.xsl: Likewise.
2850 * data/xslt/xml2xhtml.xsl: Likewise.
2851 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
2852 * doc/Makefile.am (neutralize): Remove, no longer needed.
2853 (.x.1): Don't use neutralize.
2854 (edit): Don't substitute for ID.
2855 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
2856
2857 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
2858
2859 Fix dependence on computed configure variables.
2860 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
2861 $(top_srcdir)/configure.ac so that changes to computed variables, such
2862 as PACKAGE_VERSION, are seen.
2863 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
2864
2865 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
2866
2867 Update copyright dates for recent changes.
2868 * Makefile.am: Here.
2869 * src/Makefile.am: Here.
2870 * src/reduce.c: Here.
2871 * tests/reduce.at: Here.
2872
2873 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
2874
2875 Use git-version-gen for version names between releases.
2876 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
2877 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
2878 * .prev-version: New.
2879 * .version.in: Remove.
2880 * ChangeLog: Remove the Id previously used for capturing the CVS
2881 revision.
2882 * GNUmakefile: Remove, now copied from Gnulib.
2883 * Makefile.am: Add code suggested by comments in
2884 build-aux/git-version-gen.
2885 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
2886 .prev-version, and .version.
2887 * NEWS (2.3b+): Rename to...
2888 (?.?): ... this because we're dropping the "+" version naming scheme,
2889 but, in general, we still can't be sure of our next release name.
2890 * bootstrap: Add a quick hack to remove from .gitignore the
2891 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
2892 entry. This should really be fixed in gnulib instead.
2893 * bootstrap.conf (gnulib_modules): Add gnumakefile.
2894 * configure.ac (AC_INIT): Set version name by invoking
2895 build-aux/git-version-gen.
2896 (AC_CONFIG_FILES): Remove .version, now generated by
2897 build-aux/git-version-gen.
2898 * maint.mk: New, copied from coreutils.
2899 * doc/.cvsignore (bison.1): Add.
2900 * doc/.gitignore (/bison.1): Add.
2901 * doc/bison.1: Remove, generated.
2902 * src/.cvsignore (revision.c): Remove.
2903 * src/.gitignore (/revision.c): Remove.
2904 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
2905 (BUILT_SOURCES): Remove revision.c.
2906 (revision.c): Remove.
2907 * src/getargs.c (version): Don't print revision after the VERSION.
2908 * src/revision.h: Remove.
2909
2910 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
2911
2912 Fix untranslatable composition of sentences. Reported by Goran
2913 Uddeborg at
2914 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
2915 * THANKS (Goran Uddeborg): Add.
2916 * src/reduce.c (reduce_print): Report the number of nonterminals and
2917 rules useless in the grammar in separate sentences.
2918 * tests/reduce.at (Useless Rules): Update output.
2919 (Reduced Automaton): Likewise.
2920 (Underivable Rules): Likewise.
2921 (Empty Language): Likewise.
2922
2923 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2924
2925 Fix some .gitignore and .cvsignore problems.
2926 * bootstrap (insert_sorted_if_absent): Replace all uses with...
2927 (insert_vc_ignore): ... this new function, which prepends `/' to all
2928 .gitignore entries before passing them to insert_sorted_if_absent.
2929 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
2930 .cvsignore files are maintained even though Bison developers run
2931 bootstrap while using Git.
2932 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
2933 unneeded by Bison.
2934 (gnulib): Add.
2935 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
2936 unneeded. Reported by Eric Blake.
2937 * lib/.gitignore (/*~): Add.
2938 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
2939 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
2940 Blake.
2941 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
2942
2943 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2944
2945 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
2946 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
2947 * bootstrap.conf (gnulib_modules): Add unsetenv.
2948 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
2949 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
2950 (/setenv.m4): Add.
2951 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
2952 the first argument because it may become position-dependent, and unset
2953 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
2954 Add comments explaining these issues in more detail.
2955
2956 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
2957
2958 Add .gitignore everywhere based on .cvsignore.
2959 * .gitignore: New.
2960 * build-aux/.gitignore: New.
2961 * data/.gitignore: New.
2962 * doc/.gitignore: New.
2963 * etc/.gitignore: New.
2964 * examples/.gitignore: New.
2965 * examples/calc++/.gitignore: New.
2966 * lib/.gitignore: New.
2967 * m4/.gitignore: New.
2968 * po/.gitignore: New.
2969 * runtime-po/.gitignore: New.
2970 * src/.gitignore: New.
2971 * tests/.gitignore: New.
2972
2973 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2974
2975 * NEWS (2.3b+): New section, empty for now.
2976 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
2977
2978 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2979
2980 * NEWS (2.3b): Update release date since there has been a delay in
2981 getting the announcements and tarballs out.
2982
2983 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
2984
2985 * NEWS: Version 2.3b.
2986 * configure.ac (AC_INIT): Likewise.
2987 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
2988
2989 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
2990
2991 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
2992 been doing it for years.
2993 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
2994 (Release Procedure): Add FIXME about make alpha being unmaintained.
2995
2996 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
2997
2998 * data/yacc.c: Reformat m4 a little for readability.
2999 * src/lalr.c (build_relations): Correct comment.
3000
3001 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3002
3003 DJGPP specific issue.
3004 * djgpp/config.sed: Fixes required to run configure scripts generated
3005 by autoconf 2.62.
3006
3007 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
3008
3009 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
3010 coordinator@translationproject.org.
3011
3012 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3013
3014 * THANKS: Add Eric Blake.
3015
3016 2008-04-23 Eric Blake <ebb9@byu.net>
3017
3018 Revert prior patch, by working around autoconf regression.
3019 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
3020 ("Output file name: ("): Uncomment test.
3021 ("Output file name: )"): Likewise.
3022 Based on an idea from Noah Misch.
3023
3024 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3025
3026 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
3027 2.61. Reported by Juan Manuel Guerrero at
3028 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
3029 * tests/output.at ("Output file name: ("): Comment out test case for
3030 now.
3031 ("Output file name: )"): Likewise.
3032
3033 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3034
3035 * GNUmakefile: Update git-version-gen invocation so make dist
3036 succeeds.
3037
3038 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3039
3040 Update to the current gnulib CVS repository, and fix trigraph handling
3041 in Bison.
3042 * bootstrap: Update gnulib CVS repository URL.
3043 (symlink_to_dir): Encapsulate the code that guarantees the destination
3044 directory exists into...
3045 (check_dst_dir): ... this new function, and...
3046 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
3047 fail when copying files into lib/uniwidth/.
3048 * src/output.c (prepare_symbols): When writing yytname muscles, where
3049 symbol names will be encoded in C-string literals, tell quotearg to
3050 escape trigraphs. This used to be the default in gnulib.
3051 * tests/regression.at (Token definitions): Because of the change in
3052 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
3053 escapes trigraphs in symbol names. Thus, yytname no longer has
3054 trigraphs unnecessarily doubly escaped. Update test case output.
3055 Extend test case to be sure Bison's own error messages will no longer
3056 have trigraphs in symbol names unnecessarily escaped once.
3057
3058 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
3059
3060 Fix make dist infinite loop reported by Juan Manuel Guerrero at
3061 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
3062 * .cvsignore: Add .version.
3063 * .version.in: New.
3064 * bootstrap.conf (gnulib_modules): Add git-version-gen.
3065 * configure.ac (AC_CONFIG_FILES): Add .version.
3066 * build-aux/.cvsignore: Add git-version-gen.
3067
3068 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
3069
3070 * NEWS (2.3a+): Mention that -g now takes an argument.
3071 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
3072 consistency. Update the -g and -x entries now that they take
3073 arguments. Use brackets to indicate optional arguments.
3074 * src/getargs.c (usage): Explain the relationship between arguments of
3075 long and short options more completely. Document --defines and -d
3076 separately since the former takes an argument but, for POSIX Yacc, the
3077 latter does not.
3078 (short_options): Let -W take an optional argument like --warnings.
3079 (getargs): Sort cases.
3080
3081 2008-02-28 Akim Demaille <demaille@gostai.com>
3082
3083 * doc/bison.texinfo: Fix a few typos.
3084
3085 2008-02-28 Akim Demaille <akim@epita.fr>
3086
3087 * doc/bison.texinfo (Bison Options): Document -W.
3088 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
3089
3090 2008-02-28 Akim Demaille <akim@epita.fr>
3091
3092 * src/getargs.c (short_options): Split and sort for readability.
3093 -g and -x take optional arguments, just like their long options.
3094 * build-aux/cross-options.pl: Use /x to make the regexp easier to
3095 understand.
3096 Fix the handling of $opt which resulted in all the argument to be
3097 considered as optional.
3098
3099 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
3100
3101 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
3102 say its interface is experimental.
3103 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
3104 Java.
3105 (Bison Options): In the -L and --language entry, mention Java.
3106 (Java Bison Interface): Say the interface is experimental.
3107 * src/getargs.c (usage): Mention -L and --language.
3108
3109 * NEWS (2.3a+): Say the push parsing interface is experimental.
3110 * doc/bison.texinfo (Push Decl): Likewise.
3111 (Decl Summary): Likewise in the "%define api.push_pull" entry.
3112 (Push Parser Function): Likewise.
3113 (Pull Parser Function): Likewise.
3114 (Parser Create Function): Likewise.
3115 (Parser Delete Function): Likewise.
3116 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
3117 yypull_parse, and yypush_parse entries.
3118
3119 * NEWS (2.3a+): Mention XML support, and say the schema is
3120 experimental.
3121 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
3122 * src/getargs.c (usage): Say the XML schema is experimental.
3123
3124 * NEWS (2.3a+): Say option instead of flag.
3125
3126 2008-02-21 Wojciech Polak <polak@gnu.org>
3127
3128 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
3129 text.
3130
3131 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
3132
3133 Fix impure push parser compile error reported by Bob Rossi at
3134 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
3135 * data/yacc.c: Clean up whitespace in the output a little.
3136 (yypstate_allocated): Define for impure push parsers regardless of
3137 whether the pull interface is also requested.
3138 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
3139 check impure push parsers without the pull interface.
3140
3141 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
3142 yyerror takes arguments specified by %parse-param while yypstate_new
3143 does not.
3144 * doc/bison.texinfo (Parser Create Function): Document that
3145 yypstate_new returns 0 for multiple impure parser instances.
3146 * tests/push.at (Push Parsing: Multiple impure instances): Update
3147 expected stderr output.
3148
3149 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
3150
3151 * runtime-po/POTFILES.in (push.c): Remove.
3152
3153 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3154
3155 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
3156 * data/push.c: Rename to...
3157 * data/yacc.c: ... this, overwriting it.
3158 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
3159 `%push-pull-parser' -> `%define api.push_pull "both"'.
3160 Remove old yacc.c tests, and update push.c tests to yacc.c.
3161
3162 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3163
3164 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
3165 `"%code top" blocks' instead of `%code "top" blocks'.
3166 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
3167 Clean up whitespace in the output a little.
3168
3169 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3170
3171 Fix documentation problems reported by Tim Josling at
3172 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
3173 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
3174 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
3175 integers. Explain the effect of literal string aliases on error
3176 messages. Copy token 0 documentation from the C++ skeleton
3177 documentation.
3178
3179 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3180
3181 Accept a token number in a %left, %right, or %nonassoc for POSIX
3182 conformance. Reported by Tim Josling at
3183 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
3184 * NEWS (2.3a+): Mention.
3185 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
3186 and code numbers are treated by precedence declarations.
3187 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
3188 of symbols.1.
3189 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
3190 of symbol.
3191 (symbol.prec): New, just like symbol but allows INT.
3192 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
3193 longer holds.
3194 * tests/regression.at (Token number in precedence declaration): New
3195 test case.
3196
3197 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3198
3199 DJGPP specific issues.
3200 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
3201 be changed. Copyright timestamp adjusted.
3202 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
3203 be changed. Copyright timestamp adjusted.
3204 * djgpp/config.site: Copyright timestamp adjusted.
3205 * djgpp/config_h.sed: Copyright timestamp adjusted.
3206 * djgpp/djunpack.bat: Copyright timestamp adjusted.
3207 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
3208 filename translation list.
3209 * djgpp/subpipe.c (init_subpipe): Check the environment variables
3210 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
3211 files shall be created. Before trying to use the temp dir where the
3212 environment variable points to check that the dir really exists. If
3213 not default to the cwd as temp dir. Copyright timestamp adjusted.
3214 * djgpp/subpipe.h: Copyright timestamp adjusted.
3215 * djgpp/testsuite.sed: Copyright timestamp adjusted.
3216
3217 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
3218
3219 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
3220
3221 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
3222
3223 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
3224 Problem reported by Claudio Saavedra in
3225 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
3226
3227 2008-01-05 Wojciech Polak <polak@gnu.org>
3228
3229 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
3230 document's title with the input grammar file name.
3231
3232 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
3233
3234 Automate regression testing of the XML/XSLT implementation. Discussed
3235 starting at
3236 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
3237 * configure.ac (XSLTPROC): New substitution.
3238 * Makefile.am (maintainer-xml-check): New phony target invoking...
3239 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
3240 invoking make maintainer-check with BISON_TEST_XML=1.
3241 * tests/atlocal.in (XSLTPROC): New.
3242 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
3243 not to report reachable memory when Bison is expected to have a
3244 non-zero exit status and (2) to compare XML/XSLT output with --graph
3245 and --report=all output for every working grammar when
3246 BISON_TEST_XML=1.
3247 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
3248 (AT_BISON_CHECK_XML): New.
3249 (AT_QUELL_VALGRIND): New.
3250 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
3251 (AT_CHECK): ... don't redefine this since this was the old way to
3252 quell Valgrind.
3253 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
3254 AT_BISON_CHECK invocations.
3255 * tests/c++.at: Likewise.
3256 * tests/calc.at: Likewise.
3257 * tests/conflicts.at: Likewise.
3258 * tests/cxx-type.at: Likewise.
3259 * tests/existing.at: Likewise.
3260 * tests/glr-regression.at: Likewise.
3261 * tests/headers.at: Likewise.
3262 * tests/input.at: Likewise.
3263 * tests/java.at: Likewise.
3264 * tests/output.at: Likewise.
3265 * tests/push.at: Likewise.
3266 * tests/reduce.at: Likewise.
3267 * tests/regression.at: Likewise.
3268 * tests/sets.at: Likewise.
3269 * tests/skeletons.at: Likewise.
3270 * tests/synclines.at: Likewise.
3271 * tests/torture.at: Likewise.
3272 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
3273 tends to hang xsltproc.
3274 (Big horizontal): Likewise.
3275
3276 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3277
3278 In XML output, remove redundant class attribute on symbol element.
3279 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
3280 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
3281 look up a symbol to determine whether it's a nonterminal or terminal.
3282 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
3283 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
3284
3285 Add prec/assoc information to XML output.
3286 * src/gram.c (grammar_rules_print_xml): For each rule that has a
3287 %prec, add a percent_prec attribute.
3288 * src/print-xml.c (print_grammar): For each terminal that has a
3289 precedence or associativity, add a prec or assoc attribute.
3290 (xml_indent): New.
3291 (xml_puts): Use xml_indent.
3292 (xml_printf): Use xml_indent.
3293 * src/print-xml.h (xml_indent): Prototype.
3294
3295 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
3296 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
3297
3298 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3299
3300 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
3301 (bison:ruleByNumber): ... this for clarity.
3302 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
3303 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
3304 (xsl:template match="reduction"): Update.
3305 (xsl:template match="item"): Update.
3306 (xsl:template match="reduction"): Update.
3307
3308 In the XML output, don't print the list of rules where symbols appear.
3309 Compute it in XSLT instead. Discussed at
3310 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
3311 * data/xslt/bison.xsl (bison:ruleByLhs): New.
3312 (bison:ruleByRhs): New.
3313 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
3314 bison:ruleByRhs.
3315 (xsl:template match="terminal/rule"): Remove.
3316 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3317 bison:ruleByRhs.
3318 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3319 Remove.
3320 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
3321 bison:ruleByRhs and mode="number-link" for rule template.
3322 (xsl:template match="terminal/rule"): Remove.
3323 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3324 bison:ruleByRhs and mode="number-link" for rule template.
3325 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3326 Rewrite as...
3327 (xsl:template match="rule" mode="number-link"): ... this.
3328 * src/print-xml.c (print_grammar): Don't print the list of rules.
3329
3330 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
3331
3332 Don't let --report affect XML output; always print all information.
3333 Discussed at
3334 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
3335 * src/conflicts.c (log_resolution): Implement.
3336 * src/print-xml.c (print_core): Implement.
3337 (print_state): Implement.
3338 (print_xml): Implement.
3339
3340 * NEWS (2.3a+): Fix quotes.
3341 * src/parse-gram.y (prologue_declaration): For consistency with -v,
3342 don't let %verbose clear the list specified by --report.
3343
3344 2007-11-26 Akim Demaille <akim@epita.fr>
3345
3346 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
3347
3348 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
3349
3350 In the XML output, list useless and unused symbols and rules with the
3351 useful ones and add a "usefulness" attribute. Discussed starting at
3352 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
3353 * src/gram.c (grammar_rules_partial_print_xml): Remove.
3354 (grammar_rules_print_xml): Print all rules instead of just those
3355 useful in the grammar, and add a "usefulness" attribute.
3356 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
3357 * src/print-xml.c (print_rules_useless_in_parser): Remove.
3358 (print_grammar): Print all nonterminals instead of just useful ones,
3359 and add a "usefulness" attribute to nonterminals and terminals.
3360 (print_xml): Don't print a separate "reductions" or
3361 "rules-useless-in-parser" element.
3362 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
3363 (reduce_xml): Remove.
3364 (reduce_token_unused_in_grammar): New.
3365 (reduce_nonterminal_useless_in_grammar): New.
3366 * src/reduce.h (reduce_xml): Remove prototype.
3367 (reduce_token_unused_in_grammar): Add prototype.
3368 (reduce_nonterminal_useless_in_grammar): Add prototype.
3369 * data/xslt/xml2text.xsl: Update for XML changes.
3370 * data/xslt/xml2xhtml.xsl: Update for XML changes.
3371 * tests/reduce.at (Useless Terminals): Update output.
3372 (Useless Rules): Update output.
3373 (Reduced Automaton): Update output.
3374
3375 Say "Terminals unused in grammar" instead of "Unused terminals".
3376 * NEWS (2.3a+): Update.
3377 * doc/bison.texinfo (Understanding): Update example output.
3378 * src/reduce.c (reduce_output): Implement.
3379 * data/xslt/xml2text.xsl: Implement.
3380 * data/xslt/xml2xhtml.xsl: Implement.
3381
3382 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
3383
3384 Accept --report-file=FILE to override the default `.output' filename.
3385 * NEWS (2.3a+): Mention.
3386 * doc/bison.texinfo (Bison Options): Add an entry.
3387 * src/files.c (compute_output_file_names): Don't override
3388 spec_verbose_file if already set.
3389 * src/getargs.c (usage): Document --report-file.
3390 (REPORT_FILE_OPTION): New anonymous enum member.
3391 (long_options): Add entry for it.
3392 (getargs): Add case for it setting spec_verbose_file.
3393
3394 * build-aux/cross-options.pl: Don't record a short option just because
3395 there's an arg.
3396 * doc/.cvsignore: Add yacc.1.
3397
3398 2007-11-14 Akim Demaille <akim@epita.fr>
3399
3400 * doc/yacc.1.in: New.
3401 * configure.ac, doc/Makefile.am: Adjust.
3402 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
3403 config.h symbol.
3404 Use AC_SUBST for assignments too.
3405 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
3406
3407 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
3408
3409 * src/gram.c: Remove comments that duplicate comments in gram.h.
3410
3411 When reporting useless rules and nonterminals, say "useless in grammar"
3412 instead of "useless", and say "useless in parser" instead of "never
3413 reduced". Discussed starting at
3414 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
3415 * NEWS (2.3a+): Mention this change.
3416 * data/xslt/xml2text.xsl: Update output text and expected input XML
3417 element names to match changes below.
3418 * data/xslt/xml2xhtml.xsl: Likewise.
3419 (xsl:template match="bison-xml-report"): Add missing entry in Table of
3420 Contents: "Rules useless in parser due to conflicts".
3421 * doc/bison.texinfo (Decl Summary): Reword a little.
3422 (Understanding): Update example output for changes below.
3423 * src/gram.c: (rule_useful_p): Rename to...
3424 (rule_useful_in_grammar_p): ... this.
3425 (rule_useless_p): Rename to...
3426 (rule_useless_in_grammar_p): ... this.
3427 (rule_never_reduced_p): Rename to...
3428 (rule_useless_in_parser_p): ... this.
3429 (grammar_rules_print): Update for renames.
3430 (grammar_rules_print_xml): Update for renames.
3431 (grammar_rules_never_reduced_report): Rename to...
3432 (grammar_rules_useless_report): ... this since it is used for either
3433 kind of useless rule.
3434 * src/gram.h: Reword comments and update function names in prototypes.
3435 * src/main.c (main): Say "rule useless in parser due to conflicts".
3436 * src/print-xml.c (print_rules_never_reduced): Rename to...
3437 (print_rules_useless_in_parser): ... this, and rename output XML
3438 element "rules-never-reduced" to "rules-useless-in-parser".
3439 (print_xml): Update for rename.
3440 * src/print.c (print_results): Say "Rules useless in parser due to
3441 conflicts".
3442 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
3443 (nonterminals_reduce): Say "nonterminal useless in grammar".
3444 (reduce_output): Say "Nonterminals useless in grammar".
3445 Say "Rules useless in grammar".
3446 (reduce_xml): Rename output XML element "useless" to
3447 "useless-in-grammar".
3448 (reduce_print): Don't report the count of grammatically useless rules
3449 as "rules never reduced" just because %yacc is specified.
3450 In the correct report of this count, say nonterminal(s) and rule(s)
3451 "useless in grammar".
3452 * tests/conflicts.at (S/R in initial): Update expected output.
3453 (Defaulted Conflicted Reduction): Likewise.
3454 (Unreachable States After Conflict Resolution): Likewise.
3455 * tests/existing.at (GNU pic Grammar): Likewise.
3456 * tests/reduce.at (Useless Nonterminals): Likewise.
3457 (Useless Rules): Likewise.
3458 (Reduced Automaton): Likewise.
3459 (Underivable Rules): Likewise.
3460 (Empty Language): Likewise.
3461
3462 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
3463
3464 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
3465 here document and before the EOF so that BSD's implementation of Bourne
3466 shell doesn't parse the delimiter as part of the here document.
3467 * doc/.cvsignore: Add cross-options.texi.
3468 * src/getargs.c (usage): Add a blank line after the warning categories.
3469
3470 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
3471
3472 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
3473
3474 2007-11-05 Akim Demaille <akim@epita.fr>
3475
3476 Remove Id: from bison.1.
3477 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
3478 (perl -0777 -pi -e 's/\.PP\nId): New.
3479 (.x.1): Use it to ignore the version control revision.
3480
3481 2007-11-05 Akim Demaille <demaille@gostai.com>
3482
3483 * build-aux/Makefile.am: Ship cross-options.pl.
3484 * doc/Makefile.am: Always refer to cross-options.texi with
3485 $(srcdir).
3486 (MAINTAINERCLEANFILES): Add it.
3487
3488 2007-11-04 Akim Demaille <demaille@gostai.com>
3489
3490 Generate the long/short option cross-table.
3491 * build-aux/cross-options.pl: New.
3492 * doc/Makefile.am (cross-options.texi): New.
3493 * doc/bison.texinfo: Use it.
3494
3495 2007-11-04 Akim Demaille <demaille@gostai.com>
3496
3497 Generate bison.1 using help2man.
3498 * doc/common.x, doc/bison.x: New.
3499 * doc/Makefile.am (bison.1, .x.1): New.
3500 The code is taken from autoconf-2.61/man/Makefile.am.
3501 * configure.ac: Look for help2man.
3502
3503 2007-11-04 Akim Demaille <demaille@gostai.com>
3504
3505 Complete --help.
3506 * src/getargs.c (usage): Document -W, make it clear that -d,
3507 -g and -x have optional arguments.
3508
3509 2007-11-04 Akim Demaille <demaille@gostai.com>
3510
3511 Find sha1sum when named gsha1sum.
3512 * bootstrap (find_tool): New.
3513 ($SHA1SUM): New.
3514
3515 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3516
3517 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
3518 at
3519 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
3520 * NEWS (2.3a+): Mention.
3521 * data/bison.m4 (b4_pure_if): Don't define it here.
3522 * data/c.m4 (b4_identification): Depend on individual skeletons to
3523 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
3524 values of the %define variables api.pure or api.push_pull. Define
3525 YYPURE, YYPUSH, and YYPULL accordingly.
3526 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
3527 glr.cc has already defined b4_pure_flag.
3528 * data/push.c: Define b4_pure_if based on `%define api.pure'.
3529 Remove YYPUSH and YYPULL since they're back in b4_identification again.
3530 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
3531 * doc/bison.texinfo (Pure Decl): Update.
3532 (Push Decl): Update.
3533 (Decl Summary): Add api.pure to %define entry.
3534 In %pure-parser entry, say it's deprecated and reference %define.
3535 (Pure Calling): Update.
3536 (Error Reporting): Update.
3537 (C++ Scanner Interface): Update.
3538 (How Can I Reset the Parser): Update.
3539 (Table of Symbols): In %pure-parser entry, say it's deprecated and
3540 reference %define.
3541 * src/getargs.c (pure_parser): Remove global variable.
3542 * src/getargs.h (pure_parser): Remove extern.
3543 * src/output.c (prepare): Don't define pure_flag muscle.
3544 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
3545 wrapper around `%define api.pure'.
3546 * tests/calc.at (Simple LALR Calculator): Update.
3547 (Simple GLR Calculator): Update.
3548 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
3549 Update.
3550 (GLR: Resolve ambiguity, pure, locations): Update.
3551 (GLR: Merge conflicting parses, pure, no locations): Update.
3552 (GLR: Merge conflicting parses, pure, locations): Update.
3553 * tests/glr-regression.at (Uninitialized location when reporting
3554 ambiguity): Update
3555 * tests/input.at (Unused %define api.pure): New test case.
3556 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
3557 AT_PURE_IF and AT_PURE_AND_LOC_IF.
3558 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
3559
3560 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3561
3562 %define push_pull -> %define api.push_pull. Discussed starting at
3563 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
3564 * data/push.c: Expect the new name.
3565 * data/yacc.c: Likewise.
3566 * doc/bison.texinfo (Push Decl): Update.
3567 (Decl Summary): Update %define entry.
3568 (Push Parser Function): Update.
3569 (Pull Parser Function): Update.
3570 (Parser Create Function): Update.
3571 (Parser Delete Function): Update.
3572 * tests/calc.at (Simple LALR Calculator): Update.
3573 * tests/input.at (%define enum variables): Update.
3574 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
3575 (Push Parsing: Multiple impure instances): Update.
3576 (Push Parsing: Unsupported Skeletons): Update.
3577 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
3578 (Exploding the Stack Size with Malloc): Update.
3579
3580 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
3581 other entries some.
3582
3583 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
3584
3585 For the XML output's terminal element, rename @number to @token-number,
3586 and add @symbol-number. In the nonterminal element, rename @number to
3587 @symbol-number. Discussed starting at
3588 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
3589 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
3590 renames.
3591 (xsl:template match="nonterminal"): Likewise.
3592 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
3593 (xsl:template match="nonterminal"): Likewise.
3594 * src/print-xml.c (print_grammar): Implement.
3595
3596 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
3597
3598 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
3599 2007-10-11 change, the child elements here are items not rules.
3600 (xsl:template match="item"): New.
3601 (xsl:template match="rule"): Update for new reduced itemset.
3602 (xsl:template match="point"): Remove.
3603 (xsl:template match="empty"): For consistency with --graph, don't
3604 output "/* empty */".
3605 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
3606 line-wrap, don't pass a negative value as first-line-length since this
3607 won't work with the following changes.
3608 (xsl:template name="line-wrap"): Simplify slightly.
3609 (xsl:template name="ws-search"): Eliminate recursion.
3610 * src/print_graph.c (print_core): Don't print a reduction's lookahead
3611 set next to an item whose dot is not at the end of the RHS even if it
3612 happens to be associated with the same rule.
3613
3614 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
3615
3616 Add %define lr.keep_unreachable_states.
3617 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
3618 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
3619 * src/main.c (main): Implement it.
3620 * tests/conflicts.at (Unreachable States After Conflict Resolution):
3621 Extend to test it, and fix a typo.
3622
3623 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
3624
3625 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
3626 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
3627 the example .output text.
3628 * tests/regression.at (Extra lookahead sets in report): Improve wording
3629 of comments.
3630
3631 2007-10-17 Wojciech Polak <polak@gnu.org>
3632
3633 * src/print-xml.c (print_grammar): Renamed
3634 <terminal> and <nonterminal> attributes:
3635 "type" to "number" and "symbol" to "name".
3636 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
3637 Use new attribute names.
3638 (xsl:template match="nonterminal"): Likewise.
3639 * data/xslt/xml2xhtml.xsl: Likewise.
3640
3641 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
3642
3643 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
3644 (Option Cross Key): Likewise.
3645
3646 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
3647 next to an item whose dot is not at the end of the RHS even if it
3648 happens to be associated with the same rule.
3649 * src/print.c (print_core): Likewise.
3650 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
3651 (Resolved SR Conflicts): Update output.
3652 * tests/regression.at (Extra lookahead sets in report): New test case.
3653
3654 2007-10-11 Wojciech Polak <polak@gnu.org>
3655
3656 * src/print-xml.c (print_core): Remove item set
3657 redundancy.
3658 * data/xslt/bison.xsl (bison:ruleNumber): New key.
3659 Improve processing time. Suggested by Joel E. Denny.
3660 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
3661 Write xsl:param "required" attribute as comment.
3662 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
3663 (xsl:template match="rule"): Support new reduced itemset.
3664 (xsl:template match="point"): Remove.
3665 * data/xslt/xml2xhtml.xsl: Likewise.
3666
3667 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
3668
3669 * src/getargs.c (version): Update copyright year.
3670
3671 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
3672
3673 Make xml2dot.xsl and --graph produce the same output.
3674 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
3675 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
3676 escaped later.
3677 (xsl:template name="output-node"): Use the new escape template instead
3678 of the string-replace template directly.
3679 (xsl:template name="output-edge"): Likewise.
3680 (xsl:template name="escape"): New, escapes backslashes and newlines in
3681 addition to quotation marks.
3682 * src/graphviz.c (start_graph, output_node, output_edge): Add
3683 whitespace to output for legibility.
3684
3685 Make xml2text.xsl and --report produce the same output, and remove the
3686 XML "conflicts" element since a conflict summary is easily extracted
3687 from the automaton.
3688 * data/xslt/bison.xsl: New.
3689 (xsl:template match="state" mode="bison:count-conflicts): New.
3690 * data/xslt/xml2text.xsl: Import bison.xsl.
3691 (xsl:template match="bison-xml-report"): Instead of styling the
3692 "conflicts" element, style the "automaton" element with mode
3693 "conflicts". Unlike the former, the latter lists S/R and R/R
3694 conflicts for a state on the same line.
3695 (xsl:template match="conflicts"): Remove.
3696 (xsl:template match="conflict"): Remove.
3697 (xsl:template match="terminal"): Line-wrap the list of rules in which
3698 the terminal is used.
3699 (xsl:template match="nonterminal"): Likewise for nonterminals.
3700 (xsl:template match="automaton" mode="conflicts"): New.
3701 (xsl:template match="state" mode="conflicts"): New.
3702 (xsl:template name="line-wrap"): New.
3703 (xsl:template name="ws-search"): New.
3704 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
3705 (xsl:template match="bison-xml-report"): Instead of styling the
3706 "conflicts" element, style the "automaton" element with mode
3707 "conflicts."
3708 (xsl:template match="conflicts"): Remove.
3709 (xsl:template match="conflict"): Remove.
3710 (xsl:template match="automaton" mode="conflicts"): New.
3711 (xsl:template match="state" mode="conflicts): New.
3712 * src/conflicts.c (conflicts_output_xml): Remove.
3713 * src/conflicts.h (conflicts_output_xml): Remove prototype.
3714 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
3715 * src/print.c (print_grammar): Consistently wrap at the 66th column so
3716 the corresponding XSLT is easier. Also, never wrap between a word and
3717 the comma that follows it.
3718
3719 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
3720
3721 Improve C++ namespace support. Discussed starting at
3722 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
3723 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
3724 b4_namespace_close): New macros that interpret the %define variable
3725 "namespace" so its value can contain "::" to indicate nested
3726 namespaces.
3727 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
3728 the above macros.
3729 * data/lalr1.cc (b4_namespace): Likewise.
3730 * data/location.cc (b4_namespace): Likewise.
3731 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
3732 inside a new table in the general %define entry. Document `%define
3733 namespace' there as well. Point the %name-prefix entry to it since it
3734 explains it more completely in the case of C++.
3735 (C++ Bison Interface): Mention `%define namespace' instead of
3736 %name-prefix.
3737 (Table of Symbols): Remove the `%define push_pull' entry. The %define
3738 entry suffices.
3739 * tests/c++.at (Relative namespace references): New test case.
3740 (Absolute namespace references): New test case.
3741 (Syntactically invalid namespace references): New test case.
3742 * tests/input.at (C++ namespace reference errors): New test case.
3743
3744 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
3745
3746 Add syncline support and location accessor to internal %define
3747 interfaces.
3748 * data/bison.m4 (b4_percent_define_get_loc): New.
3749 (b4_percent_define_get_syncline): New.
3750 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
3751 (b4_percent_define_default): Record defining location as line 1 rather
3752 than 0 for the sake of synchronizing #line's, and define
3753 b4_percent_define_syncline(VARIABLE).
3754 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
3755 * src/muscle_tab.c (muscle_syncline_grow): New.
3756 (muscle_code_grow): Use muscle_syncline_grow.
3757 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
3758 define b4_percent_define_syncline(VARIABLE).
3759 (muscle_percent_define_get_loc): New.
3760 (muscle_percent_define_get_syncline): New.
3761 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
3762 remove some unused variables.
3763 (muscle_percent_define_default): Record defining location as line 1
3764 rather than 0 for the sake of synchronizing #line's, and define
3765 b4_percent_define_syncline(VARIABLE).
3766 (muscle_percent_define_check_values): Use
3767 muscle_percent_define_get_loc.
3768 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
3769 (muscle_percent_define_get_syncline): Prototype.
3770 * tests/skeletons.at (%define Boolean variables: invalid skeleton
3771 defaults): Update output for location change.
3772 (Complaining during macro argument expansion): Extend to test
3773 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
3774
3775 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
3776
3777 Fix some error-reporting macro bugs.
3778 * data/bison.m4 (b4_cat): New.
3779 (b4_error, b4_error_at): Use b4_cat to send error directives directly
3780 to stdout so they don't become arguments to other macros. Update
3781 comments and add examples.
3782 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
3783 add examples.
3784 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
3785 after printing the error directive so that M4 doesn't report subsequent
3786 problems that are induced by this problem.
3787 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
3788 instead of just in them. Recognize @\n in both places. Both expand to
3789 the empty string. Needed by b4_cat.
3790 * tests/skeletons.at (Complaining during macro argument expansion):
3791 New test case.
3792 (Fatal errors make M4 exit immediately): New test case.
3793
3794 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
3795
3796 Implement --print-datadir.
3797 * src/getargs.c (usage): Mention.
3798 (PRINT_DATADIR_OPTION): New anonymous enum member.
3799 (long_options): Add entry for it.
3800 (getargs): Add case for it calling compute_pkgdatadir.
3801 * src/output.c (output_skeleton): Encapsulate data directory
3802 computation from here...
3803 (prepare): ... and from here...
3804 (compute_pkgdatadir): ... into this new function.
3805 * src/output.h (compute_pkgdatadir): Prototype.
3806
3807 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
3808
3809 * src/print-xml.c (escape_bufs): New static global variable
3810 replacing...
3811 (xml_escape_n): ... the static local variable buf here.
3812 (print_xml): Free memory for escape_bufs.
3813 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
3814
3815 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
3816
3817 Replace `%push-parser' and `%push-pull-parser' with
3818 `%define push_pull "push"' and `%define push_pull "both"'.
3819 `%define push_pull "pull"' is the default.
3820 * doc/bison.texinfo (Push Decl, Push Parser Function,
3821 Pull Parser Function, Parser Create Function, Parser Delete Function):
3822 Update declarations.
3823 (Decl Summary, Table of Symbols): Replace %push-parser and
3824 %push-pull-parser entries with a %define push_pull entry.
3825 * data/bison.m4 (b4_percent_define_check_values): New macro.
3826 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
3827 definitions...
3828 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
3829 definitions...
3830 * data/push.c: ... to here and compute them from the value of the
3831 %define variable push_pull.
3832 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
3833 parsing requests here...
3834 * data/yacc.c: ... hack this to switch to push.c any time
3835 b4_use_push_pull_flag or the %define variable push_pull is set. This
3836 will go away when we mv push.c yacc.c.
3837 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
3838 push parsing is not supported since unused %define variables are
3839 reported anyway.
3840 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
3841 * src/muscle_tab.h (muscle_percent_define_check_values): Update
3842 comments for consistency with b4_percent_define_check_values.
3843 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
3844 muscles.
3845 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
3846 Remove.
3847 (prologue_declaration): Remove %push-parser and %push-pull-parser
3848 rules.
3849 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
3850 * tests/calc.at: Update declarations.
3851 * tests/input.at (%define enum variables): New test case.
3852 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
3853 declaration.
3854 (Push Parsing: Multiple impure instances): Update declaration.
3855 (Push Parsing: Unsupported Skeletons): New test case.
3856 * tests/torture.at (Exploding the Stack Size with Alloca): Update
3857 declaration.
3858 (Exploding the Stack Size with Malloc): Update declaration.
3859
3860 2007-09-24 Wojciech Polak <polak@gnu.org>
3861
3862 Add XSLT transformations.
3863
3864 * data/xslt/xml2dot.xsl: Transform XML into DOT.
3865 * data/xslt/xml2text.xsl: Transform XML into plain text.
3866 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
3867 * data/Makefile.am (xsltdir): New variable.
3868 (dist_xslt_DATA): Add xslt/*.xsl files.
3869
3870 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
3871
3872 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
3873 Problem reported by Wojciech Polak.
3874 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
3875 (xml_printf): Undo change I made on 21 September; that is,
3876 indent 2 spaces, not 1.
3877
3878 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
3879
3880 Pacify ./configure --enable-gcc-warnings.
3881 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
3882 `char const *' instead of `char *'.
3883 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
3884 local variable `sep'.
3885
3886 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
3887
3888 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
3889 elsewhere.
3890 * src/print-xml.c: Prefer "const" after types; that's more consistent.
3891 (xml_printf): Indent just 1 space for level.
3892 (e_char, xlate_char): Remove.
3893 (xml_escape_string): Rewrite to avoid undefined behavior (used
3894 storage that was freed from the stack).
3895 (xml_escape_n): Don't bother checking for subscript error.
3896
3897 2007-09-21 Wojciech Polak <polak@gnu.org>
3898
3899 Add Bison XML Automaton Report.
3900
3901 Add support for an -x option to generate an XML report.
3902 It is not documented yet.
3903 * src/print-xml.c: New file.
3904 * src/print-xml.h: Likewise.
3905 * lib/timevar.def (TV_XML): New var.
3906 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
3907 * src/conflicts.c: Include print-xml.h.
3908 (solved_conflicts_xml_obstack): New var.
3909 (log_resolution, conflicts_solve, conflicts_free):
3910 Add support for XML report.
3911 (conflicts_output_val): New function.
3912 * src/conflicts.h (conflicts_output_val): New decl.
3913 * src/files.c (spec_xml_file): New var.
3914 (compute_output_file_names, output_file_names_free): Add XML support.
3915 * src/files.h (spec_xml_file): New decl.
3916 * src/getargs.c (xml_flag): New var.
3917 (usage, short_options, long_options, getargs): Add XML support.
3918 * src/getargs.h (xml_flag): New decl.
3919 * src/gram.c: Include print-xml.h.
3920 (rule_lhs_print_xml, rule_rhs_print_xml):
3921 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
3922 New functions.
3923 * src/gram.h: Declare external ones.
3924 * src/main.c: Include print-xml.h.
3925 (main): Add XML support.
3926 * src/reduce.c: Include print-xml.h.
3927 (reduce_xml): New function.
3928 * src/reduce.h: Declare it.
3929 * src/state.c: Include print-xml.h.
3930 (state_new): Add XML support.
3931 (state_rule_lookahead_tokens_print_xml): New function.
3932 * src/state.h: Declare it.
3933 (struct state): New member solved_conflicts_xml.
3934 * src/symtab.c (symbol_class_get_string): New function.
3935 * src/symtab.h: Declare it.
3936
3937 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
3938
3939 * GNUmakefile: Switch to coreutils's version.
3940 * bootstrap: Likewise.
3941 * Makefile.cfg: Adjust to new GNUmakefile.
3942 * README-hacking: Likewise.
3943
3944 Import from gnulib:
3945
3946 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
3947 Bruno Haible <bruno@clisp.org>
3948
3949 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
3950 and is a script that invokes bison. Tighten the code. Add comments.
3951
3952 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
3953
3954 Spell "boolean" as "Boolean". Reported by Akim Demaille.
3955 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
3956 * doc/bison.texinfo (Decl Summary): Fix.
3957 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
3958 * tests/input.at (Boolean %define variables): Update output.
3959 * tests/skeletons.at (%define boolean variables: invalid skeleton
3960 defaults): Rename to...
3961 (%define Boolean variables: invalid skeleton defaults): ... this and
3962 update output.
3963
3964 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
3965
3966 In impure push mode, don't allow more than one yypstate to be allocated
3967 since multiple impure parsers would corrupt yynerrs.
3968 * data/push.c (yypstate_allocated): New static global variable
3969 initialized to 0.
3970 (yypull_parse): If yypstate_new returns 0, don't report it as memory
3971 exhaustion if yypstate_allocated is 1, but still return 2.
3972 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
3973 already 1. Otherwise, set it to 1.
3974 (yypstate_delete): Set it to 0.
3975 * tests/push.at (Push Parsing: Multiple impure instances): New test
3976 case.
3977
3978 2007-08-17 Bob Rossi <bob@brasko.net>
3979
3980 * doc/bison.texinfo (Push Decl): Document the push parser.
3981 (Table of Symbols): Ditto.
3982 (Pure Decl): Ditto.
3983 (Decl Summary): Ditto.
3984 (Multiple Parsers, Push Parser Function, Pull Parser Function,
3985 Parser Create Function, Parser Delete Function):
3986 Add new push parser symbols.
3987 (Table of Symbols): Document push-parser, push-pull-parser,
3988 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
3989
3990 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
3991
3992 Update to GPLv3.
3993 * doc/gpl-3.0.texi: New file.
3994 * doc/gpl.texi: Remove.
3995 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
3996 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
3997 * README-hacking, TODO, bootstrap, bootstrap.conf:
3998 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
3999 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
4000 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
4001 * data/lalr1.cc, data/lalr1.java, data/location.cc:
4002 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
4003 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
4004 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
4005 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
4006 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
4007 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
4008 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
4009 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
4010 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
4011 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
4012 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
4013 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
4014 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
4015 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
4016 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
4017 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
4018 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
4019 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
4020 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
4021 * src/complain.c, src/complain.h, src/conflicts.c:
4022 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
4023 * src/files.h, src/flex-scanner.h, src/getargs.c:
4024 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
4025 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
4026 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
4027 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
4028 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
4029 * src/print.c, src/print.h, src/print_graph.c:
4030 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
4031 * src/reduce.h, src/relation.c, src/relation.h:
4032 * src/revision.h, src/scan-code.h, src/scan-code.l:
4033 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
4034 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
4035 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
4036 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
4037 * tests/Makefile.am, tests/actions.at, tests/c++.at:
4038 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
4039 * tests/existing.at, tests/glr-regression.at:
4040 * tests/headers.at, tests/input.at, tests/java.at:
4041 * tests/local.at, tests/output.at, tests/push.at:
4042 * tests/reduce.at, tests/regression.at, tests/sets.at:
4043 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
4044 * tests/torture.at:
4045 Update to GPLv3.
4046
4047 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4048
4049 Get rid of broken %no-parser, -n, and --no-parser implementation and
4050 documentation.
4051 * TODO: Don't mention them.
4052 * doc/bison.1: Likewise.
4053 * doc/bison.texinfo (Decl Summary): Likewise.
4054 (Bison Options): Likewise.
4055 (Option Cross Key): Likewise.
4056 * src/getargs.c (no_parser_flag): Remove global variable.
4057 (usage): Don't print description of -n and --no-parser.
4058 (long_options): Remove --no-parser entry here.
4059 (getargs): Remove -n case in the switch here.
4060 * src/getargs.h (no_parser_flag): Remove extern.
4061 * tests/regression.at (Web2c Actions): Remove comment that mentions
4062 --no-parser.
4063
4064 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4065
4066 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
4067 name user variables starting with `yy'. Just pass NULL instead of a
4068 dummy local &yylval to yypush_parse.
4069 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
4070 starting with `yy'.
4071
4072 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
4073
4074 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
4075 true since it's then always used regardless of whether yyoverflow is
4076 defined. Reported by Christian Burger at
4077 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
4078 * THANKS: Add Christian Burger.
4079
4080 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4081 node names: say "Decl Summary" not "Bison Declaration Summary".
4082
4083 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
4084
4085 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
4086 determine whether this function has already complained about an invalid
4087 value for a %define boolean variable, don't check whether Bison has
4088 ever examined the value. As written, the check was a tautology.
4089 Instead, record and check for this complaint using a separate muscle.
4090
4091 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
4092
4093 Fix push parsing memory leak reported by Brandon Lucia at
4094 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
4095 * THANKS: Add Brandon Lucia.
4096 * data/push.c (yypstate_delete): Free the stack if it was reallocated
4097 but the parse never completed and thus freed it.
4098 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
4099 * tests/testsuite.at: Include push.at.
4100 * test/push.at: New.
4101 (Push Parsing: Memory Leak for Early Deletion): New test case.
4102
4103 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
4104
4105 Improve handling of multiple S/R conflicts in the same state and of S/R
4106 conflicts involving multiple reductions.
4107 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
4108 set for a state here or Bison will abort if it is reassigned on a
4109 later conflicted reduction in the same state.
4110 Similarly, don't finalize and assign the solved conflicts report here
4111 or it will be lost if it is reassigned on a later conflicted reduction
4112 in the same state.
4113 (set_conflicts): Instead, assign them both here after all S/R conflicts
4114 in the state have been fully examined.
4115 * src/print.c (shift_set): Rename to...
4116 (no_reduce_set): ... this.
4117 (print_reductions): Update for rename, and add %nonassoc error action
4118 tokens to no_reduce_set so that, when printing the first remaining
4119 reduction on an error action token, the reduction is enclosed in
4120 brackets.
4121 (print_results): Update for rename.
4122 * tests/conflicts.at (Solved conflicts report for multiple reductions
4123 in a state): New test case.
4124 (%nonassoc error actions for multiple reductions in a state): New test
4125 case.
4126
4127 * src/main.c (main): Don't depend on C99 features.
4128
4129 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
4130
4131 * build-aux/.cvsignore: Add compile.
4132 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
4133 uniwidth.
4134
4135 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
4136
4137 * bootstrap (slurp): Create target directories that don't exist.
4138 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
4139
4140 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
4141
4142 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
4143 than item number.
4144 * closure.c (closure): Likewise.
4145 * state.h (reductions): Comment sorting of rules.
4146 (state): Comment sorting of items.
4147
4148 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
4149
4150 Fix C++ test cases after recent Gnulib changes. Discussed starting at
4151 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
4152 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
4153 definition in order to avoid Gnulib headers since we don't use config.h
4154 here.
4155 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
4156 rather than AT_DATA so that config.h is included.
4157
4158 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
4159
4160 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
4161 instead of fprintf. Guard these functions with #if YYDEBUG instead of
4162 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
4163 and so that YYFPRINTF is guaranteed to be defined here.
4164
4165 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
4166
4167 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
4168 with...
4169 (muscle_percent_define_check_values): ... this more helpful function.
4170 Again, it's not used yet, but it will be.
4171 * src/muscle_tab.h: Likewise.
4172
4173 Improve some comments in parser table construction.
4174 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
4175 (generate_states): Don't mention ruleset, which is internal to closure.
4176 * src/closure.c (closure): Explain sorting of core and itemset, which
4177 is required for this function to behave correctly.
4178 * src/closure.h (closure): Mention sorting.
4179
4180 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
4181
4182 * src/lalr.c (state_lookahead_tokens_count): For code readability,
4183 move the check for disabled transitions to an aver since conflict
4184 resolution hasn't happened yet.
4185
4186 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
4187 labels a state as inconsistent just because it has error transitions.
4188 The original form of this check appeared in revision 1.1 of lalr.c,
4189 which was committed on 1991-12-21. Now (at least), changing the
4190 consistency label on such a state appears to have no useful effect in
4191 any of the places it is examined, which I enumerate below. The key
4192 point to understanding each item in this enumeration is that a state
4193 with an error transition is labelled consistent in the first place only
4194 if it has no rules, so the check cannot matter for states that have
4195 rules. (1) Labelling a state as inconsistent will cause set_conflicts
4196 to try to identify its conflicts, and a state must have *rules* to have
4197 conflicts. (2) Labelling a state as inconsistent will affect how
4198 action_row sets the default *rule* for the state. (3) Labelling a
4199 state as inconsistent will cause build_relations to add lookback edges
4200 to *rules* in that state.
4201 * src/state.h (struct state): Word the comment for member consistent
4202 more carefully.
4203
4204 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
4205
4206 Don't depend on C99 features.
4207 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
4208 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
4209 * src/reader.c (check_and_convert_grammar): Fix for-loop.
4210 * src/state.c (state_mark_reachable_states): Fix for-loop.
4211 (state_remove_unreachable_states): Fix for-loop.
4212
4213 Don't widen struct state with member reachable just to temporarily
4214 record reachability. Instead, use a local bitset.
4215 * src/state.h (struct state): Remove member.
4216 * src/state.c (state_new): Don't initialize it.
4217 (state_mark_reachable_states): Rename to...
4218 (state_record_reachable_states): ... this, and use bitset.
4219 (state_remove_unreachable_states): Use bitset.
4220
4221 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
4222
4223 * src/Makefile.am (yacc): Quote target action commands properly so
4224 that the yacc script isn't corrupt. Reported by Hans Aberg at
4225 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
4226
4227 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
4228 the case of pure parsers. Reported by Frans Englich at
4229 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
4230 * THANKS: Add Frans Englich.
4231
4232 * NEWS (2.3a+): In the %code entry, reference section `Bison
4233 Declaration Summary' from the manual now since the %code summary has
4234 moved there.
4235 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
4236 in the rules section must be terminated by semicolons.
4237
4238 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
4239
4240 Extend the front-end API for %define variables to more completely
4241 mirror the back-end. This will be useful in the future.
4242 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
4243 Update comments to mention the new front-end counterparts of these
4244 macros.
4245 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
4246 for muscle_string_decode and muscle_location_decode.
4247 (muscle_string_decode): New static function.
4248 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
4249 (muscle_percent_define_get, muscle_percent_define_ifdef): New
4250 functions.
4251 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
4252 muscle_percent_define_get to mimic the b4_percent_define_flag_if
4253 implementation more closely.
4254 (muscle_percent_define_invalid_value): New function.
4255 * src/muscle_tab.h (muscle_percent_define_get,
4256 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
4257 Prototype.
4258
4259 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
4260
4261 * NEWS (2.3a+): Mention yesterday's state-removal change.
4262 (2.3a): Remove the %language entry, which was added after 2.3a.
4263 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
4264 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
4265 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
4266 tests/existing.at: Update copyright date.
4267
4268 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4269
4270 If conflict resolution makes states unreachable, remove those states,
4271 report rules that are then unused, and don't report conflicts in those
4272 states.
4273 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
4274 New global function.
4275 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
4276 function.
4277 * src/main.c (main): After conflict resolution, remove the unreachable
4278 states and update all data structures that reference states by number.
4279 * src/state.c (state_new): Initialize each state's reachable member to
4280 false.
4281 (state_mark_reachable_states): New static function.
4282 (state_remove_unreachable_states): New global function.
4283 * src/state.h (struct state): Add member bool reachable.
4284 (state_remove_unreachable_states): Prototype.
4285 * tests/conflicts.at (Unreachable States After Conflict Resolution):
4286 New test case.
4287 * tests/existing.at (GNU pic Grammar): Update test case output now that
4288 an unused rule is discovered.
4289
4290 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4291
4292 Minor code cleanup in parser table construction.
4293 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
4294 (new_itemsets, save_reductions): Update for rename to nitemset.
4295 * src/closure.c (nritemset): Rename to...
4296 (nitemset): ... this since the "r" appears to meaningless and isn't
4297 used in the comments.
4298 (closure): Update for rename.
4299 * src/closure.h (nritemset): Update extern to...
4300 (nitemset): ... this.
4301 * src/lalr.c (LA): Fix a typo in comments.
4302 * src/print.c (print_core): Update for rename to nitemset.
4303 * src/print_graph.c (print_graph): Likewise.
4304 * src/state.h: Fix some typos in header comments.
4305
4306 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
4307
4308 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
4309 still sticks to ASCII. Sorry!
4310
4311 * README-hacking: New file, taken mostly from coreutils, with changes
4312 for Bison. Contains much of the contents of:
4313 * README-cvs: Remove.
4314 * bootstrap: Sync from gnulib.
4315 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
4316 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
4317
4318 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
4319
4320 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
4321 Setzer.
4322 (Java Differences): Fix some typos.
4323 * THANKS: Add Sebastian Setzer.
4324
4325 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
4326
4327 * data/java.m4 (b4_single_class_if): Remove.
4328 (b4_abstract_if): Look at "%define abstract".
4329 (b4_lexer_if): New.
4330 (b4_union_name): Rename...
4331 (b4_yystype): ... to this. Map to "%define stype".
4332 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
4333 b4_maybe_throws): Fix quoting.
4334 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
4335 * data/lalr1.java (Lexer interface): Always define.
4336 (Lexer interface within parser class): Remove.
4337 (YYLexer class): New, used when "%code lexer" is present.
4338 (constructor): When "%code lexer" is used, pass %lex-param
4339 to the lexer constructor.
4340 (yylex, yyparse): Remove %lex-param from method invocations
4341 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
4342
4343 * doc/bison.texinfo (Java Bison Interface): Mention "%define
4344 abstract". Rename "%define union_name" to "%define stype".
4345 Rename method names according to previous patch.
4346 (Java Scanner Interface): Describe "%code lexer" instead of
4347 "%pure-parser" and "%define single_class".
4348 (Java Differences): Mention "%code lexer".
4349
4350 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
4351 Include scanner here, using macros from tests/local.at.
4352 (AT_DATA_CALC_Y): Remove final argument.
4353 (_AT_CHECK_JAVA_CALC): Likewise.
4354 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
4355 of %locations and %error-verbose.
4356 (main): Test with and without %lex-param.
4357 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
4358 (AT_BISON_OPTION_POPDEFS): Pop it.
4359
4360 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4361
4362 DJGPP spefic issue. Inhibit the use of disallowed characters for
4363 file name genertion on Win98, WinXP, etc. These are |<>":?*\
4364 and concern testsuite case 46.
4365 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
4366 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
4367 * djgpp/config.bat: Inhibit the use of disallowed characters.
4368
4369 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4370
4371 Miscellaneous %define and %code cleanup.
4372 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
4373 values are interpreted.
4374 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
4375 documentation a little more.
4376 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
4377 muscle_percent_define_insert, muscle_percent_code_grow): New
4378 functions/macros.
4379 * src/muscle_tab.h (muscle_percent_define_insert,
4380 muscle_percent_code_grow): Prototype.
4381 * src/parse-gram.y (prologue_declaration): Use
4382 muscle_percent_define_insert and muscle_percent_code_grow when parsing
4383 %define and %code directives.
4384
4385 Make it easy to share %define boolean variables between the front-end
4386 and back-end. Though not used yet, this will be useful in the future.
4387 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
4388 Bison uses of names rather than just skeleton uses of names.
4389 (b4_percent_define_get, b4_percent_define_ifdef): Rename
4390 b4_percent_define_skeleton_variables(VARIABLE) to
4391 b4_percent_define_bison_variables(VARIABLE).
4392 (b4_percent_code_get, b4_percent_code_ifdef): Rename
4393 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
4394 b4_percent_code_bison_qualifiers(QUALIFIER).
4395 (b4_check_user_names_wrap): Update for renames.
4396 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
4397 muscle_percent_define_default): New functions mimicking
4398 b4_percent_define_flag_if and b4_percent_define_default.
4399
4400 For %define variables, report locations for invalid values and
4401 redefinitions.
4402 * data/bison.m4 (b4_percent_define_flag_if): Read
4403 b4_percent_define_loc(VARIABLE) to report the location of an invalid
4404 value for VARIABLE.
4405 (b4_percent_define_default): Save a special location in
4406 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
4407 must later be reported as invalid.
4408 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
4409 functions.
4410 (muscle_percent_define_insert): Record the location of VARIABLE in
4411 muscle percent_define_loc(VARIABLE), and use it to report the previous
4412 location for a redefinition.
4413 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
4414 (muscle_percent_define_default): Update like b4_percent_define_default.
4415 (muscle_grow_user_name_list): Rename to...
4416 (muscle_user_name_list_grow): ... this for consistency and use
4417 muscle_location_grow.
4418 * src/muscle_tab.h (muscle_location_grow): Prototype.
4419 * tests/input.at (%define errors): Update expected output.
4420 * tests/skeletons.at (%define boolean variables: invalid skeleton
4421 defaults): New test case.
4422
4423 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
4424
4425 * src/print.c (lookahead_set, state_default_rule): Remove.
4426 (print_reductions): Replace state_default_rule invocation with
4427 equivalent use of yydefact, which was computed in token_actions in
4428 tables.c.
4429 (print_results): Don't allocate lookahead_set.
4430
4431 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
4432
4433 * data/lalr1.java: Prefix all private members with yy.
4434
4435 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
4436
4437 Use YYFPRINTF instead of fprintf where appropriate. Reported by
4438 Sebastien Fricker at
4439 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
4440 * THANKS: Add Sebastien Fricker.
4441 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
4442 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
4443 accept a variable number of arguments.
4444
4445 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
4446
4447 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
4448
4449 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4450
4451 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
4452 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
4453 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
4454
4455 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
4456
4457 Undo my 2007-02-07 change, switching back to the c-strcase module
4458 introduced in the 2007-02-03 change. Bruno Haible reported that
4459 the 2007-02-07 change would be dangerous in Turkish if we add a
4460 language whose name contains "i", since "i" is not lowercase "I"
4461 in Turkish.
4462 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
4463 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
4464 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
4465 * m4/.cvsignore: Remove strcase.m4.
4466 * src/getargs.c: Revert 2007-02-07 change, as follows.
4467 Include c-strcase.h.
4468 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
4469
4470 2007-02-11 Bruno Haible <bruno@clisp.org>
4471
4472 Enable the Java related testsuite tests when the only Java compiler
4473 found is a gcj < 4.3. Discussed at
4474 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
4475 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
4476
4477 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
4478
4479 * data/Makefile.am: Update copyright date.
4480 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
4481 yypstate_new returns NULL.
4482 (yypstate_new): Return NULL if malloc does.
4483 * src/reader.c (packgram): Move translation of rule actions from the
4484 beginning of packgram to...
4485 (check_and_convert_grammar): ... here right before packgram is invoked
4486 so it's easier to write more complete comments, and remove redundant
4487 code.
4488
4489 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
4490
4491 As in semantic actions, make @$ in %initial-action, %destructor, and
4492 %printer imply %locations.
4493 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
4494 scanning @$.
4495 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
4496 (@$ in %initial-action implies %locations,
4497 @$ in %destructor implies %locations,
4498 @$ in %printer implies %locations): ... these new test cases.
4499
4500 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
4501
4502 Undo most of the 2007-02-03 change, switching to the strcase module
4503 now that gnulib strcase has been fixed.
4504 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
4505 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
4506 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
4507 * m4/.cvsignore: Add strcase.m4.
4508 * src/getargs.c: Revert 2007-02-03 change, as follows.
4509 Don't include c-strcase.h.
4510 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
4511 strcasecmp has "unspecified behavior" outside the POSIX locale,
4512 but it works fine in practice if at least one argument is ASCII,
4513 as is the case in Bison.
4514
4515 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
4516
4517 * tests/java.at: Skip tests if only one of javac/java is present.
4518 Reported by Joel E. Denny.
4519 * tests/atlocal.in: Adjust copyright years.
4520
4521 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
4522
4523 * data/lalr1.java (Stack): Work around old verifiers that disallow
4524 access to the private fields of an inner class, from the outer class.
4525 We can make Stack's fields public because user code doesn't have access
4526 to the instance of Stack used by parse(). Reported by Paul Eggert.
4527
4528 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
4529
4530 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
4531 the right spot for these files?
4532 * bootstrap.conf (gnulib_modules): Add c-strcase.
4533 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
4534 c-strncasecmp.c.
4535 * src/getargs.c: Include c-strcase.h.
4536 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
4537 to avoid unspecified behavior.
4538
4539 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
4540
4541 * doc/bison.texinfo (Decl Summary): Correct typo.
4542
4543 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
4544
4545 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
4546 Complain if the value does not match empty, "true" or "false".
4547 * data/c++.m4: Adjust default definitions of %define variables.
4548 * data/java.m4: Adjust default definitions of %define variables.
4549 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
4550 to above behavior.
4551 * tests/input.at (Boolean %define variables): Test new behavior.
4552
4553 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
4554
4555 * NEWS: Mention java.
4556 * TODO: Remove things that are done.
4557 * bootstrap.conf: Add javacomp-script and javaexec-script.
4558 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
4559
4560 * data/Makefile.am: Add new files.
4561 * data/java-skel.m4: New.
4562 * data/java.m4: New.
4563 * data/lalr1.java: New.
4564
4565 * doc/bison.texinfo: Put "A Complete C++ Example" under
4566 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
4567 under Other Languages.
4568
4569 * src/getargs.c (valid_languages): Add Java.
4570 * src/getargs.h (struct bison_language): Update size of string fields.
4571
4572 * tests/Makefile.am: Add java.at.
4573 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
4574 * tests/java.at: New.
4575 * tests/testsuite.at: Include it.
4576
4577 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
4578
4579 Clean up.
4580 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
4581 at_directive_argv arguments so these no longer have to be global
4582 variables. Also, update the implementation for the following changes.
4583 (fail_for_at_directive_too_many_args,
4584 fail_for_at_directive_too_few_args): Add at_directive_name argument.
4585 (at_directive_name): Remove as at_directive_argv[0] will be used for
4586 this now.
4587 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
4588 for the directive name.
4589 (at_directive_argc, at_directive_argv): Make these local within
4590 skel_lex instead of global.
4591 (INITIAL): Update directive start action for above changes.
4592 (SC_AT_DIRECTIVE_ARG): Rename to...
4593 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
4594 (SC_AT_DIRECTIVE_SKIP_WS): Update.
4595 (scan_skel): Move yylex_destroy to...
4596 (skel_scanner_free): ... here.
4597 * tests/skeletons.at (installed skeleton file name): Rename to...
4598 (installed skeleton file names): ... this.
4599
4600 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
4601
4602 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4603 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
4604 Summary" not "Directives".
4605 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
4606 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
4607 since the former is now the more complete one.
4608 (Prologue Alternatives): Likewise and do the same for %defines.
4609 (Table of Symbols): Add summary of %code, add summary of %define, and
4610 move full %code documentation to...
4611 (Decl Summary): ... here for consistency with other entries in these
4612 sections.
4613 Move %define entry in order to keep this list alphabetized.
4614 Reword %define entry a little to put less emphasis on the skeleton
4615 concept, which most users shouldn't have to think about.
4616
4617 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
4618
4619 Adjust to recent gnulib changes.
4620 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
4621 Add string.h, string_.h, unistd_.h, wchar_.h.
4622 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
4623 * src/system.h: Don't include <stpcpy.h>; this is now done by
4624 <string.h>.
4625
4626 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
4627
4628 Simplify implementation of unqualified %code, implement macros for
4629 uniform treatment of boolean %define flags. Document %define.
4630 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
4631 b4_percent_code_ifdef): New.
4632 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
4633 * data/c++.m4: Define default value for global_tokens_and_yystype.
4634 * data/glr.cc: Likewise.
4635 * data/location.cc: Use b4_percent_define_flag_if.
4636
4637 * doc/bison.texinfo (Decl Summary): Document %define.
4638
4639 * src/parse-gram.y (Unqualified %code): Change muscle name to
4640 b4_percent_code().
4641 (content.opt): Default to empty.
4642
4643 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
4644
4645 Implement support for relative and absolute skeleton file names.
4646 Discussed starting at
4647 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
4648 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
4649 (Bison Options): Document in --skeleton entry.
4650 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
4651 full_skeleton can't necessarily hold all of pkgdatadir.
4652 If the specified skeleton file name contains a `/', don't prepend
4653 pkgdatadir.
4654 * src/parse-gram.y (prologue_declaration): If the specified skeleton
4655 file name contains a `/', prepend the grammar file directory.
4656 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
4657 * skeletons.at: New file.
4658 (relative skeleton file names): New test case.
4659 (installed skeleton file names): New test case.
4660 * tests/testsuite.at: Include skeletons.at.
4661
4662 * bootstrap: Update copyright to 2007.
4663
4664 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
4665
4666 * bootstrap: Remove occurrences of .#bootmp from the files.
4667
4668 2007-01-17 Akim Demaille <akim@epita.fr>
4669
4670 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
4671 nonterminals.
4672 Use per-type %printer.
4673
4674 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
4675
4676 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
4677 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4678 djgpp/config.site, src/files.c, src/files.h, src/main.c,
4679 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
4680 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
4681 tests/glr-regression.at, tests/input.at, tests/local.at,
4682 tests/output.at, tests/torture.at: Update copyright to 2007.
4683
4684 2007-01-16 Akim Demaille <akim@epita.fr>
4685
4686 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
4687 error code.
4688 (Calc++ Scanner): Exit with failure if we can't open the input
4689 file.
4690 Accept "-" standing for stdin.
4691 (Calc++ Top Level): Print the result only if the parsing was
4692 successful.
4693
4694 2007-01-16 Akim Demaille <akim@epita.fr>
4695
4696 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
4697
4698 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
4699 and Joel E. Denny <jdenny@ces.clemson.edu>
4700
4701 Clean up %define and %code implementation in M4 some. Most
4702 importantly, rename all related macros to be in the b4_percent_define
4703 and b4_percent_code namespaces. Also, complete support for `.' in
4704 %define variable names and %code qualifiers.
4705 * data/bison.m4 (b4_check_user_names): Check for special
4706 "SKELETON-NAMESPACE(name)" macros instead of using two nested
4707 m4_foreach loops.
4708 (b4_get_percent_define, b4_get_percent_code): Rename to...
4709 (b4_percent_define_get, b4_percent_code_get): ... these.
4710 Extend documentation with examples.
4711 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
4712 b4_percent_define_skeleton_variables and
4713 b4_percent_code_skeleton_qualifiers.
4714 Expect any value for the %define variable `foo' to be stored in the
4715 macro named `b4_percent_define(foo)'; expect any %code blocks for the
4716 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
4717 expect any unqualified %code blocks to be stored in a macro named
4718 `b4_percent_code_unqualified'.
4719 Use m4_indir so that %define variable names and %code qualifiers can
4720 contain `.', which is allowed by the grammar parser.
4721 (b4_percent_define_default): New macro to set a default value for a
4722 %define variable.
4723 (m4_wrap): Update wrapped code, and fix some underquoting.
4724 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
4725 Expect grammar uses of %define variables and %code qualifiers to be
4726 defined in b4_percent_define_user_variables and
4727 b4_percent_code_user_qualifiers.
4728 * data/c++.m4: Use b4_percent_define_default rather than
4729 m4_define_default. Fix some underquoting. Skeleton usage of %define
4730 variable define_location_comparison now implies skeleton usage of
4731 %define variable filename_type.
4732 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4733 data/push.c, data/yacc.c: Update macro names.
4734 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
4735 muscle names.
4736
4737 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4738
4739 DJGPP specific issues.
4740
4741 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
4742 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
4743
4744 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4745
4746 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
4747 run parsers in all tests so that Valgrind is invoked during
4748 maintainer-check-valgrind.
4749 (Duplicate representation of merged trees): Free all semantic values.
4750 (Duplicated user destructor for lookahead): Likewise.
4751
4752 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4753
4754 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
4755 command-line prefix.
4756 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
4757 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
4758 miss Valgrind messages.
4759 (Exploding the Stack Size with Malloc): Likewise.
4760
4761 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4762
4763 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
4764 locals. Reported by Juan Manuel Guerrero at
4765 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
4766 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
4767 Fix some indentation also.
4768 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
4769 explaining this issue.
4770
4771 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
4772 and Joel E. Denny <jdenny@ces.clemson.edu>
4773
4774 Simplify union and prologue handling, and escape union and lex/parse
4775 params with digraphs.
4776 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
4777 values to the empty string since these are no longer guaranteed
4778 initialized by the front-end.
4779 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
4780 braces around b4_user_stype since this is no longer done by the
4781 front-end.
4782 * src/files.c, src/files.h (pre_prologue_obstack,
4783 post_prologue_obstack): Remove.
4784 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
4785 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
4786 with digraphs. This fixes lex params and parse params.
4787 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
4788 * src/output.c (prepare): Remove muscle insertion of the prologues.
4789 (output): Remove freeing of pre_prologue_obstack and
4790 post_prologue_obstack.
4791 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
4792 than prologue_augment for prologue parsing so you don't need prologue
4793 obstacks.
4794 (grammar_declaration): For %union RHS, use `braceless' instead of
4795 "{...}" so that braces are already stripped and code is escaped with
4796 digraphs.
4797 * src/reader.c (prologue_augment): Remove.
4798 (reader): Remove initialization of pre_prologue_obstack and
4799 post_prologue_obstack.
4800 * src/reader.h (prologue_augment): Remove.
4801
4802 * data/c.m4: Remove stray parenthesis.
4803
4804 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4805
4806 Remove quotes from variables names in %define directives and from
4807 qualifiers in %code directives, and restrict the characters that are
4808 allowed in them to M4-friendly ones. For %define, continue to support
4809 the quoted form as a deprecated feature. Discussed starting at
4810 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
4811 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
4812 %code.
4813 * doc/bison.texinfo (Prologue Alternatives): Update.
4814 (Decl Summary): In %defines entry, update mention of `%code requires'
4815 and `%code provides'.
4816 (C++ Location Values): Update %define uses.
4817 (Calc++ Parser Interface): Likewise.
4818 (Calc++ Parser): Likewise, and update `%code requires' uses.
4819 (Table of Symbols): Update %code documentation.
4820 * src/parse-gram.y (prologue_declaration): For %define variables, use
4821 `variable' instead of `STRING'.
4822 (grammar_declaration): For %code qualifiers, use `ID' instead of
4823 `STRING'.
4824 (variable): New nonterminal that takes an `ID' or a `STRING'.
4825 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
4826 and %define uses.
4827 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
4828 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
4829 (%define errors): Update %define uses.
4830
4831 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4832
4833 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
4834 instead of muscle_insert for %define values so that M4-special
4835 characters are replaced with digraphs.
4836 * tests/input.at (%define errors): Extend to check weird values.
4837
4838 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4839
4840 Instead of having skeletons declare all valid %define variables and
4841 %code qualifiers, provide macros that retrieve the associated values
4842 and build these lists automatically. Thus Bison will now warn when a
4843 variable or qualifier is not used by the skeleton in the current
4844 invocation regardless of whether it might sometimes be used by that
4845 skeleton in other invocations. Also, move all %define value macros to
4846 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
4847 form, which is replaced by %code.
4848 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
4849 (b4_check_user_names): ... this, and change the series of valid name
4850 arguments to a single list argument for names used in the skeleton
4851 similar to the existing list argument for names used in the grammar.
4852 Warn instead of complaining.
4853 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
4854 values and %code code, to format %code code properly, and to build
4855 lists of all %define variables and %code qualifiers used in the
4856 skeleton: b4_skeleton_percent_define_variables and
4857 b4_skeleton_percent_code_qualifiers.
4858 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
4859 Remove, and...
4860 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
4861 the skeleton names lists can finish building first. In place of
4862 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
4863 expect the lists b4_user_percent_define_variables and
4864 b4_user_percent_code_qualifiers.
4865 * data/c++.m4: Where setting default values for b4_parser_class_name,
4866 b4_location_type, b4_filename_type, b4_namespace, and
4867 b4_define_location_comparison, update their names to the
4868 b4_percent_define_ namespace.
4869 * data/glr.c: Don't use b4_check_percent_define_variables and
4870 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
4871 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
4872 (b4_parser_class_name, b4_namespace): Define these using
4873 b4_get_percent_define for parser_class_name and namespace.
4874 * data/location.cc: Use b4_get_percent_define.
4875 * data/push.c: Don't use b4_check_percent_define_variables and
4876 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
4877 * data/yacc.c: Likewise, and don't call m4_exit in
4878 b4_use_push_for_pull_if or m4_wrap code will never execute.
4879 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
4880 Rename to...
4881 (muscle_grow_user_name_list): ... this for consistency with the
4882 terminology used in bison.m4.
4883 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
4884 %define variable names, and rename muscle used_percent_define_variables
4885 to user_percent_define_variables.
4886 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
4887 user_percent_code_qualifiers.
4888 (content): Remove.
4889 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
4890 {CODE} form is no longer accepted.
4891 * tests/input.at (Reject bad %code qualifiers): Rename to...
4892 (Reject unused %code qualifiers): ... this, and update test output.
4893 (%define error): Update test output.
4894
4895 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
4896
4897 Check for unrecognized %define variables similar to checking for
4898 unrecognized %code qualifiers. Check for redefined %define variables.
4899 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
4900 generalizes...
4901 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
4902 (b4_check_percent_define_variables): New, also wraps it.
4903 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
4904 variables using b4_check_percent_define_variables.
4905 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
4906 all those exercised in the test suite and all those listed in the
4907 `Default values' section of c++.m4. Are there others?
4908 * data/push.c, data/yacc.c: Declare no valid %define variables.
4909 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
4910 similar to muscle_find, but it works even when the muscle stores a
4911 const value.
4912 (muscle_grow_used_name_list): New function for constructing the used
4913 name list muscles that b4_check_for_unrecognized_names requires.
4914 * src/parse-gram.y (prologue_declaration): Warn if a variable is
4915 %define'd more than once. Define the b4_used_percent_define_variables
4916 muscle with muscle_grow_used_name_list.
4917 (grammar_declaration): Abbreviate %code code with
4918 muscle_grow_used_name_list.
4919 * tests/input.at (%define errors): New.
4920
4921 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4922
4923 Provide warn_at, complain_at, and fatal_at function callbacks to the
4924 skeletons, and use this for %code qualifier complaints.
4925 * data/bison.m4 (b4_error_at): New, invoked by...
4926 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
4927 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
4928 @fatal_at(...@) directives.
4929 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
4930 qualifiers in b4_used_percent_code_qualifiers and to use
4931 b4_complain_at.
4932 * src/location.c, src/location.h (boundary_set_from_string): New global
4933 function.
4934 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
4935 function.
4936 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
4937 to b4_used_percent_code_qualifiers.
4938 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
4939 function.
4940 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
4941 (lineno): Rename to...
4942 (out_lineno): ... this so I don't misunderstand it again.
4943 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
4944 here; these newlines are in the input but not the output file.
4945 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
4946 (at_directive_perform): ... this new static function, and add handling
4947 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
4948 directives.
4949 * tests/input.at (Reject bad %code qualifiers): Update test output with
4950 locations and extend.
4951
4952 * tests/output.at (Output file name: [, Output file name: ]): Remove
4953 bogus comment about these tests failing.
4954
4955 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4956
4957 Clean up b4_check_percent_code_qualifiers a little.
4958 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
4959 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
4960 documentation and add examples.
4961 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
4962 qualifiers here.
4963
4964 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
4965
4966 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
4967 unreliable -- especially when they're hidden inside another macro.
4968 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
4969 data/c.m4: Remove m4_divert(-1).
4970 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4971 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
4972 m4_divert_push(0) and m4_divert_pop(0).
4973 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
4974 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
4975 pushed and popped by m4sugar, should be first on the stack.
4976
4977 Provide warn, complain, and fatal function callbacks to the skeletons.
4978 This provides more flexibility than m4_fatal, improves the error
4979 message format, and captures messages for translation. Discussed
4980 starting at
4981 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
4982 * data/bison.m4 (b4_error): New, invoked by...
4983 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
4984 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
4985 directives. Because these M4 macros might be called when the current
4986 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
4987 the previous removal of uses of m4_divert, which caused trouble.
4988 (b4_check_percent_code_qualifiers): Use b4_complain instead of
4989 m4_fatal to report unrecognized %code qualifiers.
4990 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
4991 push parser requests.
4992 * data/glr.c: Use b4_complain instead of m4_fatal to report
4993 non-deterministic push parser requests.
4994 Update @output usage to @output(...@) form.
4995 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
4996 report missing %defines. Update @output usage to @output(...@) form.
4997 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
4998 @output(...@) form.
4999 * src/main.c (main): Invoke skel_scanner_free.
5000 * src/scan-skel.h (skel_scanner_free): Prototype new function.
5001 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
5002 obstack_for_string from flex-scanner.h.
5003 (YY_DECL): Use to declare skel_lex static.
5004 (decode_at_digraphs): Remove; now handled in the new
5005 SC_AT_DIRECTIVE_ARG start condition.
5006 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
5007 functions.
5008 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
5009 at_directive_argv): New static globals.
5010 (INITIAL): Use fail_for_invalid_at.
5011 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
5012 recognize the start of a generalized `@directive(...@)' form and
5013 start...
5014 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
5015 directive args (using the new obstack_for_string), to decode the
5016 contained @ diagraphs, and to perform the directive. It recognizes
5017 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
5018 @output(...@).
5019 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
5020 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
5021 `@,'.
5022 (scan_skel): Initialize obstack_for_string on the first call.
5023 (skel_scanner_free): New function to free obstack_for_string.
5024 * tests/input.at (Reject bad %code qualifiers): Update test output.
5025
5026 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
5027
5028 Consolidate the 4 prologue alternative directives (%code, %requires,
5029 %provides, and %code-top) into a single %code directive with an
5030 optional qualifier field. Discussed at
5031 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
5032 * NEWS (2.3a+): Rewrite the existing entry for the prologue
5033 alternatives.
5034 * doc/bison.texinfo (Prologue Alternatives): Update.
5035 (Decl Summary): Update to %code "requires" and %code "provides".
5036 (Calc++ Parser): Update to %code "requires".
5037 (Table of Symbols): Remove entries for %requires, %provides, and
5038 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
5039 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
5040 are replaced by b4_percent_code_provides and b4_percent_code_requires,
5041 which are skeleton-specific.
5042 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
5043 declare what %code qualifiers it supports and to complain if any other
5044 qualifiers were used in the grammar.
5045 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
5046 and b4_user_code([b4_percent_code_provides]) in place of
5047 b4_user_requires and b4_user_provides.
5048 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
5049 Add b4_user_code([b4_percent_code_top]) and
5050 b4_user_code([b4_percent_code]).
5051 Invoke b4_check_percent_code_qualifiers.
5052 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5053 PERCENT_REQUIRES): Remove.
5054 (grammar_declaration): Remove RHS's for %code-top, %provides, and
5055 %requires. Rewrite the %code RHS as the unqualified form defining the
5056 muscle b4_percent_code. Add another RHS for the qualified %code form,
5057 which defines muscles of the form b4_percent_code_QUALIFIER and the
5058 b4_used_percent_code_qualifiers muscle.
5059 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5060 PERCENT_REQUIRES): Remove.
5061 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
5062 %code "requires" and %code "provides".
5063 * tests/input.at (Reject bad %code qualifiers): New.
5064
5065 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5066
5067 Use the new code_props interface for destructors and printers.
5068 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
5069 printer_location members, and change the type of the destructor and
5070 printer members to code_props.
5071 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
5072 symbol_printer_get, semantic_type_destructor_set,
5073 semantic_type_printer_set, default_tagged_destructor_set,
5074 default_tagless_destructor_set, default_tagged_printer_set,
5075 default_tagless_printer_set): Use code_props in arguments and return
5076 types in place of char const * and location.
5077 (symbol_destructor_location_get, symbol_printer_location_get): Remove
5078 since the locations are now contained in the return of
5079 symbol_destructor_get and symbol_printer_get.
5080 * src/output.c (symbol_destructors_output, symbol_printers_output):
5081 Replace with...
5082 (symbol_code_props_output): ... this to eliminate duplicate code.
5083 (output_skeleton): Update to use symbol_code_props_output.
5084 * src/reader.c (symbol_should_be_used): Update use of
5085 symbol_destructor_get.
5086 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
5087 Update uses of the various _destructor_set and _printer_set functions.
5088 * src/symtab.c: (default_tagged_destructor_location,
5089 default_tagless_destructor_location, default_tagged_printer_location,
5090 default_tagless_printer_location): Remove since we...
5091 (default_tagged_destructor, default_tagless_destructor,
5092 default_tagged_printer, default_tagless_printer): ... change the type
5093 of these to code_props.
5094 (symbol_new, semantic_type_new, symbol_destructor_set,
5095 semantic_type_destructor_set, symbol_destructor_get,
5096 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
5097 symbol_check_alias_consistency, default_tagged_destructor_set,
5098 default_tagless_destructor_set, default_tagged_printer_set,
5099 default_tagless_printer_set): Update.
5100 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
5101 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
5102 code_props members.
5103 (symbol_print): Use SYMBOL_CODE_PRINT.
5104
5105 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5106
5107 Use the new code_props interface for rule actions.
5108 * src/symlist.h (symbol_list): Replace action, action_location, and
5109 used members with a code_props action_props member.
5110 * src/reader.c (symbol_should_be_used, grammar_rule_check,
5111 grammar_midrule_action, grammar_current_rule_merge_set,
5112 grammar_current_rule_symbol_append, packgram): Update.
5113 * src/scan-code.h (translate_rule_action): Remove, no longer used.
5114 * src/scan-code.l (handle_action_dollar): Update.
5115 (translate_rule_action): Remove, no longer used.
5116 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
5117
5118 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5119
5120 Use the new code_props interface in parse-gram.y.
5121 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
5122 Update all uses of translate_* functions to use the new code_props
5123 interface and to use gram_scanner_last_string_free and
5124 code_scanner_last_string_free where possible.
5125 (grammar_declaration): symbol_list_destructor_set and
5126 symbol_list_printer_set now perform the translation, so don't do it
5127 here. Use gram_scanner_last_string_free where possible.
5128 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
5129 translate_code): Remove, no longer used.
5130 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
5131 symbol_list_printer_set): Perform code translation here rather than
5132 depending on the caller to do so.
5133
5134 * src/symlist.h (struct symbol_list): Correct some documentation typos.
5135 * src/scan-gram.h (gram_last_string): Remove declaration.
5136 * src/scan-gram.l (last_string): Declare it static.
5137
5138 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5139
5140 Encapsulate code properties and related functionality for the various
5141 destructors, printers, and actions into a code_props structure and
5142 interface. This patch merely implements code_props in scan-code.h and
5143 scan-code.l. Future patches will rewrite other modules to use it.
5144 Discussed starting at
5145 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
5146 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
5147 consistently initialize const structs that have an empty location
5148 field.
5149 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
5150 to ensure consistency.
5151 * src/scan-code.h (code_props): New structure.
5152 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
5153 function, macro, and const global variable for initializing a
5154 code_props with no code.
5155 (code_props_plain_init, code_props_symbol_action_init,
5156 code_props_rule_action_init, code_props_translate_code): The rest of
5157 the new code_props functional interface. Among other things, the init
5158 functions set the code_props kind field so that
5159 code_props_translate_code will know whether to behave like
5160 translate_symbol_action, translate_rule_action, or translate_code.
5161 These old translate functions must remain until all other modules are
5162 updated to use the new code_props interface.
5163 (code_scanner_last_string_free): New function similar to
5164 gram_scanner_last_string_free.
5165 (code_scanner_free): Add documentation.
5166 * src/scan-code.l: Implement the new interface.
5167 (code_lex): Make it static, add a code_props* argument, and remove the
5168 rule argument.
5169 (last_string): New static global similar to the one in scan-gram.l.
5170 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
5171 instead of rule.
5172 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
5173 code_props since Bison may one day use this information for destructors
5174 and printers.
5175 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
5176 (handle_action_dollar): Use symbol_list_n_get and set used flag
5177 directly since symbol_list_n_used_set is removed.
5178 (translate_action): Add a code_props* argument and remove the rule,
5179 action, and location arguments. Pass the code_props* on to code_lex.
5180 (translate_rule_action, translate_symbol_action, translate_code):
5181 Rewrite as wrappers around the new code_props interface.
5182 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
5183 it would eventually need to break the encapsulation of code_props.
5184
5185 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5186
5187 * etc/.cvsignore: New.
5188
5189 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5190
5191 Add maintainer-push-check to run maintainer-check using push parsing in
5192 place of pull parsing where available.
5193 * Makefile.am (maintainer-push-check): New.
5194 * data/bison.m4 (b4_use_push_for_pull_if): New.
5195 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
5196 appropriately based on their existing values.
5197 (yypush_parse): Don't print push-parser-specific diagnostics if push
5198 parsing is being used in place of pull parsing.
5199 * data/yacc.c: If push parsing should replace pull parsing, redirect to
5200 push.c.
5201 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
5202 variable, and insert b4_use_push_for_pull_flag into muscles.
5203 * tests/Makefile.am (maintainer-push-check): New.
5204
5205 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5206
5207 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
5208 (whether successful or failed) so that yypush_parse can be invoked
5209 again to start a new parse using the same yypstate.
5210 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
5211 check multiple yypull_parse invocations on the same yypstate. For pull
5212 mode, extend to check multiple yyparse invocations.
5213 (Exploding the Stack Size with Alloca): Extend to try with
5214 %push-pull-parser.
5215 (Exploding the Stack Size with Malloc): Likewise.
5216
5217 * tests/calc.at (Simple LALR Calculator): Don't specify
5218 %skeleton "push.c" since %push-pull-parser implies that now.
5219 * tests/headers.at (export YYLTYPE): Don't check for the push
5220 declarations. Otherwise, this test case can't be used to see if push
5221 mode can truly emulate pull mode.
5222 * tests/input.at (Torturing the Scanner): Likewise.
5223 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
5224 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
5225 AT_YACC_IF, which now includes the case of push mode since %skeleton
5226 need not be used for push mode. This will be more intuitive once
5227 push.c is renamed to yacc.c.
5228
5229 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5230
5231 For push mode, convert yyparse from a macro to a function, invoke yylex
5232 instead of passing a yylexp argument to yypull_parse, and don't
5233 generate yypull_parse or yyparse unless %push-pull-parser is declared.
5234 Discussed starting at
5235 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
5236 * data/bison.m4 (b4_pull_if): New.
5237 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
5238 * data/push.c: Improve M4 quoting a little.
5239 (b4_generate_macro_args, b4_parenthesize): Remove.
5240 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
5241 any time a pull parser is requested.
5242 Don't #define this as a wrapper around yypull_parse. Instead, when
5243 both push and pull are requested, make it a function that does that
5244 same thing.
5245 (yypull_parse): If there's a b4_prefix, #define this to
5246 b4_prefix[pull_parse] when both push and pull are requested.
5247 Don't define this as a function unless both push and pull are
5248 requested.
5249 Remove the yylexp argument and hard-code yylex invocation instead.
5250 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
5251 %push-parser.
5252 * src/getargs.c (pull_parser): New global initialized to true.
5253 * getargs.h (pull_parser): extern it.
5254 * src/output.c (prepare): Insert pull_flag muscle.
5255 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
5256 (prologue_declaration): Set both push_parser and pull_parser = true for
5257 %push-pull-parser. Set push_parser = true and pull_parser = false for
5258 %push-parser.
5259 * src/scan-gram.l: Don't accept %push_parser as an alternative to
5260 %push-parser since there's no backward-compatibility concern here.
5261 Scan %push-pull-parser.
5262 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
5263 instead of %push-parser.
5264 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
5265 prototype it in the module that calls yyparse.
5266 * tests/input.at (Torturing the Scanner): Likewise.
5267 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
5268
5269 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
5270
5271 Update etc/bench.pl. Optimize push mode a little (the yyn change
5272 deserves most of the credit).
5273 * Makefile.am (SUBDIRS): Add etc subdirectory.
5274 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
5275 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
5276 yytoken, yyval, and yyloc declarations to...
5277 (yyparse or yypush_parse): ... here to improve performance. For
5278 yypush_parse invocations after the first, be sure to assign yyn its old
5279 value again.
5280 (yypstate_new): Don't bother initializing the yyresult field since the
5281 initial value isn't used.
5282 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
5283 remove the #define that, in push mode, set it to yyps->NAME.
5284 * etc/Makefile.am: New.
5285 * etc/bench.pl: Remove and build it instead from...
5286 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
5287 "tests/bison" from the build directory by default rather than just
5288 invoking "bison" from $PATH.
5289 (calc_grammar): Update push parser code: don't declare yylval globally,
5290 don't define yyparse_wrapper, and don't #define yyparse.
5291 (bench_grammar): Update to check all working combinations of yacc.c,
5292 push.c, impure, pure, pull, and push.
5293
5294 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5295
5296 For push mode, add pull wrappers around yypush_parse.
5297 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
5298 (yypull_parse): New function wrapping yypush_parse.
5299 (yyparse): New #define wrapping yypull_parse.
5300 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
5301 is declared.
5302 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
5303 prototype yylex in the module that calls yyparse, and don't prototype
5304 yyparse there. Otherwise, the yyparse expansion won't compile.
5305 * tests/input.at (Torturing the Scanner): Likewise.
5306
5307 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5308
5309 Enable push parsers to operate in impure mode. Thus, %push-parser no
5310 longer implies %pure-parser. The point of this change is to move
5311 towards being able to test the push parser code by running the entire
5312 test suite as if %push-parser had been declared.
5313 * data/push.c (yypush_parse): For impure mode, remove the
5314 yypushed_char, yypushed_val, and yypushed_loc arguments.
5315 Instead, declare these as local variables initialized to the global
5316 yychar, yylval, and yylloc.
5317 For the first yypush_parse invocation only, restore the initial values
5318 of these global variables when it's time to read a token since they
5319 have been overwritten.
5320 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
5321 %push-parser.
5322 * tests/calc.at (Simple LALR(1) Calculator): Always declare
5323 %pure-parser along with %push-parser since this test case was designed
5324 for pure push parsers.
5325 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
5326 (AT_YACC_OR_PUSH_IF): New.
5327 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
5328 add a note that it's still wrong for some cases (as it has been for a
5329 while).
5330 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
5331 %push-parser no longer implies %pure-parser.
5332
5333 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5334
5335 Remove some unnecessary differences between the pull parser code and
5336 the push parser code. This patch enables yynerrs in push mode.
5337 * data/push.c: Reformat M4 a little.
5338 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
5339 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
5340 because push mode is on. Instead, if pure mode is on, move yynerrs
5341 to...
5342 (b4_declare_parser_state_variables): ... here.
5343 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
5344 to yyps->NAME so it can be used in yypush_parse.
5345 (yypush_parse): Don't omit uses of yynerrs in push mode.
5346
5347 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5348
5349 Fix bug such that the first pushed token's value and location are
5350 sometimes overwritten (sometimes by %initial-action) before being used.
5351 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
5352 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
5353 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
5354 more closely mimic the pull parser logic.
5355 Don't copy the pushed token to yychar, yylval, and yylloc until it's
5356 time to read a token, which is after any initialization of yylval and
5357 yylloc.
5358 (gottoken): Rename label to...
5359 (yyread_pushed_token): ... for clarity and to avoid infringing on the
5360 user namespace.
5361
5362 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5363
5364 Rearrange initialization of the parser state variables so that the
5365 skeleton doesn't have to have a copy for pull mode and another for push
5366 mode. This patch also fixes at least a bug such that yylloc was not
5367 initialized (with b4_location_initial_line and
5368 b4_location_initial_column) upon calling yypush_parse. However, that
5369 initialization now overwrites the first token's location;
5370 %initial-action assigning @$ already did the same thing, and both bugs
5371 will be fixed in a later patch.
5372 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
5373 (b4_declare_parser_state_variables): Remove initialization of yytoken,
5374 yyss, yyvs, yyls, and yystacksize.
5375 (yypstate_new): Remove initialization of some yypstate fields: yystate,
5376 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
5377 yylsp.
5378 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
5379 yyps->NAME so it can be used in yypush_parse.
5380 (yyparse or yypush_parse): For yypush_parse, don't print the
5381 "Starting parse" diagnostic for invocations after the first.
5382 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
5383 yypush_parse, only do it for the first invocation.
5384 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
5385 initialization to occur in yypush_parse but only on the first
5386 invocation.
5387
5388 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5389
5390 * data/push.c: Add CPP guards around push parser declarations in both
5391 the header and the code file.
5392 In the code file, move the push parser declarations to the same place
5393 they appear in the header file.
5394 Clean up the M4 some, especially the inconsistent underquoting in
5395 some b4_c_function_def and b4_c_function_decl uses.
5396
5397 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5398
5399 Encapsulate the push parser state variables into an M4 macro so the
5400 push skeleton doesn't have to list them again for pull mode's yyparse.
5401 For push mode, remove yypush_parse's local equivalents of these
5402 variables to eliminate unnecessary copying between the two sets at
5403 run-time. This patch also fixes at least a bug related to multiple
5404 %initial-action invocations in push mode.
5405 * data/push.c (b4_declare_parser_variables): Rename to...
5406 (b4_declare_scanner_communication_variables): ... this for clarity and
5407 update both uses.
5408 (b4_declare_yyparse_variables): Remove and move its contents to the one
5409 spot where it was invoked.
5410 (b4_declare_parser_state_variables): New macro containing the parser
5411 state variables required by push mode.
5412 (struct yypstate): Replace all fields but yynew with
5413 b4_declare_parser_state_variables.
5414 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
5415 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
5416 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
5417 (yyparse or yypush_parse): For yyparse in pull mode, replace local
5418 parser state variable declarations with
5419 b4_declare_parser_state_variables.
5420 Don't initialize parser state variables when calling yypush_parse since
5421 yypstate_new already does that.
5422 Invoke the user's initial action only upon the first yypush_parse
5423 invocation.
5424 Remove all code that copies between the local parser state variables
5425 and the yypstate.
5426
5427 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5428
5429 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
5430 prevent a name collision in a future patch where these names will
5431 sometimes be #define'd.
5432 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
5433 since it no longer has the same name as the existing argument.
5434 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
5435
5436 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
5437 and Joel E. Denny <jdenny@ces.clemson.edu>
5438
5439 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
5440 that the argument is case-insensitive, and there's no `=' here.
5441 For the %skeleton entry, mention that %language is better.
5442 (Bison Options): Likewise for --language and --skeleton. Move the
5443 --skeleton entry so that the `Tuning the parser' section is sorted
5444 alphabetically on long options.
5445 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
5446 %language directive in detail here; cross-reference the %language
5447 documentation instead.
5448 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
5449 `%require "2.3b"' so that the example is always up-to-date.
5450 (Table of Symbols): Add entries for %language and %skeleton.
5451 * examples/extexi (normalize): Instead of replacing every %require
5452 argument with the current Bison version, just substitute for
5453 `@value{VERSION}'. This guarantees that we're testing what actually
5454 appears in the documentation.
5455 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
5456 rather than `@VERSION@'.
5457
5458 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
5459
5460 * NEWS: Reword the %language news a bit, and put it earlier.
5461
5462 * src/getargs.c (skeleton_arg): Last arg is now location const *.
5463 Rewrite to simplify the logic.
5464 (language_argmatch): Likewise.
5465 (program_name): We now own this var.
5466 * src/getargs.h (struct bison_language): Use char[] rather than
5467 const char *.
5468
5469 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
5470 Java is supported.
5471 * src/complain.c (program_name): Remove decl; no longer needed.
5472 * src/main.c (program_name): Remove; now belongs to getargs.
5473
5474 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
5475
5476 * NEWS: Document %language.
5477
5478 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
5479
5480 * data/c-skel.m4, data/c++-skel.m4: New files.
5481 * data/glr.c: Complain on push parsers.
5482
5483 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
5484 over %skeleton.
5485 (Decl Summary): Document %language and %skeleton.
5486 (Command line): Document -L.
5487
5488 * examples/extexi: Rewrite %require directive.
5489 * examples/calc++/Makefile.am: Pass VERSION to extexi.
5490
5491 * src/files.c (compute_exts_from_gc): Look in language structure
5492 for .y extension.
5493 (compute_file_name_parts): Check whether .tab should be added.
5494 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
5495 (language, skeleton_arg, language_argmatch): New.
5496 (long_options): Add --language.
5497 (getargs): Use skeleton_arg, add -L/--language.
5498 * src/getargs.h: Include location.h.
5499 (struct bison_language, language, skeleton_arg, language_argmatch): New.
5500 * src/output.c (prepare): Pick default skeleton from struct language.
5501 Don't dispatch C skeletons here.
5502 * src/parse-gram.y (PERCENT_LANGUAGE): New.
5503 (prologue_declaration): Add "%language" rule, use skeleton_arg.
5504 * src/scan-gram.l ("%language"): New rule.
5505
5506 * tests/calc.at: Test %skeleton and %language.
5507 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
5508 (AT_GLR_IF): Look for %skeleton "glr.cc".
5509 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
5510 (AT_YACC_IF): Reject %language.
5511
5512 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
5513
5514 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
5515 since it wasn't used; only the typedef name 'semantic_type' is needed.
5516 Also, omit trailing white space.
5517
5518 * bootstrap: Sync from coreutils.
5519 (gnulib_extra_files): Add build-aux/announce.gen.
5520 (slurp): Adjust .gitignore files like .cvsignore files.
5521 * build-aux/announce-gen: Remove from CVS, since bootstrap
5522 now creates this.
5523
5524 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
5525
5526 Make %push-parser imply %pure-parser. This fixes several bugs; see
5527 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
5528 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
5529 pure_parser = true.
5530 * data/push.c: Don't bother testing b4_push_if when deciding whether
5531 to expand b4_declare_parser_variables globally.
5532 (yypush_parse): Likewise in here.
5533
5534 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
5535 (yy_reduce_print): Reformat M4 for readability.
5536
5537 2006-12-15 Bob Rossi <bob@brasko.net>
5538 and Joel Denny <jdenny@ces.clemson.edu>
5539
5540 * data/push.c (yypstate): Add typedef, and update all uses of
5541 struct yypstate to just yypstate.
5542 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
5543
5544 2006-12-14 Bob Rossi <bob@brasko.net>
5545
5546 * data/push.c (yypush_parse): Declare prototype regardless of
5547 %locations option.
5548
5549 2006-12-14 Bob Rossi <bob@brasko.net>
5550
5551 * data/push.c (yyparse): Remove the prototype and the #define when in
5552 push-parser mode.
5553
5554 2006-12-13 Bob Rossi <bob@brasko.net>
5555
5556 * data/push.c (yypstate_init): Rename to...
5557 (yypstate_new): ... this and use b4_c_function_def.
5558 (yypstate_delete): New.
5559 (yypush_parse): Change parameters yynval and yynlloc to be const.
5560 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
5561 yypstate_delete functions.
5562
5563 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
5564
5565 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
5566 strange test case titles. Reported by Bob Rossi.
5567
5568 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
5569
5570 * TODO: Add pointer to Sylvain Schmitz's work on static detection
5571 of potential ambiguities in GLR grammers.
5572
5573 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
5574
5575 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
5576 `bison ', use m4_index instead of m4_substr since chopping up a string
5577 containing M4-special characters causes problems here.
5578
5579 Fix a couple of bugs related to special characters in user-specified
5580 file names, and make it easier for skeletons to compute output file
5581 names with the same file name prefix as Bison-computed output file
5582 names.
5583 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
5584 b4_parser_file_name and b4_spec_defines_file instead of
5585 @output_parser_name@ and @output_header_name@, which are now redundant.
5586 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
5587 b4_parser_file_name, b4_spec_defines_file, and the new
5588 @basename(FILENAME@) instead of @output_parser_name@ and
5589 @output_header_name@, which inappropriately escaped the file names as
5590 C string literals.
5591 * src/files.c (all_but_ext): Remove static qualifier.
5592 (compute_output_file_names): Move `free (all_but_ext)' to...
5593 (output_file_names_free): ... here since all_but_ext is needed later.
5594 * src/files.h (all_but_ext): Extern.
5595 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
5596 exactly what MUSCLE_INSERT_STRING used to do.
5597 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
5598 characters are escaped properly.
5599 * src/output.c (prepare): Define muscle file_name_all_but_ext as
5600 all_but_ext.
5601 For pkgdatadir muscle, maintain previous functionality by using
5602 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
5603 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
5604 digraphs would never be expanded. Hopefully no one has M4-special
5605 characters in his Bison installation path.
5606 * src/scan-skel.l: Don't parse @output_header_name@ and
5607 @output_parser_name@ anymore since they're now redundant.
5608 In @output, use decode_at_digraphs.
5609 Parse a new @basename command that invokes last_component.
5610 (decode_at_digraphs): New.
5611 (BASE_QPUTS): Remove unused.
5612 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
5613 (Output file name): New tests.
5614
5615 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
5616
5617 Warn about output files that are generated by the skeletons and that
5618 conflict with other output files.
5619 * data/glr.c: Don't generate the header file here when glr.cc does.
5620 * src/files.c (file_names, file_names_count): New static globals.
5621 (compute_output_file_names): Invoke output_file_name_check for files
5622 not generated by the skeletons and remove existing checks.
5623 (output_file_name_check): New function that warns about conflicting
5624 output file names.
5625 (output_file_names_free): Free file_names.
5626 * src/files.h (output_file_name_check): Declare.
5627 * src/scan-skel.l: Invoke output_file_name_check for files generated by
5628 the skeletons.
5629 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
5630 (Conflicting output files): New tests.
5631
5632 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5633
5634 * doc/bison.texinfo: Fix a couple of typos.
5635
5636 2006-12-08 Bob Rossi <bob@brasko.net>
5637
5638 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
5639 Rename to...
5640 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
5641 update all uses.
5642 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
5643 (yypush_parse): Rename yypvars argument to yyps and remove redundant
5644 local pv.
5645 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
5646 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
5647
5648 2006-12-07 Bob Rossi <bob@brasko.net>
5649 and Joel Denny <jdenny@ces.clemson.edu>
5650
5651 * data/push.c (yypvarsinit): Change return type from void* to struct
5652 yypvars*. No longer cast to void* on return.
5653 (struct yypvars): Remove yylen since it need not be remembered between
5654 yypushparse invocations.
5655 (yypushparse): Don't copy between yylen and pv->yylen.
5656
5657 2006-12-05 Bob Rossi <bob@brasko.net>
5658
5659 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
5660 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
5661 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
5662 (struct yypvars): Remove b4_declare_parser_variables.
5663 (yypvarsinit): Remove init code for removed variables.
5664 (global scope): Do not declare b4_declare_parser_variables if
5665 push or pure mode.
5666 (yypushparse): Add b4_declare_parser_variables.
5667 Init new local variables, and remove init code for removed
5668 yypvars variables.
5669 (yyparse): Delete.
5670 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
5671 and yyparse for other modes.
5672 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
5673 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
5674 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
5675 (AT_PURE_LEX_IF): True if pure or push parser.
5676
5677 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
5678
5679 Document Yacc prologue alternatives and default %destructor's and
5680 %printer's as experimental. Don't mention Java yet. Discussed at
5681 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
5682 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
5683 (2.3a): Annotate this entry to say the old forms of these features were
5684 also experimental.
5685 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
5686 Table of Symbols): Say they're experimental. Comment out any mention
5687 of Java (we'll want this back eventually).
5688
5689 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
5690
5691 Support a file name argument to %defines. Deprecate `=' in
5692 %file-prefix, %name-prefix, and %output. Discussed at
5693 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
5694 * NEWS (2.3a+): Mention.
5695 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
5696 form of %defines, and remove `=' from entries for %file-prefix,
5697 %name-prefix, and %output.
5698 * src/parse-gram.y (prologue_declaration): Implement.
5699 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
5700 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
5701 all but one occurrence of %name-prefix.
5702 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
5703 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
5704 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
5705 occurrence of each of %file-prefix and %output. Add check for %defines
5706 with argument.
5707 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
5708 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
5709 Remove the `=' from %output.
5710
5711 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
5712
5713 Don't escape $ in test case titles since Autoconf 2.61 now does that
5714 correctly.
5715 * tests/actions.at (Default %printer and %destructor are not for error
5716 or $undefined): Here.
5717 (Default %printer and %destructor are not for $accept): Here.
5718 * tests/input.at (Invalid $n and @n): Here.
5719
5720 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
5721
5722 Rename <!> to <>. Discussed starting at
5723 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
5724 * NEWS (2.3a+): Update.
5725 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
5726 Update.
5727 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
5728 * src/scan-gram.l (INITIAL): Implement.
5729 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
5730 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
5731 comment.
5732 * tests/actions.at (Default tagless %printer and %destructor,
5733 Default tagged and per-type %printer and %destructor,
5734 Default %printer and %destructor are not for error or $undefined,
5735 Default %printer and %destructor are not for $accept,
5736 Default %printer and %destructor for mid-rule values): Update.
5737 * tests/input.at (Default %printer and %destructor redeclared,
5738 Unused values with default %destructor): Update.
5739
5740 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
5741
5742 Don't let %prec take a nonterminal.
5743 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
5744 token.
5745 * tests/input.at (%prec takes a token): New test checking that %prec
5746 won't take a nonterminal.
5747
5748 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5749
5750 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
5751 it was double-quoted.
5752 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
5753 grammar is maintained with Bison's highest standards.
5754 * src/getargs.c: Fix some typos in Doxygen comments.
5755
5756 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5757
5758 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
5759 later. Reported by Paul Eggert in
5760 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
5761 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
5762 * src/scan-code.l (translate_action): Don't bother invoking
5763 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
5764 (code_scanner_free): Instead of invoking
5765 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
5766 which frees more.
5767 * src/scan-gram.l (gram_scanner_free): Likewise.
5768 * src/scan-skel.l (scan_skel): Likewise.
5769
5770 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
5771
5772 * src/files.c (tr): Change return type to void.
5773 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
5774 has been called previously for the same key.
5775 (muscle_find): Return storage instead of value so that
5776 --enable-gcc-warnings doesn't produce warnings that the return discards
5777 const. aver that the value and storage are the same since storage
5778 could potentially be NULL when value is not.
5779 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
5780 same as 0.
5781
5782 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
5783
5784 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
5785 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
5786 us a slightly cleaner distribution, and also works.
5787 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
5788 gnulib changes.
5789
5790 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
5791 and Paul Eggert <eggert@cs.ucla.edu>
5792
5793 Don't let Bison leak memory except when it complains.
5794 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
5795 (spec_defines_file, dir_prefix): Now char *, not const char *,
5796 since they are freed.
5797 * src/files.c: Likewise.
5798 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
5799 Likewise.
5800 (tr): Now operates in-place. All uses changed.
5801 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
5802 values.
5803 (compute_file_name_parts, compute_output_file_names): Don't store
5804 read-only data in variables that will be freed.
5805 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
5806 src_extension, and header_extension.
5807 (output_file_names_free): New public function to free
5808 spec_verbose_file, spec_graph_file, spec_defines_file,
5809 parser_file_name, and dir_prefix.
5810 * src/getargs.c (getargs): Don't store read-only data in variables that
5811 will be freed.
5812 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
5813 (which previously existed but was unused), and quotearg_free.
5814 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
5815 * src/muscle_tab.c: Likewise.
5816 (muscle_entry): Make the value char const *,
5817 and add a new storage member that is char * and can be freed.
5818 (muscle_entry_free): New private function.
5819 (muscle_init): Use it instead of free.
5820 (muscle_insert, muscle_grow): Update and use new storage member.
5821 (muscle_code_grow): Free the string passed to muscle_grow
5822 since it's not needed anymore.
5823 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
5824 add a new `char *code' member.
5825 ("{...}"): Declare semantic type as code.
5826 * src/scan-code.h (translate_rule_action):
5827 (translate_symbol_action, translate_code, translate_action): Return
5828 `char const *' rather than `char *' since external code should not free
5829 these strings.
5830 * src/scan-code.l: Likewise.
5831 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
5832 which is "{...}" in the parser.
5833 * tests/Makefile.am (maintainer-check-valgrind): Set
5834 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
5835 Valgrind.
5836 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
5837 complain.
5838 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
5839 expecting a non-zero exit status sets --leak-check=summary and
5840 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
5841 this case, and we don't want to hear about it.
5842
5843 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
5844
5845 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
5846 instead of from the template, to simplify configuration a bit.
5847 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
5848 and m4/wint_t.m4, as they are needed with the latest gnulib.
5849
5850 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5851
5852 Disable unset/unused mid-rule value warnings by default, and recognize
5853 --warnings=midrule-values to enable them. Discussed starting at
5854 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
5855 * NEWS (2.3a+): Mention.
5856 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
5857 warnings): Add entry for midrule-values subargument.
5858 * src/reader.c (symbol_should_be_used): Don't return true just because
5859 the value is a set/used mid-rule value unless
5860 --warnings=midrule-values was specified.
5861 * tests/input.at (Unused values, Unused values before symbol
5862 declarations): Run tests with and without --warnings=midrule-values.
5863
5864 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
5865 than LIST_FREE directly.
5866
5867 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5868
5869 Finish implementing --warnings=error, which should not be implied by
5870 --warnings=all (or by its synonyms -W and --warnings without
5871 subarguments).
5872 * src/complain.c (set_warning_issued): New function to report that
5873 warnings are being treated as errors and to record an error if so.
5874 Invoke...
5875 (warn_at, warn): ... here.
5876 * src/getargs.c (warnings_args, warnings_types): Reorder so that
5877 "error - warnings are errors" does not appear above "all - all of the
5878 above".
5879 (getargs): For -W and --warnings without subarguments, don't let
5880 FLAGS_ARGMATCH set warnings_error in warnings_flag.
5881 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
5882
5883 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5884
5885 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
5886 empty subargument list. For example: `bison --warnings= parser.y'.
5887
5888 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5889
5890 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
5891 the parser header file so that gcc doesn't warn.
5892
5893 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5894
5895 Split the default %destructor/%printer into two kinds: <*> and <!>.
5896 Discussed starting at
5897 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
5898 * NEWS (2.3a+): Mention.
5899 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
5900 previous change today related to mid-rules.
5901 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
5902 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
5903 (TYPE_TAG_ANY): Add as <*>.
5904 (TYPE_TAG_NONE): Add as <!>.
5905 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
5906 for <*> and <!>.
5907 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
5908 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
5909 * src/symlist.c (symbol_list_default_new): Split into tagged and
5910 tagless versions.
5911 (symbol_list_destructor_set, symbol_list_printer_set): Split
5912 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
5913 SYMLIST_DEFAULT_TAGLESS.
5914 * src/symlist.h: Update symbol_list_default*_new prototypes.
5915 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
5916 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
5917 * src/symtab.c (default_destructor, default_destructor_location,
5918 default_printer, default_printer_location): Split each into tagged and
5919 tagless versions.
5920 (symbol_destructor_get, symbol_destructor_location_get,
5921 symbol_printer_get, symbol_printer_location_get): Implement tagged
5922 default and tagless default cases.
5923 (default_destructor_set, default_printer_set): Split each into tagged
5924 and tagless versions.
5925 * src/symtab.h: Update prototypes.
5926 * tests/actions.at (Default %printer and %destructor): Rename to...
5927 (Default tagless %printer and %destructor): ... this, and extend.
5928 (Per-type %printer and %destructor): Rename to...
5929 (Default tagged and per-type %printer and %destructor): ... this, and
5930 extend.
5931 (Default %printer and %destructor for user-defined end token): Extend.
5932 (Default %printer and %destructor are not for error or $undefined):
5933 Update.
5934 (Default %printer and %destructor are not for $accept): Update.
5935 (Default %printer and %destructor for mid-rule values): Extend.
5936 * tests/input.at (Default %printer and %destructor redeclared): Extend.
5937 (Unused values with default %destructor): Extend.
5938
5939 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5940
5941 Don't apply the default %destructor/%printer to an unreferenced midrule
5942 value. Mentioned at
5943 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
5944 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
5945 like $@n instead of just @n so that the default %destructor/%printer
5946 logic doesn't see them as user-defined symbols.
5947 (symbol_is_dummy): Check for both forms of the name.
5948 * src/reader.c (packgram): Remove the `$' from each midrule symbol
5949 name for which the midrule value is referenced in any action.
5950 * tests/actions.at (Default %printer and %destructor for mid-rule
5951 values): New test.
5952 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
5953 for change to dummy symbol names.
5954
5955 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
5956
5957 Warn about unset midrule $$ if the corresponding $n is used.
5958 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
5959 $n usage.
5960 (packgram): Before invoking grammar_rule_check on any rule, make sure
5961 all actions have already been scanned in order to set `used' flags.
5962 Otherwise, checking that a midrule's $$ is set will not always work
5963 properly because the midrule check must forward-reference the midrule's
5964 parent rule.
5965 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
5966 warning.
5967
5968 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
5969
5970 More improvements to the documentation of the prologue alternatives:
5971 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
5972 Bison manual.
5973 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
5974 some text to clarify the relative importance of the new directives and
5975 to show how these directives may be viewed as code labels.
5976
5977 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
5978
5979 Similar to the recently removed %before-header, add %code-top as the
5980 alternative to the pre-prologue. Mentioned at
5981 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
5982 Also, let the prologue alternatives appear in the grammar section.
5983 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
5984 (prologue_declaration): Move the existing prologue alternatives to...
5985 (grammar_declaration): ... here and add %code-top.
5986 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
5987
5988 Clean up and extend documentation for the prologue alternatives.
5989 * NEWS (2.3a+): Describe prologue alternatives.
5990 * doc/bison.texinfo (Prologue): Move discussion of prologue
5991 alternatives to...
5992 (Prologue Alternatives): ... this new section, and extend it to discuss
5993 all 4 directives in detail.
5994 (Table of Symbols): Clean up discussion of prologue alternatives and
5995 add %code-top.
5996
5997 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5998
5999 DJGPP specific issues.
6000
6001 * djgpp/config.bat: config.hin has been moved to lib. Adjust
6002 config.bat accordingly.
6003 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
6004 * djgpp/config.site: Likewise.
6005
6006 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
6007
6008 Replace %*-header with %provides, %requires, %code. See discussion at
6009 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
6010
6011 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
6012 (b4_user_start_header): Remove.
6013 * data/glr.c: Use new macros instead of b4_*start_header
6014 and b4_*end_header.
6015 * data/glr.cc: Likewise.
6016 * data/lalr1.cc: Likewise.
6017 * data/push.c: Likewise.
6018 * data/yacc.c: Likewise.
6019
6020 * doc/bison.texinfo: Remove %before-header, rename
6021 %{start,end,after}-header to %requires, %provides, %code.
6022
6023 * src/parse-gram.y: Likewise (also rename token names accordingly).
6024 * src/scan-gram.l: Likewise.
6025 * tests/actions.at: Likewise.
6026
6027 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
6028
6029 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
6030 Problem reported by Joel E. Denny.
6031
6032 2006-10-14 Jim Meyering <jim@meyering.net>
6033
6034 (Sync from coreutils.)
6035 Work also when the working directory (with e.g. coreutils sources)
6036 is version controlled with git, rather than CVS.
6037 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
6038 rather than CVS.
6039 In messages and comments, say e.g., "checked-out sources",
6040 rather than "CVS sources".
6041 (version_controlled_file): New function. Work for git as well as
6042 for CVS. Don't use grep's -q option.
6043 (slurp): Call it here, in place of CVS-specific code.
6044
6045 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
6046
6047 Fix testsuite for ./configure --enable-gcc-warnings:
6048 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
6049 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
6050 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
6051 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
6052 * test/regression.at (Diagnostic that expects two alternatives):
6053 Likewise.
6054
6055 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6056
6057 * bootstrap.conf (gnulib_modules): Add config-h.
6058 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
6059 worry about HAVE_CONFIG_H.
6060 * lib/abitset.c: Likewise.
6061 * lib/bitset.c: Likewise.
6062 * lib/bitset_stats.c: Likewise.
6063 * lib/bitsetv-print.c: Likewise.
6064 * lib/bitsetv.c: Likewise.
6065 * lib/ebitset.c: Likewise.
6066 * lib/get-errno.c: Likewise.
6067 * lib/lbitset.c: Likewise.
6068 * lib/subpipe.c: Likewise.
6069 * lib/timevar.c: Likewise.
6070 * lib/vbitset.c: Likewise.
6071 * lib/bitset.c: Include "bitset.h" first, to test interface.
6072 * lib/bitset_stats.c: Include "bitset_stats.h" first.
6073 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
6074 * lib/bitsetv.c: Include "bitsetv.h" first.
6075 * lib/get-errno.c: Include "get-errno.h" first.
6076 * m4/.cvsignore: Add config-h.m4.
6077 * tests/actions.at (Default %printer and %destructor for ...):
6078 Adjust expected line numbers in output to reflect removal of #if
6079 HAVE_CONFIG_H lines.
6080 * tests/glr-regression.at (Missed %merge type warnings when ...):
6081 Likewise.
6082 * tests/regression.at (Braced code in declaration in rules section):
6083 Likewise.
6084 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
6085 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
6086 Include <config.h> unconditionally.
6087
6088 * bootstrap: Sync from coreutils, as follows:
6089
6090 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6091
6092 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
6093 variable was sometimes used without being initialized. This
6094 messed up the installation of the INSTALL file in some cases.
6095
6096 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6097
6098 * bootstrap (usage, main program, symlink_to_gnulib): Add option
6099 --copy. Inspired by a suggestion from Bruno Haible.
6100
6101 2006-10-03 Jim Meyering <jim@meyering.net>
6102
6103 * bootstrap: Undo last change to this file, since now gnulib-tool
6104 sticks with the automake default in generating dependencies.
6105
6106 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6107
6108 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
6109 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
6110
6111 * doc/bison.1: Add copyright notice.
6112
6113 * data/glr.c: Don't include <stdarg.h>; not used.
6114
6115 * NEWS: The -g and --graph options now output graphs in Graphviz
6116 DOT format, not VCG format.
6117 * doc/bison.1: Likewise.
6118 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
6119 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
6120 of this change in
6121 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
6122 * TODO: Remove Graphviz entry.
6123 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
6124 remove vcg.c, vcg.h, vcg_defaults.h.
6125 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
6126 * src/graphviz.c, src/graphviz.h: New files.
6127 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
6128 * src/files.h: Make comment more generic.
6129 * src/main.c (main): Likewise.
6130 * src/print_graph.h: Likewise.
6131 * src/getargs.c (usage): Make usage description more generic.
6132 * src/print_graph.c: Include graphviz.h rather than vcg.h.
6133 (static_graph, fgraph): Remove. All uses changed to pass
6134 arguments instead of sharing a static var.
6135 (print_core, print_actions, print_state, print_graph):
6136 Output graphviz format rather than VCG format.
6137 * tests/.cvsignore: Remove *.vcg; add *.dot.
6138 * tests/output.at: Expect *.dot files, not *.vcg files.
6139
6140 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
6141 accommodates the 2006-10-08 change.
6142
6143 2006-10-11 Bob Rossi <bob@brasko.net>
6144
6145 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
6146 (b4_yyssa, b4_yyerror_range): New macros.
6147 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
6148 (yypvarsinit): Remove init of removed fields.
6149 (yypushparse): Remove use of removed fields; use new macros instead.
6150
6151 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6152
6153 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
6154 in a push parser. Reindent slightly to match yacc.c better.
6155
6156 2006-10-11 Bob Rossi <bob@brasko.net>
6157
6158 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
6159 yymsg_alloc fields.
6160 (yypvarsinit, yypushparse): Remove init of removed fields.
6161 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
6162
6163 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6164
6165 * THANKS: Add Paolo Bonzini and Bob Rossi.
6166
6167 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
6168
6169 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
6170 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
6171 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
6172 b4_define_user_cde and uses): Remove.
6173 (b4_comment, b4_prefix, b4_sync_start): New.
6174 * data/bison.m4: New file, with most of the content removed from c.m4.
6175 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
6176 * src/output.c (output_skeleton): Pass bison.m4.
6177 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
6178 only if specified.
6179
6180 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
6181
6182 Fix test failure reported by Tom Lane in
6183 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
6184 and try to make such failures easier to catch in the future.
6185 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
6186 that's now the caller's responsibility.
6187 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
6188 Set yychar = YYEOF if it's negative.
6189 * tests/actions.at (yylex): Abort if asked to read past EOF.
6190 * tests/conflicts.at (yylex): Likewise.
6191 * tests/cxx-type.at (yylex): Likewise.
6192 * tests/glr-regression.at (yylex): Likewise.
6193 * tests/input.at (yylex): Likewise.
6194 * tests/regression.at (yylex): Likewise.
6195 * tests/torture.at (yylex): Likewise.
6196
6197 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
6198
6199 Fix problems with translating English-language diagnostics.
6200 * bootstrap: Fix bug introduced in recent bootstrap changes, with
6201 respect to bison-runtime pot generation. The YY_ stuff
6202 wasn't being captured.
6203 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
6204 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
6205 * runtime-po/POTFILES.in: Add data/push.c.
6206
6207 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
6208
6209 Merge bootstrap changes from coreutils.
6210
6211 2006-09-28 Jim Meyering <jim@meyering.net>
6212
6213 Automatically generated dependencies are important even
6214 when all of the sources in a directory come from gnulib.
6215 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
6216 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
6217
6218 2006-09-23 Jim Meyering <jim@meyering.net>
6219
6220 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
6221
6222 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6223
6224 * bootstrap: Add support for --force.
6225 (usage): New function. Describe usage less tersely.
6226 (CVS_only_file): New var.
6227
6228 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
6229
6230 * data/push.c (YYPUSH_MORE): Make it an enum instead.
6231 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
6232 Adjust white space and comments to match GNU style better.
6233
6234 2006-09-20 Bob Rossi <bob@brasko.net>
6235
6236 * data/push.c (yyresult_get): Remove function.
6237 (YYPUSH_MORE): Add #define.
6238 (yypushparse): Modify return value.
6239
6240 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6241
6242 * stamp-h.in: Remove; no longer needed.
6243 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
6244 Remove config.h, config.hin, intl (no longer created).
6245 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
6246 stamp-h1.
6247
6248 Sync bootstrap from coreutils, as follows:
6249
6250 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
6251
6252 * bootstrap (symlink_to_gnulib): New function.
6253 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
6254 to copies-of-gnulib.
6255 (cp_mark_as_generated, slurp, gnulib_files):
6256 Avoid making a copy if it's the same as the old version.
6257 (gnulib_files): Add support for this variable (used by Bison).
6258
6259 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6260
6261 * src/getargs.c (usage): Rework to use conventions similar to
6262 coreutils, to make translation a bit easier and the code a bit
6263 smaller. Problem reported by Tim Van Holder.
6264
6265 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
6266
6267 Use some of gnulib's new modules, taken from coreutils.
6268
6269 * bootstrap: Sync from coreutils, except add support for gnulib_files.
6270 * bootstrap.conf: New file.
6271 (gnulib_modules): Add configmake, inttypes, unistd.
6272 (XGETTEXT_OPTIONS): Add complain, complain_at,
6273 fatal, fatal_at, warn, warn_at, unexpected_end.
6274 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
6275 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
6276 (gl_EARLY): Add.
6277 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
6278 (gl_INIT): Add
6279 (GNULIB_AUTOCONF_SNIPPET): Remove.
6280 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
6281 the pickiest.
6282 * lib/.cvsignore: Add inttypes_.h.
6283 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
6284 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
6285 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
6286 no-longer-necessary initializations.
6287 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
6288 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
6289 use the unistd module.
6290 * src/system.h: Likewise.
6291 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
6292 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
6293 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
6294 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
6295 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
6296 * src/system.h: Include inttypes.h unconditionally, now that we
6297 use the inttypes module. Don't bother to include stdint.h, since
6298 inttypes.h now does that for us.
6299 (LOCALEDIR): Remove, now that we use the configmake module.
6300 * src/getargs.c: Include configmake.h.
6301 * src/main.c: Likewise.
6302 * src/output.c: Likewise.
6303 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
6304 not from $abs_top_builddir, since config.h moved.
6305
6306
6307 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
6308 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
6309
6310 * src/parse-gram.y (symbol_declaration): Don't put statements
6311 before declarations; it's not portable to C89.
6312 * src/scan-code.l (handle_action_at): Likewise.
6313
6314 * src/scan-code.l: Always initialize braces_level; the old code
6315 left it uninitialized and therefore had undefined behavior.
6316
6317 Don't attempt to redefine 'assert', since it runs afoul of
6318 systems where standard headers (mistakenly) include <assert.h>.
6319 Instead, define and use our own alternative, called 'aver'.
6320 * src/reader.c: Don't include assert.h, since we no longer
6321 use assert.
6322 * src/scan-code.l: Likewise.
6323 * src/system.h (assert): Remove, replacing with....
6324 (aver): New function, taking a bool arg. All uses changed.
6325 * src/tables.c (pack_vector): Ensure that aver arg is bool,
6326 not merely an integer.
6327
6328 2006-09-15 Bob Rossi <bob@brasko.net>
6329
6330 Add support for push parsing. Based on the original work of
6331 Odd Arild Olsen <oao@fibula.no>.
6332 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
6333 * data/c.m4 (YYPUSH): New.
6334 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
6335 * data/push.c: New file.
6336 * src/getargs.c (push_parser): New var.
6337 * src/getargs.h (push_parser): New declaration.
6338 * src/output.c (prepare): Add macro insertion of `push_flag'.
6339 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
6340 (prologue_declaration): Parse %push-parser.
6341 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
6342 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
6343 list of removed lines from the traces observed.
6344 (AT_CHECK_CALC_LALR): Added push parser tests.
6345
6346 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
6347
6348 * NEWS: Version 2.3a.
6349 * configure.ac (AC_INIT): Likewise.
6350
6351 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
6352 "#define YYSTYPE int" that caused "make maintainer-check" to fail
6353 due to header ordering dependencies. I don't know why the #define
6354 was there.
6355
6356 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
6357 runtime cost when YYDEBUG is not defined, and so that some tests
6358 that used to fail now work. Problem and initial suggestion by
6359 Paolo Bonzini.
6360 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
6361 * data/glr.cc (b4_parser_class_name):
6362 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
6363 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
6364 (yydebug_) [YYDEBUG]: New member.
6365 (yycdebug_): Now defined only if YYDEBUG.
6366 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
6367 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
6368 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
6369 if YYYDEBUG.
6370 (debug_stream, set_debug_stream, debug_level, set_debug_level):
6371 Define only if YYDEBUG.
6372 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
6373 set_debug_level.
6374 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
6375 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
6376 AT_CHECK_CALC_GLR_CC that are working now.
6377
6378 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
6379
6380 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
6381 We don't need them in glr.cc, and glr.c defines them.
6382 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
6383 assumes that defining it to anything is the same as defining
6384 it to 1. Problem reported by Paolo Bonzini.
6385
6386 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
6387
6388 * data/c.m4 (b4_null, b4_case): Define.
6389 * src/output.c (prepare_symbols): Use b4_null.
6390 (user_actions_output): Use b4_case.
6391
6392 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
6393
6394 * data/glr.c (b4_shared_declarations): Put start-header first,
6395 before any #includes that we generate, so that feature-test
6396 macros work. Problem reported by Michael Deutschmann in
6397 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
6398 * data/lalr1.cc: Likewise.
6399 * doc/bison.texinfo (Prologue): Document that feature-test macros
6400 should be defined before any Bison declarations.
6401 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
6402 that depend on location.hh after, not before, Bison decls, since
6403 we now include location.hh after the first user prologue.
6404
6405 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
6406 Sander Brandenburg in
6407 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
6408 Also, fix minor white space and comment issues.
6409 (Prologue): Mention that it's better to define feature-test macros
6410 before Bison declarations. Problem reported by Michael Deutschmann.
6411
6412 * README-cvs: Fix typo: "&" should be "&&". Problem reported
6413 by Jim Meyering.
6414 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
6415 This adjusts to recent gnulib changes.
6416
6417 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
6418
6419 Finish implementation of per-type %destructor/%printer. Discussed
6420 starting at
6421 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
6422 and
6423 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
6424 * NEWS (2.3+): Add a description of this feature to the default
6425 %destructor/%printer description.
6426 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
6427 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
6428 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
6429 list node contains a semantic type.
6430 * src/symtab.c, src/symtab.h: Extend with a table that associates
6431 semantic types with their %destructor's and %printer's.
6432 (semantic_type_from_uniqstr, semantic_type_get,
6433 semantic_type_destructor_set, semantic_type_printer_set): New functions
6434 composing the public interface of that table.
6435 (symbol_destructor_get, symbol_destructor_location_get,
6436 symbol_printer_get, symbol_printer_location_get): If there's no
6437 per-symbol %destructor/%printer, look up the per-type before trying
6438 the default.
6439 * tests/actions.at (Per-type %printer and %destructor): New test case.
6440 * tests/input.at (Default %printer and %destructor redeclared):
6441 Extend to check that multiple occurrences of %symbol-default in a
6442 single %destructor/%printer declaration is an error.
6443 (Per-type %printer and %destructor redeclared, Unused values with
6444 per-type %destructor): New test cases.
6445
6446 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
6447
6448 Require default %destructor/%printer to be declared using
6449 %symbol-default instead of an empty symbol list, and start working on
6450 new per-type %destructor/%printer. Discussed at
6451 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
6452 * NEWS (2.3+): Add %symbol-default to example.
6453 * bison.texinfo (Freeing Discarded Symbols): Likewise.
6454 (Table of Symbols): Add entry for %symbol-default.
6455 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
6456 (generic_symlist, generic_symlist_item): New nonterminals for creating
6457 a list in which each item is a symbol, semantic type, or
6458 %symbol-default.
6459 (grammar_declaration): Use generic_symlist in %destructor and %printer
6460 declarations instead of symbols.1 or an empty list.
6461 (symbol_declaration, precedence_declaration, symbols.1): Update actions
6462 for changes to symbol_list.
6463 * src/reader.c: Update for changes to symbol_list.
6464 * src/scan-code.l: Likewise.
6465 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
6466 * src/symlist.c, src/symlist.h: Extend such that a list node may
6467 represent a semantic type or a %symbol-default in addition to just an
6468 ordinary symbol. Add switched functions for setting %destructor's and
6469 %printer's.
6470 * tests/actions.at, tests/input.at: Add %symbol-default to all default
6471 %destructor/%printer declarations.
6472
6473 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
6474
6475 Whether the default %destructor/%printer applies to a particular symbol
6476 isn't a question of whether the user *declares* that symbol (in %token,
6477 for example). It's a question of whether the user by any means
6478 *defines* the symbol at all (by simply using a char token, for
6479 example). $end is defined by Bison whereas any other token with token
6480 number 0 is defined by the user. The error token is always defined by
6481 Bison regardless of whether the user declares it with %token, but we
6482 may one day let the user define error as a nonterminal instead.
6483 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
6484 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
6485 the meaning of "user-defined".
6486 * tests/actions.at (Default %printer and %destructor for user-declared
6487 end token): Rename to...
6488 (Default %printer and %destructor for user-defined end token): ...
6489 this.
6490
6491 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
6492 computation of whether to apply the default, don't maintain a list of
6493 every Bison-defined symbol. Instead, just check for a first character
6494 of '$', which a user symbol cannot have, and check for the error token.
6495
6496 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
6497
6498 Don't apply the default %destructor or %printer to the error token,
6499 $undefined, or $accept. This change fits the general rule that the
6500 default %destructor and %printer are only for user-declared symbols,
6501 and it solves several difficulties that are described in the new test
6502 cases listed below.
6503 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
6504 * tests/actions.at (Default %printer and %destructor are not for error
6505 or $undefined, Default %printer and %destructor are not for $accept):
6506 New test cases.
6507
6508 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
6509
6510 Allow %start after the first rule.
6511 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
6512 when parsing the first rule.
6513 (check_and_convert_grammar): Search for it here after all grammar
6514 declarations have been parsed. Skip midrules, which have dummy LHS
6515 nonterminals.
6516 * src/symtab.c (symbol_is_dummy): New function.
6517 * src/symtab.h (symbol_is_dummy): Declare it.
6518 * tests/input.at (%start after first rule): New test.
6519
6520 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
6521
6522 Redo some of the previous commit: add back the ability to use
6523 non-aliased/undeclared string literals since it might be useful to
6524 those declaring %token-table.
6525 * src/reader.c (check_and_convert_grammar): Undo changes in previous
6526 commit: don't worry about complaints from symbols_pack.
6527 * src/symtab.c (symbol_new, symbol_class_set,
6528 symbol_check_alias_consistency): Undo changes in previous commit: count
6529 each string literal as a new symbol and token, assign it a symbol
6530 number, and don't complain about non-aliased string literals.
6531 (symbols_pack): Since symbol_make_alias still does not decrement symbol
6532 and token counts but does still set aliased tokens to the same number,
6533 symbol_pack_processor now leaves empty slots in the symbols array.
6534 Remove those slots.
6535 * tests/regression.at (Undeclared string literal): Remove test case
6536 added in previous commit since non-aliased string literals are allowed
6537 again.
6538 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
6539 remove unnecessary string literal declarations.
6540 * tests/sets.at (Firsts): Likewise.
6541
6542 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
6543
6544 Don't allow an undeclared string literal, but allow a string literal to
6545 be used before its declaration.
6546 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
6547 symbols_pack complained.
6548 * src/symtab.c (symbol_new): Don't count a string literal as a new
6549 symbol.
6550 (symbol_class_set): Don't count a string literal as a new token, and
6551 don't assign it a symbol number since symbol_make_alias does that.
6552 (symbol_make_alias): It's not necessary to decrement the symbol and
6553 token counts anymore. Don't assume that an alias declaration occurs
6554 before any uses of the identifier or string, and thus don't assert that
6555 one of them has the highest symbol number so far.
6556 (symbol_check_alias_consistency): Complain if there's a string literal
6557 that wasn't declared as an alias.
6558 (symbols_pack): Bail if symbol_check_alias_consistency failed since
6559 symbol_pack asserts that every token has been assigned a symbol number
6560 although undeclared string literals have not.
6561 * tests/regression.at (String alias declared after use, Undeclared
6562 string literal): New test cases.
6563 (Characters Escapes, Web2c Actions): Declare string literals as
6564 aliases.
6565 * tests/sets.at (Firsts): Likewise.
6566
6567 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
6568
6569 In the grammar scanner, STRING_FINISH unclosed constructs and return
6570 them to the parser in order to improve error messages.
6571 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
6572 SC_BRACED_CODE, SC_PROLOGUE): Implement.
6573 * tests/input.at (Unclosed constructs): New test case.
6574 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
6575 seen.
6576
6577 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
6578 unused global.
6579
6580 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
6581
6582 Handle string aliases for character tokens correctly.
6583 * src/symtab.c (symbol_user_token_number_set): If the token has an
6584 alias, check and set its alias's user token number instead of its own,
6585 which is set to indicate the alias. Previously, every occurrence of
6586 the character token in the grammar overwrote that alias indicator with
6587 the character code.
6588 * tests/input.at (String aliases for character tokens): New test.
6589
6590 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
6591
6592 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
6593
6594 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
6595
6596 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
6597 to prevent failures when building on older platforms.
6598 Check for autopoint failure.
6599 Set XGETTEXT_OPTIONS to values that check for C format strings,
6600 so that translators are warned about them (this also helps
6601 prevent core dumps).
6602
6603 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
6604 function, since it simplifies our code a bit.
6605
6606 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
6607 rather than -W, so we don't get bogus warnings about sign comparisons.
6608 Add -Wpointer-arith, since that warning is useful (it reports code
6609 that does not conform to C89 and that some compilers reject).
6610 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
6611 since it's no longer needed.
6612
6613 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
6614
6615 Clean up scanners a bit.
6616 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
6617 definitions so gcc won't warn when obstack_for_string is unused.
6618 * src/scan-code.l: config.h and system.h are already #include'd by
6619 scan-code-c.c, so get rid of them here.
6620 * src/scan-gram.l: Likewise.
6621 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
6622 definitions rather than duplicating the rest of it.
6623 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
6624
6625 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
6626
6627 Suppress signed/unsigned comparison warnings for yycheck.
6628 * data/c.m4 (b4_safest_int_type): New macro.
6629 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
6630 a signed int type, cast it to b4_safest_int_type first.
6631 * data/yacc.c: Likewise.
6632 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
6633 also overwritten.
6634
6635 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
6636
6637 * doc/bison.texinfo: Fix some typos.
6638
6639 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
6640
6641 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
6642 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
6643
6644 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
6645 the latest gnulib does this a different way.
6646 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
6647 translation was patched, so stop omitting it.
6648
6649 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
6650
6651 Enable declaration of default %printer/%destructor. Make the parser
6652 use these for all user-declared grammar symbols for which the user does
6653 not declare a specific %printer/%destructor. Thus, the parser uses it
6654 for token 0 if the user declares it but not if Bison generates it as
6655 $end. Discussed starting at
6656 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
6657 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
6658 and
6659 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
6660 * NEWS (2.3+): Mention.
6661 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
6662 declare a %destructor for a mid-rule's semantic value. It's just
6663 impossible to declare one specific to it.
6664 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
6665 code. Describe default %destructor form.
6666 * src/parse-gram.y (grammar_declaration): Parse default
6667 %printer/%destructor declarations.
6668 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
6669 and symbol_destructor_location_get rather than accessing the destructor
6670 and destructor_location members of struct symbol.
6671 (symbol_printers_output): Likewise but for %printer's.
6672 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
6673 again.
6674 * src/symtab.c (default_destructor, default_destructor_location,
6675 default_printer, default_printer_location): New static global
6676 variables to record the default %destructor and %printer.
6677 (symbol_destructor_get, symbol_destructor_location_get,
6678 symbol_printer_get, symbol_printer_location_get): New functions to
6679 compute the appropriate %destructor and %printer for a symbol.
6680 (default_destructor_set, default_printer_set): New functions to set the
6681 default %destructor and %printer.
6682 * src/symtab.h: Prototype all those new functions.
6683 * tests/actions.at (Default %printer and %destructor): New test to
6684 check that the right %printer and %destructor are called, that they're
6685 not called for $end, and that $$ and @$ work correctly.
6686 (Default %printer and %destructor for user-declared end token): New
6687 test to check that the default %printer and %destructor are called for
6688 a user-declared end token.
6689 * tests/input.at (Default %printer and %destructor redeclared, Unused
6690 values with default %destructor): New tests to check related grammar
6691 warnings and errors.
6692
6693 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
6694
6695 Clean up handling of %destructor for the end token (token 0).
6696 Discussed starting at
6697 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
6698 and
6699 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
6700
6701 Make the skeletons consistent in how they pop the end token and invoke
6702 its %destructor.
6703 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
6704 state, which has token number 0, since this would invoke the
6705 %destructor for the end token.
6706 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
6707 until after shifting the end token, or else it won't be popped.
6708 * data/yacc.c (yyparse): Likewise.
6709
6710 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
6711 it's the end token. Upon termination, destroy an unshifted lookahead
6712 even when it's the end token.
6713 * data/lalr1.cc (yy::parser::parse): Likewise.
6714 * data/yacc.c (yyparse): Likewise.
6715
6716 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
6717 value warnings for the end token when the user gives the end token a
6718 %destructor.
6719
6720 * tests/actions.at (Printers and Destructors): Test all the above.
6721
6722 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
6723
6724 Update to latest gnulib and gettext versions.
6725 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
6726 Add fopen-safer.
6727 (gnulib_files): Add m4/warning.m4. Don't worry about files
6728 overwritten by autopoint.
6729 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
6730 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
6731 rejects them.
6732 Don't use autoreconf; instead, invoke autopoint etc. by hand,
6733 so that we can remove the intl files at a better time.
6734 (intl_files_to_remove): Remove aclocal.m4, since it gets
6735 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
6736 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
6737 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
6738 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
6739 Remove datarootdir hack; no longer needed.
6740 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
6741 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
6742 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
6743 strdup.h.
6744 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
6745 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
6746
6747 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
6748
6749 * bootstrap: Adjust to today's change to gnulib-tool by invoking
6750 it with --assume-autoconf='latest-stable'.
6751
6752 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
6753
6754 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
6755 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
6756 YYSTYPE' and `{'.
6757 * src/muscle_tab.h (muscle_grow): Replace the header comments with
6758 those from muscle_tab.c since the old ones are misleading.
6759
6760 2006-07-13 Akim Demaille <akim@epita.fr>
6761
6762 Support %define "KEY" {VALUE}.
6763 * src/scan-code.h, src/scan-code.l (translate_action)
6764 (translate_rule_action, translate_symbol_action, translate_code):
6765 Return char *, not const char *.
6766 * src/parse-gram.y (declaration): Rename as...
6767 (prologue_declaration): this.
6768 (string_content): Remove this nonterminal, use STRING.
6769 (braceless, content, content.opt): New nonterminal.
6770 Use them.
6771 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
6772 as value.
6773 * src/scan-gram.l (getargs.h): Don't include it.
6774
6775 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
6776
6777 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
6778 rather than a for-loop that declares a local bool variable. This
6779 should work around a compatibility problem with a Cray x1e C++
6780 compiler reported by Hung Nguyen in
6781 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
6782 The for-loop was introduced in the 2004-11-17 change but I don't
6783 know why it was needed.
6784
6785 2006-07-12 Akim Demaille <akim@epita.fr>
6786
6787 * data/c.m4: Comment changes.
6788
6789 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
6790
6791 * src/complain.c (error_message, ERROR_MESSAGE): New.
6792 To factor...
6793 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
6794 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
6795
6796 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
6797
6798 * NEWS: Instead of %union, you can define and use your own union type
6799 YYSTYPE if your grammar contains at least one <type> tag.
6800 Your YYSTYPE need not be a macro; it can be a typedef.
6801 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
6802 (Union Decl, Decl Summary): Document this.
6803 * data/glr.c (YYSTYPE): Implement this.
6804 * data/glr.cc (YYSTYPE): Likewise.
6805 * data/lalr1.cc (YYSTYPE): Likewise.
6806 * data/yacc.c (YYSTYPE): Likewise.
6807 * src/output.c (prepare): Output tag_seen_flag.
6808 * src/parse-gram.y (declaration, grammar_declaration):
6809 Use 'union_seen' rather than 'typed' to determine whether
6810 %union has been seen, since grammars can now be typed without
6811 %union.
6812 (symbol_declaration, type.opt, symbol_def):
6813 Keep track of whether a tag has been seen.
6814 * src/reader.c (union_seen, tag_seen): New vars.
6815 (typed): remove.
6816 * src/reader.h (union_seen, tag_seen, typed): Likewise.
6817 * src/scan-code.l (untyped_var_seen): New variable.
6818 (handle_action_dollar): Adjust to above changes.
6819 (handle_action_dollar, handle_action_at):
6820 Improve overflow checking for outlandish numbers.
6821 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
6822 avoid new diagnostics generated by above changes.
6823 * tests/regression.at (YYSTYPE typedef): Add test to check
6824 for type tags without %union.
6825
6826 * src/symlist.c (symbol_list_length): Return int, not unsigned
6827 int, since callers expect int. This may need to get revisited
6828 once we have proper integer overflow checking.
6829
6830 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
6831 object is now static.
6832
6833 * src/getargs.c (flags_argmatch): Return void, not int,
6834 to pacify ./configure --enable-gcc-warnings.
6835
6836 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
6837 since last_string is already defined to FLEX_PREFIX (last_string).
6838
6839 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
6840
6841 Implement --warnings/-W.
6842 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
6843 replaced by...
6844 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
6845 Adjust callers.
6846 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
6847 (warnings_args, warnings_types): New.
6848 (getargs, short_options, long_options): Accept -W/--warnings.
6849 Sort the options by alphabetical order, upper case letter right
6850 before its lower case.
6851
6852 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
6853
6854 Change %merge result type clash warnings to errors. Discussed at
6855 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
6856 * src/reader.c (record_merge_function_type): Use complain_at.
6857 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6858 declared later): Update test case results.
6859
6860 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
6861
6862 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
6863 to be in alphabetical order.
6864 (trace_args): Spelling fixes.
6865
6866 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
6867
6868 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
6869 so they don't collide with user-defined macros.
6870 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
6871 this was never guaranteed, and now that we're using gnulib stdint,
6872 which defines int_fast16_t to long int, the problem is exposed.
6873
6874 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
6875
6876 * data/c.m4 (b4_basename): Simplify a bit, since we don't
6877 need the full POSIX semantics (and weren't implementing them
6878 anyway).
6879
6880 Adjust to Autoconf 2.60 and today's gnulib.
6881 * bootstrap (gnulib_modules): Add stdint.
6882 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
6883 no longer copies it.
6884 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
6885 since stdint needs the former and wcwidth (which is now required
6886 by mbswidth) needs the latter.
6887 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
6888 work around a compatibility glitch between gettext 0.14.6 and
6889 Autoconf 2.60.
6890 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
6891 Do not check for uintptr_t, since new stdint module does the right
6892 thing.
6893 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
6894 Add stdint.h, stdint_.h, wcwidth.h.
6895 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
6896 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
6897 stdint.m4, wchar_t.m4, wcwidth.m4.
6898 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
6899 usual order for ../lib/*.h files.
6900 (file_name_split): Use last_component, not base_name, to adjust
6901 to gnulib changes.
6902 * src/parse-gram.h: Include <strverscmp.h> in the usual order
6903 for ../lib/*.h files.
6904 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
6905 Define unconditionally, since we now assume the stdint module.
6906 * src/scan-skel.l: Include <dirname.h>.
6907 (BASE_QPUTS): Use last_component, not base_name.
6908 * src/system.h: Include <unlocked-io.h> in the usual order
6909 for ../lib/*.h files. Include <stdint.h> unconditionally,
6910 since we now use the stdint module.
6911 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
6912 HAVE_UINTPTR_T, since we now use the stdint module.
6913 (base_name): Remove decl, since files now include <dirname.h>
6914 to get the decl.
6915
6916 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
6917
6918 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
6919 New, default to 1.
6920 * data/yacc.c, data/glr.c, data/location.cc: Use them.
6921 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
6922 default.
6923 * tests/calc.at: Adjust.
6924
6925 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
6926
6927 * data/c.m4 (b4_basename): New.
6928 (b4_syncline): Also output the location of its invocation (from
6929 the skeleton).
6930 (b4_user_action, b4_define_user_action, b4_user_actions)
6931 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
6932 (b4_user_stype): New.
6933 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
6934
6935 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
6936
6937 In the grammar file, the first column is 1 not 0 on the first line as
6938 on every other line.
6939 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
6940 * tests/input.at (Torturing the Scanner): Update output.
6941
6942 * src/scan-gram.l (scanner_cursor): Declare it static.
6943
6944 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
6945
6946 In warnings, say "previous declaration" rather than "first
6947 declaration".
6948 * src/symtab.c (redeclaration): Do that here.
6949 * src/reader.c (record_merge_function_type): In the case of a result
6950 type clash, report the previous declaration rather than the very first
6951 one in the grammar file.
6952 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6953 declared later): Add a third declaration to check this behavior.
6954 * tests/input.at (Incompatible Aliases): Update output.
6955
6956 2006-06-27 Akim Demaille <akim@epita.fr>
6957
6958 * doc/Doxyfile.in: New.
6959 * doc/Makefile.am: Use it.
6960 * src/lalr.h, src/symtab.h: Initial doxygenation.
6961
6962 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6963
6964 Don't miss %merge result type warnings just because the LHS types are
6965 declared after the %merge. This continues the effort of the previous
6966 patch.
6967 * src/reader.c (get_merge_function): Don't set the merger type yet.
6968 (record_merge_function_type): New function for setting the merger type
6969 and checking for clashes.
6970 (grammar_current_rule_merge_set): Set the location of the %merge for
6971 the current rule.
6972 (packgram): Invoke record_merge_function_type for each rule now that
6973 all symbol type declarations have been parsed.
6974 * src/reader.h (merger_list.type_declaration_location): New member
6975 storing the location of the first %merge from which the type for this
6976 merging function was derived.
6977 * src/symlist.h (symbol_list.merger_declaration_location): New member
6978 storing the location of a rule's %merge, if any.
6979 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6980 declared later): New test to catch the error fixed by the above patch.
6981
6982 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6983
6984 Get action warnings (grammar_rule_check) right even when symbol
6985 declarations appear after the rules. Discussed at
6986 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
6987 and
6988 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
6989 Don't mistake the type of $$ in a midrule to be that of its parent
6990 rule's $$.
6991 * src/reader.c (grammar_current_rule_end): Don't invoke
6992 grammar_rule_check yet since not all symbol declarations may have been
6993 parsed yet.
6994 (grammar_midrule_action): Likewise.
6995 Don't record whether the midrule's $$ has been used yet since actions
6996 haven't been translated yet.
6997 Record the midrule's parent rule and its RHS index within the parent
6998 rule.
6999 (grammar_current_rule_action_append): Don't translate the action yet
7000 since not all symbol declarations may have been parsed yet and, thus,
7001 warnings about types for $$, $n, @$, and @n can't be reported yet.
7002 (packgram): Translate the action and invoke grammar_rule_check now that
7003 all symbol declarations have been parsed.
7004 * src/scan-code.l (handle_action_dollar): Now that this is invoked
7005 after parsing the entire grammar file, the symbol list here in the case
7006 of a midrule is actually the midrule's empty RHS, so reference its
7007 parent rule's RHS where necessary.
7008 On the other hand, now that you can already know it's a midrule, you
7009 aren't forced to think $$ has the same type as its parent rule's $$.
7010 (handle_action_at): In the case of a midrule, reference the parent rule
7011 where necessary.
7012 * src/symlist.c (symbol_list_new): Initialize new midrule-related
7013 members.
7014 (symbol_list_length): Now that this is invoked after all rules have
7015 been parsed, a NULL symbol (rather than a NULL symbol list node)
7016 terminates a rule. symbol_list_print already does this correctly.
7017 * src/symlist.h (symbol_list.midrule_parent_rule,
7018 symbol_list.midrule_parent_rhs_index): New members so that midrules can
7019 remember their relationships with their parents.
7020 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
7021 fixed by the above patch.
7022 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
7023 implementing...
7024 (Unused values): ... this old test case and...
7025 (Unused values before symbol declarations): ... this new test case.
7026 This one is the same as `Unused values' except that all symbol
7027 declarations appear after the rules in order to catch the rest of the
7028 errors fixed by the above patch.
7029
7030 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7031
7032 More cleanup.
7033 * src/reader.c (current_rule): Declare it static since it's no longer
7034 used outside this file.
7035 (grammar_current_rule_action_append): Remove redundant arguments from
7036 translate_rule_action invocation.
7037 * src/reader.h (current_rule): Remove this unused extern.
7038 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
7039 * src/scan-code.l (translate_rule_action): Likewise.
7040
7041 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
7042
7043 Clean up yesterday's patch.
7044 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
7045 to...
7046 * src/reader.c (grammar_current_rule_action_append): ... here for
7047 consistency with grammar_current_rule_symbol_append.
7048 * tests/regression.at (Braced code in declaration in rules section):
7049 Make yyerror and yylex static as usual.
7050
7051 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
7052
7053 Fix bug that mistakes braced code in a declaration in the rules section
7054 to be a rule action. Mentioned at
7055 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
7056 * src/scan-gram.l: Move midrule action detection from the start of the
7057 scanning of any braced code to...
7058 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
7059 action. For readability, use $2 and @2 rather than the equivalent
7060 global variables.
7061 * tests/regression.at (Braced code in declaration in rules section):
7062 New test to catch the error fixed by the above patch.
7063
7064 Work on code readability some.
7065 * src/scan-code.l (current_rule): Get rid of this misleading and
7066 redundant declaration: it's actually extern'ed in reader.h.
7067 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
7068 translate_action): Add a rule argument and use it instead of the global
7069 current_rule.
7070 (translate_rule_action): This already receives current_rule through an
7071 argument, so pass it on to translate_action instead of assigning
7072 current_rule to current_rule.
7073 (translate_symbol_action, translate_code): Pass rule = NULL to
7074 translate_action.
7075
7076 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
7077
7078 Rename %before-definitions to %start-header and %after-definitions to
7079 %end-header. Don't use these declarations to separate pre-prologue
7080 blocks from post-prologue blocks. Add new order-independent
7081 declarations %before-header and %after-header as alternatives to the
7082 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
7083 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
7084 * NEWS (2.3+): Update for these changes.
7085 * data/glr.c (b4_before_definitions): Update to...
7086 (b4_start_header): ... this.
7087 (b4_after_definitions): Update to...
7088 (b4_end_header): ... this.
7089 * data/glr.cc: Likewise.
7090 * data/lalr1.cc: Likewise.
7091 * data/yacc.c: Likewise.
7092 * doc/bison.texinfo (The prologue): Update names, and replace remaining
7093 prologue blocks with %*-header declarations.
7094 (Calc++ Parser): Likewise.
7095 (Decl Summary): Update names.
7096 (Table of Symbols): Update description.
7097 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
7098 (PERCENT_END_HEADER): ... this.
7099 (PERCENT_BEFORE_DEFINITIONS): Update to...
7100 (PERCENT_START_HEADER): ... this.
7101 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7102 (declaration): Update token names and m4 macro names.
7103 When parsing %end-header and %start-header, invoke translate_code
7104 before muscle_code_grow, and no longer set global booleans to remember
7105 whether these declarations have been seen.
7106 Parse new %after-header and %before-header.
7107 * src/reader.c (before_definitions, after_definitions): Remove.
7108 (prologue_augment): Accept a new bool argument to specify whether to
7109 augment the pre-prologue or post-prologue.
7110 * src/reader.h (before_definitions, after_definitions): Remove these
7111 extern's.
7112 (prologue_augment): Add new bool argument.
7113 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
7114 (PERCENT_END_HEADER): ... this.
7115 (PERCENT_BEFORE_DEFINITIONS): Update to...
7116 (PERCENT_START_HEADER): ... this.
7117 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7118 * tests/actions.at (Printers and Destructors): Update names.
7119
7120 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
7121
7122 Add comparison operators for C++ location classes. Discussed at
7123 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
7124 * data/c++.m4 (b4_define_location_comparison): New boolean %define
7125 declaration indicating whether filename_type has an operator==. If
7126 filename_type is `std::string', it defaults to `1', `0' otherwise.
7127 * data/location.cc: Iff b4_define_location_comparison is `1', add
7128 operator== and operator!= for class position and for class location.
7129
7130 Some minor fixes.
7131 * src/scan-action.l: Remove unused file.
7132 * src/symtab.c (symbol_printer_set): Use printer_location not
7133 destructor_location.
7134 * src/symtab.h (struct symbol): Replace incorrect source comment for
7135 printer members.
7136 * tests/input.at (Incompatible Aliases): Update output with correct
7137 printer location.
7138
7139 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
7140
7141 Don't put the pre-prologue in the header file. For the yacc.c code
7142 file and the glr.c header and code files, move the pre-prologue before
7143 the token definitions. Add new %before-definitions and
7144 %after-definitions to declare code that will go in both the header file
7145 and code file. Discussed at
7146 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
7147 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
7148 and
7149 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
7150 * NEWS (2.3+): Describe these changes.
7151 * data/glr.c (b4_pre_prologue): Move from within to before...
7152 (b4_shared_declarations): ... this.
7153 Add new b4_before_definitions before b4_token_enums.
7154 Add new b4_after_definitions at the end.
7155 * data/glr.cc (b4_pre_prologue): Replace with...
7156 (b4_before_definitions): ... this in the header file.
7157 (b4_after_definitions): New near the end of the header file.
7158 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
7159 code file right before including the header file.
7160 (b4_before_definitions): New in the previous position of
7161 b4_pre_prologue in the header file.
7162 (b4_after_definitions): New near the end of the header file.
7163 * data/yacc.c: Clean up some m4 quoting especially in the header file.
7164 (b4_token_enums_defines): In the code file, move to right before
7165 YYSTYPE for consistency with the header file.
7166 (b4_before_definitions): New right before b4_token_enums_defines in
7167 both the header and code file.
7168 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
7169 header and code file.
7170 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
7171 of prologues for %union dependencies.
7172 (Decl Summary): In %defines description, mention the effect of
7173 %before-definitions and %after-definitions on the header file.
7174 (Calc++ Parser): Forward declare driver in a %before-definitions rather
7175 than in the pre-prologue so that make check succeeds.
7176 (Table of Symbols): Add entries for %before-definitions and
7177 %after-definitions.
7178 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
7179 %before-definitions.
7180 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
7181 (declaration): Parse those declarations and append to
7182 b4_before_definitions and b4_after_definitions, respectively.
7183 * src/reader.c (before_definitions, after_definitions): New bools to
7184 track whether those declarations have been seen.
7185 (prologue_augment): Add to the post-prologue if %union,
7186 %before-definitions, or %after-definitions has been seen.
7187 * src/reader.h (before_definitions, after_definitions): New extern's.
7188 * src/scan-gram.l: Scan the new declarations.
7189 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
7190 prologue block in a %before-definitions or a %after-definitions based
7191 on whether the %union is declared.
7192 * tests/regression.at (Early token definitions with --yacc, Early token
7193 definitions without --yacc): Move tests for token definitions into the
7194 post-prologue since token names are no longer defined in the
7195 pre-prologue.
7196
7197 2006-06-20 Akim Demaille <akim@epita.fr>
7198
7199 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
7200 (symbol_get): Use it.
7201 * src/parse-gram.y: Use it.
7202
7203 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
7204
7205 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
7206 build succeeds when configured with --enable-gcc-warnings.
7207
7208 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
7209
7210 * src/parse-gram.y (char_name): New function.
7211 (CHAR, STRING, string_content): For %printer, properly escape.
7212 (ID): Prefer fputs to fprintf.
7213 (id): Reindent to be consistent with other rules.
7214 Properly quote char.
7215
7216 The Translation Project changed its way of publishing translations
7217 to maintainers. I haven't received any responses to my request
7218 for supporting the old way, or for documenting the new way. I
7219 have modified 'bootstrap' to use screen scraping
7220 (in this case, HTML scraping). This is unreliable and inelegant,
7221 but I don't see any better way. Yuck.
7222 * bootstrap (TP_URL, WGET_COMMAND): New vars.
7223 (get_translations): New function, which uses HTML scraping to
7224 deduce locations of latest translations.
7225 Use this function to grab both bison and bison-runtime .po files.
7226 Don't bother priming the pump for the runtime-po domain any more,
7227 as it's now translated better than bison is.
7228
7229 2006-06-19 Akim Demaille <akim@epita.fr>
7230
7231 * src/scan-gram.l: No longer "parse" things after `%union' until
7232 `{'. Rather, return a single "%union" token.
7233 No longer make symbols: return strings, and leave the conversion
7234 to symbols to the parser.
7235 (SC_PRE_CODE, token_type): Remove.
7236 * src/parse-gram.y (%union): New field `character'.
7237 Sort tokens.
7238 (CHAR): New token.
7239 (ID, ID_COLON): Now that the scanner no longer makes them
7240 identifiers, adjust all uses to invoke symbol_get.
7241 (id_colon): New, wraps the conversion from string to symbol.
7242 (%union): Accept a possible union_name.
7243 (symbol): Now can be a char.
7244 * data/c.m4 (b4_union_name): Leave a default value.
7245 * data/glr.c, data/yacc.c: Use it.
7246
7247 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
7248
7249 For associating token numbers with token names for "yacc.c", don't use
7250 #define statements unless `--yacc' is specified; always use enum
7251 yytokentype. Most important discussions start at:
7252 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
7253 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
7254 and
7255 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
7256 * NEWS (2.3+): Mention.
7257 * data/c.m4 (b4_yacc_if): New.
7258 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
7259 token #define's.
7260 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
7261 on token name definitions.
7262 * src/getargs.c (usage): Capitalize `Yacc' in English.
7263 * src/output.c (prepare): Define b4_yacc_flag.
7264 * tests/regression.at (Early token definitions): Test that tokens names
7265 are defined before the pre-prologue not just before the post-prologue.
7266 Remove this test case and copy to...
7267 (Early token definitions with --yacc): ... this to test #define's.
7268 (Early token definitions without --yacc): ... and this to test enums.
7269
7270 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
7271
7272 * NEWS: Reword the post-2.3 change to not be so optimistic about
7273 removing the old "look-ahead" spelling.
7274 Update previous look-ahead/lookahead change reports.
7275 * REFERENCES: look-ahead -> lookahead (since that's
7276 what he actually wrote).
7277 * doc/refcard.tex: look ahead -> lookahead,
7278 look-ahead -> lookahead
7279
7280 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
7281
7282 For consistency, use `lookahead' instead of `look-ahead' or
7283 `look_ahead'. Discussed starting at
7284 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
7285 and then at
7286 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
7287 * NEWS: For the next release, note the change to `--report'.
7288 * TODO, doc/bison.1: Update English.
7289 * doc/bison.texinfo: Update English.
7290 (Understanding Your Parser, Bison Options): Document as
7291 `--report=lookahead' rather than `--report=look-ahead'.
7292 * src/conflicts.c: Update English in comments.
7293 (lookahead_set): Rename from look_ahead_set.
7294 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
7295 (resolve_sr_conflict): Rename local look_ahead_tokens to
7296 lookahead_tokens, and update other uses.
7297 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
7298 count_rr_conflicts, conflicts_free): Update uses.
7299 * src/getargs.c (report_args): Move "lookahead" before alternate
7300 spellings.
7301 (report_types): Update uses.
7302 (usage): For `--report' usage description, state `lookahead' spelling
7303 rather than `look-ahead'.
7304 * src/getargs.h (report.report_lookahead_tokens): Rename from
7305 report_look_ahead_tokens.
7306 * src/lalr.c: Update English in comments.
7307 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
7308 (state_lookahead_tokens_count): Rename from
7309 state_look_ahead_tokens_count.
7310 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7311 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
7312 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7313 Update other uses.
7314 Update English in output.
7315 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
7316 * src/print.c: Update English in comments.
7317 (lookahead_set): Rename from look_ahead_set.
7318 (print_reduction): Rename argument lookahead_token from
7319 look_ahead_token.
7320 (print_core, state_default_rule, print_reductions, print_results):
7321 Update uses.
7322 * src/print_graph.c: Update English in comments.
7323 (print_core): Update uses.
7324 * src/state.c: Update English in comments.
7325 (reductions_new): Update uses.
7326 (state_rule_lookahead_tokens_print): Rename from
7327 state_rule_look_ahead_tokens_print, and update other uses.
7328 * src/state.h: Update English in comments.
7329 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
7330 (state_rule_lookahead_tokens_print): Rename from
7331 state_rule_look_ahead_tokens_print.
7332 * src/tables.c: Update English in comments.
7333 (conflict_row, action_row): Update uses.
7334 * tests/glr-regression.at
7335 (Incorrect lookahead during deterministic GLR,
7336 Incorrect lookahead during nondeterministic GLR): Rename
7337 print_look_ahead to print_lookahead.
7338 * tests/torture.at: Update English in comments.
7339 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
7340 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
7341 (Many lookahead tokens): Update uses.
7342 * data/glr.c: Update English in comments.
7343 * lalr1.cc: Likewise.
7344 * yacc.c: Likewise.
7345 * src/conflicts.h: Likewise.
7346 * src/lalr.h: Likewise.
7347 * src/main.c: Likewise.
7348 * src/output.c: Likewise.
7349 * src/parse-gram.c: Likewise.
7350 * src/tables.h: Likewise.
7351 * tests/calc.at: Likewise.
7352
7353 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
7354
7355 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
7356
7357 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
7358
7359 * TODO: Add request from Nelson H. F. Beebe to be able to install
7360 Bison without installing the yacc script.
7361
7362 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7363
7364 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
7365 and yytext if they're already #define'd.
7366 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
7367 * src/scan-code-c.c: ... here.
7368 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
7369 <config.h>.
7370
7371 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7372
7373 Get Bison to build again when configured with --enable-gcc-warnings.
7374 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
7375 missing #include's.
7376 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
7377 loc argument as it shadows a global.
7378 * src/scan-gram.l: Remove stray comma that prevents boundary_set
7379 invocation.
7380
7381 * src/.cvsignore: Add scan-code.c.
7382
7383 2006-06-07 Akim Demaille <akim@epita.fr>
7384
7385 * src/scan-gram.l: Move the "add a trailing ; to actions" code
7386 to...
7387 * src/scan-code.l: here.
7388 * tests/input.at (Torturing the Scanner): Fix another location
7389 error.
7390
7391 2006-06-07 Akim Demaille <akim@epita.fr>
7392
7393 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
7394
7395 2006-06-06 Akim Demaille <akim@epita.fr>
7396
7397 Extract the parsing of user actions from the grammar scanner.
7398 As a consequence, the relation between the grammar scanner and
7399 parser is much simpler. We can also split "composite tokens" back
7400 into simple tokens.
7401 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
7402 * src/scan-gram.l (add_column_width, adjust_location): Move to and
7403 rename as...
7404 * src/location.h, src/location.c (add_column_width)
7405 (location_compute): these.
7406 Fix the column count: the initial column is 0.
7407 (location_print): Be robust to ending column being 0.
7408 * src/location.h (boundary_set): New.
7409 * src/main.c: Adjust to scanner_free being renamed as
7410 gram_scanner_free.
7411 * src/output.c: Include scan-code.h.
7412 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
7413 Use boundary_set.
7414 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
7415 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
7416 which is now, again, a separate token.
7417 Adjust all dependencies.
7418 Whereever actions with $ and @ are used, use translate_code.
7419 (action): Remove this nonterminal which is now useless.
7420 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
7421 (grammar_current_rule_action_append): Use translate_code.
7422 (packgram): Bound check ruleno, itemno, and rule_length.
7423 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
7424 (last_string, last_braced_code_loc, max_left_semantic_context)
7425 (scanner_initialize, scanner_free, scanner_last_string_free)
7426 (gram_out, gram_lineno, YY_DECL_): Move to...
7427 * src/scan-gram.h: this new file.
7428 (YY_DECL): Rename as...
7429 (GRAM_DECL): this.
7430 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
7431 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
7432 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
7433 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
7434 Move these declarations, and...
7435 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
7436 these to...
7437 * src/flex-scanner.h: this new file.
7438 * src/scan-gram.l (rule_length, rule_length_overflow)
7439 (increment_rule_length): Remove.
7440 (last_braced_code_loc): Rename as...
7441 (gram_last_braced_code_loc): this.
7442 Adjust to the changes of the parser.
7443 Move all the handling of $ and @ into...
7444 * src/scan-code.l: here.
7445 * src/scan-gram.l (handle_dollar, handle_at): Remove.
7446 (handle_action_dollar, handle_action_at): Move to...
7447 * src/scan-code.l: here.
7448 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
7449 scan-code.h, scan-code-c.c, scan-gram.h.
7450 (EXTRA_bison_SOURCES): Add scan-code.l.
7451 (BUILT_SOURCES): Add scan-code.c.
7452 (yacc): Be robust to white spaces.
7453
7454 * tests/conflicts.at, tests/input.at, tests/reduce.at,
7455 * tests/regression.at: Adjust the column numbers.
7456 * tests/regression.at: Adjust the error message.
7457
7458 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
7459
7460 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
7461 Use Akim's wording from
7462 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
7463
7464 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
7465
7466 Between Bison releases, manually append `+' to the previous Bison
7467 release number, and use that as a signal to automatically print the
7468 ChangeLog's CVS Id keyword from --version. Discussed starting at
7469 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
7470 * ChangeLog: Add Id header.
7471 * configure.ac (AC_INIT): Append `+' to `2.3'.
7472 * src/.cvsignore: Add revision.c.
7473 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
7474 (BUILT_SOURCES): Add revision.c.
7475 (revision.c): New target rule. This file defines a new global variable
7476 named revision. It initializes it with either the Id from ChangeLog
7477 or, if VERSION doesn't contain `+', with the empty string.
7478 * src/getargs.c (version): Print the value of revision.
7479 * src/revision.h: Extern revision.
7480
7481 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
7482
7483 * NEWS: Version 2.3.
7484 * configure.ac (AC_INIT): Likewise.
7485
7486 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
7487
7488 * data/glr.c (YYRECOVERING): Define to be a function-like macro
7489 with no arguments, not as an object-like macro. This is for
7490 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
7491 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
7492 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
7493 Document this.
7494
7495 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
7496
7497 * src/getargs.c (usage): Back out yesterday's modification of the
7498 --help output so that we don't have to wait for translation before
7499 releasing 2.3.
7500
7501 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
7502
7503 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
7504 Problem reported by Akim Demaille.
7505
7506 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
7507
7508 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
7509
7510 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
7511
7512 * data/yacc.c (yy_reduce_print): Omit trailing white space in
7513 generated source code. Problem reported by Frans Englich in
7514 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
7515
7516 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
7517
7518 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
7519 shell, not within 'make', so that 'make' by an ordinary builder
7520 (using GNU make) does not worry about configuring gzip. This also
7521 works around a bug reported independently by Keith Thompson and by
7522 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
7523 stderr rather than stdout, messing up the build logs.
7524
7525 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
7526
7527 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
7528 to make sure that YYID will never be unused. This fixes a 'make
7529 maintainer-check' failure caused by the recent changes to the 'Trivial
7530 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
7531 not used.
7532 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
7533
7534 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
7535
7536 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
7537 state before an empty RHS is always resolved here. Only the location
7538 of that state is guaranteed to be resolved, and that's enough. This
7539 fixes the remaining bug reported by Derek M. Jones in
7540 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
7541 * tests/glr-regression.at (Uninitialized location when reporting
7542 ambiguity): Test the above case.
7543 Also, the embedded comments in this test case claim it checks the case
7544 of an empty RHS that has inherited the initial location. However, the
7545 corresponding LHS was already resolved, so yyresolveLocations didn't
7546 actually have reason to modify it. Fix this by forcing
7547 nondeterministic operation at the beginning of the parse.
7548
7549 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
7550
7551 * data/c.m4 (b4_yy_symbol_print_generate):
7552 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
7553 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
7554 of the bugs reported today by Derek M Jones in
7555 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
7556 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
7557 defined to be a type name without parens or brackets.
7558 (Location Type): Similarly for YYLTYPE.
7559 * tests/regression.at (Trivial grammars): Put in a test for this
7560 bug that will be caught by 'make maintainer-check' (though not,
7561 alas, by 'make check' unless your compiler is picky).
7562
7563 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
7564
7565 * NEWS: Version 2.2.
7566 * configure.ac (AC_INIT): Likewise.
7567
7568 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
7569
7570 * data/glr.c (yyreportTree): Make room in yystates for the state
7571 preceding the RHS. This fixes the segmentation fault reported by Derek
7572 M. Jones in
7573 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
7574 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
7575 to the user. Reported for yyreportTree by Derek M. Jones later in the
7576 same thread.
7577 * THANKS: Add Derek M. Jones.
7578 Update my email address.
7579 Fix typo in Steve Murphy's name.
7580
7581 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
7582
7583 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
7584 checking against YYLAST that caused the parser to miss a potential
7585 alternative in its diagnostic.
7586 Problem reported by Maria Jose Moron Fernandez in
7587 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
7588 * data/lalr1.cc (yysyntax_error_): Likewise.
7589 * data/yacc.c (yysyntax_error): Likewise.
7590 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
7591 tokens, in case we run into an older C compiler.
7592 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
7593 Use them to check for the off-by-one error fixed above.
7594
7595 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
7596 YYSIZE_T, not size_t.
7597 * tests/regression.at (Trivial grammars): New test, to catch
7598 the error fixed by the above patch.
7599
7600 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7601
7602 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
7603 scheme.
7604 Reported by Steve Murphy.
7605
7606 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7607
7608 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
7609 * data/glr.cc: b4_location_flag is now b4_locations_flag.
7610
7611 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7612
7613 Implement --trace=m4.
7614 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
7615 * src/output.c (output_skeleton): When set, pass -dV to m4.
7616
7617 Factor the handling of flags in m4.
7618 * src/output.c (prepare): Rename the muscle names debug, defines,
7619 error_verbose to debug_flag, defines_flag, error_verbose_flag.
7620 * data/c.m4: Adjust.
7621 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
7622 Use b4_define_flag_if to define other b4_FLAG_if macros.
7623 (b4_location_if): As a consequence, rename as...
7624 (b4_locations_if): this, for consistency.
7625 Adjust all the skeletons.
7626
7627 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7628
7629 * etc/bench.pm: Shorten bench names.
7630
7631 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7632
7633 * src/output.h, src/output.c (error_verbose): Move to...
7634 * src/getargs.h, src/getargs.c: here.
7635 Sort the flags.
7636 Adjust dependencies.
7637
7638 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
7639
7640 * data/c.m4 (b4_copyright): Put the special exception for Bison
7641 skeletons here, so we don't have to put it in each skeleton. All
7642 uses changed. Suggested by Akim Demaille. Also, wrap the
7643 copyright notice, in case it is longer than 80 columns. Replace
7644 comma by newline after title.
7645
7646 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
7647
7648 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
7649 incompatibility, not a bug. Mention that it wasn't fixed as of
7650 flex 2.5.33.
7651
7652 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
7653
7654 * examples/extexi: Enforce the precedence of concatenation over
7655 >>.
7656 Reported by Tommy Nordgren.
7657
7658 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
7659
7660 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
7661 with the member "token".
7662 Reported by Martin Nylin.
7663
7664 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
7665
7666 * data/glr.c: Switch to Bison 2.2 special-exception language in
7667 the copyright notice. Use more-regular format for titles and
7668 copyright notices.
7669 * data/glr.cc: Likewise.
7670 * data/location.cc: Likewise.
7671 * data/yacc.cc: Likewise.
7672 * doc/bison.texinfo (Conditions): Document this.
7673 * NEWS: likewise. Upgrade version to 2.2.
7674
7675 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
7676
7677 * data/glr.cc: Remove dead code.
7678
7679 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
7680
7681 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
7682 that variable and the line breaks the bootstrap. Problem reported
7683 by Juan M. Guerrero.
7684
7685 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
7686
7687 * doc/bison.texinfo (Multiple start-symbols): New.
7688
7689 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
7690
7691 * etc/README, etc/bench.pl: New.
7692
7693 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
7694
7695 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
7696 rule.
7697 Reported by Mickael Labau.
7698 * tests/input.at (Torturing the Scanner): Test it.
7699
7700 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
7701
7702 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
7703 Problem reported by Bob Rossi.
7704
7705 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
7706
7707 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
7708 and didn't really work.
7709 For the index, use @ifnotinfo, not @iftex.
7710 Minor cleanups of spacing and terminology.
7711
7712 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
7713
7714 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
7715 of AT_NAME_PREFIX when %name-prefix is not used.
7716
7717 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
7718
7719 Apply --prefix to C++ skeletons too: they change the namespace.
7720 The test suite already exercize these cases.
7721 * data/c++.m4 (b4_namespace): New.
7722 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
7723 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
7724 * data/yacc.c, data/glr.c: Remove a useless `[]'.
7725 * doc/bison.texinfo: Document it.
7726 (Option Cross Key): Use @multitable in all formats. It looks
7727 nicer, even in TeX outputs.
7728 (Rules): Use the same code whatever the output type is.
7729 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
7730 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
7731 * tests/calc.at: Use it, instead of hard coding `yy'.
7732
7733 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
7734
7735 * TODO: Remove dead items.
7736
7737 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
7738
7739 * doc/FAQ: Remove, merged into...
7740 * doc/bison.texinfo (FAQ): this.
7741 * doc/Makefile.am (EXTRA_DIST): Adjust.
7742
7743 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
7744
7745 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
7746 even if empty.
7747 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
7748 * doc/bison.texinfo (Calc++ Scanner): Use it.
7749
7750 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
7751
7752 Fix two nits reported by twlevo, plus one more that I discovered.
7753
7754 * src/assoc.h (assoc_to_string): Give a name to the arg, as
7755 this is the usual Bison style.
7756 * src/location.h (location_print): Likewise.
7757
7758 * src/reader.h (token_name): Likewise.
7759
7760 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
7761
7762 Fix some nits reported by twlevo.
7763 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
7764 and "POSIX". Use more-modern syntax for URLs. Mention C++
7765 and ask for Java. Don't hardwire OS version numbers. Add
7766 copyright notice.
7767 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
7768 * src/conflicts.c (solved_conflicts_obstack): Now static.
7769
7770 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
7771
7772 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
7773 page. Say "you can use it" not "you may use it" as on the web page;
7774 we're describing capabilities not granting permission.
7775
7776 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
7777
7778 * data/glr.c (yyresolveLocations): Rename local variables to avoid
7779 shadowing warnings. Use usual patter for iterating through RHS.
7780 * tests/glr-regression.at
7781 (Uninitialized location when reporting ambiguity):
7782 Modify yylex so that it uses its argument, rather than trying
7783 to rely on ARGSUSED (which doesn't work for gcc with warnings).
7784 const char -> char const.
7785
7786 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
7787 Don't use tabs inside commands; it messes up 'ps'.
7788 Problem reported by twlevo.
7789
7790 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
7791
7792 * tests/glr-regression.at (Uninitialized location when reporting
7793 ambiguity): New test case.
7794 * data/glr.c (yyresolveLocations): New function, which uses
7795 YYLLOC_DEFAULT.
7796 (yyresolveValue): Invoke yyresolveLocations before reporting an
7797 ambiguity.
7798 * doc/bison.texinfo (Default Action for Locations): Note
7799 YYLLOC_DEFAULT's usage for ambiguity locations.
7800 (GLR Semantic Actions): Cross-reference those notes.
7801
7802 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
7803
7804 * tests/glr-regression.at (Leaked semantic values when reporting
7805 ambiguity): Remove unnecessary union and type declarations.
7806 (Leaked lookahead after nondeterministic parse syntax error): New test
7807 case.
7808 * data/glr.c (yyparse): Check for zero stacks remaining before
7809 attempting to shift the lookahead so that you don't lose it.
7810
7811 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
7812
7813 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
7814 * tests/glr-regression.at (Leaked semantic values when reporting
7815 ambiguity): New test case.
7816 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
7817 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
7818 now unnecessary yystackp parameter.
7819 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
7820 destructors can be called.
7821
7822 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
7823 in existing testcases.
7824
7825 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
7826
7827 Don't leak semantic values for parent RHS when a user action cuts the
7828 parser, and clean up related code a bit.
7829 * tests/glr-regression.at (Leaked merged semantic value if user action
7830 cuts parse): Rename to...
7831 (Leaked semantic values if user action cuts parse): ... this. Add check
7832 for leaked parent RHS values.
7833 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
7834 between an unresolved state (non-empty chain of semantic options) and
7835 an incomplete one (signaled by an empty chain).
7836 (yyresolveStates): Document the interface. Move all manipulation of a
7837 successfully or unsuccessfully resolved yyGLRState to...
7838 (yyresolveValue): ... here so that yyresolveValue always leaves a
7839 yyGLRState with consistent data and thus is easier to understand.
7840 Remove the yyvalp and yylocp parameters since they are always just
7841 taken from the yys parameter. When reporting a discarded merged value
7842 in debugging output, note that it is incompletely merged. Document the
7843 interface.
7844 (yyresolveAction): If resolving any of the RHS states fails, destroy
7845 them all rather than leaking them. Thus, as long as user actions are
7846 written to clean up the RHS correctly, yyresolveAction always cleans up
7847 the RHS of a semantic option. Document the interface.
7848
7849 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
7850
7851 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
7852 led to a segmentation fault in GNU Pascal. Problem reported
7853 by Waldek Hebisch.
7854
7855 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
7856
7857 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
7858 mid-rule action inside a nonterminal symbol in order to declare a
7859 destructor for its semantic value.
7860
7861 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
7862
7863 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
7864 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
7865 __cplusplus && ! defined _STDLIB_H && !
7866 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
7867 defined free))]: Include <stdlib.h> rather than rolling our own
7868 declarations of malloc and free, to avoid problems with
7869 incompatible declarations (using 'throw') C++'s stdlib.h. This
7870 should fix Debian bug 340012
7871 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
7872 reported by Guillaume Melquiond.
7873
7874 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
7875
7876 * NEWS: Clarify symbols versus types in unused-value warnings.
7877
7878 * configure.ac (AC_INIT): Bump version number.
7879
7880 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
7881
7882 * NEWS: Version 2.1a.
7883 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
7884 since C99 requires this.
7885
7886 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
7887
7888 * m4/c-working.m4: New file.
7889 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
7890
7891 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
7892
7893 * Makefile.maint: Merge from coreutils.
7894
7895 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
7896
7897 More portability fixes for problems summarized by Nelson H. F. Beebe.
7898
7899 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
7900 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
7901 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
7902 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
7903 messes up because C++ code is compiled in 32-bit mode but linked
7904 in 64-bit mode.
7905
7906 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
7907
7908 More portability fixes for problems summarized by Nelson H. F. Beebe.
7909
7910 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
7911 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
7912
7913 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
7914 nodist_PROGRAMS, since we don't need to actually compile the
7915 example if we're just doing a plain 'make'. This avoids bothering
7916 the installer unnecessarily about problems due to weird C++
7917 compilers.
7918
7919 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
7920
7921 More portability fixes for problems summarized by Nelson H. F. Beebe.
7922
7923 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
7924 than #include "...", and compile with -I'.'. The old method was
7925 not portable, according to Posix and the C standard, and it does
7926 not work with Sun C 5.7, where previous #line directives affect
7927 the working directory used in later #include "..." directives.
7928
7929 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7930
7931 Various DJGGP specific issues in /djgpp
7932
7933 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
7934
7935 More portability fixes for problems summarized by Nelson H. F. Beebe.
7936
7937 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
7938 '#include <map>' works and that you can apply ++ to iterators.
7939
7940 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
7941
7942 Work around portability problems summarized by Nelson H. F. Beebe in
7943 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
7944
7945 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
7946 that '#include <string>' works.
7947
7948 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
7949 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
7950 "warning: sorry: semantics of inline function static data `const
7951 unsigned char translate_table[262]' are wrong (you'll wind up with
7952 multiple copies)".
7953
7954 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
7955 or, xor to not_, and_, or_, and xor_, respectively. This works
7956 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
7957 random system header somewhere that includes the equivalent of
7958 <iso646.h>.
7959
7960 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
7961 -E" works; it apparently doesn't work with PathScale EKO Compiler
7962 Suite Version 2.0.
7963
7964 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
7965
7966 During deterministic GLR operation, user actions should be able to
7967 influence the parse by changing yychar. To make this easier to fix and
7968 to make glr.c easier to evolve in general, don't maintain yytoken in
7969 parallel with yychar; just compute yytoken when needed.
7970 * tests/glr-regression.at (Incorrect lookahead during deterministic
7971 GLR): Check that setting yychar in a user action has the intended
7972 effect.
7973 * data/glr.c (yyGLRStack): Remove yytokenp member.
7974 (yyclearin): Don't set *yytokenp.
7975 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
7976 yychar rather than *yytokenp to determine the current lookahead.
7977 Compute yytoken locally when needed.
7978 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
7979 point to.
7980
7981 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
7982 after `--report' documentation.
7983
7984 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
7985
7986 * src/parse-gram.y (grammar_declaration): Location of printer
7987 symbol is @1, not list->location. Bug reported by twlevo.
7988 * tests/input.at (Incompatible Aliases): Adjust to above change.
7989
7990 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
7991
7992 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
7993 all the test at once. This makes the output easier to read in the
7994 normal case.
7995
7996 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
7997 got from <http://bro-ids.org/download.html>. The bug is that
7998 when two actions appeared in succession, the second one was
7999 scanned before the first one was added to the grammar rule
8000 as a midrule action. Bison then output the incorrect warning
8001 "parse.y:905.17-906.36: warning: unused value: $3".
8002 * src/parse-gram.y (BRACED_CODE, action): These are no longer
8003 associated with a value.
8004 (rhs): Don't invoke grammar_current_rule_action_append.
8005 (action): Invoke it here instead.
8006 * src/reader.c (grammar_midrule_action): Now extern.
8007 (grammar_current_rule_action_append): Don't invoke
8008 grammar_midrule_action; that is now the scanner's job.
8009 * src/reader.h (last_string, last_braced_code_loc):
8010 (grammar_midrule_action): New decls.
8011 * src/scan-gram.l (last_string): Now extern, sigh.
8012 (last_braced_code_loc): New extern variable.
8013 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
8014 rule already has an action.
8015 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
8016 * tests/input.at (AT_CHECK_UNUSED_VALUES):
8017 Add some tests to check that the above changes fixed the bug.
8018
8019 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
8020
8021 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
8022 All used changed. Check whether the symbol has a destructor,
8023 not whether it is typed.
8024 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
8025 that the values are still reported as unused. All line numbers
8026 adjusted.
8027
8028 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
8029
8030 Work around a bug in bro 0.8, which underparenthesizes its
8031 definition of YYLLOC_DEFAULT.
8032 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
8033 their arguments.
8034 * data/lalr1.cc: Likewise.
8035 * data/yacc.cc: Likewise.
8036
8037 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
8038
8039 Work around a bug in Pike 7.0, and give the Pike folks a
8040 better way to override the usual int widths.
8041 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
8042 user can override the types.
8043 (short): #undef, to work around a bug in Pike 7.0.
8044 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
8045 (union yyalloc.yyss): Use yytype_int16 rather than short.
8046 All uses changed.
8047 (yysigned_char): Remove.
8048 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
8049 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
8050 * tests/regression.at (Web2c Actions): Adjust to above changes.
8051
8052 * src/reader.c (check_and_convert_grammar): New function.
8053 (reader): Close the input file even if something went wrong during
8054 parsing. Minor file descriptor leak reported by twlevo.
8055
8056 * src/assoc.c (assoc_to_string): Use a default: abort (); case
8057 to pacify gcc -Wswitch-default.
8058 * src/scan-gram.l (adjust_location): Use a default: break; case
8059 to pacify gcc -Wswitch-default.
8060 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
8061 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
8062 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
8063 Move these decls to scan-skel.l, since they don't need to be
8064 visible elsewhere.
8065 * src/scan-skel.l: Accept the above decls.
8066 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
8067 is used.
8068
8069 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
8070
8071 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
8072 since we don't want to insist on a version number at the start
8073 of the changelog every time.
8074 * Makefile.maint: Sync from coreutils a bit better.
8075 (sc_trailing_blank): Renamed from sc_trailing_space.
8076 All uses changed.
8077 (sc_no_if_have_config_h, sc_require_config_h):
8078 (sc_prohibit_assert_without_use): New rules.
8079 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
8080 (sc_dd_max_sym_length): Fix leading spaces in rule.
8081 (sc_system_h_headers): Prefix with @.
8082 (sc_useless_cpp_parens, m4-check): Output line numbers.
8083 (changelog-check): Allow version only in head.
8084 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
8085 satisfy new Makefile.maint rule.
8086 * data/glr.c: Likewise.
8087 * data/glr.cc: Likewise.
8088 * data/lalr1.cc: Likewise.
8089 * data/yacc.c: Likewise.
8090 * lib/ebitsetv.c: Likewise.
8091 * lib/lbitset.c: Likewise.
8092 * lib/subpipe.c: Likewise.
8093 * lib/timevar.c: Likewise.
8094 * src/system.h: Likewise.
8095 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
8096 * djgpp/Makefile.maint: Add copyright notice.
8097 * djgpp/README.in: Likewise.
8098 * djgpp/config.bat: Likewise.
8099 * djgpp/config.site: Likewise.
8100 * djgpp/config_h.sed: Likewise.
8101 * djgpp/djunpack.bat: Likewise.
8102 * djgpp/config.sed: Fix copyright notice to match standard format.
8103 * djgpp/subpipe.h: Likewise.
8104 * lib/bitsetv-print.c: Likewise.
8105 * lib/bitsetv.c: Likewise.
8106 * lib/subpipe.h: Likewise.
8107 * lib/timevar.c: Likewise.
8108 * lib/timevar.h: Likewise.
8109 * djgpp/subpipe.c: Use standard recipe for config.h.
8110 * lib/abitset.c: Likewise.
8111 * lib/bitset.c: Likewise.
8112 * lib/bitset_stats.c: Likewise.
8113 * lib/bitsetv-print.c: Likewise.
8114 * lib/bitsetv.c: Likewise.
8115 * lib/ebitsetv.c: Likewise.
8116 * lib/get-errno.c: Likewise.
8117 * lib/lbitset.c: Likewise.
8118 * lib/subpipe.c: Likewise.
8119 * lib/timevar.c: Likewise.
8120 * lib/vbitset.c: Likewise.
8121 * tests/local.at: Likewise.
8122 * src/scan-gram.l: Don't include verify.h, since system.h does
8123 that for us.
8124 * .x-sc_require_config_h: New file.
8125 * .x-sc_unmarked_diagnostics: New file.
8126
8127 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
8128
8129 Be a bit more systematic about using 'abort'.
8130 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
8131 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
8132 Put 'default: abort ();' before some other case, to satisfy older
8133 pedantic compilers.
8134 * lib/bitset_stats.c (bitset_stats_init): Likewise.
8135 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
8136 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
8137 * src/conflicts.c (resolve_sr_conflict): Likewise.
8138 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
8139 (get_decision_str, get_orientation_str, get_node_alignment_str):
8140 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
8141 (get_linestyle_str, get_arrowstyle_str): Likewise.
8142 * src/conflicts.c (resolve_sr_conflict):
8143 Use a default case rather than one for the one remaining enum
8144 value, to catch invalid enum values as well.
8145 * src/lalr.c (set_goto_map, map_goto):
8146 Prefer "assert (FOO);" to "if (!FOO) abort ();".
8147 * src/nullable.c (nullable_compute, token_definitions_output):
8148 Likewise.
8149 * src/reader.c (packgram, reader): Likewise.
8150 * src/state.c (transitions_to, state_new, state_reduction_find):
8151 Likewise.
8152 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
8153 (symbol_pack): Likewise.
8154 * src/tables.c (conflict_row, pack_vector): Likewise.
8155 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
8156 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
8157 * src/system.h: Don't include <assert.h>.
8158 (assert): New macro.
8159
8160 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
8161 (Destructor Decl, Parser Function, Pure Calling):
8162 Describe rules for braces inside C code more carefully.
8163
8164 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
8165
8166 Fix some porting glitches found by Nelson H. F. Beebe.
8167 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
8168 compilers that don't understand that abort () does not return.
8169 * src/state.c (transitions_to): Likewise.
8170 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8171 that '#include <cstdlib>' works.
8172 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
8173 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
8174 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
8175 for the benefit of some pre-C99 compilers.
8176
8177 * bootstrap: Undo changes to gnulib files that autoreconf made.
8178
8179 Minor fixups to get 'make maintainer-check' to work.
8180 * configure.ac: Don't use -Wnested-externs, as it's incompatible
8181 with the new verify.h implementation.
8182 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
8183 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
8184 * data/yacc.c (YYUSE): Likewise.
8185 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
8186 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
8187 * src/parse-gram.y (declaration): Don't pass a string constant
8188 to a function that expects char *, since GCC might complain
8189 about the constant value.
8190 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
8191 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
8192 before #defining them.
8193 * tests/glr-regression.at
8194 (Incorrectly initialized location for empty right-hand side in GLR):
8195 In yyerror, use the msg arg.
8196 (Corrupted semantic options if user action cuts parse):
8197 (Incorrect lookahead during deterministic GLR):
8198 (Incorrect lookahead during nondeterministic GLR):
8199 Don't name a local var 'index'; it shadows string.h's 'index'.
8200
8201 2006-01-19 Akim Demaille <akim@epita.fr>
8202
8203 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
8204 location, not just parts of it.
8205
8206 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
8207
8208 * NEWS: Document the fact that multiple %unions are now allowed.
8209 * doc/bison.texinfo (Union Decl): Likewise.
8210 * TODO: This feature is now implemented, so remove it from
8211 the wishlist.
8212
8213 * Makefile.maint: Merge with coreutils Makefile.maint.
8214 (CVS_LIST): Use build-aux version if available.
8215 (VERSION_REGEXP): New macro.
8216 (syntax-check-rules): Add sc_no_if_have_config_h,
8217 sc_prohibit_assert_without_use, sc_require_config_h,
8218 sc_useless_cpp_parens.
8219 (sc_obsolete_symbols): Check for O_NDELAY.
8220 (sc_dd_max_sym_length): Track coreutils.
8221 (sc_unmarked_diagnostics): Look in all files, not just *.c.
8222 (sc_useless_cpp_parens): New rule.
8223 (news-date-check): Look for version or today's date.
8224 (changelog-check): Don't require version number near head.
8225 (copyright-check): Use current year instead of hardwiring 2005.
8226 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
8227 (announcement): Add --gpg-key-ID.
8228
8229 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
8230 with "file system".
8231
8232 Avoid undefined behavior that addressed just before the start of an
8233 array. Problem reported by twlevo.
8234 * src/reader.c (packgram): Prepend a new sentinel before ritem.
8235 * src/lalr.c (build_relations): Rely on new sentinel.
8236 * src/gram.c (gram_free): Adjust to new sentinel.
8237
8238 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
8239
8240 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
8241 yylookaheadNeeds. All uses updated.
8242 (yysplitStack): Rename local yynewLookaheadStatuses to
8243 yynewLookaheadNeeds.
8244 * data/glr-regression.at (Incorrect lookahead during nondeterministic
8245 GLR): In comments, change `lookahead status' to `lookahead need'.
8246
8247 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8248
8249 * data/glr.c (yysplitStack): A little stylistic rewrite.
8250
8251 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8252
8253 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
8254
8255 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
8256
8257 * doc/bison.texinfo: Fix some typos.
8258 (GLR Semantic Actions): New subsection discussing special
8259 considerations because GLR semantic actions might be deferred.
8260 (Actions): Mention look-ahead usage of yylval.
8261 (Actions and Locations): Mention look-ahead usage of yylloc.
8262 (Special Features for Use in Actions): Add YYEOF entry and mention it
8263 in the yychar entry.
8264 In the yychar entry, remove mention of the local yychar case (pure
8265 parser) since this is irrelevant information when writing semantic
8266 actions and since it's already discussed in `Table of Symbols' where
8267 yychar is otherwise described as an external variable.
8268 In the yychar entry, don't call it the `current' look-ahead since it
8269 isn't when semantic actions are deferred.
8270 In the yychar and yyclearin entries, add note about deferred semantic
8271 actions.
8272 Add yylloc and yylval entries discussing look-ahead usage.
8273 (Look-Ahead Tokens): When discussing yychar, don't call it the
8274 `current' look-ahead, and do mention yylval and yylloc.
8275 (Error Recovery): Cross-reference `Action Features' when mentioning
8276 yyclearin.
8277 (Table of Symbols): In the yychar entry, don't call it the `current'
8278 look-ahead.
8279 In the yylloc and yylval entries, mention look-ahead usage.
8280
8281 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
8282
8283 * tests/glr-regression.at: Update copyright year to 2006.
8284
8285 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8286
8287 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
8288 use during nondeterministic operation to track which stacks have
8289 actually needed the current lookahead.
8290 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
8291 Allocate, deallocate, resize, and otherwise shuffle space for
8292 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
8293 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
8294 appropriately during nondeterministic operation.
8295 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
8296 members to store the current lookahead to be used by the deferred
8297 user action.
8298 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
8299 from which the RHS is taken. Set the lookahead members of the new
8300 yySemanticOption according to the lookahead status for stack yyk.
8301 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
8302 yyaddDeferredAction.
8303 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
8304 members of yySemanticOption before invoking yyuserAction, and then set
8305 them back to their current values afterward.
8306 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
8307 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
8308 * tests/glr-regression.at: Remove `.' from the ends of recent test case
8309 titles for consistency.
8310 (Leaked merged semantic value if user action cuts parse): In order to
8311 suppress lint warnings, use arguments in merge function, and assign
8312 char value < 128 in main.
8313 (Incorrect lookahead during deterministic GLR): New test case.
8314 (Incorrect lookahead during nondeterministic GLR): New test case.
8315
8316 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8317
8318 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
8319 !yyvaluep as signal that no semantic value is available to print.
8320 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
8321 to print a semantic value.
8322
8323 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8324
8325 * tests/glr-regression.at: For consistency with my newer test cases,
8326 don't thank myself.
8327
8328 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
8329
8330 * data/glr.c (yyresolveValue): When merging semantic options, if at
8331 least one user action succeeds but a later one cuts the parse, then
8332 destroy the semantic value before returning rather than leaking it.
8333 (yyresolveStates): If a user action cuts the parse and thus
8334 yyresolveValue fails, ignore the (unset) semantic value rather than
8335 corrupting the yyGLRState, and empty the semantic options list since
8336 the user actions should have called all necessary destructors.
8337 Simplify code with YYCHK.
8338 * tests/glr-regression.at (Corrupted semantic options if user action
8339 cuts parse): New test case.
8340 (Undesirable destructors if user action cuts parse): New test case.
8341 Before applying any of this patch, this test case never actually failed
8342 for me... but only because the corrupted semantic options usually
8343 masked this bug.
8344 (Leaked merged semantic value if user action cuts parse): New test
8345 case.
8346
8347 2006-01-05 Akim Demaille <akim@epita.fr>
8348
8349 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
8350
8351 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
8352
8353 * data/c.m4 (b4_c_modern): New macro, with a new provision for
8354 _MSC_VER. Problem reported by Cenzato Marco.
8355 (b4_c_function_def): Use it.
8356 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
8357 b4_c_modern.
8358 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
8359 than rolling our own.
8360
8361 2006-01-04 Akim Demaille <akim@epita.fr>
8362
8363 Also warn about non-used mid-rule values.
8364 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
8365 member.
8366 (symbol_list_new): Adjust.
8367 * src/reader.c (symbol_typed_p): New.
8368 (grammar_rule_check): Use it.
8369 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
8370 Check its rule.
8371 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
8372 Use it.
8373 * tests/actions.at (Exotic Dollars): Adjust.
8374
8375 2006-01-04 Akim Demaille <akim@epita.fr>
8376
8377 * src/reader.c (grammar_midrule_action): If $$ is set in a
8378 mid-rule, move the `used' bit to its lhs.
8379 * tests/input.at (Unused values): New.
8380 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
8381
8382 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
8383
8384 * doc/bison.texinfo (Bison Options): Say more accurately what
8385 --yacc does.
8386 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
8387 about declarations in the grammar when in Yacc mode, as POSIX does
8388 not require a diagnostic when the grammar uses extensions.
8389
8390 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
8391
8392 Warn about dubious constructions like "%token T T".
8393 Reported by twlevo.
8394 * src/symtab.h (struct symbol.declared): New member.
8395 * src/symtab.c (symbol_new): Initialize it to false.
8396 (symbol_class_set): New arg DECLARING, specifying whether
8397 this is a declaration that we want to warn about, if there
8398 is more than one of them. All uses changed.
8399
8400 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
8401 Allow multiple %union directives, whose contents concatenate.
8402 * src/parse-gram.y (grammar_declaration): Likewise.
8403 Use muscle_code_grow, so that we don't need stype_line any more.
8404 All uses changed.
8405
8406 * src/muscle_tab.c (muscle_grow): Fix comment.
8407
8408 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
8409 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
8410 Update copyright year to 2006.
8411
8412 2006-01-03 Akim Demaille <akim@epita.fr>
8413
8414 Have glr.cc pass (some of) the calc.at tests.
8415 * data/glr.cc (b4_parse_param_orig): New.
8416 (b4_parse_param): Improve its definition, and bound it more
8417 clearly in the skeleton.
8418 (b4_epilogue): Append, instead of prepending, in order to keep
8419 #line consistency.
8420 Simplify the generation of auxiliary functions: locations and
8421 purity are mandated.
8422 (b4_global_tokens_and_yystype): Honor it.
8423 * data/location.cc (c++.m4): Don't include it.
8424 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
8425 and AT_SKEL_CC_IF.
8426 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
8427 AT_LALR1_CC_IF.
8428 Be sure to initialize the first position's filename.
8429 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
8430 mandated anyway.
8431 (AT_CHECK_CALC_GLR_CC): New.
8432 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
8433
8434 2006-01-02 Akim Demaille <akim@epita.fr>
8435
8436 * src/output.c (output_skeleton): Don't hard wire the inclusion of
8437 c.m4.
8438 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
8439 * data/glr.cc: Do not include stack.hh.
8440
8441 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
8442
8443 * data/glr.c: Reformat whitespace with tabs.
8444 (b4_lpure_formals): Remove this unused m4 macro.
8445 * tests/cxx-type.at: Reformat whitespace with tabs.
8446 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
8447 since it's a member. Rename type to isNterm for clarity.
8448
8449 2005-12-29 Akim <akim@sulaco.local>
8450
8451 Let glr.cc catch up with symbol_value_print.
8452 * data/glr.cc (b4_yysymprint_generate): Replace by...
8453 (b4_yy_symbol_print_generate): this.
8454 (yy_symbol_print, yy_symbol_value_print): Declare them.
8455
8456 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
8457
8458 * src/location.h (boundary): Note that a line or column equal
8459 to INT_MAX indicates an overflow.
8460 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
8461 (rule_length_overflow, increment_rule_length, add_column_width):
8462 New functions.
8463 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
8464 (<SC_BRACED_CODE>"}"):
8465 Use increment_rule_length rather than incrementing it by hand.
8466 (adjust_location, handle_syncline): Diagnose overflow.
8467 (handle_action_dollar, handle_action_at):
8468 Fix bug with monstrosities like $-2147483648.
8469 Remove now-unnecessary checks.
8470 (scan_integer): Verify assumptions and remove now-unnecessary checks.
8471 (convert_ucn_to_byte): Verify assumptions.
8472 (handle_syncline): New arg LOC. All callers changed.
8473 Don't store through a value derived from char const * pointer.
8474
8475 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
8476 GCC warnings.
8477
8478 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
8479
8480 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
8481 Remove unnecessary forward static decls.
8482
8483 2005-12-27 Akim Demaille <akim@epita.fr>
8484
8485 * src/reader.c (grammar_current_rule_check): Also check that $$
8486 is used.
8487 Take the rule to check as argument, hence rename as...
8488 (grammar_rule_check): this.
8489 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
8490 Rename as...
8491 (grammar_rule_begin, grammar_rule_end): these, for consistency.
8492 (grammar_midrule_action, grammar_symbol_append): Now static.
8493 * tests/torture.at (input): Don't rely on the default action
8494 being always performed.
8495 * tests/calc.at: "Set" $$ even when the action is "cut" with
8496 YYERROR or other.
8497 * tests/actions.at (Exotic Dollars): Instead of using unused
8498 values, check that the warning is issued.
8499
8500 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
8501
8502 * NEWS: Improve wording for unused-value warnings.
8503
8504 2005-12-22 Akim Demaille <akim@epita.fr>
8505
8506 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
8507 (b4_yysymprint_generate): Rename as...
8508 (b4_yy_symbol_print_generate): this.
8509 Generate yy_symbol_print instead of yysymprint.
8510 Generate also yy_symbol_value_print, and use it.
8511
8512 2005-12-22 Akim Demaille <akim@epita.fr>
8513
8514 * NEWS: Warn about unused values.
8515 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
8516 a `used' member.
8517 (symbol_list_n_get, symbol_list_n_used_set): New.
8518 (symbol_list_n_type_name_get): Use symbol_list_n_get.
8519 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
8520 * src/reader.c (grammar_current_rule_check): Check that values are
8521 used.
8522 * src/symtab.c (symbol_print): Accept 0.
8523 * tests/existing.at: Remove the type information.
8524 Empty the actions.
8525 Remove useless actions (beware of mid-rule actions: perl -000
8526 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
8527 * tests/actions.at (Exotic Dollars): Use unused values.
8528 * tests/calc.at: Likewise.
8529 * tests/glr-regression.at (No users destructors if stack 0 deleted):
8530 Likewise.
8531
8532 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
8533 rule_useful_p.
8534
8535 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
8536
8537 Undo 2005-12-01 tentative license wording change. The wording is
8538 still being reviewed by the lawyers, and we don't want to wait for
8539 them before publishing a test release. For now, revert to the
8540 previous wording.
8541 * NEWS: Undo 2005-12-01 change.
8542 * data/glr.c: Revert to previous license wording.
8543 * data/glr.cc: Likewise.
8544 * data/lalr1.cc: Likewise.
8545 * data/location.cc: Likewise.
8546 * data/yacc.c: Likewise.
8547
8548 * NEWS: Reword %destructor vs YYABORT etc.
8549 * data/glr.c: Use American spacing, for consistency.
8550 * data/glr.cc: Likewise.
8551 * data/lalr1.cc: Likewise.
8552 * data/yacc.c: Likewise.
8553 * data/yacc.c: Reformat comments slightly.
8554 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
8555 for consistency. Fix some spelling errors and reword recently-included
8556 text slightly.
8557 * tests/cxx-type.at: Cast results of malloc, for C++.
8558
8559 2005-12-21 Joel E. Denny <address@hidden>
8560
8561 * tests/cxx-type.at: Construct a tree, count the parents of shared
8562 nodes, and free each node once and only once. Previously, the memory
8563 for semantic values was leaked instead.
8564
8565 2005-12-21 Joel E. Denny <address@hidden>
8566
8567 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
8568 (yylval, yylloc): If pure, #define to yystackp->yyval and
8569 yystackp->yyloc similar to yychar and yynerrs.
8570 (yyparse): If pure, remove local yylval and yylloc. Add local
8571 yystackp to accommodate pure definitions of yylval and yylloc.
8572 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
8573 yylvalp and yyllocp to &yylval and &yylloc.
8574 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
8575 namespace. Previously, nerrs and char were missing, but lval and lloc
8576 weren't necessary.
8577 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
8578 yylvalp and yyllocp parameters since, if pure, these are now always
8579 accessible through yystackp. If not pure, they are still accessible
8580 globally.
8581 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
8582 `if (YYID (N))' to pacify lint.
8583
8584 2005-12-21 Akim Demaille <akim@epita.fr>
8585
8586 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
8587 destroy the RHS symbols of a rule.
8588 * data/yacc.c (yylen): Initialize to 0.
8589 Keep its value to the number of items to possibly shift.
8590 In particular, a regular successful parse that ends on YYFINAL by
8591 a (internal) YYACCEPT must not have yylen != 0.
8592 (yyerrorlab, yyreturn): Pop the RHS.
8593 Reorder a bit to emphasize the `shifting' bits of code.
8594 (YYPOPSTACK): Now accept a number of items to pop.
8595 * data/lalr1.cc: Likewise.
8596 * data/glr.c: Formatting changes.
8597 Use goto instead of fall through.
8598 * doc/bison.texinfo (Destructor Decl): Complete.
8599
8600 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8601
8602 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
8603 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
8604 * djgpp/config.bat: Replace every occurence of the file name
8605 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
8606 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
8607 * djgpp/config.sed: Replace every occurence of the file name
8608 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
8609 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
8610 * djgpp/djunpack.bat: DJGPP specific file.
8611 * djgpp/fnchange.lst: DJGPP specific file.
8612 * djgpp/README.in: Add new information about how to unpack the bison
8613 source on MSDOS and other systems which have 8.3 file name restrictions
8614 using djunpack.bat and fnchange.lst.
8615
8616 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
8617
8618 * bootstrap (build_cvs_prefix): Remove; unused.
8619 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
8620 when getting gnulib.
8621
8622 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
8623
8624 * data/glr.c: Reorder typedef declarations for structs to match order
8625 of struct declarations.
8626 Rename yystack everywhere to yystackp except in yyparse where it's not
8627 a pointer.
8628 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
8629 consistency.
8630 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
8631 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
8632 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
8633 lint.
8634
8635 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
8636
8637 * tests/sets.at (Accept): Fix typos in regular expression used to
8638 sed out the final state number.
8639
8640 Work around portability problem on Solaris 10: flex-generated
8641 files include <stdio.h> before <config.h>, which messes up
8642 because the latter defines __EXTENSIONS__. Address the problem
8643 by creating two new little files that include <config.h> first,
8644 then include the flex-generated files. Rewrite everyone else
8645 to include <config.h> first, as well.
8646 * lib/timevar.c: Always include "config.h".
8647 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
8648 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
8649 (EXTRA_bison_SOURCES): New macro.
8650 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
8651 * src/system.h: Don't include config.h.
8652 * src/LR0.c: Include <config.h> first.
8653 * src/assoc.c: Likewise.
8654 * src/closure.c: Likewise.
8655 * src/complain.c: Likewise.
8656 * src/conflicts.c: Likewise.
8657 * src/derives.c: Likewise.
8658 * src/files.c: Likewise.
8659 * src/getargs.c: Likewise.
8660 * src/gram.c: Likewise.
8661 * src/lalr.c: Likewise.
8662 * src/location.c: Likewise.
8663 * src/main.c: Likewise.
8664 * src/muscle_tab.c: Likewise.
8665 * src/nullable.c: Likewise.
8666 * src/output.c: Likewise.
8667 * src/parse-gram.y: Likewise.
8668 * src/print.c: Likewise.
8669 * src/print_graph.c: Likewise.
8670 * src/reader.c: Likewise.
8671 * src/reduce.c: Likewise.
8672 * src/relation.c: Likewise.
8673 * src/state.c: Likewise.
8674 * src/symlist.c: Likewise.
8675 * src/symtab.c: Likewise.
8676 * src/tables.c: Likewise.
8677 * src/uniqstr.c: Likewise.
8678 * src/vcg.c: Likewise.
8679
8680 * src/parse-gram.y: Fix minor problems uncovered by lint.
8681 (current_lhs, current_lhs_location): Now static.
8682 (current_assoc): Remove unused variable.
8683
8684 Cleanups so that Bison-generated parsers have less lint.
8685 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
8686 Prepend /*ARGSUSED*/, for lint's sake.
8687 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
8688 definition if 'lint' is defined.
8689 (YYID): New macro (or function, if lint).
8690 All uses of /*CONSTCOND*/0 replaced by YYID(0).
8691 * data/yacc.c: Likewise.
8692 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
8693 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
8694 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
8695 is C++ only.
8696 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
8697 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
8698 Use YYID(0) rather than 0, for lint.
8699 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
8700 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
8701
8702 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
8703
8704 * tests/glr-regression.at
8705 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
8706 Close memory leak reported by twlevo.
8707
8708 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
8709
8710 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
8711 all stacks.
8712 (yyparse): Iterate another stack in order to call user destructors.
8713 * tests/glr-regression.at (No users destructors if stack 0 deleted):
8714 New test case.
8715 (Duplicated user destructor for lookahead): This test now is expected
8716 to succeed.
8717
8718 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
8719
8720 * NEWS: Document the following change.
8721 * data/yacc.c: Say "parser skeleton" rather than "file", since
8722 it's no longer just a file.
8723 * data/glr.c: Grant a special exception for C GLR parsers, that
8724 reads like the already-existing exception for C LALR(1) parsers.
8725 * data/glr.cc: Likewise.
8726 * data/lalr1.cc: Likewise.
8727 * data/location.cc: Likewise.
8728 * data/yacc.c: Reword the "written by" statement to clarify that
8729 it was the parser skeleton, not the entire output file.
8730 * data/glr.c: Written by Paul Hilfinger.
8731 * data/glr.cc: Written by Akim Demaille.
8732 * data/lalr1.cc: Likewise.
8733
8734 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
8735
8736 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
8737 Fix typos in previous change that broke 'make check'.
8738 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
8739 supported in C.
8740 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
8741 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
8742 We can revert this once things settle down.
8743
8744 * src/conflicts.c (conflicts_print): Don't print file name twice
8745 when %expect fails because there were no conflicts.
8746 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
8747 change.
8748 * tests/conflicts.at (%expect not enough, %expect too much):
8749 (%expect with reduce conflicts): Adjust to new behavior.
8750
8751 2005-11-18 Akim Demaille <akim@epita.fr>
8752
8753 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
8754 errors.
8755 * NEWS: Document this.
8756 * doc/bison.texinfo (Expect Decl): Likewise.
8757
8758 2005-11-16 Akim Demaille <akim@epita.fr>
8759
8760 Generalize the display of semantic values and locations in traces.
8761 * data/glr.c (yy_reduce_print): Fix indices (again).
8762 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
8763 literal integers.
8764 * data/lalr1.cc (yyreduce_print): Rename as...
8765 (yy_reduce_print): this.
8766 Display values and locations.
8767 * data/yacc.c (yy_reduce_print): Likewise.
8768 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
8769 (yysymprint): Move higher to be visible from yy_reduce_print).
8770 (yyparse): Adjust.
8771 * tests/calc.at: Adjust the expected length of the traces.
8772
8773 2005-11-14 Akim Demaille <akim@epita.fr>
8774
8775 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
8776 from 1 to N, while values and location start at 0.
8777 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
8778
8779 2005-11-14 Akim Demaille <akim@epita.fr>
8780
8781 * data/glr.c (yy_reduce_print): Fix the $ number.
8782
8783 2005-11-14 Akim Demaille <akim@epita.fr>
8784
8785 "Use" parse parameters.
8786 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
8787 * data/glr.c, data/glr.cc: Use them.
8788 * data/glr.c (YYUSE): Have a C++ definition that supports
8789 non-pointer types.
8790
8791 2005-11-14 Akim Demaille <akim@epita.fr>
8792
8793 * data/glr.c (yyexpandGLRStack): Declare only if defined.
8794
8795 2005-11-14 Akim Demaille <akim@epita.fr>
8796
8797 * data/glr.cc: New.
8798 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
8799
8800 2005-11-12 Akim Demaille <akim@epita.fr>
8801
8802 Let position and location be PODs.
8803 * data/location.cc (position::initialize, location::initialize): New.
8804 (position::position, location::location): Define only if
8805 b4_location_constructors is defined.
8806 * data/lalr1.cc (b4_location_constructors): Define it for backward
8807 compatibility.
8808 * doc/bison.texinfo (Initial Action Decl): Use initialize.
8809
8810 2005-11-12 Akim Demaille <akim@epita.fr>
8811
8812 * data/lalr1.cc: Move the body of the ctor and dtor into the
8813 parser file (instead of the header).
8814 Wrap the implementations in a "namespace yy".
8815
8816 2005-11-12 Akim Demaille <akim@epita.fr>
8817
8818 Have glr.c include its header file when created.
8819 * data/glr.c (b4_shared_declarations): New.
8820 Output them verbatim in the parser if !%defines, otherwise
8821 output then in the header file, and include it instead.
8822
8823 2005-11-11 Akim Demaille <akim@epita.fr>
8824
8825 * data/glr.c: Comment changes.
8826
8827 2005-11-11 Akim Demaille <akim@epita.fr>
8828
8829 When yydebug, report semantic and location values for reductions.
8830 * data/glr.c (yy_reduce_print): Report the semantic values and the
8831 locations.
8832 (YY_REDUCE_PRINT): Adjust.
8833 (yyglrReduce): Use them.
8834 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
8835 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
8836 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
8837 traces.
8838
8839 2005-11-10 Akim Demaille <akim@epita.fr>
8840
8841 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
8842 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
8843 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
8844
8845 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
8846
8847 * m4/cxx.m4, examples/Makefile.am: Don't build
8848 examples/calc++ if no C++ compiler is available. (trivial change)
8849
8850 2005-11-09 Akim Demaille <akim@epita.fr>
8851
8852 * src/scan-skel.l: Use a couple of asserts.
8853
8854 2005-11-03 Akim Demaille <akim@epita.fr>
8855
8856 In some (weird) cases, the final state number is incorrect.
8857 Reported by Alexandre Duret-Lutz.
8858 * src/LR0.c (state_list_append): Remove the computation of
8859 final_state.
8860 (save_reductions): Do it here.
8861 (get_state): Alpha conversion.
8862 (generate_states): Use a for loop.
8863 * src/gram.h (item_number_is_rule_number)
8864 (item_number_is_symbol_number): New.
8865 * src/state.c: Use assert.
8866 * src/system.h: Include assert.h.
8867 * tests/sets.at (Accept): New.
8868
8869 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8870
8871 * data/glr.c (yyfill): Adjust comment.
8872 (yyresolveAction): Initialize default location properly
8873 for empty right-hand sides.
8874 (yydoAction): Ditto.
8875 Add comment explaining apparently dead code.
8876 * tests/glr-regression.at
8877 (Incorrectly initialized location for empty right-hand side in GLR):
8878 New test.
8879
8880 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
8881
8882 * bootstrap (cleanup_gnulib): New function. Use it to clean up
8883 gnulib when interrupted. This fixes some race conditions and
8884 works around some portability problems (one noted by Paul
8885 Hilfinger).
8886
8887 2005-10-22 Akim <akim@epita.fr>
8888
8889 * Makefile.cfg: Adjust to config -> build-aux.
8890 Reported by twledo.
8891
8892 2005-10-21 Akim Demaille <akim@epita.fr>
8893
8894 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
8895 the %parse-params.
8896 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
8897 * data/yacc.c (b4_Pure_if): Rename as...
8898 (b4_yacc_pure_if): this.
8899 (YY_SYMBOL_PRINT, yyparse): Adjust.
8900 * doc/bison.texinfo: Formatting changes.
8901
8902 2005-10-21 Akim Demaille <akim@epita.fr>
8903
8904 Finish the transition config -> build-aux.
8905 * configure.ac, Makefile.am: Use build-aux.
8906 * config/prev-version, config/announce-gen, config/Makefile.am:
8907 Move to...
8908 * build-aux/prev-version, build-aux/announce-gen,
8909 * build-aux/Makefile.am: here.
8910
8911 2005-10-14 Akim Demaille <akim@epita.fr>
8912
8913 * examples/calc++/test: Use set -x only when VERBOSE.
8914
8915 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
8916
8917 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
8918 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
8919
8920 2005-10-13 Akim Demaille <akim@epita.fr>
8921
8922 * src/scan-skel.l: Output the base name parts of the parser and
8923 header file names.
8924 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
8925 additional checks.
8926 Use this to exercise C++ outputs in subdirs.
8927 Reported by Oleg Smolsky.
8928
8929 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
8930
8931 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
8932 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
8933 Problem reported by John P. Hartmann.
8934 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
8935 already defined it.
8936
8937 2005-10-12 Akim Demaille <akim@epita.fr>
8938
8939 * src/parse-gram.y (version_check): Exit 63 to please missing
8940 (stands for "version mismatch).
8941 * tests/input.at, doc/bison.texinfo: Adjust.
8942
8943 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
8944
8945 Work around portability problems with Visual Age C compiler
8946 (xlc and xlC_r) reported by John P. Hartmann.
8947 * data/location.cc (initial_column, initial_line): Remove.
8948 All uses replaced by 0 and 1.
8949 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
8950 that xlc complains about.
8951 * src/scan-skel.l (skel_wrap): Likewise.
8952 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
8953 as __STDC__.
8954 * data/yacc.c (YYMODERN_C): New macro, which also looks at
8955 __STDC_VERSION__. Use it everywhere instead of looking at
8956 __STDC__ and __cplusplus.
8957
8958 2005-10-10 Akim Demaille <akim@epita.fr>
8959
8960 * examples/calc++/test: Be quiet unless VERBOSE.
8961
8962 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
8963
8964 * data/c.m4 (yydestruct, yysymprint):
8965 Use YYUSE instead of casting to void.
8966 * data/glr.c (YYUSE): New macro.
8967 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
8968 Use it instead of rolling our own.
8969 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
8970 (YYCHK1):
8971 Use /*CONSTCOND*/ to suppress lint warnings.
8972 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
8973 (YY_STACK_PRINT): Use 'false' not '0'.
8974 (YYUSE): New macro.
8975 (yysymprint_, yydestruct_): Use it instead of rolling our own.
8976 * data/yacc.c (YYUSE): New macro.
8977 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
8978 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
8979 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
8980
8981
8982 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
8983 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
8984
8985 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
8986
8987 Undo the parts of the unlocked-I/O change that substituted
8988 putc or puts for printf. This might hurt performance a bit,
8989 but some people prefer the printf style.
8990 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
8991 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
8992 All uses replaced by YYFPRINTF and YYDPRINTF.
8993 * data/yacc.c: Likewise.
8994 * lib/bitset.c (bitset_print): Likewise.
8995 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
8996 putc and puts.
8997 * lib/lbitset.c (debug_lbitset): Likewise.
8998 * src/closure.c (print_firsts, print_fderives): Likewise.
8999 * src/gram.c (grammar_dump): Likewise.
9000 * src/lalr.c (look_ahead_tokens_print): Likewise.
9001 * src/output.c (escaped_output): Likewise.
9002 (user_actions_output): Break apart two printfs.
9003 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
9004 * src/reduce.c (reduce_print): Likewise.
9005 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
9006 * src/system.h: Include unlocked-io.h rathe than stdio.h.
9007
9008 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9009 Use assignments rather than casts-to-void to suppress
9010 unused-variable warnings. This pacifies 'lint'.
9011 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
9012 unused-variable warnings.
9013
9014 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9015
9016 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
9017
9018 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
9019
9020 Use unlocked I/O for a minor performance improvement on hosts like
9021 GNU/Linux and Solaris that support unlocked I/O. The basic idea
9022 is to use the gnlib unlocked-io module, and to prefer putc and
9023 puts to printf when either will work (since the latter doesn't
9024 come in an unlocked flavor).
9025 * bootstrap (gnulib_modules): Add unlocked-io.
9026 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
9027 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
9028 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
9029 and similarly for puts and putc and printf.
9030 * data/yacc.c: Likewise.
9031 * lib/bitset.c (bitset_print): Likewise.
9032 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
9033 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
9034 to printf.
9035 * lib/lbitset.c (debug_lbitset): Likewise.
9036 * src/closure.c (print_firsts, print_fderives): Likewise.
9037 * src/gram.c (grammar_dump): Likewise.
9038 * src/lalr.c (look_ahead_tokens_print): Likewise.
9039 * src/output.c (escaped_output): Likewise.
9040 (user_actions_output): Coalesce two printfs.
9041 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
9042 * src/reduce.c (reduce_print): Likewise.
9043 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
9044 * src/system.h: Include unlocked-io.h rather than stdio.h.
9045
9046 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
9047 this confuses xgettext.
9048
9049 2005-10-02 Akim Demaille <akim@epita.fr>
9050
9051 * bootstrap (gnulib_modules): Add strverscmp.
9052 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
9053 * m4/.cvsignore: Add strverscmp.m4.
9054 * src/parse-gram.y (%require): New token, new rule.
9055 (version_check): New.
9056 * src/scan-gram.l (%require): Adjust.
9057 * tests/input.at (AT_REQUIRE): New.
9058 Use it.
9059 * doc/bison.texinfo (Require Decl): New.
9060 (Calc++ Parser): Use %require.
9061
9062 2005-10-02 Akim Demaille <akim@epita.fr>
9063
9064 * data/location.cc: New.
9065
9066 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
9067 Akim Demaille <akim@epita.fr>
9068
9069 Make sure -odir/foo.cc creates dir/location.hh etc.
9070 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
9071 (spec_file_prefix, spec_verbose_file, spec_graph_file)
9072 (spec_defines_file): Now const.
9073 (dir_prefix): New.
9074 (short_base_name): Remove.
9075 * src/files.c: Adjust.
9076 (dirname.h): Include.
9077 (base_name): Don't prototype it.
9078 (finput): Remove, duplicates gram_in.
9079 (full_base_name, short_base_name): Replace by...
9080 (all_but_ext, all_but_tab_ext): these.
9081 (compute_base_names): Rename as...
9082 (compute_file_name_parts): this.
9083 Update to compute the new variables, including dir_prefix.
9084 Adjust dependencies.
9085 * src/output.c (prepare): Output them.
9086 * src/reader.c: Adjust to use gram_in, not finput.
9087 * src/scan-skel.l (@dir_prefix@): New.
9088
9089 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9090
9091 * lib/subpipe.c: New function end_of_output_subpipe() added
9092 to allow support for non-posix systems. This is a no-op function
9093 for posix systems.
9094
9095 * lib/subpipe.h: New function end_of_output_subpipe() added
9096 to allow support for non-posix systems. This is a no-op function
9097 for posix systems.
9098
9099 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
9100 handle the lack of pipe/fork functionality on non-posix systems.
9101
9102 * djgpp/Makefile.maint: DJGPP specific file.
9103
9104 * djgpp/README.in: DJGPP specific file.
9105
9106 * djgpp/config.bat: DJGPP specific configuration file.
9107
9108 * djgpp/config.sed: DJGPP specific configuration file.
9109
9110 * djgpp/config.site: DJGPP specific configuration file.
9111
9112 * djgpp/config_h.sed: DJGPP specific configuration file.
9113
9114 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
9115
9116 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
9117
9118 2005-10-02 Akim Demaille <akim@epita.fr>
9119
9120 * data/location.cc: New, extract from...
9121 * data/lalr1.cc: here.
9122 (location.hh): Include it after the user prologue, in case the
9123 filename type is defined by the user.
9124 Forward declation location and position before the pre-prologue.
9125 (yyresult_): Rename as...
9126 (yyresult): this, it's a local variable, not an attribute.
9127 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
9128
9129 2005-10-01 Akim Demaille <akim@epita.fr>
9130
9131 * examples/extexi: Restore the #line generation.
9132
9133 2005-09-30 Akim Demaille <akim@epita.fr>,
9134 Alexandre Duret-Lutz <adl@gnu.org>
9135
9136 Move the token type and YYSTYPE in the parser class.
9137 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
9138 (parser::token): New, from the moved free definition of tokens.
9139 (parser::semantic_value): Now a full definition instead of an
9140 indirection to YYSTYPE.
9141 (b4_post_prologue): No longer included in the header file, but
9142 in the implementation file.
9143 * doc/bison.texi (C+ Language Interface): Update.
9144 * src/parse-gram.y: Support unary %define.
9145 * tests/actions.at: Define global_tokens_and_yystype for backward
9146 compatibility until we update the tests.
9147 * tests/calc.at: Idem.
9148 (first_line, first_column, last_line, last_column): Define for lalr1.cc
9149 to simplify the code.
9150
9151 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
9152
9153 Port to SunOS 4.1.4, which lacks strtoul and strerror.
9154 Ah, the good old days! Problem reported by Peter Klein.
9155 * bootstrap (gnulib_modules): Add strerror, strtoul.
9156 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
9157 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
9158
9159 2005-09-29 Akim Demaille <akim@epita.fr>
9160
9161 * data/c.m4 (b4_error_verbose_if): New.
9162 * data/lalr1.cc: Use it.
9163 (YYERROR_VERBOSE_IF): Remove.
9164 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
9165 parser members, replaced by...
9166 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
9167 local variables.
9168 (yysyntax_error_): Takes the state number as argument.
9169 (yyreduce_print_): Use the argument yyrule, not the former
9170 attribute yyn_.
9171
9172 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
9173
9174 * bootstrap (gnulib_modules): Add verify.
9175 * lib/.cvsignore: Add verify.h.
9176 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
9177 * src/system.h (verify): Remove.
9178 Include verify.h instead.
9179 * src/tables.c (tables_generate): Use new API for 'verify'.
9180
9181 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
9182
9183 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
9184 local variables whose names begin with 'yy'.
9185 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
9186 Trivial changes from Joel E. Denny.
9187
9188 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
9189 it itself.
9190 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
9191 don't use alloca any more.
9192
9193 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
9194 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
9195 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
9196 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
9197 to match yacc.c, to test more hosts.
9198
9199 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
9200
9201 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
9202 doesn't affect behavior.
9203 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
9204 Solaris, AIX, MSC.
9205 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
9206 This works a bit better with glibc, if user code has already included
9207 stdlib.h.
9208 * doc/bison.texinfo (Bison Parser): Document that users can't
9209 arbitrarily use malloc and free for other purposes. Document
9210 that <alloca.h> and <malloc.h> might be included.
9211 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
9212 user must declare alloca.
9213
9214 * HACKING (release): Forwarn the Translation Project about
9215 stable releses.
9216
9217 2005-09-20 Akim Demaille <akim@epita.fr>
9218
9219 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
9220
9221 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
9222
9223 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
9224 (YYSTACK_ALLOC_MAXIMUM): Use it.
9225 (yysyntax_error): New function.
9226 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
9227 multiple syntax errors are reported, and alloca is being used.
9228 Instead, reallocate buffers twice as big each time, so that
9229 we waste at most half the allocated memory. Start with a small
9230 (128-byte) buffer that will suffice in most cases anyway.
9231 Use yysyntax_error to do most of the work.
9232
9233 * doc/bison.texinfo (Error Reporting, Table of Symbols):
9234 yynerrs is the number of errors reported, not the number of
9235 errors encountered.
9236
9237 * tests/glr-regression.at (Duplicated user destructor for lookahead):
9238 Mark it as expected to fail.
9239 Cast result of malloc; problem reported by twlevo@xs4all.nl.
9240 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
9241 Don't start user-code symbols with "yy", to avoid name space problems.
9242
9243 2005-09-19 Akim Demaille <akim@epita.fr>
9244
9245 Remove the traits, failed experiment.
9246 It never proved useful, and anyway because of the current
9247 definition, it was not possible to have several specialization of
9248 this traits, making it useless.
9249 * data/lalr1.cc (yy:traits): Remove.
9250 Inline its definitions in the parser class.
9251
9252 2005-09-19 Akim Demaille <akim@epita.fr>
9253
9254 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
9255 least Mac OSX with a /usr/local install of gettext.
9256
9257 2005-09-19 Akim Demaille <akim@epita.fr>
9258
9259 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
9260 and yytoken for similarity with the other skeletons.
9261
9262 2005-09-19 Akim Demaille <akim@epita.fr>
9263
9264 * NEWS, configure.ac: update version number to 2.1a.
9265
9266 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
9267
9268 * NEWS: Version 2.1.
9269
9270 * NEWS: Remove notice of yytname change, since it was never in an
9271 official release.
9272 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
9273 diagnostic.
9274 * src/output.c (prepare): Likewise.
9275 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
9276 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
9277 is not defined. This is an awful hack, but it's enough for now.
9278 All callers changed.
9279 * tests/glr-regression-at (make_value): Args are const pointers now,
9280 to avoid GCC warning.
9281 (Duplicated user destructor for lookahead): New test. Currently
9282 skipped. It fails on my host but I'm not sure it'll always fail.
9283
9284 2005-09-16 Akim Demaille <akim@epita.fr>
9285
9286 * src/symtab.h (struct symbol): Declare the printer and destructor
9287 as const, to avoid accidental calls to free.
9288 (symbol_destructor_set, symbol_printer_set): Adjust.
9289 * src/symtab.c: Adjust.
9290
9291 2005-09-16 Akim Demaille <akim@epita.fr>
9292
9293 * data/c.m4 (b4_token_enums): New.
9294 (b4_token_defines): Rename as...
9295 (b4_token_enums_defines): this.
9296 (b4_token_defines): New, output only the #defines.
9297 * data/yacc.c, data/glr.c: Adjust.
9298 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
9299 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
9300 as default values.
9301
9302 2005-09-16 Akim Demaille <akim@epita.fr>
9303
9304 * data/lalr1.cc (yylex_): Remove, inline its code.
9305 (yyreport_syntax_error_): Remove, replaced by...
9306 (yysyntax_error_): this which returns a string and leaves to the
9307 caller the call to the users' error function.
9308 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
9309 Move from members of the parser object...
9310 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
9311 to local variables of the parse function.
9312
9313 2005-09-16 Akim Demaille <akim@epita.fr>
9314
9315 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
9316 since it's in Bison's name space.
9317
9318 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
9319
9320 * data/glr.c (yyresolveValue): Add default case to pacify
9321 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
9322
9323 * NEWS: Document when yyparse started to return 2.
9324 * doc/bison.texinfo (Parser Function): Document when yyparse
9325 returns 2.
9326
9327 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
9328 (b4_filename_type): Renamed back from b4_file_name_type. All uses
9329 changed.
9330 (class position): file_name -> filename (reverting). All uses changed.
9331
9332 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
9333
9334 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
9335 do anything if $@ exists. This reverts part of the 2005-07-07
9336 patch.
9337
9338 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
9339
9340 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
9341 contains obsolete information and isn't worth distributing as a
9342 separate file anyway.
9343 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
9344 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
9345 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
9346 (yyparse): Abort if user code uses longjmp to throw an unexpected
9347 value.
9348
9349 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
9350
9351 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
9352 Suggested by twlevo@xs4all.nl.
9353
9354 * data/glr.c (YYCHK1): Do not assume YYE is in range.
9355 This avoids a diagnostic from gcc -Wswitch-enum.
9356 Problem reported by twlevo@xs4all.nl.
9357
9358 * doc/bison.texinfo: Don't use "filename", as per GNU coding
9359 standards. Use "file name" or "file" or "name", depending on
9360 the context.
9361 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
9362 not to hack/foo.tab.c.
9363 (Calc++ Top Level): 2nd arg of main is not const.
9364 * data/glr.c: b4_filename -> b4_file_name.
9365 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
9366 All uses changed.
9367 (class position): filename -> file_name. All uses changed.
9368 * data/yacc.c: b4_filename -> b4_file_name.
9369 * lib/bitset.h: filename -> file_name in local vars.
9370 * lib/bitset_stats.c: Likewise.
9371 * src/files.c: Likewise.
9372 * src/scan-skel.l ("@output ".*\n): Likewise.
9373 * src/files.c (file_name_split): Renamed from filename_split.
9374 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
9375
9376 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
9377
9378 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
9379 to accommodate latest gnulib.
9380
9381 * tests/glr-regression.at (Duplicate representation of merged trees):
9382 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
9383
9384 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
9385 needed.
9386
9387 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
9388
9389 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
9390 All uses changed. Invoke user destructor after an error during a
9391 split parse (trivial change from Joel E. Denny).
9392
9393 * tests/glr-regression.at
9394 (User destructor after an error during a split parse): New test case.
9395 Problem reported by Joel E. Denny in:
9396 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
9397
9398 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
9399
9400 * README-cvs: Give URLs for recommended tools.
9401 Mention Gzip version problem, and bootstrapping issues.
9402 Remove troubleshooting section, as it's somewhat obsolete.
9403
9404 * bootstrap (no_cache): New var, to accommodate different wget
9405 variants. Use it instead of '-C off'. Problem reported by
9406 twlevo@xs4all.nl.
9407
9408 * data/glr.c (yydestroyStackItem): New function.
9409 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
9410 debugging information. Problem reported by Joel E. Denny.
9411
9412 2005-08-25 Akim Demaille <akim@epita.fr>
9413
9414 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
9415
9416 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
9417
9418 * data/glr.c (yyrecoverSyntaxError, yyreturn):
9419 Don't invoke destructor on unresolved entries.
9420 * tests/glr-regression.at
9421 (User destructor for unresolved GLR semantic value): New test case.
9422 Problem reported by Joel E. Denny in:
9423 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
9424
9425 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
9426
9427 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
9428 Add strnlen.c.
9429 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
9430 lib-prefix.m4, po.m4.
9431
9432 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
9433 in yydestruct diagnostic, since it might not be an error.
9434 Problem reported by Joel Denny near end of
9435 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
9436 * data/lalr1.cc (yyerturn): Likewise.
9437 * data/yacc.c (yyreturn): Likewise.
9438 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
9439
9440 * src/files.c: Remove obsolete FIXME comment.
9441
9442 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
9443 with the other templates, and to fix bogus run-on messages such
9444 as the one reported at the end of
9445 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
9446 All callers changed to avoid the newline.
9447 (yyprocessOneStack): Output two lines rather than one, to accommodate
9448 the above change. This changes the debug output format slightly.
9449
9450 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
9451 reported by Joel E. Denny in
9452 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
9453 (trivial change).
9454 * tests/glr-regression.at (Duplicate representation of merged trees):
9455 New test, from Joel E. Denny in:
9456 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
9457 * THANKS: Add Joel E. Denny.
9458
9459 * configure.ac (AC_INIT): Bump to 2.0c.
9460
9461 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
9462
9463 * NEWS: Version 2.0b.
9464
9465 * Makefile.am (SUBDIRS): Put examples before tests, so that
9466 "make check" doesn't finish with "All 1 tests passed".
9467
9468 * tests/regression.at (Token definitions): Don't rely on
9469 AT_PARSER_CHECK for data that contains backslashes. It currently
9470 uses 'echo', and 'echo' isn't portable if its argument contains
9471 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
9472 that the byte '\0xff' is not printable in the C locale; it is,
9473 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
9474 not printable, so use '\0x81' to test.
9475
9476 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
9477 version of GCC, since the macro is used with non-GCC compilers.
9478
9479 Fix core dump reported by Pablo De Napoli in
9480 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
9481 * tests/regression.at (Invalid inputs with {}): New test.
9482 * src/parse-gram.y (token_name): Translate type before using
9483 it as an index.
9484
9485 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
9486 the user's name space. All uses changed to __attribute__
9487 ((__unused__)).
9488 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
9489 Add __attribute__ ((__noreturn__)).
9490
9491 * etc/clcommit: Remove. We weren't using it, and it failed
9492 "make maintainer-distcheck".
9493 * Makefile.maint: Merge from coreutils.
9494 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
9495 (syntax-check-rules): Change list of rules as described below.
9496 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
9497 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
9498 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
9499 (sc_trailing_space): New rules.
9500 (sc_xalloc_h_in_src): Remove.
9501 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
9502 (sc_space_tab, sc_error_exit_success, sc_changelog):
9503 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
9504 (makefile-check, po-check, author_mark_check):
9505 (makefile_path_separator_check, copyright-check):
9506 Use grep -n, to make it easier to find violations.
9507 Use CVS_LIST and CVS_LIST_EXCEPT.
9508 (header_regexp, h_re): Remove.
9509 (dd_c): New macro.
9510 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
9511 (my-distcheck): Use more-modern GCC flags.
9512 (signatures, %.asc): Remove.
9513 (rel-files, announcement): Remove signatures.
9514 Restore old updating code, even though we don't use it, so
9515 that we're the same as coreutils.
9516 (alpha, beta, major): Depend on news-date-check.
9517 Make the upload commands.
9518
9519 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
9520 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
9521 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
9522 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
9523 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
9524 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
9525 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
9526 * tests/sets.at: Likewise.
9527
9528 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
9529 we comment out the Autoconf version number.
9530 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
9531 it's error-prone and "make maintainer-distcheck" rejects it.
9532
9533 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
9534 Indent calls to "error" to pacify "make maintainer-distcheck",
9535 when the calls are not intended to be translated.
9536 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
9537
9538 * src/Makefile.am (DEFS): Use +=, to pacify
9539 "make maintainer-distcheck".
9540 (bison_SOURCES): Add scan-skel.h.
9541 (sc_tight_scope): New rule, from coreutils.
9542
9543 * src/files.c (src_extension, header_extension):
9544 Now static, not extern.
9545 * src/getargs.c (short_options): Likewise.
9546 * src/muscle_tab.c (muscle_table): Likewise.
9547 * src/parse-gram.y (current_class, current_type, current_prec):
9548 Likewise.
9549 * src/reader.c (grammar_end, previous_rule_end): Likewise.
9550 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
9551 * src/main.c (main): Cast bindtextdomain and textdomain calls to
9552 void, to avoid warning when NLS is disabled.
9553 * src/output.c: Include scan-skel.h.
9554 (scan_skel): Remove decl, since scan-skel.h does this.
9555 (output_skeleton):
9556 Indent calls to "error" to pacify "make maintainer-distcheck".
9557 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
9558 * src/reader.h (gram_end, gram_lineno): New decls to pacify
9559 "make maintainer-distcheck".
9560 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
9561 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
9562 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
9563 (skel_lex_destroy, scan_skel): Move these decls to...
9564 * src/scan-skel.h: New file.
9565 * src/uniqstr.c (uniqstr_assert):
9566 Indent calls to "error" to pacify "make maintainer-distcheck".
9567
9568 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
9569 not @VAR@.
9570
9571 * tests/torture.at: Revamp to avoid misuse of atoi that
9572 "make maintainer-distcheck" complained about.
9573
9574 * examples/extexi (message): Don't print a message more than once,
9575 and omit line-number decoration that makes Emacs compile think
9576 that informative messages are worth worrying about.
9577
9578 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
9579
9580 * configure.ac: Update version number.
9581
9582 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
9583 accidentally.
9584 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
9585 autogenerated by the maintainer.
9586 * examples/calc++/.cvsignore: Add *.yy.
9587
9588 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
9589 * lib/bitset_stats.c (bitset_stats_init): Likewise.
9590 * lib/bitsetv.c (bitsetv_alloc): Likewise.
9591
9592 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
9593
9594 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
9595 from maintainer-distcheck about casting the argument of 'free'.
9596
9597 * NEWS: Mention recent yytname changes.
9598 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
9599
9600 * bootstrap: For translations that have not yet been upgraded to
9601 the new runtime-po domain, prime the pump by extracting the
9602 relevant strings from the obsolete translations. This code can be
9603 removed once the bison-runtime domain has been translated by each
9604 team.
9605
9606 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
9607 now that token names are already quoted.
9608
9609 Fix problem reported by Anthony Heading.
9610 * data/glr.c (YYTOKEN_TABLE): New macro.
9611 (yytname): Define if YYTOKEN_TABLE.
9612 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
9613 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
9614 (YYERROR_VERBOSE): Define the same way the other skeletons do.
9615 * src/output.c (prepare_symbols): Output token_table_flag.
9616
9617 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
9618
9619 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
9620 again if the first call fails.
9621
9622 * data/glr.c (yytnamerr): New function.
9623 (yyreportSyntaxError): Use it to dequote most string literals.
9624 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
9625 with other skeletons. All uses changed.
9626 (yytnameerr_): New function.
9627 (yyreport_syntax_error): Use it to dequote most string literals.
9628 * data/yacc.c (yytnamerr): New function.
9629 (yyerrlab): Use it to decode most string literals.
9630 * doc/bison.texinfo (Decl Summary, Calling Convention):
9631 Clarify quoting convention of yytname.
9632 * src/output.c (prepare_symbols): Quote all names. This undoes
9633 the 2005-04-17 change, which is now accomplished (mostly) via
9634 changes in the parsers as described above.
9635 * tests/regression.at (Token definitions, Web2c Actions):
9636 Undo most 2005-04-17 change here, too.
9637
9638 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
9639
9640 Fix more problems reported by twlevo@xs4all.nl.
9641 * tests/cxx-type.at: Don't pipe output of ./types through sed to
9642 remove trailing spaces. This loses the exit status of ./types,
9643 and isn't needed since ./types shouldn't be emitting trailing
9644 spaces.
9645 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
9646 as the stack isn't valid in that case.
9647
9648 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
9649 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
9650 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
9651 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
9652 is used.
9653 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
9654 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
9655 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
9656 Likewise.
9657
9658 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
9659 overly-picky compilers that reject 'char *foo = "bar";'.
9660
9661 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
9662 to FILE * parameter, not to stderr. This fixes a typo introduced
9663 in the 2005-07-12 change.
9664
9665 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
9666 warnings from GCC 4.
9667
9668 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
9669 (yyglrShiftDefer, yysplitStack):
9670 Remove unused parameters b4_pure_formals. All uses changed.
9671 (yyglrShift): Remove unused parameters b4_user_formals.
9672 All uses changed.
9673 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
9674
9675 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
9676
9677 Destructor cleanups and regularization among the three skeletons.
9678 * NEWS: Document the behavior changes.
9679 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
9680 stack before failing, as the cleanup code will do it for us now.
9681 * data/lalr1.cc (yyerrlab): Likewise.
9682 * data/glr.c (yyparse): Pop everything off the stack before
9683 freeing it, so that destructors get called properly.
9684 * data/lalr1.cc (yyreturn): Likewise.
9685 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
9686 This is more consistent.
9687 * doc/bison.texinfo (Destructor Decl): Mention more reasons
9688 why destructors might be called. 1.875 -> 2.1.
9689 (Destructor Decl, Decl Summary, Table of Symbols):
9690 Some English-language cleanups for %destructor.
9691 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
9692 Add output line for destructor of start symbol.
9693 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
9694 because of that same extra output line.
9695
9696 * NEWS: Document minor wording changes in diagnostics of
9697 Bison-generated parsers.
9698 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
9699 Remove unused formals. All uses changed.
9700 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
9701 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
9702 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
9703 Rename yyoverflowab to yyexhaustedlab.
9704 When memory exhaustion occurs during syntax-error reporting,
9705 report it separately rather than in a single diagnostic; this
9706 eases translation.
9707 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
9708 (Memory Exhausted): Renamed from Parser Stack Overflow.
9709 Revamp wording slightly to prefer "memory exhaustion".
9710 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
9711
9712 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
9713
9714 Add i18n support to the GLR skeleton. Partially fix the C++
9715 skeleton; a C++ expert needs to finish this. Remove debugging
9716 msgids; there's little point to having them translated, since they
9717 can be understood only by someone who can read the
9718 (English-language) source code.
9719
9720 Generate runtime-po/bison-runtime.pot automatically, so that we
9721 don't have to worry about garbage getting in that file. We'll
9722 make sure after the next official release that old msgids don't
9723 get lost. See
9724 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
9725
9726 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
9727 Now auto-generated.
9728 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
9729 Fix typos in explanations of the runtime file.
9730 * bootstrap: Change gettext keyword from YYI18N to YY_.
9731 Use standard Makefile.in.in in runtime-po, since we'll arrange
9732 for backward-compatible bison-runtime.po files in a different way.
9733 * data/glr.c (YY_): New macro, from yacc.c.
9734 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
9735 Translate messages intended for users.
9736 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
9737 the wording in the other skeletons. We don't know that the memory
9738 is virtual.
9739 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
9740 Use same method that yacc.c uses.
9741 Don't translate debugging messages.
9742 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
9743 it doesn't work (yet), and requires C++ expertise to fix.
9744 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
9745 Move defn to a more logical place, to be consistent with other
9746 skeletons.
9747 Don't translate debugging messages.
9748 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
9749 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
9750 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
9751 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
9752
9753 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
9754 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
9755 void, not int.
9756 * tests/glr-regression.at (Badly Collapsed GLR States):
9757 Likewise.
9758 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9759 yylex should return 0 at EOF rather than aborting.
9760
9761 Improve tests for stack overflow in GLR parser.
9762 Problem reported by twlevo@xs4all.nl.
9763 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
9764 All uses removed.
9765 (yyStackOverflow): Just longjmp, but with value 2 so that caller
9766 can handle the problem.
9767 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
9768 (yyparse): New local variable yyresult to record the result.
9769 Use result of setjmp to set it, rather than storing itinto
9770 struct.
9771 (yyDone): Remove label.
9772 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
9773 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
9774 if YYABORT is used).
9775 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
9776 yyparse status; put status > 1 into diagnostic.
9777 Check that status==2 works.
9778 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
9779 Use exit status 3 for failure to open (which shouldn't happen).
9780
9781 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
9782
9783 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
9784 1 on syntax error; just let yyparse do its thing.
9785 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
9786 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
9787 (Exploding the Stack Size with Alloca):
9788 (Exploding the Stack Size with Malloc):
9789 Expect exit status 2, not 1, since the parser is supposed to blow
9790 its stack. Problem reported by twlevo@xs4all.nl.
9791
9792 * data/glr.c (yyparse): Don't assume that the initial calls
9793 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
9794 Print a stack-overflow message and fail instead.
9795 Initialize the line-number information before creating the stack,
9796 so that the stack-overflow message can report line zero safely.
9797
9798 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
9799
9800 Fix problems reported by twlevo@xs4all.nl.
9801 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
9802 (yyuserMerge): Provide a default case if b4_mergers is empty.
9803 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
9804 * tests/glr-regression.at
9805 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9806 Add casts to pacify C++ compilers.
9807 * tests/glr-regression.at (Improper merging of GLR delayed action
9808 sets): Declare yylex before using it.
9809 * tests/Makefile.am (maintainer-check-g++): Fix a stray
9810 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
9811 test for valgrind; valgrind is independent of g++.
9812 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
9813 for compatibility with POSIX 1003.1-2001 (if running coreutils).
9814 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
9815 Use a destructor, so that we can expand the stack. Change
9816 YYSTYPE to char * so that we can free it. Cast result of malloc.
9817
9818 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9819
9820 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
9821 a valgrind failure. Problem reported by twlevo@xs4all.nl.
9822
9823 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
9824
9825 * PACKAGING: New file, suggested by Bruno Haible and taken from
9826 similar wording in gettext's PACKAGING file.
9827 * NEWS: Mention PACKAGING.
9828 * Makefile.am (EXTRA_DIST): Add PACKAGING.
9829
9830 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
9831
9832 * NEWS: Document recent i18n improvements.
9833 * bootstrap: Get runtime translations into runtime-po.
9834 Create runtime-po files automatically, if possible.
9835 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
9836 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
9837 does not infringe on the user's name space.
9838 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
9839 * doc/bison.texinfo (Internationalization): Revamp the English
9840 and Texinfo syntax a bit, to try to make it clearer.
9841 (Bison Options, Option Cross Key): Mention --print-localedir.
9842 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
9843 YYENABLE_NLS. Quote a bit more.
9844 * runtime-po/.cvsignore: New file.
9845 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
9846 * runtime-po/Rules-quot: Remove; now created by bootstrap.
9847 * runtime-po/quot.sed: Likewise.
9848 * runtime-po/boldquot.sed: Likewise.
9849 * runtime-po/en@quot.header: Likewise.
9850 * runtime-po/en@boldquot.header: Likewise.
9851 * runtime-po/insert-header.sin: Likewise.
9852 * runtime-po/remove-potcdate.sin: Likewise.
9853 * runtime-po/Makevars: Likewise.
9854 * runtime-po/LINGUAS: Likewise.
9855 * runtime-po/de.po: Likewise; we will rely on the translation project
9856 to maintain this, so "bootstrap" should get it.
9857 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
9858 its value.
9859 * src/main.c (main): Bind the bison-runtime domain, too.
9860
9861 2005-07-12 Bruno Haible <bruno@clisp.org>
9862
9863 * data/yacc.c: Include <libintl.h> when NLS is enabled.
9864 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
9865 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
9866 * runtime-po: New directory.
9867 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
9868 $(DOMAIN).pot-update rule, so that old messages are never dropped.
9869 * runtime-po/Rules-quot: New file, copied from po/.
9870 * runtime-po/quot.sed: Likewise.
9871 * runtime-po/boldquot.sed: Likewise.
9872 * runtime-po/en@quot.header: Likewise.
9873 * runtime-po/en@boldquot.header: Likewise.
9874 * runtime-po/insert-header.sin: Likewise.
9875 * runtime-po/remove-potcdate.sin: Likewise.
9876 * runtime-po/Makevars: New file.
9877 * runtime-po/POTFILES.in: New file.
9878 * runtime-po/LINGUAS: New file.
9879 * runtime-po/bison-runtime.pot: New file.
9880 * runtime-po/de.po: New file.
9881 * m4/bison.m4: New file.
9882 * Makefile.am (SUBDIRS): Add runtime-po.
9883 (aclocaldir, aclocal_DATA): New variables.
9884 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
9885 Define aclocaldir.
9886 * src/getargs.c (usage): Document --print-localedir option.
9887 (PRINT_LOCALEDIR_OPTION): New enum item.
9888 (long_options): Add --print-localedir option.
9889 (getargs): Handle --print-localedir option.
9890 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
9891 (Internationalization): New section.
9892
9893 2005-07-12 Akim Demaille <akim@epita.fr>
9894
9895 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
9896 for consistency with the rest of the code.
9897 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
9898 Add separators.
9899
9900 2005-07-12 Akim Demaille <akim@epita.fr>
9901
9902 * src/parse-gram.y: Use %printer instead of YYPRINT.
9903
9904 2005-07-12 Akim Demaille <akim@epita.fr>
9905
9906 * src/symtab.h, src/symtab.c (symbol_print): New.
9907 * src/symlist.h, src/symlist.c (symbol_list_print): New.
9908 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
9909
9910 2005-07-12 Akim Demaille <akim@epita.fr>
9911
9912 * data/glr.c (b4_syncline): Fix (swap) the definitions of
9913 b4_at_dollar and b4_dollar_dollar.
9914
9915 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
9916
9917 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
9918 and Pennello's paper.
9919
9920 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
9921
9922 * data/yacc.c (yyparse): Undo previous patch. Instead,
9923 set yylsp[0] and yyvsp[0] only if the initial action
9924 sets yylloc and yylval, respectively.
9925
9926 * data/yacc.c (yyparse): In the initial action, set
9927 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
9928 This avoids the use of undefined variables if the initial
9929 action does not set yylloc and/or yylval.
9930
9931 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
9932
9933 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
9934 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
9935 Remove from CVS. These files are automatically generated.
9936 * examples/extexi: Clarify that this file is now part of Bison,
9937 not GNU M4, and that it works with any POSIX-compatible Awk.
9938 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
9939 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
9940 so that we also get calc++-parser.yy. Geneate it.
9941 Use $(AWK), not gawk, since any conforming Awk will do.
9942 Put comment before action, since older 'make' can't handle comment
9943 in action.
9944 $(BUILT_SOURCES): List all built sources, not just some of them.
9945 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
9946 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
9947 $($(calc_sources_generated)): Remove unnecessary test for existence
9948 of target. (This had a shell syntax error anyway; a stray "x".)
9949 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
9950 calc++-parser.yy.
9951 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
9952
9953 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
9954 implied by the other modules.
9955
9956 2005-07-06 Akim Demaille <akim@epita.fr>
9957
9958 Bind examples/calc++ to the package.
9959 * examples/calc++/Makefile: Remove, replaced by...
9960 * examples/calc++/Makefile.am: ... this new file.
9961 * examples/calc++/test: Remove input.
9962 * examples/calc++/compile: Remove.
9963 * examples/Makefile.am: New.
9964 * configure.ac, Makefile.am: Adjust.
9965 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
9966
9967 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
9968
9969 * data/glr.c (yyFail): Drastically simplify; since the format argument
9970 never had any % directives, we can simply pass it to yyerror.
9971 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
9972 be modified later, as that is the usual style in glr.c.
9973 Problems reported by Paul Hilfinger.
9974
9975 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
9976 and size overflow errors.
9977 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
9978 in case the user prolog sets feature-test macros like _GNU_SOURCE.
9979 (YYSIZEMAX): New macro.
9980 (yystpcpy): New function, taken from yacc.c.
9981 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
9982 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
9983 so that we don't have to maintain their signatures.
9984 (yyFail): Check for buffer overflow, by using vsnprintf rather
9985 than vsprintf. Allocate a bigger buffer if possible.
9986 Report an error if buffer allocation fails.
9987 (yyStackOverflow): New function.
9988 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
9989 the initialization was successful. It might fail if storage was
9990 exhausted.
9991 (yyexpandGLRStack): Add more checks for storage allocation failure.
9992 Use yyStackOverflow to report failures.
9993 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
9994 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
9995 Don't assume stack number fits in int.
9996 (yysplitStack): Check for storage allocation failure.
9997 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
9998 can print diagnostics on storage allocation failure. All callers
9999 changed.
10000 (yyresolveValue): Use yybool for boolean.
10001 (yyreportSyntaxError): Check for size-calculation overflow.
10002 This code is taken from yacc.c.
10003 (yyparse): Check for storage allocation errors when allocating
10004 the initial stack.
10005
10006 2005-07-05 Akim Demaille <akim@epita.fr>
10007
10008 Extract calc++ from the documentation.
10009 * doc/bison.texinfo (Calc++): Add the extraction marks.
10010 * examples/extexi: New, from the aborted GNU Programming 2E.
10011 Separate the different paragraph of a file with empty lines.
10012 * examples/Makefile: Use it to extract the whole calc++ example.
10013
10014 2005-06-24 Akim Demaille <akim@epita.fr>
10015
10016 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
10017 class typedefs.
10018
10019 2005-06-22 Akim Demaille <akim@epita.fr>
10020
10021 * doc/bison.texinfo (C++ Language Interface): First stab.
10022 (C++ Parsers): Remove.
10023
10024 2005-06-22 Akim Demaille <akim@epita.fr>
10025
10026 * data/lalr1.cc (yylex_): Honor %lex-param.
10027
10028 2005-06-22 Akim Demaille <akim@epita.fr>
10029
10030 Start a set of simple examples.
10031 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
10032 * examples/calc++/calc++-driver.hh,
10033 * examples/calc++/calc++-parser.yy,
10034 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
10035 * examples/calc++/compile, examples/calc++/test: New.
10036
10037 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
10038
10039 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
10040 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
10041 which stems from the 2005-05-27 patch.
10042
10043 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10044
10045 * data/glr.c: Modify treatment of unused parameters to permit use
10046 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
10047
10048 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
10049
10050 Fix infringement on user name space reported by Janos Zoltan Szabo.
10051 * data/yacc.c (yyparse): strlen -> yystrlen.
10052
10053 2005-05-30 Akim Demaille <akim@epita.fr>
10054
10055 * data/lalr1.cc (_): New.
10056 Translate the various messages.
10057
10058 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
10059
10060 Fix infringement on user name space reported by Bruno Haible.
10061 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
10062 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
10063 the user's name space.
10064 (alloca): Include <stdlib.h> to get it, if it's not built in.
10065 (YYMALLOC, YYFREE): Define only if needed.
10066 (malloc, free): Declare, but only if needed, as this infringes on
10067 the user name space.
10068
10069 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
10070
10071 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
10072 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
10073 with %d format.
10074 * lib/ebitset.c (min, max): Undef before defining.
10075 * lib/vbitset.c (min, max): Likewise.
10076 * lib/subpipe.c (create_subpipe): Save local variables in case
10077 vfork clobbers them.
10078
10079 2005-05-24 Bruno Haible <bruno@clisp.org>
10080
10081 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
10082 error message syntax used by gcc-4.0.
10083
10084 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
10085
10086 * README: Mention m4 1.4.3. Remove obsolete advice about
10087 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
10088
10089 * bootstrap: Remove workaround for problem I encountered with
10090 gettext 0.14.1; it seems to be fixed now.
10091
10092 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
10093
10094 * NEWS: Version 2.0a.
10095
10096 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
10097 the previous change.
10098
10099 Various maintainer cleanups.
10100 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
10101 conftest*, for benefit of CVS commands run at the same time as
10102 "configure". Add build-aux, since "bootstrap" now creates it and
10103 its subfiles.
10104 * Makefile.cfg (move_if_change): Remove.
10105 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
10106 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
10107 (po_repo, do-po-update, po-update, wget_files, get-targets):
10108 (config.guess-url_prefix, config.sub-url_prefix):
10109 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
10110 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
10111 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
10112 Remove.
10113 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
10114 this is now the recommended name.
10115 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
10116 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
10117 ylwrap. These files now go into build-aux.
10118 * config/move-if-change: Remove.
10119 * config/prev-version.txt: Bump from 1.75 to 2.0.
10120
10121 * bootstrap: Add stdio-safer, unistd-safer modules.
10122 Remove m4/glibc2.m4 (introduced by latest gnulib, but
10123 we don't need it).
10124 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
10125 fopen-safer.c, stdio-safer.h, unistd-safer.h.
10126 * lib/subpipe.c: Include "unistd-safer.h".
10127 (create_subpipe): Make sure all the newly-created
10128 file descriptors are > 2, so that diagnostics don't
10129 get sent down them (which might cause Bison to hang, in theory).
10130 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
10131 * src/files.c (xfopen): Use fopen_safer, not fopen.
10132
10133 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
10134 yesterday's yacc.c fix.
10135
10136 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
10137
10138 * data/glr.c, data/lalr1.cc: Update copyright date.
10139
10140 Fix a destructor bug reported by Wolfgang Spraul in
10141 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
10142 * data/yacc.c (yyabortlab): Don't call destructor, and
10143 don't set yychar to EMPTY.
10144 (yyoverflowlab): Don't call destructor.
10145 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
10146 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
10147 since we no longer output the message "discarding lookahead token
10148 end of input ()".
10149
10150 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10151
10152 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
10153 fix a small glitch in debugging output.
10154 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
10155 after YY_SYMBOL_PRINT where needed.
10156
10157 (struct yyGLRState): Add some comments.
10158 (struct yySemanticOption): Add some comments.
10159 (union yyGLRStackItem): Add comment.
10160
10161 (yymergeOptionSets): Correct this to properly perform the union,
10162 avoiding infinite reported by Michael Rosien.
10163 Update comment.
10164
10165 * tests/glr-regression.at: Add test for GLR merging error reported
10166 by M. Rosien.
10167
10168 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
10169
10170 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
10171 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
10172 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
10173 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
10174 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
10175 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
10176 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
10177 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
10178 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
10179 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
10180 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
10181 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
10182 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
10183 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
10184 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
10185 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
10186 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
10187 src/derives.h, src/files.c, src/files.h, src/getargs.c,
10188 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
10189 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
10190 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
10191 src/output.h, src/parse-gram.c, src/parse-gram.h,
10192 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
10193 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
10194 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
10195 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
10196 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
10197 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
10198 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
10199 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
10200 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
10201 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
10202 tests/reduce.at, tests/regression.at, tests/sets.at,
10203 tests/synclines.at, tests/testsuite.at, tests/torture.at:
10204 Update FSF postal mail address.
10205
10206 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
10207
10208 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
10209 Problem reported by Ralf Menzel.
10210
10211 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
10212
10213 * tests/actions.at: Test that stack overflow invokes destructors.
10214 From Marcus Holland-Moritz.
10215 * data/yacc.c (yyerrlab): Move the code that destroys the stack
10216 from here....
10217 (yyreturn): to here. That way, destructors are called properly
10218 even if the stack overflows, or the user calls YYACCEPT or
10219 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
10220 (yyoverflowlab): Destroy the lookahead.
10221
10222 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
10223
10224 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
10225
10226 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
10227
10228 * NEWS: Bison-generated C parsers no longer quote literal strings
10229 associated with tokens.
10230 * src/output.c (prepare_symbols): Don't escape strings,
10231 since users don't want to see C escapes.
10232 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
10233 in diagnostics.
10234 * tests/input.at (Torturing the Scanner): Likewise.
10235 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
10236
10237 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
10238
10239 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
10240 the data size is known to be too small and we can't increase it.
10241 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
10242
10243 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
10244
10245 * src/parse-gram.y: Include quotearg.h.
10246 (string_as_id): Quote $1 before using it as a key, since the
10247 lexer no longer quotes it for us.
10248 (string_content): Don't strip quotes, since lexer no longer
10249 quotes it for us.
10250 * src/scan-gram.l: Include quotearg.h.
10251 ("\""): Omit quote.
10252 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
10253 a key, since the rest of the lexer doesn't quote it.
10254 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
10255 * tests/regression.at (Token definitions): Check for backslashes
10256 in token strings.
10257
10258 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
10259 (YYSIZE_T): Define to unsigned long int when using an older compiler.
10260 (yyparse): Revamp code to generate long syntax error message, to
10261 make it easier to translate, and to avoid problems with arithmetic
10262 overflow. Change "virtual memory" to "memory" in diagnostic, since
10263 we don't know whether the memory is virtual.
10264
10265 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
10266
10267 * NEWS: Bison-generated C parsers now use the _ macro to
10268 translate strings.
10269 * data/yacc.c (_) [!defined _]: New macro.
10270 All English strings wrapped inside this macro.
10271 * doc/bison.texinfo (Bison Parser): Document _.
10272 * po/POTFILES.in: Include src/parse-gram.c, since it now
10273 includes translateable strings that parse-gram.y doesn't.
10274
10275 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
10276
10277 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
10278 reverting the 2004-10-11 change to this function.
10279 (symbol_check_alias_consistency): Don't call symbol_type_set
10280 if the type name is already correct.
10281 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
10282
10283 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
10284
10285 * tests/regression.at (Token definitions): Don't use a token named
10286 c, as that generates a "#define c ..." that runs afoul of buggy
10287 stdlib.h that uses the identifier c as a member of struct
10288 drand48_data. Problem reported by Horst Wente.
10289
10290 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
10291
10292 * bootstrap: Change translation URL from
10293 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
10294 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
10295 redirection glitches. Problem reported by twlevo@xs4all.nl.
10296
10297 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
10298
10299 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
10300 after operands; POSIX says this isn't portable for the c99 command.
10301
10302 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
10303
10304 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
10305 immediately if a data overrun has occurred; this may help us track
10306 down what may be a spurious failure on MacOS.
10307
10308 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
10309
10310 Respond to problems reported by twlevo@xs4all.nl.
10311
10312 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
10313
10314 * src/vcg.h: Comment fix.
10315 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
10316 (G_CMAX): Change to -1 instead of INT_MAX.
10317
10318 * data/yacc.c (yyparse): Omit spaces before #line.
10319
10320 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
10321
10322 * src/tables.c (state_number_to_vector_number): Put it inside an
10323 "#if 0", since it's not currently used. Problem reported by
10324 Roland McGrath.
10325
10326 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
10327
10328 * src/output.c (escaped_output): Renamed from
10329 escaped_file_name_output, since we now use it for symbol tags as
10330 well. All uses changed.
10331 (symbol_destructors_output, symbol_printers_output):
10332 Escape symbol tags too.
10333 Problem reported by Matyas Forstner in
10334 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
10335
10336 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
10337 not needed.
10338 * src/output.c (user_actions_output, token_definitions_output,
10339 symbol_destructors_output, symbol_printers_output): Likewise.
10340 * src/reader.c (prologue_augment): Likewise.
10341 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
10342
10343 * src/vcg.c (output_edge): Don't quote linestyle arg.
10344 Problem reported by twlevo@xs4all.nl.
10345
10346 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
10347
10348 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
10349 example, reported by Derek M Jones. Also, make the example even
10350 more outrageous, to better illustrate how bad the problem is.
10351
10352 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
10353
10354 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
10355 putsym. Typo reported by Sebastian Piping.
10356
10357 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
10358
10359 * doc/bison.texinfo (Language and Grammar): some -> same
10360 (Epilogue): int he -> in the
10361 Typos reported by Sebastian Piping via Justin Pence.
10362
10363 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
10364
10365 * tests/glr-regression.at (Improper handling of embedded actions
10366 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
10367 embedded actions and $-N in GLR parsers", work around an Autoconf bug
10368 with dollar signs in test names.
10369 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
10370 for a similar reason.
10371
10372 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
10373
10374 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
10375 wants to redefine G_VIEW.
10376
10377 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
10378
10379 * src/vcg.c (get_view_str): Remove case for normal_view.
10380 Problem reported by twlevo@xs4all.nl.
10381
10382 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
10383
10384 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
10385 Problem reported by twlevo@xs4all.nl.
10386
10387 * doc/bison.texinfo: Change @dircategory from "GNU programming
10388 tools" to "Software development". Requested by Richard Stallman
10389 via Karl Berry.
10390
10391 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
10392
10393 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
10394 Problem reported by twlevo@xs4all.nl.
10395
10396 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
10397
10398 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
10399 keyword; it's not needed with modern compilers, and it doesn't
10400 affect correctness with older compilers. Suggested by
10401 twlevo@xs4all.nl.
10402
10403 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
10404
10405 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
10406 gcc -Wswitch-default.
10407 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
10408 * data/yacc.c (yyparse): Likewise.
10409
10410 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
10411
10412 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
10413 already. Let config.h define any nonstandard values.
10414
10415 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
10416
10417 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
10418 for the benefit of slower hosts. Problem reported by
10419 Nelson H. F. Beebe.
10420
10421 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
10422
10423 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
10424 being defined and not used.
10425 * data/lalr1.cc (yyparse): Likewise.
10426 Use "if (false)" rather than "if (0)".
10427
10428 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
10429
10430 * TODO: Mention that we should allow NUL bytes in tokens.
10431
10432 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
10433
10434 * src/scan-skel.l (<<EOF>>): Don't close standard output.
10435 Problem reported by Hans Aberg.
10436
10437 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
10438
10439 * src/getargs.c (version): Happy new year; update overall
10440 program copyright date from 2004 to 2005.
10441
10442 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
10443 Problem reported by Hans Aberg.
10444 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
10445 (Output file names.): Add a test for the case when standard output
10446 is closed.
10447
10448 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
10449
10450 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
10451 to fix an oversight in the Bison 2.0 manual.
10452
10453 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
10454
10455 * NEWS: Version 2.0. Reformat the existing news items since
10456 1.875, so that related items are grouped together.
10457 * configure.ac (AC_INIT): Bump version to 2.0.
10458 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
10459
10460 * tests/torture.at (Exploding the Stack Size with Alloca): Set
10461 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
10462 otherwise, we're not testing alloca. Unfortunately there's no
10463 simple way to consult HAVE_ALLOCA here.
10464
10465 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
10466 for yymsg, too.
10467
10468 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
10469 hand. This avoids a warning about comparing int to size_t when
10470 GCC warnings are enabled.
10471
10472 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
10473
10474 * NEWS: Bison-generated parsers no longer default to using the
10475 alloca function (when available) to extend the parser stack, due
10476 to widespread problems in unchecked stack-overflow detection.
10477 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
10478 responsibility to set it to a positive value. This lets the user
10479 specify a value that is not a preprocessor constant.
10480 * data/yacc.c (YYMAXDEPTH): Likewise.
10481 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
10482 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
10483 to be a compile-time constant. However, explain the constraints on it.
10484 Also, explain the constraints on YYINITDEPTH.
10485 (Table of Symbols): Explain that alloca is no longer the default.
10486 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
10487 to 1.
10488
10489 * doc/bison.texinfo (Location Default Action): Mention that n must
10490 be zero when k is zero. Suggested by Frank Heckenbach.
10491
10492 2004-12-22 Akim Demaille <akim@epita.fr>
10493
10494 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
10495 (parser::state_type, parser::semantic_type, parser::location_type):
10496 Private, not public.
10497 (parser::parse): Return ints, not bool.
10498 Returning a bool introduces a problem: 0 corresponds to false, and
10499 it seems weird to return false on success. Returning true changes
10500 the conventions for yyparse.
10501 Alternatively we could return void and send an exception.
10502 There is no clear consensus (yet?).
10503 (state_stack, semantic_stack, location_stack): Rename as...
10504 (state_stack_type, semantic_stack_type, location_stack_type): these.
10505 Private, not public.
10506 * tests/c++.at: New.
10507 * tests/testsuite.at, tests/Makefile.am: Adjust.
10508
10509 2004-12-21 Akim Demaille <akim@epita.fr>
10510
10511 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
10512
10513 2004-12-21 Akim Demaille <akim@epita.fr>
10514
10515 Don't impose std::string for filenames.
10516
10517 * data/lalr1.cc (b4_filename_type): New.
10518 (position::filename): Use it.
10519 (parser.hh): Move the inclusion of stack.hh and location.hh below
10520 the user code, so that needed headers for the filename type can be
10521 included first.
10522 Forward declare them before the user code.
10523 * tests/Makefile.am (check-local, installcheck-local): Pass
10524 TESTSUITEFLAGS to the TESTSUITE.
10525
10526 2004-12-20 Akim Demaille <akim@epita.fr>
10527
10528 Use more STL like names: my_class instead of MyClass.
10529
10530 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
10531 (SemanticStack, SemanticType, StateStack, StateType)
10532 (TokenNumberType, Stack, Slice, Traits, Parser::location)
10533 (Parser::value): Rename as...
10534 (location_stack, location_type, rhs_number_type, semantic_stack)
10535 (semantic_type, state_stack, state_type, token_number_type, stack)
10536 (slice, traits, parser::yylloc, parser::yylval): these.
10537
10538 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
10539
10540 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
10541
10542 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
10543 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
10544
10545 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
10546
10547 Remove uses of 'short int' and 'unsigned short int'. This raises
10548 some arbitrary limits. It uses more memory but nowadays that's
10549 not much of an issue.
10550
10551 This change does not affect the generated parsers; that's a different
10552 task, as some users will want to conserve memory there.
10553
10554 Ideally we should use size_t to represent all object counts, and
10555 something like ptrdiff_t to represent signed differences of object
10556 counts; but that will require more code-cleanup than I have the
10557 time to do right now.
10558
10559 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
10560 Use size_t, not int or short int, to count objects.
10561 * src/closure.c (nritemset, closure): Likewise.
10562 * src/closure.h (nritemset, closure): Likewise.
10563 * src/nullable.c (nullable_compute): Likewise.
10564 * src/print.c (print_core): Likewise.
10565 * src/print_graph.c (print_core): Likewise.
10566 * src/state.c (state_compare, state_hash): Likewise.
10567 * src/state.h (struct state): Likewise.
10568 * src/tables.c (default_goto, goto_actions): Likewise.
10569
10570 * src/gram.h (rule_number, rule): Use int, not short int.
10571 * src/output.c (prepare_rules): Likewise.
10572 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
10573 errs, reductions): Likewise.
10574 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
10575 Likewise.
10576 * src/tables.c (vector_number, tally, action_number,
10577 ACTION_NUMBER_MINIMUM): Likewise.
10578 * src/output.c (muscle_insert_short_int_table): Remove.
10579
10580 2004-12-17 Akim Demaille <akim@epita.fr>
10581
10582 * data/lalr1.cc: Extensive Doxygenation.
10583 (error_): Rename as...
10584 (error): this, since it is visible to the user.
10585 Adjust callers.
10586 (Parser::message): Now an automatic variable from...
10587 (Parser::yyreport_syntax_error_): here.
10588 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
10589 Parser::error.
10590 * tests/input.at: Escape $.
10591
10592 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
10593
10594 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
10595 Parenthesize rhs to avoid obscure problems with mistakes like
10596 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
10597 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
10598 b4_rhs_location): Likewise.
10599 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
10600 b4_rhs_location): Likewise.
10601
10602 2004-12-16 Akim Demaille <akim@epita.fr>
10603
10604 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
10605 yacc.c: be sure to stay within yycheck_.
10606 * tests/actions.at: Re-enable C++ tests.
10607
10608 2004-12-16 Akim Demaille <akim@epita.fr>
10609
10610 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
10611 real.
10612
10613 2004-12-16 Akim Demaille <akim@epita.fr>
10614
10615 Use #define to handle the %name-prefix.
10616
10617 * data/glr.c, data/yacc.c: Comment changes.
10618 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
10619 so that one can refer to yylex in the parser file, and have it
10620 renamed, as is the case with other skeletons.
10621
10622 2004-12-16 Akim Demaille <akim@epita.fr>
10623
10624 Move lalr1.cc internals into yy*.
10625
10626 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
10627 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
10628 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
10629 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
10630 (empty_, final_, terror_, errcode_, ntokens_)
10631 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
10632 (looka_, ilooka_, error_range_, nerrs_):
10633 Rename as...
10634 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
10635 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
10636 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
10637 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
10638 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
10639 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
10640 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
10641 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
10642 these.
10643
10644 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
10645
10646 Fix some problems reported by twlevo at xs4all.
10647 * src/symtab.c (symbol_new): Report an error if the input grammar
10648 contains too many symbols. This is better than calling abort() later.
10649 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
10650 (struct node, struct graph):
10651 Rename member expand to stretch. All uses changed.
10652 (struct graph): Remove member layoutalgorithm. All uses removed.
10653 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
10654 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
10655 All uses changed.
10656 (N_STRETCH): Rename from N_EXPAND. All uses changed.
10657
10658 2004-12-15 Akim Demaille <akim@epita.fr>
10659
10660 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
10661 Add more Doxygen comments.
10662 (symprint_, stack_print_, reduce_print_, destruct_, pop)
10663 (report_syntax_error_, translate_): Rename as...
10664 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
10665 (yypop_, yyreport_syntax_error_, yytranslate_): this.
10666
10667 2004-12-15 Akim Demaille <akim@epita.fr>
10668
10669 * data/lalr1.cc (lex_): Rename as...
10670 (yylex_): this.
10671 Move the trace here.
10672 Take the %name-prefix into account.
10673 Reported by Alexandre Duret-Lutz.
10674
10675 2004-12-15 Akim Demaille <akim@epita.fr>
10676
10677 Simplify the C++ parser constructor.
10678
10679 * data/lalr1.cc (debug_): Rename as...
10680 (yydebug_): so that the parser's internals are always in the yy*
10681 pseudo namespace.
10682 Adjust uses.
10683 (b4_parse_param_decl): Remove the leading comma as it is now only
10684 called as unique argument list.
10685 (Parser::Parser): Remove the constructor accepting a location and
10686 an initial debugging level.
10687 Remove from the other ctor the argument for the debugging level.
10688 (debug_level_type, debug_level, set_debug_level): New.
10689
10690 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
10691 constructor calls.
10692
10693 2004-12-15 Akim Demaille <akim@epita.fr>
10694
10695 Remove b4_root related material: failure experiment
10696 (which goal was to allow to derive from a class).
10697
10698 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
10699 definitions and uses.
10700
10701 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
10702
10703 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
10704 not 2, since it's not portable to subtract 1 from the start of an
10705 array. The new item 0 is never set or used. All uses changed.
10706
10707 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
10708 the default definition of YYLLOC_DEFAULT. Problem reported
10709 by Frank Heckenbach.
10710
10711 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
10712
10713 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
10714 the normal case and one for the error case. Just use the
10715 first one uniformly. Problem reported by Frank Heckenbach.
10716 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
10717 use exactly the same macro in both places.
10718 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
10719 so that the normal-case YYRHSLOC works for the error case too.
10720 All uses changed.
10721 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
10722 (YYLLOC_DEFAULT): Use the same macro as glr.c.
10723 * doc/bison.texinfo (Location Default Action): Don't claim that
10724 we have an array of locations. Use the same macro for both glr
10725 and lalr parsers. Mention YYRHSLOC. Mention what happens when
10726 the index is 0.
10727
10728 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
10729
10730 * HACKING: Update email addresses to send announcements to.
10731
10732 * configure.ac (AC_INIT): Bump version to 1.875f.
10733
10734 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
10735
10736 * NEWS: Version 1.875e.
10737 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
10738
10739 * src/scan-skel.l: Include "complain.h", for "fatal".
10740
10741 * src/relation.h (relation_print, relation_digraph):
10742 Relation sizes are of type relation_node, not size_t (this is
10743 merely a doc fix, since the two types are equivalent).
10744 (relation_transpose): Relation sizes are of type relation_node,
10745 not int.
10746 * src/relation.c: Likewise.
10747 (top, infinity): Now of type relation_node, not int.
10748 (traverse, relation_transpose): Use relation_node, not int.
10749
10750 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
10751 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
10752 (yyparse): Remove unused local introduced in 2004-10-25 patch.
10753
10754 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
10755 specifying whether the test should be skipped. Use it tp
10756 specify that the [%defines %skeleton "lalr1.cc"] tests currently
10757 fail on some hosts, and should be skipped.
10758
10759 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
10760
10761 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
10762 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
10763 unless otherwise specified below.
10764
10765 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
10766 to allocate kernel_base, kernel_items, kernel_size, since
10767 they needn't be initialized to 0.
10768 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
10769 * src/closure.c (new_closure): Likewise, for itemset.
10770 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
10771 * src/lalr.c (set_goto_map): Likewise, for temp_map.
10772 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
10773 (build_relations): Likewise for edge, states1, includes.
10774 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
10775 * src/reader.c (packgram): Likewise, for ritem, rules.
10776 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
10777 * src/relation.c (relation_digraph): Likewise for VERTICES.
10778 (relation_transpose): Likewise for new_R, end_R.
10779 * src/symtab.c (symbols_token_translations_init): Likewise for
10780 token_translations.
10781 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
10782 (token_actions): Likewise for yydefact, actrow, conflrow,
10783 conflict_list.
10784 (save_column): Likewise for froms[symno], tos[symno].
10785 (goto_actions): Likewise for state_count.
10786 (pack_table): Likewise for base, pos, check.
10787 (tables_generate): Likewise for width.
10788
10789 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
10790 for initial core. Just have a separate core, so we needn't worry
10791 about whether kernel_size and kernel_base are initialized.
10792
10793 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
10794 kernel_size, kernel_items): Remove unnecessary initialization.
10795 * src/conflicts.c (conflicts): Likewise.
10796 * src/derives.c (derives): Likewise.
10797 * src/muscle_tablc (muscle_insert): Likewise.
10798 * src/relation.c (relation_digraph): Likewise.
10799 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
10800 conflrow, conflict_table, conflict_list, table, check):
10801 Likewise.
10802
10803 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
10804 This is because all callers pass unsigned int.
10805 * src/closure.h (new_closure): Likewise.
10806
10807 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
10808 (build_relations): Initialize includes[i] in all cases.
10809 * src/reader.c (packgram): Always initialize rules[ruleno].prec
10810 and rules[ruleno].precsym. Initialize members in order.
10811 * src/relation.c (relation_transpose): Always initialize new_R[i]
10812 and end_R[i].
10813 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
10814
10815 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
10816 conflict_list[0] was always 0, but now it isn't initialized.
10817
10818 * src/table.c (table_grow): When conflict_table grew, the grown
10819 area wasn't cleared. Fix this.
10820
10821 * lib/.cvsignore: Add strdup.c, strdup.h.
10822 * m4/.cvsignore: Add strdup.m4.
10823
10824 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
10825
10826 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
10827 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
10828 GOTO_NUMBER_MAXIMUM, since we occasionally compute
10829 ngotos + 1 without checking for overflow.
10830 (build_relations): Use END_NODE, not -1, to denote end of edges.
10831 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
10832 build_relations): Use goto_number, not int, for goto numbers.
10833 * src/tables.c (save_column, default_goto): Likewise.
10834
10835 2004-11-23 Akim Demaille <akim@epita.fr>
10836
10837 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
10838 of #defining from yystype.
10839 Don't typedef yystype, C++ does not need it.
10840 This lets it possible to forward declare it as union.
10841
10842 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
10843
10844 * bootstrap (gnulib_modules): Add extensions.
10845 Problem reported by Jim Meyering.
10846
10847 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
10848
10849 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
10850 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
10851 src/system.h, src/tables.c: XFREE -> free, to accommodate
10852 recent change to gnulib xalloc.h.
10853 Problem reported by Jim Meyering.
10854
10855 2004-11-17 Akim Demaille <akim@epita.fr>
10856
10857 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
10858
10859 2004-11-17 Akim Demaille <akim@epita.fr>,
10860 Alexandre Duret-Lutz <adl@gnu.org>
10861
10862 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
10863 changes.
10864 (YYCDEBUG): Adjust.
10865 Use it instead of cdebug_.
10866 (Parser::debug_stream, Parser::set_debug_stream): New.
10867 (Parser::symprint_): Define cdebug_ for temporary backward
10868 compatibility.
10869 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
10870 debug_stream ().
10871
10872 2004-11-17 Akim Demaille <akim@epita.fr>
10873
10874 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
10875 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
10876 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
10877 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
10878
10879 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
10880
10881 * data/glr.c (yyloc_default): Remove; not used.
10882 Problem reported by Frank Heckenbach.
10883
10884 2004-10-25 Akim Demaille <akim@epita.fr>
10885
10886 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
10887 Introduce another definition to address simple location arrays.
10888 (yyGLRStack): New member: yyerror_range.
10889 (yyrecoverSyntaxError, yyparse): Update it.
10890 (yyrecoverSyntaxError): Use it when shifting the error token to
10891 have an accurate range, equivalent to the one computed by both
10892 yacc.c and lalr1.cc.
10893 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
10894 that column numbers start at column 0, as per GNU Coding
10895 Standards, the others tests, and the doc.
10896 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
10897 Adjust to the above change (first column is 0).
10898 And adjust the location of the "<error>", now covering the whole
10899 line.
10900
10901 2004-10-22 Akim Demaille <akim@epita.fr>
10902 and Paul Eggert <eggert@cs.ucla.edu>
10903
10904 Remove some arbitrary limits on goto numbers and relations.
10905 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
10906 initial values, since they're never used.
10907 (set_goto_map): ngotos is now unsigned, so test for overflow
10908 by seeing whether it wraps around to zero.
10909 * src/lalr.h (goto_number): Now size_t, not short int.
10910 (GOTO_NUMBER_MAXIMUM): Remove.
10911 * src/relation.c (relation_print, traverse, relation_transpose):
10912 Check for END_NODE rather than looking at sign.
10913 * src/relation.h (END_NODE): New macro.
10914 (relation_node): Now size_t, not short int.
10915
10916 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
10917
10918 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
10919 keyword, not an identifier. Problem reported by Baron Schwartz in
10920 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
10921
10922 2004-10-11 Akim Demaille <akim@epita.fr>
10923
10924 * src/symtab.c (symbol_check_alias_consistency): Also check
10925 type names, destructors, and printers.
10926 Reported by Alexandre Duret-Lutz.
10927 Recode the handling of associativity and precedence in terms
10928 of symbol_precedence_set.
10929 Accept no redeclaration at all, not even equal to the previous
10930 value.
10931 (redeclaration): New.
10932 Use it to factor redeclaration complaints.
10933 (symbol_make_alias): Don't set the type of the alias, let
10934 symbol_check_alias_consistency do it as for other features.
10935 * src/symtab.h (symbol): Add new member prec_location, and
10936 type_location.
10937 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
10938 * tests/input.at (Incompatible Aliases): New.
10939
10940 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
10941
10942 .cvsignore fixes to accommodate gnulib changes,
10943 and the practice of naming build directories "_build".
10944 * .cvsignore: Add "_*". Sort.
10945 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
10946 * m4/.cvsignore: Add "*_gl.m4".
10947
10948 2004-10-06 Akim Demaille <akim@epita.fr>
10949
10950 * src/parse-gram.y (add_param): Fix the truncation of trailing
10951 spaces.
10952
10953 2004-10-05 Akim Demaille <akim@epita.fr>
10954
10955 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
10956 whether the reducion was empty or not. This leaves room to
10957 improve the use of YYLLOC_DEFAULT in such a case.
10958 lalr1.cc is still experimental, so changing this is acceptable.
10959 And finally, there are probably not many users who changed the
10960 handling of locations in GLR, so changing is admissible too.
10961
10962 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
10963 empty reduction, set @$ to an empty location ending the previously
10964 stacked symbol.
10965 Adjust uses to make sure the code is triggered on empty
10966 reductions.
10967 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
10968 expected output: empty reductions have empty locations.
10969
10970 2004-09-29 Akim Demaille <akim@epita.fr>
10971
10972 * data/lalr1.cc: Move towards a more standard C++ coding style
10973 for templates: Class < T > -> Class<T>.
10974
10975 2004-09-29 Akim Demaille <akim@epita.fr>
10976
10977 * data/lalr1.cc: Reinstall the former ctor, for sake of
10978 compatibility, but warn it will be removed.
10979 Move towards a more standard C++ coding style (i.e., type *var ->
10980 type* var).
10981
10982 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
10983
10984 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
10985 since it's less likely to work if NULs are involved in the future.
10986
10987 2004-09-27 Akim Demaille <akim@epita.fr>
10988
10989 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
10990
10991 2004-09-27 Akim Demaille <akim@epita.fr>
10992
10993 * data/lalr1.cc (b4_parse_param_decl_1): New.
10994 (b4_parse_param_decl): Use it to have different names between attribute
10995 and argument names.
10996 (b4_cc_constructor_call): Likewise.
10997
10998 2004-09-24 Akim Demaille <akim@epita.fr>
10999
11000 * src/parse-gram.y (add_param): Strip the leading and trailing
11001 blanks from a formal argument declaration.
11002 (YY_LOCATION_PRINT): New.
11003
11004 2004-09-24 Akim Demaille <akim@epita.fr>
11005
11006 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
11007 after the location.
11008
11009 2004-09-24 Akim Demaille <akim@epita.fr>
11010
11011 * doc/bison.texinfo (Table of Symbols): Sort.
11012
11013 2004-09-21 Akim Demaille <akim@epita.fr>
11014
11015 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
11016 the useless parentheses.
11017 Suggested by Paul Eggert.
11018
11019 2004-09-20 Akim Demaille <akim@epita.fr>
11020
11021 Let the initial-action act on the look-ahead, and use it for the
11022 "initial push" (corresponding to an hypothetical beginning-of-file).
11023 And let lalr1.cc honor %initial-action.
11024
11025 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
11026 example.
11027 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
11028 (Parser::Parser): Remove the ctor that used to initialize it.
11029 (Parser::parse): Like in the other skeletons, issue the "starting
11030 parse" message before any action.
11031 Honor %initial-action.
11032 Initialize the stacks with the lookahead.
11033 * data/yacc.c: Let $$ and @$ in %initial-action designate the
11034 look-ahead.
11035 Push them in the stacks.
11036 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
11037
11038 2004-09-20 Akim Demaille <akim@epita.fr>
11039
11040 * doc/bison.texinfo (Initial Action Decl): New.
11041
11042 2004-09-20 Akim Demaille <akim@epita.fr>
11043
11044 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
11045 clearer criterion to define it.
11046 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
11047 When reducing on an empty RHS, use the latest stacked location as
11048 location.
11049 yylloc is not always available.
11050 * data/glr.c: Likewise.
11051 Also, honor initial-actions.
11052
11053 2004-09-20 Akim Demaille <akim@epita.fr>
11054
11055 * data/yacc.c (YY_LOCATION_PRINT): New.
11056 Define when we know YYLTYPE's structure, i.e., when the default
11057 YYLLOC_DEFAULT is used.
11058 * data/c.m4 (b4_yysymprint_generate): Use it.
11059 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
11060 value of the result.
11061 (error_start_): Replace with...
11062 (error_range_): this location array.
11063 This allows to replace code relying on the implementation of
11064 locations by portable code.
11065 * data/yacc.c (yylerrsp): Replace with...
11066 (yyerror_range): this.
11067 Every time a token is popped, update yyerror_range[0], to have an
11068 accurate location for the error token.
11069 * data/glr.c (YY_LOCATION_PRINT): New.
11070 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
11071 deference a pointer.
11072 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
11073 report the location in %printers.
11074
11075 * src/scan-skel.l: Instead of abort, report error messages to ease
11076 understanding skeleton scanning failures.
11077
11078 2004-09-16 Akim Demaille <akim@epita.fr>
11079
11080 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
11081 (iterator, const_iterator): these, to be more in the C++ spirit.
11082 Also, return reverse iterators so that when displaying the stack
11083 we display its bottom first.
11084 (Parser::stack_print_, Parser::reduce_print_): Match the messages
11085 from yacc.c.
11086 We should probably use vector here though.
11087
11088 2004-09-16 Akim Demaille <akim@epita.fr>
11089
11090 Have more complete shift traces.
11091
11092 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
11093 to report Shifts instead of ad hoc YYDPRINTF invocations,
11094 including for the error token.
11095 * data/lalr1.cc (symprint_): Output the location.
11096 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
11097 output the location within the %printer.
11098 Activate GLR tests, at least to make sure they compile properly.
11099 They still don't pass though.
11100 * tests/calc.at: Adjust expect verbose output, since now "Entering
11101 state..." is on a different line than the "Shifting" message.
11102
11103 2004-09-08 Akim Demaille <akim@epita.fr>
11104
11105 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
11106 Bison directive from the Bison file to the invocation of this
11107 macro, so that these directives are passed to
11108 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
11109 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
11110 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
11111 the extra Bison directives instead of the whole series.
11112 Change the grammar so that there are recoverable errors, and
11113 unrecoverable errors. Now we can have the parser give up before
11114 consuming the whole input. As a result we now can observe that
11115 the lookahead is freed when needed.
11116 Change the parser source to parse argv[1] instead of a hard coded
11117 string.
11118 Simplify yylex, and give a value and location to EOF.
11119 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
11120 passed directives already coded in the file.
11121 Add some tests to check the location of "error".
11122 For some tests, the C++ parser is correct, and not yacc.c.
11123 For other tests, they provide different, but unsatisfying, values,
11124 so keep the C++ value so that at least one parser is "correct"
11125 according to the test suite.
11126 (Actions after errors): Remove, this is subsumed by the
11127 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
11128
11129 2004-09-06 Akim Demaille <akim@epita.fr>
11130
11131 * data/lalr1.cc: Adjust the indentation of the labels.
11132 (Parser::pop): New.
11133 Use it.
11134
11135 2004-09-06 Akim Demaille <akim@epita.fr>
11136
11137 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
11138 argument, an informative message.
11139 Call YY_SYMBOL_PRINT.
11140 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
11141 * data/lalr1.cc (destruct_): Likewise.
11142 In addition, no longer depend on b4_yysymprint_generate and
11143 b4_yydestruct_generate to generate these functions, do it "by
11144 hand".
11145
11146 2004-09-03 Akim Demaille <akim@epita.fr>
11147
11148 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
11149 invoked, yydestruct the lookahead.
11150 * tests/calc.at (Calculator $1): Update the expected lengths of
11151 traces: there is an added line for the discarded lookahead.
11152 * doc/bison.texinfo (Destructor Decl): Some rewording.
11153 Define "discarded" symbols.
11154
11155 2004-09-02 Akim Demaille <akim@epita.fr>
11156
11157 * data/lalr1.cc (translate_, destruct_): No reason to be static.
11158
11159 2004-09-02 Akim Demaille <akim@epita.fr>
11160
11161 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
11162 (YYDSYMPRINTF): Rename as...
11163 (YY_SYMBOL_PRINT): this.
11164 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
11165 two.
11166 Use it instead of direct symprint_ calls.
11167 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
11168 one.
11169
11170 2004-09-02 Akim Demaille <akim@epita.fr>
11171
11172 * data/lalr1.cc (b4_yysymprint_generate): New.
11173 (symprint_): New member function, defined when YYDEBUG.
11174 Use it consistently instead of token/nterm debugging output by
11175 hand.
11176 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
11177 %printer calls to use cdebug_ when using lalr1.cc.
11178
11179 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
11180
11181 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
11182 with #ifdef YYDEBUG.
11183
11184 2004-08-26 Akim Demaille <akim@epita.fr>
11185
11186 * doc/bison.texinfo (Implementing Loops): Rename as...
11187 (Implementing Gotos/Loops): this.
11188
11189 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
11190
11191 Adjust to latest gnulib.
11192 * bootstrap (gnulib_modules): Add xalloc-die.
11193 Set LC_ALL=C so that file names sort consistently.
11194 Prefer the gnulib copies of gettext.m4, glibc21.m4,
11195 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
11196 uintmax_t.m4, ulonglong.m4.
11197 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
11198 po.m4 since we are now using _gl.m4 instead.
11199
11200 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
11201
11202 * src/scan-action.l: Remove. Scanning of semantic actions is
11203 handled in scan-gram.l.
11204
11205 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
11206
11207 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
11208
11209 * src/location.h (struct): The file member is a uniqstr.
11210 (equal_boundaries): Use UNIQSTR_EQ for comparison.
11211
11212 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
11213
11214 Fix bug with non-%union parsers that have printers or destructors,
11215 which led to a Bison core dump. Reported by Peter Fales in
11216 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
11217
11218 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
11219 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
11220 not to our own type.
11221 * src/output.c (symbol_destructors_output, symbol_printers_output):
11222 Don't assume %union.
11223 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
11224 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
11225 UNION-FLAG. All callers changed.
11226 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
11227 Use type char, not unsigned int, when declaring an array of char;
11228 this lets us remove a cast.
11229 (Printers and Destructors): Add non-%union test cases.
11230
11231 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11232
11233 * doc/bison.texinfo: Minor editorial changes, mostly to the new
11234 GLR writeups. E.g., avoid frenchspacing and the future tense,
11235 change "lookahead" to "look-ahead", and change "wrt" to "with
11236 respect to".
11237
11238 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11239
11240 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
11241 New sections, split off from the GLR Parsers section. Put the new
11242 Simple GLR Parser near the start of the GLR section, for clarity.
11243 Rewrite connective text.
11244
11245 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
11246
11247 * doc/bison.texinfo (Simple GLR Parsers): New section.
11248
11249 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11250
11251 * NEWS, TODO, doc/bison.texinfo:
11252 Use "look-ahead" instead of "lookahead", to be consistent.
11253 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
11254 while we're fixing "look-ahead".
11255 * src/conflicts.c (shift_set): Renamed from shiftset.
11256 (look_ahead_set): Renamed from lookaheadset.
11257 * src/print.c: Likewise.
11258 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
11259 name for "lookahead".
11260 (report_types, usage): Likewise.
11261 * src/getargs.h (report_look_ahead_tokens): Renamed from
11262 report_lookaheads.
11263 * src/lalr.c (compute_look_ahead_tokens): Renamed from
11264 compute_lookaheads.
11265 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
11266 (look_ahead_tokens_print): Renamed from lookaheads_print.
11267 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
11268 state_rule_lookaheads_print.
11269 * src/state.h: Likewise.
11270 (reductions.look_ahead_tokens): Renamed from lookaheads.
11271 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
11272 AT_DATA_LOOKAHEADS_GRAMMAR.
11273
11274 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
11275
11276 * README: Update location of patched M4 distribution.
11277
11278 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
11279
11280 Don't assume the C++ compiler takes the same arguments as the C compiler
11281 (trivial change).
11282 * configure.ac (O0CXXFLAGS): New var.
11283 * tests/atlocal.in (CXXFLAGS): Use it.
11284
11285 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
11286
11287 Fix some "make check" problems with C++ reported by
11288 Albert Chin-A-Young for Tru64 C++ in this thread:
11289 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
11290
11291 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
11292 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
11293 Output to a .cc file for C++, not to a .c file.
11294 * tests/calc.at (AT_CHECK_CALC): Likewise.
11295 * tests/regression.at (AT_CHECK_DANCER): Likewise.
11296 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
11297
11298 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
11299
11300 * tests/calc.at, tests/actions.at: Workaround for SGI
11301 C++ compiler. (trivial change)
11302
11303 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
11304
11305 Spent a few hours checking out which prerequisite versions the
11306 current sources actually require. I went all the way back to
11307 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
11308 a seemingly endless set of combinations of versions more recent
11309 than that. The bottom line is that the current sources require
11310 fairly recent versions of the build tools, and it'll be some work
11311 to change this.
11312 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
11313 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
11314 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
11315 Add comments explaining why those particular versions are
11316 currently needed.
11317
11318 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
11319 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
11320 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
11321
11322 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
11323 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
11324
11325 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
11326
11327 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
11328 0.11.5. Suggested by Bruno Haible.
11329 * bootstrap: Remove gettext version checking.
11330
11331 * doc/bison.texinfo (Decl Summary): Also mention that %union
11332 can depend on prerequisite types. Problem reported by Tim
11333 Van Holder.
11334
11335 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
11336
11337 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
11338 * README-alpha: Don't tell people not to package this.
11339
11340 * bootstrap: Don't assume $(...) works; use `...` instead.
11341 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
11342 gettext better.
11343
11344 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
11345 put into the -d output file, and mention what to do if YYSTYPE is
11346 defined as a macro.
11347
11348 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
11349
11350 Undo change made earlier today: it caused autopoint to not bring
11351 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
11352 autopoint's.
11353
11354 * bootstrap: Check that gettext version matches what's in
11355 configure.ac. Warn users to ignore robots.txt ERROR 404.
11356 * bootstrap: Undo today's earlier change (logged below).
11357 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
11358
11359 The gettext version checking is causing more trouble than it's
11360 curing; remove it. Problem reported by Paul Hilfinger.
11361
11362 * bootstrap: Issue a warning that one can expect a message
11363 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
11364 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
11365
11366 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
11367
11368 Ensure that the C++ compiler used for testing actually works on a
11369 simple test program; if not, skip the C++-related tests. Problem
11370 reported by Vin Shelton in:
11371 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
11372
11373 * m4/cxx.m4: New file.
11374 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
11375 * tests/atlocal.in (BISON_CXX_WORKS): Add.
11376 * tests/local.at (AT_COMPILE_CXX): Use it.
11377
11378 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11379
11380 * data/glr.c (yylloc): Output this macro even if locations are not
11381 being generated, as the GLR parser needs it even in that case.
11382 Problem reported by Troy A. Johnson
11383 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
11384
11385 * configure.ac (AC_INIT): Update to 1.875e.
11386
11387 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11388
11389 * NEWS: Version 1.875d.
11390 * configure.ac (AC_INIT): Likewise.
11391 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
11392
11393 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
11394 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
11395 lalr1.cc runs afoul of the first, and the last two are no longer
11396 supported by GCC 3.4.0.
11397 * README: Mention GNU m4 1.4 or later; mention m4 patches.
11398 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
11399
11400 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
11401
11402 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
11403 unsigned int, for compatibility with latest gnulib hash module.
11404 * src/state.c (state_hash, state_hasher): Likewise.
11405 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
11406 * src/uniqstr.c (hash_uniqstr): Likewise.
11407
11408 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
11409
11410 * NEWS: Unescaped newlines are no longer allowed in char & strings.
11411
11412 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
11413 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
11414 character and string literals.
11415 (unexpected_end): New function.
11416 (unexpected_eof): Use it.
11417 (unexpected_newline): New function.
11418 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
11419 actions.
11420
11421 * NEWS: Document %expect-rr.
11422
11423 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
11424 Fix typo by replacing $1 with $option.
11425 Remove more 'intl'-related files.
11426 Don't DEFUN AM_INTL_SUBDIR twice.
11427
11428 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
11429 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
11430 strtoul.c.
11431 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
11432 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
11433 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
11434 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
11435 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
11436 * src/.cvsignore: Add *.output.
11437
11438 * src/parse-gram.y: Put copyright notice inside %{ %} so it
11439 gets copied to the output file.
11440
11441 2004-04-28 Paul Eggert <eggert@twinsun.com>
11442
11443 Get files from the gnulib and po repositories, instead of relying
11444 on them being in our CVS. Upgrade to latest versions of gnulib
11445 and Automake.
11446
11447 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
11448 * bootstrap: Bootstrap from gnulib and po repositories.
11449 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
11450 * README-cvs: Document these changes. Remove version numbers from
11451 mentions of build tools, since they change so often. Mention Flex.
11452
11453 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
11454 (gl_USE_SYSTEM_EXTENSIONS): Add.
11455 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
11456 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
11457 does this for us.
11458 (AC_ISC_POSIX): Remove; we no longer support this
11459 ancient OS, as it gets in the way of latest Autoconf & gnulib.
11460 (AC_HEADER_STDC): Remove: we now assume C89 or better.
11461 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
11462 Do not check for C89 headers, except for locale.h which is used
11463 by the Yacc library and must port to K&R hosts.
11464 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
11465 Do not check for C89 functions, except for setlocale which is
11466 used by the Yacc library.
11467 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
11468 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
11469 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
11470 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
11471 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
11472 AM_GNU_GETTEXT): Remove; now done by:
11473 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
11474 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
11475 for us.
11476
11477 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
11478 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
11479 Define to empty, as gnulib.mk will do the rest for us.
11480 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
11481 for us.
11482 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
11483 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
11484
11485 * src/files.c: Include gnulib's xstrndup.h.
11486
11487 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
11488 (REALLOC): Use xnrealloc, for likewise.
11489 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
11490 (strnlen, memrchr): Remove decls; functions no longer used.
11491 Include <stpcpy.h>.
11492
11493 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
11494 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
11495 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
11496 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
11497 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
11498 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
11499 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
11500 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
11501 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
11502 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
11503 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
11504 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
11505 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
11506 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
11507 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
11508 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
11509 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
11510 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
11511 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
11512 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
11513 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
11514 Remove, as these files are now generated automatically
11515 by bootstrap or automake.
11516
11517 * po/ChangeLog: Remove: all but one entry was a duplicate
11518 of this file, and I moved that 2000-11-02 entry here.
11519
11520 * config/.cvsignore: Add Makefile, depcomp, install-sh.
11521 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
11522 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
11523 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
11524 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
11525 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
11526 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
11527 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
11528 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
11529 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
11530 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
11531 xstrndup.h.
11532 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
11533 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
11534 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
11535 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
11536 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
11537 * src/.cvsignore: Remove *_.c.
11538
11539
11540 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
11541 support it. (The latest stable gzip doesn't.)
11542
11543 2004-04-27 Paul Eggert <eggert@twinsun.com>
11544
11545 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
11546 case, as stos_ is now used by destructors due to the 2004-02-09
11547 change.
11548
11549 Remove more K&R C support.
11550 * lib/libiberty.y (PARAMS): Remove. All uses removed.
11551 * lib/subpipe.c (errno): Remove decl.
11552 Include <stdlib.h> unconditionally.
11553 (EXIT_FAILURE): Remove macro.
11554 * src/complain.c (vfprintf, strerror): Remove.
11555 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
11556 unconditionally.
11557 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
11558 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
11559 (strchr, strspn, memchr): Remove decls.
11560 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
11561 unconditionally. Do not declare perror.
11562 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
11563 unconditionally.
11564
11565 * src/complain.c (_): Remove useless defn, as system.h defines this.
11566
11567 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
11568 with latest obstack.h.
11569 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
11570 to procedure types, as obstack.h now does that for us.
11571 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
11572
11573 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
11574 so that this include file can stand alone.
11575 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
11576 does this now. Include subpipe.h first after config.h, to
11577 test whether it can stand alone.
11578
11579 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
11580 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
11581 unused declaration.
11582
11583 * tests/synclines.at (%union synch line): Put a dummy member in
11584 the union, because empty unions aren't allowed in C. Caught
11585 by GCC 3.4.0.
11586
11587 2004-04-13 Jim Meyering <jim@meyering.net>
11588
11589 * src/conflicts.c (conflicts_print): Correct format string typo:
11590 use `%%' to produce literal `%'. (trivial change)
11591
11592 2004-03-30 Paul Eggert <eggert@twinsun.com>
11593
11594 * src/getargs.c (version): Update copyright year to 2004.
11595
11596 * data/c.m4 (b4_int_type): Use 'short int' rather than
11597 'short', and similarly for 'long', 'unsigned', etc.
11598 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
11599 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
11600 yy_yypstack, yydumpstack): Likewise.
11601 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
11602 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
11603 Likewise.
11604 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
11605 yy_stack_print, yyparse): Likewise.
11606 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
11607 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
11608 * lib/bitset.c (bitset_print): Likewise.
11609 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
11610 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
11611 * lib/bitsetv.c (bitsetv_dump): Likewise.
11612 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
11613 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
11614 Likewise.
11615 * src/LR0.c (allocate_itemsets): Likewise.
11616 * src/gram.h (rule_number, rule): Likewise.
11617 * src/lalr.h (goto_number): Likewise.
11618 * src/nullable.c (nullable_compute): Likewise.
11619 * src/output.c (prepare_rules): Likewise.
11620 * src/relation.c (relation_print, relation_digraph): Likewise.
11621 * src/relation.h (relation_node): Likewise.
11622 * src/state.h (state_number, transitions, errs, reductions,
11623 struct state): Likewise.
11624 * src/symtab.h (symbol_number, struct symbol): Likewise.
11625 * src/tables.c (vector_number, tally, action_number,
11626 default_goto, goto_actions): Likewise.
11627 * tests/existing.at (GNU Cim Grammar): Likewise.
11628 * tests/regression.at (Web2c Actions): Likewise.
11629
11630 * src/output.c (muscle_insert_short_int_table): Renamed from
11631 muscle_insert_short_table. All uses changed.
11632
11633 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11634
11635 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
11636 (declaration): Replace expected_conflicts with expected_sr_conflicts.
11637 Add %expect-rr rule.
11638
11639 * src/scan-gram.l: Recognize %expect-rr.
11640
11641 * src/conflicts.h (expected_sr_conflicts): Rename from
11642 expected_conflicts.
11643 (expected_rr_conflicts): Declare.
11644
11645 * src/conflicts.c (expected_sr_conflicts): Rename from
11646 expected_conflicts.
11647 (expected_rr_conflicts): Define.
11648 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
11649 for GLR parsers.
11650 Use expected_sr_conflicts in place of expected_conflicts.
11651 Warn if expected_rr_conflicts used in non-GLR parser.
11652
11653 * doc/bison.texinfo: Add documentation for %expect-rr.
11654
11655 2004-03-08 Paul Eggert <eggert@gnu.org>
11656
11657 Add support for hex token numbers. Suggested by Odd Arild Olsen in
11658 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
11659
11660 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
11661 in lalr1.cc.
11662 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
11663 * src/scan-gram.l (scan_integer): New function.
11664 ({int}): Use it.
11665 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
11666 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
11667 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
11668 Say "long int", not "long", for uniformity with GNU style.
11669
11670 2004-02-25 Paul Eggert <eggert@twinsun.com>
11671
11672 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
11673 compilers. This fixes a problem with Intel's C++ compiler being
11674 chatty, reported by Guido Trentalancia in
11675 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
11676
11677 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
11678
11679 Support %destructor and merge error locations in lalr1.cc.
11680
11681 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
11682 (Parser::stos_): Define unconditionally.
11683 (Parser::destruct_): New method. Generate its body with
11684 b4_yydestruct_generate.
11685 (Parser::error_start_): New attribute.
11686 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
11687 token which are discarded.
11688 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
11689 error_start_ when erroneous token are discarded.
11690 (Parser::parse) <yyerrlab1>: Compute the location of the error
11691 token so that it covers all the discarded tokens.
11692 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
11693 it can be called with `%skeleton "lalr1.cc"', and do that.
11694
11695 2004-02-02 Paul Eggert <eggert@twinsun.com>
11696
11697 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
11698 $(top_srcdir)/lib and ../lib. This fixes a bug reported
11699 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
11700 There's no need to mention top_builddir since Automake does that
11701 for us.
11702 (INCLUDES): Remove, as Automake says it's obsolescent.
11703 Contents migrated into AM_CPPFLAGS as described above.
11704 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
11705
11706 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11707
11708 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
11709 (yyreportSyntaxError): Handle case where lookahead token is
11710 YYEMPTY.
11711
11712 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11713
11714 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
11715 resulting parsers are compilable with C++.
11716
11717 2003-12-23 Paul Eggert <eggert@twinsun.com>
11718
11719 * config/depcomp, config/install-sh: Sync with Automake 1.8.
11720 * src/output.c (output_skeleton): Rename local var.
11721 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
11722 Bison tokens, as this runs afoul of the 2003-10-07 change that
11723 disallowed NUL bytes in character constants or string literals.
11724
11725 * tests/local.at: Require Autoconf 2.59's Autotest.
11726 * tests/testsuite.at: Don't include local.at, since we now assume
11727 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
11728 including it.
11729 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
11730 multiple inclusion warnings.
11731
11732 2003-12-02 Akim Demaille <akim@epita.fr>
11733
11734 * doc/bison.texinfo (How Can I Reset the Parser): More about start
11735 conditions.
11736 From Bruno Haible.
11737
11738 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
11739
11740 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
11741
11742 2003-10-07 Paul Eggert <eggert@twinsun.com>
11743
11744 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
11745 if testsuite doesn't exist.
11746
11747 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
11748 literals, unfortunately.
11749 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
11750 Complain about NUL bytes in character constants or string literals.
11751
11752 2003-10-05 Paul Eggert <eggert@twinsun.com>
11753
11754 * NEWS: Don't document %no-default-prec, as it's still
11755 too experimental.
11756 * doc/bison.texinfo: Document %no-default-prec only if
11757 the defaultprec flag is set. Normally it's not.
11758
11759 2003-10-04 Paul Eggert <eggert@twinsun.com>
11760
11761 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
11762 non-modifiable lvalue, instead of a modifiable one.
11763 * doc/bison.texinfo (Actions): Document that $$ can
11764 be assigned to. Do not claim that $$ and $N are
11765 array element references: user code should not rely on this.
11766
11767 2003-10-01 Paul Eggert <eggert@twinsun.com>
11768
11769 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
11770 (grammar_declaration): Use it.
11771 * src/scan-gram.l: New token %no-default-prec.
11772 * tests/conflicts.at: Revamp tests to use %no-default-prec.
11773 * NEWS, doc/bison.texinfo: Document the above.
11774
11775 2003-10-01 Akim Demaille <akim@epita.fr>
11776
11777 VCG no longer supports long_straight_phase.
11778
11779 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
11780 * src/print_graph.c (print_graph): Adjust.
11781
11782 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
11783 and Paul Eggert <eggert@twinsun.com>
11784
11785 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
11786 Table of Symbols): Document %default-prec.
11787 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
11788 (grammar_declaration): Set default_prec on %default-prec.
11789 * src/scan-gram.l (%default-prec): New token.
11790 * src/reader.h (default_prec): New flag.
11791 * src/reader.c: Likewise.
11792 (packgram): Handle it.
11793 * tests/conflicts.at (%default-prec without %prec,
11794 %default-prec with %prec, %default-prec 1): New tests.
11795
11796 2003-09-30 Paul Eggert <eggert@twinsun.com>
11797
11798 * tests/testsuite.at: Include local.at, not input.at, fixing
11799 a typo in the 2003-08-25 patch.
11800
11801 2003-08-27 Akim Demaille <akim@epita.fr>
11802
11803 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
11804 GCC warnings.
11805
11806 2003-08-26 Akim Demaille <akim@epita.fr>
11807
11808 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
11809 "<\#" to avoid magic from Gnus when posting parts of this script.
11810
11811 2003-08-26 Akim Demaille <akim@epita.fr>
11812
11813 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
11814 (Parser::parse): here.
11815 Adjust: nerrs and errstatus is now replaced by...
11816 (Parser::nerrs_, Parser::errstatus_): New.
11817
11818 2003-08-25 Akim Demaille <akim@epita.fr>
11819
11820 * config/announce-gen, Makefile.cfg: New.
11821 * Makefile.am: Adjust.
11822 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
11823 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
11824
11825 2003-08-25 Akim Demaille <akim@epita.fr>
11826
11827 When reducing initial empty rules, Bison parser read an initial
11828 location that is not defined. This results in garbage, and that
11829 affects Bison's own parser. Therefore we need (i) to extend Bison
11830 to support a means to initialize this location, and (ii) to use
11831 this CVS Bison to fix CVS Bison's parser.
11832
11833 * src/reader.h, reader.c (epilogue_augment): Remove, replace
11834 with...
11835 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
11836 * src/parse-gram.y: Adjust.
11837 (%initial-action): New.
11838 (%error-verbose): Since we require CVS Bison, there is no reason
11839 not to use it.
11840 * src/scan-gram.l: Adjust.
11841 * src/Makefile.am (YACC): New, to make sure we use our own parser.
11842 * data/yacc.c (yyparse): Use b4_initial_action.
11843
11844 2003-08-25 Akim Demaille <akim@epita.fr>
11845
11846 * doc/bison.texinfo: Don't promote stdout for error messages.
11847
11848 2003-08-25 Akim Demaille <akim@epita.fr>
11849
11850 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
11851 From Alexandre Duret-Lutz.
11852
11853 2003-08-25 Akim Demaille <akim@epita.fr>
11854
11855 Version 1.875c.
11856
11857 2003-08-25 Akim Demaille <akim@epita.fr>
11858
11859 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
11860 Use them.
11861
11862 2003-08-25 Akim Demaille <akim@epita.fr>
11863
11864 * data/lalr1.cc (Parser::reduce_print_): New.
11865 Use it.
11866
11867 2003-08-25 Akim Demaille <akim@epita.fr>
11868
11869 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
11870 error recovery loops. This patch is based on
11871 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
11872 Also, augment the similarity between lalr1.cc and yacc.c.
11873 Note: the locations of error recovery rules are not correct yet.
11874
11875 * data/lalr1.cc: Comment changes to augment the similarity between
11876 lalr1.cc and yacc.c.
11877 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
11878 (yyerrlab1): Remove, but where it used to be (now the bottom part of
11879 yyerrlab), when hitting EOF, pop the whole stack here instead of
11880 merely falling thru the default error handling mechanism.
11881 (yyerrorlab): New label, with the old contents of YYERROR,
11882 plus the following change: pop the stack of rhs corresponding
11883 to the production that invoked YYERROR. That is how Yacc
11884 behaves (required by POSIX).
11885 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
11886 fail.
11887
11888 2003-08-25 Akim Demaille <akim@epita.fr>
11889
11890 Tune local.at so that people can "autom4te -l autotest calc.at -o
11891 calc" for instance, to extract a sub test suite.
11892
11893 * tests/testsuite.at: Move the initialization, Autotest version
11894 requirement, and AT_TESTED invocation into...
11895 * tests/local.at: here.
11896 * tests/testsuite.at: Include it for compatibility with Autoconf
11897 2.57.
11898 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
11899 be ignore.
11900
11901 2003-08-04 Paul Eggert <eggert@twinsun.com>
11902
11903 Rework code slightly to avoid gcc -Wtraditional warnings.
11904 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
11905 The returned value is now stored in *YY0. All callers changed.
11906 * src/output.c (merge_output): Adjust to the above change.
11907
11908 2003-07-26 Paul Eggert <eggert@twinsun.com>
11909
11910 * data/glr.c (YYASSERT): New macro.
11911 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
11912 yyresolveStates, yyprocessOneStack):
11913 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
11914 Derived from a suggestion by Frank Heckenbach.
11915
11916 2003-07-25 Paul Eggert <eggert@twinsun.com>
11917
11918 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
11919 for portability to K&R C (after ansi2knr, presumably). See
11920 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
11921 by Frank Heckenbach, though I have omitted the structure-initialization
11922 part of his glr-knr.diff patch since I recall that the Portable
11923 C Compiler didn't require that change.
11924
11925 Let the user specify how to allocate and free memory.
11926 Derived from a suggestion by Frank Heckenbach in
11927 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
11928 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
11929 All uses of free, malloc, realloc changed to use these macros,
11930 and unnecessary casts removed.
11931 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
11932
11933 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
11934
11935 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
11936 use s.empty() rather than s == "" to test for empty string; see
11937 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
11938 (trivial change)
11939
11940 2003-06-25 Akim Demaille <akim@epita.fr>
11941
11942 * config/depcomp, config/install-sh: Update from masters.
11943
11944 2003-06-20 Paul Eggert <eggert@twinsun.com>
11945
11946 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
11947 and return properly parenthesized result.
11948 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
11949 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
11950 Remove unnecessary parentheses from uses.
11951 * doc/bison.texinfo (Location Default Action): Describe the
11952 conventions for parentheses.
11953
11954 2003-06-19 Paul Eggert <eggert@twinsun.com>
11955
11956 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
11957 yyreportTree): Do not assume that size_t is the same width as int,
11958 when printing sizes. Print sizes using an unsigned format.
11959 Problem reported by Frank Heckenbach in
11960 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
11961
11962 Port to Forte Developer 7 C compiler.
11963 * data/glr.c (struct YYLTYPE): If locations are not being used,
11964 declare a single dummy member, as empty structs do not conform
11965 to the C standard.
11966 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
11967 the Forte Developer 7 C compiler complains that end-of-loop
11968 code is not reached.
11969
11970 2003-06-17 Paul Eggert <eggert@twinsun.com>
11971
11972 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
11973 avoid warnings from picky compilers about redefinition of PARAMS.
11974
11975 2003-06-17 Paul Eggert <eggert@twinsun.com>
11976
11977 Version 1.875b.
11978
11979 * NEWS: Document 1.875b.
11980
11981 * lib/bbitset.h: Do not include config.h; that's the includer's job.
11982 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
11983 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
11984 Don't use 'index' in comments, as it's a builtin fn on some hosts.
11985 * lib/bitset_stats.c: Include gettext.h unconditionally, as
11986 per recent gettext manual's suggestion.
11987 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
11988 Use prototypes, not old-style definitions.
11989 * lib/lbitset.c (lbitset_unused_clear): Likewise.
11990 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
11991 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
11992 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
11993 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
11994 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
11995 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
11996 vbitset_or_and_cmp, vbitset_copy): Likewise.
11997
11998 * lib/libiberty.h: Do not include config.h; that's the includer's job.
11999 Do not include <stdlib.h>.
12000 (PARAMS): Define unconditionally for C89.
12001 (ATTRIBUTE_NORETURN): Remove.
12002 (ATTRIBUTE_UNUSED): Define unconditionally.
12003
12004 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
12005 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
12006 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
12007 * lib/vbitset.c, lib/vbitset.h: New files.
12008 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
12009 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
12010 from libbitset.
12011
12012 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
12013 `How Can I Reset @code{yyparse}', since texinfo does not allow
12014 arbitrary @ in node names.
12015
12016 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
12017 shouldn't be needed according to the gettext 0.12.1 documentation
12018 but which seem to be needed anyway: codeset.m4 glibc21.m4
12019 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
12020 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
12021 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
12022
12023 * lib/.cvsignore: Add stdbool.h.
12024 * m4/.cvsignore: Add nls.m4, po.m4.
12025
12026 Upgrade to CVS gnulib.
12027 * stdbool_.h: File renamed from stdbool.h.in.
12028 * configure.ac (AM_STDBOOL_H): Invoke this instead of
12029 AC_HEADER_STDBOOL.
12030 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
12031 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
12032 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
12033 (MOSTLYCLEANFILES): New var.
12034 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
12035 (stdbool.h): New rule.
12036 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
12037 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
12038 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
12039 m4/quote.m4: Upgrade to today's gnulib.
12040
12041 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
12042 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
12043 the tests right now.
12044 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
12045 yyerror are declared before use; C99 requires this.
12046
12047 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12048
12049 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
12050 first.
12051 (yyrecoverSyntaxError): Correct the logic for setting and testing
12052 yyerrState.
12053 Correct comment on handling EOF.
12054 Allow states with only a default reduction, rather than failing
12055 (I can't quite reconstruct why these were not allowed before).
12056
12057 Fixes to avoid problem that $-N rules in GLR parsers can cause
12058 buffer overruns, corrupting state.
12059
12060 * src/output.c (prepare_rules): Output max_left_semantic_context
12061 definition.
12062 * src/reader.h (max_left_semantic_context): New variable declaration.
12063 * src/scan-gram.l (max_left_semantic_context): Define.
12064 (handle_action_dollar): Update max_left_semantic_context.
12065 * data/glr.c (YYMAXLEFT): New definition.
12066 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
12067 (yyresolveAction): Ditto.
12068
12069 Fixes to problems with location handling in GLR parsers reported by
12070 Frank Heckenbach (2003/06/05).
12071
12072 * data/glr.c (YYLTYPE): Make trivial if locations not used.
12073 (YYRHSLOC): Add parentheses, and define only if locations used.
12074 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
12075 locations not used.
12076 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
12077 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
12078
12079 * tests/cxx-type.at: Exercise location information; update tests
12080 to differentiate output with and without locations.
12081 Remove forward declarations of yylex and yyerror---caused errors
12082 because default YYLTYPE not yet defined.
12083 Change semantic actions to compute strings, rather than printing
12084 them directly (to test proper passing of semantics values). Change
12085 output to prefix notation and update test data and expected results.
12086 (yylex): Track locations.
12087 (stmtMerge): Return value rather than printing, and include arguments
12088 in value.
12089
12090 2003-06-03 Paul Eggert <eggert@twinsun.com>
12091
12092 Avoid warnings generated by GCC 2.95.4 when Bison is
12093 configured with --enable-gcc-warnings.
12094 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
12095 yy::]b4_parser_class_name[::translate_,
12096 yy::Stack::operator[] (unsigned),
12097 yy::Stack::operator[] (unsigned) const,
12098 yy::Slice::operator[] (unsigned),
12099 yy::Slice::operator[] (unsigned) const):
12100 Rename local vars to avoid warnings.
12101 * tests/glr-regression.at (Improper handling of embedded actions
12102 and $-N in GLR parsers): Remove unused local variable from yylex.
12103 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
12104 (void) as arg when not pure, since we now assume C89 when building
12105 Bison. Pacify GCC by using parameter.
12106
12107 2003-06-02 Paul Eggert <eggert@twinsun.com>
12108
12109 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
12110 yy::Location::lines, yy::Location::columns): Rename arguments
12111 to avoid shadowing; this removes a warning generated by GCC 3.3.
12112
12113 2003-06-01 Paul Eggert <eggert@twinsun.com>
12114
12115 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
12116 to g++, as GCC 3.3 complains if you do it.
12117 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
12118 everything that WARNING_CFLAGS has, except omit warnings
12119 not suitable for C++.
12120 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
12121 * tests/atlocal.in (CXXFLAGS): New var.
12122 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
12123
12124 Fix a GLR parser bug I reported in February; see
12125 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
12126 The problem was that GLR parsers did not conform to the C standard,
12127 because actions like { $1 = $2 + $3; } expanded to expressions
12128 that invoked YYFILL in separate subexpressions, and YYFILL assigned
12129 to a local variable. The C standard says that expressions
12130 like (var = f ()) + (var = f ()) have undefined behavior.
12131 Another problem was that GCC sometimes issues warnings that
12132 yyfill and its parameters are unused.
12133
12134 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
12135 as possibly unused.
12136 (yyfill): New function.
12137 (YYFILL): Use it.
12138 (yyuserAction): Change type of yynormal to bool, so that it matches
12139 the new yyfill signature. Mark it as possibly unused.
12140
12141
12142 Follow up on a bug I reported in February, where a Bison-generated
12143 parser can loop. Provide a test case and a fix for yacc.c. I
12144 don't have a fix for lalr1.cc or for glr.c, unfortunately.
12145 The original bug report is in:
12146 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
12147
12148 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
12149 macro's size was becoming unwieldy.
12150 (yyerrlab): Do not discard an empty lookahead symbol, as this
12151 might destroy garbage.
12152 (yyerrorlab): New label, with the old contents of YYERROR,
12153 plus the following change: pop the stack of rhs corresponding
12154 to the production that invoked YYERROR. That is how Yacc
12155 behaves, and POSIX requires this behavior.
12156 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
12157 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
12158 Define 'alarm' to do nothing if unistd.h is not available.
12159 Add a new rule "exp: '-' error;" to test the above change to
12160 data/yacc.c. Use 'alarm' to abort any test taking longer than
12161 10 seconds, as it's probably looping.
12162 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
12163 Also, the new yacc.c generates two fewer diagnostics for an
12164 existing test.
12165
12166 2003-05-24 Paul Eggert <eggert@twinsun.com>
12167
12168 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
12169 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
12170 This fixes a problem reported by John Bowman when the Compaq/HP
12171 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
12172 -ansi -Wall -gall).
12173 * data/yacc.c (union yyalloc): Likewise.
12174 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
12175
12176 Switch from 'int' to 'bool' where that makes sense.
12177
12178 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
12179 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
12180 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
12181 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
12182 Return or accept bool, not int. All callers changed.
12183 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
12184 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
12185 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
12186 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
12187 bitset_or_and_cmp_): Likewise.
12188 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
12189 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
12190 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
12191 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
12192 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
12193 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
12194 bitset_stats_or_and_cmp): Likewise.
12195 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
12196 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
12197 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
12198 ebitset_xor_cmp): Likewise.
12199 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
12200 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
12201 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
12202 lbitset_xor_cmp): Likewise.
12203 * lib/bbitset.h: Include <stdbool.h>.
12204 (struct bitset_vtable): The following members now return bool, not
12205 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
12206 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
12207 or_and_cmp).
12208 * src/conflicts.c (count_rr_conflicts): Likewise.
12209 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
12210 All uses changed.
12211 * lib/ebitset.c (ebitset_obstack_init): Likewise.
12212 * lib/lbitset.c (lbitset_obstack_init): Likewise.
12213 * src/getargs.c (debug_flag, defines_flag, locations_flag,
12214 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12215 graph_flag): Likewise.
12216 * src/getargs.h (debug_flag, defines_flag, locations_flag,
12217 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12218 graph_flag): Likewise.
12219 * src/output.c (error_verbose): Likewise.
12220 * src/output.h (error_verbose): Likewise.
12221 * src/reader.c (start_flag, typed): Likewise.
12222 * src/reader.h (typed): Likewise.
12223 * src/getargs.c (LOCATIONS_OPTION): New constant.
12224 (long_options, getargs): Use it.
12225 * src/lalr.c (build_relations): Use bool, not int.
12226 * src/nullable.c (nullable_compute): Likewise.
12227 * src/print.c (print_reductions): Likewise.
12228 * src/tables.c (action_row, pack_vector): Likewise.
12229 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
12230 * src/output.c (prepare): Use it.
12231 * src/output.c (token_definitions_output,
12232 symbol_destructors_output, symbol_destructors_output): Use string,
12233 not boolean integer, to keep track of whether to output separator.
12234 * src/print_graph.c (print_core): Likewise.
12235 * src/state.c (state_rule_lookaheads_print): Likewise.
12236
12237 * config/install-sh: Sync from automake 1.7.5.
12238
12239 2003-05-14 Paul Eggert <eggert@twinsun.com>
12240
12241 * src/parse-gram.y (rules_or_grammar_declaration): Require a
12242 semicolon after a grammar declaration, in the interest of possible
12243 future changes to the Bison input language.
12244 Do not allow a stray semicolon at the start of the grammar.
12245 (rhses.1): Allow one or more semicolons after any rule, including
12246 just before "|" as required by POSIX.
12247 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
12248 grammar.
12249
12250 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
12251
12252 %parse-param support for lalr1.cc.
12253
12254 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
12255 b4_cc_constructor_calls, b4_cc_constructor_call,
12256 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
12257 definitions.
12258 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
12259 parse-param arguments.
12260 (yy::b4_parser_class_name): Declare instance variables to
12261 hold parse-param arguments.
12262 * tests/calc.at: s/value/semantic_value/ because value clashes
12263 with a member of yy::b4_parser_class_name. Adjust C++ code
12264 to handle %parse-param. Enable %parse-param test in C++.
12265
12266 2003-05-12 Paul Eggert <eggert@twinsun.com>
12267
12268 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
12269 English a bit. Fix fclose typo. Change "const char" to "char
12270 const", and use ANSI C rather than K&R for "main". Suggest
12271 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
12272 and suggest yy_switch_to_buffer.
12273
12274 2003-05-05 Paul Eggert <eggert@twinsun.com>
12275
12276 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
12277 C89. This avoids a diagnostic on compilers that define __STDC__
12278 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
12279 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
12280
12281 2003-05-03 Paul Eggert <eggert@twinsun.com>
12282
12283 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
12284 Do not overrun array bounds.
12285 This should fix a bug reported today by Olatunji Oluwabukunmi in
12286 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
12287
12288 2003-04-29 Akim Demaille <akim@epita.fr>
12289
12290 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
12291 * src/getargs.c, src/getargs.h: here, as bool, not int.
12292 (nondeterministic_parser): New.
12293 * src/parse-gram.y, src/scan-gram.l: Support
12294 %nondeterministic-parser.
12295 * src/output.c (prepare): Use nondeterministic_parser instead
12296 of glr_parser where appropriate.
12297 * src/tables.c (conflict_row, action_row, save_row)
12298 (token_actions, token_actions, pack_vector): Ditto.
12299
12300 2003-04-29 Akim Demaille <akim@epita.fr>
12301
12302 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
12303
12304 2003-04-29 Akim Demaille <akim@epita.fr>
12305
12306 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
12307 with %pure-parser and %locations to exercise the patch from Yakov
12308 Markovitch below.
12309
12310 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
12311
12312 * data/yacc.c: (b4_lex_param): Corrected for the case where
12313 %lex-param is provided and %pure-parser isn't.
12314
12315 2003-04-27 Paul Eggert <eggert@twinsun.com>
12316
12317 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
12318 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
12319 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
12320 if it is not defined.
12321 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
12322
12323 2003-04-26 Paul Eggert <eggert@twinsun.com>
12324
12325 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
12326 Declare to be of type suitable for the ninf value itself, not of
12327 type suitable for the corresponding table, since the latter might
12328 be unsigned but the ninf value might be negative. This fixes a
12329 bug reported by Alexandre Duret-Lutz in
12330 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
12331
12332 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
12333 invokes it. We shouldn't invoke it twice because it will attempt
12334 to put error.o in the archive twice. This fixes a glitch reported
12335 by Martin Mokrejs in
12336 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
12337
12338 2003-04-21 Paul Eggert <eggert@twinsun.com>
12339
12340 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
12341 to gnulib.
12342
12343 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
12344
12345 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
12346 Fix obvious typo that results in uncompilable GLR parsers
12347 when both %pure-parser and %locations are used. (trivial change)
12348
12349 2003-04-17 Paul Eggert <eggert@twinsun.com>
12350
12351 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
12352 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
12353 Do not insert the expected token via unput, as this runs afoul
12354 of a POSIX-compatibility bug in flex 2.5.31.
12355 All uses changed to BEGIN the parent state,
12356 since we no longer insert the expected token via unput.
12357 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
12358 that is no longer emitted after the above change.
12359
12360 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
12361 the first one. This change is from Paul Hilfinger, and it fixes
12362 regression reported by Werner Lemberg in
12363 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
12364
12365 (resolve_sr_conflict): Don't invoke state_errs_set
12366 unless one or more tokens have been explicitly made errors.
12367 Otherwise, the above change causes Bison to abort.
12368
12369 * tests/existing.at (GNU pic Grammar): New test case, taken from
12370 Lemberg's email.
12371
12372 2003-03-31 Akim Demaille <akim@epita.fr>
12373
12374 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
12375
12376 2003-03-31 Akim Demaille <akim@epita.fr>
12377
12378 * src/output.c (prepare_symbols): Avoid trailing spaces in the
12379 output.
12380
12381 2003-03-31 Akim Demaille <akim@epita.fr>
12382
12383 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
12384 From Paul Hilfinger.
12385
12386 2003-03-29 Akim Demaille <akim@epita.fr>
12387
12388 * m4/error.m4: Do not put under dynamic conditions some code which
12389 expansion is under static control.
12390
12391 2003-03-29 Akim Demaille <akim@epita.fr>
12392
12393 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
12394
12395 2003-03-29 Akim Demaille <akim@epita.fr>
12396
12397 * doc/bison.texinfo (Strings are Destroyed): New.
12398
12399 2003-03-13 Paul Eggert <eggert@twinsun.com>
12400
12401 * .cvsignore: Add configure.lineno.
12402 * src/.cvsignore: Add yacc.
12403 * tests/.cvsignore: Add testsuite.log.
12404 * doc/fdl.texi: Sync with latest FSF version.
12405
12406 2003-03-12 Paul Eggert <eggert@twinsun.com>
12407
12408 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
12409 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
12410 cursor, instead of leaving it undefined. This fixes a bug
12411 reported by Tim Van Holder in
12412 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
12413 * tests/input.at (Torturing the Scanner): Test the scanner on
12414 an empty input file, which was Tim Van Holder's test case.
12415
12416 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
12417 <sys/resource.h> can be included, include sys/time.h and
12418 sys/times.h first, if available. This works around the SunOS
12419 4.1.4 porting bug reported by Bruce Becker in
12420 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
12421
12422 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
12423 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
12424 AC_HEADER_SYS_WAIT.
12425
12426 Merge changes from gnulib. This was prompted because the CVS
12427 snapshot didn't build on Solaris 7 due to strnlen problems.
12428
12429 These changes need to be merged back into gnulib:
12430 * lib/hash.c: Include <stdbool.h> unconditionally.
12431 * m4/onceonly.m4 (m4_quote): New macro.
12432 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
12433 Quote AC_FOREACH variable-expansions properly.
12434 The 2003-01-03 obstack.h change also needs merging.
12435 {end of changes requiring merging}
12436
12437 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
12438 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
12439 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
12440 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
12441 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
12442 New files, imported from gnulib.
12443 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
12444 above.
12445
12446 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
12447 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
12448 gnulib sources.
12449
12450 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
12451 Add.
12452 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
12453 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
12454 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
12455 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
12456 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
12457 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
12458 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
12459 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
12460 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
12461 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
12462 (jm_PREREQ_ARGMATCH): Remove.
12463 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
12464 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
12465
12466 * src/system.h: Include <stdbool.h> unconditionally.
12467
12468 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
12469 assuming at least C89 in the bitset code for some time now.
12470
12471 2003-03-03 Akim Demaille <akim@epita.fr>
12472
12473 * ro.po: New.
12474
12475 2003-03-02 Akim Demaille <akim@epita.fr>
12476
12477 * doc/bison.texinfo (Table of Symbols): Reactivate the
12478 documentation for %lex-param, and %parse-param.
12479
12480 2003-03-02 Akim Demaille <akim@epita.fr>
12481
12482 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
12483 generate verbose error messages.
12484 Use the number of tokens as an upper bound in yytname, as it
12485 cannot be a non terminal.
12486
12487 2003-03-02 Akim Demaille <akim@epita.fr>
12488
12489 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
12490 message.
12491
12492 2003-03-02 Akim Demaille <akim@epita.fr>
12493
12494 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
12495 Use them to exercise yycheck overrun.
12496 Based on Andrew Suffield's grammar.
12497
12498 2003-03-02 Akim Demaille <akim@epita.fr>
12499
12500 Create tests/local.at for Bison generic testing macros.
12501
12502 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
12503 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
12504 This new file.
12505 * tests/calc.at (AT_CHECK_CALC): Adjust.
12506 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
12507 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
12508 * tests/local.at: here.
12509 (AT_COMPILE_CXX): Tags the tests using it as c++.
12510 Ignore the test if CXX is not functional.
12511
12512 2003-03-01 Paul Eggert <eggert@twinsun.com>
12513
12514 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
12515 not loc->end, since loc->end might contain garbage and this leads
12516 to undefined behavior on some platforms.
12517 (id_loc, token_start): Use (IF_LINTed) initial values that do not
12518 depend on *loc, so that the reader doesn't give the the false
12519 impression that *loc is initialized.
12520 (<INITIAL>"%%"): Do not bother setting code_start, since its value
12521 does not survive the return.
12522
12523 2003-03-01 Akim Demaille <akim@epita.fr>
12524
12525 * src/scan-gram.l (code_start): Always initialize it when entering
12526 into yylex, as SC_EPILOGUE is activated *before* the corresponding
12527 yylex invocation. An alternative would be making it static, but
12528 then it starts with the second %%'s beginning, instead of its end.
12529
12530 2003-02-28 Paul Eggert <eggert@twinsun.com>
12531
12532 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
12533 around a UnixWare 7.1.1 porting bug reported by John Hughes in
12534 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
12535
12536 2003-02-26 Paul Eggert <eggert@twinsun.com>
12537
12538 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
12539 Remove Sequent/Pyramid discussion (nobody uses them any more).
12540 Merge VMS and MS-DOS discussion; these ports may well be dead
12541 but let's keep mentioning them for now. Put <> around email
12542 addresses. Add copyright notice.
12543
12544 2003-02-24 Paul Eggert <eggert@twinsun.com>
12545
12546 * data/glr.c (yy_reduce_print): yylineno -> yylno,
12547 to avoid collision with flex use of yylineno.
12548 Problem reported by Bruce Lilly in
12549 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
12550 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
12551 * data/yacc.c (yy_reduce_print): Likewise.
12552
12553 * config/depcomp: Sync with Automake 1.7.3.
12554
12555 2003-02-21 Akim Demaille <akim@epita.fr>
12556
12557 * data/lalr1.cc: Use temporary variables instead of casts to
12558 change integer types.
12559 Suggested by Paul Eggert.
12560
12561 2003-02-21 Akim Demaille <akim@epita.fr>
12562
12563 * doc/bison.texinfo: Use "location" consistently to refer to @n,
12564 to avoid confusions with lalr1.cc's notion of Position.
12565 Suggested by Paul Eggert.
12566
12567 2003-02-20 Akim Demaille <akim@epita.fr>
12568
12569 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
12570 before initial_columns.
12571 (location.hh): Use consistent variable names when defining the
12572 operator<<.
12573 Use "last" so that we subtract from Positions, not from unsigned.
12574
12575 2003-02-20 Akim Demaille <akim@epita.fr>
12576
12577 * data/lalr1.cc (position.hh): New subfile, including the extended
12578 and Doxygen'ed documentation of class Position.
12579 (location.hh): Use it.
12580 Document a` la Doxygen.
12581 With the help of Benoit Perrot.
12582
12583 2003-02-20 Akim Demaille <akim@epita.fr>
12584
12585 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
12586 AT_YACC_IF.
12587 Redefine AT_YYERROR_SEES_LOC_IF using it.
12588 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
12589 not defined.
12590 Don't use the location in yy::Parser::error_ and
12591 yy::Parser::print_ when not %locations.
12592 Activate more lalr1.cc tests.
12593
12594 2003-02-19 Akim Demaille <akim@epita.fr>
12595
12596 * data/lalr1.cc: When displaying a line number, be sure to make it
12597 an int.
12598
12599 2003-02-19 Akim Demaille <akim@epita.fr>
12600
12601 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
12602 Remove, useless.
12603 (YYABORT, YYACCEPT, YYERROR): New.
12604 * tests/calc.at: Renable the lalr1.cc test.
12605
12606 2003-02-19 Akim Demaille <akim@epita.fr>
12607
12608 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
12609 error recovery, mixing with/without pops and discarding of the
12610 lookahead.
12611 Exercise YYERROR.
12612 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
12613
12614 2003-02-17 Paul Eggert <eggert@twinsun.com>
12615
12616 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
12617 * tests/testsuite.at (AT_COMPILE): Use them.
12618 This fixes the testsuite problem reported by Robert Lentz in
12619 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
12620
12621 2003-02-12 Paul Eggert <eggert@twinsun.com>
12622
12623 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
12624 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
12625 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
12626 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
12627 Check for malloc failure, for consistency with yacc.c.
12628 (yytname_size): Remove, for consistency with yacc.c.
12629
12630 The bug still remains in data/lalr1.cc, as I didn't have time
12631 to fix it there.
12632
12633 2003-02-06 Akim Demaille <akim@epita.fr>
12634
12635 * configure.ac (GXX): Rename as...
12636 (CXX): this, to keep the original Autoconf semantics.
12637 Require 2.57.
12638 * data/lalr1.cc: Fix b4_copyright invocations.
12639 If YYDEBUG is not defined, don't depend upon name_ being defined.
12640 (location.hh): Include string and iostream.
12641 (Position::filename): New member.
12642 (Position::Position ()): New.
12643 (operator<< (Position)): New.
12644 (operator- (Position, int)): New.
12645 (Location::first, Location::last): Rename as...
12646 (Location::begin, Location::end): these, to mock the conventional
12647 iterator names.
12648 (operator<< (Location)): New.
12649 * tests/atlocal.in (CXX): New.
12650 * tests/testsuite.at (AT_COMPILE_CXX): New.
12651 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
12652 locations in a more synthetic way.
12653 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
12654 lalr1.cc is used.
12655 Adjust the C locations to match those from Emacs: first column is
12656 column 0.
12657 Change all the expected results.
12658 Conform to the GCS: simplify the locations when applicable.
12659 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
12660 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
12661 these CPP macros with the m4 macros new defined by...
12662 (AT_CHECK_PUSHDEFS): this, i.e.:
12663 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
12664 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
12665 New macros.
12666 (AT_CHECK_POPDEFS): Undefine them.
12667 (AT_CHECK_CALC_LALR1_CC): New.
12668 Use it for the first lalr1.cc test.
12669
12670 2003-02-04 Akim Demaille <akim@epita.fr>
12671
12672 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
12673 Location as is defined.
12674
12675 2003-02-04 Akim Demaille <akim@epita.fr>
12676
12677 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
12678 name_ being defined.
12679
12680 2003-02-03 Paul Eggert <eggert@twinsun.com>
12681
12682 * src/gram.h (start_symbol): Remove unused decl.
12683
12684 Use more-consistent naming conventions for local vars.
12685
12686 * src/derives.c (derives_compute): Change type of local var from
12687 int to rule_number.
12688 * src/gram.c (grammar_rules_partial_print): Likewise.
12689 * src/print.c (print_core): Likewise.
12690 * src/reduce.c (reduce_grammar_tables): Likewise.
12691
12692 * src/gram.c (grammar_dump): Change name of item_number *
12693 local var from r to rp.
12694 * src/nullable.c (nullable_compute): Likewise.
12695
12696 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
12697
12698 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
12699 for symbol or symbol_number var.
12700 * src/reader.c (grammar_start_symbol_set): Likewise.
12701 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
12702 Likewise.
12703 * src/state.c (transitions_to): Likewise.
12704 * src/state.h: Likewise.
12705 * src/tables.c (symbol_number_to_vector_number): Likewise.
12706
12707 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
12708 char * var.
12709
12710 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
12711 var.
12712
12713 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
12714 var.
12715
12716 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
12717 Use str, not s, for char * var. Use ch, not c, for character var.
12718 Use size for size var.
12719
12720 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
12721 char * var.
12722 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
12723 uniqstr var.
12724 * src/uniqstr.h: Likewise.
12725
12726 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
12727 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
12728 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
12729 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
12730 param to have same name as that of enum, so that we don't use
12731 "s" to stand for a non-state.
12732
12733 2003-02-02 Akim Demaille <akim@epita.fr>
12734
12735 * src/scan-skel.l: Scan more than one inert character per yylex
12736 invocation.
12737
12738 2003-02-01 Paul Eggert <eggert@twinsun.com>
12739
12740 Version 1.875a.
12741
12742 * po/LINGUAS: Add ms.
12743
12744 2003-01-30 Akim Demaille <akim@epita.fr>
12745
12746 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
12747
12748 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12749
12750 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
12751 of $1.
12752
12753 Changes in response to error report by S. Eken: GLR mode does not
12754 handle negative $ indices or $ indices in embedded rules correctly.
12755 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
12756
12757 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
12758 (b4_rhs_location): Ditto.
12759 (yyfill): New function to copy from stack tree into array
12760 incrementally.
12761 (yyuserAction): Modify to allow incremental move of semantic values
12762 to rhs array when in GLR mode.
12763 Define YYFILL to use in user-defined actions to fill semantic array
12764 as needed.
12765 Remove dummy use of yystack, as there is now a guaranteed use.
12766 (yydoAction): Modify to allow incremental move of semantic values
12767 to rhs array when in GLR mode.
12768 (yyresolveAction): Ditto.
12769 (yyglrShiftDefer): Update comment.
12770 (yyresolveStates): Use X == NULL for pointers, not !X.
12771 (yyglrReduce): Ditto.
12772 (yydoAction): Ditto
12773
12774 * tests/glr-regr1.at: Rename to ...
12775 * tests/glr-regression.at: Add new regression test for the problems
12776 described above (adapted from S. Eken).
12777 Update copyright notice.
12778 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
12779 * tests/Makefile.am: Ditto.
12780
12781 2003-01-28 Paul Eggert <eggert@twinsun.com>
12782
12783 * data/lalr1.cc: Do not use @output_header_name@ unless
12784 b4_defines_flag is set. This fixes two bugs reported by
12785 Tim Van Holder in
12786 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
12787 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
12788
12789 2003-01-21 Paul Eggert <eggert@twinsun.com>
12790
12791 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
12792 we don't need to worry about yyerrlab1 being reported as an
12793 "unused label" by non-GCC C compilers. The downside is that if
12794 locations are used then a couple of statements are duplicated each
12795 time YYERROR is invoked, but the upside is that the warnings
12796 should vanish.
12797 (yyerrlab1): Move code to YERROR.
12798 (yyerrlab2): Remove. Change uses back to yyerrlab1.
12799 This reverts some of the 2002-12-27 change.
12800
12801 2003-01-17 Paul Eggert <eggert@twinsun.com>
12802
12803 * src/output.c (symbol_printers_output): Fix typo that led
12804 to core dump. Problem reported by Antonio Rus in
12805 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
12806
12807 2003-01-13 Akim Demaille <akim@epita.fr>,
12808 Quoc Peyrot <chojin@lrde.epita.fr>,
12809 Robert Anisko <anisko_r@lrde.epita.fr>
12810
12811 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
12812 when the stacks contain one element, as the loop would otherwise
12813 free the last state, and then use the top state (the one we just
12814 popped). This means that the initial elements will not be freed
12815 explicitly, as is the case in yacc.c; it is not a problem, as
12816 these elements have fake values.
12817
12818 2003-01-11 Paul Eggert <eggert@twinsun.com>
12819
12820 * NEWS: %expect-violations are now just warnings, reverting
12821 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
12822 bootstrapping problem reported by Matthias Klose; see
12823 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
12824 * src/conflicts.c (conflicts_print): Likewise.
12825 * tests/conflicts.at (%expect not enough, %expect too much,
12826 %expect with reduce conflicts): Likewise.
12827 * doc/bison.texinfo (Expect Decl): Document this. Also mention
12828 that the warning is enabled if the number of conflicts changes
12829 (not necessarily increases).
12830
12831 * src/getargs.c (version): Update copyright year.
12832
12833 2003-01-09 Akim Demaille <akim@epita.fr>
12834
12835 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
12836
12837 2003-01-08 Paul Eggert <eggert@twinsun.com>
12838
12839 * Makefile.maint (WGETFLAGS):
12840 New macro, containing "-C off" to disable proxy caches.
12841 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
12842 (rel-check): Use $(WGET) instead of wget.
12843
12844 2003-01-06 Paul Eggert <eggert@twinsun.com>
12845
12846 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
12847 the GLR paper of Scott, Johnstone and Hussain.
12848
12849 2003-01-04 Paul Eggert <eggert@twinsun.com>
12850
12851 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
12852 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
12853 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
12854 (EXTRA_LIBRARIES): New var, for liby.a.
12855 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
12856 (EXTRA_SCRIPTS): New var, for yacc.
12857
12858 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
12859 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
12860 Problem reported by Nelson H. F. Beebe.
12861
12862 2003-01-03 Paul Eggert <eggert@twinsun.com>
12863
12864 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
12865 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
12866 when compiling Bison 1.875's `bitset bset = obstack_alloc
12867 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
12868
12869 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
12870 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
12871 grow to a huge size with typical invocation.
12872
12873 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
12874 Use the pattern recommended by Autoconf 2.57, except also protect
12875 against double-definition.
12876 * src/system.h: Likewise.
12877 Portability issues reported by Nelson H. F. Beebe.
12878
12879 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
12880 All uses changed. Provide a definition in both C and C++.
12881 (yytrue, yyfalse): Define even if defined (__cplusplus).
12882
12883 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
12884 Reported by Nelson H. F. Beebe.
12885
12886 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
12887
12888 2003-01-02 Paul Eggert <eggert@twinsun.com>
12889
12890 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
12891 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
12892 Bug reported by Nelson H. F. Beebe.
12893
12894 2003-01-01 Paul Eggert <eggert@twinsun.com>
12895
12896 * Version 1.875.
12897
12898 2002-12-30 Paul Eggert <eggert@twinsun.com>
12899
12900 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
12901 Moved here from...
12902 (<INITIAL>","): Here. This causes stray "," to be treated
12903 more uniformly.
12904
12905 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
12906 last brace in braced code when not in Yacc mode, for compatibility
12907 with Bison 1.35. This resurrects the 2001-12-15 patch to
12908 src/reader.c.
12909
12910 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
12911 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
12912
12913 2002-12-28 Paul Eggert <eggert@twinsun.com>
12914
12915 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
12916 that of SYM's type. This fixes Debian bug 168069, reported by
12917 Thomas Olsson.
12918
12919 2002-12-28 Paul Eggert <eggert@twinsun.com>
12920
12921 Version 1.75f.
12922
12923 Switch back to the Yacc style of conflict reports, undoing some
12924 of the 2002-07-30 change.
12925 * doc/bison.texinfo (Understanding): Use Yacc style for
12926 conflict reports. Also, use new way of locating rules.
12927 * src/conflicts.c (conflict_report):
12928 Renamed from conflict_report_yacc, removing the old
12929 'conflict_report'. Translate the entire conflict report at once,
12930 so that we don't assume that "," has the same interpretation in
12931 all languages.
12932 (conflicts_output): Use Yacc-style conflict report for each state,
12933 instead of our more-complicated style.
12934 (conflicts_print): Use Yacc-style conflict report, except print
12935 the input file name when not emulating Yacc.
12936 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
12937 Conflicted Reduction, %expect not enough, %expect too much,
12938 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
12939 * tests/existing.at (GNU Cim Grammar): Likewise.
12940 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
12941
12942 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
12943 fatal): Don't invoke fflush; it's not needed and it might even be
12944 harmful for stdout, as stdout might not be open.
12945 * src/reduce.c (reduce_print): Likewise.
12946
12947 2002-12-27 Paul Eggert <eggert@twinsun.com>
12948
12949 Fix a bug where error locations were not being recorded correctly.
12950 This problem was originally reported by Paul Hilfinger in
12951 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
12952
12953 * data/yacc.c (yyparse): New local var yylerrsp, to record the
12954 top of the location stack's error locations.
12955 (yyerrlab): Set it. When discarding a token, push its location
12956 onto yylerrsp so that we don't lose track of the error's end.
12957 (yyerrlab1): Now is only the target of YYERROR, so that we can
12958 properly record the location of the action that failed. For GCC
12959 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
12960 GCC warning about yyerrlab1 being unused if YYERROR is unused.
12961 (yyerrlab2): New label, which yyerrlab now falls through to.
12962 Compute the error's location by applying YYLLOC_DEFAULT to
12963 the locations of all the symbols that went into the error.
12964 * doc/bison.texinfo (Location Default Action): Mention that
12965 YYLLOC_DEFAULT is also invoked for syntax errors.
12966 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
12967 Error locations include the locations of all the tokens that were
12968 discarded, not just the last token.
12969
12970 2002-12-26 Paul Eggert <eggert@twinsun.com>
12971
12972 * src/files.c: Include quote.h.
12973 (compute_output_file_names): Warn if we detect conflicting
12974 outputs to the same file. This should catch the misunderstanding
12975 exemplified by Debian Bug 165349, reported by Bruce Stephens..
12976
12977 * src/conflicts.c (conflicts_print): If the user specifies
12978 "%expect N", report an error if there are any reduce/reduce
12979 conflicts. This is what the manual says should happen.
12980 This fixes Debian bug 130890, reported by Anthony DeRobertis.
12981 * tests/conflicts.at (%expect with reduce conflicts): New test.
12982
12983 Don't use m4_include on relative file names, as it doesn't work as
12984 desired if there happens to be a file with that name under ".".
12985
12986 * m4sugar/version.m4: Remove; it was included but it wasn't used.
12987 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
12988 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
12989 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
12990 * src/output.c (output_skeleton): Use full path names when
12991 specifying a file to include; don't rely on include path, as
12992 it's unreliable when the working file contains a file with
12993 that name.
12994
12995 2002-12-25 Paul Eggert <eggert@twinsun.com>
12996
12997 Remove obsolete references to bison.simple and bison.hairy.
12998 Problem mentioned by Aubin Mahe in
12999 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
13000 * data/glr.c: Comment fix.
13001 * doc/bison.1: Remove references. Also, mention "yacc".
13002
13003 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
13004 with -g option.
13005
13006 * src/parse-gram.y (declaration): Use enum "report_states" rather
13007 than its numeric value 1.
13008
13009 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
13010 opening a new one. This fixes Debian bug 165349, reported by
13011 Bruce Stephens.
13012
13013 2002-12-24 Paul Eggert <eggert@twinsun.com>
13014
13015 Version 1.75e.
13016
13017 * Makefile.maint (cvs-update): Don't assume that the shell
13018 supports $(...), as Solaris sh doesn't.
13019
13020 * src/parse-gram.y (lloc_default): Remove test for empty
13021 nonterminals at the end, since it didn't change the result.
13022
13023 2002-12-24 Paul Eggert <eggert@twinsun.com>
13024
13025 If the user does not define YYSTYPE as a macro, Bison now declares it
13026 using typedef instead of defining it as a macro. POSIX requires this.
13027 For consistency, YYLTYPE is also declared instead of defined.
13028
13029 %union directives can now have a tag before the `{', e.g., the
13030 directive `%union foo {...}' now generates the C code
13031 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
13032 The default union tag is `YYSTYPE', for compatibility with Solaris 9
13033 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
13034 instead of `yyltype'.
13035
13036 `yystype' and `yyltype' are now obsolescent macros instead of being
13037 typedefs or tags; they are no longer documented and will be
13038 withdrawn in a future release.
13039
13040 * data/glr.c (b4_location_type): Remove.
13041 (YYSTYPE): Renamed from yystype.
13042 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
13043 (struct YYLTYPE): Renamed from struct yyltype.
13044 (YYLTYPE): Renamed from yyltype.
13045 (yyltype, yystype): New (and obsolescent) macros,
13046 for backward compatibility.
13047 * data/yacc.c: Likewise.
13048
13049 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
13050 does not specify a union tag. This is for compatibility with
13051 Solaris 9 yacc.
13052
13053 * src/parse-gram.y (add_param): 2nd arg is now char * not char
13054 const *, since it is now modified by stripping surrounding { }.
13055 (current_braced_code): Remove.
13056 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
13057 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
13058 trailing " {...}". Now of type <chars>.
13059 (grammar_declaration): Adjust to bundled tokens.
13060 (code_content): Remove; stripping is now done by add_param.
13061 (print_token_value): Print contents of bundled tokens.
13062 (token_name): New function.
13063
13064 * src/reader.h (braced_code, current_braced_code): Remove.
13065 (token_name): New decl.
13066
13067 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
13068 token_type, not braced_code code_kind. All uses changed.
13069 (SC_PRE_CODE): New state, for scanning after a keyword that
13070 has (or usually has) an immediately-following braced code.
13071 (token_type): New local var, to keep track of which token type
13072 to return when scanning braced code.
13073 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
13074 <INITIAL>"%parse-param", <INITIAL>"%printer",
13075 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
13076 instead of returning a token type immediately.
13077 (<INITIAL>"{"): Set token type.
13078 (<SC_BRACED_CODE>"}"): Use it.
13079 (handle_action_dollar, handle_action_at): Now returns bool
13080 indicating success. Fail if ! current_rule; this prevents a core dump.
13081 (handle_symbol_code_dollar, handle_symbol_code_at):
13082 Remove; merge body into caller.
13083 (handle_dollar, handle_at): Complain in invalid contexts.
13084
13085 * NEWS, doc/bison.texinfo: Document the above.
13086 * NEWS: Fix years and program names in copyright notice.
13087
13088 2002-12-17 Paul Eggert <eggert@twinsun.com>
13089
13090 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
13091 Reporting, Table of Symbols): Omit mentions of %lex-param and
13092 %parse-param from the documentation for now.
13093
13094 2002-12-15 Paul Eggert <eggert@twinsun.com>
13095
13096 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
13097 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
13098 lookahead symbol, and which sets yychar in parser actions) and it
13099 disagreed with the Bison documentation. Bug
13100 reported by Andrew Walrond.
13101
13102 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
13103 as the caller now does that.
13104 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
13105 (YYEMPTY): Parenthesize right hand side, since others use it.
13106 (yyparse): Don't assume that our generated code is the only code
13107 that sets yychar.
13108
13109 2002-12-13 Paul Eggert <eggert@twinsun.com>
13110
13111 Version 1.75d.
13112
13113 POSIX requires a "yacc" command.
13114 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
13115 (MOSTLYCLEANFILES): Add yacc.
13116 (yacc): New rule.
13117 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
13118 as an alias for bison y.
13119
13120 * po/LINGUAS: Add da.
13121
13122 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
13123 problem with latest <getopt.h>.
13124 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
13125
13126 * doc/fdl.texi: Upgrade to 1.2.
13127 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
13128 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
13129 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
13130 gnulib.
13131 * config/install-sh: Sync with autotools.
13132
13133 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
13134 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
13135 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
13136 locations are requested.
13137 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
13138 locations are requested.
13139
13140 2002-12-12 Paul Eggert <eggert@twinsun.com>
13141
13142 Remove unportable casts and storage allocation tricks.
13143 While we're at it, remove almost all casts, since they
13144 usually aren't needed and are a sign of trouble.
13145
13146 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
13147
13148 * src/derives.c (derives_compute): Do not subtract NTOKENS from
13149 the pointer DSET returned by malloc; this isn't portable.
13150 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
13151 Similarly for DERIVES.
13152 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
13153 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
13154 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
13155
13156 * src/derives.c (derives_compute): Do not bother invoking
13157 int_of_rule_number, since rule numbers are integers.
13158
13159 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
13160 rather than XMALLOC (char, N).
13161
13162 * src/files.c (filename_split): Rewrite to avoid cast.
13163
13164 * src/gram.h (symbol_number_as_item_number,
13165 item_number_as_symbol_number, rule_number_as_item_number,
13166 item_number_as_rule_number):
13167 Now inline functions rather than macros, to avoid casts.
13168 * src/state.h (state_number_as_int): Likewise.
13169 * src/tables.c (state_number_to_vector_number,
13170 symbol_number_to_vector_number): Likewise.
13171
13172 * src/gram.h (int_of_rule_number): Remove; no longer used.
13173
13174 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
13175 since the resulting storage is always stored into.
13176
13177 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
13178 where it's needed.
13179
13180 * src/muscle_tab.c (muscle_m4_output):
13181 Now inline. Return bool, not int.
13182 * src/state.c (state_compare): Likewise.
13183 * src/symtab.c (symbol_check_defined,
13184 symbol_check_alias_consistency, symbol_pack, symbol_translation,
13185 hash_compare_symbol, hash_symbol):
13186 Likewise.
13187 * src/uniqstr.c (uniqstr_print): Likewise.
13188 * src/muscle_tab.c (muscle_m4_output_processor):
13189 New function, to avoid casts.
13190 * src/state.c (state_comparator, stage_hasher): Likewise.
13191 * src/symtab.c (symbol_check_defined_processor,
13192 symbol_check_alias_consistency_processor, symbol_pack_processor,
13193 symbol_translation_processor, hash_symbol_comparator,
13194 hash_symbol_hasher): Likewise.
13195 * src/uniqstr.c (uniqstr_print_processor): Likewise.
13196 * src/muscle_tab.c (muscles_m4_output):
13197 Use new functions instead of casting old functions unportably.
13198 * src/state.c (state_hash_new): Likewise.
13199 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
13200 symbols_token_translations_init):
13201 Likewise.
13202 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
13203
13204 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
13205 var instead of casting to long, to avoid casts.
13206 (prepare_states): Use MALLOC rather than alloca, so that we don't
13207 have to worry about alloca.
13208 * src/state.c (state_hash_lookup): Likewise.
13209
13210 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
13211 local var instead of casting to unsigned char, to avoid casts.
13212
13213 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
13214 STATE_ALLOC): Remove.
13215 (transitions_new, errs_new, reductions_new, state_new): Use malloc
13216 rather than calloc, and use offsetof to avoid allocating slightly
13217 too much storage.
13218 (state_new): Initialize all members.
13219
13220 * src/state.c (state_hash): Use unsigned accumulator, not signed.
13221
13222 * src/symtab.c (symbol_free): Remove; unused.
13223 (symbol_get): Remove cast in lhs of assignment.
13224 (symbols_do): Now static. Accept generic arguments, not
13225 hashing-related ones.
13226
13227 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
13228 (symbol_processor): Remove.
13229 (symbols_do): Remove decl; now static.
13230
13231 * src/system.h (alloca): Remove; decl no longer needed.
13232 (<stddef.h>): Include, for offsetof.
13233 (<inttypes.>, <stdint.h>): Include if available.
13234 (uintptr_t): New type, if system lacks it.
13235 (CALLOC, MALLOC, REALLOC): New macros.
13236 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
13237 new macros.
13238
13239 * src/tables.c (table_size): Now int, to pacify GCC.
13240 (table_grow, table_ninf_remap): Use signed table size.
13241 (save_row): Don't bother initializing locals when not needed.
13242 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
13243 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
13244
13245 * src/vcg.h: Correct misspellings.
13246
13247 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
13248
13249
13250 * src/getargs.c (getargs): Don't assume EOF == -1.
13251
13252 2002-12-09 Paul Eggert <eggert@twinsun.com>
13253
13254 Change identifier spellings to avoid collisions with names
13255 that are reserved by POSIX.
13256
13257 Don't use names ending in _t, since POSIX reserves them.
13258 For consistency, remove _e and _s endings -- they're weren't
13259 needed to remove ambiguity. All uses changed.
13260 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
13261 turn was just renamed from struniq_t.
13262 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
13263 which in turn was just renamed from struniq_processor_t.
13264 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
13265 in turn was renamed from hash_compare_struniq_t.
13266 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
13267 (state_list): Renamed from state_list_t.
13268 * src/assoc.h (assoc): Renamed from assoc_t.
13269 * src/conflicts.c (enum conflict_resolution): Renamed from
13270 enum conflict_resolution_e.
13271 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
13272 (rule_list): Renamed from rule_list_t.
13273 * src/getargs.h (enum trace): Renamed from enum trace_e.
13274 (enum report): Renamed from enum report_e.
13275 * src/gram.h (item_number): Renamed from item_number_t.
13276 (rule_number): Renamed from rule_number_t.
13277 (struct rule_s): Remove the "rule_s" part; not used.
13278 (rule): Renamed from rule_t.
13279 (rule_filter): Renamed from rule_filter_t.
13280 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
13281 (goto_list): Renamed from goto_list_t.
13282 * src/lalr.h (goto_number): Renamed from goto_number_t.
13283 * src/location.h (location): Renamed from location_t.
13284 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
13285 and moved here from:
13286 * src/muscle_tab.h (muscle_entry_t): here.
13287 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
13288 (rule_list): Renamed from rule_list_t.
13289 * src/print_graph.c (static_graph): Renamed from graph.
13290 * src/reader.h (braced_code): Renamed from braced_code_t.
13291 Remove brace_code_e tag.
13292 * src/relation.h (relation_node): Renamed from relation_node_t.
13293 (relation_nodes): Renamed from relation_nodes_t.
13294 (relation): Renamed from relation_t.
13295 * src/state.h (state_number): Renamed from state_number_t.
13296 (struct state): Renamed from struct state_s.
13297 (state): Renamed from state_t.
13298 (transitions): Renamed from transitions_t. Unused (and
13299 misspelled) transtion_s tag removed.
13300 (errs): Renamed from errs_t. Unused errs_s tag removed.
13301 (reductions): Renamed from reductions_t. Unused tag
13302 reductions_s removed.
13303 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
13304 (struct symbol_list): Renamed from struct symbol_list_s.
13305 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
13306 (struct symbol): Renamed from struct symbol_s.
13307 (symbol): Renamed from symbol_t.
13308 * src/tables.c (vector_number): Renamed from vector_number_t.
13309 (action_number): Renamed from action_t.
13310 * src/tables.h (base_number): Renamed from base_t.
13311 * src/vcg.h (enum color): Renamed from enum color_e.
13312 (enum textmode): Renamed from enum textmode_e.
13313 (enum shape): Renamed from enum shape_e.
13314 (struct colorentry): Renamed from struct colorentry_s.
13315 (struct classname): Renamed from struct classname_s.
13316 (struct infoname): Renamed from struct infoname_s.
13317 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
13318 (enum decision): Renamed from enum decision_e.
13319 (enum orientation): Renamed from enum orientation_e.
13320 (enum alignment): Renamed from enum alignment_e.
13321 (enum arrow_mode): Renamed from enum arrow_mode_e.
13322 (enum crossing_type): Renamed from enum crossing_type_e.
13323 (enum view): Renamed from enum view_e.
13324 (struct node): Renamed from struct node_s.
13325 (node): Renamed from node_t.
13326 (enum linestyle): Renamed from enum linestyle_e.
13327 (enum arrowstyle): Renamed from enum arrowstyle_e.
13328 (struct edge): Renamed from struct edge.
13329 (edge): Renamed from edge_t.
13330 (struct graph): Renamed from struct graph_s.
13331 (graph): Renamed from graph_t.
13332 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
13333 Rename value_t -> value.
13334 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
13335 value_t_as_yystype -> value_as_yystype.
13336
13337 Don't include <errno.h> in the mainstream code, since it
13338 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
13339 * lib/get-errno.c, lib/get-errno.h: New files.
13340 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
13341 get-errno.c.
13342 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
13343 * src/output.c (output_skeleton): Likewise.
13344 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
13345 instead of errno.
13346 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
13347 Likewise.
13348 (handle_action_dollar, handle_action_at): Likewise.
13349 * src/system.h: Do not include <errno.h>.
13350 (TAB_EXT): Renamed from EXT_TAB.
13351 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
13352
13353 Avoid str[a-z]*, since <string.h> reserves that name space.
13354 Change all instances of "struniq" in names to "uniqstr", and
13355 likewise for "STRUNIQ" and "UNIQSTR".
13356 * src/uniqstr.c: Renamed from src/struniq.c.
13357 * src/uniqstr.h: Renamed from src/struniq.h.
13358 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
13359 * src/files.c (strsuffix): Remove; unused.
13360 (concat2): Renamed from stringappend. Now static.
13361 * src/files.h (strsuffix, stringappend): Remove; unused.
13362 * src/parse-gram.y (<chars>): Renamed from <string>.
13363 (<uniqstr>): Renamed from <struniq>.
13364 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
13365 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
13366 (struct graph_s.expand): Renamed from struct graph_s.stretch.
13367 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
13368 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
13369 (N_EXPAND): Renamed from N_STRETCH.
13370
13371 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
13372 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
13373 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
13374 Remove; unused.
13375 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
13376 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
13377 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
13378 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
13379 (BASE_MAXIMUM): Renamed from BASE_MAX.
13380 (BASE_MINIMUM): Renamed from BASE_MIN.
13381 (ACTION_MAX): Remove; unused.
13382 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
13383 Unnecessary casts removed from above defines.
13384
13385
13386 Fix misspelling in names.
13387 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
13388 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
13389 G_NODE_ALIGNEMENT.
13390
13391
13392 * lib/timevar.c (timevar_report): Renamed from time_report,
13393 for consistency with other names.
13394 * lib/timevar.h (timevar_report): New decl.
13395 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
13396
13397
13398 Sort include-file uses.
13399
13400 Reorder all include files under src to be in the order "system.h".
13401 then the ../lib include files in angle brackets (alphabetized),
13402 then the . include files in double-quotes (alphabetized). Fix
13403 dependency breakages encountered in this process, as follows:
13404 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
13405 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
13406 * src/state.h: Include "symtab.h".
13407
13408 2002-12-08 Paul Eggert <eggert@twinsun.com>
13409
13410 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
13411 since this causes problems when __file__ contains character
13412 sequences like "@" that are treated specially by src/scan-skel.l.
13413 Instead, just use the file's basename. This fixes the bug
13414 reported by Martin Mokrejs in
13415 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
13416
13417 2002-12-06 Paul Eggert <eggert@twinsun.com>
13418
13419 Add support for rules that do not have trailing semicolons, as
13420 POSIX requires. Improve the quality of locations in Bison
13421 diagnostics.
13422
13423 * src/location.c: Include <quotearg.h>.
13424 (empty_location): Now const.
13425 (location_print): New function. Follow the recommendation of the
13426 GNU Coding Standards for locations that span file boundaries.
13427 * src/location.h: Do not include <quotearg.h>; no longer needed.
13428 (boundary): New type.
13429 (location_t): Use it. This allows locations to span file boundaries.
13430 All member uses changed: file -> start.file or end.file (as needed),
13431 first_line -> start.line, first_column -> start.column,
13432 last_line -> end.line, last_column -> end.column.
13433 (equal_boundaries): New function.
13434 (LOCATION_RESET, LOCATION_STEP): Remove.
13435 (LOCATION_PRINT): Remove. All callers changed to use location_print.
13436 (empty_location): Now const.
13437 (location_print): New decl.
13438 * src/parse-gram.y (lloc_default): New function, which handles
13439 empty locations more accurately.
13440 (YYLLOC_DEFAULT): Use it.
13441 (%token COLON): Remove.
13442 (%token ID_COLON): New token.
13443 (rules): Use it.
13444 (declarations, rules): Remove trailing semicolon.
13445 (declaration, rules_or_grammar_declaration):
13446 Allow empty (";") declaration.
13447 (symbol_def): Remove empty actions; no longer needed.
13448 (rules_or_grammar_declaration): Remove trailing semicolon.
13449 (semi_colon.opt): Remove.
13450 * src/reader.h: Include location.h.
13451 (scanner_cursor): New decl.
13452 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
13453 rolling our own.
13454 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
13455 of *loc.
13456 (STEP): Remove. No longer needed, now that adjust_location does
13457 the work. All uses removed.
13458 (scanner_cursor): New var.
13459 (adjust_location): Renamed from extend_location. It now sets
13460 *loc and adjusts the scanner cursor. All uses changed.
13461 Don't bother testing for CR.
13462 (handle_syncline): Remove location arg; now updates scanner cursor.
13463 All callers changed.
13464 (unexpected_end_of_file): Now accepts start boundary of token or
13465 comment, not location. All callers changed. Update scanner cursor,
13466 not the location.
13467 (SC_AFTER_IDENTIFIER): New state.
13468 (context_state): Renamed from c_context. All uses changed.
13469 (id_loc, code_start, token_start): New local vars.
13470 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
13471 processing of Yacc white space and equivalents here.
13472 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
13473 instead of returning ID immediately, since we need to search for
13474 a subsequent colon.
13475 (<INITIAL>"'", "\""): Save token_start.
13476 (<INITIAL>"%{", "{", "%%"): Save code_start.
13477 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
13478 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
13479 BEGIN context_state at end, not INITIAL.
13480 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
13481 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
13482 Return correct token start.
13483 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
13484 the start of a character, string or multiline comment is found.
13485 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
13486 Reduction): Adjust reported locations to match the more-precise
13487 results now expected.
13488 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
13489 * tests/reduce.at (Useless Rules, Reduced Automaton,
13490 Underivable Rules): Likewise.
13491 * tests/regression.at (Invalid inputs): No longer `expecting ";"
13492 or "|"' now that so many other tokens are allowed by the new grammar.
13493
13494 * src/complain.h (current_file): Remove duplicate decl;
13495 current_file is now owned by files.h.
13496 * src/complain.c, src/scan-gram.l: Include files.h.
13497
13498 2002-12-06 Paul Eggert <eggert@twinsun.com>
13499
13500 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
13501 promotes to int; it might be unsigned int.
13502 * data/yacc.c (yy_reduce_print): Likewise.
13503
13504 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
13505 be #defined in the prologue, not in the Bison declarations.
13506 This fixes Debian Bug 102878, reported by Shaul Karl.
13507
13508 2002-12-02 Paul Eggert <eggert@twinsun.com>
13509
13510 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
13511 * lib/strtoul.c: New file, from gnulib.
13512 This fixes a porting bug reported by Peter Klein in
13513 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
13514
13515 2002-11-30 Paul Eggert <eggert@twinsun.com>
13516
13517 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
13518 and put only a forward declaration in the prologue. This is for
13519 consistency with the other scanner helper functions.
13520
13521 Type clashes now generate warnings, not errors, since it
13522 appears that POSIX may allow some grammars with type clashes.
13523 * src/reader.c (grammar_current_rule_check): Warn about
13524 type clashes instead of complaining.
13525 * tests/input.at (Type Clashes): Expect warnings, not complaints.
13526
13527 Add Yacc library, since POSIX requires it.
13528 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
13529 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
13530 * lib/main.c, lib/yyerror.c: New files.
13531
13532 gram_error can be static; it need not be extern.
13533 * src/reader.h (gram_error): Remove decl.
13534 * src/parse-gram.y (gram_error): Now static. Add static decl.
13535 (print_token_value): Omit parameter names from forward decl,
13536 for consistency.
13537
13538 2002-11-29 Paul Eggert <eggert@twinsun.com>
13539
13540 * doc/bison.texinfo: Emphasize that yylex and yyerror must
13541 be declared before being used. E.g., one should typically
13542 declare them in the prologue. Use GNU coding style in examples.
13543 Put "const" consistently after the type it modifies. Mention
13544 that C99 supports "inline". Mention that yyerror traditionally
13545 returns "int".
13546
13547 %parse-param and %lex-param now take just one argument, the
13548 declaration; the argument name is deduced from the declaration.
13549
13550 * doc/bison.texinfo (Parser Function, Pure Calling, Error
13551 Reporting, Table of Symbols): Document this.
13552 * src/parse-gram.y (add_param): New function.
13553 (COMMA): Remove.
13554 (declaration): Implement new rule for %parse-param and %lex-param.
13555 * src/scan-gram.l: "," now elicits a warning, rather than being
13556 a token; this is more compatible with byacc.
13557 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
13558
13559 2002-11-27 Paul Eggert <eggert@twinsun.com>
13560
13561 Rename identifiers to avoid real and potential collisions.
13562
13563 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
13564 to avoid collision with lex macro described by Bruce Lilly in
13565 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
13566 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
13567 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
13568 * src/parse-gram.y (print_token_value): Renamed from yyprint.
13569 All uses changed.
13570 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
13571 The name "yycontrol" violates the name space rules, and this stuff
13572 wasn't being used anyway.
13573 (input): Remove action; this stuff wasn't being used.
13574 (gram_error): Rename local variable yylloc -> loc.
13575 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
13576 (YY_DECL): Don't use "yy" at start of local variables.
13577 All uses changed, e.g., yylloc -> loc.
13578 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
13579 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
13580 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
13581 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
13582
13583 * src/parse-gram.y (gram_error): loc is now const *.
13584 * src/reader.h (gram_error): Likewise.
13585
13586 2002-11-24 Paul Eggert <eggert@twinsun.com>
13587
13588 Version 1.75c.
13589
13590 * tests/actions.at (Actions after errors): Use an output format
13591 more similar to that of the Printers and Destructors test.
13592 Test the position of the ';' token too.
13593 (Printers and Destructors): Likewise.
13594 (Printers and Destructors: %glr-parser): Remove for now, to avoid
13595 unnecessarily alarming people when the test fails.
13596
13597 * data/yacc.c (yyerrlab1): Move this label down, so that the
13598 parser does not discard the lookahead token if the user code
13599 invokes YYERROR. This change is required for POSIX conformance.
13600
13601 * lib/error.c: Sync with gnulib.
13602
13603 2002-11-22 Paul Eggert <eggert@twinsun.com>
13604
13605 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
13606 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
13607 * lib/xmalloc.c: Likewise.
13608
13609 2002-11-20 Paul Eggert <eggert@twinsun.com>
13610
13611 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
13612
13613 2002-11-20 Paul Eggert <eggert@twinsun.com>
13614
13615 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
13616 should use `if (! x) abort ();' rather than `assert (x);', and
13617 anyway it's one less thing to worry about configuring.
13618
13619 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
13620 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
13621 and replace all instances of assert with abort.
13622 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
13623 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
13624
13625 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
13626 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
13627 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
13628 hash_find_entry, hash_rehash, hash_insert): Likewise.
13629 * src/conflicts.c (resolve_sr_conflict): Likewise.
13630 * src/lalr.c (set_goto_map, map_goto): Likewise.
13631 * src/nullable.c (nullable_compute): Likewise.
13632 * src/output.c (prepare_rules, token_definitions_output): Likewise.
13633 * src/reader.c (packgram, reader): Likewise.
13634 * src/state.c (state_new, state_free, state_transitions_set,
13635 state_reduction_find): Likewise.
13636 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
13637 symbol_pack): Likewise.
13638 * src/tables.c (conflict_row, pack_vector): Likewise.
13639 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
13640 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
13641 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
13642 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
13643
13644 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
13645 (ARGMATCH_CONSTRAINT): New macro.
13646 (ARGMATCH_ASSERT): Use it.
13647
13648 * src/system.h (verify): New macro.
13649 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
13650 rather than assert.
13651 * src/tables.c (tables_generate): Likewise.
13652
13653 * src/struniq.c (struniq_assert): Now returns void, and aborts
13654 if the assertion is false.
13655 (struniq_assert_p): Remove.
13656 * src/struniq.h: Likewise.
13657
13658 2002-11-18 Paul Eggert <eggert@twinsun.com>
13659
13660 * data/glr.c (yygetLRActions): Replace `yyindex' with
13661 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
13662 This fixes the regression with Sun ONE Studio 7 cc that I reported in
13663 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
13664
13665 2002-11-18 Akim Demaille <akim@epita.fr>
13666
13667 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
13668 space.
13669 From Tim Van Holder.
13670
13671 2002-11-17 Paul Eggert <eggert@twinsun.com>
13672
13673 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
13674 to "SyntaxError" for consistency with my 2002-11-15 change.
13675
13676 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
13677 not define to {}, since this breaks the common use of `YYDPRINTF
13678 ((...));' if a single statement is desired (e.g. before `else').
13679 Work around GCC warnings by surrounding corresponding calls with
13680 {} if needed.
13681 (yyhasResolvedValue): Remove unused function.
13682 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
13683 loop body.
13684 (yyreportSyntaxError): Renamed from yyreportParseError.
13685 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
13686 All uses changed.
13687 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
13688 extern when possible. Remove unused initializations.
13689
13690 2002-11-16 Akim Demaille <akim@epita.fr>
13691
13692 Augment the similarity between GLR and LALR traces.
13693
13694 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
13695 (YY_REDUCE_PRINT): New.
13696 (yyparse): Use them.
13697 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
13698 YYDPRINT here.
13699 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
13700 state reached after the reduction/recovery, since...
13701 (yyparse, yyprocessOneStack): Report the state we are entering in.
13702
13703 2002-11-16 Akim Demaille <akim@epita.fr>
13704
13705 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
13706 Add support for --trace=skeleton.
13707 * src/scan-skel.l: %option debug.
13708 Scan strings of non-@ or \n instead of character by character.
13709 (scan_skel): Handle trace_skeleton.
13710 (QPUTS): New.
13711 (@output_parser_name@, @output_header_name@): ``Restore'' their
13712 support (used to be M4 macros).
13713 * data/yacc.c: Quote larger chunks, a la glr.c.
13714 * data/lalr1.cc: Likewise.
13715 The header guards are no longer available, so use some other
13716 string than `YYLSP_NEEDED'.
13717
13718 2002-11-16 Akim Demaille <akim@epita.fr>
13719
13720 Make the ``Printers and Destructors'' test more verbose, taking
13721 `yacc.c''s behavior as (possibly wrong) reference.
13722
13723 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
13724 instead of fprint on stdout.
13725 Set and report the last_line of the symbols.
13726 Consistently display values and locations.
13727
13728 2002-11-16 Paul Eggert <eggert@twinsun.com>
13729
13730 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
13731
13732 2002-11-15 Paul Eggert <eggert@twinsun.com>
13733
13734 * tests/actions.at (Actions after errors): New test case.
13735
13736 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
13737 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
13738 tests/action.at, tests/calc.at, tests/conflicts.at,
13739 tests/cxx-type.at, tests/regression.at:
13740 "parse error" -> "syntax error" for POSIX compatibility.
13741 "parsing stack overflow..." -> "parser stack overflow" so
13742 that code matches Bison documentation.
13743
13744 2002-11-15 Akim Demaille <akim@epita.fr>
13745
13746 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
13747 take two BRACED_CODE, not two string_content.
13748 Free the scanner's obstack when we are done.
13749 (code_content): New.
13750 * tests/calc.at: Adjust.
13751 * doc/bison.texinfo: Adjust.
13752 Also, make sure to include the `,' for these declarations.
13753
13754 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
13755
13756 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
13757 definition; avoids potential autoreconf problems.
13758
13759 2002-11-15 Akim Demaille <akim@epita.fr>
13760
13761 Always check the value returned by yyparse.
13762
13763 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
13764 returned by yyparse.
13765 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
13766 Adjust calls.
13767 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
13768 returned by yyparse.
13769
13770 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13771
13772 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
13773 on input.at test.
13774
13775 2002-11-14 Paul Eggert <eggert@twinsun.com>
13776
13777 * src/output.c (output_skeleton): Call xfopen instead of
13778 duplicating xfopen's body.
13779
13780 Fix bugs reported by Nelson H. F. Beebe in
13781 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
13782
13783 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
13784 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
13785 Group compiler. Instead, use "$CC -E bar.c". Include the .h
13786 file twice in the grammar, as an extra check.
13787
13788 * tests/input.at (Torturing the Scanner): Surround the
13789 backslash-newline tests with "#if 0", to make it less likely that
13790 we'll run into compiler bugs. Bring back solitary \ inside
13791 comment, but add a closing comment to work around HP C bug. Don't
13792 test backslash-newline in C character constant.
13793
13794 2002-11-14 Akim Demaille <akim@epita.fr>
13795
13796 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
13797 status of the compiler.
13798 Calling `exit 1' is no longer needed.
13799 Reported by Nelson H. F. Beebe.
13800
13801 2002-11-14 Akim Demaille <akim@epita.fr>
13802
13803 * tests/atlocal.in (CPPFLAGS): We have config.h.
13804 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
13805 New.
13806 * tests/actions.at, tests/calc.at, tests/conflicts.at,
13807 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
13808 * tests/regression.at, tests/torture.at: Use them for all the
13809 grammars that are to be compiled.
13810 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
13811 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
13812 * doc/bison.texinfo (GLR Parsers): Document `inline'.
13813
13814 2002-11-14 Akim Demaille <akim@epita.fr>
13815
13816 * doc/bison.texinfo: Various formatting changes (alignments in
13817 samples, additional @group/@end group, GCS in samples.
13818 Use @deffn instead of simple @table to define the directives,
13819 macros, variables etc.
13820
13821 2002-11-13 Paul Eggert <eggert@twinsun.com>
13822
13823 Fix some bugs reported by Albert Chin-A-Young in
13824 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
13825
13826 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
13827 -o c"; the HP C compiler chatters during compilation.
13828 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
13829 * tests/headers.at (export YYLTYPE): Likewise.
13830
13831 * tests/input.at (Torturing the Scanner): Remove lines containing
13832 solitary backslashes, as they tickle a bug in the HP C compiler.
13833
13834 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
13835 comments, since they're not portable. Use GNU coding style.
13836
13837 2002-11-13 Akim Demaille <akim@epita.fr>
13838
13839 * data/yacc.c: Leave bigger chunks of quoted text.
13840 (YYDSYMPRINTF): New.
13841 Use it to report symbol activities.
13842 * data/glr.c (YYDSYMPRINTF): New.
13843 Use it.
13844
13845 2002-11-12 Paul Eggert <eggert@twinsun.com>
13846
13847 Version 1.75b.
13848
13849 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
13850 (yyglrReduce): Return yyok, not 0.
13851 This should avoid the enumerated-type warnings reported
13852 by Nelson H. F. Beebe in
13853 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
13854
13855 * lib/bbitset.h (BITSET_INLINE): Remove.
13856 * lib/bitset.h [! BITSET_INLINE]: Remove.
13857 (bitset_set, bitset_reset, bitset_test): Rename local vars
13858 to avoid shadowing warnings by GCC.
13859
13860 * data/glr.c (inline): Remove #define. It's the user's
13861 responsibility to #define it away, just like 'const'.
13862 This fixes one of the bugs reported by Nelson H. F. Beebe in
13863 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
13864
13865 * Makefile.maint (po-check): Scan .l and .y files instead of the
13866 .c and the .h files that they generate. This fixes the bug
13867 reported by Tim Van Holder in:
13868 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
13869 Look for N_ as well as for _. Try to avoid matching #define for
13870 N_ and _.
13871 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
13872 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
13873 * src/scan-gram.l: Revamp regular expressions so that " and '
13874 do not confuse xgettext.
13875
13876 * src/struniq.h (struniq_new): Do not declare the return type
13877 to be 'const'; this violates the C standard.
13878 * src/struniq.c (struniq_new): Likewise.
13879
13880 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
13881
13882 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
13883 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
13884 linker.
13885
13886 2002-11-12 Akim Demaille <akim@epita.fr>
13887
13888 * Makefile.maint: Sync with Autoconf:
13889 (local_updates): New.
13890
13891 2002-11-12 Akim Demaille <akim@epita.fr>
13892
13893 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
13894
13895 2002-11-12 Akim Demaille <akim@epita.fr>
13896
13897 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
13898 locations.
13899
13900 2002-11-12 Akim Demaille <akim@epita.fr>
13901
13902 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
13903 not yyvalue.
13904
13905 2002-11-12 Akim Demaille <akim@epita.fr>
13906
13907 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
13908 Use it to test the GLR parser.
13909
13910 2002-11-12 Akim Demaille <akim@epita.fr>
13911
13912 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
13913 defines it.
13914 * data/glr.c (yystos): New.
13915 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
13916 (YYDSYMPRINT): New.
13917 (yyval): Don't define it, it is handled via M4.
13918 (yyrecoverParseError): Free verbosely the discarded symbols.
13919 * data/yacc.c (yysymprint): Remove, rather...
13920 (b4_yysymprint_generate): invoke.
13921 * data/c.m4 (b4_yysymprint_generate): New.
13922 Accept pointers as arguments, as opposed to the version from
13923 yacc.c.
13924 (b4_yydestruct_generate): Likewise.
13925 * tests/cations.at (Printers and Destructors): Use Bison directives
13926 instead of CPP macros.
13927 Don't rely on internal details.
13928
13929 2002-11-12 Akim Demaille <akim@epita.fr>
13930
13931 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
13932 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
13933 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
13934 it against YYEMPTY and so forth), work on yytoken (i.e., set
13935 it to YYEMPTY etc.).
13936 (yydestruct): Replace with a b4_yydestruct_generate invocation.
13937 (b4_symbol_actions): Remove.
13938 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
13939 for 0, end-of-input.
13940
13941 2002-11-12 Akim Demaille <akim@epita.fr>
13942
13943 * doc/bison.texinfo (Destructor Decl): New.
13944
13945 2002-11-12 Akim Demaille <akim@epita.fr>
13946
13947 * src/tables.c (tables_generate): Use free for pointers that
13948 cannot be NULL, not XFREE.
13949 (pack_vector): Use assert, not fatal, for bound violations.
13950 * src/state.c (state_new): Likewise.
13951 * src/reader.c (reader): Likewise.
13952 * src/lalr.c (set_goto_map): Likewise.
13953 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
13954 the file name.
13955
13956 2002-11-12 Akim Demaille <akim@epita.fr>
13957
13958 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
13959 Restore.
13960 * src/scan-gram.l (last_string): Is global to the file, not to
13961 yylex.
13962 * src/parse-gram.y (input): Don't append the epilogue here,
13963 (epilogue.opt): do it here, and free the scanner's obstack.
13964 * src/reader.c (epilogue_set): Rename as...
13965 (epilogue_augment): this.
13966 * data/c.m4 (b4_epilogue): Defaults to empty.
13967
13968 2002-11-12 Akim Demaille <akim@epita.fr>
13969
13970 * src/getargs.c (long_options): Remove duplicates.
13971 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
13972 Remove.
13973 * doc/bison.rnh: Remove.
13974 * doc/bison.texinfo (VMS Invocation): Remove.
13975
13976 2002-11-12 Akim Demaille <akim@epita.fr>
13977
13978 * src/struniq.h, src/struniq.c (struniq_t): Is const.
13979 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
13980
13981 Use struniq for symbols.
13982
13983 * src/symtab.h (symbol_t): The tag member is a struniq.
13984 (symbol_type_set): Adjust.
13985 * src/symtab.c (symbol_new): Takes a struniq.
13986 (symbol_free): Don't free the tag member.
13987 (hash_compare_symbol_t, hash_symbol_t): Rename as...
13988 (hash_compare_symbol, hash_symbol): these.
13989 Use the fact that tags as struniqs.
13990 (symbol_get): Use struniq_new.
13991 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
13992 Returns a strniq.
13993 * src/reader.h (merger_list, grammar_currentmerge_set): The name
13994 and type members are struniqs.
13995 * src/reader.c (get_merge_function)
13996 (grammar_current_rule_merge_set): Adjust.
13997 (TYPE, current_type): Are struniq.
13998
13999 Use struniq for file names.
14000
14001 * src/files.h, src/files.c (infile): Split into...
14002 (grammar_file, current_file): these.
14003 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
14004 * src/reduce.c (reduce_print): Likewise.
14005 * src/getargs.c (getargs): Likewise.
14006 * src/complain.h, src/complain.c: Likewise.
14007 * src/main.c (main): Call struniqs_new early enough to use it for
14008 file names.
14009 Don't free the input file name.
14010
14011 2002-11-12 Akim Demaille <akim@epita.fr>
14012
14013 * src/symtab.c (symbol_free): Remove dead deactivated code:
14014 type_name are properly removed.
14015 Don't use XFREE to free items that cannot be NULL.
14016 * src/struniq.h, src/struniq.c: New.
14017 * src/main.c (main): Initialize/free struniqs.
14018 * src/parse-gram.y (%union): Add astruniq member.
14019 (yyprint): Adjust.
14020 * src/scan-gram.l (<{tag}>): Return a struniq.
14021 Free the obstack bit that used to store it.
14022 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
14023
14024 2002-11-11 Paul Eggert <eggert@twinsun.com>
14025
14026 Revamp to fix many (but not all) of the C- and M4-related quoting
14027 problems. Among other things, this fixes the Bison bug reported
14028 by Jan Hubicka when processing the Bash grammar; see:
14029 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
14030
14031 Use new @ escapes consistently. Represent brackets with @{ and @}
14032 rather than @<:@ and @:>@, since this works a bit better with dumb
14033 editors like vi. Represent @ with @@, since @ is now consistently
14034 an escape. Use @oline@ and @ofile@ rather than __oline__ and
14035 __ofile__, to avoid unexpected expansions. Similarly, use @output
14036 rather than #output.
14037
14038 * data/c.m4 (b4_copyright): Omit file name from comment, since
14039 the file name could contain "*/".
14040 (b4_synclines_flag): Don't quote the 2nd argument; it should already
14041 be quoted. All uses changed.
14042
14043 * data/glr.c: Use new @ escapes consistently.
14044 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
14045 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
14046 Remove, since they couldn't handle arbitrary characters in file
14047 names.
14048 * data/lalr1.cc: Likewise.
14049 * data/yacc.c: Likewise.
14050
14051 * src/files.c (output_infix): Remove; all uses removed.
14052 * src/files.h: Likewise.
14053
14054 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
14055 mishandled funny characters in file names, and anyway it isn't
14056 needed any more.
14057 * data/yacc.c: Likewise.
14058 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
14059
14060 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
14061 * data/yacc.c: Likewise.
14062
14063 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
14064 strings now.
14065 (muscle_init): Quote filename as a C string.
14066 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
14067 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
14068 * src/output.c (escaped_file_name_output): New function.
14069 (prepare_symbols): Quote tokens for M4.
14070 (prepare): Don't insert output_infix, output_prefix,
14071 output_parser_name, output_header_name; this is now down by scan-skel.
14072 Insert skeleton as a C string.
14073
14074 * src/output.c (user_actions_output, symbol_destructors_output,
14075 symbol_printers_output): Quote filenames for C and M4.
14076 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14077
14078 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
14079 escapes other than \\ and \'; this simplifies the code.
14080 (<SC_STRING>): Likewise, for \\ and \".
14081 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
14082 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
14083 Use new escapes @{ and @} for [ and ].
14084
14085 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
14086 them with auto vars.
14087 Switch to new escape scheme, where @ is the escape character uniformly.
14088 Abort if a stray escape character is found. Avoid unbounded input
14089 buffer when parsing non-escaped text.
14090
14091 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
14092 __oline__, #output, $@, and @{ do not have unintended meanings.
14093
14094 2002-11-09 Paul Eggert <eggert@twinsun.com>
14095
14096 Fix the test failure due to GCC warnings described in
14097 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
14098 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
14099 evaluate to 0 if it's impossible for NINF to be in the respective
14100 table.
14101 (yygetLRActions, yyrecoverParseError): Use them.
14102
14103 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
14104 counted in the token inserted at end of file. Now takes
14105 location_t *, not location_t, so that the location can be
14106 adjusted. All uses changed.
14107
14108 * tests/regression.at (Invalid inputs): Adjust wording in
14109 diagnostic to match the new behavior.
14110
14111 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
14112 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
14113 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
14114 abort ();'. This reduces the runtime of the "Many lookaheads"
14115 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
14116 GCC 3.2.
14117
14118 2002-11-07 Paul Eggert <eggert@twinsun.com>
14119
14120 * src/parse-gram.y (CHARACTER): Remove unused token.
14121 All uses removed.
14122
14123 * src/scan-gram.l: Remove stack option. We no longer use the
14124 stack, since the stack was never deeper than 1; instead, use the
14125 new auto var c_context to record the stacked value.
14126
14127 Remove nounput option. At an unexpected end of file, we now unput
14128 the minimal input necessary to end cleanly; this simplifies the
14129 code.
14130
14131 Avoid unbounded token sizes where this is easy.
14132
14133 (unexpected_end_of_file): New function.
14134 Use it to systematize the error message on unexpected EOF.
14135 (last-string): Now auto, not static.
14136 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
14137 (scanner_last_string_free): Remove; not used.
14138 (percent_percent_count): Move decl to just before use.
14139 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
14140 not the (never otherwised-used) CHARACTER.
14141
14142 2002-11-07 Akim Demaille <akim@epita.fr>
14143
14144 Let yyerror always receive the msg as last argument, so that
14145 yyerror can be variadic.
14146
14147 * data/yacc.c (b4_yyerror_args): New.
14148 Use it when calling yyerror.
14149 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
14150 Use it when calling yyerror.
14151 * doc/bison.texinfo (Error Reporting): Adjust.
14152 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
14153 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
14154
14155 2002-11-06 Akim Demaille <akim@epita.fr>
14156
14157 #line should have quoted strings.
14158 Ideally, this should be done by m4_quotearg.
14159
14160 * src/scan-skel.l: Include quotearg.h.
14161 Quote __ofile__.
14162 * src/output.c (symbol_printers_output)
14163 (symbol_destructors_output): Quote the file name.
14164
14165 2002-11-06 Akim Demaille <akim@epita.fr>
14166
14167 * tests/regression.at (Invalid inputs): Adjust to the recent
14168 messages.
14169
14170 2002-11-06 Akim Demaille <akim@epita.fr>
14171
14172 Restore --no-lines.
14173 Reported by Jim Kent.
14174
14175 * data/c.m4 (b4_syncline): New.
14176 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
14177 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
14178 * src/output.c (user_actions_output): Likewise.
14179 (prepare): Define 'b4_synclines_flag'.
14180 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
14181
14182 2002-11-06 Akim Demaille <akim@epita.fr>
14183
14184 * src/main.c (main): Free `infile'.
14185 * src/scan-gram.l (handle_syncline): New.
14186 Recognize `#line'.
14187 * src/output.c (user_actions_output, symbol_destructors_output)
14188 (symbol_printers_output): Use the location's file name, not
14189 infile.
14190 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14191
14192 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14193
14194 * src/tables.c (matching_state): Don't allow states to match if
14195 either has GLR conflict entries.
14196
14197 2002-11-05 Paul Eggert <eggert@twinsun.com>
14198
14199 * src/scan-gram.l: Use more accurate diagnostics, e.g.
14200 "integer out of range" rather than "invalid value".
14201 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
14202 accordingly.
14203
14204 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
14205 Also, remove one static variable in the scanner.
14206
14207 * src/scan-gram.l (braces_level): Now auto, not static.
14208 Initialize to zero if the compiler is being picky.
14209 (INITIAL): Clear braces_level instead of incrementing it.
14210 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
14211 as POSIX 1003.1-2001 requires.
14212 * src/system.h (IF_LINT): New macro, taken from coreutils.
14213 * configure.ac: Define "lint" if --enable-gcc-warnings.
14214
14215 2002-11-05 Akim Demaille <akim@epita.fr>
14216
14217 * src/scan-gram.l: When it starts with `%', complain about the
14218 whole directive, not just that `invalid character: %'.
14219
14220 2002-11-04 Akim Demaille <akim@epita.fr>
14221
14222 * Makefile.maint: Update from Autoconf.
14223 (update, cvs-update, po-update, do-po-update): New.
14224
14225 2002-11-04 Akim Demaille <akim@epita.fr>
14226
14227 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
14228 and yyerror.
14229 Have yyerror `use' its arguments.
14230 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
14231 returns true when location & yacc & pure & parse-param.
14232 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
14233
14234 2002-11-04 Akim Demaille <akim@epita.fr>
14235
14236 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
14237 clashes.
14238 * src/scan-gram.l: Use [\'] instead of ['] to pacify
14239 font-lock-mode.
14240 Use complain_at.
14241 Use quote, not quote_n since LOCATION_PRINT no longer uses the
14242 slot 0.
14243
14244 2002-11-03 Paul Eggert <eggert@twinsun.com>
14245
14246 * src/reader.c (get_merge_function, grammar_current_rule_check):
14247 Use consistent diagnostics for reporting type name clashes.
14248 Quote the types with <>, for consistency with Yacc.
14249 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
14250
14251 2002-11-03 Akim Demaille <akim@epita.fr>
14252
14253 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
14254 New.
14255 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
14256 (b4_parse_param): Remove.
14257 Use b4_identification.
14258 Propagate b4_pure_args where needed to pass them to yyerror.
14259 * data/glr.m4 (b4_parse_param): Remove.
14260 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
14261 (b4_lpure_formals): New.
14262 Use b4_identification.
14263 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
14264 b4_user_formals and b4_user_args.
14265 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
14266 (yyreportAmbiguity): When using a pure parser, also need
14267 the location, and the parse-params.
14268 Adjust callers.
14269 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
14270 When using a pure parser, also need the parse-params.
14271 Adjust callers.
14272 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
14273 (%pure-parser + %parse-param) LALR and GLR parsers.
14274 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
14275 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
14276 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
14277 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
14278 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
14279 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
14280 * doc/bison.texinfo: Untabify the whole file.
14281 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
14282 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
14283 (Error Reporting): Adjust to these new directives.
14284 Document %error-verbose, deprecate YYERROR_VERBOSE.
14285
14286 2002-11-03 Akim Demaille <akim@epita.fr>
14287
14288 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
14289 AT_CHECK_CALC_GLR invocations to use % directives, instead of
14290 command line options.
14291 * tests/cxx-type.at: Formatting changes.
14292
14293 2002-11-03 Paul Eggert <eggert@twinsun.com>
14294
14295 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
14296 to count columns correctly, and to check for invalid inputs.
14297
14298 Use mbsnwidth to count columns correctly. Account for tabs, too.
14299 Include mbswidth.h.
14300 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
14301 (extend_location): New function.
14302 (YY_LINES): Remove.
14303
14304 Handle CRLF in C code rather than in Lex code.
14305 (YY_INPUT): New macro.
14306 (no_cr_read): New function.
14307
14308 Scan UCNs, even though we don't fully handle them yet.
14309 (convert_ucn_to_byte): New function.
14310
14311 Handle backslash-newline correctly in C code.
14312 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
14313 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
14314 all uses changed.
14315 (tag, splice): New EREs. Do not allow NUL or newline in tags.
14316 Use {splice} wherever C allows backslash-newline.
14317 YY_STEP after space, newline, vertical-tab.
14318 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
14319
14320 (letter, id): Don't assume ASCII; e.g., spell out a-z.
14321
14322 ({int}, handle_action_dollar, handle_action_at): Check for integer
14323 overflow.
14324
14325 (YY_STEP): Omit trailing semicolon, so that it's more like C.
14326
14327 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
14328 as well as \000. Check for UCHAR_MAX, not 255.
14329 Allow \x with an arbitrary positive number of digits, as in C.
14330 Check for overflow here.
14331 Allow \? and UCNs, for compatibility with C.
14332
14333 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
14334 with quote slot used by complain_at.
14335
14336 * tests/input.at: Add tests for backslash-newline, m4 quotes
14337 in symbols, long literals, and funny escapes in strings.
14338
14339 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
14340 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
14341 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
14342 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
14343 * m4/mbswidth.m4: New file, from GNU coreutils.
14344
14345 * doc/bison.texinfo (Grammar Outline): Document // comments.
14346 (Symbols): Document that trigraphs have no special meaning in Bison,
14347 nor is backslash-newline allowed.
14348 (Actions): Document that trigraphs have no special meaning.
14349
14350 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
14351 no longer used.
14352
14353 2002-11-02 Paul Eggert <eggert@twinsun.com>
14354
14355 * src/reader.c: Don't include quote.h; not needed.
14356 (get_merge_function): Reword warning to be consistent with
14357 type clash diagnostic in grammar_current_rule_check.
14358
14359 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
14360 bug in trigraph handling.
14361
14362 * src/output.c (prepare_symbols): When printing token names,
14363 escape "[" as "@<:@" and likewise for "]".
14364
14365 * src/system.h (errno): Remove declaration, as we are now
14366 assuming C89 or better, and C89 guarantees errno.
14367
14368 2002-10-30 Paul Eggert <eggert@twinsun.com>
14369
14370 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
14371 Check for close failures.
14372 * src/files.h (xfclose): Return void, not int, since it always
14373 returned zero.
14374 * src/files.c (xfclose): Likewise. Report I/O error if ferror
14375 indicates one.
14376 * src/output.c (output_skeleton): Use xfclose rather than fclose
14377 and ferror. xfclose now checks ferror.
14378
14379 * data/glr.c (YYLEFTMOST_STATE): Remove.
14380 (yyreportTree): Use a stack-based leftmost state. This avoids
14381 our continuing battles with bogus warnings about initializers.
14382
14383 2002-10-30 Akim Demaille <akim@epita.fr>
14384
14385 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
14386 #if.
14387
14388 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14389
14390 * tests/glr-regr1.at: New test for reported regressions.
14391 * tests/testsuite.at: Add glr-regr1.at test.
14392 * tests/Makefile.am: Add glr-regr1.at test.
14393
14394 2002-10-24 Paul Eggert <eggert@twinsun.com>
14395
14396 Version 1.75a.
14397
14398 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
14399 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
14400 we use malloc. Don't assume 'A' through 'Z' are contiguous.
14401 Don't assume strdup exists; POSIX says its an XSI extension.
14402 Check for buffer overflow on input.
14403
14404 2002-10-24 Akim Demaille <akim@epita.fr>
14405
14406 * src/output.c (output_skeleton): Don't disable M4sugar comments
14407 too soon: it results in comments being expanded.
14408 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
14409 first output.
14410
14411 2002-10-24 Akim Demaille <akim@epita.fr>
14412
14413 * data/yacc.c (m4_int_type): New.
14414 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
14415 char' as only yacc.c wants K&R portability.
14416 * data/glr.c (yysigned_char): Remove.
14417 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
14418 Reported by Quoc Peyrot.
14419
14420 2002-10-23 Paul Eggert <eggert@twinsun.com>
14421
14422 * src/main.c (main): With --trace=time, report times even if a
14423 non-fatal error occurs. Formerly, the times were reported in some
14424 such cases but not in others.
14425 * src/reader.c (reader): Just return if a complaint has been issued,
14426 instead of exiting, so that 'main' can report times.
14427
14428 2002-10-22 Akim Demaille <akim@epita.fr>
14429
14430 * src/system.h: Include sys/types.
14431 Reported by Bert Deknuydt.
14432
14433 2002-10-23 Paul Eggert <eggert@twinsun.com>
14434
14435 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
14436 Suggested by Art Haas.
14437
14438 2002-10-22 Paul Eggert <eggert@twinsun.com>
14439
14440 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
14441 decl; not needed any more.
14442 * src/main.c (main): Use return to exit, undoing yesterday's change.
14443 The last OS that we could find where this wouldn't work is
14444 SunOS 3.5, and that's too old to worry about now.
14445
14446 * data/glr.c (struct yyltype): Define members even when not
14447 doing locations. This is more consistent with yacc.c, and it
14448 works around the following bug reports:
14449 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
14450 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
14451
14452 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
14453 @acronym consistently. Standardize on "Yacc" instead of "YACC",
14454 "Algol" instead of "ALGOL". Give a bit more history about BNF.
14455
14456 2002-10-22 Akim Demaille <akim@epita.fr>
14457
14458 * data/README: New.
14459
14460 2002-10-21 Paul Eggert <eggert@twinsun.com>
14461
14462 Be consistent about 'bool'; the old code used an enum in one
14463 module and an int in another, and this violates the C standard.
14464 * m4/stdbool.m4: New file, from coreutils 4.5.3.
14465 * configure.ac (AC_HEADER_STDBOOL): Add.
14466 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
14467 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
14468 * src/symtab.c (hash_compare_symbol_t): Likewise.
14469 * src/system.h (bool, false, true): Use a definition consistent
14470 with ../lib/hash.c. All uses changed.
14471
14472 * src/complain.c (warning_issued): Renamed from warn_message_count,
14473 so that we needn't worry about integer overflow (!).
14474 Now of type bool. All uses changed.
14475 (complaint_issued): Renamed from complain_message_count; likewise.
14476
14477 * src/main.c (main): Use exit to exit with failure.
14478
14479 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
14480 rather than 1 and 0.
14481 * src/main.c (main): Likewise.
14482 * src/getargs.c (getargs): Likewise.
14483 * src/reader.c (reader): Likewise.
14484
14485 * src/getarg.c (getargs): Remove duplicate code for
14486 "Try `bison --help'".
14487
14488 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
14489 What was that "2" for?
14490
14491 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
14492 * src/getargs.c (usage): Likewise.
14493
14494 * src/getargs.c (getargs): When there are too few operands, report
14495 the last one. When there are too many, report the first extra
14496 one. This is how diffutils does it.
14497
14498 2002-10-20 Paul Eggert <eggert@twinsun.com>
14499
14500 Remove K&R vestiges.
14501 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
14502 * src/complain.c (VA_START): Remove. Assume prototypes.
14503 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
14504 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
14505 fatal): Assume prototypes.
14506 * src/complain.h: Assume prototypes.
14507 * src/system.h (PARAMS): Remove.
14508 Include <limits.h> unconditionally, since it's guaranteeed even
14509 for a freestanding C89 compiler.
14510 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
14511 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
14512
14513 2002-10-20 Akim Demaille <akim@epita.fr>
14514
14515 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
14516 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
14517 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
14518 (yyresolveStates, yyresolveAction, yyresolveStack)
14519 (yyprocessOneStack): Use them.
14520 (yy_reduce_print): New.
14521 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
14522
14523 2002-10-20 Akim Demaille <akim@epita.fr>
14524
14525 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
14526 arguments and output `void'.
14527 (b4_c_function): Rename as...
14528 (b4_c_function_def): this.
14529 (b4_c_function_decl, b4_c_ansi_function_def)
14530 (b4_c_ansi_function_decl): New.
14531 Change the interpretation of the arguments: before `int, foo', now
14532 `int foo, foo'.
14533 * data/yacc.c (yyparse): Prototype and define thanks to these.
14534 Adjust b4_c_function_def uses.
14535 * data/glr.c (yyparse): Likewise, but ANSI only.
14536
14537 2002-10-20 Akim Demaille <akim@epita.fr>
14538
14539 * src/output.c (prepare): Move the definition of `tokens_number',
14540 `nterms_number', `undef_token_number', `user_token_number_max'
14541 to...
14542 (prepare_tokens): Here.
14543 (prepare_tokens): Rename as...
14544 (prepare_symbols): this.
14545 (prepare): Move the definition of `rules_number' to...
14546 (prepare_rules): here.
14547 (prepare): Move the definition of `last', `final_state_number',
14548 `states_number' to...
14549 (prepare_states): here.
14550 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
14551
14552 2002-10-20 Akim Demaille <akim@epita.fr>
14553
14554 * src/tables.h, src/tables.c, src/output.c: Comment changes.
14555
14556 2002-10-20 Akim Demaille <akim@epita.fr>
14557
14558 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
14559 * data/c.m4: here.
14560
14561 2002-10-20 Akim Demaille <akim@epita.fr>
14562
14563 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
14564 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
14565 `pair'.
14566 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
14567 `name' to...
14568 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
14569 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
14570 These.
14571
14572 2002-10-19 Paul Eggert <eggert@twinsun.com>
14573
14574 Do not create a temporary file, as that involves security and
14575 cleanup headaches. Instead, use a pair of pipes.
14576 Derived from a suggestion by Florian Krohm.
14577 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
14578 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
14579 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
14580 (BISON_PREREQ_SUBPIPE): Add.
14581 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
14582 Add subpipe.h, subpipe.c.
14583 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
14584 * po/POTFILES.in: Add lib/subpipe.c.
14585 * src/output.c: Include "subpipe.h".
14586 (m4_invoke): Remove decl.
14587 (scan_skel): New decl.
14588 (output_skeleton): Use pipe rather than temporary file for m4 input.
14589 Check that m4sugar.m4 is readable, to avoid deadlock.
14590 Check for pipe I/O error.
14591 * src/scan-skel.l (readpipe): Remove decl.
14592 (scan_skel): New function, to be used in place of m4_invoke.
14593 Read from stream rather than file.
14594
14595 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
14596 float, as this generates a warning on Solaris 8 + GCC 3.2 with
14597 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
14598 this generates a more-accurate value anyway.
14599
14600 * lib/timevar.c (timervar_accumulate): Rename locals to
14601 avoid confusion with similarly-named more-global.
14602 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
14603
14604 * src/output.c (prepare): Use xstrdup to convert char const *
14605 to char *, to avoid GCC warning.
14606
14607 2002-10-19 Akim Demaille <akim@epita.fr>
14608
14609 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
14610 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
14611 Use them to have `calc.y' ready for %pure-parser.
14612 * data/yacc.c (YYLEX): Pass a yylex return type to
14613 b4_c_function_call.
14614
14615 2002-10-19 Akim Demaille <akim@epita.fr>
14616
14617 Prototype support of %lex-param and %parse-param.
14618
14619 * src/parse-gram.y: Add the definition of the %lex-param and
14620 %parse-param tokens, plus their rules.
14621 Drop the `_' version of %glr-parser.
14622 Add the "," token.
14623 * src/scan-gram.l (INITIAL): Scan them.
14624 * src/muscle_tab.c: Comment changes.
14625 (muscle_insert, muscle_find): Rename `pair' as `probe'.
14626 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
14627 (muscle_entry_s): The `value' member is no longer const.
14628 Adjust all dependencies.
14629 * src/muscle_tab.c (muscle_init): Adjust: use
14630 MUSCLE_INSERT_STRING.
14631 Initialize the obstack earlier.
14632 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
14633 (muscle_pair_list_grow): New.
14634 * data/c.m4 (b4_c_function_call, b4_c_args): New.
14635 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
14636 * tests/calc.at: Use %locations, not --locations.
14637 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
14638
14639 2002-10-19 Akim Demaille <akim@epita.fr>
14640
14641 * src/getargs.c (usage): Take status as argument and exit
14642 accordingly.
14643 Report the traditional `Try ... --help' message when status != 0.
14644 (usage, version): Don't take a FILE * as arg, it is pointless.
14645 (getargs): When there is an incorrect number of arguments, make it
14646 an error, and report it GNUlically thanks to `usage ()'.
14647
14648 2002-10-18 Paul Eggert <eggert@twinsun.com>
14649
14650 * data/glr.c (yyreportParseError): Don't assume that sprintf
14651 yields the length of the printed string, as this is not true
14652 on SunOS 4.1.4. Reported by Peter Klein.
14653
14654 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
14655 * tests/conflicts.at (%nonassoc and eof): Likewise.
14656 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
14657
14658 2002-10-17 Akim Demaille <akim@epita.fr>
14659
14660 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
14661 * src/getargs.c (trace_types, trace_args): Adjust.
14662 * src/reader.c (grammar_current_rule_prec_set)
14663 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
14664 Standardize error messages.
14665 And s/@prec/%prec/!
14666 (reader): Use trace_flag to enable scanner/parser debugging,
14667 instead of an adhoc scheme.
14668 * src/scan-gram.l: Remove trailing debugging code.
14669
14670 2002-10-16 Paul Eggert <eggert@twinsun.com>
14671
14672 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
14673 MUSCLE_TAB_H.
14674
14675 * NEWS: Officially drop support for building Bison with K&R C,
14676 since it didn't work anyway and it's not worth worrying about.
14677 * Makefile.maint (wget_files): Remove ansi2knr.c.
14678 (ansi2knr.c-url_prefix): Remove.
14679 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
14680 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14681 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14682
14683 2002-10-15 Paul Eggert <eggert@twinsun.com>
14684
14685 Stop using the "enum_" trick for K&R-style function definitions;
14686 it confused me, and I was the author! Instead, assume that people
14687 who want to use K&R C compilers (when using these modules in GCC,
14688 perhaps?) will run ansi2knr.
14689
14690 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
14691 All uses of "enum_" changed to "enum ".
14692 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
14693 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
14694
14695 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
14696 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
14697 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
14698 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
14699 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
14700 abitset_not, abitset_ones, abitset_or, abitset_or_and,
14701 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
14702 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
14703 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
14704 Use function prototypes; this removes the need for declaring
14705 static functions simply to provide their prototypes.
14706 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
14707 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
14708 bitset_count_, bitset_create, bitset_dump, bitset_first,
14709 bitset_free, bitset_init, bitset_last, bitset_next,
14710 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
14711 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
14712 bitset_print, bitset_release_memory, bitset_toggle_,
14713 bitset_type_choose, bitset_type_get, bitset_type_name_get,
14714 debug_bitset): Likewise.
14715 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
14716 * lib/bitset_stats.c (bitset_log_histogram_print,
14717 bitset_percent_histogram_print, bitset_stats_and,
14718 bitset_stats_and_cmp, bitset_stats_and_or,
14719 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
14720 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
14721 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
14722 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
14723 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
14724 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
14725 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
14726 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
14727 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
14728 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
14729 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
14730 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
14731 bitset_stats_zero): Likewise.
14732 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
14733 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
14734 bitsetv_dump, debug_bitsetv): Likewise.
14735 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
14736 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
14737 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
14738 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
14739 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
14740 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
14741 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
14742 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
14743 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
14744 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
14745 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
14746 Likewise.
14747 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
14748 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
14749 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
14750 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
14751 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
14752 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
14753 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
14754 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
14755 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
14756 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
14757 lbitset_xor_cmp, lbitset_zero): Likewise.
14758
14759 2002-10-14 Akim Demaille <akim@epita.fr>
14760
14761 Version 1.75.
14762
14763 2002-10-14 Akim Demaille <akim@epita.fr>
14764
14765 * tests/Makefile.am (maintainer-check-posix): New.
14766
14767 2002-10-14 Akim Demaille <akim@epita.fr>
14768
14769 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
14770 member.
14771
14772 2002-10-14 Akim Demaille <akim@epita.fr>
14773
14774 * src/tables.c (table_ninf_remap): base -> tab.
14775 Reported by Matt Rosing.
14776
14777 2002-10-14 Paul Eggert <eggert@twinsun.com>
14778
14779 * tests/action.at, tests/calc.at, tests/conflicts.at,
14780 tests/cxx-type.at, tests/headers.at, tests/input.at,
14781 tests/regression.at, tests/synclines.at, tests/torture.at:
14782 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
14783 so that the tests still work even if POSIXLY_CORRECT is set.
14784 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
14785
14786 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
14787 for portability to K&R hosts. Fix typo: signed char is guaranteed
14788 only to 127, not to 128.
14789 * data/glr.c (yysigned_char): New type.
14790 * data/yacc.c (yysigned_char): Likewise.
14791 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
14792
14793 2002-10-13 Paul Eggert <eggert@twinsun.com>
14794
14795 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
14796 true due to limited range of data type" warning from GCC.
14797
14798 * data/c.m4 (b4_token_defines): Protect against double-inclusion
14799 by wrapping enum yytokentype's definition inside #ifndef
14800 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
14801
14802 2002-10-13 Akim Demaille <akim@epita.fr>
14803
14804 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
14805 Un yy- yyrhs to avoid the name clash with the global YYRHS.
14806
14807 2002-10-13 Akim Demaille <akim@epita.fr>
14808
14809 * Makefile.maint: Update from Autoconf 2.54.
14810 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
14811
14812 2002-10-13 Akim Demaille <akim@epita.fr>
14813
14814 * src/print.c (print_state): Separate the list of solved conflicts
14815 from the other items.
14816 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
14817
14818 2002-10-13 Akim Demaille <akim@epita.fr>
14819
14820 Let nondeterministic skeletons be usable with deterministic
14821 tables.
14822
14823 With the patch, GAWK compiled by GCC without -O2 passes its test
14824 suite using a GLR parser driven by LALR tables. It fails with -O2
14825 because `struct stat' gives two different answers on my machine:
14826 88 (definition of an auto var) and later 96 (memset on this var).
14827 Hence the stack is badly corrumpted. The headers inclusion is to
14828 blame: if I move the awk.h inclusion before GLR's system header
14829 inclusion, the two struct stat have the same size.
14830
14831 * src/tables.c (pack_table): Always create conflict_table.
14832 (token_actions): Always create conflict_list.
14833 * data/glr.c (YYFLAG): Remove, unused.
14834
14835 2002-10-13 Akim Demaille <akim@epita.fr>
14836
14837 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
14838 (O0FLAGS): New.
14839 (VALGRIND, GXX): New.
14840 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
14841 * tests/bison.in: Run $PREBISON a pre-command.
14842 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
14843 (maintainer-check-g++): New.
14844 * Makefile.am (maintainer-check): New.
14845
14846 2002-10-13 Akim Demaille <akim@epita.fr>
14847
14848 * data/glr.c: Formatting changes.
14849 Tweak some trace messages to match yacc.c's.
14850
14851 2002-10-13 Akim Demaille <akim@epita.fr>
14852
14853 GLR parsers sometimes raise parse errors instead of performing the
14854 default reduction.
14855 Reported by Charles-Henry de Boysson.
14856
14857 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
14858 check the length of the traces when %glr.
14859 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
14860 GLR's traces.
14861 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
14862 Test GLR parsers.
14863 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
14864 (yyltype): Remove the yy prefix from the member names.
14865 (yytable): Complete its comment.
14866 (yygetLRActions): Map error action number from YYTABLE from
14867 YYTABLE_NINF to 0.
14868 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
14869 (which was a bug: it should have been YYTABEL_NINF, and yet it was
14870 not satisfying as we could compare an YYACTION computed from
14871 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
14872 only value for error actions.
14873 (yyreportParseError): In verbose parse error messages, don't issue
14874 `error' in the list of expected tokens.
14875 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
14876 next action to perform to match glr.c's decoding.
14877 (yytable): Complete its comment.
14878
14879 2002-10-13 Paul Eggert <eggert@twinsun.com>
14880
14881 Fix problem reported by Henrik Grubbstroem in
14882 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
14883 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
14884 because the Bison parser reads the second action before reducing
14885 the first one.
14886 * src/scan-gram.l (rule_length): New static var.
14887 Use it to keep track of the rule length in the scanner, since
14888 we can't expect the parser to be in lock-step sync with the scanner.
14889 (handle_action_dollar, handle_action_at): Use this var.
14890 * tests/actions.at (Exotic Dollars): Test for the problem.
14891
14892 2002-10-12 Paul Eggert <eggert@twinsun.com>
14893
14894 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
14895 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
14896 Include <sys/time.h> when checking for clock_t and struct tms.
14897 Use same include order as source.
14898 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
14899 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
14900
14901 * lib/timevar.c: Update copyright date and clarify comments.
14902 (get_time) [IN_GCC]: Keep the GCC version for reference.
14903
14904 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
14905 GCC version as of today, then merge Bison's changes.
14906 Change "GCC" to "Bison" in copyright notice. timevar.def's
14907 author is Akim, so change that too.
14908
14909 * src/reader.c (grammar_current_rule_check):
14910 Don't worry about the default action if $$ is untyped.
14911 Prevents bogus warnings reported by Jim Gifford in
14912 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
14913
14914 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
14915 * data/glr.c, data/lalr1.cc, data/yacc.c:
14916 Output token definitions before the first part of user declarations.
14917 Fixes compatibility problem reported by Jim Gifford for kbd in
14918 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14919
14920 2002-10-11 Paul Eggert <eggert@twinsun.com>
14921
14922 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
14923 (yyparse): here. This undoes some of the 2002-07-25 change.
14924 Compatibility problem reported by Ralf S. Engelschall with
14925 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
14926
14927 2002-10-11 Akim Demaille <akim@epita.fr>
14928
14929 * tests/regression.at Characters Escapes): New.
14930 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
14931 characters.
14932 Reported by Jan Nieuwenhuizen.
14933
14934 2002-10-11 Akim Demaille <akim@epita.fr>
14935
14936 * po/id.po: New.
14937
14938 2002-10-10 Paul Eggert <eggert@twinsun.com>
14939
14940 Portability fixes for bitsets; this also avoids several GCC
14941 warnings.
14942
14943 * lib/abitset.c: Include <stddef.h>, for offsetof.
14944 * lib/lbitset.c: Likewise.
14945
14946 * lib/abitset.c (abitset_bytes): Return a size that is aligned
14947 properly for vectors of objects. Do not assume that adding a
14948 header size to a multiple of a word size yields a value that is
14949 properly aligned for the whole union.
14950 * lib/bitsetv.c (bitsetv_alloc): Likewise.
14951
14952 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
14953 unique names for structures.
14954 * lib/ebitset.c (ebitset_bytes): Likewise.
14955 * lib/lbitset.c (lbitset_bytes): Likewise.
14956
14957 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
14958 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
14959 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
14960 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
14961 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
14962 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
14963 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
14964 to improve the type-checking that GCC can do.
14965 * lib/bitset.c (bitset_op4_cmp): Likewise.
14966 * lib/bitset_stats.c (bitset_stats_count,
14967 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
14968 bitset_stats_copy, bitset_stats_disjoint_p,
14969 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
14970 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
14971 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
14972 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
14973 bitset_stats_and_or_cmp, bitset_stats_andn_or,
14974 bitset_stats_andn_or_cmp, bitset_stats_or_and,
14975 bitset_stats_or_and_cmp): Likewise.
14976 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
14977 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
14978 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
14979 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
14980
14981 * lib/abitset.h: Include bitset.h, not bbitset.h.
14982 * lib/ebitset.h: Likewise.
14983 * lib/lbitset.h: Likewise.
14984
14985 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
14986 All instances of parameters of type enum bitset_opts are now of
14987 type enum_bitset_opts, to conform to the C Standard, and similarly
14988 for enum_bitset_type.
14989 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
14990 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
14991
14992 Do not use "struct bitset_struct" to mean different things in
14993 different modules. Not only is this confusing, it violates
14994 the C Standard, which requires that structure types in different
14995 modules must be compatible if one is to be passed to the other.
14996 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
14997 All instances of "struct bitset_struct *" replaced with "bitset".
14998 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
14999 (union bitset_union, struct abitset_struct, struct ebitset_struct,
15000 struct lbitset_struct, struct bitset_stats_struct): New types.
15001 All uses of struct bitset_struct changed to union bitset_union,
15002 etc.
15003 * lib/abitset.c (struct abitset_struct, abitset,
15004 struct bitset_struct): Remove.
15005 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
15006 struct bitset_struct): Remove.
15007 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
15008 bitset_struct): Remove.
15009 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
15010 Likewise.
15011
15012 Do not call a function of type T using a call that assumes the
15013 function is of a different type U. Standard C requires that a
15014 function must be called with a type that is compatible with its
15015 definition.
15016 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15017 New decls.
15018 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15019 New functions.
15020 * lib/ebitset.c (PFV): Remove.
15021 * lib/lbitset.c (PFV): Likewise.
15022 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
15023 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
15024 decls.
15025 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
15026 (ebitset_vtable): Use them.
15027 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
15028 lbitset_xor): New functions.
15029 (lbitset_vtable): Use them.
15030
15031 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
15032 Declare.
15033
15034 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
15035 GCC warning.
15036 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
15037 Use offsetof, for simplicity.
15038
15039 2002-10-06 Paul Eggert <eggert@twinsun.com>
15040
15041 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
15042 the same width as int. This reapplies a hunk of the 2002-08-12 patch
15043 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
15044 which was inadvertently undone by the 2002-09-30 patch.
15045 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
15046 the same width as int.
15047
15048 2002-10-04 Paul Eggert <eggert@twinsun.com>
15049
15050 Version 1.50.
15051
15052 * configure.ac (AC_INIT), NEWS: Increment version number.
15053
15054 * doc/bison.texinfo: Minor spelling, grammar, and white space
15055 fixes.
15056 (Symbols): Mention that any negative value returned from yylex
15057 signifies end-of-input. Warn about negative chars. Mention
15058 the portable Standard C character set.
15059
15060 The GNU coding standard says CFLAGS and YFLAGS are reserved
15061 for the installer to set.
15062 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
15063 * src/Makefile.am (AM_CFLAGS): Likewise.
15064 (AM_YFLAGS): Renamed from YFLAGS.
15065
15066 Fix some MAX and MIN problems.
15067 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
15068 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
15069 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
15070 * src/reader.c (reader): Use it.
15071
15072 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
15073 POSIX 1003.1-2001 has removed fgrep.
15074
15075 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
15076
15077 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
15078 interpreted as signed.
15079 * lib/ebitset.c (ebitset_list): Fix bug.
15080
15081 2002-10-01 Paul Eggert <eggert@twinsun.com>
15082
15083 More fixes for 64-bit hosts and large bitsets.
15084
15085 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
15086 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
15087 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
15088 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
15089 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
15090 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
15091 bitset_count_): Likewise.
15092 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
15093 bitset_first, bitset_last): Likewise.
15094 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
15095 bitset_stats_list_reverse, bitset_stats_size,
15096 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
15097 Likewise.
15098 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15099 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15100 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15101 bitsetv_reflexive_transitive_closure): Likewise.
15102 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
15103 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
15104 Likewise.
15105 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
15106 Likewise.
15107
15108 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
15109 Use size_t, not unsigned int, to count bytes.
15110 * lib/abitset.h (abitset_bytes): Likewise.
15111 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
15112 Likewise.
15113 * lib/bitset.h (bitset_bytes): Likewise.
15114 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
15115 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
15116 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15117 * lib/ebitset.c (ebitset_bytes): Likewise.
15118 * lib/ebitset.h (ebitset_bytes): Likewise.
15119 * lib/lbitset.c (lbitset_bytes): Likewise.
15120 * lib/lbitset.h (lbitset_bytes): Likewise.
15121
15122 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
15123 abitset_subset_p, abitset_disjoint_p, abitset_and,
15124 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
15125 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
15126 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
15127 abitset_or_and, abitset_or_and_cmp):
15128 Use bitset_windex instead of unsigned int.
15129 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15130 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
15131 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
15132 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
15133 Likewise.
15134 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
15135
15136 * lib/bitset.c (bitset_print):
15137 Use proper printf formats for widths of integer types.
15138 * lib/bitset_stats.c (bitset_percent_histogram_print,
15139 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
15140 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15141 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15142 * lib/lbitset.c (lbitset_bytes): Likewise.
15143
15144 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
15145 BITSET_SIZE_MAX): New macros.
15146 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
15147 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
15148 to BITSET_WINDEX_MAX.
15149
15150 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
15151 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
15152 since we now return the bitset_bindex type (not int).
15153
15154 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
15155 when computing sizes.
15156 * lib/ebitset.c (ebitset_elts_grow): Likewise.
15157
15158 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
15159 and avoid cast to unsigned.
15160
15161 2002-09-30 Akim Demaille <akim@epita.fr>
15162
15163 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
15164 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
15165 Updates from Michael Hayes.
15166
15167 2002-09-30 Art Haas <ahaas@neosoft.com>
15168
15169 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
15170 invocations.
15171 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
15172 defined.
15173
15174 2002-09-27 Akim Demaille <akim@epita.fr>
15175
15176 Version 1.49c.
15177
15178 2002-09-27 Akim Demaille <akim@epita.fr>
15179
15180 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
15181 (Because of AC_LIBSOURCE).
15182
15183 2002-09-27 Akim Demaille <akim@epita.fr>
15184
15185 Playing with Autoscan.
15186
15187 * configure.ac: Remove the old LIBOBJ tweaks.
15188 (AC_REPLACE_FUNCS): Add strrchr and strtol.
15189 * lib/strrchr.c: New.
15190 * lib/strtol.c: New, from the Coreutils 4.5.1.
15191
15192 2002-09-27 Akim Demaille <akim@epita.fr>
15193
15194 Playing with Autoscan.
15195
15196 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
15197 * lib/Makefile.am (libbison_a_SOURCES): No longer include
15198 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
15199 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
15200 Coreutils 4.5.1.
15201
15202 2002-09-24 Akim Demaille <akim@epita.fr>
15203
15204 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
15205 (Frequently Asked Questions, Parser Stack Overflow): New.
15206
15207 2002-09-13 Akim Demaille <akim@epita.fr>
15208
15209 Playing with autoscan.
15210
15211 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
15212 * src/files.c (skeleton_find): Remove, unused.
15213 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
15214 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
15215
15216 2002-09-13 Akim Demaille <akim@epita.fr>
15217
15218 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
15219 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
15220
15221 2002-09-13 Akim Demaille <akim@epita.fr>
15222
15223 * configure.ac: Require 2.54.
15224 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
15225 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
15226 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
15227 Remove, provided by Autoconf macros.
15228
15229 2002-09-12 Akim Demaille <akim@epita.fr>
15230
15231 * m4/prereq.m4: Update, from Coreutils 4.5.1.
15232
15233 2002-09-12 Akim Demaille <akim@epita.fr>
15234
15235 * m4/prereq.m4: Update, from Fileutils 4.1.5.
15236 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
15237 Reported by Martin Mokrejs.
15238
15239 2002-09-10 Akim Demaille <akim@epita.fr>
15240
15241 * src/parse-gram.y: Associate a human readable string to each
15242 token type.
15243 * tests/regression.at (Invalid inputs): Adjust.
15244
15245 2002-09-10 Gary V. Vaughan <gary@gnu.org>
15246
15247 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
15248 with an Autoconf-2.5x style configure.ac.
15249
15250 2002-09-06 Paul Eggert <eggert@twinsun.com>
15251
15252 * doc/bison.texinfo (Conditions): Make explicit that the GPL
15253 exception applies only to yacc.c. This is a modification of a
15254 patch originally suggested by Akim Demaille.
15255
15256 2002-09-06 Akim Demaille <akim@epita.fr>
15257
15258 * data/c.m4 (b4_copyright): Move the GPL exception comment from
15259 here to...
15260 * data/yacc.c: here.
15261
15262 * data/lalr1.cc (struct yyltype): Don't define it, since we use
15263 LocationType.
15264 (b4_ltype): Default to yy::Location from location.hh.
15265
15266 2002-09-04 Jim Meyering <jim@meyering.net>
15267
15268 * data/yacc.c: Guard the declaration of yytoknum also with
15269 `#ifdef YYPRINT', so it is declared only when used.
15270
15271 2002-09-04 Akim Demaille <akim@epita.fr>
15272
15273 * configure.in: Rename as...
15274 * configure.ac: this.
15275 Bump to 1.49c.
15276
15277 2002-09-04 Akim Demaille <akim@epita.fr>
15278
15279 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
15280 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
15281 translate maintainer only messages.
15282
15283 2002-08-12 Paul Eggert <eggert@twinsun.com>
15284
15285 Version 1.49b.
15286
15287 * Makefile.am (SUBDIRS): Remove intl.
15288 (DISTCLEANFILES): Remove.
15289 * NEWS: Mention that GNU M4 is now required. Clarify what is
15290 meant by "larger grammars". Mention the pt_BR translation.
15291 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
15292 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
15293 Bump version from 0.11.2 to 0.11.5.
15294 (BISON_PREREQ_STAGE): Remove.
15295 (AM_GNU_GETTEXT): Use external gettext.
15296 (AC_OUTPUT): Remove intl/Makefile.
15297
15298 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
15299
15300 * data/glr.c: Include string.h, for strlen.
15301 (yyreportParseError): Use size_t for yysize.
15302 (yy_yypstack): No longer nested inside yypstates, as nested
15303 functions are not portable. Do not assume size_t is the
15304 same width as int.
15305 (yypstates): Do not assume that ptrdiff_t is the same width
15306 as int, and similarly for yyposn and YYINDEX.
15307
15308 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
15309
15310 * lib/Makefile.am (INCLUDES): Do not include from the intl
15311 directory, which has been removed.
15312 * src/Makefile.am (INCLUDES): Likewise.
15313
15314 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
15315 (bitsets_sources, additional_bitsets_sources, timevars_sources):
15316 New vars.
15317
15318 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
15319 * tests/Makefile.am (EXTRA_DIST): Likewise.
15320
15321 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
15322 Do not assume that bitset_windex is the same width as unsigned.
15323
15324 * lib/abitset.c (abitset_unused_clear): Do not assume that
15325 bitset_word is the same width as int.
15326 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
15327 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
15328 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
15329 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
15330 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
15331
15332 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
15333 portability to one's complement hosts!).
15334 * lib/ebitset.c (ebitset_op1): Likewise.
15335 * lib/lbitset.c (lbitset_op1): Likewise.
15336
15337 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
15338 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
15339 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
15340 Sync with fileutils.
15341 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
15342 lib/gettext.h: Sync with diffutils.
15343
15344 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
15345 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
15346
15347 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
15348 PROTOTYPES to check for prototypes, and "defined __STDC__" to
15349 check for void *.
15350
15351 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
15352 size_t; the old version tried to do this but casted improperly.
15353 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
15354 (bitset_test): Now returns int, not unsigned long.
15355
15356 * lib/bitset_stats.c: Include "gettext.h".
15357 (_): New macro.
15358 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
15359 name locals "index", as it generates unnecessary warnings on some
15360 hosts that have an "index" function.
15361
15362 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
15363 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
15364 they need translation.
15365 * src/LR0.c (state_list_append, new_itemsets, get_state,
15366 append_states, generate_states): Likewise.
15367 * src/assoc.c (assoc_to_string): Likewise.
15368 * src/closure.c (print_closure, set_firsts, closure): Likewise.
15369 * src/gram.c (grammar_dump): Likewise.
15370 * src/injections.c (injections_compute): Likewise.
15371 * src/lalr.c (lookaheads_print): Likewise.
15372 * src/relation.c (relation_transpose): Likewise.
15373 * src/scan-gram.l: Likewise.
15374 * src/tables.c (table_grow, pack_vector): Likewise.
15375
15376 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
15377 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
15378 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
15379 * m4/mbstate_t.m4: Sync with fileutils.
15380 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
15381
15382 * po/LINGUAS: Add pt_BR.
15383 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
15384 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
15385 lib/timevar.c.
15386 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
15387 manual recommends.
15388 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
15389
15390 * src/complain.c (strerror_r): Remove decl; not needed.
15391 (strerror): Use same pattern as ../lib/error.c.
15392
15393 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
15394
15395 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
15396
15397 * src/main.c (main): Cast result of bindtextdomain and textdomain
15398 to void, to avoid a GCC warning when --disable-nls is in effect.
15399
15400 * src/scan-gram.l: Use strings rather than escapes when possible,
15401 to minimize the number of warnings from xgettext.
15402 (handle_action_dollar, handle_action_at): Don't use isdigit,
15403 as it mishandles negative chars and it may not work as expected
15404 outside the C locale.
15405
15406 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
15407 this is a GCC extension and is not portable to other compilers.
15408
15409 * src/system.h (alloca): Use same pattern as ../lib/error.c.
15410 Do not include <ctype.h>; no longer needed.
15411 Do not include <malloc.h>; no longer needed (and generates
15412 warnings on OpenBSD 3.0).
15413
15414 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
15415 it's not portable.
15416
15417 * tests/regression.at: Do not use 'cc -c input.c -o input';
15418 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
15419
15420 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
15421 exit status as failure, not just exit status 1. Sun C exits
15422 with status 2 sometimes.
15423
15424 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
15425 Use it for the two large tests.
15426
15427 2002-08-02 Akim Demaille <akim@epita.fr>
15428
15429 * src/conflicts.c (conflicts_output): Don't output rules never
15430 reduced here, since anyway that computation doesn't work.
15431 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
15432 (rule_useless_p, rule_never_reduced_p): New.
15433 (grammar_rules_partial_print): Use a filter instead of a range.
15434 Display the title only if needed.
15435 (grammar_rules_print): Adjust.
15436 (grammar_rules_never_reduced_report): New.
15437 * src/tables.c (action_row): Move the computation of rules never
15438 reduced to...
15439 (token_actions): here.
15440 * src/main.c (main): Make the parser before making the report, so
15441 that rules never reduced are computed.
15442 Call grammar_rules_never_reduced_report.
15443 * src/print.c (print_results): Report rules never reduced.
15444 * tests/conflicts.at, tests/reduce.at: Adjust.
15445
15446 2002-08-01 Akim Demaille <akim@epita.fr>
15447
15448 Instead of attaching lookaheads and duplicating the rules being
15449 reduced by a state, attach the lookaheads to the reductions.
15450
15451 * src/state.h (state_t): Remove the `lookaheads',
15452 `lookaheads_rule' member.
15453 (reductions_t): Add a `lookaheads' member.
15454 Use a regular array for the `rules'.
15455 * src/state.c (reductions_new): Initialize the lookaheads member
15456 to 0.
15457 (state_rule_lookaheads_print): Adjust.
15458 * src/state.h, src/state.c (state_reductions_find): New.
15459 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
15460 (count_rr_conflicts): Adjust.
15461 * src/lalr.c (LArule): Remove.
15462 (add_lookback_edge): Adjust.
15463 (state_lookaheads_count): New.
15464 (states_lookaheads_initialize): Merge into...
15465 (initialize_LA): this.
15466 (lalr_free): Adjust.
15467 * src/main.c (main): Don't free nullable and derives too early: it
15468 is used by --verbose.
15469 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
15470
15471 2002-08-01 Akim Demaille <akim@epita.fr>
15472
15473 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
15474 `rule_number_t**'.
15475 (set_derives, free_derives): Rename as...
15476 (derives_compute, derives_free): this.
15477 Adjust all dependencies.
15478 * src/nullable.c (set_nullable, free_nullable): Rename as...
15479 (nullable_compute, nullable_free): these.
15480 (rule_list_t): Store rule_t *, not rule_number_t.
15481 * src/state.c (state_rule_lookaheads_print): Directly compare rule
15482 pointers, instead of their numbers.
15483 * src/main.c (main): Call nullable_free, and derives_free earlier,
15484 as they were lo longer used.
15485
15486 2002-08-01 Akim Demaille <akim@epita.fr>
15487
15488 * lib/timevar.c (get_time): Include children time.
15489 * src/lalr.h (LA, LArule): Don't export them: used with the
15490 state_t.
15491 * src/lalr.c (LA, LArule): Static.
15492 * src/lalr.h, src/lalr.c (lalr_free): New.
15493 * src/main.c (main): Call it.
15494 * src/tables.c (pack_vector): Check whether loc is >= to the
15495 table_size, not >.
15496 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
15497 (tables_generate): do it, since that's also it which allocates
15498 them.
15499 Don't free LA and LArule, main does.
15500
15501 2002-07-31 Akim Demaille <akim@epita.fr>
15502
15503 Separate parser tables computation and output.
15504
15505 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
15506 (conflict_list, conflict_list_cnt, table, check, table_ninf)
15507 (yydefgoto, yydefact, high): Move to...
15508 * src/tables.h, src/tables.c: here.
15509 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
15510 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
15511 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
15512 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
15513 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
15514 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
15515 (action_row, save_row, token_actions, save_column, default_goto)
15516 (goto_actions, sort_actions, matching_state, pack_vector)
15517 (table_ninf_remap, pack_table, prepare_actions): Move to...
15518 * src/tables.c: here.
15519 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
15520 * src/output.c (token_actions, output_base, output_conflicts)
15521 (output_check): Merge into...
15522 (prepare_actions): this.
15523 (actions_output): Rename as...
15524 (user_actions_output): this.
15525 * src/main.c (main): Call tables_generate and tables_free.
15526
15527 2002-07-31 Akim Demaille <akim@epita.fr>
15528
15529 Steal GCC's --time-report support.
15530
15531 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
15532 stolen/adjusted from GCC.
15533 * m4/stage.m4: Remove time related checks.
15534 * m4/timevar.m4: New.
15535 * configure.in: Adjust.
15536 * src/system.h: Adjust to using timevar.h.
15537 * src/getargs.h, src/getargs.c: Support trace_time for
15538 --trace=time.
15539 * src/main.c (stage): Remove.
15540 (main): Replace `stage' invocations with timevar calls.
15541 * src/output.c: Insert pertinent timevar calls.
15542
15543 2002-07-31 Akim Demaille <akim@epita.fr>
15544
15545 Let --trace have arguments.
15546
15547 * src/getargs.h (enum trace_e): New.
15548 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
15549 (long_options, short_options): --trace/-T takes an optional
15550 argument.
15551 Change all the uses of trace_flag to reflect the new flags.
15552 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
15553
15554 Strengthen `stage' portability.
15555
15556 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
15557 * configure.in: Use it.
15558 Don't check for malloc.h and sys/times.h.
15559 * src/system.h: Include them when appropriate.
15560 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
15561 times and struct tms are available.
15562
15563 2002-07-30 Akim Demaille <akim@epita.fr>
15564
15565 In verbose parse error message, don't report `error' as an
15566 expected token.
15567 * tests/actions.at (Printers and Destructors): Adjust.
15568 * tests/calc.at (Calculator $1): Adjust.
15569 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
15570 error message, do not report the parser accepts the error token in
15571 that state.
15572
15573 2002-07-30 Akim Demaille <akim@epita.fr>
15574
15575 Normalize conflict related messages.
15576
15577 * src/complain.h, src/complain.c (warn, complain): New.
15578 * src/conflicts.c (conflicts_print): Use them.
15579 (conflict_report_yacc): New, extracted from...
15580 (conflicts_print): here.
15581 * tests/conflicts.at, tests/existing.at: Adjust.
15582
15583 2002-07-30 Akim Demaille <akim@epita.fr>
15584
15585 Report rules which are never reduced by the parser: those hidden
15586 by conflicts.
15587
15588 * src/LR0.c (save_reductions): Don't make the final state too
15589 different: save its reduction (accept) instead of having a state
15590 without any action (no shift or goto, no reduce).
15591 Note: the final state is now a ``regular'' state, i.e., the
15592 parsers now contain `reduce 0' as default reduction.
15593 Nevertheless, since they decide to `accept' when yystate =
15594 final_state, they still will not reduce rule 0.
15595 * src/print.c (print_actions, print_reduction): Adjust.
15596 * src/output.c (action_row): Track reduced rules.
15597 (token_actions): Report rules never reduced.
15598 * tests/conflicts.at, tests/regression.at: Adjust.
15599
15600 2002-07-30 Akim Demaille <akim@epita.fr>
15601
15602 `stage' was accidently included in a previous patch.
15603 Initiate its autoconfiscation.
15604
15605 * configure.in: Look for malloc.h and sys/times.h.
15606 * src/main.c (stage): Adjust.
15607 Report only when trace_flag.
15608
15609 2002-07-29 Akim Demaille <akim@epita.fr>
15610
15611 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
15612 state_number_t.
15613 (errs_t): symbol_t*, not symbol_number_t.
15614 (reductions_t): rule_t*, not rule_number_t.
15615 (FOR_EACH_SHIFT): New.
15616 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
15617 * src/print.c, src/print_graph.c: Adjust.
15618
15619 2002-07-29 Akim Demaille <akim@epita.fr>
15620
15621 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
15622
15623 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
15624 (endtoken, accept): these.
15625 * src/reader.c (reader): Set endtoken's default tag to "$end".
15626 Set undeftoken's tag to "$undefined" instead of "$undefined.".
15627 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
15628 Adjust.
15629
15630 2002-07-29 Akim Demaille <akim@epita.fr>
15631
15632 * src/reduce.c (reduce_grammar): When the language is empty,
15633 complain about the start symbol, not the axiom.
15634 Use its location.
15635 * tests/reduce.at (Empty Language): New.
15636
15637 2002-07-26 Akim Demaille <akim@epita.fr>
15638
15639 * src/reader.h, src/reader.c (gram_error): ... can't get
15640 yycontrol without making too strong assumptions on the parser
15641 itself.
15642 * src/output.c (prepare_tokens): Use the real 0th value of
15643 token_translations instead of `0'.
15644 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
15645 visible here.
15646 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
15647 for the time being: %locations ought to provide it to yyerror.
15648
15649 2002-07-25 Akim Demaille <akim@epita.fr>
15650
15651 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
15652 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
15653 * tests/regression.at (Web2c Actions): Adjust.
15654
15655 2002-07-25 Akim Demaille <akim@epita.fr>
15656
15657 Stop storing rules from 1 to nrules + 1.
15658
15659 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
15660 * src/nullable.c, src/output.c, src/print.c, src/reader.c
15661 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
15662 Iterate from 0 to nrules.
15663 Use rule_number_as_item_number and item_number_as_rule_number.
15664 Adjust to `derive' now containing possibly 0.
15665 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
15666 Handle the `- 1' part in rule numbers from/to item numbers.
15667 * src/conflicts.c (log_resolution): Fix the message which reversed
15668 shift and reduce.
15669 * src/output.c (action_row): Initialize default_rule to -1.
15670 (token_actions): Adjust.
15671 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
15672 expected output.
15673 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
15674
15675 2002-07-25 Akim Demaille <akim@epita.fr>
15676
15677 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
15678 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
15679 (b4_c_knr_arg_decl): New.
15680 * data/yacc.c: Use it to define yysymprint, yydestruct, and
15681 yyreport_parse_error.
15682
15683 2002-07-25 Akim Demaille <akim@epita.fr>
15684
15685 * data/yacc.c (yyreport_parse_error): New, extracted from...
15686 (yyparse): here.
15687 (yydestruct, yysymprint): Move above yyparse.
15688 Be K&R compliant.
15689
15690 2002-07-25 Akim Demaille <akim@epita.fr>
15691
15692 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
15693 replace...
15694 (b4_sint_type, b4_uint_type): these.
15695 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
15696 * tests/regression.at (Web2c Actions): Adjust.
15697
15698 2002-07-25 Akim Demaille <akim@epita.fr>
15699
15700 * src/gram.h (TIEM_NUMBER_MAX): New.
15701 (item_number_of_rule_number, rule_number_of_item_number): Rename
15702 as...
15703 (rule_number_as_item_number, item_number_as_rule_number): these.
15704 Adjust dependencies.
15705 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
15706 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
15707 (symbol_number_to_vector_number): New.
15708 (order): Of vector_number_t* type.
15709 (base_t, BASE_MAX, BASE_MIN): New.
15710 (froms, tos, width, pos, check): Of base_t type.
15711 (action_number_t, ACTION_MIN, ACTION_MAX): New.
15712 (actrow): Of action_number_t type.
15713 (conflrow): Of unsigned int type.
15714 (table_ninf, base_ninf): New.
15715 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
15716 (muscle_insert_int_table, muscle_insert_base_table)
15717 (muscle_insert_rule_number_table): New.
15718 (prepare_tokens): Output `toknum' as int_table.
15719 (action_row): Returns a rule_number_t.
15720 Use ACTION_MIN, not SHRT_MIN.
15721 (token_actions): yydefact is rule_number_t*.
15722 (table_ninf_remap): New.
15723 (pack_table): Use it for `base' and `table'.
15724 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
15725 replaced with...
15726 (YYPACT_NINF, YYTABLE_NINF): these.
15727 (yypact, yytable): Compute their types instead of hard-coded
15728 `short'.
15729 * tests/regression.at (Web2c Actions): Adjust.
15730
15731 2002-07-19 Akim Demaille <akim@epita.fr>
15732
15733 * src/scan-gram.l (id): Can start with an underscore.
15734
15735 2002-07-16 Akim Demaille <akim@epita.fr>
15736
15737 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
15738 Adjust all former `associativity' dependencies.
15739 * src/symtab.c (symbol_new): Default associativity is `undef', not
15740 `right'.
15741 (symbol_check_alias_consistence): Adjust.
15742
15743 2002-07-09 Akim Demaille <akim@epita.fr>
15744
15745 * doc/bison.texinfo: Properly set the ``header'' part.
15746 Use @dircategory ``GNU programming tools'' as per Texinfo's
15747 documentation.
15748 Use @copying.
15749
15750 2002-07-09 Akim Demaille <akim@epita.fr>
15751
15752 * lib/quotearg.h: Protect against multiple inclusions.
15753 * src/location.h (location_t): Add a `file' member.
15754 (LOCATION_RESET, LOCATION_PRINT): Adjust.
15755 * src/complain.c (warn_at, complain_at, fatal_at): Drop
15756 `error_one_per_line' support.
15757
15758 2002-07-09 Akim Demaille <akim@epita.fr>
15759
15760 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
15761 * src/reader.c (lineno): Remove.
15762 Adjust all dependencies.
15763 (get_merge_function): Take a location and use complain_at.
15764 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
15765 * tests/regression.at (Invalid inputs, Mixing %token styles):
15766 Adjust.
15767
15768 2002-07-09 Akim Demaille <akim@epita.fr>
15769
15770 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
15771 recovery rule, and forbid extensions when --yacc.
15772 (gram_error): Use complain_at.
15773 * src/reader.c (reader): Exit if there were parse errors.
15774
15775 2002-07-09 Akim Demaille <akim@epita.fr>
15776
15777 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
15778 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
15779 Reported by R Blake <blakers@mac.com>.
15780
15781 2002-07-09 Akim Demaille <akim@epita.fr>
15782
15783 * data/yacc.c: Output the copyright notive in the header.
15784
15785 2002-07-03 Akim Demaille <akim@epita.fr>
15786
15787 * src/output.c (froms, tos): Are state_number_t.
15788 (save_column): sp, sp1, and sp2 are state_number_t.
15789 (prepare): Rename `final' as `final_state_number', `nnts' as
15790 `nterms_number', `nrules' as `rules_number', `nstates' as
15791 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
15792 unused.
15793 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
15794 * data/lalr1.cc (nsym_): Remove, unused.
15795
15796 2002-07-03 Akim Demaille <akim@epita.fr>
15797
15798 * src/lalr.h, src/lalr.c (goto_number_t): New.
15799 * src/lalr.c (goto_list_t): New.
15800 Propagate them.
15801 * src/nullable.c (rule_list_t): New.
15802 Propagate.
15803 * src/types.h: Remove.
15804
15805 2002-07-03 Akim Demaille <akim@epita.fr>
15806
15807 * src/closure.c (print_fderives): Use rule_rhs_print.
15808 * src/derives.c (print_derives): Use rule_rhs_print.
15809 (rule_list_t): New, replaces `shorts'.
15810 (set_derives): Add comments.
15811 * tests/sets.at (Nullable, Firsts): Adjust.
15812
15813 2002-07-03 Akim Demaille <akim@epita.fr>
15814
15815 * src/output.c (prepare_actions): Free `tally' and `width'.
15816 (prepare_actions): Allocate and free `order'.
15817 * src/symtab.c (symbols_free): Free `symbols'.
15818 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
15819 * src/output.c (m4_invoke): Move to...
15820 * src/scan-skel.l: here.
15821 (<<EOF>>): Close yyout, and free its name.
15822
15823 2002-07-03 Akim Demaille <akim@epita.fr>
15824
15825 Fix some memory leaks, and fix a bug: state 0 was examined twice.
15826
15827 * src/LR0.c (new_state): Merge into...
15828 (state_list_append): this.
15829 (new_states): Merge into...
15830 (generate_states): here.
15831 (set_states): Don't ensure a proper `errs' state member here, do it...
15832 * src/conflicts.c (conflicts_solve): here.
15833 * src/state.h, src/state.c: Comment changes.
15834 (state_t): Rename member `shifts' as `transitions'.
15835 Adjust all dependencies.
15836 (errs_new): For consistency, also take the values as argument.
15837 (errs_dup): Remove.
15838 (state_errs_set): New.
15839 (state_reductions_set, state_transitions_set): Assert that no
15840 previous value was assigned.
15841 (state_free): New.
15842 (states_free): Use it.
15843 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
15844 temporary storage: use `errs' and `nerrs' as elsewhere.
15845 (set_conflicts): Allocate and free this `errs'.
15846
15847 2002-07-02 Akim Demaille <akim@epita.fr>
15848
15849 * lib/libiberty.h: New.
15850 * lib: Update the bitset implementation from upstream.
15851 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
15852 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
15853 * src/main.c: Adjust bitset stats calls.
15854
15855 2002-07-01 Paul Eggert <eggert@twinsun.com>
15856
15857 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
15858 char, so that negative chars don't collide with $.
15859
15860 2002-06-30 Akim Demaille <akim@epita.fr>
15861
15862 Have the GLR tests be `warning' checked, and fix the warnings.
15863
15864 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
15865 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
15866 (yyremoveDeletes): `yyi' and `yyj' are size_t.
15867 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
15868 (yyaddDeferredAction): static.
15869 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
15870 (yyreportParseError): yyprefix is const.
15871 yytokenp is used only when verbose.
15872 (yy__GNUC__): Replace with __GNUC__.
15873 (yypdumpstack): yyi is size_t.
15874 (yypreference): Un-yy local variables and arguments, to avoid
15875 clashes with `yyr1'. Anyway, we are not in the user name space.
15876 (yytname_size): be an int, as is compared with ints.
15877 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
15878 Use them.
15879 * tests/cxx-gram.at: Use quotation to protect $1.
15880 Use AT_COMPILE to enable warnings hunts.
15881 Prototype yylex and yyerror.
15882 `Use' argc.
15883 Include `string.h', not `strings.h'.
15884 Produce and prototype stmtMerge only when used.
15885 yylex takes a location.
15886
15887 2002-06-30 Akim Demaille <akim@epita.fr>
15888
15889 We spend a lot of time in quotearg, in particular when --verbose.
15890
15891 * src/symtab.c (symbol_get): Store a quoted version of the key.
15892 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
15893 Adjust all callers.
15894
15895 2002-06-30 Akim Demaille <akim@epita.fr>
15896
15897 * src/state.h (reductions_t): Rename member `nreds' as num.
15898 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
15899 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
15900
15901 2002-06-30 Akim Demaille <akim@epita.fr>
15902
15903 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
15904 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
15905 (shifts_to): Rename as...
15906 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
15907 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
15908 (TRANSITION_IS_DISABLED, transitions_to): these.
15909
15910 2002-06-30 Akim Demaille <akim@epita.fr>
15911
15912 * src/print.c (print_shifts, print_gotos): Merge into...
15913 (print_transitions): this.
15914 (print_transitions, print_errs, print_reductions): Align the
15915 lookaheads columns.
15916 (print_core, print_transitions, print_errs, print_state,
15917 print_grammar): Output empty lines separator before, not after.
15918 (state_default_rule_compute): Rename as...
15919 (state_default_rule): this.
15920 * tests/conflicts.at (Defaulted Conflicted Reduction),
15921 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
15922 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
15923
15924 2002-06-30 Akim Demaille <akim@epita.fr>
15925
15926 Display items as we display rules.
15927
15928 * src/gram.h, src/gram.c (rule_lhs_print): New.
15929 * src/gram.c (grammar_rules_partial_print): Use it.
15930 * src/print.c (print_core): Likewise.
15931 * tests/conflicts.at (Defaulted Conflicted Reduction),
15932 (Unresolved SR Conflicts): Adjust.
15933 (Unresolved SR Conflicts): Adjust and rename as...
15934 (Resolved SR Conflicts): this, as was meant.
15935 * tests/regression.at (Web2c Report): Adjust.
15936
15937 2002-06-30 Akim Demaille <akim@epita.fr>
15938
15939 * src/print.c (state_default_rule_compute): New, extracted from...
15940 (print_reductions): here.
15941 Pessimize, but clarify the code.
15942 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
15943
15944 2002-06-30 Akim Demaille <akim@epita.fr>
15945
15946 * src/output.c (action_row): Let default_rule be always a rule
15947 number.
15948
15949 2002-06-30 Akim Demaille <akim@epita.fr>
15950
15951 * src/closure.c (print_firsts, print_fderives, closure):
15952 Use BITSET_EXECUTE.
15953 * src/lalr.c (lookaheads_print): Likewise.
15954 * src/state.c (state_rule_lookaheads_print): Likewise.
15955 * src/print_graph.c (print_core): Likewise.
15956 * src/print.c (print_reductions): Likewise.
15957 * src/output.c (action_row): Likewise.
15958 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
15959
15960 2002-06-30 Akim Demaille <akim@epita.fr>
15961
15962 * src/print_graph.c: Use report_flag.
15963
15964 2002-06-30 Akim Demaille <akim@epita.fr>
15965
15966 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
15967 to...
15968 * src/relation.h, src/relation.c (traverse, relation_digraph)
15969 (relation_print, relation_transpose): New.
15970
15971 2002-06-30 Akim Demaille <akim@epita.fr>
15972
15973 * src/state.h, src/state.c (shifts_to): New.
15974 * src/lalr.c (build_relations): Use it.
15975
15976 2002-06-30 Akim Demaille <akim@epita.fr>
15977
15978 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
15979 (item_number_of_rule_number, rule_number_of_item_number): New.
15980 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
15981 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
15982 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
15983 Propagate their use.
15984 Much remains to be done, in particular wrt `shorts' from types.h.
15985
15986 2002-06-30 Akim Demaille <akim@epita.fr>
15987
15988 * src/symtab.c (symbol_new): Initialize the `printer' member.
15989
15990 2002-06-30 Akim Demaille <akim@epita.fr>
15991
15992 * src/LR0.c (save_reductions): Remove, replaced by...
15993 * src/state.h, src/state.c (state_reductions_set): New.
15994 (reductions, errs): Rename as...
15995 (reductions_t, errs_t): these.
15996 Adjust all dependencies.
15997
15998 2002-06-30 Akim Demaille <akim@epita.fr>
15999
16000 * src/LR0.c (state_list_t, state_list_append): New.
16001 (first_state, last_state): Now symbol_list_t.
16002 (this_state): Remove.
16003 (new_itemsets, append_states, save_reductions): Take a state_t as
16004 argument.
16005 (set_states, generate_states): Adjust.
16006 (save_shifts): Remove, replaced by...
16007 * src/state.h, src/state.c (state_shifts_set): New.
16008 (shifts): Rename as...
16009 (shifts_t): this.
16010 Adjust all dependencies.
16011 * src/state.h (state_t): Remove the `next' member.
16012
16013 2002-06-30 Akim Demaille <akim@epita.fr>
16014
16015 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
16016 escaped in slot 0.
16017
16018 2002-06-30 Akim Demaille <akim@epita.fr>
16019
16020 Use hash.h for the state hash table.
16021
16022 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
16023 (allocate_storage): Use state_hash_new.
16024 (free_storage): Use state_hash_free.
16025 (new_state, get_state): Adjust.
16026 * src/lalr.h, src/lalr.c (states): Move to...
16027 * src/states.h (state_t): Remove the `link' member, no longer
16028 used.
16029 * src/states.h, src/states.c: here.
16030 (state_hash_new, state_hash_free, state_hash_lookup)
16031 (state_hash_insert, states_free): New.
16032 * src/states.c (state_table, state_compare, state_hash): New.
16033 * src/output.c (output_actions): Do not free states now, since we
16034 still need to know the final_state number in `prepare', called
16035 afterwards. Do it...
16036 * src/main.c (main): here: call states_free after `output'.
16037
16038 2002-06-30 Akim Demaille <akim@epita.fr>
16039
16040 * src/state.h, src/state.c (state_new): New, extracted from...
16041 * src/LR0.c (new_state): here.
16042 * src/state.h (STATE_ALLOC): Move to...
16043 * src/state.c: here.
16044 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
16045 * src/state.h, src/state.c: here.
16046
16047 2002-06-30 Akim Demaille <akim@epita.fr>
16048
16049 * src/reader.c (gensym): Rename as...
16050 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
16051 (getsym): Rename as...
16052 (symbol_get): this.
16053
16054 2002-06-30 Akim Demaille <akim@epita.fr>
16055
16056 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
16057 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
16058 * src/output.c, src/print.c, src/print_graph.c: Propagate.
16059 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
16060
16061 2002-06-30 Akim Demaille <akim@epita.fr>
16062
16063 Make the test suite pass with warnings checked.
16064
16065 * tests/actions.at (Printers and Destructors): Improve.
16066 Avoid unsigned vs. signed issues.
16067 * tests/calc.at: Don't exercise the scanner here, do it...
16068 * tests/input.at (Torturing the Scanner): here.
16069
16070 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16071
16072 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
16073 reorganize first lines parallel to yacc.c.
16074
16075 2002-06-28 Akim Demaille <akim@epita.fr>
16076
16077 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
16078 (b4_token_enum, b4_token_defines): New, factored from...
16079 * data/lalr1.cc, data/yacc.c, glr.c: here.
16080
16081 2002-06-28 Akim Demaille <akim@epita.fr>
16082
16083 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
16084 unused variables.
16085 * src/output.c (merger_output): static.
16086
16087 2002-06-28 Akim Demaille <akim@epita.fr>
16088
16089 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
16090 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
16091 pacify GCC.
16092 * src/output.c (save_row): Initialize all the variables to pacify GCC.
16093
16094 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16095
16096 Accumulated changelog for new GLR parsing features.
16097
16098 * src/conflicts.c (count_total_conflicts): Change name to
16099 conflicts_total_count.
16100 * src/conflicts.h: Ditto.
16101 * src/output.c (token_actions): Use the new name.
16102 (output_conflicts): Change conflp => conflict_list_heads, and
16103 confl => conflict_list for better readability.
16104 * data/glr.c: Use the new names.
16105 * NEWS: Add self to GLR announcement.
16106
16107 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
16108
16109 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
16110 Akim Demaille.
16111
16112 * data/bison.glr: Change name to glr.c
16113 * data/glr.c: Renamed from bison.glr.
16114 * data/Makefile.am: Add glr.c
16115
16116 * src/getargs.c:
16117
16118 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
16119 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
16120
16121 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16122
16123 * data/bison.glr: Be sure to restore the
16124 current #line when returning to the skeleton contents after having
16125 exposed the input file's #line.
16126
16127 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16128
16129 * data/bison.glr: Bring up to date with changes to bison.simple.
16130
16131 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16132
16133 * data/bison.glr: Correct definitions that use b4_prefix.
16134 Various reformatting.
16135 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
16136 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
16137 yytokenp argument; now part of stack.
16138 (yychar): Define to behave as documented.
16139 (yyclearin): Ditto.
16140
16141 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16142
16143 * src/reader.h: Add declaration for free_merger_functions.
16144
16145 * src/reader.c (merge_functions): New variable.
16146 (get_merge_function): New function.
16147 (free_merger_functions): New function.
16148 (readgram): Check for %prec that is not followed by a symbol.
16149 Handle %dprec and %merge declarations.
16150 (packgram): Initialize dprec and merger fields in rules array.
16151
16152 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
16153 conflict_list_cnt, conflict_list_free): New variables.
16154 (table_grow): Also grow conflict_table.
16155 (prepare_rules): Output dprec and merger tables.
16156 (conflict_row): New function.
16157 (action_row): Output conflict lists for GLR parser. Don't use
16158 default reduction in conflicted states for GLR parser so that there
16159 are spaces for the conflict lists.
16160 (save_row): Also save conflict information.
16161 (token_actions): Allocate conflict list.
16162 (merger_output): New function.
16163 (pack_vector): Pack conflict table, too.
16164 (output_conflicts): New function to output yyconflp and yyconfl.
16165 (output_check): Allocate conflict_tos.
16166 (output_actions): Output conflict tables, also.
16167 (output_skeleton): Output b4_mergers definition.
16168 (prepare): Output b4_max_rhs_length definition.
16169 Use 'bison.glr' as default skeleton for GLR parsers.
16170
16171 * src/gram.c (glr_parser): New flag.
16172 (grammar_free): Call free_merger_functions.
16173
16174 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
16175 all pairs of conflicting reductions, rather than just all tokens
16176 causing conflicts. Needed to size conflict tables.
16177 (conflicts_output): Modify call to count_rr_conflicts for new
16178 interface.
16179 (conflicts_print): Ditto.
16180 (count_total_conflicts): New function.
16181
16182 * src/reader.h (merger_list): New type.
16183 (merge_functions): New variable.
16184
16185 * src/lex.h (tok_dprec, tok_merge): New token types.
16186
16187 * src/gram.h (rule_s): Add dprec and merger fields.
16188 (glr_parser): New flag.
16189
16190 * src/conflicts.h (count_total_conflicts): New function.
16191
16192 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
16193
16194 * doc/bison.texinfo (Generalized LR Parsing): New section.
16195 (GLR Parsers): New section.
16196 (Language and Grammar): Mention GLR parsing.
16197 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
16198 Correct typo ("tge" -> "the").
16199
16200 * data/bison.glr: New skeleton for GLR parsing.
16201
16202 * tests/cxx-gram.at: New tests for GLR parsing.
16203
16204 * tests/testsuite.at: Include cxx-gram.at.
16205
16206 * tests/Makefile.am: Add cxx-gram.at.
16207
16208 * src/parse-gram.y:
16209
16210 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
16211
16212 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
16213
16214 2002-06-27 Akim Demaille <akim@epita.fr>
16215
16216 * src/options.h, src/options.c: Remove.
16217 * src/getargs.c (short_options, long_options): New.
16218
16219 2002-06-27 Akim Demaille <akim@epita.fr>
16220
16221 * data/bison.simple, data/bison.c++: Rename as...
16222 * data/yacc.c, data/lalr1.cc: these.
16223 * doc/bison.texinfo (Environment Variables): Remove.
16224
16225 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
16226
16227 * src/getargs.c (report_argmatch): Initialize strtok().
16228
16229 2002-06-20 Akim Demaille <akim@epita.fr>
16230
16231 * data/bison.simple (b4_symbol_actions): New, replaces...
16232 (b4_symbol_destructor, b4_symbol_printer): these.
16233 (yysymprint): Be sure to call YYPRINT only for tokens, and using
16234 user token numbers.
16235
16236 2002-06-20 Akim Demaille <akim@epita.fr>
16237
16238 * data/bison.simple (yydestructor): Rename as...
16239 (yydestruct): this.
16240
16241 2002-06-20 Akim Demaille <akim@epita.fr>
16242
16243 * src/symtab.h, src/symtab.c (symbol_type_set)
16244 (symbol_destructor_set, symbol_precedence_set): The location is
16245 the last argument.
16246 Adjust all callers.
16247
16248 2002-06-20 Akim Demaille <akim@epita.fr>
16249
16250 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
16251 internals.
16252 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
16253 Takes a location.
16254 * src/symtab.h, src/symtab.c (symbol_class_set)
16255 (symbol_user_token_number_set): Likewise.
16256 Adjust all callers.
16257 Promote complain_at.
16258 * tests/input.at (Type Clashes): Adjust.
16259
16260 2002-06-20 Akim Demaille <akim@epita.fr>
16261
16262 * data/bison.simple (YYLEX): Fix the declaration when
16263 %pure-parser.
16264
16265 2002-06-20 Akim Demaille <akim@epita.fr>
16266
16267 * data/bison.simple (yysymprint): Don't print the token number,
16268 just its name.
16269 * tests/actions.at (Destructors): Rename as...
16270 (Printers and Destructors): this.
16271 Also exercise %printer.
16272
16273 2002-06-20 Akim Demaille <akim@epita.fr>
16274
16275 * data/bison.simple (YYDSYMPRINT): New.
16276 Use it to remove many of the #if YYDEBUG/if (yydebug).
16277
16278 2002-06-20 Akim Demaille <akim@epita.fr>
16279
16280 * src/symtab.h, src/symtab.c (symbol_t): printer and
16281 printer_location are new members.
16282 (symbol_printer_set): New.
16283 * src/parse-gram.y (PERCENT_PRINTER): New token.
16284 Handle its associated rule.
16285 * src/scan-gram.l: Adjust.
16286 (handle_destructor_at, handle_destructor_dollar): Rename as...
16287 (handle_symbol_code_at, handle_symbol_code_dollar): these.
16288 * src/output.c (symbol_printers_output): New.
16289 (output_skeleton): Call it.
16290 * data/bison.simple (yysymprint): New. Cannot be named yyprint
16291 since there are already many grammar files with a user `yyprint'.
16292 Replace the calls to YYPRINT to calls to yysymprint.
16293 * tests/calc.at: Adjust.
16294 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
16295 taking advantage of parser very internal details (stack size!).
16296
16297 2002-06-20 Akim Demaille <akim@epita.fr>
16298
16299 * src/scan-gram.l: Complete the scanner with the missing patterns
16300 to pacify Flex.
16301 Use `quote' and `symbol_tag_get' where appropriate.
16302
16303 2002-06-19 Akim Demaille <akim@epita.fr>
16304
16305 * tests/actions.at (Destructors): Augment to test locations.
16306 * data/bison.simple (yydestructor): Pass it the current location
16307 if locations are enabled.
16308 Prototype only when __STDC__ or C++.
16309 Change the argument names to move into the yy name space: there is
16310 user code here.
16311
16312 2002-06-19 Akim Demaille <akim@epita.fr>
16313
16314 * data/bison.simple (b4_pure_if): New.
16315 Use it instead of #ifdef YYPURE.
16316
16317 2002-06-19 Akim Demaille <akim@epita.fr>
16318
16319 * data/bison.simple (b4_location_if): New.
16320 Use it instead of #ifdef YYLSP_NEEDED.
16321
16322 2002-06-19 Akim Demaille <akim@epita.fr>
16323
16324 Prepare @$ in %destructor, but currently don't bind it in the
16325 skeleton, as %location use is not cleaned up yet.
16326
16327 * src/scan-gram.l (handle_dollar, handle_destructor_at)
16328 (handle_action_at): New.
16329 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
16330 a braced_code_t and a location as additional arguments.
16331 (handle_destructor_dollar): Instead of requiring `b4_eval', just
16332 unquote one when outputting `b4_dollar_dollar'.
16333 Adjust callers.
16334 * data/bison.simple (b4_eval): Remove.
16335 (b4_symbol_destructor): Adjust.
16336 * tests/input.at (Invalid @n): Adjust.
16337
16338 2002-06-19 Zack Weinberg <zack@codesourcery.com>
16339
16340 * doc/bison.texinfo: Document ability to have multiple
16341 prologue sections.
16342
16343 2002-06-18 Akim Demaille <akim@epita.fr>
16344
16345 * src/files.c (compute_base_names): When computing the output file
16346 names from the input file name, strip the directory part.
16347
16348 2002-06-18 Akim Demaille <akim@epita.fr>
16349
16350 * data/bison.simple.new: Comment changes.
16351 Reported by Andreas Schwab.
16352
16353 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
16354
16355 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
16356 there are no `label `yyoverflowlab' defined but not used' warnings
16357 when yyoverflow is defined.
16358
16359 2002-06-18 Akim Demaille <akim@epita.fr>
16360
16361 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
16362 new member.
16363 (symbol_destructor_set): Adjust.
16364 * src/output.c (symbol_destructors_output): Output the destructor
16365 locations.
16366 Output the symbol name.
16367 * data/bison.simple (b4_symbol_destructor): Adjust.
16368
16369 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
16370 and Akim Demaille <akim@epita.fr>
16371
16372 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
16373 what's left on the stack when the error recovery hits EOF.
16374 * tests/actions.at (Destructors): Complete to exercise this case.
16375
16376 2002-06-17 Akim Demaille <akim@epita.fr>
16377
16378 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
16379 arguments is really empty, not only equal to `[]'.
16380 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
16381 member.
16382 (symbol_destructor_set): New.
16383 * src/output.c (symbol_destructors_output): New.
16384 * src/reader.h (brace_code_t, current_braced_code): New.
16385 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
16386 (handle_dollar): Rename as...
16387 (handle_action_dollar): this.
16388 (handle_destructor_dollar): New.
16389 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
16390 (grammar_declaration): Use it.
16391 * data/bison.simple (yystos): Is always defined.
16392 (yydestructor): New.
16393 * tests/actions.at (Destructors): New.
16394 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
16395
16396 2002-06-17 Akim Demaille <akim@epita.fr>
16397
16398 * src/symlist.h, src/symlist.c (symbol_list_length): New.
16399 * src/scan-gram.l (handle_dollar, handle_at): Compute the
16400 rule_length only when needed.
16401 * src/output.c (actions_output, token_definitions_output): Output
16402 the full M4 block.
16403 * src/symtab.c: Don't access directly to the symbol tag, use
16404 symbol_tag_get.
16405 * src/parse-gram.y: Use symbol_list_free.
16406
16407 2002-06-17 Akim Demaille <akim@epita.fr>
16408
16409 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
16410 (symbol_list_prepend, get_type_name): Move to...
16411 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
16412 (symbol_list_prepend, symbol_list_n_type_name_get): here.
16413 Adjust all callers.
16414 (symbol_list_free): New.
16415 * src/scan-gram.l (handle_dollar): Takes a location.
16416 * tests/input.at (Invalid $n): Adjust.
16417
16418 2002-06-17 Akim Demaille <akim@epita.fr>
16419
16420 * src/reader.h, src/reader.c (symbol_list_new): Export it.
16421 (symbol_list_prepend): New.
16422 * src/parse-gram.y (%union): `list' is a new member.
16423 (symbols.1): New, replaces...
16424 (terms_to_prec.1, nterms_to_type.1): these.
16425 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
16426 Take a location as additional argument.
16427 Adjust all callers.
16428
16429 2002-06-15 Akim Demaille <akim@epita.fr>
16430
16431 * src/parse-gram.y: Move %token in the declaration section so that
16432 we don't depend upon CVS Bison.
16433
16434 2002-06-15 Akim Demaille <akim@epita.fr>
16435
16436 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
16437 * src/print.c (print_core): Use it.
16438
16439 2002-06-15 Akim Demaille <akim@epita.fr>
16440
16441 * src/conflicts.c (log_resolution): Accept the rule involved in
16442 the sr conflicts instead of the lookahead number that points to
16443 that rule.
16444 (flush_reduce): Accept the current lookahead vector as argument,
16445 instead of the index in LA.
16446 (resolve_sr_conflict): Accept the current number of lookahead
16447 bitset to consider for the STATE, instead of the index in LA.
16448 (set_conflicts): Adjust.
16449 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
16450
16451 2002-06-15 Akim Demaille <akim@epita.fr>
16452
16453 * src/state.h (state_t): Replace the `lookaheadsp' member, a
16454 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
16455 Adjust all dependencies.
16456 * src/lalr.c (initialize_lookaheads): Split into...
16457 (states_lookaheads_count, states_lookaheads_initialize): these.
16458 (lalr): Adjust.
16459
16460 2002-06-15 Akim Demaille <akim@epita.fr>
16461
16462 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
16463 out of...
16464 (grammar_rules_print): here.
16465 * src/reduce.c (reduce_output): Use it.
16466 * tests/reduce.at (Useless Rules, Reduced Automaton)
16467 (Underivable Rules): Adjust.
16468
16469 2002-06-15 Akim Demaille <akim@epita.fr>
16470
16471 Copy BYacc's nice way to report the grammar.
16472
16473 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
16474 New.
16475 Don't print the rules' location, it is confusing and useless.
16476 (rule_print): Use grammar_rhs_print.
16477 * src/print.c (print_grammar): Use grammar_rules_print.
16478
16479 2002-06-15 Akim Demaille <akim@epita.fr>
16480
16481 Complete and rationalize `useless thing' warnings.
16482
16483 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
16484 (symbol_tag_print): New.
16485 Use them everywhere in place of accessing directly the tag member.
16486 * src/gram.h, src/gram.c (rule_print): New.
16487 Use it where a rule used to be printed `by hand'.
16488 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
16489 (reduce_grammar_tables): Report the useless rules.
16490 (reduce_print): Useless things are a warning, not an error.
16491 Report it as such.
16492 * tests/reduce.at (Useless Nonterminals, Useless Rules):
16493 (Reduced Automaton, Underivable Rules): Adjust.
16494 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
16495 * tests/conflicts.at (Unresolved SR Conflicts)
16496 (Solved SR Conflicts): Adjust.
16497
16498 2002-06-15 Akim Demaille <akim@epita.fr>
16499
16500 Let symbols have a location.
16501
16502 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
16503 (getsym): Adjust.
16504 Adjust all callers.
16505 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
16506 Use location_t, not int.
16507 * src/symtab.c (symbol_check_defined): Take advantage of the
16508 location.
16509 * tests/regression.at (Invalid inputs): Adjust.
16510
16511 2002-06-15 Akim Demaille <akim@epita.fr>
16512
16513 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
16514 (input): Don't try to initialize yylloc here, do it in the
16515 scanner.
16516 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
16517 * src/gram.h (rule_t): Change line and action_line into location
16518 and action_location, of location_t type.
16519 Adjust all dependencies.
16520 * src/location.h, src/location.c (empty_location): New.
16521 * src/reader.h, src/reader.c (grammar_start_symbol_set)
16522 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
16523 (grammar_current_rule_symbol_append)
16524 (grammar_current_rule_action_append): Expect a location as argument.
16525 * src/reader.c (grammar_midrule_action): Adjust to attach an
16526 action's location as dummy symbol location.
16527 * src/symtab.h, src/symtab.c (startsymbol_location): New.
16528 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
16529 the line numbers.
16530
16531 2002-06-14 Akim Demaille <akim@epita.fr>
16532
16533 Grammar declarations may be found in the grammar section.
16534
16535 * src/parse-gram.y (rules_or_grammar_declaration): New.
16536 (declarations): Each declaration may end with a semicolon, not
16537 just...
16538 (grammar_declaration): `"%union"'.
16539 (grammar): Branch to rules_or_grammar_declaration.
16540
16541 2002-06-14 Akim Demaille <akim@epita.fr>
16542
16543 * src/main.c (main): Invoke scanner_free.
16544
16545 2002-06-14 Akim Demaille <akim@epita.fr>
16546
16547 * src/output.c (m4_invoke): Extracted from...
16548 (output_skeleton): here.
16549 Free tempfile.
16550
16551 2002-06-14 Akim Demaille <akim@epita.fr>
16552
16553 * src/parse-gram.y (directives, directive, gram)
16554 (grammar_directives, precedence_directives, precedence_directive):
16555 Rename as...
16556 (declarations, declaration, grammar, grammar_declaration)
16557 (precedence_declaration, precedence_declarator): these.
16558 (symbol_declaration): New.
16559
16560 2002-06-14 Akim Demaille <akim@epita.fr>
16561
16562 * src/files.c (action_obstack): Remove, unused.
16563 (output_obstack): Remove it, and all its dependencies, as it is no
16564 longer needed.
16565 * src/reader.c (epilogue_set): Build the epilogue in the
16566 muscle_obstack.
16567 * src/output.h, src/output.c (muscle_obstack): Move to...
16568 * src/muscle_tab.h, src/muscle_tab.h: here.
16569 (muscle_init): Initialize muscle_obstack.
16570 (muscle_free): New.
16571 * src/main.c (main): Call it.
16572
16573 2002-06-14 Akim Demaille <akim@epita.fr>
16574
16575 * src/location.h: New, extracted from...
16576 * src/reader.h: here.
16577 * src/Makefile.am (noinst_HEADERS): Merge into
16578 (bison_SOURCES): this.
16579 Add location.h.
16580 * src/parse-gram.y: Use location_t instead of Bison's.
16581 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
16582 Use location_t instead of ints.
16583
16584 2002-06-14 Akim Demaille <akim@epita.fr>
16585
16586 * data/bison.simple, data/bison.c++: Be sure to restore the
16587 current #line when returning to the skeleton contents after having
16588 exposed the input file's #line.
16589
16590 2002-06-12 Akim Demaille <akim@epita.fr>
16591
16592 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
16593 eager.
16594 * tests/actions.at (Exotic Dollars): New.
16595
16596 2002-06-12 Akim Demaille <akim@epita.fr>
16597
16598 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
16599 ['"/] too eagerly.
16600 * tests/input.at (Torturing the Scanner): New.
16601
16602 2002-06-11 Akim Demaille <akim@epita.fr>
16603
16604 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
16605 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
16606 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
16607 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
16608 * src/reader.c (reader): Use it.
16609
16610 2002-06-11 Akim Demaille <akim@epita.fr>
16611
16612 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
16613 Adjust all callers.
16614 (scanner_last_string_free): New.
16615
16616 2002-06-11 Akim Demaille <akim@epita.fr>
16617
16618 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
16619 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
16620 (last_string, YY_OBS_FREE): New.
16621 Use them when returning an ID.
16622
16623 2002-06-11 Akim Demaille <akim@epita.fr>
16624
16625 Have Bison grammars parsed by a Bison grammar.
16626
16627 * src/reader.c, src/reader.h (prologue_augment): New.
16628 * src/reader.c (copy_definition): Remove.
16629
16630 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
16631 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
16632 (grammar_current_rule_prec_set, grammar_current_rule_check)
16633 (grammar_current_rule_symbol_append)
16634 (grammar_current_rule_action_append): Export.
16635 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
16636 (symbol_list_action_append): Remove.
16637 Hook the routines from reader.
16638 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
16639 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
16640
16641 * src/reader.c (read_declarations): Remove, unused.
16642
16643 * src/parse-gram.y: Handle the epilogue.
16644 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
16645 (grammar_start_symbol_set): this.
16646 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
16647 * src/reader.c (readgram): Remove, unused.
16648 (reader): Adjust to insert eoftoken and axiom where appropriate.
16649
16650 * src/reader.c (copy_dollar): Replace with...
16651 * src/scan-gram.h (handle_dollar): this.
16652 * src/parse-gram.y: Remove `%thong'.
16653
16654 * src/reader.c (copy_at): Replace with...
16655 * src/scan-gram.h (handle_at): this.
16656
16657 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
16658 New.
16659
16660 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
16661 time being.
16662
16663 * src/reader.h, src/reader.c (grammar_rule_end): New.
16664
16665 * src/parse.y (current_type, current_class): New.
16666 Implement `%nterm', `%token' support.
16667 Merge `%term' into `%token'.
16668 (string_as_id): New.
16669 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
16670 type name.
16671
16672 * src/parse-gram.y: Be sure to handle properly the beginning of
16673 rules.
16674
16675 * src/parse-gram.y: Handle %type.
16676 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
16677
16678 * src/parse-gram.y: More directives support.
16679 * src/options.c: No longer handle source directives.
16680
16681 * src/parse-gram.y: Fix %output.
16682
16683 * src/parse-gram.y: Handle %union.
16684 Use the prologue locations.
16685 * src/reader.c (parse_union_decl): Remove.
16686
16687 * src/reader.h, src/reader.c (epilogue_set): New.
16688 * src/parse-gram.y: Use it.
16689
16690 * data/bison.simple, data/bison.c++: b4_stype is now either not
16691 defined, then default to int, or to the contents of %union,
16692 without `union' itself.
16693 Adjust.
16694 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
16695
16696 * src/output.c (actions_output): Don't output braces, as they are
16697 already handled by the scanner.
16698
16699 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
16700 characters to themselves.
16701
16702 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
16703 that the epilogue has a proper #line.
16704
16705 * src/parse-gram.y: Handle precedence/associativity.
16706
16707 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
16708 a terminal.
16709 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
16710 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
16711 at all to define terminals that cannot be emitted.
16712
16713 * src/scan-gram.l: Escape M4 characters.
16714
16715 * src/scan-gram.l: Working properly with escapes in user
16716 strings/characters.
16717
16718 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
16719 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
16720 grammar.
16721 Use more modest sizes, as for the time being the parser does not
16722 release memory, and therefore the process swallows a huge amount
16723 of memory.
16724
16725 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
16726 stricter %token grammar.
16727
16728 * src/symtab.h (associativity): Add `undef_assoc'.
16729 (symbol_precedence_set): Do nothing when passed an undef_assoc.
16730 * src/symtab.c (symbol_check_alias_consistence): Adjust.
16731
16732 * tests/regression.at (Invalid %directive): Remove, as it is now
16733 meaningless.
16734 (Invalid inputs): Adjust to the new error messages.
16735 (Token definitions): The new grammar doesn't allow too many
16736 eccentricities.
16737
16738 * src/lex.h, src/lex.c: Remove.
16739 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
16740 (copy_character, copy_string2, copy_string, copy_identifier)
16741 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
16742 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
16743 (parse_action): Remove.
16744 * po/POTFILES.in: Adjust.
16745
16746 2002-06-11 Akim Demaille <akim@epita.fr>
16747
16748 * src/reader.c (parse_action): Don't store directly into the
16749 rule's action member: return the action as a string.
16750 Don't require `rule_length' as an argument: compute it.
16751 (grammar_current_rule_symbol_append)
16752 (grammar_current_rule_action_append): New, eved out from
16753 (readgram): here.
16754 Remove `action_flag', `rulelength', unused now.
16755
16756 2002-06-11 Akim Demaille <akim@epita.fr>
16757
16758 * src/reader.c (grammar_current_rule_prec_set).
16759 (grammar_current_rule_check): New, eved out from...
16760 (readgram): here.
16761 Remove `xaction', `first_rhs': useless.
16762 * tests/input.at (Type clashes): New.
16763 * tests/existing.at (GNU Cim Grammar): Adjust.
16764
16765 2002-06-11 Akim Demaille <akim@epita.fr>
16766
16767 * src/reader.c (grammar_midrule_action): New, Eved out from
16768 (readgram): here.
16769
16770 2002-06-11 Akim Demaille <akim@epita.fr>
16771
16772 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
16773 New.
16774 (readgram): Use them as replacement of inlined code, crule and
16775 crule1.
16776
16777 2002-06-11 Akim Demaille <akim@epita.fr>
16778
16779 * src/reader.c (grammar_end, grammar_symbol_append): New.
16780 (readgram): Use them.
16781 Make the use of `p' as local as possible.
16782
16783 2002-06-10 Akim Demaille <akim@epita.fr>
16784
16785 GCJ's parser requires the tokens to be defined before the prologue.
16786
16787 * data/bison.simple: Output the token definition before the user's
16788 prologue.
16789 * tests/regression.at (Braces parsing, Duplicate string)
16790 (Mixing %token styles): Check the output from bison.
16791 (Early token definitions): New.
16792
16793 2002-06-10 Akim Demaille <akim@epita.fr>
16794
16795 * src/symtab.c (symbol_user_token_number_set): Don't complain when
16796 assigning twice the same user number to a token, so that we can
16797 use it in...
16798 * src/lex.c (lex): here.
16799 Also use `symbol_class_set' instead of hand written code.
16800 * src/reader.c (parse_assoc_decl): Likewise.
16801
16802 2002-06-10 Akim Demaille <akim@epita.fr>
16803
16804 * src/symtab.c, src/symtab.c (symbol_class_set)
16805 (symbol_user_token_number_set): New.
16806 * src/reader.c (parse_token_decl): Use them.
16807 Use a switch instead of ifs.
16808 Use a single argument.
16809
16810 2002-06-10 Akim Demaille <akim@epita.fr>
16811
16812 Remove `%thong' support as it is undocumented, unused, duplicates
16813 `%token's job, and creates useless e-mail traffic with people who
16814 want to know what it is, why it is undocumented, unused, and
16815 duplicates `%token's job.
16816
16817 * src/reader.c (parse_thong_decl): Remove.
16818 * src/options.c (option_table): Remove "thong".
16819 * src/lex.h (tok_thong): Remove.
16820
16821 2002-06-10 Akim Demaille <akim@epita.fr>
16822
16823 * src/symtab.c, src/symtab.c (symbol_type_set)
16824 (symbol_precedence_set): New.
16825 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
16826 (value_components_used): Remove, unused.
16827
16828 2002-06-09 Akim Demaille <akim@epita.fr>
16829
16830 Move symbols handling code out of the reader.
16831
16832 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
16833 (axiom): Move to...
16834 * src/symtab.h, src/symtab.c: here.
16835
16836 * src/gram.c (start_symbol): Remove: use startsymbol->number.
16837 * src/reader.c (startval): Rename as...
16838 * src/symtab.h, src/symtab.c (startsymbol): this.
16839 * src/reader.c: Adjust.
16840
16841 * src/reader.c (symbol_check_defined, symbol_make_alias)
16842 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
16843 (token_translations_init)
16844 Move to...
16845 * src/symtab.c: here.
16846 * src/reader.c (packsymbols): Move to...
16847 * src/symtab.h, src/symtab.c (symbols_pack): here.
16848 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
16849 argument.
16850
16851 2002-06-03 Akim Demaille <akim@epita.fr>
16852
16853 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
16854 then statements.
16855
16856 2002-06-03 Akim Demaille <akim@epita.fr>
16857
16858 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
16859 structs with non literals.
16860 * src/scan-skel.l: never-interactive.
16861 * src/conflicts.c (enum conflict_resolution_e): No trailing
16862 comma.
16863 * src/getargs.c (usage): Split long literal strings.
16864 Reported by Hans Aberg.
16865
16866 2002-05-28 Akim Demaille <akim@epita.fr>
16867
16868 * data/bison.c++: Use C++ ostreams.
16869 (cdebug_): New member.
16870
16871 2002-05-28 Akim Demaille <akim@epita.fr>
16872
16873 * src/output.c (output_skeleton): Be sure to allocate enough room
16874 for `/' _and_ for `\0' in full_skeleton.
16875
16876 2002-05-28 Akim Demaille <akim@epita.fr>
16877
16878 * data/bison.c++: Catch up with bison.simple:
16879 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16880 and Paul Eggert <eggert@twinsun.com>: `error' handing.
16881 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
16882 and popping traces.
16883
16884 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16885
16886 * src/output.c (output_skeleton): Put an explicit path in front of
16887 the skeleton file name, rather than relying on the -I directory,
16888 to partially alleviate effects of having a skeleton file lying around
16889 in the current directory.
16890
16891 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16892
16893 * src/conflicts.c (log_resolution): Correct typo:
16894 obstack_printf should be obstack_fgrow1.
16895
16896 2002-05-26 Akim Demaille <akim@epita.fr>
16897
16898 * src/state.h (state_t): `solved_conflicts' is a new member.
16899 * src/LR0.c (new_state): Set it to 0.
16900 * src/conflicts.h, src/conflicts.c (print_conflicts)
16901 (free_conflicts, solve_conflicts): Rename as...
16902 (conflicts_print, conflicts_free, conflicts_solve): these.
16903 Adjust callers.
16904 * src/conflicts.c (enum conflict_resolution_e)
16905 (solved_conflicts_obstack): New, used by...
16906 (log_resolution): this.
16907 Adjust to attach the conflict resolution to each state.
16908 Complete the description with the precedence/associativity
16909 information.
16910 (resolve_sr_conflict): Adjust.
16911 * src/print.c (print_state): Output its solved_conflicts.
16912 * tests/conflicts.at (Unresolved SR Conflicts)
16913 (Solved SR Conflicts): Exercise --report=all.
16914
16915 2002-05-26 Akim Demaille <akim@epita.fr>
16916
16917 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
16918 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
16919 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
16920 (token_number_t, item_number_as_token_number)
16921 (token_number_as_item_number, muscle_insert_token_number_table):
16922 Rename as...
16923 (symbol_number_t, item_number_as_symbol_number)
16924 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
16925 these, since it is more appropriate.
16926
16927 2002-05-26 Akim Demaille <akim@epita.fr>
16928
16929 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
16930 `Error:' lines.
16931 * data/bison.simple (yystos) [YYDEBUG]: New.
16932 (yyparse) [YYDEBUG]: Display the symbols which are popped during
16933 error recovery.
16934 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
16935
16936 2002-05-25 Akim Demaille <akim@epita.fr>
16937
16938 * doc/bison.texinfo (Debugging): Split into...
16939 (Tracing): this new section, its former contents, and...
16940 (Understanding): this new section.
16941 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
16942 by...
16943 (report_flag): this.
16944 Adjust all dependencies.
16945 (report_args, report_types, report_argmatch): New.
16946 (usage, getargs): Report/support -r, --report.
16947 * src/options.h
16948 (struct option_table_struct): Rename as..,
16949 (struct option_table_s): this.
16950 Rename the `set_flag' member to `flag' to match with getopt_long's
16951 struct.
16952 * src/options.c (option_table): Split verbose into an entry for
16953 %verbose, and another for --verbose.
16954 Support --report/-r, so remove -r from the obsolete --raw.
16955 * src/print.c: Attach full item sets and lookaheads reports to
16956 report_flag instead of trace_flag.
16957 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
16958
16959 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16960 and Paul Eggert <eggert@twinsun.com>
16961
16962 * data/bison.simple (yyparse): Correct error handling to conform to
16963 POSIX and yacc. Specifically, after syntax error is discovered,
16964 do not reduce further before shifting the error token.
16965 Clean up the code a bit by removing the labels yyerrdefault,
16966 yyerrhandle, yyerrpop.
16967 * NEWS: Document the above.
16968
16969 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16970
16971 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
16972 type; it isn't always big enough, since it doesn't necessarily
16973 include non-terminals.
16974 (yytranslate): Expand definition of yy_token_number_type, so that
16975 the latter can be removed.
16976 (yy_token_number_type): Remove, only one use.
16977 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
16978 don't use TokenNumberType as element type.
16979
16980 * tests/regression.at: Modify expected output to agree with change
16981 to yyr1 and yytranslate.
16982
16983 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
16984
16985 * src/reader.c (parse_action): Use copy_character instead of
16986 obstack_1grow.
16987
16988 2002-05-13 Akim Demaille <akim@epita.fr>
16989
16990 * tests/regression.at (Token definitions): Prototype yylex and
16991 yyerror.
16992
16993 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16994
16995 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
16996 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
16997 32-bit arithmetic.
16998 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
16999
17000 2002-05-07 Akim Demaille <akim@epita.fr>
17001
17002 * tests/synclines.at: Be sure to prototype yylex and yyerror to
17003 avoid GCC warnings.
17004
17005 2002-05-07 Akim Demaille <akim@epita.fr>
17006
17007 Kill GCC warnings.
17008
17009 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
17010 over the RHS of each rule.
17011 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
17012 * src/state.h (state_t): Member `nitems' is unsigned short.
17013 * src/LR0.c (get_state): Adjust.
17014 * src/reader.c (packgram): Likewise.
17015 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
17016 `Type'.
17017 (muscle_insert_int_table): Remove, unused.
17018 (prepare_rules): Remove `max'.
17019
17020 2002-05-06 Akim Demaille <akim@epita.fr>
17021
17022 * src/closure.c (print_firsts): Display of the symbol tags.
17023 (bitmatrix_print): Move to...
17024 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
17025 here.
17026 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
17027
17028 2002-05-06 Akim Demaille <akim@epita.fr>
17029
17030 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
17031 hash_do_for_each.
17032
17033 2002-05-06 Akim Demaille <akim@epita.fr>
17034
17035 * src/LR0.c (new_state, get_state): Instead of using the global
17036 `kernel_size' and `kernel_base', have two new arguments:
17037 `core_size' and `core'.
17038 Adjust callers.
17039
17040 2002-05-06 Akim Demaille <akim@epita.fr>
17041
17042 * src/reader.c (packgram): No longer end `ritem' with a 0
17043 sentinel: it is not used.
17044
17045 2002-05-05 Akim Demaille <akim@epita.fr>
17046
17047 New experimental feature: display the lookaheads in the report and
17048 graph.
17049
17050 * src/print (print_core): When --trace-flag, display the rules
17051 lookaheads.
17052 * src/print_graph.c (print_core): Likewise.
17053 Swap the arguments.
17054 Adjust caller.
17055
17056 2002-05-05 Akim Demaille <akim@epita.fr>
17057
17058 * tests/torture.at (Many lookaheads): New test.
17059
17060 2002-05-05 Akim Demaille <akim@epita.fr>
17061
17062 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
17063 (GENERATE_MUSCLE_INSERT_TABLE): this.
17064 (output_int_table, output_unsigned_int_table, output_short_table)
17065 (output_token_number_table, output_item_number_table): Replace with...
17066 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
17067 (muscle_insert_short_table, muscle_insert_token_number_table)
17068 (muscle_insert_item_number_table): these.
17069 Adjust all callers.
17070 (prepare_tokens): Don't free `translations', since...
17071 * src/reader.h, src/reader.c (grammar_free): do it.
17072 Move to...
17073 * src/gram.h, src/gram.c (grammar_free): here.
17074 * data/bison.simple, data/bison.c++: b4_token_number_max is now
17075 b4_translate_max.
17076
17077 2002-05-05 Akim Demaille <akim@epita.fr>
17078
17079 * src/output.c (output_unsigned_int_table): New.
17080 (prepare_rules): `i' is unsigned.
17081 `prhs', `rline', `r2' are unsigned int.
17082 Rename muscle `rhs_number_max' as `rhs_max'.
17083 Output muscles `prhs_max', `rline_max', and `r2_max'.
17084 Free rline and r1.
17085 * data/bison.simple, data/bison.c++: Adjust to use these muscles
17086 to compute types instead of constant types.
17087 * tests/regression.at (Web2c Actions): Adjust.
17088
17089 2002-05-04 Akim Demaille <akim@epita.fr>
17090
17091 * src/symtab.h (SALIAS, SUNDEF): Rename as...
17092 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
17093 Adjust dependencies.
17094 * src/output.c (token_definitions_output): Be sure not to output a
17095 `#define 'a'' when fed with `%token 'a' "a"'.
17096 * tests/regression.at (Token definitions): New.
17097
17098 2002-05-03 Paul Eggert <eggert@twinsun.com>
17099
17100 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
17101 for K&R C.
17102
17103 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
17104
17105 * Makefile.am (SUBDIRS): Remove intl.
17106 (EXTRA_DIST): Add config/config.rpath.
17107
17108 2002-05-03 Akim Demaille <akim@epita.fr>
17109
17110 * data/bison.simple (m4_if): Don't output empty enums.
17111 And actually, output valid enum definitions :(.
17112
17113 2002-05-03 Akim Demaille <akim@epita.fr>
17114
17115 * configure.bat: Remove, completely obsolete.
17116 * Makefile.am (EXTRA_DIST): Adjust.
17117 Don't distribute config.rpath...
17118 * config/Makefile.am (EXTRA_DIST): Do it.
17119
17120 2002-05-03 Akim Demaille <akim@epita.fr>
17121
17122 * configure.in (GETTEXT_VERSION): New.
17123 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
17124
17125 2002-05-03 Akim Demaille <akim@epita.fr>
17126
17127 * data/bison.simple (b4_token_enum): New.
17128 (b4_token_defines): Use it to output tokens both as #define and
17129 enums.
17130 Suggested by Paul Eggert.
17131 * src/output.c (token_definitions_output): Don't output spurious
17132 white spaces.
17133
17134 2002-05-03 Akim Demaille <akim@epita.fr>
17135
17136 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17137
17138 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
17139
17140 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
17141 Update the stack class, give a try to deque as the default container.
17142
17143 2002-05-02 Akim Demaille <akim@epita.fr>
17144
17145 * data/bison.simple (yyparse): Do not implement @$ = @1.
17146 (YYLLOC_DEFAULT): Adjust to do it.
17147 * doc/bison.texinfo (Location Default Action): Fix.
17148
17149 2002-05-02 Akim Demaille <akim@epita.fr>
17150
17151 * src/reader.c (parse_braces): Merge into...
17152 (parse_action): this.
17153
17154 2002-05-02 Akim Demaille <akim@epita.fr>
17155
17156 * configure.in (ALL_LINGUAS): Remove.
17157 * po/LINGUAS, hr.po: New.
17158
17159 2002-05-02 Akim Demaille <akim@epita.fr>
17160
17161 Remove the so called hairy (semantic) parsers.
17162
17163 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
17164 * src/gram.h, src/gram.c (semantic_parser): Remove.
17165 (rule_t): Remove the guard and guard_line members.
17166 * src/lex.h (token_t): remove tok_guard.
17167 * src/options.c (option_table): Remove %guard and %semantic_parser
17168 support.
17169 * src/output.c, src/output.h (guards_output): Remove.
17170 (prepare): Adjust.
17171 (token_definitions_output): Don't output the `T'
17172 tokens (???).
17173 (output_skeleton): Don't output the guards.
17174 * src/files.c, src/files.c (attrsfile): Remove.
17175 * src/reader.c (symbol_list): Remove the guard and guard_line
17176 members.
17177 Adjust dependencies.
17178 (parse_guard): Remove.
17179 * data/bison.hairy: Remove.
17180 * doc/bison.texinfo (Environment Variables): Remove occurrences of
17181 BISON_HAIRY.
17182
17183 2002-05-02 Akim Demaille <akim@epita.fr>
17184
17185 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
17186 (parse_guard): Rename the formal argument `stack_offset' as
17187 `rule_length', which is more readable.
17188 Adjust callers.
17189 (copy_at, copy_dollar): Instead of outputting the hard coded
17190 values of $$, $n and so forth, output invocation to b4_lhs_value,
17191 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
17192 Note: this patch partially drops `semantic-parser' support: it
17193 always does `rule_length - n', where semantic parsers ought to
17194 always use `-n'.
17195 * data/bison.simple, data/bison.c++ (b4_lhs_value)
17196 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
17197
17198 2002-05-02 Akim Demaille <akim@epita.fr>
17199
17200 * configure.in (AC_INIT): Bump to 1.49b.
17201 (AM_INIT_AUTOMAKE): Short invocation.
17202
17203 2002-05-02 Akim Demaille <akim@epita.fr>
17204
17205 Version 1.49a.
17206
17207 2002-05-01 Akim Demaille <akim@epita.fr>
17208
17209 * src/skeleton.h: Remove.
17210
17211 2002-05-01 Akim Demaille <akim@epita.fr>
17212
17213 * src/skeleton.h: Fix the #endif.
17214 Reported by Magnus Fromreide.
17215
17216 2002-04-26 Paul Eggert <eggert@twinsun.com>
17217
17218 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
17219 Define if we define YYSTYPE and YYLTYPE, respectively.
17220 (YYCOPY): Fix [] quoting problem in the non-GCC case.
17221
17222 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
17223
17224 * src/scan-skel.l: Postprocess quadrigraphs.
17225
17226 * src/reader.c (copy_character): New function, used to output
17227 single characters while replacing `[' and `]' with quadrigraphs, to
17228 avoid troubles with M4 quotes.
17229 (copy_comment): Output characters with copy_character.
17230 (read_additionnal_code): Likewise.
17231 (copy_string2): Likewise.
17232 (copy_definition): Likewise.
17233
17234 * tests/calc.at: Exercise M4 quoting.
17235
17236 2002-04-25 Akim Demaille <akim@epita.fr>
17237
17238 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
17239 between `!' and the command.
17240 Reported by Paul Eggert.
17241
17242 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
17243
17244 * tests/calc.at: Exercise prologue splitting.
17245
17246 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
17247 `b4_post_prologue' instead of `b4_prologue'.
17248
17249 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
17250 muscles.
17251 (output): Free pre_prologue_obstack and post_prologue_obstack.
17252 * src/files.h, src/files.c (attrs_obstack): Remove.
17253 (pre_prologue_obstack, post_prologue_obstack): New.
17254 * src/reader.c (copy_definition): Add a parameter to specify the
17255 obstack to fill, instead of using attrs_obstack unconditionally.
17256 (read_declarations): Pass pre_prologue_obstack to copy_definition if
17257 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
17258
17259 2002-04-23 Paul Eggert <eggert@twinsun.com>
17260
17261 * data/bison.simple: Remove unnecessary commentary and white
17262 space differences from 1_29-branch.
17263 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
17264
17265 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
17266 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
17267 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
17268 constructors or destructors.
17269
17270 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
17271
17272 2002-04-23 Akim Demaille <akim@epita.fr>
17273
17274 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
17275 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
17276 location with columns.
17277 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
17278 All reported by Paul Eggert.
17279
17280 2002-04-22 Akim Demaille <akim@epita.fr>
17281
17282 * src/reduce.c (dump_grammar): Move to...
17283 * src/gram.h, src/gram.c (grammar_dump): here.
17284 Be sure to separate long item numbers.
17285 Don't read the members of a rule's prec if its nil.
17286
17287 2002-04-22 Akim Demaille <akim@epita.fr>
17288
17289 * src/output.c (table_size, table_grow): New.
17290 (MAXTABLE): Remove, replace uses with table_size.
17291 (pack_vector): Instead of dying when the table is too big, grow it.
17292
17293 2002-04-22 Akim Demaille <akim@epita.fr>
17294
17295 * data/bison.simple (yyr1): Its type is that of a token number.
17296 * data/bison.c++ (r1_): Likewise.
17297 * tests/regression.at (Web2c Actions): Adjust.
17298
17299 2002-04-22 Akim Demaille <akim@epita.fr>
17300
17301 * src/reader.c (token_translations_init): 256 is now the default
17302 value for the error token, i.e., it will be assigned another
17303 number if the user assigned 256 to one of her tokens.
17304 (reader): Don't force 256 to error.
17305 * doc/bison.texinfo (Symbols): Adjust.
17306 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
17307 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
17308 etc. instead of 10, 20, 30 (which was used to `jump' over error
17309 (256) and undefined (2)).
17310
17311 2002-04-22 Akim Demaille <akim@epita.fr>
17312
17313 Propagate more token_number_t.
17314
17315 * src/gram.h (token_number_as_item_number)
17316 (item_number_as_token_number): New.
17317 * src/output.c (GENERATE_OUTPUT_TABLE): New.
17318 Use it to create output_item_number_table and
17319 output_token_number_table.
17320 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17321 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
17322 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
17323 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
17324
17325 2002-04-22 Akim Demaille <akim@epita.fr>
17326
17327 * src/output.h, src/output.c (get_lines_number): Remove.
17328
17329 2002-04-19 Akim Demaille <akim@epita.fr>
17330
17331 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
17332 as Lex/Flex'.
17333 (Debugging): More details about enabling the debugging features.
17334 (Table of Symbols): Describe $$, $n, @$, and @n.
17335 Suggested by Tim Josling.
17336
17337 2002-04-19 Akim Demaille <akim@epita.fr>
17338
17339 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
17340
17341 2002-04-10 Akim Demaille <akim@epita.fr>
17342
17343 * src/system.h: Rely on HAVE_LIMITS_H.
17344 Suggested by Paul Eggert.
17345
17346 2002-04-09 Akim Demaille <akim@epita.fr>
17347
17348 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
17349 full stderr, and strip it according to the bison options, instead
17350 of composing the error message from different bits.
17351 This makes it easier to check for several error messages.
17352 Adjust all the invocations.
17353 Add an invocation exercising the error token.
17354 Add an invocation demonstrating a stupid error message.
17355 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
17356 Adjust the tests.
17357 Error message are for stderr, not stdout.
17358
17359 2002-04-09 Akim Demaille <akim@epita.fr>
17360
17361 * src/gram.h, src/gram.c (error_token_number): Remove, use
17362 errtoken->number.
17363 * src/reader.c (reader): Don't specify the user token number (2)
17364 for $undefined, as it uselessly prevents using it.
17365 * src/gram.h (token_number_t): Move to...
17366 * src/symtab.h: here.
17367 (state_t.number): Is a token_number_t.
17368 * src/print.c, src/reader.c: Use undeftoken->number instead of
17369 hard coded 2.
17370 (Even though this 2 is not the same as above: the number of the
17371 undeftoken remains being 2, it is its user token number which
17372 might not be 2).
17373 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
17374 `user_token_number_max'.
17375 Output `undef_token_number'.
17376 * data/bison.simple, data/bison.c++: Use them.
17377 Be sure to map invalid yylex return values to
17378 `undef_token_number'. This saves us from gratuitous SEGV.
17379
17380 * tests/conflicts.at (Solved SR Conflicts)
17381 (Unresolved SR Conflicts): Adjust.
17382 * tests/regression.at (Web2c Actions): Adjust.
17383
17384 2002-04-08 Akim Demaille <akim@epita.fr>
17385
17386 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
17387 Adding #line.
17388 Remove the duplicate `typedefs'.
17389 (RhsNumberType): Fix the declaration and various other typos.
17390 Use __ofile__.
17391 * data/bison.simple: Use __ofile__.
17392 * src/scan-skel.l: Handle __ofile__.
17393
17394 2002-04-08 Akim Demaille <akim@epita.fr>
17395
17396 * src/gram.h (item_number_t): New, the type of item numbers in
17397 RITEM. Note that it must be able to code symbol numbers as
17398 positive number, and the negation of rule numbers as negative
17399 numbers.
17400 Adjust all dependencies (pretty many).
17401 * src/reduce.c (rule): Remove this `short *' pointer: use
17402 item_number_t.
17403 * src/system.h (MINSHORT, MAXSHORT): Remove.
17404 Include `limits.h'.
17405 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
17406 (shortcpy): Remove.
17407 (MAXTABLE): Move to...
17408 * src/output.c (MAXTABLE): here.
17409 (prepare_rules): Use output_int_table to output rhs.
17410 * data/bison.simple, data/bison.c++: Adjust.
17411 * tests/torture.at (Big triangle): Move the limit from 254 to
17412 500.
17413 * tests/regression.at (Web2c Actions): Ajust.
17414
17415 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
17416 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
17417 passes, but produces negative #line number, once fixed, GCC is
17418 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
17419 C), it passes.
17420 * src/state.h (state_h): Code input lines on ints, not shorts.
17421
17422 2002-04-08 Akim Demaille <akim@epita.fr>
17423
17424 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
17425 and then the grammar.
17426
17427 2002-04-08 Akim Demaille <akim@epita.fr>
17428
17429 * src/system.h: No longer using strndup.
17430
17431 2002-04-07 Akim Demaille <akim@epita.fr>
17432
17433 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
17434 * src/output.c (output_table_data): Return the longest number.
17435 (prepare_tokens): Output `token_number_max').
17436 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
17437 New.
17438 Use them to define yy_token_number_type/TokenNumberType.
17439 Use this type for yytranslate.
17440 * tests/torture.at (Big triangle): Push the limit from 124 to
17441 253.
17442 * tests/regression.at (Web2c Actions): Adjust.
17443
17444 2002-04-07 Akim Demaille <akim@epita.fr>
17445
17446 * tests/torture.at (Big triangle): New.
17447 (GNU AWK Grammar, GNU Cim Grammar): Move to...
17448 * tests/existing.at: here.
17449
17450 2002-04-07 Akim Demaille <akim@epita.fr>
17451
17452 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
17453 nritems.
17454 Adjust dependencies.
17455
17456 2002-04-07 Akim Demaille <akim@epita.fr>
17457
17458 * src/reader.c: Normalize increments to prefix form.
17459
17460 2002-04-07 Akim Demaille <akim@epita.fr>
17461
17462 * src/reader.c, symtab.c: Remove debugging code.
17463
17464 2002-04-07 Akim Demaille <akim@epita.fr>
17465
17466 Rename all the `bucket's as `symbol_t'.
17467
17468 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
17469 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
17470 * src/symtab.c, src/symtab.h (bucket): Rename as...
17471 (symbol_t): this.
17472 (symbol_list_new, bucket_check_defined, bucket_make_alias)
17473 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
17474 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
17475 (buckets_new, buckets_free, buckets_do): Rename as...
17476 (symbol_list_new, symbol_check_defined, symbol_make_alias)
17477 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
17478 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
17479 (symbols_new, symbols_free, symbols_do): these.
17480
17481 2002-04-07 Akim Demaille <akim@epita.fr>
17482
17483 Use lib/hash for the symbol table.
17484
17485 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
17486 EOF.
17487 * src/lex.c (lex): Set the `number' member of new terminals.
17488 * src/reader.c (bucket_check_defined, bucket_make_alias)
17489 (bucket_check_alias_consistence, bucket_translation): New.
17490 (reader, grammar_free, readgram, token_translations_init)
17491 (packsymbols): Adjust.
17492 (reader): Number the predefined tokens.
17493 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
17494 for predefined tokens.
17495 * src/symtab.h (bucket): Remove all the hash table related
17496 members.
17497 * src/symtab.c (symtab): Replace by...
17498 (bucket_table): this.
17499 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
17500 (buckets_new, buckets_do): New.
17501
17502 2002-04-07 Akim Demaille <akim@epita.fr>
17503
17504 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
17505 (start_symbol, max_user_token_number, semantic_parser)
17506 (error_token_number): Initialize.
17507 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
17508 Initialize.
17509 (reader): Don't.
17510 (errtoken, eoftoken, undeftoken, axiom): Extern.
17511
17512 2002-04-07 Akim Demaille <akim@epita.fr>
17513
17514 * src/gram.h (rule_s): prec and precsym are now pointers
17515 to the bucket giving the priority/associativity.
17516 Member `associativity' removed: useless.
17517 * src/reduce.c, src/conflicts.c: Adjust.
17518
17519 2002-04-07 Akim Demaille <akim@epita.fr>
17520
17521 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
17522 Properly escape the symbols' TAG when outputting them.
17523
17524 2002-04-07 Akim Demaille <akim@epita.fr>
17525
17526 * src/lalr.h (LA): Is a bitsetv, not bitset*.
17527
17528 2002-04-07 Akim Demaille <akim@epita.fr>
17529
17530 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
17531 (LArule): this, which is an array to rule_t*.
17532 * src/print.c, src/conflicts.c: Adjust.
17533
17534 2002-04-07 Akim Demaille <akim@epita.fr>
17535
17536 * src/gram.h (rule_t): Rename `number' as `user_number'.
17537 `number' is a new member.
17538 Adjust dependencies.
17539 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
17540
17541 2002-04-07 Akim Demaille <akim@epita.fr>
17542
17543 As a result of the previous patch, it is no longer needed
17544 to reorder ritem itself.
17545
17546 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
17547
17548 2002-04-07 Akim Demaille <akim@epita.fr>
17549
17550 Be sure never to walk through RITEMS, but use only data related to
17551 the rules themselves. RITEMS should be banished.
17552
17553 * src/output.c (output_token_translations): Rename as...
17554 (prepare_tokens): this.
17555 In addition to `translate', prepare the muscles `tname' and
17556 `toknum', which were handled by...
17557 (output_rule_data): this.
17558 Remove, and move the remainder of its outputs into...
17559 (prepare_rules): this new routines, which also merges content from
17560 (output_gram): this.
17561 (prepare_rules): Be sure never to walk through RITEMS.
17562 (output_stos): Rename as...
17563 (prepare_stos): this.
17564 (output): Always invoke prepare_states, after all, just don't use it
17565 in the output if you don't need it.
17566
17567 2002-04-07 Akim Demaille <akim@epita.fr>
17568
17569 * src/LR0.c (new_state): Display `nstates' as the name of the
17570 newly created state.
17571 Adjust to initialize first_state and last_state if needed.
17572 Be sure to distinguish the initial from the final state.
17573 (new_states): Create the itemset of the initial state, and use
17574 new_state.
17575 * src/closure.c (closure): Now that the initial state has its
17576 items properly set, there is no need for a special case when
17577 creating `ruleset'.
17578
17579 As a result, now the rule 0, reducing to $axiom, is visible in the
17580 outputs. Adjust the test suite.
17581
17582 * tests/conflicts.at (Solved SR Conflicts)
17583 (Unresolved SR Conflicts): Adjust.
17584 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
17585 * tests/conflicts.at (S/R in initial): New.
17586
17587 2002-04-07 Akim Demaille <akim@epita.fr>
17588
17589 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
17590 the RHS of the rules.
17591 * src/output.c (output_gram): Likewise.
17592
17593 2002-04-07 Akim Demaille <akim@epita.fr>
17594
17595 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
17596 bucket.
17597 Adjust all dependencies.
17598 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
17599 `number' of the buckets too.
17600 * src/gram.h: Include `symtab.h'.
17601 (associativity): Move to...
17602 * src/symtab.h: here.
17603 No longer include `gram.h'.
17604
17605 2002-04-07 Akim Demaille <akim@epita.fr>
17606
17607 * src/gram.h, src/gram.c (rules_rhs_length): New.
17608 (ritem_longest_rhs): Use it.
17609 * src/gram.h (rule_t): `number' is a new member.
17610 * src/reader.c (packgram): Set it.
17611 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
17612 the end of `rules', and count them out of `nrules'.
17613 (reduce_output, dump_grammar): Adjust.
17614 * src/print.c (print_grammar): It is no longer needed to check for
17615 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
17616 * tests/reduce.at (Reduced Automaton): New test.
17617
17618 2002-04-07 Akim Demaille <akim@epita.fr>
17619
17620 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
17621 lacking `+ 1' to nrules, Bison reported as useless a token if it
17622 was used solely to set the precedence of the last rule...
17623
17624 2002-04-07 Akim Demaille <akim@epita.fr>
17625
17626 * data/bison.c++, data/bison.simple: Don't output the current file
17627 name in #line, to avoid useless diffs between two identical
17628 outputs under different names.
17629
17630 2002-04-07 Akim Demaille <akim@epita.fr>
17631
17632 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
17633 Normalize loops to using `< nrules + 1', not `<= nrules'.
17634
17635 2002-04-07 Akim Demaille <akim@epita.fr>
17636
17637 * TODO: Update.
17638
17639 2002-04-07 Akim Demaille <akim@epita.fr>
17640
17641 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
17642 bucket.value as bucket.number.
17643
17644 2002-04-07 Akim Demaille <akim@epita.fr>
17645
17646 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
17647 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
17648 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
17649 RHS, instead of being an index in RITEMS.
17650
17651 2002-04-04 Paul Eggert <eggert@twinsun.com>
17652
17653 * doc/bison.texinfo: Update copyright date.
17654 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
17655 (Symbols): Warn about running Bison in one character set,
17656 but compiling and/or running in an incompatible one.
17657 Warn about character code 256, too.
17658
17659 2002-04-03 Paul Eggert <eggert@twinsun.com>
17660
17661 * src/bison.data (YYSTACK_ALLOC): Depend on whether
17662 YYERROR_VERBOSE is nonzero, not whether it is defined.
17663
17664 Merge changes from bison-1_29-branch.
17665
17666 2002-03-20 Paul Eggert <eggert@twinsun.com>
17667
17668 Merge fixes from Debian bison_1.34-1.diff.
17669
17670 * configure.in (AC_PREREQ): 2.53.
17671
17672 2002-03-20 Akim Demaille <akim@epita.fr>
17673
17674 * src/conflicts.c (log_resolution): Argument `resolution' is const.
17675
17676 2002-03-19 Paul Eggert <eggert@twinsun.com>
17677
17678 * src/bison.simple (YYCOPY): New macro.
17679 (YYSTACK_RELOCATE): Use it.
17680 Remove Type arg; no longer needed. All callers changed.
17681 (yymemcpy): Remove; no longer needed.
17682
17683 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
17684 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
17685
17686 2002-03-19 Akim Demaille <akim@epita.fr>
17687
17688 Test and fix the #line outputs.
17689
17690 * tests/atlocal.at (GCC): New.
17691 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
17692 (Prologue synch line, %union synch line, Postprologue synch line)
17693 (Action synch line, Epilogue synch line): New tests.
17694 * src/reader.c (parse_union_decl): Define the muscle stype_line.
17695 * data/bison.simple, data/bison.c++: Use it.
17696
17697 2002-03-19 Akim Demaille <akim@epita.fr>
17698
17699 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
17700 (Solved SR Conflicts, %expect not enough, %expect right)
17701 (%expect too much): Move to...
17702 * tests/conflicts.at: this new file.
17703
17704 2002-03-19 Akim Demaille <akim@epita.fr>
17705
17706 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17707 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
17708 that we can move to enums for instance.
17709 * src/output.c (token_definitions_output): Output a list of
17710 `token-name, token-number' instead of the #define.
17711 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
17712
17713 2002-03-14 Akim Demaille <akim@epita.fr>
17714
17715 Use Gettext 0.11.1.
17716
17717 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
17718
17719 * data/bison.c++: Make the user able to add members to the generated
17720 parser by subclassing.
17721
17722 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
17723
17724 * src/reader.c (read_additionnal_code): `c' should be an integer, not
17725 a character.
17726 Reported by Nicolas Tisserand and Nicolas Burrus.
17727
17728 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
17729
17730 * src/reader.c: Warn about lacking semi-colons, do not complain.
17731
17732 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
17733
17734 * data/bison.c++: Remove a debug line.
17735
17736 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
17737
17738 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
17739 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
17740 provide a default implementation.
17741
17742 2002-03-04 Akim Demaille <akim@epita.fr>
17743
17744 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
17745 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
17746 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
17747 * tests/semantic.at (Parsing Guards): Similarly.
17748 * src/reader.at (readgram): Complain if the last rule is not ended
17749 with a semi-colon.
17750
17751 2002-03-04 Akim Demaille <akim@epita.fr>
17752
17753 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
17754 * src/closure.c: here.
17755 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
17756 RTC.
17757 * src/warshall.h, src/warshall.c: Remove.
17758 * tests/sets.at (Broken Closure): Adjust.
17759
17760 2002-03-04 Akim Demaille <akim@epita.fr>
17761
17762 * src/output.c (output_skeleton): tempdir is const.
17763 bytes_read is unused.
17764
17765 2002-03-04 Akim Demaille <akim@epita.fr>
17766
17767 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
17768 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
17769 Update.
17770 From Michael Hayes.
17771
17772 2002-03-04 Akim Demaille <akim@epita.fr>
17773
17774 * src/closure.c (closure): `r' is unused.
17775
17776 2002-03-04 Akim Demaille <akim@epita.fr>
17777
17778 * tests/sets.at (Broken Closure): Add the ending `;'.
17779 * src/reader.at (readgram): Complain if a rule is not ended with a
17780 semi-colon.
17781
17782 2002-03-04 Akim Demaille <akim@epita.fr>
17783
17784 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
17785 (count_sr_conflicts): Use bitset_count.
17786 * src/reduce.c (inaccessable_symbols): Ditto.
17787 (bits_size): Remove.
17788 * src/warshall.h, src/warshall.c: Convert to bitsetv.
17789
17790 2002-03-04 Akim Demaille <akim@epita.fr>
17791
17792 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
17793 * src/reduce.c: Remove the `bitset_zero's following the
17794 `bitset_create's, as now it is performed by the latter.
17795
17796 2002-03-04 Akim Demaille <akim@epita.fr>
17797
17798 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
17799 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
17800 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
17801 latest sources from Michael.
17802
17803 2002-03-04 Akim Demaille <akim@epita.fr>
17804
17805 * src/output.c (output): Don't free the grammar.
17806 * src/reader.c (grammar_free): New.
17807 * src/main.c (main): Call it and don't free symtab here.
17808
17809 2002-03-04 Akim Demaille <akim@epita.fr>
17810
17811 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
17812 before returning.
17813 Reported by Benoit Perrot.
17814
17815 2002-03-04 Akim Demaille <akim@epita.fr>
17816
17817 Use bitset operations when possible, not loops over bits.
17818
17819 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
17820 bitset_or.
17821 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
17822 * src/reduce.c (useless_nonterminals): Formatting changes.
17823 * src/warshall.c (TC): Use bitset_or.
17824
17825 2002-03-04 Akim Demaille <akim@epita.fr>
17826
17827 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
17828 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
17829 Ditto.
17830
17831 2002-03-04 Akim Demaille <akim@epita.fr>
17832
17833 * src/lalr.c (F): Now a bitset*.
17834 Adjust all dependencies.
17835
17836 2002-03-04 Akim Demaille <akim@epita.fr>
17837
17838 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
17839 Adjust all dependencies.
17840
17841 2002-03-04 Akim Demaille <akim@epita.fr>
17842
17843 * src/L0.c, src/LR0.h (nstates): Be size_t.
17844 Adjust comparisons (signed vs unsigned).
17845 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
17846 bitset*.
17847 Adjust all dependencies.
17848
17849 2002-03-04 Akim Demaille <akim@epita.fr>
17850
17851 * src/closure.c (firsts): Now, also a bitset.
17852 Adjust all dependencies.
17853 (varsetsize): Remove, now unused.
17854 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
17855
17856 2002-03-04 Akim Demaille <akim@epita.fr>
17857
17858 * src/print.c: Convert to use bitset.h, not hand coded iterations
17859 over ints.
17860
17861 2002-03-04 Akim Demaille <akim@epita.fr>
17862
17863 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
17864
17865 2002-03-04 Akim Demaille <akim@epita.fr>
17866
17867 * src/closure.c (ruleset): Be a bitset.
17868 (rulesetsize): Remove.
17869
17870 2002-03-04 Akim Demaille <akim@epita.fr>
17871
17872 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
17873 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
17874 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
17875 * src/closure.c (fderives): Be an array of bitsets.
17876
17877 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
17878
17879 * data/bison.c++: Merge the two generated headers. Insert a copyright
17880 notice in each output file.
17881
17882 2002-02-28 Akim Demaille <akim@epita.fr>
17883
17884 * data/bison.c++: Copy the prologue of bison.simple to fetch
17885 useful M4 definitions, such as b4_header_guard.
17886
17887 2002-02-25 Akim Demaille <akim@epita.fr>
17888
17889 * src/getargs.c (version): Give the name of the authors, and use a
17890 translator friendly scheme for the bgr
17891 copyright notice.
17892
17893 2002-02-25 Akim Demaille <akim@epita.fr>
17894
17895 * src/output.c (header_output): Remove, now handled completely via
17896 M4.
17897
17898 2002-02-25 Akim Demaille <akim@epita.fr>
17899
17900 * m4/m4.m4: New, from CVS Autoconf.
17901 * configure.in: Invoke it.
17902 * src/output.c (output_skeleton): Use its result instead of the
17903 hard coded name.
17904
17905 2002-02-25 Akim Demaille <akim@epita.fr>
17906
17907 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
17908 Fileutils 4.1.5.
17909 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
17910 * src/output.c (output_skeleton): Use mkstemp to create a real
17911 temporary file.
17912 Move the filling of `skeleton' and its muscle to...
17913 (prepare): here.
17914 (output): Move the definition of the prologue muscle to...
17915 (prepare): here.
17916 * src/system.h (DEFAULT_TMPDIR): New.
17917
17918 2002-02-14 Paul Eggert <eggert@twinsun.com>
17919
17920 Remove the support for C++ namespace cleanliness; it was
17921 causing more problems than it was curing, since it didn't work
17922 properly on some nonstandard C++ compilers. This can wait
17923 for a proper C++ parser.
17924
17925 * NEWS: Document this.
17926 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
17927 of C++, as it's treated like C now.
17928 * src/bison.simple (YYSTD): Remove.
17929 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
17930 Treat C++ just like Standard C instead of trying to support
17931 namespace cleanliness.
17932
17933 2002-02-14 Akim Demaille <akim@epita.fr>
17934
17935 * tests/regression.at (else): Adjust to Andreas' change.
17936
17937 2002-02-14 Akim Demaille <akim@epita.fr>
17938
17939 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
17940
17941 2002-02-13 Andreas Schwab <schwab@suse.de>
17942
17943 * src/output.c (output_rule_data): Don't output NULL, it might
17944 not be defined yet.
17945
17946 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
17947
17948 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
17949 (Copyright notice): Update.
17950
17951 2002-02-11 Akim Demaille <akim@epita.fr>
17952
17953 * tests/regression.at (%nonassoc and eof): Don't include
17954 nonportable headers.
17955
17956 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
17957
17958 * data/bison.c++: Correct error recovery. Make the user able to
17959 initialize the starting location.
17960
17961 2002-02-07 Akim Demaille <akim@epita.fr>
17962
17963 * tests/input.at: New.
17964
17965 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17966
17967 * data/bison.c++: Replace some direct m4 expansions by constants. Be
17968 more consistent when naming methods and variables. Put preprocessor
17969 directives around tables only needed for debugging.
17970
17971 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17972
17973 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
17974 C++ parsers.
17975 (yy::b4_name::parse): Use print_.
17976
17977 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17978
17979 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
17980
17981 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17982
17983 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
17984 C++ parsers.
17985 (yy::b4_name::parse): Build verbose error messages, and use error_.
17986
17987 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
17988
17989 * data/bison.c++: Fix m4 quoting in comments.
17990
17991 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
17992
17993 * data/bison.c++: Adjust the parser code. Fix some muscles that were
17994 not expanded by m4.
17995
17996 2002-02-05 Akim Demaille <akim@epita.fr>
17997
17998 * data/bison.c++: Adjust to the M4 back end.
17999 More is certainly needed.
18000
18001 2002-02-05 Akim Demaille <akim@epita.fr>
18002
18003 Give a try to M4 as a back end.
18004
18005 * lib/readpipe.c: New, from wdiff.
18006 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
18007 BISON_HAIRY.
18008 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
18009 specific values. Now it is m4 that performs the lookup.
18010 * src/parse-skel.y: Remove.
18011 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
18012 * src/output.c (actions_output, guards_output)
18013 (token_definitions_output): No longer keeps track of the output
18014 line number, hence remove the second argument.
18015 (guards_output): Check against the guard member of a rule, not the
18016 action member.
18017 Adjust callers.
18018 (output_skeleton): Don't look for the skeleton location, let m4 do
18019 that.
18020 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
18021 file will be used.
18022 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
18023 (prepare): Given that for the time being changesyntax is not
18024 usable in M4, rename the muscles using `-' to `_'.
18025 Define `defines_flag', `output_parser_name' and `output_header_name'.
18026 * src/output.h (actions_output, guards_output)
18027 (token_definitions_output): Adjust prototypes.
18028 * src/scan-skel.l: Instead of scanning the skeletons, it now
18029 processes the output of m4: `__oline__' and `#output'.
18030 * data/bison.simple: Adjust to be used by M4(sugar).
18031 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
18032 to date.
18033 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
18034 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
18035 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
18036 shamelessly stolen from CVS Autoconf.
18037
18038 2002-02-05 Akim Demaille <akim@epita.fr>
18039
18040 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
18041 * configure.in: Check for the declarations of free and malloc.
18042 * src/muscle_tab.c: Adjust.
18043
18044 2002-02-05 Akim Demaille <akim@epita.fr>
18045
18046 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
18047 which have no values.
18048
18049 2002-02-05 Akim Demaille <akim@epita.fr>
18050
18051 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
18052 * data/: here.
18053
18054 2002-01-29 Paul Eggert <eggert@twinsun.com>
18055
18056 * src/bison.simple (YYSIZE_T): Do not define merely because
18057 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
18058 On some platforms, <alloca.h> does not declare YYSTD (size_t).
18059
18060 2002-01-27 Akim Demaille <akim@epita.fr>
18061
18062 Fix `%nonassoc and eof'.
18063
18064 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
18065 which were not properly copied! Replace
18066 memcpy (res->errs, src->errs, src->nerrs);
18067 with
18068 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
18069 !!!
18070 * tests/regression.at (%nonassoc and eof): Adjust to newest
18071 Autotest: `.' is not in the PATH.
18072
18073 2002-01-27 Akim Demaille <akim@epita.fr>
18074
18075 * tests/sets.at (AT_EXTRACT_SETS): New.
18076 (Nullable): Use it.
18077 (Firsts): New.
18078
18079 2002-01-26 Akim Demaille <akim@epita.fr>
18080
18081 * tests/actions.at, tests/calc.at, tests/headers.at,
18082 * tests/torture.at: Adjust to the newest Autotest which no longer
18083 forces `.' in the PATH.
18084
18085 2002-01-25 Akim Demaille <akim@epita.fr>
18086
18087 * tests/regression.at (%nonassoc and eof): New.
18088 Suggested by Robert Anisko.
18089
18090 2002-01-24 Akim Demaille <akim@epita.fr>
18091
18092 Bison dumps core when trying to complain about broken input files.
18093 Reported by Cris van Pelt.
18094
18095 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
18096 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
18097 into...
18098 (Invalid inputs): Strengthen: exercise parse_percent_token.
18099
18100 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
18101
18102 * src/Makefile.am: Add bison.c++.
18103 * src/bison.c++: New skeleton.
18104
18105 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
18106
18107 * po/it.po: New.
18108
18109 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
18110
18111 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
18112
18113 2002-01-20 Marc Autret <marc@gnu.org>
18114
18115 * src/files.c (compute_output_file_names): Fix
18116
18117 2002-01-20 Marc Autret <marc@gnu.org>
18118
18119 * tests/output.at: New test.
18120 * src/files.c (compute_base_names): Don't map extensions when
18121 the YACC flag is set, use defaults.
18122 Reported by Evgeny Stambulchik.
18123
18124 2002-01-20 Marc Autret <marc@gnu.org>
18125
18126 * src/system.h: Need to define __attribute__ away for non-GCC
18127 compilers as well (i.e., the vendor C compiler).
18128 Suggested by Albert Chin-A-Young.
18129
18130 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
18131
18132 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
18133 canonical definition.
18134 * src/system.h: Use the canonical definition for PARAMS (avoids
18135 a conflict with the macro from lib/hash.h).
18136
18137 2002-01-11 Akim Demaille <akim@epita.fr>
18138
18139 * configure.in: Use AC_FUNC_STRNLEN.
18140 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
18141
18142 2002-01-09 Akim Demaille <akim@epita.fr>
18143
18144 * src/files.c, src/files.h (output_infix): New.
18145 (tab_extension): Remove.
18146 (compute_base_names): Compute the former, drop the latter.
18147 * src/output.c (prepare): Insert the muscles `output-infix', and
18148 `output-suffix'.
18149 * src/parse-skel.y (string, string.1): New.
18150 (section.header): Use it.
18151 (section.yacc): Remove.
18152 (prefix): Remove too.
18153 * src/scan-skel.l: Adjust.
18154 * src/bison.simple, src/bison.hairy: Adjust.
18155
18156 2002-01-09 Akim Demaille <akim@epita.fr>
18157
18158 * configure.in (WERROR_CFLAGS): Compute it.
18159 * src/Makefile.am (CFLAGS): Pass it.
18160 * tests/atlocal.in (CFLAGS): Idem.
18161 * src/files.c: Fix a few warnings.
18162 (get_extension_index): Remove, unused.
18163
18164 2002-01-08 Akim Demaille <akim@epita.fr>
18165
18166 * src/getargs.c (AS_FILE_NAME): New.
18167 (getargs): Use it to convert DOSish file names.
18168 * src/files.c (base_name): Rename as full_base_name to avoid
18169 clashes with `base_name ()'.
18170 (filename_split): New.
18171 (compute_base_names): N-th rewrite, using filename_split.
18172
18173 2002-01-08 Akim Demaille <akim@epita.fr>
18174
18175 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
18176 New, stolen from the Fileutils 4.1.
18177 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
18178 * configure.in: Check for the presence of memrchr, and of its
18179 prototype.
18180
18181 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
18182
18183 * lib/hash.h (__P): Added definition for this macro.
18184 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
18185 BUILT_SOURCES, to ensure they are generated first.
18186 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
18187 %error-verbose to allow bootstrapping with bison 1.30x.
18188
18189 2002-01-06 Akim Demaille <akim@epita.fr>
18190
18191 * src/reader.c (parse_braces): Don't fetch the next char, the
18192 convention is to fetch on entry.
18193 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
18194 'switch' without a following semicolon.
18195 * tests/regression.at (braces parsing): New.
18196
18197 2002-01-06 Akim Demaille <akim@epita.fr>
18198
18199 Bison is dead wrong in its RR conflict reports.
18200
18201 * tests/torture.at (GNU Cim Grammar): New.
18202 * src/conflicts.c (count_rr_conflicts): Fix.
18203
18204 2002-01-06 Akim Demaille <akim@epita.fr>
18205
18206 Creating package.m4 from configure.ac causes too many problems.
18207
18208 * tests/Makefile.am (package.m4): Create it by hand,
18209 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
18210
18211 2002-01-06 Akim Demaille <akim@epita.fr>
18212
18213 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
18214 skeleton.h.
18215
18216 2002-01-04 Paul Eggert <eggert@twinsun.com>
18217
18218 * doc/bison.texinfo (Debugging):
18219 Remove YYSTDERR; it's no longer defined or used.
18220 Also, s/cstdio.h/cstdio/.
18221
18222 2002-01-03 Akim Demaille <akim@epita.fr>
18223
18224 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
18225
18226 2002-01-03 Akim Demaille <akim@epita.fr>
18227
18228 * src/parse-skel.y (process_skeleton): Don't bind the parser's
18229 tracing code to --trace, wait for a better --trace option, with
18230 args.
18231
18232 2002-01-03 Akim Demaille <akim@epita.fr>
18233
18234 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
18235 The ISO C++ standard is extremely clear about it: stderr is
18236 considered a macro, not a regular symbol (see table 94 `Header
18237 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
18238 Therefore std:: does not apply to it. It still does with fprintf.
18239 Also, s/cstdio.h/cstdio/.
18240
18241 2002-01-03 Akim Demaille <akim@epita.fr>
18242
18243 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
18244 for non system headers.
18245
18246 2002-01-02 Akim Demaille <akim@epita.fr>
18247
18248 Equip the skeleton chain with location tracking, runtime trace,
18249 pure parser and scanner.
18250
18251 * src/parse-skel.y: Request a pure parser, locations, and prefix
18252 renaming.
18253 (%union): Having several members with the same type does not help
18254 type mismatches, simplify.
18255 (YYPRINT, yyprint): New.
18256 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
18257 (skel_error): this.
18258 Handle locations.
18259 * src/scan-skel.l: Adjust to these changes.
18260 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
18261 (LOCATION_PRINT, skel_control_t): New.
18262
18263 2001-12-30 Akim Demaille <akim@epita.fr>
18264
18265 * src/parse-skel.y: Get rid of the shift/reduce conflict:
18266 replace `gb' with BLANKS.
18267 * src/scan-skel.l: Adjust.
18268
18269 2001-12-30 Akim Demaille <akim@epita.fr>
18270
18271 * src/system.h: We don't need nor want bcopy.
18272 Throw away MS-DOS crap: we don't need getpid.
18273 * configure.in: We don't need strndup. It was even causing
18274 problems: because Flex includes the headers *before* us,
18275 _GNU_SOURCE is not defined by config.h, and therefore strndup was
18276 not visible.
18277 * lib/xstrndup.c: New.
18278 * src/scan-skel.l: Use it.
18279 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
18280 * src/parse-skel.y: Use %directives instead of #defines.
18281
18282 2001-12-30 Akim Demaille <akim@epita.fr>
18283
18284 * src/skeleton.h: New.
18285 * src/output.c (output_parser, output_master_parser): Remove, dead
18286 code.
18287 * src/output.h (get_lines_number, actions_output, guards_output)
18288 (token_definitions_output): Prototype them.
18289 * src/parse-skel.y: Add the license notice.
18290 Include output.h and skeleton.h.
18291 (process_skeleton): Returns void, and takes a single parameter.
18292 * src/scan-skel.l: Add the license notice.
18293 Include skeleton.h.
18294 Don't use %option yylineno: it seems that then Flex imagines
18295 REJECT has been used, and therefore it won't reallocate its
18296 buffers (which makes no other sense to me than a bug). It results
18297 in warnings for `unused: yy_flex_realloc'.
18298
18299 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
18300
18301 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18302 (MUSCLE_INSERT_PREFIX): ...to there.
18303 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18304 (MUSCLE_INSERT_PREFIX): Move from here...
18305
18306 * src/bison.hairy: Add a section directive. Put braces around muscle
18307 names. This parser skeleton is still broken, but Bison should not
18308 choke on a bad muscle 'syntax'.
18309 * src/bison.simple: Add a section directive. Put braces around muscle
18310 names.
18311
18312 * src/files.h (strsuffix, stringappend): Add declarations.
18313 (tab_extension): Add declaration.
18314 (short_base_name): Add declaration.
18315
18316 * src/files.c (strsuffix, stringappend): No longer static. These
18317 functions are used in the skeleton parser.
18318 (tab_extension): New.
18319 (compute_base_names): Use the computations done in this function
18320 to guess if the generated parsers should have '.tab' in their
18321 names.
18322 (short_base_name): No longer static.
18323
18324 * src/output.c (output_skeleton): New.
18325 (output): Disable call to output_master_parser, and give a try to
18326 a new skeleton handling system.
18327 (guards_output, actions_output): No longer static.
18328 (token_definitions_output, get_lines_number): No longer static.
18329
18330 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
18331
18332 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
18333 parse-skel.y.
18334
18335 * src/parse-skel.y: New file.
18336 * src/scan-skel.l: New file.
18337
18338 2001-12-29 Akim Demaille <akim@epita.fr>
18339
18340 %name-prefix is broken.
18341
18342 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
18343 Adjust all dependencies.
18344 * tests/headers.at (export YYLTYPE): Strengthen this test: use
18345 %name-prefix.
18346
18347 Renaming yylval but not yylloc is not consistent. Now we do.
18348
18349 * src/bison.simple: Prefix yylloc if used.
18350 * doc/bison.texinfo (Decl Summary): Document that.
18351
18352 2001-12-29 Akim Demaille <akim@epita.fr>
18353
18354 * doc/bison.texinfo: Promote `%long-directive' over
18355 `%long_directive'.
18356 Remove all references to fixed-output-files, yacc is enough.
18357
18358 2001-12-29 Akim Demaille <akim@epita.fr>
18359
18360 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
18361 user prologue. These are defaults.
18362 * tests/actions.at (Mid-rule actions): Make sure the user can
18363 define YYDEBUG and YYERROR_VERBOSE.
18364
18365 2001-12-29 Akim Demaille <akim@epita.fr>
18366
18367 * src/output.c (header_output): Don't forget to export YYLTYPE and
18368 yylloc.
18369 * tests/headers.at (export YYLTYPE): New, make sure it does.
18370 * tests/regression.at (%union and --defines, Invalid CPP headers):
18371 Move to...
18372 * tests/headers.at: here.
18373
18374 2001-12-29 Akim Demaille <akim@epita.fr>
18375
18376 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
18377
18378 2001-12-29 Akim Demaille <akim@epita.fr>
18379
18380 * tests/actions.at (Mid-rule actions): Output on a single line
18381 instead of several.
18382
18383 2001-12-29 Akim Demaille <akim@epita.fr>
18384
18385 * doc/bison.texinfo: Formatting changes.
18386
18387 2001-12-29 Akim Demaille <akim@epita.fr>
18388
18389 Don't store the token defs in a muscle, just be ready to output it
18390 on command. Now possible via `symbols'. Fixes a memory leak.
18391
18392 * src/output.c (token_definitions_output): New.
18393 (output_parser, header_output): Use it.
18394 * src/reader.c (symbols_save): Remove.
18395
18396 2001-12-29 Akim Demaille <akim@epita.fr>
18397
18398 * src/bison.simple: Do not provide a default for YYSTYPE and
18399 YYLTYPE before the user's prologue. Otherwise it's hardly... a
18400 default.
18401
18402 2001-12-29 Akim Demaille <akim@epita.fr>
18403
18404 Mid-rule actions are simply... ignored!
18405
18406 * src/reader.c (readgram): Be sure to attach mid-rule actions to
18407 the empty-rule associated to the dummy symbol, not to the host
18408 rule.
18409 * tests/actions.at (Mid-rule actions): New.
18410
18411 2001-12-29 Akim Demaille <akim@epita.fr>
18412
18413 Memory leak.
18414
18415 * src/reader.c (reader): Free grammar.
18416
18417 2001-12-29 Akim Demaille <akim@epita.fr>
18418
18419 Memory leak.
18420
18421 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
18422 since it allocates it for each state, although only one is needed.
18423 (allocate_storage): Do it here.
18424
18425 2001-12-29 Akim Demaille <akim@epita.fr>
18426
18427 * src/options.h, src/options.c (create_long_option_table): Rename
18428 as...
18429 (long_option_table_new): this, with a clearer prototype.
18430 (percent_table): Remove, unused,
18431 * src/getargs.c (getargs): Adjust.
18432
18433 2001-12-29 Akim Demaille <akim@epita.fr>
18434
18435 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
18436 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
18437 as states.
18438
18439 2001-12-29 Akim Demaille <akim@epita.fr>
18440
18441 * src/lalr.c (build_relations): Rename `states' as `states1'.
18442 Sorry, I don't understand exactly what it is, no better name...
18443
18444 2001-12-29 Akim Demaille <akim@epita.fr>
18445
18446 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
18447 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
18448 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
18449 as rules.
18450
18451 2001-12-29 Akim Demaille <akim@epita.fr>
18452
18453 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
18454 ago.
18455
18456 2001-12-29 Akim Demaille <akim@epita.fr>
18457
18458 * src/reader.c, src/reader.h (user_toknums): Remove.
18459 Adjust all users to use symbols[i]->user_token_number.
18460
18461 2001-12-29 Akim Demaille <akim@epita.fr>
18462
18463 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
18464 Adjust all users to use symbols[i]->prec or ->assoc.
18465
18466 2001-12-29 Akim Demaille <akim@epita.fr>
18467
18468 * src/reader.c, src/reader.h (tags): Remove.
18469 Adjust all users to use symbols[i]->tag.
18470
18471 2001-12-29 Akim Demaille <akim@epita.fr>
18472
18473 * src/gram.h, src/gram.c (symbols): New, similar to state_table
18474 and rule_table.
18475 * src/reader.c (packsymbols): Fill this table.
18476 Drop sprec.
18477 * src/conflicts.c (resolve_sr_conflict): Adjust.
18478 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
18479 single table.
18480 Use symbols[i]->tag instead of tags[i].
18481
18482 2001-12-29 Akim Demaille <akim@epita.fr>
18483
18484 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
18485 In addition, put a comment in there, to replace...
18486 * tests/regression.at (%union and C comments): Remove.
18487
18488 2001-12-29 Akim Demaille <akim@epita.fr>
18489
18490 * tests/regression.at (Web2c Actions): Blindly move the actual
18491 output as expected output. The contents *seem* right to me, but I
18492 can't pretend reading perfectly parser tables... Nonetheless, all
18493 the other tests pass correctly, the table look OK, even though the
18494 presence of `$axiom' is to be noted: AFAICS it is useless (but
18495 harmless).
18496
18497 2001-12-29 Akim Demaille <akim@epita.fr>
18498
18499 * src/reader.c (readgram): Don't add the rule 0 if there were no
18500 rules read. In other words, add it _after_ having performed
18501 grammar sanity checks.
18502 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
18503
18504 2001-12-29 Akim Demaille <akim@epita.fr>
18505
18506 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
18507 visible, and some states have now a different number.
18508
18509 2001-12-29 Akim Demaille <akim@epita.fr>
18510
18511 * src/reader.c (readgram): Bind the initial rule's lineno to that
18512 of the first rule.
18513 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
18514 (Solved SR Conflicts): Adjust rule 0's line number.
18515
18516 2001-12-29 Akim Demaille <akim@epita.fr>
18517
18518 Fix the `GAWK Grammar' failure.
18519
18520 * src/LR0.c (final_state): Initialize to -1 so that we do compute
18521 the reductions of the first state which was mistakenly confused
18522 with the final state because precisely final_state was initialized
18523 to 0.
18524 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
18525 now noticed by Bison.
18526 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
18527 have a reduction on $default.
18528
18529 2001-12-29 Akim Demaille <akim@epita.fr>
18530
18531 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
18532 rule line numbers.
18533 * src/closure.c (print_closure): Likewise.
18534 * src/derives.c (print_derives): Likewise.
18535 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
18536 now.
18537
18538 2001-12-29 Akim Demaille <akim@epita.fr>
18539
18540 * src/lalr.c (lookaheads_print): New.
18541 (lalr): Call it when --trace-flag.
18542 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
18543 are dumped.
18544
18545 2001-12-29 Akim Demaille <akim@epita.fr>
18546
18547 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
18548 when walking through ritem, even via rule->rhs.
18549 * src/reduce.c (dump_grammar, useful_production, reduce_output)
18550 (useful_production, useless_nonterminals): Likewise.
18551 (reduce_grammar_tables): Likewise, plus update nritems.
18552 * src/nullable.c (set_nullable): Likewise.
18553 * src/lalr.c (build_relations): Likewise.
18554 * tests/sets.at (Nullable): Adjust.
18555 Fortunately, now, the $axiom is no longer nullable.
18556
18557 2001-12-29 Akim Demaille <akim@epita.fr>
18558
18559 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
18560 the 0-sentinel.
18561 * src/gram.c (ritem_longest_rhs): Likewise.
18562 * src/reduce.c (nonterminals_reduce): Likewise.
18563 * src/print_graph.c (print_graph): Likewise.
18564 * src/output.c (output_rule_data): Likewise.
18565 * src/nullable.c (set_nullable): Likewise.
18566
18567 2001-12-29 Akim Demaille <akim@epita.fr>
18568
18569 * src/output.c: Comment changes.
18570
18571 2001-12-27 Paul Eggert <eggert@twinsun.com>
18572
18573 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
18574 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
18575 Sparc, as they were causing more porting problems than the
18576 (minor) performance improvement was worth.
18577
18578 Also, catch up with 1.31's YYSTD.
18579
18580 2001-12-27 Akim Demaille <akim@epita.fr>
18581
18582 * src/output.c (output_gram): Rely on nritems, not the
18583 0-sentinel. See below.
18584 Use -1 as separator, not 0.
18585 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
18586 Rely on -1 as separator in yyrhs, instead of 0.
18587 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
18588 twice `Now at end of input', therefore there are two lines less to
18589 expect.
18590
18591 2001-12-27 Akim Demaille <akim@epita.fr>
18592
18593 * tests/regression.at (Unresolved SR Conflicts):
18594 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
18595 below.
18596
18597 2001-12-27 Akim Demaille <akim@epita.fr>
18598
18599 * src/LR0.c (new_state): Recognize the final state by the fact it
18600 is reached by eoftoken.
18601 (insert_start_shifting_state, insert_eof_shifting_state)
18602 (insert_accepting_state, augment_automaton): Remove, since now
18603 these states are automatically computed from the initial state.
18604 (generate_states): Adjust.
18605 * src/print.c: When reporting a rule number to the user, substract
18606 1, so that the axiom rule is rule 0, and the first user rule is 1.
18607 * src/reduce.c: Likewise.
18608 * src/print_graph.c (print_core): For the time being, just as for
18609 the report, depend upon --trace-flags to dump the full set of
18610 items.
18611 * src/reader.c (readgram): Once the grammar read, insert the rule
18612 0: `$axiom: START-SYMBOL $'.
18613 * tests/set.at: Adjust: rule 0 is now displayed, and since the
18614 number of the states has changed (the final state is no longer
18615 necessarily the last), catch up.
18616
18617 2001-12-27 Akim Demaille <akim@epita.fr>
18618
18619 Try to make the use of the eoftoken valid. Given that its value
18620 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
18621 is used instead of > 0 where appropriate, (ii), depend upon nritems
18622 instead of the 0-sentinel.
18623
18624 * src/gram.h, src/gram.c (nritems): New.
18625 Expected to be duplication of nitems, but for the time being...
18626 * src/reader.c (packgram): Assert nritems and nitems are equal.
18627 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
18628 * src/closure.c (print_closure, print_fderives): Likewise.
18629 * src/gram.c (ritem_print): Likewise.
18630 * src/print.c (print_core, print_grammar): Likewise.
18631 * src/print_graph.c: Likewise.
18632
18633 2001-12-27 Akim Demaille <akim@epita.fr>
18634
18635 * src/main.c (main): If there are complains after grammar
18636 reductions, then output the report anyway if requested, then die.
18637 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
18638 * src/reader.c (eoftoken): New.
18639 (parse_token_decl): If the token being defined has value `0', it
18640 is the eoftoken.
18641 (packsymbols): No longer hack `tags' to insert `$' by hand.
18642 Be sure to preserve the value of the eoftoken.
18643 (reader): Make sure eoftoken is defined.
18644 Initialize nsyms to 0: now eoftoken is created just like the others.
18645 * src/print.c (print_grammar): Don't special case the eof token.
18646 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
18647 lie anyway, albeit pleasant.
18648 * tests/calc.at: Exercise error messages with eoftoken.
18649 Change the grammar so that empty input is invalid.
18650 Adjust expectations.
18651 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
18652
18653 2001-12-27 Akim Demaille <akim@epita.fr>
18654
18655 * configure.in: Check the protos of strchr ans strspn.
18656 Replace strchr if needed.
18657 * src/system.h: Provide the protos of strchr, strspn and memchr if
18658 missing.
18659 * lib/strchr.c: New.
18660 * src/reader.c (symbols_save): Use strchr.
18661
18662 2001-12-27 Akim Demaille <akim@epita.fr>
18663
18664 * src/print.c, src/print_graph.c (escape): New.
18665 Use it to quote the TAGS outputs.
18666 * src/print_graph.c (print_state): Now errors are in red, and
18667 reductions in green.
18668 Prefer high to wide: output the state number on a line of its own.
18669
18670 2001-12-27 Akim Demaille <akim@epita.fr>
18671
18672 * src/state.h, src/state.c (reductions_new): New.
18673 * src/LR0.c (set_state_table): Let all the states have a
18674 `reductions', even if reduced to 0.
18675 (save_reductions): Adjust.
18676 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
18677 * src/print.c (print_reductions, print_actions): Adjust.
18678 * src/output.c (action_row): Adjust.
18679
18680 2001-12-27 Akim Demaille <akim@epita.fr>
18681
18682 * src/state.h, src/state.c (errs_new, errs_dup): New.
18683 * src/LR0.c (set_state_table): Let all the states have an errs,
18684 even if reduced to 0.
18685 * src/print.c (print_errs, print_reductions): Adjust.
18686 * src/output.c (output_actions, action_row): Adjust.
18687 * src/conflicts.c (resolve_sr_conflict): Adjust.
18688
18689 2001-12-27 Akim Demaille <akim@epita.fr>
18690
18691 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
18692
18693 2001-12-27 Akim Demaille <akim@epita.fr>
18694
18695 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
18696 * src/print.c: here.
18697 (lookaheadset, shiftset): New, used as additional storage by
18698 print_reductions.
18699 (print_results): Adjust.
18700 (print_shifts, print_gotos, print_errs): New, extracted from...
18701 (print_actions): here.
18702 * src/print_graph.c (print_actions): Remove dead code.
18703
18704 2001-12-27 Akim Demaille <akim@epita.fr>
18705
18706 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
18707 `$n' and `@n'.
18708
18709 2001-12-27 Akim Demaille <akim@epita.fr>
18710
18711 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
18712 (build_relations): Adjust.
18713
18714 2001-12-27 Akim Demaille <akim@epita.fr>
18715
18716 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
18717 duplication.
18718
18719 2001-12-27 Akim Demaille <akim@epita.fr>
18720
18721 * src/reader.c (packgram): Catch nitems overflows.
18722
18723 2001-12-27 Akim Demaille <akim@epita.fr>
18724
18725 * src/files.c, src/files.h (guard_obstack): Remove.
18726 * src/output.c (output): Adjust.
18727 * src/reader.c (parse_braces): New, factoring...
18728 (copy_action, copy_guard): these two which are renamed as...
18729 (parse_action, parse_guard): these.
18730 As a voluntary consequence, using braces around guards is now
18731 mandatory.
18732
18733 2001-12-27 Akim Demaille <akim@epita.fr>
18734
18735 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
18736 * src/reader.c (symbol_list): `guard' and `guard_line' are new
18737 members.
18738 (symbol_list_new): Adjust.
18739 (copy_action): action_line is the first line, not the last.
18740 (copy_guard): Just as for actions, store the `action' only, not
18741 the switch/case/break flesh.
18742 Don't parse the user action that might follow the guard, let...
18743 (readgram): do it, i.e., now, there can be an action after a
18744 guard.
18745 In other words the guard is just explicitly optional.
18746 (packgram): Adjust.
18747 * src/output.c (guards_output): New.
18748 (output_parser): Call it when needed.
18749 (output): Also free the guard and attrs obstacks.
18750 * src/files.c, src/files.h (obstack_save): Remove.
18751 (output_files): Remove.
18752 As a result, if one needs the former `.act' file, using an
18753 appropriate skeleton which requires actions and guards is now
18754 required.
18755 * src/main.c (main): Adjust.
18756 * tests/semantic.at: New.
18757 * tests/regression.at: Use `input.y' as input file name.
18758 Avoid 8+3 problems by requiring input.c when the test needs the
18759 parser.
18760
18761 2001-12-27 Akim Demaille <akim@epita.fr>
18762
18763 * src/reader.c (symbol_list_new): Be sure to initialize all the
18764 fields.
18765
18766 2001-12-27 Akim Demaille <akim@epita.fr>
18767
18768 All the hacks using a final pseudo state are now useless.
18769
18770 * src/LR0.c (set_state_table): state_table holds exactly nstates.
18771 * src/lalr.c (nLA): New.
18772 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
18773 instead of lookaheadsp from the pseudo state (nstate + 1).
18774
18775 2001-12-27 Akim Demaille <akim@epita.fr>
18776
18777 * src/output.c (action_row, token_actions): Use a state_t instead
18778 of a integer, and nlookaheads instead of the following state's
18779 lookaheadsp.
18780
18781 2001-12-27 Akim Demaille <akim@epita.fr>
18782
18783 * src/conflicts.c (log_resolution, flush_shift)
18784 (resolve_sr_conflict, set_conflicts, solve_conflicts)
18785 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
18786 (conflicts_print, print_reductions): Use a state_t instead of an
18787 integer when referring to a state.
18788 As much as possible, depend upon nlookaheads, instead of the
18789 `lookaheadsp' member of the following state (since lookaheads of
18790 successive states are successive, the difference between state n + 1
18791 and n served as the number of lookaheads for state n).
18792 * src/lalr.c (add_lookback_edge): Likewise.
18793 * src/print.c (print_core, print_actions, print_state)
18794 (print_results): Likewise.
18795 * src/print_graph.c (print_core, print_actions, print_state)
18796 (print_graph): Likewise.
18797 * src/conflicts.h: Adjust.
18798
18799 2001-12-27 Akim Demaille <akim@epita.fr>
18800
18801 * src/bison.hairy: Formatting/comment changes.
18802 ANSIfy.
18803 Remove `register' indications.
18804 Add plenty of `static'.
18805
18806 2001-12-27 Akim Demaille <akim@epita.fr>
18807
18808 * src/output.c (prepare): Drop the muscle `ntbase' which
18809 duplicates ntokens.
18810 * src/bison.simple: Formatting/comment changes.
18811 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
18812 is an undocumented synonym.
18813
18814 2001-12-22 Akim Demaille <akim@epita.fr>
18815
18816 * src/output.c (output_table_data): Change the prototype to use
18817 `int' for array ranges: some invocations do pass an int, not a
18818 short.
18819 Reported by Wayne Green.
18820
18821 2001-12-22 Akim Demaille <akim@epita.fr>
18822
18823 Some actions of web2c.y are improperly triggered.
18824 Reported by Mike Castle.
18825
18826 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
18827 * tests/regression.at (Web2c): Rename as...
18828 (Web2c Report): this.
18829 (Web2c Actions): New.
18830
18831 2001-12-22 Akim Demaille <akim@epita.fr>
18832
18833 Reductions in web2c.y are improperly reported.
18834 Reported by Mike Castle.
18835
18836 * src/conflicts.c (print_reductions): Fix.
18837 * tests/regression.at (Web2c): New.
18838
18839 2001-12-18 Akim Demaille <akim@epita.fr>
18840
18841 Some host fail on `assert (!"foo")', which expands to
18842 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
18843 Reported by Nelson Beebee.
18844
18845 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
18846 `#define it_succeeded 0' and `assert (it_succeeded)'.
18847
18848 2001-12-17 Marc Autret <autret_m@epita.fr>
18849
18850 * src/bison.simple: Don't hard code the skeleton line and filename.
18851 * src/output.c (output_parser): Rename 'line' as 'output_line'.
18852 New line counter 'skeleton_line' (skeleton-line muscle).
18853
18854 2001-12-17 Paul Eggert <eggert@twinsun.com>
18855
18856 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
18857 YYDEBUG must be defined to a nonzero value.
18858
18859 * src/bison.simple (yytname): Do not assume that the user defines
18860 YYDEBUG to a properly parenthesized expression.
18861
18862 2001-12-17 Akim Demaille <akim@epita.fr>
18863
18864 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
18865 nlookaheads is a new member.
18866 Adjust all users.
18867 * src/lalr.h (nlookaheads): Remove this orphan declaration.
18868 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
18869 state.
18870
18871 2001-12-17 Akim Demaille <akim@epita.fr>
18872
18873 * src/files.h, src/files.c (open_files, close_files): Remove.
18874 * src/main.c (main): Don't open/close files, nor invoke lex_free,
18875 let...
18876 * src/reader.c (reader): Do it.
18877
18878 2001-12-17 Akim Demaille <akim@epita.fr>
18879
18880 * src/conflicts.c (print_reductions): Formatting changes.
18881
18882 2001-12-17 Akim Demaille <akim@epita.fr>
18883
18884 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
18885 (flush_reduce): New.
18886 (resolve_sr_conflict): Adjust.
18887
18888 2001-12-17 Akim Demaille <akim@epita.fr>
18889
18890 * src/output.c (output_obstack): Be static and rename as...
18891 (format_obstack): this, to avoid any confusion with files.c's
18892 output_obstack.
18893 * src/reader.h (muscle_obstack): Move to...
18894 * src/output.h: here, since it's defined in output.c.
18895
18896 2001-12-17 Akim Demaille <akim@epita.fr>
18897
18898 * src/output.c (action_row, save_column, default_goto)
18899 (sort_actions, matching_state, pack_vector): Better variable
18900 locality.
18901
18902 2001-12-17 Akim Demaille <akim@epita.fr>
18903
18904 * src/output.c: Various formatting changes.
18905
18906 2001-12-17 Akim Demaille <akim@epita.fr>
18907
18908 * src/files.c (output_files): Free the output_obstack.
18909 * src/main.c (main): Call print and print_graph conditionally.
18910 * src/print.c (print): Work unconditionally.
18911 * src/print_graph.c (print_graph): Work unconditionally.
18912 * src/conflicts.c (log_resolution): Output only if verbose_flag.
18913
18914 2001-12-16 Marc Autret <autret_m@epita.fr>
18915
18916 * src/output.c (actions_output): Fix. When we use %no-lines,
18917 there is one less line per action.
18918
18919 2001-12-16 Marc Autret <autret_m@epita.fr>
18920
18921 * src/bison.simple: Remove a useless #line directive.
18922 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
18923 * src/output.c (get_lines_number): New.
18924 (output_parser): Adjust, now takes care about the lines of a
18925 output muscles.
18926 Fix line numbering.
18927 (actions_output): Computes the number of lines taken by actions.
18928 (output_master_parser): Insert new skeleton which is the name of
18929 the output parser file name.
18930
18931 2001-12-15 Marc Autret <autret_m@epita.fr>
18932
18933 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
18934
18935 2001-12-15 Marc Autret <autret_m@epita.fr>
18936
18937 * src/output.c (output_gram): Keep track of the hairy one.
18938
18939 2001-12-15 Akim Demaille <akim@epita.fr>
18940
18941 Make `make distcheck' work.
18942
18943 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
18944 system.h which uses libgettext.h.
18945
18946 2001-12-15 Akim Demaille <akim@epita.fr>
18947
18948 * src/nullable.c (set_nullable): Useless rules must be skipped,
18949 otherwise, since we range over their symbols, we might look at a
18950 nonterminal which no longer ``exists'', i.e., it is not counted in
18951 `nvars', hence we overflow our arrays.
18952
18953 2001-12-15 Akim Demaille <akim@epita.fr>
18954
18955 The header can also be produced directly, without any obstack!
18956 Yahoo!
18957
18958 * src/files.c, src/files.h (defines_obstack): Remove.
18959 (compute_header_macro): Global.
18960 (defines_obstack_save): Remove.
18961 * src/reader.c (parse_union_decl): No longer output to
18962 defines_obstack: its content can be found in the `stype' muscle
18963 anyway.
18964 (output_token_translations): Merge into...
18965 (symbols_output): this.
18966 Rename as...
18967 (symbols_save): this.
18968 (reader): Adjust.
18969 * src/output.c (header_output): New.
18970 (output): Call it.
18971
18972 2001-12-15 Akim Demaille <akim@epita.fr>
18973
18974 * src/reader.c (parse_union_decl): Instead of handling two obstack
18975 simultaneously, use one to define the `stype' muscle, and use the
18976 value of the latter to fill defines_obstack.
18977 (copy_comment): Remove.
18978 (copy_comment2): Work for a single obstack.
18979 Rename as...
18980 (copy_comment): this.
18981
18982 2001-12-15 Akim Demaille <akim@epita.fr>
18983
18984 * src/lex.c, src/lex.h (xgetc): No longer static.
18985 * src/reader.c (parse_union_decl): Revamp.
18986
18987 2001-12-15 Akim Demaille <akim@epita.fr>
18988
18989 Still making progress in separating Bison into (i) input, (ii)
18990 process, (iii) output: now we can directly output the parser file
18991 without using table_obstack at all.
18992
18993 * src/files.c, src/files.h (table_obstack): Bye bye.
18994 (parser_file_name): New.
18995 * src/files.c (compute_output_file_names): Compute it.
18996 * src/output.c (actions_output, output_parser)
18997 (output_master_parser): To a file instead of an obstack.
18998
18999 2001-12-15 Akim Demaille <akim@epita.fr>
19000
19001 Attach actions to rules, instead of pre-outputting them to
19002 actions_obstack.
19003
19004 * src/gram.h (rule_t): action and action_line are new members.
19005 * src/reader.c (symbol_list): Likewise.
19006 (copy_action): Save the actions within the rule.
19007 (packgram): Save them in rule_table.
19008 * src/output.c (actions_output): New.
19009 (output_parser): Use it on `%%actions'.
19010 (output_rule_data): Don't free rule_table.
19011 (output): Do it.
19012 (prepare): Don't save the `action' muscle.
19013 * src/bison.simple: s/%%action/%%actions/.
19014
19015 2001-12-15 Akim Demaille <akim@epita.fr>
19016
19017 * src/reader.c (copy_action): When --yacc, don't append a `;'
19018 to the user action: let it fail if lacking.
19019 Suggested by Arnold Robbins and Tom Tromey.
19020
19021 2001-12-14 Akim Demaille <akim@epita.fr>
19022
19023 * src/lex.c (literalchar): Simply return the char you decoded, non
19024 longer mess around with obstacks and int pointers.
19025 Adjust all callers.
19026
19027 2001-12-14 Akim Demaille <akim@epita.fr>
19028
19029 * src/lex.c (literalchar): Don't escape the special characters,
19030 just decode them, and keep them as char (before, eol was output as
19031 the 2 char string `\n' etc.).
19032 * src/output.c (output_rule_data): Use quotearg to output the
19033 token strings.
19034
19035 2001-12-13 Paul Eggert <eggert@twinsun.com>
19036
19037 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
19038 Do not infringe on the global user namespace when using C++.
19039 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
19040 All uses of `fprintf' and `stderr' changed.
19041
19042 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
19043
19044 2001-12-13 Akim Demaille <akim@epita.fr>
19045
19046 The computation of nullable is broken: it doesn't handle empty
19047 RHS's properly.
19048
19049 * tests/torture.at (GNU AWK Grammar): New.
19050 * tests/sets.at (Nullable): New.
19051 * src/nullable.c (set_nullable): Instead of blindly looping over
19052 `ritems', loop over the rules, and then over their rhs's.
19053
19054 Work around Autotest bugs.
19055
19056 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
19057 frame, because Autotest understand lines starting with a `+' as
19058 traces from the shell. Then, they are not processed properly.
19059 Admittedly an Autotest bug, but we don't have time to wait for
19060 Autotest to catch up.
19061 * tests/regression.at (Broken Closure): Adjust to the new table
19062 frames.
19063 Move to...
19064 * tests/sets.at: here.
19065
19066 2001-12-13 Akim Demaille <akim@epita.fr>
19067
19068 * src/closure.c (closure): Use nrules instead of playing tricks
19069 with BITS_PER_WORD.
19070
19071 2001-12-13 Akim Demaille <akim@epita.fr>
19072
19073 * src/print.c (print_actions): Output the handling of `$' as the
19074 traces do: shifting the token EOF. Before EOF was treated as a
19075 nonterminal.
19076 * tests/regression.at: Adjust some tests.
19077 * src/print_graph.c (print_core): Complete the set of items via
19078 closure. The next-to-final and final states are still unsatisfying,
19079 but that's to be addressed elsewhere.
19080 No longer output the rule numbers, but do output the state number.
19081 A single loop for the shifts + gotos is enough, but picked a
19082 distinct color for each.
19083 (print_graph): Initialize and finalize closure.
19084
19085 2001-12-13 Akim Demaille <akim@epita.fr>
19086
19087 * src/reader.c (readgram): Remove dead code, an strip useless
19088 braces.
19089 (get_type): Remove, unused.
19090
19091 2001-12-12 Akim Demaille <akim@epita.fr>
19092
19093 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
19094 on that of lib/error.c.
19095
19096 2001-12-12 Akim Demaille <akim@epita.fr>
19097
19098 Some hosts don't like `/' in includes.
19099
19100 * src/system.h: Include libgettext.h without qualifying the path.
19101 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
19102 $(top_srcdir).
19103
19104 2001-12-11 Marc Autret <autret_m@epita.fr>
19105
19106 * src/output.c (output_parser): Remove useless muscle.
19107
19108 2001-12-11 Marc Autret <autret_m@epita.fr>
19109
19110 * src/bison.simple: Remove #line just before %%epilogue. It
19111 is now handled in ...
19112 * src/reader.c (read_additionnal_code): Add the output of a
19113 #line for the epilogue.
19114
19115 2001-12-10 Marc Autret <autret_m@epita.fr>
19116
19117 * src/reader.c (copy_definition): Re-use CPP-outed code which
19118 replace precedent remove.
19119 * src/bison.simple: Remove #line before %%prologue because
19120 %%input-line is wrong at this time.
19121
19122 2001-12-10 Marc Autret <autret_m@epita.fr>
19123
19124 * src/reader.c (symbols_output): Clean up.
19125 * src/output.c (output_gram, output): Clean up.
19126
19127 2001-12-10 Akim Demaille <akim@epita.fr>
19128
19129 * src/lalr.c (initialize_lookaheads): New. Extracted from...
19130 * src/LR0.c (set_state_table): here.
19131 * src/lalr.c (lalr): Call it.
19132
19133 2001-12-10 Akim Demaille <akim@epita.fr>
19134
19135 * src/state.h (shifts): Remove the `number' member: shifts are
19136 attached to state, hence no longer need to be labelled with a
19137 state number.
19138
19139 2001-12-10 Akim Demaille <akim@epita.fr>
19140
19141 Now that states have a complete set of members, the linked list of
19142 shifts is useless: just fill directly the state's shifts member.
19143
19144 * src/state.h (shifts): Remove the `next' member.
19145 * src/LR0.c (first_state, last_state): Remove.
19146 Adjust the callers.
19147 (augment_automaton): Don't look for the shifts that must be added
19148 a shift on EOF: it is those of the state we looked for! But now,
19149 since shifts are attached, it is no longer needed to looking
19150 merely by its id: its number.
19151
19152 2001-12-10 Akim Demaille <akim@epita.fr>
19153
19154 * src/LR0.c (augment_automaton): Better variable locality.
19155 Remove an impossible branch: if there is a state corresponding to
19156 the start symbol being shifted, then there is shift for the start
19157 symbol from the initial state.
19158
19159 2001-12-10 Akim Demaille <akim@epita.fr>
19160
19161 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
19162 only when appropriate: when insert_start_shifting_state' is not
19163 invoked.
19164 * tests/regression.at (Rule Line Numbers): Adjust.
19165
19166 2001-12-10 Akim Demaille <akim@epita.fr>
19167
19168 * src/LR0.c (augment_automaton): Now that all states have shifts,
19169 merge the two cases addition shifts to the initial state.
19170
19171 2001-12-10 Akim Demaille <akim@epita.fr>
19172
19173 * src/lalr.c (set_state_table): Move to...
19174 * src/LR0.c: here.
19175 * src/lalr.c (lalr): Don't call it...
19176 * src/LR0.c (generate_states): do it.
19177 * src/LR0.h (first_state): Remove, only the table is used.
19178
19179 2001-12-10 Akim Demaille <akim@epita.fr>
19180
19181 * src/LR0.h (first_shift, first_reduction): Remove.
19182 * src/lalr.c: Don't use first_shift: find shifts through the
19183 states.
19184
19185 2001-12-10 Akim Demaille <akim@epita.fr>
19186
19187 * src/LR0.c: Attach shifts to states as soon as they are
19188 computed.
19189 * src/lalr.c (set_state_table): Instead of assigning shifts to
19190 state, just assert that the mapping was properly done.
19191
19192 2001-12-10 Akim Demaille <akim@epita.fr>
19193
19194 * src/LR0.c (insert_start_shift): Rename as...
19195 (insert_start_shifting_state): this.
19196 (insert_eof_shifting_state, insert_accepting_state): New.
19197 (augment_automaton): Adjust.
19198 Better locality of the variables.
19199 When looking if the start_symbol is shifted from the initial
19200 state, using `while (... symbol != start_symbol ...)' sounds
19201 better than `while (... symbol < start_symbol ...)': If fail
19202 to see how the order between symbols could be relevant!
19203
19204 2001-12-10 Akim Demaille <akim@epita.fr>
19205
19206 * src/getargs.h: Don't declare `spec_name_prefix' and
19207 `spec_file_prefix', declared by src/files.h.
19208 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
19209 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
19210 * src/output.c (prepare): Adjust.
19211 * src/reader.c (symbols_output): Likewise.
19212 * src/vmsgetargs.c: Vaguely adjust, but who cares?
19213
19214 2001-12-10 Akim Demaille <akim@epita.fr>
19215
19216 * src/muscle_tab.c (muscle_init): NULL is a better default than
19217 `"0"'.
19218
19219 2001-12-10 Akim Demaille <akim@epita.fr>
19220
19221 * src/reader.c (reader): Calling symbols_output once is enough.
19222
19223 2001-12-10 Akim Demaille <akim@epita.fr>
19224
19225 Now that states have a complete set of members, the linked list of
19226 reductions is useless: just fill directly the state's reductions
19227 member.
19228
19229 * src/state.h (struct reductions): Remove member `number' and
19230 `next'.
19231 * src/LR0.c (first_reduction, last_reduction): Remove.
19232 (save_reductions): Don't link the new reductions, store them in
19233 this_state.
19234 * src/lalr.c (set_state_table): No need to attach reductions to
19235 states, it's already done.
19236 * src/output.c (output_actions): No longer free the shifts, then
19237 the reductions, then the states: free all the states and their
19238 members.
19239
19240 2001-12-10 Akim Demaille <akim@epita.fr>
19241
19242 * src/options.c (OPTN, DRTV, BOTH): New.
19243 (option_table): Use them.
19244
19245 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
19246 the job of system.h.
19247 * src/options.c: Don't include stdio.h and xalloc.h for the same
19248 reasons.
19249
19250 2001-12-10 Akim Demaille <akim@epita.fr>
19251
19252 * src/output.c (output, prepare): Make sure the values of the
19253 muscles `action' and `prologue' are 0-terminated.
19254
19255 2001-12-10 Akim Demaille <akim@epita.fr>
19256
19257 Clean up GCC warnings.
19258
19259 * src/reader.c (copy_action): `buf' is not used.
19260 (parse_skel_decl): Be static.
19261 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
19262 * src/options.h (create_long_option_table): Have a real prototype.
19263 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
19264 (hash_delete_at): Return const void *.
19265 Adjust casts to preserve the const.
19266
19267 2001-12-10 Akim Demaille <akim@epita.fr>
19268
19269 * configure.in: Require 2.52g.
19270 M4 is not needed, but AUTOM4TE is.
19271 * m4/m4.m4: Remove.
19272 * tests/Makefile.am: Adjust.
19273
19274 2001-12-10 Akim Demaille <akim@epita.fr>
19275
19276 One structure for states is enough, even though theoretically
19277 there are LR(0) states and LALR(1) states.
19278
19279 * src/lalr.h (state_t): Remove.
19280 (state_table): Be state_t **, not state_t *.
19281 * src/state.h (core, CORE_ALLOC): Rename as...
19282 (state_t, STATE_ALLOC): this.
19283 Add the LALR(1) members: shifts, reductions, errs.
19284 * src/LR0.c (state_table): Rename as...
19285 (state_hash): this, to avoid name clashes with the global
19286 `state_table'.
19287 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
19288 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
19289
19290 2001-12-10 Akim Demaille <akim@epita.fr>
19291
19292 Bison dumps core on bash.y.
19293 Reported by Pascal Bart.
19294
19295 * src/warshall.c (bitmatrix_print): New.
19296 (TC): Use it.
19297 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
19298 j must be the outer loop.
19299 * tests/regression.at (Broken Closure): New.
19300
19301 2001-12-05 Akim Demaille <akim@epita.fr>
19302
19303 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
19304 its argument.
19305 Reported by Peter Hamorsky.
19306
19307 2001-12-05 Akim Demaille <akim@epita.fr>
19308
19309 * src/conflicts.c (err_table): Remove.
19310 (resolve_sr_conflict): Adjust.
19311 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
19312 Rename as...
19313 (state_t.reductions, state_t.shifts): this.
19314
19315 2001-12-05 Akim Demaille <akim@epita.fr>
19316
19317 * src/reduce.c (reduce_grammar_tables): No longer disable the
19318 removal of useless rules via CPP but via `if (0)', so that the
19319 compiler still check the code is valid.
19320 For instance, it should have noticed `rline' no longer exists: use
19321 the `line' member of rule_t.
19322 * src/gram.c (dummy, rline): Remove, unused.
19323
19324 2001-12-05 Akim Demaille <akim@epita.fr>
19325
19326 * src/output.c (pack_vector): Use assert, not berror.
19327 * src/main.c (berror): Remove, unused.
19328
19329 2001-12-05 Akim Demaille <akim@epita.fr>
19330
19331 New experimental feature: if --verbose --trace output all the
19332 items of a state, not only its kernel.
19333
19334 * src/print.c (print_core): If `trace_flag', then invoke closure
19335 before outputting the items of the state (print_core is no longer
19336 a correct name them).
19337 (print_results): Invoke new_closure/free_closure if needed.
19338
19339 2001-12-05 Akim Demaille <akim@epita.fr>
19340
19341 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
19342 * src/closure.c, src/closure.h (itemsetsize): Rename as...
19343 (nitemset): for consistency with the rest of the project.
19344
19345 2001-12-05 Akim Demaille <akim@epita.fr>
19346
19347 * src/closure.c (print_closure): Improve.
19348 (closure): Use it for printing input and output.
19349
19350 2001-12-05 Akim Demaille <akim@epita.fr>
19351
19352 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
19353 indexed by nonterminals.
19354
19355 2001-12-05 Akim Demaille <akim@epita.fr>
19356
19357 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
19358 what it was!).
19359 * src/warshall.h: Remove accidental duplication of the content.
19360
19361 2001-12-05 Akim Demaille <akim@epita.fr>
19362
19363 * src/closure.c (set_fderives): De-obfuscate.
19364
19365 2001-12-05 Akim Demaille <akim@epita.fr>
19366
19367 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
19368
19369 2001-12-05 Akim Demaille <akim@epita.fr>
19370
19371 * src/closure.c (set_firsts): De-obfuscate.
19372
19373 2001-12-05 Akim Demaille <akim@epita.fr>
19374
19375 * src/output.c (action_row): De-obfuscate
19376 using the good o' techniques: arrays not pointers, variable
19377 locality, BITISSET, RESETBIT etc.
19378
19379 2001-12-05 Akim Demaille <akim@epita.fr>
19380
19381 Pessimize the code to simplify it: from now on, all the states
19382 have a valid SHIFTS, which NSHIFTS is possibly 0.
19383
19384 * src/LR0.c (shifts_new): Be global and move to..
19385 * src/state.c, src/state.h: here.
19386 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
19387 * src/print_graph: Adjust.
19388
19389 2001-12-05 Akim Demaille <akim@epita.fr>
19390
19391 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
19392 * src/conflicts.c: Use it.
19393 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
19394 incorrectly ``simplified''.
19395
19396 2001-12-05 Akim Demaille <akim@epita.fr>
19397
19398 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
19399 using the good o' techniques: arrays not pointers, variable
19400 locality, BITISSET, RESETBIT etc.
19401
19402 2001-12-05 Akim Demaille <akim@epita.fr>
19403
19404 * src/state.h (SHIFT_SYMBOL): New.
19405 * src/conflicts.c: Use it to deobfuscate.
19406
19407 2001-12-05 Akim Demaille <akim@epita.fr>
19408
19409 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
19410 (print_reductions): De-obfuscate using the good o' techniques:
19411 arrays not pointers, variable locality, BITISSET.
19412
19413 2001-12-05 Akim Demaille <akim@epita.fr>
19414
19415 * src/conflicts.c (print_reductions): Arrays, not pointers.
19416 Use BITISSET.
19417
19418 2001-12-05 Akim Demaille <akim@epita.fr>
19419
19420 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19421
19422 2001-12-05 Akim Demaille <akim@epita.fr>
19423
19424 * src/conflicts.c (print_reductions): Improve variable locality.
19425
19426 2001-12-05 Akim Demaille <akim@epita.fr>
19427
19428 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19429
19430 2001-12-05 Akim Demaille <akim@epita.fr>
19431
19432 * src/conflicts.c (print_reductions): Improve variable locality.
19433
19434 2001-12-05 Akim Demaille <akim@epita.fr>
19435
19436 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
19437 * src/lalr.c: Use them.
19438
19439 2001-12-05 Akim Demaille <akim@epita.fr>
19440
19441 * src/LR0.c (augment_automaton): Formatting changes.
19442 Better variable locality.
19443
19444 2001-12-05 Akim Demaille <akim@epita.fr>
19445
19446 * src/lalr.c (matrix_print): New.
19447 (transpose): Use it.
19448 Use arrays instead of pointers.
19449
19450 2001-12-05 Akim Demaille <akim@epita.fr>
19451
19452 * src/lalr.c (maxrhs): Move to...
19453 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
19454 * src/lalr.c (build_relations): Adjust.
19455
19456 2001-12-05 Akim Demaille <akim@epita.fr>
19457
19458 * src/lalr.c (transpose): Free the memory allocated to the
19459 argument, as it is replaced by the results by the unique caller.
19460 (build_relations): Merely invoke transpose: it handles the memory
19461 deallocation.
19462 Improve variable locality.
19463 Avoid variables used as mere abbreviations.
19464 (compute_lookaheads): Use arrays instead of pointers.
19465
19466 2001-12-05 Akim Demaille <akim@epita.fr>
19467
19468 * src/lalr.c (initialize_F): Improve variable locality.
19469 Avoid variables used as mere abbreviations.
19470
19471 2001-12-05 Akim Demaille <akim@epita.fr>
19472
19473 * src/derives.c (print_derives): Display the ruleno.
19474 * src/lalr.c (initialize_F, transpose): Better variable locality
19475 to improve readability.
19476 Avoid variables used as mere abbreviations.
19477
19478 2001-12-05 Akim Demaille <akim@epita.fr>
19479
19480 * src/lalr.c (traverse): Use arrays instead of pointers.
19481
19482 2001-12-05 Akim Demaille <akim@epita.fr>
19483
19484 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
19485 the handling of squeue.
19486 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
19487
19488 2001-12-05 Akim Demaille <akim@epita.fr>
19489
19490 Because useless nonterminals are now kept alive (instead of being
19491 `destroyed'), we now sometimes examine them, and store information
19492 related to them. Hence we need to know their number, and adjust
19493 memory allocations.
19494
19495 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
19496 static.
19497 * src/LR0.c (allocate_itemsets): The memory allocated to
19498 `symbol_count' was used for two different purpose: once to count
19499 the number of occurrences of each symbol, and later reassigned to
19500 `shift_symbol', containing the symbol that can be shifted from a
19501 given state.
19502 Deobfuscate, i.e., allocate, use and free `symbol_count' here
19503 only, and...
19504 (new_itemsets): Allocate `shift_symbol' here.
19505 (allocate_itemsets): symbol_count includes useless nonterminals.
19506 Make room for them.
19507 (free_storage): Use `free', not `XFREE', for pointers that cannot
19508 be null.
19509
19510 2001-12-05 Akim Demaille <akim@epita.fr>
19511
19512 * src/nullable.c (set_nullable): Deobfuscate the handling of
19513 ritem.
19514 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
19515
19516 2001-12-05 Akim Demaille <akim@epita.fr>
19517
19518 * src/gram.c, src/gram.h (ritem_print): New.
19519 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
19520 (This useless function was defined only to work around VMS linkers
19521 that can't handle compilation units with variables only).
19522 * src/reduce.c (dump_grammar): Use it to trace the construction of
19523 ritem.
19524
19525 2001-12-04 Paul Eggert <eggert@twinsun.com>
19526
19527 * src/bison.simple (union yyalloc): Change member names
19528 to be the same as the stack names.
19529 (yyparse): yyptr is now union yyalloc *, not char *.
19530 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
19531 and may generate better code on some machines.
19532 (yystpcpy): Use prototype if __STDC__ is defined, not just
19533 if __cplusplus is defined.
19534
19535 2001-11-30 Akim Demaille <akim@epita.fr>
19536
19537 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
19538 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
19539 Gettext doesn't compile cleanly, and dies with -Werror.
19540 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
19541 Include WARNING_CFLAGS here.
19542 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
19543 before being defined.
19544
19545 2001-11-27 Paul Eggert <eggert@twinsun.com>
19546
19547 * lib/quotearg.h (quotearg_n, quotearg_n_style):
19548 First arg is int, not unsigned.
19549 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
19550 (SIZE_MAX, UINT_MAX): New macros.
19551 (quotearg_n_options): Abort if N is negative.
19552 Avoid overflow check on hosts where size_t is 64 bits and int
19553 is 32 bits, as overflow is impossible there.
19554 Fix off-by-one typo that caused unnecessary reallocation.
19555
19556 2001-11-29 Paul Eggert <eggert@twinsun.com>
19557
19558 Name space cleanup in generated parser.
19559
19560 * doc/bison.texinfo (Bison Parser): Discuss system headers
19561 and their effect on the user name space.
19562
19563 * src/bison.simple:
19564 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
19565 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
19566 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
19567
19568 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
19569 on user names when possible.
19570
19571 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
19572 Simplify test for whather <alloca.h> exists.
19573
19574 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
19575
19576 (<stdio.h>): Include if YYDEBUG.
19577
19578 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
19579 ! defined (yyoverflow) && ! defined (yymemcpy).
19580
19581 (yymemcpy, yyparse): Rename local variables as needed so that
19582 they all begin with 'yy'.
19583
19584 (yystrlen, yystpcpy): New functions.
19585
19586 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
19587 All uses changed.
19588
19589 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
19590 instead of relying on string.h functions. Use YYSTACK_ALLOC
19591 and YYSTACK_FREE instead of malloc and free.
19592
19593 2001-11-30 Akim Demaille <akim@epita.fr>
19594
19595 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
19596 before their first uses.
19597 (YYBISON, YYPURE): Move to the top of the output.
19598
19599 2001-11-30 Akim Demaille <akim@epita.fr>
19600
19601 * tests/reduce.at (Useless Nonterminals): Fix.
19602
19603 2001-11-30 Akim Demaille <akim@epita.fr>
19604
19605 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
19606 if body instead of `;' to pacify GCC's warnings.
19607
19608 2001-11-30 Akim Demaille <akim@epita.fr>
19609
19610 Instead of mapping the LHS of unused rules to -1, keep the LHS
19611 valid, but flag the rules as invalid.
19612
19613 * src/gram.h (rule_t): `useful' is a new member.
19614 * src/print.c (print_grammar): Adjust.
19615 * src/derives.c (set_derives): Likewise.
19616 * src/reader.c (packgram, reduce_output): Likewise.
19617 * src/reduce.c (reduce_grammar_tables): Likewise.
19618 * tests/reduce.at (Underivable Rules, Useless Rules): New.
19619
19620 2001-11-30 Akim Demaille <akim@epita.fr>
19621
19622 * src/reduce.c (reduce_output): Formatting changes.
19623 * src/print.c (print_results, print_grammar): Likewise.
19624 * tests/regression.at (Rule Line Numbers)
19625 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
19626
19627 2001-11-30 Akim Demaille <akim@epita.fr>
19628
19629 * src/reduce.c (nonterminals_reduce): Instead of throwing away
19630 useless nonterminals, move them at the end of the symbol arrays.
19631 (reduce_output): Adjust.
19632 * tests/reduce.at (Useless Nonterminals): Adjust.
19633
19634 2001-11-30 Akim Demaille <akim@epita.fr>
19635
19636 * src/reduce.c: Various comment/formatting changes.
19637 (nonterminals_reduce): New, extracted from...
19638 (reduce_grammar_tables): here.
19639 (reduce_grammar): Call nonterminals_reduce.
19640
19641 2001-11-29 Paul Eggert <eggert@twinsun.com>
19642
19643 * src/bison.simple (YYSTACK_REALLOC): Remove.
19644 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
19645 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
19646 New macros.
19647 (union yyalloc): New type.
19648 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
19649 an arbitrary restriction on hosts where size_t is wider than int.
19650
19651 (yyparse): Don't dump core if alloca or malloc fails; instead, report
19652 a parser stack overflow. Allocate just one block of memory for all
19653 three stacks, instead of allocating three blocks; this typically is
19654 faster and reduces fragmentation.
19655
19656 Do not limit the number of items in the stack to a value that fits
19657 in 'int', as this is an arbitrary limit on hosts with 64-bit
19658 size_t and 32-bit int.
19659
19660 2001-11-29 Marc Autret <autret_m@epita.fr>
19661
19662 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
19663 of defining YYERROR_VERBOSE.
19664 [AT_DATA]: $4 is now out of C declarations in the prologue.
19665
19666 2001-11-28 Marc Autret <autret_m@epita.fr>
19667
19668 * src/reader.c (parse_dquoted_param): New.
19669 (parse_skel_decl): Use it.
19670 * src/lex.h: Add its prototype.
19671 * src/lex.c (literalchar): Become not static.
19672
19673 2001-11-28 Marc Autret <autret_m@epita.fr>
19674
19675 * src/output.h: And put its extern declaration here.
19676 * src/output.c (error_verbose): Define here.
19677 (prepare): Echo name modification.
19678 * src/getargs.h: Clean its extern declaration.
19679 * src/getargs.c (error_verbose_flag): Remove.
19680 (getargs): Remove case 'e'.
19681 * src/options.c (option_table): 'error-verbose' is now seen as simple
19682 percent option.
19683 Include output.h.
19684
19685 * src/reader.c (read_declarations): Remove case tok_include.
19686 (parse_include_decl): Remove.
19687 * src/lex.h (token_t): Remove tok_include.
19688 * src/options.c (option_table): 'include' is now a simple command line
19689 option.
19690
19691 2001-11-28 Marc Autret <autret_m@epita.fr>
19692
19693 * src/bison.simple: Adjust muscle names.
19694 * src/muscle_tab.c (muscle_init): Also rename the muscles.
19695 * src/output.c (prepare): s/_/-/ for the muscles names.
19696 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
19697
19698 2001-11-28 Marc Autret <autret_m@epita.fr>
19699
19700 * src/bison.simple: Fix debug.
19701 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
19702
19703 2001-11-28 Akim Demaille <akim@epita.fr>
19704
19705 * src/LR0.c (shifts_new): New.
19706 (save_shifts, insert_start_shift, augment_automaton): Use it.
19707
19708 2001-11-28 Akim Demaille <akim@epita.fr>
19709
19710 * src/closure.c (closure): `b' and `ruleno' denote the same value:
19711 keep ruleno only.
19712
19713 2001-11-28 Akim Demaille <akim@epita.fr>
19714
19715 * src/closure.c (closure): Instead of looping over word in array
19716 then bits in words, loop over bits in array.
19717
19718 2001-11-28 Akim Demaille <akim@epita.fr>
19719
19720 * src/closure.c (closure): No longer optimize the special case
19721 where all the bits of `ruleset[r]' are set to 0, to make the code
19722 clearer.
19723
19724 2001-11-28 Akim Demaille <akim@epita.fr>
19725
19726 * src/closure.c (closure): `r' and `c' are new variables, used to
19727 de-obfuscate accesses to RULESET and CORE.
19728
19729 2001-11-28 Akim Demaille <akim@epita.fr>
19730
19731 * src/reduce.c (reduce_print): Use ngettext.
19732 (dump_grammar): Improve the trace accuracy.
19733
19734 2001-11-28 Akim Demaille <akim@epita.fr>
19735
19736 * src/reduce.c (dump_grammar): Don't translate trace messages.
19737
19738 2001-11-28 Akim Demaille <akim@epita.fr>
19739
19740 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
19741 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
19742 as all tags are free'ed afterwards.
19743 From Enrico Scholz.
19744
19745 2001-11-27 Paul Eggert <eggert@twinsun.com>
19746
19747 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
19748 use alloca when we didn't want to, and vice versa.
19749
19750 2001-11-27 Marc Autret <autret_m@epita.fr>
19751
19752 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
19753 initialization.
19754 * src/output.c (prepare): Remove its update.
19755
19756 2001-11-27 Marc Autret <autret_m@epita.fr>
19757
19758 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
19759 Use %error-verbose.
19760
19761 2001-11-27 Marc Autret <autret_m@epita.fr>
19762
19763 * src/bison.simple: Remove YYERROR_VERBOSE using.
19764 Use %%error_verbose.
19765 (yyparse): Likewise.
19766 * src/output.c (prepare): Give its final value.
19767 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
19768 * src/getargs.h: Add its extern declaration.
19769 * src/getargs.c (error_verbose_flag): New int.
19770 (getargs): Update to catch new case.
19771 * src/options.c (option_table): 'error-verbose' is a new option.
19772 (shortopts): Update.
19773
19774 2001-11-27 Akim Demaille <akim@epita.fr>
19775
19776 * src/system.h: Use intl/libgettext.h.
19777 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
19778
19779 2001-11-27 Akim Demaille <akim@epita.fr>
19780
19781 * tests/torture.at (Exploding the Stack Size with Malloc):
19782 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
19783
19784 2001-11-27 Akim Demaille <akim@epita.fr>
19785
19786 * src/files.c: Include error.h.
19787 Reported by Hans Aberg.
19788
19789 2001-11-26 Marc Autret <autret_m@epita.fr>
19790
19791 * src/reader.c (parse_include_decl): New, not yet implemented.
19792 (read_declarations): Add case tok_include.
19793 * src/getargs.h (include): Add its extern definition.
19794 * src/getargs.c (include): New const char *.
19795 (getargs): Add case '-I'.
19796 * src/options.c (option_table): Add include as command line and
19797 percent option.
19798 * src/lex.h (token_t): Add tok_include.
19799
19800 2001-11-26 Akim Demaille <akim@epita.fr>
19801
19802 * src/reader.c (readgram): Make sure rules for mid-rule actions
19803 have a lineno equal to that of their host rule.
19804 Reported by Hans Aberg.
19805 * tests/regression.at (Rule Line Numbers): New.
19806
19807 2001-11-26 Akim Demaille <akim@epita.fr>
19808
19809 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
19810 size_ts.
19811
19812 2001-11-26 Akim Demaille <akim@epita.fr>
19813
19814 * src/complain.c, src/complain.h (error): Remove, provided by
19815 lib/error.[ch].
19816
19817 2001-11-26 Akim Demaille <akim@epita.fr>
19818
19819 * src/reader.c (read_declarations): Don't abort on tok_illegal,
19820 issue an error message.
19821 * tests/regression.at (Invalid %directive): New.
19822 Reported by Hans Aberg.
19823
19824 2001-11-26 Akim Demaille <akim@epita.fr>
19825
19826 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
19827 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
19828
19829 2001-11-26 Akim Demaille <akim@epita.fr>
19830
19831 * src/conflicts.c (conflicts_print): Don't complain at all when
19832 there are no reduce/reduce conflicts, and as many shift/reduce
19833 conflicts as expected.
19834 * tests/regression.at (%expect right): Adjust.
19835
19836 2001-11-23 Akim Demaille <akim@epita.fr>
19837
19838 * lib/alloca.c: Update, from fileutils.
19839
19840 2001-11-23 Akim Demaille <akim@epita.fr>
19841
19842 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
19843
19844 2001-11-23 Akim Demaille <akim@epita.fr>
19845
19846 * src/system.h: Include alloca.h.
19847 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
19848
19849 2001-11-23 Akim Demaille <akim@epita.fr>
19850
19851 * src/print_graph.c (print_actions): Remove `rule', unused.
19852 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
19853 pacify GCC's signed < unsigned warnings.
19854 * src/closure.c (itemsetsize): Likewise.
19855 * src/reader.c (symbol_list_new): Static.
19856
19857 2001-11-23 Akim Demaille <akim@epita.fr>
19858
19859 Attaching lineno to buckets is stupid, since only one copy of each
19860 symbol is kept, only the line of the first occurrence is kept too.
19861
19862 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
19863 * src/reader.c (rline_allocated): Remove, unused.
19864 (symbol_list): Have a `line' member.
19865 (symbol_list_new): New.
19866 (readgram): Use it.
19867 * src/print.c (print_grammar): Output the rule line numbers.
19868 * tests/regression.at (Solved SR Conflicts)
19869 (Unresolved SR Conflicts): Adjust.
19870 Reported by Hans Aberg.
19871
19872 2001-11-22 Marc Autret <autret_m@epita.fr>
19873
19874 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
19875
19876 2001-11-22 Marc Autret <autret_m@epita.fr>
19877
19878 * src/muscle_tab.c (muscle_init): Remove initialization of
19879 skeleton muscle.
19880 * src/output.c (output_master_parser): Do it here.
19881
19882 2001-11-20 Akim Demaille <akim@epita.fr>
19883
19884 * po/sv.po: New.
19885 * configure.in (ALL_LINGUAS): Adjust.
19886 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
19887 longer contains strings to translate.
19888
19889 2001-11-19 Akim Demaille <akim@epita.fr>
19890
19891 * src/conflicts.c (conflicts_print): Add a missing \n.
19892
19893 2001-11-19 Akim Demaille <akim@epita.fr>
19894
19895 * src/nullable.c (nullable_print): New.
19896 (set_nullable): Call it when tracing.
19897 Better locality of variables.
19898
19899 2001-11-19 Akim Demaille <akim@epita.fr>
19900
19901 * src/print.c (print_actions): Better locality of variables.
19902
19903 2001-11-19 Akim Demaille <akim@epita.fr>
19904
19905 * src/derives.c (print_derives): Fix and enrich.
19906 * src/closure.c (print_fderives): Likewise.
19907
19908 2001-11-19 Akim Demaille <akim@epita.fr>
19909
19910 * src/closure.c (itemsetend): Remove, replaced with...
19911 (itemsetsize): new.
19912
19913 2001-11-19 Akim Demaille <akim@epita.fr>
19914
19915 * src/LR0.c (kernel_end): Remove, replaced with...
19916 (kernel_size): new.
19917
19918 2001-11-19 Akim Demaille <akim@epita.fr>
19919
19920 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
19921 to clarify.
19922
19923 2001-11-19 Akim Demaille <akim@epita.fr>
19924
19925 * src/closure.c (closure): Use arrays instead of pointers to clarify.
19926
19927 2001-11-19 Akim Demaille <akim@epita.fr>
19928
19929 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
19930 trace messages.
19931 * src/LR0.c: Likewise.
19932 (allocate_itemsets): Use arrays instead of pointers to clarify.
19933
19934 2001-11-19 Akim Demaille <akim@epita.fr>
19935
19936 * src/getargs.c (statistics_flag): Replace with...
19937 (trace_flag): New.
19938 (longopts): Accept --trace instead of --statistics.
19939 * src/getargs.h, src/options.c: Adjust.
19940 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
19941 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
19942
19943 2001-11-19 Akim Demaille <akim@epita.fr>
19944
19945 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
19946 pointers to clarify the code.
19947 (save_reductions, save_shifts): Factor common parts of alternatives.
19948
19949 2001-11-19 Akim Demaille <akim@epita.fr>
19950
19951 * src/LR0.c (new_state, get_state): Complete TRACE code.
19952 * src/closure.c: Include `reader.h' to get `tags', needed by the
19953 trace code.
19954 Rename the conditional DEBUG as TRACE.
19955 Output consistently TRACEs to stderr, not stdout.
19956 * src/derives.c: Likewise.
19957 * src/reduce.c: (inaccessable_symbols): Using if is better style
19958 than goto.
19959 Use `#if TRACE' instead of `#if 0' for tracing code.
19960
19961 2001-11-19 Akim Demaille <akim@epita.fr>
19962
19963 * src/system.h (LIST_FREE, shortcpy): New.
19964 * src/LR0.c: Use them.
19965 * src/output.c (free_itemsets, free_reductions, free_shifts):
19966 Remove, replaced by LIST_FREE.
19967
19968 2001-11-19 Akim Demaille <akim@epita.fr>
19969
19970 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
19971 (REDUCTIONS_ALLOC): New.
19972 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
19973 allocation.
19974
19975 2001-11-19 Akim Demaille <akim@epita.fr>
19976
19977 * src/LR0.c (new_state): Complete trace code.
19978 * src/nullable.c (set_nullable): Don't translate traces.
19979
19980 2001-11-19 Akim Demaille <akim@epita.fr>
19981
19982 * src/print_graph.c (print_core): Better locality of variables.
19983 * src/print.c (print_core): Likewise.
19984
19985 2001-11-19 Akim Demaille <akim@epita.fr>
19986
19987 * src/vcg.c: You do the output, so you are responsible of the
19988 handling of VCG syntax, in particular: use quotearg.
19989 * src/print_graph.c: Don't.
19990 (print_actions): Don't output the actions as part of the nodes,
19991 since that's the job of the edges.
19992 (print_state): Don't output by hand: fill the node description,
19993 and ask for its output.
19994
19995 2001-11-19 Akim Demaille <akim@epita.fr>
19996
19997 * src/bison.simple (yyparse): When verbosely reporting an error,
19998 no longer put additional quotes around token names.
19999 * tests/calc.at: Adjust.
20000
20001 2001-11-19 Akim Demaille <akim@epita.fr>
20002
20003 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
20004 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
20005 * src/output.c: Adjust.
20006
20007 2001-11-19 Akim Demaille <akim@epita.fr>
20008
20009 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
20010 (rule_t): this.
20011 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
20012
20013 2001-11-19 Akim Demaille <akim@epita.fr>
20014
20015 * src/gram.h (rule_t): New.
20016 (rule_table): New.
20017 (rrhs, rlhs): Remove, part of state_t.
20018 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
20019 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
20020 * src/reader.c, src/reduce.c: Adjust.
20021
20022 2001-11-19 Akim Demaille <akim@epita.fr>
20023
20024 * src/reader.c (symbols_output): New, extracted from...
20025 (packsymbols): Here.
20026 (reader): Call it.
20027
20028 2001-11-19 Akim Demaille <akim@epita.fr>
20029
20030 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
20031 (maxrhs): this new function.
20032
20033 2001-11-19 Akim Demaille <akim@epita.fr>
20034
20035 * src/lalr.c (F): New macro to access the variable F.
20036 Adjust.
20037
20038 2001-11-19 Akim Demaille <akim@epita.fr>
20039
20040 * src/lalr.h (LA): New macro to access the variable LA.
20041 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20042 * src/lalr.c: Adjust.
20043
20044 2001-11-19 Akim Demaille <akim@epita.fr>
20045
20046 * src/lalr.c (initialize_LA): Only initialize LA. Let...
20047 (set_state_table): handle the `lookaheads' members.
20048
20049 2001-11-19 Akim Demaille <akim@epita.fr>
20050
20051 * src/lalr.h (lookaheads): Removed array, whose contents is now
20052 a member of...
20053 (state_t): this structure.
20054 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20055 Adjust.
20056
20057 2001-11-19 Akim Demaille <akim@epita.fr>
20058
20059 * src/lalr.h (consistent): Removed array, whose contents is now
20060 a member of...
20061 (state_t): this structure.
20062 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20063 Adjust.
20064
20065 2001-11-19 Akim Demaille <akim@epita.fr>
20066
20067 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
20068 contents are now members of...
20069 (state_t): this structure.
20070 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20071 Adjust.
20072
20073 2001-11-19 Akim Demaille <akim@epita.fr>
20074
20075 * src/lalr.h (state_t): New.
20076 (state_table): Be a state_t * instead of a core **.
20077 (accessing_symbol): Remove, part of state_t.
20078 * src/lalr.c: Adjust.
20079 (set_accessing_symbol): Merge into...
20080 (set_state_table): this.
20081 * src/print_graph.c, src/conflicts.c: Adjust.
20082
20083 2001-11-14 Akim Demaille <akim@epita.fr>
20084
20085 * tests/calc.at, tests/output.at, tests/regression.at,
20086 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
20087 now the tests are run in private dirs, therefore AC_CLEANUP and
20088 family can be simplified to 0-ary.
20089 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
20090 use abs. path to find config.h.
20091 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
20092 stderr, there can be way too much random noise.
20093 Instead pass -Werror to GCC and rely on the exit status.
20094 Reported by Wolfram Wagner.
20095
20096 2001-11-14 Akim Demaille <akim@epita.fr>
20097
20098 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
20099 defined only if yyoverflow is defined, to avoid `warning: unused
20100 variable `yyvs1''.
20101 Reported by The Test Suite.
20102
20103 2001-11-14 Akim Demaille <akim@epita.fr>
20104
20105 * src/print.c: Include reduce.h.
20106 Reported by Hans Aberg.
20107
20108 2001-11-14 Akim Demaille <akim@epita.fr>
20109
20110 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
20111 Revert a previous patch: these are really const.
20112 * src/conflicts.c (conflict_report): Additional useless pair of
20113 braces to pacify GCC's warnings for `if () if () {} else {}'.
20114 * src/lex.c (parse_percent_token): Replace equal_offset with
20115 arg_offset.
20116 arg is const.
20117 Be sure to strdup `arg' when used, since there is no reason for
20118 token_buffer not to change.
20119
20120 2001-11-14 Akim Demaille <akim@epita.fr>
20121
20122 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
20123 definition.
20124 * src/main.c (main): Use them.
20125 Suggested by Hans Aberg.
20126
20127 2001-11-12 Akim Demaille <akim@epita.fr>
20128
20129 * src/system.h (ngettext): Now that we use ngettext, be sure to
20130 provide a default definition when NLS are not used.
20131
20132 2001-11-12 Akim Demaille <akim@epita.fr>
20133
20134 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
20135 Use @kbd to denote user input.
20136 (Language and Grammar): ANSIfy the example.
20137 Adjust its layout for info/notinfo.
20138 (Location Tracking Calc): Output error messages to stderr.
20139 Output locations in a more GNUtically correct way.
20140 Fix a couple of Englishos.
20141 Adjust @group/@end group pairs.
20142
20143 2001-11-12 Akim Demaille <akim@epita.fr>
20144
20145 %expect was not functioning at all.
20146
20147 * src/conflicts.c (expected_conflicts): Set to -1.
20148 (conflict_report): Use ngettext.
20149 (conflicts_print): Check %expect and make its violation an error.
20150 * doc/bison.texinfo (Expect Decl): Adjust.
20151 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
20152 * tests/regression.at (%expect not enough, %expect right)
20153 (%expect too much): New.
20154
20155 2001-11-12 Akim Demaille <akim@epita.fr>
20156
20157 * tests/regression.at (Conflicts): Rename as...
20158 (Unresolved SR Conflicts): this.
20159 (Solved SR Conflicts): New.
20160
20161 2001-11-12 Akim Demaille <akim@epita.fr>
20162
20163 * src/reduce.c (print_results): Rename as...
20164 (reduce_output): This.
20165 Output to OUT, passed as argument, instead of output_obstack.
20166 (dump_grammar): Likewise.
20167 (reduce_free): New.
20168 Also free V1.
20169 (reduce_grammar): No longer call reduce_output, since...
20170 * src/print.c (print_results): do it.
20171 * src/main.c (main): Call reduce_free;
20172
20173 2001-11-12 Akim Demaille <akim@epita.fr>
20174
20175 * src/conflicts.c (print_reductions): Accept OUT as argument.
20176 Output to it, not to output_obstack.
20177 * src/print.c (print_actions): Adjust.
20178
20179 2001-11-12 Akim Demaille <akim@epita.fr>
20180
20181 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
20182 the result instead of using...
20183 (src_total, rrc_total, src_count, rrc_count): Remove.
20184 (any_conflicts): Remove.
20185 (print_conflicts): Split into...
20186 (conflicts_print, conflicts_output): New.
20187 * src/conflicts.h: Adjust.
20188 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
20189 * src/print.c (print_grammar): Issue `\n' between two rules.
20190 * tests/regression.at (Conflicts): New.
20191 Reported by Tom Lane.
20192
20193 2001-11-12 Akim Demaille <akim@epita.fr>
20194
20195 * tests/regression.at (Invalid input): Remove, duplicate with
20196 ``Invalid input: 1''.
20197
20198 2001-11-12 Akim Demaille <akim@epita.fr>
20199
20200 * tests/torture.at (AT_DATA_STACK_TORTURE)
20201 (Exploding the Stack Size with Alloca)
20202 (Exploding the Stack Size with Malloc): New.
20203
20204 2001-11-12 Akim Demaille <akim@epita.fr>
20205
20206 * src/bison.simple (YYSTACK_REALLOC): New.
20207 (yyparse) [!yyoverflow]: Use it and free the old stack.
20208 Reported by Per Allansson.
20209
20210 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
20211
20212 * src/bison.simple: Define type yystype instead of YYSTYPE, and
20213 define CPP macro, which substitute YYSTYPE by yystype.
20214 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
20215 with yyltype/YYLTYPE. This allows inclusion of the generated
20216 header within the parser if the compiler, such as GGC, accepts
20217 multiple equivalent #defines.
20218 From Akim.
20219
20220 2001-11-05 Akim Demaille <akim@epita.fr>
20221
20222 * src/reader.c (symbols_output): New, extracted from...
20223 (packsymbols): here.
20224 (reader): Adjust.
20225
20226 2001-11-05 Akim Demaille <akim@epita.fr>
20227
20228 * src/lex.c (parse_percent_token): s/quotearg/quote/.
20229
20230 2001-11-05 Akim Demaille <akim@epita.fr>
20231
20232 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
20233 pattern.
20234
20235 2001-11-05 Akim Demaille <akim@epita.fr>
20236
20237 * src/options.h (struct option_table_struct): set_flags is void*.
20238 * src/options.c (longopts): Support `--output' and `%output'.
20239 (usage): Adjust.
20240 * src/lex.h (tok_setopt): Remove, replaced with...
20241 (tok_intopt, tok_stropt): these new guys.
20242 * src/lex.c (getopt.h): Not needed.
20243 (token_buffer, unlexed_token_buffer): Not const.
20244 (percent_table): Promote `-' over `_' in directive names.
20245 Active `%name-prefix', `file-prefix', and `output'.
20246 (parse_percent_token): Accept possible arguments to directives.
20247 Promote `-' over `_' in directive names.
20248
20249 2001-11-04 Akim Demaille <akim@epita.fr>
20250
20251 * doc/bison.texinfo (Decl Summary): Split the list into
20252 `directives for grammars' and `directives for bison'.
20253 Sort'em.
20254 Add description of `%name-prefix', `file-prefix', and `output'.
20255 Promote `-' over `_' in directive names.
20256 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
20257 Simplify the description of `--name-prefix'.
20258 Promote `-' over `_' in directive names.
20259 Promote `--output' over `--output-file'.
20260 Fix the description of `--defines'.
20261 * tests/output.at: Exercise %file-prefix and %output.
20262
20263 2001-11-02 Akim Demaille <akim@epita.fr>
20264
20265 * doc/refcard.tex: Update.
20266
20267 2001-11-02 Akim Demaille <akim@epita.fr>
20268
20269 * src/symtab.h (SUNDEF): New.
20270 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
20271 stand for `uninitialized', instead of 0.
20272 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
20273 * src/lex.c (lex): Adjust.
20274
20275 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
20276 Number it 0.
20277 Let yylex return it instead of a plain 0.
20278 Reported by Dick Streefland.
20279
20280 2001-11-02 Akim Demaille <akim@epita.fr>
20281
20282 * tests/regression.at (Mixing %token styles): New test.
20283
20284 2001-11-02 Akim Demaille <akim@epita.fr>
20285
20286 * src/reader.c (parse_thong_decl): Formatting changes.
20287 (token_translations_init): New, extracted from...
20288 (packsymbols): Here.
20289 Adjust.
20290
20291 2001-11-01 Akim Demaille <akim@epita.fr>
20292
20293 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
20294 Check that `9foo.y' produces correct cpp guards.
20295 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
20296 guards.
20297 Reported by Wwp.
20298
20299 2001-11-01 Akim Demaille <akim@epita.fr>
20300
20301 * tests/regression.at (Invalid input: 2): New.
20302 * src/lex.c (unlexed_token_buffer): New.
20303 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
20304 too.
20305 Reported by Wwp.
20306
20307 2001-11-01 Akim Demaille <akim@epita.fr>
20308
20309 * tests/calc.at: Catch up with 1.30.
20310 * configure.in: Bump to 1.49a.
20311 Adjust to newer Autotest.
20312
20313 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
20314
20315 * src/conflicts.c: Move global variables rrc_total and src_total ...
20316 (print_conflicts): here.
20317 * src/output.c (output): Free global variable user_toknums.
20318 * src/lex.c (token_obstack): Become static.
20319
20320 2001-10-18 Akim Demaille <akim@epita.fr>
20321
20322 * tests/atlocal.in (GCC): Add.
20323 * tests/calc.at: s/m4_match/m4_bmatch/.
20324 s/m4_patsubst/m4_bpatsubst/.
20325 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
20326 * configure.in: AC_SUBST(GCC).
20327
20328 2001-10-14 Marc Autret <autret_m@epita.fr>
20329
20330 * src/options.c (create_long_option_table): Fix.
20331
20332 2001-10-10 Akim Demaille <akim@epita.fr>
20333
20334 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
20335
20336 2001-10-04 Akim Demaille <akim@epita.fr>
20337
20338 * src/reader.c (parse_union_decl): Push the caracters in
20339 union_obstack, not attrs_obstack.
20340
20341 2001-10-04 Akim Demaille <akim@epita.fr>
20342
20343 Merge in the branch 1.29.
20344
20345 * src/reader.c (packsymbols): Use a temporary obstack for
20346 `%%tokendef', since output_stack is already used elsewhere.
20347
20348 2001-10-02 Akim Demaille <akim@epita.fr>
20349
20350 Bump 1.29d.
20351
20352 2001-10-02 Akim Demaille <akim@epita.fr>
20353
20354 Version 1.29c.
20355
20356 2001-10-02 Akim Demaille <akim@epita.fr>
20357
20358 * tests/regression.at (Invalid CPP headers): New.
20359 From Alexander Belopolsky.
20360 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
20361
20362 2001-10-02 Akim Demaille <akim@epita.fr>
20363
20364 * tests/regression.at (Invalid input): New.
20365 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
20366 Reported by Shura.
20367
20368 2001-10-02 Akim Demaille <akim@epita.fr>
20369
20370 * tests/calc.at: Now that --debug works, the tests must be adjusted.
20371
20372 2001-10-02 Akim Demaille <akim@epita.fr>
20373
20374 * src/output.c (output_parser): Assert `skeleton'.
20375 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
20376 systems.
20377 From Shura.
20378
20379 2001-10-01 Marc Autret <autret_m@epita.fr>
20380
20381 * src/lex.h: Echo modifications.
20382 * src/lex.c (unlex): Parameter is now token_t.
20383 From Hans Aberg.
20384
20385 2001-10-01 Marc Autret <autret_m@epita.fr>
20386
20387 * src/main.c: Include lex.h.
20388 From Hans Aberg.
20389
20390 2001-09-29 Akim Demaille <akim@epita.fr>
20391
20392 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
20393
20394 2001-09-28 Akim Demaille <akim@epita.fr>
20395
20396 * tests/testsuite.at: Update to newer Autotest.
20397 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
20398
20399 2001-09-27 Akim Demaille <akim@epita.fr>
20400
20401 Position independent wrapper.
20402
20403 * tests/bison: Remove.
20404 * tests/bison.in: New.
20405 * configure.in: Adjust.
20406
20407 2001-09-27 Paul Eggert <eggert@twinsun.com>
20408
20409 Port quotearg fixes from tar 1.13.24.
20410
20411 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
20412 tm to be declared.
20413 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
20414 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
20415
20416 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
20417 * m4/mbrtowc.m4: New file.
20418 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
20419 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
20420
20421 2001-09-27 Akim Demaille <akim@epita.fr>
20422
20423 Bump to 1.29c.
20424
20425 2001-09-27 Akim Demaille <akim@epita.fr>
20426
20427 Version 1.29b.
20428
20429 2001-09-25 Akim Demaille <akim@epita.fr>
20430
20431 * src/system.h: Include `xalloc.h'.
20432 Remove it from the C files.
20433 * src/files.c (output_files): Free the obstacks.
20434 * src/lex.c (init_lex): Rename as...
20435 (lex_init): this.
20436 (lex_free): New.
20437 * src/main.c (main): Use it.
20438
20439 2001-09-24 Marc Autret <autret_m@epita.fr>
20440
20441 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
20442 to output informations in fout (FILE*).
20443 (open_graph, close_graph): Likewise.
20444 (output_graph, output_edge, output_node): Likewise.
20445 * src/vcg.h: Update function prototypes.
20446 * src/print_graph.c (print_graph): Open output graph file.
20447 (print_actions): Adjust.
20448 * src/files.h: Remove extern declaration.
20449 * src/files.c: Remove graph_obstack declaration.
20450 (open_files): Remove graph_obstack initialization.
20451 (output_files): Remove graph_obstack saving.
20452
20453 2001-09-24 Marc Autret <autret_m@epita.fr>
20454
20455 * src/files.c (compute_output_file_names): Fix.
20456
20457 2001-09-24 Marc Autret <autret_m@epita.fr>,
20458 Akim Demaille <akim@epita.fr>
20459
20460 * src/reader.c (reader): Remove call to free_symtab ().
20461 * src/main.c (main): Call it here.
20462 Include symtab.h.
20463 * src/conflicts.c (initialize_conflicts): Rename as...
20464 (solve_conflicts): this.
20465 * src/print.c (print_core, print_actions, print_state)
20466 (print_grammar): Dump to a file instead a `output_obstack'.
20467 (print_results): Dump `output_obstack', and then proceed with the
20468 FILE *.
20469 * src/files.c (compute_output_file_names, close_files): New.
20470 (output_files): Adjust.
20471 * src/main.c (main): Adjust.
20472
20473 2001-09-23 Marc Autret <autret_m@epita.fr>
20474
20475 * src/files.c (compute_header_macro): Computes header macro name
20476 from spec_defines_file when given.
20477
20478 2001-09-23 Marc Autret <autret_m@epita.fr>
20479
20480 * src/files.c (output_files): Add default extensions.
20481
20482 2001-09-22 Akim Demaille <akim@epita.fr>
20483
20484 * src/conflicts.c (finalize_conflicts): Rename as...
20485 (free_conflicts): this.
20486
20487 2001-09-22 Akim Demaille <akim@epita.fr>
20488
20489 * src/gram.c (gram_free): Rename back as...
20490 (dummy): this.
20491 (output_token_translations): Free `token_translations'.
20492 * src/symtab.c (free_symtab): Free the tag field.
20493
20494 2001-09-22 Akim Demaille <akim@epita.fr>
20495
20496 Remove `translations' as it is always set to true.
20497
20498 * src/gram.h: Adjust.
20499 * src/reader.c (packsymbols, parse_token_decl): Adjust
20500 * src/print.c (print_grammar): Adjust.
20501 * src/output.c (output_token_translations): Adjust.
20502 * src/lex.c (lex): Adjust.
20503 * src/gram.c: Be sure the set pointers to NULL.
20504 (dummy): Rename as...
20505 (gram_free): this.
20506
20507 2001-09-22 Akim Demaille <akim@epita.fr>
20508
20509 * configure.in: Invoke AM_LIB_DMALLOC.
20510 * src/system.h: Use dmalloc.
20511 * src/LR0.c: Be sure to have pointers initialized to NULL.
20512 (allocate_itemsets): Allocate kernel_items only if needed.
20513
20514 2001-09-22 Akim Demaille <akim@epita.fr>
20515
20516 * configure.in: Bump to 1.29b.
20517 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
20518 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
20519 need xmalloc.c in calc.y.
20520 From Pascal Bart.
20521
20522 2001-09-21 Akim Demaille <akim@epita.fr>
20523
20524 Version 1.29a.
20525 * Makefile.maint, config/config.guess, config/config.sub,
20526 * config/missing: Update from masters.
20527 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
20528 upon package.m4.
20529 * configure.in (ALL_LINGUAS): Add `tr'.
20530
20531 2001-09-21 Akim Demaille <akim@epita.fr>
20532
20533 * tests/Makefile.am (package.m4): Move to...
20534 ($(srcdir)/$(TESTSUITE)): here.
20535
20536 2001-09-20 Akim Demaille <akim@epita.fr>
20537
20538 * src/complain.c: No longer try to be standalone: use system.h.
20539 Don't assume __STDC__ is defined to 1. Just test if it is defined.
20540 * src/complain.h: Likewise.
20541 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
20542 Remove the unused variable `n'.
20543 From Albert Chin-A-Young.
20544
20545 2001-09-18 Marc Autret <autret_m@epita.fr>
20546
20547 * doc/bison.1: Update.
20548 * doc/bison.texinfo (Bison Options): Update --defines and --graph
20549 descriptions.
20550 (Option Cross Key): Update.
20551 Add --graph.
20552
20553 2001-09-18 Marc Autret <autret_m@epita.fr>
20554
20555 * tests/regression.at: New test (comment in %union).
20556
20557 2001-09-18 Marc Autret <autret_m@epita.fr>
20558
20559 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
20560 do that.
20561 Reported by Keith Browne.
20562
20563 2001-09-18 Marc Autret <autret_m@epita.fr>
20564
20565 * tests/output.at: Add tests for --defines and --graph.
20566
20567 2001-09-18 Marc Autret <autret_m@epita.fr>
20568
20569 * tests/output.at: Removes tests of %{header,src}_extension features.
20570
20571 2001-09-18 Akim Demaille <akim@epita.fr>
20572
20573 * tests/Makefile.am (package.m4): New.
20574 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
20575 (_AT_CHECK_CALC_ERROR): Likewise.
20576 Factor the `, ' part of verbose error messages.
20577
20578 2001-09-18 Marc Autret <autret_m@epita.fr>
20579
20580 * src/getargs.c (longopts): Declare --defines and --graph as options
20581 with optional arguments.
20582 * src/files.h: Add extern declarations.
20583 * src/files.c (spec_graph_file, spec_defines_file): New.
20584 (output_files): Update.
20585 Remove CPP-outed code.
20586
20587 2001-09-18 Marc Autret <autret_m@epita.fr>
20588
20589 Turn off %{source,header}_extension feature.
20590
20591 * src/files.c (compute_exts_from_gf): Update.
20592 (compute_exts_from_src): Update.
20593 (output_files): CPP-out useless code.
20594 * src/files.h: Remove {header,source}_extension extern declarations.
20595 * src/reader.c (parse_dquoted_param): CPP-out.
20596 (parse_header_extension_decl): Remove.
20597 (parse_source_extension_decl): Remove.
20598 (read_declarations): Remove cases tok_{hdrext,srcext}.
20599 * src/lex.c (percent_table): Remove {header,source}_extension entries.
20600 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
20601
20602 2001-09-10 Akim Demaille <akim@epita.fr>
20603
20604 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
20605 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
20606 (AT_CHECK_OUTPUT): this.
20607 Merely check ls' exit status, its output is useless.
20608
20609 2001-09-10 Akim Demaille <akim@epita.fr>
20610
20611 * tests/calc.at: Use m4_match.
20612 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
20613
20614 2001-09-10 Marc Autret <autret_m@epita.fr>,
20615 Akim Demaille <akim@epita.fr>
20616
20617 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
20618 enum color_e.
20619 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
20620 to `normal'.
20621 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
20622 * src/lex.h: Adjust prototype.
20623 (token_t): Add `tok_undef'.
20624 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
20625 (parse_percent_token): Now returns token_t.
20626 Add default statement in switch.
20627 (lex): Separate `c' as an input variable, from the token_t result
20628 part.
20629 (unlexed): Is a token_t.
20630
20631 2001-09-10 Akim Demaille <akim@epita.fr>
20632
20633 * configure.in: Bump to 1.29a.
20634
20635 2001-09-07 Akim Demaille <akim@epita.fr>
20636
20637 Version 1.29.
20638
20639 2001-08-30 Akim Demaille <akim@epita.fr>
20640
20641 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
20642 * m4/atconfig.m4: Remove.
20643 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
20644 * tests/bison: New.
20645 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
20646 m4_if, m4_patsubst, and m4_regexp.
20647 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
20648 `input' file instead of echo.
20649
20650 2001-08-29 Akim Demaille <akim@epita.fr>
20651
20652 Bump to 1.28e.
20653
20654 2001-08-29 Akim Demaille <akim@epita.fr>
20655
20656 Version 1.28d.
20657
20658 2001-08-29 Paul Eggert <eggert@twinsun.com>
20659
20660 * src/bison.simple (yyparse): Don't take the address of an
20661 item before the start of an array, as that doesn't conform to
20662 the C Standard.
20663
20664 2001-08-29 Robert Anisko <anisko_r@epita.fr>
20665
20666 * doc/bison.texinfo (Location Tracking Calc): New node.
20667
20668 2001-08-29 Paul Eggert <eggert@twinsun.com>
20669
20670 * src/output.c (output): Do not define const, as this now
20671 causes more problems than it cures.
20672
20673 2001-08-29 Akim Demaille <akim@epita.fr>
20674
20675 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
20676 the nodes.
20677 Be sure to tag the `detailmenu'.
20678
20679 2001-08-29 Akim Demaille <akim@epita.fr>
20680
20681 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
20682 download in a tmp dir.
20683
20684 2001-08-28 Marc Autret <autret_m@epita.fr>
20685
20686 * config/depcomp: New file.
20687
20688 2001-08-28 Marc Autret <autret_m@epita.fr>
20689
20690 * doc/bison.1 (mandoc): Adjust.
20691 From Juan Manuel Guerrero.
20692
20693 2001-08-28 Marc Autret <autret_m@epita.fr>
20694
20695 * src/print_graph.c (print_state): Fix.
20696
20697 2001-08-27 Marc Autret <autret_m@epita.fr>
20698
20699 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
20700 char * members.
20701 Echo modifications to the functions prototypes.
20702 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
20703
20704 2001-08-27 Marc Autret <autret_m@epita.fr>
20705
20706 * src/vcg.c: Include `xalloc.h'.
20707 (add_colorentry): New.
20708 (add_classname): New.
20709 (add_infoname): New.
20710 * src/vcg.h: Add new prototypes.
20711
20712 2001-08-27 Akim Demaille <akim@epita.fr>
20713
20714 * Makefile.maint: Sync. again with CVS Autoconf.
20715
20716 2001-08-27 Akim Demaille <akim@epita.fr>
20717
20718 * Makefile.maint: Formatting changes.
20719 (po-update, cvs-update, update): New targets.
20720 (AMTAR): Remove.
20721
20722 2001-08-27 Akim Demaille <akim@epita.fr>
20723
20724 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
20725 * Makefile.maint: Sync. with CVS Autoconf.
20726
20727 2001-08-27 Marc Autret <autret_m@epita.fr>
20728
20729 * src/vcg.h (struct infoname_s): New.
20730 (struct colorentry_s): New.
20731 (graph_s): New fields {vertical,horizontal}_order in structure.
20732 Add `infoname' field.
20733 Add `colorentry' field;
20734 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
20735 (G_HORIZONTAL_ORDER): New.
20736 (G_INFONAME): New.
20737 (G_COLORENTRY): New.
20738 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
20739 Add output of `infoname'.
20740 Add output of `colorentry'.
20741
20742 2001-08-27 Marc Autret <autret_m@epita.fr>
20743
20744 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
20745 This one shadowed a global parameter.
20746
20747 2001-08-24 Marc Autret <autret_m@epita.fr>
20748
20749 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
20750 instead of `unsigned'.
20751 (print_state): Do not call obstack_object_size () in obstack_grow ()
20752 to avoid macro variables shadowing.
20753
20754 2001-08-23 Marc Autret <autret_m@epita.fr>
20755
20756 * src/lex.c (percent_table): Typo: s/naem/name/.
20757 Add graph option.
20758 Normalize new options declarations.
20759
20760 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
20761
20762 * tests/suite.at: Exercise %header_extension and %source_extension.
20763
20764 2001-08-16 Marc Autret <autret_m@epita.fr>
20765
20766 * src/reader.c (parse_dquoted_param): New.
20767 (parse_header_extension_decl): Use it.
20768 (parse_source_extension_decl): Likewise.
20769
20770 2001-08-16 Marc Autret <autret_m@epita.fr>
20771
20772 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
20773 (get_xxxx_str): Use assert () instead of complain ().
20774 Remove return invokations in default cases.
20775 (get_decision_str): Modify default behaviour. Remove second argument.
20776 Echo modifications on calls.
20777 (output_graph): Fix.
20778
20779 2001-08-16 Marc Autret <autret_m@epita.fr>
20780
20781 * src/getargs.c (usage): Update with ``-g, --graph''.
20782
20783 2001-08-16 Marc Autret <autret_m@epita.fr>
20784
20785 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
20786 (Option Cross Key): Likewise.
20787 * doc/bison.1: Update.
20788
20789 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
20790
20791 * src/output.c (output_master_parser): Don't finish action_obstack.
20792 (output_parser): Don't care about the muscle action, here.
20793 (prepare): Copy the action_obstack in the action muscle.
20794 (output): Free action_obstack.
20795
20796 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
20797
20798 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
20799 will contain `%union' declaration.
20800 (parse_union_decl): Delete #line directive output.
20801 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
20802 informations about %union.
20803 (parse_union_decl): Copy the union_obstack in the muscle stype.
20804 * src/bison.simple: Add new #line directive.
20805 Add typdef %%stype YYSTYPE.
20806
20807 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
20808
20809 * src/bison.simple: Add new `#line' directive.
20810
20811 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
20812
20813 * src/bison.simple: New `#line' directive.
20814 * src/output.c (output_parser): Support new dynamic muscle input_line.
20815
20816 2001-09-22 Marc Autret <autret_m@epita.fr>
20817
20818 * src/output.c (output_master_parser): New.
20819 (output_parser): Be more re-entrant.
20820
20821 2001-09-21 Marc Autret <autret_m@epita.fr>
20822
20823 * src/reader.c (copy_definition, parse_union_decl): Update and use
20824 `linef' muscle.
20825 (copy_action): Likewise.
20826 Use obstack_1grow ().
20827 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
20828
20829 2001-09-21 Marc Autret <autret_m@epita.fr>
20830
20831 * src/options.c (option_table): Adjust.
20832 * src/lex.c (parse_percent_token): Fix.
20833
20834 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
20835
20836 * src/options.c (symtab.h): Include it, need by lex.h.
20837
20838 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
20839
20840 * src/lex.c (parse_percent_token): Change type of variable `tx', which
20841 is now an option_table_struct*.
20842 (option_strcmp): New function option_strcmp.
20843 (parse_percent_token): Call option_strcmp.
20844 * src/getargs.c (xalloc.h, options.h): Include it.
20845 (getargs): Call create_long_option_table.
20846 (getargs): Free longopts at the end of the function.
20847 (shortopts): Move in options.c.
20848 * src/options.c (create_long_option_table): New function. Convert
20849 information from option_table to option structure.
20850 * src/reader.c (options.h): Include it.
20851
20852 * src/Makefile.am: Adjust.
20853 * src/options.c (option_table): Create from longopts and percent_table.
20854 * src/getargs.c (longopts): Delete.
20855 * src/lex.c (struct percent_table_struct): Delete.
20856 (percent_table): Delete.
20857 (options.h): Include it.
20858 * src/options.c: Create.
20859 * src/options.h: Create.
20860 Declare enum opt_access_e.
20861 Define struct option_table_struct.
20862
20863 2001-09-20 Marc Autret <autret_m@epita.fr>
20864
20865 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
20866 sections of Bison.
20867
20868 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
20869
20870 * src/bison.simple: s/%%filename/%%skeleton.
20871 * src/muscle_tab.c (getargs.h): Include it.
20872 (muscle_init): Insert new muscle skeleton.
20873
20874 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
20875
20876 * src/output.c (output_parser): Delete unused variable actions_dumped.
20877
20878 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
20879
20880 * src/output.c (output): Delete call to reader_output_yylsp.
20881 * src/reader.c (reader): Likewise.
20882 * src/reader.h: Delete declaration of reader_output_yylsp.
20883
20884 2001-09-02 Marc Autret <autret_m@epita.fr>
20885
20886 * src/reader.c: Include muscle_tab.h.
20887 (parse_union_decl): Update.
20888 (parse_macro_decl): Rename parse_muscle_decl.
20889 Update to use renamed functions and variable.
20890 (read_declarations, copy_action, read_additionnal_code, : Updated
20891 with correct variables and functions names.
20892 (packsymbols, reader): Likewise.
20893
20894 * src/reader.h (muscle_obstack): Extern declaration update.
20895
20896 * src/output.c: Include muscle_tab.h
20897 In all functions using macro_insert, change by using muscle_insert ().
20898 (macro_obstack): Rename muscle_obstack.
20899 Echo modifications in the whole file.
20900 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
20901 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
20902 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
20903
20904 * src/muscle_tab.h: Update double inclusion macros.
20905 (macro_entry_s): Rename muscle_entry_s.
20906 Update prototypes.
20907
20908 * src/muscle_tab.c: Include muscle_tab.h.
20909 Rename macro_tabble to muscle_table.
20910 (mhash1, mhash2, mcmp): Use muscle_entry.
20911 (macro_init): Rename muscle_init. Update.
20912 (macro_insert): Rename muscle_insert. Update.
20913 (macro_find): Rename muscle_find. Update.
20914
20915 * src/main.c: Include muscle_tab.h.
20916 (main): Call muscle_init ().
20917 * src/Makefile.am (bison_SOURCES): Echo modifications.
20918
20919 2001-09-02 Marc Autret <autret_m@epita.fr>
20920
20921 Now the files macro_tab.[ch] are named muscle_tab.[ch].
20922
20923 * src/muscle_tab.c, src/muscle_tab.h: Add files.
20924
20925 2001-09-02 Marc Autret <autret_m@epita.fr>
20926
20927 * src/macrotab.c, src/macrotab.h: Remove.
20928
20929 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
20930
20931 * src/reader.c (copy_guard): Use muscle to specify the `#line'
20932 filename.
20933
20934 2001-09-01 Marc Autret <autret_m@epita.fr>
20935
20936 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
20937 to an explicit value to activate the feature. We do it here.
20938
20939 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20940
20941 * src/output.c (prepare): Delete the `filename' muscule insertion.
20942 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
20943 (parse_union_decl): Likewise.
20944 * src/macrotab.c (macro_init): Initialize filename by infile.
20945
20946 2001-08-31 Marc Autret <autret_m@epita.fr>
20947
20948 * src/bison.simple (YYLSP_NEEDED): New definition.
20949 * src/output.c (prepare): Add macro insertion of `locations_flag'
20950
20951 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20952
20953 * src/output.c (prepare): Delete insertion of previous muscles,
20954 and insert the `prefix' muscles.
20955 * src/macrotab.c (macro_init): Likewise.
20956 (macro_init): Initialization prefix directive by `yy'.
20957 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
20958 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
20959 yylval, yydebug, yyerror, yynerrs and yyparse.
20960 New directive `#define' to substitute yydebug, ... with option
20961 name_prefix.
20962
20963 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20964
20965 * src/main.c (main): Standardize.
20966 * src/output.c (output_table_data, output_parser): Likewise.
20967 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
20968
20969 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
20970
20971 * src/reader.c (read_additionnal_code): Rename %%user_code to
20972 %%epilogue.
20973 * src/output.c (output): Rename %%declarations to %%prologue.
20974 * src/bison.simple: Echo modifications.
20975
20976 2001-08-31 Marc Autret <autret_m@epita.fr>
20977
20978 * src/reader.c (readgram): CleanUp.
20979 (output_token_defines): Likewise.
20980 (packsymbols): Likewise.
20981 (reader): Likewise.
20982 * src/output.c (output): CPP-out useless code.
20983
20984 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20985
20986 * src/reader.c (reader): Delete obsolete call to function
20987 output_trailers and output_headers.
20988 * src/output.h: Remove obsolete functions prototypes of output_headers
20989 and output_trailers.
20990
20991 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
20992
20993 * src/main.c: Include macrotab.h.
20994 * src/macrotab.h (macro_entry_s): Constify fields.
20995 Adjust functions prototypes.
20996 * src/macrotab.c (macro_insert): Constify key and value.
20997 (macro_find): Constify key.
20998 (macro_insert): Include 'xalloc.h'
20999 (macro_insert): Use XMALLOC.
21000 (macro_find): Constify return value.
21001 * src/output.c (output_table_data): Rename table to table_data.
21002 (output_parser): Constify macro_key, macro_value.
21003
21004 2001-08-30 Marc Autret <autret_m@epita.fr>
21005
21006 * src/reader.c (parse_skel_decl): New.
21007 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
21008 * src/lex.h (token_t): New token `tok_skel'.
21009 * src/lex.c (percent_table): Add skeleton option entry.
21010 Standardize.
21011
21012 2001-08-29 Marc Autret <autret_m@epita.fr>
21013
21014 * src/bison.simple: Add %%user_code directive at the end.
21015 * src/reader.c (read_additionnal_code): New.
21016 (reader): Use it.
21017 * src/output.c (output_program): Remove.
21018 (output): Update.
21019
21020 2001-08-28 Marc Autret <autret_m@epita.fr>
21021
21022 * src/output.c (output_actions): Clean up.
21023 (output_gram): CPP-out useless code.
21024 * src/reader.c (reader): Clean up, CPP-out useless code.
21025
21026 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
21027
21028 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
21029 directive.
21030 * src/bison.simple: Add `%%definitions'.
21031
21032 2001-08-28 Marc Autret <autret_m@epita.fr>
21033
21034 * config/depcomp: New file.
21035
21036 2001-08-27 Paul Eggert <eggert@twinsun.com>
21037
21038 * src/bison.simple (yyparse): Don't take the address of an
21039 item before the start of an array, as that doesn't conform to
21040 the C Standard.
21041
21042 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
21043
21044 * src/output.c (output): Remove the initialization of the macro
21045 obstack. It was done too late here.
21046
21047 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
21048 completely wrong.
21049 (reader): Initialize the macro obstack here, since we need it to grow
21050 '%define' directives.
21051
21052 * src/reader.h: Declare the macro obstack as extern.
21053
21054 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
21055
21056 * src/output.c (output_parser): Fix. Store single '%' characters in
21057 the output obstack instead of throwing them away.
21058
21059 2001-08-27 Akim Demaille <akim@epita.fr>
21060
21061 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21062
21063 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21064
21065 * lib/Makefile.am: Adjust.
21066
21067 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21068
21069 * src/bison.simple: Update and add '%%' directives.
21070
21071 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21072
21073 * src/reader.c (reader): Remove calls to 'output_headers' and
21074 'output_trailers'. Remove some C output.
21075 (readgram): Disable a piece of code that was writing a default
21076 definition for 'YYSTYPE'.
21077 (reader_output_yylsp): Remove.
21078 (packsymbols): Output token defintions to a macro.
21079 (copy_definition): Disable C output.
21080
21081 * src/reader.c (parse_macro_decl): New function used to parse macro
21082 declarations.
21083 (copy_string2): Put the body of copy_string into this new function.
21084 Add a parameter to let the caller choose whether he wants to copy the
21085 string delimiters or not.
21086 (copy_string): Be a simple call to copy_string2 with the last argument
21087 bound to true.
21088 (read_declarations): Add case for macro definition.
21089 (copy_identifier): New.
21090 (parse_macro_decl): Read macro identifiers using copy_identifier
21091 rather than lex.
21092
21093 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21094
21095 * src/output.c (prepare): Add prefixed names.
21096 (output_parser): Output semantic actions.
21097 (output_parser): Fix bug on '%%line' directives.
21098
21099 * src/output.c (output_headers): Remove. The C code printed by this
21100 function should now be in the skeletons.
21101 (output_trailers): Remove.
21102 (output): Disable call to 'reader_output_yylsp'.
21103 (output_rule_data): Do not output tables to the table obstack.
21104
21105 * src/output.c: Remove some C dedicated output.
21106 Improve the use of macro and output obstacks.
21107 (output_defines): Remove.
21108
21109 * src/output.c (output_token_translations): Associate 'translate'
21110 table with a macro. No output to the table obstack.
21111 (output_gram): Same for 'rhs' and 'prhs'.
21112 (output_stos): Same for 'stos'.
21113 (output_rule_data): Same for 'r1' and 'r2'.
21114 (token_actions): Same for 'defact'.
21115 (goto_actions): Same for 'defgoto'.
21116 (output_base): Same for 'pact' and 'pgoto'.
21117 (output_table): Same for 'table'.
21118 (output_check): Same for 'check'.
21119
21120 * src/output.c (output_table_data): New function.
21121 (output_short_table): Remove.
21122 (output_short_or_char_table): Remove.
21123
21124 * src/output.c (output_parser): Replace most of the skeleton copy code
21125 with something new. Skeletons are now processed character by character
21126 rather than line by line, and Bison looks for '%%' macros. This is the
21127 first step in making Bison's output process (a lot) more flexible.
21128 (output_parser): Use the macro table.
21129
21130 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21131
21132 * src/main.c (main): Initialize the macro table.
21133
21134 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21135
21136 * src/lex.c (percent_table): Add tok_define.
21137 * src/lex.h: Add tok_define.
21138
21139 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21140
21141 * src/macrotab.c: New file.
21142 * src/macrotab.h: New file.
21143 * src/Makefile.am: Update.
21144
21145 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21146
21147 * lib/hash.c: New file.
21148 * lib/hash.h: New file.
21149 * lib/Makefile.am: Update.
21150
21151 2001-08-15 Akim Demaille <akim@epita.fr>
21152
21153 Version 1.28c.
21154
21155 2001-08-15 Marc Autret <autret_m@epita.fr>
21156
21157 * src/reader.c (readgram): Indent output macro YYSTYPE.
21158 (packsymbols): Likewise.
21159 (output_token_defines): Likewise.
21160 * src/files.c: Standardize.
21161 (compute_header_macro): New.
21162 (defines_obstack_save): New. Use compute_header_macro.
21163 (output_files): Update. Use defines_obstack_save.
21164
21165 2001-08-15 Akim Demaille <akim@epita.fr>
21166
21167 * doc/bison.texinfo (Table of Symbols): Document
21168 YYSTACK_USE_ALLOCA.
21169
21170 2001-08-15 Akim Demaille <akim@epita.fr>
21171
21172 * missing: Update from CVS Automake.
21173 * config/config.guess, config/config.sub, config/texinfo.tex:
21174 Update from gnu.org.
21175
21176 2001-08-15 Akim Demaille <akim@epita.fr>
21177
21178 * Makefile.maint: Sync with CVS Autoconf.
21179
21180 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
21181
21182 * doc/bison.texinfo: Include GNU Free Documentation License from
21183 `fdl.texi'.
21184 * doc/fdl.texi: Add to package.
21185
21186 2001-08-14 Marc Autret <autret_m@epita.fr>
21187
21188 Turn on %{source,header}_extension features.
21189
21190 * src/lex.c (percent_table): Un-CPP out header_extension and
21191 source_extension.
21192 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
21193 (compute_exts_from_src): Remove conditions. It restores priorities
21194 between options.
21195
21196 2001-08-14 Marc Autret <autret_m@epita.fr>
21197
21198 * src/files.c (compute_base_names): Add extensions computing when
21199 `--file-prefix' used.
21200 Standardize function calls.
21201
21202 2001-08-13 Marc Autret <autret_m@epita.fr>
21203
21204 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
21205 defining it (defined but null disables alloca).
21206
21207 2001-08-13 Marc Autret <autret_m@epita.fr>
21208
21209 * src/bison.simple (_yy_memcpy): CPP reformat.
21210
21211 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
21212
21213 * tests/atconfig.in (CPPFLAGS): Fix.
21214
21215 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
21216
21217 * doc/bison.texinfo: Include GNU General Public License from
21218 `gpl.texi'.
21219 * doc/gpl.texi: Add to package.
21220
21221 2001-08-10 Marc Autret <autret_m@epita.fr>
21222
21223 * src/print_graph.h: Fix.
21224 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
21225
21226 2001-08-10 Akim Demaille <akim@epita.fr>
21227
21228 * src/system.h: Provide default declarations for stpcpy, strndup,
21229 and strnlen.
21230
21231 2001-08-10 Robert Anisko <anisko_r@epita.fr>
21232
21233 * doc/bison.texinfo (Locations): Update @$ stuff.
21234
21235 2001-08-09 Robert Anisko <anisko_r@epita.fr>
21236
21237 * src/bison.simple (YYLLOC_DEFAULT): Update.
21238 (yyparse): Adjust.
21239
21240 2001-08-08 Marc Autret <autret_m@epita.fr>
21241
21242 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
21243 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
21244 Reported by Fabrice Bauzac.
21245
21246 2001-08-08 Marc Autret <autret_m@epita.fr>
21247
21248 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
21249 * src/vcg.c (output_node): Fix.
21250 * src/vcg.h: Cleanup.
21251 * src/print_graph.c: Add comments.
21252 (node_output_size): New global variable. Simplify the formatting of
21253 the VCG graph output.
21254 (print_actions): Unused code is now used. It notifies the final state
21255 and no action states in the VCG graph. It also give the reduce actions.
21256 The `shift and goto' edges are red and the `go to state' edges are
21257 blue.
21258 Get the current node name and node_obstack by argument.
21259 (node_obstack): New variable.
21260 (print_state): Manage node_obstack.
21261 (print_core): Use node_obstack given by argument.
21262 A node is not only computed here but in print_actions also.
21263 (print_graph): CPP out useless code instead of commenting it.
21264
21265 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
21266
21267 * tests/atconfig.in (CPPFLAGS): Fix.
21268
21269 2001-08-07 Akim Demaille <akim@epita.fr>
21270
21271 * src/print_graph.c (quote): New.
21272 (print_core): Use it.
21273
21274 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
21275
21276 * src/vcg.c (complain.h): Include it.
21277 Unepitaize `return' invocations.
21278 [NDEBUG] (main): Remove.
21279 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
21280 * src/files.c (open_files): Initialize graph_obstack.
21281 * src/print_graph.c (print_actions): CPP out useless code.
21282 (print_core): Don't output the last `\n' in labels.
21283 Use `quote'.
21284 * src/files.c (output_files): Output the VCG file.
21285 * src/main.c (main): Invoke print_graph ();
21286
21287 2001-08-06 Marc Autret <autret_m@epita.fr>
21288
21289 Automaton VCG graph output.
21290 Using option ``-g'' or long option ``--graph'', you can generate
21291 a gram_filename.vcg file containing a VCG description of the LALR (1)
21292 automaton of your grammar.
21293
21294 * src/main.c: Call to print_graph() function.
21295 * src/getargs.h: Update.
21296 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
21297 (graph_flag): New flag.
21298 (longopts): Update.
21299 (getargs): Add case `g'.
21300 * src/files.c (graph_obstack): New obstack struct.
21301 (open_files): Initialize new obstack.
21302 (output_files): Saves graph_obstack if required.
21303 * src/files.h (graph_obstack): New extern declaration.
21304 * src/Makefile.am: Add new source files.
21305
21306 2001-08-06 Marc Autret <autret_m@epita.fr>
21307
21308 * src/print_graph.c, src/print_graph.h (graph): New.
21309 * src/vcg.h: New file.
21310 * src/vcg.c: New file, VCG graph handling.
21311
21312 2001-08-06 Marc Autret <autret_m@epita.fr>
21313
21314 Add of %source_extension and %header_extension which specify
21315 the source or/and the header output file extension.
21316
21317 * src/files.c (compute_base_names): Remove initialisation of
21318 src_extension and header_extension.
21319 (compute_exts_from_gf): Update.
21320 (compute_exts_from_src): Update.
21321 (output_files): Update.
21322 * src/reader.c (parse_header_extension_decl): New.
21323 (parse_source_extension_decl): New.
21324 (read_declarations): New case statements for the new tokens.
21325 * src/lex.c (percent_table): Add entries for %source_extension
21326 and %header_extension.
21327 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
21328
21329 2001-08-06 Marc Autret <autret_m@epita.fr>
21330
21331 * configure.in: Bump to 1.28c.
21332 * doc/bison.texinfo: Texinfo thingies.
21333
21334 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
21335
21336 * tests/atconfig.in (CPPFLAGS): Add.
21337 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
21338
21339 2001-08-03 Akim Demaille <akim@epita.fr>
21340
21341 Version 1.28b.
21342
21343 2001-08-03 Akim Demaille <akim@epita.fr>
21344
21345 * tests/Makefile.am (check-local): Ship testsuite.
21346 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
21347 Include `string.h'.
21348
21349 2001-08-03 Akim Demaille <akim@epita.fr>
21350
21351 * configure.in: Try using -Wformat when compiling.
21352
21353 2001-08-03 Akim Demaille <akim@epita.fr>
21354
21355 * configure.in: Bump to 1.28b.
21356
21357 2001-08-03 Akim Demaille <akim@epita.fr>
21358
21359 * src/complain.c: Adjust strerror_r portability issues.
21360
21361 2001-08-03 Akim Demaille <akim@epita.fr>
21362
21363 Version 1.28a.
21364
21365 2001-08-03 Akim Demaille <akim@epita.fr>
21366
21367 * src/getargs.c, src/getarg.h (skeleton)): Constify.
21368 * src/lex.c (literalchar): Avoid name clashes on `buf'.
21369 * src/getargs.c: Include complain.h.
21370 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
21371 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
21372
21373 2001-08-03 Akim Demaille <akim@epita.fr>
21374
21375 * src/reader.c (readgram): Display hidden chars in error messages.
21376
21377 2001-08-03 Akim Demaille <akim@epita.fr>
21378
21379 Update to gettext 0.10.39.
21380
21381 2001-08-03 Akim Demaille <akim@epita.fr>
21382
21383 * lib/strspn.c: New.
21384
21385 2001-08-01 Marc Autret <autret_m@epita.fr>
21386
21387 * doc/bison.texinfo: Update.
21388 * doc/bison.1 (mandoc): Update.
21389 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
21390 * src/files.c: Support output files extensions computing.
21391 (src_extension): New static variable.
21392 (header_extension): New static variable.
21393 (tr): New function.
21394 (get_extension_index): New function, gets the index of an extension
21395 filename in a string.
21396 (compute_exts_from_gf): New function, computes extensions from the
21397 grammar file extension.
21398 (compute_exts_from_src): New functions, computes extensions from the
21399 C source file extension, file given by ``-o'' option.
21400 (compute_base_names): Update.
21401 (output_files): Update.
21402
21403 2001-08-01 Robert Anisko <anisko_r@epita.fr>
21404
21405 * doc/bison.texi: Document @$.
21406 (Locations): New section.
21407
21408 2001-07-18 Akim Demaille <akim@epita.fr>
21409
21410 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
21411 * config/prev-version.txt, config/move-if-change: New.
21412 * Makefile.am: Adjust.
21413
21414 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
21415
21416 * src/bison.simple (yyparse): Suppress warning `comparaison
21417 between signed and unsigned'.
21418
21419 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
21420
21421 * src/getargs.h (raw_flag): Remove.
21422 * src/getargs.c: Die on `-r'/`--raw'.
21423 * src/lex.c (parse_percent_token): Die on `%raw'.
21424 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
21425 * tests/calc.at: Suppress test with option `--raw'.
21426
21427 2001-07-14 Akim Demaille <akim@epita.fr>
21428
21429 * config/: New.
21430 * configure.in: Require Autoconf 2.50.
21431 Update to gettext 0.10.38.
21432
21433 2001-03-16 Akim Demaille <akim@epita.fr>
21434
21435 * doc/bison.texinfo: ANSIfy the examples.
21436
21437 2001-03-16 Akim Demaille <akim@epita.fr>
21438
21439 * getargs.c (skeleton): New variable.
21440 (longopts): --skeleton is a new option.
21441 (shortopts, getargs): -S is a new option.
21442 * getargs.h: Declare skeleton.
21443 * output.c (output_parser): Use it.
21444
21445 2001-03-16 Akim Demaille <akim@epita.fr>
21446
21447 * m4/strerror_r.m4: New.
21448 * m4/error.m4: Run AC_FUNC_STRERROR_R.
21449 * lib/error.h, lib/error.c: Update.
21450
21451 2001-03-16 Akim Demaille <akim@epita.fr>
21452
21453 * src/getargs.c (longopts): Clean up.
21454
21455 2001-02-21 Akim Demaille <akim@epita.fr>
21456
21457 * src/reader.c (gensym): `gensym_count' is your own.
21458 Use a static buf to create the symbol name, as token_buffer is no
21459 longer a buffer.
21460
21461 2001-02-08 Akim Demaille <akim@epita.fr>
21462
21463 * src/conflicts.c (conflict_report): Be sure not to append to res
21464 between two calls, which could happen if both first sprintf were
21465 skipped, but not the first cp += strlen.
21466
21467 2001-02-08 Akim Demaille <akim@epita.fr>
21468
21469 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
21470 New, from fileutils 4.0.37.
21471 * configure.in: Require Autoconf 2.49c. I took some time before
21472 making this decision. This is the only way out for portability
21473 issues in Bison, it would mean way too much duplicate effort to
21474 import in Bison features implemented in 2.49c since 2.13.
21475 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
21476
21477 2001-02-02 Akim Demaille <akim@epita.fr>
21478
21479 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
21480 * lib/xalloc.h, lib/xmalloc.c: Update.
21481
21482 2001-01-19 Akim Demaille <akim@epita.fr>
21483
21484 Get rid of the ad hoc handling of token_buffer in the scanner: use
21485 the obstacks.
21486
21487 * src/lex.c (token_obstack): New.
21488 (init_lex): Initialize it. No longer call...
21489 (grow_token_buffer): this. Remove it.
21490 Adjust all the places which used it to use the obstack.
21491
21492 2001-01-19 Akim Demaille <akim@epita.fr>
21493
21494 * src/lex.h: Rename all the tokens:
21495 s/\bENDFILE\b/tok_eof/g;
21496 s/\bIDENTIFIER\b/tok_identifier/g;
21497 etc.
21498 Let them be enums, not #define, to ease debugging.
21499 Adjust all the code.
21500
21501 2001-01-18 Akim Demaille <akim@epita.fr>
21502
21503 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
21504 * src/lex.c (maxtoken, grow_token_buffer): Static.
21505
21506 2001-01-18 Akim Demaille <akim@epita.fr>
21507
21508 Since we now use obstacks, more % directives can be enabled.
21509
21510 * src/lex.c (percent_table): Also accept `%yacc',
21511 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
21512 `%debug'.
21513 Handle the actions for `%semantic_parser' and `%pure_parser' here,
21514 instead of returning a token.
21515 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
21516 * src/reader.c (read_declarations): Adjust.
21517 * src/files.c (open_files): Don't call `compute_base_names', don't
21518 compute `attrsfile' since they depend upon data which might be
21519 *in* the input file now.
21520 (output_files): Do it here.
21521 * src/output.c (output_headers): Document the fact that this patch
21522 introduces a guaranteed SEGV for semantic parsers.
21523 * doc/bison.texinfo: Document them.
21524 * tests/suite.at: Exercise these %options.
21525
21526 2000-12-20 Akim Demaille <akim@epita.fr>
21527
21528 Also handle the output file (--verbose) with obstacks.
21529
21530 * files.c (foutput): Remove.
21531 (output_obstack): New.
21532 Adjust all dependencies.
21533 * src/conflicts.c: Return a string.
21534 * src/system.h (obstack_grow_string): Rename as...
21535 (obstack_sgrow): this. Be ready to work with non literals.
21536 (obstack_fgrow4): New.
21537
21538 2000-12-20 Akim Demaille <akim@epita.fr>
21539
21540 * src/files.c (open_files): Fix the computation of short_base_name
21541 in the case of `-o foo.tab.c'.
21542
21543 2000-12-20 Akim Demaille <akim@epita.fr>
21544
21545 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
21546 (copy_dollar): Now that everything uses obstacks, get rid of the
21547 FILE * parameters.
21548
21549 2000-12-20 Akim Demaille <akim@epita.fr>
21550
21551 * src/files.c (open_files): Actually the `.output' file is based
21552 on the short_base_name, not base_name.
21553 * tests/suite.at (Checking output file names): Adjust.
21554
21555 2000-12-20 Akim Demaille <akim@epita.fr>
21556
21557 * src/bison.s1: Remove, we now use directly...
21558 * src/bison.simple: this.
21559 * src/Makefile.am: Use pkgdata instead of data.
21560
21561 2000-12-20 Akim Demaille <akim@epita.fr>
21562
21563 * src/files.c (guard_obstack): New.
21564 (open_files): Initialize it.
21565 (output_files): Dump it...
21566 * src/files.h: Export it.
21567 * src/reader.c (copy_guard): Use it.
21568
21569 2000-12-19 Akim Demaille <akim@epita.fr>
21570
21571 * src/files.c (outfile, defsfile, actfile): Removed as global
21572 vars.
21573 (open_files): Don't compute them.
21574 (output_files): Adjust.
21575 (base_name, short_base_name): Be global.
21576 Adjust dependencies.
21577
21578 2000-12-19 Akim Demaille <akim@epita.fr>
21579
21580 * src/files.c (strsuffix): New.
21581 (stringappend): Be just like strcat but allocate.
21582 (base_names): Eve out from open_files.
21583 Try to simplify the rather hairy computation of base_name and
21584 short_base_name.
21585 (open_files): Use it.
21586 * tests/suite.at (Checking output file names): New test.
21587
21588 2000-12-19 Akim Demaille <akim@epita.fr>
21589
21590 * src/system.h (obstack_grow_literal_string): Rename as...
21591 (obstack_grow_string): this.
21592 * src/output.c (output_parser): Recognize `%% actions' instead of
21593 `$'.
21594 * src/bison.s1: s/$/%% actions/.
21595 * src/bison.hairy: Likewise.
21596
21597 2000-12-19 Akim Demaille <akim@epita.fr>
21598
21599 * src/output.c (output_parser): Compute the `#line' lines when
21600 there are.
21601 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
21602 Suggested by Hans Aberg.
21603
21604 2000-12-19 Akim Demaille <akim@epita.fr>
21605
21606 Let the handling of the skeleton files be local to the procedures
21607 that use it.
21608
21609 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
21610 longer static.
21611 (fparser, open_extra_files): Remove.
21612 (open_files, output_files): Don't take care of fparser.
21613 * src/files.h: Adjust.
21614 * src/output.c (output_parser): Open and close the file to the
21615 skeleton.
21616 * src/reader.c (read_declarations): When %semantic_parser, open
21617 fguard.
21618
21619 2000-12-19 Akim Demaille <akim@epita.fr>
21620
21621 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
21622 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
21623
21624 2000-12-19 Akim Demaille <akim@epita.fr>
21625
21626 * src/files.c (open_files): Yipee! We no longer need all the code
21627 looking for `/tmp' since we have no tmp file.
21628
21629 2000-12-19 Akim Demaille <akim@epita.fr>
21630
21631 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
21632 New macros.
21633 * src/files.c (open_files): Less dependency on MSDOS etc.
21634
21635 2000-12-14 Akim Demaille <akim@epita.fr>
21636
21637 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
21638 Provide a default definition.
21639 Use it when executing the default @ action.
21640 * src/reader.c (reader_output_yylsp): No longer include
21641 `timestamp' and `text' in the default YYLTYPE.
21642
21643 2000-12-12 Akim Demaille <akim@epita.fr>
21644
21645 * src/reader.c (copy_definition, parse_union_decl, copy_action)
21646 (copy_guard): Quote the file names.
21647 Reported by Laurent Mascherpa.
21648
21649 2000-12-12 Akim Demaille <akim@epita.fr>
21650
21651 * src/output.c (output_headers, output_program, output): Be sure
21652 to escape special characters when outputting filenames.
21653 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
21654 (output_headers): Don't depend on them, Use ACTSTR.
21655
21656 2000-11-17 Akim Demaille <akim@epita.fr>
21657
21658 * lib/obstack.h: Formatting changes.
21659 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
21660 prevents type checking.
21661 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
21662 cast the value to (void *): assigning a `foo *' to a `void *'
21663 variable is valid.
21664 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
21665 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
21666 append characters.
21667
21668 2000-11-17 Akim Demaille <akim@epita.fr>
21669
21670 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
21671 as...
21672 (suite.m4, regression.m4, calc.m4): these.
21673 * tests/atgeneral.m4: Update from CVS Autoconf.
21674
21675 2000-11-17 Akim Demaille <akim@epita.fr>
21676
21677 * tests/regression.m4 (%union and --defines): New test,
21678 demonstrating a current bug in the obstack implementation.
21679
21680 2000-11-17 Akim Demaille <akim@epita.fr>
21681
21682 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
21683 macros.
21684 Use them to declare the variables which are global or local to
21685 `yyparse'.
21686
21687 2000-11-17 Akim Demaille <akim@epita.fr>
21688
21689 * acconfig.h: Remove, no longer used.
21690
21691 2000-11-07 Akim Demaille <akim@epita.fr>
21692
21693 * src: s/Copyright (C)/Copyright/g.
21694
21695 2000-11-07 Akim Demaille <akim@epita.fr>
21696
21697 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
21698 defining.
21699 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
21700
21701 2000-11-07 Akim Demaille <akim@epita.fr>
21702
21703 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
21704 Merge in a single CPP if/else.
21705
21706 2000-11-07 Akim Demaille <akim@epita.fr>
21707
21708 * src/output.c (output): Remove useless variables.
21709 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
21710 argument `data' for consistency with the prototypes.
21711 Qualify it `const'.
21712 (obstack_copy, obstack_copy0): Rename the second argument as
21713 `address' for consistency. Qualify it `const'.
21714 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
21715 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
21716 `const' their input argument (`data' or `address').
21717 Adjust the corresponding macros to include `const' in casts.
21718
21719 2000-11-03 Akim Demaille <akim@epita.fr>
21720
21721 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
21722 s/PFILE1/BISON_HAIRY/.
21723 Adjust dependencies.
21724
21725 2000-11-03 Akim Demaille <akim@epita.fr>
21726
21727 For some reason, this was not applied.
21728
21729 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
21730 `unlink': it's no longer used.
21731
21732 2000-11-03 Akim Demaille <akim@epita.fr>
21733
21734 * src/files.c (skeleton_find): New function, eved out of...
21735 (open_files, open_extra_files): here.
21736
21737 2000-11-03 Akim Demaille <akim@epita.fr>
21738
21739 Don't use `atexit'.
21740
21741 * src/files.c (obstack_save): New function.
21742 (done): Rename as...
21743 (output_files): this.
21744 Use `obstack_save'.
21745 * src/main.c (main): Don't use `atexit' to register `done', since
21746 it no longer has to remove tmp files, just call `output_files'
21747 when there are no errors.
21748
21749 2000-11-02 Akim Demaille <akim@epita.fr>
21750
21751 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
21752 `unlink': it's no longer used.
21753 * src/files.h: Formatting changes.
21754
21755 2000-11-02 Akim Demaille <akim@epita.fr>
21756
21757 Remove the last uses of mktemp and unlink/delete.
21758
21759 * src/files.c (fdefines, ftable): Removed.
21760 (defines_ostack, table_obstack): New.
21761 Adjust dependencies of the former into uses of the latter.
21762 * src/output.c (output_short_or_char_table, output_short_table):
21763 Convert to using obstacks.
21764 * src/reader.c (copy_comment2): Accept one FILE * and two
21765 obstacks.
21766 (output_token_defines, reader_output_yylsp): Use obstacks.
21767 * src/system.h (obstack_fgrow3): New.
21768 * po/POTFILES.in: Adjust.
21769
21770 2000-11-01 Akim Demaille <akim@epita.fr>
21771
21772 Change each use of `fattrs' into a use of `attrs_obstack'.
21773
21774 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
21775 * src/files.c (fattrs): Remove.
21776 (attrs_obstack): New.
21777 Adjust all dependencies.
21778 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
21779
21780 2000-11-01 Akim Demaille <akim@epita.fr>
21781
21782 Introduce obstacks.
21783 Change each use of `faction' into a use of `action_obstack'.
21784
21785 * lib/obstack.h, lib/obstack.c: New files.
21786 * src/files.c (faction): Remove.
21787 (action_obstack): New.
21788 Adjust all dependencies.
21789
21790 2000-10-20 Akim Demaille <akim@epita.fr>
21791
21792 * lib/quote.h (PARAMS): New macro. Use it.
21793
21794 2000-10-16 Akim Demaille <akim@epita.fr>
21795
21796 * src/output.c (output_short_or_char_table): New function.
21797 (output_short_table, output_token_translations): Use it.
21798 (goto_actions): Use output_short_table.
21799
21800 2000-10-16 Akim Demaille <akim@epita.fr>
21801
21802 * src/symtab.c (bucket_new): New function.
21803 (getsym): Use it.
21804
21805 * src/output.c (output_short_table): New argument to display the
21806 comment associated with the table.
21807 Adjust dependencies.
21808 (output_gram): Use it.
21809 (output_rule_data): Nicer output layout for YYTNAME.
21810
21811 2000-10-16 Akim Demaille <akim@epita.fr>
21812
21813 * src/lex.c (read_typename): New function.
21814 (lex): Use it.
21815 * src/reader.c (copy_dollar): Likewise.
21816
21817 2000-10-16 Akim Demaille <akim@epita.fr>
21818
21819 * src/reader.c (copy_comment2): Expect the input stream to be on
21820 the `/' which is suspected to open a comment, instead of being
21821 called after `//' or `/*' was read.
21822 (copy_comment, copy_definition, parse_union_decl, copy_action)
21823 (copy_guard): Adjust.
21824
21825 2000-10-16 Akim Demaille <akim@epita.fr>
21826
21827 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
21828 `read_signed_integer'.
21829
21830 2000-10-16 Akim Demaille <akim@epita.fr>
21831
21832 * src/reader.c (copy_dollar): New function.
21833 (copy_guard, copy_action): Use it.
21834
21835 2000-10-16 Akim Demaille <akim@epita.fr>
21836
21837 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
21838 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
21839 New files, from Fileutils 4.0.27.
21840 * src/main.c (printable_version): Remove.
21841 * src/lex.c, src/reader.c: Use `quote'.
21842
21843 2000-10-04 Akim Demaille <akim@epita.fr>
21844
21845 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
21846
21847 2000-10-04 Akim Demaille <akim@epita.fr>
21848
21849 * doc/bison.texinfo: Various typos spotted by Neil Booth.
21850
21851 2000-10-04 Akim Demaille <akim@epita.fr>
21852
21853 When a literal string is used to define two different tokens,
21854 `bison -v' segfaults.
21855 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
21856
21857 * tests/regression.m4: New file.
21858 Include the core of the sample provided by Piotr Gackiewicz.
21859 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
21860 properly.
21861
21862 2000-10-04 Akim Demaille <akim@epita.fr>
21863
21864 * src/reader.c (parse_expect_decl): Keep `count' within the size
21865 of `buffer'.
21866 From Neil Booth.
21867
21868 2000-10-02 Paul Eggert <eggert@twinsun.com>
21869
21870 * bison.s1 (yyparse): Assign the default value
21871 unconditionally, to avoid a GCC warning and make the parser a
21872 tad smaller.
21873
21874 2000-10-02 Akim Demaille <akim@epita.fr>
21875
21876 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
21877 options.
21878
21879 2000-10-02 Akim Demaille <akim@epita.fr>
21880
21881 * src/derives.c, src/print.c, src/reduce.c: To ease the
21882 translation, move some `\n' out of the translated strings.
21883
21884 2000-10-02 Akim Demaille <akim@epita.fr>
21885
21886 The location tracking mechanism is precious for parse error
21887 messages. Nevertheless, it is enabled only when `@n' is used in
21888 the grammar, which is a different issue (you can use it in error
21889 message, but not in the grammar per se). Therefore, there should
21890 be another means to enable it.
21891
21892 * src/getargs.c (getargs): Support `--locations'.
21893 (usage): Report it.
21894 * src/getargs.h (locationsflag): Export it.
21895 * src/lex.c (percent_table): Support `%locations'.
21896 * src/reader.c (yylsp_needed): Remove this variable, now replaced
21897 with `locationsflag'.
21898 * doc/bison.texinfo: Document `--locations' and `%locations'.
21899 Sort the options.
21900 * tests/calc.m4: Test it.
21901
21902 For regularity of the names, replace each
21903 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
21904 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
21905 In addition replace each `flag' with `_flag'.
21906
21907 2000-10-02 Akim Demaille <akim@epita.fr>
21908
21909 Also test parse error messages, including with YYERROR_VERBOSE.
21910
21911 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
21912 associative).
21913 Use it to check the computations.
21914 Use it to check `nonassoc' is honored.
21915 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
21916 `--yyerror-verbose'.
21917 (_AT_CHECK_CALC): Adjust to this option.
21918 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
21919
21920 2000-10-02 Akim Demaille <akim@epita.fr>
21921
21922 Test also `--verbose', `--defines' and `--name-prefix'. Testing
21923 the latter demonstrates a flaw in the handling of non debugging
21924 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
21925 was used in order to simplify:
21926
21927 #if YYDEBUG
21928 if (yydebug)
21929 {
21930 ...
21931 }
21932 #endif
21933
21934 into
21935
21936 if (yydebug)
21937 {
21938 ...
21939 }
21940
21941 unfortunately this leads to a CPP conflict when
21942 `--name-prefix=foo' is used since it produces `#define yydebug
21943 foodebug'.
21944
21945 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
21946 (YYDPRINTF): New macro.
21947 Spread its use.
21948 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
21949 the bison options.
21950 Also test `--verbose', `--defines' and `--name-prefix'.
21951
21952 2000-10-02 Akim Demaille <akim@epita.fr>
21953
21954 Improve the readability of the produced parsers.
21955
21956 * src/bison.s1: Formatting changes.
21957 Improve the comment related to the `$' mark.
21958 (yydefault): Don't fall through to `yyresume': `goto' there.
21959 * src/output.c (output_parser): When the `$' is met, skip the end
21960 of its line.
21961 New variable, `number_of_dollar_signs', to check there's exactly
21962 one `$' in the parser skeleton.
21963
21964 2000-10-02 Akim Demaille <akim@epita.fr>
21965
21966 * lib/xstrdup.c: New file, from the fileutils.
21967 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
21968 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
21969 instead of strlen + xmalloc + strcpy.
21970 * src/symtab.c (copys): Remove, use xstrdup instead.
21971
21972 2000-10-02 Akim Demaille <akim@epita.fr>
21973
21974 * src/gram.h (associativity): New enum type which replaces the
21975 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
21976 `right_assoc', `left_assoc' and `non_assoc'.
21977 Adjust all dependencies.
21978 * src/reader.c: Formatting changes.
21979 (LTYPESTR): Don't define it, use it as a literal in
21980 `reader_output_yylsp'.
21981 * src/symtab.h (symbol_class): New enum type which replaces the
21982 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
21983 `sunknown', `stoken and `snterm'.
21984
21985 2000-10-02 Akim Demaille <akim@epita.fr>
21986
21987 * src/getargs.c (fixed_outfiles): Rename as...
21988 (yaccflag): for consistency and accuracy.
21989 Adjust dependencies.
21990
21991 2000-10-02 Akim Demaille <akim@epita.fr>
21992
21993 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
21994 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
21995 difficult and introduced a lot of core dump. It turns out that
21996 Bison used an implementation of `xmalloc' based on `calloc', and
21997 at various places it does depend upon the initialization to 0. I
21998 have not tried to isolate the pertinent places, and all the former
21999 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
22000 someone should address this issue.
22001
22002 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
22003 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
22004 files.
22005 Adjust dependencies.
22006 * src/warshall.h: New file.
22007 Propagate.
22008
22009 2000-10-02 Akim Demaille <akim@epita.fr>
22010
22011 Various anti-`extern in *.c' changes.
22012
22013 * src/system.h: Include `assert.h'.
22014
22015 2000-10-02 Akim Demaille <akim@epita.fr>
22016
22017 * src/state.h (nstates, final_state, first_state, first_shift)
22018 (first_reduction): Move their exportation from here...
22019 * src/LR0.h: to here.
22020 Adjust dependencies.
22021 * src/getargs.c (statisticsflag): New variable.
22022 Add support for `--statistics'.
22023 Adjust dependencies.
22024
22025 Remove a lot of now useless `extern' statements in most files.
22026
22027 2000-10-02 Akim Demaille <akim@epita.fr>
22028
22029 * src/LR0.h: New file.
22030 Propagate its use.
22031
22032 2000-10-02 Akim Demaille <akim@epita.fr>
22033
22034 * src/print.h: New file.
22035 Propagate its use.
22036 * src/print.c: Formatting and ordering changes.
22037 (verbose, terse): Replace with...
22038 (print_results): this new function.
22039 Adjust dependencies.
22040
22041 2000-10-02 Akim Demaille <akim@epita.fr>
22042
22043 * src/conflicts.c (conflict_report): New function.
22044 (conflict_log, verbose_conflict_log): Replace with...
22045 (print_conflicts): this function.
22046 Adjust dependencies.
22047 * src/conflicts.h: New file.
22048 Propagate its inclusion.
22049
22050 2000-10-02 Akim Demaille <akim@epita.fr>
22051
22052 * src/nullable.h: New file.
22053 Propagate its inclusion.
22054 * src/nullable.c: Formatting changes.
22055
22056 2000-10-02 Akim Demaille <akim@epita.fr>
22057
22058 * src/reduce.h: New file.
22059 Propagate its inclusion.
22060 * src/reduce.c: Topological sort and other formatting changes.
22061 (bool, TRUE, FALSE): Move their definition to...
22062 * src/system.h: here.
22063
22064 2000-10-02 Akim Demaille <akim@epita.fr>
22065
22066 * src/files.c: Formatting changes.
22067 (tryopen, tryclose, openfiles): Rename as...
22068 (xfopen, xfclose, open_files): this.
22069 (stringappend): static.
22070 * src/files.h: Complete the list of exported symbols.
22071 Propagate its use.
22072
22073 2000-10-02 Akim Demaille <akim@epita.fr>
22074
22075 * src/reader.h: New file.
22076 Propagate its use instead of tedious list of `extern' and
22077 prototypes.
22078 * src/reader.c: Formatting changes, topological sort,
22079 s/register//.
22080
22081 2000-10-02 Akim Demaille <akim@epita.fr>
22082
22083 * src/lex.h: Prototype `lex.c' exported functions.
22084 * src/reader.c: Adjust.
22085 * src/lex.c: Formatting changes.
22086 (safegetc): Rename as...
22087 (xgetc): this.
22088
22089 2000-10-02 Akim Demaille <akim@epita.fr>
22090
22091 * src/lalr.h: New file.
22092 Propagate its inclusion instead of prototypes and `extern'.
22093 * src/lalr.c: Formatting changes, topological sorting etc.
22094
22095 2000-10-02 Akim Demaille <akim@epita.fr>
22096
22097 * src/output.c (token_actions): Introduce a temporary array,
22098 YYDEFACT, that makes it possible for this function to use
22099 output_short_table.
22100
22101 2000-10-02 Akim Demaille <akim@epita.fr>
22102
22103 `user_toknums' is output as a `short[]' in `output.c', while it is
22104 defined as a `int[]' in `reader.c'. For consistency with the
22105 other output tables, `user_toknums' is now defined as a table of
22106 shorts.
22107
22108 * src/reader.c (user_toknums): Be a short table instead of an int
22109 table.
22110 Adjust dependencies.
22111
22112 Factor the short table outputs.
22113
22114 * src/output.c (output_short_table): New function.
22115 * src/output.c (output_gram, output_stos, output_rule_data)
22116 (output_base, output_table, output_check): Use it.
22117
22118 2000-10-02 Akim Demaille <akim@epita.fr>
22119
22120 * src/output.c (output): Topological sort of the functions, in
22121 order to get rid of the `static' prototypes.
22122 No longer use `register'.
22123 * src/output.h: New file.
22124 Propagate its inclusion in files explicitly prototyping functions
22125 from output.c.
22126
22127 2000-09-21 Akim Demaille <akim@epita.fr>
22128
22129 * src/atgeneral.m4: Update from Autoconf.
22130
22131 2000-09-21 Akim Demaille <akim@epita.fr>
22132
22133 * src/closure.h: New file.
22134 * src/closure.c: Formatting changes, topological sort over the
22135 functions, use of closure.h.
22136 (initialize_closure, finalize_closure): Rename as...
22137 (new_closure, free_closure): these. Adjust dependencies.
22138 * src/LR0.c: Formatting changes, topological sort, use of
22139 cloture.h.
22140 (initialize_states): Rename as...
22141 (new_states): this.
22142 * src/Makefile.am (noinst_HEADERS): Adjust.
22143
22144 2000-09-20 Akim Demaille <akim@epita.fr>
22145
22146 * src/acconfig.h: Don't protect config.h against multiple
22147 inclusion.
22148 Don't define PARAMS.
22149 * src/system.h: Define PARAMS.
22150 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
22151 purpose of config.h. system.h must not try to fix wrong
22152 definitions in config.h.
22153
22154 2000-09-20 Akim Demaille <akim@epita.fr>
22155
22156 * src/derives.h: New file.
22157 * src/main.c, src/derives.h: Use it.
22158 Formatting changes.
22159 * src/Makefile.am (noinst_HEADERS): Adjust.
22160
22161 2000-09-20 Akim Demaille <akim@epita.fr>
22162
22163 * tests/atgeneral.m4: Update from Autoconf.
22164 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
22165 (AT_CHECK_CALC): New macros.
22166 Use these macros to test bison with options `', `--raw',
22167 `--debug', `--yacc', `--yacc --debug'.
22168
22169 2000-09-19 Akim Demaille <akim@epita.fr>
22170
22171 * src/output.c: Formatting changes.
22172 * src/machine.h: Remove, leaving its contents in...
22173 * src/system.h: here.
22174 Include stdio.h.
22175 Adjust all dependencies on stdio.h and machine.h.
22176 * src/getargs.h: New file.
22177 Let all `extern' declarations about getargs.c be replaced with
22178 inclusion of `getargs.h'.
22179 * src/Makefile.am (noinst_HEADERS): Adjust.
22180
22181 * tests/calc.m4 (yyin): Be initialized in main, not on the global
22182 scope.
22183 (yyerror): Returns void, not int.
22184 * doc/bison.texinfo: Formatting changes.
22185
22186 2000-09-19 Akim Demaille <akim@epita.fr>
22187
22188 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
22189 portable.
22190
22191 2000-09-18 Akim Demaille <akim@epita.fr>
22192
22193 * configure.in: Append WARNING_CFLAGS to CFLAGS.
22194 * src/Makefile.am (INCLUDES): Don't.
22195 Be ready to fetch headers in lib/.
22196
22197 2000-09-18 Akim Demaille <akim@epita.fr>
22198
22199 * doc/bison.texinfo: Update the copyright.
22200 ANSIfy and GNUify the examples.
22201 Remove the old menu.
22202
22203 2000-09-18 Akim Demaille <akim@epita.fr>
22204
22205 First set of tests: use the `calc' example from the documentation.
22206
22207 * src/bison.s1 (yyparse): Condition the code using `yytname' which
22208 is defined only when YYDEBUG is.
22209 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
22210 * src/files.c (tryopen, tryclose): Formatting changes.
22211 Move to the top and be static.
22212 * src/reader.c (read_signed_integer): Likewise.
22213 * tests/calc.m4: New file.
22214 * Makefile.am, suite.m4: Adjust.
22215 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
22216
22217 2000-09-18 Akim Demaille <akim@epita.fr>
22218
22219 Add support for an Autotest test suite for Bison.
22220
22221 * m4/m4.m4, m4/atconfig.m4: New files.
22222 * m4/Makefile.am (EXTRA_DIST): Adjust.
22223 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
22224 files.
22225 * src/getargs.c: Display a more standard --version message.
22226 * src/reader.c (reader): Formatting changes.
22227 No longer depend upon VERSION_STRING.
22228 * configure.in: No longer use `dnl'.
22229 Set up the test suite and the new directory `tests/.
22230 (VERSION_STRING): Remove.
22231
22232 2000-04-14 Akim Demaille <akim@epita.fr>
22233
22234 * src/reader.c (copy_comment2): New function, same as former
22235 `copy_comment', but outputs into two FILE *.
22236 (copy_comment): Use it.
22237 (parse_union_decl): Use it.
22238 (get_type, parse_start_decl): Use the same `invalid' message.
22239 (parse_start_decl, parse_union_decl): Use the same `multiple'
22240 message.
22241 (parse_union_decl, copy_guard, copy_action): Use the same
22242 `unmatched' message.
22243 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
22244
22245 2000-03-31 Akim Demaille <akim@epita.fr>
22246
22247 * src/files.c (tryopen, tryclose): Move to the top.
22248 Be static.
22249
22250 2000-03-31 Akim Demaille <akim@epita.fr>
22251
22252 * src/main.c (main): Don't call `done', exit does it.
22253
22254 2000-03-31 Akim Demaille <akim@epita.fr>
22255
22256 * allocate.c: s/return (foo)/return foo/.
22257 * lalr.c: Likewise.
22258 * LR0.c: Likewise.
22259 * output.c: Likewise.
22260 * reader.c: Likewise.
22261 * symtab.c: Likewise.
22262 * vmsgetargs.c: Likewise.
22263
22264 2000-03-31 Akim Demaille <akim@epita.fr>
22265
22266 Clean up the error reporting functions.
22267
22268 * src/report.c: New file.
22269 * src/report.h: Likewise.
22270 * src/Makefile.am: Adjust.
22271 * m4/error.m4: New file.
22272 * m4/Makefile.am: Adjust.
22273 * configure.in (jm_PREREQ_ERROR): Call it.
22274 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
22275 Remove.
22276 (fatal, fatals): Remove. All callers use complain.c::fatal.
22277 (warn, warni, warns, warnss, warnss): Remove. All callers use
22278 complain.c::complain.
22279 (toomany): Remove, use fatal instead.
22280 * src/files.c (done): No argument, use complain_message_count.
22281 * src/main.c (main): Register `done' to `atexit'.
22282
22283 * src/getargs.c (usage): More `fputs', less `fprintf'.
22284
22285 2000-03-28 Akim Demaille <akim@epita.fr>
22286
22287 * lib/: New directory.
22288 * Makefile.am (SUBDIRS): Adjust.
22289 * configure.in: Adjust.
22290 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
22291 useless.
22292 * src/alloca.c: Moved to lib/.
22293 * src/getopt.c: Likewise.
22294 * src/getopt1.c: Likewise.
22295 * src/getopt.h: Likewise.
22296 * src/ansi2knr.c: Likewise.
22297 * src/ansi2knr.1: Likewise.
22298 * src/Makefile.am: Adjust.
22299 * lib/Makefile.am: New file.
22300
22301 2000-03-28 Akim Demaille <akim@epita.fr>
22302
22303 * src/getargs.c (usage): Refresh the help message.
22304
22305 2000-03-17 Akim Demaille <akim@epita.fr>
22306
22307 * src/getopt1.c: Updated from textutils 2.0e
22308 * src/getopt.c: Likewise.
22309 * src/getopt.h: Likewise.
22310
22311 2000-03-17 Akim Demaille <akim@epita.fr>
22312
22313 * src/Makefile.am (bison.simple): Fix the awk program: quote only
22314 the file name, not the whole `#line LINE FILE'.
22315
22316 2000-03-17 Akim Demaille <akim@epita.fr>
22317
22318 On syntax errors, report the token on which we choked.
22319
22320 * src/bison.s1 (yyparse): In the label yyerrlab, when
22321 YYERROR_VERBOSE, add yychar in msg.
22322
22323 2000-03-17 Akim Demaille <akim@epita.fr>
22324
22325 * src/reader.c (copy_at): New function.
22326 (copy_guard): Use it.
22327 (copy_action): Use it.
22328
22329 2000-03-17 Akim Demaille <akim@epita.fr>
22330
22331 Be kind to translators, save some useless translations.
22332
22333 * src/main.c (banner): New function.
22334 (fatal_banner): Use it.
22335 (warn_banner): Use it.
22336
22337 2000-03-17 Akim Demaille <akim@epita.fr>
22338
22339 * src/reader.c (copy_definition): Use copy_string and
22340 copy_comment. Removed now unused `match', `ended',
22341 `cplus_comment'.
22342 (copy_comment, copy_string): Moved, to be visible from
22343 copy_definition.
22344
22345 2000-03-17 Akim Demaille <akim@epita.fr>
22346
22347 * src/reader.c (copy_string): Declare `static inline'. No
22348 problems with inline, since it is checked by configure.
22349 (copy_comment): Likewise.
22350
22351 2000-03-17 Akim Demaille <akim@epita.fr>
22352
22353 * src/reader.c (packsymbols): Formatting changes.
22354
22355 2000-03-17 Akim Demaille <akim@epita.fr>
22356
22357 * src/reader.c (copy_comment): New function, factored out from:
22358 (copy_action): Use it. Removed now unused `match', `ended',
22359 `cplus_comment'.
22360 (copy_guard): Likewise.
22361
22362 2000-03-17 Akim Demaille <akim@epita.fr>
22363
22364 * src/reader.c (copy_string): New function, factored out from:
22365 (copy_action): Use it.
22366 (copy_guard): Likewise.
22367
22368 2000-03-17 Akim Demaille <akim@epita.fr>
22369
22370 Change the handling of @s so that they behave exactly like $s.
22371 There is now a pseudo variable @$ (readble and writable), location
22372 of the lhs of the rule (by default ranging from the location of
22373 the first symbol of the rhs, to the location of the last symbol,
22374 or, if the rhs is empty, YYLLOC).
22375
22376 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
22377 yyval.
22378 (yyparse): When providing a default semantic action, provide a
22379 default location action.
22380 (after the $): No longer change `*YYLSP', just stack YYLOC the
22381 same way you stack YYVAL.
22382 * src/reader.c (read_declarations): Use warns.
22383 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
22384 (copy_action, case '@'): Likewise.
22385 Use a standard error message, to save useless work from
22386 translators.
22387
22388 2000-03-17 Akim Demaille <akim@epita.fr>
22389
22390 * src/bison.s1: Formatting and cosmetics changes.
22391 * src/reader.c: Likewise.
22392 Update the Copyright notice.
22393
22394 2000-03-17 Akim Demaille <akim@epita.fr>
22395
22396 * src/bison.s1 (#line): All set to `#line' only, since the
22397 Makefile now handles them.
22398
22399 2000-03-16 Akim Demaille <akim@epita.fr>
22400
22401 * src/output.c (output_rule_data): Output the documentation of
22402 some of the tables.
22403 (Copyright notice): Update.
22404 Formatting changes.
22405
22406 2000-03-16 Akim Demaille <akim@epita.fr>
22407
22408 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
22409 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
22410 One `#if YYDEBUG' remains, since it uses variables which are
22411 defined only if `YYDEBUG != 0'.
22412
22413 2000-03-16 Akim Demaille <akim@epita.fr>
22414
22415 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
22416 and related variables so that the similarities are highlighted.
22417
22418 2000-03-16 Akim Demaille <akim@epita.fr>
22419
22420 * src/bison.s1: Properly indent CPP directives.
22421
22422 2000-03-16 Akim Demaille <akim@epita.fr>
22423
22424 * src/bison.s1: Properly indent the `alloca' CPP section.
22425
22426 2000-03-16 Akim Demaille <akim@epita.fr>
22427
22428 Do not hard code values of directories in `configure.in'.
22429 Update the `configure' tool chain.
22430
22431 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
22432 src/makefile.am.
22433 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
22434 (AC_OUTPUT): Add m4/Makefile.
22435 Bump to bison 1.28a, 1.29 has never been released.
22436 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
22437 handled via src/Makefile.am.
22438 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
22439 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
22440 autoheader.
22441 * Makefile.am (SUBDIRS): Add m4.
22442 (ACLOCAL_AM_FLAGS): New variable.
22443 (AUTOMAKE_OPTIONS): Add check-news.
22444 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
22445 the proper line number and file name.
22446 (DEFS): Propagate the location of bison library files and of the
22447 locale files.
22448 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
22449 builddir.
22450 * acinclude.m4: Remove, replaced by the directory m4.
22451 * m4/Makefile.am (EXTRA_DIST): New variable.
22452 * m4/gettext.m4: New file, from the fileutils.
22453 * m4/lcmessage.m4: Likewise
22454 * m4/progtest.m4: Likewise.
22455 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
22456
22457 2000-03-10 Akim Demaille <akim@epita.fr>
22458
22459 * src/closure.c:
22460 Formatting changes of various comments.
22461 Respect the GNU coding standards at various places.
22462 Don't use `_()' when no translation is needed.
22463
22464 1999-12-13 Jesse Thilo <jthilo@gnu.org>
22465
22466 * src/files.c:
22467 OS/2 honors TMPDIR environment variable.
22468
22469 1999-12-13 Jesse Thilo <jthilo@gnu.org>
22470
22471 * doc/bison.texinfo: Tweaked spelling and grammar.
22472 Updated ISBN.
22473 Removed reference to price of printed copy.
22474 Mention BISON_SIMPLE and BISON_HAIRY.
22475
22476 1999-12-13 Jesse Thilo <jthilo@gnu.org>
22477
22478 * configure.in, NEWS:
22479 Bison 1.29 released.
22480
22481 1999-10-27 Jesse Thilo <jthilo@gnu.org>
22482
22483 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
22484 Added reference card.
22485
22486 1999-07-26 Jesse Thilo <jthilo@gnu.org>
22487
22488 * po/ru.po: Added Russian translation.
22489
22490 1999-07-26 Jesse Thilo <jthilo@gnu.org>
22491
22492 * configure.in: Added Russian translation.
22493
22494 1999-07-06 Jesse Thilo <jthilo@gnu.org>
22495
22496 * configure.in, NEWS, README:
22497 Released version 1.28.
22498
22499 1999-06-14 Jesse Thilo <jthilo@gnu.org>
22500
22501 * src/system.h:
22502 Squashed redefinition warning on some systems.
22503
22504 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
22505 Have configure build version string instead of relying on ANSI string
22506 concatentation.
22507
22508 1999-06-14 Jesse Thilo <jthilo@gnu.org>
22509
22510 * po/POTFILES.in: Got rid of version.c.
22511
22512 1999-06-14 Jesse Thilo <jthilo@gnu.org>
22513
22514 * acconfig.h, configure.in:
22515 Have configure build version string instead of relying on ANSI string
22516 concatentation.
22517
22518 1999-06-08 Jesse Thilo <jthilo@gnu.org>
22519
22520 * doc/bison.1:
22521 Dropped mention of `+' for long-named options.
22522
22523 1999-05-30 Jesse Thilo <jthilo@gnu.org>
22524
22525 * src/files.c: Added <unistd.h> for unlink().
22526
22527 * src/Makefile.am, src/system.h:
22528 I18n fixes.
22529
22530 1999-05-30 Jesse Thilo <jthilo@gnu.org>
22531
22532 * README: Added a FAQ list.
22533
22534 * configure.in, acconfig.h:
22535 I18n fixes.
22536
22537 1999-05-30 Jesse Thilo <jthilo@gnu.org>
22538
22539 * doc/FAQ, doc/Makefile.am:
22540 Added a FAQ list.
22541
22542 1999-05-19 Jesse Thilo <jthilo@gnu.org>
22543
22544 * src/alloc.h, src/symtab.h, src/version.c:
22545 Protected inclusion of "config.h" with HAVE_CONFIG_H.
22546
22547 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22548
22549 * src/.cvsignore, src/Makefile.am:
22550 Reorganized: sources in `src', documentation in `doc'.
22551
22552 * src/lex.c (literalchar):
22553 fixed the code for escaping double quotes (thanks
22554 Jonathan Czisny.)
22555
22556 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22557
22558 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
22559 Adjusted paths to reflect directory reorganization.
22560
22561 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22562
22563 * doc/.cvsignore, doc/Makefile.am:
22564 Reorganized: sources in `src', documentation in `doc'.
22565
22566 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22567
22568 * configure.in:
22569 Updated AC_INIT file to reflect directory reorganization.
22570
22571 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
22572 Reorganized: sources in `src', documentation in `doc'.
22573
22574 1999-04-13 Jesse Thilo <jthilo@gnu.org>
22575
22576 * src/allocate.c:
22577 Don't declare calloc() and realloc() if not necessary.
22578
22579 1999-04-13 Jesse Thilo <jthilo@gnu.org>
22580
22581 * configure.in, acconfig.h, acinclude.m4:
22582 Don't declare calloc() and realloc() if not necessary.
22583
22584 1999-03-23 Jesse Thilo <jthilo@gnu.org>
22585
22586 * po/.cvsignore: Added i18n support.
22587
22588 1999-03-23 Jesse Thilo <jthilo@gnu.org>
22589
22590 * acconfig.h, configure.in, Makefile.am:
22591 Added i18n support.
22592
22593 1999-03-22 Jesse Thilo <jthilo@gnu.org>
22594
22595 * src/bison.s1: Fixed #line numbers.
22596
22597 1999-03-15 Jesse Thilo <jthilo@gnu.org>
22598
22599 * po/es.po, po/fr.po, po/nl.po, po/de.po:
22600 Added PO files from Translation Project.
22601
22602 1999-03-03 Jesse Thilo <jthilo@gnu.org>
22603
22604 * Makefile.am:
22605 Added support for non-ANSI compilers (ansi2knr).
22606
22607 1999-02-16 Jesse Thilo <jthilo@gnu.org>
22608
22609 * configure.in: Bumped version number to 1.27.
22610
22611 * Makefile.am:
22612 Added `bison.simple' to list of files removed by `make distclean'.
22613
22614 1999-02-12 Jesse Thilo <jthilo@gnu.org>
22615
22616 * src/files.c, src/files.h:
22617 Defined locations of parser files in config.h instead of Makefile.
22618
22619 1999-02-12 Jesse Thilo <jthilo@gnu.org>
22620
22621 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
22622 Defined locations of parser files in config.h instead of Makefile.
22623
22624 1999-02-09 Jesse Thilo <jthilo@gnu.org>
22625
22626 * Makefile.am:
22627 Removed inappropriate use of $< macro.
22628
22629 1999-02-05 Jesse Thilo <jthilo@gnu.org>
22630
22631 * po/Makefile.in.in, po/POTFILES.in:
22632 Add `po' directory skeleton.
22633
22634 1999-01-27 Jesse Thilo <jthilo@gnu.org>
22635
22636 * README: Document help-bison list.
22637
22638 * configure.in: Add check for mkstemp().
22639
22640 1999-01-20 Jesse Thilo <jthilo@gnu.org>
22641
22642 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
22643 Hush a few compiler warnings.
22644
22645 * src/files.c:
22646 Add tryclose(), which verifies that fclose was successful.
22647 Hush a couple of compiler warnings.
22648
22649 1999-01-20 Jesse Thilo <jthilo@gnu.org>
22650
22651 * Makefile.am, OChangeLog:
22652 ChangeLog is now automatically generated. Include the old version as
22653 OChangeLog.
22654
22655 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22656
22657 * 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:
22658 Update FSF address.
22659
22660 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22661
22662 * doc/bison.texinfo: Fix formatting glitch.
22663
22664 * doc/bison.texinfo: Update FSF address.
22665
22666 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22667
22668 * acconfig.h: Update FSF address.
22669
22670 1999-01-08 Jesse Thilo <jthilo@gnu.org>
22671
22672 * src/system.h:
22673 Don't define PACKAGE here, since config.h defines it.
22674
22675 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22676
22677 * src/reader.c: Update copyright date.
22678
22679 * src/main.c:
22680 Ditch sprintf to statically-sized buffers in fatal/warn functions in
22681 favor of output directly to stderr (avoids buffer overruns).
22682
22683 * src/reader.c: Some checks for premature EOF.
22684
22685 * 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:
22686 Use prototypes if the compiler understands them.
22687
22688 * src/files.c: Honor TMPDIR on Unix hosts.
22689 Use prototypes if the compiler understands them.
22690
22691 * src/reader.c:
22692 Fix a couple of buffer overrun bugs.
22693 Use prototypes if the compiler understands them.
22694
22695 * src/system.h: Include unistd.h and ctype.h.
22696 Use #ifdef instead of #if for NLS symbols.
22697
22698 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22699
22700 * doc/bison.texinfo:
22701 Delete comment "consider using @set for edition number, etc..." since
22702 we now are doing so.
22703
22704 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22705
22706 * configure.in:
22707 Use prototypes if the compiler understands them.
22708
22709 * NEWS: Document 1.26 highlights.
22710
22711 * Makefile.am: Require Automake 1.3 or later.
22712
22713 * acconfig.h:
22714 Use prototypes if the compiler understands them.
22715
22716 1998-12-29 Jesse Thilo <jthilo@gnu.org>
22717
22718 * src/version.c:
22719 Use VERSION symbol from automake for version number.
22720
22721 1998-12-29 Jesse Thilo <jthilo@gnu.org>
22722
22723 * acconfig.h, configure.in, version.cin:
22724 Use VERSION symbol from automake for version number.
22725
22726 1998-11-28 Jesse Thilo <jthilo@gnu.org>
22727
22728 * Makefile.am:
22729 Distribute original version of simple parser (bison.s1), not built
22730 version (bison.simple).
22731
22732 1998-11-28 Jesse Thilo <jthilo@gnu.org>
22733
22734 * doc/bison.texinfo: Add info dir entry.
22735
22736 * doc/bison.texinfo:
22737 Let automake put version number into documentation.
22738
22739 1998-11-26 Jesse Thilo <jthilo@gnu.org>
22740
22741 * src/bison.cld, src/build.com, src/vmshlp.mar:
22742 Add non-RCS files from /gd/gnu/bison.
22743
22744 1998-11-26 Jesse Thilo <jthilo@gnu.org>
22745
22746 * doc/bison.1:
22747 Document the BISON_HAIRY and BISON_SIMPLE variables.
22748
22749 1998-11-25 Jesse Thilo <jthilo@gnu.org>
22750
22751 * src/version.c: Build version.c automatically.
22752
22753 * src/reader.c:
22754 Fix token numbering (used to start at 258, not 257).
22755
22756 * src/system.h: Include config.h.
22757
22758 * src/getargs.c: Update bug report address.
22759
22760 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
22761 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
22762
22763 1998-11-25 Jesse Thilo <jthilo@gnu.org>
22764
22765 * Makefile.am:
22766 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
22767
22768 * configure.in, version.cin:
22769 Build version.c automatically.
22770
22771 * AUTHORS: Add AUTHORS file.
22772
22773 * README: Update bug report address.
22774
22775 * bison.simple:
22776 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
22777
22778 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
22779 Add automake stuff.
22780
22781 1998-11-25 Jesse Thilo <jthilo@gnu.org>
22782
22783 * doc/bison.texinfo: Clean up some formatting.
22784
22785 1998-05-05 Richard Stallman <rms@gnu.org>
22786
22787 * doc/bison.texinfo:
22788 Explain better why to make a pure parser.
22789
22790 1998-01-05 Richard Stallman <rms@gnu.org>
22791
22792 * src/files.c (openfiles):
22793 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
22794 find a temporary directory, if possible. Do not unlink files while
22795 they are open.
22796
22797 1997-08-25 Richard Stallman <rms@gnu.org>
22798
22799 * src/reader.c (stack_offset;):
22800 Change some warni to warns.
22801
22802 * src/lex.c (literalchar): Use warns, not warni.
22803
22804 1997-06-28 Richard Stallman <rms@gnu.org>
22805
22806 * src/bison.s1: Add a Bison version comment.
22807
22808 * src/main.c (fatal, warn, berror):
22809 Use program_name.
22810
22811 1997-06-28 Richard Stallman <rms@gnu.org>
22812
22813 * Makefile.in (bison_version): New variable.
22814 (dist): Use that variable.
22815 (bison.s1): Substitute the Bison version into bison.simple.
22816
22817 * bison.simple: Add a Bison version comment.
22818
22819 1997-06-18 Richard Stallman <rms@gnu.org>
22820
22821 * src/main.c (fatal, warn, berror):
22822 Make error messages standard.
22823 (toomany): Improve error message text.
22824
22825 * 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:
22826 new.h renamed to alloc.h.
22827
22828 1997-06-18 Richard Stallman <rms@gnu.org>
22829
22830 * Makefile.in: new.h renamed to alloc.h.
22831
22832 1997-05-24 Richard Stallman <rms@gnu.org>
22833
22834 * src/lex.c (literalchar):
22835 Fix the code for escaping \, " and '.
22836
22837 (lex): Avoid trouble when there are many chars
22838 to discard in a char literal with just several chars in it.
22839
22840 1997-05-17 Richard Stallman <rms@gnu.org>
22841
22842 * src/bison.s1:
22843 Use malloc, if using alloca is troublesome.
22844 (YYSTACK_USE_ALLOCA): New flag macro.
22845 Define it for some systems and compilers.
22846 (YYSTACK_ALLOC): New macro.
22847 (yyparse): Use YYSTACK_ALLOC to allocate stack.
22848 If it was malloc'd, free it.
22849
22850 1997-05-17 Richard Stallman <rms@gnu.org>
22851
22852 * bison.simple:
22853 Use malloc, if using alloca is troublesome.
22854 (YYSTACK_USE_ALLOCA): New flag macro.
22855 Define it for some systems and compilers.
22856 (YYSTACK_ALLOC): New macro.
22857 (yyparse): Use YYSTACK_ALLOC to allocate stack.
22858 If it was malloc'd, free it.
22859
22860 1997-04-23 Richard Stallman <rms@gnu.org>
22861
22862 * src/bison.s1:
22863 (alloca) [__hpux]: Always define as __builtin_alloca.
22864
22865 1997-04-23 Richard Stallman <rms@gnu.org>
22866
22867 * bison.simple:
22868 (alloca) [__hpux]: Always define as __builtin_alloca.
22869
22870 1997-04-22 Richard Stallman <rms@gnu.org>
22871
22872 * src/bison.s1:
22873 [__hpux]: Include alloca.h (right for HPUX 10)
22874 instead of declaring alloca (right for HPUX 9).
22875
22876 * src/bison.s1 (__yy_memcpy):
22877 Declare arg `count' as unsigned int.
22878 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
22879
22880 1997-04-22 Richard Stallman <rms@gnu.org>
22881
22882 * bison.simple:
22883 [__hpux]: Include alloca.h (right for HPUX 10)
22884 instead of declaring alloca (right for HPUX 9).
22885
22886 * bison.simple (__yy_memcpy):
22887 Declare arg `count' as unsigned int.
22888 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
22889
22890 1997-01-03 Richard Stallman <rms@gnu.org>
22891
22892 * src/allocate.c: [__STDC__ or _MSC_VER]:
22893 Declare calloc and realloc to return void *.
22894
22895 1997-01-02 Richard Stallman <rms@gnu.org>
22896
22897 * src/system.h:
22898 [_MSC_VER]: Include stdlib.h and process.h.
22899 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
22900
22901 * src/main.c (main): Return FAILURE as a value.
22902 (printable_version): Declare arg as int, not char.
22903
22904 1997-01-02 Richard Stallman <rms@gnu.org>
22905
22906 * Makefile.in (dist):
22907 Explicitly check for symlinks, and copy them.
22908
22909 1996-12-19 Richard Stallman <rms@gnu.org>
22910
22911 * src/files.c:
22912 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
22913
22914 1996-12-18 Paul Eggert <eggert@gnu.org>
22915
22916 * src/bison.s1 (yyparse):
22917 If __GNUC__ and YYPARSE_PARAM are both defined,
22918 declare yyparse to have a void * argument.
22919
22920 1996-12-18 Paul Eggert <eggert@gnu.org>
22921
22922 * bison.simple (yyparse):
22923 If __GNUC__ and YYPARSE_PARAM are both defined,
22924 declare yyparse to have a void * argument.
22925
22926 1996-12-17 Richard Stallman <rms@gnu.org>
22927
22928 * src/reduce.c (nbits): Add some casts.
22929
22930 1996-08-12 Richard Stallman <rms@gnu.org>
22931
22932 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
22933
22934 1996-08-12 Richard Stallman <rms@gnu.org>
22935
22936 * bison.simple: Test _MSDOS as well as _MSDOS_.
22937
22938 1996-07-31 Richard Stallman <rms@gnu.org>
22939
22940 * src/bison.s1:
22941 [__sun && __i386]: Include alloca.h.
22942
22943 1996-07-31 Richard Stallman <rms@gnu.org>
22944
22945 * bison.simple:
22946 [__sun && __i386]: Include alloca.h.
22947
22948 1996-07-30 Richard Stallman <rms@gnu.org>
22949
22950 * src/bison.s1: Comment change.
22951
22952 * src/bison.s1: Test _MSDOS_, not MSDOS.
22953
22954 1996-07-30 Richard Stallman <rms@gnu.org>
22955
22956 * bison.simple: Comment change.
22957
22958 * bison.simple: Test _MSDOS_, not MSDOS.
22959
22960 1996-06-01 Richard Stallman <rms@gnu.org>
22961
22962 * 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:
22963 Insert `_' macro around many string constants.
22964
22965 * src/main.c:
22966 Insert `_' macro around many string constants.
22967
22968 (main): Call setlocale, bindtextdomain and textdomain.
22969
22970 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
22971 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
22972 [ENABLE_NLS]: Include libintl.h.
22973 [ENABLE_NLS] (gettext): Define.
22974 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
22975 (N_, PACKAGE, LOCALEDIR): New macros.
22976
22977 1996-06-01 Richard Stallman <rms@gnu.org>
22978
22979 * POTFILES.in: New file.
22980
22981 * Makefile.in (allocate.o):
22982 Define target explicitly.
22983
22984 * Makefile.in (CFLAGS): Set to @CFLAGS@.
22985 (LDFLAGS): Set to @LDFLAGS@.
22986 (configure): Run autoconf only if preceding `cd' succeeds.
22987 (bison.s1): Redirect output to temporary file then move the
22988 temporary to the target, rather than redirecting directly to bison.s1.
22989 (clean): Remove config.status and config.log.
22990 (distclean): Don't remove config.status here.
22991
22992 1996-05-12 Richard Stallman <rms@gnu.org>
22993
22994 * src/bison.s1:
22995 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
22996
22997 1996-05-12 Richard Stallman <rms@gnu.org>
22998
22999 * bison.simple:
23000 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23001
23002 1996-05-11 Richard Stallman <rms@gnu.org>
23003
23004 * src/bison.s1 (__yy_memcpy):
23005 Really reorder the args, as was supposedly done on Feb 14 1995.
23006 (yyparse): Calls changed accordingly.
23007
23008 1996-05-11 Richard Stallman <rms@gnu.org>
23009
23010 * Makefile.in (dist): Don't use $(srcdir).
23011
23012 * bison.simple (__yy_memcpy):
23013 Really reorder the args, as was supposedly done on Feb 14 1995.
23014 (yyparse): Calls changed accordingly.
23015
23016 1996-01-27 Richard Stallman <rms@gnu.org>
23017
23018 * src/output.c (output_rule_data):
23019 Test YYERROR_VERBOSE in the conditional
23020 around the definition of ttyname.
23021
23022 1995-12-29 Richard Stallman <rms@gnu.org>
23023
23024 * src/bison.s1:
23025 Fix line numbers in #line commands.
23026
23027 1995-12-29 Richard Stallman <rms@gnu.org>
23028
23029 * bison.simple:
23030 Fix line numbers in #line commands.
23031
23032 1995-12-27 Richard Stallman <rms@gnu.org>
23033
23034 * src/bison.s1 (YYPARSE_PARAM_DECL):
23035 In C++, make it always null.
23036 (YYPARSE_PARAM_ARG): New macro.
23037 (yyparse): Use YYPARSE_PARAM_ARG.
23038
23039 1995-12-27 Richard Stallman <rms@gnu.org>
23040
23041 * bison.simple (YYPARSE_PARAM_DECL):
23042 In C++, make it always null.
23043 (YYPARSE_PARAM_ARG): New macro.
23044 (yyparse): Use YYPARSE_PARAM_ARG.
23045
23046 1995-11-29 Richard Stallman <rms@gnu.org>
23047
23048 * doc/bison.texinfo:
23049 Describe literal string tokens, %raw, %no_lines, %token_table.
23050
23051 1995-11-29 Daniel Hagerty <hag@gnu.org>
23052
23053 * doc/bison.texinfo: Fixed update date
23054
23055 1995-10-16 Richard Stallman <rms@gnu.org>
23056
23057 * src/version.c: Version 1.25.
23058
23059 1995-10-16 Richard Stallman <rms@gnu.org>
23060
23061 * NEWS: *** empty log message ***
23062
23063 1995-10-16 Richard Stallman <rms@gnu.org>
23064
23065 * doc/bison.1, doc/bison.rnh:
23066 Add new options.
23067
23068 1995-10-15 Richard Stallman <rms@gnu.org>
23069
23070 * src/vmsgetargs.c, src/getargs.c:
23071 Added -n, -k, and -raw switches.
23072 (noparserflag, toknumflag, rawtoknumflag): New variables.
23073
23074 * src/symtab.h (SALIAS):
23075 New #define for adding aliases to %token.
23076 (struct bucket): Added `alias' field.
23077
23078 * src/reduce.c (reduce_grammar):
23079 Revise error message.
23080 (print_notices): Remove final `.' from error message.
23081
23082 * src/reader.c (reader_output_yylsp):
23083 New function.
23084 (readgram): Use `#if 0' around code that accepted %command
23085 inside grammar rules: The documentation doesn't allow it,
23086 and it will fail since the %command processors scan for the next %.
23087 (parse_token_decl): Extended the %token
23088 declaration to allow a multi-character symbol as an alias.
23089 (parse_thong_decl): New function.
23090 (read_declarations): Added %thong declarations.
23091 (read_declarations): Handle NOOP to deal with allowing
23092 % declarations as another means to specify the flags.
23093 (readgram): Allow %prec prior to semantics embedded in a rule.
23094 (skip_to_char, read_declarations, copy_definition)
23095 (parse_token_decl, parse_start_decl, parse_type_decl)
23096 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
23097 (get_type_name, copy_guard, copy_action, readgram)
23098 (get_type, packsymbols): Revised most error messages.
23099 Changed `fatal' to `warnxxx' to avoid aborting for error.
23100 Revised and use multiple warnxxx functions to avoid using VARARGS1.
23101 (read_declarations): Improve the error message for
23102 an invalid character. Do not abort.
23103 (read_declarations, copy_guard, copy_action): Use
23104 printable_version to avoid unprintable characters in printed output.
23105 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
23106 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
23107 Allow the type of a non-terminal can be given
23108 more than once, as long as all specifications give the same type.
23109
23110 * src/output.c:
23111 (output_headers, output_trailers, output, output_gram)
23112 (output_rule_data): Implement noparserflag variable.
23113 Implement toknumflag variable.
23114 (output): Call reader_output_yylsp to output LTYPESTR.
23115
23116 * src/main.c (main):
23117 If reader sees an error, don't process the grammar.
23118 (fatals): Updated to not use VARARGS1.
23119 (printable_version, int_to_string, warn, warni, warns, warnss)
23120 (warnsss): New error reporting functions. Avoid abort for error.
23121
23122 * src/lex.h:
23123 Added THONG and NOOP for alias processing.
23124 Added SETOPT for the new code that allows setting options with %flags.
23125
23126 * src/lex.c:
23127 Include getopt.h. Add some extern decls.
23128 (safegetc): New function to deal with EOF gracefully.
23129 (literalchar); new function to deal with reading \ escapes.
23130 (lex): Use literalchar.
23131 (lex): Implemented "..." tokens.
23132 (literalchar, lex, parse_percent_token): Made tokenbuffer
23133 always contain the token. This includes growing the token
23134 buffer while reading an integer.
23135 (parse_percent_token): Replaced if-else statement with percent_table.
23136 (parse_percent_token): Added % declarations as another
23137 way to specify the flags -n, -l, and -r. Also added hooks for
23138 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
23139 major changes to files.c.
23140 (lex) Retain in the incoming stream a character following
23141 an incorrect '/'.
23142 (skip_white_space, lex): Revised most error messages
23143 and changed fatal to warn to avoid aborting.
23144 (percent_table): Added %thong declarations.
23145
23146 * src/gram.h: Comment changes.
23147
23148 * src/files.c (openfiles, open_extra_files, done):
23149 Add faction flag
23150 and actfile file. Handle noparserflag. Both for -n switch.
23151
23152 * src/conflicts.c (resolve_sr_conflict):
23153 Remove use of alloca.
23154
23155 1995-06-01 Jim Meyering <meyering@gnu.org>
23156
23157 * doc/bison.texinfo: *** empty log message ***
23158
23159 1995-05-06 Richard Stallman <rms@gnu.org>
23160
23161 * src/bison.s1: Comment change.
23162
23163 1995-05-06 Richard Stallman <rms@gnu.org>
23164
23165 * bison.simple: Comment change.
23166
23167 1995-05-03 Richard Stallman <rms@gnu.org>
23168
23169 * src/version.c: Version now 1.24.
23170
23171 * src/bison.s1: Change distribution terms.
23172
23173 * src/version.c: Version now 1.23.
23174
23175 1995-05-03 Richard Stallman <rms@gnu.org>
23176
23177 * doc/bison.texinfo:
23178 Rewrite "Conditions for Using Bison".
23179 Update version to 1.24.
23180
23181 1995-05-03 Richard Stallman <rms@gnu.org>
23182
23183 * bison.simple: Change distribution terms.
23184
23185 1995-02-23 Richard Stallman <rms@gnu.org>
23186
23187 * src/files.c: Test __VMS_POSIX as well as VMS.
23188
23189 1995-02-14 Jim Meyering <meyering@gnu.org>
23190
23191 * src/bison.s1 (__yy_memcpy):
23192 Renamed from __yy_bcopy to avoid
23193 confusion. Reverse FROM and TO arguments to be consistent with
23194 those of memcpy.
23195
23196 1995-02-14 Jim Meyering <meyering@gnu.org>
23197
23198 * bison.simple (__yy_memcpy):
23199 Renamed from __yy_bcopy to avoid
23200 confusion. Reverse FROM and TO arguments to be consistent with
23201 those of memcpy.
23202
23203 1994-11-10 David J. MacKenzie <djm@gnu.org>
23204
23205 * NEWS: reformat
23206
23207 * NEWS: New file.
23208
23209 * Makefile.in (DISTFILES): Include NEWS.
23210
23211 * Makefile.in (DISTFILES):
23212 Include install-sh, not install.sh.
23213
23214 * configure.in: Update to Autoconf v2 macro names.
23215
23216 1994-10-05 David J. MacKenzie <djm@gnu.org>
23217
23218 * Makefile.in: fix typo
23219
23220 * Makefile.in (prefix, exec_prefix):
23221 Let configure set them.
23222
23223 1994-09-28 David J. MacKenzie <djm@gnu.org>
23224
23225 * Makefile.in: Set datadir to $(prefix)/share.
23226
23227 1994-09-15 Richard Stallman <rms@gnu.org>
23228
23229 * src/bison.s1:
23230 Update copyright notice and GPL version.
23231
23232 1994-09-15 Richard Stallman <rms@gnu.org>
23233
23234 * bison.simple:
23235 Update copyright notice and GPL version.
23236
23237 1994-07-12 Richard Stallman <rms@gnu.org>
23238
23239 * src/reduce.c, src/reader.c:
23240 entered into RCS
23241
23242 1994-05-05 David J. MacKenzie <djm@gnu.org>
23243
23244 * Makefile.in: entered into RCS
23245
23246 1994-03-26 Richard Stallman <rms@gnu.org>
23247
23248 * src/bison.s1: entered into RCS
23249
23250 1994-03-26 Richard Stallman <rms@gnu.org>
23251
23252 * bison.simple: entered into RCS
23253
23254 1994-03-25 Richard Stallman <rms@gnu.org>
23255
23256 * src/main.c: entered into RCS
23257
23258 1994-03-24 Richard Stallman <rms@gnu.org>
23259
23260 * src/conflicts.c: entered into RCS
23261
23262 1994-01-02 Richard Stallman <rms@gnu.org>
23263
23264 * Makefile.in: *** empty log message ***
23265
23266 1993-11-21 Richard Stallman <rms@gnu.org>
23267
23268 * src/bison.s1: *** empty log message ***
23269
23270 1993-11-21 Richard Stallman <rms@gnu.org>
23271
23272 * doc/bison.texinfo: entered into RCS
23273
23274 * doc/bison.texinfo: *** empty log message ***
23275
23276 1993-11-21 Richard Stallman <rms@gnu.org>
23277
23278 * bison.simple: *** empty log message ***
23279
23280 1993-10-25 David J. MacKenzie <djm@gnu.org>
23281
23282 * doc/bison.texinfo: *** empty log message ***
23283
23284 1993-10-19 Richard Stallman <rms@gnu.org>
23285
23286 * src/bison.s1: *** empty log message ***
23287
23288 1993-10-19 Richard Stallman <rms@gnu.org>
23289
23290 * bison.simple: *** empty log message ***
23291
23292 1993-10-14 Richard Stallman <rms@gnu.org>
23293
23294 * src/bison.s1: *** empty log message ***
23295
23296 1993-10-14 Richard Stallman <rms@gnu.org>
23297
23298 * bison.simple: *** empty log message ***
23299
23300 1993-09-14 David J. MacKenzie <djm@gnu.org>
23301
23302 * doc/bison.texinfo: *** empty log message ***
23303
23304 1993-09-13 Noah Friedman <friedman@gnu.org>
23305
23306 * Makefile.in: *** empty log message ***
23307
23308 1993-09-10 Richard Stallman <rms@gnu.org>
23309
23310 * src/conflicts.c: *** empty log message ***
23311
23312 * src/system.h: entered into RCS
23313
23314 1993-09-10 Richard Stallman <rms@gnu.org>
23315
23316 * doc/bison.1: entered into RCS
23317
23318 1993-09-06 Noah Friedman <friedman@gnu.org>
23319
23320 * src/version.c: entered into RCS
23321
23322 1993-09-06 Noah Friedman <friedman@gnu.org>
23323
23324 * Makefile.in: *** empty log message ***
23325
23326 1993-07-30 David J. MacKenzie <djm@gnu.org>
23327
23328 * Makefile.in: *** empty log message ***
23329
23330 1993-07-24 Richard Stallman <rms@gnu.org>
23331
23332 * src/bison.s1: *** empty log message ***
23333
23334 1993-07-24 Richard Stallman <rms@gnu.org>
23335
23336 * bison.simple: *** empty log message ***
23337
23338 1993-07-08 David J. MacKenzie <djm@gnu.org>
23339
23340 * Makefile.in: *** empty log message ***
23341
23342 1993-07-04 Richard Stallman <rms@gnu.org>
23343
23344 * src/bison.s1: *** empty log message ***
23345
23346 1993-07-04 Richard Stallman <rms@gnu.org>
23347
23348 * bison.simple: *** empty log message ***
23349
23350 1993-06-26 David J. MacKenzie <djm@gnu.org>
23351
23352 * src/getargs.c: entered into RCS
23353
23354 1993-06-26 David J. MacKenzie <djm@gnu.org>
23355
23356 * doc/bison.texinfo: *** empty log message ***
23357
23358 * doc/bison.1: New file.
23359
23360 1993-06-25 Richard Stallman <rms@gnu.org>
23361
23362 * src/getargs.c: New file.
23363
23364 1993-06-16 Richard Stallman <rms@gnu.org>
23365
23366 * src/bison.s1: *** empty log message ***
23367
23368 1993-06-16 Richard Stallman <rms@gnu.org>
23369
23370 * bison.simple: *** empty log message ***
23371
23372 1993-06-03 Richard Stallman <rms@gnu.org>
23373
23374 * src/bison.s1: New file.
23375
23376 1993-06-03 Richard Stallman <rms@gnu.org>
23377
23378 * doc/bison.texinfo: *** empty log message ***
23379
23380 1993-06-03 Richard Stallman <rms@gnu.org>
23381
23382 * bison.simple: New file.
23383
23384 1993-05-19 Richard Stallman <rms@gnu.org>
23385
23386 * doc/bison.texinfo: New file.
23387
23388 1993-05-07 Noah Friedman <friedman@gnu.org>
23389
23390 * Makefile.in: *** empty log message ***
23391
23392 1993-04-28 Noah Friedman <friedman@gnu.org>
23393
23394 * src/reader.c: *** empty log message ***
23395
23396 1993-04-23 Noah Friedman <friedman@gnu.org>
23397
23398 * src/alloc.h: entered into RCS
23399
23400 1993-04-20 David J. MacKenzie <djm@gnu.org>
23401
23402 * src/version.c: *** empty log message ***
23403
23404 * src/files.c, src/allocate.c:
23405 entered into RCS
23406
23407 * src/reader.c: *** empty log message ***
23408
23409 * src/lex.c: entered into RCS
23410
23411 * src/conflicts.c: New file.
23412
23413 * src/symtab.c: entered into RCS
23414
23415 * src/alloc.h: New file.
23416
23417 * src/LR0.c: entered into RCS
23418
23419 1993-04-18 Noah Friedman <friedman@gnu.org>
23420
23421 * src/reader.c: New file.
23422
23423 * src/version.c: *** empty log message ***
23424
23425 1993-04-18 Noah Friedman <friedman@gnu.org>
23426
23427 * Makefile.in: *** empty log message ***
23428
23429 1993-04-17 Noah Friedman <friedman@gnu.org>
23430
23431 * Makefile.in: *** empty log message ***
23432
23433 1993-04-15 Richard Stallman <rms@gnu.org>
23434
23435 * src/main.c, src/files.c:
23436 New file.
23437
23438 1993-04-15 Noah Friedman <friedman@gnu.org>
23439
23440 * configure.in: entered into RCS
23441
23442 * configure.in: *** empty log message ***
23443
23444 * configure.in: New file.
23445
23446 1993-04-14 Richard Stallman <rms@gnu.org>
23447
23448 * Makefile.in: New file.
23449
23450 1993-04-13 Richard Stallman <rms@gnu.org>
23451
23452 * src/version.c: New file.
23453
23454 1993-03-25 Richard Stallman <rms@gnu.org>
23455
23456 * src/output.c: entered into RCS
23457
23458 1992-09-25 Richard Stallman <rms@gnu.org>
23459
23460 * configure.bat: entered into RCS
23461
23462 1992-06-22 Richard Stallman <rms@gnu.org>
23463
23464 * src/vmsgetargs.c: entered into RCS
23465
23466 1992-06-22 Richard Stallman <rms@gnu.org>
23467
23468 * doc/bison.rnh: entered into RCS
23469
23470 1992-04-20 David J. MacKenzie <djm@gnu.org>
23471
23472 * README: entered into RCS
23473
23474 1992-01-22 Richard Stallman <rms@gnu.org>
23475
23476 * src/machine.h: entered into RCS
23477
23478 1991-12-21 Richard Stallman <rms@gnu.org>
23479
23480 * src/lalr.c, src/closure.c:
23481 entered into RCS
23482
23483 1991-12-20 Richard Stallman <rms@gnu.org>
23484
23485 * src/state.h: entered into RCS
23486
23487 1991-12-18 Richard Stallman <rms@gnu.org>
23488
23489 * src/print.c, src/nullable.c, src/derives.c:
23490 entered into RCS
23491
23492 1991-11-03 David J. MacKenzie <djm@gnu.org>
23493
23494 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
23495 entered into RCS
23496
23497 1988-09-09 Richard Stallman <rms@gnu.org>
23498
23499 * src/bison.hairy: entered into RCS
23500
23501 1987-12-16 Richard Stallman <rms@gnu.org>
23502
23503 * REFERENCES: entered into RCS
23504
23505
23506 -----
23507
23508 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
23509 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
23510 2008, 2009, 2010 Free Software Foundation, Inc.
23511
23512 Copying and distribution of this file, with or without
23513 modification, are permitted provided the copyright notice and this
23514 notice are preserved.