]> git.saurik.com Git - bison.git/blob - ChangeLog
0ed063d2e66427181278f50be2248f7f7003d916
[bison.git] / ChangeLog
1 2010-08-05 Joel E. Denny <joeldenny@joeldenny.org>
2
3 Version 2.4.3.
4 * NEWS (2.4.3): Set date.
5
6 2010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
7
8 maint: add gettext version to release announcements.
9 Suggested by Paul Hilfinger at
10 <http://lists.gnu.org/archive/html/bison-patches/2010-07/msg00019.html>
11 <http://lists.gnu.org/archive/html/bison-patches/2010-08/msg00002.html>.
12 * cfg.mk (bootstrap-tools): Add gettext.
13
14 2010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
15
16 doc: fix -W and %expect documentation some.
17 * NEWS (2.4.3): Mention that there are documentation fixes.
18 * doc/bison.texinfo (Expect Decl): Make it clear that %expect
19 turns conflicts into errors not warnings.
20 (Shift/Reduce): Likewise.
21 (Bison Options): Don't mention -Wsyntax. It doesn't exist.
22
23 2010-08-01 Joel E. Denny <joeldenny@joeldenny.org>
24
25 -Werror: fix for rules useless in parser after conflicts.
26 * NEWS (2.4.3): Document fix.
27 * src/complain.c (error_message): Extend to handle incomplete
28 error messages so warn and warn_at can be used in more cases.
29 * src/gram.c (grammar_rules_useless_report): Use warn_at so that
30 -Werror is always obeyed.
31 * src/reduce.c (reduce_print): Use warn so that the "warnings
32 being treated as errors" message is printed consistently before
33 the first warning message. This makes testing easier.
34 * tests/local.at (AT_BISON_WERROR_MSG): New macro.
35 (AT_BISON_CHECK_NO_XML): Extend to check -Werror and
36 --warnings=error when warnings appear in bison's stderr.
37
38 2010-07-29 Joel E. Denny <joeldenny@joeldenny.org>
39
40 maint: enable gnits only at stable releases.
41 * configure.ac (AM_INIT_AUTOMAKE): Underscore or dash in a
42 version string should disable gnits. Explain in comments.
43
44 2010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
45
46 i18n: update.
47 * po/POTFILES.in: Add src/graphviz.c.
48
49 2010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
50
51 i18n: fix for gnulib.
52 * po/POTFILES.in: Add remaining gnulib files that have
53 translatable strings.
54
55 2010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
56
57 build: fix our adjustments for gnulib files in lib.
58 * configure.ac: For prepending lib/ to the values of config
59 variables, fix detection of empty values. Also, due to recent
60 gnulib changes, add LIBUNISTRING_UNITYPES_H and
61 LIBUNISTRING_UNIWIDTH_H to the list of those variables.
62
63 2010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
64
65 maint: use announce-gen's new --mail-headers.
66 * HACKING (Announce): Update instructions.
67 * cfg.mk (announcement_Cc_): Define.
68 * configure.ac (AM_GNU_GETTEXT_VERSION): Update to 0.18 as
69 required by latest gnulib.
70 * gnulib: Update to latest.
71
72 2010-07-24 Joel E. Denny <joeldenny@joeldenny.org>
73
74 tests: handle Valgrind that complains about >&-.
75 * tests/output.at (AT_CHECK_OUTPUT): Extend to accept pre-tests.
76 (Output files: -dv >&-): Skip test group if running
77 maintainer-check-valgrind.
78
79 2010-07-23 Paul Hilfinger <hilfingr@EECS.Berkeley.EDU>
80
81 * NEWS: Describe new semantic-predicate feature.
82 * data/c.m4 (b4_predicate_case): New definition.
83 * data/java.m4 (b4_predicate_case): New definition.
84 * data/glr.c (yyimmediate): Add definition.
85 (yydoAction): Remove comment, now obsolete.
86 Do YY_REDUCE_PRINT here.
87 (yyglrReduce): Alter comment to indicate that semantic values
88 need not be deferred.
89 Remove YY_REDUCE_PRINT from here; done in yydoAction.
90 (yyprocessOneStack): Pass immediate flag.
91 Delete stacks rejected by predicates in newly split-off parsers.
92 Change handling of yyerr so that only current stack gets deleted
93 when semantic predicate fails.
94 (yyfillin): Don't crash if a semantic value is unresolved (as may
95 happen in predicate rules).
96 Copy lr state as well in debugging mode.
97 Update comment on setting of yysval to include yyloc as well.
98 (yy_reduce_print): Add yynormal argument. Perform fillin properly.
99 Report unresolved RHS values.
100 (yyimmediate): New table.
101 * src/gram.h (struct rule): Add is_predicate field.
102 * src/output.c (user_actions_output): Use b4_predicate_case for
103 predicates.
104 (prepare_symbols): Output yyimmediate.
105 * src/scan-gram.l: Add %? token, SC_PREDICATE state.
106 * src/scan-code.l (code_props_rule_action_init): Add is_predicate
107 argument.
108 * src/scan-code.h (struct code_props): Add is_predicate field.
109 (code_props_rule_action_init): New interface.
110 * src/parse-gram.y (%?{...}): New token.
111 (rhs): Add %?{...} rule.
112 * src/parse-gram.c: Regenerate.
113 * src/parse-gram.h: Regenerate.
114 * src/reader.c (grammar_current_rule_action_append): Add
115 immediate argument.
116 (grammar_midrule_action): Use new interface for
117 code_props_rule_action_init.
118 (grammar_current_rule_action_append): Ditto.
119 (packgram): Transfer is_predicate value.
120 * src/reader.h (grammar_current_rule_action_append): New interface.
121 * doc/bison.texinfo: Document semantic predicates (%?).
122
123 * data/glr.c (yylhsNonterm, yyisDefaultedState,yyDefaultAction)
124 (yygetLRActions,yynewGLRStackItem,yyaddDeferredAction,yyinitStateSet)
125 (yyinitGLRStack,yyexpandGLRStack,yyupdateSplit,yymarkStackDeleted)
126 (yyundeleteLastStack,yyglrShift,yyglrShiftDefer,yydoAction,yyglrReduce)
127 (yyidenticalOptions,yymergeOptionSets,yyresolveStates,yyresolveAction)
128 (yyresolveLocations,yyresolveValue,yyreducePrint): Update parameter
129 names in comments and mention all parameters.
130 (struct yyGLRState): Fix description of yyposn field.
131 (yyresolveLocations): Correct comment so as not to imply action when
132 yyn1==0.
133
134 2010-06-17 Paul Eggert <eggert@cs.ucla.edu>
135
136 Update from GFDL GFDL 1.2 to 1.3.
137 * doc/bison.texinfo: Update GFDL version number.
138 * doc/fdl.texi: Update to version 1.3, taken from:
139 http://www.gnu.org/licenses/fdl.texi
140
141 Do not use date ranges in copyright notices.
142 See http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices
143
144 * HACKING, Makefile.am, NEWS, PACKAGING, README, README-alpha:
145 * TODO, bootstrap, bootstrap.conf:
146 * build-aux/update-b4-copyright, cfg.mk, configure.ac:
147 * data/README, data/bison.m4, data/c++-skel.m4, data/c++.m4:
148 * data/c-skel.m4, data/c.m4, data/glr.c, data/glr.cc:
149 * data/java-skel.m4, data/java.m4, data/lalr1.cc:
150 * data/lalr1.java, data/local.mk, data/location.cc:
151 * data/stack.hh, data/variant.hh, data/xslt/bison.xsl:
152 * data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl:
153 * data/xslt/xml2xhtml.xsl, data/yacc.c, djgpp/Makefile.maint:
154 * djgpp/README.in, djgpp/config.bat, djgpp/config.sed:
155 * djgpp/config.site, djgpp/config_h.sed, djgpp/djunpack.bat:
156 * djgpp/local.mk, djgpp/subpipe.c, djgpp/subpipe.h:
157 * djgpp/testsuite.sed, doc/bison.texinfo, doc/local.mk:
158 * doc/refcard.tex, etc/README, etc/bench.pl.in, etc/local.mk:
159 * examples/calc++/Makefile.am, examples/extexi:
160 * examples/local.mk, lib/abitset.c, lib/abitset.h:
161 * lib/bbitset.h, lib/bitset.c, lib/bitset.h:
162 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
163 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
164 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
165 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
166 * lib/libiberty.h, lib/local.mk, lib/main.c, lib/timevar.c:
167 * lib/timevar.def, lib/timevar.h, lib/vbitset.c:
168 * lib/vbitset.h, lib/yyerror.c, m4/bison-i18n.m4:
169 * m4/c-working.m4, m4/cxx.m4, m4/subpipe.m4, m4/timevar.m4:
170 * src/AnnotationList.c, src/AnnotationList.h:
171 * src/InadequacyList.c, src/InadequacyList.h, src/LR0.c:
172 * src/LR0.h, src/Sbitset.c, src/Sbitset.h, src/assoc.c:
173 * src/assoc.h, src/closure.c, src/closure.h, src/complain.c:
174 * src/complain.h, src/conflicts.c, src/conflicts.h:
175 * src/derives.c, src/derives.h, src/files.c, src/files.h:
176 * src/flex-scanner.h, src/getargs.c, src/getargs.h:
177 * src/gram.c, src/gram.h, src/graphviz.c, src/ielr.c:
178 * src/ielr.h, src/lalr.c, src/lalr.h, src/local.mk:
179 * src/location.c, src/location.h, src/main.c:
180 * src/muscle-tab.c, src/muscle-tab.h, src/named-ref.c:
181 * src/named-ref.h, src/nullable.c, src/nullable.h:
182 * src/output.c, src/output.h, src/parse-gram.y:
183 * src/print-xml.c, src/print-xml.h, src/print.c, src/print.h:
184 * src/print_graph.c, src/print_graph.h, src/reader.c:
185 * src/reader.h, src/reduce.c, src/reduce.h, src/relation.c:
186 * src/relation.h, src/scan-code.h, src/scan-code.l:
187 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
188 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
189 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
190 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
191 * tests/actions.at, tests/atlocal.in, tests/c++.at:
192 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
193 * tests/existing.at, tests/glr-regression.at:
194 * tests/headers.at, tests/input.at, tests/java.at:
195 * tests/local.at, tests/local.mk, tests/named-refs.at:
196 * tests/output.at, tests/push.at, tests/reduce.at:
197 * tests/regression.at, tests/sets.at, tests/skeletons.at:
198 * tests/synclines.at, tests/testsuite.at, tests/torture.at:
199 Don't use date ranges in copyright notices.
200
201 2010-05-11 Akim Demaille <demaille@gostai.com>
202
203 lalrl1.cc: give a chance to user defined YYLLOC_DEFAULT.
204 * data/lalr1.cc (YYLLOC_DEFAULT): Move its definition from the
205 header file to the implementation file, after the user %code
206 sections.
207 * NEWS (2.5): Document this.
208
209 2010-05-11 Akim Demaille <demaille@gostai.com>
210
211 doc: please Emacs.
212 * doc/bison.texinfo (Local Variables): Move this after the
213 LocalWords, since the latter are looked for in the whole document,
214 while the former are looked for only at its end.
215 Require american spell checking.
216
217 2010-05-10 Akim Demaille <demaille@gostai.com>
218
219 doc: fix lalr1.cc documentation.
220 * doc/bison.texinfo (C++ Scanner Interface): Fix yylex signature.
221 (C++ Bison Interface): Fix lalr1.cc skeleton name.
222 (C++ Parser Interface): Fix semantic_type and location_type names.
223 Document yy::parser::token.
224 Reported by Jerry Quinn.
225
226 2010-05-10 Akim Demaille <demaille@gostai.com>
227
228 c++: use YYRHSLOC.
229 * data/lalr1.cc (YYRHSLOC): New.
230 (YYLLOC_DEFAULT): Use it.
231 * data/glr.cc: If location_type was user defined, do not include
232 location.hh, and do not produce location.hh and position.hh.
233 * tests/calc.at (YYLLOC_DEFAULT): Use YYRHSLOC.
234 Check that glr.cc supports user defined location_type.
235 * NEWS: Document this.
236
237 2010-05-07 Akim Demaille <demaille@gostai.com>
238
239 doc: fix typo.
240 * tests/synclines.at: here.
241
242 2010-05-04 Akim Demaille <demaille@gostai.com>
243
244 tests: enhance AT_SYNCLINES_COMPILE.
245 * tests/synclines.at (AT_SYNCLINES_COMPILE): More distcc patterns.
246 (AT_TEST_SYNCLINE): Remove GCC 4.5 protection which is already
247 taken care of in AT_SYNCLINES_COMPILE.
248
249 2010-05-04 Akim Demaille <demaille@gostai.com>
250
251 lalr1.cc: don't generate location.hh when location_type is defined
252 * data/bison.m4 (b4_percent_define_get): Accept a default value.
253 * data/c++.m4: Do not provide a default value for the %define
254 variable location_type, rather, use b4_percent_define_get with a
255 default argument where its value is needed.
256 * data/lalr1.cc: Do not load location.cc (which outputs both
257 location.hh and position.hh) if the user defined location_type.
258 Do not include location.hh either.
259
260 2010-05-04 Akim Demaille <demaille@gostai.com>
261
262 lalr1.cc: minor refactoring.
263 * data/lalr1.cc: Don't issue empty namespaces.
264
265 2010-05-04 Akim Demaille <demaille@gostai.com>
266
267 tests: fix %printer.
268 Currently, there is no check that %printer ... <foo> (nor
269 %destructor) is about an existing <foo> type. This C++ test had
270 it wrong (<::std::string> vs. <std::string>).
271
272 * tests/c++.at (AT_CHECK_VARIANTS): In list.yy, redefine the
273 pretty-printing of lists into something better for parser traces.
274 Update the expected output.
275 Fix correspondance between %type/%token and %printer.
276
277 2010-05-04 Akim Demaille <demaille@gostai.com>
278
279 lalr1.cc: location_type: make sure we don't depend on loc.(begin|end).
280 * tests/calc.at (Span): Instead of begin/end, as in the built-in
281 location class, use first and last.
282 Define YYLLOC_DEFAULT to adjust to these changes.
283 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Adjust to the
284 location_type changes.
285
286 2010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
287
288 tests: fix maintainer-xml-check.
289 * data/xslt/xml2dot.xsl (xsl:template match="bison-xml-report"):
290 Update output to include comments now produced by --graph.
291 (xsl:template match="automaton"): As for --graph, name the
292 digraph after the grammar file.
293 * src/print-xml.c (escape_bufs): Enlarge array.
294 (print_xml): Add bug-report and url attributes to
295 bison-xml-report element.
296
297 2010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
298
299 In DOT output, convert from "/*" comments to "//" comments.
300 This handles the possibility that a "*/" might appear in
301 variable portions of those comments at some point in the future.
302 * src/graphviz.c (start_graph): Implement.
303
304 2010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
305
306 Document that undefined %prec identifier warnings will remain.
307 * NEWS (2.4.3): Here.
308 (2.4.2): Here.
309
310 2010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
311
312 Revert 2009-12-30 change for undefined %prec token complaints.
313 That is, keep them as warnings because that should be sufficient
314 to satisfy POSIX without creating backward compatibility issues.
315 Suggested by Richard Stallman at
316 <http://lists.gnu.org/archive/html/bison-patches/2010-03/msg00033.html>.
317 * NEWS (2.5): Remove mention of complaint.
318 * src/reader.c (grammar_rule_check): Convert complaint back to
319 warning.
320 * tests/input.at (%prec's token must be defined): Update.
321
322 2010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
323
324 build: don't require src/bison during bootstrap.
325 Suggested by Eric Blake at
326 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00003.html>.
327 * bootstrap.conf (bootstrap_epilogue): New function to make sure
328 src/parse-gram.[ch] are stamped later than src/parse-gram.y.
329
330 2010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
331
332 i18n: fix untranslatable string.
333 Reported by Goran Uddeborg at
334 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00000.html>.
335 * src/muscle-tab.c (muscle_percent_define_insert): Here.
336
337 2010-04-13 Akim Demaille <demaille@gostai.com>
338
339 tests: calc: minor refactoring.
340 * tests/calc.at (_AT_DATA_CALC_Y): Simplify yylex.
341
342 2010-04-13 Akim Demaille <demaille@gostai.com>
343
344 tests: calc: simplify location management.
345 * tests/local.at (AT_LOC_PUSHDEF, AT_LOC_POPDEF): New.
346 (_AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS): Use them to
347 define the appropriate AT_LOC accessors.
348 * tests/calc.at: Use AT_LOC accessors.
349
350 2010-04-13 Akim Demaille <demaille@gostai.com>
351
352 test location_type.
353 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS):
354 Define AT_LOCATION_TYPE_IF.
355 (_AT_BISON_OPTION_POPDEFS): Undefine AT_LOCATION_TYPE_IF.
356 * tests/calc.at (_AT_DATA_CALC_Y): When %define location_type is
357 used, provide a user location type and use it.
358 (Simple LALR1 C++ Calculator): Add a test case for location_type.
359
360 2010-04-13 Akim Demaille <demaille@gostai.com>
361
362 tests: check fclose's return value.
363 * tests/calc.at (_AT_DATA_CALC_Y): Check fclose's return status.
364
365 2010-04-13 Akim Demaille <demaille@gostai.com>
366
367 tests: don't depend on the actual location type.
368 * tests/calc.at: Use yy::parser::location_type rather than
369 yy::location, since the former is always right, and might point to
370 another type than the latter.
371
372 2010-04-13 Akim Demaille <demaille@gostai.com>
373
374 formatting changes.
375 * tests/calc.at: Formatting changes.
376
377 2010-04-13 Akim Demaille <demaille@gostai.com>
378
379 lalr1.cc: remove useless forward declaration.
380 * data/lalr1.cc: Include location.hh before stack.hh.
381 Remove the useless forward declarations of position and location.
382 Reported by Chris Morley.
383 * data/glr.cc: Likewise.
384
385 2010-04-11 Joel E. Denny <joeldenny@joeldenny.org>
386
387 * NEWS (2.4.3): Mention fix for Sun Studio C++.
388
389 2010-04-10 Joel E. Denny <joeldenny@joeldenny.org>
390
391 tests: fix for newer Sun Studio C++.
392 Reported by Dagobert Michelsen at
393 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00023.html>.
394 * THANKS (Dagobert Michelsen): Add.
395 * configure.ac (AC_PREREQ): Set to 2.64 so we get the latest
396 Autoconf macro for handling the restrict keyword.
397 * gnulib: Update to latest, which no longer overrides that macro
398 from Autoconf.
399
400 2010-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
401
402 portability: fix pointer arithmetic to conform to C standard.
403 Reported by Tys Lefering at
404 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00035.html>.
405 This fix is already implemented in glr.c and does not apply to
406 lalr1.java.
407 * data/lalr1.cc (yy::parser::parse): Increase size of
408 yyerror_range and adjust subscripting so you don't have to
409 subtract one from the beginning of the array.
410 * data/yacc.c (b4_declare_parser_state_variables,
411 yyparse, yypush_parse): Likewise.
412
413 2010-04-05 Akim Demaille <demaille@gostai.com>
414
415 remove useless include.
416 * src/graphviz.h: Don't include stdbool.h.
417
418 2010-04-05 Akim Demaille <demaille@gostai.com>
419
420 graph: sign the output file.
421 * src/graphviz.c (start_graph): Issue comments about Bison.
422 Suggested by Tys Lefering.
423
424 2010-03-31 Joel E. Denny <jdenny@ces.clemson.edu>
425
426 portability: fix test suite for GCC 4.5's new #error message.
427 Reported by Tys Lefering at
428 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00030.html>.
429 * NEWS (2.4.3): Mention.
430 * tests/synclines.at (AT_TEST_SYNCLINE): Implement.
431
432 2010-03-30 Akim Demaille <demaille@gostai.com>
433
434 fix comments.
435 * src/graphviz.h: Add missing license notice.
436 Document.
437
438 2010-03-25 Akim Demaille <demaille@gostai.com>
439
440 tests: fix 250: parse.error=verbose overflow.
441 * tests/regression.at (parse.error=verbose overflow): Avoid the
442 double inclusion of stdlib.h as it triggers hard errors.
443
444 2010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
445
446 portability: fix for BSD make.
447 Reported by Johan van Selst at
448 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00016.html>.
449 * tests/local.mk ($(TESTSUITE)): Qualify package.m4 in
450 this dependency list as in package.m4's target rule.
451
452 2010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
453
454 portability: fix spawning on at least FreeBSD 8 and FreeBSD 9.
455 Reported by Johan van Selst at
456 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00014.html>.
457 * NEWS (2.4.3): New.
458 * THANKS (Johan van Selst): Add.
459 * etc/prefix-gnulib-mk (prefix): Adjust regex for makefile
460 targets so that gnulib's new c++defs.h is matched.
461 * gnulib: Update to latest.
462
463 2010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
464
465 maint: update for changes to gnulib's announce-gen.
466 * HACKING (Announce): RELEASE_TYPE=major must now be written
467 RELEASE_TYPE=stable.
468
469 2010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
470
471 Version 2.4.2.
472 * NEWS (2.4.2): Set version and date. For the recent test suite
473 portability fixes, don't be so optimistic about their success
474 given the lack of feedback on the affected platforms.
475
476 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
477
478 tests: fix maintainer-xml-check for recent changes.
479 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Use
480 AT_BISON_CHECK_NO_XML rather than AT_BISON_CHECK because an
481 output file whose name conflicts with a previous output file
482 is now never generated.
483
484 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
485
486 portability: fix several issues with M4 subprocess.
487
488 M4's output pipe was not being drained upon fatal errors during
489 scan_skel. As a result, broken-pipe messages from M4 were seen
490 on at least AIX, HP-UX, Solaris, and RHEL4, and this caused a
491 failure in the test suite. The problem was that, on platforms
492 where the default disposition for SIGPIPE is ignore instead of
493 terminate, M4 sometimes saw fwrite fail with errno=EPIPE and
494 then reported it. However, there's some sort of race condition,
495 because the new test group occasionally succeeded.
496 Reported by Albert Chin at
497 <http://lists.gnu.org/archive/html/bug-bison/2010-02/msg00004.html>.
498
499 There were also problems with the test suite livelocking on
500 Tru64 5.1b. Reported by Didier Godefroy at
501 <http://lists.gnu.org/archive/html/bug-bison/2009-05/msg00005.html>.
502 Switching to create_pipe_bidi suggested by Akim Demaille.
503
504 To attempt to solve both of these problems, switch to gnulib's
505 create_pipe_bidi and register M4 process as a slave. Along the
506 way, clean up file name conflict handling, which was affected by
507 the broken-pipe problem before the switch.
508 * NEWS (2.4.2): Document.
509 * THANKS (Didier Godefroy): Add.
510 * bootstrap.conf (gnulib_modules): Add pipe.
511 * gnulib: Update to latest to make sure we have all the latest
512 fixes.
513 * lib/local.mk (lib_libbison_a_SOURCES): Remove subpipe.h and
514 subpipe.c.
515 * po/POTFILES.in (lib/subpipe.c): Remove.
516 * src/files.c (compute_output_file_names): Update invocations
517 of output_file_name_check.
518 (output_file_name_check): In the case that the grammar file
519 would be overwritten, use complain instead of fatal, but replace
520 the output file name with /dev/null. Use the /dev/null solution
521 for the case of two conflicting output files as well because it
522 seems safer in case Bison one day tries to open both files at
523 the same time.
524 * src/files.h (output_file_name_check): Update prototype.
525 * src/output.c (output_skeleton): Use create_pipe_bidi and
526 wait_subprocess. Assert that scan_skel completely drains the
527 pipe.
528 * src/scan-skel.l (at_directive_perform): Update
529 output_file_name_check invocation.
530 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Check that the
531 grammar file actually isn't overwritten.
532 (Conflicting output files: -o foo.y): Update expected output.
533 * tests/skeletons.at (Fatal errors but M4 continues producing
534 output): New test group.
535
536 2010-02-04 Joel E. Denny <jdenny@ces.clemson.edu>
537
538 Update POTFILES.
539 * HACKING (Release Procedure): Add reminder about keeping
540 POTFILES files up-to-date.
541 * po/POTFILES.in (src/muscle-tab.c, src/scan-skel.l): Add.
542
543 2010-02-01 Joel E. Denny <jdenny@clemson.edu>
544
545 Code cleanup.
546 * tests/atlocal.in (abs_top_srcdir): Remove shell variable,
547 which is already defined in atconfig.
548
549 2010-01-22 Joel E. Denny <jdenny@clemson.edu>
550
551 tests: fix missing include caught by g++ 4.4.1.
552 Reported by Tys Lefering.
553 * HACKING (Release checks): Add note about trying a recent GCC.
554 * tests/regression.at (_AT_DATA_DANCER_Y): For C++, include
555 cstdlib for abort.
556 (_AT_DATA_EXPECT2_Y): Likewise.
557
558 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
559
560 * cfg.mk (gnulib_dir): Assume gnulib is a subdirectory.
561
562 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
563
564 maint: automate PACKAGE_COPYRIGHT_YEAR update, and update it.
565 * HACKING (Release Procedure): Update notes on copyright years.
566 * Makefile.am (update-package-copyright-year): New target rule.
567 * build-aux/update-package-copyright-year: New file.
568 * cfg.mk (update-copyright): Add update-package-copyright-year
569 as a dependency.
570
571 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
572
573 * bootstrap: Import improvements from latest gnulib.
574
575 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
576
577 build: require Automake 1.11.1 to avoid a security flaw.
578 * HACKING (Release Procedure): Don't document Automake security
579 flaw here.
580 * configure.ac (AM_INIT_AUTOMAKE): Require 1.11.1, and explain
581 why here.
582
583 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
584
585 gnulib: update to latest.
586
587 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
588
589 ChangeLog (2006-09-15): add Odd Arild Olsen's role for push.c.
590
591 2010-01-15 Joel E. Denny <jdenny@clemson.edu>
592
593 Thank the developer of the initial push parser implementation.
594 This unfortunate oversight is several years old.
595 * THANKS (Odd Arild Olsen): Add.
596
597 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
598
599 Fix some comments concerning LR(0) versus LALR(1).
600
601 Stop equating LR(0) with nondeterminism and LALR(1) with
602 determinism. That is, if all states are consistent, then LR(0)
603 tables are deterministic. On the other hand, LALR(1) tables
604 might be nondeterministic before conflict resolution, and GLR
605 permits LALR(1) tables to remain nondeterministic.
606 * src/LR0.c, src/LR0.h: Here.
607 * src/lalr.c, src/lalr.h: Here.
608 * src/main.c (main): Here.
609 * src/state.c, src/state.h: Here.
610
611 * src/ielr.h (ielr): In preconditions, expect LR(0) not LALR(1)
612 parser tables.
613
614 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
615
616 maint: run "make update-copyright"
617
618 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
619
620 POSIX: complain if %prec's token was not defined.
621 * NEWS (2.5): Document.
622 * src/reader.c (grammar_rule_check): Convert warning to
623 complaint.
624 * tests/input.at (%prec's token must be defined): Update.
625
626 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
627
628 POSIX: warn if %prec's token was not defined.
629 Reported by Florian Krohm at
630 <http://lists.gnu.org/archive/html/bug-bison/2009-12/msg00005.html>.
631 * NEWS (2.4.2): Document.
632 * src/reader.c (grammar_rule_check): Implement.
633 (grammar_current_rule_prec_set): Add comments explaining that we
634 here assume a %prec identifier is a token, but we still manage
635 to support POSIX.
636 * tests/input.at (%prec's token must be defined): New test
637 group.
638
639 2009-12-31 Joel E. Denny <jdenny@clemson.edu>
640
641 * HACKING (Release Procedure): Recommend a secure automake.
642
643 2009-12-29 Joel E. Denny <jdenny@clemson.edu>
644
645 portability: `<' and `>' are not always defined on addresses.
646 Specifically, don't sort objects by their memory addresses when
647 they're not allocated in the same array or other object. Though
648 I haven't found a test case where that fails on my platform, C
649 says the behavior is undefined.
650 * src/AnnotationList.c (AnnotationList__insertInto): Remove
651 FIXME. Use new id field of InadequacyList nodes rather than
652 their memory addresses when sorting.
653 (AnnotationList__compute_from_inadequacies): Add
654 inadequacy_list_node_count argument to pass to
655 InadequacyList__new_conflict.
656 * src/AnnotationList.h
657 (AnnotationList__compute_from_inadequacies): Update prototype
658 and documentation for new argument.
659 * src/InadequacyList.c (InadequacyList__new_conflict): Add
660 node_count argument and use it to assign a unique ID.
661 * src/InadequacyList.h (InadequacyListNodeCount): New typedef.
662 (InadequacyList): Add id field.
663 (InadequacyList__new_conflict): Update prototype and
664 documentation for new argument.
665 * src/ielr.c (ielr_compute_annotation_lists): Update
666 AnnotationList__compute_from_inadequacies invocation.
667
668 2009-12-20 Joel E. Denny <jdenny@clemson.edu>
669
670 Fix handling of yychar manipulation in user semantic actions.
671 The problem was that yacc.c didn't always update the yychar
672 translation afterwards. However, other skeletons appear to be
673 fine. glr.c appears to already translate yychar before every
674 use. lalr1.cc does not define yychar and does not document its
675 replacement, yyla, for users. It does provide yyclearin, but
676 that does not manipulate yyla and thus requires no translation
677 update. In lalr1.java, yychar is out of scope during semantic
678 actions.
679 * NEWS (2.5): Document.
680 * data/yacc.c (YYBACKUP): Don't bother translating yychar into
681 yytoken here.
682 (yyparse, yypush_parse): Instead, translate before every use of
683 yytoken, and add comments explaining this approach.
684 * tests/actions.at (Destroying lookahead assigned by semantic
685 action): New test group checking that translation happens before
686 lookahead destructor calls at parser return. Previously,
687 incorrect destructors were called.
688 * tests/conflicts.at (parse.error=verbose and consistent
689 errors): New test group checking that translation happens at
690 syntax error detection before the associated verbose error
691 message and the associated lookahead destructor calls. While
692 the destructor call is fixed by this patch, the verbose error
693 message is currently incorrect due to another bug (see
694 comments in test group), so this is an expected failure for now.
695
696 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
697
698 YYFAIL: warn about uses and remove from lalr1.java.
699 * NEWS (2.5): Document.
700 * data/lalr1.java (parser::YYStack::YYFAIL): Rename to YYERRLAB,
701 and make it private. Update all uses.
702 * src/scan-code.l (SC_RULE_ACTION): Implement warning.
703
704 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
705
706 YYFAIL: deprecate.
707 * NEWS (2.4.2): Document deprecation and the phase-out plan.
708 * data/lalr1.java (parser::YYStack::YYFAIL): Add comment about
709 deprecation.
710 * data/yacc.c (YYFAIL): Likewise, and suppress warnings about
711 YYFAIL from GCC cpp's -Wunused-macros.
712 * doc/bison.texinfo (Java Action Features): Remove YYFAIL
713 documentation.
714 (LocalWords): Remove YYFAIL.
715
716 2009-12-20 Joel E. Denny <jdenny@clemson.edu>
717
718 tests: cleanup.
719 * tests/c++.at (Syntax error discarding no lookahead): Don't
720 ignore stderr. Instead, eliminate remaining warnings.
721
722 2009-12-18 Joel E. Denny <jdenny@clemson.edu>
723
724 lalr1.cc: don't discard non-existent lookahead on syntax error.
725 * data/lalr1.cc (parser::parse): Check yyempty first.
726 * tests/c++.at (Syntax error discarding no lookahead): New test
727 group.
728
729 2009-12-17 Joel E. Denny <jdenny@clemson.edu>
730
731 Code cleanup.
732 * src/symtab.c, src/symtab.h (symbol_class_get_string): Remove
733 function, which is no longer used.
734
735 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
736
737 Add gcc's -Wundef to test suite and fix another warning from it.
738 * NEWS (2.4.2): Update description of -Wundef fix.
739 * configure.ac (WARN_CXXFLAGS_TEST): New substitution.
740 (WARN_CFLAGS_TEST): New substitution.
741 * data/glr.c: Avoid warning about __STRICT_ANSI__.
742 * tests/atlocal.in (CFLAGS): Use WARN_CFLAGS_TEST instead of
743 WARN_CFLAGS.
744 (NO_WERROR_CFLAGS): Likewise.
745 (CXXFLAGS): Use WARN_CXXFLAGS_TEST instead of WARN_CXXFLAGS.
746
747 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
748
749 * data/yacc.c: Reformat m4 a little.
750
751 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
752
753 Document gcc -Wundef fix.
754 * NEWS (2.4.2): Here.
755 * THANKS (Jonathan Nieder): Add.
756
757 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
758
759 Simplify y.tab.c when location tracking is disabled.
760 * data/yacc.c: Do not check YYLTYPE_IS_TRIVIAL if location
761 tracking is not enabled. Instead, unconditionally define
762 YY_LOCATION_PRINT as a no-op for backward compatibility.
763
764 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
765
766 Avoid warnings from gcc -Wundef y.tab.c.
767 * data/glr.c: Check if YYENABLE_NLS and YYLTYPE_IS_TRIVIAL are
768 defined before using them.
769 * data/lalr1.cc: Likewise.
770 * data/yacc.c: Likewise.
771
772 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
773
774 autoconf: update to latest for fix of M4 detection.
775 Reported by Eric Blake.
776 * submodules/autoconf: Update.
777
778 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
779
780 portability: use -DGNULIB_POSIXCHECK.
781 Reported by Eric Blake. See discussions at
782 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00008.html>
783 and
784 <http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00108.html>.
785 * HACKING (Release checks): Suggest -DGNULIB_POSIXCHECK.
786 * bootstrap.conf (gnulib_modules): Add all the printf modules
787 suggested by -DGNULIB_POSIXCHECK. Add realloc-posix as
788 suggested by -DGNULIB_POSIXCHECK for gnulib's own vasnprintf.c.
789 (excluded_files): Remove m4/printf-posix.m4.
790 * tests/atlocal.in (LIBS): As for LDADD in src/local.mk, add
791 lib/libbison.a so gnulib libraries can be linked.
792
793 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
794
795 gnulib: update for fix of fprintf-posix, which we'll use soon.
796 * etc/prefix-gnulib-mk (prefix): Adjust regex for make file
797 targets so that gnulib's new arg-nonnull.h and link-warning.h
798 are matched.
799 * gnulib: Update.
800
801 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
802
803 Enable assertion output and --disable-assert for configure.
804 * bootstrap.conf (gnulib_modules): Add assert module.
805 * src/system.h (aver): Define as assert, and summarize the
806 discussion on this issue.
807
808 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
809
810 Expand GLR acronym in summary of Bison.
811 Based on discussion with Akim Demaille starting at
812 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00087.html>.
813 * doc/bison.texinfo (Introduction): Here.
814 * src/getargs.c (usage): Here.
815
816 2009-10-03 Alex Rozenman <rozenman@gmail.com>
817
818 Document named references.
819 * doc/bison.texinfo (Actions): Add new example and xref to
820 Using Named References node.
821 (Using Named References): New node.
822
823 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
824
825 cleanup.
826 * src/Sbitset.c (Sbitset__new_on_obstack): Use Sbitset instead
827 of char*.
828 (Sbitset__isEmpty): Use Sbitset instead of char*.
829 * src/Sbitset.h (Sbitset): Make it a pointer to unsigned char
830 instead of char. This helps to avoid casting errors.
831 (Sbitset__or): Use Sbitset instead of char*.
832
833 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
834
835 portability: don't assume 8-bit bytes.
836 That is, use CHAR_BIT and UCHAR_MAX instead of 8 and 0xff.
837 * src/Sbitset.h (Sbitset__nbytes): Here.
838 (Sbitset__byteAddress): Here.
839 (Sbitset__bit_mask): Here.
840 (Sbitset__last_byte_mask): Here.
841 (Sbitset__ones): Here.
842 (SBITSET__FOR_EACH): Here.
843
844 2009-10-11 Joel E. Denny <jdenny@clemson.edu>
845
846 portability: use va_start and va_end in the same function.
847 * src/complain.c (error_message): Move va_end from here...
848 (ERROR_MESSAGE): ... to here.
849
850 2009-10-08 Joel E. Denny <jdenny@clemson.edu>
851
852 * data/bison.m4: Update comments for rename to muscle-tab.h.
853
854 2009-10-07 Joel E. Denny <jdenny@clemson.edu>
855
856 Minor code cleanup.
857 * src/muscle-tab.c (MUSCLE_USER_NAME_CONVERT): Remove macro and
858 replace all uses with UNIQSTR_CONCAT.
859 * src/uniqstr.c (uniqstr_vsprintf): New function.
860 * src/uniqstr.h (uniqstr_vsprintf): Add prototype.
861 (UNIQSTR_CONCAT, UNIQSTR_GEN_FORMAT, UNIQSTR_GEN_FORMAT_): New
862 macros.
863
864 2009-10-06 Joel E. Denny <jdenny@clemson.edu>
865
866 * TODO (Complaint submessage indentation): New.
867
868 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
869
870 Minor code cleanup.
871 * src/parse-gram.y: Clean up sorting of declarations.
872 Use types to simplify %printer declarations where possible.
873 Provide %printer for BRACKETED_ID and symbol.prec.
874 * src/symtab.c: Whitespace change.
875
876 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
877
878 tests: skip tests of file names that platform does not support.
879 Reported by Michael Raskin at
880 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00001.html>.
881 * THANKS (Michael Raskin): Add.
882 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Fix. Cygwin used
883 to fail at least for file names containing ":" or "\".
884
885 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
886
887 yysyntax_error: avoid duplicate lookahead collection.
888 Except when memory reallocation is required, this change
889 eliminates the need to invoke yysyntax_error twice and thus to
890 repeat the collection of lookaheads. It also prepares for
891 future extensions that will make those repetitions more
892 expensive and that will require additional memory management in
893 yysyntax_error. Finally, it fixes an obscure bug already
894 exercised in the test suite.
895 * data/yacc.c (yysyntax_error): Add arguments for message
896 buffer variables stored in the parser. Instead of size, return
897 status similar to yyparse status but indicating success of
898 message creation. Other than the actual reallocation of the
899 message buffer, import and clean up memory management code
900 from...
901 (yyparse, yypush_parse): ... here.
902 * tests/regression.at (parse.error=verbose overflow): No longer
903 an expected failure.
904
905 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
906
907 yysyntax_error: test memory management more.
908 * tests/atlocal.in (NO_WERROR_CFLAGS): New cpp macro.
909 * tests/regression.at (parse.error=verbose and
910 YYSTACK_USE_ALLOCA): New test group.
911 (parse.error=verbose overflow): New test group that reveals an
912 obscure bug. Expected fail for now.
913
914 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
915
916 benchmarks: use %debug consistently among grammars.
917 * etc/bench.pl.in (generate_grammar_triangular): Do not activate
918 %debug by default. It can affect the timings even if yydebug=0.
919 (generate_grammar_calc): For consistency with other grammars,
920 use YYDEBUG environment variable to set yydebug.
921
922 2009-10-03 Joel E. Denny <jdenny@clemson.edu>
923
924 Remove dead code.
925 * src/symtab.c (symbol_pack): Here because every symbol's number
926 is always defined by this time.
927
928 2009-10-03 Alex Rozenman <rozenman@gmail.com>
929
930 Add additional space after periods in NEWS.
931 * NEWS (2.5): here.
932
933 2009-09-29 Joel E. Denny <jdenny@clemson.edu>
934
935 Use the correct conversion specifier for size_t.
936 Reported by Jim Meyering.
937 * src/Sbitset.h (SBITSET__INDEX__CONVERSION_SPEC): New, "zu"
938 because Sbitset__Index is size_t.
939 * src/Sbitset.c (Sbitset__fprint): Use it instead of %d.
940
941 2009-09-27 Joel E. Denny <jdenny@clemson.edu>
942
943 tests: don't abuse AT_BISON_CHECK.
944 * tests/regression.at (parse-gram.y: LALR = IELR): Move
945 additional shell commands outside of AT_BISON_CHECK.
946
947 2009-09-26 Joel E. Denny <jdenny@clemson.edu>
948
949 tests: check that parse-gram.y's IELR and LALR are identical.
950 * tests/atlocal.in (abs_top_srcdir): New shell variable.
951 * tests/regression.at (parse-gram.y: LALR = IELR): New test
952 group.
953
954 2009-09-19 Alex Rozenman <rozenman@gmail.com>
955
956 Keep sub-messages aligned. Fix strings for translation.
957 * src/location.h (location_print): Add return value.
958 * src/location.c (location_print): Return number of printed
959 characters.
960 * src/complain.h (complain_at_indent, warn_at_indent): Prototype
961 new functions.
962 * src/complain.cpp (indent_ptr): New static variable.
963 (error_message, complain_at_indent, warn_at_indent): Implement
964 the alignment mechanism.
965 * src/scan-code.l (parse_ref, show_sub_messages): Fix strings
966 for translations. Use new alignment mechanism.
967 * tests/named-ref.at: Adjust test-cases.
968 * NEWS (2.5): Add an announcement about named references.
969
970 2009-09-17 Akim Demaille <demaille@gostai.com>
971
972 doc: fixes.
973 * doc/bison.texinfo: here.
974 Reported by Alex Rozenman.
975
976 2009-09-16 Akim Demaille <demaille@gostai.com>
977
978 doc: lalr1.cc and variants.
979 * doc/bison.texinfo (Decl Summary): Document the "lex_symbol" and
980 "variant" %define variables.
981 (C++ Semantic Values): Split into...
982 (C++ Unions, C++ Variants): these.
983 The latter is new.
984 (C++ Parser Interface): Fix type names.
985 Document parser::syntax_error.
986 Document the fact that locations are not mandatory.
987 (C++ Scanner Interface): Split into...
988 (Split Symbols, Complete Symbols): these.
989 The later is new.
990 (Calc++ Parsing Driver): Use variants.
991 Add more comments.
992 Adjust style.
993 (Calc++ Parser): Declare all the tokens, no
994 longer accept raw characters.
995 Remove %union.
996 Adjust types and printers.
997 Remove destructors.
998 (Calc++ Scanner): Use make_<SYMBOL> functions.
999 Use strerror in error message.
1000
1001 2009-09-16 Akim Demaille <demaille@gostai.com>
1002
1003 doc: spell checking.
1004 * doc/bison.texinfo: here.
1005
1006 2009-09-16 Akim Demaille <demaille@gostai.com>
1007
1008 doc: comment changes.
1009 * doc/bison.texinfo: Comment changes.
1010
1011 2009-09-16 Akim Demaille <demaille@gostai.com>
1012
1013 lalr1.cc: factor the yytranslate_ invocation in make_SYMBOLS.
1014 * data/c++.m4, data/lalr1.cc (parser::symbol_type): Change the
1015 constructor to take a token_type instead of the (internal) symbol
1016 number.
1017 Call yytranslate_.
1018 * data/variant.hh (b4_symbol_constructor_define_): Therefore,
1019 don't call yytranslate_ here.
1020
1021 2009-09-16 Akim Demaille <demaille@gostai.com>
1022
1023 TODO: statistics.
1024 * TODO (Figures): New.
1025
1026 2009-09-13 Joel E. Denny <jdenny@clemson.edu>
1027
1028 tests: clean up push.at test group titles.
1029 * tests/push.at: Remove "Push Parsing: " from test group titles
1030 because these are already under the banner "Push Parsing Tests".
1031
1032 2009-09-12 Alex Rozenman <rozenman@gmail.com>
1033
1034 Provide an additional sub-message for clarity.
1035 Add "symbol not found in production" error message when
1036 an "invalid reference" is detected in named references
1037 resolution.
1038 * src/scan-code.l: Update "invalid reference" case.
1039 * tests/named-ref.at: Adjust test-cases.
1040
1041 2009-09-10 Joel E. Denny <jdenny@clemson.edu>
1042
1043 Clean up yacc.c a little.
1044 * data/yacc.c: Clean up M4 for readability, and make output
1045 whitespace more consistent. For the main parse function
1046 comment, instead of saying "yyparse or yypush_parse", say either
1047 "yyparse" or "yypush_parse" depending on which it actually is.
1048
1049 2009-09-10 Joel E. Denny <jdenny@clemson.edu>
1050
1051 Fix --enable-gcc-warnings.
1052 * src/parse-gram.y (%printer <param>): Handle param_none.
1053
1054 2009-09-09 Akim Demaille <demaille@gostai.com>
1055
1056 lalr1.cc: syntax_error as exceptions.
1057 It is common to use sort of factories in the user actions. These
1058 factories may check some "syntactic" constraints that are not
1059 enforced by the grammar itself. This is possible using YYERROR
1060 within the action itself. Provide the user with a means to throw
1061 a syntax_error exception.
1062
1063 * data/c++.m4 (b4_public_types_declare, b4_public_types_define):
1064 Declare and define yy::parser::syntax_error.
1065 * data/lalr1.cc: Include stdexcept.
1066 (yy::parser::parse): Wrap the user action within a try/catch.
1067 * data/glr.cc: Include stdexcept.
1068
1069 2009-09-09 Akim Demaille <demaille@gostai.com>
1070
1071 lalr1.cc: add missing "inline".
1072 * data/c++.m4 (b4_public_types_define): Add missing inline to
1073 implementations provided in headers.
1074
1075 2009-09-09 Akim Demaille <demaille@gostai.com>
1076
1077 %param: documentation.
1078 * NEWS (2.6): Document %param, %lex-param, and %parse-param
1079 changes.
1080 * doc/bison.texinfo: Document that %lex-param and %parse-param
1081 are n-ary.
1082 Changes some examples to demonstrate it.
1083 (Calc++ Parser): Use %param.
1084
1085 2009-09-09 Akim Demaille <demaille@gostai.com>
1086
1087 Regen.
1088
1089 2009-09-09 Akim Demaille <demaille@gostai.com>
1090
1091 style changes.
1092 * src/parse-gram.y (add_param): Scope changes.
1093
1094 2009-09-09 Akim Demaille <demaille@gostai.com>
1095
1096 %parse: support several arguments.
1097 * src/parse-gram.y (current_param): New.
1098 (param_type): Add param_none.
1099 (params): New nonterminal.
1100 Use it.
1101
1102 2009-09-09 Akim Demaille <demaille@gostai.com>
1103
1104 Regen.
1105
1106 2009-09-09 Akim Demaille <demaille@gostai.com>
1107
1108 %param.
1109 Provide a means to factor lex-param and parse-param common
1110 declarations.
1111
1112 * src/parse-gram.y (param_type): New.
1113 Define a %printer for it.
1114 (add_param): Use it.
1115 (%parse-param, %lex-param): Merge into...
1116 (%parse): this new token.
1117 Adjust the grammar to use it.
1118 * src/scan-gram.l (RETURN_VALUE): New.
1119 (RETURN_PERCENT_FLAG): Use it.
1120 (RETURN_PERCENT_PARAM): New.
1121 Use it to support %parse-param, %lex-param and %param.
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-04 Akim Demaille <demaille@gostai.com>
1141
1142 Adjust synclines in src/parse-gram.[ch].
1143 * tests/bison.in: Do some magic (including working around issues
1144 with ylwrap) when this wrapper is used to compile
1145 src/parse-gram.y.
1146
1147 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
1148
1149 Complain about unused %define variables and %code qualifiers.
1150 * NEWS (2.5): Document.
1151 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
1152 * doc/bison.texinfo (Decl Summary): Document complaint, and
1153 improve %define documentation a little otherwise.
1154 * tests/input.at (Reject unused %code qualifiers): Update.
1155 (%define errors): Update.
1156 (%define, --define, --force-define): Update.
1157 (%define backward compatibility): Update.
1158 (Unused %define api.pure): Update.
1159 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
1160
1161 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
1162
1163 Don't suppress warnings about unused parse.error.
1164 * data/bison.m4 (b4_error_verbose_flag): Don't examine value of
1165 %define variable parse.error unless b4_error_verbose_flag is
1166 actually expanded in a skeleton.
1167
1168 2009-09-03 Akim Demaille <demaille@gostai.com>
1169
1170 * NEWS (2.4.2): Add "Internationalization" item.
1171
1172 2009-09-03 Akim Demaille <demaille@gostai.com>
1173
1174 bootstrap: fix/improve find_tool.
1175 * bootstrap (find_tool): Improve error messages.
1176 Fix typo about find_tool_names.
1177
1178 2009-08-29 Joel E. Denny <jdenny@clemson.edu>
1179
1180 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
1181 See
1182 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
1183 * src/scan-code.h (code_props_rule_action_init): Rename
1184 named_ref arg to name so it doesn't shadow named_ref type. This
1185 makes it consistent with the function definition in scan-code.l
1186 anyway.
1187
1188 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
1189
1190 %define: accept unquoted values.
1191 * NEWS (2.5): Group all %define changes together, and document
1192 this one. Remove quotes in IELR and canonical LR entry.
1193 * doc/bison.texinfo: Remove quotes in most examples throughout.
1194 (Decl Summary): Update %define documentation.
1195 (Table of Symbols): Likewise.
1196 * src/ielr.c (LrType): Update documentation.
1197 * src/parse-gram.y (content.opt): Add production for ID.
1198 * tests/actions.at: Remove quotes in most tests.
1199 * tests/calc.at: Likewise.
1200 * tests/existing.at: Likewise.
1201 * tests/input.at: Likewise.
1202 * tests/local.at: Likewise.
1203 * tests/push.at: Likewise.
1204 * tests/reduce.at: Likewise.
1205 * tests/torture.at: Likewise.
1206
1207 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
1208
1209 %define lr.type: make values lowercase IDs.
1210 That is, "LALR" => "lalr", "IELR" => "ielr", and
1211 "canonical LR" => "canonical-lr".
1212 * NEWS (2.5): Update documentation.
1213 * doc/bison.texinfo (Decl Summary): Likewise.
1214 * src/ielr.c (ielr): Use new values.
1215 * src/ielr.h (ielr): Update documentation.
1216 * src/reader.c (prepare_percent_define_front_end_variables): Use
1217 and validate new values.
1218 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
1219 grammars.
1220 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
1221
1222 2009-08-27 Eric Blake <ebb9@byu.net>
1223
1224 scan-gram: avoid portability trap with ctype usage.
1225 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
1226 Avoid compiler warning.
1227
1228 2009-08-27 Joel E. Denny <jdenny@clemson.edu>
1229
1230 tests: use perl for printing special sequences to files.
1231 And skip tests if perl is not available. This is better than
1232 playing tricks with shell portability. Suggested by Akim
1233 Demaille.
1234 * tests/input.at (Bad character literals): Use it here for
1235 omitting final newlines.
1236 (Bad escapes in literals): Use it here for special characters.
1237
1238 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
1239
1240 tests: show a use of %define lr.default-reductions "consistent"
1241 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
1242 prevents the omission of expected tokens for %error-verbose.
1243
1244 2009-08-26 Akim Demaille <demaille@gostai.com>
1245
1246 tests: portability fix.
1247 * tests/input.at (Bad escapes in literals): Don't expect "echo
1248 '\0'" to output \ then 0.
1249
1250 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
1251
1252 Actually handle the yytable zero value correctly this time.
1253 * data/bison.m4 (b4_integral_parser_tables_map): Don't mention
1254 zero values in the YYTABLE comments.
1255 * data/glr.c (yytable_value_is_error): Don't check for zero
1256 value.
1257 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
1258 * data/yacc.c (yytable_value_is_error): Likewise.
1259 * data/lalr1.java (yy_table_value_is_error_): Likewise.
1260 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
1261 * src/tables.h: In header comments, explain why it's useless to
1262 check for a zero value in yytable.
1263
1264 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1265
1266 More fixes related to last two patches.
1267 * data/bison.m4 (b4_integral_parser_tables_map): Fix YYTABLE
1268 comments: zero indicates syntax error not default action.
1269 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
1270 defined.
1271 * data/glr.c (yyis_pact_ninf): Rename to...
1272 (yypact_value_is_default): ... this.
1273 (yyisDefaultedState): Update for rename.
1274 (yyis_table_ninf): Rename to...
1275 (yytable_value_is_error): ... this, and check for value zero
1276 besides just YYTABLE_NINF.
1277 (yygetLRActions): Check for default value from yypact. It
1278 appears that this check is always performed before this function
1279 is invoked, and so adding the check here is probably redundant.
1280 However, the code may evolve after this subtlety is forgotten.
1281 Also, update for rename to yytable_value_is_error. Because that
1282 macro now checks for zero, a different but equivalent branch of
1283 the if-then-else here is evaluated.
1284 (yyreportSyntaxError): Update for rename to
1285 yytable_value_is_error. The zero condition was mishandled
1286 before.
1287 (yyrecoverSyntaxError): Update for renames. No behavioral
1288 changes.
1289 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
1290 New function.
1291 (yy_table_value_is_error_): New function.
1292 (parse): Use new functions where possible. No behavioral
1293 changes.
1294 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
1295 The zero condition was mishandled before.
1296 * data/yacc.c (yyis_pact_ninf): Rename to...
1297 (yypact_value_is_default): ... this.
1298 (yyis_table_ninf): Rename to...
1299 (yytable_value_is_error): ... this, and check for value zero
1300 besides just YYTABLE_NINF.
1301 (yysyntax_error): Update for rename to yytable_value_is_error.
1302 The zero condition was mishandled before.
1303 (yyparse): Update for renames. No behavioral changes.
1304 * src/tables.h: Improve comments about yypact, yytable, etc.
1305 more. Most importantly, say yytable value of zero means syntax
1306 error not default action.
1307
1308 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1309
1310 Fix %error-verbose for conflicts resolved by %nonassoc.
1311 * NEWS (2.5): Document.
1312 * data/glr.c (yyreportSyntaxError): Fix this by checking
1313 yyis_table_ninf.
1314 * data/yacc.c (yysyntax_error): Likewise.
1315 * data/lalr1.cc (yysyntax_error_): Fix this by checking
1316 yytable_ninf_.
1317 * data/lalr1.java (yysyntax_error): Likewise.
1318 * tests/conflicts.at (%nonassoc and eof): Update expected output
1319 and remove FIXME.
1320
1321 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1322
1323 Some code and documentation improvements.
1324 * data/c.m4 (b4_table_value_equals): New macro to capture
1325 some repeated code.
1326 * data/glr.c (yyis_pact_ninf): Use it here.
1327 (yyis_table_ninf): Likewise.
1328 (yyreportSyntaxError): Improve internal comments.
1329 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
1330 Use it everywhere possible.
1331 (yyis_table_ninf): Likewise.
1332 (yysyntax_error): Improve internal comments.
1333 * data/lalr1.cc (yysyntax_error_): Likewise.
1334 * data/lalr1.java (yysyntax_error): Likewise.
1335 * src/tables.h: Improve comments about yypact, yytable, etc.
1336
1337 2009-08-21 Joel E. Denny <jdenny@clemson.edu>
1338
1339 Use locale when quoting.
1340 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
1341 quote rather than implementing quoting here.
1342
1343 2009-08-20 Eric Blake <ebb9@byu.net>
1344
1345 Make previous patch more robust.
1346 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
1347 argmatch.h.
1348 (output_skeleton): Use it.
1349 Suggested by Akim Demaille.
1350
1351 Import latest m4/m4.m4.
1352 * submodules/autoconf: Update to autoconf 2.64.
1353 * configure.ac (M4_GNU_OPTION): New define.
1354 * src/output.c (output_skeleton): Use it to resolve FIXME.
1355 * NEWS: Mention this.
1356
1357 2009-08-19 Joel E. Denny <jdenny@clemson.edu>
1358
1359 Fix complaints about escape sequences.
1360 Discussed starting at
1361 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
1362 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
1363 For a \0 and similar escape sequences meaning the null
1364 character, report an invalid escape sequence instead of an
1365 invalid null character because the latter does not actually
1366 appear in the user's input.
1367 In all escape sequence complaints, don't escape the initial
1368 backslash, and don't quote when the sequence appears at the end
1369 of the complaint line unless there's whitespace that quotearg
1370 won't escape.
1371 Consistently say "invalid" not "unrecognized".
1372 Consistently prefer "empty character literal" over "extra
1373 characters in character literal" warning for invalid escape
1374 sequences; that is, consistently discard those sequences.
1375 * tests/input.at (Bad escapes in literals): New.
1376
1377 2009-08-19 Akim Demaille <demaille@gostai.com>
1378
1379 doc: fixes.
1380 * doc/bison.texinfo: Fix minor Texinfo errors.
1381
1382 2009-08-19 Akim Demaille <demaille@gostai.com>
1383
1384 tests: distcc compliance.
1385 * tests/synclines.at (AT_SYNCLINES_COMPILE): Discard distcc's
1386 error messages from the output.
1387
1388 2009-08-19 Akim Demaille <demaille@gostai.com>
1389
1390 variables: simplify the upgrade of namespace into api.namespace.
1391
1392 This patch simplifies "variables: rename namespace as
1393 api.namespace", commit 67501061076ba46355cfd9f9361c7eed861b389c.
1394 Suggested by Joel E. Denny in
1395 http://lists.gnu.org/archive/html/bison-patches/2009-07/msg00006.html
1396
1397 * src/muscle-tab.c (muscle_percent_variable_update): New.
1398 (muscle_percent_define_insert): Use it in replacement of the
1399 previous tr invocation.
1400 Remove variable_tr, no longer needed.
1401 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
1402 Remove.
1403 * data/c++.m4: No longer handle namespace -> api.namespace.
1404 * tests/input.at (%define backward compatibility): Check that
1405 namespace is treated as api.namespace.
1406
1407 2009-08-19 Akim Demaille <demaille@gostai.com>
1408
1409 doc: %initial-action to initialize yylloc.
1410 Reported by Bill Allombert.
1411 * doc/bison.texinfo: Set fill-column to 76.
1412 (Location Type): Document the use of %initial-action to initialize
1413 yylloc.
1414
1415 2009-08-19 Akim Demaille <demaille@gostai.com>
1416
1417 lalr1.cc: use state_type.
1418 * data/lalr1.cc (yysyntax_error_): Use state_type.
1419 Move argument names into yy*.
1420
1421 2009-08-19 Akim Demaille <demaille@gostai.com>
1422
1423 lalr1.cc: get rid of yyparse's yystate.
1424 yystate and yystack_[0].state are equal, keep only the latter.
1425 The former was also used as a temporary variable to compute the
1426 post-reduction state. Move this computation into an auxiliary
1427 function.
1428
1429 * data/glr.c (yyLRgotoState): Fuse variable definition and first
1430 assignment.
1431 * data/lalr1.cc (yy_lr_goto_state_): New.
1432 (yyparse): Use it.
1433 Replace remaining uses of yystate by yystate_[0].state.
1434 Remove the former.
1435
1436 2009-08-19 Akim Demaille <demaille@gostai.com>
1437
1438 lalr1.cc: destroy $$ when YYERROR is called.
1439 * data/lalr1.cc (yyreduce): Compute the resulting state before
1440 running the user action so that yylhs is a valid symbol.
1441 (yyerrorlab): Since yylhs is complete (it knows its type), we can
1442 simply call yy_destroy_ to destroy $$ on YYERROR invocations.
1443 * tests/c++.at (AT_CHECK_VARIANTS): Test YYERROR with variants.
1444
1445 2009-08-18 Joel E. Denny <jdenny@clemson.edu>
1446
1447 maint: update for gnulib's recent update-copyright changes
1448 * gnulib: Update.
1449 * .x-update-copyright (COPYING): Add as it's no longer implied
1450 when .x-update-copyright is present.
1451 * cfg.mk (update-copyright-local): Remove, now ignored.
1452 (update-copyright): Declare update-b4-copyright as a dependency.
1453
1454 2009-08-17 Akim Demaille <demaille@gostai.com>
1455
1456 build: require gettext 0.17.
1457
1458 Suggested by Bruno Haible.
1459 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
1460 * configure.ac: require gettext 0.17 to ensure compatibility with
1461 gnulib.
1462
1463 2009-08-17 Akim Demaille <demaille@gostai.com>
1464
1465 build: lower gettext requirements.
1466
1467 Bison was uselessly requiring the formatstring macros from
1468 gettext, which resulted in mo files not being installed on systems
1469 that perfectly supported Bison mo files. Lower the requirement.
1470 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
1471
1472 * configure.ac: Require need-ngettext instead of
1473 need-formatstring-macros.
1474 Reported by Martin Jabocs.
1475 Suggested by Bruno Haible.
1476 * INSTALL: Restructure.
1477 (Internationalization): New.
1478
1479 2009-08-14 Joel E. Denny <jdenny@clemson.edu>
1480
1481 maint: fix use of copyright year intervals.
1482 * gnulib: Update.
1483 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
1484 as now recommended in gnulib/NEWS.
1485 * build-aux/update-b4-copyright: Fix.
1486 * cfg.mk (update-copyright-env): Configure update-copyright.
1487
1488 2009-08-13 Joel E. Denny <jdenny@clemson.edu>
1489
1490 Make it easier to write deterministic tests.
1491 Continues Akim's work from his 2009-06-10 commits.
1492 * src/reader.c (check_and_convert_grammar): Don't add any
1493 symbols after the first symbols_do invocation.
1494 * src/symtab.c (symbols_sorted): New static global.
1495 (user_token_number_redeclaration): Update comments.
1496 (symbol_from_uniqstr): If a new symbol is being created, assert
1497 that symbols_sorted hasn't been allocated yet.
1498 (symbols_free): Free symbols_sorted.
1499 (symbols_cmp, symbols_cmp_qsort): New functions.
1500 (symbols_do): Sort symbol_table into symbols_sorted on first
1501 invocation.
1502 * tests/input.at (Numbered tokens): Recombine tests now that the
1503 output should be deterministic across multiple numbers.
1504
1505 2009-08-12 Akim Demaille <demaille@gostai.com>
1506
1507 tests: GCC 4.5 compliance.
1508 * tests/synclines.at (AT_SYNCLINES_COMPILE): Adjust to GCC 4.5's
1509 messages about #error.
1510
1511 2009-08-12 Akim Demaille <demaille@gostai.com>
1512
1513 build: fix the generation of the documentation.
1514 Some of our targets use "bison --help", but they can't depend on
1515 "bison" itself (to avoid additional requirements on the user), so
1516 they used to call "make src/bison" in the commands. Then
1517 concurrent builds may fail: one make might be aiming one of its
1518 jobs at compiling src/bison, and another job at generating the man
1519 page. If the latter is faster than the former, then we have two
1520 makes that concurrently try to compile src/bison.
1521
1522 This might also be a more convincing explanation for the failure
1523 described in the patch "build: fix paths".
1524
1525 * Makefile.am (SUFFIXES): Initialize.
1526 * build-aux/move-if-change: New, symlink to gnulib's.
1527 * build-aux/local.mk: Ship it.
1528 * doc/common.x: Remove, merged into...
1529 * doc/bison.x: here.
1530 * doc/local.mk (doc/bison.help): New.
1531 ($(CROSS_OPTIONS_TEXI)): Depend on it.
1532 Use src/bison.
1533 (.x.1): Replace with...
1534 (doc/bison.1): this explicit, simpler, target.
1535 (common_dep): Remove, inlined where appropriate.
1536 (SUFFIXES, PREPATH): Remove, unused.
1537
1538 2009-08-12 Akim Demaille <demaille@gostai.com>
1539
1540 gnulib: improve prefixing.
1541 * configure.ac (gl_PREFIXED_LIBOBJS): Don't rename it, rather,
1542 change the value of...
1543 (gl_LIBOBJS): this.
1544 Adjust more variables.
1545 * etc/prefix-gnulib-mk (prefix_assignment): Don't rename
1546 gl_LIBOBJS.
1547 (prefix): Also transform rules whose targets have slashes.
1548 Use $prefix liberally.
1549 Map @MKDIR_P@ to $(MKDIR_P).
1550 Prefix directories that are mkdir'd.
1551
1552 2009-08-12 Akim Demaille <demaille@gostai.com>
1553
1554 build: fix paths.
1555 When using $(top_builddir) inconsistently, Make (including GNU
1556 Make) is sometimes confused. As a result it may want to build
1557 lib/libbison.la and $(top_builddir)/lib/libbison.la (the same
1558 file, different names) concurrently, which, amusingly enough,
1559 might end with:
1560
1561 ranlib lib/libbison.a
1562 ranlib lib/libbison.a
1563 make[2]: *** [lib/libbison.a] Segmentation fault
1564
1565 on OS X.
1566
1567 * doc/local.mk, src/local.mk: Do not use $(top_builddir) when not
1568 needed.
1569
1570 2009-08-12 Akim Demaille <demaille@gostai.com>
1571
1572 distcheck: fix.
1573
1574 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
1575
1576 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
1577
1578 * tests/local.mk (TESTSUITE_AT): Add named-refs.at.
1579
1580 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
1581
1582 Miscellaneous code readability improvements.
1583
1584 * src/reader.c (reader): Move %define front-end variable
1585 defaults and checking into...
1586 (prepare_percent_define_front_end_variables): ... this new
1587 function.
1588
1589 * src/scan-gram.l (INITIAL): For consistency with string
1590 literals, don't store open quote on character literal. It's
1591 discarded before returning anyway.
1592 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
1593 Make length test more readable, and make the character stored
1594 for an empty literal more obvious while consistent with the
1595 previous behavior.
1596
1597 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
1598 USER_NUMBER_HAS_STRING_ALIAS throughout.
1599 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
1600 that is repeated in symtab.h. Improve argument names to make it
1601 clear which side of the symbol-string alias pair is which.
1602 (symbol_check_alias_consistency): Improve local variable names
1603 for the same purpose.
1604 * src/symtab.h (struct symbol): Make comments about aliases
1605 clearer.
1606 (symbol_make_alias): Improve comments and argument name.
1607 * src/output.c (token_definitions_output): Update for rename to
1608 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
1609
1610 2009-08-08 Alex Rozenman <rozenman@gmail.com>
1611
1612 Convert "misleading reference" messages to warnings.
1613 * src/scan-code.l: New function 'show_sub_messages', more
1614 factoring.
1615 * tests/named-ref.at: Adjust tests.
1616
1617 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
1618
1619 maint: run "make update-copyright"
1620
1621 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
1622
1623 maint: make update-b4-copyright easier to use
1624 * build-aux/update-b4-copyright: In warnings, report line
1625 numbers rather than character positions.
1626 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
1627 that update-copyright runs it.
1628 * gnulib: Update.
1629
1630 2009-08-05 Joel E. Denny <jdenny@clemson.edu>
1631
1632 maint: clean up update-b4-copyright code
1633 * build-aux/update-b4-copyright: Do not accept 2-digit
1634 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
1635 Don't accept a `[' in a b4_copyright argument.
1636 Format code more consistently.
1637 Don't assume b4*copyright never occurs.
1638
1639 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1640
1641 maint: automate b4_copyright updates.
1642 * Makefile.am (update-b4-copyright): New target rule.
1643 * build-aux/local.mk (EXTRA_DIST): Add update-b4-copyright.
1644 * build-aux/update-b4-copyright: New.
1645 * data/yacc.c: Remove stray characters around b4_copyright
1646 invocations.
1647
1648 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1649
1650 maint: automate annual package-wide copyright-year update.
1651 * .x-update-copyright: New.
1652 * Makefile.am (EXTRA_DIST): Remove maint.mk.
1653 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
1654 update-copyright. Remove gnumakefile, which is implied by
1655 maintainer-makefile.
1656 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
1657 * gnulib: Update.
1658 * maint.mk: Remove, now copied from gnulib.
1659 * examples/extexi: Add missing "(C)" in copyright statement so
1660 update-copyright can recognize it.
1661 * src/LR0.h: Likewise.
1662 * src/print.h: Likewise.
1663 * src/print_graph.h: Likewise.
1664 * src/gram.c: Add missing comma in copyright statement.
1665 * src/gram.h: Likewise.
1666
1667 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1668
1669 Fix "make distcheck".
1670 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
1671 of just calc.stamp.
1672
1673 2009-08-01 Joel E. Denny <jdenny@clemson.edu>
1674
1675 Pacify "gcc -Wunused" for the input function from Flex.
1676 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
1677 and later.
1678 * src/scan-code.l: Add "%option noinput", which I cannot find in
1679 the Flex manual, but which Flex has supported since at least as
1680 far back as 2.5.4. However, if any of our developers still use
1681 Flex 2.5.4, they'll need to stop configuring with
1682 --enable-gcc-warnings because "%option noinput" didn't work
1683 correctly until Flex 2.5.6.
1684 * src/scan-gram.l: Likewise.
1685 * src/scan-skel.l: Likewise.
1686
1687 2009-07-31 Alex Rozenman <rozenman@gmail.com>
1688
1689 Fix --enable-gcc-warnings problems.
1690 * src/reader.c: Adjust variable names.
1691 * src/scan-code.l: Fix prototypes and adjust names.
1692 * src/named-ref.c: Remove redundant "if".
1693
1694 2009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
1695
1696 Fix a --enable-gcc-warnings problem.
1697 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
1698 variable.
1699
1700 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
1701
1702 Warn about character literals not of length one.
1703 * NEWS (2.5): Document.
1704 * src/scan-gram.l (INITIAL): Remove comment that we don't check
1705 the length.
1706 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
1707 * tests/input.at (Bad character literals): New test group.
1708
1709 2009-07-24 Alex Rozenman <rozenman@gmail.com>
1710
1711 Fix some memory leaks.
1712 * src/named-ref.c: Add a pointer check (named_ref_free).
1713 * src/scan-code.l: New function (variant_table_free). Called in
1714 code_scanner_free.
1715 * src/symlist.c: Call to named_ref_free (symbol_list_free).
1716
1717 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
1718
1719 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
1720
1721 2009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
1722
1723 Some M4 cleanup in the testsuite.
1724 Suggested by Eric Blake at
1725 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
1726 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
1727 complicate the code by distinguishing between a missing value
1728 and an empty string value for an optional argument. This fix is
1729 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
1730 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
1731 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
1732 arguments are not needed because of the following changes.
1733 Fix stale comments.
1734 Bison developers should use GNU M4 and should not use
1735 POSIXLY_CORRECT when building the test suite, so do not
1736 complicate the code by avoiding $10 and above.
1737 Do not quote an empty string value for an optional argument, and
1738 do not distinguish between a missing value and an empty string
1739 value.
1740
1741 2009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
1742
1743 Revert unnecessary column realignment in --help output.
1744 Reported by Akim Demaille at
1745 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
1746 * src/getargs.c (usage): Here.
1747
1748 2009-07-04 Alex Rozenman <rozenman@gmail.com>
1749
1750 Alphabetical order in src/local.mk.
1751 * src/local.mk: Adjust.
1752
1753 2009-07-04 Alex Rozenman <rozenman@gmail.com>
1754
1755 Style changes and factoring.
1756 * src/named-ref.h: Add comments.
1757 * src/parse-gram.y: Readability and style changes.
1758 * src/reader.c: Factoring: assign_named_ref function.
1759 * src/scan-code.l: Factoring and style changes. Rename
1760 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
1761 Use "unsigned" type for variant index. Improve readablity.
1762 * src/scan-gram.l: Change error messages and add comments.
1763 * src/symlist.h: symbol_list_null: New function decl.
1764 * src/symlist.c: symbol_list_null: Implement here.
1765 * tests/named-refs.at: Adjust for new error messages.
1766
1767 2009-06-29 Eric Blake <ebb9@byu.net>
1768
1769 scan-code: avoid compiler warnings
1770 * src/scan-code.l (parse_named_ref): Use correct specifiers.
1771
1772 2009-06-29 Akim Demaille <demaille@gostai.com>
1773
1774 build: avoid concurrent extraction of calc++.
1775 * examples/calc++/Makefile.am (calc.stamp): New.
1776 Depend on it to create the sources of calc++ so that concurrent
1777 builds don't launch several "extexi" in parallel.
1778 Not only this is inefficient, this also builds incorrect sources
1779 with several extractions mixed together.
1780
1781 2009-06-29 Akim Demaille <demaille@gostai.com>
1782
1783 parse.error: fix.
1784 * data/bison.m4: Move code related to specific variables after the
1785 definition of the variable-maintaining macros so that we don't
1786 "invoke" b4_percent_define_check_values before it is defined.
1787
1788 2009-06-29 Akim Demaille <demaille@gostai.com>
1789
1790 variables: parse.error
1791
1792 Implement, document, and test the replacement of %error-verbose
1793 by %define parse.error "verbose".
1794 * data/bison.m4 (b4_error_verbose_if): Reimplement to track the
1795 values of the parse.error variable.
1796 Make "simple" its default value.
1797 Check the valid values.
1798 * src/parse-gram.y: Use %define parse.error.
1799 (PERCENT_ERROR_VERBOSE): New token.
1800 Support it.
1801 * src/scan-gram.l: Support %error-verbose.
1802
1803 * doc/bison.texinfo (Decl Summary): Replace the documentation of
1804 %define error-verbose by that of %define parse.error.
1805 * NEWS: Document it.
1806
1807 * tests/actions.at, tests/calc.at: Use parse.error instead of
1808 %error-verbose.
1809
1810 2009-06-27 Alex Rozenman <rozenman@gmail.com>
1811
1812 Implement support for named symbol references.
1813 * src/parse-gram.y: Add new syntax (named_ref.opt).
1814 * src/reader.c: Store named refs in symbol lists.
1815 * src/reader.h: New argument for symbol_append and
1816 action_append functions.
1817 * src/scan-code.h: Add new field (named_ref) into
1818 code_props data structure. Keeps named ref of midrule
1819 actions.
1820 * src/scan-code.l: Support for named refs in semantic
1821 action code. New function 'parse_named_ref'.
1822 * src/scan-gram.l: Support bracketed id.
1823 * src/symlist.c: Store named refs in symbol lists.
1824 * src/symlist.h: New field in symbol list: named_ref.
1825 * src/named-ref.h: New file, a struct for named_ref.
1826 * src/named-ref.cp: New file, named_ref_new function.
1827 * src/local.mk: Add two new files.
1828 * tests/testsuite.at: Include new test group:
1829 * tests/named-refs.at: this new file.
1830
1831 2009-06-25 Akim Demaille <demaille@gostai.com>
1832
1833 hash: check insertion for memory exhaustion.
1834 * src/uniqstr.c (uniqstr_new): New.
1835
1836 2009-06-24 Akim Demaille <demaille@gostai.com>
1837
1838 variables: rename namespace as api.namespace.
1839 Discussed in
1840 http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00033.html
1841
1842 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
1843 New.
1844 (b4_percent_define_use): New.
1845 Use it where applicable.
1846 * data/c++.m4: Replace uses of the variable "namespace" by
1847 "api.namespace".
1848 Default the latter to the former.
1849 * doc/bison.texinfo (Decl Summary): Document "namespace" as
1850 obsolete.
1851 Document api.namespace.
1852 Use @samp to document %define uses, keep @code for identifiers.
1853 * NEWS: Likewise.
1854 * tests/c++.at, tests/input.at: Test api.namespace instead of
1855 namespace. (The tests passed with namespace.)
1856
1857 2009-06-11 Akim Demaille <demaille@gostai.com>
1858
1859 style changes.
1860 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
1861 * src/print-xml.c: Style changes.
1862 * tests/conflicts.at: Comment changes.
1863
1864 2009-06-11 Akim Demaille <demaille@gostai.com>
1865
1866 xml: beware of user strings used to give a %prec to rules.
1867 * tests/conflicts.at (%prec with user strings): New.
1868 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
1869 XML output.
1870
1871 2009-06-11 Akim Demaille <demaille@gostai.com>
1872
1873 hash: check insertion for memory exhaustion.
1874 * src/muscle-tab.c (muscle_insert, muscle_grow)
1875 * src/state.c (state_hash_insert): Check the return value of
1876 hash_insert.
1877
1878 2009-06-11 Akim Demaille <demaille@gostai.com>
1879
1880 tests: honor TESTSUITEFLAGS in every check target.
1881 * tests/local.mk (RUN_TESTSUITE): New.
1882 (check-local, installcheck-local, maintainer-check-g++)
1883 (maintainer-check-posix, maintainer-check-valgrind): Use it.
1884
1885 2009-06-10 Akim Demaille <demaille@gostai.com>
1886
1887 deterministic test suite.
1888 Some consistency checks on symbols are performed after all the
1889 symbols were read, by an iteration over the symbol table. This
1890 traversal is nondeterministic, which can be a problem for test
1891 cases.
1892 Avoid this.
1893 Addresses another form of nondeterminism reported by Joel E. Denny.
1894 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
1895
1896 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
1897 test in two.
1898 Use different file names for the three tests to make the
1899 maintenance easier.
1900
1901 2009-06-10 Akim Demaille <demaille@gostai.com>
1902
1903 gnulib: update.
1904 * gnulib: Update to latest.
1905 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
1906 * m4/.gitignore: Regen.
1907 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
1908 Call xalloc_die on hash_insert failures.
1909 Requested by the new __warn_unused_result__ attribute of
1910 hash_insert.
1911
1912 2009-06-10 Akim Demaille <demaille@gostai.com>
1913
1914 deterministic user-token-number redeclaration errors.
1915 Address nondeterminism reported by Joel E. Denny.
1916 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
1917
1918 * src/uniqstr.h: Comment changes.
1919 * src/location.h (boundary_cmp, location_cmp): New.
1920 * src/symtab.c (user_token_number_redeclaration): New.
1921 (symbol_translation): Use it.
1922 * tests/input.at (Numbered tokens): Adjust the expected output.
1923
1924 2009-05-25 Akim Demaille <demaille@gostai.com>
1925
1926 build: avoid ignored errors.
1927 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Don't generate ignored
1928 errors, they pollute the output.
1929
1930 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1931
1932 Convert multiple variable definition warnings to complaints.
1933 * NEWS (2.5): Add a new entry for that change.
1934 * doc/bison.texinfo (Decl Summary): Update %define entry.
1935 (Bison Options): Update -D/--define/-F/--force-define entry.
1936 * src/muscle-tab.c (muscle_percent_define_insert): Implement.
1937 * src/muscle-tab.h (muscle_percent_define_insert): Update
1938 comments.
1939 * tests/input.at (`%define errors'): Update.
1940 (`%define, --define, --force-define'): Update.
1941
1942 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1943
1944 -F/--force-define and relative %define/-D/--define priorities.
1945 * NEWS (2.5): Add documentation to -D/--define entry.
1946 * build-aux/cross-options.pl: Hard-code association of
1947 --force-define with %define.
1948 * doc/bison.texinfo (Decl Summary): In %define entry,
1949 cross-reference command-line options.
1950 (Bison Options): Add documentation to -D/--define entry.
1951 (Option Cross Key): Widen column for --force-define row.
1952 * src/getargs.c (usage): Document -F/--force-define. Realign
1953 options in output.
1954 (short_options, long_options, getargs): Parse -F/--force-define,
1955 and update muscle_percent_define_insert invocations.
1956 * src/muscle-tab.h (muscle_percent_define_how): New enum type.
1957 (muscle_percent_define_insert): Add argument with that type.
1958 * src/muscle-tab.c (muscle_percent_define_insert): Implement
1959 -F/--force-define behavior and priorities.
1960 (muscle_percent_define_ensure): Update
1961 muscle_percent_define_insert invocation.
1962 * src/parse-gram.y (prologue_declaration): Update
1963 muscle_percent_define_insert invocations.
1964 * tests/input.at (`%define, --define'): Rename to...
1965 (`%define, --define, --force-define'): ... this and extend.
1966
1967 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1968
1969 Update some comments to make sense for -D.
1970 * data/bison.m4 (b4_check_user_names): In header comments, say
1971 "user occurrence" instead of "grammar occurrence".
1972 * src/muscle-tab.h (muscle_percent_define_insert): Likewise.
1973 (muscle_percent_code_grow): Likewise just for consistency.
1974
1975 2009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
1976
1977 * data/c++.m4 (b4_namespace_close): Simplify slightly.
1978
1979 2009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
1980
1981 Handle a trailing `:' in a user-supplied C++ namespace better.
1982 * data/c++.m4 (b4_namespace_close): Don't let it be printed
1983 among the closing braces here. This fix might make the
1984 generated code easier to debug, but otherwise it should be
1985 insignificant because a trailing `:' is a C++ error already.
1986
1987 2009-05-19 Akim Demaille <demaille@gostai.com>
1988
1989 remove useless variable.
1990 * src/getargs.c (skeleton_arg): Remove now useless variable.
1991 Should help the compiler see that this printf-like call is sane.
1992
1993 2009-05-15 Akim Demaille <demaille@gostai.com>
1994
1995 Rename token.prefix as api.tokens.prefix.
1996 Discussed here.
1997 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00024.html.
1998
1999 * NEWS, data/bison.m4, data/c.m4, data/java.m4, doc/bison.texinfo,
2000 * tests/c++.at, tests/calc.at, tests/java.at, tests/local.at
2001 (token.prefix): Rename as...
2002 (api.tokens.prefix): this.
2003
2004 2009-05-11 Akim Demaille <demaille@gostai.com>
2005
2006 doc: use C++ headers.
2007 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
2008 headers.
2009
2010 2009-05-11 Akim Demaille <demaille@gostai.com>
2011
2012 doc: token.prefix
2013 * doc/bison.simple (Decl Summary): Document token.prefix.
2014 (Calc++ Parser): Various fixes.
2015 Formatting changes.
2016 Use token.prefix.
2017 Introduce a macro TOKEN to shorten the code and make it more
2018 readable.
2019 (Calc++ Scanner): Adjust.
2020 * NEWS (Variable token.prefix): New.
2021
2022 2009-05-04 Akim Demaille <demaille@gostai.com>
2023
2024 bison: catch bad symbol names.
2025 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
2026 * tests/input.at: Adjust.
2027
2028 2009-05-04 Akim Demaille <demaille@gostai.com>
2029
2030 identifiers: dashes are letters.
2031 Dashes can now start identifiers (symbols and directives).
2032
2033 * src/scan-gram.l ({letter}): Add dash.
2034 ({id}): Remove it.
2035 * tests/input.at (Symbols): Adjust.
2036 Remove stray comment.
2037 * tests/regression.at (Invalid inputs): Adjust error message.
2038 * doc/bison.texinfo (Symbols): Update.
2039
2040 2009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
2041
2042 Declare %code to be a permanent feature.
2043 * NEWS (2.4.2): Here.
2044 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
2045 experimental.
2046 (Decl Summary): Likewise.
2047
2048 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2049
2050 Convert underscores to dashes in some %define variable names.
2051 For now, just api.push-pull and lr.keep-unreachable-states.
2052 Maintain old names for backward compatibility.
2053 * NEWS (2.5): Document.
2054 * data/c.m4 (b4_identification): Update comment.
2055 * data/yacc.c: Update access.
2056 * doc/bison.texinfo: Update.
2057 * etc/bench.pl.in (bench_push_parser): Update use.
2058 * src/files.c (tr): Move to...
2059 * src/getargs.c, src/getargs.h (tr): ... here because I can't
2060 think of a better place to expose it. My logic is that, for all
2061 uses of tr so far, command-line arguments can be involved, and
2062 getargs.h is already included.
2063 * src/main.c (main): Update access.
2064 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
2065 variable names to new variable names before assigning value.
2066 * src/reader.c (reader): Update setting default.
2067 * tests/calc.at: Update uses.
2068 * tests/conflicts.at (Unreachable States After Conflict
2069 Resolution): Update use.
2070 * tests/input.at (%define enum variables): Update use.
2071 (%define backward compatibility): New test group.
2072 * tests/push.at: Update uses.
2073 * tests/reduce.at: Update uses.
2074 * tests/torture.at: Update uses.
2075
2076 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2077
2078 Set all front-end %define defaults in one place.
2079 * src/main.c (main): Move lr.keep_unreachable_states default...
2080 * src/reader.c (reader): ... to here.
2081
2082 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2083
2084 Rename lr.default_reductions to lr.default-reductions.
2085 * NEWS (2.5): Here.
2086 * doc/bison.texinfo: Here.
2087 * src/lalr.c (initialize_LA): Here.
2088 * src/print.c (print_reductions): Here.
2089 * src/reader.c (reader): Here.
2090 * src/tables.c (action_row): Here.
2091 * tests/input.at (%define enum variables): Here.
2092 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
2093
2094 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2095
2096 Pacify ./configure --enable-gcc-warnings.
2097 * tests/input.at (Symbols): Prototype yyerror and yylex.
2098
2099 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2100
2101 Document how `%define "var" "value"' is not M4-friendly.
2102 * src/parse-gram.y (variable): In comments here.
2103
2104 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2105
2106 Clean up recent patches a little.
2107 Reported by Akim Demaille.
2108 * doc/bison.texinfo (Understanding): Fix typos.
2109 * src/print.c (print_reductions): Don't use negated variable.
2110
2111 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2112
2113 List accepted values for a %define enum variable with an invalid value.
2114 Suggested by Akim Demaille at
2115 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
2116 * data/bison.m4 (_b4_percent_define_check_values): Implement.
2117 * src/muscle-tab.c (muscle_percent_define_check_values): Implement.
2118 * tests/input.at (%define lr.default_reductions invalid values): Merge
2119 into...
2120 (%define enum variables): ... here, and update output.
2121
2122 2009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
2123
2124 Rename "default rule" to "default reduction".
2125 This includes changing variable names in code, changing
2126 comments, and renaming %define lr.default_rules to %define
2127 lr.default_reductions.
2128 * NEWS (2.5): Update IELR documentation.
2129 * data/bison.m4 (b4_integral_parser_tables_map): Adjust YYDEFACT
2130 documentation.
2131 * data/glr.c, data/lalr1.java: Sync copyright dates.
2132 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
2133 and lr.type documentation. Make some other wording
2134 improvements.
2135 (Glossary): Adjust cross-references and Default Reduction
2136 definition.
2137 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
2138 Remove a confusing comment pointed out by Akim Demaille.
2139 (initialize_LA): Adjust code.
2140 * src/print-xml.c (print_reductions): Adjust code.
2141 * src/print.c (print_reductions): Adjust code.
2142 * src/reader.c (reader): Adjust code.
2143 * src/tables.c (action_row): Adjust code.
2144 (token_actions): Adjust code.
2145 * src/tables.h: Adjust YYDEFACT documentation.
2146 * tests/input.at (%define lr.default_rules invalid values):
2147 Rename test group to...
2148 (%define lr.default_reductions invalid values): ... this, and
2149 update grammar file and expected output.
2150 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
2151 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
2152
2153 2009-04-21 Akim Demaille <demaille@gostai.com>
2154
2155 tests: check the use of dashes and periods in symbols.
2156 * tests/input.at (Symbol): New test group.
2157
2158 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2159
2160 Document %define lr.type and lr.default_rules.
2161 * NEWS (2.5): Add an entry.
2162 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
2163 besides just LALR(1) and GLR(1).
2164 * doc/bison.texinfo (Introduction): Likewise.
2165 (Language and Grammar): Bison is no longer limited to LALR(1)
2166 restrictions.
2167 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
2168 when trying to distinguish from GLR. Talk about LR(1) grammars
2169 rather than LALR(1) grammars.
2170 (Decl Summary): In %define api.push_pull entry, say it applies
2171 to deterministic parsers in C rather than LALR(1) parsers in C.
2172 Add lr.default_rules entry.
2173 Add lr.type entry.
2174 (Mystery Conflicts): Bison is no longer limited to LALR(1)
2175 restrictions.
2176 (Generalized LR Parsing): Same changes as for the previous GLR
2177 section.
2178 (Memory Management): Say deterministic rather than LALR(1).
2179 (Understanding): Correct some bison output.
2180 Index discussion of "accepting state".
2181 Say deterministic rather than LALR(1).
2182 (Bison Options): In --yacc entry, say deterministic rather than
2183 LALR(1).
2184 In --report, --graph, and --xml entries, just don't mention
2185 LALR(1).
2186 (C++ Parsers): Say deterministic rather than LALR(1).
2187 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
2188 (Glossary): Add Accepting State, Consistent State, Default Rule,
2189 and IELR(1) definitions.
2190 In Generalized LR (GLR) definition, make same changes as in
2191 previous GLR sections.
2192 In LALR(1) definition, say Bison uses LALR(1) by default rather
2193 than implying Bison is limited to LALR(1).
2194 (LocalWords): Add IELR.
2195
2196 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2197
2198 Finish implementing %define lr.type.
2199 Its value can be "LALR", "IELR", or "canonical LR".
2200 * lib/timevar.def (TV_IELR_PHASE1): New var.
2201 (TV_IELR_PHASE2): New var.
2202 (TV_IELR_PHASE3): New var.
2203 (TV_IELR_PHASE4): New var.
2204 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
2205 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
2206 Sbitset.h, ielr.h, and ielr.c.
2207 * src/getargs.h, src/getargs.c (enum trace, trace_args,
2208 trace_types): Add trace_ielr.
2209 * src/lalr.h, src/lalr.c (ngotos): Export it.
2210 (F): Rename to...
2211 (goto_follows): ... this, update all uses, and export it.
2212 (set_goto_map): Export it.
2213 (map_goto): Export it.
2214 (compute_lookahead_tokens): Don't free goto_follows yet. Now
2215 handled in ielr.
2216 (initialize_LA): Export it. Move lookback allocation to...
2217 (lalr): ... here because, for canonical LR, initialize_LA must
2218 be invoked but lookback and much of the rest of LALR isn't
2219 needed.
2220 * main.c (main): Instead of lalr, invoke ielr, which invokes
2221 lalr.
2222 * src/reader.c (reader): Default lr.type to "LALR".
2223 Default lr.default_rules to "accepting" if lr.type is "canonical
2224 LR". Leave the default as "all" otherwise.
2225 Check for a valid lr.type value.
2226 * src/state.h, src/state.c (struct state_list): Add state_list
2227 member.
2228 (state_new): Initialize state_list member to NULL.
2229 (state_new_isocore): New function, exported.
2230 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
2231 exercises all values of lr.type.
2232 (GNU AWK Grammar): Rename test group to...
2233 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
2234 AT_TEST_EXISTING_GRAMMAR.
2235 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
2236 (GNU pic Grammar): Rename test group to...
2237 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
2238 AT_TEST_EXISTING_GRAMMAR.
2239 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
2240 all values of lr.type.
2241 (Single State Split): New test groups using AT_TEST_LR_TYPE.
2242 (Lane Split): Likewise.
2243 (Complex Lane Split): Likewise.
2244 (Split During Added Lookahead Propagation): Likewise.
2245
2246 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2247
2248 Add new files for IELR and canonical LR implementation.
2249 * src/AnnotationList.c: New.
2250 * src/AnnotationList.h: New.
2251 * src/InadequacyList.c: New.
2252 * src/InadequacyList.h: New.
2253 * src/Sbitset.c: New.
2254 * src/Sbitset.h: New.
2255 * src/ielr.c: New.
2256 * src/ielr.h: New.
2257
2258 2009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
2259
2260 Implement %define lr.default_rules.
2261 Its value describes the states that are permitted to contain
2262 default rules: "all", "consistent", or "accepting".
2263 * src/reader.c (reader): Default lr.default_rules to "all".
2264 Check for a valid lr.default_rules value.
2265 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
2266 is "accepting", then only mark the accepting state as
2267 consistent.
2268 (initialize_LA): Tell state_lookahead_tokens_count whether
2269 lr.default_rules is "accepting".
2270 * src/tables.c (action_row): If lr.default_rules is not "all",
2271 then disable default rules in inconsistent states.
2272 * src/print.c (print_reductions): Use this opportunity to
2273 perform some assertions about whether lr.default_rules was
2274 obeyed correctly.
2275 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
2276 helps with checking the parser tables for a grammar.
2277 * tests/input.at (%define lr.default_rules invalid values): New
2278 test group.
2279 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
2280 AT_TEST_TABLES_AND_PARSE.
2281 (`no %define lr.default_rules'): New test group generated by
2282 AT_TEST_LR_DEFAULT_RULES.
2283 (`%define lr.default_rules "all"'): Likewise.
2284 (`%define lr.default_rules "consistent"'): Likewise.
2285 (`%define lr.default_rules "accepting"'): Likewise.
2286
2287 2009-04-20 Akim Demaille <demaille@gostai.com>
2288
2289 Formatting change.
2290
2291 2009-04-20 Akim Demaille <demaille@gostai.com>
2292
2293 bison: factoring.
2294 * src/output.c (token_definitions_output): Use symbol_id_get
2295 instead of duplicating its logic.
2296 * TODO (YYERRCODE): Extend.
2297
2298 2009-04-20 Akim Demaille <demaille@gostai.com>
2299
2300 variables: prefer error-verbose to error_verbose.
2301 * data/bison.m4 (b4_error_verbose_if): Based on error-verbose
2302 instead of error_verbose.
2303 * src/scan-gram.l (%error-verbose): Map to the error-verbose
2304 variable.
2305 * doc/bison.texinfo: Promote %define error-verbose instead of
2306 %error-verbose.
2307 * tests/actions.at: Prefer %define error-verbose to %error-verbose.
2308
2309 2009-04-15 Akim Demaille <demaille@gostai.com>
2310
2311 variables: accept dashes.
2312 * data/bison.m4 (b4_percent_define_if_define_): Also map dashes to
2313 underscores.
2314 * src/scan-gram.l ({id}): Also accept dashes after the initial
2315 letter.
2316 ({directive}): Use {id}.
2317 * src/parse-gram.y: Comment and formatting changes.
2318 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
2319 symbols.
2320 * src/complain.h, src/complain.c (yacc_at): New.
2321 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
2322 symbol names.
2323 * src/output.c (token_definitions_output): Do not #define token
2324 names with dashes.
2325
2326 2009-04-20 Akim Demaille <demaille@gostai.com>
2327
2328 Consistently refer to Yacc, not YACC.
2329 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
2330
2331 2009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
2332
2333 Pacify make maintainer-check-posix.
2334 * tests/input.at (%define, --define): Move bison command-line
2335 options before grammar file name.
2336
2337 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2338
2339 Document semicolon warnings.
2340 * NEWS (2.5): Here.
2341
2342 2009-04-14 Akim Demaille <demaille@gostai.com>
2343
2344 variables: use `parse.assert' instead of `assert'.
2345 * TODO (assert): Remove.
2346 * data/bison.m4 (b4_assert_if): Replace with...
2347 (b4_parse_assert_if): this.
2348 * data/lalr1.cc, data/variant.hh, tests/c++.at: Adjust.
2349 * doc/bison.texinfo (Decl Summary): Document parse.assert.
2350
2351 2009-04-14 Akim Demaille <demaille@gostai.com>
2352
2353 variables: use `parse.trace' instead of `debug'.
2354 * src/getargs.c (getargs): Map -t to %define trace.parse.
2355 * src/scan-gram.l (%debug): Map to %define trace.parse.
2356 * data/bison.m4 (b4_percent_define_if_define): Map `.' in variable
2357 names to `_' in macro names.
2358 (b4_debug_if): Replace with...
2359 (b4_parse_trace_if): this.
2360 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
2361 * data/yacc.c: Adjust.
2362 * doc/bison.texinfo (Decl Summary): Document %debug as obsoleted.
2363 Use @code to label the variable list.
2364 Document the variable parse.trace.
2365 (Tracing): Promote the parse.trace variable.
2366 * TODO: %printer is not documented.
2367
2368 2009-04-14 Akim Demaille <demaille@gostai.com>
2369
2370 doc: minor fixes.
2371 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
2372 (Table of Symbols): Remove duplicate entry for %debug.
2373
2374 2009-04-10 Eric Blake <ebb9@byu.net>
2375
2376 submodules: update to latest
2377 * submodules/autoconf: Use latest upstream Autoconf.
2378
2379 2009-04-06 Eric Blake <ebb9@byu.net>
2380
2381 Work around autoconf 2.63b bug in testsuite.
2382 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
2383 autoconf bug related to # in test.
2384
2385 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2386
2387 * NEWS (2.5): New section. Describe new -D/--define feature.
2388
2389 2009-04-06 Akim Demaille <demaille@gostai.com>
2390
2391 Regen.
2392 * src/parse-gram.h, src/parse-gram.c: Regen.
2393
2394 2009-04-06 Akim Demaille <demaille@gostai.com>
2395
2396 rename muscle_tab.* as muscle-tab.* for consistency.
2397 * src/muscle_tab.h, src/muscle_tab.c: Rename as...
2398 * src/muscle-tab.h, src/muscle-tab.c: these.
2399 * src/getargs.c, src/local.mk, src/main.c, src/output.c,
2400 * src/parse-gram.y, src/reader.c, src/scan-code.l: Adjust.
2401
2402 2009-04-06 Akim Demaille <demaille@gostai.com>
2403
2404 Makefile: introduce $(BISON).
2405 * src/local.mk (BISON): New.
2406 (YACC): Use it.
2407
2408 2009-04-06 Akim Demaille <demaille@gostai.com>
2409
2410 parser: handle %locations as %define locations.
2411 * src/getargs.h, src/getargs.c (locations_flag): Remove.
2412 * src/getargs.c, src/scan-code.l: Use muscle_percent_define_ensure
2413 to set "locations" to true.
2414 * src/output.c (prepare): Don't output "locations".
2415 * src/scan-gram.l (%locations): Handle it as a %<flag>.
2416 * src/parse-gram.y: It's no longer a token.
2417 Don't handle it.
2418 * data/bison.m4 (b4_locations_if): Define it with
2419 b4_percent_define_if_define.
2420 * data/c.m4, data/glr.cc: Adjust.
2421
2422 2009-04-06 Akim Demaille <demaille@gostai.com>
2423
2424 Regen.
2425 * src/parse-gram.c: Regen.
2426
2427 2009-04-06 Akim Demaille <demaille@gostai.com>
2428
2429 muscle: factor the handling of obsolete of obsolete directives.
2430 Suggested by Joel E. Denny.
2431
2432 * src/muscle_tab.h, src/muscle_tab.c (muscle_percent_define_ensure):
2433 New, extracted from...
2434 * src/parse-gram.y (prologue_declaration: pure-parser): here.
2435 Remove it.
2436 (prologue_declaration: "%<flag>"): Use
2437 muscle_percent_define_ensure.
2438 (%error-verbose, %pure-parser): No longer tokens.
2439 * src/scan-gram.l (pure-parser): Return as a %<flag>.
2440
2441 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2442
2443 Fix options documentation.
2444 * build-aux/cross-options.pl: As in --help output, write optional
2445 arguments as [=ARG] not =[ARG].
2446 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
2447
2448 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2449
2450 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
2451 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
2452 requirements for a correct m4 are stricter.
2453 * m4/m4.m4: Make it a symbolic link to submodules/autoconf/m4/m4.m4.
2454 * configure.ac: Update to use AC_PROG_GNU_M4.
2455 Reported by Eric Blake.
2456
2457 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2458
2459 Help with updating web manual.
2460 * HACKING: Incorporate instructions from gnulib/doc/README.
2461 * bootstrap.conf (gnulib_modules): Add gendocs.
2462
2463 2009-04-03 Akim Demaille <demaille@gostai.com>
2464
2465 Regen.
2466 * src/parse-gram.h, src/parse-gram.c: Regen.
2467
2468 2009-04-03 Akim Demaille <demaille@gostai.com>
2469
2470 Factor %FLAG at scan level.
2471 * src/parse-gram.y (PERCENT_DEBUG, PERCENT_ERROR_VERBOSE): Token
2472 definitions and associated rules, replaced by....
2473 (PERCENT_FLAG): this new token type, and rule.
2474 * src/scan-gram.l (RETURN_PERCENT_FLAG): New.
2475 Use it for %debug and %error-verbose.
2476
2477 2009-04-03 Akim Demaille <demaille@gostai.com>
2478
2479 Regen.
2480 * src/parse-gram.h, src/parse-gram.c: Regen.
2481
2482 2009-04-03 Akim Demaille <demaille@gostai.com>
2483
2484 Treat %debug as %define debug.
2485 * data/bison.m4 (b4_debug_if): New.
2486 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c,
2487 * data/lalr1.java: Use it instead of b4_debug_flag.
2488 * src/getargs.h, src/getargs.c (debug_flag): Remove.
2489 * src/output.c (prepare): Don't output it.
2490 * src/parse-gram.y: Treat %debug as %define debug.
2491
2492 2009-04-03 Akim Demaille <demaille@gostai.com>
2493
2494 Treat %error-verbose as %define error_verbose.
2495 This allows to pass -Derror_verbose on the command line. Better
2496 yet, it allows to pass -Derror_verbose=$(ERROR_VERBOSE), with
2497 ERROR_VERBOSE being defined as false or true.
2498 * data/bison.m4 (b4_percent_define_if_define): Instead of relying
2499 on b4_percent_define_ifdef, for does not check the defined value,
2500 but only whether the symbol is defined, rely on
2501 b4_percent_define_flag_if, so that a value of "false" is processed
2502 as a false.
2503 If not defined, define the flag to "false".
2504 (b4_error_verbose_if): New.
2505 * data/glr.c, data/lalr1.cc, data/yacc.c: Use it instead of
2506 b4_error_verbose_flag.
2507 * src/getargs.h, src/getargs.c (error_verbose_flag): Remove.
2508 * src/output.c (prepare): Don't output it.
2509 * src/parse-gram.y (%error-verbose): Treat as %define error_verbose.
2510
2511 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2512
2513 Fix strange %define locations for default values.
2514 Reported by Akim Demaille at
2515 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
2516 and discussed again starting at
2517 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
2518 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
2519 because location information is bogus.
2520 Use angle brackets to delimit fake file name because square brackets
2521 look like underexpanded m4. Choose a better fake file name.
2522 Use negative line numbers.
2523 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
2524 * src/location.c (location_print): If line for a boundary is negative,
2525 only print that boundary's file name.
2526 * src/location.h: Document that.
2527 * tests/skeletons.at (%define Boolean variables: invalid skeleton
2528 defaults): Update output.
2529
2530 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2531
2532 Pacify ./configure --enable-gcc-warnings.
2533 * Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS) because many files
2534 in lib won't compile with it.
2535 * src/local.mk (src_bison_CFLAGS): Use $(WERROR_CFLAGS) here only.
2536
2537 2009-03-31 Akim Demaille <demaille@gostai.com>
2538
2539 bootstrap: --help to stdout.
2540 * bootstrap (usage): Don't send --help to stderr.
2541 Use a here doc instead of a long string.
2542
2543 2009-03-31 Akim Demaille <demaille@gostai.com>
2544
2545 bootstrap: README-hacking no longer exists
2546 * bootstrap (checkout_only_file): Set to HACKING.
2547
2548 2009-03-26 Akim Demaille <demaille@gostai.com>
2549
2550 doc: merge HACKING and README-hacking.
2551 Two files is confusing.
2552 Reported by Alexandre Duret-Lutz.
2553
2554 * README-hacking: Merge into...
2555 * HACKING (Working from the repository): here.
2556
2557 2009-03-26 Akim Demaille <demaille@gostai.com>
2558
2559 doc: update README-hacking.
2560 * README-hacking: We now use git and git submodules.
2561 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
2562
2563 2009-03-26 Akim Demaille <demaille@gostai.com>
2564
2565 lalr1.cc: avoid GCC 4.3 warnings.
2566 GCC 4.3 now warns about "a || b && c" and asks for explicit
2567 parentheses.
2568 Reported by Alexandre Duret-Lutz.
2569 * data/location.cc: Update copyright years.
2570 (Position::operator==): Use parens to make precedence explicit.
2571 Compare lines and columns first, as they are more likely to be
2572 different, and they are faster to compare.
2573
2574 2009-03-26 Akim Demaille <demaille@gostai.com>
2575
2576 gnulib: update.
2577 * gnulib: Update to latest.
2578 * src/local.mk (AM_CFLAGS): Move to...
2579 * Makefile.am: here.
2580 * etc/prefix-gnulib-mk (prefix_assignment): Also transform
2581 AM_CFLAGS.
2582
2583 2009-03-02 Akim Demaille <demaille@gostai.com>
2584
2585 Comment changes.
2586
2587 2009-03-02 Akim Demaille <demaille@gostai.com>
2588
2589 Share b4_yytranslate_define.
2590 * data/lalr1.cc (b4_yytranslate_define): Move to...
2591 * data/c++.m4: here.
2592
2593 2009-03-02 Akim Demaille <demaille@gostai.com>
2594
2595 Use locations in the variant example.
2596 Yes, this obfuscates the point of this example, variants only.
2597 But glr.cc cannot work (yet?) without locations. This change
2598 makes it easier to use this example with glr.cc.
2599
2600 * examples/variant.yy (assert): %define it.
2601 (locations): Request them.
2602 (yylex): Bind the location to the stage.
2603
2604 2009-03-02 Akim Demaille <demaille@gostai.com>
2605
2606 Dub make_TOKEN as a public type interface.
2607 * data/c++.m4 (b4_symbol_constructor_declare)
2608 (b4_symbol_constructor_define): New empty stubs.
2609 (b4_public_types_declare, b4_public_types_define): Use them.
2610 * data/lalr1.cc (b4_symbol_constructor_declare)
2611 (b4_symbol_constructor_declare_)
2612 (b4_symbol_constructor_define_, b4_symbol_constructor_define):
2613 Move to...
2614 * data/variant.hh: here.
2615 Remove the "b4_variant_if" parts, as variant.hh is loaded only if
2616 needed.
2617 * data/lalr1.cc: No longer invoke b4_symbol_constructor_define and
2618 b4_symbol_constructor_declare, as it is now done by
2619 b4_public_types_define and b4_public_types_declare.
2620
2621 2009-03-02 Akim Demaille <demaille@gostai.com>
2622
2623 Coding style changes.
2624 * data/lalr1.cc (b4_symbol_constructor_declaration_)
2625 (b4_symbol_constructor_declarations)
2626 (b4_symbol_constructor_definition_)
2627 (b4_symbol_constructor_definitions)
2628 (b4_yytranslate_definition): Rename as...
2629 (b4_symbol_constructor_declare_)
2630 (b4_symbol_constructor_declare)
2631 (b4_symbol_constructor_define_)
2632 (b4_symbol_constructor_define)
2633 (b4_yytranslate_define): these.
2634 * data/variant.hh (b4_variant_definition): Rename as...
2635 (b4_variant_define): this.
2636
2637 2009-03-02 Akim Demaille <demaille@gostai.com>
2638
2639 Factor b4_assert_if, b4_lex_symbol_if, and b4_variant_if.
2640 * data/bison.m4 (b4_percent_define_if_define): New.
2641 * data/c++.m4 (b4_variant_if): Move to...
2642 * data/bison.m4: Here, using b4_percent_define_if_define.
2643 * data/lalr1.cc (b4_assert_if, b4_lex_symbol_if): Move to...
2644 * data/bison.m4: Here, using b4_percent_define_if_define.
2645
2646 2009-03-02 Akim Demaille <demaille@gostai.com>
2647
2648 Dub symbol_type_base as a public type.
2649 * data/c++.m4 (b4_public_types_declare): Now define
2650 symbol_type_base and symbol_type.
2651 (b4_public_types_define): New.
2652 In both cases, the definitions are taken verbatim from lalr1.cc.
2653 * data/lalr1.cc: Adjust.
2654
2655 2009-03-02 Akim Demaille <demaille@gostai.com>
2656
2657 b4_public_types_declare.
2658 * data/c++.m4 (b4_public_types_declare): New.
2659 * data/glr.cc, data/lalr1.cc: Use it.
2660
2661 2009-03-02 Akim Demaille <demaille@gostai.com>
2662
2663 b4_semantic_type_declare.
2664 * data/c++.m4 (b4_semantic_type_declare): New.
2665 Factors and generalizes what was in glr.cc and lalr1.cc.
2666 * data/variant.hh (b4_semantic_type_declare): Redefine it for
2667 variants.
2668 * data/lalr1.cc, data/glr.cc: Use it.
2669
2670 2009-02-26 Akim Demaille <demaille@gostai.com>
2671
2672 Upgrade gnulib.
2673 * gnulib: Upgrade from master.
2674 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, m4/.gitignore:
2675 Regen.
2676
2677 2009-02-25 Akim Demaille <demaille@gostai.com>
2678
2679 Remove useless arguments.
2680 * data/glr.c (yy_reduce_print): $$ and @$ are not used and not
2681 relevant.
2682
2683 2009-02-25 Akim Demaille <demaille@gostai.com>
2684
2685 Comment changes.
2686 * data/lalr1.cc: here.
2687
2688 2009-02-25 Akim Demaille <demaille@gostai.com>
2689
2690 Fix glr.cc's debug level handling.
2691 * data/glr.cc (yydebug_): Remove, as it is actually yydebug from
2692 glr.c which is used.
2693 (debug_level, set_debug_level): Adjust.
2694
2695 2009-02-25 Akim Demaille <demaille@gostai.com>
2696
2697 Copyright years.
2698 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
2699
2700 2009-02-25 Akim Demaille <demaille@gostai.com>
2701
2702 Style changes.
2703 * etc/bench.pl.in (generate_grammar_list): Consitently use
2704 location_type, not yy::location.
2705
2706 2009-02-25 Akim Demaille <demaille@gostai.com>
2707
2708 Comment change.
2709 * data/lalr1.cc: here.
2710
2711 2009-02-19 Akim Demaille <demaille@gostai.com>
2712
2713 Make yyparser::error public.
2714 * data/lalr1.cc: here.
2715 There is no good reason to keep it private (and it is convenient
2716 to use it from the scanner for instance). It is already public in
2717 glr.cc.
2718
2719 2009-02-19 Akim Demaille <demaille@gostai.com>
2720
2721 Comment changes.
2722 * data/glr.cc: here.
2723
2724 2009-02-19 Akim Demaille <demaille@gostai.com>
2725
2726 Remove trailing blanks.
2727 The epilogue has its own ending \n, no need to add another.
2728
2729 * data/glr.c, data/lalr1.java, data/yacc.c: dnl when outputing the
2730 epilogue.
2731 * data/glr.cc: dnl when extending the epilogue.
2732 Remove stray "private:".
2733
2734 2009-02-19 Akim Demaille <demaille@gostai.com>
2735
2736 Use b4_c_modern.
2737 * data/c.m4 (b4_c_function_decl): Here.
2738
2739 2009-02-19 Akim Demaille <demaille@gostai.com>
2740
2741 Comment changes.
2742 * data/lalr1.cc: here.
2743
2744 2009-02-19 Akim Demaille <demaille@gostai.com>
2745
2746 Extract variant.hh
2747 * data/variant.hh: New, extracted from...
2748 * data/lalr1.cc: here.
2749 Adjust.
2750 * data/local.mk: Adjust.
2751
2752 2009-02-19 Akim Demaille <demaille@gostai.com>
2753
2754 Extract stack.hh from lalr1.cc.
2755 * data/stack.hh: New.
2756 * data/lalr1.cc: Extract from here.
2757 * data/local.mk: Adjust.
2758
2759 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
2760
2761 Add reminder about uploading public key to keys.gnupg.net.
2762 * HACKING (Release Procedure): Here.
2763
2764 2009-01-28 Akim Demaille <demaille@gostai.com>
2765
2766 * NEWS: Update information about 2.4.1 and 2.4.2.
2767
2768 2008-11-04 Akim Demaille <demaille@gostai.com>
2769
2770 Reformat NEWS.
2771 * NEWS: Use more outline-mode markup.
2772 Suggested by Jim Meyering.
2773
2774 2009-01-08 Akim Demaille <demaille@gostai.com>
2775
2776 Fix grep portability issues.
2777 Grep on Solaris does not support -q.
2778 Reported by Summum Bonum.
2779
2780 * NEWS: Add a stub for 2.4.2.
2781 * THANKS: Add Summum Bonum.
2782 * tests/atlocal.in (EGREP): New.
2783 (CC, CXX, XSLTPROC): Make it possible to override them via
2784 envvars.
2785 * tests/java.at: Use $EGREP instead of egrep.
2786 Use AT_CHECK's ignore instead of grep's -q.
2787
2788 2008-12-11 Akim Demaille <demaille@gostai.com>
2789
2790 Pass the token type to yysyntax_error.
2791 * data/yacc.c (yysyntax_error): Take the transated token instead
2792 of the raw number.
2793 Adjust callers.
2794 * TODO: Update.
2795
2796 2008-12-11 Akim Demaille <demaille@gostai.com>
2797
2798 Formatting changes.
2799 * data/glr.c: Formatting changes.
2800
2801 2008-12-11 Akim Demaille <demaille@gostai.com>
2802
2803 Propagate i18n changes into glr.c.
2804 * TODO: Update.
2805 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
2806 building the error message format dynamically.
2807 * data/lalr1.java: Formatting changes.
2808
2809 2008-12-11 Akim Demaille <demaille@gostai.com>
2810
2811 Use testsuite -C.
2812 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
2813 Solves problems when top_srcdir is an absolute path.
2814 Suggested by Eric Blake.
2815 * configure.ac: Require Autoconf 2.62.
2816
2817 2008-12-11 Akim Demaille <demaille@gostai.com>
2818
2819 Simplify the i18n of the error messages.
2820 * data/lalr1.cc: Comment changes.
2821 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
2822 lalr1.cc instead of building dynamically the format string.
2823
2824 2008-12-08 Akim Demaille <demaille@gostai.com>
2825
2826 Fix portability issue in the test suite.
2827 * tests/local.at (AT_MATCHES_CHECK): New.
2828 Based on Perl instead of Sed. Sed has too many portability
2829 pitfalls, not ever Sed is GNU Sed.
2830 * tests/actions.at (Fix user actions without a trailing semicolon):
2831 Use it.
2832
2833 2008-12-08 Akim Demaille <demaille@gostai.com>
2834
2835 Update data/README.
2836 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
2837
2838 2008-12-08 Akim Demaille <demaille@gostai.com>
2839
2840 Install autoconf as a submodule to get m4sugar.
2841 * .gitmodules: Add submodules/autoconf.
2842 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
2843 submodules/autoconf.
2844
2845 2008-12-08 Akim Demaille <demaille@gostai.com>
2846
2847 Test token.prefix in all the skeletons.
2848 * data/java.m4 (b4_token_enum): Use the token.prefix.
2849 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
2850 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
2851 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
2852 * tests/java.at: Comment changes.
2853 (AT_CHECK_JAVA_MINIMAL): Define the END token.
2854 (Java parser class and package names): Add token.prefix check.
2855
2856 2008-12-08 Akim Demaille <demaille@gostai.com>
2857
2858 Fix regeneration of atconfig.
2859 * tests/local.mk (tests/atconfig): The rule was incorrect, but
2860 remove it: now that there is no tests/Makefile.am, the top-level
2861 Makefile properly updates atconfig when needed.
2862
2863 2008-12-07 Di-an Jan <dianj@freeshell.org>
2864
2865 Implement the FIXME that ends an user action with a semicolon
2866 if it seems necessary.
2867 * src/scan-code.l (flex rules section): Flag cpp directive from
2868 any `#' to the first unescaped end-of-line. Semicolon is not
2869 needed after `;', `{', '}', or cpp directives and is needed after
2870 any other token (whitespaces and comments have no effect).
2871 * tests/actions.at (Fix user actions without a trailing semicolon):
2872 New test.
2873 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
2874 to make user actions complete statements.
2875 Adjust column numbers in error messages.
2876 * tests/regression.at (Fix user actions without a trailing semicolon):
2877 Remove. Covered by new test.
2878
2879 2008-12-07 Akim Demaille <demaille@gostai.com>
2880
2881 Update gnulib.
2882 * gnulib: Update from master.
2883
2884 2008-12-05 Eric Blake <ebb9@byu.net>
2885
2886 Avoid compiler warning.
2887 * src/output.c (muscle_insert_item_number_table): Delete unused
2888 function.
2889
2890 2008-12-02 Eric Blake <ebb9@byu.net>
2891
2892 Build testsuite with newer autoconf.
2893 * tests/output.at (m4_expand): Don't override in newer autoconf,
2894 where the underlying implementation changed.
2895 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
2896 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
2897 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
2898 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
2899 since some of them contain unbalanced ')'.
2900
2901 2008-12-01 Akim Demaille <demaille@gostai.com>
2902
2903 Use b4_symbol for printers and destructors everywhere.
2904 * data/bison.m4 (b4_symbol_action_location): New.
2905 * data/c.m4 (b4_symbol_actions): Remove.
2906 Adjust all callers to use by b4_symbol_foreach and the corresponding
2907 b4_symbol_printer/destructor macro.
2908 * data/glr.cc: Adjust.
2909 * data/lalr1.java: Adjust the %destructor sanity check.
2910 * src/output.c (symbol_code_props_output): Remove, we no longer
2911 need the b4_symbol_printers/destructors tables.
2912
2913 2008-12-01 Akim Demaille <demaille@gostai.com>
2914
2915 Use b4_symbol_case_.
2916 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
2917 b4_symbol_case_.
2918
2919 2008-12-01 Akim Demaille <demaille@gostai.com>
2920
2921 Move b4_symbol based macro to bison.m4.
2922 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
2923 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
2924 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
2925 (b4_type_foreach): Move to...
2926 * data/bison.m4: Here.
2927 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
2928 b4_symbol_value_template instead of b4_symbol_value.
2929
2930 2008-12-01 Akim Demaille <demaille@gostai.com>
2931
2932 b4_symbol/type_foreach.
2933 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
2934 Use them.
2935
2936 2008-12-01 Akim Demaille <demaille@gostai.com>
2937
2938 Use the symbol properties to output the printer/destructor for lalr1.cc.
2939 Instead of defining complex list of tuples to define various
2940 properties of the symbols, we now prefer to define symbols as
2941 "structs" in m4: using the symbol key (its number), and the
2942 property name, b4_symbol gives it value. Use this to handle
2943 destructors and printers.
2944
2945 * src/output.c (CODE_PROP): New.
2946 (prepare_symbol_definitions): Use it to define the printer and
2947 destructor related attributes of the symbols.
2948 * data/lalr1.cc (b4_symbol_actions): Rename as...
2949 (b4_symbol_action): this.
2950 Use b4_symbol instead of 6 arguments.
2951 (b4_symbol_printer, b4_symbol_destructor): New.
2952 Use them instead of b4_symbol_actions.
2953
2954 2008-12-01 Akim Demaille <demaille@gostai.com>
2955
2956 Avoid capturing variables too easily.
2957 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
2958 v__ and p__ instead of v and p.
2959
2960 2008-12-01 Akim Demaille <demaille@gostai.com>
2961
2962 Remove spurious empty line before syncline.
2963 * data/bison.m4 (b4_syncline): Don't output an empty line before
2964 the output.
2965
2966 2008-11-26 Akim Demaille <demaille@gostai.com>
2967
2968 Convert lib/Makefile.am into lib/local.mk.
2969 The real problem is rather gnulib.mk, which itself is extracted
2970 from a Makefile.am that gnulib expects to the "recursive". The
2971 tool prefix-gnulib-mk converts such a gnulib.mk to be
2972 non-recursive. Also, some AC_SUBST variables need to be adjusted.
2973
2974 * etc/prefix-gnulib-mk: New.
2975 * bootstrap (slurp): Use it to convert further gnulib.mk.
2976 No longer try to avoid re-creation of lib/gnulib.mk as the changes
2977 are deeper.
2978 * lib/Makefile.am: Rename as...
2979 * lib/local.mk: this.
2980 Adjust to be prefixed.
2981 * Makefile.am, configure.ac: Adjust.
2982 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
2983
2984 2008-11-26 Akim Demaille <demaille@gostai.com>
2985
2986 s/_FLAGS/FLAGS/.
2987 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
2988 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
2989 Reported by Eric Blake.
2990
2991 2008-11-26 Akim Demaille <demaille@gostai.com>
2992
2993 Use b4_parser_tables_define in glr.cc.
2994 * data/glr.c: Use b4_parser_tables_define instead of defining the
2995 (deterministic integral) tables by hand.
2996
2997 2008-11-26 Akim Demaille <demaille@gostai.com>
2998
2999 Use b4_parser_tables_define in Java.
3000 * data/java.m4 (b4_typed_parser_table): Rename as...
3001 (b4_typed_parser_table_define): this, for consistency.
3002 Accept a comment as $4.
3003 Move $2 into yy*_.
3004 (b4_integral_parser_table): Rename as...
3005 (b4_integral_parser_table_define): this.
3006 * data/lalr1.java: Adjust all uses.
3007 Use b4_parser_tables_define instead of generation by hand.
3008
3009 2008-11-26 Akim Demaille <demaille@gostai.com>
3010
3011 Prepare the convergence bw C style and Java table generation.
3012 * data/bison.m4 (b4_tables_map, b4_tables_declare)
3013 (b4_tables_define): Rename as...
3014 (b4_integral_parser_tables_map, b4_parser_tables_declare)
3015 (b4_parser_tables_define): these.
3016 * data/c.m4 (b4_table_define): Rename as...
3017 (b4_integral_parser_table_define): this.
3018 * data/lalr1.cc: Adjust.
3019 (b4_table_define, b4_table_declare): Rename as...
3020 (b4_integral_parser_table_define)
3021 (b4_integral_parser_table_declare): these.
3022 (yyrline_): Move the comment where it is actually used.
3023 * data/yacc.c: Adjust.
3024 (yyrline): Use b4_integral_parser_table_define.
3025
3026 2008-11-26 Akim Demaille <demaille@gostai.com>
3027
3028 Regen.
3029 * src/parse-gram.h, src/parse-gram.c: Regen.
3030
3031 2008-11-26 Akim Demaille <demaille@gostai.com>
3032
3033 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
3034 * data/lalr1.cc (b4_tables_map): Move to...
3035 * data/bison.m4: here.
3036 Update the comment for yytable during the flight.
3037 (b4_tables_declare, b4_tables_define): New.
3038 * data/lalr1.cc: Use them.
3039 * data/c.m4 (b4_table_define): New.
3040 * data/yacc.c: Use b4_tables_define instead of output the tables
3041 by hand.
3042 * tests/regression.at (Web2c Actions): Adjust the expected output,
3043 the order of the tables changed.
3044
3045 2008-11-26 Akim Demaille <demaille@gostai.com>
3046
3047 Get rid of (yy)rhs and (yy)prhs.
3048 These tables are no longer needed in the parsers, and they don't seem to
3049 be useful. They are not documented either.
3050
3051 * src/output.c (prepare_rules): Get rid of rhs and prhs.
3052 Adjust the computation of (yy)r2.
3053
3054 2008-11-26 Akim Demaille <demaille@gostai.com>
3055
3056 Rule length is unsigned.
3057 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
3058
3059 2008-11-26 Akim Demaille <demaille@gostai.com>
3060
3061 Get rid of lalr1-split.cc.
3062 It was no longer maintainer.
3063
3064 * data/lalr1-split.cc: Remove.
3065 * etc/bench.pl.in (bench_fusion_parser): Remove.
3066 Adjust.
3067
3068 2008-11-26 Akim Demaille <demaille@gostai.com>
3069
3070 Use yy* consistently.
3071 * data/glr.c: Now that yyrhs no longer exists as a global
3072 variable, rename local "rhs" variables into "yyrhs" for
3073 consistency.
3074
3075 2008-11-25 Akim Demaille <demaille@gostai.com>
3076
3077 Get rid of yyrhs and yyprhs in glr.c.
3078 * data/glr.c (yyrhs, yyprhs): Remove.
3079 Instead, use the state stack and yystos.
3080
3081 2008-11-25 Akim Demaille <demaille@gostai.com>
3082
3083 Flag glr tests.
3084 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
3085 as an Autotest keyword.
3086
3087 2008-11-25 Akim Demaille <demaille@gostai.com>
3088
3089 Prefer TESTSUITE_FLAGS.
3090 TESTSUITEFLAGS is barely readable.
3091
3092 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
3093 for backward compatibility.
3094 Use the former instead of the latter.
3095
3096 2008-11-25 Akim Demaille <demaille@gostai.com>
3097
3098 Get rid of yyrhs and yyprhs in larl1.java.
3099 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
3100 (yy_reduce_print): Rather, use yystos_ and the state stack.
3101
3102 2008-11-25 Akim Demaille <demaille@gostai.com>
3103
3104 Formatting changes.
3105
3106 2008-11-25 Akim Demaille <demaille@gostai.com>
3107
3108 Get rid of yyrhs and yyprhs in yacc.c.
3109 They were used to get the symbol types, given a rule number, when
3110 displaying the top of the stack before a reduction. But the
3111 symbol type is available from the state stack. This has two be
3112 benefits: two tables less in the parser (making it smaller), and a
3113 more consistent use of the three stacks which will help to fuse
3114 them.
3115
3116 * data/yacc.c (yyprhs, yyrhs): Remove.
3117 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
3118 (yy_reduce_print): Take yyssp as argument.
3119 Use it, together with yystos, to get the symbol type.
3120 * tests/regression.at (Web2c Report): Remove these tables from the
3121 expected output.
3122
3123 2008-11-25 Akim Demaille <demaille@gostai.com>
3124
3125 b4_tables_map.
3126 The point is to factor the generation of the tables across skeletons.
3127 This is language dependant.
3128
3129 * data/c.m4 (b4_comment_): New.
3130 Should be usable to define how to generate tables independently of
3131 the language.
3132 (b4_c_comment): New.
3133 (b4_comment): Bounce to b4_c_comment.
3134 Now support $2 = [PREFIX] for indentation.
3135 * data/lalr1.cc (b4_table_declare): Don't output a comment if
3136 there is no comment.
3137 Indent it properly when there is one.
3138 Output the ending semicolon.
3139 (b4_table_define): Space changes.
3140 Output the ending semicolon.
3141 (b4_tables_map): New.
3142 Use it twice instead of declaring and defining the (integral)
3143 tables by hand.
3144
3145 2008-11-25 Akim Demaille <demaille@gostai.com>
3146
3147 b4_table_declare.
3148 * data/lalr1.cc (b4_table_declare): New.
3149 Use it to declare the tables defined with b4_table_define.
3150 (b4_table_define): Declare a third arg to match b4_table_declare
3151 signature.
3152 Move all the comments around invocations of b4_table_define into
3153 the invocations itselves.
3154 Move things around to have the order for declarations and
3155 definitions.
3156
3157 2008-11-25 Akim Demaille <demaille@gostai.com>
3158
3159 Formatting changes.
3160 * data/lalr1.java: here.
3161
3162 2008-11-25 Akim Demaille <demaille@gostai.com>
3163
3164 b4_args is more general than only C++.
3165 * data/lalr1.cc (b4_args, _b4_args): Move to...
3166 * data/bison.m4: here.
3167
3168 2008-11-21 Di-an Jan <dianj@freeshell.org>
3169
3170 Implement no-XXX arguments for --warnings, --report, --trace.
3171 * src/getargs.c (flags_argmatch): Handles no-XXX.
3172 Fix typo in doxygen comment.
3173
3174 2008-11-21 Akim Demaille <demaille@gostai.com>
3175
3176 Display the changes in cross-options.texi.
3177 * build-aux/cross-options.pl ($sep): New, to separate items.
3178 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
3179 changes.
3180
3181 2008-11-20 Di-an Jan <dianj@freeshell.org>
3182
3183 Improves options in the manual.
3184 * doc/bison.texinfo (-g, -x): Add space before argument.
3185 (Option Cross Key): Implement FIXME: listing directives also.
3186 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
3187 (Short Option): Special case -d. Put arguments inside @option.
3188 (Bison Directive): Add column, automatically extracted from
3189 src/scan-gram.l (actual name passed as the first argument)
3190 with special case for %define.
3191 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
3192 to build-aux/cross-options.pl.
3193 * src/getargs.c (usage): Document limitations of cross-options.pl.
3194 * src/scan-gram.l: Likewise.
3195
3196 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
3197
3198 Fix unexpanded macros in GLR defines file.
3199 Reported by Csaba Raduly at
3200 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
3201 * THANKS (Csaba Raduly): Add.
3202 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
3203 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
3204 lexer in a separate module that includes the defines file.
3205 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
3206 source.
3207 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
3208 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
3209 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
3210 (AT_DATA_SOURCE_PROLOGUE): New.
3211 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
3212 (AT_DATA_SOURCE): New.
3213 (AT_FULL_COMPILE): Extend to support an additional source file.
3214
3215 2008-11-18 Akim Demaille <demaille@gostai.com>
3216
3217 More TODO.
3218 * TODO: More short term issues.
3219
3220 2008-11-18 Akim Demaille <demaille@gostai.com>
3221
3222 Regen.
3223 * src/parse-gram.h, src/parse-gram.c: Regen.
3224
3225 2008-11-18 Akim Demaille <demaille@gostai.com>
3226
3227 Use b4_subtract where possible.
3228 * data/lalr1.cc (b4_subtract): Move to...
3229 * data/bison.m4: here.
3230 * data/glr.c (b4_rhs_data): Use it.
3231 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
3232
3233 2008-11-18 Akim Demaille <demaille@gostai.com>
3234
3235 Remove incorrect mode specification.
3236 * data/glr.cc: Don't pretend it's C code.
3237
3238 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3239
3240 Simplify last patch slightly.
3241 * src/getargs.c (getargs): Here.
3242
3243 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3244
3245 Fix last warning from --enable-gcc-warnings.
3246 * src/getargs.c (getargs): Don't assign const address to non-const
3247 pointer.
3248
3249 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3250
3251 Don't let maintainer-*-check targets force a version update.
3252 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
3253 handled.
3254
3255 2008-11-17 Di-an Jan <dianj@freeshell.org>
3256
3257 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
3258 Align menus. Adjust word wrapping. Use node names for menu names.
3259 (Examples): Don't abbreviate node names.
3260 (LocalWords): Remove abbreviations.
3261 (Copying): Make description a sentence.
3262 (Java Action Features): Remove period to match the rest of menu.
3263
3264 2008-11-17 Di-an Jan <dianj@freeshell.org>
3265
3266 Handles several --enable-gcc-warnings.
3267 * src/getargs.c (command_line_location): Set parameters to void.
3268 * src/output.c (symbol_type_name_cmp): Make static.
3269 (symbols_by_type_name): Set parameters to void.
3270 (symbol_definitions_output): Remove unused parameter. Rename as...
3271 (prepare_symbol_definitions): this.
3272 (muscles_output): Move symbol_definitions_output to...
3273 (output): here as prepare_symbol_definitions.
3274 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
3275 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
3276
3277 2008-11-17 Di-an Jan <dianj@freeshell.org>
3278
3279 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
3280 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
3281
3282 2008-11-16 Akim Demaille <demaille@gostai.com>
3283
3284 Add missing $(EXEEXT).
3285 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
3286 "src/bison$(EXEEXT)".
3287 Reported by Di-an Jan.
3288
3289 2008-11-15 Akim Demaille <demaille@gostai.com>
3290
3291 * TODO: Update.
3292
3293 2008-11-15 Akim Demaille <demaille@gostai.com>
3294
3295 Formatting changes.
3296 * tests/input.at: here.
3297
3298 2008-11-15 Akim Demaille <demaille@gostai.com>
3299
3300 Remove duplicate header inclusion.
3301 * src/LR0.c: here.
3302
3303 2008-11-15 Akim Demaille <demaille@gostai.com>
3304
3305 * src/parse-gram.h, src/parse-gram.c: Regen.
3306
3307 2008-11-15 Akim Demaille <demaille@gostai.com>
3308
3309 Support parametric types.
3310
3311 There are two issues to handle: first scanning nested angle
3312 bracket pairs to support types such as std::pair< std::string,
3313 std::list<std::string> > >.
3314
3315 Another issue is to address idiosyncracies of C++: do not glue two
3316 closing angle brackets together (otherwise it's operator>>), and
3317 avoid sticking blindly a TYPE to the opening <, as it can result
3318 in '<:' which is a digraph for '['.
3319
3320 * src/scan-gram.l (brace_level): Rename as...
3321 (nesting): this.
3322 (SC_TAG): New.
3323 Implement support for complex tags.
3324 (tag): Accept
3325 , but not <.
3326 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
3327 (b4_symbol_variant): Leave space around types as parameters.
3328 * examples/variant.yy: Use nested template types and leading ::.
3329 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
3330 Rename as...
3331 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
3332 * tests/c++.at: Test parametric types.
3333
3334 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3335
3336 Test token.prefix.
3337 This is not sufficient, but we test at least that the make_SYMBOL
3338 interface is not affected by token.prefix. A more general test
3339 will be implemented when the support of token.prefix is generalized
3340 to more skeletons.
3341
3342 * tests/c++.at: One more variant test, using token.prefix.
3343
3344 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3345
3346 Test the make_TOKEN interface.
3347 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
3348 Factor the common code in yylex.
3349 Use it to test "%define lex_symbol".
3350
3351 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3352
3353 Formatting change.
3354
3355 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3356
3357 Simplify code for variants bench marks.
3358 * etc/bench.pl.in (&generate_grammar_list): Define and use
3359 location_type.
3360 Factor the common code in yylex.
3361
3362 2008-11-15 Akim Demaille <demaille@gostai.com>
3363
3364 Better error message.
3365 * bootstrap (find_tool): Fix the error message.
3366
3367 2008-11-15 Akim Demaille <demaille@gostai.com>
3368
3369 Update variant.yy to newest interface.
3370 * examples/variant.yy: Define lex_symbol.
3371 Adjust.
3372
3373 2008-11-15 Akim Demaille <demaille@gostai.com>
3374
3375 Don't use locations in variant.yy.
3376 * examples/variant.yy: Adjust to not using locations.
3377
3378 2008-11-15 Akim Demaille <demaille@gostai.com>
3379
3380 Comment changes.
3381 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
3382 comments for the license.
3383
3384 2008-11-15 Akim Demaille <demaille@gostai.com>
3385
3386 Remove tests/Makefile.am.
3387 * tests/Makefile.am: Rename as...
3388 * tests/local.mk: this.
3389 * Makefile.am, configure.ac: Adjust.
3390 * Makefile.am (DISTCLEANFILES): Define.
3391 (maintainer-check, maintainer-xml-check, maintainer-push-check):
3392 Remove, we no longer need to bounce to the real targets.
3393
3394 2008-11-15 Akim Demaille <demaille@gostai.com>
3395
3396 Comment changes.
3397
3398 2008-11-15 Akim Demaille <demaille@gostai.com>
3399
3400 djgpp/local.mk.
3401 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
3402 * djgpp/local.mk: this new file.
3403
3404 2008-11-15 Akim Demaille <demaille@gostai.com>
3405
3406 Remove doc/Makefile.am.
3407 * doc/Makefile.am: Rename as...
3408 * doc/local.mk: this.
3409 Adjust paths
3410 * Makefile.am, configure.ac: Adjust.
3411 * Makefile.am (MOSTLYCLEANFILES): New.
3412 * src/local.mk: Adjust.
3413
3414 2008-11-15 Akim Demaille <demaille@gostai.com>
3415
3416 Move sc_tight_scope into maint.mk.
3417 It does not work, and I don't know how it was supposed to work: it
3418 seems to be looking for sources in the build tree. I just moved
3419 it at a better place, fixing it is still required.
3420
3421 * src/local.mk (echo): Remove.
3422 (sc_tight_scope): Move to...
3423 * maint.mk: here.
3424
3425 2008-11-15 Akim Demaille <demaille@gostai.com>
3426
3427 Regen.
3428 * src/parse-gram.h, src/parse-gram.h: Regen.
3429
3430 2008-11-15 Akim Demaille <demaille@gostai.com>
3431
3432 Remove src/Makefile.am.
3433 * src/Makefile.am: Rename as...
3434 * src/local.mk: this.
3435 Prefix all the paths with src/.
3436 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
3437 (AM_CPPFLAGS): Find find in builddir/src.
3438 (YACC): Move the flags into...
3439 (AM_YFLAGS): here.
3440 * maint.mk (sc_tight_scope): Disable.
3441 It used to bounce to the version in src/Makefile.am which is now
3442 part of this very Makefile.
3443 * Makefile.am, configure.ac: Adjust.
3444 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
3445 include "..." to find files "here": we are no longer in src/, so
3446 qualify the includes with src/.
3447 * doc/Makefile.am (PREPATH): No longer include the top_builddir
3448 prefix.
3449 (.x.1): Adjust to be able to create src/foo from the top level
3450 Makefile, instead of going bounce to src/Makefile the creation of
3451 foo.
3452
3453 2008-11-15 Akim Demaille <demaille@gostai.com>
3454
3455 Remove useless variable.
3456 * doc/Makefile.am (srcsrcdir): Remove.
3457
3458 2008-11-15 Akim Demaille <demaille@gostai.com>
3459
3460 Remove data/Makefile.am.
3461 * data/Makefile.am: Rename as...
3462 * data/local.mk: this.
3463 Adjust paths.
3464 * Makefile.am, configure.ac: Adjust.
3465
3466 2008-11-15 Akim Demaille <demaille@gostai.com>
3467
3468 Remove etc/Makefile.am.
3469 * etc/Makefile.am: Rename as...
3470 * etc/local.mk: this.
3471 Adjust.
3472 * Makefile.am, configure.ac: Adjust.
3473
3474 2008-11-15 Akim Demaille <demaille@gostai.com>
3475
3476 Remove examples/local.mk.
3477 examples/calc++/Makefile.am might be interesting to keep as is, since
3478 it is an example in itself.
3479
3480 * examples/Makefile.am: Rename as...
3481 * examples/local.mk: this.
3482 Adjust.
3483 * Makefile.am, configure.ac: Adjust.
3484
3485 2008-11-15 Akim Demaille <demaille@gostai.com>
3486
3487 Remove build-aux/Makefile.am.
3488 Recursive Makefiles are really way too slow, let's get rid of some of
3489 them.
3490
3491 * build-aux/Makefile.am: Rename as...
3492 * build-aux/local.mk: this.
3493 Adjust paths.
3494 * Makefile.am, configure.ac: Adjust.
3495
3496 2008-11-15 Akim Demaille <demaille@gostai.com>
3497
3498 Provide convenience constructors for locations and positions.
3499 * data/location.cc (position::position): Accept file, line and
3500 column as arguments with default values.
3501 Always qualify initial line and column literals as unsigned.
3502 (location::location): Provide convenience constructors.
3503
3504 2008-11-15 Akim Demaille <demaille@gostai.com>
3505
3506 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
3507 token type.
3508 Using template buys us nothing, and makes it uselessly complex to
3509 construct a symbol. Besides, it could not be generalized to other
3510 languages, while make_FOO would work in C/Java etc.
3511
3512 * data/lalr1.cc (b4_symbol_): New.
3513 (b4_symbol): Use it.
3514 (b4_symbol_constructor_declaration_)
3515 (b4_symbol_constructor_definition_): Instead of generating
3516 specializations of an overloaded template function, just generate
3517 several functions whose names are forged from the token names
3518 without the token.prefix.
3519 (b4_symbol_constructor_declarations): Generate them for all the
3520 symbols, not just by class of symbol type, now that instead of
3521 specializing a function template by the token, we generate a
3522 function named after the token.
3523 (b4_symbol_constructor_specialization_)
3524 (b4_symbol_constructor_specializations): Remove.
3525 * etc/bench.pl.in: Adjust to this new API.
3526
3527 2008-11-13 Akim Demaille <demaille@gostai.com>
3528
3529 %define token.prefix.
3530 Provide a means to add a prefix to the name of the tokens as
3531 output in the generated files. Because of name clashes, it is
3532 good to have such a prefix such as TOK_ that protects from names
3533 such as EOF, FILE etc. But it clutters the grammar itself.
3534
3535 * data/bison.m4 (token.prefix): Empty by default.
3536 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
3537 * data/lalr1.cc (b4_symbol): Ditto.
3538
3539 2008-11-13 Akim Demaille <demaille@gostai.com>
3540
3541 Compute at M4 time some of the subtractions.
3542 * data/lalr1.cc (b4_subtract): New.
3543 (b4_rhs_data): Use it.
3544
3545 2008-11-13 Akim Demaille <demaille@gostai.com>
3546
3547 symbol::token.
3548 This allows the user to get the type of a token returned by yylex.
3549
3550 * data/lalr1.cc (symbol::token): New.
3551 (yytoknum_): Define when %define lex_symbol, independently of
3552 %debug.
3553 (yytoken_number_): Move into...
3554 (symbol::token): here, since that's the only use.
3555 The other one is YYPRINT which was not officially supported
3556 by lalr1.cc, and anyway it did not work since YYPRINT uses this
3557 array under a different name (yytoknum).
3558
3559 2008-11-13 Akim Demaille <demaille@gostai.com>
3560
3561 YYERRCODE.
3562 * TODO (YYERRCODE): Mention the case of $undef.
3563
3564 2008-11-13 Akim Demaille <demaille@gostai.com>
3565
3566 TODO: YYPRINT.
3567 * TODO (YYPRINT): New.
3568
3569 2008-11-13 Akim Demaille <demaille@gostai.com>
3570
3571 Comment changes.
3572 * data/lalr1.cc, data/yacc.c: Fix the description of the
3573 yytranslate and yytoknum tables.
3574
3575 2008-11-13 Akim Demaille <demaille@gostai.com>
3576
3577 Define make_symbol in the header.
3578 To reach good performances these functions should be inlined (yet
3579 this is to measure precisely). To this end they must be available
3580 to the caller.
3581
3582 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
3583 location_type with the class name.
3584 Since will now be output in the header, declare "inline".
3585 No longer use b4_symbol_constructor_specializations, but
3586 b4_symbol_constructor_definitions in the header.
3587 Don't call it in the *.cc file.
3588
3589 2008-11-13 Akim Demaille <demaille@gostai.com>
3590
3591 Define yytranslate in the header for lex_symbol.
3592 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
3593 into the header file when using %define lex_symbol.
3594 (yytranslate_): Declare inline.
3595
3596 2008-11-13 Akim Demaille <demaille@gostai.com>
3597
3598 Define the constructors of symbol_type in
3599 b4_symbol_constructor_definitions.
3600 The constructors are called by the make_symbol functions, which a
3601 forthcoming patch will move elsewhere. Hence the interest of
3602 putting them together.
3603
3604 The stack_symbol_type does not need to be moved, it is used only
3605 by the parser.
3606
3607 * data/lalr1.cc: Move symbol_type and symbol_base_type
3608 constructors into...
3609 (b4_symbol_constructor_definitions): here.
3610 Adjust.
3611
3612 2008-11-13 Akim Demaille <demaille@gostai.com>
3613
3614 Make it easier to move the definition of yytranslate_.
3615 Forthcoming changes will make it possible to use yytranslate_
3616 from outside the parser implementation file.
3617
3618 * data/lalr1.cc (b4_yytranslate_definition): New.
3619 Use it.
3620
3621 2008-11-13 Akim Demaille <demaille@gostai.com>
3622
3623 Remove useless class specification.
3624 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
3625 to refer to the class name to use a type defined by the class for
3626 arguments of member functions.
3627
3628 2008-11-13 Akim Demaille <demaille@gostai.com>
3629
3630 Finer input type for yytranslate.
3631 This patch is debatable: the tradition expects yylex to return an int
3632 which happens to correspond to token_number (which is an enum). This
3633 allows for instance to return characters (such as '*' etc.). But this
3634 goes against the stronger typing I am trying to have with the new
3635 lex interface which return a symbol_type. So in this case, feed
3636 yytranslate_ with a token_type.
3637
3638 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
3639 expect a token_type.
3640
3641 2008-11-13 Akim Demaille <demaille@gostai.com>
3642
3643 Honor lex-params in %define lex_symbol mode.
3644 * data/lalr1.cc: Use b4_lex_param.
3645
3646 2008-11-13 Akim Demaille <demaille@gostai.com>
3647
3648 Simplify names.
3649 * src/output.c (symbol_definitions_output): Rename symbol
3650 attributes type_name and has_type_name as type and has_type.
3651 * data/lalr1.cc: Adjust uses.
3652
3653 2008-11-13 Akim Demaille <demaille@gostai.com>
3654
3655 Use b4_type_names for the union type.
3656 The union used to compute the size of the variant used to iterate
3657 over the type of all the symbols, with a lot of redundancy. Now
3658 iterate over the lists of symbols having the same type-name.
3659
3660 * data/lalr1.cc (b4_char_sizeof_): New.
3661 (b4_char_sizeof): Use it.
3662 Adjust to be called with a list of numbers instead of a single
3663 number.
3664 Adjust its caller for new-line issues.
3665
3666 2008-11-13 Akim Demaille <demaille@gostai.com>
3667
3668 Define the "identifier" of a symbol.
3669 Symbols may have several string representations, for instance if
3670 they have an alias. What I call its "id" is a string that can be
3671 used as an identifier. May not exist.
3672
3673 Currently the symbols which have the "tag_is_id" flag set are
3674 those that don't have an alias. Look harder for the id.
3675
3676 * src/output.c (is_identifier): Move to...
3677 * src/symtab.c (is_identifier): here.
3678 * src/symtab.h, src/symtab.c (symbol_id_get): New.
3679 * src/output.c (symbol_definitions_output): Use it to define "id"
3680 and "has_id".
3681 Remove the definition of "tag_is_id".
3682 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
3683 "tag_is_id" were used to produce code.
3684 We still use "tag" for documentation.
3685
3686 2008-11-11 Akim Demaille <demaille@gostai.com>
3687
3688 Locations are no longer required by lalr1.cc.
3689 * data/lalr1.cc (_b4_args, b4_args): New.
3690 Adjust all uses of locations to make them optional.
3691 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
3692 (AT_CHECK_NAMESPACE): Check the use of locations.
3693 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
3694 without locations with lalr1.cc.
3695 Test these cases.
3696 * tests/output.at: Check lalr1.cc with and without location
3697 support.
3698 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
3699 Don't use locations.
3700
3701 2008-11-11 Akim Demaille <demaille@gostai.com>
3702
3703 AT_FULL_COMPILE.
3704 * tests/local.at (AT_FULL_COMPILE): New.
3705 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
3706
3707 2008-11-11 Akim Demaille <demaille@gostai.com>
3708
3709 Support parens in calc++.
3710 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
3711 * examples/calc++/test (run): Check the expected output.
3712 Adjust callers.
3713 Check parens too.
3714
3715 2008-11-11 Akim Demaille <demaille@gostai.com>
3716
3717 Simplify lalr1.cc since %defines is mandatory.
3718 * data/lalr1.cc: Remove useless calls to b4_defines_if.
3719
3720 2008-11-11 Akim Demaille <demaille@gostai.com>
3721
3722 TODO: yyfmt.
3723 * TODO (yysyntax_error): New item.
3724
3725 2008-11-11 Akim Demaille <demaille@gostai.com>
3726
3727 Prefer M4 to CPP.
3728 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
3729 YYERROR_VERBOSE.
3730
3731 2008-11-11 Akim Demaille <demaille@gostai.com>
3732
3733 Support i18n of the parse error messages.
3734 * TODO (lalr1.cc/I18n): Remove.
3735 * data/lalr1.cc (yysyntax_error_): Support the translation of the
3736 error messages, as done in yacc.c.
3737 Stay within the yy* pseudo namespace.
3738
3739 2008-11-11 Akim Demaille <demaille@gostai.com>
3740
3741 More TODO.
3742 * TODO (single stack, yysyntax_error): New.
3743
3744 2008-11-11 Akim Demaille <demaille@gostai.com>
3745
3746 Make it possible to return a symbol_type from yylex.
3747 * data/lalr1.cc (b4_lex_symbol_if): New.
3748 (parse): When lex_symbol is defined, expected yylex to return the
3749 complete lookahead.
3750 * etc/bench.pl.in (generate_grammar_list): Extend to support this
3751 yylex interface.
3752 (bench_variant_parser): Exercise it.
3753
3754 2008-11-11 Akim Demaille <demaille@gostai.com>
3755
3756 Remove useless bench case.
3757 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
3758 no longer used.
3759
3760 2008-11-11 Akim Demaille <demaille@gostai.com>
3761
3762 Improve display of directives.
3763 * etc/bench.pl.in (parse_term): Don't add useless eol.
3764
3765 2008-11-11 Akim Demaille <demaille@gostai.com>
3766
3767 Use string_cast in the bench.
3768 * etc/bench.pl.in (generate_grammar_list): Define and use
3769 string_cast.
3770
3771 2008-11-11 Akim Demaille <demaille@gostai.com>
3772
3773 Replace yychar with a Boolean.
3774 * data/lalr1.cc (parse::yychar): Replace by...
3775 (parse::yyempty): this.
3776
3777 2008-11-11 Akim Demaille <demaille@gostai.com>
3778
3779 Factor the tables.
3780 * TODO: New item.
3781
3782 2008-11-11 Akim Demaille <demaille@gostai.com>
3783
3784 Let yytranslate handle the eof case.
3785 * data/lalr1.cc (yytranslate_): Handle the EOF case.
3786 Adjust callers.
3787 No longer expect yychar to be equal to yyeof_, rather, test the
3788 lookahead's (translated) kind.
3789
3790 2008-11-11 Akim Demaille <demaille@gostai.com>
3791
3792 yychar cannot be empty in yyerrlab.
3793 * TODO (yychar == yyempty_): New.
3794 * data/lalr1.cc: Remove the handling of this case.
3795 This eases forthcoming changes related to yychar and yytranslate.
3796
3797 2008-11-11 Akim Demaille <demaille@gostai.com>
3798
3799 Bench: syntactic sugar for %define/#define.
3800 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
3801 (&bench_push_parser, bench_variant_parser): Use this feature.
3802 (&eat): New.
3803 Use it.
3804
3805 2008-11-11 Akim Demaille <demaille@gostai.com>
3806
3807 Less memory pressure on the "list" bench.
3808 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
3809 the values, to limit memory pressure.
3810
3811 2008-11-11 Akim Demaille <demaille@gostai.com>
3812
3813 Introduce make_symbol.
3814 make_symbol provides a means to construct a full symbol (kind,
3815 value, location) in a single shot. It is meant to be a Symbol
3816 constructor, parameterized by the symbol kind so that overloading
3817 would prevent incorrect kind/value pairs. Unfortunately
3818 parameterized constructors do not work well in C++ (unless the
3819 parameter also appears as an argument, which is not acceptable),
3820 hence the use of a function instead of a constructor.
3821
3822 * data/lalr1.cc (b4_symbol_constructor_declaration_)
3823 (b4_symbol_constructor_declarations)
3824 (b4_symbol_constructor_specialization_)
3825 (b4_symbol_constructor_specializations)
3826 (b4_symbol_constructor_definition_)
3827 (b4_symbol_constructor_definitions): New.
3828 Use them where appropriate to generate declaration, declaration of
3829 the specializations, and implementations of the templated
3830 overloaded function "make_symbol".
3831 (variant::variant): Always define a default ctor.
3832 Also provide a copy ctor.
3833 (symbol_base_type, symbol_type): New ctor overloads for value-less
3834 symbols.
3835 (symbol_type): Now public, so that functions such as yylex can use
3836 it.
3837
3838 2008-11-11 Akim Demaille <demaille@gostai.com>
3839
3840 Inform m4 whether a tag is a valid id.
3841 * src/output.c (is_identifier): New.
3842 (symbol_definitions_output): Use it to define tag_is_id.
3843 But maybe this should be done at m4 level?
3844
3845 2008-11-11 Akim Demaille <demaille@gostai.com>
3846
3847 Test 214 was failing: it greps with a pattern containing [ ]*
3848 which obviously meant to catch spaces and tabs, but contained only
3849 spaces. Tabulations in sources are a nuisance, so to simplify the
3850 matter, get rid of all the tabulations in the Java sources. The
3851 other skeletons will be treated equally later.
3852
3853 * data/java.m4, data/lalr1.java: Untabify.
3854 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
3855 tabulations are no longer generated.
3856
3857 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
3858
3859 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
3860 * configure.ac: Adjust usage.
3861 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
3862 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
3863 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
3864
3865 2008-11-10 Di-an Jan <dianj@freeshell.org>
3866
3867 Workaround Java's ``code too large'' problem for parser tables
3868 in most cases, by using one function per initialization.
3869 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
3870 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
3871 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
3872 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
3873 (yytname_): Use b4_typed_parser_table.
3874 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
3875 ``code too large'' error.
3876
3877 2008-11-10 Di-an Jan <dianj@freeshell.org>
3878
3879 * NEWS: Document them.
3880
3881 General Java skeleton improvements.
3882 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
3883 using gcj < 4.3 in the testsuite, according to comments in
3884 gnulib/m4/javacomp.m4.
3885 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
3886 location_type, position_type): Remove extraneous brackets from
3887 b4_percent_define_default.
3888 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
3889 m4_define and m4_define_default.
3890 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
3891 which marks the end of user code with appropriate syncline, like all
3892 the other skeletons.
3893 (b4_user_post_prologue): Add. Don't silently drop.
3894 (yylex): Remove.
3895 (parse): Inline yylex.
3896 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
3897 (%{...%}): Fix typo of %code imports.
3898 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
3899
3900 Support annotations on parser class with %define annotations.
3901 * data/lalr1.java (annotations): Add to parser class modifier.
3902 * doc/bison.texinfo (Java Parser Interface): Document
3903 %define annotations.
3904 (Java Declarations Summary): Document %define annotations.
3905 * tests/java.at (Java parser class modifiers): Test annotations.
3906
3907 Do not generate code for %error-verbose unless requested.
3908 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
3909 Make private. Make conditional on %error-verbose.
3910 (getErrorVerbose, setErrorVerbose): New.
3911 (yytnamerr_): Make conditional on %error-verbose.
3912 (yysyntax_error): Make some code conditional on %error-verbose.
3913 * doc/bison.texinfo (Java Bison Interface): Remove the parts
3914 about %error-verbose having no effect.
3915 (getErrorVerbose, setErrorVerbose): Document.
3916
3917 Move constants for token names to Lexer interface.
3918 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
3919 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
3920 (parse): Qualify EOF to Lexer.EOF.
3921 * doc/bison.texinfo (Java Parser Interface): Move documentation of
3922 EOF and token names to Java Lexer Interface.
3923 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
3924
3925 Make yyerror public.
3926 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
3927 (yyerror): Change to public. Add Javadoc comments. Use longer
3928 parameter names. Make the body rather than the declarator
3929 conditional on %locations.
3930 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
3931
3932 Allow user to add code to the constructor with %code init.
3933 * data/java.m4 (b4_init_throws): New, for %define init_throws.
3934 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
3935 Add %code init to the front of the constructor body.
3936 * doc/bison.texinfo (YYParser.YYParser): Document %code init
3937 and %define init_throws.
3938 (Java Declarations Summary): Document %code init and
3939 %define init_throws.
3940 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
3941 (Java constructor init and init_throws): Add tests.
3942
3943 2008-11-10 Akim Demaille <demaille@gostai.com>
3944
3945 Update TODO.
3946 * TODO (-D): is implemented.
3947 (associativity): Same precedence must have the same associativity.
3948 For instance, how can a * b / c be parsed if * is %left and / is
3949 %right?
3950 (YYERRORCODE, YYFAIL, YYBACKUP): New.
3951
3952 2008-11-10 Akim Demaille <demaille@gostai.com>
3953
3954 Formatting changes.
3955
3956 2008-11-10 Akim Demaille <demaille@gostai.com>
3957
3958 More information about the symbols.
3959 * src/output.c (type_names_output): Document all the symbols,
3960 including those that don't have a type-name.
3961 (symbol_definitions_output): Define "is_token" and
3962 "has_type_name".
3963 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
3964 type-name, now that they are defined too in b4_type_names.
3965
3966 2008-11-10 Akim Demaille <demaille@gostai.com>
3967
3968 Regen.
3969
3970 2008-11-10 Akim Demaille <demaille@gostai.com>
3971
3972 Make parser::yytranslate static.
3973 Small speedup (1%) on the list grammar. And makes yytranslate_
3974 available in non member functions.
3975
3976 * data/lalr1.cc (yytranslate_): Does not need to be a instance
3977 function.
3978
3979 2008-11-10 Akim Demaille <demaille@gostai.com>
3980
3981 Avoid trailing spaces.
3982 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
3983 * data/lalr1.cc: Don't indent before rule and symbol actions, as
3984 they can be empty, and anyway this incorrectly indents the first
3985 action.
3986
3987 2008-11-10 Akim Demaille <demaille@gostai.com>
3988
3989 Comment changes.
3990
3991 2008-11-10 Akim Demaille <demaille@gostai.com>
3992
3993 Use "enum" for integral constants.
3994 This is just nicer to read, I observed no speedup.
3995
3996 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
3997 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
3998 (yyuser_token_number_max_, yyundef_token_): Move into...
3999 (yytranslate_): here.
4000
4001 2008-11-10 Akim Demaille <demaille@gostai.com>
4002
4003 Shortcuts in bench directives.
4004 * etc/bench.pl.in (parse_dirs): New.
4005 Use it.
4006 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
4007 Create the benches in "benches/".
4008
4009 2008-11-10 Akim Demaille <demaille@gostai.com>
4010
4011 Formatting changes.
4012 * data/lalr1.cc: here.
4013
4014 2008-11-10 Akim Demaille <demaille@gostai.com>
4015
4016 Adjust verbose message to using emacs.
4017 * etc/bench.pl.in: Inform compilation-mode when we change the
4018 directory.
4019 (generate_grammar_list): Recognize %define "variant" in addition
4020 to %define variant.
4021
4022 2008-11-10 Akim Demaille <demaille@gostai.com>
4023
4024 Classify symbols by type-name.
4025 * src/uniqstr.h (UNIQSTR_CMP): New.
4026 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
4027 (type_names_output): New.
4028 (muscles_output): Use it.
4029 * data/lalr1.cc (b4_symbol_action_): Remove.
4030 (b4_symbol_case_, b4_type_action_): New.
4031 Adjust uses of b4_symbol_action_ to use b4_type_action_.
4032
4033 2008-11-10 Akim Demaille <demaille@gostai.com>
4034
4035 Change the handling of the symbols in the skeletons.
4036 Before we were using tables which lines were the symbols and which
4037 columns were things like number, tag, type-name etc. It is was
4038 difficult to extend: each time a column was added, all the numbers had
4039 to be updated (you asked for colon $2, not for "tag"). Also, it was
4040 hard to filter these tables when only a subset of the symbols (say the
4041 tokens, or the nterms, or the tokens that have and external number
4042 *and* a type-name) was of interest.
4043
4044 Now instead of monolithic tables, we define one macro per cell. For
4045 instance "b4_symbol(0, tag)" is a macro name which contents is
4046 self-decriptive. The macro "b4_symbol" provides easier access to
4047 these cells.
4048
4049 * src/output.c (type_names_output): Remove.
4050 (symbol_numbers_output, symbol_definitions_output): New.
4051 (muscles_output): Call them.
4052 (prepare_symbols): Define b4_symbols_number.
4053
4054 2008-11-10 Akim Demaille <demaille@gostai.com>
4055
4056 --trace=muscles
4057 * src/getargs.h, src/getargs.c (trace_muscle): New.
4058 (trace_types, trace_args): Support it.
4059 * src/output.c (output_skeleton): Use it.
4060
4061 2008-11-10 Akim Demaille <demaille@gostai.com>
4062
4063 muscles_output.
4064 * src/output.c (muscles_output): New, extracted from...
4065 (output_skeleton): here.
4066 Adjust.
4067
4068 2008-11-10 Akim Demaille <demaille@gostai.com>
4069
4070 Formatting changes.
4071
4072 2008-11-10 Akim Demaille <demaille@gostai.com>
4073
4074 Update the variant example.
4075 * examples/variant.yy: Formatting changes.
4076 One stage build.
4077
4078 2008-11-10 Akim Demaille <demaille@gostai.com>
4079
4080 Support constructor with an argument.
4081 This improves the "list" bench by 2%.
4082
4083 * data/lalr1.cc (variant::build): Add an overloaded version with
4084 an argument.
4085 * tests/c++.at (AT_CHECK_VARIANT): Check it.
4086
4087 2008-11-10 Akim Demaille <demaille@gostai.com>
4088
4089 Test variants.
4090 * tests/c++.at (AT_CHECK_VARIANTS): New.
4091 Use it with and without %define assert.
4092
4093 2008-11-10 Akim Demaille <demaille@gostai.com>
4094
4095 Add %precedence support.
4096 Unfortunately it is not possible to reuse the %prec directive. This
4097 is because to please POSIX, we do not require to end the rules with a
4098 semicolon. As a result,
4099
4100 foo: bar %prec baz
4101
4102 is ambiguous: either a rule which precedence is that of baz, or a rule,
4103 and then a declaration of the precedence of the token baz.
4104
4105 * doc/bison.texinfo: Document %precedence.
4106 (Precedence Only): New.
4107 * src/assoc.h, src/assoc.c (precedence_assoc): New.
4108 * src/conflicts.c (resolve_sr_conflict): Support it.
4109 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
4110 Parse it.
4111 * tests/calc.at: Use %precedence for NEG.
4112 * tests/conflicts.at (%precedence does not suffice)
4113 (%precedence suffices): New tests.
4114
4115 2008-11-09 Akim Demaille <demaille@gostai.com>
4116
4117 Make benches in a sub dirs.
4118 * etc/bench.pl.in ($dir): New.
4119 Use it.
4120 Check the use of constructors with an argument.
4121 (bench_variant_parser): Fix.
4122
4123 2008-11-09 Akim Demaille <demaille@gostai.com>
4124
4125 fix eof condition
4126
4127 2008-11-09 Akim Demaille <demaille@gostai.com>
4128
4129 Fix --help.
4130
4131 2008-11-09 Akim Demaille <demaille@gostai.com>
4132
4133 Require the generation of parse-gram.output.
4134 * src/Makefile.am (YACC): Pass --report=all.
4135
4136 2008-11-09 Akim Demaille <demaille@gostai.com>
4137
4138 Formatting changes.
4139
4140 2008-11-09 Akim Demaille <demaille@gostai.com>
4141
4142 Update TODO.
4143 * TODO: Remove obsolete items.
4144 Update others.
4145
4146 2008-11-09 Akim Demaille <demaille@gostai.com>
4147
4148 Enhance bench.pl.
4149 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
4150 (@token, $grammar, $bench): New.
4151 (generate_grammar_variant): Rename as...
4152 (generate_grammar_list): this.
4153 (generate_grammar): Adjust.
4154 (bench_grammar): Rename as...
4155 (bench): this.
4156 Use it in the various bench-marking routines.
4157 (-b, -g): New options.
4158
4159 2008-11-09 Akim Demaille <demaille@gostai.com>
4160
4161 Use a static hierarchy for symbols in the C++ parser.
4162 * data/lalr1.cc (symbol_base_type, symbol_type)
4163 (stack_symbol_type): Make it a static hierarchy.
4164 Adjust dependencies.
4165
4166 2008-11-09 Akim Demaille <demaille@gostai.com>
4167
4168 bench.pl -d, --directive.
4169 * etc/bench.pl.in (@directive): New.
4170 (&bench_grammar): Use it.
4171 (&bench_list_grammar): New, to provide access to the "variant"
4172 grammar.
4173 Use it.
4174 (getopts): Support -d, --directive.
4175
4176 2008-11-09 Akim Demaille <demaille@gostai.com>
4177
4178 Use inline for small operations.
4179 * data/lalr1.cc (symbol_base_type, symbol_type)
4180 (stack_symbol_type): Declare constructor and other operations as
4181 inline.
4182 (yy_destroy_): Inline.
4183
4184 2008-11-09 Akim Demaille <demaille@gostai.com>
4185
4186 Introduce a hierarchy for symbols.
4187 * data/lalr1.cc (symbol_base_type, symbol_type): New.
4188 (data_type): Rename as...
4189 (stack_symbol_type): this.
4190 Derive from symbol_base_type.
4191 (yy_symbol_value_print_): Merge into...
4192 (yy_symbol_print_): this.
4193 Rename as...
4194 (yy_print_): this.
4195 (yydestruct_): Rename as...
4196 (yy_destroy_): this.
4197 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
4198 (parser::parse): yyla is now of symbol_type.
4199 Use its type member instead of yytoken.
4200
4201 2008-11-09 Akim Demaille <demaille@gostai.com>
4202
4203 Rename data_type and stack_symbol_type.
4204 * data/lalr1.cc (data_type): Rename as...
4205 (stack_symbol_type): this.
4206
4207 2008-11-09 Akim Demaille <demaille@gostai.com>
4208
4209 Handle semantic value and location together.
4210 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
4211 yydata.value and yydata.location.
4212 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
4213 (YY_SYMBOL_PRINT): Now take semantic value and location as a
4214 single arg.
4215 Adjust all callers.
4216 (yydestruct_): New overload for a stack symbol.
4217
4218 2008-11-09 Akim Demaille <demaille@gostai.com>
4219
4220 Push a complete symbol, not connected parts.
4221 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
4222 state, value and location.
4223 Adjust callers.
4224
4225 2008-11-09 Akim Demaille <demaille@gostai.com>
4226
4227 Agregate yylval and yylloc.
4228 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
4229 (parser::yyla): this.
4230
4231 2008-11-09 Akim Demaille <demaille@gostai.com>
4232
4233 Rely on the state stack to display reduction traces.
4234 To display rhs symbols before a reduction, we used information
4235 about the rule reduced, which required the tables yyrhs and
4236 yyprhs. Now use rely only on the state stack to get the same
4237 information.
4238
4239 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
4240 Use them.
4241 (parser::yyrhs_, parser::yyprhs_): Remove.
4242 (parser::yy_reduce_print_): Use the state stack.
4243
4244 2008-11-09 Akim Demaille <demaille@gostai.com>
4245
4246 Fuse yyval and yyloc into yylhs.
4247 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
4248 yylhs.
4249 (parse): Replace yyval and yyloc with yylhs.value and
4250 yylhs.location.
4251 After a user action, compute yylhs.state earlier.
4252 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
4253 fresh error_token.
4254
4255 2008-11-09 Di-an Jan <dianj@freeshell.org>
4256
4257 Remove unused variable.
4258 * src/output.c (type_names_output): Remove unused variable sep.
4259
4260 2008-11-09 Paolo Bonzini <bonzini@gnu.org>
4261
4262 Change tests/output.at quoting.
4263 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
4264 expanding arguments.
4265
4266 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
4267
4268 Don't add a semicolon to actions for %skeleton or %language.
4269 It breaks Java test cases as reported by Akim Demaille.
4270 * src/scan-code.l: Implement.
4271
4272 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
4273
4274 Clean up %skeleton and %language priority implementation.
4275 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
4276 remove static qualifier because others will soon need to see it.
4277 (language_prio): Likewise.
4278 (getargs): Use command_line_prio rather than 0.
4279 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
4280 enum fields.
4281 (skeleton_prio): Extern it.
4282 (language_prio): Extern it.
4283 * src/parse-gram.y: Use grammar_prio rather than 1.
4284
4285 2008-11-07 Akim Demaille <demaille@gostai.com>
4286
4287 Moving push traces into yypush_.
4288 * data/lalr1.cc (yypush_): Now takes a optional trace message.
4289 Adjust all uses.
4290
4291 2008-11-07 Akim Demaille <demaille@gostai.com>
4292
4293 The single-stack C++ parser is now the standard one.
4294 * data/lalr1.cc: Rename as...
4295 * data/lalr1-split.cc: this.
4296 * data/lalr1-fusion.cc: Rename as...
4297 * data/lalr1.cc: this.
4298 * etc/bench.pl.in: Adjust.
4299
4300 2008-11-07 Akim Demaille <demaille@gostai.com>
4301
4302 Avoid empty-if warnings.
4303 Reported by Quentin Hocquet.
4304
4305 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
4306 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
4307
4308 2008-11-07 Akim Demaille <demaille@gostai.com>
4309
4310 Pass command line location to skeleton_arg and language_argmatch.
4311 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
4312 The location argument is now mandatory.
4313 Adjust all dependencies.
4314 (getargs): Use command_line_location.
4315
4316 2008-11-07 Akim Demaille <demaille@gostai.com>
4317
4318 -D, --define.
4319 * src/getargs.c (usage): Document -D.
4320 Fix help string for --locations.
4321 (command_line_location): New.
4322 (short_options, long_options, getargs): Support -D, --define.
4323 (getargs): Move -d support at the right place.
4324 * doc/bison.texinfo (Bison Options): Update.
4325 * tests/input.at (%define, --define): New.
4326
4327 2008-11-07 Akim Demaille <demaille@gostai.com>
4328
4329 Initialize the muscle table before parsing the command line.
4330 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
4331 (getargs): Define file_name.
4332 * src/main.c (main): Initialize muscle_tab before calling
4333 getargs.
4334 * src/muscle_tab.c (muscle_init): No longer define file_name, as
4335 its value is not available yet.
4336
4337 2008-11-07 Akim Demaille <demaille@gostai.com>
4338
4339 Locations without columns for command line arguments.
4340 * src/location.c (location_print): Don't display negative columns.
4341 * src/location.h: Document this.
4342
4343 2008-11-07 Akim Demaille <demaille@gostai.com>
4344
4345 Fix --help.
4346 * src/getargs.c (usage): Fix help string for -W.
4347
4348 2008-11-07 Akim Demaille <demaille@gostai.com>
4349
4350 Handle more general types of option arguments.
4351 * build-aux/cross-options.pl: The argument ends at the first
4352 space, not the first non-symbol character.
4353 Use @var for each word appearing the argument description.
4354
4355 2008-11-07 Akim Demaille <demaille@gostai.com>
4356
4357 Destroy the variants that remain on the stack in case of error.
4358 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
4359 destructor.
4360 Display the value only if yymsg is nonnull.
4361 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
4362
4363 2008-11-07 Akim Demaille <demaille@gostai.com>
4364
4365 Add "%define assert" to variants.
4366 This is used to help the user catch cases where some value gets
4367 ovewritten by a new one. This should not happen, as this will
4368 probably leak.
4369
4370 Unfortunately this uncovered a bug in the C++ parser itself: the
4371 lookahead value was not destroyed between two calls to yylex. For
4372 instance if the previous lookahead was a std::string, and then an int,
4373 then the value of the std::string was correctly taken (i.e., the
4374 lookahead was now an empty string), but std::string structure itself
4375 was not reclaimed.
4376
4377 This is now done in variant::build(other&) (which is used to take the
4378 value of the lookahead): other is not only stolen from its value, it
4379 is also destroyed. This incurs a new performance penalty of a few
4380 percent, and union becomes faster again.
4381
4382 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
4383 (b4_variant_if): New.
4384 (variant::built): New.
4385 Use it whereever the status of the variant changes.
4386 * etc/bench.pl.in: Check the penalty of %define assert.
4387
4388 2008-11-07 Akim Demaille <demaille@gostai.com>
4389
4390 Use "%define variant" in bench.pl.
4391 * etc/bench.pl.in: No longer use the pseudo directive %variants,
4392 just use %define variants.
4393
4394 2008-11-07 Akim Demaille <demaille@gostai.com>
4395
4396 Regen.
4397 * src/parse-gram.h, src/parse-gram.c: Regen.
4398
4399 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
4400
4401 Fix user actions without a trailing semicolon.
4402 Reported by Sergei Steshenko at
4403 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
4404 * THANKS (Sergei Steshenko): Add.
4405 * src/scan-code.l (SC_RULE_ACTION): Fix it.
4406 * tests/regression.at (Fix user actions without a trailing semicolon):
4407 New test case.
4408
4409 2008-11-04 Akim Demaille <demaille@gostai.com>
4410
4411 Use b4_copyright_years.
4412 * data/yacc.c (b4_copyright_years): New.
4413 Fix its value according to the comments in the file.
4414 Use it and undefine it.
4415
4416 2008-11-04 Akim Demaille <demaille@gostai.com>
4417
4418 Formatting changes.
4419 * data/lalr1-fusion.cc, src/parse-gram.y: here.
4420
4421 2008-11-04 Akim Demaille <demaille@gostai.com>
4422
4423 Formatting changes.
4424 * data/lalr1-fusion.cc: here.
4425
4426 2008-11-04 Akim Demaille <demaille@gostai.com>
4427
4428 Use strict on bench.pl.
4429 * etc/bench.pl.in (&run, &generate_grammar): New.
4430 Rename the grammar generating functions for consistency.
4431 Change the interface so that the list of benches to run is passed
4432 as (optionless) arguments.
4433 (&compile): Use &run.
4434
4435 2008-11-04 Akim Demaille <demaille@gostai.com>
4436
4437 Remove spurious initial empty lines.
4438 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
4439 * data/yacc.c: End the @output lines with an @.
4440
4441 2008-11-04 Akim Demaille <demaille@gostai.com>
4442
4443 Improve the display of sizes.
4444 * etc/bench.p.in: Higher precision.
4445 Sort by decreasing size.
4446
4447 2008-11-04 Akim Demaille <demaille@gostai.com>
4448
4449 Don't memcpy C++ structures.
4450 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
4451 arguments.
4452 (variant::build): New overload for
4453 copy-construction-that-destroys.
4454 (variant::swap): New.
4455 (parser::yypush_): Use it in variant mode.
4456
4457 2008-11-04 Akim Demaille <demaille@gostai.com>
4458
4459 Better defaults for bench.pl.
4460 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
4461 default values.
4462 Adjust &verbose uses.
4463 (-q, --quiet): New.
4464
4465 2008-11-04 Akim Demaille <demaille@gostai.com>
4466
4467 Make variant.yy more complex.
4468 std::list cannot be copied via memcpy, they are more demanding than
4469 std::string. Use one std::list to strengthen the test.
4470
4471 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
4472 Adjust.
4473 Create a list of strings, instead of a single large string.
4474
4475 2008-11-04 Akim Demaille <demaille@gostai.com>
4476
4477 bench.pl --bench.
4478 * etc/bench.pl.in (--bench, $bench): New.
4479
4480 2008-11-04 Akim Demaille <demaille@gostai.com>
4481
4482 Sort methods.
4483 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
4484 Define it after as().
4485
4486 2008-11-04 Akim Demaille <demaille@gostai.com>
4487
4488 Useless parens.
4489 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
4490
4491 2008-11-04 Akim Demaille <demaille@gostai.com>
4492
4493 Issue missing synclines after user actions.
4494 * data/c.m4 (b4_case): Issue synclines on the output file.
4495
4496 2008-11-04 Akim Demaille <demaille@gostai.com>
4497
4498 Remove trailing empty line.
4499 * data/lalr1-fusion.cc: Don't add an empty line after the user's
4500 epilogue.
4501
4502 2008-11-04 Akim Demaille <demaille@gostai.com>
4503
4504 Fix output of copyright years.
4505 * data/bison.m4 (b4_copyright): Fix the indentation of the
4506 copyright year paragraph.
4507 Use b4_copyright_years when no years are given.
4508 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
4509 (b4_copyright_years): New.
4510 Use it.
4511
4512 2008-11-04 Akim Demaille <demaille@gostai.com>
4513
4514 Avoid the spurious initial empty line.
4515 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
4516 the end of @output request to suppress the empty line that
4517 results.
4518
4519 2008-11-04 Akim Demaille <demaille@gostai.com>
4520
4521 Remove parser::rhs_number_type.
4522 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
4523 (yyrhs_): Use b4_table_define.
4524
4525 2008-11-04 Akim Demaille <demaille@gostai.com>
4526
4527 Fix iteration type.
4528 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
4529
4530 2008-11-04 Akim Demaille <demaille@gostai.com>
4531
4532 Factor the declaration of the integer tables.
4533 * data/lalr1-fusion.cc (b4_table_define): New.
4534 Use it.
4535
4536 2008-11-03 Akim Demaille <demaille@gostai.com>
4537
4538 Fix indentation of tables in lalr1.cc
4539 * data/lalr1-fusion.cc: Fix the indentation.
4540
4541 2008-11-03 Akim Demaille <demaille@gostai.com>
4542
4543 Destroy the lhs symbols after reduction.
4544 * data/lalr1-fusion.cc (parse): After the user action, when in
4545 variant mode, destroy the lhs symbols.
4546
4547 2008-11-03 Akim Demaille <demaille@gostai.com>
4548
4549 Simplify yysyntax_error_ use.
4550 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
4551 type, but make it unnamed in the declaration when it is not used.
4552
4553 2008-11-03 Akim Demaille <demaille@gostai.com>
4554
4555 Let yy::variant::build return an lvalue.
4556 * data/lalr1-fusion.cc (variant::build): Return a reference to the
4557 object.
4558
4559 2008-11-03 Akim Demaille <demaille@gostai.com>
4560
4561 Define yy::variant only when needed.
4562 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
4563 used.
4564
4565 2008-11-03 Akim Demaille <demaille@gostai.com>
4566
4567 Bench the three-stack lalr1.cc.
4568 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
4569 one-stack one.
4570
4571 2008-11-03 Akim Demaille <demaille@gostai.com>
4572
4573 Fail on parse error in calc++.
4574 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
4575 status.
4576 * examples/calc++/test ($me, $number, $exit, run): New.
4577 Use them to propagate errors to the exit status.
4578
4579 2008-11-03 Akim Demaille <demaille@gostai.com>
4580
4581 Don't specify the skeleton twice in the example.
4582 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
4583 file does what is needed.
4584
4585 2008-11-03 Akim Demaille <demaille@gostai.com>
4586
4587 bench: Improve output.
4588 * etc/bench.pl.in (bench_grammar): Tune the printf format.
4589
4590 2008-11-03 Akim Demaille <demaille@gostai.com>
4591
4592 bench: check impact of %debug on variants.
4593 * etc/bench.pl.in (variant_grammar): Fix the computation of
4594 $variant.
4595 Generate a grammar file that can work with or without %debug.
4596 Do use the @directive.
4597 (bench_variant_parser): Check impact of %debug.
4598 (@directives): Rename all the occurrences to...
4599 (@directive): this, for consistency.
4600
4601 2008-11-03 Akim Demaille <demaille@gostai.com>
4602
4603 bench: report the size too.
4604 * etc/bench.pl.in ($iterations): Defaults to -3.
4605 (&bench_grammar): Require hireswallclock.
4606 Compute and display the size of the result.
4607 More comments.
4608
4609 2008-11-03 Akim Demaille <demaille@gostai.com>
4610
4611 bench: More use of the verbosity level.
4612 * etc/bench.pl.in ($verbose, &verbose): New.
4613 Use them.
4614 More POD documentation.
4615
4616 2008-11-03 Akim Demaille <demaille@gostai.com>
4617
4618 bench.pl: a command line interface
4619 * etc/bench.pl.in: More doc.
4620 Some fixes in the documentation.
4621 ($cflags, $iterations, &help, &getopt): New.
4622 Use them.
4623 (&variant_grammar): Let the number of stages be 10 times what is
4624 specified.
4625
4626 2008-11-03 Akim Demaille <demaille@gostai.com>
4627
4628 Bench the use of Boost.Variants.
4629 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
4630 New.
4631 (&compile): Be ready to compile C++ parsers.
4632 (&bench_push_parser): Move debug information to the outermost
4633 level.
4634 * THANKS: Add Michiel De Wilde.
4635
4636 2008-11-03 Akim Demaille <demaille@gostai.com>
4637
4638 bench.pl: Pass directives as a list instead of as a string.
4639 * etc/bench.pl.in (&directives): New.
4640 (&triangular_grammar, &calc_grammar): Use it to format the Bison
4641 directives.
4642 (&triangular_grammar): Do use the directives (were ignored).
4643 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
4644 directives.
4645
4646 2008-11-03 Akim Demaille <demaille@gostai.com>
4647
4648 Improve genericity of bench.pl.
4649 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
4650 argument.
4651 (&bench_push_parser): New.
4652 Call it.
4653
4654 2008-11-03 Akim Demaille <demaille@gostai.com>
4655
4656 Add documentation to bench.pl.
4657 * etc/bench.pl.in: Comment changes.
4658
4659 2008-11-03 Akim Demaille <demaille@gostai.com>
4660
4661 Fuse the three stacks into a single one.
4662
4663 In order to make it easy to perform benchmarks to ensure that
4664 there are no performance loss, lalr1.cc is forked into
4665 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
4666 lalr1.cc.
4667
4668 Meanwhile, to make sure that lalr1-fusion.cc is correctly
4669 exercized by the test suite, the user must install a symbolic link
4670 from lalr1.cc to it.
4671
4672 Instead of having three stacks (state, value, location), use a
4673 stack of triples. This considerably simplifies the code (and it
4674 will be easier not to require locations as currently does the C++
4675 parser), and also gives a 10% speedup according to
4676 etc/bench (probably mainly since memory allocation is done once
4677 instead of three times).
4678
4679 Another motivation is to make it easier to destruct properly
4680 semantic values: now that they are bound to their state (hence
4681 symbol type) it will be easier to call the appropriate destructor.
4682
4683 These changes should probably benefit the C parser too.
4684
4685 * data/lalr1.cc: Copy as...
4686 * data/lalr1-fusion.cc: this new file.
4687 (b4_rhs_value, b4_rhs_location): New definitions overriding those
4688 from c++.m4.
4689 (state_stack_type, semantic_stack_type, location_stack_type)
4690 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
4691 (data_type, stack_type, yystack_): New.
4692 (YYLLOC_DEFAULT, yypush_): Adjust.
4693 (yyerror_range): Now based on data_type, not location_type.
4694
4695 2008-11-03 Akim Demaille <demaille@gostai.com>
4696
4697 Push the state, value, and location at the same time.
4698 This is needed to prepare a forthcoming patch that fuses the three
4699 stacks into one.
4700
4701 * data/lalr1.cc (parser::yypush_): New.
4702 (parser::yynewstate): Change the semantics: instead of arriving to
4703 this label when value and location have been pushed, but yystate
4704 is to be pushed on the state stack, now the three of them must
4705 have been pushed before. yystate still must be the new state.
4706 This allows to use yypush_ everywhere instead of individual
4707 handling of the stacks.
4708
4709 2008-11-03 Akim Demaille <demaille@gostai.com>
4710
4711 Prefer references to pointers.
4712 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
4713 definition to use references instead of pointers.
4714 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
4715 Take the value and location as references.
4716 Adjust callers.
4717
4718 2008-11-03 Akim Demaille <demaille@gostai.com>
4719
4720 stack::size instead of stack::height.
4721 * data/lalr1.cc (stack::height): Rename as...
4722 (stack::size): this.
4723 Fix the output type.
4724 Comment changes.
4725
4726 2008-11-03 Akim Demaille <demaille@gostai.com>
4727
4728 Use variants to support objects as semantic values.
4729 This patch was inspired by work by Michiel De Wilde. But he used
4730 Boost variants which (i) requires Boost on the user side, (ii) is
4731 slow, and (iii) has useless overhead (the parser knows the type of
4732 the semantic value there is no reason to duplicate this
4733 information as Boost.Variants do).
4734
4735 This implementation reserves a buffer large enough to store the
4736 largest objects. yy::variant implements this buffer. It was
4737 implemented with Quentin Hocquet.
4738
4739 * src/output.c (type_names_output): New.
4740 (output_skeleton): Invoke it.
4741 * data/c++.m4 (b4_variant_if): New.
4742 (b4_symbol_value): If needed, provide a definition for variants.
4743 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
4744 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
4745 (b4_char_sizeof, yy::variant): New.
4746 (parser::parse): If variants are requested, define
4747 parser::union_type, parser::variant, change the definition of
4748 semantic_type, construct $$ before running the user action instead
4749 of performing a default $$ = $1.
4750 * examples/variant.yy: New.
4751 Based on an example by Michiel De Wilde.
4752
4753 2008-11-03 Akim Demaille <demaille@gostai.com>
4754
4755 Parameterize the extraction of semantic values.
4756 To make future changes easier, no longer rely on ".TYPE" being the
4757 way to get a semantic value.
4758
4759 * data/c.m4 (b4_symbol_value): New.
4760 Use it.
4761 * data/c++.m4, data/yacc.c: Use it.
4762 * data/glr.c: Use b4_symbol_value.
4763 (b4_rhs_data): New.
4764 Use it.
4765
4766 2008-11-03 Akim Demaille <demaille@gostai.com>
4767
4768 Prepare easier M4 changes.
4769 * data/lalr1.cc: Use escaped [] instead of literals to prepare
4770 future changes.
4771
4772 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
4773
4774 Initiate further development.
4775 * NEWS: Create an empty section for new entries.
4776 * gnulib: Update submodule to HEAD.
4777
4778 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
4779
4780 * NEWS: Version 2.4.
4781
4782 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
4783
4784 Prepare for next release.
4785 * NEWS: Briefly mention changes since 2.3b.
4786 * README: Say GNU m4 1.4.6, which we've been requiring in release
4787 announcements already, not 1.4.3, which breaks the build.
4788
4789 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
4790
4791 Say %language is experimental.
4792 We're thinking of extending it's effect on output file naming. See the
4793 thread at
4794 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
4795 * NEWS: Say it's experimental.
4796 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
4797 recommend it over %skeleton for now.
4798 (Bison Options): Likewise.
4799 (C++ Bison Interface): Use %skeleton not %language.
4800 (Calc++ Parser): Use %skeleton not %language.
4801 * src/getargs.c (usage): Say it's experimental.
4802
4803 2008-11-01 Di-an Jan <dianj@freeshell.org>
4804 Paolo Bonzini <bonzini@gnu.org>
4805
4806 Support all Java parser class modifiers.
4807 * data/java.m4 (b4_percent_define_get3): New.
4808 (b4_final_if, b4_strictfp_if): New.
4809 * data/lalr1.java (final, strictfp, extends, implements): Support.
4810 * doc/bison.texinfo (final, strictfp, extends, implements): Add
4811 documentation.
4812 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
4813 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
4814 (AT_CHECK_JAVA_GREP): New.
4815 (Java parser class modifiers): New test.
4816 (Java parser class extends and implements): New test.
4817
4818 Model exception propagation better with throws and lex_throws.
4819 * data/java.m4 (b4_list2): New.
4820 (throws): Change default.
4821 * data/lalr1.java (yyaction): Add throws.
4822 (parse): Add lex_throws in addition to throws.
4823 * doc/bison.texinfo (throws, lex_throws): Add documentation.
4824 * tests/java.at (Java throws specifications): New test.
4825
4826 Improve documentation for Java parsers.
4827 * doc/bison.texinfo (Java Parsers): Add subsections.
4828 Don't quote first argument of %define.
4829 (Java Bison Interface): Document output files. Move documentation
4830 of parser class and merge into Java Parser Interface. Document
4831 features that error out. Document directives with no effect.
4832 Move note about Javadoc higher.
4833 (Java Semantic Values): Explicitly mention stype.
4834 Document that generic types cannot be used.
4835 (Java Location Values): Use @deftypeivar. Document constructors.
4836 Correct return value for toString.
4837 (Java Parser Interface): List undocumented constants/fields.
4838 Move documentation of fields added by %parse-param closer to list
4839 of members. Document that token names are added as fields.
4840 Document constructors accurately. Remove error method.
4841 (Java Scanner Interface): Move note on %pure-parser to Java Bison
4842 Interface. Describe %code lexer and yylex accutately.
4843 Remove documentation that does not match the code.
4844 (Java Action Features): New.
4845 (Java Differences): Add reference. Add item on semantic values.
4846 Add note about @{ ... @}. Clarify %% epilogue placement.
4847 (Java Declarations Summary): New.
4848
4849 Fix Java skeleton.
4850 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
4851 (b4_remove_comma): Quote test argument.
4852 (b4_identification): Remove "bison" field.
4853 * tests/java.at (Java parser class and package names): New test.
4854 (Java %parse-param and %lex-param): New test.
4855 (Java stype, position_class and location_class): New test.
4856
4857 2008-10-31 Di-an Jan <dianj@freeshell.org>
4858
4859 * data/lalr1.jave: Update copyright years.
4860 (YYParser): Correct name of "generated from" file in Javadoc:
4861 use b4_file_name instead of @ofile@.
4862 (Location constructor): Correct Javadoc parameter name.
4863 (yylloc): Add missing opening m4 quote after b4_location_if.
4864 This removes a stray [ in the Javadoc of Lexer.getStartPos.
4865 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
4866 (YYParser constructor): Correct Javadoc parameter name.
4867
4868 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
4869
4870 Always put auxiliary code files in the same dir as other output files.
4871 * src/files.c (compute_file_name_parts): When the user specifies
4872 --output but not --file-prefix, extract the directory prefix from the
4873 file prefix not from the grammar file name. This affects the location
4874 of files like location.hh generated by the C++ skeleton. The includes
4875 in the other output files require this fix.
4876 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
4877 for expected output files.
4878 (Output files): Add a test for the above.
4879
4880 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
4881
4882 * gnulib: Update submodule to HEAD.
4883
4884 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4885
4886 Update copyright year.
4887 * src/files.c: Here.
4888
4889 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
4890
4891 Don't overwrite the input file.
4892 * src/files.c (output_file_name_check): Fatal error if using input file
4893 for output.
4894 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
4895 argument.
4896 (Conflicting output files): Add test.
4897
4898 2008-10-28 Akim Demaille <demaille@gostai.com>
4899
4900 Space changes.
4901 * data/lalr1.cc: Formatting changes.
4902
4903 2008-10-28 Akim Demaille <demaille@gostai.com>
4904
4905 Don't define debugging functions when !YYDEBUG.
4906 * data/lalr1.cc (debug_stream, set_debug_stream)
4907 (debug_level_type, debug_level, set_debug_level): Don't
4908 declare them when YYDEBUG is not defined.
4909 The implementation are already YYDEBUG-aware.
4910
4911 2008-10-28 Akim Demaille <demaille@gostai.com>
4912
4913 Prefer "continue" for empty loop bodies.
4914 * etc/bench.pl.in: Use "continue" instead of {}.
4915
4916 2008-10-28 Akim Demaille <demaille@gostai.com>
4917
4918 Space and comments changes.
4919 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
4920 * data/c.m4, data/lalr1.cc: Space changes.
4921
4922 2008-10-28 Akim Demaille <demaille@gostai.com>
4923
4924 Make gnulib a submodule.
4925 * gnulib: New.
4926 * .gitmodules (gnulib): New.
4927
4928 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
4929
4930 Fix yyerror_range for user-defined location type in C++. Reported by
4931 Georg Sauthoff at
4932 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
4933 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
4934 * THANKS (Georg Sauthoff): Add.
4935
4936 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
4937
4938 Update several administrative files mainly to facilitate releasing.
4939 * HACKING (Administrivia): Make the git-merge-changelog notes more
4940 helpful.
4941 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
4942 (Release Procedure): Update for git and add numerous details that were
4943 previously missing.
4944 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
4945 * maint.mk (announcement): Don't list bison as a bootstrap tool so
4946 that announcements don't claim we bootstrapped with whatever bison
4947 happened to be in PATH. Add flex as a bootstrap tool.
4948 * Makefile.maint: Remove, previously replaced by maint.mk.
4949 * Makefile.cfg: Remove, and migrate settings to...
4950 * cfg.mk: ... here for the sake of `make announcement'.
4951 * bootstrap.conf (gnulib_modules): Add announce-gen.
4952 * README: Say GNU Bison instead of just Bison. Suggested by Karl
4953 Berry.
4954
4955 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
4956
4957 Small but important bugfixes for the Java skeleton.
4958 * data/lalr1.java (yyerror): Change Location to b4_location_type.
4959 (yy_symbol_print): Call toString on yyvaluep.
4960
4961 2008-08-29 Akim Demaille <demaille@gostai.com>
4962
4963 Clarify UPDATED use.
4964 * doc/bison.texinfo: It refers to the last edition of this file,
4965 not to the release date of Bison.
4966 Reported by Joel E. Denny.
4967
4968 2008-08-29 Akim Demaille <demaille@gostai.com>
4969
4970 * README: Update FAQ pointer.
4971 Reported by Joel E. Denny.
4972
4973 2008-08-27 Eric Blake <ebb9@byu.net>
4974
4975 Resync m4sugar from autoconf.
4976 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
4977 (m4_init): Adjust to latest m4.git changes.
4978 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
4979 effects.
4980 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
4981 (_m4_list_cmp): Reduce side effects.
4982
4983 2008-08-27 Akim Demaille <demaille@gostai.com>
4984
4985 Check yyerrok in calc.at.
4986 * tests/calc.at (calc.y): Use yyerrok on "( error )".
4987 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
4988 expected.
4989
4990 2008-08-27 Akim Demaille <demaille@gostai.com>
4991
4992 Support yyerrok in lalr1.cc.
4993 YYBACKUP is still to import back into lalr1.cc.
4994 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
4995
4996 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
4997
4998 For maintainer-check*, don't recompile for a $(VERSION) update.
4999 * cfg.mk: New file.
5000 (_is-dist-target): Override the one in GNUmakefile.
5001 * Makefile.am (EXTRA_DIST): Add cfg.mk.
5002
5003 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
5004
5005 Update for recent change to gnulib.
5006 * src/parse-gram.y: Don't include strverscmp.h. It comes from
5007 string.h now.
5008
5009 2008-08-15 Eric Blake <ebb9@byu.net>
5010
5011 Remaining m4sugar merge from autoconf.
5012 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
5013 * data/m4sugar/foreach.m4: New file, copied from autoconf.
5014 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
5015 * src/output.c (output_skeleton): Tell m4 how to find it.
5016
5017 Partial m4sugar merge from autoconf: m4_map.
5018 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
5019 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
5020 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
5021 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
5022 for empty list.
5023 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
5024 Likewise.
5025 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
5026 declares it.
5027
5028 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
5029
5030 Keep .version and PACKAGE_VERSION in sync.
5031 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
5032 dependency, and add comments justifying this in more detail. Discussed
5033 starting at
5034 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
5035
5036 2008-08-06 Eric Blake <ebb9@byu.net>
5037
5038 Partial m4sugar merge from autoconf: m4_shiftn.
5039 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
5040 (m4_shift2, m4_shift3): New macros.
5041 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
5042 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
5043 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
5044 * data/java.m4 (b4_remove_comma): Likewise.
5045
5046 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
5047 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
5048 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
5049 (m4_init): Consolidate wrapped text into single m4_wrap.
5050 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
5051 in wrapped text.
5052
5053 2008-08-05 Eric Blake <ebb9@byu.net>
5054
5055 Partial m4sugar merge from autoconf: builtins, version.m4.
5056 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
5057 (m4_prepend): Remove, as it is unused and inherently quadratic,
5058 whereas m4_append is linear in newer m4.
5059 (m4_mkstemp): New builtin.
5060 (m4_symbols): Make rename conditional.
5061 (m4_version_prereq): Ensure fatal error if used in bison, which
5062 intentionally lacks version.m4.
5063
5064 Fix comments in m4sugar.
5065 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
5066
5067 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
5068
5069 Update for recent .gitignore fix in Gnulib.
5070 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
5071 anchored .gitignore entries.
5072
5073 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
5074
5075 Set gnu or gnits strictness.
5076 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
5077 development and gnits strictness for releases. Based on Eric Blake's
5078 suggestion at
5079 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
5080
5081 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
5082
5083 * NEWS: Clarify documentation of %language.
5084
5085 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
5086
5087 Support usage of git-merge-changelog.
5088 * .gitattributes: New.
5089 * HACKING: Document usage of git-merge-changelog.
5090 * bootstrap: Install git-merge-changelog entries in .git/config
5091 if appropriate.
5092
5093 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
5094
5095 Remove remaining dependence on CVS Id keyword.
5096 * ChangeLog: For the sake of people still using CVS, don't use dollars
5097 when mentioning Id.
5098 * data/xslt/bison.xsl: Remove Id from header comments, where it was
5099 unusual anyway.
5100 * data/xslt/xml2dot.xsl: Likewise.
5101 * data/xslt/xml2text.xsl: Likewise.
5102 * data/xslt/xml2xhtml.xsl: Likewise.
5103 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
5104 * doc/Makefile.am (neutralize): Remove, no longer needed.
5105 (.x.1): Don't use neutralize.
5106 (edit): Don't substitute for ID.
5107 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
5108
5109 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
5110
5111 Fix dependence on computed configure variables.
5112 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
5113 $(top_srcdir)/configure.ac so that changes to computed variables, such
5114 as PACKAGE_VERSION, are seen.
5115 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
5116
5117 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
5118
5119 Update copyright dates for recent changes.
5120 * Makefile.am: Here.
5121 * src/Makefile.am: Here.
5122 * src/reduce.c: Here.
5123 * tests/reduce.at: Here.
5124
5125 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
5126
5127 Use git-version-gen for version names between releases.
5128 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
5129 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
5130 * .prev-version: New.
5131 * .version.in: Remove.
5132 * ChangeLog: Remove the Id previously used for capturing the CVS
5133 revision.
5134 * GNUmakefile: Remove, now copied from Gnulib.
5135 * Makefile.am: Add code suggested by comments in
5136 build-aux/git-version-gen.
5137 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
5138 .prev-version, and .version.
5139 * NEWS (2.3b+): Rename to...
5140 (?.?): ... this because we're dropping the "+" version naming scheme,
5141 but, in general, we still can't be sure of our next release name.
5142 * bootstrap: Add a quick hack to remove from .gitignore the
5143 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
5144 entry. This should really be fixed in gnulib instead.
5145 * bootstrap.conf (gnulib_modules): Add gnumakefile.
5146 * configure.ac (AC_INIT): Set version name by invoking
5147 build-aux/git-version-gen.
5148 (AC_CONFIG_FILES): Remove .version, now generated by
5149 build-aux/git-version-gen.
5150 * maint.mk: New, copied from coreutils.
5151 * doc/.cvsignore (bison.1): Add.
5152 * doc/.gitignore (/bison.1): Add.
5153 * doc/bison.1: Remove, generated.
5154 * src/.cvsignore (revision.c): Remove.
5155 * src/.gitignore (/revision.c): Remove.
5156 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
5157 (BUILT_SOURCES): Remove revision.c.
5158 (revision.c): Remove.
5159 * src/getargs.c (version): Don't print revision after the VERSION.
5160 * src/revision.h: Remove.
5161
5162 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
5163
5164 Fix untranslatable composition of sentences. Reported by Goran
5165 Uddeborg at
5166 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
5167 * THANKS (Goran Uddeborg): Add.
5168 * src/reduce.c (reduce_print): Report the number of nonterminals and
5169 rules useless in the grammar in separate sentences.
5170 * tests/reduce.at (Useless Rules): Update output.
5171 (Reduced Automaton): Likewise.
5172 (Underivable Rules): Likewise.
5173 (Empty Language): Likewise.
5174
5175 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
5176
5177 Fix some .gitignore and .cvsignore problems.
5178 * bootstrap (insert_sorted_if_absent): Replace all uses with...
5179 (insert_vc_ignore): ... this new function, which prepends `/' to all
5180 .gitignore entries before passing them to insert_sorted_if_absent.
5181 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
5182 .cvsignore files are maintained even though Bison developers run
5183 bootstrap while using Git.
5184 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
5185 unneeded by Bison.
5186 (gnulib): Add.
5187 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
5188 unneeded. Reported by Eric Blake.
5189 * lib/.gitignore (/*~): Add.
5190 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
5191 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
5192 Blake.
5193 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
5194
5195 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
5196
5197 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
5198 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
5199 * bootstrap.conf (gnulib_modules): Add unsetenv.
5200 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
5201 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
5202 (/setenv.m4): Add.
5203 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
5204 the first argument because it may become position-dependent, and unset
5205 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
5206 Add comments explaining these issues in more detail.
5207
5208 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
5209
5210 Add .gitignore everywhere based on .cvsignore.
5211 * .gitignore: New.
5212 * build-aux/.gitignore: New.
5213 * data/.gitignore: New.
5214 * doc/.gitignore: New.
5215 * etc/.gitignore: New.
5216 * examples/.gitignore: New.
5217 * examples/calc++/.gitignore: New.
5218 * lib/.gitignore: New.
5219 * m4/.gitignore: New.
5220 * po/.gitignore: New.
5221 * runtime-po/.gitignore: New.
5222 * src/.gitignore: New.
5223 * tests/.gitignore: New.
5224
5225 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
5226
5227 * NEWS (2.3b+): New section, empty for now.
5228 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
5229
5230 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
5231
5232 * NEWS (2.3b): Update release date since there has been a delay in
5233 getting the announcements and tarballs out.
5234
5235 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
5236
5237 * NEWS: Version 2.3b.
5238 * configure.ac (AC_INIT): Likewise.
5239 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
5240
5241 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
5242
5243 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
5244 been doing it for years.
5245 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
5246 (Release Procedure): Add FIXME about make alpha being unmaintained.
5247
5248 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
5249
5250 * data/yacc.c: Reformat m4 a little for readability.
5251 * src/lalr.c (build_relations): Correct comment.
5252
5253 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5254
5255 DJGPP specific issue.
5256 * djgpp/config.sed: Fixes required to run configure scripts generated
5257 by autoconf 2.62.
5258
5259 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
5260
5261 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
5262 coordinator@translationproject.org.
5263
5264 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
5265
5266 * THANKS: Add Eric Blake.
5267
5268 2008-04-23 Eric Blake <ebb9@byu.net>
5269
5270 Revert prior patch, by working around autoconf regression.
5271 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
5272 ("Output file name: ("): Uncomment test.
5273 ("Output file name: )"): Likewise.
5274 Based on an idea from Noah Misch.
5275
5276 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
5277
5278 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
5279 2.61. Reported by Juan Manuel Guerrero at
5280 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
5281 * tests/output.at ("Output file name: ("): Comment out test case for
5282 now.
5283 ("Output file name: )"): Likewise.
5284
5285 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
5286
5287 * GNUmakefile: Update git-version-gen invocation so make dist
5288 succeeds.
5289
5290 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
5291
5292 Update to the current gnulib CVS repository, and fix trigraph handling
5293 in Bison.
5294 * bootstrap: Update gnulib CVS repository URL.
5295 (symlink_to_dir): Encapsulate the code that guarantees the destination
5296 directory exists into...
5297 (check_dst_dir): ... this new function, and...
5298 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
5299 fail when copying files into lib/uniwidth/.
5300 * src/output.c (prepare_symbols): When writing yytname muscles, where
5301 symbol names will be encoded in C-string literals, tell quotearg to
5302 escape trigraphs. This used to be the default in gnulib.
5303 * tests/regression.at (Token definitions): Because of the change in
5304 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
5305 escapes trigraphs in symbol names. Thus, yytname no longer has
5306 trigraphs unnecessarily doubly escaped. Update test case output.
5307 Extend test case to be sure Bison's own error messages will no longer
5308 have trigraphs in symbol names unnecessarily escaped once.
5309
5310 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
5311
5312 Fix make dist infinite loop reported by Juan Manuel Guerrero at
5313 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
5314 * .cvsignore: Add .version.
5315 * .version.in: New.
5316 * bootstrap.conf (gnulib_modules): Add git-version-gen.
5317 * configure.ac (AC_CONFIG_FILES): Add .version.
5318 * build-aux/.cvsignore: Add git-version-gen.
5319
5320 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
5321
5322 * NEWS (2.3a+): Mention that -g now takes an argument.
5323 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
5324 consistency. Update the -g and -x entries now that they take
5325 arguments. Use brackets to indicate optional arguments.
5326 * src/getargs.c (usage): Explain the relationship between arguments of
5327 long and short options more completely. Document --defines and -d
5328 separately since the former takes an argument but, for POSIX Yacc, the
5329 latter does not.
5330 (short_options): Let -W take an optional argument like --warnings.
5331 (getargs): Sort cases.
5332
5333 2008-02-28 Akim Demaille <demaille@gostai.com>
5334
5335 * doc/bison.texinfo: Fix a few typos.
5336
5337 2008-02-28 Akim Demaille <akim@epita.fr>
5338
5339 * doc/bison.texinfo (Bison Options): Document -W.
5340 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
5341
5342 2008-02-28 Akim Demaille <akim@epita.fr>
5343
5344 * src/getargs.c (short_options): Split and sort for readability.
5345 -g and -x take optional arguments, just like their long options.
5346 * build-aux/cross-options.pl: Use /x to make the regexp easier to
5347 understand.
5348 Fix the handling of $opt which resulted in all the argument to be
5349 considered as optional.
5350
5351 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
5352
5353 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
5354 say its interface is experimental.
5355 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
5356 Java.
5357 (Bison Options): In the -L and --language entry, mention Java.
5358 (Java Bison Interface): Say the interface is experimental.
5359 * src/getargs.c (usage): Mention -L and --language.
5360
5361 * NEWS (2.3a+): Say the push parsing interface is experimental.
5362 * doc/bison.texinfo (Push Decl): Likewise.
5363 (Decl Summary): Likewise in the "%define api.push_pull" entry.
5364 (Push Parser Function): Likewise.
5365 (Pull Parser Function): Likewise.
5366 (Parser Create Function): Likewise.
5367 (Parser Delete Function): Likewise.
5368 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
5369 yypull_parse, and yypush_parse entries.
5370
5371 * NEWS (2.3a+): Mention XML support, and say the schema is
5372 experimental.
5373 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
5374 * src/getargs.c (usage): Say the XML schema is experimental.
5375
5376 * NEWS (2.3a+): Say option instead of flag.
5377
5378 2008-02-21 Wojciech Polak <polak@gnu.org>
5379
5380 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
5381 text.
5382
5383 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
5384
5385 Fix impure push parser compile error reported by Bob Rossi at
5386 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
5387 * data/yacc.c: Clean up whitespace in the output a little.
5388 (yypstate_allocated): Define for impure push parsers regardless of
5389 whether the pull interface is also requested.
5390 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
5391 check impure push parsers without the pull interface.
5392
5393 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
5394 yyerror takes arguments specified by %parse-param while yypstate_new
5395 does not.
5396 * doc/bison.texinfo (Parser Create Function): Document that
5397 yypstate_new returns 0 for multiple impure parser instances.
5398 * tests/push.at (Push Parsing: Multiple impure instances): Update
5399 expected stderr output.
5400
5401 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
5402
5403 * runtime-po/POTFILES.in (push.c): Remove.
5404
5405 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
5406
5407 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
5408 * data/push.c: Rename to...
5409 * data/yacc.c: ... this, overwriting it.
5410 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
5411 `%push-pull-parser' -> `%define api.push_pull "both"'.
5412 Remove old yacc.c tests, and update push.c tests to yacc.c.
5413
5414 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
5415
5416 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
5417 `"%code top" blocks' instead of `%code "top" blocks'.
5418 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
5419 Clean up whitespace in the output a little.
5420
5421 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
5422
5423 Fix documentation problems reported by Tim Josling at
5424 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
5425 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
5426 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
5427 integers. Explain the effect of literal string aliases on error
5428 messages. Copy token 0 documentation from the C++ skeleton
5429 documentation.
5430
5431 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
5432
5433 Accept a token number in a %left, %right, or %nonassoc for POSIX
5434 conformance. Reported by Tim Josling at
5435 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
5436 * NEWS (2.3a+): Mention.
5437 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
5438 and code numbers are treated by precedence declarations.
5439 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
5440 of symbols.1.
5441 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
5442 of symbol.
5443 (symbol.prec): New, just like symbol but allows INT.
5444 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
5445 longer holds.
5446 * tests/regression.at (Token number in precedence declaration): New
5447 test case.
5448
5449 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5450
5451 DJGPP specific issues.
5452 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
5453 be changed. Copyright timestamp adjusted.
5454 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
5455 be changed. Copyright timestamp adjusted.
5456 * djgpp/config.site: Copyright timestamp adjusted.
5457 * djgpp/config_h.sed: Copyright timestamp adjusted.
5458 * djgpp/djunpack.bat: Copyright timestamp adjusted.
5459 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
5460 filename translation list.
5461 * djgpp/subpipe.c (init_subpipe): Check the environment variables
5462 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
5463 files shall be created. Before trying to use the temp dir where the
5464 environment variable points to check that the dir really exists. If
5465 not default to the cwd as temp dir. Copyright timestamp adjusted.
5466 * djgpp/subpipe.h: Copyright timestamp adjusted.
5467 * djgpp/testsuite.sed: Copyright timestamp adjusted.
5468
5469 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
5470
5471 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
5472
5473 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
5474
5475 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
5476 Problem reported by Claudio Saavedra in
5477 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
5478
5479 2008-01-05 Wojciech Polak <polak@gnu.org>
5480
5481 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
5482 document's title with the input grammar file name.
5483
5484 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
5485
5486 Automate regression testing of the XML/XSLT implementation. Discussed
5487 starting at
5488 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
5489 * configure.ac (XSLTPROC): New substitution.
5490 * Makefile.am (maintainer-xml-check): New phony target invoking...
5491 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
5492 invoking make maintainer-check with BISON_TEST_XML=1.
5493 * tests/atlocal.in (XSLTPROC): New.
5494 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
5495 not to report reachable memory when Bison is expected to have a
5496 non-zero exit status and (2) to compare XML/XSLT output with --graph
5497 and --report=all output for every working grammar when
5498 BISON_TEST_XML=1.
5499 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
5500 (AT_BISON_CHECK_XML): New.
5501 (AT_QUELL_VALGRIND): New.
5502 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
5503 (AT_CHECK): ... don't redefine this since this was the old way to
5504 quell Valgrind.
5505 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
5506 AT_BISON_CHECK invocations.
5507 * tests/c++.at: Likewise.
5508 * tests/calc.at: Likewise.
5509 * tests/conflicts.at: Likewise.
5510 * tests/cxx-type.at: Likewise.
5511 * tests/existing.at: Likewise.
5512 * tests/glr-regression.at: Likewise.
5513 * tests/headers.at: Likewise.
5514 * tests/input.at: Likewise.
5515 * tests/java.at: Likewise.
5516 * tests/output.at: Likewise.
5517 * tests/push.at: Likewise.
5518 * tests/reduce.at: Likewise.
5519 * tests/regression.at: Likewise.
5520 * tests/sets.at: Likewise.
5521 * tests/skeletons.at: Likewise.
5522 * tests/synclines.at: Likewise.
5523 * tests/torture.at: Likewise.
5524 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
5525 tends to hang xsltproc.
5526 (Big horizontal): Likewise.
5527
5528 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
5529
5530 In XML output, remove redundant class attribute on symbol element.
5531 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
5532 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
5533 look up a symbol to determine whether it's a nonterminal or terminal.
5534 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
5535 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
5536
5537 Add prec/assoc information to XML output.
5538 * src/gram.c (grammar_rules_print_xml): For each rule that has a
5539 %prec, add a percent_prec attribute.
5540 * src/print-xml.c (print_grammar): For each terminal that has a
5541 precedence or associativity, add a prec or assoc attribute.
5542 (xml_indent): New.
5543 (xml_puts): Use xml_indent.
5544 (xml_printf): Use xml_indent.
5545 * src/print-xml.h (xml_indent): Prototype.
5546
5547 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
5548 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5549
5550 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
5551
5552 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
5553 (bison:ruleByNumber): ... this for clarity.
5554 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
5555 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
5556 (xsl:template match="reduction"): Update.
5557 (xsl:template match="item"): Update.
5558 (xsl:template match="reduction"): Update.
5559
5560 In the XML output, don't print the list of rules where symbols appear.
5561 Compute it in XSLT instead. Discussed at
5562 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
5563 * data/xslt/bison.xsl (bison:ruleByLhs): New.
5564 (bison:ruleByRhs): New.
5565 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
5566 bison:ruleByRhs.
5567 (xsl:template match="terminal/rule"): Remove.
5568 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
5569 bison:ruleByRhs.
5570 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
5571 Remove.
5572 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
5573 bison:ruleByRhs and mode="number-link" for rule template.
5574 (xsl:template match="terminal/rule"): Remove.
5575 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
5576 bison:ruleByRhs and mode="number-link" for rule template.
5577 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
5578 Rewrite as...
5579 (xsl:template match="rule" mode="number-link"): ... this.
5580 * src/print-xml.c (print_grammar): Don't print the list of rules.
5581
5582 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
5583
5584 Don't let --report affect XML output; always print all information.
5585 Discussed at
5586 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
5587 * src/conflicts.c (log_resolution): Implement.
5588 * src/print-xml.c (print_core): Implement.
5589 (print_state): Implement.
5590 (print_xml): Implement.
5591
5592 * NEWS (2.3a+): Fix quotes.
5593 * src/parse-gram.y (prologue_declaration): For consistency with -v,
5594 don't let %verbose clear the list specified by --report.
5595
5596 2007-11-26 Akim Demaille <akim@epita.fr>
5597
5598 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
5599
5600 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
5601
5602 In the XML output, list useless and unused symbols and rules with the
5603 useful ones and add a "usefulness" attribute. Discussed starting at
5604 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
5605 * src/gram.c (grammar_rules_partial_print_xml): Remove.
5606 (grammar_rules_print_xml): Print all rules instead of just those
5607 useful in the grammar, and add a "usefulness" attribute.
5608 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
5609 * src/print-xml.c (print_rules_useless_in_parser): Remove.
5610 (print_grammar): Print all nonterminals instead of just useful ones,
5611 and add a "usefulness" attribute to nonterminals and terminals.
5612 (print_xml): Don't print a separate "reductions" or
5613 "rules-useless-in-parser" element.
5614 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
5615 (reduce_xml): Remove.
5616 (reduce_token_unused_in_grammar): New.
5617 (reduce_nonterminal_useless_in_grammar): New.
5618 * src/reduce.h (reduce_xml): Remove prototype.
5619 (reduce_token_unused_in_grammar): Add prototype.
5620 (reduce_nonterminal_useless_in_grammar): Add prototype.
5621 * data/xslt/xml2text.xsl: Update for XML changes.
5622 * data/xslt/xml2xhtml.xsl: Update for XML changes.
5623 * tests/reduce.at (Useless Terminals): Update output.
5624 (Useless Rules): Update output.
5625 (Reduced Automaton): Update output.
5626
5627 Say "Terminals unused in grammar" instead of "Unused terminals".
5628 * NEWS (2.3a+): Update.
5629 * doc/bison.texinfo (Understanding): Update example output.
5630 * src/reduce.c (reduce_output): Implement.
5631 * data/xslt/xml2text.xsl: Implement.
5632 * data/xslt/xml2xhtml.xsl: Implement.
5633
5634 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
5635
5636 Accept --report-file=FILE to override the default `.output' filename.
5637 * NEWS (2.3a+): Mention.
5638 * doc/bison.texinfo (Bison Options): Add an entry.
5639 * src/files.c (compute_output_file_names): Don't override
5640 spec_verbose_file if already set.
5641 * src/getargs.c (usage): Document --report-file.
5642 (REPORT_FILE_OPTION): New anonymous enum member.
5643 (long_options): Add entry for it.
5644 (getargs): Add case for it setting spec_verbose_file.
5645
5646 * build-aux/cross-options.pl: Don't record a short option just because
5647 there's an arg.
5648 * doc/.cvsignore: Add yacc.1.
5649
5650 2007-11-14 Akim Demaille <akim@epita.fr>
5651
5652 * doc/yacc.1.in: New.
5653 * configure.ac, doc/Makefile.am: Adjust.
5654 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
5655 config.h symbol.
5656 Use AC_SUBST for assignments too.
5657 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
5658
5659 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5660
5661 * src/gram.c: Remove comments that duplicate comments in gram.h.
5662
5663 When reporting useless rules and nonterminals, say "useless in grammar"
5664 instead of "useless", and say "useless in parser" instead of "never
5665 reduced". Discussed starting at
5666 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
5667 * NEWS (2.3a+): Mention this change.
5668 * data/xslt/xml2text.xsl: Update output text and expected input XML
5669 element names to match changes below.
5670 * data/xslt/xml2xhtml.xsl: Likewise.
5671 (xsl:template match="bison-xml-report"): Add missing entry in Table of
5672 Contents: "Rules useless in parser due to conflicts".
5673 * doc/bison.texinfo (Decl Summary): Reword a little.
5674 (Understanding): Update example output for changes below.
5675 * src/gram.c: (rule_useful_p): Rename to...
5676 (rule_useful_in_grammar_p): ... this.
5677 (rule_useless_p): Rename to...
5678 (rule_useless_in_grammar_p): ... this.
5679 (rule_never_reduced_p): Rename to...
5680 (rule_useless_in_parser_p): ... this.
5681 (grammar_rules_print): Update for renames.
5682 (grammar_rules_print_xml): Update for renames.
5683 (grammar_rules_never_reduced_report): Rename to...
5684 (grammar_rules_useless_report): ... this since it is used for either
5685 kind of useless rule.
5686 * src/gram.h: Reword comments and update function names in prototypes.
5687 * src/main.c (main): Say "rule useless in parser due to conflicts".
5688 * src/print-xml.c (print_rules_never_reduced): Rename to...
5689 (print_rules_useless_in_parser): ... this, and rename output XML
5690 element "rules-never-reduced" to "rules-useless-in-parser".
5691 (print_xml): Update for rename.
5692 * src/print.c (print_results): Say "Rules useless in parser due to
5693 conflicts".
5694 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
5695 (nonterminals_reduce): Say "nonterminal useless in grammar".
5696 (reduce_output): Say "Nonterminals useless in grammar".
5697 Say "Rules useless in grammar".
5698 (reduce_xml): Rename output XML element "useless" to
5699 "useless-in-grammar".
5700 (reduce_print): Don't report the count of grammatically useless rules
5701 as "rules never reduced" just because %yacc is specified.
5702 In the correct report of this count, say nonterminal(s) and rule(s)
5703 "useless in grammar".
5704 * tests/conflicts.at (S/R in initial): Update expected output.
5705 (Defaulted Conflicted Reduction): Likewise.
5706 (Unreachable States After Conflict Resolution): Likewise.
5707 * tests/existing.at (GNU pic Grammar): Likewise.
5708 * tests/reduce.at (Useless Nonterminals): Likewise.
5709 (Useless Rules): Likewise.
5710 (Reduced Automaton): Likewise.
5711 (Underivable Rules): Likewise.
5712 (Empty Language): Likewise.
5713
5714 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
5715
5716 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
5717 here document and before the EOF so that BSD's implementation of Bourne
5718 shell doesn't parse the delimiter as part of the here document.
5719 * doc/.cvsignore: Add cross-options.texi.
5720 * src/getargs.c (usage): Add a blank line after the warning categories.
5721
5722 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
5723
5724 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
5725
5726 2007-11-05 Akim Demaille <akim@epita.fr>
5727
5728 Remove Id: from bison.1.
5729 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
5730 (perl -0777 -pi -e 's/\.PP\nId): New.
5731 (.x.1): Use it to ignore the version control revision.
5732
5733 2007-11-05 Akim Demaille <demaille@gostai.com>
5734
5735 * build-aux/Makefile.am: Ship cross-options.pl.
5736 * doc/Makefile.am: Always refer to cross-options.texi with
5737 $(srcdir).
5738 (MAINTAINERCLEANFILES): Add it.
5739
5740 2007-11-04 Akim Demaille <demaille@gostai.com>
5741
5742 Generate the long/short option cross-table.
5743 * build-aux/cross-options.pl: New.
5744 * doc/Makefile.am (cross-options.texi): New.
5745 * doc/bison.texinfo: Use it.
5746
5747 2007-11-04 Akim Demaille <demaille@gostai.com>
5748
5749 Generate bison.1 using help2man.
5750 * doc/common.x, doc/bison.x: New.
5751 * doc/Makefile.am (bison.1, .x.1): New.
5752 The code is taken from autoconf-2.61/man/Makefile.am.
5753 * configure.ac: Look for help2man.
5754
5755 2007-11-04 Akim Demaille <demaille@gostai.com>
5756
5757 Complete --help.
5758 * src/getargs.c (usage): Document -W, make it clear that -d,
5759 -g and -x have optional arguments.
5760
5761 2007-11-04 Akim Demaille <demaille@gostai.com>
5762
5763 Find sha1sum when named gsha1sum.
5764 * bootstrap (find_tool): New.
5765 ($SHA1SUM): New.
5766
5767 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
5768
5769 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
5770 at
5771 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
5772 * NEWS (2.3a+): Mention.
5773 * data/bison.m4 (b4_pure_if): Don't define it here.
5774 * data/c.m4 (b4_identification): Depend on individual skeletons to
5775 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
5776 values of the %define variables api.pure or api.push_pull. Define
5777 YYPURE, YYPUSH, and YYPULL accordingly.
5778 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
5779 glr.cc has already defined b4_pure_flag.
5780 * data/push.c: Define b4_pure_if based on `%define api.pure'.
5781 Remove YYPUSH and YYPULL since they're back in b4_identification again.
5782 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
5783 * doc/bison.texinfo (Pure Decl): Update.
5784 (Push Decl): Update.
5785 (Decl Summary): Add api.pure to %define entry.
5786 In %pure-parser entry, say it's deprecated and reference %define.
5787 (Pure Calling): Update.
5788 (Error Reporting): Update.
5789 (C++ Scanner Interface): Update.
5790 (How Can I Reset the Parser): Update.
5791 (Table of Symbols): In %pure-parser entry, say it's deprecated and
5792 reference %define.
5793 * src/getargs.c (pure_parser): Remove global variable.
5794 * src/getargs.h (pure_parser): Remove extern.
5795 * src/output.c (prepare): Don't define pure_flag muscle.
5796 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
5797 wrapper around `%define api.pure'.
5798 * tests/calc.at (Simple LALR Calculator): Update.
5799 (Simple GLR Calculator): Update.
5800 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
5801 Update.
5802 (GLR: Resolve ambiguity, pure, locations): Update.
5803 (GLR: Merge conflicting parses, pure, no locations): Update.
5804 (GLR: Merge conflicting parses, pure, locations): Update.
5805 * tests/glr-regression.at (Uninitialized location when reporting
5806 ambiguity): Update
5807 * tests/input.at (Unused %define api.pure): New test case.
5808 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
5809 AT_PURE_IF and AT_PURE_AND_LOC_IF.
5810 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
5811
5812 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
5813
5814 %define push_pull -> %define api.push_pull. Discussed starting at
5815 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
5816 * data/push.c: Expect the new name.
5817 * data/yacc.c: Likewise.
5818 * doc/bison.texinfo (Push Decl): Update.
5819 (Decl Summary): Update %define entry.
5820 (Push Parser Function): Update.
5821 (Pull Parser Function): Update.
5822 (Parser Create Function): Update.
5823 (Parser Delete Function): Update.
5824 * tests/calc.at (Simple LALR Calculator): Update.
5825 * tests/input.at (%define enum variables): Update.
5826 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
5827 (Push Parsing: Multiple impure instances): Update.
5828 (Push Parsing: Unsupported Skeletons): Update.
5829 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
5830 (Exploding the Stack Size with Malloc): Update.
5831
5832 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
5833 other entries some.
5834
5835 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
5836
5837 For the XML output's terminal element, rename @number to @token-number,
5838 and add @symbol-number. In the nonterminal element, rename @number to
5839 @symbol-number. Discussed starting at
5840 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
5841 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
5842 renames.
5843 (xsl:template match="nonterminal"): Likewise.
5844 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
5845 (xsl:template match="nonterminal"): Likewise.
5846 * src/print-xml.c (print_grammar): Implement.
5847
5848 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5849
5850 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
5851 2007-10-11 change, the child elements here are items not rules.
5852 (xsl:template match="item"): New.
5853 (xsl:template match="rule"): Update for new reduced itemset.
5854 (xsl:template match="point"): Remove.
5855 (xsl:template match="empty"): For consistency with --graph, don't
5856 output "/* empty */".
5857 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
5858 line-wrap, don't pass a negative value as first-line-length since this
5859 won't work with the following changes.
5860 (xsl:template name="line-wrap"): Simplify slightly.
5861 (xsl:template name="ws-search"): Eliminate recursion.
5862 * src/print_graph.c (print_core): Don't print a reduction's lookahead
5863 set next to an item whose dot is not at the end of the RHS even if it
5864 happens to be associated with the same rule.
5865
5866 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
5867
5868 Add %define lr.keep_unreachable_states.
5869 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
5870 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
5871 * src/main.c (main): Implement it.
5872 * tests/conflicts.at (Unreachable States After Conflict Resolution):
5873 Extend to test it, and fix a typo.
5874
5875 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
5876
5877 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
5878 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
5879 the example .output text.
5880 * tests/regression.at (Extra lookahead sets in report): Improve wording
5881 of comments.
5882
5883 2007-10-17 Wojciech Polak <polak@gnu.org>
5884
5885 * src/print-xml.c (print_grammar): Renamed
5886 <terminal> and <nonterminal> attributes:
5887 "type" to "number" and "symbol" to "name".
5888 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
5889 Use new attribute names.
5890 (xsl:template match="nonterminal"): Likewise.
5891 * data/xslt/xml2xhtml.xsl: Likewise.
5892
5893 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
5894
5895 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
5896 (Option Cross Key): Likewise.
5897
5898 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
5899 next to an item whose dot is not at the end of the RHS even if it
5900 happens to be associated with the same rule.
5901 * src/print.c (print_core): Likewise.
5902 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
5903 (Resolved SR Conflicts): Update output.
5904 * tests/regression.at (Extra lookahead sets in report): New test case.
5905
5906 2007-10-11 Wojciech Polak <polak@gnu.org>
5907
5908 * src/print-xml.c (print_core): Remove item set
5909 redundancy.
5910 * data/xslt/bison.xsl (bison:ruleNumber): New key.
5911 Improve processing time. Suggested by Joel E. Denny.
5912 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
5913 Write xsl:param "required" attribute as comment.
5914 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
5915 (xsl:template match="rule"): Support new reduced itemset.
5916 (xsl:template match="point"): Remove.
5917 * data/xslt/xml2xhtml.xsl: Likewise.
5918
5919 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
5920
5921 * src/getargs.c (version): Update copyright year.
5922
5923 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
5924
5925 Make xml2dot.xsl and --graph produce the same output.
5926 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
5927 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
5928 escaped later.
5929 (xsl:template name="output-node"): Use the new escape template instead
5930 of the string-replace template directly.
5931 (xsl:template name="output-edge"): Likewise.
5932 (xsl:template name="escape"): New, escapes backslashes and newlines in
5933 addition to quotation marks.
5934 * src/graphviz.c (start_graph, output_node, output_edge): Add
5935 whitespace to output for legibility.
5936
5937 Make xml2text.xsl and --report produce the same output, and remove the
5938 XML "conflicts" element since a conflict summary is easily extracted
5939 from the automaton.
5940 * data/xslt/bison.xsl: New.
5941 (xsl:template match="state" mode="bison:count-conflicts): New.
5942 * data/xslt/xml2text.xsl: Import bison.xsl.
5943 (xsl:template match="bison-xml-report"): Instead of styling the
5944 "conflicts" element, style the "automaton" element with mode
5945 "conflicts". Unlike the former, the latter lists S/R and R/R
5946 conflicts for a state on the same line.
5947 (xsl:template match="conflicts"): Remove.
5948 (xsl:template match="conflict"): Remove.
5949 (xsl:template match="terminal"): Line-wrap the list of rules in which
5950 the terminal is used.
5951 (xsl:template match="nonterminal"): Likewise for nonterminals.
5952 (xsl:template match="automaton" mode="conflicts"): New.
5953 (xsl:template match="state" mode="conflicts"): New.
5954 (xsl:template name="line-wrap"): New.
5955 (xsl:template name="ws-search"): New.
5956 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
5957 (xsl:template match="bison-xml-report"): Instead of styling the
5958 "conflicts" element, style the "automaton" element with mode
5959 "conflicts."
5960 (xsl:template match="conflicts"): Remove.
5961 (xsl:template match="conflict"): Remove.
5962 (xsl:template match="automaton" mode="conflicts"): New.
5963 (xsl:template match="state" mode="conflicts): New.
5964 * src/conflicts.c (conflicts_output_xml): Remove.
5965 * src/conflicts.h (conflicts_output_xml): Remove prototype.
5966 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
5967 * src/print.c (print_grammar): Consistently wrap at the 66th column so
5968 the corresponding XSLT is easier. Also, never wrap between a word and
5969 the comma that follows it.
5970
5971 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
5972
5973 Improve C++ namespace support. Discussed starting at
5974 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
5975 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
5976 b4_namespace_close): New macros that interpret the %define variable
5977 "namespace" so its value can contain "::" to indicate nested
5978 namespaces.
5979 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
5980 the above macros.
5981 * data/lalr1.cc (b4_namespace): Likewise.
5982 * data/location.cc (b4_namespace): Likewise.
5983 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
5984 inside a new table in the general %define entry. Document `%define
5985 namespace' there as well. Point the %name-prefix entry to it since it
5986 explains it more completely in the case of C++.
5987 (C++ Bison Interface): Mention `%define namespace' instead of
5988 %name-prefix.
5989 (Table of Symbols): Remove the `%define push_pull' entry. The %define
5990 entry suffices.
5991 * tests/c++.at (Relative namespace references): New test case.
5992 (Absolute namespace references): New test case.
5993 (Syntactically invalid namespace references): New test case.
5994 * tests/input.at (C++ namespace reference errors): New test case.
5995
5996 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
5997
5998 Add syncline support and location accessor to internal %define
5999 interfaces.
6000 * data/bison.m4 (b4_percent_define_get_loc): New.
6001 (b4_percent_define_get_syncline): New.
6002 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
6003 (b4_percent_define_default): Record defining location as line 1 rather
6004 than 0 for the sake of synchronizing #line's, and define
6005 b4_percent_define_syncline(VARIABLE).
6006 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
6007 * src/muscle_tab.c (muscle_syncline_grow): New.
6008 (muscle_code_grow): Use muscle_syncline_grow.
6009 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
6010 define b4_percent_define_syncline(VARIABLE).
6011 (muscle_percent_define_get_loc): New.
6012 (muscle_percent_define_get_syncline): New.
6013 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
6014 remove some unused variables.
6015 (muscle_percent_define_default): Record defining location as line 1
6016 rather than 0 for the sake of synchronizing #line's, and define
6017 b4_percent_define_syncline(VARIABLE).
6018 (muscle_percent_define_check_values): Use
6019 muscle_percent_define_get_loc.
6020 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
6021 (muscle_percent_define_get_syncline): Prototype.
6022 * tests/skeletons.at (%define Boolean variables: invalid skeleton
6023 defaults): Update output for location change.
6024 (Complaining during macro argument expansion): Extend to test
6025 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
6026
6027 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
6028
6029 Fix some error-reporting macro bugs.
6030 * data/bison.m4 (b4_cat): New.
6031 (b4_error, b4_error_at): Use b4_cat to send error directives directly
6032 to stdout so they don't become arguments to other macros. Update
6033 comments and add examples.
6034 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
6035 add examples.
6036 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
6037 after printing the error directive so that M4 doesn't report subsequent
6038 problems that are induced by this problem.
6039 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
6040 instead of just in them. Recognize @\n in both places. Both expand to
6041 the empty string. Needed by b4_cat.
6042 * tests/skeletons.at (Complaining during macro argument expansion):
6043 New test case.
6044 (Fatal errors make M4 exit immediately): New test case.
6045
6046 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
6047
6048 Implement --print-datadir.
6049 * src/getargs.c (usage): Mention.
6050 (PRINT_DATADIR_OPTION): New anonymous enum member.
6051 (long_options): Add entry for it.
6052 (getargs): Add case for it calling compute_pkgdatadir.
6053 * src/output.c (output_skeleton): Encapsulate data directory
6054 computation from here...
6055 (prepare): ... and from here...
6056 (compute_pkgdatadir): ... into this new function.
6057 * src/output.h (compute_pkgdatadir): Prototype.
6058
6059 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
6060
6061 * src/print-xml.c (escape_bufs): New static global variable
6062 replacing...
6063 (xml_escape_n): ... the static local variable buf here.
6064 (print_xml): Free memory for escape_bufs.
6065 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
6066
6067 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
6068
6069 Replace `%push-parser' and `%push-pull-parser' with
6070 `%define push_pull "push"' and `%define push_pull "both"'.
6071 `%define push_pull "pull"' is the default.
6072 * doc/bison.texinfo (Push Decl, Push Parser Function,
6073 Pull Parser Function, Parser Create Function, Parser Delete Function):
6074 Update declarations.
6075 (Decl Summary, Table of Symbols): Replace %push-parser and
6076 %push-pull-parser entries with a %define push_pull entry.
6077 * data/bison.m4 (b4_percent_define_check_values): New macro.
6078 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
6079 definitions...
6080 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
6081 definitions...
6082 * data/push.c: ... to here and compute them from the value of the
6083 %define variable push_pull.
6084 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
6085 parsing requests here...
6086 * data/yacc.c: ... hack this to switch to push.c any time
6087 b4_use_push_pull_flag or the %define variable push_pull is set. This
6088 will go away when we mv push.c yacc.c.
6089 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
6090 push parsing is not supported since unused %define variables are
6091 reported anyway.
6092 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
6093 * src/muscle_tab.h (muscle_percent_define_check_values): Update
6094 comments for consistency with b4_percent_define_check_values.
6095 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
6096 muscles.
6097 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
6098 Remove.
6099 (prologue_declaration): Remove %push-parser and %push-pull-parser
6100 rules.
6101 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
6102 * tests/calc.at: Update declarations.
6103 * tests/input.at (%define enum variables): New test case.
6104 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
6105 declaration.
6106 (Push Parsing: Multiple impure instances): Update declaration.
6107 (Push Parsing: Unsupported Skeletons): New test case.
6108 * tests/torture.at (Exploding the Stack Size with Alloca): Update
6109 declaration.
6110 (Exploding the Stack Size with Malloc): Update declaration.
6111
6112 2007-09-24 Wojciech Polak <polak@gnu.org>
6113
6114 Add XSLT transformations.
6115
6116 * data/xslt/xml2dot.xsl: Transform XML into DOT.
6117 * data/xslt/xml2text.xsl: Transform XML into plain text.
6118 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
6119 * data/Makefile.am (xsltdir): New variable.
6120 (dist_xslt_DATA): Add xslt/*.xsl files.
6121
6122 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
6123
6124 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
6125 Problem reported by Wojciech Polak.
6126 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
6127 (xml_printf): Undo change I made on 21 September; that is,
6128 indent 2 spaces, not 1.
6129
6130 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
6131
6132 Pacify ./configure --enable-gcc-warnings.
6133 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
6134 `char const *' instead of `char *'.
6135 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
6136 local variable `sep'.
6137
6138 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
6139
6140 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
6141 elsewhere.
6142 * src/print-xml.c: Prefer "const" after types; that's more consistent.
6143 (xml_printf): Indent just 1 space for level.
6144 (e_char, xlate_char): Remove.
6145 (xml_escape_string): Rewrite to avoid undefined behavior (used
6146 storage that was freed from the stack).
6147 (xml_escape_n): Don't bother checking for subscript error.
6148
6149 2007-09-21 Wojciech Polak <polak@gnu.org>
6150
6151 Add Bison XML Automaton Report.
6152
6153 Add support for an -x option to generate an XML report.
6154 It is not documented yet.
6155 * src/print-xml.c: New file.
6156 * src/print-xml.h: Likewise.
6157 * lib/timevar.def (TV_XML): New var.
6158 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
6159 * src/conflicts.c: Include print-xml.h.
6160 (solved_conflicts_xml_obstack): New var.
6161 (log_resolution, conflicts_solve, conflicts_free):
6162 Add support for XML report.
6163 (conflicts_output_val): New function.
6164 * src/conflicts.h (conflicts_output_val): New decl.
6165 * src/files.c (spec_xml_file): New var.
6166 (compute_output_file_names, output_file_names_free): Add XML support.
6167 * src/files.h (spec_xml_file): New decl.
6168 * src/getargs.c (xml_flag): New var.
6169 (usage, short_options, long_options, getargs): Add XML support.
6170 * src/getargs.h (xml_flag): New decl.
6171 * src/gram.c: Include print-xml.h.
6172 (rule_lhs_print_xml, rule_rhs_print_xml):
6173 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
6174 New functions.
6175 * src/gram.h: Declare external ones.
6176 * src/main.c: Include print-xml.h.
6177 (main): Add XML support.
6178 * src/reduce.c: Include print-xml.h.
6179 (reduce_xml): New function.
6180 * src/reduce.h: Declare it.
6181 * src/state.c: Include print-xml.h.
6182 (state_new): Add XML support.
6183 (state_rule_lookahead_tokens_print_xml): New function.
6184 * src/state.h: Declare it.
6185 (struct state): New member solved_conflicts_xml.
6186 * src/symtab.c (symbol_class_get_string): New function.
6187 * src/symtab.h: Declare it.
6188
6189 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
6190
6191 * GNUmakefile: Switch to coreutils's version.
6192 * bootstrap: Likewise.
6193 * Makefile.cfg: Adjust to new GNUmakefile.
6194 * README-hacking: Likewise.
6195
6196 Import from gnulib:
6197
6198 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
6199 Bruno Haible <bruno@clisp.org>
6200
6201 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
6202 and is a script that invokes bison. Tighten the code. Add comments.
6203
6204 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
6205
6206 Spell "boolean" as "Boolean". Reported by Akim Demaille.
6207 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
6208 * doc/bison.texinfo (Decl Summary): Fix.
6209 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
6210 * tests/input.at (Boolean %define variables): Update output.
6211 * tests/skeletons.at (%define boolean variables: invalid skeleton
6212 defaults): Rename to...
6213 (%define Boolean variables: invalid skeleton defaults): ... this and
6214 update output.
6215
6216 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
6217
6218 In impure push mode, don't allow more than one yypstate to be allocated
6219 since multiple impure parsers would corrupt yynerrs.
6220 * data/push.c (yypstate_allocated): New static global variable
6221 initialized to 0.
6222 (yypull_parse): If yypstate_new returns 0, don't report it as memory
6223 exhaustion if yypstate_allocated is 1, but still return 2.
6224 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
6225 already 1. Otherwise, set it to 1.
6226 (yypstate_delete): Set it to 0.
6227 * tests/push.at (Push Parsing: Multiple impure instances): New test
6228 case.
6229
6230 2007-08-17 Bob Rossi <bob@brasko.net>
6231
6232 * doc/bison.texinfo (Push Decl): Document the push parser.
6233 (Table of Symbols): Ditto.
6234 (Pure Decl): Ditto.
6235 (Decl Summary): Ditto.
6236 (Multiple Parsers, Push Parser Function, Pull Parser Function,
6237 Parser Create Function, Parser Delete Function):
6238 Add new push parser symbols.
6239 (Table of Symbols): Document push-parser, push-pull-parser,
6240 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
6241
6242 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
6243
6244 Update to GPLv3.
6245 * doc/gpl-3.0.texi: New file.
6246 * doc/gpl.texi: Remove.
6247 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
6248 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
6249 * README-hacking, TODO, bootstrap, bootstrap.conf:
6250 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
6251 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
6252 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
6253 * data/lalr1.cc, data/lalr1.java, data/location.cc:
6254 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
6255 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
6256 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
6257 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
6258 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
6259 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
6260 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
6261 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
6262 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
6263 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
6264 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
6265 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
6266 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
6267 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
6268 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
6269 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
6270 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
6271 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
6272 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
6273 * src/complain.c, src/complain.h, src/conflicts.c:
6274 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
6275 * src/files.h, src/flex-scanner.h, src/getargs.c:
6276 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
6277 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
6278 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
6279 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
6280 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
6281 * src/print.c, src/print.h, src/print_graph.c:
6282 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
6283 * src/reduce.h, src/relation.c, src/relation.h:
6284 * src/revision.h, src/scan-code.h, src/scan-code.l:
6285 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
6286 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
6287 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
6288 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
6289 * tests/Makefile.am, tests/actions.at, tests/c++.at:
6290 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
6291 * tests/existing.at, tests/glr-regression.at:
6292 * tests/headers.at, tests/input.at, tests/java.at:
6293 * tests/local.at, tests/output.at, tests/push.at:
6294 * tests/reduce.at, tests/regression.at, tests/sets.at:
6295 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
6296 * tests/torture.at:
6297 Update to GPLv3.
6298
6299 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
6300
6301 Get rid of broken %no-parser, -n, and --no-parser implementation and
6302 documentation.
6303 * TODO: Don't mention them.
6304 * doc/bison.1: Likewise.
6305 * doc/bison.texinfo (Decl Summary): Likewise.
6306 (Bison Options): Likewise.
6307 (Option Cross Key): Likewise.
6308 * src/getargs.c (no_parser_flag): Remove global variable.
6309 (usage): Don't print description of -n and --no-parser.
6310 (long_options): Remove --no-parser entry here.
6311 (getargs): Remove -n case in the switch here.
6312 * src/getargs.h (no_parser_flag): Remove extern.
6313 * tests/regression.at (Web2c Actions): Remove comment that mentions
6314 --no-parser.
6315
6316 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
6317
6318 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
6319 name user variables starting with `yy'. Just pass NULL instead of a
6320 dummy local &yylval to yypush_parse.
6321 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
6322 starting with `yy'.
6323
6324 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
6325
6326 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
6327 true since it's then always used regardless of whether yyoverflow is
6328 defined. Reported by Christian Burger at
6329 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
6330 * THANKS: Add Christian Burger.
6331
6332 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
6333 node names: say "Decl Summary" not "Bison Declaration Summary".
6334
6335 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
6336
6337 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
6338 determine whether this function has already complained about an invalid
6339 value for a %define boolean variable, don't check whether Bison has
6340 ever examined the value. As written, the check was a tautology.
6341 Instead, record and check for this complaint using a separate muscle.
6342
6343 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
6344
6345 Fix push parsing memory leak reported by Brandon Lucia at
6346 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
6347 * THANKS: Add Brandon Lucia.
6348 * data/push.c (yypstate_delete): Free the stack if it was reallocated
6349 but the parse never completed and thus freed it.
6350 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
6351 * tests/testsuite.at: Include push.at.
6352 * test/push.at: New.
6353 (Push Parsing: Memory Leak for Early Deletion): New test case.
6354
6355 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
6356
6357 Improve handling of multiple S/R conflicts in the same state and of S/R
6358 conflicts involving multiple reductions.
6359 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
6360 set for a state here or Bison will abort if it is reassigned on a
6361 later conflicted reduction in the same state.
6362 Similarly, don't finalize and assign the solved conflicts report here
6363 or it will be lost if it is reassigned on a later conflicted reduction
6364 in the same state.
6365 (set_conflicts): Instead, assign them both here after all S/R conflicts
6366 in the state have been fully examined.
6367 * src/print.c (shift_set): Rename to...
6368 (no_reduce_set): ... this.
6369 (print_reductions): Update for rename, and add %nonassoc error action
6370 tokens to no_reduce_set so that, when printing the first remaining
6371 reduction on an error action token, the reduction is enclosed in
6372 brackets.
6373 (print_results): Update for rename.
6374 * tests/conflicts.at (Solved conflicts report for multiple reductions
6375 in a state): New test case.
6376 (%nonassoc error actions for multiple reductions in a state): New test
6377 case.
6378
6379 * src/main.c (main): Don't depend on C99 features.
6380
6381 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
6382
6383 * build-aux/.cvsignore: Add compile.
6384 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
6385 uniwidth.
6386
6387 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
6388
6389 * bootstrap (slurp): Create target directories that don't exist.
6390 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
6391
6392 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
6393
6394 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
6395 than item number.
6396 * closure.c (closure): Likewise.
6397 * state.h (reductions): Comment sorting of rules.
6398 (state): Comment sorting of items.
6399
6400 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
6401
6402 Fix C++ test cases after recent Gnulib changes. Discussed starting at
6403 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
6404 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
6405 definition in order to avoid Gnulib headers since we don't use config.h
6406 here.
6407 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
6408 rather than AT_DATA so that config.h is included.
6409
6410 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
6411
6412 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
6413 instead of fprintf. Guard these functions with #if YYDEBUG instead of
6414 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
6415 and so that YYFPRINTF is guaranteed to be defined here.
6416
6417 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
6418
6419 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
6420 with...
6421 (muscle_percent_define_check_values): ... this more helpful function.
6422 Again, it's not used yet, but it will be.
6423 * src/muscle_tab.h: Likewise.
6424
6425 Improve some comments in parser table construction.
6426 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
6427 (generate_states): Don't mention ruleset, which is internal to closure.
6428 * src/closure.c (closure): Explain sorting of core and itemset, which
6429 is required for this function to behave correctly.
6430 * src/closure.h (closure): Mention sorting.
6431
6432 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
6433
6434 * src/lalr.c (state_lookahead_tokens_count): For code readability,
6435 move the check for disabled transitions to an aver since conflict
6436 resolution hasn't happened yet.
6437
6438 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
6439 labels a state as inconsistent just because it has error transitions.
6440 The original form of this check appeared in revision 1.1 of lalr.c,
6441 which was committed on 1991-12-21. Now (at least), changing the
6442 consistency label on such a state appears to have no useful effect in
6443 any of the places it is examined, which I enumerate below. The key
6444 point to understanding each item in this enumeration is that a state
6445 with an error transition is labelled consistent in the first place only
6446 if it has no rules, so the check cannot matter for states that have
6447 rules. (1) Labelling a state as inconsistent will cause set_conflicts
6448 to try to identify its conflicts, and a state must have *rules* to have
6449 conflicts. (2) Labelling a state as inconsistent will affect how
6450 action_row sets the default *rule* for the state. (3) Labelling a
6451 state as inconsistent will cause build_relations to add lookback edges
6452 to *rules* in that state.
6453 * src/state.h (struct state): Word the comment for member consistent
6454 more carefully.
6455
6456 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
6457
6458 Don't depend on C99 features.
6459 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
6460 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
6461 * src/reader.c (check_and_convert_grammar): Fix for-loop.
6462 * src/state.c (state_mark_reachable_states): Fix for-loop.
6463 (state_remove_unreachable_states): Fix for-loop.
6464
6465 Don't widen struct state with member reachable just to temporarily
6466 record reachability. Instead, use a local bitset.
6467 * src/state.h (struct state): Remove member.
6468 * src/state.c (state_new): Don't initialize it.
6469 (state_mark_reachable_states): Rename to...
6470 (state_record_reachable_states): ... this, and use bitset.
6471 (state_remove_unreachable_states): Use bitset.
6472
6473 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
6474
6475 * src/Makefile.am (yacc): Quote target action commands properly so
6476 that the yacc script isn't corrupt. Reported by Hans Aberg at
6477 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
6478
6479 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
6480 the case of pure parsers. Reported by Frans Englich at
6481 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
6482 * THANKS: Add Frans Englich.
6483
6484 * NEWS (2.3a+): In the %code entry, reference section `Bison
6485 Declaration Summary' from the manual now since the %code summary has
6486 moved there.
6487 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
6488 in the rules section must be terminated by semicolons.
6489
6490 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
6491
6492 Extend the front-end API for %define variables to more completely
6493 mirror the back-end. This will be useful in the future.
6494 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
6495 Update comments to mention the new front-end counterparts of these
6496 macros.
6497 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
6498 for muscle_string_decode and muscle_location_decode.
6499 (muscle_string_decode): New static function.
6500 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
6501 (muscle_percent_define_get, muscle_percent_define_ifdef): New
6502 functions.
6503 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
6504 muscle_percent_define_get to mimic the b4_percent_define_flag_if
6505 implementation more closely.
6506 (muscle_percent_define_invalid_value): New function.
6507 * src/muscle_tab.h (muscle_percent_define_get,
6508 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
6509 Prototype.
6510
6511 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
6512
6513 * NEWS (2.3a+): Mention yesterday's state-removal change.
6514 (2.3a): Remove the %language entry, which was added after 2.3a.
6515 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
6516 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
6517 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
6518 tests/existing.at: Update copyright date.
6519
6520 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
6521
6522 If conflict resolution makes states unreachable, remove those states,
6523 report rules that are then unused, and don't report conflicts in those
6524 states.
6525 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
6526 New global function.
6527 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
6528 function.
6529 * src/main.c (main): After conflict resolution, remove the unreachable
6530 states and update all data structures that reference states by number.
6531 * src/state.c (state_new): Initialize each state's reachable member to
6532 false.
6533 (state_mark_reachable_states): New static function.
6534 (state_remove_unreachable_states): New global function.
6535 * src/state.h (struct state): Add member bool reachable.
6536 (state_remove_unreachable_states): Prototype.
6537 * tests/conflicts.at (Unreachable States After Conflict Resolution):
6538 New test case.
6539 * tests/existing.at (GNU pic Grammar): Update test case output now that
6540 an unused rule is discovered.
6541
6542 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
6543
6544 Minor code cleanup in parser table construction.
6545 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
6546 (new_itemsets, save_reductions): Update for rename to nitemset.
6547 * src/closure.c (nritemset): Rename to...
6548 (nitemset): ... this since the "r" appears to meaningless and isn't
6549 used in the comments.
6550 (closure): Update for rename.
6551 * src/closure.h (nritemset): Update extern to...
6552 (nitemset): ... this.
6553 * src/lalr.c (LA): Fix a typo in comments.
6554 * src/print.c (print_core): Update for rename to nitemset.
6555 * src/print_graph.c (print_graph): Likewise.
6556 * src/state.h: Fix some typos in header comments.
6557
6558 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
6559
6560 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
6561 still sticks to ASCII. Sorry!
6562
6563 * README-hacking: New file, taken mostly from coreutils, with changes
6564 for Bison. Contains much of the contents of:
6565 * README-cvs: Remove.
6566 * bootstrap: Sync from gnulib.
6567 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
6568 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
6569
6570 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
6571
6572 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
6573 Setzer.
6574 (Java Differences): Fix some typos.
6575 * THANKS: Add Sebastian Setzer.
6576
6577 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
6578
6579 * data/java.m4 (b4_single_class_if): Remove.
6580 (b4_abstract_if): Look at "%define abstract".
6581 (b4_lexer_if): New.
6582 (b4_union_name): Rename...
6583 (b4_yystype): ... to this. Map to "%define stype".
6584 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
6585 b4_maybe_throws): Fix quoting.
6586 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
6587 * data/lalr1.java (Lexer interface): Always define.
6588 (Lexer interface within parser class): Remove.
6589 (YYLexer class): New, used when "%code lexer" is present.
6590 (constructor): When "%code lexer" is used, pass %lex-param
6591 to the lexer constructor.
6592 (yylex, yyparse): Remove %lex-param from method invocations
6593 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
6594
6595 * doc/bison.texinfo (Java Bison Interface): Mention "%define
6596 abstract". Rename "%define union_name" to "%define stype".
6597 Rename method names according to previous patch.
6598 (Java Scanner Interface): Describe "%code lexer" instead of
6599 "%pure-parser" and "%define single_class".
6600 (Java Differences): Mention "%code lexer".
6601
6602 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
6603 Include scanner here, using macros from tests/local.at.
6604 (AT_DATA_CALC_Y): Remove final argument.
6605 (_AT_CHECK_JAVA_CALC): Likewise.
6606 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
6607 of %locations and %error-verbose.
6608 (main): Test with and without %lex-param.
6609 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
6610 (AT_BISON_OPTION_POPDEFS): Pop it.
6611
6612 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6613
6614 DJGPP spefic issue. Inhibit the use of disallowed characters for
6615 file name genertion on Win98, WinXP, etc. These are |<>":?*\
6616 and concern testsuite case 46.
6617 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
6618 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
6619 * djgpp/config.bat: Inhibit the use of disallowed characters.
6620
6621 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
6622
6623 Miscellaneous %define and %code cleanup.
6624 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
6625 values are interpreted.
6626 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
6627 documentation a little more.
6628 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
6629 muscle_percent_define_insert, muscle_percent_code_grow): New
6630 functions/macros.
6631 * src/muscle_tab.h (muscle_percent_define_insert,
6632 muscle_percent_code_grow): Prototype.
6633 * src/parse-gram.y (prologue_declaration): Use
6634 muscle_percent_define_insert and muscle_percent_code_grow when parsing
6635 %define and %code directives.
6636
6637 Make it easy to share %define boolean variables between the front-end
6638 and back-end. Though not used yet, this will be useful in the future.
6639 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
6640 Bison uses of names rather than just skeleton uses of names.
6641 (b4_percent_define_get, b4_percent_define_ifdef): Rename
6642 b4_percent_define_skeleton_variables(VARIABLE) to
6643 b4_percent_define_bison_variables(VARIABLE).
6644 (b4_percent_code_get, b4_percent_code_ifdef): Rename
6645 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
6646 b4_percent_code_bison_qualifiers(QUALIFIER).
6647 (b4_check_user_names_wrap): Update for renames.
6648 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
6649 muscle_percent_define_default): New functions mimicking
6650 b4_percent_define_flag_if and b4_percent_define_default.
6651
6652 For %define variables, report locations for invalid values and
6653 redefinitions.
6654 * data/bison.m4 (b4_percent_define_flag_if): Read
6655 b4_percent_define_loc(VARIABLE) to report the location of an invalid
6656 value for VARIABLE.
6657 (b4_percent_define_default): Save a special location in
6658 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
6659 must later be reported as invalid.
6660 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
6661 functions.
6662 (muscle_percent_define_insert): Record the location of VARIABLE in
6663 muscle percent_define_loc(VARIABLE), and use it to report the previous
6664 location for a redefinition.
6665 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
6666 (muscle_percent_define_default): Update like b4_percent_define_default.
6667 (muscle_grow_user_name_list): Rename to...
6668 (muscle_user_name_list_grow): ... this for consistency and use
6669 muscle_location_grow.
6670 * src/muscle_tab.h (muscle_location_grow): Prototype.
6671 * tests/input.at (%define errors): Update expected output.
6672 * tests/skeletons.at (%define boolean variables: invalid skeleton
6673 defaults): New test case.
6674
6675 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
6676
6677 * src/print.c (lookahead_set, state_default_rule): Remove.
6678 (print_reductions): Replace state_default_rule invocation with
6679 equivalent use of yydefact, which was computed in token_actions in
6680 tables.c.
6681 (print_results): Don't allocate lookahead_set.
6682
6683 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
6684
6685 * data/lalr1.java: Prefix all private members with yy.
6686
6687 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
6688
6689 Use YYFPRINTF instead of fprintf where appropriate. Reported by
6690 Sebastien Fricker at
6691 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
6692 * THANKS: Add Sebastien Fricker.
6693 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
6694 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
6695 accept a variable number of arguments.
6696
6697 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
6698
6699 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
6700
6701 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6702
6703 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
6704 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
6705 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
6706
6707 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
6708
6709 Undo my 2007-02-07 change, switching back to the c-strcase module
6710 introduced in the 2007-02-03 change. Bruno Haible reported that
6711 the 2007-02-07 change would be dangerous in Turkish if we add a
6712 language whose name contains "i", since "i" is not lowercase "I"
6713 in Turkish.
6714 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
6715 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
6716 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
6717 * m4/.cvsignore: Remove strcase.m4.
6718 * src/getargs.c: Revert 2007-02-07 change, as follows.
6719 Include c-strcase.h.
6720 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
6721
6722 2007-02-11 Bruno Haible <bruno@clisp.org>
6723
6724 Enable the Java related testsuite tests when the only Java compiler
6725 found is a gcj < 4.3. Discussed at
6726 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
6727 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
6728
6729 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
6730
6731 * data/Makefile.am: Update copyright date.
6732 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
6733 yypstate_new returns NULL.
6734 (yypstate_new): Return NULL if malloc does.
6735 * src/reader.c (packgram): Move translation of rule actions from the
6736 beginning of packgram to...
6737 (check_and_convert_grammar): ... here right before packgram is invoked
6738 so it's easier to write more complete comments, and remove redundant
6739 code.
6740
6741 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
6742
6743 As in semantic actions, make @$ in %initial-action, %destructor, and
6744 %printer imply %locations.
6745 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
6746 scanning @$.
6747 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
6748 (@$ in %initial-action implies %locations,
6749 @$ in %destructor implies %locations,
6750 @$ in %printer implies %locations): ... these new test cases.
6751
6752 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
6753
6754 Undo most of the 2007-02-03 change, switching to the strcase module
6755 now that gnulib strcase has been fixed.
6756 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
6757 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
6758 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
6759 * m4/.cvsignore: Add strcase.m4.
6760 * src/getargs.c: Revert 2007-02-03 change, as follows.
6761 Don't include c-strcase.h.
6762 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
6763 strcasecmp has "unspecified behavior" outside the POSIX locale,
6764 but it works fine in practice if at least one argument is ASCII,
6765 as is the case in Bison.
6766
6767 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
6768
6769 * tests/java.at: Skip tests if only one of javac/java is present.
6770 Reported by Joel E. Denny.
6771 * tests/atlocal.in: Adjust copyright years.
6772
6773 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
6774
6775 * data/lalr1.java (Stack): Work around old verifiers that disallow
6776 access to the private fields of an inner class, from the outer class.
6777 We can make Stack's fields public because user code doesn't have access
6778 to the instance of Stack used by parse(). Reported by Paul Eggert.
6779
6780 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
6781
6782 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
6783 the right spot for these files?
6784 * bootstrap.conf (gnulib_modules): Add c-strcase.
6785 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
6786 c-strncasecmp.c.
6787 * src/getargs.c: Include c-strcase.h.
6788 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
6789 to avoid unspecified behavior.
6790
6791 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
6792
6793 * doc/bison.texinfo (Decl Summary): Correct typo.
6794
6795 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
6796
6797 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
6798 Complain if the value does not match empty, "true" or "false".
6799 * data/c++.m4: Adjust default definitions of %define variables.
6800 * data/java.m4: Adjust default definitions of %define variables.
6801 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
6802 to above behavior.
6803 * tests/input.at (Boolean %define variables): Test new behavior.
6804
6805 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
6806
6807 * NEWS: Mention java.
6808 * TODO: Remove things that are done.
6809 * bootstrap.conf: Add javacomp-script and javaexec-script.
6810 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
6811
6812 * data/Makefile.am: Add new files.
6813 * data/java-skel.m4: New.
6814 * data/java.m4: New.
6815 * data/lalr1.java: New.
6816
6817 * doc/bison.texinfo: Put "A Complete C++ Example" under
6818 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
6819 under Other Languages.
6820
6821 * src/getargs.c (valid_languages): Add Java.
6822 * src/getargs.h (struct bison_language): Update size of string fields.
6823
6824 * tests/Makefile.am: Add java.at.
6825 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
6826 * tests/java.at: New.
6827 * tests/testsuite.at: Include it.
6828
6829 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
6830
6831 Clean up.
6832 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
6833 at_directive_argv arguments so these no longer have to be global
6834 variables. Also, update the implementation for the following changes.
6835 (fail_for_at_directive_too_many_args,
6836 fail_for_at_directive_too_few_args): Add at_directive_name argument.
6837 (at_directive_name): Remove as at_directive_argv[0] will be used for
6838 this now.
6839 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
6840 for the directive name.
6841 (at_directive_argc, at_directive_argv): Make these local within
6842 skel_lex instead of global.
6843 (INITIAL): Update directive start action for above changes.
6844 (SC_AT_DIRECTIVE_ARG): Rename to...
6845 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
6846 (SC_AT_DIRECTIVE_SKIP_WS): Update.
6847 (scan_skel): Move yylex_destroy to...
6848 (skel_scanner_free): ... here.
6849 * tests/skeletons.at (installed skeleton file name): Rename to...
6850 (installed skeleton file names): ... this.
6851
6852 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
6853
6854 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
6855 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
6856 Summary" not "Directives".
6857 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
6858 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
6859 since the former is now the more complete one.
6860 (Prologue Alternatives): Likewise and do the same for %defines.
6861 (Table of Symbols): Add summary of %code, add summary of %define, and
6862 move full %code documentation to...
6863 (Decl Summary): ... here for consistency with other entries in these
6864 sections.
6865 Move %define entry in order to keep this list alphabetized.
6866 Reword %define entry a little to put less emphasis on the skeleton
6867 concept, which most users shouldn't have to think about.
6868
6869 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
6870
6871 Adjust to recent gnulib changes.
6872 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
6873 Add string.h, string_.h, unistd_.h, wchar_.h.
6874 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
6875 * src/system.h: Don't include <stpcpy.h>; this is now done by
6876 <string.h>.
6877
6878 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
6879
6880 Simplify implementation of unqualified %code, implement macros for
6881 uniform treatment of boolean %define flags. Document %define.
6882 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
6883 b4_percent_code_ifdef): New.
6884 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
6885 * data/c++.m4: Define default value for global_tokens_and_yystype.
6886 * data/glr.cc: Likewise.
6887 * data/location.cc: Use b4_percent_define_flag_if.
6888
6889 * doc/bison.texinfo (Decl Summary): Document %define.
6890
6891 * src/parse-gram.y (Unqualified %code): Change muscle name to
6892 b4_percent_code().
6893 (content.opt): Default to empty.
6894
6895 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
6896
6897 Implement support for relative and absolute skeleton file names.
6898 Discussed starting at
6899 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
6900 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
6901 (Bison Options): Document in --skeleton entry.
6902 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
6903 full_skeleton can't necessarily hold all of pkgdatadir.
6904 If the specified skeleton file name contains a `/', don't prepend
6905 pkgdatadir.
6906 * src/parse-gram.y (prologue_declaration): If the specified skeleton
6907 file name contains a `/', prepend the grammar file directory.
6908 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
6909 * skeletons.at: New file.
6910 (relative skeleton file names): New test case.
6911 (installed skeleton file names): New test case.
6912 * tests/testsuite.at: Include skeletons.at.
6913
6914 * bootstrap: Update copyright to 2007.
6915
6916 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
6917
6918 * bootstrap: Remove occurrences of .#bootmp from the files.
6919
6920 2007-01-17 Akim Demaille <akim@epita.fr>
6921
6922 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
6923 nonterminals.
6924 Use per-type %printer.
6925
6926 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
6927
6928 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
6929 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
6930 djgpp/config.site, src/files.c, src/files.h, src/main.c,
6931 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
6932 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
6933 tests/glr-regression.at, tests/input.at, tests/local.at,
6934 tests/output.at, tests/torture.at: Update copyright to 2007.
6935
6936 2007-01-16 Akim Demaille <akim@epita.fr>
6937
6938 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
6939 error code.
6940 (Calc++ Scanner): Exit with failure if we can't open the input
6941 file.
6942 Accept "-" standing for stdin.
6943 (Calc++ Top Level): Print the result only if the parsing was
6944 successful.
6945
6946 2007-01-16 Akim Demaille <akim@epita.fr>
6947
6948 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
6949
6950 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
6951 and Joel E. Denny <jdenny@ces.clemson.edu>
6952
6953 Clean up %define and %code implementation in M4 some. Most
6954 importantly, rename all related macros to be in the b4_percent_define
6955 and b4_percent_code namespaces. Also, complete support for `.' in
6956 %define variable names and %code qualifiers.
6957 * data/bison.m4 (b4_check_user_names): Check for special
6958 "SKELETON-NAMESPACE(name)" macros instead of using two nested
6959 m4_foreach loops.
6960 (b4_get_percent_define, b4_get_percent_code): Rename to...
6961 (b4_percent_define_get, b4_percent_code_get): ... these.
6962 Extend documentation with examples.
6963 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
6964 b4_percent_define_skeleton_variables and
6965 b4_percent_code_skeleton_qualifiers.
6966 Expect any value for the %define variable `foo' to be stored in the
6967 macro named `b4_percent_define(foo)'; expect any %code blocks for the
6968 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
6969 expect any unqualified %code blocks to be stored in a macro named
6970 `b4_percent_code_unqualified'.
6971 Use m4_indir so that %define variable names and %code qualifiers can
6972 contain `.', which is allowed by the grammar parser.
6973 (b4_percent_define_default): New macro to set a default value for a
6974 %define variable.
6975 (m4_wrap): Update wrapped code, and fix some underquoting.
6976 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
6977 Expect grammar uses of %define variables and %code qualifiers to be
6978 defined in b4_percent_define_user_variables and
6979 b4_percent_code_user_qualifiers.
6980 * data/c++.m4: Use b4_percent_define_default rather than
6981 m4_define_default. Fix some underquoting. Skeleton usage of %define
6982 variable define_location_comparison now implies skeleton usage of
6983 %define variable filename_type.
6984 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
6985 data/push.c, data/yacc.c: Update macro names.
6986 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
6987 muscle names.
6988
6989 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6990
6991 DJGPP specific issues.
6992
6993 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
6994 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
6995
6996 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
6997
6998 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
6999 run parsers in all tests so that Valgrind is invoked during
7000 maintainer-check-valgrind.
7001 (Duplicate representation of merged trees): Free all semantic values.
7002 (Duplicated user destructor for lookahead): Likewise.
7003
7004 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
7005
7006 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
7007 command-line prefix.
7008 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
7009 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
7010 miss Valgrind messages.
7011 (Exploding the Stack Size with Malloc): Likewise.
7012
7013 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
7014
7015 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
7016 locals. Reported by Juan Manuel Guerrero at
7017 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
7018 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
7019 Fix some indentation also.
7020 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
7021 explaining this issue.
7022
7023 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
7024 and Joel E. Denny <jdenny@ces.clemson.edu>
7025
7026 Simplify union and prologue handling, and escape union and lex/parse
7027 params with digraphs.
7028 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
7029 values to the empty string since these are no longer guaranteed
7030 initialized by the front-end.
7031 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
7032 braces around b4_user_stype since this is no longer done by the
7033 front-end.
7034 * src/files.c, src/files.h (pre_prologue_obstack,
7035 post_prologue_obstack): Remove.
7036 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
7037 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
7038 with digraphs. This fixes lex params and parse params.
7039 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
7040 * src/output.c (prepare): Remove muscle insertion of the prologues.
7041 (output): Remove freeing of pre_prologue_obstack and
7042 post_prologue_obstack.
7043 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
7044 than prologue_augment for prologue parsing so you don't need prologue
7045 obstacks.
7046 (grammar_declaration): For %union RHS, use `braceless' instead of
7047 "{...}" so that braces are already stripped and code is escaped with
7048 digraphs.
7049 * src/reader.c (prologue_augment): Remove.
7050 (reader): Remove initialization of pre_prologue_obstack and
7051 post_prologue_obstack.
7052 * src/reader.h (prologue_augment): Remove.
7053
7054 * data/c.m4: Remove stray parenthesis.
7055
7056 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7057
7058 Remove quotes from variables names in %define directives and from
7059 qualifiers in %code directives, and restrict the characters that are
7060 allowed in them to M4-friendly ones. For %define, continue to support
7061 the quoted form as a deprecated feature. Discussed starting at
7062 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
7063 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
7064 %code.
7065 * doc/bison.texinfo (Prologue Alternatives): Update.
7066 (Decl Summary): In %defines entry, update mention of `%code requires'
7067 and `%code provides'.
7068 (C++ Location Values): Update %define uses.
7069 (Calc++ Parser Interface): Likewise.
7070 (Calc++ Parser): Likewise, and update `%code requires' uses.
7071 (Table of Symbols): Update %code documentation.
7072 * src/parse-gram.y (prologue_declaration): For %define variables, use
7073 `variable' instead of `STRING'.
7074 (grammar_declaration): For %code qualifiers, use `ID' instead of
7075 `STRING'.
7076 (variable): New nonterminal that takes an `ID' or a `STRING'.
7077 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
7078 and %define uses.
7079 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
7080 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
7081 (%define errors): Update %define uses.
7082
7083 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7084
7085 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
7086 instead of muscle_insert for %define values so that M4-special
7087 characters are replaced with digraphs.
7088 * tests/input.at (%define errors): Extend to check weird values.
7089
7090 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7091
7092 Instead of having skeletons declare all valid %define variables and
7093 %code qualifiers, provide macros that retrieve the associated values
7094 and build these lists automatically. Thus Bison will now warn when a
7095 variable or qualifier is not used by the skeleton in the current
7096 invocation regardless of whether it might sometimes be used by that
7097 skeleton in other invocations. Also, move all %define value macros to
7098 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
7099 form, which is replaced by %code.
7100 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
7101 (b4_check_user_names): ... this, and change the series of valid name
7102 arguments to a single list argument for names used in the skeleton
7103 similar to the existing list argument for names used in the grammar.
7104 Warn instead of complaining.
7105 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
7106 values and %code code, to format %code code properly, and to build
7107 lists of all %define variables and %code qualifiers used in the
7108 skeleton: b4_skeleton_percent_define_variables and
7109 b4_skeleton_percent_code_qualifiers.
7110 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
7111 Remove, and...
7112 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
7113 the skeleton names lists can finish building first. In place of
7114 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
7115 expect the lists b4_user_percent_define_variables and
7116 b4_user_percent_code_qualifiers.
7117 * data/c++.m4: Where setting default values for b4_parser_class_name,
7118 b4_location_type, b4_filename_type, b4_namespace, and
7119 b4_define_location_comparison, update their names to the
7120 b4_percent_define_ namespace.
7121 * data/glr.c: Don't use b4_check_percent_define_variables and
7122 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
7123 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
7124 (b4_parser_class_name, b4_namespace): Define these using
7125 b4_get_percent_define for parser_class_name and namespace.
7126 * data/location.cc: Use b4_get_percent_define.
7127 * data/push.c: Don't use b4_check_percent_define_variables and
7128 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
7129 * data/yacc.c: Likewise, and don't call m4_exit in
7130 b4_use_push_for_pull_if or m4_wrap code will never execute.
7131 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
7132 Rename to...
7133 (muscle_grow_user_name_list): ... this for consistency with the
7134 terminology used in bison.m4.
7135 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
7136 %define variable names, and rename muscle used_percent_define_variables
7137 to user_percent_define_variables.
7138 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
7139 user_percent_code_qualifiers.
7140 (content): Remove.
7141 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
7142 {CODE} form is no longer accepted.
7143 * tests/input.at (Reject bad %code qualifiers): Rename to...
7144 (Reject unused %code qualifiers): ... this, and update test output.
7145 (%define error): Update test output.
7146
7147 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
7148
7149 Check for unrecognized %define variables similar to checking for
7150 unrecognized %code qualifiers. Check for redefined %define variables.
7151 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
7152 generalizes...
7153 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
7154 (b4_check_percent_define_variables): New, also wraps it.
7155 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
7156 variables using b4_check_percent_define_variables.
7157 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
7158 all those exercised in the test suite and all those listed in the
7159 `Default values' section of c++.m4. Are there others?
7160 * data/push.c, data/yacc.c: Declare no valid %define variables.
7161 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
7162 similar to muscle_find, but it works even when the muscle stores a
7163 const value.
7164 (muscle_grow_used_name_list): New function for constructing the used
7165 name list muscles that b4_check_for_unrecognized_names requires.
7166 * src/parse-gram.y (prologue_declaration): Warn if a variable is
7167 %define'd more than once. Define the b4_used_percent_define_variables
7168 muscle with muscle_grow_used_name_list.
7169 (grammar_declaration): Abbreviate %code code with
7170 muscle_grow_used_name_list.
7171 * tests/input.at (%define errors): New.
7172
7173 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7174
7175 Provide warn_at, complain_at, and fatal_at function callbacks to the
7176 skeletons, and use this for %code qualifier complaints.
7177 * data/bison.m4 (b4_error_at): New, invoked by...
7178 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
7179 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
7180 @fatal_at(...@) directives.
7181 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
7182 qualifiers in b4_used_percent_code_qualifiers and to use
7183 b4_complain_at.
7184 * src/location.c, src/location.h (boundary_set_from_string): New global
7185 function.
7186 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
7187 function.
7188 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
7189 to b4_used_percent_code_qualifiers.
7190 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
7191 function.
7192 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
7193 (lineno): Rename to...
7194 (out_lineno): ... this so I don't misunderstand it again.
7195 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
7196 here; these newlines are in the input but not the output file.
7197 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
7198 (at_directive_perform): ... this new static function, and add handling
7199 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
7200 directives.
7201 * tests/input.at (Reject bad %code qualifiers): Update test output with
7202 locations and extend.
7203
7204 * tests/output.at (Output file name: [, Output file name: ]): Remove
7205 bogus comment about these tests failing.
7206
7207 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7208
7209 Clean up b4_check_percent_code_qualifiers a little.
7210 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
7211 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
7212 documentation and add examples.
7213 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
7214 qualifiers here.
7215
7216 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
7217
7218 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
7219 unreliable -- especially when they're hidden inside another macro.
7220 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
7221 data/c.m4: Remove m4_divert(-1).
7222 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
7223 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
7224 m4_divert_push(0) and m4_divert_pop(0).
7225 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
7226 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
7227 pushed and popped by m4sugar, should be first on the stack.
7228
7229 Provide warn, complain, and fatal function callbacks to the skeletons.
7230 This provides more flexibility than m4_fatal, improves the error
7231 message format, and captures messages for translation. Discussed
7232 starting at
7233 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
7234 * data/bison.m4 (b4_error): New, invoked by...
7235 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
7236 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
7237 directives. Because these M4 macros might be called when the current
7238 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
7239 the previous removal of uses of m4_divert, which caused trouble.
7240 (b4_check_percent_code_qualifiers): Use b4_complain instead of
7241 m4_fatal to report unrecognized %code qualifiers.
7242 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
7243 push parser requests.
7244 * data/glr.c: Use b4_complain instead of m4_fatal to report
7245 non-deterministic push parser requests.
7246 Update @output usage to @output(...@) form.
7247 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
7248 report missing %defines. Update @output usage to @output(...@) form.
7249 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
7250 @output(...@) form.
7251 * src/main.c (main): Invoke skel_scanner_free.
7252 * src/scan-skel.h (skel_scanner_free): Prototype new function.
7253 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
7254 obstack_for_string from flex-scanner.h.
7255 (YY_DECL): Use to declare skel_lex static.
7256 (decode_at_digraphs): Remove; now handled in the new
7257 SC_AT_DIRECTIVE_ARG start condition.
7258 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
7259 functions.
7260 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
7261 at_directive_argv): New static globals.
7262 (INITIAL): Use fail_for_invalid_at.
7263 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
7264 recognize the start of a generalized `@directive(...@)' form and
7265 start...
7266 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
7267 directive args (using the new obstack_for_string), to decode the
7268 contained @ diagraphs, and to perform the directive. It recognizes
7269 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
7270 @output(...@).
7271 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
7272 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
7273 `@,'.
7274 (scan_skel): Initialize obstack_for_string on the first call.
7275 (skel_scanner_free): New function to free obstack_for_string.
7276 * tests/input.at (Reject bad %code qualifiers): Update test output.
7277
7278 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
7279
7280 Consolidate the 4 prologue alternative directives (%code, %requires,
7281 %provides, and %code-top) into a single %code directive with an
7282 optional qualifier field. Discussed at
7283 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
7284 * NEWS (2.3a+): Rewrite the existing entry for the prologue
7285 alternatives.
7286 * doc/bison.texinfo (Prologue Alternatives): Update.
7287 (Decl Summary): Update to %code "requires" and %code "provides".
7288 (Calc++ Parser): Update to %code "requires".
7289 (Table of Symbols): Remove entries for %requires, %provides, and
7290 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
7291 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
7292 are replaced by b4_percent_code_provides and b4_percent_code_requires,
7293 which are skeleton-specific.
7294 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
7295 declare what %code qualifiers it supports and to complain if any other
7296 qualifiers were used in the grammar.
7297 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
7298 and b4_user_code([b4_percent_code_provides]) in place of
7299 b4_user_requires and b4_user_provides.
7300 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
7301 Add b4_user_code([b4_percent_code_top]) and
7302 b4_user_code([b4_percent_code]).
7303 Invoke b4_check_percent_code_qualifiers.
7304 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
7305 PERCENT_REQUIRES): Remove.
7306 (grammar_declaration): Remove RHS's for %code-top, %provides, and
7307 %requires. Rewrite the %code RHS as the unqualified form defining the
7308 muscle b4_percent_code. Add another RHS for the qualified %code form,
7309 which defines muscles of the form b4_percent_code_QUALIFIER and the
7310 b4_used_percent_code_qualifiers muscle.
7311 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
7312 PERCENT_REQUIRES): Remove.
7313 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
7314 %code "requires" and %code "provides".
7315 * tests/input.at (Reject bad %code qualifiers): New.
7316
7317 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
7318
7319 Use the new code_props interface for destructors and printers.
7320 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
7321 printer_location members, and change the type of the destructor and
7322 printer members to code_props.
7323 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
7324 symbol_printer_get, semantic_type_destructor_set,
7325 semantic_type_printer_set, default_tagged_destructor_set,
7326 default_tagless_destructor_set, default_tagged_printer_set,
7327 default_tagless_printer_set): Use code_props in arguments and return
7328 types in place of char const * and location.
7329 (symbol_destructor_location_get, symbol_printer_location_get): Remove
7330 since the locations are now contained in the return of
7331 symbol_destructor_get and symbol_printer_get.
7332 * src/output.c (symbol_destructors_output, symbol_printers_output):
7333 Replace with...
7334 (symbol_code_props_output): ... this to eliminate duplicate code.
7335 (output_skeleton): Update to use symbol_code_props_output.
7336 * src/reader.c (symbol_should_be_used): Update use of
7337 symbol_destructor_get.
7338 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
7339 Update uses of the various _destructor_set and _printer_set functions.
7340 * src/symtab.c: (default_tagged_destructor_location,
7341 default_tagless_destructor_location, default_tagged_printer_location,
7342 default_tagless_printer_location): Remove since we...
7343 (default_tagged_destructor, default_tagless_destructor,
7344 default_tagged_printer, default_tagless_printer): ... change the type
7345 of these to code_props.
7346 (symbol_new, semantic_type_new, symbol_destructor_set,
7347 semantic_type_destructor_set, symbol_destructor_get,
7348 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
7349 symbol_check_alias_consistency, default_tagged_destructor_set,
7350 default_tagless_destructor_set, default_tagged_printer_set,
7351 default_tagless_printer_set): Update.
7352 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
7353 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
7354 code_props members.
7355 (symbol_print): Use SYMBOL_CODE_PRINT.
7356
7357 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
7358
7359 Use the new code_props interface for rule actions.
7360 * src/symlist.h (symbol_list): Replace action, action_location, and
7361 used members with a code_props action_props member.
7362 * src/reader.c (symbol_should_be_used, grammar_rule_check,
7363 grammar_midrule_action, grammar_current_rule_merge_set,
7364 grammar_current_rule_symbol_append, packgram): Update.
7365 * src/scan-code.h (translate_rule_action): Remove, no longer used.
7366 * src/scan-code.l (handle_action_dollar): Update.
7367 (translate_rule_action): Remove, no longer used.
7368 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
7369
7370 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
7371
7372 Use the new code_props interface in parse-gram.y.
7373 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
7374 Update all uses of translate_* functions to use the new code_props
7375 interface and to use gram_scanner_last_string_free and
7376 code_scanner_last_string_free where possible.
7377 (grammar_declaration): symbol_list_destructor_set and
7378 symbol_list_printer_set now perform the translation, so don't do it
7379 here. Use gram_scanner_last_string_free where possible.
7380 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
7381 translate_code): Remove, no longer used.
7382 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
7383 symbol_list_printer_set): Perform code translation here rather than
7384 depending on the caller to do so.
7385
7386 * src/symlist.h (struct symbol_list): Correct some documentation typos.
7387 * src/scan-gram.h (gram_last_string): Remove declaration.
7388 * src/scan-gram.l (last_string): Declare it static.
7389
7390 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
7391
7392 Encapsulate code properties and related functionality for the various
7393 destructors, printers, and actions into a code_props structure and
7394 interface. This patch merely implements code_props in scan-code.h and
7395 scan-code.l. Future patches will rewrite other modules to use it.
7396 Discussed starting at
7397 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
7398 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
7399 consistently initialize const structs that have an empty location
7400 field.
7401 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
7402 to ensure consistency.
7403 * src/scan-code.h (code_props): New structure.
7404 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
7405 function, macro, and const global variable for initializing a
7406 code_props with no code.
7407 (code_props_plain_init, code_props_symbol_action_init,
7408 code_props_rule_action_init, code_props_translate_code): The rest of
7409 the new code_props functional interface. Among other things, the init
7410 functions set the code_props kind field so that
7411 code_props_translate_code will know whether to behave like
7412 translate_symbol_action, translate_rule_action, or translate_code.
7413 These old translate functions must remain until all other modules are
7414 updated to use the new code_props interface.
7415 (code_scanner_last_string_free): New function similar to
7416 gram_scanner_last_string_free.
7417 (code_scanner_free): Add documentation.
7418 * src/scan-code.l: Implement the new interface.
7419 (code_lex): Make it static, add a code_props* argument, and remove the
7420 rule argument.
7421 (last_string): New static global similar to the one in scan-gram.l.
7422 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
7423 instead of rule.
7424 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
7425 code_props since Bison may one day use this information for destructors
7426 and printers.
7427 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
7428 (handle_action_dollar): Use symbol_list_n_get and set used flag
7429 directly since symbol_list_n_used_set is removed.
7430 (translate_action): Add a code_props* argument and remove the rule,
7431 action, and location arguments. Pass the code_props* on to code_lex.
7432 (translate_rule_action, translate_symbol_action, translate_code):
7433 Rewrite as wrappers around the new code_props interface.
7434 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
7435 it would eventually need to break the encapsulation of code_props.
7436
7437 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
7438
7439 * etc/.cvsignore: New.
7440
7441 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
7442
7443 Add maintainer-push-check to run maintainer-check using push parsing in
7444 place of pull parsing where available.
7445 * Makefile.am (maintainer-push-check): New.
7446 * data/bison.m4 (b4_use_push_for_pull_if): New.
7447 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
7448 appropriately based on their existing values.
7449 (yypush_parse): Don't print push-parser-specific diagnostics if push
7450 parsing is being used in place of pull parsing.
7451 * data/yacc.c: If push parsing should replace pull parsing, redirect to
7452 push.c.
7453 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
7454 variable, and insert b4_use_push_for_pull_flag into muscles.
7455 * tests/Makefile.am (maintainer-push-check): New.
7456
7457 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
7458
7459 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
7460 (whether successful or failed) so that yypush_parse can be invoked
7461 again to start a new parse using the same yypstate.
7462 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
7463 check multiple yypull_parse invocations on the same yypstate. For pull
7464 mode, extend to check multiple yyparse invocations.
7465 (Exploding the Stack Size with Alloca): Extend to try with
7466 %push-pull-parser.
7467 (Exploding the Stack Size with Malloc): Likewise.
7468
7469 * tests/calc.at (Simple LALR Calculator): Don't specify
7470 %skeleton "push.c" since %push-pull-parser implies that now.
7471 * tests/headers.at (export YYLTYPE): Don't check for the push
7472 declarations. Otherwise, this test case can't be used to see if push
7473 mode can truly emulate pull mode.
7474 * tests/input.at (Torturing the Scanner): Likewise.
7475 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
7476 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
7477 AT_YACC_IF, which now includes the case of push mode since %skeleton
7478 need not be used for push mode. This will be more intuitive once
7479 push.c is renamed to yacc.c.
7480
7481 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
7482
7483 For push mode, convert yyparse from a macro to a function, invoke yylex
7484 instead of passing a yylexp argument to yypull_parse, and don't
7485 generate yypull_parse or yyparse unless %push-pull-parser is declared.
7486 Discussed starting at
7487 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
7488 * data/bison.m4 (b4_pull_if): New.
7489 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
7490 * data/push.c: Improve M4 quoting a little.
7491 (b4_generate_macro_args, b4_parenthesize): Remove.
7492 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
7493 any time a pull parser is requested.
7494 Don't #define this as a wrapper around yypull_parse. Instead, when
7495 both push and pull are requested, make it a function that does that
7496 same thing.
7497 (yypull_parse): If there's a b4_prefix, #define this to
7498 b4_prefix[pull_parse] when both push and pull are requested.
7499 Don't define this as a function unless both push and pull are
7500 requested.
7501 Remove the yylexp argument and hard-code yylex invocation instead.
7502 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
7503 %push-parser.
7504 * src/getargs.c (pull_parser): New global initialized to true.
7505 * getargs.h (pull_parser): extern it.
7506 * src/output.c (prepare): Insert pull_flag muscle.
7507 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
7508 (prologue_declaration): Set both push_parser and pull_parser = true for
7509 %push-pull-parser. Set push_parser = true and pull_parser = false for
7510 %push-parser.
7511 * src/scan-gram.l: Don't accept %push_parser as an alternative to
7512 %push-parser since there's no backward-compatibility concern here.
7513 Scan %push-pull-parser.
7514 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
7515 instead of %push-parser.
7516 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
7517 prototype it in the module that calls yyparse.
7518 * tests/input.at (Torturing the Scanner): Likewise.
7519 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
7520
7521 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
7522
7523 Update etc/bench.pl. Optimize push mode a little (the yyn change
7524 deserves most of the credit).
7525 * Makefile.am (SUBDIRS): Add etc subdirectory.
7526 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
7527 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
7528 yytoken, yyval, and yyloc declarations to...
7529 (yyparse or yypush_parse): ... here to improve performance. For
7530 yypush_parse invocations after the first, be sure to assign yyn its old
7531 value again.
7532 (yypstate_new): Don't bother initializing the yyresult field since the
7533 initial value isn't used.
7534 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
7535 remove the #define that, in push mode, set it to yyps->NAME.
7536 * etc/Makefile.am: New.
7537 * etc/bench.pl: Remove and build it instead from...
7538 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
7539 "tests/bison" from the build directory by default rather than just
7540 invoking "bison" from $PATH.
7541 (calc_grammar): Update push parser code: don't declare yylval globally,
7542 don't define yyparse_wrapper, and don't #define yyparse.
7543 (bench_grammar): Update to check all working combinations of yacc.c,
7544 push.c, impure, pure, pull, and push.
7545
7546 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
7547
7548 For push mode, add pull wrappers around yypush_parse.
7549 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
7550 (yypull_parse): New function wrapping yypush_parse.
7551 (yyparse): New #define wrapping yypull_parse.
7552 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
7553 is declared.
7554 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
7555 prototype yylex in the module that calls yyparse, and don't prototype
7556 yyparse there. Otherwise, the yyparse expansion won't compile.
7557 * tests/input.at (Torturing the Scanner): Likewise.
7558
7559 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
7560
7561 Enable push parsers to operate in impure mode. Thus, %push-parser no
7562 longer implies %pure-parser. The point of this change is to move
7563 towards being able to test the push parser code by running the entire
7564 test suite as if %push-parser had been declared.
7565 * data/push.c (yypush_parse): For impure mode, remove the
7566 yypushed_char, yypushed_val, and yypushed_loc arguments.
7567 Instead, declare these as local variables initialized to the global
7568 yychar, yylval, and yylloc.
7569 For the first yypush_parse invocation only, restore the initial values
7570 of these global variables when it's time to read a token since they
7571 have been overwritten.
7572 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
7573 %push-parser.
7574 * tests/calc.at (Simple LALR(1) Calculator): Always declare
7575 %pure-parser along with %push-parser since this test case was designed
7576 for pure push parsers.
7577 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
7578 (AT_YACC_OR_PUSH_IF): New.
7579 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
7580 add a note that it's still wrong for some cases (as it has been for a
7581 while).
7582 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
7583 %push-parser no longer implies %pure-parser.
7584
7585 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
7586
7587 Remove some unnecessary differences between the pull parser code and
7588 the push parser code. This patch enables yynerrs in push mode.
7589 * data/push.c: Reformat M4 a little.
7590 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
7591 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
7592 because push mode is on. Instead, if pure mode is on, move yynerrs
7593 to...
7594 (b4_declare_parser_state_variables): ... here.
7595 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
7596 to yyps->NAME so it can be used in yypush_parse.
7597 (yypush_parse): Don't omit uses of yynerrs in push mode.
7598
7599 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
7600
7601 Fix bug such that the first pushed token's value and location are
7602 sometimes overwritten (sometimes by %initial-action) before being used.
7603 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
7604 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
7605 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
7606 more closely mimic the pull parser logic.
7607 Don't copy the pushed token to yychar, yylval, and yylloc until it's
7608 time to read a token, which is after any initialization of yylval and
7609 yylloc.
7610 (gottoken): Rename label to...
7611 (yyread_pushed_token): ... for clarity and to avoid infringing on the
7612 user namespace.
7613
7614 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
7615
7616 Rearrange initialization of the parser state variables so that the
7617 skeleton doesn't have to have a copy for pull mode and another for push
7618 mode. This patch also fixes at least a bug such that yylloc was not
7619 initialized (with b4_location_initial_line and
7620 b4_location_initial_column) upon calling yypush_parse. However, that
7621 initialization now overwrites the first token's location;
7622 %initial-action assigning @$ already did the same thing, and both bugs
7623 will be fixed in a later patch.
7624 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
7625 (b4_declare_parser_state_variables): Remove initialization of yytoken,
7626 yyss, yyvs, yyls, and yystacksize.
7627 (yypstate_new): Remove initialization of some yypstate fields: yystate,
7628 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
7629 yylsp.
7630 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
7631 yyps->NAME so it can be used in yypush_parse.
7632 (yyparse or yypush_parse): For yypush_parse, don't print the
7633 "Starting parse" diagnostic for invocations after the first.
7634 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
7635 yypush_parse, only do it for the first invocation.
7636 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
7637 initialization to occur in yypush_parse but only on the first
7638 invocation.
7639
7640 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
7641
7642 * data/push.c: Add CPP guards around push parser declarations in both
7643 the header and the code file.
7644 In the code file, move the push parser declarations to the same place
7645 they appear in the header file.
7646 Clean up the M4 some, especially the inconsistent underquoting in
7647 some b4_c_function_def and b4_c_function_decl uses.
7648
7649 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
7650
7651 Encapsulate the push parser state variables into an M4 macro so the
7652 push skeleton doesn't have to list them again for pull mode's yyparse.
7653 For push mode, remove yypush_parse's local equivalents of these
7654 variables to eliminate unnecessary copying between the two sets at
7655 run-time. This patch also fixes at least a bug related to multiple
7656 %initial-action invocations in push mode.
7657 * data/push.c (b4_declare_parser_variables): Rename to...
7658 (b4_declare_scanner_communication_variables): ... this for clarity and
7659 update both uses.
7660 (b4_declare_yyparse_variables): Remove and move its contents to the one
7661 spot where it was invoked.
7662 (b4_declare_parser_state_variables): New macro containing the parser
7663 state variables required by push mode.
7664 (struct yypstate): Replace all fields but yynew with
7665 b4_declare_parser_state_variables.
7666 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
7667 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
7668 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
7669 (yyparse or yypush_parse): For yyparse in pull mode, replace local
7670 parser state variable declarations with
7671 b4_declare_parser_state_variables.
7672 Don't initialize parser state variables when calling yypush_parse since
7673 yypstate_new already does that.
7674 Invoke the user's initial action only upon the first yypush_parse
7675 invocation.
7676 Remove all code that copies between the local parser state variables
7677 and the yypstate.
7678
7679 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
7680
7681 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
7682 prevent a name collision in a future patch where these names will
7683 sometimes be #define'd.
7684 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
7685 since it no longer has the same name as the existing argument.
7686 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
7687
7688 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
7689 and Joel E. Denny <jdenny@ces.clemson.edu>
7690
7691 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
7692 that the argument is case-insensitive, and there's no `=' here.
7693 For the %skeleton entry, mention that %language is better.
7694 (Bison Options): Likewise for --language and --skeleton. Move the
7695 --skeleton entry so that the `Tuning the parser' section is sorted
7696 alphabetically on long options.
7697 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
7698 %language directive in detail here; cross-reference the %language
7699 documentation instead.
7700 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
7701 `%require "2.3b"' so that the example is always up-to-date.
7702 (Table of Symbols): Add entries for %language and %skeleton.
7703 * examples/extexi (normalize): Instead of replacing every %require
7704 argument with the current Bison version, just substitute for
7705 `@value{VERSION}'. This guarantees that we're testing what actually
7706 appears in the documentation.
7707 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
7708 rather than `@VERSION@'.
7709
7710 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
7711
7712 * NEWS: Reword the %language news a bit, and put it earlier.
7713
7714 * src/getargs.c (skeleton_arg): Last arg is now location const *.
7715 Rewrite to simplify the logic.
7716 (language_argmatch): Likewise.
7717 (program_name): We now own this var.
7718 * src/getargs.h (struct bison_language): Use char[] rather than
7719 const char *.
7720
7721 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
7722 Java is supported.
7723 * src/complain.c (program_name): Remove decl; no longer needed.
7724 * src/main.c (program_name): Remove; now belongs to getargs.
7725
7726 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
7727
7728 * NEWS: Document %language.
7729
7730 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
7731
7732 * data/c-skel.m4, data/c++-skel.m4: New files.
7733 * data/glr.c: Complain on push parsers.
7734
7735 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
7736 over %skeleton.
7737 (Decl Summary): Document %language and %skeleton.
7738 (Command line): Document -L.
7739
7740 * examples/extexi: Rewrite %require directive.
7741 * examples/calc++/Makefile.am: Pass VERSION to extexi.
7742
7743 * src/files.c (compute_exts_from_gc): Look in language structure
7744 for .y extension.
7745 (compute_file_name_parts): Check whether .tab should be added.
7746 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
7747 (language, skeleton_arg, language_argmatch): New.
7748 (long_options): Add --language.
7749 (getargs): Use skeleton_arg, add -L/--language.
7750 * src/getargs.h: Include location.h.
7751 (struct bison_language, language, skeleton_arg, language_argmatch): New.
7752 * src/output.c (prepare): Pick default skeleton from struct language.
7753 Don't dispatch C skeletons here.
7754 * src/parse-gram.y (PERCENT_LANGUAGE): New.
7755 (prologue_declaration): Add "%language" rule, use skeleton_arg.
7756 * src/scan-gram.l ("%language"): New rule.
7757
7758 * tests/calc.at: Test %skeleton and %language.
7759 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
7760 (AT_GLR_IF): Look for %skeleton "glr.cc".
7761 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
7762 (AT_YACC_IF): Reject %language.
7763
7764 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
7765
7766 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
7767 since it wasn't used; only the typedef name 'semantic_type' is needed.
7768 Also, omit trailing white space.
7769
7770 * bootstrap: Sync from coreutils.
7771 (gnulib_extra_files): Add build-aux/announce.gen.
7772 (slurp): Adjust .gitignore files like .cvsignore files.
7773 * build-aux/announce-gen: Remove from CVS, since bootstrap
7774 now creates this.
7775
7776 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
7777
7778 Make %push-parser imply %pure-parser. This fixes several bugs; see
7779 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
7780 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
7781 pure_parser = true.
7782 * data/push.c: Don't bother testing b4_push_if when deciding whether
7783 to expand b4_declare_parser_variables globally.
7784 (yypush_parse): Likewise in here.
7785
7786 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
7787 (yy_reduce_print): Reformat M4 for readability.
7788
7789 2006-12-15 Bob Rossi <bob@brasko.net>
7790 and Joel Denny <jdenny@ces.clemson.edu>
7791
7792 * data/push.c (yypstate): Add typedef, and update all uses of
7793 struct yypstate to just yypstate.
7794 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
7795
7796 2006-12-14 Bob Rossi <bob@brasko.net>
7797
7798 * data/push.c (yypush_parse): Declare prototype regardless of
7799 %locations option.
7800
7801 2006-12-14 Bob Rossi <bob@brasko.net>
7802
7803 * data/push.c (yyparse): Remove the prototype and the #define when in
7804 push-parser mode.
7805
7806 2006-12-13 Bob Rossi <bob@brasko.net>
7807
7808 * data/push.c (yypstate_init): Rename to...
7809 (yypstate_new): ... this and use b4_c_function_def.
7810 (yypstate_delete): New.
7811 (yypush_parse): Change parameters yynval and yynlloc to be const.
7812 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
7813 yypstate_delete functions.
7814
7815 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
7816
7817 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
7818 strange test case titles. Reported by Bob Rossi.
7819
7820 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
7821
7822 * TODO: Add pointer to Sylvain Schmitz's work on static detection
7823 of potential ambiguities in GLR grammers.
7824
7825 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
7826
7827 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
7828 `bison ', use m4_index instead of m4_substr since chopping up a string
7829 containing M4-special characters causes problems here.
7830
7831 Fix a couple of bugs related to special characters in user-specified
7832 file names, and make it easier for skeletons to compute output file
7833 names with the same file name prefix as Bison-computed output file
7834 names.
7835 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
7836 b4_parser_file_name and b4_spec_defines_file instead of
7837 @output_parser_name@ and @output_header_name@, which are now redundant.
7838 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
7839 b4_parser_file_name, b4_spec_defines_file, and the new
7840 @basename(FILENAME@) instead of @output_parser_name@ and
7841 @output_header_name@, which inappropriately escaped the file names as
7842 C string literals.
7843 * src/files.c (all_but_ext): Remove static qualifier.
7844 (compute_output_file_names): Move `free (all_but_ext)' to...
7845 (output_file_names_free): ... here since all_but_ext is needed later.
7846 * src/files.h (all_but_ext): Extern.
7847 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
7848 exactly what MUSCLE_INSERT_STRING used to do.
7849 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
7850 characters are escaped properly.
7851 * src/output.c (prepare): Define muscle file_name_all_but_ext as
7852 all_but_ext.
7853 For pkgdatadir muscle, maintain previous functionality by using
7854 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
7855 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
7856 digraphs would never be expanded. Hopefully no one has M4-special
7857 characters in his Bison installation path.
7858 * src/scan-skel.l: Don't parse @output_header_name@ and
7859 @output_parser_name@ anymore since they're now redundant.
7860 In @output, use decode_at_digraphs.
7861 Parse a new @basename command that invokes last_component.
7862 (decode_at_digraphs): New.
7863 (BASE_QPUTS): Remove unused.
7864 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
7865 (Output file name): New tests.
7866
7867 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
7868
7869 Warn about output files that are generated by the skeletons and that
7870 conflict with other output files.
7871 * data/glr.c: Don't generate the header file here when glr.cc does.
7872 * src/files.c (file_names, file_names_count): New static globals.
7873 (compute_output_file_names): Invoke output_file_name_check for files
7874 not generated by the skeletons and remove existing checks.
7875 (output_file_name_check): New function that warns about conflicting
7876 output file names.
7877 (output_file_names_free): Free file_names.
7878 * src/files.h (output_file_name_check): Declare.
7879 * src/scan-skel.l: Invoke output_file_name_check for files generated by
7880 the skeletons.
7881 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
7882 (Conflicting output files): New tests.
7883
7884 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7885
7886 * doc/bison.texinfo: Fix a couple of typos.
7887
7888 2006-12-08 Bob Rossi <bob@brasko.net>
7889
7890 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
7891 Rename to...
7892 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
7893 update all uses.
7894 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
7895 (yypush_parse): Rename yypvars argument to yyps and remove redundant
7896 local pv.
7897 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
7898 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
7899
7900 2006-12-07 Bob Rossi <bob@brasko.net>
7901 and Joel Denny <jdenny@ces.clemson.edu>
7902
7903 * data/push.c (yypvarsinit): Change return type from void* to struct
7904 yypvars*. No longer cast to void* on return.
7905 (struct yypvars): Remove yylen since it need not be remembered between
7906 yypushparse invocations.
7907 (yypushparse): Don't copy between yylen and pv->yylen.
7908
7909 2006-12-05 Bob Rossi <bob@brasko.net>
7910
7911 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
7912 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
7913 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
7914 (struct yypvars): Remove b4_declare_parser_variables.
7915 (yypvarsinit): Remove init code for removed variables.
7916 (global scope): Do not declare b4_declare_parser_variables if
7917 push or pure mode.
7918 (yypushparse): Add b4_declare_parser_variables.
7919 Init new local variables, and remove init code for removed
7920 yypvars variables.
7921 (yyparse): Delete.
7922 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
7923 and yyparse for other modes.
7924 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
7925 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
7926 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
7927 (AT_PURE_LEX_IF): True if pure or push parser.
7928
7929 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
7930
7931 Document Yacc prologue alternatives and default %destructor's and
7932 %printer's as experimental. Don't mention Java yet. Discussed at
7933 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
7934 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
7935 (2.3a): Annotate this entry to say the old forms of these features were
7936 also experimental.
7937 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
7938 Table of Symbols): Say they're experimental. Comment out any mention
7939 of Java (we'll want this back eventually).
7940
7941 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
7942
7943 Support a file name argument to %defines. Deprecate `=' in
7944 %file-prefix, %name-prefix, and %output. Discussed at
7945 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
7946 * NEWS (2.3a+): Mention.
7947 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
7948 form of %defines, and remove `=' from entries for %file-prefix,
7949 %name-prefix, and %output.
7950 * src/parse-gram.y (prologue_declaration): Implement.
7951 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
7952 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
7953 all but one occurrence of %name-prefix.
7954 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
7955 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
7956 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
7957 occurrence of each of %file-prefix and %output. Add check for %defines
7958 with argument.
7959 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
7960 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
7961 Remove the `=' from %output.
7962
7963 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
7964
7965 Don't escape $ in test case titles since Autoconf 2.61 now does that
7966 correctly.
7967 * tests/actions.at (Default %printer and %destructor are not for error
7968 or $undefined): Here.
7969 (Default %printer and %destructor are not for $accept): Here.
7970 * tests/input.at (Invalid $n and @n): Here.
7971
7972 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
7973
7974 Rename <!> to <>. Discussed starting at
7975 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
7976 * NEWS (2.3a+): Update.
7977 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
7978 Update.
7979 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
7980 * src/scan-gram.l (INITIAL): Implement.
7981 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
7982 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
7983 comment.
7984 * tests/actions.at (Default tagless %printer and %destructor,
7985 Default tagged and per-type %printer and %destructor,
7986 Default %printer and %destructor are not for error or $undefined,
7987 Default %printer and %destructor are not for $accept,
7988 Default %printer and %destructor for mid-rule values): Update.
7989 * tests/input.at (Default %printer and %destructor redeclared,
7990 Unused values with default %destructor): Update.
7991
7992 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
7993
7994 Don't let %prec take a nonterminal.
7995 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
7996 token.
7997 * tests/input.at (%prec takes a token): New test checking that %prec
7998 won't take a nonterminal.
7999
8000 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
8001
8002 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
8003 it was double-quoted.
8004 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
8005 grammar is maintained with Bison's highest standards.
8006 * src/getargs.c: Fix some typos in Doxygen comments.
8007
8008 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
8009
8010 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
8011 later. Reported by Paul Eggert in
8012 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
8013 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
8014 * src/scan-code.l (translate_action): Don't bother invoking
8015 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
8016 (code_scanner_free): Instead of invoking
8017 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
8018 which frees more.
8019 * src/scan-gram.l (gram_scanner_free): Likewise.
8020 * src/scan-skel.l (scan_skel): Likewise.
8021
8022 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
8023
8024 * src/files.c (tr): Change return type to void.
8025 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
8026 has been called previously for the same key.
8027 (muscle_find): Return storage instead of value so that
8028 --enable-gcc-warnings doesn't produce warnings that the return discards
8029 const. aver that the value and storage are the same since storage
8030 could potentially be NULL when value is not.
8031 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
8032 same as 0.
8033
8034 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
8035
8036 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
8037 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
8038 us a slightly cleaner distribution, and also works.
8039 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
8040 gnulib changes.
8041
8042 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
8043 and Paul Eggert <eggert@cs.ucla.edu>
8044
8045 Don't let Bison leak memory except when it complains.
8046 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
8047 (spec_defines_file, dir_prefix): Now char *, not const char *,
8048 since they are freed.
8049 * src/files.c: Likewise.
8050 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
8051 Likewise.
8052 (tr): Now operates in-place. All uses changed.
8053 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
8054 values.
8055 (compute_file_name_parts, compute_output_file_names): Don't store
8056 read-only data in variables that will be freed.
8057 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
8058 src_extension, and header_extension.
8059 (output_file_names_free): New public function to free
8060 spec_verbose_file, spec_graph_file, spec_defines_file,
8061 parser_file_name, and dir_prefix.
8062 * src/getargs.c (getargs): Don't store read-only data in variables that
8063 will be freed.
8064 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
8065 (which previously existed but was unused), and quotearg_free.
8066 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
8067 * src/muscle_tab.c: Likewise.
8068 (muscle_entry): Make the value char const *,
8069 and add a new storage member that is char * and can be freed.
8070 (muscle_entry_free): New private function.
8071 (muscle_init): Use it instead of free.
8072 (muscle_insert, muscle_grow): Update and use new storage member.
8073 (muscle_code_grow): Free the string passed to muscle_grow
8074 since it's not needed anymore.
8075 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
8076 add a new `char *code' member.
8077 ("{...}"): Declare semantic type as code.
8078 * src/scan-code.h (translate_rule_action):
8079 (translate_symbol_action, translate_code, translate_action): Return
8080 `char const *' rather than `char *' since external code should not free
8081 these strings.
8082 * src/scan-code.l: Likewise.
8083 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
8084 which is "{...}" in the parser.
8085 * tests/Makefile.am (maintainer-check-valgrind): Set
8086 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
8087 Valgrind.
8088 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
8089 complain.
8090 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
8091 expecting a non-zero exit status sets --leak-check=summary and
8092 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
8093 this case, and we don't want to hear about it.
8094
8095 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
8096
8097 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
8098 instead of from the template, to simplify configuration a bit.
8099 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
8100 and m4/wint_t.m4, as they are needed with the latest gnulib.
8101
8102 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
8103
8104 Disable unset/unused mid-rule value warnings by default, and recognize
8105 --warnings=midrule-values to enable them. Discussed starting at
8106 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
8107 * NEWS (2.3a+): Mention.
8108 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
8109 warnings): Add entry for midrule-values subargument.
8110 * src/reader.c (symbol_should_be_used): Don't return true just because
8111 the value is a set/used mid-rule value unless
8112 --warnings=midrule-values was specified.
8113 * tests/input.at (Unused values, Unused values before symbol
8114 declarations): Run tests with and without --warnings=midrule-values.
8115
8116 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
8117 than LIST_FREE directly.
8118
8119 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
8120
8121 Finish implementing --warnings=error, which should not be implied by
8122 --warnings=all (or by its synonyms -W and --warnings without
8123 subarguments).
8124 * src/complain.c (set_warning_issued): New function to report that
8125 warnings are being treated as errors and to record an error if so.
8126 Invoke...
8127 (warn_at, warn): ... here.
8128 * src/getargs.c (warnings_args, warnings_types): Reorder so that
8129 "error - warnings are errors" does not appear above "all - all of the
8130 above".
8131 (getargs): For -W and --warnings without subarguments, don't let
8132 FLAGS_ARGMATCH set warnings_error in warnings_flag.
8133 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
8134
8135 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
8136
8137 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
8138 empty subargument list. For example: `bison --warnings= parser.y'.
8139
8140 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
8141
8142 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
8143 the parser header file so that gcc doesn't warn.
8144
8145 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
8146
8147 Split the default %destructor/%printer into two kinds: <*> and <!>.
8148 Discussed starting at
8149 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
8150 * NEWS (2.3a+): Mention.
8151 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
8152 previous change today related to mid-rules.
8153 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
8154 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
8155 (TYPE_TAG_ANY): Add as <*>.
8156 (TYPE_TAG_NONE): Add as <!>.
8157 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
8158 for <*> and <!>.
8159 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
8160 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
8161 * src/symlist.c (symbol_list_default_new): Split into tagged and
8162 tagless versions.
8163 (symbol_list_destructor_set, symbol_list_printer_set): Split
8164 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
8165 SYMLIST_DEFAULT_TAGLESS.
8166 * src/symlist.h: Update symbol_list_default*_new prototypes.
8167 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
8168 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
8169 * src/symtab.c (default_destructor, default_destructor_location,
8170 default_printer, default_printer_location): Split each into tagged and
8171 tagless versions.
8172 (symbol_destructor_get, symbol_destructor_location_get,
8173 symbol_printer_get, symbol_printer_location_get): Implement tagged
8174 default and tagless default cases.
8175 (default_destructor_set, default_printer_set): Split each into tagged
8176 and tagless versions.
8177 * src/symtab.h: Update prototypes.
8178 * tests/actions.at (Default %printer and %destructor): Rename to...
8179 (Default tagless %printer and %destructor): ... this, and extend.
8180 (Per-type %printer and %destructor): Rename to...
8181 (Default tagged and per-type %printer and %destructor): ... this, and
8182 extend.
8183 (Default %printer and %destructor for user-defined end token): Extend.
8184 (Default %printer and %destructor are not for error or $undefined):
8185 Update.
8186 (Default %printer and %destructor are not for $accept): Update.
8187 (Default %printer and %destructor for mid-rule values): Extend.
8188 * tests/input.at (Default %printer and %destructor redeclared): Extend.
8189 (Unused values with default %destructor): Extend.
8190
8191 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
8192
8193 Don't apply the default %destructor/%printer to an unreferenced midrule
8194 value. Mentioned at
8195 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
8196 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
8197 like $@n instead of just @n so that the default %destructor/%printer
8198 logic doesn't see them as user-defined symbols.
8199 (symbol_is_dummy): Check for both forms of the name.
8200 * src/reader.c (packgram): Remove the `$' from each midrule symbol
8201 name for which the midrule value is referenced in any action.
8202 * tests/actions.at (Default %printer and %destructor for mid-rule
8203 values): New test.
8204 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
8205 for change to dummy symbol names.
8206
8207 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
8208
8209 Warn about unset midrule $$ if the corresponding $n is used.
8210 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
8211 $n usage.
8212 (packgram): Before invoking grammar_rule_check on any rule, make sure
8213 all actions have already been scanned in order to set `used' flags.
8214 Otherwise, checking that a midrule's $$ is set will not always work
8215 properly because the midrule check must forward-reference the midrule's
8216 parent rule.
8217 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
8218 warning.
8219
8220 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
8221
8222 More improvements to the documentation of the prologue alternatives:
8223 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
8224 Bison manual.
8225 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
8226 some text to clarify the relative importance of the new directives and
8227 to show how these directives may be viewed as code labels.
8228
8229 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
8230
8231 Similar to the recently removed %before-header, add %code-top as the
8232 alternative to the pre-prologue. Mentioned at
8233 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
8234 Also, let the prologue alternatives appear in the grammar section.
8235 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
8236 (prologue_declaration): Move the existing prologue alternatives to...
8237 (grammar_declaration): ... here and add %code-top.
8238 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
8239
8240 Clean up and extend documentation for the prologue alternatives.
8241 * NEWS (2.3a+): Describe prologue alternatives.
8242 * doc/bison.texinfo (Prologue): Move discussion of prologue
8243 alternatives to...
8244 (Prologue Alternatives): ... this new section, and extend it to discuss
8245 all 4 directives in detail.
8246 (Table of Symbols): Clean up discussion of prologue alternatives and
8247 add %code-top.
8248
8249 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8250
8251 DJGPP specific issues.
8252
8253 * djgpp/config.bat: config.hin has been moved to lib. Adjust
8254 config.bat accordingly.
8255 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
8256 * djgpp/config.site: Likewise.
8257
8258 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
8259
8260 Replace %*-header with %provides, %requires, %code. See discussion at
8261 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
8262
8263 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
8264 (b4_user_start_header): Remove.
8265 * data/glr.c: Use new macros instead of b4_*start_header
8266 and b4_*end_header.
8267 * data/glr.cc: Likewise.
8268 * data/lalr1.cc: Likewise.
8269 * data/push.c: Likewise.
8270 * data/yacc.c: Likewise.
8271
8272 * doc/bison.texinfo: Remove %before-header, rename
8273 %{start,end,after}-header to %requires, %provides, %code.
8274
8275 * src/parse-gram.y: Likewise (also rename token names accordingly).
8276 * src/scan-gram.l: Likewise.
8277 * tests/actions.at: Likewise.
8278
8279 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
8280
8281 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
8282 Problem reported by Joel E. Denny.
8283
8284 2006-10-14 Jim Meyering <jim@meyering.net>
8285
8286 (Sync from coreutils.)
8287 Work also when the working directory (with e.g. coreutils sources)
8288 is version controlled with git, rather than CVS.
8289 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
8290 rather than CVS.
8291 In messages and comments, say e.g., "checked-out sources",
8292 rather than "CVS sources".
8293 (version_controlled_file): New function. Work for git as well as
8294 for CVS. Don't use grep's -q option.
8295 (slurp): Call it here, in place of CVS-specific code.
8296
8297 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
8298
8299 Fix testsuite for ./configure --enable-gcc-warnings:
8300 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
8301 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
8302 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
8303 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
8304 * test/regression.at (Diagnostic that expects two alternatives):
8305 Likewise.
8306
8307 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
8308
8309 * bootstrap.conf (gnulib_modules): Add config-h.
8310 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
8311 worry about HAVE_CONFIG_H.
8312 * lib/abitset.c: Likewise.
8313 * lib/bitset.c: Likewise.
8314 * lib/bitset_stats.c: Likewise.
8315 * lib/bitsetv-print.c: Likewise.
8316 * lib/bitsetv.c: Likewise.
8317 * lib/ebitset.c: Likewise.
8318 * lib/get-errno.c: Likewise.
8319 * lib/lbitset.c: Likewise.
8320 * lib/subpipe.c: Likewise.
8321 * lib/timevar.c: Likewise.
8322 * lib/vbitset.c: Likewise.
8323 * lib/bitset.c: Include "bitset.h" first, to test interface.
8324 * lib/bitset_stats.c: Include "bitset_stats.h" first.
8325 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
8326 * lib/bitsetv.c: Include "bitsetv.h" first.
8327 * lib/get-errno.c: Include "get-errno.h" first.
8328 * m4/.cvsignore: Add config-h.m4.
8329 * tests/actions.at (Default %printer and %destructor for ...):
8330 Adjust expected line numbers in output to reflect removal of #if
8331 HAVE_CONFIG_H lines.
8332 * tests/glr-regression.at (Missed %merge type warnings when ...):
8333 Likewise.
8334 * tests/regression.at (Braced code in declaration in rules section):
8335 Likewise.
8336 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
8337 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
8338 Include <config.h> unconditionally.
8339
8340 * bootstrap: Sync from coreutils, as follows:
8341
8342 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
8343
8344 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
8345 variable was sometimes used without being initialized. This
8346 messed up the installation of the INSTALL file in some cases.
8347
8348 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
8349
8350 * bootstrap (usage, main program, symlink_to_gnulib): Add option
8351 --copy. Inspired by a suggestion from Bruno Haible.
8352
8353 2006-10-03 Jim Meyering <jim@meyering.net>
8354
8355 * bootstrap: Undo last change to this file, since now gnulib-tool
8356 sticks with the automake default in generating dependencies.
8357
8358 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
8359
8360 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
8361 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
8362
8363 * doc/bison.1: Add copyright notice.
8364
8365 * data/glr.c: Don't include <stdarg.h>; not used.
8366
8367 * NEWS: The -g and --graph options now output graphs in Graphviz
8368 DOT format, not VCG format.
8369 * doc/bison.1: Likewise.
8370 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
8371 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
8372 of this change in
8373 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
8374 * TODO: Remove Graphviz entry.
8375 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
8376 remove vcg.c, vcg.h, vcg_defaults.h.
8377 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
8378 * src/graphviz.c, src/graphviz.h: New files.
8379 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
8380 * src/files.h: Make comment more generic.
8381 * src/main.c (main): Likewise.
8382 * src/print_graph.h: Likewise.
8383 * src/getargs.c (usage): Make usage description more generic.
8384 * src/print_graph.c: Include graphviz.h rather than vcg.h.
8385 (static_graph, fgraph): Remove. All uses changed to pass
8386 arguments instead of sharing a static var.
8387 (print_core, print_actions, print_state, print_graph):
8388 Output graphviz format rather than VCG format.
8389 * tests/.cvsignore: Remove *.vcg; add *.dot.
8390 * tests/output.at: Expect *.dot files, not *.vcg files.
8391
8392 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
8393 accommodates the 2006-10-08 change.
8394
8395 2006-10-11 Bob Rossi <bob@brasko.net>
8396
8397 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
8398 (b4_yyssa, b4_yyerror_range): New macros.
8399 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
8400 (yypvarsinit): Remove init of removed fields.
8401 (yypushparse): Remove use of removed fields; use new macros instead.
8402
8403 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
8404
8405 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
8406 in a push parser. Reindent slightly to match yacc.c better.
8407
8408 2006-10-11 Bob Rossi <bob@brasko.net>
8409
8410 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
8411 yymsg_alloc fields.
8412 (yypvarsinit, yypushparse): Remove init of removed fields.
8413 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
8414
8415 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
8416
8417 * THANKS: Add Paolo Bonzini and Bob Rossi.
8418
8419 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
8420
8421 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
8422 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
8423 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
8424 b4_define_user_cde and uses): Remove.
8425 (b4_comment, b4_prefix, b4_sync_start): New.
8426 * data/bison.m4: New file, with most of the content removed from c.m4.
8427 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
8428 * src/output.c (output_skeleton): Pass bison.m4.
8429 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
8430 only if specified.
8431
8432 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
8433
8434 Fix test failure reported by Tom Lane in
8435 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
8436 and try to make such failures easier to catch in the future.
8437 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
8438 that's now the caller's responsibility.
8439 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
8440 Set yychar = YYEOF if it's negative.
8441 * tests/actions.at (yylex): Abort if asked to read past EOF.
8442 * tests/conflicts.at (yylex): Likewise.
8443 * tests/cxx-type.at (yylex): Likewise.
8444 * tests/glr-regression.at (yylex): Likewise.
8445 * tests/input.at (yylex): Likewise.
8446 * tests/regression.at (yylex): Likewise.
8447 * tests/torture.at (yylex): Likewise.
8448
8449 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
8450
8451 Fix problems with translating English-language diagnostics.
8452 * bootstrap: Fix bug introduced in recent bootstrap changes, with
8453 respect to bison-runtime pot generation. The YY_ stuff
8454 wasn't being captured.
8455 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
8456 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
8457 * runtime-po/POTFILES.in: Add data/push.c.
8458
8459 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
8460
8461 Merge bootstrap changes from coreutils.
8462
8463 2006-09-28 Jim Meyering <jim@meyering.net>
8464
8465 Automatically generated dependencies are important even
8466 when all of the sources in a directory come from gnulib.
8467 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
8468 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
8469
8470 2006-09-23 Jim Meyering <jim@meyering.net>
8471
8472 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
8473
8474 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
8475
8476 * bootstrap: Add support for --force.
8477 (usage): New function. Describe usage less tersely.
8478 (CVS_only_file): New var.
8479
8480 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
8481
8482 * data/push.c (YYPUSH_MORE): Make it an enum instead.
8483 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
8484 Adjust white space and comments to match GNU style better.
8485
8486 2006-09-20 Bob Rossi <bob@brasko.net>
8487
8488 * data/push.c (yyresult_get): Remove function.
8489 (YYPUSH_MORE): Add #define.
8490 (yypushparse): Modify return value.
8491
8492 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
8493
8494 * stamp-h.in: Remove; no longer needed.
8495 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
8496 Remove config.h, config.hin, intl (no longer created).
8497 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
8498 stamp-h1.
8499
8500 Sync bootstrap from coreutils, as follows:
8501
8502 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
8503
8504 * bootstrap (symlink_to_gnulib): New function.
8505 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
8506 to copies-of-gnulib.
8507 (cp_mark_as_generated, slurp, gnulib_files):
8508 Avoid making a copy if it's the same as the old version.
8509 (gnulib_files): Add support for this variable (used by Bison).
8510
8511 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
8512
8513 * src/getargs.c (usage): Rework to use conventions similar to
8514 coreutils, to make translation a bit easier and the code a bit
8515 smaller. Problem reported by Tim Van Holder.
8516
8517 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
8518
8519 Use some of gnulib's new modules, taken from coreutils.
8520
8521 * bootstrap: Sync from coreutils, except add support for gnulib_files.
8522 * bootstrap.conf: New file.
8523 (gnulib_modules): Add configmake, inttypes, unistd.
8524 (XGETTEXT_OPTIONS): Add complain, complain_at,
8525 fatal, fatal_at, warn, warn_at, unexpected_end.
8526 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
8527 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
8528 (gl_EARLY): Add.
8529 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
8530 (gl_INIT): Add
8531 (GNULIB_AUTOCONF_SNIPPET): Remove.
8532 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
8533 the pickiest.
8534 * lib/.cvsignore: Add inttypes_.h.
8535 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
8536 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
8537 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
8538 no-longer-necessary initializations.
8539 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
8540 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
8541 use the unistd module.
8542 * src/system.h: Likewise.
8543 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
8544 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
8545 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
8546 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
8547 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
8548 * src/system.h: Include inttypes.h unconditionally, now that we
8549 use the inttypes module. Don't bother to include stdint.h, since
8550 inttypes.h now does that for us.
8551 (LOCALEDIR): Remove, now that we use the configmake module.
8552 * src/getargs.c: Include configmake.h.
8553 * src/main.c: Likewise.
8554 * src/output.c: Likewise.
8555 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
8556 not from $abs_top_builddir, since config.h moved.
8557
8558
8559 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
8560 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
8561
8562 * src/parse-gram.y (symbol_declaration): Don't put statements
8563 before declarations; it's not portable to C89.
8564 * src/scan-code.l (handle_action_at): Likewise.
8565
8566 * src/scan-code.l: Always initialize braces_level; the old code
8567 left it uninitialized and therefore had undefined behavior.
8568
8569 Don't attempt to redefine 'assert', since it runs afoul of
8570 systems where standard headers (mistakenly) include <assert.h>.
8571 Instead, define and use our own alternative, called 'aver'.
8572 * src/reader.c: Don't include assert.h, since we no longer
8573 use assert.
8574 * src/scan-code.l: Likewise.
8575 * src/system.h (assert): Remove, replacing with....
8576 (aver): New function, taking a bool arg. All uses changed.
8577 * src/tables.c (pack_vector): Ensure that aver arg is bool,
8578 not merely an integer.
8579
8580 2006-09-15 Bob Rossi <bob@brasko.net>
8581
8582 Add support for push parsing. Based on the original work of
8583 Odd Arild Olsen <oao@fibula.no>.
8584 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
8585 * data/c.m4 (YYPUSH): New.
8586 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
8587 * data/push.c: New file.
8588 * src/getargs.c (push_parser): New var.
8589 * src/getargs.h (push_parser): New declaration.
8590 * src/output.c (prepare): Add macro insertion of `push_flag'.
8591 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
8592 (prologue_declaration): Parse %push-parser.
8593 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
8594 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
8595 list of removed lines from the traces observed.
8596 (AT_CHECK_CALC_LALR): Added push parser tests.
8597
8598 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
8599
8600 * NEWS: Version 2.3a.
8601 * configure.ac (AC_INIT): Likewise.
8602
8603 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
8604 "#define YYSTYPE int" that caused "make maintainer-check" to fail
8605 due to header ordering dependencies. I don't know why the #define
8606 was there.
8607
8608 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
8609 runtime cost when YYDEBUG is not defined, and so that some tests
8610 that used to fail now work. Problem and initial suggestion by
8611 Paolo Bonzini.
8612 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
8613 * data/glr.cc (b4_parser_class_name):
8614 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
8615 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
8616 (yydebug_) [YYDEBUG]: New member.
8617 (yycdebug_): Now defined only if YYDEBUG.
8618 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
8619 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
8620 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
8621 if YYYDEBUG.
8622 (debug_stream, set_debug_stream, debug_level, set_debug_level):
8623 Define only if YYDEBUG.
8624 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
8625 set_debug_level.
8626 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
8627 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
8628 AT_CHECK_CALC_GLR_CC that are working now.
8629
8630 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
8631
8632 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
8633 We don't need them in glr.cc, and glr.c defines them.
8634 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
8635 assumes that defining it to anything is the same as defining
8636 it to 1. Problem reported by Paolo Bonzini.
8637
8638 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
8639
8640 * data/c.m4 (b4_null, b4_case): Define.
8641 * src/output.c (prepare_symbols): Use b4_null.
8642 (user_actions_output): Use b4_case.
8643
8644 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
8645
8646 * data/glr.c (b4_shared_declarations): Put start-header first,
8647 before any #includes that we generate, so that feature-test
8648 macros work. Problem reported by Michael Deutschmann in
8649 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
8650 * data/lalr1.cc: Likewise.
8651 * doc/bison.texinfo (Prologue): Document that feature-test macros
8652 should be defined before any Bison declarations.
8653 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
8654 that depend on location.hh after, not before, Bison decls, since
8655 we now include location.hh after the first user prologue.
8656
8657 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
8658 Sander Brandenburg in
8659 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
8660 Also, fix minor white space and comment issues.
8661 (Prologue): Mention that it's better to define feature-test macros
8662 before Bison declarations. Problem reported by Michael Deutschmann.
8663
8664 * README-cvs: Fix typo: "&" should be "&&". Problem reported
8665 by Jim Meyering.
8666 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
8667 This adjusts to recent gnulib changes.
8668
8669 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
8670
8671 Finish implementation of per-type %destructor/%printer. Discussed
8672 starting at
8673 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
8674 and
8675 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
8676 * NEWS (2.3+): Add a description of this feature to the default
8677 %destructor/%printer description.
8678 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
8679 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
8680 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
8681 list node contains a semantic type.
8682 * src/symtab.c, src/symtab.h: Extend with a table that associates
8683 semantic types with their %destructor's and %printer's.
8684 (semantic_type_from_uniqstr, semantic_type_get,
8685 semantic_type_destructor_set, semantic_type_printer_set): New functions
8686 composing the public interface of that table.
8687 (symbol_destructor_get, symbol_destructor_location_get,
8688 symbol_printer_get, symbol_printer_location_get): If there's no
8689 per-symbol %destructor/%printer, look up the per-type before trying
8690 the default.
8691 * tests/actions.at (Per-type %printer and %destructor): New test case.
8692 * tests/input.at (Default %printer and %destructor redeclared):
8693 Extend to check that multiple occurrences of %symbol-default in a
8694 single %destructor/%printer declaration is an error.
8695 (Per-type %printer and %destructor redeclared, Unused values with
8696 per-type %destructor): New test cases.
8697
8698 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
8699
8700 Require default %destructor/%printer to be declared using
8701 %symbol-default instead of an empty symbol list, and start working on
8702 new per-type %destructor/%printer. Discussed at
8703 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
8704 * NEWS (2.3+): Add %symbol-default to example.
8705 * bison.texinfo (Freeing Discarded Symbols): Likewise.
8706 (Table of Symbols): Add entry for %symbol-default.
8707 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
8708 (generic_symlist, generic_symlist_item): New nonterminals for creating
8709 a list in which each item is a symbol, semantic type, or
8710 %symbol-default.
8711 (grammar_declaration): Use generic_symlist in %destructor and %printer
8712 declarations instead of symbols.1 or an empty list.
8713 (symbol_declaration, precedence_declaration, symbols.1): Update actions
8714 for changes to symbol_list.
8715 * src/reader.c: Update for changes to symbol_list.
8716 * src/scan-code.l: Likewise.
8717 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
8718 * src/symlist.c, src/symlist.h: Extend such that a list node may
8719 represent a semantic type or a %symbol-default in addition to just an
8720 ordinary symbol. Add switched functions for setting %destructor's and
8721 %printer's.
8722 * tests/actions.at, tests/input.at: Add %symbol-default to all default
8723 %destructor/%printer declarations.
8724
8725 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
8726
8727 Whether the default %destructor/%printer applies to a particular symbol
8728 isn't a question of whether the user *declares* that symbol (in %token,
8729 for example). It's a question of whether the user by any means
8730 *defines* the symbol at all (by simply using a char token, for
8731 example). $end is defined by Bison whereas any other token with token
8732 number 0 is defined by the user. The error token is always defined by
8733 Bison regardless of whether the user declares it with %token, but we
8734 may one day let the user define error as a nonterminal instead.
8735 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
8736 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
8737 the meaning of "user-defined".
8738 * tests/actions.at (Default %printer and %destructor for user-declared
8739 end token): Rename to...
8740 (Default %printer and %destructor for user-defined end token): ...
8741 this.
8742
8743 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
8744 computation of whether to apply the default, don't maintain a list of
8745 every Bison-defined symbol. Instead, just check for a first character
8746 of '$', which a user symbol cannot have, and check for the error token.
8747
8748 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
8749
8750 Don't apply the default %destructor or %printer to the error token,
8751 $undefined, or $accept. This change fits the general rule that the
8752 default %destructor and %printer are only for user-declared symbols,
8753 and it solves several difficulties that are described in the new test
8754 cases listed below.
8755 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
8756 * tests/actions.at (Default %printer and %destructor are not for error
8757 or $undefined, Default %printer and %destructor are not for $accept):
8758 New test cases.
8759
8760 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
8761
8762 Allow %start after the first rule.
8763 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
8764 when parsing the first rule.
8765 (check_and_convert_grammar): Search for it here after all grammar
8766 declarations have been parsed. Skip midrules, which have dummy LHS
8767 nonterminals.
8768 * src/symtab.c (symbol_is_dummy): New function.
8769 * src/symtab.h (symbol_is_dummy): Declare it.
8770 * tests/input.at (%start after first rule): New test.
8771
8772 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
8773
8774 Redo some of the previous commit: add back the ability to use
8775 non-aliased/undeclared string literals since it might be useful to
8776 those declaring %token-table.
8777 * src/reader.c (check_and_convert_grammar): Undo changes in previous
8778 commit: don't worry about complaints from symbols_pack.
8779 * src/symtab.c (symbol_new, symbol_class_set,
8780 symbol_check_alias_consistency): Undo changes in previous commit: count
8781 each string literal as a new symbol and token, assign it a symbol
8782 number, and don't complain about non-aliased string literals.
8783 (symbols_pack): Since symbol_make_alias still does not decrement symbol
8784 and token counts but does still set aliased tokens to the same number,
8785 symbol_pack_processor now leaves empty slots in the symbols array.
8786 Remove those slots.
8787 * tests/regression.at (Undeclared string literal): Remove test case
8788 added in previous commit since non-aliased string literals are allowed
8789 again.
8790 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
8791 remove unnecessary string literal declarations.
8792 * tests/sets.at (Firsts): Likewise.
8793
8794 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
8795
8796 Don't allow an undeclared string literal, but allow a string literal to
8797 be used before its declaration.
8798 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
8799 symbols_pack complained.
8800 * src/symtab.c (symbol_new): Don't count a string literal as a new
8801 symbol.
8802 (symbol_class_set): Don't count a string literal as a new token, and
8803 don't assign it a symbol number since symbol_make_alias does that.
8804 (symbol_make_alias): It's not necessary to decrement the symbol and
8805 token counts anymore. Don't assume that an alias declaration occurs
8806 before any uses of the identifier or string, and thus don't assert that
8807 one of them has the highest symbol number so far.
8808 (symbol_check_alias_consistency): Complain if there's a string literal
8809 that wasn't declared as an alias.
8810 (symbols_pack): Bail if symbol_check_alias_consistency failed since
8811 symbol_pack asserts that every token has been assigned a symbol number
8812 although undeclared string literals have not.
8813 * tests/regression.at (String alias declared after use, Undeclared
8814 string literal): New test cases.
8815 (Characters Escapes, Web2c Actions): Declare string literals as
8816 aliases.
8817 * tests/sets.at (Firsts): Likewise.
8818
8819 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
8820
8821 In the grammar scanner, STRING_FINISH unclosed constructs and return
8822 them to the parser in order to improve error messages.
8823 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
8824 SC_BRACED_CODE, SC_PROLOGUE): Implement.
8825 * tests/input.at (Unclosed constructs): New test case.
8826 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
8827 seen.
8828
8829 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
8830 unused global.
8831
8832 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
8833
8834 Handle string aliases for character tokens correctly.
8835 * src/symtab.c (symbol_user_token_number_set): If the token has an
8836 alias, check and set its alias's user token number instead of its own,
8837 which is set to indicate the alias. Previously, every occurrence of
8838 the character token in the grammar overwrote that alias indicator with
8839 the character code.
8840 * tests/input.at (String aliases for character tokens): New test.
8841
8842 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
8843
8844 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
8845
8846 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
8847
8848 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
8849 to prevent failures when building on older platforms.
8850 Check for autopoint failure.
8851 Set XGETTEXT_OPTIONS to values that check for C format strings,
8852 so that translators are warned about them (this also helps
8853 prevent core dumps).
8854
8855 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
8856 function, since it simplifies our code a bit.
8857
8858 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
8859 rather than -W, so we don't get bogus warnings about sign comparisons.
8860 Add -Wpointer-arith, since that warning is useful (it reports code
8861 that does not conform to C89 and that some compilers reject).
8862 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
8863 since it's no longer needed.
8864
8865 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
8866
8867 Clean up scanners a bit.
8868 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
8869 definitions so gcc won't warn when obstack_for_string is unused.
8870 * src/scan-code.l: config.h and system.h are already #include'd by
8871 scan-code-c.c, so get rid of them here.
8872 * src/scan-gram.l: Likewise.
8873 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
8874 definitions rather than duplicating the rest of it.
8875 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
8876
8877 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
8878
8879 Suppress signed/unsigned comparison warnings for yycheck.
8880 * data/c.m4 (b4_safest_int_type): New macro.
8881 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
8882 a signed int type, cast it to b4_safest_int_type first.
8883 * data/yacc.c: Likewise.
8884 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
8885 also overwritten.
8886
8887 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
8888
8889 * doc/bison.texinfo: Fix some typos.
8890
8891 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
8892
8893 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
8894 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
8895
8896 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
8897 the latest gnulib does this a different way.
8898 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
8899 translation was patched, so stop omitting it.
8900
8901 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
8902
8903 Enable declaration of default %printer/%destructor. Make the parser
8904 use these for all user-declared grammar symbols for which the user does
8905 not declare a specific %printer/%destructor. Thus, the parser uses it
8906 for token 0 if the user declares it but not if Bison generates it as
8907 $end. Discussed starting at
8908 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
8909 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
8910 and
8911 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
8912 * NEWS (2.3+): Mention.
8913 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
8914 declare a %destructor for a mid-rule's semantic value. It's just
8915 impossible to declare one specific to it.
8916 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
8917 code. Describe default %destructor form.
8918 * src/parse-gram.y (grammar_declaration): Parse default
8919 %printer/%destructor declarations.
8920 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
8921 and symbol_destructor_location_get rather than accessing the destructor
8922 and destructor_location members of struct symbol.
8923 (symbol_printers_output): Likewise but for %printer's.
8924 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
8925 again.
8926 * src/symtab.c (default_destructor, default_destructor_location,
8927 default_printer, default_printer_location): New static global
8928 variables to record the default %destructor and %printer.
8929 (symbol_destructor_get, symbol_destructor_location_get,
8930 symbol_printer_get, symbol_printer_location_get): New functions to
8931 compute the appropriate %destructor and %printer for a symbol.
8932 (default_destructor_set, default_printer_set): New functions to set the
8933 default %destructor and %printer.
8934 * src/symtab.h: Prototype all those new functions.
8935 * tests/actions.at (Default %printer and %destructor): New test to
8936 check that the right %printer and %destructor are called, that they're
8937 not called for $end, and that $$ and @$ work correctly.
8938 (Default %printer and %destructor for user-declared end token): New
8939 test to check that the default %printer and %destructor are called for
8940 a user-declared end token.
8941 * tests/input.at (Default %printer and %destructor redeclared, Unused
8942 values with default %destructor): New tests to check related grammar
8943 warnings and errors.
8944
8945 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
8946
8947 Clean up handling of %destructor for the end token (token 0).
8948 Discussed starting at
8949 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
8950 and
8951 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
8952
8953 Make the skeletons consistent in how they pop the end token and invoke
8954 its %destructor.
8955 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
8956 state, which has token number 0, since this would invoke the
8957 %destructor for the end token.
8958 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
8959 until after shifting the end token, or else it won't be popped.
8960 * data/yacc.c (yyparse): Likewise.
8961
8962 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
8963 it's the end token. Upon termination, destroy an unshifted lookahead
8964 even when it's the end token.
8965 * data/lalr1.cc (yy::parser::parse): Likewise.
8966 * data/yacc.c (yyparse): Likewise.
8967
8968 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
8969 value warnings for the end token when the user gives the end token a
8970 %destructor.
8971
8972 * tests/actions.at (Printers and Destructors): Test all the above.
8973
8974 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
8975
8976 Update to latest gnulib and gettext versions.
8977 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
8978 Add fopen-safer.
8979 (gnulib_files): Add m4/warning.m4. Don't worry about files
8980 overwritten by autopoint.
8981 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
8982 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
8983 rejects them.
8984 Don't use autoreconf; instead, invoke autopoint etc. by hand,
8985 so that we can remove the intl files at a better time.
8986 (intl_files_to_remove): Remove aclocal.m4, since it gets
8987 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
8988 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
8989 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
8990 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
8991 Remove datarootdir hack; no longer needed.
8992 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
8993 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
8994 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
8995 strdup.h.
8996 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
8997 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
8998
8999 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
9000
9001 * bootstrap: Adjust to today's change to gnulib-tool by invoking
9002 it with --assume-autoconf='latest-stable'.
9003
9004 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
9005
9006 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
9007 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
9008 YYSTYPE' and `{'.
9009 * src/muscle_tab.h (muscle_grow): Replace the header comments with
9010 those from muscle_tab.c since the old ones are misleading.
9011
9012 2006-07-13 Akim Demaille <akim@epita.fr>
9013
9014 Support %define "KEY" {VALUE}.
9015 * src/scan-code.h, src/scan-code.l (translate_action)
9016 (translate_rule_action, translate_symbol_action, translate_code):
9017 Return char *, not const char *.
9018 * src/parse-gram.y (declaration): Rename as...
9019 (prologue_declaration): this.
9020 (string_content): Remove this nonterminal, use STRING.
9021 (braceless, content, content.opt): New nonterminal.
9022 Use them.
9023 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
9024 as value.
9025 * src/scan-gram.l (getargs.h): Don't include it.
9026
9027 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
9028
9029 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
9030 rather than a for-loop that declares a local bool variable. This
9031 should work around a compatibility problem with a Cray x1e C++
9032 compiler reported by Hung Nguyen in
9033 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
9034 The for-loop was introduced in the 2004-11-17 change but I don't
9035 know why it was needed.
9036
9037 2006-07-12 Akim Demaille <akim@epita.fr>
9038
9039 * data/c.m4: Comment changes.
9040
9041 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
9042
9043 * src/complain.c (error_message, ERROR_MESSAGE): New.
9044 To factor...
9045 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
9046 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
9047
9048 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
9049
9050 * NEWS: Instead of %union, you can define and use your own union type
9051 YYSTYPE if your grammar contains at least one <type> tag.
9052 Your YYSTYPE need not be a macro; it can be a typedef.
9053 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
9054 (Union Decl, Decl Summary): Document this.
9055 * data/glr.c (YYSTYPE): Implement this.
9056 * data/glr.cc (YYSTYPE): Likewise.
9057 * data/lalr1.cc (YYSTYPE): Likewise.
9058 * data/yacc.c (YYSTYPE): Likewise.
9059 * src/output.c (prepare): Output tag_seen_flag.
9060 * src/parse-gram.y (declaration, grammar_declaration):
9061 Use 'union_seen' rather than 'typed' to determine whether
9062 %union has been seen, since grammars can now be typed without
9063 %union.
9064 (symbol_declaration, type.opt, symbol_def):
9065 Keep track of whether a tag has been seen.
9066 * src/reader.c (union_seen, tag_seen): New vars.
9067 (typed): remove.
9068 * src/reader.h (union_seen, tag_seen, typed): Likewise.
9069 * src/scan-code.l (untyped_var_seen): New variable.
9070 (handle_action_dollar): Adjust to above changes.
9071 (handle_action_dollar, handle_action_at):
9072 Improve overflow checking for outlandish numbers.
9073 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
9074 avoid new diagnostics generated by above changes.
9075 * tests/regression.at (YYSTYPE typedef): Add test to check
9076 for type tags without %union.
9077
9078 * src/symlist.c (symbol_list_length): Return int, not unsigned
9079 int, since callers expect int. This may need to get revisited
9080 once we have proper integer overflow checking.
9081
9082 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
9083 object is now static.
9084
9085 * src/getargs.c (flags_argmatch): Return void, not int,
9086 to pacify ./configure --enable-gcc-warnings.
9087
9088 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
9089 since last_string is already defined to FLEX_PREFIX (last_string).
9090
9091 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
9092
9093 Implement --warnings/-W.
9094 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
9095 replaced by...
9096 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
9097 Adjust callers.
9098 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
9099 (warnings_args, warnings_types): New.
9100 (getargs, short_options, long_options): Accept -W/--warnings.
9101 Sort the options by alphabetical order, upper case letter right
9102 before its lower case.
9103
9104 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
9105
9106 Change %merge result type clash warnings to errors. Discussed at
9107 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
9108 * src/reader.c (record_merge_function_type): Use complain_at.
9109 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
9110 declared later): Update test case results.
9111
9112 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
9113
9114 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
9115 to be in alphabetical order.
9116 (trace_args): Spelling fixes.
9117
9118 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
9119
9120 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
9121 so they don't collide with user-defined macros.
9122 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
9123 this was never guaranteed, and now that we're using gnulib stdint,
9124 which defines int_fast16_t to long int, the problem is exposed.
9125
9126 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
9127
9128 * data/c.m4 (b4_basename): Simplify a bit, since we don't
9129 need the full POSIX semantics (and weren't implementing them
9130 anyway).
9131
9132 Adjust to Autoconf 2.60 and today's gnulib.
9133 * bootstrap (gnulib_modules): Add stdint.
9134 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
9135 no longer copies it.
9136 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
9137 since stdint needs the former and wcwidth (which is now required
9138 by mbswidth) needs the latter.
9139 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
9140 work around a compatibility glitch between gettext 0.14.6 and
9141 Autoconf 2.60.
9142 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
9143 Do not check for uintptr_t, since new stdint module does the right
9144 thing.
9145 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
9146 Add stdint.h, stdint_.h, wcwidth.h.
9147 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
9148 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
9149 stdint.m4, wchar_t.m4, wcwidth.m4.
9150 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
9151 usual order for ../lib/*.h files.
9152 (file_name_split): Use last_component, not base_name, to adjust
9153 to gnulib changes.
9154 * src/parse-gram.h: Include <strverscmp.h> in the usual order
9155 for ../lib/*.h files.
9156 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
9157 Define unconditionally, since we now assume the stdint module.
9158 * src/scan-skel.l: Include <dirname.h>.
9159 (BASE_QPUTS): Use last_component, not base_name.
9160 * src/system.h: Include <unlocked-io.h> in the usual order
9161 for ../lib/*.h files. Include <stdint.h> unconditionally,
9162 since we now use the stdint module.
9163 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
9164 HAVE_UINTPTR_T, since we now use the stdint module.
9165 (base_name): Remove decl, since files now include <dirname.h>
9166 to get the decl.
9167
9168 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
9169
9170 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
9171 New, default to 1.
9172 * data/yacc.c, data/glr.c, data/location.cc: Use them.
9173 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
9174 default.
9175 * tests/calc.at: Adjust.
9176
9177 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
9178
9179 * data/c.m4 (b4_basename): New.
9180 (b4_syncline): Also output the location of its invocation (from
9181 the skeleton).
9182 (b4_user_action, b4_define_user_action, b4_user_actions)
9183 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
9184 (b4_user_stype): New.
9185 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
9186
9187 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
9188
9189 In the grammar file, the first column is 1 not 0 on the first line as
9190 on every other line.
9191 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
9192 * tests/input.at (Torturing the Scanner): Update output.
9193
9194 * src/scan-gram.l (scanner_cursor): Declare it static.
9195
9196 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
9197
9198 In warnings, say "previous declaration" rather than "first
9199 declaration".
9200 * src/symtab.c (redeclaration): Do that here.
9201 * src/reader.c (record_merge_function_type): In the case of a result
9202 type clash, report the previous declaration rather than the very first
9203 one in the grammar file.
9204 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
9205 declared later): Add a third declaration to check this behavior.
9206 * tests/input.at (Incompatible Aliases): Update output.
9207
9208 2006-06-27 Akim Demaille <akim@epita.fr>
9209
9210 * doc/Doxyfile.in: New.
9211 * doc/Makefile.am: Use it.
9212 * src/lalr.h, src/symtab.h: Initial doxygenation.
9213
9214 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
9215
9216 Don't miss %merge result type warnings just because the LHS types are
9217 declared after the %merge. This continues the effort of the previous
9218 patch.
9219 * src/reader.c (get_merge_function): Don't set the merger type yet.
9220 (record_merge_function_type): New function for setting the merger type
9221 and checking for clashes.
9222 (grammar_current_rule_merge_set): Set the location of the %merge for
9223 the current rule.
9224 (packgram): Invoke record_merge_function_type for each rule now that
9225 all symbol type declarations have been parsed.
9226 * src/reader.h (merger_list.type_declaration_location): New member
9227 storing the location of the first %merge from which the type for this
9228 merging function was derived.
9229 * src/symlist.h (symbol_list.merger_declaration_location): New member
9230 storing the location of a rule's %merge, if any.
9231 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
9232 declared later): New test to catch the error fixed by the above patch.
9233
9234 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
9235
9236 Get action warnings (grammar_rule_check) right even when symbol
9237 declarations appear after the rules. Discussed at
9238 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
9239 and
9240 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
9241 Don't mistake the type of $$ in a midrule to be that of its parent
9242 rule's $$.
9243 * src/reader.c (grammar_current_rule_end): Don't invoke
9244 grammar_rule_check yet since not all symbol declarations may have been
9245 parsed yet.
9246 (grammar_midrule_action): Likewise.
9247 Don't record whether the midrule's $$ has been used yet since actions
9248 haven't been translated yet.
9249 Record the midrule's parent rule and its RHS index within the parent
9250 rule.
9251 (grammar_current_rule_action_append): Don't translate the action yet
9252 since not all symbol declarations may have been parsed yet and, thus,
9253 warnings about types for $$, $n, @$, and @n can't be reported yet.
9254 (packgram): Translate the action and invoke grammar_rule_check now that
9255 all symbol declarations have been parsed.
9256 * src/scan-code.l (handle_action_dollar): Now that this is invoked
9257 after parsing the entire grammar file, the symbol list here in the case
9258 of a midrule is actually the midrule's empty RHS, so reference its
9259 parent rule's RHS where necessary.
9260 On the other hand, now that you can already know it's a midrule, you
9261 aren't forced to think $$ has the same type as its parent rule's $$.
9262 (handle_action_at): In the case of a midrule, reference the parent rule
9263 where necessary.
9264 * src/symlist.c (symbol_list_new): Initialize new midrule-related
9265 members.
9266 (symbol_list_length): Now that this is invoked after all rules have
9267 been parsed, a NULL symbol (rather than a NULL symbol list node)
9268 terminates a rule. symbol_list_print already does this correctly.
9269 * src/symlist.h (symbol_list.midrule_parent_rule,
9270 symbol_list.midrule_parent_rhs_index): New members so that midrules can
9271 remember their relationships with their parents.
9272 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
9273 fixed by the above patch.
9274 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
9275 implementing...
9276 (Unused values): ... this old test case and...
9277 (Unused values before symbol declarations): ... this new test case.
9278 This one is the same as `Unused values' except that all symbol
9279 declarations appear after the rules in order to catch the rest of the
9280 errors fixed by the above patch.
9281
9282 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
9283
9284 More cleanup.
9285 * src/reader.c (current_rule): Declare it static since it's no longer
9286 used outside this file.
9287 (grammar_current_rule_action_append): Remove redundant arguments from
9288 translate_rule_action invocation.
9289 * src/reader.h (current_rule): Remove this unused extern.
9290 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
9291 * src/scan-code.l (translate_rule_action): Likewise.
9292
9293 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
9294
9295 Clean up yesterday's patch.
9296 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
9297 to...
9298 * src/reader.c (grammar_current_rule_action_append): ... here for
9299 consistency with grammar_current_rule_symbol_append.
9300 * tests/regression.at (Braced code in declaration in rules section):
9301 Make yyerror and yylex static as usual.
9302
9303 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
9304
9305 Fix bug that mistakes braced code in a declaration in the rules section
9306 to be a rule action. Mentioned at
9307 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
9308 * src/scan-gram.l: Move midrule action detection from the start of the
9309 scanning of any braced code to...
9310 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
9311 action. For readability, use $2 and @2 rather than the equivalent
9312 global variables.
9313 * tests/regression.at (Braced code in declaration in rules section):
9314 New test to catch the error fixed by the above patch.
9315
9316 Work on code readability some.
9317 * src/scan-code.l (current_rule): Get rid of this misleading and
9318 redundant declaration: it's actually extern'ed in reader.h.
9319 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
9320 translate_action): Add a rule argument and use it instead of the global
9321 current_rule.
9322 (translate_rule_action): This already receives current_rule through an
9323 argument, so pass it on to translate_action instead of assigning
9324 current_rule to current_rule.
9325 (translate_symbol_action, translate_code): Pass rule = NULL to
9326 translate_action.
9327
9328 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
9329
9330 Rename %before-definitions to %start-header and %after-definitions to
9331 %end-header. Don't use these declarations to separate pre-prologue
9332 blocks from post-prologue blocks. Add new order-independent
9333 declarations %before-header and %after-header as alternatives to the
9334 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
9335 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
9336 * NEWS (2.3+): Update for these changes.
9337 * data/glr.c (b4_before_definitions): Update to...
9338 (b4_start_header): ... this.
9339 (b4_after_definitions): Update to...
9340 (b4_end_header): ... this.
9341 * data/glr.cc: Likewise.
9342 * data/lalr1.cc: Likewise.
9343 * data/yacc.c: Likewise.
9344 * doc/bison.texinfo (The prologue): Update names, and replace remaining
9345 prologue blocks with %*-header declarations.
9346 (Calc++ Parser): Likewise.
9347 (Decl Summary): Update names.
9348 (Table of Symbols): Update description.
9349 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
9350 (PERCENT_END_HEADER): ... this.
9351 (PERCENT_BEFORE_DEFINITIONS): Update to...
9352 (PERCENT_START_HEADER): ... this.
9353 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
9354 (declaration): Update token names and m4 macro names.
9355 When parsing %end-header and %start-header, invoke translate_code
9356 before muscle_code_grow, and no longer set global booleans to remember
9357 whether these declarations have been seen.
9358 Parse new %after-header and %before-header.
9359 * src/reader.c (before_definitions, after_definitions): Remove.
9360 (prologue_augment): Accept a new bool argument to specify whether to
9361 augment the pre-prologue or post-prologue.
9362 * src/reader.h (before_definitions, after_definitions): Remove these
9363 extern's.
9364 (prologue_augment): Add new bool argument.
9365 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
9366 (PERCENT_END_HEADER): ... this.
9367 (PERCENT_BEFORE_DEFINITIONS): Update to...
9368 (PERCENT_START_HEADER): ... this.
9369 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
9370 * tests/actions.at (Printers and Destructors): Update names.
9371
9372 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
9373
9374 Add comparison operators for C++ location classes. Discussed at
9375 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
9376 * data/c++.m4 (b4_define_location_comparison): New boolean %define
9377 declaration indicating whether filename_type has an operator==. If
9378 filename_type is `std::string', it defaults to `1', `0' otherwise.
9379 * data/location.cc: Iff b4_define_location_comparison is `1', add
9380 operator== and operator!= for class position and for class location.
9381
9382 Some minor fixes.
9383 * src/scan-action.l: Remove unused file.
9384 * src/symtab.c (symbol_printer_set): Use printer_location not
9385 destructor_location.
9386 * src/symtab.h (struct symbol): Replace incorrect source comment for
9387 printer members.
9388 * tests/input.at (Incompatible Aliases): Update output with correct
9389 printer location.
9390
9391 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
9392
9393 Don't put the pre-prologue in the header file. For the yacc.c code
9394 file and the glr.c header and code files, move the pre-prologue before
9395 the token definitions. Add new %before-definitions and
9396 %after-definitions to declare code that will go in both the header file
9397 and code file. Discussed at
9398 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
9399 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
9400 and
9401 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
9402 * NEWS (2.3+): Describe these changes.
9403 * data/glr.c (b4_pre_prologue): Move from within to before...
9404 (b4_shared_declarations): ... this.
9405 Add new b4_before_definitions before b4_token_enums.
9406 Add new b4_after_definitions at the end.
9407 * data/glr.cc (b4_pre_prologue): Replace with...
9408 (b4_before_definitions): ... this in the header file.
9409 (b4_after_definitions): New near the end of the header file.
9410 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
9411 code file right before including the header file.
9412 (b4_before_definitions): New in the previous position of
9413 b4_pre_prologue in the header file.
9414 (b4_after_definitions): New near the end of the header file.
9415 * data/yacc.c: Clean up some m4 quoting especially in the header file.
9416 (b4_token_enums_defines): In the code file, move to right before
9417 YYSTYPE for consistency with the header file.
9418 (b4_before_definitions): New right before b4_token_enums_defines in
9419 both the header and code file.
9420 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
9421 header and code file.
9422 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
9423 of prologues for %union dependencies.
9424 (Decl Summary): In %defines description, mention the effect of
9425 %before-definitions and %after-definitions on the header file.
9426 (Calc++ Parser): Forward declare driver in a %before-definitions rather
9427 than in the pre-prologue so that make check succeeds.
9428 (Table of Symbols): Add entries for %before-definitions and
9429 %after-definitions.
9430 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
9431 %before-definitions.
9432 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
9433 (declaration): Parse those declarations and append to
9434 b4_before_definitions and b4_after_definitions, respectively.
9435 * src/reader.c (before_definitions, after_definitions): New bools to
9436 track whether those declarations have been seen.
9437 (prologue_augment): Add to the post-prologue if %union,
9438 %before-definitions, or %after-definitions has been seen.
9439 * src/reader.h (before_definitions, after_definitions): New extern's.
9440 * src/scan-gram.l: Scan the new declarations.
9441 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
9442 prologue block in a %before-definitions or a %after-definitions based
9443 on whether the %union is declared.
9444 * tests/regression.at (Early token definitions with --yacc, Early token
9445 definitions without --yacc): Move tests for token definitions into the
9446 post-prologue since token names are no longer defined in the
9447 pre-prologue.
9448
9449 2006-06-20 Akim Demaille <akim@epita.fr>
9450
9451 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
9452 (symbol_get): Use it.
9453 * src/parse-gram.y: Use it.
9454
9455 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
9456
9457 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
9458 build succeeds when configured with --enable-gcc-warnings.
9459
9460 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
9461
9462 * src/parse-gram.y (char_name): New function.
9463 (CHAR, STRING, string_content): For %printer, properly escape.
9464 (ID): Prefer fputs to fprintf.
9465 (id): Reindent to be consistent with other rules.
9466 Properly quote char.
9467
9468 The Translation Project changed its way of publishing translations
9469 to maintainers. I haven't received any responses to my request
9470 for supporting the old way, or for documenting the new way. I
9471 have modified 'bootstrap' to use screen scraping
9472 (in this case, HTML scraping). This is unreliable and inelegant,
9473 but I don't see any better way. Yuck.
9474 * bootstrap (TP_URL, WGET_COMMAND): New vars.
9475 (get_translations): New function, which uses HTML scraping to
9476 deduce locations of latest translations.
9477 Use this function to grab both bison and bison-runtime .po files.
9478 Don't bother priming the pump for the runtime-po domain any more,
9479 as it's now translated better than bison is.
9480
9481 2006-06-19 Akim Demaille <akim@epita.fr>
9482
9483 * src/scan-gram.l: No longer "parse" things after `%union' until
9484 `{'. Rather, return a single "%union" token.
9485 No longer make symbols: return strings, and leave the conversion
9486 to symbols to the parser.
9487 (SC_PRE_CODE, token_type): Remove.
9488 * src/parse-gram.y (%union): New field `character'.
9489 Sort tokens.
9490 (CHAR): New token.
9491 (ID, ID_COLON): Now that the scanner no longer makes them
9492 identifiers, adjust all uses to invoke symbol_get.
9493 (id_colon): New, wraps the conversion from string to symbol.
9494 (%union): Accept a possible union_name.
9495 (symbol): Now can be a char.
9496 * data/c.m4 (b4_union_name): Leave a default value.
9497 * data/glr.c, data/yacc.c: Use it.
9498
9499 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
9500
9501 For associating token numbers with token names for "yacc.c", don't use
9502 #define statements unless `--yacc' is specified; always use enum
9503 yytokentype. Most important discussions start at:
9504 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
9505 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
9506 and
9507 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
9508 * NEWS (2.3+): Mention.
9509 * data/c.m4 (b4_yacc_if): New.
9510 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
9511 token #define's.
9512 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
9513 on token name definitions.
9514 * src/getargs.c (usage): Capitalize `Yacc' in English.
9515 * src/output.c (prepare): Define b4_yacc_flag.
9516 * tests/regression.at (Early token definitions): Test that tokens names
9517 are defined before the pre-prologue not just before the post-prologue.
9518 Remove this test case and copy to...
9519 (Early token definitions with --yacc): ... this to test #define's.
9520 (Early token definitions without --yacc): ... and this to test enums.
9521
9522 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
9523
9524 * NEWS: Reword the post-2.3 change to not be so optimistic about
9525 removing the old "look-ahead" spelling.
9526 Update previous look-ahead/lookahead change reports.
9527 * REFERENCES: look-ahead -> lookahead (since that's
9528 what he actually wrote).
9529 * doc/refcard.tex: look ahead -> lookahead,
9530 look-ahead -> lookahead
9531
9532 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
9533
9534 For consistency, use `lookahead' instead of `look-ahead' or
9535 `look_ahead'. Discussed starting at
9536 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
9537 and then at
9538 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
9539 * NEWS: For the next release, note the change to `--report'.
9540 * TODO, doc/bison.1: Update English.
9541 * doc/bison.texinfo: Update English.
9542 (Understanding Your Parser, Bison Options): Document as
9543 `--report=lookahead' rather than `--report=look-ahead'.
9544 * src/conflicts.c: Update English in comments.
9545 (lookahead_set): Rename from look_ahead_set.
9546 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
9547 (resolve_sr_conflict): Rename local look_ahead_tokens to
9548 lookahead_tokens, and update other uses.
9549 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
9550 count_rr_conflicts, conflicts_free): Update uses.
9551 * src/getargs.c (report_args): Move "lookahead" before alternate
9552 spellings.
9553 (report_types): Update uses.
9554 (usage): For `--report' usage description, state `lookahead' spelling
9555 rather than `look-ahead'.
9556 * src/getargs.h (report.report_lookahead_tokens): Rename from
9557 report_look_ahead_tokens.
9558 * src/lalr.c: Update English in comments.
9559 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
9560 (state_lookahead_tokens_count): Rename from
9561 state_look_ahead_tokens_count.
9562 Rename local n_look_ahead_tokens to n_lookahead_tokens.
9563 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
9564 Rename local n_look_ahead_tokens to n_lookahead_tokens.
9565 Update other uses.
9566 Update English in output.
9567 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
9568 * src/print.c: Update English in comments.
9569 (lookahead_set): Rename from look_ahead_set.
9570 (print_reduction): Rename argument lookahead_token from
9571 look_ahead_token.
9572 (print_core, state_default_rule, print_reductions, print_results):
9573 Update uses.
9574 * src/print_graph.c: Update English in comments.
9575 (print_core): Update uses.
9576 * src/state.c: Update English in comments.
9577 (reductions_new): Update uses.
9578 (state_rule_lookahead_tokens_print): Rename from
9579 state_rule_look_ahead_tokens_print, and update other uses.
9580 * src/state.h: Update English in comments.
9581 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
9582 (state_rule_lookahead_tokens_print): Rename from
9583 state_rule_look_ahead_tokens_print.
9584 * src/tables.c: Update English in comments.
9585 (conflict_row, action_row): Update uses.
9586 * tests/glr-regression.at
9587 (Incorrect lookahead during deterministic GLR,
9588 Incorrect lookahead during nondeterministic GLR): Rename
9589 print_look_ahead to print_lookahead.
9590 * tests/torture.at: Update English in comments.
9591 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
9592 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
9593 (Many lookahead tokens): Update uses.
9594 * data/glr.c: Update English in comments.
9595 * lalr1.cc: Likewise.
9596 * yacc.c: Likewise.
9597 * src/conflicts.h: Likewise.
9598 * src/lalr.h: Likewise.
9599 * src/main.c: Likewise.
9600 * src/output.c: Likewise.
9601 * src/parse-gram.c: Likewise.
9602 * src/tables.h: Likewise.
9603 * tests/calc.at: Likewise.
9604
9605 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
9606
9607 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
9608
9609 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
9610
9611 * TODO: Add request from Nelson H. F. Beebe to be able to install
9612 Bison without installing the yacc script.
9613
9614 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
9615
9616 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
9617 and yytext if they're already #define'd.
9618 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
9619 * src/scan-code-c.c: ... here.
9620 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
9621 <config.h>.
9622
9623 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
9624
9625 Get Bison to build again when configured with --enable-gcc-warnings.
9626 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
9627 missing #include's.
9628 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
9629 loc argument as it shadows a global.
9630 * src/scan-gram.l: Remove stray comma that prevents boundary_set
9631 invocation.
9632
9633 * src/.cvsignore: Add scan-code.c.
9634
9635 2006-06-07 Akim Demaille <akim@epita.fr>
9636
9637 * src/scan-gram.l: Move the "add a trailing ; to actions" code
9638 to...
9639 * src/scan-code.l: here.
9640 * tests/input.at (Torturing the Scanner): Fix another location
9641 error.
9642
9643 2006-06-07 Akim Demaille <akim@epita.fr>
9644
9645 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
9646
9647 2006-06-06 Akim Demaille <akim@epita.fr>
9648
9649 Extract the parsing of user actions from the grammar scanner.
9650 As a consequence, the relation between the grammar scanner and
9651 parser is much simpler. We can also split "composite tokens" back
9652 into simple tokens.
9653 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
9654 * src/scan-gram.l (add_column_width, adjust_location): Move to and
9655 rename as...
9656 * src/location.h, src/location.c (add_column_width)
9657 (location_compute): these.
9658 Fix the column count: the initial column is 0.
9659 (location_print): Be robust to ending column being 0.
9660 * src/location.h (boundary_set): New.
9661 * src/main.c: Adjust to scanner_free being renamed as
9662 gram_scanner_free.
9663 * src/output.c: Include scan-code.h.
9664 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
9665 Use boundary_set.
9666 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
9667 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
9668 which is now, again, a separate token.
9669 Adjust all dependencies.
9670 Whereever actions with $ and @ are used, use translate_code.
9671 (action): Remove this nonterminal which is now useless.
9672 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
9673 (grammar_current_rule_action_append): Use translate_code.
9674 (packgram): Bound check ruleno, itemno, and rule_length.
9675 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
9676 (last_string, last_braced_code_loc, max_left_semantic_context)
9677 (scanner_initialize, scanner_free, scanner_last_string_free)
9678 (gram_out, gram_lineno, YY_DECL_): Move to...
9679 * src/scan-gram.h: this new file.
9680 (YY_DECL): Rename as...
9681 (GRAM_DECL): this.
9682 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
9683 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
9684 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
9685 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
9686 Move these declarations, and...
9687 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
9688 these to...
9689 * src/flex-scanner.h: this new file.
9690 * src/scan-gram.l (rule_length, rule_length_overflow)
9691 (increment_rule_length): Remove.
9692 (last_braced_code_loc): Rename as...
9693 (gram_last_braced_code_loc): this.
9694 Adjust to the changes of the parser.
9695 Move all the handling of $ and @ into...
9696 * src/scan-code.l: here.
9697 * src/scan-gram.l (handle_dollar, handle_at): Remove.
9698 (handle_action_dollar, handle_action_at): Move to...
9699 * src/scan-code.l: here.
9700 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
9701 scan-code.h, scan-code-c.c, scan-gram.h.
9702 (EXTRA_bison_SOURCES): Add scan-code.l.
9703 (BUILT_SOURCES): Add scan-code.c.
9704 (yacc): Be robust to white spaces.
9705
9706 * tests/conflicts.at, tests/input.at, tests/reduce.at,
9707 * tests/regression.at: Adjust the column numbers.
9708 * tests/regression.at: Adjust the error message.
9709
9710 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
9711
9712 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
9713 Use Akim's wording from
9714 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
9715
9716 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
9717
9718 Between Bison releases, manually append `+' to the previous Bison
9719 release number, and use that as a signal to automatically print the
9720 ChangeLog's CVS Id keyword from --version. Discussed starting at
9721 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
9722 * ChangeLog: Add Id header.
9723 * configure.ac (AC_INIT): Append `+' to `2.3'.
9724 * src/.cvsignore: Add revision.c.
9725 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
9726 (BUILT_SOURCES): Add revision.c.
9727 (revision.c): New target rule. This file defines a new global variable
9728 named revision. It initializes it with either the Id from ChangeLog
9729 or, if VERSION doesn't contain `+', with the empty string.
9730 * src/getargs.c (version): Print the value of revision.
9731 * src/revision.h: Extern revision.
9732
9733 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
9734
9735 * NEWS: Version 2.3.
9736 * configure.ac (AC_INIT): Likewise.
9737
9738 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
9739
9740 * data/glr.c (YYRECOVERING): Define to be a function-like macro
9741 with no arguments, not as an object-like macro. This is for
9742 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
9743 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
9744 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
9745 Document this.
9746
9747 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
9748
9749 * src/getargs.c (usage): Back out yesterday's modification of the
9750 --help output so that we don't have to wait for translation before
9751 releasing 2.3.
9752
9753 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
9754
9755 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
9756 Problem reported by Akim Demaille.
9757
9758 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
9759
9760 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
9761
9762 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
9763
9764 * data/yacc.c (yy_reduce_print): Omit trailing white space in
9765 generated source code. Problem reported by Frans Englich in
9766 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
9767
9768 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
9769
9770 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
9771 shell, not within 'make', so that 'make' by an ordinary builder
9772 (using GNU make) does not worry about configuring gzip. This also
9773 works around a bug reported independently by Keith Thompson and by
9774 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
9775 stderr rather than stdout, messing up the build logs.
9776
9777 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
9778
9779 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
9780 to make sure that YYID will never be unused. This fixes a 'make
9781 maintainer-check' failure caused by the recent changes to the 'Trivial
9782 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
9783 not used.
9784 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
9785
9786 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
9787
9788 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
9789 state before an empty RHS is always resolved here. Only the location
9790 of that state is guaranteed to be resolved, and that's enough. This
9791 fixes the remaining bug reported by Derek M. Jones in
9792 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
9793 * tests/glr-regression.at (Uninitialized location when reporting
9794 ambiguity): Test the above case.
9795 Also, the embedded comments in this test case claim it checks the case
9796 of an empty RHS that has inherited the initial location. However, the
9797 corresponding LHS was already resolved, so yyresolveLocations didn't
9798 actually have reason to modify it. Fix this by forcing
9799 nondeterministic operation at the beginning of the parse.
9800
9801 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
9802
9803 * data/c.m4 (b4_yy_symbol_print_generate):
9804 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
9805 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
9806 of the bugs reported today by Derek M Jones in
9807 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
9808 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
9809 defined to be a type name without parens or brackets.
9810 (Location Type): Similarly for YYLTYPE.
9811 * tests/regression.at (Trivial grammars): Put in a test for this
9812 bug that will be caught by 'make maintainer-check' (though not,
9813 alas, by 'make check' unless your compiler is picky).
9814
9815 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
9816
9817 * NEWS: Version 2.2.
9818 * configure.ac (AC_INIT): Likewise.
9819
9820 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
9821
9822 * data/glr.c (yyreportTree): Make room in yystates for the state
9823 preceding the RHS. This fixes the segmentation fault reported by Derek
9824 M. Jones in
9825 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
9826 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
9827 to the user. Reported for yyreportTree by Derek M. Jones later in the
9828 same thread.
9829 * THANKS: Add Derek M. Jones.
9830 Update my email address.
9831 Fix typo in Steve Murphy's name.
9832
9833 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
9834
9835 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
9836 checking against YYLAST that caused the parser to miss a potential
9837 alternative in its diagnostic.
9838 Problem reported by Maria Jose Moron Fernandez in
9839 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
9840 * data/lalr1.cc (yysyntax_error_): Likewise.
9841 * data/yacc.c (yysyntax_error): Likewise.
9842 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
9843 tokens, in case we run into an older C compiler.
9844 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
9845 Use them to check for the off-by-one error fixed above.
9846
9847 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
9848 YYSIZE_T, not size_t.
9849 * tests/regression.at (Trivial grammars): New test, to catch
9850 the error fixed by the above patch.
9851
9852 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
9853
9854 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
9855 scheme.
9856 Reported by Steve Murphy.
9857
9858 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
9859
9860 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
9861 * data/glr.cc: b4_location_flag is now b4_locations_flag.
9862
9863 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
9864
9865 Implement --trace=m4.
9866 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
9867 * src/output.c (output_skeleton): When set, pass -dV to m4.
9868
9869 Factor the handling of flags in m4.
9870 * src/output.c (prepare): Rename the muscle names debug, defines,
9871 error_verbose to debug_flag, defines_flag, error_verbose_flag.
9872 * data/c.m4: Adjust.
9873 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
9874 Use b4_define_flag_if to define other b4_FLAG_if macros.
9875 (b4_location_if): As a consequence, rename as...
9876 (b4_locations_if): this, for consistency.
9877 Adjust all the skeletons.
9878
9879 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
9880
9881 * etc/bench.pm: Shorten bench names.
9882
9883 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
9884
9885 * src/output.h, src/output.c (error_verbose): Move to...
9886 * src/getargs.h, src/getargs.c: here.
9887 Sort the flags.
9888 Adjust dependencies.
9889
9890 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
9891
9892 * data/c.m4 (b4_copyright): Put the special exception for Bison
9893 skeletons here, so we don't have to put it in each skeleton. All
9894 uses changed. Suggested by Akim Demaille. Also, wrap the
9895 copyright notice, in case it is longer than 80 columns. Replace
9896 comma by newline after title.
9897
9898 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
9899
9900 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
9901 incompatibility, not a bug. Mention that it wasn't fixed as of
9902 flex 2.5.33.
9903
9904 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
9905
9906 * examples/extexi: Enforce the precedence of concatenation over
9907 >>.
9908 Reported by Tommy Nordgren.
9909
9910 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
9911
9912 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
9913 with the member "token".
9914 Reported by Martin Nylin.
9915
9916 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
9917
9918 * data/glr.c: Switch to Bison 2.2 special-exception language in
9919 the copyright notice. Use more-regular format for titles and
9920 copyright notices.
9921 * data/glr.cc: Likewise.
9922 * data/location.cc: Likewise.
9923 * data/yacc.cc: Likewise.
9924 * doc/bison.texinfo (Conditions): Document this.
9925 * NEWS: likewise. Upgrade version to 2.2.
9926
9927 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
9928
9929 * data/glr.cc: Remove dead code.
9930
9931 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
9932
9933 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
9934 that variable and the line breaks the bootstrap. Problem reported
9935 by Juan M. Guerrero.
9936
9937 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
9938
9939 * doc/bison.texinfo (Multiple start-symbols): New.
9940
9941 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
9942
9943 * etc/README, etc/bench.pl: New.
9944
9945 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
9946
9947 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
9948 rule.
9949 Reported by Mickael Labau.
9950 * tests/input.at (Torturing the Scanner): Test it.
9951
9952 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
9953
9954 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
9955 Problem reported by Bob Rossi.
9956
9957 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
9958
9959 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
9960 and didn't really work.
9961 For the index, use @ifnotinfo, not @iftex.
9962 Minor cleanups of spacing and terminology.
9963
9964 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
9965
9966 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
9967 of AT_NAME_PREFIX when %name-prefix is not used.
9968
9969 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
9970
9971 Apply --prefix to C++ skeletons too: they change the namespace.
9972 The test suite already exercize these cases.
9973 * data/c++.m4 (b4_namespace): New.
9974 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
9975 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
9976 * data/yacc.c, data/glr.c: Remove a useless `[]'.
9977 * doc/bison.texinfo: Document it.
9978 (Option Cross Key): Use @multitable in all formats. It looks
9979 nicer, even in TeX outputs.
9980 (Rules): Use the same code whatever the output type is.
9981 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
9982 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
9983 * tests/calc.at: Use it, instead of hard coding `yy'.
9984
9985 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
9986
9987 * TODO: Remove dead items.
9988
9989 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
9990
9991 * doc/FAQ: Remove, merged into...
9992 * doc/bison.texinfo (FAQ): this.
9993 * doc/Makefile.am (EXTRA_DIST): Adjust.
9994
9995 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
9996
9997 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
9998 even if empty.
9999 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
10000 * doc/bison.texinfo (Calc++ Scanner): Use it.
10001
10002 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
10003
10004 Fix two nits reported by twlevo, plus one more that I discovered.
10005
10006 * src/assoc.h (assoc_to_string): Give a name to the arg, as
10007 this is the usual Bison style.
10008 * src/location.h (location_print): Likewise.
10009
10010 * src/reader.h (token_name): Likewise.
10011
10012 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
10013
10014 Fix some nits reported by twlevo.
10015 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
10016 and "POSIX". Use more-modern syntax for URLs. Mention C++
10017 and ask for Java. Don't hardwire OS version numbers. Add
10018 copyright notice.
10019 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
10020 * src/conflicts.c (solved_conflicts_obstack): Now static.
10021
10022 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
10023
10024 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
10025 page. Say "you can use it" not "you may use it" as on the web page;
10026 we're describing capabilities not granting permission.
10027
10028 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
10029
10030 * data/glr.c (yyresolveLocations): Rename local variables to avoid
10031 shadowing warnings. Use usual patter for iterating through RHS.
10032 * tests/glr-regression.at
10033 (Uninitialized location when reporting ambiguity):
10034 Modify yylex so that it uses its argument, rather than trying
10035 to rely on ARGSUSED (which doesn't work for gcc with warnings).
10036 const char -> char const.
10037
10038 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
10039 Don't use tabs inside commands; it messes up 'ps'.
10040 Problem reported by twlevo.
10041
10042 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
10043
10044 * tests/glr-regression.at (Uninitialized location when reporting
10045 ambiguity): New test case.
10046 * data/glr.c (yyresolveLocations): New function, which uses
10047 YYLLOC_DEFAULT.
10048 (yyresolveValue): Invoke yyresolveLocations before reporting an
10049 ambiguity.
10050 * doc/bison.texinfo (Default Action for Locations): Note
10051 YYLLOC_DEFAULT's usage for ambiguity locations.
10052 (GLR Semantic Actions): Cross-reference those notes.
10053
10054 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
10055
10056 * tests/glr-regression.at (Leaked semantic values when reporting
10057 ambiguity): Remove unnecessary union and type declarations.
10058 (Leaked lookahead after nondeterministic parse syntax error): New test
10059 case.
10060 * data/glr.c (yyparse): Check for zero stacks remaining before
10061 attempting to shift the lookahead so that you don't lose it.
10062
10063 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
10064
10065 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
10066 * tests/glr-regression.at (Leaked semantic values when reporting
10067 ambiguity): New test case.
10068 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
10069 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
10070 now unnecessary yystackp parameter.
10071 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
10072 destructors can be called.
10073
10074 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
10075 in existing testcases.
10076
10077 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
10078
10079 Don't leak semantic values for parent RHS when a user action cuts the
10080 parser, and clean up related code a bit.
10081 * tests/glr-regression.at (Leaked merged semantic value if user action
10082 cuts parse): Rename to...
10083 (Leaked semantic values if user action cuts parse): ... this. Add check
10084 for leaked parent RHS values.
10085 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
10086 between an unresolved state (non-empty chain of semantic options) and
10087 an incomplete one (signaled by an empty chain).
10088 (yyresolveStates): Document the interface. Move all manipulation of a
10089 successfully or unsuccessfully resolved yyGLRState to...
10090 (yyresolveValue): ... here so that yyresolveValue always leaves a
10091 yyGLRState with consistent data and thus is easier to understand.
10092 Remove the yyvalp and yylocp parameters since they are always just
10093 taken from the yys parameter. When reporting a discarded merged value
10094 in debugging output, note that it is incompletely merged. Document the
10095 interface.
10096 (yyresolveAction): If resolving any of the RHS states fails, destroy
10097 them all rather than leaking them. Thus, as long as user actions are
10098 written to clean up the RHS correctly, yyresolveAction always cleans up
10099 the RHS of a semantic option. Document the interface.
10100
10101 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
10102
10103 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
10104 led to a segmentation fault in GNU Pascal. Problem reported
10105 by Waldek Hebisch.
10106
10107 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
10108
10109 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
10110 mid-rule action inside a nonterminal symbol in order to declare a
10111 destructor for its semantic value.
10112
10113 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
10114
10115 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
10116 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
10117 __cplusplus && ! defined _STDLIB_H && !
10118 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
10119 defined free))]: Include <stdlib.h> rather than rolling our own
10120 declarations of malloc and free, to avoid problems with
10121 incompatible declarations (using 'throw') C++'s stdlib.h. This
10122 should fix Debian bug 340012
10123 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
10124 reported by Guillaume Melquiond.
10125
10126 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
10127
10128 * NEWS: Clarify symbols versus types in unused-value warnings.
10129
10130 * configure.ac (AC_INIT): Bump version number.
10131
10132 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
10133
10134 * NEWS: Version 2.1a.
10135 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
10136 since C99 requires this.
10137
10138 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
10139
10140 * m4/c-working.m4: New file.
10141 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
10142
10143 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
10144
10145 * Makefile.maint: Merge from coreutils.
10146
10147 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
10148
10149 More portability fixes for problems summarized by Nelson H. F. Beebe.
10150
10151 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
10152 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
10153 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
10154 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
10155 messes up because C++ code is compiled in 32-bit mode but linked
10156 in 64-bit mode.
10157
10158 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
10159
10160 More portability fixes for problems summarized by Nelson H. F. Beebe.
10161
10162 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
10163 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
10164
10165 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
10166 nodist_PROGRAMS, since we don't need to actually compile the
10167 example if we're just doing a plain 'make'. This avoids bothering
10168 the installer unnecessarily about problems due to weird C++
10169 compilers.
10170
10171 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
10172
10173 More portability fixes for problems summarized by Nelson H. F. Beebe.
10174
10175 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
10176 than #include "...", and compile with -I'.'. The old method was
10177 not portable, according to Posix and the C standard, and it does
10178 not work with Sun C 5.7, where previous #line directives affect
10179 the working directory used in later #include "..." directives.
10180
10181 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
10182
10183 Various DJGGP specific issues in /djgpp
10184
10185 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
10186
10187 More portability fixes for problems summarized by Nelson H. F. Beebe.
10188
10189 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
10190 '#include <map>' works and that you can apply ++ to iterators.
10191
10192 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
10193
10194 Work around portability problems summarized by Nelson H. F. Beebe in
10195 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
10196
10197 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
10198 that '#include <string>' works.
10199
10200 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
10201 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
10202 "warning: sorry: semantics of inline function static data `const
10203 unsigned char translate_table[262]' are wrong (you'll wind up with
10204 multiple copies)".
10205
10206 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
10207 or, xor to not_, and_, or_, and xor_, respectively. This works
10208 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
10209 random system header somewhere that includes the equivalent of
10210 <iso646.h>.
10211
10212 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
10213 -E" works; it apparently doesn't work with PathScale EKO Compiler
10214 Suite Version 2.0.
10215
10216 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
10217
10218 During deterministic GLR operation, user actions should be able to
10219 influence the parse by changing yychar. To make this easier to fix and
10220 to make glr.c easier to evolve in general, don't maintain yytoken in
10221 parallel with yychar; just compute yytoken when needed.
10222 * tests/glr-regression.at (Incorrect lookahead during deterministic
10223 GLR): Check that setting yychar in a user action has the intended
10224 effect.
10225 * data/glr.c (yyGLRStack): Remove yytokenp member.
10226 (yyclearin): Don't set *yytokenp.
10227 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
10228 yychar rather than *yytokenp to determine the current lookahead.
10229 Compute yytoken locally when needed.
10230 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
10231 point to.
10232
10233 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
10234 after `--report' documentation.
10235
10236 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
10237
10238 * src/parse-gram.y (grammar_declaration): Location of printer
10239 symbol is @1, not list->location. Bug reported by twlevo.
10240 * tests/input.at (Incompatible Aliases): Adjust to above change.
10241
10242 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
10243
10244 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
10245 all the test at once. This makes the output easier to read in the
10246 normal case.
10247
10248 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
10249 got from <http://bro-ids.org/download.html>. The bug is that
10250 when two actions appeared in succession, the second one was
10251 scanned before the first one was added to the grammar rule
10252 as a midrule action. Bison then output the incorrect warning
10253 "parse.y:905.17-906.36: warning: unused value: $3".
10254 * src/parse-gram.y (BRACED_CODE, action): These are no longer
10255 associated with a value.
10256 (rhs): Don't invoke grammar_current_rule_action_append.
10257 (action): Invoke it here instead.
10258 * src/reader.c (grammar_midrule_action): Now extern.
10259 (grammar_current_rule_action_append): Don't invoke
10260 grammar_midrule_action; that is now the scanner's job.
10261 * src/reader.h (last_string, last_braced_code_loc):
10262 (grammar_midrule_action): New decls.
10263 * src/scan-gram.l (last_string): Now extern, sigh.
10264 (last_braced_code_loc): New extern variable.
10265 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
10266 rule already has an action.
10267 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
10268 * tests/input.at (AT_CHECK_UNUSED_VALUES):
10269 Add some tests to check that the above changes fixed the bug.
10270
10271 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
10272
10273 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
10274 All used changed. Check whether the symbol has a destructor,
10275 not whether it is typed.
10276 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
10277 that the values are still reported as unused. All line numbers
10278 adjusted.
10279
10280 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
10281
10282 Work around a bug in bro 0.8, which underparenthesizes its
10283 definition of YYLLOC_DEFAULT.
10284 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
10285 their arguments.
10286 * data/lalr1.cc: Likewise.
10287 * data/yacc.cc: Likewise.
10288
10289 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
10290
10291 Work around a bug in Pike 7.0, and give the Pike folks a
10292 better way to override the usual int widths.
10293 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
10294 user can override the types.
10295 (short): #undef, to work around a bug in Pike 7.0.
10296 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
10297 (union yyalloc.yyss): Use yytype_int16 rather than short.
10298 All uses changed.
10299 (yysigned_char): Remove.
10300 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
10301 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
10302 * tests/regression.at (Web2c Actions): Adjust to above changes.
10303
10304 * src/reader.c (check_and_convert_grammar): New function.
10305 (reader): Close the input file even if something went wrong during
10306 parsing. Minor file descriptor leak reported by twlevo.
10307
10308 * src/assoc.c (assoc_to_string): Use a default: abort (); case
10309 to pacify gcc -Wswitch-default.
10310 * src/scan-gram.l (adjust_location): Use a default: break; case
10311 to pacify gcc -Wswitch-default.
10312 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
10313 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
10314 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
10315 Move these decls to scan-skel.l, since they don't need to be
10316 visible elsewhere.
10317 * src/scan-skel.l: Accept the above decls.
10318 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
10319 is used.
10320
10321 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
10322
10323 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
10324 since we don't want to insist on a version number at the start
10325 of the changelog every time.
10326 * Makefile.maint: Sync from coreutils a bit better.
10327 (sc_trailing_blank): Renamed from sc_trailing_space.
10328 All uses changed.
10329 (sc_no_if_have_config_h, sc_require_config_h):
10330 (sc_prohibit_assert_without_use): New rules.
10331 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
10332 (sc_dd_max_sym_length): Fix leading spaces in rule.
10333 (sc_system_h_headers): Prefix with @.
10334 (sc_useless_cpp_parens, m4-check): Output line numbers.
10335 (changelog-check): Allow version only in head.
10336 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
10337 satisfy new Makefile.maint rule.
10338 * data/glr.c: Likewise.
10339 * data/glr.cc: Likewise.
10340 * data/lalr1.cc: Likewise.
10341 * data/yacc.c: Likewise.
10342 * lib/ebitsetv.c: Likewise.
10343 * lib/lbitset.c: Likewise.
10344 * lib/subpipe.c: Likewise.
10345 * lib/timevar.c: Likewise.
10346 * src/system.h: Likewise.
10347 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
10348 * djgpp/Makefile.maint: Add copyright notice.
10349 * djgpp/README.in: Likewise.
10350 * djgpp/config.bat: Likewise.
10351 * djgpp/config.site: Likewise.
10352 * djgpp/config_h.sed: Likewise.
10353 * djgpp/djunpack.bat: Likewise.
10354 * djgpp/config.sed: Fix copyright notice to match standard format.
10355 * djgpp/subpipe.h: Likewise.
10356 * lib/bitsetv-print.c: Likewise.
10357 * lib/bitsetv.c: Likewise.
10358 * lib/subpipe.h: Likewise.
10359 * lib/timevar.c: Likewise.
10360 * lib/timevar.h: Likewise.
10361 * djgpp/subpipe.c: Use standard recipe for config.h.
10362 * lib/abitset.c: Likewise.
10363 * lib/bitset.c: Likewise.
10364 * lib/bitset_stats.c: Likewise.
10365 * lib/bitsetv-print.c: Likewise.
10366 * lib/bitsetv.c: Likewise.
10367 * lib/ebitsetv.c: Likewise.
10368 * lib/get-errno.c: Likewise.
10369 * lib/lbitset.c: Likewise.
10370 * lib/subpipe.c: Likewise.
10371 * lib/timevar.c: Likewise.
10372 * lib/vbitset.c: Likewise.
10373 * tests/local.at: Likewise.
10374 * src/scan-gram.l: Don't include verify.h, since system.h does
10375 that for us.
10376 * .x-sc_require_config_h: New file.
10377 * .x-sc_unmarked_diagnostics: New file.
10378
10379 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
10380
10381 Be a bit more systematic about using 'abort'.
10382 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
10383 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
10384 Put 'default: abort ();' before some other case, to satisfy older
10385 pedantic compilers.
10386 * lib/bitset_stats.c (bitset_stats_init): Likewise.
10387 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
10388 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
10389 * src/conflicts.c (resolve_sr_conflict): Likewise.
10390 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
10391 (get_decision_str, get_orientation_str, get_node_alignment_str):
10392 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
10393 (get_linestyle_str, get_arrowstyle_str): Likewise.
10394 * src/conflicts.c (resolve_sr_conflict):
10395 Use a default case rather than one for the one remaining enum
10396 value, to catch invalid enum values as well.
10397 * src/lalr.c (set_goto_map, map_goto):
10398 Prefer "assert (FOO);" to "if (!FOO) abort ();".
10399 * src/nullable.c (nullable_compute, token_definitions_output):
10400 Likewise.
10401 * src/reader.c (packgram, reader): Likewise.
10402 * src/state.c (transitions_to, state_new, state_reduction_find):
10403 Likewise.
10404 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
10405 (symbol_pack): Likewise.
10406 * src/tables.c (conflict_row, pack_vector): Likewise.
10407 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
10408 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
10409 * src/system.h: Don't include <assert.h>.
10410 (assert): New macro.
10411
10412 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
10413 (Destructor Decl, Parser Function, Pure Calling):
10414 Describe rules for braces inside C code more carefully.
10415
10416 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
10417
10418 Fix some porting glitches found by Nelson H. F. Beebe.
10419 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
10420 compilers that don't understand that abort () does not return.
10421 * src/state.c (transitions_to): Likewise.
10422 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
10423 that '#include <cstdlib>' works.
10424 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
10425 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
10426 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
10427 for the benefit of some pre-C99 compilers.
10428
10429 * bootstrap: Undo changes to gnulib files that autoreconf made.
10430
10431 Minor fixups to get 'make maintainer-check' to work.
10432 * configure.ac: Don't use -Wnested-externs, as it's incompatible
10433 with the new verify.h implementation.
10434 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
10435 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
10436 * data/yacc.c (YYUSE): Likewise.
10437 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
10438 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
10439 * src/parse-gram.y (declaration): Don't pass a string constant
10440 to a function that expects char *, since GCC might complain
10441 about the constant value.
10442 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
10443 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
10444 before #defining them.
10445 * tests/glr-regression.at
10446 (Incorrectly initialized location for empty right-hand side in GLR):
10447 In yyerror, use the msg arg.
10448 (Corrupted semantic options if user action cuts parse):
10449 (Incorrect lookahead during deterministic GLR):
10450 (Incorrect lookahead during nondeterministic GLR):
10451 Don't name a local var 'index'; it shadows string.h's 'index'.
10452
10453 2006-01-19 Akim Demaille <akim@epita.fr>
10454
10455 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
10456 location, not just parts of it.
10457
10458 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
10459
10460 * NEWS: Document the fact that multiple %unions are now allowed.
10461 * doc/bison.texinfo (Union Decl): Likewise.
10462 * TODO: This feature is now implemented, so remove it from
10463 the wishlist.
10464
10465 * Makefile.maint: Merge with coreutils Makefile.maint.
10466 (CVS_LIST): Use build-aux version if available.
10467 (VERSION_REGEXP): New macro.
10468 (syntax-check-rules): Add sc_no_if_have_config_h,
10469 sc_prohibit_assert_without_use, sc_require_config_h,
10470 sc_useless_cpp_parens.
10471 (sc_obsolete_symbols): Check for O_NDELAY.
10472 (sc_dd_max_sym_length): Track coreutils.
10473 (sc_unmarked_diagnostics): Look in all files, not just *.c.
10474 (sc_useless_cpp_parens): New rule.
10475 (news-date-check): Look for version or today's date.
10476 (changelog-check): Don't require version number near head.
10477 (copyright-check): Use current year instead of hardwiring 2005.
10478 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
10479 (announcement): Add --gpg-key-ID.
10480
10481 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
10482 with "file system".
10483
10484 Avoid undefined behavior that addressed just before the start of an
10485 array. Problem reported by twlevo.
10486 * src/reader.c (packgram): Prepend a new sentinel before ritem.
10487 * src/lalr.c (build_relations): Rely on new sentinel.
10488 * src/gram.c (gram_free): Adjust to new sentinel.
10489
10490 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
10491
10492 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
10493 yylookaheadNeeds. All uses updated.
10494 (yysplitStack): Rename local yynewLookaheadStatuses to
10495 yynewLookaheadNeeds.
10496 * data/glr-regression.at (Incorrect lookahead during nondeterministic
10497 GLR): In comments, change `lookahead status' to `lookahead need'.
10498
10499 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10500
10501 * data/glr.c (yysplitStack): A little stylistic rewrite.
10502
10503 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10504
10505 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
10506
10507 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
10508
10509 * doc/bison.texinfo: Fix some typos.
10510 (GLR Semantic Actions): New subsection discussing special
10511 considerations because GLR semantic actions might be deferred.
10512 (Actions): Mention look-ahead usage of yylval.
10513 (Actions and Locations): Mention look-ahead usage of yylloc.
10514 (Special Features for Use in Actions): Add YYEOF entry and mention it
10515 in the yychar entry.
10516 In the yychar entry, remove mention of the local yychar case (pure
10517 parser) since this is irrelevant information when writing semantic
10518 actions and since it's already discussed in `Table of Symbols' where
10519 yychar is otherwise described as an external variable.
10520 In the yychar entry, don't call it the `current' look-ahead since it
10521 isn't when semantic actions are deferred.
10522 In the yychar and yyclearin entries, add note about deferred semantic
10523 actions.
10524 Add yylloc and yylval entries discussing look-ahead usage.
10525 (Look-Ahead Tokens): When discussing yychar, don't call it the
10526 `current' look-ahead, and do mention yylval and yylloc.
10527 (Error Recovery): Cross-reference `Action Features' when mentioning
10528 yyclearin.
10529 (Table of Symbols): In the yychar entry, don't call it the `current'
10530 look-ahead.
10531 In the yylloc and yylval entries, mention look-ahead usage.
10532
10533 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
10534
10535 * tests/glr-regression.at: Update copyright year to 2006.
10536
10537 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
10538
10539 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
10540 use during nondeterministic operation to track which stacks have
10541 actually needed the current lookahead.
10542 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
10543 Allocate, deallocate, resize, and otherwise shuffle space for
10544 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
10545 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
10546 appropriately during nondeterministic operation.
10547 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
10548 members to store the current lookahead to be used by the deferred
10549 user action.
10550 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
10551 from which the RHS is taken. Set the lookahead members of the new
10552 yySemanticOption according to the lookahead status for stack yyk.
10553 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
10554 yyaddDeferredAction.
10555 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
10556 members of yySemanticOption before invoking yyuserAction, and then set
10557 them back to their current values afterward.
10558 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
10559 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
10560 * tests/glr-regression.at: Remove `.' from the ends of recent test case
10561 titles for consistency.
10562 (Leaked merged semantic value if user action cuts parse): In order to
10563 suppress lint warnings, use arguments in merge function, and assign
10564 char value < 128 in main.
10565 (Incorrect lookahead during deterministic GLR): New test case.
10566 (Incorrect lookahead during nondeterministic GLR): New test case.
10567
10568 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
10569
10570 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
10571 !yyvaluep as signal that no semantic value is available to print.
10572 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
10573 to print a semantic value.
10574
10575 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
10576
10577 * tests/glr-regression.at: For consistency with my newer test cases,
10578 don't thank myself.
10579
10580 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
10581
10582 * data/glr.c (yyresolveValue): When merging semantic options, if at
10583 least one user action succeeds but a later one cuts the parse, then
10584 destroy the semantic value before returning rather than leaking it.
10585 (yyresolveStates): If a user action cuts the parse and thus
10586 yyresolveValue fails, ignore the (unset) semantic value rather than
10587 corrupting the yyGLRState, and empty the semantic options list since
10588 the user actions should have called all necessary destructors.
10589 Simplify code with YYCHK.
10590 * tests/glr-regression.at (Corrupted semantic options if user action
10591 cuts parse): New test case.
10592 (Undesirable destructors if user action cuts parse): New test case.
10593 Before applying any of this patch, this test case never actually failed
10594 for me... but only because the corrupted semantic options usually
10595 masked this bug.
10596 (Leaked merged semantic value if user action cuts parse): New test
10597 case.
10598
10599 2006-01-05 Akim Demaille <akim@epita.fr>
10600
10601 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
10602
10603 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
10604
10605 * data/c.m4 (b4_c_modern): New macro, with a new provision for
10606 _MSC_VER. Problem reported by Cenzato Marco.
10607 (b4_c_function_def): Use it.
10608 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
10609 b4_c_modern.
10610 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
10611 than rolling our own.
10612
10613 2006-01-04 Akim Demaille <akim@epita.fr>
10614
10615 Also warn about non-used mid-rule values.
10616 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
10617 member.
10618 (symbol_list_new): Adjust.
10619 * src/reader.c (symbol_typed_p): New.
10620 (grammar_rule_check): Use it.
10621 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
10622 Check its rule.
10623 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
10624 Use it.
10625 * tests/actions.at (Exotic Dollars): Adjust.
10626
10627 2006-01-04 Akim Demaille <akim@epita.fr>
10628
10629 * src/reader.c (grammar_midrule_action): If $$ is set in a
10630 mid-rule, move the `used' bit to its lhs.
10631 * tests/input.at (Unused values): New.
10632 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
10633
10634 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
10635
10636 * doc/bison.texinfo (Bison Options): Say more accurately what
10637 --yacc does.
10638 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
10639 about declarations in the grammar when in Yacc mode, as POSIX does
10640 not require a diagnostic when the grammar uses extensions.
10641
10642 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
10643
10644 Warn about dubious constructions like "%token T T".
10645 Reported by twlevo.
10646 * src/symtab.h (struct symbol.declared): New member.
10647 * src/symtab.c (symbol_new): Initialize it to false.
10648 (symbol_class_set): New arg DECLARING, specifying whether
10649 this is a declaration that we want to warn about, if there
10650 is more than one of them. All uses changed.
10651
10652 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
10653 Allow multiple %union directives, whose contents concatenate.
10654 * src/parse-gram.y (grammar_declaration): Likewise.
10655 Use muscle_code_grow, so that we don't need stype_line any more.
10656 All uses changed.
10657
10658 * src/muscle_tab.c (muscle_grow): Fix comment.
10659
10660 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
10661 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
10662 Update copyright year to 2006.
10663
10664 2006-01-03 Akim Demaille <akim@epita.fr>
10665
10666 Have glr.cc pass (some of) the calc.at tests.
10667 * data/glr.cc (b4_parse_param_orig): New.
10668 (b4_parse_param): Improve its definition, and bound it more
10669 clearly in the skeleton.
10670 (b4_epilogue): Append, instead of prepending, in order to keep
10671 #line consistency.
10672 Simplify the generation of auxiliary functions: locations and
10673 purity are mandated.
10674 (b4_global_tokens_and_yystype): Honor it.
10675 * data/location.cc (c++.m4): Don't include it.
10676 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
10677 and AT_SKEL_CC_IF.
10678 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
10679 AT_LALR1_CC_IF.
10680 Be sure to initialize the first position's filename.
10681 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
10682 mandated anyway.
10683 (AT_CHECK_CALC_GLR_CC): New.
10684 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
10685
10686 2006-01-02 Akim Demaille <akim@epita.fr>
10687
10688 * src/output.c (output_skeleton): Don't hard wire the inclusion of
10689 c.m4.
10690 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
10691 * data/glr.cc: Do not include stack.hh.
10692
10693 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
10694
10695 * data/glr.c: Reformat whitespace with tabs.
10696 (b4_lpure_formals): Remove this unused m4 macro.
10697 * tests/cxx-type.at: Reformat whitespace with tabs.
10698 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
10699 since it's a member. Rename type to isNterm for clarity.
10700
10701 2005-12-29 Akim <akim@sulaco.local>
10702
10703 Let glr.cc catch up with symbol_value_print.
10704 * data/glr.cc (b4_yysymprint_generate): Replace by...
10705 (b4_yy_symbol_print_generate): this.
10706 (yy_symbol_print, yy_symbol_value_print): Declare them.
10707
10708 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
10709
10710 * src/location.h (boundary): Note that a line or column equal
10711 to INT_MAX indicates an overflow.
10712 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
10713 (rule_length_overflow, increment_rule_length, add_column_width):
10714 New functions.
10715 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
10716 (<SC_BRACED_CODE>"}"):
10717 Use increment_rule_length rather than incrementing it by hand.
10718 (adjust_location, handle_syncline): Diagnose overflow.
10719 (handle_action_dollar, handle_action_at):
10720 Fix bug with monstrosities like $-2147483648.
10721 Remove now-unnecessary checks.
10722 (scan_integer): Verify assumptions and remove now-unnecessary checks.
10723 (convert_ucn_to_byte): Verify assumptions.
10724 (handle_syncline): New arg LOC. All callers changed.
10725 Don't store through a value derived from char const * pointer.
10726
10727 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
10728 GCC warnings.
10729
10730 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
10731
10732 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
10733 Remove unnecessary forward static decls.
10734
10735 2005-12-27 Akim Demaille <akim@epita.fr>
10736
10737 * src/reader.c (grammar_current_rule_check): Also check that $$
10738 is used.
10739 Take the rule to check as argument, hence rename as...
10740 (grammar_rule_check): this.
10741 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
10742 Rename as...
10743 (grammar_rule_begin, grammar_rule_end): these, for consistency.
10744 (grammar_midrule_action, grammar_symbol_append): Now static.
10745 * tests/torture.at (input): Don't rely on the default action
10746 being always performed.
10747 * tests/calc.at: "Set" $$ even when the action is "cut" with
10748 YYERROR or other.
10749 * tests/actions.at (Exotic Dollars): Instead of using unused
10750 values, check that the warning is issued.
10751
10752 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
10753
10754 * NEWS: Improve wording for unused-value warnings.
10755
10756 2005-12-22 Akim Demaille <akim@epita.fr>
10757
10758 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
10759 (b4_yysymprint_generate): Rename as...
10760 (b4_yy_symbol_print_generate): this.
10761 Generate yy_symbol_print instead of yysymprint.
10762 Generate also yy_symbol_value_print, and use it.
10763
10764 2005-12-22 Akim Demaille <akim@epita.fr>
10765
10766 * NEWS: Warn about unused values.
10767 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
10768 a `used' member.
10769 (symbol_list_n_get, symbol_list_n_used_set): New.
10770 (symbol_list_n_type_name_get): Use symbol_list_n_get.
10771 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
10772 * src/reader.c (grammar_current_rule_check): Check that values are
10773 used.
10774 * src/symtab.c (symbol_print): Accept 0.
10775 * tests/existing.at: Remove the type information.
10776 Empty the actions.
10777 Remove useless actions (beware of mid-rule actions: perl -000
10778 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
10779 * tests/actions.at (Exotic Dollars): Use unused values.
10780 * tests/calc.at: Likewise.
10781 * tests/glr-regression.at (No users destructors if stack 0 deleted):
10782 Likewise.
10783
10784 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
10785 rule_useful_p.
10786
10787 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
10788
10789 Undo 2005-12-01 tentative license wording change. The wording is
10790 still being reviewed by the lawyers, and we don't want to wait for
10791 them before publishing a test release. For now, revert to the
10792 previous wording.
10793 * NEWS: Undo 2005-12-01 change.
10794 * data/glr.c: Revert to previous license wording.
10795 * data/glr.cc: Likewise.
10796 * data/lalr1.cc: Likewise.
10797 * data/location.cc: Likewise.
10798 * data/yacc.c: Likewise.
10799
10800 * NEWS: Reword %destructor vs YYABORT etc.
10801 * data/glr.c: Use American spacing, for consistency.
10802 * data/glr.cc: Likewise.
10803 * data/lalr1.cc: Likewise.
10804 * data/yacc.c: Likewise.
10805 * data/yacc.c: Reformat comments slightly.
10806 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
10807 for consistency. Fix some spelling errors and reword recently-included
10808 text slightly.
10809 * tests/cxx-type.at: Cast results of malloc, for C++.
10810
10811 2005-12-21 Joel E. Denny <address@hidden>
10812
10813 * tests/cxx-type.at: Construct a tree, count the parents of shared
10814 nodes, and free each node once and only once. Previously, the memory
10815 for semantic values was leaked instead.
10816
10817 2005-12-21 Joel E. Denny <address@hidden>
10818
10819 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
10820 (yylval, yylloc): If pure, #define to yystackp->yyval and
10821 yystackp->yyloc similar to yychar and yynerrs.
10822 (yyparse): If pure, remove local yylval and yylloc. Add local
10823 yystackp to accommodate pure definitions of yylval and yylloc.
10824 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
10825 yylvalp and yyllocp to &yylval and &yylloc.
10826 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
10827 namespace. Previously, nerrs and char were missing, but lval and lloc
10828 weren't necessary.
10829 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
10830 yylvalp and yyllocp parameters since, if pure, these are now always
10831 accessible through yystackp. If not pure, they are still accessible
10832 globally.
10833 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
10834 `if (YYID (N))' to pacify lint.
10835
10836 2005-12-21 Akim Demaille <akim@epita.fr>
10837
10838 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
10839 destroy the RHS symbols of a rule.
10840 * data/yacc.c (yylen): Initialize to 0.
10841 Keep its value to the number of items to possibly shift.
10842 In particular, a regular successful parse that ends on YYFINAL by
10843 a (internal) YYACCEPT must not have yylen != 0.
10844 (yyerrorlab, yyreturn): Pop the RHS.
10845 Reorder a bit to emphasize the `shifting' bits of code.
10846 (YYPOPSTACK): Now accept a number of items to pop.
10847 * data/lalr1.cc: Likewise.
10848 * data/glr.c: Formatting changes.
10849 Use goto instead of fall through.
10850 * doc/bison.texinfo (Destructor Decl): Complete.
10851
10852 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
10853
10854 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
10855 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
10856 * djgpp/config.bat: Replace every occurence of the file name
10857 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
10858 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
10859 * djgpp/config.sed: Replace every occurence of the file name
10860 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
10861 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
10862 * djgpp/djunpack.bat: DJGPP specific file.
10863 * djgpp/fnchange.lst: DJGPP specific file.
10864 * djgpp/README.in: Add new information about how to unpack the bison
10865 source on MSDOS and other systems which have 8.3 file name restrictions
10866 using djunpack.bat and fnchange.lst.
10867
10868 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
10869
10870 * bootstrap (build_cvs_prefix): Remove; unused.
10871 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
10872 when getting gnulib.
10873
10874 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
10875
10876 * data/glr.c: Reorder typedef declarations for structs to match order
10877 of struct declarations.
10878 Rename yystack everywhere to yystackp except in yyparse where it's not
10879 a pointer.
10880 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
10881 consistency.
10882 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
10883 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
10884 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
10885 lint.
10886
10887 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
10888
10889 * tests/sets.at (Accept): Fix typos in regular expression used to
10890 sed out the final state number.
10891
10892 Work around portability problem on Solaris 10: flex-generated
10893 files include <stdio.h> before <config.h>, which messes up
10894 because the latter defines __EXTENSIONS__. Address the problem
10895 by creating two new little files that include <config.h> first,
10896 then include the flex-generated files. Rewrite everyone else
10897 to include <config.h> first, as well.
10898 * lib/timevar.c: Always include "config.h".
10899 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
10900 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
10901 (EXTRA_bison_SOURCES): New macro.
10902 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
10903 * src/system.h: Don't include config.h.
10904 * src/LR0.c: Include <config.h> first.
10905 * src/assoc.c: Likewise.
10906 * src/closure.c: Likewise.
10907 * src/complain.c: Likewise.
10908 * src/conflicts.c: Likewise.
10909 * src/derives.c: Likewise.
10910 * src/files.c: Likewise.
10911 * src/getargs.c: Likewise.
10912 * src/gram.c: Likewise.
10913 * src/lalr.c: Likewise.
10914 * src/location.c: Likewise.
10915 * src/main.c: Likewise.
10916 * src/muscle_tab.c: Likewise.
10917 * src/nullable.c: Likewise.
10918 * src/output.c: Likewise.
10919 * src/parse-gram.y: Likewise.
10920 * src/print.c: Likewise.
10921 * src/print_graph.c: Likewise.
10922 * src/reader.c: Likewise.
10923 * src/reduce.c: Likewise.
10924 * src/relation.c: Likewise.
10925 * src/state.c: Likewise.
10926 * src/symlist.c: Likewise.
10927 * src/symtab.c: Likewise.
10928 * src/tables.c: Likewise.
10929 * src/uniqstr.c: Likewise.
10930 * src/vcg.c: Likewise.
10931
10932 * src/parse-gram.y: Fix minor problems uncovered by lint.
10933 (current_lhs, current_lhs_location): Now static.
10934 (current_assoc): Remove unused variable.
10935
10936 Cleanups so that Bison-generated parsers have less lint.
10937 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
10938 Prepend /*ARGSUSED*/, for lint's sake.
10939 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
10940 definition if 'lint' is defined.
10941 (YYID): New macro (or function, if lint).
10942 All uses of /*CONSTCOND*/0 replaced by YYID(0).
10943 * data/yacc.c: Likewise.
10944 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
10945 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
10946 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
10947 is C++ only.
10948 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
10949 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
10950 Use YYID(0) rather than 0, for lint.
10951 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
10952 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
10953
10954 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
10955
10956 * tests/glr-regression.at
10957 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10958 Close memory leak reported by twlevo.
10959
10960 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
10961
10962 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
10963 all stacks.
10964 (yyparse): Iterate another stack in order to call user destructors.
10965 * tests/glr-regression.at (No users destructors if stack 0 deleted):
10966 New test case.
10967 (Duplicated user destructor for lookahead): This test now is expected
10968 to succeed.
10969
10970 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
10971
10972 * NEWS: Document the following change.
10973 * data/yacc.c: Say "parser skeleton" rather than "file", since
10974 it's no longer just a file.
10975 * data/glr.c: Grant a special exception for C GLR parsers, that
10976 reads like the already-existing exception for C LALR(1) parsers.
10977 * data/glr.cc: Likewise.
10978 * data/lalr1.cc: Likewise.
10979 * data/location.cc: Likewise.
10980 * data/yacc.c: Reword the "written by" statement to clarify that
10981 it was the parser skeleton, not the entire output file.
10982 * data/glr.c: Written by Paul Hilfinger.
10983 * data/glr.cc: Written by Akim Demaille.
10984 * data/lalr1.cc: Likewise.
10985
10986 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
10987
10988 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
10989 Fix typos in previous change that broke 'make check'.
10990 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
10991 supported in C.
10992 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
10993 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
10994 We can revert this once things settle down.
10995
10996 * src/conflicts.c (conflicts_print): Don't print file name twice
10997 when %expect fails because there were no conflicts.
10998 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
10999 change.
11000 * tests/conflicts.at (%expect not enough, %expect too much):
11001 (%expect with reduce conflicts): Adjust to new behavior.
11002
11003 2005-11-18 Akim Demaille <akim@epita.fr>
11004
11005 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
11006 errors.
11007 * NEWS: Document this.
11008 * doc/bison.texinfo (Expect Decl): Likewise.
11009
11010 2005-11-16 Akim Demaille <akim@epita.fr>
11011
11012 Generalize the display of semantic values and locations in traces.
11013 * data/glr.c (yy_reduce_print): Fix indices (again).
11014 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
11015 literal integers.
11016 * data/lalr1.cc (yyreduce_print): Rename as...
11017 (yy_reduce_print): this.
11018 Display values and locations.
11019 * data/yacc.c (yy_reduce_print): Likewise.
11020 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
11021 (yysymprint): Move higher to be visible from yy_reduce_print).
11022 (yyparse): Adjust.
11023 * tests/calc.at: Adjust the expected length of the traces.
11024
11025 2005-11-14 Akim Demaille <akim@epita.fr>
11026
11027 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
11028 from 1 to N, while values and location start at 0.
11029 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
11030
11031 2005-11-14 Akim Demaille <akim@epita.fr>
11032
11033 * data/glr.c (yy_reduce_print): Fix the $ number.
11034
11035 2005-11-14 Akim Demaille <akim@epita.fr>
11036
11037 "Use" parse parameters.
11038 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
11039 * data/glr.c, data/glr.cc: Use them.
11040 * data/glr.c (YYUSE): Have a C++ definition that supports
11041 non-pointer types.
11042
11043 2005-11-14 Akim Demaille <akim@epita.fr>
11044
11045 * data/glr.c (yyexpandGLRStack): Declare only if defined.
11046
11047 2005-11-14 Akim Demaille <akim@epita.fr>
11048
11049 * data/glr.cc: New.
11050 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
11051
11052 2005-11-12 Akim Demaille <akim@epita.fr>
11053
11054 Let position and location be PODs.
11055 * data/location.cc (position::initialize, location::initialize): New.
11056 (position::position, location::location): Define only if
11057 b4_location_constructors is defined.
11058 * data/lalr1.cc (b4_location_constructors): Define it for backward
11059 compatibility.
11060 * doc/bison.texinfo (Initial Action Decl): Use initialize.
11061
11062 2005-11-12 Akim Demaille <akim@epita.fr>
11063
11064 * data/lalr1.cc: Move the body of the ctor and dtor into the
11065 parser file (instead of the header).
11066 Wrap the implementations in a "namespace yy".
11067
11068 2005-11-12 Akim Demaille <akim@epita.fr>
11069
11070 Have glr.c include its header file when created.
11071 * data/glr.c (b4_shared_declarations): New.
11072 Output them verbatim in the parser if !%defines, otherwise
11073 output then in the header file, and include it instead.
11074
11075 2005-11-11 Akim Demaille <akim@epita.fr>
11076
11077 * data/glr.c: Comment changes.
11078
11079 2005-11-11 Akim Demaille <akim@epita.fr>
11080
11081 When yydebug, report semantic and location values for reductions.
11082 * data/glr.c (yy_reduce_print): Report the semantic values and the
11083 locations.
11084 (YY_REDUCE_PRINT): Adjust.
11085 (yyglrReduce): Use them.
11086 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
11087 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
11088 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
11089 traces.
11090
11091 2005-11-10 Akim Demaille <akim@epita.fr>
11092
11093 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
11094 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
11095 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
11096
11097 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
11098
11099 * m4/cxx.m4, examples/Makefile.am: Don't build
11100 examples/calc++ if no C++ compiler is available. (trivial change)
11101
11102 2005-11-09 Akim Demaille <akim@epita.fr>
11103
11104 * src/scan-skel.l: Use a couple of asserts.
11105
11106 2005-11-03 Akim Demaille <akim@epita.fr>
11107
11108 In some (weird) cases, the final state number is incorrect.
11109 Reported by Alexandre Duret-Lutz.
11110 * src/LR0.c (state_list_append): Remove the computation of
11111 final_state.
11112 (save_reductions): Do it here.
11113 (get_state): Alpha conversion.
11114 (generate_states): Use a for loop.
11115 * src/gram.h (item_number_is_rule_number)
11116 (item_number_is_symbol_number): New.
11117 * src/state.c: Use assert.
11118 * src/system.h: Include assert.h.
11119 * tests/sets.at (Accept): New.
11120
11121 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11122
11123 * data/glr.c (yyfill): Adjust comment.
11124 (yyresolveAction): Initialize default location properly
11125 for empty right-hand sides.
11126 (yydoAction): Ditto.
11127 Add comment explaining apparently dead code.
11128 * tests/glr-regression.at
11129 (Incorrectly initialized location for empty right-hand side in GLR):
11130 New test.
11131
11132 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
11133
11134 * bootstrap (cleanup_gnulib): New function. Use it to clean up
11135 gnulib when interrupted. This fixes some race conditions and
11136 works around some portability problems (one noted by Paul
11137 Hilfinger).
11138
11139 2005-10-22 Akim <akim@epita.fr>
11140
11141 * Makefile.cfg: Adjust to config -> build-aux.
11142 Reported by twledo.
11143
11144 2005-10-21 Akim Demaille <akim@epita.fr>
11145
11146 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
11147 the %parse-params.
11148 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
11149 * data/yacc.c (b4_Pure_if): Rename as...
11150 (b4_yacc_pure_if): this.
11151 (YY_SYMBOL_PRINT, yyparse): Adjust.
11152 * doc/bison.texinfo: Formatting changes.
11153
11154 2005-10-21 Akim Demaille <akim@epita.fr>
11155
11156 Finish the transition config -> build-aux.
11157 * configure.ac, Makefile.am: Use build-aux.
11158 * config/prev-version, config/announce-gen, config/Makefile.am:
11159 Move to...
11160 * build-aux/prev-version, build-aux/announce-gen,
11161 * build-aux/Makefile.am: here.
11162
11163 2005-10-14 Akim Demaille <akim@epita.fr>
11164
11165 * examples/calc++/test: Use set -x only when VERBOSE.
11166
11167 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
11168
11169 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
11170 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
11171
11172 2005-10-13 Akim Demaille <akim@epita.fr>
11173
11174 * src/scan-skel.l: Output the base name parts of the parser and
11175 header file names.
11176 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
11177 additional checks.
11178 Use this to exercise C++ outputs in subdirs.
11179 Reported by Oleg Smolsky.
11180
11181 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
11182
11183 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
11184 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
11185 Problem reported by John P. Hartmann.
11186 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
11187 already defined it.
11188
11189 2005-10-12 Akim Demaille <akim@epita.fr>
11190
11191 * src/parse-gram.y (version_check): Exit 63 to please missing
11192 (stands for "version mismatch).
11193 * tests/input.at, doc/bison.texinfo: Adjust.
11194
11195 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
11196
11197 Work around portability problems with Visual Age C compiler
11198 (xlc and xlC_r) reported by John P. Hartmann.
11199 * data/location.cc (initial_column, initial_line): Remove.
11200 All uses replaced by 0 and 1.
11201 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
11202 that xlc complains about.
11203 * src/scan-skel.l (skel_wrap): Likewise.
11204 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
11205 as __STDC__.
11206 * data/yacc.c (YYMODERN_C): New macro, which also looks at
11207 __STDC_VERSION__. Use it everywhere instead of looking at
11208 __STDC__ and __cplusplus.
11209
11210 2005-10-10 Akim Demaille <akim@epita.fr>
11211
11212 * examples/calc++/test: Be quiet unless VERBOSE.
11213
11214 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
11215
11216 * data/c.m4 (yydestruct, yysymprint):
11217 Use YYUSE instead of casting to void.
11218 * data/glr.c (YYUSE): New macro.
11219 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
11220 Use it instead of rolling our own.
11221 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
11222 (YYCHK1):
11223 Use /*CONSTCOND*/ to suppress lint warnings.
11224 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
11225 (YY_STACK_PRINT): Use 'false' not '0'.
11226 (YYUSE): New macro.
11227 (yysymprint_, yydestruct_): Use it instead of rolling our own.
11228 * data/yacc.c (YYUSE): New macro.
11229 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
11230 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
11231 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
11232
11233
11234 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
11235 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
11236
11237 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
11238
11239 Undo the parts of the unlocked-I/O change that substituted
11240 putc or puts for printf. This might hurt performance a bit,
11241 but some people prefer the printf style.
11242 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
11243 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
11244 All uses replaced by YYFPRINTF and YYDPRINTF.
11245 * data/yacc.c: Likewise.
11246 * lib/bitset.c (bitset_print): Likewise.
11247 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
11248 putc and puts.
11249 * lib/lbitset.c (debug_lbitset): Likewise.
11250 * src/closure.c (print_firsts, print_fderives): Likewise.
11251 * src/gram.c (grammar_dump): Likewise.
11252 * src/lalr.c (look_ahead_tokens_print): Likewise.
11253 * src/output.c (escaped_output): Likewise.
11254 (user_actions_output): Break apart two printfs.
11255 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
11256 * src/reduce.c (reduce_print): Likewise.
11257 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
11258 * src/system.h: Include unlocked-io.h rathe than stdio.h.
11259
11260 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
11261 Use assignments rather than casts-to-void to suppress
11262 unused-variable warnings. This pacifies 'lint'.
11263 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
11264 unused-variable warnings.
11265
11266 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
11267
11268 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
11269
11270 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
11271
11272 Use unlocked I/O for a minor performance improvement on hosts like
11273 GNU/Linux and Solaris that support unlocked I/O. The basic idea
11274 is to use the gnlib unlocked-io module, and to prefer putc and
11275 puts to printf when either will work (since the latter doesn't
11276 come in an unlocked flavor).
11277 * bootstrap (gnulib_modules): Add unlocked-io.
11278 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
11279 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
11280 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
11281 and similarly for puts and putc and printf.
11282 * data/yacc.c: Likewise.
11283 * lib/bitset.c (bitset_print): Likewise.
11284 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
11285 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
11286 to printf.
11287 * lib/lbitset.c (debug_lbitset): Likewise.
11288 * src/closure.c (print_firsts, print_fderives): Likewise.
11289 * src/gram.c (grammar_dump): Likewise.
11290 * src/lalr.c (look_ahead_tokens_print): Likewise.
11291 * src/output.c (escaped_output): Likewise.
11292 (user_actions_output): Coalesce two printfs.
11293 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
11294 * src/reduce.c (reduce_print): Likewise.
11295 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
11296 * src/system.h: Include unlocked-io.h rather than stdio.h.
11297
11298 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
11299 this confuses xgettext.
11300
11301 2005-10-02 Akim Demaille <akim@epita.fr>
11302
11303 * bootstrap (gnulib_modules): Add strverscmp.
11304 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
11305 * m4/.cvsignore: Add strverscmp.m4.
11306 * src/parse-gram.y (%require): New token, new rule.
11307 (version_check): New.
11308 * src/scan-gram.l (%require): Adjust.
11309 * tests/input.at (AT_REQUIRE): New.
11310 Use it.
11311 * doc/bison.texinfo (Require Decl): New.
11312 (Calc++ Parser): Use %require.
11313
11314 2005-10-02 Akim Demaille <akim@epita.fr>
11315
11316 * data/location.cc: New.
11317
11318 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
11319 Akim Demaille <akim@epita.fr>
11320
11321 Make sure -odir/foo.cc creates dir/location.hh etc.
11322 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
11323 (spec_file_prefix, spec_verbose_file, spec_graph_file)
11324 (spec_defines_file): Now const.
11325 (dir_prefix): New.
11326 (short_base_name): Remove.
11327 * src/files.c: Adjust.
11328 (dirname.h): Include.
11329 (base_name): Don't prototype it.
11330 (finput): Remove, duplicates gram_in.
11331 (full_base_name, short_base_name): Replace by...
11332 (all_but_ext, all_but_tab_ext): these.
11333 (compute_base_names): Rename as...
11334 (compute_file_name_parts): this.
11335 Update to compute the new variables, including dir_prefix.
11336 Adjust dependencies.
11337 * src/output.c (prepare): Output them.
11338 * src/reader.c: Adjust to use gram_in, not finput.
11339 * src/scan-skel.l (@dir_prefix@): New.
11340
11341 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
11342
11343 * lib/subpipe.c: New function end_of_output_subpipe() added
11344 to allow support for non-posix systems. This is a no-op function
11345 for posix systems.
11346
11347 * lib/subpipe.h: New function end_of_output_subpipe() added
11348 to allow support for non-posix systems. This is a no-op function
11349 for posix systems.
11350
11351 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
11352 handle the lack of pipe/fork functionality on non-posix systems.
11353
11354 * djgpp/Makefile.maint: DJGPP specific file.
11355
11356 * djgpp/README.in: DJGPP specific file.
11357
11358 * djgpp/config.bat: DJGPP specific configuration file.
11359
11360 * djgpp/config.sed: DJGPP specific configuration file.
11361
11362 * djgpp/config.site: DJGPP specific configuration file.
11363
11364 * djgpp/config_h.sed: DJGPP specific configuration file.
11365
11366 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
11367
11368 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
11369
11370 2005-10-02 Akim Demaille <akim@epita.fr>
11371
11372 * data/location.cc: New, extract from...
11373 * data/lalr1.cc: here.
11374 (location.hh): Include it after the user prologue, in case the
11375 filename type is defined by the user.
11376 Forward declation location and position before the pre-prologue.
11377 (yyresult_): Rename as...
11378 (yyresult): this, it's a local variable, not an attribute.
11379 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
11380
11381 2005-10-01 Akim Demaille <akim@epita.fr>
11382
11383 * examples/extexi: Restore the #line generation.
11384
11385 2005-09-30 Akim Demaille <akim@epita.fr>,
11386 Alexandre Duret-Lutz <adl@gnu.org>
11387
11388 Move the token type and YYSTYPE in the parser class.
11389 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
11390 (parser::token): New, from the moved free definition of tokens.
11391 (parser::semantic_value): Now a full definition instead of an
11392 indirection to YYSTYPE.
11393 (b4_post_prologue): No longer included in the header file, but
11394 in the implementation file.
11395 * doc/bison.texi (C+ Language Interface): Update.
11396 * src/parse-gram.y: Support unary %define.
11397 * tests/actions.at: Define global_tokens_and_yystype for backward
11398 compatibility until we update the tests.
11399 * tests/calc.at: Idem.
11400 (first_line, first_column, last_line, last_column): Define for lalr1.cc
11401 to simplify the code.
11402
11403 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
11404
11405 Port to SunOS 4.1.4, which lacks strtoul and strerror.
11406 Ah, the good old days! Problem reported by Peter Klein.
11407 * bootstrap (gnulib_modules): Add strerror, strtoul.
11408 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
11409 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
11410
11411 2005-09-29 Akim Demaille <akim@epita.fr>
11412
11413 * data/c.m4 (b4_error_verbose_if): New.
11414 * data/lalr1.cc: Use it.
11415 (YYERROR_VERBOSE_IF): Remove.
11416 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
11417 parser members, replaced by...
11418 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
11419 local variables.
11420 (yysyntax_error_): Takes the state number as argument.
11421 (yyreduce_print_): Use the argument yyrule, not the former
11422 attribute yyn_.
11423
11424 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
11425
11426 * bootstrap (gnulib_modules): Add verify.
11427 * lib/.cvsignore: Add verify.h.
11428 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
11429 * src/system.h (verify): Remove.
11430 Include verify.h instead.
11431 * src/tables.c (tables_generate): Use new API for 'verify'.
11432
11433 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
11434
11435 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
11436 local variables whose names begin with 'yy'.
11437 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
11438 Trivial changes from Joel E. Denny.
11439
11440 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
11441 it itself.
11442 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
11443 don't use alloca any more.
11444
11445 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
11446 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
11447 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
11448 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
11449 to match yacc.c, to test more hosts.
11450
11451 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
11452
11453 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
11454 doesn't affect behavior.
11455 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
11456 Solaris, AIX, MSC.
11457 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
11458 This works a bit better with glibc, if user code has already included
11459 stdlib.h.
11460 * doc/bison.texinfo (Bison Parser): Document that users can't
11461 arbitrarily use malloc and free for other purposes. Document
11462 that <alloca.h> and <malloc.h> might be included.
11463 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
11464 user must declare alloca.
11465
11466 * HACKING (release): Forwarn the Translation Project about
11467 stable releses.
11468
11469 2005-09-20 Akim Demaille <akim@epita.fr>
11470
11471 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
11472
11473 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
11474
11475 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
11476 (YYSTACK_ALLOC_MAXIMUM): Use it.
11477 (yysyntax_error): New function.
11478 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
11479 multiple syntax errors are reported, and alloca is being used.
11480 Instead, reallocate buffers twice as big each time, so that
11481 we waste at most half the allocated memory. Start with a small
11482 (128-byte) buffer that will suffice in most cases anyway.
11483 Use yysyntax_error to do most of the work.
11484
11485 * doc/bison.texinfo (Error Reporting, Table of Symbols):
11486 yynerrs is the number of errors reported, not the number of
11487 errors encountered.
11488
11489 * tests/glr-regression.at (Duplicated user destructor for lookahead):
11490 Mark it as expected to fail.
11491 Cast result of malloc; problem reported by twlevo@xs4all.nl.
11492 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
11493 Don't start user-code symbols with "yy", to avoid name space problems.
11494
11495 2005-09-19 Akim Demaille <akim@epita.fr>
11496
11497 Remove the traits, failed experiment.
11498 It never proved useful, and anyway because of the current
11499 definition, it was not possible to have several specialization of
11500 this traits, making it useless.
11501 * data/lalr1.cc (yy:traits): Remove.
11502 Inline its definitions in the parser class.
11503
11504 2005-09-19 Akim Demaille <akim@epita.fr>
11505
11506 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
11507 least Mac OSX with a /usr/local install of gettext.
11508
11509 2005-09-19 Akim Demaille <akim@epita.fr>
11510
11511 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
11512 and yytoken for similarity with the other skeletons.
11513
11514 2005-09-19 Akim Demaille <akim@epita.fr>
11515
11516 * NEWS, configure.ac: update version number to 2.1a.
11517
11518 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
11519
11520 * NEWS: Version 2.1.
11521
11522 * NEWS: Remove notice of yytname change, since it was never in an
11523 official release.
11524 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
11525 diagnostic.
11526 * src/output.c (prepare): Likewise.
11527 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
11528 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
11529 is not defined. This is an awful hack, but it's enough for now.
11530 All callers changed.
11531 * tests/glr-regression-at (make_value): Args are const pointers now,
11532 to avoid GCC warning.
11533 (Duplicated user destructor for lookahead): New test. Currently
11534 skipped. It fails on my host but I'm not sure it'll always fail.
11535
11536 2005-09-16 Akim Demaille <akim@epita.fr>
11537
11538 * src/symtab.h (struct symbol): Declare the printer and destructor
11539 as const, to avoid accidental calls to free.
11540 (symbol_destructor_set, symbol_printer_set): Adjust.
11541 * src/symtab.c: Adjust.
11542
11543 2005-09-16 Akim Demaille <akim@epita.fr>
11544
11545 * data/c.m4 (b4_token_enums): New.
11546 (b4_token_defines): Rename as...
11547 (b4_token_enums_defines): this.
11548 (b4_token_defines): New, output only the #defines.
11549 * data/yacc.c, data/glr.c: Adjust.
11550 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
11551 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
11552 as default values.
11553
11554 2005-09-16 Akim Demaille <akim@epita.fr>
11555
11556 * data/lalr1.cc (yylex_): Remove, inline its code.
11557 (yyreport_syntax_error_): Remove, replaced by...
11558 (yysyntax_error_): this which returns a string and leaves to the
11559 caller the call to the users' error function.
11560 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
11561 Move from members of the parser object...
11562 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
11563 to local variables of the parse function.
11564
11565 2005-09-16 Akim Demaille <akim@epita.fr>
11566
11567 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
11568 since it's in Bison's name space.
11569
11570 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
11571
11572 * data/glr.c (yyresolveValue): Add default case to pacify
11573 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
11574
11575 * NEWS: Document when yyparse started to return 2.
11576 * doc/bison.texinfo (Parser Function): Document when yyparse
11577 returns 2.
11578
11579 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
11580 (b4_filename_type): Renamed back from b4_file_name_type. All uses
11581 changed.
11582 (class position): file_name -> filename (reverting). All uses changed.
11583
11584 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
11585
11586 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
11587 do anything if $@ exists. This reverts part of the 2005-07-07
11588 patch.
11589
11590 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
11591
11592 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
11593 contains obsolete information and isn't worth distributing as a
11594 separate file anyway.
11595 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
11596 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
11597 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
11598 (yyparse): Abort if user code uses longjmp to throw an unexpected
11599 value.
11600
11601 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
11602
11603 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
11604 Suggested by twlevo@xs4all.nl.
11605
11606 * data/glr.c (YYCHK1): Do not assume YYE is in range.
11607 This avoids a diagnostic from gcc -Wswitch-enum.
11608 Problem reported by twlevo@xs4all.nl.
11609
11610 * doc/bison.texinfo: Don't use "filename", as per GNU coding
11611 standards. Use "file name" or "file" or "name", depending on
11612 the context.
11613 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
11614 not to hack/foo.tab.c.
11615 (Calc++ Top Level): 2nd arg of main is not const.
11616 * data/glr.c: b4_filename -> b4_file_name.
11617 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
11618 All uses changed.
11619 (class position): filename -> file_name. All uses changed.
11620 * data/yacc.c: b4_filename -> b4_file_name.
11621 * lib/bitset.h: filename -> file_name in local vars.
11622 * lib/bitset_stats.c: Likewise.
11623 * src/files.c: Likewise.
11624 * src/scan-skel.l ("@output ".*\n): Likewise.
11625 * src/files.c (file_name_split): Renamed from filename_split.
11626 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
11627
11628 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
11629
11630 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
11631 to accommodate latest gnulib.
11632
11633 * tests/glr-regression.at (Duplicate representation of merged trees):
11634 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
11635
11636 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
11637 needed.
11638
11639 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
11640
11641 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
11642 All uses changed. Invoke user destructor after an error during a
11643 split parse (trivial change from Joel E. Denny).
11644
11645 * tests/glr-regression.at
11646 (User destructor after an error during a split parse): New test case.
11647 Problem reported by Joel E. Denny in:
11648 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
11649
11650 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
11651
11652 * README-cvs: Give URLs for recommended tools.
11653 Mention Gzip version problem, and bootstrapping issues.
11654 Remove troubleshooting section, as it's somewhat obsolete.
11655
11656 * bootstrap (no_cache): New var, to accommodate different wget
11657 variants. Use it instead of '-C off'. Problem reported by
11658 twlevo@xs4all.nl.
11659
11660 * data/glr.c (yydestroyStackItem): New function.
11661 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
11662 debugging information. Problem reported by Joel E. Denny.
11663
11664 2005-08-25 Akim Demaille <akim@epita.fr>
11665
11666 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
11667
11668 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
11669
11670 * data/glr.c (yyrecoverSyntaxError, yyreturn):
11671 Don't invoke destructor on unresolved entries.
11672 * tests/glr-regression.at
11673 (User destructor for unresolved GLR semantic value): New test case.
11674 Problem reported by Joel E. Denny in:
11675 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
11676
11677 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
11678
11679 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
11680 Add strnlen.c.
11681 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
11682 lib-prefix.m4, po.m4.
11683
11684 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
11685 in yydestruct diagnostic, since it might not be an error.
11686 Problem reported by Joel Denny near end of
11687 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
11688 * data/lalr1.cc (yyerturn): Likewise.
11689 * data/yacc.c (yyreturn): Likewise.
11690 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
11691
11692 * src/files.c: Remove obsolete FIXME comment.
11693
11694 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
11695 with the other templates, and to fix bogus run-on messages such
11696 as the one reported at the end of
11697 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
11698 All callers changed to avoid the newline.
11699 (yyprocessOneStack): Output two lines rather than one, to accommodate
11700 the above change. This changes the debug output format slightly.
11701
11702 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
11703 reported by Joel E. Denny in
11704 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
11705 (trivial change).
11706 * tests/glr-regression.at (Duplicate representation of merged trees):
11707 New test, from Joel E. Denny in:
11708 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
11709 * THANKS: Add Joel E. Denny.
11710
11711 * configure.ac (AC_INIT): Bump to 2.0c.
11712
11713 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
11714
11715 * NEWS: Version 2.0b.
11716
11717 * Makefile.am (SUBDIRS): Put examples before tests, so that
11718 "make check" doesn't finish with "All 1 tests passed".
11719
11720 * tests/regression.at (Token definitions): Don't rely on
11721 AT_PARSER_CHECK for data that contains backslashes. It currently
11722 uses 'echo', and 'echo' isn't portable if its argument contains
11723 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
11724 that the byte '\0xff' is not printable in the C locale; it is,
11725 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
11726 not printable, so use '\0x81' to test.
11727
11728 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
11729 version of GCC, since the macro is used with non-GCC compilers.
11730
11731 Fix core dump reported by Pablo De Napoli in
11732 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
11733 * tests/regression.at (Invalid inputs with {}): New test.
11734 * src/parse-gram.y (token_name): Translate type before using
11735 it as an index.
11736
11737 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
11738 the user's name space. All uses changed to __attribute__
11739 ((__unused__)).
11740 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
11741 Add __attribute__ ((__noreturn__)).
11742
11743 * etc/clcommit: Remove. We weren't using it, and it failed
11744 "make maintainer-distcheck".
11745 * Makefile.maint: Merge from coreutils.
11746 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
11747 (syntax-check-rules): Change list of rules as described below.
11748 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
11749 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
11750 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
11751 (sc_trailing_space): New rules.
11752 (sc_xalloc_h_in_src): Remove.
11753 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
11754 (sc_space_tab, sc_error_exit_success, sc_changelog):
11755 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
11756 (makefile-check, po-check, author_mark_check):
11757 (makefile_path_separator_check, copyright-check):
11758 Use grep -n, to make it easier to find violations.
11759 Use CVS_LIST and CVS_LIST_EXCEPT.
11760 (header_regexp, h_re): Remove.
11761 (dd_c): New macro.
11762 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
11763 (my-distcheck): Use more-modern GCC flags.
11764 (signatures, %.asc): Remove.
11765 (rel-files, announcement): Remove signatures.
11766 Restore old updating code, even though we don't use it, so
11767 that we're the same as coreutils.
11768 (alpha, beta, major): Depend on news-date-check.
11769 Make the upload commands.
11770
11771 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
11772 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
11773 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
11774 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
11775 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
11776 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
11777 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
11778 * tests/sets.at: Likewise.
11779
11780 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
11781 we comment out the Autoconf version number.
11782 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
11783 it's error-prone and "make maintainer-distcheck" rejects it.
11784
11785 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
11786 Indent calls to "error" to pacify "make maintainer-distcheck",
11787 when the calls are not intended to be translated.
11788 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
11789
11790 * src/Makefile.am (DEFS): Use +=, to pacify
11791 "make maintainer-distcheck".
11792 (bison_SOURCES): Add scan-skel.h.
11793 (sc_tight_scope): New rule, from coreutils.
11794
11795 * src/files.c (src_extension, header_extension):
11796 Now static, not extern.
11797 * src/getargs.c (short_options): Likewise.
11798 * src/muscle_tab.c (muscle_table): Likewise.
11799 * src/parse-gram.y (current_class, current_type, current_prec):
11800 Likewise.
11801 * src/reader.c (grammar_end, previous_rule_end): Likewise.
11802 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
11803 * src/main.c (main): Cast bindtextdomain and textdomain calls to
11804 void, to avoid warning when NLS is disabled.
11805 * src/output.c: Include scan-skel.h.
11806 (scan_skel): Remove decl, since scan-skel.h does this.
11807 (output_skeleton):
11808 Indent calls to "error" to pacify "make maintainer-distcheck".
11809 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
11810 * src/reader.h (gram_end, gram_lineno): New decls to pacify
11811 "make maintainer-distcheck".
11812 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
11813 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
11814 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
11815 (skel_lex_destroy, scan_skel): Move these decls to...
11816 * src/scan-skel.h: New file.
11817 * src/uniqstr.c (uniqstr_assert):
11818 Indent calls to "error" to pacify "make maintainer-distcheck".
11819
11820 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
11821 not @VAR@.
11822
11823 * tests/torture.at: Revamp to avoid misuse of atoi that
11824 "make maintainer-distcheck" complained about.
11825
11826 * examples/extexi (message): Don't print a message more than once,
11827 and omit line-number decoration that makes Emacs compile think
11828 that informative messages are worth worrying about.
11829
11830 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
11831
11832 * configure.ac: Update version number.
11833
11834 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
11835 accidentally.
11836 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
11837 autogenerated by the maintainer.
11838 * examples/calc++/.cvsignore: Add *.yy.
11839
11840 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
11841 * lib/bitset_stats.c (bitset_stats_init): Likewise.
11842 * lib/bitsetv.c (bitsetv_alloc): Likewise.
11843
11844 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
11845
11846 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
11847 from maintainer-distcheck about casting the argument of 'free'.
11848
11849 * NEWS: Mention recent yytname changes.
11850 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
11851
11852 * bootstrap: For translations that have not yet been upgraded to
11853 the new runtime-po domain, prime the pump by extracting the
11854 relevant strings from the obsolete translations. This code can be
11855 removed once the bison-runtime domain has been translated by each
11856 team.
11857
11858 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
11859 now that token names are already quoted.
11860
11861 Fix problem reported by Anthony Heading.
11862 * data/glr.c (YYTOKEN_TABLE): New macro.
11863 (yytname): Define if YYTOKEN_TABLE.
11864 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
11865 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
11866 (YYERROR_VERBOSE): Define the same way the other skeletons do.
11867 * src/output.c (prepare_symbols): Output token_table_flag.
11868
11869 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
11870
11871 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
11872 again if the first call fails.
11873
11874 * data/glr.c (yytnamerr): New function.
11875 (yyreportSyntaxError): Use it to dequote most string literals.
11876 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
11877 with other skeletons. All uses changed.
11878 (yytnameerr_): New function.
11879 (yyreport_syntax_error): Use it to dequote most string literals.
11880 * data/yacc.c (yytnamerr): New function.
11881 (yyerrlab): Use it to decode most string literals.
11882 * doc/bison.texinfo (Decl Summary, Calling Convention):
11883 Clarify quoting convention of yytname.
11884 * src/output.c (prepare_symbols): Quote all names. This undoes
11885 the 2005-04-17 change, which is now accomplished (mostly) via
11886 changes in the parsers as described above.
11887 * tests/regression.at (Token definitions, Web2c Actions):
11888 Undo most 2005-04-17 change here, too.
11889
11890 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
11891
11892 Fix more problems reported by twlevo@xs4all.nl.
11893 * tests/cxx-type.at: Don't pipe output of ./types through sed to
11894 remove trailing spaces. This loses the exit status of ./types,
11895 and isn't needed since ./types shouldn't be emitting trailing
11896 spaces.
11897 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
11898 as the stack isn't valid in that case.
11899
11900 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
11901 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
11902 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
11903 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
11904 is used.
11905 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
11906 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
11907 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
11908 Likewise.
11909
11910 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
11911 overly-picky compilers that reject 'char *foo = "bar";'.
11912
11913 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
11914 to FILE * parameter, not to stderr. This fixes a typo introduced
11915 in the 2005-07-12 change.
11916
11917 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
11918 warnings from GCC 4.
11919
11920 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
11921 (yyglrShiftDefer, yysplitStack):
11922 Remove unused parameters b4_pure_formals. All uses changed.
11923 (yyglrShift): Remove unused parameters b4_user_formals.
11924 All uses changed.
11925 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
11926
11927 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
11928
11929 Destructor cleanups and regularization among the three skeletons.
11930 * NEWS: Document the behavior changes.
11931 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
11932 stack before failing, as the cleanup code will do it for us now.
11933 * data/lalr1.cc (yyerrlab): Likewise.
11934 * data/glr.c (yyparse): Pop everything off the stack before
11935 freeing it, so that destructors get called properly.
11936 * data/lalr1.cc (yyreturn): Likewise.
11937 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
11938 This is more consistent.
11939 * doc/bison.texinfo (Destructor Decl): Mention more reasons
11940 why destructors might be called. 1.875 -> 2.1.
11941 (Destructor Decl, Decl Summary, Table of Symbols):
11942 Some English-language cleanups for %destructor.
11943 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
11944 Add output line for destructor of start symbol.
11945 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
11946 because of that same extra output line.
11947
11948 * NEWS: Document minor wording changes in diagnostics of
11949 Bison-generated parsers.
11950 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
11951 Remove unused formals. All uses changed.
11952 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
11953 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
11954 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
11955 Rename yyoverflowab to yyexhaustedlab.
11956 When memory exhaustion occurs during syntax-error reporting,
11957 report it separately rather than in a single diagnostic; this
11958 eases translation.
11959 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
11960 (Memory Exhausted): Renamed from Parser Stack Overflow.
11961 Revamp wording slightly to prefer "memory exhaustion".
11962 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
11963
11964 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
11965
11966 Add i18n support to the GLR skeleton. Partially fix the C++
11967 skeleton; a C++ expert needs to finish this. Remove debugging
11968 msgids; there's little point to having them translated, since they
11969 can be understood only by someone who can read the
11970 (English-language) source code.
11971
11972 Generate runtime-po/bison-runtime.pot automatically, so that we
11973 don't have to worry about garbage getting in that file. We'll
11974 make sure after the next official release that old msgids don't
11975 get lost. See
11976 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
11977
11978 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
11979 Now auto-generated.
11980 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
11981 Fix typos in explanations of the runtime file.
11982 * bootstrap: Change gettext keyword from YYI18N to YY_.
11983 Use standard Makefile.in.in in runtime-po, since we'll arrange
11984 for backward-compatible bison-runtime.po files in a different way.
11985 * data/glr.c (YY_): New macro, from yacc.c.
11986 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
11987 Translate messages intended for users.
11988 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
11989 the wording in the other skeletons. We don't know that the memory
11990 is virtual.
11991 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
11992 Use same method that yacc.c uses.
11993 Don't translate debugging messages.
11994 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
11995 it doesn't work (yet), and requires C++ expertise to fix.
11996 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
11997 Move defn to a more logical place, to be consistent with other
11998 skeletons.
11999 Don't translate debugging messages.
12000 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
12001 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
12002 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
12003 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
12004
12005 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
12006 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
12007 void, not int.
12008 * tests/glr-regression.at (Badly Collapsed GLR States):
12009 Likewise.
12010 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
12011 yylex should return 0 at EOF rather than aborting.
12012
12013 Improve tests for stack overflow in GLR parser.
12014 Problem reported by twlevo@xs4all.nl.
12015 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
12016 All uses removed.
12017 (yyStackOverflow): Just longjmp, but with value 2 so that caller
12018 can handle the problem.
12019 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
12020 (yyparse): New local variable yyresult to record the result.
12021 Use result of setjmp to set it, rather than storing itinto
12022 struct.
12023 (yyDone): Remove label.
12024 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
12025 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
12026 if YYABORT is used).
12027 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
12028 yyparse status; put status > 1 into diagnostic.
12029 Check that status==2 works.
12030 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
12031 Use exit status 3 for failure to open (which shouldn't happen).
12032
12033 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
12034
12035 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
12036 1 on syntax error; just let yyparse do its thing.
12037 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
12038 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
12039 (Exploding the Stack Size with Alloca):
12040 (Exploding the Stack Size with Malloc):
12041 Expect exit status 2, not 1, since the parser is supposed to blow
12042 its stack. Problem reported by twlevo@xs4all.nl.
12043
12044 * data/glr.c (yyparse): Don't assume that the initial calls
12045 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
12046 Print a stack-overflow message and fail instead.
12047 Initialize the line-number information before creating the stack,
12048 so that the stack-overflow message can report line zero safely.
12049
12050 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
12051
12052 Fix problems reported by twlevo@xs4all.nl.
12053 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
12054 (yyuserMerge): Provide a default case if b4_mergers is empty.
12055 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
12056 * tests/glr-regression.at
12057 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
12058 Add casts to pacify C++ compilers.
12059 * tests/glr-regression.at (Improper merging of GLR delayed action
12060 sets): Declare yylex before using it.
12061 * tests/Makefile.am (maintainer-check-g++): Fix a stray
12062 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
12063 test for valgrind; valgrind is independent of g++.
12064 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
12065 for compatibility with POSIX 1003.1-2001 (if running coreutils).
12066 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
12067 Use a destructor, so that we can expand the stack. Change
12068 YYSTYPE to char * so that we can free it. Cast result of malloc.
12069
12070 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12071
12072 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
12073 a valgrind failure. Problem reported by twlevo@xs4all.nl.
12074
12075 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
12076
12077 * PACKAGING: New file, suggested by Bruno Haible and taken from
12078 similar wording in gettext's PACKAGING file.
12079 * NEWS: Mention PACKAGING.
12080 * Makefile.am (EXTRA_DIST): Add PACKAGING.
12081
12082 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
12083
12084 * NEWS: Document recent i18n improvements.
12085 * bootstrap: Get runtime translations into runtime-po.
12086 Create runtime-po files automatically, if possible.
12087 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
12088 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
12089 does not infringe on the user's name space.
12090 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
12091 * doc/bison.texinfo (Internationalization): Revamp the English
12092 and Texinfo syntax a bit, to try to make it clearer.
12093 (Bison Options, Option Cross Key): Mention --print-localedir.
12094 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
12095 YYENABLE_NLS. Quote a bit more.
12096 * runtime-po/.cvsignore: New file.
12097 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
12098 * runtime-po/Rules-quot: Remove; now created by bootstrap.
12099 * runtime-po/quot.sed: Likewise.
12100 * runtime-po/boldquot.sed: Likewise.
12101 * runtime-po/en@quot.header: Likewise.
12102 * runtime-po/en@boldquot.header: Likewise.
12103 * runtime-po/insert-header.sin: Likewise.
12104 * runtime-po/remove-potcdate.sin: Likewise.
12105 * runtime-po/Makevars: Likewise.
12106 * runtime-po/LINGUAS: Likewise.
12107 * runtime-po/de.po: Likewise; we will rely on the translation project
12108 to maintain this, so "bootstrap" should get it.
12109 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
12110 its value.
12111 * src/main.c (main): Bind the bison-runtime domain, too.
12112
12113 2005-07-12 Bruno Haible <bruno@clisp.org>
12114
12115 * data/yacc.c: Include <libintl.h> when NLS is enabled.
12116 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
12117 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
12118 * runtime-po: New directory.
12119 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
12120 $(DOMAIN).pot-update rule, so that old messages are never dropped.
12121 * runtime-po/Rules-quot: New file, copied from po/.
12122 * runtime-po/quot.sed: Likewise.
12123 * runtime-po/boldquot.sed: Likewise.
12124 * runtime-po/en@quot.header: Likewise.
12125 * runtime-po/en@boldquot.header: Likewise.
12126 * runtime-po/insert-header.sin: Likewise.
12127 * runtime-po/remove-potcdate.sin: Likewise.
12128 * runtime-po/Makevars: New file.
12129 * runtime-po/POTFILES.in: New file.
12130 * runtime-po/LINGUAS: New file.
12131 * runtime-po/bison-runtime.pot: New file.
12132 * runtime-po/de.po: New file.
12133 * m4/bison.m4: New file.
12134 * Makefile.am (SUBDIRS): Add runtime-po.
12135 (aclocaldir, aclocal_DATA): New variables.
12136 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
12137 Define aclocaldir.
12138 * src/getargs.c (usage): Document --print-localedir option.
12139 (PRINT_LOCALEDIR_OPTION): New enum item.
12140 (long_options): Add --print-localedir option.
12141 (getargs): Handle --print-localedir option.
12142 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
12143 (Internationalization): New section.
12144
12145 2005-07-12 Akim Demaille <akim@epita.fr>
12146
12147 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
12148 for consistency with the rest of the code.
12149 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
12150 Add separators.
12151
12152 2005-07-12 Akim Demaille <akim@epita.fr>
12153
12154 * src/parse-gram.y: Use %printer instead of YYPRINT.
12155
12156 2005-07-12 Akim Demaille <akim@epita.fr>
12157
12158 * src/symtab.h, src/symtab.c (symbol_print): New.
12159 * src/symlist.h, src/symlist.c (symbol_list_print): New.
12160 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
12161
12162 2005-07-12 Akim Demaille <akim@epita.fr>
12163
12164 * data/glr.c (b4_syncline): Fix (swap) the definitions of
12165 b4_at_dollar and b4_dollar_dollar.
12166
12167 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
12168
12169 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
12170 and Pennello's paper.
12171
12172 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
12173
12174 * data/yacc.c (yyparse): Undo previous patch. Instead,
12175 set yylsp[0] and yyvsp[0] only if the initial action
12176 sets yylloc and yylval, respectively.
12177
12178 * data/yacc.c (yyparse): In the initial action, set
12179 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
12180 This avoids the use of undefined variables if the initial
12181 action does not set yylloc and/or yylval.
12182
12183 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
12184
12185 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
12186 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
12187 Remove from CVS. These files are automatically generated.
12188 * examples/extexi: Clarify that this file is now part of Bison,
12189 not GNU M4, and that it works with any POSIX-compatible Awk.
12190 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
12191 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
12192 so that we also get calc++-parser.yy. Geneate it.
12193 Use $(AWK), not gawk, since any conforming Awk will do.
12194 Put comment before action, since older 'make' can't handle comment
12195 in action.
12196 $(BUILT_SOURCES): List all built sources, not just some of them.
12197 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
12198 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
12199 $($(calc_sources_generated)): Remove unnecessary test for existence
12200 of target. (This had a shell syntax error anyway; a stray "x".)
12201 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
12202 calc++-parser.yy.
12203 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
12204
12205 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
12206 implied by the other modules.
12207
12208 2005-07-06 Akim Demaille <akim@epita.fr>
12209
12210 Bind examples/calc++ to the package.
12211 * examples/calc++/Makefile: Remove, replaced by...
12212 * examples/calc++/Makefile.am: ... this new file.
12213 * examples/calc++/test: Remove input.
12214 * examples/calc++/compile: Remove.
12215 * examples/Makefile.am: New.
12216 * configure.ac, Makefile.am: Adjust.
12217 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
12218
12219 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
12220
12221 * data/glr.c (yyFail): Drastically simplify; since the format argument
12222 never had any % directives, we can simply pass it to yyerror.
12223 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
12224 be modified later, as that is the usual style in glr.c.
12225 Problems reported by Paul Hilfinger.
12226
12227 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
12228 and size overflow errors.
12229 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
12230 in case the user prolog sets feature-test macros like _GNU_SOURCE.
12231 (YYSIZEMAX): New macro.
12232 (yystpcpy): New function, taken from yacc.c.
12233 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
12234 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
12235 so that we don't have to maintain their signatures.
12236 (yyFail): Check for buffer overflow, by using vsnprintf rather
12237 than vsprintf. Allocate a bigger buffer if possible.
12238 Report an error if buffer allocation fails.
12239 (yyStackOverflow): New function.
12240 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
12241 the initialization was successful. It might fail if storage was
12242 exhausted.
12243 (yyexpandGLRStack): Add more checks for storage allocation failure.
12244 Use yyStackOverflow to report failures.
12245 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
12246 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
12247 Don't assume stack number fits in int.
12248 (yysplitStack): Check for storage allocation failure.
12249 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
12250 can print diagnostics on storage allocation failure. All callers
12251 changed.
12252 (yyresolveValue): Use yybool for boolean.
12253 (yyreportSyntaxError): Check for size-calculation overflow.
12254 This code is taken from yacc.c.
12255 (yyparse): Check for storage allocation errors when allocating
12256 the initial stack.
12257
12258 2005-07-05 Akim Demaille <akim@epita.fr>
12259
12260 Extract calc++ from the documentation.
12261 * doc/bison.texinfo (Calc++): Add the extraction marks.
12262 * examples/extexi: New, from the aborted GNU Programming 2E.
12263 Separate the different paragraph of a file with empty lines.
12264 * examples/Makefile: Use it to extract the whole calc++ example.
12265
12266 2005-06-24 Akim Demaille <akim@epita.fr>
12267
12268 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
12269 class typedefs.
12270
12271 2005-06-22 Akim Demaille <akim@epita.fr>
12272
12273 * doc/bison.texinfo (C++ Language Interface): First stab.
12274 (C++ Parsers): Remove.
12275
12276 2005-06-22 Akim Demaille <akim@epita.fr>
12277
12278 * data/lalr1.cc (yylex_): Honor %lex-param.
12279
12280 2005-06-22 Akim Demaille <akim@epita.fr>
12281
12282 Start a set of simple examples.
12283 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
12284 * examples/calc++/calc++-driver.hh,
12285 * examples/calc++/calc++-parser.yy,
12286 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
12287 * examples/calc++/compile, examples/calc++/test: New.
12288
12289 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
12290
12291 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
12292 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
12293 which stems from the 2005-05-27 patch.
12294
12295 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
12296
12297 * data/glr.c: Modify treatment of unused parameters to permit use
12298 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
12299
12300 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
12301
12302 Fix infringement on user name space reported by Janos Zoltan Szabo.
12303 * data/yacc.c (yyparse): strlen -> yystrlen.
12304
12305 2005-05-30 Akim Demaille <akim@epita.fr>
12306
12307 * data/lalr1.cc (_): New.
12308 Translate the various messages.
12309
12310 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
12311
12312 Fix infringement on user name space reported by Bruno Haible.
12313 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
12314 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
12315 the user's name space.
12316 (alloca): Include <stdlib.h> to get it, if it's not built in.
12317 (YYMALLOC, YYFREE): Define only if needed.
12318 (malloc, free): Declare, but only if needed, as this infringes on
12319 the user name space.
12320
12321 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
12322
12323 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
12324 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
12325 with %d format.
12326 * lib/ebitset.c (min, max): Undef before defining.
12327 * lib/vbitset.c (min, max): Likewise.
12328 * lib/subpipe.c (create_subpipe): Save local variables in case
12329 vfork clobbers them.
12330
12331 2005-05-24 Bruno Haible <bruno@clisp.org>
12332
12333 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
12334 error message syntax used by gcc-4.0.
12335
12336 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
12337
12338 * README: Mention m4 1.4.3. Remove obsolete advice about
12339 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
12340
12341 * bootstrap: Remove workaround for problem I encountered with
12342 gettext 0.14.1; it seems to be fixed now.
12343
12344 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
12345
12346 * NEWS: Version 2.0a.
12347
12348 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
12349 the previous change.
12350
12351 Various maintainer cleanups.
12352 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
12353 conftest*, for benefit of CVS commands run at the same time as
12354 "configure". Add build-aux, since "bootstrap" now creates it and
12355 its subfiles.
12356 * Makefile.cfg (move_if_change): Remove.
12357 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
12358 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
12359 (po_repo, do-po-update, po-update, wget_files, get-targets):
12360 (config.guess-url_prefix, config.sub-url_prefix):
12361 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
12362 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
12363 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
12364 Remove.
12365 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
12366 this is now the recommended name.
12367 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
12368 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
12369 ylwrap. These files now go into build-aux.
12370 * config/move-if-change: Remove.
12371 * config/prev-version.txt: Bump from 1.75 to 2.0.
12372
12373 * bootstrap: Add stdio-safer, unistd-safer modules.
12374 Remove m4/glibc2.m4 (introduced by latest gnulib, but
12375 we don't need it).
12376 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
12377 fopen-safer.c, stdio-safer.h, unistd-safer.h.
12378 * lib/subpipe.c: Include "unistd-safer.h".
12379 (create_subpipe): Make sure all the newly-created
12380 file descriptors are > 2, so that diagnostics don't
12381 get sent down them (which might cause Bison to hang, in theory).
12382 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
12383 * src/files.c (xfopen): Use fopen_safer, not fopen.
12384
12385 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
12386 yesterday's yacc.c fix.
12387
12388 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
12389
12390 * data/glr.c, data/lalr1.cc: Update copyright date.
12391
12392 Fix a destructor bug reported by Wolfgang Spraul in
12393 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
12394 * data/yacc.c (yyabortlab): Don't call destructor, and
12395 don't set yychar to EMPTY.
12396 (yyoverflowlab): Don't call destructor.
12397 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
12398 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
12399 since we no longer output the message "discarding lookahead token
12400 end of input ()".
12401
12402 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12403
12404 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
12405 fix a small glitch in debugging output.
12406 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
12407 after YY_SYMBOL_PRINT where needed.
12408
12409 (struct yyGLRState): Add some comments.
12410 (struct yySemanticOption): Add some comments.
12411 (union yyGLRStackItem): Add comment.
12412
12413 (yymergeOptionSets): Correct this to properly perform the union,
12414 avoiding infinite reported by Michael Rosien.
12415 Update comment.
12416
12417 * tests/glr-regression.at: Add test for GLR merging error reported
12418 by M. Rosien.
12419
12420 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
12421
12422 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
12423 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
12424 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
12425 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
12426 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
12427 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
12428 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
12429 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
12430 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
12431 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
12432 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
12433 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
12434 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
12435 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
12436 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
12437 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
12438 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
12439 src/derives.h, src/files.c, src/files.h, src/getargs.c,
12440 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
12441 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
12442 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
12443 src/output.h, src/parse-gram.c, src/parse-gram.h,
12444 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
12445 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
12446 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
12447 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
12448 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
12449 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
12450 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
12451 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
12452 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
12453 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
12454 tests/reduce.at, tests/regression.at, tests/sets.at,
12455 tests/synclines.at, tests/testsuite.at, tests/torture.at:
12456 Update FSF postal mail address.
12457
12458 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
12459
12460 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
12461 Problem reported by Ralf Menzel.
12462
12463 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
12464
12465 * tests/actions.at: Test that stack overflow invokes destructors.
12466 From Marcus Holland-Moritz.
12467 * data/yacc.c (yyerrlab): Move the code that destroys the stack
12468 from here....
12469 (yyreturn): to here. That way, destructors are called properly
12470 even if the stack overflows, or the user calls YYACCEPT or
12471 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
12472 (yyoverflowlab): Destroy the lookahead.
12473
12474 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
12475
12476 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
12477
12478 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
12479
12480 * NEWS: Bison-generated C parsers no longer quote literal strings
12481 associated with tokens.
12482 * src/output.c (prepare_symbols): Don't escape strings,
12483 since users don't want to see C escapes.
12484 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
12485 in diagnostics.
12486 * tests/input.at (Torturing the Scanner): Likewise.
12487 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
12488
12489 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
12490
12491 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
12492 the data size is known to be too small and we can't increase it.
12493 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
12494
12495 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
12496
12497 * src/parse-gram.y: Include quotearg.h.
12498 (string_as_id): Quote $1 before using it as a key, since the
12499 lexer no longer quotes it for us.
12500 (string_content): Don't strip quotes, since lexer no longer
12501 quotes it for us.
12502 * src/scan-gram.l: Include quotearg.h.
12503 ("\""): Omit quote.
12504 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
12505 a key, since the rest of the lexer doesn't quote it.
12506 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
12507 * tests/regression.at (Token definitions): Check for backslashes
12508 in token strings.
12509
12510 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
12511 (YYSIZE_T): Define to unsigned long int when using an older compiler.
12512 (yyparse): Revamp code to generate long syntax error message, to
12513 make it easier to translate, and to avoid problems with arithmetic
12514 overflow. Change "virtual memory" to "memory" in diagnostic, since
12515 we don't know whether the memory is virtual.
12516
12517 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
12518
12519 * NEWS: Bison-generated C parsers now use the _ macro to
12520 translate strings.
12521 * data/yacc.c (_) [!defined _]: New macro.
12522 All English strings wrapped inside this macro.
12523 * doc/bison.texinfo (Bison Parser): Document _.
12524 * po/POTFILES.in: Include src/parse-gram.c, since it now
12525 includes translateable strings that parse-gram.y doesn't.
12526
12527 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
12528
12529 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
12530 reverting the 2004-10-11 change to this function.
12531 (symbol_check_alias_consistency): Don't call symbol_type_set
12532 if the type name is already correct.
12533 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
12534
12535 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
12536
12537 * tests/regression.at (Token definitions): Don't use a token named
12538 c, as that generates a "#define c ..." that runs afoul of buggy
12539 stdlib.h that uses the identifier c as a member of struct
12540 drand48_data. Problem reported by Horst Wente.
12541
12542 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
12543
12544 * bootstrap: Change translation URL from
12545 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
12546 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
12547 redirection glitches. Problem reported by twlevo@xs4all.nl.
12548
12549 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
12550
12551 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
12552 after operands; POSIX says this isn't portable for the c99 command.
12553
12554 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
12555
12556 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
12557 immediately if a data overrun has occurred; this may help us track
12558 down what may be a spurious failure on MacOS.
12559
12560 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
12561
12562 Respond to problems reported by twlevo@xs4all.nl.
12563
12564 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
12565
12566 * src/vcg.h: Comment fix.
12567 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
12568 (G_CMAX): Change to -1 instead of INT_MAX.
12569
12570 * data/yacc.c (yyparse): Omit spaces before #line.
12571
12572 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
12573
12574 * src/tables.c (state_number_to_vector_number): Put it inside an
12575 "#if 0", since it's not currently used. Problem reported by
12576 Roland McGrath.
12577
12578 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
12579
12580 * src/output.c (escaped_output): Renamed from
12581 escaped_file_name_output, since we now use it for symbol tags as
12582 well. All uses changed.
12583 (symbol_destructors_output, symbol_printers_output):
12584 Escape symbol tags too.
12585 Problem reported by Matyas Forstner in
12586 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
12587
12588 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
12589 not needed.
12590 * src/output.c (user_actions_output, token_definitions_output,
12591 symbol_destructors_output, symbol_printers_output): Likewise.
12592 * src/reader.c (prologue_augment): Likewise.
12593 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
12594
12595 * src/vcg.c (output_edge): Don't quote linestyle arg.
12596 Problem reported by twlevo@xs4all.nl.
12597
12598 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
12599
12600 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
12601 example, reported by Derek M Jones. Also, make the example even
12602 more outrageous, to better illustrate how bad the problem is.
12603
12604 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
12605
12606 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
12607 putsym. Typo reported by Sebastian Piping.
12608
12609 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
12610
12611 * doc/bison.texinfo (Language and Grammar): some -> same
12612 (Epilogue): int he -> in the
12613 Typos reported by Sebastian Piping via Justin Pence.
12614
12615 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
12616
12617 * tests/glr-regression.at (Improper handling of embedded actions
12618 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
12619 embedded actions and $-N in GLR parsers", work around an Autoconf bug
12620 with dollar signs in test names.
12621 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
12622 for a similar reason.
12623
12624 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
12625
12626 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
12627 wants to redefine G_VIEW.
12628
12629 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
12630
12631 * src/vcg.c (get_view_str): Remove case for normal_view.
12632 Problem reported by twlevo@xs4all.nl.
12633
12634 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
12635
12636 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
12637 Problem reported by twlevo@xs4all.nl.
12638
12639 * doc/bison.texinfo: Change @dircategory from "GNU programming
12640 tools" to "Software development". Requested by Richard Stallman
12641 via Karl Berry.
12642
12643 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
12644
12645 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
12646 Problem reported by twlevo@xs4all.nl.
12647
12648 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
12649
12650 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
12651 keyword; it's not needed with modern compilers, and it doesn't
12652 affect correctness with older compilers. Suggested by
12653 twlevo@xs4all.nl.
12654
12655 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
12656
12657 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
12658 gcc -Wswitch-default.
12659 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
12660 * data/yacc.c (yyparse): Likewise.
12661
12662 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
12663
12664 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
12665 already. Let config.h define any nonstandard values.
12666
12667 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
12668
12669 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
12670 for the benefit of slower hosts. Problem reported by
12671 Nelson H. F. Beebe.
12672
12673 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
12674
12675 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
12676 being defined and not used.
12677 * data/lalr1.cc (yyparse): Likewise.
12678 Use "if (false)" rather than "if (0)".
12679
12680 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
12681
12682 * TODO: Mention that we should allow NUL bytes in tokens.
12683
12684 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
12685
12686 * src/scan-skel.l (<<EOF>>): Don't close standard output.
12687 Problem reported by Hans Aberg.
12688
12689 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
12690
12691 * src/getargs.c (version): Happy new year; update overall
12692 program copyright date from 2004 to 2005.
12693
12694 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
12695 Problem reported by Hans Aberg.
12696 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
12697 (Output file names.): Add a test for the case when standard output
12698 is closed.
12699
12700 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
12701
12702 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
12703 to fix an oversight in the Bison 2.0 manual.
12704
12705 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
12706
12707 * NEWS: Version 2.0. Reformat the existing news items since
12708 1.875, so that related items are grouped together.
12709 * configure.ac (AC_INIT): Bump version to 2.0.
12710 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
12711
12712 * tests/torture.at (Exploding the Stack Size with Alloca): Set
12713 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
12714 otherwise, we're not testing alloca. Unfortunately there's no
12715 simple way to consult HAVE_ALLOCA here.
12716
12717 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
12718 for yymsg, too.
12719
12720 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
12721 hand. This avoids a warning about comparing int to size_t when
12722 GCC warnings are enabled.
12723
12724 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
12725
12726 * NEWS: Bison-generated parsers no longer default to using the
12727 alloca function (when available) to extend the parser stack, due
12728 to widespread problems in unchecked stack-overflow detection.
12729 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
12730 responsibility to set it to a positive value. This lets the user
12731 specify a value that is not a preprocessor constant.
12732 * data/yacc.c (YYMAXDEPTH): Likewise.
12733 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
12734 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
12735 to be a compile-time constant. However, explain the constraints on it.
12736 Also, explain the constraints on YYINITDEPTH.
12737 (Table of Symbols): Explain that alloca is no longer the default.
12738 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
12739 to 1.
12740
12741 * doc/bison.texinfo (Location Default Action): Mention that n must
12742 be zero when k is zero. Suggested by Frank Heckenbach.
12743
12744 2004-12-22 Akim Demaille <akim@epita.fr>
12745
12746 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
12747 (parser::state_type, parser::semantic_type, parser::location_type):
12748 Private, not public.
12749 (parser::parse): Return ints, not bool.
12750 Returning a bool introduces a problem: 0 corresponds to false, and
12751 it seems weird to return false on success. Returning true changes
12752 the conventions for yyparse.
12753 Alternatively we could return void and send an exception.
12754 There is no clear consensus (yet?).
12755 (state_stack, semantic_stack, location_stack): Rename as...
12756 (state_stack_type, semantic_stack_type, location_stack_type): these.
12757 Private, not public.
12758 * tests/c++.at: New.
12759 * tests/testsuite.at, tests/Makefile.am: Adjust.
12760
12761 2004-12-21 Akim Demaille <akim@epita.fr>
12762
12763 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
12764
12765 2004-12-21 Akim Demaille <akim@epita.fr>
12766
12767 Don't impose std::string for filenames.
12768
12769 * data/lalr1.cc (b4_filename_type): New.
12770 (position::filename): Use it.
12771 (parser.hh): Move the inclusion of stack.hh and location.hh below
12772 the user code, so that needed headers for the filename type can be
12773 included first.
12774 Forward declare them before the user code.
12775 * tests/Makefile.am (check-local, installcheck-local): Pass
12776 TESTSUITEFLAGS to the TESTSUITE.
12777
12778 2004-12-20 Akim Demaille <akim@epita.fr>
12779
12780 Use more STL like names: my_class instead of MyClass.
12781
12782 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
12783 (SemanticStack, SemanticType, StateStack, StateType)
12784 (TokenNumberType, Stack, Slice, Traits, Parser::location)
12785 (Parser::value): Rename as...
12786 (location_stack, location_type, rhs_number_type, semantic_stack)
12787 (semantic_type, state_stack, state_type, token_number_type, stack)
12788 (slice, traits, parser::yylloc, parser::yylval): these.
12789
12790 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
12791
12792 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
12793
12794 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
12795 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
12796
12797 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
12798
12799 Remove uses of 'short int' and 'unsigned short int'. This raises
12800 some arbitrary limits. It uses more memory but nowadays that's
12801 not much of an issue.
12802
12803 This change does not affect the generated parsers; that's a different
12804 task, as some users will want to conserve memory there.
12805
12806 Ideally we should use size_t to represent all object counts, and
12807 something like ptrdiff_t to represent signed differences of object
12808 counts; but that will require more code-cleanup than I have the
12809 time to do right now.
12810
12811 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
12812 Use size_t, not int or short int, to count objects.
12813 * src/closure.c (nritemset, closure): Likewise.
12814 * src/closure.h (nritemset, closure): Likewise.
12815 * src/nullable.c (nullable_compute): Likewise.
12816 * src/print.c (print_core): Likewise.
12817 * src/print_graph.c (print_core): Likewise.
12818 * src/state.c (state_compare, state_hash): Likewise.
12819 * src/state.h (struct state): Likewise.
12820 * src/tables.c (default_goto, goto_actions): Likewise.
12821
12822 * src/gram.h (rule_number, rule): Use int, not short int.
12823 * src/output.c (prepare_rules): Likewise.
12824 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
12825 errs, reductions): Likewise.
12826 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
12827 Likewise.
12828 * src/tables.c (vector_number, tally, action_number,
12829 ACTION_NUMBER_MINIMUM): Likewise.
12830 * src/output.c (muscle_insert_short_int_table): Remove.
12831
12832 2004-12-17 Akim Demaille <akim@epita.fr>
12833
12834 * data/lalr1.cc: Extensive Doxygenation.
12835 (error_): Rename as...
12836 (error): this, since it is visible to the user.
12837 Adjust callers.
12838 (Parser::message): Now an automatic variable from...
12839 (Parser::yyreport_syntax_error_): here.
12840 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
12841 Parser::error.
12842 * tests/input.at: Escape $.
12843
12844 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
12845
12846 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
12847 Parenthesize rhs to avoid obscure problems with mistakes like
12848 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
12849 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
12850 b4_rhs_location): Likewise.
12851 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
12852 b4_rhs_location): Likewise.
12853
12854 2004-12-16 Akim Demaille <akim@epita.fr>
12855
12856 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
12857 yacc.c: be sure to stay within yycheck_.
12858 * tests/actions.at: Re-enable C++ tests.
12859
12860 2004-12-16 Akim Demaille <akim@epita.fr>
12861
12862 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
12863 real.
12864
12865 2004-12-16 Akim Demaille <akim@epita.fr>
12866
12867 Use #define to handle the %name-prefix.
12868
12869 * data/glr.c, data/yacc.c: Comment changes.
12870 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
12871 so that one can refer to yylex in the parser file, and have it
12872 renamed, as is the case with other skeletons.
12873
12874 2004-12-16 Akim Demaille <akim@epita.fr>
12875
12876 Move lalr1.cc internals into yy*.
12877
12878 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
12879 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
12880 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
12881 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
12882 (empty_, final_, terror_, errcode_, ntokens_)
12883 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
12884 (looka_, ilooka_, error_range_, nerrs_):
12885 Rename as...
12886 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
12887 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
12888 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
12889 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
12890 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
12891 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
12892 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
12893 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
12894 these.
12895
12896 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
12897
12898 Fix some problems reported by twlevo at xs4all.
12899 * src/symtab.c (symbol_new): Report an error if the input grammar
12900 contains too many symbols. This is better than calling abort() later.
12901 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
12902 (struct node, struct graph):
12903 Rename member expand to stretch. All uses changed.
12904 (struct graph): Remove member layoutalgorithm. All uses removed.
12905 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
12906 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
12907 All uses changed.
12908 (N_STRETCH): Rename from N_EXPAND. All uses changed.
12909
12910 2004-12-15 Akim Demaille <akim@epita.fr>
12911
12912 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
12913 Add more Doxygen comments.
12914 (symprint_, stack_print_, reduce_print_, destruct_, pop)
12915 (report_syntax_error_, translate_): Rename as...
12916 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
12917 (yypop_, yyreport_syntax_error_, yytranslate_): this.
12918
12919 2004-12-15 Akim Demaille <akim@epita.fr>
12920
12921 * data/lalr1.cc (lex_): Rename as...
12922 (yylex_): this.
12923 Move the trace here.
12924 Take the %name-prefix into account.
12925 Reported by Alexandre Duret-Lutz.
12926
12927 2004-12-15 Akim Demaille <akim@epita.fr>
12928
12929 Simplify the C++ parser constructor.
12930
12931 * data/lalr1.cc (debug_): Rename as...
12932 (yydebug_): so that the parser's internals are always in the yy*
12933 pseudo namespace.
12934 Adjust uses.
12935 (b4_parse_param_decl): Remove the leading comma as it is now only
12936 called as unique argument list.
12937 (Parser::Parser): Remove the constructor accepting a location and
12938 an initial debugging level.
12939 Remove from the other ctor the argument for the debugging level.
12940 (debug_level_type, debug_level, set_debug_level): New.
12941
12942 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
12943 constructor calls.
12944
12945 2004-12-15 Akim Demaille <akim@epita.fr>
12946
12947 Remove b4_root related material: failure experiment
12948 (which goal was to allow to derive from a class).
12949
12950 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
12951 definitions and uses.
12952
12953 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
12954
12955 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
12956 not 2, since it's not portable to subtract 1 from the start of an
12957 array. The new item 0 is never set or used. All uses changed.
12958
12959 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
12960 the default definition of YYLLOC_DEFAULT. Problem reported
12961 by Frank Heckenbach.
12962
12963 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
12964
12965 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
12966 the normal case and one for the error case. Just use the
12967 first one uniformly. Problem reported by Frank Heckenbach.
12968 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
12969 use exactly the same macro in both places.
12970 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
12971 so that the normal-case YYRHSLOC works for the error case too.
12972 All uses changed.
12973 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
12974 (YYLLOC_DEFAULT): Use the same macro as glr.c.
12975 * doc/bison.texinfo (Location Default Action): Don't claim that
12976 we have an array of locations. Use the same macro for both glr
12977 and lalr parsers. Mention YYRHSLOC. Mention what happens when
12978 the index is 0.
12979
12980 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
12981
12982 * HACKING: Update email addresses to send announcements to.
12983
12984 * configure.ac (AC_INIT): Bump version to 1.875f.
12985
12986 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
12987
12988 * NEWS: Version 1.875e.
12989 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
12990
12991 * src/scan-skel.l: Include "complain.h", for "fatal".
12992
12993 * src/relation.h (relation_print, relation_digraph):
12994 Relation sizes are of type relation_node, not size_t (this is
12995 merely a doc fix, since the two types are equivalent).
12996 (relation_transpose): Relation sizes are of type relation_node,
12997 not int.
12998 * src/relation.c: Likewise.
12999 (top, infinity): Now of type relation_node, not int.
13000 (traverse, relation_transpose): Use relation_node, not int.
13001
13002 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
13003 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
13004 (yyparse): Remove unused local introduced in 2004-10-25 patch.
13005
13006 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
13007 specifying whether the test should be skipped. Use it tp
13008 specify that the [%defines %skeleton "lalr1.cc"] tests currently
13009 fail on some hosts, and should be skipped.
13010
13011 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
13012
13013 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
13014 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
13015 unless otherwise specified below.
13016
13017 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
13018 to allocate kernel_base, kernel_items, kernel_size, since
13019 they needn't be initialized to 0.
13020 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
13021 * src/closure.c (new_closure): Likewise, for itemset.
13022 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
13023 * src/lalr.c (set_goto_map): Likewise, for temp_map.
13024 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
13025 (build_relations): Likewise for edge, states1, includes.
13026 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
13027 * src/reader.c (packgram): Likewise, for ritem, rules.
13028 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
13029 * src/relation.c (relation_digraph): Likewise for VERTICES.
13030 (relation_transpose): Likewise for new_R, end_R.
13031 * src/symtab.c (symbols_token_translations_init): Likewise for
13032 token_translations.
13033 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
13034 (token_actions): Likewise for yydefact, actrow, conflrow,
13035 conflict_list.
13036 (save_column): Likewise for froms[symno], tos[symno].
13037 (goto_actions): Likewise for state_count.
13038 (pack_table): Likewise for base, pos, check.
13039 (tables_generate): Likewise for width.
13040
13041 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
13042 for initial core. Just have a separate core, so we needn't worry
13043 about whether kernel_size and kernel_base are initialized.
13044
13045 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
13046 kernel_size, kernel_items): Remove unnecessary initialization.
13047 * src/conflicts.c (conflicts): Likewise.
13048 * src/derives.c (derives): Likewise.
13049 * src/muscle_tablc (muscle_insert): Likewise.
13050 * src/relation.c (relation_digraph): Likewise.
13051 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
13052 conflrow, conflict_table, conflict_list, table, check):
13053 Likewise.
13054
13055 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
13056 This is because all callers pass unsigned int.
13057 * src/closure.h (new_closure): Likewise.
13058
13059 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
13060 (build_relations): Initialize includes[i] in all cases.
13061 * src/reader.c (packgram): Always initialize rules[ruleno].prec
13062 and rules[ruleno].precsym. Initialize members in order.
13063 * src/relation.c (relation_transpose): Always initialize new_R[i]
13064 and end_R[i].
13065 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
13066
13067 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
13068 conflict_list[0] was always 0, but now it isn't initialized.
13069
13070 * src/table.c (table_grow): When conflict_table grew, the grown
13071 area wasn't cleared. Fix this.
13072
13073 * lib/.cvsignore: Add strdup.c, strdup.h.
13074 * m4/.cvsignore: Add strdup.m4.
13075
13076 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
13077
13078 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
13079 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
13080 GOTO_NUMBER_MAXIMUM, since we occasionally compute
13081 ngotos + 1 without checking for overflow.
13082 (build_relations): Use END_NODE, not -1, to denote end of edges.
13083 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
13084 build_relations): Use goto_number, not int, for goto numbers.
13085 * src/tables.c (save_column, default_goto): Likewise.
13086
13087 2004-11-23 Akim Demaille <akim@epita.fr>
13088
13089 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
13090 of #defining from yystype.
13091 Don't typedef yystype, C++ does not need it.
13092 This lets it possible to forward declare it as union.
13093
13094 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
13095
13096 * bootstrap (gnulib_modules): Add extensions.
13097 Problem reported by Jim Meyering.
13098
13099 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
13100
13101 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
13102 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
13103 src/system.h, src/tables.c: XFREE -> free, to accommodate
13104 recent change to gnulib xalloc.h.
13105 Problem reported by Jim Meyering.
13106
13107 2004-11-17 Akim Demaille <akim@epita.fr>
13108
13109 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
13110
13111 2004-11-17 Akim Demaille <akim@epita.fr>,
13112 Alexandre Duret-Lutz <adl@gnu.org>
13113
13114 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
13115 changes.
13116 (YYCDEBUG): Adjust.
13117 Use it instead of cdebug_.
13118 (Parser::debug_stream, Parser::set_debug_stream): New.
13119 (Parser::symprint_): Define cdebug_ for temporary backward
13120 compatibility.
13121 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
13122 debug_stream ().
13123
13124 2004-11-17 Akim Demaille <akim@epita.fr>
13125
13126 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
13127 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
13128 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
13129 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
13130
13131 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
13132
13133 * data/glr.c (yyloc_default): Remove; not used.
13134 Problem reported by Frank Heckenbach.
13135
13136 2004-10-25 Akim Demaille <akim@epita.fr>
13137
13138 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
13139 Introduce another definition to address simple location arrays.
13140 (yyGLRStack): New member: yyerror_range.
13141 (yyrecoverSyntaxError, yyparse): Update it.
13142 (yyrecoverSyntaxError): Use it when shifting the error token to
13143 have an accurate range, equivalent to the one computed by both
13144 yacc.c and lalr1.cc.
13145 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
13146 that column numbers start at column 0, as per GNU Coding
13147 Standards, the others tests, and the doc.
13148 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
13149 Adjust to the above change (first column is 0).
13150 And adjust the location of the "<error>", now covering the whole
13151 line.
13152
13153 2004-10-22 Akim Demaille <akim@epita.fr>
13154 and Paul Eggert <eggert@cs.ucla.edu>
13155
13156 Remove some arbitrary limits on goto numbers and relations.
13157 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
13158 initial values, since they're never used.
13159 (set_goto_map): ngotos is now unsigned, so test for overflow
13160 by seeing whether it wraps around to zero.
13161 * src/lalr.h (goto_number): Now size_t, not short int.
13162 (GOTO_NUMBER_MAXIMUM): Remove.
13163 * src/relation.c (relation_print, traverse, relation_transpose):
13164 Check for END_NODE rather than looking at sign.
13165 * src/relation.h (END_NODE): New macro.
13166 (relation_node): Now size_t, not short int.
13167
13168 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
13169
13170 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
13171 keyword, not an identifier. Problem reported by Baron Schwartz in
13172 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
13173
13174 2004-10-11 Akim Demaille <akim@epita.fr>
13175
13176 * src/symtab.c (symbol_check_alias_consistency): Also check
13177 type names, destructors, and printers.
13178 Reported by Alexandre Duret-Lutz.
13179 Recode the handling of associativity and precedence in terms
13180 of symbol_precedence_set.
13181 Accept no redeclaration at all, not even equal to the previous
13182 value.
13183 (redeclaration): New.
13184 Use it to factor redeclaration complaints.
13185 (symbol_make_alias): Don't set the type of the alias, let
13186 symbol_check_alias_consistency do it as for other features.
13187 * src/symtab.h (symbol): Add new member prec_location, and
13188 type_location.
13189 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
13190 * tests/input.at (Incompatible Aliases): New.
13191
13192 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
13193
13194 .cvsignore fixes to accommodate gnulib changes,
13195 and the practice of naming build directories "_build".
13196 * .cvsignore: Add "_*". Sort.
13197 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
13198 * m4/.cvsignore: Add "*_gl.m4".
13199
13200 2004-10-06 Akim Demaille <akim@epita.fr>
13201
13202 * src/parse-gram.y (add_param): Fix the truncation of trailing
13203 spaces.
13204
13205 2004-10-05 Akim Demaille <akim@epita.fr>
13206
13207 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
13208 whether the reducion was empty or not. This leaves room to
13209 improve the use of YYLLOC_DEFAULT in such a case.
13210 lalr1.cc is still experimental, so changing this is acceptable.
13211 And finally, there are probably not many users who changed the
13212 handling of locations in GLR, so changing is admissible too.
13213
13214 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
13215 empty reduction, set @$ to an empty location ending the previously
13216 stacked symbol.
13217 Adjust uses to make sure the code is triggered on empty
13218 reductions.
13219 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
13220 expected output: empty reductions have empty locations.
13221
13222 2004-09-29 Akim Demaille <akim@epita.fr>
13223
13224 * data/lalr1.cc: Move towards a more standard C++ coding style
13225 for templates: Class < T > -> Class<T>.
13226
13227 2004-09-29 Akim Demaille <akim@epita.fr>
13228
13229 * data/lalr1.cc: Reinstall the former ctor, for sake of
13230 compatibility, but warn it will be removed.
13231 Move towards a more standard C++ coding style (i.e., type *var ->
13232 type* var).
13233
13234 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
13235
13236 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
13237 since it's less likely to work if NULs are involved in the future.
13238
13239 2004-09-27 Akim Demaille <akim@epita.fr>
13240
13241 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
13242
13243 2004-09-27 Akim Demaille <akim@epita.fr>
13244
13245 * data/lalr1.cc (b4_parse_param_decl_1): New.
13246 (b4_parse_param_decl): Use it to have different names between attribute
13247 and argument names.
13248 (b4_cc_constructor_call): Likewise.
13249
13250 2004-09-24 Akim Demaille <akim@epita.fr>
13251
13252 * src/parse-gram.y (add_param): Strip the leading and trailing
13253 blanks from a formal argument declaration.
13254 (YY_LOCATION_PRINT): New.
13255
13256 2004-09-24 Akim Demaille <akim@epita.fr>
13257
13258 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
13259 after the location.
13260
13261 2004-09-24 Akim Demaille <akim@epita.fr>
13262
13263 * doc/bison.texinfo (Table of Symbols): Sort.
13264
13265 2004-09-21 Akim Demaille <akim@epita.fr>
13266
13267 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
13268 the useless parentheses.
13269 Suggested by Paul Eggert.
13270
13271 2004-09-20 Akim Demaille <akim@epita.fr>
13272
13273 Let the initial-action act on the look-ahead, and use it for the
13274 "initial push" (corresponding to an hypothetical beginning-of-file).
13275 And let lalr1.cc honor %initial-action.
13276
13277 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
13278 example.
13279 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
13280 (Parser::Parser): Remove the ctor that used to initialize it.
13281 (Parser::parse): Like in the other skeletons, issue the "starting
13282 parse" message before any action.
13283 Honor %initial-action.
13284 Initialize the stacks with the lookahead.
13285 * data/yacc.c: Let $$ and @$ in %initial-action designate the
13286 look-ahead.
13287 Push them in the stacks.
13288 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
13289
13290 2004-09-20 Akim Demaille <akim@epita.fr>
13291
13292 * doc/bison.texinfo (Initial Action Decl): New.
13293
13294 2004-09-20 Akim Demaille <akim@epita.fr>
13295
13296 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
13297 clearer criterion to define it.
13298 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
13299 When reducing on an empty RHS, use the latest stacked location as
13300 location.
13301 yylloc is not always available.
13302 * data/glr.c: Likewise.
13303 Also, honor initial-actions.
13304
13305 2004-09-20 Akim Demaille <akim@epita.fr>
13306
13307 * data/yacc.c (YY_LOCATION_PRINT): New.
13308 Define when we know YYLTYPE's structure, i.e., when the default
13309 YYLLOC_DEFAULT is used.
13310 * data/c.m4 (b4_yysymprint_generate): Use it.
13311 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
13312 value of the result.
13313 (error_start_): Replace with...
13314 (error_range_): this location array.
13315 This allows to replace code relying on the implementation of
13316 locations by portable code.
13317 * data/yacc.c (yylerrsp): Replace with...
13318 (yyerror_range): this.
13319 Every time a token is popped, update yyerror_range[0], to have an
13320 accurate location for the error token.
13321 * data/glr.c (YY_LOCATION_PRINT): New.
13322 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
13323 deference a pointer.
13324 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
13325 report the location in %printers.
13326
13327 * src/scan-skel.l: Instead of abort, report error messages to ease
13328 understanding skeleton scanning failures.
13329
13330 2004-09-16 Akim Demaille <akim@epita.fr>
13331
13332 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
13333 (iterator, const_iterator): these, to be more in the C++ spirit.
13334 Also, return reverse iterators so that when displaying the stack
13335 we display its bottom first.
13336 (Parser::stack_print_, Parser::reduce_print_): Match the messages
13337 from yacc.c.
13338 We should probably use vector here though.
13339
13340 2004-09-16 Akim Demaille <akim@epita.fr>
13341
13342 Have more complete shift traces.
13343
13344 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
13345 to report Shifts instead of ad hoc YYDPRINTF invocations,
13346 including for the error token.
13347 * data/lalr1.cc (symprint_): Output the location.
13348 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
13349 output the location within the %printer.
13350 Activate GLR tests, at least to make sure they compile properly.
13351 They still don't pass though.
13352 * tests/calc.at: Adjust expect verbose output, since now "Entering
13353 state..." is on a different line than the "Shifting" message.
13354
13355 2004-09-08 Akim Demaille <akim@epita.fr>
13356
13357 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
13358 Bison directive from the Bison file to the invocation of this
13359 macro, so that these directives are passed to
13360 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
13361 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
13362 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
13363 the extra Bison directives instead of the whole series.
13364 Change the grammar so that there are recoverable errors, and
13365 unrecoverable errors. Now we can have the parser give up before
13366 consuming the whole input. As a result we now can observe that
13367 the lookahead is freed when needed.
13368 Change the parser source to parse argv[1] instead of a hard coded
13369 string.
13370 Simplify yylex, and give a value and location to EOF.
13371 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
13372 passed directives already coded in the file.
13373 Add some tests to check the location of "error".
13374 For some tests, the C++ parser is correct, and not yacc.c.
13375 For other tests, they provide different, but unsatisfying, values,
13376 so keep the C++ value so that at least one parser is "correct"
13377 according to the test suite.
13378 (Actions after errors): Remove, this is subsumed by the
13379 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
13380
13381 2004-09-06 Akim Demaille <akim@epita.fr>
13382
13383 * data/lalr1.cc: Adjust the indentation of the labels.
13384 (Parser::pop): New.
13385 Use it.
13386
13387 2004-09-06 Akim Demaille <akim@epita.fr>
13388
13389 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
13390 argument, an informative message.
13391 Call YY_SYMBOL_PRINT.
13392 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
13393 * data/lalr1.cc (destruct_): Likewise.
13394 In addition, no longer depend on b4_yysymprint_generate and
13395 b4_yydestruct_generate to generate these functions, do it "by
13396 hand".
13397
13398 2004-09-03 Akim Demaille <akim@epita.fr>
13399
13400 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
13401 invoked, yydestruct the lookahead.
13402 * tests/calc.at (Calculator $1): Update the expected lengths of
13403 traces: there is an added line for the discarded lookahead.
13404 * doc/bison.texinfo (Destructor Decl): Some rewording.
13405 Define "discarded" symbols.
13406
13407 2004-09-02 Akim Demaille <akim@epita.fr>
13408
13409 * data/lalr1.cc (translate_, destruct_): No reason to be static.
13410
13411 2004-09-02 Akim Demaille <akim@epita.fr>
13412
13413 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
13414 (YYDSYMPRINTF): Rename as...
13415 (YY_SYMBOL_PRINT): this.
13416 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
13417 two.
13418 Use it instead of direct symprint_ calls.
13419 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
13420 one.
13421
13422 2004-09-02 Akim Demaille <akim@epita.fr>
13423
13424 * data/lalr1.cc (b4_yysymprint_generate): New.
13425 (symprint_): New member function, defined when YYDEBUG.
13426 Use it consistently instead of token/nterm debugging output by
13427 hand.
13428 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
13429 %printer calls to use cdebug_ when using lalr1.cc.
13430
13431 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
13432
13433 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
13434 with #ifdef YYDEBUG.
13435
13436 2004-08-26 Akim Demaille <akim@epita.fr>
13437
13438 * doc/bison.texinfo (Implementing Loops): Rename as...
13439 (Implementing Gotos/Loops): this.
13440
13441 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
13442
13443 Adjust to latest gnulib.
13444 * bootstrap (gnulib_modules): Add xalloc-die.
13445 Set LC_ALL=C so that file names sort consistently.
13446 Prefer the gnulib copies of gettext.m4, glibc21.m4,
13447 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
13448 uintmax_t.m4, ulonglong.m4.
13449 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
13450 po.m4 since we are now using _gl.m4 instead.
13451
13452 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
13453
13454 * src/scan-action.l: Remove. Scanning of semantic actions is
13455 handled in scan-gram.l.
13456
13457 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
13458
13459 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
13460
13461 * src/location.h (struct): The file member is a uniqstr.
13462 (equal_boundaries): Use UNIQSTR_EQ for comparison.
13463
13464 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
13465
13466 Fix bug with non-%union parsers that have printers or destructors,
13467 which led to a Bison core dump. Reported by Peter Fales in
13468 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
13469
13470 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
13471 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
13472 not to our own type.
13473 * src/output.c (symbol_destructors_output, symbol_printers_output):
13474 Don't assume %union.
13475 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
13476 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
13477 UNION-FLAG. All callers changed.
13478 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
13479 Use type char, not unsigned int, when declaring an array of char;
13480 this lets us remove a cast.
13481 (Printers and Destructors): Add non-%union test cases.
13482
13483 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
13484
13485 * doc/bison.texinfo: Minor editorial changes, mostly to the new
13486 GLR writeups. E.g., avoid frenchspacing and the future tense,
13487 change "lookahead" to "look-ahead", and change "wrt" to "with
13488 respect to".
13489
13490 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
13491
13492 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
13493 New sections, split off from the GLR Parsers section. Put the new
13494 Simple GLR Parser near the start of the GLR section, for clarity.
13495 Rewrite connective text.
13496
13497 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
13498
13499 * doc/bison.texinfo (Simple GLR Parsers): New section.
13500
13501 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
13502
13503 * NEWS, TODO, doc/bison.texinfo:
13504 Use "look-ahead" instead of "lookahead", to be consistent.
13505 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
13506 while we're fixing "look-ahead".
13507 * src/conflicts.c (shift_set): Renamed from shiftset.
13508 (look_ahead_set): Renamed from lookaheadset.
13509 * src/print.c: Likewise.
13510 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
13511 name for "lookahead".
13512 (report_types, usage): Likewise.
13513 * src/getargs.h (report_look_ahead_tokens): Renamed from
13514 report_lookaheads.
13515 * src/lalr.c (compute_look_ahead_tokens): Renamed from
13516 compute_lookaheads.
13517 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
13518 (look_ahead_tokens_print): Renamed from lookaheads_print.
13519 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
13520 state_rule_lookaheads_print.
13521 * src/state.h: Likewise.
13522 (reductions.look_ahead_tokens): Renamed from lookaheads.
13523 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
13524 AT_DATA_LOOKAHEADS_GRAMMAR.
13525
13526 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
13527
13528 * README: Update location of patched M4 distribution.
13529
13530 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
13531
13532 Don't assume the C++ compiler takes the same arguments as the C compiler
13533 (trivial change).
13534 * configure.ac (O0CXXFLAGS): New var.
13535 * tests/atlocal.in (CXXFLAGS): Use it.
13536
13537 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
13538
13539 Fix some "make check" problems with C++ reported by
13540 Albert Chin-A-Young for Tru64 C++ in this thread:
13541 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
13542
13543 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
13544 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
13545 Output to a .cc file for C++, not to a .c file.
13546 * tests/calc.at (AT_CHECK_CALC): Likewise.
13547 * tests/regression.at (AT_CHECK_DANCER): Likewise.
13548 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
13549
13550 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
13551
13552 * tests/calc.at, tests/actions.at: Workaround for SGI
13553 C++ compiler. (trivial change)
13554
13555 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
13556
13557 Spent a few hours checking out which prerequisite versions the
13558 current sources actually require. I went all the way back to
13559 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
13560 a seemingly endless set of combinations of versions more recent
13561 than that. The bottom line is that the current sources require
13562 fairly recent versions of the build tools, and it'll be some work
13563 to change this.
13564 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
13565 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
13566 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
13567 Add comments explaining why those particular versions are
13568 currently needed.
13569
13570 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
13571 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
13572 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
13573
13574 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
13575 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
13576
13577 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
13578
13579 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
13580 0.11.5. Suggested by Bruno Haible.
13581 * bootstrap: Remove gettext version checking.
13582
13583 * doc/bison.texinfo (Decl Summary): Also mention that %union
13584 can depend on prerequisite types. Problem reported by Tim
13585 Van Holder.
13586
13587 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
13588
13589 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
13590 * README-alpha: Don't tell people not to package this.
13591
13592 * bootstrap: Don't assume $(...) works; use `...` instead.
13593 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
13594 gettext better.
13595
13596 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
13597 put into the -d output file, and mention what to do if YYSTYPE is
13598 defined as a macro.
13599
13600 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
13601
13602 Undo change made earlier today: it caused autopoint to not bring
13603 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
13604 autopoint's.
13605
13606 * bootstrap: Check that gettext version matches what's in
13607 configure.ac. Warn users to ignore robots.txt ERROR 404.
13608 * bootstrap: Undo today's earlier change (logged below).
13609 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
13610
13611 The gettext version checking is causing more trouble than it's
13612 curing; remove it. Problem reported by Paul Hilfinger.
13613
13614 * bootstrap: Issue a warning that one can expect a message
13615 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
13616 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
13617
13618 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
13619
13620 Ensure that the C++ compiler used for testing actually works on a
13621 simple test program; if not, skip the C++-related tests. Problem
13622 reported by Vin Shelton in:
13623 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
13624
13625 * m4/cxx.m4: New file.
13626 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
13627 * tests/atlocal.in (BISON_CXX_WORKS): Add.
13628 * tests/local.at (AT_COMPILE_CXX): Use it.
13629
13630 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
13631
13632 * data/glr.c (yylloc): Output this macro even if locations are not
13633 being generated, as the GLR parser needs it even in that case.
13634 Problem reported by Troy A. Johnson
13635 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
13636
13637 * configure.ac (AC_INIT): Update to 1.875e.
13638
13639 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
13640
13641 * NEWS: Version 1.875d.
13642 * configure.ac (AC_INIT): Likewise.
13643 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
13644
13645 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
13646 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
13647 lalr1.cc runs afoul of the first, and the last two are no longer
13648 supported by GCC 3.4.0.
13649 * README: Mention GNU m4 1.4 or later; mention m4 patches.
13650 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
13651
13652 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
13653
13654 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
13655 unsigned int, for compatibility with latest gnulib hash module.
13656 * src/state.c (state_hash, state_hasher): Likewise.
13657 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
13658 * src/uniqstr.c (hash_uniqstr): Likewise.
13659
13660 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
13661
13662 * NEWS: Unescaped newlines are no longer allowed in char & strings.
13663
13664 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
13665 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
13666 character and string literals.
13667 (unexpected_end): New function.
13668 (unexpected_eof): Use it.
13669 (unexpected_newline): New function.
13670 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
13671 actions.
13672
13673 * NEWS: Document %expect-rr.
13674
13675 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
13676 Fix typo by replacing $1 with $option.
13677 Remove more 'intl'-related files.
13678 Don't DEFUN AM_INTL_SUBDIR twice.
13679
13680 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
13681 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
13682 strtoul.c.
13683 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
13684 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
13685 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
13686 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
13687 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
13688 * src/.cvsignore: Add *.output.
13689
13690 * src/parse-gram.y: Put copyright notice inside %{ %} so it
13691 gets copied to the output file.
13692
13693 2004-04-28 Paul Eggert <eggert@twinsun.com>
13694
13695 Get files from the gnulib and po repositories, instead of relying
13696 on them being in our CVS. Upgrade to latest versions of gnulib
13697 and Automake.
13698
13699 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
13700 * bootstrap: Bootstrap from gnulib and po repositories.
13701 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
13702 * README-cvs: Document these changes. Remove version numbers from
13703 mentions of build tools, since they change so often. Mention Flex.
13704
13705 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
13706 (gl_USE_SYSTEM_EXTENSIONS): Add.
13707 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
13708 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
13709 does this for us.
13710 (AC_ISC_POSIX): Remove; we no longer support this
13711 ancient OS, as it gets in the way of latest Autoconf & gnulib.
13712 (AC_HEADER_STDC): Remove: we now assume C89 or better.
13713 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
13714 Do not check for C89 headers, except for locale.h which is used
13715 by the Yacc library and must port to K&R hosts.
13716 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
13717 Do not check for C89 functions, except for setlocale which is
13718 used by the Yacc library.
13719 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
13720 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
13721 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
13722 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
13723 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
13724 AM_GNU_GETTEXT): Remove; now done by:
13725 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
13726 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
13727 for us.
13728
13729 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
13730 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
13731 Define to empty, as gnulib.mk will do the rest for us.
13732 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
13733 for us.
13734 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
13735 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
13736
13737 * src/files.c: Include gnulib's xstrndup.h.
13738
13739 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
13740 (REALLOC): Use xnrealloc, for likewise.
13741 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
13742 (strnlen, memrchr): Remove decls; functions no longer used.
13743 Include <stpcpy.h>.
13744
13745 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
13746 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
13747 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
13748 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
13749 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
13750 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
13751 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
13752 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
13753 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
13754 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
13755 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
13756 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
13757 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
13758 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
13759 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
13760 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
13761 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
13762 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
13763 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
13764 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
13765 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
13766 Remove, as these files are now generated automatically
13767 by bootstrap or automake.
13768
13769 * po/ChangeLog: Remove: all but one entry was a duplicate
13770 of this file, and I moved that 2000-11-02 entry here.
13771
13772 * config/.cvsignore: Add Makefile, depcomp, install-sh.
13773 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
13774 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
13775 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
13776 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
13777 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
13778 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
13779 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
13780 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
13781 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
13782 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
13783 xstrndup.h.
13784 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
13785 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
13786 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
13787 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
13788 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
13789 * src/.cvsignore: Remove *_.c.
13790
13791
13792 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
13793 support it. (The latest stable gzip doesn't.)
13794
13795 2004-04-27 Paul Eggert <eggert@twinsun.com>
13796
13797 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
13798 case, as stos_ is now used by destructors due to the 2004-02-09
13799 change.
13800
13801 Remove more K&R C support.
13802 * lib/libiberty.y (PARAMS): Remove. All uses removed.
13803 * lib/subpipe.c (errno): Remove decl.
13804 Include <stdlib.h> unconditionally.
13805 (EXIT_FAILURE): Remove macro.
13806 * src/complain.c (vfprintf, strerror): Remove.
13807 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
13808 unconditionally.
13809 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
13810 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
13811 (strchr, strspn, memchr): Remove decls.
13812 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
13813 unconditionally. Do not declare perror.
13814 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
13815 unconditionally.
13816
13817 * src/complain.c (_): Remove useless defn, as system.h defines this.
13818
13819 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
13820 with latest obstack.h.
13821 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
13822 to procedure types, as obstack.h now does that for us.
13823 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
13824
13825 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
13826 so that this include file can stand alone.
13827 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
13828 does this now. Include subpipe.h first after config.h, to
13829 test whether it can stand alone.
13830
13831 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
13832 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
13833 unused declaration.
13834
13835 * tests/synclines.at (%union synch line): Put a dummy member in
13836 the union, because empty unions aren't allowed in C. Caught
13837 by GCC 3.4.0.
13838
13839 2004-04-13 Jim Meyering <jim@meyering.net>
13840
13841 * src/conflicts.c (conflicts_print): Correct format string typo:
13842 use `%%' to produce literal `%'. (trivial change)
13843
13844 2004-03-30 Paul Eggert <eggert@twinsun.com>
13845
13846 * src/getargs.c (version): Update copyright year to 2004.
13847
13848 * data/c.m4 (b4_int_type): Use 'short int' rather than
13849 'short', and similarly for 'long', 'unsigned', etc.
13850 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
13851 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
13852 yy_yypstack, yydumpstack): Likewise.
13853 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
13854 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
13855 Likewise.
13856 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
13857 yy_stack_print, yyparse): Likewise.
13858 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
13859 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
13860 * lib/bitset.c (bitset_print): Likewise.
13861 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
13862 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
13863 * lib/bitsetv.c (bitsetv_dump): Likewise.
13864 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
13865 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
13866 Likewise.
13867 * src/LR0.c (allocate_itemsets): Likewise.
13868 * src/gram.h (rule_number, rule): Likewise.
13869 * src/lalr.h (goto_number): Likewise.
13870 * src/nullable.c (nullable_compute): Likewise.
13871 * src/output.c (prepare_rules): Likewise.
13872 * src/relation.c (relation_print, relation_digraph): Likewise.
13873 * src/relation.h (relation_node): Likewise.
13874 * src/state.h (state_number, transitions, errs, reductions,
13875 struct state): Likewise.
13876 * src/symtab.h (symbol_number, struct symbol): Likewise.
13877 * src/tables.c (vector_number, tally, action_number,
13878 default_goto, goto_actions): Likewise.
13879 * tests/existing.at (GNU Cim Grammar): Likewise.
13880 * tests/regression.at (Web2c Actions): Likewise.
13881
13882 * src/output.c (muscle_insert_short_int_table): Renamed from
13883 muscle_insert_short_table. All uses changed.
13884
13885 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
13886
13887 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
13888 (declaration): Replace expected_conflicts with expected_sr_conflicts.
13889 Add %expect-rr rule.
13890
13891 * src/scan-gram.l: Recognize %expect-rr.
13892
13893 * src/conflicts.h (expected_sr_conflicts): Rename from
13894 expected_conflicts.
13895 (expected_rr_conflicts): Declare.
13896
13897 * src/conflicts.c (expected_sr_conflicts): Rename from
13898 expected_conflicts.
13899 (expected_rr_conflicts): Define.
13900 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
13901 for GLR parsers.
13902 Use expected_sr_conflicts in place of expected_conflicts.
13903 Warn if expected_rr_conflicts used in non-GLR parser.
13904
13905 * doc/bison.texinfo: Add documentation for %expect-rr.
13906
13907 2004-03-08 Paul Eggert <eggert@gnu.org>
13908
13909 Add support for hex token numbers. Suggested by Odd Arild Olsen in
13910 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
13911
13912 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
13913 in lalr1.cc.
13914 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
13915 * src/scan-gram.l (scan_integer): New function.
13916 ({int}): Use it.
13917 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
13918 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
13919 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
13920 Say "long int", not "long", for uniformity with GNU style.
13921
13922 2004-02-25 Paul Eggert <eggert@twinsun.com>
13923
13924 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
13925 compilers. This fixes a problem with Intel's C++ compiler being
13926 chatty, reported by Guido Trentalancia in
13927 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
13928
13929 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
13930
13931 Support %destructor and merge error locations in lalr1.cc.
13932
13933 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
13934 (Parser::stos_): Define unconditionally.
13935 (Parser::destruct_): New method. Generate its body with
13936 b4_yydestruct_generate.
13937 (Parser::error_start_): New attribute.
13938 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
13939 token which are discarded.
13940 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
13941 error_start_ when erroneous token are discarded.
13942 (Parser::parse) <yyerrlab1>: Compute the location of the error
13943 token so that it covers all the discarded tokens.
13944 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
13945 it can be called with `%skeleton "lalr1.cc"', and do that.
13946
13947 2004-02-02 Paul Eggert <eggert@twinsun.com>
13948
13949 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
13950 $(top_srcdir)/lib and ../lib. This fixes a bug reported
13951 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
13952 There's no need to mention top_builddir since Automake does that
13953 for us.
13954 (INCLUDES): Remove, as Automake says it's obsolescent.
13955 Contents migrated into AM_CPPFLAGS as described above.
13956 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
13957
13958 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
13959
13960 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
13961 (yyreportSyntaxError): Handle case where lookahead token is
13962 YYEMPTY.
13963
13964 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13965
13966 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
13967 resulting parsers are compilable with C++.
13968
13969 2003-12-23 Paul Eggert <eggert@twinsun.com>
13970
13971 * config/depcomp, config/install-sh: Sync with Automake 1.8.
13972 * src/output.c (output_skeleton): Rename local var.
13973 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
13974 Bison tokens, as this runs afoul of the 2003-10-07 change that
13975 disallowed NUL bytes in character constants or string literals.
13976
13977 * tests/local.at: Require Autoconf 2.59's Autotest.
13978 * tests/testsuite.at: Don't include local.at, since we now assume
13979 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
13980 including it.
13981 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
13982 multiple inclusion warnings.
13983
13984 2003-12-02 Akim Demaille <akim@epita.fr>
13985
13986 * doc/bison.texinfo (How Can I Reset the Parser): More about start
13987 conditions.
13988 From Bruno Haible.
13989
13990 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
13991
13992 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
13993
13994 2003-10-07 Paul Eggert <eggert@twinsun.com>
13995
13996 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
13997 if testsuite doesn't exist.
13998
13999 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
14000 literals, unfortunately.
14001 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
14002 Complain about NUL bytes in character constants or string literals.
14003
14004 2003-10-05 Paul Eggert <eggert@twinsun.com>
14005
14006 * NEWS: Don't document %no-default-prec, as it's still
14007 too experimental.
14008 * doc/bison.texinfo: Document %no-default-prec only if
14009 the defaultprec flag is set. Normally it's not.
14010
14011 2003-10-04 Paul Eggert <eggert@twinsun.com>
14012
14013 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
14014 non-modifiable lvalue, instead of a modifiable one.
14015 * doc/bison.texinfo (Actions): Document that $$ can
14016 be assigned to. Do not claim that $$ and $N are
14017 array element references: user code should not rely on this.
14018
14019 2003-10-01 Paul Eggert <eggert@twinsun.com>
14020
14021 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
14022 (grammar_declaration): Use it.
14023 * src/scan-gram.l: New token %no-default-prec.
14024 * tests/conflicts.at: Revamp tests to use %no-default-prec.
14025 * NEWS, doc/bison.texinfo: Document the above.
14026
14027 2003-10-01 Akim Demaille <akim@epita.fr>
14028
14029 VCG no longer supports long_straight_phase.
14030
14031 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
14032 * src/print_graph.c (print_graph): Adjust.
14033
14034 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
14035 and Paul Eggert <eggert@twinsun.com>
14036
14037 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
14038 Table of Symbols): Document %default-prec.
14039 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
14040 (grammar_declaration): Set default_prec on %default-prec.
14041 * src/scan-gram.l (%default-prec): New token.
14042 * src/reader.h (default_prec): New flag.
14043 * src/reader.c: Likewise.
14044 (packgram): Handle it.
14045 * tests/conflicts.at (%default-prec without %prec,
14046 %default-prec with %prec, %default-prec 1): New tests.
14047
14048 2003-09-30 Paul Eggert <eggert@twinsun.com>
14049
14050 * tests/testsuite.at: Include local.at, not input.at, fixing
14051 a typo in the 2003-08-25 patch.
14052
14053 2003-08-27 Akim Demaille <akim@epita.fr>
14054
14055 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
14056 GCC warnings.
14057
14058 2003-08-26 Akim Demaille <akim@epita.fr>
14059
14060 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
14061 "<\#" to avoid magic from Gnus when posting parts of this script.
14062
14063 2003-08-26 Akim Demaille <akim@epita.fr>
14064
14065 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
14066 (Parser::parse): here.
14067 Adjust: nerrs and errstatus is now replaced by...
14068 (Parser::nerrs_, Parser::errstatus_): New.
14069
14070 2003-08-25 Akim Demaille <akim@epita.fr>
14071
14072 * config/announce-gen, Makefile.cfg: New.
14073 * Makefile.am: Adjust.
14074 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
14075 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
14076
14077 2003-08-25 Akim Demaille <akim@epita.fr>
14078
14079 When reducing initial empty rules, Bison parser read an initial
14080 location that is not defined. This results in garbage, and that
14081 affects Bison's own parser. Therefore we need (i) to extend Bison
14082 to support a means to initialize this location, and (ii) to use
14083 this CVS Bison to fix CVS Bison's parser.
14084
14085 * src/reader.h, reader.c (epilogue_augment): Remove, replace
14086 with...
14087 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
14088 * src/parse-gram.y: Adjust.
14089 (%initial-action): New.
14090 (%error-verbose): Since we require CVS Bison, there is no reason
14091 not to use it.
14092 * src/scan-gram.l: Adjust.
14093 * src/Makefile.am (YACC): New, to make sure we use our own parser.
14094 * data/yacc.c (yyparse): Use b4_initial_action.
14095
14096 2003-08-25 Akim Demaille <akim@epita.fr>
14097
14098 * doc/bison.texinfo: Don't promote stdout for error messages.
14099
14100 2003-08-25 Akim Demaille <akim@epita.fr>
14101
14102 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
14103 From Alexandre Duret-Lutz.
14104
14105 2003-08-25 Akim Demaille <akim@epita.fr>
14106
14107 Version 1.875c.
14108
14109 2003-08-25 Akim Demaille <akim@epita.fr>
14110
14111 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
14112 Use them.
14113
14114 2003-08-25 Akim Demaille <akim@epita.fr>
14115
14116 * data/lalr1.cc (Parser::reduce_print_): New.
14117 Use it.
14118
14119 2003-08-25 Akim Demaille <akim@epita.fr>
14120
14121 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
14122 error recovery loops. This patch is based on
14123 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
14124 Also, augment the similarity between lalr1.cc and yacc.c.
14125 Note: the locations of error recovery rules are not correct yet.
14126
14127 * data/lalr1.cc: Comment changes to augment the similarity between
14128 lalr1.cc and yacc.c.
14129 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
14130 (yyerrlab1): Remove, but where it used to be (now the bottom part of
14131 yyerrlab), when hitting EOF, pop the whole stack here instead of
14132 merely falling thru the default error handling mechanism.
14133 (yyerrorlab): New label, with the old contents of YYERROR,
14134 plus the following change: pop the stack of rhs corresponding
14135 to the production that invoked YYERROR. That is how Yacc
14136 behaves (required by POSIX).
14137 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
14138 fail.
14139
14140 2003-08-25 Akim Demaille <akim@epita.fr>
14141
14142 Tune local.at so that people can "autom4te -l autotest calc.at -o
14143 calc" for instance, to extract a sub test suite.
14144
14145 * tests/testsuite.at: Move the initialization, Autotest version
14146 requirement, and AT_TESTED invocation into...
14147 * tests/local.at: here.
14148 * tests/testsuite.at: Include it for compatibility with Autoconf
14149 2.57.
14150 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
14151 be ignore.
14152
14153 2003-08-04 Paul Eggert <eggert@twinsun.com>
14154
14155 Rework code slightly to avoid gcc -Wtraditional warnings.
14156 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
14157 The returned value is now stored in *YY0. All callers changed.
14158 * src/output.c (merge_output): Adjust to the above change.
14159
14160 2003-07-26 Paul Eggert <eggert@twinsun.com>
14161
14162 * data/glr.c (YYASSERT): New macro.
14163 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
14164 yyresolveStates, yyprocessOneStack):
14165 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
14166 Derived from a suggestion by Frank Heckenbach.
14167
14168 2003-07-25 Paul Eggert <eggert@twinsun.com>
14169
14170 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
14171 for portability to K&R C (after ansi2knr, presumably). See
14172 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
14173 by Frank Heckenbach, though I have omitted the structure-initialization
14174 part of his glr-knr.diff patch since I recall that the Portable
14175 C Compiler didn't require that change.
14176
14177 Let the user specify how to allocate and free memory.
14178 Derived from a suggestion by Frank Heckenbach in
14179 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
14180 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
14181 All uses of free, malloc, realloc changed to use these macros,
14182 and unnecessary casts removed.
14183 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
14184
14185 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
14186
14187 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
14188 use s.empty() rather than s == "" to test for empty string; see
14189 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
14190 (trivial change)
14191
14192 2003-06-25 Akim Demaille <akim@epita.fr>
14193
14194 * config/depcomp, config/install-sh: Update from masters.
14195
14196 2003-06-20 Paul Eggert <eggert@twinsun.com>
14197
14198 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
14199 and return properly parenthesized result.
14200 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
14201 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
14202 Remove unnecessary parentheses from uses.
14203 * doc/bison.texinfo (Location Default Action): Describe the
14204 conventions for parentheses.
14205
14206 2003-06-19 Paul Eggert <eggert@twinsun.com>
14207
14208 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
14209 yyreportTree): Do not assume that size_t is the same width as int,
14210 when printing sizes. Print sizes using an unsigned format.
14211 Problem reported by Frank Heckenbach in
14212 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
14213
14214 Port to Forte Developer 7 C compiler.
14215 * data/glr.c (struct YYLTYPE): If locations are not being used,
14216 declare a single dummy member, as empty structs do not conform
14217 to the C standard.
14218 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
14219 the Forte Developer 7 C compiler complains that end-of-loop
14220 code is not reached.
14221
14222 2003-06-17 Paul Eggert <eggert@twinsun.com>
14223
14224 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
14225 avoid warnings from picky compilers about redefinition of PARAMS.
14226
14227 2003-06-17 Paul Eggert <eggert@twinsun.com>
14228
14229 Version 1.875b.
14230
14231 * NEWS: Document 1.875b.
14232
14233 * lib/bbitset.h: Do not include config.h; that's the includer's job.
14234 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
14235 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
14236 Don't use 'index' in comments, as it's a builtin fn on some hosts.
14237 * lib/bitset_stats.c: Include gettext.h unconditionally, as
14238 per recent gettext manual's suggestion.
14239 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
14240 Use prototypes, not old-style definitions.
14241 * lib/lbitset.c (lbitset_unused_clear): Likewise.
14242 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
14243 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
14244 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
14245 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
14246 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
14247 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
14248 vbitset_or_and_cmp, vbitset_copy): Likewise.
14249
14250 * lib/libiberty.h: Do not include config.h; that's the includer's job.
14251 Do not include <stdlib.h>.
14252 (PARAMS): Define unconditionally for C89.
14253 (ATTRIBUTE_NORETURN): Remove.
14254 (ATTRIBUTE_UNUSED): Define unconditionally.
14255
14256 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
14257 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
14258 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
14259 * lib/vbitset.c, lib/vbitset.h: New files.
14260 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
14261 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
14262 from libbitset.
14263
14264 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
14265 `How Can I Reset @code{yyparse}', since texinfo does not allow
14266 arbitrary @ in node names.
14267
14268 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
14269 shouldn't be needed according to the gettext 0.12.1 documentation
14270 but which seem to be needed anyway: codeset.m4 glibc21.m4
14271 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
14272 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
14273 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
14274
14275 * lib/.cvsignore: Add stdbool.h.
14276 * m4/.cvsignore: Add nls.m4, po.m4.
14277
14278 Upgrade to CVS gnulib.
14279 * stdbool_.h: File renamed from stdbool.h.in.
14280 * configure.ac (AM_STDBOOL_H): Invoke this instead of
14281 AC_HEADER_STDBOOL.
14282 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
14283 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
14284 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
14285 (MOSTLYCLEANFILES): New var.
14286 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
14287 (stdbool.h): New rule.
14288 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
14289 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
14290 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
14291 m4/quote.m4: Upgrade to today's gnulib.
14292
14293 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
14294 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
14295 the tests right now.
14296 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
14297 yyerror are declared before use; C99 requires this.
14298
14299 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14300
14301 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
14302 first.
14303 (yyrecoverSyntaxError): Correct the logic for setting and testing
14304 yyerrState.
14305 Correct comment on handling EOF.
14306 Allow states with only a default reduction, rather than failing
14307 (I can't quite reconstruct why these were not allowed before).
14308
14309 Fixes to avoid problem that $-N rules in GLR parsers can cause
14310 buffer overruns, corrupting state.
14311
14312 * src/output.c (prepare_rules): Output max_left_semantic_context
14313 definition.
14314 * src/reader.h (max_left_semantic_context): New variable declaration.
14315 * src/scan-gram.l (max_left_semantic_context): Define.
14316 (handle_action_dollar): Update max_left_semantic_context.
14317 * data/glr.c (YYMAXLEFT): New definition.
14318 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
14319 (yyresolveAction): Ditto.
14320
14321 Fixes to problems with location handling in GLR parsers reported by
14322 Frank Heckenbach (2003/06/05).
14323
14324 * data/glr.c (YYLTYPE): Make trivial if locations not used.
14325 (YYRHSLOC): Add parentheses, and define only if locations used.
14326 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
14327 locations not used.
14328 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
14329 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
14330
14331 * tests/cxx-type.at: Exercise location information; update tests
14332 to differentiate output with and without locations.
14333 Remove forward declarations of yylex and yyerror---caused errors
14334 because default YYLTYPE not yet defined.
14335 Change semantic actions to compute strings, rather than printing
14336 them directly (to test proper passing of semantics values). Change
14337 output to prefix notation and update test data and expected results.
14338 (yylex): Track locations.
14339 (stmtMerge): Return value rather than printing, and include arguments
14340 in value.
14341
14342 2003-06-03 Paul Eggert <eggert@twinsun.com>
14343
14344 Avoid warnings generated by GCC 2.95.4 when Bison is
14345 configured with --enable-gcc-warnings.
14346 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
14347 yy::]b4_parser_class_name[::translate_,
14348 yy::Stack::operator[] (unsigned),
14349 yy::Stack::operator[] (unsigned) const,
14350 yy::Slice::operator[] (unsigned),
14351 yy::Slice::operator[] (unsigned) const):
14352 Rename local vars to avoid warnings.
14353 * tests/glr-regression.at (Improper handling of embedded actions
14354 and $-N in GLR parsers): Remove unused local variable from yylex.
14355 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
14356 (void) as arg when not pure, since we now assume C89 when building
14357 Bison. Pacify GCC by using parameter.
14358
14359 2003-06-02 Paul Eggert <eggert@twinsun.com>
14360
14361 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
14362 yy::Location::lines, yy::Location::columns): Rename arguments
14363 to avoid shadowing; this removes a warning generated by GCC 3.3.
14364
14365 2003-06-01 Paul Eggert <eggert@twinsun.com>
14366
14367 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
14368 to g++, as GCC 3.3 complains if you do it.
14369 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
14370 everything that WARNING_CFLAGS has, except omit warnings
14371 not suitable for C++.
14372 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
14373 * tests/atlocal.in (CXXFLAGS): New var.
14374 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
14375
14376 Fix a GLR parser bug I reported in February; see
14377 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
14378 The problem was that GLR parsers did not conform to the C standard,
14379 because actions like { $1 = $2 + $3; } expanded to expressions
14380 that invoked YYFILL in separate subexpressions, and YYFILL assigned
14381 to a local variable. The C standard says that expressions
14382 like (var = f ()) + (var = f ()) have undefined behavior.
14383 Another problem was that GCC sometimes issues warnings that
14384 yyfill and its parameters are unused.
14385
14386 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
14387 as possibly unused.
14388 (yyfill): New function.
14389 (YYFILL): Use it.
14390 (yyuserAction): Change type of yynormal to bool, so that it matches
14391 the new yyfill signature. Mark it as possibly unused.
14392
14393
14394 Follow up on a bug I reported in February, where a Bison-generated
14395 parser can loop. Provide a test case and a fix for yacc.c. I
14396 don't have a fix for lalr1.cc or for glr.c, unfortunately.
14397 The original bug report is in:
14398 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
14399
14400 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
14401 macro's size was becoming unwieldy.
14402 (yyerrlab): Do not discard an empty lookahead symbol, as this
14403 might destroy garbage.
14404 (yyerrorlab): New label, with the old contents of YYERROR,
14405 plus the following change: pop the stack of rhs corresponding
14406 to the production that invoked YYERROR. That is how Yacc
14407 behaves, and POSIX requires this behavior.
14408 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
14409 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
14410 Define 'alarm' to do nothing if unistd.h is not available.
14411 Add a new rule "exp: '-' error;" to test the above change to
14412 data/yacc.c. Use 'alarm' to abort any test taking longer than
14413 10 seconds, as it's probably looping.
14414 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
14415 Also, the new yacc.c generates two fewer diagnostics for an
14416 existing test.
14417
14418 2003-05-24 Paul Eggert <eggert@twinsun.com>
14419
14420 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
14421 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
14422 This fixes a problem reported by John Bowman when the Compaq/HP
14423 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
14424 -ansi -Wall -gall).
14425 * data/yacc.c (union yyalloc): Likewise.
14426 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
14427
14428 Switch from 'int' to 'bool' where that makes sense.
14429
14430 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
14431 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
14432 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
14433 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
14434 Return or accept bool, not int. All callers changed.
14435 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
14436 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
14437 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
14438 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
14439 bitset_or_and_cmp_): Likewise.
14440 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
14441 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
14442 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
14443 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
14444 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
14445 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
14446 bitset_stats_or_and_cmp): Likewise.
14447 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
14448 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
14449 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
14450 ebitset_xor_cmp): Likewise.
14451 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
14452 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
14453 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
14454 lbitset_xor_cmp): Likewise.
14455 * lib/bbitset.h: Include <stdbool.h>.
14456 (struct bitset_vtable): The following members now return bool, not
14457 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
14458 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
14459 or_and_cmp).
14460 * src/conflicts.c (count_rr_conflicts): Likewise.
14461 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
14462 All uses changed.
14463 * lib/ebitset.c (ebitset_obstack_init): Likewise.
14464 * lib/lbitset.c (lbitset_obstack_init): Likewise.
14465 * src/getargs.c (debug_flag, defines_flag, locations_flag,
14466 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
14467 graph_flag): Likewise.
14468 * src/getargs.h (debug_flag, defines_flag, locations_flag,
14469 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
14470 graph_flag): Likewise.
14471 * src/output.c (error_verbose): Likewise.
14472 * src/output.h (error_verbose): Likewise.
14473 * src/reader.c (start_flag, typed): Likewise.
14474 * src/reader.h (typed): Likewise.
14475 * src/getargs.c (LOCATIONS_OPTION): New constant.
14476 (long_options, getargs): Use it.
14477 * src/lalr.c (build_relations): Use bool, not int.
14478 * src/nullable.c (nullable_compute): Likewise.
14479 * src/print.c (print_reductions): Likewise.
14480 * src/tables.c (action_row, pack_vector): Likewise.
14481 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
14482 * src/output.c (prepare): Use it.
14483 * src/output.c (token_definitions_output,
14484 symbol_destructors_output, symbol_destructors_output): Use string,
14485 not boolean integer, to keep track of whether to output separator.
14486 * src/print_graph.c (print_core): Likewise.
14487 * src/state.c (state_rule_lookaheads_print): Likewise.
14488
14489 * config/install-sh: Sync from automake 1.7.5.
14490
14491 2003-05-14 Paul Eggert <eggert@twinsun.com>
14492
14493 * src/parse-gram.y (rules_or_grammar_declaration): Require a
14494 semicolon after a grammar declaration, in the interest of possible
14495 future changes to the Bison input language.
14496 Do not allow a stray semicolon at the start of the grammar.
14497 (rhses.1): Allow one or more semicolons after any rule, including
14498 just before "|" as required by POSIX.
14499 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
14500 grammar.
14501
14502 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
14503
14504 %parse-param support for lalr1.cc.
14505
14506 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
14507 b4_cc_constructor_calls, b4_cc_constructor_call,
14508 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
14509 definitions.
14510 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
14511 parse-param arguments.
14512 (yy::b4_parser_class_name): Declare instance variables to
14513 hold parse-param arguments.
14514 * tests/calc.at: s/value/semantic_value/ because value clashes
14515 with a member of yy::b4_parser_class_name. Adjust C++ code
14516 to handle %parse-param. Enable %parse-param test in C++.
14517
14518 2003-05-12 Paul Eggert <eggert@twinsun.com>
14519
14520 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
14521 English a bit. Fix fclose typo. Change "const char" to "char
14522 const", and use ANSI C rather than K&R for "main". Suggest
14523 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
14524 and suggest yy_switch_to_buffer.
14525
14526 2003-05-05 Paul Eggert <eggert@twinsun.com>
14527
14528 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
14529 C89. This avoids a diagnostic on compilers that define __STDC__
14530 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
14531 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
14532
14533 2003-05-03 Paul Eggert <eggert@twinsun.com>
14534
14535 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
14536 Do not overrun array bounds.
14537 This should fix a bug reported today by Olatunji Oluwabukunmi in
14538 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
14539
14540 2003-04-29 Akim Demaille <akim@epita.fr>
14541
14542 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
14543 * src/getargs.c, src/getargs.h: here, as bool, not int.
14544 (nondeterministic_parser): New.
14545 * src/parse-gram.y, src/scan-gram.l: Support
14546 %nondeterministic-parser.
14547 * src/output.c (prepare): Use nondeterministic_parser instead
14548 of glr_parser where appropriate.
14549 * src/tables.c (conflict_row, action_row, save_row)
14550 (token_actions, token_actions, pack_vector): Ditto.
14551
14552 2003-04-29 Akim Demaille <akim@epita.fr>
14553
14554 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
14555
14556 2003-04-29 Akim Demaille <akim@epita.fr>
14557
14558 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
14559 with %pure-parser and %locations to exercise the patch from Yakov
14560 Markovitch below.
14561
14562 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
14563
14564 * data/yacc.c: (b4_lex_param): Corrected for the case where
14565 %lex-param is provided and %pure-parser isn't.
14566
14567 2003-04-27 Paul Eggert <eggert@twinsun.com>
14568
14569 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
14570 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
14571 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
14572 if it is not defined.
14573 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
14574
14575 2003-04-26 Paul Eggert <eggert@twinsun.com>
14576
14577 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
14578 Declare to be of type suitable for the ninf value itself, not of
14579 type suitable for the corresponding table, since the latter might
14580 be unsigned but the ninf value might be negative. This fixes a
14581 bug reported by Alexandre Duret-Lutz in
14582 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
14583
14584 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
14585 invokes it. We shouldn't invoke it twice because it will attempt
14586 to put error.o in the archive twice. This fixes a glitch reported
14587 by Martin Mokrejs in
14588 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
14589
14590 2003-04-21 Paul Eggert <eggert@twinsun.com>
14591
14592 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
14593 to gnulib.
14594
14595 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
14596
14597 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
14598 Fix obvious typo that results in uncompilable GLR parsers
14599 when both %pure-parser and %locations are used. (trivial change)
14600
14601 2003-04-17 Paul Eggert <eggert@twinsun.com>
14602
14603 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
14604 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
14605 Do not insert the expected token via unput, as this runs afoul
14606 of a POSIX-compatibility bug in flex 2.5.31.
14607 All uses changed to BEGIN the parent state,
14608 since we no longer insert the expected token via unput.
14609 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
14610 that is no longer emitted after the above change.
14611
14612 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
14613 the first one. This change is from Paul Hilfinger, and it fixes
14614 regression reported by Werner Lemberg in
14615 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
14616
14617 (resolve_sr_conflict): Don't invoke state_errs_set
14618 unless one or more tokens have been explicitly made errors.
14619 Otherwise, the above change causes Bison to abort.
14620
14621 * tests/existing.at (GNU pic Grammar): New test case, taken from
14622 Lemberg's email.
14623
14624 2003-03-31 Akim Demaille <akim@epita.fr>
14625
14626 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
14627
14628 2003-03-31 Akim Demaille <akim@epita.fr>
14629
14630 * src/output.c (prepare_symbols): Avoid trailing spaces in the
14631 output.
14632
14633 2003-03-31 Akim Demaille <akim@epita.fr>
14634
14635 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
14636 From Paul Hilfinger.
14637
14638 2003-03-29 Akim Demaille <akim@epita.fr>
14639
14640 * m4/error.m4: Do not put under dynamic conditions some code which
14641 expansion is under static control.
14642
14643 2003-03-29 Akim Demaille <akim@epita.fr>
14644
14645 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
14646
14647 2003-03-29 Akim Demaille <akim@epita.fr>
14648
14649 * doc/bison.texinfo (Strings are Destroyed): New.
14650
14651 2003-03-13 Paul Eggert <eggert@twinsun.com>
14652
14653 * .cvsignore: Add configure.lineno.
14654 * src/.cvsignore: Add yacc.
14655 * tests/.cvsignore: Add testsuite.log.
14656 * doc/fdl.texi: Sync with latest FSF version.
14657
14658 2003-03-12 Paul Eggert <eggert@twinsun.com>
14659
14660 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
14661 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
14662 cursor, instead of leaving it undefined. This fixes a bug
14663 reported by Tim Van Holder in
14664 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
14665 * tests/input.at (Torturing the Scanner): Test the scanner on
14666 an empty input file, which was Tim Van Holder's test case.
14667
14668 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
14669 <sys/resource.h> can be included, include sys/time.h and
14670 sys/times.h first, if available. This works around the SunOS
14671 4.1.4 porting bug reported by Bruce Becker in
14672 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
14673
14674 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
14675 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
14676 AC_HEADER_SYS_WAIT.
14677
14678 Merge changes from gnulib. This was prompted because the CVS
14679 snapshot didn't build on Solaris 7 due to strnlen problems.
14680
14681 These changes need to be merged back into gnulib:
14682 * lib/hash.c: Include <stdbool.h> unconditionally.
14683 * m4/onceonly.m4 (m4_quote): New macro.
14684 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
14685 Quote AC_FOREACH variable-expansions properly.
14686 The 2003-01-03 obstack.h change also needs merging.
14687 {end of changes requiring merging}
14688
14689 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
14690 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
14691 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
14692 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
14693 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
14694 New files, imported from gnulib.
14695 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
14696 above.
14697
14698 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
14699 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
14700 gnulib sources.
14701
14702 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
14703 Add.
14704 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
14705 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
14706 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
14707 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
14708 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
14709 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
14710 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
14711 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
14712 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
14713 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
14714 (jm_PREREQ_ARGMATCH): Remove.
14715 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
14716 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
14717
14718 * src/system.h: Include <stdbool.h> unconditionally.
14719
14720 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
14721 assuming at least C89 in the bitset code for some time now.
14722
14723 2003-03-03 Akim Demaille <akim@epita.fr>
14724
14725 * ro.po: New.
14726
14727 2003-03-02 Akim Demaille <akim@epita.fr>
14728
14729 * doc/bison.texinfo (Table of Symbols): Reactivate the
14730 documentation for %lex-param, and %parse-param.
14731
14732 2003-03-02 Akim Demaille <akim@epita.fr>
14733
14734 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
14735 generate verbose error messages.
14736 Use the number of tokens as an upper bound in yytname, as it
14737 cannot be a non terminal.
14738
14739 2003-03-02 Akim Demaille <akim@epita.fr>
14740
14741 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
14742 message.
14743
14744 2003-03-02 Akim Demaille <akim@epita.fr>
14745
14746 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
14747 Use them to exercise yycheck overrun.
14748 Based on Andrew Suffield's grammar.
14749
14750 2003-03-02 Akim Demaille <akim@epita.fr>
14751
14752 Create tests/local.at for Bison generic testing macros.
14753
14754 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
14755 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
14756 This new file.
14757 * tests/calc.at (AT_CHECK_CALC): Adjust.
14758 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
14759 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
14760 * tests/local.at: here.
14761 (AT_COMPILE_CXX): Tags the tests using it as c++.
14762 Ignore the test if CXX is not functional.
14763
14764 2003-03-01 Paul Eggert <eggert@twinsun.com>
14765
14766 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
14767 not loc->end, since loc->end might contain garbage and this leads
14768 to undefined behavior on some platforms.
14769 (id_loc, token_start): Use (IF_LINTed) initial values that do not
14770 depend on *loc, so that the reader doesn't give the the false
14771 impression that *loc is initialized.
14772 (<INITIAL>"%%"): Do not bother setting code_start, since its value
14773 does not survive the return.
14774
14775 2003-03-01 Akim Demaille <akim@epita.fr>
14776
14777 * src/scan-gram.l (code_start): Always initialize it when entering
14778 into yylex, as SC_EPILOGUE is activated *before* the corresponding
14779 yylex invocation. An alternative would be making it static, but
14780 then it starts with the second %%'s beginning, instead of its end.
14781
14782 2003-02-28 Paul Eggert <eggert@twinsun.com>
14783
14784 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
14785 around a UnixWare 7.1.1 porting bug reported by John Hughes in
14786 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
14787
14788 2003-02-26 Paul Eggert <eggert@twinsun.com>
14789
14790 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
14791 Remove Sequent/Pyramid discussion (nobody uses them any more).
14792 Merge VMS and MS-DOS discussion; these ports may well be dead
14793 but let's keep mentioning them for now. Put <> around email
14794 addresses. Add copyright notice.
14795
14796 2003-02-24 Paul Eggert <eggert@twinsun.com>
14797
14798 * data/glr.c (yy_reduce_print): yylineno -> yylno,
14799 to avoid collision with flex use of yylineno.
14800 Problem reported by Bruce Lilly in
14801 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
14802 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
14803 * data/yacc.c (yy_reduce_print): Likewise.
14804
14805 * config/depcomp: Sync with Automake 1.7.3.
14806
14807 2003-02-21 Akim Demaille <akim@epita.fr>
14808
14809 * data/lalr1.cc: Use temporary variables instead of casts to
14810 change integer types.
14811 Suggested by Paul Eggert.
14812
14813 2003-02-21 Akim Demaille <akim@epita.fr>
14814
14815 * doc/bison.texinfo: Use "location" consistently to refer to @n,
14816 to avoid confusions with lalr1.cc's notion of Position.
14817 Suggested by Paul Eggert.
14818
14819 2003-02-20 Akim Demaille <akim@epita.fr>
14820
14821 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
14822 before initial_columns.
14823 (location.hh): Use consistent variable names when defining the
14824 operator<<.
14825 Use "last" so that we subtract from Positions, not from unsigned.
14826
14827 2003-02-20 Akim Demaille <akim@epita.fr>
14828
14829 * data/lalr1.cc (position.hh): New subfile, including the extended
14830 and Doxygen'ed documentation of class Position.
14831 (location.hh): Use it.
14832 Document a` la Doxygen.
14833 With the help of Benoit Perrot.
14834
14835 2003-02-20 Akim Demaille <akim@epita.fr>
14836
14837 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
14838 AT_YACC_IF.
14839 Redefine AT_YYERROR_SEES_LOC_IF using it.
14840 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
14841 not defined.
14842 Don't use the location in yy::Parser::error_ and
14843 yy::Parser::print_ when not %locations.
14844 Activate more lalr1.cc tests.
14845
14846 2003-02-19 Akim Demaille <akim@epita.fr>
14847
14848 * data/lalr1.cc: When displaying a line number, be sure to make it
14849 an int.
14850
14851 2003-02-19 Akim Demaille <akim@epita.fr>
14852
14853 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
14854 Remove, useless.
14855 (YYABORT, YYACCEPT, YYERROR): New.
14856 * tests/calc.at: Renable the lalr1.cc test.
14857
14858 2003-02-19 Akim Demaille <akim@epita.fr>
14859
14860 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
14861 error recovery, mixing with/without pops and discarding of the
14862 lookahead.
14863 Exercise YYERROR.
14864 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
14865
14866 2003-02-17 Paul Eggert <eggert@twinsun.com>
14867
14868 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
14869 * tests/testsuite.at (AT_COMPILE): Use them.
14870 This fixes the testsuite problem reported by Robert Lentz in
14871 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
14872
14873 2003-02-12 Paul Eggert <eggert@twinsun.com>
14874
14875 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
14876 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
14877 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
14878 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
14879 Check for malloc failure, for consistency with yacc.c.
14880 (yytname_size): Remove, for consistency with yacc.c.
14881
14882 The bug still remains in data/lalr1.cc, as I didn't have time
14883 to fix it there.
14884
14885 2003-02-06 Akim Demaille <akim@epita.fr>
14886
14887 * configure.ac (GXX): Rename as...
14888 (CXX): this, to keep the original Autoconf semantics.
14889 Require 2.57.
14890 * data/lalr1.cc: Fix b4_copyright invocations.
14891 If YYDEBUG is not defined, don't depend upon name_ being defined.
14892 (location.hh): Include string and iostream.
14893 (Position::filename): New member.
14894 (Position::Position ()): New.
14895 (operator<< (Position)): New.
14896 (operator- (Position, int)): New.
14897 (Location::first, Location::last): Rename as...
14898 (Location::begin, Location::end): these, to mock the conventional
14899 iterator names.
14900 (operator<< (Location)): New.
14901 * tests/atlocal.in (CXX): New.
14902 * tests/testsuite.at (AT_COMPILE_CXX): New.
14903 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
14904 locations in a more synthetic way.
14905 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
14906 lalr1.cc is used.
14907 Adjust the C locations to match those from Emacs: first column is
14908 column 0.
14909 Change all the expected results.
14910 Conform to the GCS: simplify the locations when applicable.
14911 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
14912 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
14913 these CPP macros with the m4 macros new defined by...
14914 (AT_CHECK_PUSHDEFS): this, i.e.:
14915 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
14916 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
14917 New macros.
14918 (AT_CHECK_POPDEFS): Undefine them.
14919 (AT_CHECK_CALC_LALR1_CC): New.
14920 Use it for the first lalr1.cc test.
14921
14922 2003-02-04 Akim Demaille <akim@epita.fr>
14923
14924 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
14925 Location as is defined.
14926
14927 2003-02-04 Akim Demaille <akim@epita.fr>
14928
14929 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
14930 name_ being defined.
14931
14932 2003-02-03 Paul Eggert <eggert@twinsun.com>
14933
14934 * src/gram.h (start_symbol): Remove unused decl.
14935
14936 Use more-consistent naming conventions for local vars.
14937
14938 * src/derives.c (derives_compute): Change type of local var from
14939 int to rule_number.
14940 * src/gram.c (grammar_rules_partial_print): Likewise.
14941 * src/print.c (print_core): Likewise.
14942 * src/reduce.c (reduce_grammar_tables): Likewise.
14943
14944 * src/gram.c (grammar_dump): Change name of item_number *
14945 local var from r to rp.
14946 * src/nullable.c (nullable_compute): Likewise.
14947
14948 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
14949
14950 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
14951 for symbol or symbol_number var.
14952 * src/reader.c (grammar_start_symbol_set): Likewise.
14953 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
14954 Likewise.
14955 * src/state.c (transitions_to): Likewise.
14956 * src/state.h: Likewise.
14957 * src/tables.c (symbol_number_to_vector_number): Likewise.
14958
14959 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
14960 char * var.
14961
14962 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
14963 var.
14964
14965 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
14966 var.
14967
14968 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
14969 Use str, not s, for char * var. Use ch, not c, for character var.
14970 Use size for size var.
14971
14972 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
14973 char * var.
14974 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
14975 uniqstr var.
14976 * src/uniqstr.h: Likewise.
14977
14978 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
14979 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
14980 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
14981 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
14982 param to have same name as that of enum, so that we don't use
14983 "s" to stand for a non-state.
14984
14985 2003-02-02 Akim Demaille <akim@epita.fr>
14986
14987 * src/scan-skel.l: Scan more than one inert character per yylex
14988 invocation.
14989
14990 2003-02-01 Paul Eggert <eggert@twinsun.com>
14991
14992 Version 1.875a.
14993
14994 * po/LINGUAS: Add ms.
14995
14996 2003-01-30 Akim Demaille <akim@epita.fr>
14997
14998 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
14999
15000 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15001
15002 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
15003 of $1.
15004
15005 Changes in response to error report by S. Eken: GLR mode does not
15006 handle negative $ indices or $ indices in embedded rules correctly.
15007 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
15008
15009 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
15010 (b4_rhs_location): Ditto.
15011 (yyfill): New function to copy from stack tree into array
15012 incrementally.
15013 (yyuserAction): Modify to allow incremental move of semantic values
15014 to rhs array when in GLR mode.
15015 Define YYFILL to use in user-defined actions to fill semantic array
15016 as needed.
15017 Remove dummy use of yystack, as there is now a guaranteed use.
15018 (yydoAction): Modify to allow incremental move of semantic values
15019 to rhs array when in GLR mode.
15020 (yyresolveAction): Ditto.
15021 (yyglrShiftDefer): Update comment.
15022 (yyresolveStates): Use X == NULL for pointers, not !X.
15023 (yyglrReduce): Ditto.
15024 (yydoAction): Ditto
15025
15026 * tests/glr-regr1.at: Rename to ...
15027 * tests/glr-regression.at: Add new regression test for the problems
15028 described above (adapted from S. Eken).
15029 Update copyright notice.
15030 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
15031 * tests/Makefile.am: Ditto.
15032
15033 2003-01-28 Paul Eggert <eggert@twinsun.com>
15034
15035 * data/lalr1.cc: Do not use @output_header_name@ unless
15036 b4_defines_flag is set. This fixes two bugs reported by
15037 Tim Van Holder in
15038 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
15039 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
15040
15041 2003-01-21 Paul Eggert <eggert@twinsun.com>
15042
15043 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
15044 we don't need to worry about yyerrlab1 being reported as an
15045 "unused label" by non-GCC C compilers. The downside is that if
15046 locations are used then a couple of statements are duplicated each
15047 time YYERROR is invoked, but the upside is that the warnings
15048 should vanish.
15049 (yyerrlab1): Move code to YERROR.
15050 (yyerrlab2): Remove. Change uses back to yyerrlab1.
15051 This reverts some of the 2002-12-27 change.
15052
15053 2003-01-17 Paul Eggert <eggert@twinsun.com>
15054
15055 * src/output.c (symbol_printers_output): Fix typo that led
15056 to core dump. Problem reported by Antonio Rus in
15057 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
15058
15059 2003-01-13 Akim Demaille <akim@epita.fr>,
15060 Quoc Peyrot <chojin@lrde.epita.fr>,
15061 Robert Anisko <anisko_r@lrde.epita.fr>
15062
15063 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
15064 when the stacks contain one element, as the loop would otherwise
15065 free the last state, and then use the top state (the one we just
15066 popped). This means that the initial elements will not be freed
15067 explicitly, as is the case in yacc.c; it is not a problem, as
15068 these elements have fake values.
15069
15070 2003-01-11 Paul Eggert <eggert@twinsun.com>
15071
15072 * NEWS: %expect-violations are now just warnings, reverting
15073 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
15074 bootstrapping problem reported by Matthias Klose; see
15075 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
15076 * src/conflicts.c (conflicts_print): Likewise.
15077 * tests/conflicts.at (%expect not enough, %expect too much,
15078 %expect with reduce conflicts): Likewise.
15079 * doc/bison.texinfo (Expect Decl): Document this. Also mention
15080 that the warning is enabled if the number of conflicts changes
15081 (not necessarily increases).
15082
15083 * src/getargs.c (version): Update copyright year.
15084
15085 2003-01-09 Akim Demaille <akim@epita.fr>
15086
15087 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
15088
15089 2003-01-08 Paul Eggert <eggert@twinsun.com>
15090
15091 * Makefile.maint (WGETFLAGS):
15092 New macro, containing "-C off" to disable proxy caches.
15093 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
15094 (rel-check): Use $(WGET) instead of wget.
15095
15096 2003-01-06 Paul Eggert <eggert@twinsun.com>
15097
15098 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
15099 the GLR paper of Scott, Johnstone and Hussain.
15100
15101 2003-01-04 Paul Eggert <eggert@twinsun.com>
15102
15103 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
15104 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
15105 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
15106 (EXTRA_LIBRARIES): New var, for liby.a.
15107 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
15108 (EXTRA_SCRIPTS): New var, for yacc.
15109
15110 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
15111 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
15112 Problem reported by Nelson H. F. Beebe.
15113
15114 2003-01-03 Paul Eggert <eggert@twinsun.com>
15115
15116 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
15117 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
15118 when compiling Bison 1.875's `bitset bset = obstack_alloc
15119 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
15120
15121 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
15122 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
15123 grow to a huge size with typical invocation.
15124
15125 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
15126 Use the pattern recommended by Autoconf 2.57, except also protect
15127 against double-definition.
15128 * src/system.h: Likewise.
15129 Portability issues reported by Nelson H. F. Beebe.
15130
15131 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
15132 All uses changed. Provide a definition in both C and C++.
15133 (yytrue, yyfalse): Define even if defined (__cplusplus).
15134
15135 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
15136 Reported by Nelson H. F. Beebe.
15137
15138 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
15139
15140 2003-01-02 Paul Eggert <eggert@twinsun.com>
15141
15142 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
15143 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
15144 Bug reported by Nelson H. F. Beebe.
15145
15146 2003-01-01 Paul Eggert <eggert@twinsun.com>
15147
15148 * Version 1.875.
15149
15150 2002-12-30 Paul Eggert <eggert@twinsun.com>
15151
15152 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
15153 Moved here from...
15154 (<INITIAL>","): Here. This causes stray "," to be treated
15155 more uniformly.
15156
15157 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
15158 last brace in braced code when not in Yacc mode, for compatibility
15159 with Bison 1.35. This resurrects the 2001-12-15 patch to
15160 src/reader.c.
15161
15162 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
15163 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
15164
15165 2002-12-28 Paul Eggert <eggert@twinsun.com>
15166
15167 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
15168 that of SYM's type. This fixes Debian bug 168069, reported by
15169 Thomas Olsson.
15170
15171 2002-12-28 Paul Eggert <eggert@twinsun.com>
15172
15173 Version 1.75f.
15174
15175 Switch back to the Yacc style of conflict reports, undoing some
15176 of the 2002-07-30 change.
15177 * doc/bison.texinfo (Understanding): Use Yacc style for
15178 conflict reports. Also, use new way of locating rules.
15179 * src/conflicts.c (conflict_report):
15180 Renamed from conflict_report_yacc, removing the old
15181 'conflict_report'. Translate the entire conflict report at once,
15182 so that we don't assume that "," has the same interpretation in
15183 all languages.
15184 (conflicts_output): Use Yacc-style conflict report for each state,
15185 instead of our more-complicated style.
15186 (conflicts_print): Use Yacc-style conflict report, except print
15187 the input file name when not emulating Yacc.
15188 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
15189 Conflicted Reduction, %expect not enough, %expect too much,
15190 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
15191 * tests/existing.at (GNU Cim Grammar): Likewise.
15192 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
15193
15194 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
15195 fatal): Don't invoke fflush; it's not needed and it might even be
15196 harmful for stdout, as stdout might not be open.
15197 * src/reduce.c (reduce_print): Likewise.
15198
15199 2002-12-27 Paul Eggert <eggert@twinsun.com>
15200
15201 Fix a bug where error locations were not being recorded correctly.
15202 This problem was originally reported by Paul Hilfinger in
15203 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
15204
15205 * data/yacc.c (yyparse): New local var yylerrsp, to record the
15206 top of the location stack's error locations.
15207 (yyerrlab): Set it. When discarding a token, push its location
15208 onto yylerrsp so that we don't lose track of the error's end.
15209 (yyerrlab1): Now is only the target of YYERROR, so that we can
15210 properly record the location of the action that failed. For GCC
15211 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
15212 GCC warning about yyerrlab1 being unused if YYERROR is unused.
15213 (yyerrlab2): New label, which yyerrlab now falls through to.
15214 Compute the error's location by applying YYLLOC_DEFAULT to
15215 the locations of all the symbols that went into the error.
15216 * doc/bison.texinfo (Location Default Action): Mention that
15217 YYLLOC_DEFAULT is also invoked for syntax errors.
15218 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
15219 Error locations include the locations of all the tokens that were
15220 discarded, not just the last token.
15221
15222 2002-12-26 Paul Eggert <eggert@twinsun.com>
15223
15224 * src/files.c: Include quote.h.
15225 (compute_output_file_names): Warn if we detect conflicting
15226 outputs to the same file. This should catch the misunderstanding
15227 exemplified by Debian Bug 165349, reported by Bruce Stephens..
15228
15229 * src/conflicts.c (conflicts_print): If the user specifies
15230 "%expect N", report an error if there are any reduce/reduce
15231 conflicts. This is what the manual says should happen.
15232 This fixes Debian bug 130890, reported by Anthony DeRobertis.
15233 * tests/conflicts.at (%expect with reduce conflicts): New test.
15234
15235 Don't use m4_include on relative file names, as it doesn't work as
15236 desired if there happens to be a file with that name under ".".
15237
15238 * m4sugar/version.m4: Remove; it was included but it wasn't used.
15239 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
15240 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
15241 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
15242 * src/output.c (output_skeleton): Use full path names when
15243 specifying a file to include; don't rely on include path, as
15244 it's unreliable when the working file contains a file with
15245 that name.
15246
15247 2002-12-25 Paul Eggert <eggert@twinsun.com>
15248
15249 Remove obsolete references to bison.simple and bison.hairy.
15250 Problem mentioned by Aubin Mahe in
15251 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
15252 * data/glr.c: Comment fix.
15253 * doc/bison.1: Remove references. Also, mention "yacc".
15254
15255 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
15256 with -g option.
15257
15258 * src/parse-gram.y (declaration): Use enum "report_states" rather
15259 than its numeric value 1.
15260
15261 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
15262 opening a new one. This fixes Debian bug 165349, reported by
15263 Bruce Stephens.
15264
15265 2002-12-24 Paul Eggert <eggert@twinsun.com>
15266
15267 Version 1.75e.
15268
15269 * Makefile.maint (cvs-update): Don't assume that the shell
15270 supports $(...), as Solaris sh doesn't.
15271
15272 * src/parse-gram.y (lloc_default): Remove test for empty
15273 nonterminals at the end, since it didn't change the result.
15274
15275 2002-12-24 Paul Eggert <eggert@twinsun.com>
15276
15277 If the user does not define YYSTYPE as a macro, Bison now declares it
15278 using typedef instead of defining it as a macro. POSIX requires this.
15279 For consistency, YYLTYPE is also declared instead of defined.
15280
15281 %union directives can now have a tag before the `{', e.g., the
15282 directive `%union foo {...}' now generates the C code
15283 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
15284 The default union tag is `YYSTYPE', for compatibility with Solaris 9
15285 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
15286 instead of `yyltype'.
15287
15288 `yystype' and `yyltype' are now obsolescent macros instead of being
15289 typedefs or tags; they are no longer documented and will be
15290 withdrawn in a future release.
15291
15292 * data/glr.c (b4_location_type): Remove.
15293 (YYSTYPE): Renamed from yystype.
15294 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
15295 (struct YYLTYPE): Renamed from struct yyltype.
15296 (YYLTYPE): Renamed from yyltype.
15297 (yyltype, yystype): New (and obsolescent) macros,
15298 for backward compatibility.
15299 * data/yacc.c: Likewise.
15300
15301 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
15302 does not specify a union tag. This is for compatibility with
15303 Solaris 9 yacc.
15304
15305 * src/parse-gram.y (add_param): 2nd arg is now char * not char
15306 const *, since it is now modified by stripping surrounding { }.
15307 (current_braced_code): Remove.
15308 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
15309 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
15310 trailing " {...}". Now of type <chars>.
15311 (grammar_declaration): Adjust to bundled tokens.
15312 (code_content): Remove; stripping is now done by add_param.
15313 (print_token_value): Print contents of bundled tokens.
15314 (token_name): New function.
15315
15316 * src/reader.h (braced_code, current_braced_code): Remove.
15317 (token_name): New decl.
15318
15319 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
15320 token_type, not braced_code code_kind. All uses changed.
15321 (SC_PRE_CODE): New state, for scanning after a keyword that
15322 has (or usually has) an immediately-following braced code.
15323 (token_type): New local var, to keep track of which token type
15324 to return when scanning braced code.
15325 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
15326 <INITIAL>"%parse-param", <INITIAL>"%printer",
15327 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
15328 instead of returning a token type immediately.
15329 (<INITIAL>"{"): Set token type.
15330 (<SC_BRACED_CODE>"}"): Use it.
15331 (handle_action_dollar, handle_action_at): Now returns bool
15332 indicating success. Fail if ! current_rule; this prevents a core dump.
15333 (handle_symbol_code_dollar, handle_symbol_code_at):
15334 Remove; merge body into caller.
15335 (handle_dollar, handle_at): Complain in invalid contexts.
15336
15337 * NEWS, doc/bison.texinfo: Document the above.
15338 * NEWS: Fix years and program names in copyright notice.
15339
15340 2002-12-17 Paul Eggert <eggert@twinsun.com>
15341
15342 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
15343 Reporting, Table of Symbols): Omit mentions of %lex-param and
15344 %parse-param from the documentation for now.
15345
15346 2002-12-15 Paul Eggert <eggert@twinsun.com>
15347
15348 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
15349 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
15350 lookahead symbol, and which sets yychar in parser actions) and it
15351 disagreed with the Bison documentation. Bug
15352 reported by Andrew Walrond.
15353
15354 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
15355 as the caller now does that.
15356 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
15357 (YYEMPTY): Parenthesize right hand side, since others use it.
15358 (yyparse): Don't assume that our generated code is the only code
15359 that sets yychar.
15360
15361 2002-12-13 Paul Eggert <eggert@twinsun.com>
15362
15363 Version 1.75d.
15364
15365 POSIX requires a "yacc" command.
15366 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
15367 (MOSTLYCLEANFILES): Add yacc.
15368 (yacc): New rule.
15369 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
15370 as an alias for bison y.
15371
15372 * po/LINGUAS: Add da.
15373
15374 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
15375 problem with latest <getopt.h>.
15376 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
15377
15378 * doc/fdl.texi: Upgrade to 1.2.
15379 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
15380 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
15381 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
15382 gnulib.
15383 * config/install-sh: Sync with autotools.
15384
15385 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
15386 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
15387 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
15388 locations are requested.
15389 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
15390 locations are requested.
15391
15392 2002-12-12 Paul Eggert <eggert@twinsun.com>
15393
15394 Remove unportable casts and storage allocation tricks.
15395 While we're at it, remove almost all casts, since they
15396 usually aren't needed and are a sign of trouble.
15397
15398 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
15399
15400 * src/derives.c (derives_compute): Do not subtract NTOKENS from
15401 the pointer DSET returned by malloc; this isn't portable.
15402 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
15403 Similarly for DERIVES.
15404 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
15405 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
15406 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
15407
15408 * src/derives.c (derives_compute): Do not bother invoking
15409 int_of_rule_number, since rule numbers are integers.
15410
15411 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
15412 rather than XMALLOC (char, N).
15413
15414 * src/files.c (filename_split): Rewrite to avoid cast.
15415
15416 * src/gram.h (symbol_number_as_item_number,
15417 item_number_as_symbol_number, rule_number_as_item_number,
15418 item_number_as_rule_number):
15419 Now inline functions rather than macros, to avoid casts.
15420 * src/state.h (state_number_as_int): Likewise.
15421 * src/tables.c (state_number_to_vector_number,
15422 symbol_number_to_vector_number): Likewise.
15423
15424 * src/gram.h (int_of_rule_number): Remove; no longer used.
15425
15426 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
15427 since the resulting storage is always stored into.
15428
15429 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
15430 where it's needed.
15431
15432 * src/muscle_tab.c (muscle_m4_output):
15433 Now inline. Return bool, not int.
15434 * src/state.c (state_compare): Likewise.
15435 * src/symtab.c (symbol_check_defined,
15436 symbol_check_alias_consistency, symbol_pack, symbol_translation,
15437 hash_compare_symbol, hash_symbol):
15438 Likewise.
15439 * src/uniqstr.c (uniqstr_print): Likewise.
15440 * src/muscle_tab.c (muscle_m4_output_processor):
15441 New function, to avoid casts.
15442 * src/state.c (state_comparator, stage_hasher): Likewise.
15443 * src/symtab.c (symbol_check_defined_processor,
15444 symbol_check_alias_consistency_processor, symbol_pack_processor,
15445 symbol_translation_processor, hash_symbol_comparator,
15446 hash_symbol_hasher): Likewise.
15447 * src/uniqstr.c (uniqstr_print_processor): Likewise.
15448 * src/muscle_tab.c (muscles_m4_output):
15449 Use new functions instead of casting old functions unportably.
15450 * src/state.c (state_hash_new): Likewise.
15451 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
15452 symbols_token_translations_init):
15453 Likewise.
15454 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
15455
15456 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
15457 var instead of casting to long, to avoid casts.
15458 (prepare_states): Use MALLOC rather than alloca, so that we don't
15459 have to worry about alloca.
15460 * src/state.c (state_hash_lookup): Likewise.
15461
15462 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
15463 local var instead of casting to unsigned char, to avoid casts.
15464
15465 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
15466 STATE_ALLOC): Remove.
15467 (transitions_new, errs_new, reductions_new, state_new): Use malloc
15468 rather than calloc, and use offsetof to avoid allocating slightly
15469 too much storage.
15470 (state_new): Initialize all members.
15471
15472 * src/state.c (state_hash): Use unsigned accumulator, not signed.
15473
15474 * src/symtab.c (symbol_free): Remove; unused.
15475 (symbol_get): Remove cast in lhs of assignment.
15476 (symbols_do): Now static. Accept generic arguments, not
15477 hashing-related ones.
15478
15479 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
15480 (symbol_processor): Remove.
15481 (symbols_do): Remove decl; now static.
15482
15483 * src/system.h (alloca): Remove; decl no longer needed.
15484 (<stddef.h>): Include, for offsetof.
15485 (<inttypes.>, <stdint.h>): Include if available.
15486 (uintptr_t): New type, if system lacks it.
15487 (CALLOC, MALLOC, REALLOC): New macros.
15488 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
15489 new macros.
15490
15491 * src/tables.c (table_size): Now int, to pacify GCC.
15492 (table_grow, table_ninf_remap): Use signed table size.
15493 (save_row): Don't bother initializing locals when not needed.
15494 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
15495 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
15496
15497 * src/vcg.h: Correct misspellings.
15498
15499 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
15500
15501
15502 * src/getargs.c (getargs): Don't assume EOF == -1.
15503
15504 2002-12-09 Paul Eggert <eggert@twinsun.com>
15505
15506 Change identifier spellings to avoid collisions with names
15507 that are reserved by POSIX.
15508
15509 Don't use names ending in _t, since POSIX reserves them.
15510 For consistency, remove _e and _s endings -- they're weren't
15511 needed to remove ambiguity. All uses changed.
15512 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
15513 turn was just renamed from struniq_t.
15514 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
15515 which in turn was just renamed from struniq_processor_t.
15516 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
15517 in turn was renamed from hash_compare_struniq_t.
15518 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
15519 (state_list): Renamed from state_list_t.
15520 * src/assoc.h (assoc): Renamed from assoc_t.
15521 * src/conflicts.c (enum conflict_resolution): Renamed from
15522 enum conflict_resolution_e.
15523 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
15524 (rule_list): Renamed from rule_list_t.
15525 * src/getargs.h (enum trace): Renamed from enum trace_e.
15526 (enum report): Renamed from enum report_e.
15527 * src/gram.h (item_number): Renamed from item_number_t.
15528 (rule_number): Renamed from rule_number_t.
15529 (struct rule_s): Remove the "rule_s" part; not used.
15530 (rule): Renamed from rule_t.
15531 (rule_filter): Renamed from rule_filter_t.
15532 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
15533 (goto_list): Renamed from goto_list_t.
15534 * src/lalr.h (goto_number): Renamed from goto_number_t.
15535 * src/location.h (location): Renamed from location_t.
15536 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
15537 and moved here from:
15538 * src/muscle_tab.h (muscle_entry_t): here.
15539 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
15540 (rule_list): Renamed from rule_list_t.
15541 * src/print_graph.c (static_graph): Renamed from graph.
15542 * src/reader.h (braced_code): Renamed from braced_code_t.
15543 Remove brace_code_e tag.
15544 * src/relation.h (relation_node): Renamed from relation_node_t.
15545 (relation_nodes): Renamed from relation_nodes_t.
15546 (relation): Renamed from relation_t.
15547 * src/state.h (state_number): Renamed from state_number_t.
15548 (struct state): Renamed from struct state_s.
15549 (state): Renamed from state_t.
15550 (transitions): Renamed from transitions_t. Unused (and
15551 misspelled) transtion_s tag removed.
15552 (errs): Renamed from errs_t. Unused errs_s tag removed.
15553 (reductions): Renamed from reductions_t. Unused tag
15554 reductions_s removed.
15555 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
15556 (struct symbol_list): Renamed from struct symbol_list_s.
15557 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
15558 (struct symbol): Renamed from struct symbol_s.
15559 (symbol): Renamed from symbol_t.
15560 * src/tables.c (vector_number): Renamed from vector_number_t.
15561 (action_number): Renamed from action_t.
15562 * src/tables.h (base_number): Renamed from base_t.
15563 * src/vcg.h (enum color): Renamed from enum color_e.
15564 (enum textmode): Renamed from enum textmode_e.
15565 (enum shape): Renamed from enum shape_e.
15566 (struct colorentry): Renamed from struct colorentry_s.
15567 (struct classname): Renamed from struct classname_s.
15568 (struct infoname): Renamed from struct infoname_s.
15569 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
15570 (enum decision): Renamed from enum decision_e.
15571 (enum orientation): Renamed from enum orientation_e.
15572 (enum alignment): Renamed from enum alignment_e.
15573 (enum arrow_mode): Renamed from enum arrow_mode_e.
15574 (enum crossing_type): Renamed from enum crossing_type_e.
15575 (enum view): Renamed from enum view_e.
15576 (struct node): Renamed from struct node_s.
15577 (node): Renamed from node_t.
15578 (enum linestyle): Renamed from enum linestyle_e.
15579 (enum arrowstyle): Renamed from enum arrowstyle_e.
15580 (struct edge): Renamed from struct edge.
15581 (edge): Renamed from edge_t.
15582 (struct graph): Renamed from struct graph_s.
15583 (graph): Renamed from graph_t.
15584 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
15585 Rename value_t -> value.
15586 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
15587 value_t_as_yystype -> value_as_yystype.
15588
15589 Don't include <errno.h> in the mainstream code, since it
15590 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
15591 * lib/get-errno.c, lib/get-errno.h: New files.
15592 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
15593 get-errno.c.
15594 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
15595 * src/output.c (output_skeleton): Likewise.
15596 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
15597 instead of errno.
15598 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
15599 Likewise.
15600 (handle_action_dollar, handle_action_at): Likewise.
15601 * src/system.h: Do not include <errno.h>.
15602 (TAB_EXT): Renamed from EXT_TAB.
15603 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
15604
15605 Avoid str[a-z]*, since <string.h> reserves that name space.
15606 Change all instances of "struniq" in names to "uniqstr", and
15607 likewise for "STRUNIQ" and "UNIQSTR".
15608 * src/uniqstr.c: Renamed from src/struniq.c.
15609 * src/uniqstr.h: Renamed from src/struniq.h.
15610 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
15611 * src/files.c (strsuffix): Remove; unused.
15612 (concat2): Renamed from stringappend. Now static.
15613 * src/files.h (strsuffix, stringappend): Remove; unused.
15614 * src/parse-gram.y (<chars>): Renamed from <string>.
15615 (<uniqstr>): Renamed from <struniq>.
15616 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
15617 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
15618 (struct graph_s.expand): Renamed from struct graph_s.stretch.
15619 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
15620 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
15621 (N_EXPAND): Renamed from N_STRETCH.
15622
15623 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
15624 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
15625 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
15626 Remove; unused.
15627 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
15628 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
15629 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
15630 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
15631 (BASE_MAXIMUM): Renamed from BASE_MAX.
15632 (BASE_MINIMUM): Renamed from BASE_MIN.
15633 (ACTION_MAX): Remove; unused.
15634 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
15635 Unnecessary casts removed from above defines.
15636
15637
15638 Fix misspelling in names.
15639 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
15640 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
15641 G_NODE_ALIGNEMENT.
15642
15643
15644 * lib/timevar.c (timevar_report): Renamed from time_report,
15645 for consistency with other names.
15646 * lib/timevar.h (timevar_report): New decl.
15647 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
15648
15649
15650 Sort include-file uses.
15651
15652 Reorder all include files under src to be in the order "system.h".
15653 then the ../lib include files in angle brackets (alphabetized),
15654 then the . include files in double-quotes (alphabetized). Fix
15655 dependency breakages encountered in this process, as follows:
15656 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
15657 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
15658 * src/state.h: Include "symtab.h".
15659
15660 2002-12-08 Paul Eggert <eggert@twinsun.com>
15661
15662 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
15663 since this causes problems when __file__ contains character
15664 sequences like "@" that are treated specially by src/scan-skel.l.
15665 Instead, just use the file's basename. This fixes the bug
15666 reported by Martin Mokrejs in
15667 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
15668
15669 2002-12-06 Paul Eggert <eggert@twinsun.com>
15670
15671 Add support for rules that do not have trailing semicolons, as
15672 POSIX requires. Improve the quality of locations in Bison
15673 diagnostics.
15674
15675 * src/location.c: Include <quotearg.h>.
15676 (empty_location): Now const.
15677 (location_print): New function. Follow the recommendation of the
15678 GNU Coding Standards for locations that span file boundaries.
15679 * src/location.h: Do not include <quotearg.h>; no longer needed.
15680 (boundary): New type.
15681 (location_t): Use it. This allows locations to span file boundaries.
15682 All member uses changed: file -> start.file or end.file (as needed),
15683 first_line -> start.line, first_column -> start.column,
15684 last_line -> end.line, last_column -> end.column.
15685 (equal_boundaries): New function.
15686 (LOCATION_RESET, LOCATION_STEP): Remove.
15687 (LOCATION_PRINT): Remove. All callers changed to use location_print.
15688 (empty_location): Now const.
15689 (location_print): New decl.
15690 * src/parse-gram.y (lloc_default): New function, which handles
15691 empty locations more accurately.
15692 (YYLLOC_DEFAULT): Use it.
15693 (%token COLON): Remove.
15694 (%token ID_COLON): New token.
15695 (rules): Use it.
15696 (declarations, rules): Remove trailing semicolon.
15697 (declaration, rules_or_grammar_declaration):
15698 Allow empty (";") declaration.
15699 (symbol_def): Remove empty actions; no longer needed.
15700 (rules_or_grammar_declaration): Remove trailing semicolon.
15701 (semi_colon.opt): Remove.
15702 * src/reader.h: Include location.h.
15703 (scanner_cursor): New decl.
15704 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
15705 rolling our own.
15706 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
15707 of *loc.
15708 (STEP): Remove. No longer needed, now that adjust_location does
15709 the work. All uses removed.
15710 (scanner_cursor): New var.
15711 (adjust_location): Renamed from extend_location. It now sets
15712 *loc and adjusts the scanner cursor. All uses changed.
15713 Don't bother testing for CR.
15714 (handle_syncline): Remove location arg; now updates scanner cursor.
15715 All callers changed.
15716 (unexpected_end_of_file): Now accepts start boundary of token or
15717 comment, not location. All callers changed. Update scanner cursor,
15718 not the location.
15719 (SC_AFTER_IDENTIFIER): New state.
15720 (context_state): Renamed from c_context. All uses changed.
15721 (id_loc, code_start, token_start): New local vars.
15722 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
15723 processing of Yacc white space and equivalents here.
15724 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
15725 instead of returning ID immediately, since we need to search for
15726 a subsequent colon.
15727 (<INITIAL>"'", "\""): Save token_start.
15728 (<INITIAL>"%{", "{", "%%"): Save code_start.
15729 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
15730 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
15731 BEGIN context_state at end, not INITIAL.
15732 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
15733 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
15734 Return correct token start.
15735 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
15736 the start of a character, string or multiline comment is found.
15737 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
15738 Reduction): Adjust reported locations to match the more-precise
15739 results now expected.
15740 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
15741 * tests/reduce.at (Useless Rules, Reduced Automaton,
15742 Underivable Rules): Likewise.
15743 * tests/regression.at (Invalid inputs): No longer `expecting ";"
15744 or "|"' now that so many other tokens are allowed by the new grammar.
15745
15746 * src/complain.h (current_file): Remove duplicate decl;
15747 current_file is now owned by files.h.
15748 * src/complain.c, src/scan-gram.l: Include files.h.
15749
15750 2002-12-06 Paul Eggert <eggert@twinsun.com>
15751
15752 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
15753 promotes to int; it might be unsigned int.
15754 * data/yacc.c (yy_reduce_print): Likewise.
15755
15756 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
15757 be #defined in the prologue, not in the Bison declarations.
15758 This fixes Debian Bug 102878, reported by Shaul Karl.
15759
15760 2002-12-02 Paul Eggert <eggert@twinsun.com>
15761
15762 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
15763 * lib/strtoul.c: New file, from gnulib.
15764 This fixes a porting bug reported by Peter Klein in
15765 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
15766
15767 2002-11-30 Paul Eggert <eggert@twinsun.com>
15768
15769 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
15770 and put only a forward declaration in the prologue. This is for
15771 consistency with the other scanner helper functions.
15772
15773 Type clashes now generate warnings, not errors, since it
15774 appears that POSIX may allow some grammars with type clashes.
15775 * src/reader.c (grammar_current_rule_check): Warn about
15776 type clashes instead of complaining.
15777 * tests/input.at (Type Clashes): Expect warnings, not complaints.
15778
15779 Add Yacc library, since POSIX requires it.
15780 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
15781 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
15782 * lib/main.c, lib/yyerror.c: New files.
15783
15784 gram_error can be static; it need not be extern.
15785 * src/reader.h (gram_error): Remove decl.
15786 * src/parse-gram.y (gram_error): Now static. Add static decl.
15787 (print_token_value): Omit parameter names from forward decl,
15788 for consistency.
15789
15790 2002-11-29 Paul Eggert <eggert@twinsun.com>
15791
15792 * doc/bison.texinfo: Emphasize that yylex and yyerror must
15793 be declared before being used. E.g., one should typically
15794 declare them in the prologue. Use GNU coding style in examples.
15795 Put "const" consistently after the type it modifies. Mention
15796 that C99 supports "inline". Mention that yyerror traditionally
15797 returns "int".
15798
15799 %parse-param and %lex-param now take just one argument, the
15800 declaration; the argument name is deduced from the declaration.
15801
15802 * doc/bison.texinfo (Parser Function, Pure Calling, Error
15803 Reporting, Table of Symbols): Document this.
15804 * src/parse-gram.y (add_param): New function.
15805 (COMMA): Remove.
15806 (declaration): Implement new rule for %parse-param and %lex-param.
15807 * src/scan-gram.l: "," now elicits a warning, rather than being
15808 a token; this is more compatible with byacc.
15809 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
15810
15811 2002-11-27 Paul Eggert <eggert@twinsun.com>
15812
15813 Rename identifiers to avoid real and potential collisions.
15814
15815 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
15816 to avoid collision with lex macro described by Bruce Lilly in
15817 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
15818 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
15819 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
15820 * src/parse-gram.y (print_token_value): Renamed from yyprint.
15821 All uses changed.
15822 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
15823 The name "yycontrol" violates the name space rules, and this stuff
15824 wasn't being used anyway.
15825 (input): Remove action; this stuff wasn't being used.
15826 (gram_error): Rename local variable yylloc -> loc.
15827 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
15828 (YY_DECL): Don't use "yy" at start of local variables.
15829 All uses changed, e.g., yylloc -> loc.
15830 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
15831 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
15832 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
15833 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
15834
15835 * src/parse-gram.y (gram_error): loc is now const *.
15836 * src/reader.h (gram_error): Likewise.
15837
15838 2002-11-24 Paul Eggert <eggert@twinsun.com>
15839
15840 Version 1.75c.
15841
15842 * tests/actions.at (Actions after errors): Use an output format
15843 more similar to that of the Printers and Destructors test.
15844 Test the position of the ';' token too.
15845 (Printers and Destructors): Likewise.
15846 (Printers and Destructors: %glr-parser): Remove for now, to avoid
15847 unnecessarily alarming people when the test fails.
15848
15849 * data/yacc.c (yyerrlab1): Move this label down, so that the
15850 parser does not discard the lookahead token if the user code
15851 invokes YYERROR. This change is required for POSIX conformance.
15852
15853 * lib/error.c: Sync with gnulib.
15854
15855 2002-11-22 Paul Eggert <eggert@twinsun.com>
15856
15857 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
15858 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
15859 * lib/xmalloc.c: Likewise.
15860
15861 2002-11-20 Paul Eggert <eggert@twinsun.com>
15862
15863 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
15864
15865 2002-11-20 Paul Eggert <eggert@twinsun.com>
15866
15867 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
15868 should use `if (! x) abort ();' rather than `assert (x);', and
15869 anyway it's one less thing to worry about configuring.
15870
15871 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
15872 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
15873 and replace all instances of assert with abort.
15874 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
15875 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
15876
15877 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
15878 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
15879 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
15880 hash_find_entry, hash_rehash, hash_insert): Likewise.
15881 * src/conflicts.c (resolve_sr_conflict): Likewise.
15882 * src/lalr.c (set_goto_map, map_goto): Likewise.
15883 * src/nullable.c (nullable_compute): Likewise.
15884 * src/output.c (prepare_rules, token_definitions_output): Likewise.
15885 * src/reader.c (packgram, reader): Likewise.
15886 * src/state.c (state_new, state_free, state_transitions_set,
15887 state_reduction_find): Likewise.
15888 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
15889 symbol_pack): Likewise.
15890 * src/tables.c (conflict_row, pack_vector): Likewise.
15891 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
15892 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
15893 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
15894 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
15895
15896 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
15897 (ARGMATCH_CONSTRAINT): New macro.
15898 (ARGMATCH_ASSERT): Use it.
15899
15900 * src/system.h (verify): New macro.
15901 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
15902 rather than assert.
15903 * src/tables.c (tables_generate): Likewise.
15904
15905 * src/struniq.c (struniq_assert): Now returns void, and aborts
15906 if the assertion is false.
15907 (struniq_assert_p): Remove.
15908 * src/struniq.h: Likewise.
15909
15910 2002-11-18 Paul Eggert <eggert@twinsun.com>
15911
15912 * data/glr.c (yygetLRActions): Replace `yyindex' with
15913 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
15914 This fixes the regression with Sun ONE Studio 7 cc that I reported in
15915 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
15916
15917 2002-11-18 Akim Demaille <akim@epita.fr>
15918
15919 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
15920 space.
15921 From Tim Van Holder.
15922
15923 2002-11-17 Paul Eggert <eggert@twinsun.com>
15924
15925 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
15926 to "SyntaxError" for consistency with my 2002-11-15 change.
15927
15928 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
15929 not define to {}, since this breaks the common use of `YYDPRINTF
15930 ((...));' if a single statement is desired (e.g. before `else').
15931 Work around GCC warnings by surrounding corresponding calls with
15932 {} if needed.
15933 (yyhasResolvedValue): Remove unused function.
15934 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
15935 loop body.
15936 (yyreportSyntaxError): Renamed from yyreportParseError.
15937 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
15938 All uses changed.
15939 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
15940 extern when possible. Remove unused initializations.
15941
15942 2002-11-16 Akim Demaille <akim@epita.fr>
15943
15944 Augment the similarity between GLR and LALR traces.
15945
15946 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
15947 (YY_REDUCE_PRINT): New.
15948 (yyparse): Use them.
15949 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
15950 YYDPRINT here.
15951 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
15952 state reached after the reduction/recovery, since...
15953 (yyparse, yyprocessOneStack): Report the state we are entering in.
15954
15955 2002-11-16 Akim Demaille <akim@epita.fr>
15956
15957 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
15958 Add support for --trace=skeleton.
15959 * src/scan-skel.l: %option debug.
15960 Scan strings of non-@ or \n instead of character by character.
15961 (scan_skel): Handle trace_skeleton.
15962 (QPUTS): New.
15963 (@output_parser_name@, @output_header_name@): ``Restore'' their
15964 support (used to be M4 macros).
15965 * data/yacc.c: Quote larger chunks, a la glr.c.
15966 * data/lalr1.cc: Likewise.
15967 The header guards are no longer available, so use some other
15968 string than `YYLSP_NEEDED'.
15969
15970 2002-11-16 Akim Demaille <akim@epita.fr>
15971
15972 Make the ``Printers and Destructors'' test more verbose, taking
15973 `yacc.c''s behavior as (possibly wrong) reference.
15974
15975 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
15976 instead of fprint on stdout.
15977 Set and report the last_line of the symbols.
15978 Consistently display values and locations.
15979
15980 2002-11-16 Paul Eggert <eggert@twinsun.com>
15981
15982 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
15983
15984 2002-11-15 Paul Eggert <eggert@twinsun.com>
15985
15986 * tests/actions.at (Actions after errors): New test case.
15987
15988 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
15989 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
15990 tests/action.at, tests/calc.at, tests/conflicts.at,
15991 tests/cxx-type.at, tests/regression.at:
15992 "parse error" -> "syntax error" for POSIX compatibility.
15993 "parsing stack overflow..." -> "parser stack overflow" so
15994 that code matches Bison documentation.
15995
15996 2002-11-15 Akim Demaille <akim@epita.fr>
15997
15998 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
15999 take two BRACED_CODE, not two string_content.
16000 Free the scanner's obstack when we are done.
16001 (code_content): New.
16002 * tests/calc.at: Adjust.
16003 * doc/bison.texinfo: Adjust.
16004 Also, make sure to include the `,' for these declarations.
16005
16006 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
16007
16008 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
16009 definition; avoids potential autoreconf problems.
16010
16011 2002-11-15 Akim Demaille <akim@epita.fr>
16012
16013 Always check the value returned by yyparse.
16014
16015 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
16016 returned by yyparse.
16017 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
16018 Adjust calls.
16019 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
16020 returned by yyparse.
16021
16022 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16023
16024 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
16025 on input.at test.
16026
16027 2002-11-14 Paul Eggert <eggert@twinsun.com>
16028
16029 * src/output.c (output_skeleton): Call xfopen instead of
16030 duplicating xfopen's body.
16031
16032 Fix bugs reported by Nelson H. F. Beebe in
16033 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
16034
16035 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
16036 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
16037 Group compiler. Instead, use "$CC -E bar.c". Include the .h
16038 file twice in the grammar, as an extra check.
16039
16040 * tests/input.at (Torturing the Scanner): Surround the
16041 backslash-newline tests with "#if 0", to make it less likely that
16042 we'll run into compiler bugs. Bring back solitary \ inside
16043 comment, but add a closing comment to work around HP C bug. Don't
16044 test backslash-newline in C character constant.
16045
16046 2002-11-14 Akim Demaille <akim@epita.fr>
16047
16048 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
16049 status of the compiler.
16050 Calling `exit 1' is no longer needed.
16051 Reported by Nelson H. F. Beebe.
16052
16053 2002-11-14 Akim Demaille <akim@epita.fr>
16054
16055 * tests/atlocal.in (CPPFLAGS): We have config.h.
16056 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
16057 New.
16058 * tests/actions.at, tests/calc.at, tests/conflicts.at,
16059 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
16060 * tests/regression.at, tests/torture.at: Use them for all the
16061 grammars that are to be compiled.
16062 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
16063 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
16064 * doc/bison.texinfo (GLR Parsers): Document `inline'.
16065
16066 2002-11-14 Akim Demaille <akim@epita.fr>
16067
16068 * doc/bison.texinfo: Various formatting changes (alignments in
16069 samples, additional @group/@end group, GCS in samples.
16070 Use @deffn instead of simple @table to define the directives,
16071 macros, variables etc.
16072
16073 2002-11-13 Paul Eggert <eggert@twinsun.com>
16074
16075 Fix some bugs reported by Albert Chin-A-Young in
16076 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
16077
16078 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
16079 -o c"; the HP C compiler chatters during compilation.
16080 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
16081 * tests/headers.at (export YYLTYPE): Likewise.
16082
16083 * tests/input.at (Torturing the Scanner): Remove lines containing
16084 solitary backslashes, as they tickle a bug in the HP C compiler.
16085
16086 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
16087 comments, since they're not portable. Use GNU coding style.
16088
16089 2002-11-13 Akim Demaille <akim@epita.fr>
16090
16091 * data/yacc.c: Leave bigger chunks of quoted text.
16092 (YYDSYMPRINTF): New.
16093 Use it to report symbol activities.
16094 * data/glr.c (YYDSYMPRINTF): New.
16095 Use it.
16096
16097 2002-11-12 Paul Eggert <eggert@twinsun.com>
16098
16099 Version 1.75b.
16100
16101 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
16102 (yyglrReduce): Return yyok, not 0.
16103 This should avoid the enumerated-type warnings reported
16104 by Nelson H. F. Beebe in
16105 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
16106
16107 * lib/bbitset.h (BITSET_INLINE): Remove.
16108 * lib/bitset.h [! BITSET_INLINE]: Remove.
16109 (bitset_set, bitset_reset, bitset_test): Rename local vars
16110 to avoid shadowing warnings by GCC.
16111
16112 * data/glr.c (inline): Remove #define. It's the user's
16113 responsibility to #define it away, just like 'const'.
16114 This fixes one of the bugs reported by Nelson H. F. Beebe in
16115 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
16116
16117 * Makefile.maint (po-check): Scan .l and .y files instead of the
16118 .c and the .h files that they generate. This fixes the bug
16119 reported by Tim Van Holder in:
16120 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
16121 Look for N_ as well as for _. Try to avoid matching #define for
16122 N_ and _.
16123 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
16124 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
16125 * src/scan-gram.l: Revamp regular expressions so that " and '
16126 do not confuse xgettext.
16127
16128 * src/struniq.h (struniq_new): Do not declare the return type
16129 to be 'const'; this violates the C standard.
16130 * src/struniq.c (struniq_new): Likewise.
16131
16132 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
16133
16134 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
16135 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
16136 linker.
16137
16138 2002-11-12 Akim Demaille <akim@epita.fr>
16139
16140 * Makefile.maint: Sync with Autoconf:
16141 (local_updates): New.
16142
16143 2002-11-12 Akim Demaille <akim@epita.fr>
16144
16145 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
16146
16147 2002-11-12 Akim Demaille <akim@epita.fr>
16148
16149 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
16150 locations.
16151
16152 2002-11-12 Akim Demaille <akim@epita.fr>
16153
16154 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
16155 not yyvalue.
16156
16157 2002-11-12 Akim Demaille <akim@epita.fr>
16158
16159 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
16160 Use it to test the GLR parser.
16161
16162 2002-11-12 Akim Demaille <akim@epita.fr>
16163
16164 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
16165 defines it.
16166 * data/glr.c (yystos): New.
16167 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
16168 (YYDSYMPRINT): New.
16169 (yyval): Don't define it, it is handled via M4.
16170 (yyrecoverParseError): Free verbosely the discarded symbols.
16171 * data/yacc.c (yysymprint): Remove, rather...
16172 (b4_yysymprint_generate): invoke.
16173 * data/c.m4 (b4_yysymprint_generate): New.
16174 Accept pointers as arguments, as opposed to the version from
16175 yacc.c.
16176 (b4_yydestruct_generate): Likewise.
16177 * tests/cations.at (Printers and Destructors): Use Bison directives
16178 instead of CPP macros.
16179 Don't rely on internal details.
16180
16181 2002-11-12 Akim Demaille <akim@epita.fr>
16182
16183 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
16184 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
16185 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
16186 it against YYEMPTY and so forth), work on yytoken (i.e., set
16187 it to YYEMPTY etc.).
16188 (yydestruct): Replace with a b4_yydestruct_generate invocation.
16189 (b4_symbol_actions): Remove.
16190 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
16191 for 0, end-of-input.
16192
16193 2002-11-12 Akim Demaille <akim@epita.fr>
16194
16195 * doc/bison.texinfo (Destructor Decl): New.
16196
16197 2002-11-12 Akim Demaille <akim@epita.fr>
16198
16199 * src/tables.c (tables_generate): Use free for pointers that
16200 cannot be NULL, not XFREE.
16201 (pack_vector): Use assert, not fatal, for bound violations.
16202 * src/state.c (state_new): Likewise.
16203 * src/reader.c (reader): Likewise.
16204 * src/lalr.c (set_goto_map): Likewise.
16205 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
16206 the file name.
16207
16208 2002-11-12 Akim Demaille <akim@epita.fr>
16209
16210 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
16211 Restore.
16212 * src/scan-gram.l (last_string): Is global to the file, not to
16213 yylex.
16214 * src/parse-gram.y (input): Don't append the epilogue here,
16215 (epilogue.opt): do it here, and free the scanner's obstack.
16216 * src/reader.c (epilogue_set): Rename as...
16217 (epilogue_augment): this.
16218 * data/c.m4 (b4_epilogue): Defaults to empty.
16219
16220 2002-11-12 Akim Demaille <akim@epita.fr>
16221
16222 * src/getargs.c (long_options): Remove duplicates.
16223 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
16224 Remove.
16225 * doc/bison.rnh: Remove.
16226 * doc/bison.texinfo (VMS Invocation): Remove.
16227
16228 2002-11-12 Akim Demaille <akim@epita.fr>
16229
16230 * src/struniq.h, src/struniq.c (struniq_t): Is const.
16231 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
16232
16233 Use struniq for symbols.
16234
16235 * src/symtab.h (symbol_t): The tag member is a struniq.
16236 (symbol_type_set): Adjust.
16237 * src/symtab.c (symbol_new): Takes a struniq.
16238 (symbol_free): Don't free the tag member.
16239 (hash_compare_symbol_t, hash_symbol_t): Rename as...
16240 (hash_compare_symbol, hash_symbol): these.
16241 Use the fact that tags as struniqs.
16242 (symbol_get): Use struniq_new.
16243 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
16244 Returns a strniq.
16245 * src/reader.h (merger_list, grammar_currentmerge_set): The name
16246 and type members are struniqs.
16247 * src/reader.c (get_merge_function)
16248 (grammar_current_rule_merge_set): Adjust.
16249 (TYPE, current_type): Are struniq.
16250
16251 Use struniq for file names.
16252
16253 * src/files.h, src/files.c (infile): Split into...
16254 (grammar_file, current_file): these.
16255 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
16256 * src/reduce.c (reduce_print): Likewise.
16257 * src/getargs.c (getargs): Likewise.
16258 * src/complain.h, src/complain.c: Likewise.
16259 * src/main.c (main): Call struniqs_new early enough to use it for
16260 file names.
16261 Don't free the input file name.
16262
16263 2002-11-12 Akim Demaille <akim@epita.fr>
16264
16265 * src/symtab.c (symbol_free): Remove dead deactivated code:
16266 type_name are properly removed.
16267 Don't use XFREE to free items that cannot be NULL.
16268 * src/struniq.h, src/struniq.c: New.
16269 * src/main.c (main): Initialize/free struniqs.
16270 * src/parse-gram.y (%union): Add astruniq member.
16271 (yyprint): Adjust.
16272 * src/scan-gram.l (<{tag}>): Return a struniq.
16273 Free the obstack bit that used to store it.
16274 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
16275
16276 2002-11-11 Paul Eggert <eggert@twinsun.com>
16277
16278 Revamp to fix many (but not all) of the C- and M4-related quoting
16279 problems. Among other things, this fixes the Bison bug reported
16280 by Jan Hubicka when processing the Bash grammar; see:
16281 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
16282
16283 Use new @ escapes consistently. Represent brackets with @{ and @}
16284 rather than @<:@ and @:>@, since this works a bit better with dumb
16285 editors like vi. Represent @ with @@, since @ is now consistently
16286 an escape. Use @oline@ and @ofile@ rather than __oline__ and
16287 __ofile__, to avoid unexpected expansions. Similarly, use @output
16288 rather than #output.
16289
16290 * data/c.m4 (b4_copyright): Omit file name from comment, since
16291 the file name could contain "*/".
16292 (b4_synclines_flag): Don't quote the 2nd argument; it should already
16293 be quoted. All uses changed.
16294
16295 * data/glr.c: Use new @ escapes consistently.
16296 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
16297 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
16298 Remove, since they couldn't handle arbitrary characters in file
16299 names.
16300 * data/lalr1.cc: Likewise.
16301 * data/yacc.c: Likewise.
16302
16303 * src/files.c (output_infix): Remove; all uses removed.
16304 * src/files.h: Likewise.
16305
16306 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
16307 mishandled funny characters in file names, and anyway it isn't
16308 needed any more.
16309 * data/yacc.c: Likewise.
16310 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
16311
16312 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
16313 * data/yacc.c: Likewise.
16314
16315 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
16316 strings now.
16317 (muscle_init): Quote filename as a C string.
16318 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
16319 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
16320 * src/output.c (escaped_file_name_output): New function.
16321 (prepare_symbols): Quote tokens for M4.
16322 (prepare): Don't insert output_infix, output_prefix,
16323 output_parser_name, output_header_name; this is now down by scan-skel.
16324 Insert skeleton as a C string.
16325
16326 * src/output.c (user_actions_output, symbol_destructors_output,
16327 symbol_printers_output): Quote filenames for C and M4.
16328 * src/reader.c (prologue_augment, epilogue_set): Likewise.
16329
16330 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
16331 escapes other than \\ and \'; this simplifies the code.
16332 (<SC_STRING>): Likewise, for \\ and \".
16333 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
16334 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
16335 Use new escapes @{ and @} for [ and ].
16336
16337 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
16338 them with auto vars.
16339 Switch to new escape scheme, where @ is the escape character uniformly.
16340 Abort if a stray escape character is found. Avoid unbounded input
16341 buffer when parsing non-escaped text.
16342
16343 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
16344 __oline__, #output, $@, and @{ do not have unintended meanings.
16345
16346 2002-11-09 Paul Eggert <eggert@twinsun.com>
16347
16348 Fix the test failure due to GCC warnings described in
16349 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
16350 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
16351 evaluate to 0 if it's impossible for NINF to be in the respective
16352 table.
16353 (yygetLRActions, yyrecoverParseError): Use them.
16354
16355 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
16356 counted in the token inserted at end of file. Now takes
16357 location_t *, not location_t, so that the location can be
16358 adjusted. All uses changed.
16359
16360 * tests/regression.at (Invalid inputs): Adjust wording in
16361 diagnostic to match the new behavior.
16362
16363 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
16364 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
16365 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
16366 abort ();'. This reduces the runtime of the "Many lookaheads"
16367 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
16368 GCC 3.2.
16369
16370 2002-11-07 Paul Eggert <eggert@twinsun.com>
16371
16372 * src/parse-gram.y (CHARACTER): Remove unused token.
16373 All uses removed.
16374
16375 * src/scan-gram.l: Remove stack option. We no longer use the
16376 stack, since the stack was never deeper than 1; instead, use the
16377 new auto var c_context to record the stacked value.
16378
16379 Remove nounput option. At an unexpected end of file, we now unput
16380 the minimal input necessary to end cleanly; this simplifies the
16381 code.
16382
16383 Avoid unbounded token sizes where this is easy.
16384
16385 (unexpected_end_of_file): New function.
16386 Use it to systematize the error message on unexpected EOF.
16387 (last-string): Now auto, not static.
16388 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
16389 (scanner_last_string_free): Remove; not used.
16390 (percent_percent_count): Move decl to just before use.
16391 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
16392 not the (never otherwised-used) CHARACTER.
16393
16394 2002-11-07 Akim Demaille <akim@epita.fr>
16395
16396 Let yyerror always receive the msg as last argument, so that
16397 yyerror can be variadic.
16398
16399 * data/yacc.c (b4_yyerror_args): New.
16400 Use it when calling yyerror.
16401 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
16402 Use it when calling yyerror.
16403 * doc/bison.texinfo (Error Reporting): Adjust.
16404 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
16405 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
16406
16407 2002-11-06 Akim Demaille <akim@epita.fr>
16408
16409 #line should have quoted strings.
16410 Ideally, this should be done by m4_quotearg.
16411
16412 * src/scan-skel.l: Include quotearg.h.
16413 Quote __ofile__.
16414 * src/output.c (symbol_printers_output)
16415 (symbol_destructors_output): Quote the file name.
16416
16417 2002-11-06 Akim Demaille <akim@epita.fr>
16418
16419 * tests/regression.at (Invalid inputs): Adjust to the recent
16420 messages.
16421
16422 2002-11-06 Akim Demaille <akim@epita.fr>
16423
16424 Restore --no-lines.
16425 Reported by Jim Kent.
16426
16427 * data/c.m4 (b4_syncline): New.
16428 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
16429 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
16430 * src/output.c (user_actions_output): Likewise.
16431 (prepare): Define 'b4_synclines_flag'.
16432 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
16433
16434 2002-11-06 Akim Demaille <akim@epita.fr>
16435
16436 * src/main.c (main): Free `infile'.
16437 * src/scan-gram.l (handle_syncline): New.
16438 Recognize `#line'.
16439 * src/output.c (user_actions_output, symbol_destructors_output)
16440 (symbol_printers_output): Use the location's file name, not
16441 infile.
16442 * src/reader.c (prologue_augment, epilogue_set): Likewise.
16443
16444 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16445
16446 * src/tables.c (matching_state): Don't allow states to match if
16447 either has GLR conflict entries.
16448
16449 2002-11-05 Paul Eggert <eggert@twinsun.com>
16450
16451 * src/scan-gram.l: Use more accurate diagnostics, e.g.
16452 "integer out of range" rather than "invalid value".
16453 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
16454 accordingly.
16455
16456 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
16457 Also, remove one static variable in the scanner.
16458
16459 * src/scan-gram.l (braces_level): Now auto, not static.
16460 Initialize to zero if the compiler is being picky.
16461 (INITIAL): Clear braces_level instead of incrementing it.
16462 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
16463 as POSIX 1003.1-2001 requires.
16464 * src/system.h (IF_LINT): New macro, taken from coreutils.
16465 * configure.ac: Define "lint" if --enable-gcc-warnings.
16466
16467 2002-11-05 Akim Demaille <akim@epita.fr>
16468
16469 * src/scan-gram.l: When it starts with `%', complain about the
16470 whole directive, not just that `invalid character: %'.
16471
16472 2002-11-04 Akim Demaille <akim@epita.fr>
16473
16474 * Makefile.maint: Update from Autoconf.
16475 (update, cvs-update, po-update, do-po-update): New.
16476
16477 2002-11-04 Akim Demaille <akim@epita.fr>
16478
16479 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
16480 and yyerror.
16481 Have yyerror `use' its arguments.
16482 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
16483 returns true when location & yacc & pure & parse-param.
16484 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
16485
16486 2002-11-04 Akim Demaille <akim@epita.fr>
16487
16488 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
16489 clashes.
16490 * src/scan-gram.l: Use [\'] instead of ['] to pacify
16491 font-lock-mode.
16492 Use complain_at.
16493 Use quote, not quote_n since LOCATION_PRINT no longer uses the
16494 slot 0.
16495
16496 2002-11-03 Paul Eggert <eggert@twinsun.com>
16497
16498 * src/reader.c (get_merge_function, grammar_current_rule_check):
16499 Use consistent diagnostics for reporting type name clashes.
16500 Quote the types with <>, for consistency with Yacc.
16501 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
16502
16503 2002-11-03 Akim Demaille <akim@epita.fr>
16504
16505 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
16506 New.
16507 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
16508 (b4_parse_param): Remove.
16509 Use b4_identification.
16510 Propagate b4_pure_args where needed to pass them to yyerror.
16511 * data/glr.m4 (b4_parse_param): Remove.
16512 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
16513 (b4_lpure_formals): New.
16514 Use b4_identification.
16515 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
16516 b4_user_formals and b4_user_args.
16517 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
16518 (yyreportAmbiguity): When using a pure parser, also need
16519 the location, and the parse-params.
16520 Adjust callers.
16521 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
16522 When using a pure parser, also need the parse-params.
16523 Adjust callers.
16524 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
16525 (%pure-parser + %parse-param) LALR and GLR parsers.
16526 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
16527 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
16528 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
16529 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
16530 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
16531 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
16532 * doc/bison.texinfo: Untabify the whole file.
16533 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
16534 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
16535 (Error Reporting): Adjust to these new directives.
16536 Document %error-verbose, deprecate YYERROR_VERBOSE.
16537
16538 2002-11-03 Akim Demaille <akim@epita.fr>
16539
16540 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
16541 AT_CHECK_CALC_GLR invocations to use % directives, instead of
16542 command line options.
16543 * tests/cxx-type.at: Formatting changes.
16544
16545 2002-11-03 Paul Eggert <eggert@twinsun.com>
16546
16547 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
16548 to count columns correctly, and to check for invalid inputs.
16549
16550 Use mbsnwidth to count columns correctly. Account for tabs, too.
16551 Include mbswidth.h.
16552 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
16553 (extend_location): New function.
16554 (YY_LINES): Remove.
16555
16556 Handle CRLF in C code rather than in Lex code.
16557 (YY_INPUT): New macro.
16558 (no_cr_read): New function.
16559
16560 Scan UCNs, even though we don't fully handle them yet.
16561 (convert_ucn_to_byte): New function.
16562
16563 Handle backslash-newline correctly in C code.
16564 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
16565 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
16566 all uses changed.
16567 (tag, splice): New EREs. Do not allow NUL or newline in tags.
16568 Use {splice} wherever C allows backslash-newline.
16569 YY_STEP after space, newline, vertical-tab.
16570 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
16571
16572 (letter, id): Don't assume ASCII; e.g., spell out a-z.
16573
16574 ({int}, handle_action_dollar, handle_action_at): Check for integer
16575 overflow.
16576
16577 (YY_STEP): Omit trailing semicolon, so that it's more like C.
16578
16579 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
16580 as well as \000. Check for UCHAR_MAX, not 255.
16581 Allow \x with an arbitrary positive number of digits, as in C.
16582 Check for overflow here.
16583 Allow \? and UCNs, for compatibility with C.
16584
16585 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
16586 with quote slot used by complain_at.
16587
16588 * tests/input.at: Add tests for backslash-newline, m4 quotes
16589 in symbols, long literals, and funny escapes in strings.
16590
16591 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
16592 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
16593 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
16594 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
16595 * m4/mbswidth.m4: New file, from GNU coreutils.
16596
16597 * doc/bison.texinfo (Grammar Outline): Document // comments.
16598 (Symbols): Document that trigraphs have no special meaning in Bison,
16599 nor is backslash-newline allowed.
16600 (Actions): Document that trigraphs have no special meaning.
16601
16602 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
16603 no longer used.
16604
16605 2002-11-02 Paul Eggert <eggert@twinsun.com>
16606
16607 * src/reader.c: Don't include quote.h; not needed.
16608 (get_merge_function): Reword warning to be consistent with
16609 type clash diagnostic in grammar_current_rule_check.
16610
16611 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
16612 bug in trigraph handling.
16613
16614 * src/output.c (prepare_symbols): When printing token names,
16615 escape "[" as "@<:@" and likewise for "]".
16616
16617 * src/system.h (errno): Remove declaration, as we are now
16618 assuming C89 or better, and C89 guarantees errno.
16619
16620 2002-10-30 Paul Eggert <eggert@twinsun.com>
16621
16622 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
16623 Check for close failures.
16624 * src/files.h (xfclose): Return void, not int, since it always
16625 returned zero.
16626 * src/files.c (xfclose): Likewise. Report I/O error if ferror
16627 indicates one.
16628 * src/output.c (output_skeleton): Use xfclose rather than fclose
16629 and ferror. xfclose now checks ferror.
16630
16631 * data/glr.c (YYLEFTMOST_STATE): Remove.
16632 (yyreportTree): Use a stack-based leftmost state. This avoids
16633 our continuing battles with bogus warnings about initializers.
16634
16635 2002-10-30 Akim Demaille <akim@epita.fr>
16636
16637 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
16638 #if.
16639
16640 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16641
16642 * tests/glr-regr1.at: New test for reported regressions.
16643 * tests/testsuite.at: Add glr-regr1.at test.
16644 * tests/Makefile.am: Add glr-regr1.at test.
16645
16646 2002-10-24 Paul Eggert <eggert@twinsun.com>
16647
16648 Version 1.75a.
16649
16650 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
16651 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
16652 we use malloc. Don't assume 'A' through 'Z' are contiguous.
16653 Don't assume strdup exists; POSIX says its an XSI extension.
16654 Check for buffer overflow on input.
16655
16656 2002-10-24 Akim Demaille <akim@epita.fr>
16657
16658 * src/output.c (output_skeleton): Don't disable M4sugar comments
16659 too soon: it results in comments being expanded.
16660 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
16661 first output.
16662
16663 2002-10-24 Akim Demaille <akim@epita.fr>
16664
16665 * data/yacc.c (m4_int_type): New.
16666 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
16667 char' as only yacc.c wants K&R portability.
16668 * data/glr.c (yysigned_char): Remove.
16669 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
16670 Reported by Quoc Peyrot.
16671
16672 2002-10-23 Paul Eggert <eggert@twinsun.com>
16673
16674 * src/main.c (main): With --trace=time, report times even if a
16675 non-fatal error occurs. Formerly, the times were reported in some
16676 such cases but not in others.
16677 * src/reader.c (reader): Just return if a complaint has been issued,
16678 instead of exiting, so that 'main' can report times.
16679
16680 2002-10-22 Akim Demaille <akim@epita.fr>
16681
16682 * src/system.h: Include sys/types.
16683 Reported by Bert Deknuydt.
16684
16685 2002-10-23 Paul Eggert <eggert@twinsun.com>
16686
16687 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
16688 Suggested by Art Haas.
16689
16690 2002-10-22 Paul Eggert <eggert@twinsun.com>
16691
16692 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
16693 decl; not needed any more.
16694 * src/main.c (main): Use return to exit, undoing yesterday's change.
16695 The last OS that we could find where this wouldn't work is
16696 SunOS 3.5, and that's too old to worry about now.
16697
16698 * data/glr.c (struct yyltype): Define members even when not
16699 doing locations. This is more consistent with yacc.c, and it
16700 works around the following bug reports:
16701 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
16702 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
16703
16704 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
16705 @acronym consistently. Standardize on "Yacc" instead of "YACC",
16706 "Algol" instead of "ALGOL". Give a bit more history about BNF.
16707
16708 2002-10-22 Akim Demaille <akim@epita.fr>
16709
16710 * data/README: New.
16711
16712 2002-10-21 Paul Eggert <eggert@twinsun.com>
16713
16714 Be consistent about 'bool'; the old code used an enum in one
16715 module and an int in another, and this violates the C standard.
16716 * m4/stdbool.m4: New file, from coreutils 4.5.3.
16717 * configure.ac (AC_HEADER_STDBOOL): Add.
16718 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
16719 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
16720 * src/symtab.c (hash_compare_symbol_t): Likewise.
16721 * src/system.h (bool, false, true): Use a definition consistent
16722 with ../lib/hash.c. All uses changed.
16723
16724 * src/complain.c (warning_issued): Renamed from warn_message_count,
16725 so that we needn't worry about integer overflow (!).
16726 Now of type bool. All uses changed.
16727 (complaint_issued): Renamed from complain_message_count; likewise.
16728
16729 * src/main.c (main): Use exit to exit with failure.
16730
16731 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
16732 rather than 1 and 0.
16733 * src/main.c (main): Likewise.
16734 * src/getargs.c (getargs): Likewise.
16735 * src/reader.c (reader): Likewise.
16736
16737 * src/getarg.c (getargs): Remove duplicate code for
16738 "Try `bison --help'".
16739
16740 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
16741 What was that "2" for?
16742
16743 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
16744 * src/getargs.c (usage): Likewise.
16745
16746 * src/getargs.c (getargs): When there are too few operands, report
16747 the last one. When there are too many, report the first extra
16748 one. This is how diffutils does it.
16749
16750 2002-10-20 Paul Eggert <eggert@twinsun.com>
16751
16752 Remove K&R vestiges.
16753 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
16754 * src/complain.c (VA_START): Remove. Assume prototypes.
16755 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
16756 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
16757 fatal): Assume prototypes.
16758 * src/complain.h: Assume prototypes.
16759 * src/system.h (PARAMS): Remove.
16760 Include <limits.h> unconditionally, since it's guaranteeed even
16761 for a freestanding C89 compiler.
16762 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
16763 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
16764
16765 2002-10-20 Akim Demaille <akim@epita.fr>
16766
16767 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
16768 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
16769 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
16770 (yyresolveStates, yyresolveAction, yyresolveStack)
16771 (yyprocessOneStack): Use them.
16772 (yy_reduce_print): New.
16773 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
16774
16775 2002-10-20 Akim Demaille <akim@epita.fr>
16776
16777 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
16778 arguments and output `void'.
16779 (b4_c_function): Rename as...
16780 (b4_c_function_def): this.
16781 (b4_c_function_decl, b4_c_ansi_function_def)
16782 (b4_c_ansi_function_decl): New.
16783 Change the interpretation of the arguments: before `int, foo', now
16784 `int foo, foo'.
16785 * data/yacc.c (yyparse): Prototype and define thanks to these.
16786 Adjust b4_c_function_def uses.
16787 * data/glr.c (yyparse): Likewise, but ANSI only.
16788
16789 2002-10-20 Akim Demaille <akim@epita.fr>
16790
16791 * src/output.c (prepare): Move the definition of `tokens_number',
16792 `nterms_number', `undef_token_number', `user_token_number_max'
16793 to...
16794 (prepare_tokens): Here.
16795 (prepare_tokens): Rename as...
16796 (prepare_symbols): this.
16797 (prepare): Move the definition of `rules_number' to...
16798 (prepare_rules): here.
16799 (prepare): Move the definition of `last', `final_state_number',
16800 `states_number' to...
16801 (prepare_states): here.
16802 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
16803
16804 2002-10-20 Akim Demaille <akim@epita.fr>
16805
16806 * src/tables.h, src/tables.c, src/output.c: Comment changes.
16807
16808 2002-10-20 Akim Demaille <akim@epita.fr>
16809
16810 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
16811 * data/c.m4: here.
16812
16813 2002-10-20 Akim Demaille <akim@epita.fr>
16814
16815 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
16816 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
16817 `pair'.
16818 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
16819 `name' to...
16820 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
16821 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
16822 These.
16823
16824 2002-10-19 Paul Eggert <eggert@twinsun.com>
16825
16826 Do not create a temporary file, as that involves security and
16827 cleanup headaches. Instead, use a pair of pipes.
16828 Derived from a suggestion by Florian Krohm.
16829 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
16830 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
16831 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
16832 (BISON_PREREQ_SUBPIPE): Add.
16833 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
16834 Add subpipe.h, subpipe.c.
16835 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
16836 * po/POTFILES.in: Add lib/subpipe.c.
16837 * src/output.c: Include "subpipe.h".
16838 (m4_invoke): Remove decl.
16839 (scan_skel): New decl.
16840 (output_skeleton): Use pipe rather than temporary file for m4 input.
16841 Check that m4sugar.m4 is readable, to avoid deadlock.
16842 Check for pipe I/O error.
16843 * src/scan-skel.l (readpipe): Remove decl.
16844 (scan_skel): New function, to be used in place of m4_invoke.
16845 Read from stream rather than file.
16846
16847 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
16848 float, as this generates a warning on Solaris 8 + GCC 3.2 with
16849 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
16850 this generates a more-accurate value anyway.
16851
16852 * lib/timevar.c (timervar_accumulate): Rename locals to
16853 avoid confusion with similarly-named more-global.
16854 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
16855
16856 * src/output.c (prepare): Use xstrdup to convert char const *
16857 to char *, to avoid GCC warning.
16858
16859 2002-10-19 Akim Demaille <akim@epita.fr>
16860
16861 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
16862 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
16863 Use them to have `calc.y' ready for %pure-parser.
16864 * data/yacc.c (YYLEX): Pass a yylex return type to
16865 b4_c_function_call.
16866
16867 2002-10-19 Akim Demaille <akim@epita.fr>
16868
16869 Prototype support of %lex-param and %parse-param.
16870
16871 * src/parse-gram.y: Add the definition of the %lex-param and
16872 %parse-param tokens, plus their rules.
16873 Drop the `_' version of %glr-parser.
16874 Add the "," token.
16875 * src/scan-gram.l (INITIAL): Scan them.
16876 * src/muscle_tab.c: Comment changes.
16877 (muscle_insert, muscle_find): Rename `pair' as `probe'.
16878 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
16879 (muscle_entry_s): The `value' member is no longer const.
16880 Adjust all dependencies.
16881 * src/muscle_tab.c (muscle_init): Adjust: use
16882 MUSCLE_INSERT_STRING.
16883 Initialize the obstack earlier.
16884 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
16885 (muscle_pair_list_grow): New.
16886 * data/c.m4 (b4_c_function_call, b4_c_args): New.
16887 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
16888 * tests/calc.at: Use %locations, not --locations.
16889 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
16890
16891 2002-10-19 Akim Demaille <akim@epita.fr>
16892
16893 * src/getargs.c (usage): Take status as argument and exit
16894 accordingly.
16895 Report the traditional `Try ... --help' message when status != 0.
16896 (usage, version): Don't take a FILE * as arg, it is pointless.
16897 (getargs): When there is an incorrect number of arguments, make it
16898 an error, and report it GNUlically thanks to `usage ()'.
16899
16900 2002-10-18 Paul Eggert <eggert@twinsun.com>
16901
16902 * data/glr.c (yyreportParseError): Don't assume that sprintf
16903 yields the length of the printed string, as this is not true
16904 on SunOS 4.1.4. Reported by Peter Klein.
16905
16906 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
16907 * tests/conflicts.at (%nonassoc and eof): Likewise.
16908 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
16909
16910 2002-10-17 Akim Demaille <akim@epita.fr>
16911
16912 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
16913 * src/getargs.c (trace_types, trace_args): Adjust.
16914 * src/reader.c (grammar_current_rule_prec_set)
16915 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
16916 Standardize error messages.
16917 And s/@prec/%prec/!
16918 (reader): Use trace_flag to enable scanner/parser debugging,
16919 instead of an adhoc scheme.
16920 * src/scan-gram.l: Remove trailing debugging code.
16921
16922 2002-10-16 Paul Eggert <eggert@twinsun.com>
16923
16924 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
16925 MUSCLE_TAB_H.
16926
16927 * NEWS: Officially drop support for building Bison with K&R C,
16928 since it didn't work anyway and it's not worth worrying about.
16929 * Makefile.maint (wget_files): Remove ansi2knr.c.
16930 (ansi2knr.c-url_prefix): Remove.
16931 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
16932 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
16933 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
16934
16935 2002-10-15 Paul Eggert <eggert@twinsun.com>
16936
16937 Stop using the "enum_" trick for K&R-style function definitions;
16938 it confused me, and I was the author! Instead, assume that people
16939 who want to use K&R C compilers (when using these modules in GCC,
16940 perhaps?) will run ansi2knr.
16941
16942 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
16943 All uses of "enum_" changed to "enum ".
16944 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
16945 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
16946
16947 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
16948 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
16949 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
16950 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
16951 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
16952 abitset_not, abitset_ones, abitset_or, abitset_or_and,
16953 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
16954 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
16955 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
16956 Use function prototypes; this removes the need for declaring
16957 static functions simply to provide their prototypes.
16958 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
16959 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
16960 bitset_count_, bitset_create, bitset_dump, bitset_first,
16961 bitset_free, bitset_init, bitset_last, bitset_next,
16962 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
16963 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
16964 bitset_print, bitset_release_memory, bitset_toggle_,
16965 bitset_type_choose, bitset_type_get, bitset_type_name_get,
16966 debug_bitset): Likewise.
16967 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
16968 * lib/bitset_stats.c (bitset_log_histogram_print,
16969 bitset_percent_histogram_print, bitset_stats_and,
16970 bitset_stats_and_cmp, bitset_stats_and_or,
16971 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
16972 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
16973 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
16974 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
16975 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
16976 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
16977 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
16978 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
16979 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
16980 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
16981 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
16982 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
16983 bitset_stats_zero): Likewise.
16984 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
16985 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
16986 bitsetv_dump, debug_bitsetv): Likewise.
16987 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
16988 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
16989 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
16990 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
16991 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
16992 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
16993 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
16994 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
16995 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
16996 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
16997 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
16998 Likewise.
16999 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
17000 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
17001 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
17002 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
17003 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
17004 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
17005 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
17006 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
17007 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
17008 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
17009 lbitset_xor_cmp, lbitset_zero): Likewise.
17010
17011 2002-10-14 Akim Demaille <akim@epita.fr>
17012
17013 Version 1.75.
17014
17015 2002-10-14 Akim Demaille <akim@epita.fr>
17016
17017 * tests/Makefile.am (maintainer-check-posix): New.
17018
17019 2002-10-14 Akim Demaille <akim@epita.fr>
17020
17021 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
17022 member.
17023
17024 2002-10-14 Akim Demaille <akim@epita.fr>
17025
17026 * src/tables.c (table_ninf_remap): base -> tab.
17027 Reported by Matt Rosing.
17028
17029 2002-10-14 Paul Eggert <eggert@twinsun.com>
17030
17031 * tests/action.at, tests/calc.at, tests/conflicts.at,
17032 tests/cxx-type.at, tests/headers.at, tests/input.at,
17033 tests/regression.at, tests/synclines.at, tests/torture.at:
17034 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
17035 so that the tests still work even if POSIXLY_CORRECT is set.
17036 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
17037
17038 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
17039 for portability to K&R hosts. Fix typo: signed char is guaranteed
17040 only to 127, not to 128.
17041 * data/glr.c (yysigned_char): New type.
17042 * data/yacc.c (yysigned_char): Likewise.
17043 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
17044
17045 2002-10-13 Paul Eggert <eggert@twinsun.com>
17046
17047 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
17048 true due to limited range of data type" warning from GCC.
17049
17050 * data/c.m4 (b4_token_defines): Protect against double-inclusion
17051 by wrapping enum yytokentype's definition inside #ifndef
17052 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
17053
17054 2002-10-13 Akim Demaille <akim@epita.fr>
17055
17056 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
17057 Un yy- yyrhs to avoid the name clash with the global YYRHS.
17058
17059 2002-10-13 Akim Demaille <akim@epita.fr>
17060
17061 * Makefile.maint: Update from Autoconf 2.54.
17062 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
17063
17064 2002-10-13 Akim Demaille <akim@epita.fr>
17065
17066 * src/print.c (print_state): Separate the list of solved conflicts
17067 from the other items.
17068 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
17069
17070 2002-10-13 Akim Demaille <akim@epita.fr>
17071
17072 Let nondeterministic skeletons be usable with deterministic
17073 tables.
17074
17075 With the patch, GAWK compiled by GCC without -O2 passes its test
17076 suite using a GLR parser driven by LALR tables. It fails with -O2
17077 because `struct stat' gives two different answers on my machine:
17078 88 (definition of an auto var) and later 96 (memset on this var).
17079 Hence the stack is badly corrumpted. The headers inclusion is to
17080 blame: if I move the awk.h inclusion before GLR's system header
17081 inclusion, the two struct stat have the same size.
17082
17083 * src/tables.c (pack_table): Always create conflict_table.
17084 (token_actions): Always create conflict_list.
17085 * data/glr.c (YYFLAG): Remove, unused.
17086
17087 2002-10-13 Akim Demaille <akim@epita.fr>
17088
17089 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
17090 (O0FLAGS): New.
17091 (VALGRIND, GXX): New.
17092 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
17093 * tests/bison.in: Run $PREBISON a pre-command.
17094 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
17095 (maintainer-check-g++): New.
17096 * Makefile.am (maintainer-check): New.
17097
17098 2002-10-13 Akim Demaille <akim@epita.fr>
17099
17100 * data/glr.c: Formatting changes.
17101 Tweak some trace messages to match yacc.c's.
17102
17103 2002-10-13 Akim Demaille <akim@epita.fr>
17104
17105 GLR parsers sometimes raise parse errors instead of performing the
17106 default reduction.
17107 Reported by Charles-Henry de Boysson.
17108
17109 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
17110 check the length of the traces when %glr.
17111 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
17112 GLR's traces.
17113 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
17114 Test GLR parsers.
17115 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
17116 (yyltype): Remove the yy prefix from the member names.
17117 (yytable): Complete its comment.
17118 (yygetLRActions): Map error action number from YYTABLE from
17119 YYTABLE_NINF to 0.
17120 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
17121 (which was a bug: it should have been YYTABEL_NINF, and yet it was
17122 not satisfying as we could compare an YYACTION computed from
17123 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
17124 only value for error actions.
17125 (yyreportParseError): In verbose parse error messages, don't issue
17126 `error' in the list of expected tokens.
17127 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
17128 next action to perform to match glr.c's decoding.
17129 (yytable): Complete its comment.
17130
17131 2002-10-13 Paul Eggert <eggert@twinsun.com>
17132
17133 Fix problem reported by Henrik Grubbstroem in
17134 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
17135 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
17136 because the Bison parser reads the second action before reducing
17137 the first one.
17138 * src/scan-gram.l (rule_length): New static var.
17139 Use it to keep track of the rule length in the scanner, since
17140 we can't expect the parser to be in lock-step sync with the scanner.
17141 (handle_action_dollar, handle_action_at): Use this var.
17142 * tests/actions.at (Exotic Dollars): Test for the problem.
17143
17144 2002-10-12 Paul Eggert <eggert@twinsun.com>
17145
17146 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
17147 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
17148 Include <sys/time.h> when checking for clock_t and struct tms.
17149 Use same include order as source.
17150 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
17151 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
17152
17153 * lib/timevar.c: Update copyright date and clarify comments.
17154 (get_time) [IN_GCC]: Keep the GCC version for reference.
17155
17156 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
17157 GCC version as of today, then merge Bison's changes.
17158 Change "GCC" to "Bison" in copyright notice. timevar.def's
17159 author is Akim, so change that too.
17160
17161 * src/reader.c (grammar_current_rule_check):
17162 Don't worry about the default action if $$ is untyped.
17163 Prevents bogus warnings reported by Jim Gifford in
17164 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
17165
17166 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
17167 * data/glr.c, data/lalr1.cc, data/yacc.c:
17168 Output token definitions before the first part of user declarations.
17169 Fixes compatibility problem reported by Jim Gifford for kbd in
17170 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
17171
17172 2002-10-11 Paul Eggert <eggert@twinsun.com>
17173
17174 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
17175 (yyparse): here. This undoes some of the 2002-07-25 change.
17176 Compatibility problem reported by Ralf S. Engelschall with
17177 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
17178
17179 2002-10-11 Akim Demaille <akim@epita.fr>
17180
17181 * tests/regression.at Characters Escapes): New.
17182 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
17183 characters.
17184 Reported by Jan Nieuwenhuizen.
17185
17186 2002-10-11 Akim Demaille <akim@epita.fr>
17187
17188 * po/id.po: New.
17189
17190 2002-10-10 Paul Eggert <eggert@twinsun.com>
17191
17192 Portability fixes for bitsets; this also avoids several GCC
17193 warnings.
17194
17195 * lib/abitset.c: Include <stddef.h>, for offsetof.
17196 * lib/lbitset.c: Likewise.
17197
17198 * lib/abitset.c (abitset_bytes): Return a size that is aligned
17199 properly for vectors of objects. Do not assume that adding a
17200 header size to a multiple of a word size yields a value that is
17201 properly aligned for the whole union.
17202 * lib/bitsetv.c (bitsetv_alloc): Likewise.
17203
17204 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
17205 unique names for structures.
17206 * lib/ebitset.c (ebitset_bytes): Likewise.
17207 * lib/lbitset.c (lbitset_bytes): Likewise.
17208
17209 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
17210 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
17211 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
17212 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
17213 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
17214 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
17215 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
17216 to improve the type-checking that GCC can do.
17217 * lib/bitset.c (bitset_op4_cmp): Likewise.
17218 * lib/bitset_stats.c (bitset_stats_count,
17219 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
17220 bitset_stats_copy, bitset_stats_disjoint_p,
17221 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
17222 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
17223 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
17224 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
17225 bitset_stats_and_or_cmp, bitset_stats_andn_or,
17226 bitset_stats_andn_or_cmp, bitset_stats_or_and,
17227 bitset_stats_or_and_cmp): Likewise.
17228 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
17229 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
17230 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
17231 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
17232
17233 * lib/abitset.h: Include bitset.h, not bbitset.h.
17234 * lib/ebitset.h: Likewise.
17235 * lib/lbitset.h: Likewise.
17236
17237 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
17238 All instances of parameters of type enum bitset_opts are now of
17239 type enum_bitset_opts, to conform to the C Standard, and similarly
17240 for enum_bitset_type.
17241 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
17242 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
17243
17244 Do not use "struct bitset_struct" to mean different things in
17245 different modules. Not only is this confusing, it violates
17246 the C Standard, which requires that structure types in different
17247 modules must be compatible if one is to be passed to the other.
17248 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
17249 All instances of "struct bitset_struct *" replaced with "bitset".
17250 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
17251 (union bitset_union, struct abitset_struct, struct ebitset_struct,
17252 struct lbitset_struct, struct bitset_stats_struct): New types.
17253 All uses of struct bitset_struct changed to union bitset_union,
17254 etc.
17255 * lib/abitset.c (struct abitset_struct, abitset,
17256 struct bitset_struct): Remove.
17257 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
17258 struct bitset_struct): Remove.
17259 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
17260 bitset_struct): Remove.
17261 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
17262 Likewise.
17263
17264 Do not call a function of type T using a call that assumes the
17265 function is of a different type U. Standard C requires that a
17266 function must be called with a type that is compatible with its
17267 definition.
17268 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
17269 New decls.
17270 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
17271 New functions.
17272 * lib/ebitset.c (PFV): Remove.
17273 * lib/lbitset.c (PFV): Likewise.
17274 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
17275 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
17276 decls.
17277 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
17278 (ebitset_vtable): Use them.
17279 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
17280 lbitset_xor): New functions.
17281 (lbitset_vtable): Use them.
17282
17283 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
17284 Declare.
17285
17286 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
17287 GCC warning.
17288 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
17289 Use offsetof, for simplicity.
17290
17291 2002-10-06 Paul Eggert <eggert@twinsun.com>
17292
17293 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
17294 the same width as int. This reapplies a hunk of the 2002-08-12 patch
17295 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
17296 which was inadvertently undone by the 2002-09-30 patch.
17297 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
17298 the same width as int.
17299
17300 2002-10-04 Paul Eggert <eggert@twinsun.com>
17301
17302 Version 1.50.
17303
17304 * configure.ac (AC_INIT), NEWS: Increment version number.
17305
17306 * doc/bison.texinfo: Minor spelling, grammar, and white space
17307 fixes.
17308 (Symbols): Mention that any negative value returned from yylex
17309 signifies end-of-input. Warn about negative chars. Mention
17310 the portable Standard C character set.
17311
17312 The GNU coding standard says CFLAGS and YFLAGS are reserved
17313 for the installer to set.
17314 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
17315 * src/Makefile.am (AM_CFLAGS): Likewise.
17316 (AM_YFLAGS): Renamed from YFLAGS.
17317
17318 Fix some MAX and MIN problems.
17319 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
17320 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
17321 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
17322 * src/reader.c (reader): Use it.
17323
17324 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
17325 POSIX 1003.1-2001 has removed fgrep.
17326
17327 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
17328
17329 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
17330 interpreted as signed.
17331 * lib/ebitset.c (ebitset_list): Fix bug.
17332
17333 2002-10-01 Paul Eggert <eggert@twinsun.com>
17334
17335 More fixes for 64-bit hosts and large bitsets.
17336
17337 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
17338 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
17339 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
17340 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
17341 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
17342 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
17343 bitset_count_): Likewise.
17344 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
17345 bitset_first, bitset_last): Likewise.
17346 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
17347 bitset_stats_list_reverse, bitset_stats_size,
17348 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
17349 Likewise.
17350 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
17351 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
17352 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
17353 bitsetv_reflexive_transitive_closure): Likewise.
17354 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
17355 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
17356 Likewise.
17357 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
17358 Likewise.
17359
17360 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
17361 Use size_t, not unsigned int, to count bytes.
17362 * lib/abitset.h (abitset_bytes): Likewise.
17363 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
17364 Likewise.
17365 * lib/bitset.h (bitset_bytes): Likewise.
17366 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
17367 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
17368 * lib/bitsetv.c (bitsetv_alloc): Likewise.
17369 * lib/ebitset.c (ebitset_bytes): Likewise.
17370 * lib/ebitset.h (ebitset_bytes): Likewise.
17371 * lib/lbitset.c (lbitset_bytes): Likewise.
17372 * lib/lbitset.h (lbitset_bytes): Likewise.
17373
17374 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
17375 abitset_subset_p, abitset_disjoint_p, abitset_and,
17376 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
17377 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
17378 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
17379 abitset_or_and, abitset_or_and_cmp):
17380 Use bitset_windex instead of unsigned int.
17381 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
17382 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
17383 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
17384 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
17385 Likewise.
17386 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
17387
17388 * lib/bitset.c (bitset_print):
17389 Use proper printf formats for widths of integer types.
17390 * lib/bitset_stats.c (bitset_percent_histogram_print,
17391 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
17392 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
17393 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
17394 * lib/lbitset.c (lbitset_bytes): Likewise.
17395
17396 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
17397 BITSET_SIZE_MAX): New macros.
17398 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
17399 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
17400 to BITSET_WINDEX_MAX.
17401
17402 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
17403 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
17404 since we now return the bitset_bindex type (not int).
17405
17406 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
17407 when computing sizes.
17408 * lib/ebitset.c (ebitset_elts_grow): Likewise.
17409
17410 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
17411 and avoid cast to unsigned.
17412
17413 2002-09-30 Akim Demaille <akim@epita.fr>
17414
17415 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
17416 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
17417 Updates from Michael Hayes.
17418
17419 2002-09-30 Art Haas <ahaas@neosoft.com>
17420
17421 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
17422 invocations.
17423 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
17424 defined.
17425
17426 2002-09-27 Akim Demaille <akim@epita.fr>
17427
17428 Version 1.49c.
17429
17430 2002-09-27 Akim Demaille <akim@epita.fr>
17431
17432 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
17433 (Because of AC_LIBSOURCE).
17434
17435 2002-09-27 Akim Demaille <akim@epita.fr>
17436
17437 Playing with Autoscan.
17438
17439 * configure.ac: Remove the old LIBOBJ tweaks.
17440 (AC_REPLACE_FUNCS): Add strrchr and strtol.
17441 * lib/strrchr.c: New.
17442 * lib/strtol.c: New, from the Coreutils 4.5.1.
17443
17444 2002-09-27 Akim Demaille <akim@epita.fr>
17445
17446 Playing with Autoscan.
17447
17448 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
17449 * lib/Makefile.am (libbison_a_SOURCES): No longer include
17450 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
17451 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
17452 Coreutils 4.5.1.
17453
17454 2002-09-24 Akim Demaille <akim@epita.fr>
17455
17456 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
17457 (Frequently Asked Questions, Parser Stack Overflow): New.
17458
17459 2002-09-13 Akim Demaille <akim@epita.fr>
17460
17461 Playing with autoscan.
17462
17463 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
17464 * src/files.c (skeleton_find): Remove, unused.
17465 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
17466 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
17467
17468 2002-09-13 Akim Demaille <akim@epita.fr>
17469
17470 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
17471 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
17472
17473 2002-09-13 Akim Demaille <akim@epita.fr>
17474
17475 * configure.ac: Require 2.54.
17476 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
17477 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
17478 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
17479 Remove, provided by Autoconf macros.
17480
17481 2002-09-12 Akim Demaille <akim@epita.fr>
17482
17483 * m4/prereq.m4: Update, from Coreutils 4.5.1.
17484
17485 2002-09-12 Akim Demaille <akim@epita.fr>
17486
17487 * m4/prereq.m4: Update, from Fileutils 4.1.5.
17488 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
17489 Reported by Martin Mokrejs.
17490
17491 2002-09-10 Akim Demaille <akim@epita.fr>
17492
17493 * src/parse-gram.y: Associate a human readable string to each
17494 token type.
17495 * tests/regression.at (Invalid inputs): Adjust.
17496
17497 2002-09-10 Gary V. Vaughan <gary@gnu.org>
17498
17499 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
17500 with an Autoconf-2.5x style configure.ac.
17501
17502 2002-09-06 Paul Eggert <eggert@twinsun.com>
17503
17504 * doc/bison.texinfo (Conditions): Make explicit that the GPL
17505 exception applies only to yacc.c. This is a modification of a
17506 patch originally suggested by Akim Demaille.
17507
17508 2002-09-06 Akim Demaille <akim@epita.fr>
17509
17510 * data/c.m4 (b4_copyright): Move the GPL exception comment from
17511 here to...
17512 * data/yacc.c: here.
17513
17514 * data/lalr1.cc (struct yyltype): Don't define it, since we use
17515 LocationType.
17516 (b4_ltype): Default to yy::Location from location.hh.
17517
17518 2002-09-04 Jim Meyering <jim@meyering.net>
17519
17520 * data/yacc.c: Guard the declaration of yytoknum also with
17521 `#ifdef YYPRINT', so it is declared only when used.
17522
17523 2002-09-04 Akim Demaille <akim@epita.fr>
17524
17525 * configure.in: Rename as...
17526 * configure.ac: this.
17527 Bump to 1.49c.
17528
17529 2002-09-04 Akim Demaille <akim@epita.fr>
17530
17531 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
17532 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
17533 translate maintainer only messages.
17534
17535 2002-08-12 Paul Eggert <eggert@twinsun.com>
17536
17537 Version 1.49b.
17538
17539 * Makefile.am (SUBDIRS): Remove intl.
17540 (DISTCLEANFILES): Remove.
17541 * NEWS: Mention that GNU M4 is now required. Clarify what is
17542 meant by "larger grammars". Mention the pt_BR translation.
17543 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
17544 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
17545 Bump version from 0.11.2 to 0.11.5.
17546 (BISON_PREREQ_STAGE): Remove.
17547 (AM_GNU_GETTEXT): Use external gettext.
17548 (AC_OUTPUT): Remove intl/Makefile.
17549
17550 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
17551
17552 * data/glr.c: Include string.h, for strlen.
17553 (yyreportParseError): Use size_t for yysize.
17554 (yy_yypstack): No longer nested inside yypstates, as nested
17555 functions are not portable. Do not assume size_t is the
17556 same width as int.
17557 (yypstates): Do not assume that ptrdiff_t is the same width
17558 as int, and similarly for yyposn and YYINDEX.
17559
17560 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
17561
17562 * lib/Makefile.am (INCLUDES): Do not include from the intl
17563 directory, which has been removed.
17564 * src/Makefile.am (INCLUDES): Likewise.
17565
17566 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
17567 (bitsets_sources, additional_bitsets_sources, timevars_sources):
17568 New vars.
17569
17570 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
17571 * tests/Makefile.am (EXTRA_DIST): Likewise.
17572
17573 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
17574 Do not assume that bitset_windex is the same width as unsigned.
17575
17576 * lib/abitset.c (abitset_unused_clear): Do not assume that
17577 bitset_word is the same width as int.
17578 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
17579 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
17580 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
17581 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
17582 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
17583
17584 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
17585 portability to one's complement hosts!).
17586 * lib/ebitset.c (ebitset_op1): Likewise.
17587 * lib/lbitset.c (lbitset_op1): Likewise.
17588
17589 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
17590 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
17591 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
17592 Sync with fileutils.
17593 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
17594 lib/gettext.h: Sync with diffutils.
17595
17596 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
17597 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
17598
17599 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
17600 PROTOTYPES to check for prototypes, and "defined __STDC__" to
17601 check for void *.
17602
17603 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
17604 size_t; the old version tried to do this but casted improperly.
17605 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
17606 (bitset_test): Now returns int, not unsigned long.
17607
17608 * lib/bitset_stats.c: Include "gettext.h".
17609 (_): New macro.
17610 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
17611 name locals "index", as it generates unnecessary warnings on some
17612 hosts that have an "index" function.
17613
17614 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
17615 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
17616 they need translation.
17617 * src/LR0.c (state_list_append, new_itemsets, get_state,
17618 append_states, generate_states): Likewise.
17619 * src/assoc.c (assoc_to_string): Likewise.
17620 * src/closure.c (print_closure, set_firsts, closure): Likewise.
17621 * src/gram.c (grammar_dump): Likewise.
17622 * src/injections.c (injections_compute): Likewise.
17623 * src/lalr.c (lookaheads_print): Likewise.
17624 * src/relation.c (relation_transpose): Likewise.
17625 * src/scan-gram.l: Likewise.
17626 * src/tables.c (table_grow, pack_vector): Likewise.
17627
17628 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
17629 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
17630 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
17631 * m4/mbstate_t.m4: Sync with fileutils.
17632 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
17633
17634 * po/LINGUAS: Add pt_BR.
17635 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
17636 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
17637 lib/timevar.c.
17638 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
17639 manual recommends.
17640 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
17641
17642 * src/complain.c (strerror_r): Remove decl; not needed.
17643 (strerror): Use same pattern as ../lib/error.c.
17644
17645 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
17646
17647 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
17648
17649 * src/main.c (main): Cast result of bindtextdomain and textdomain
17650 to void, to avoid a GCC warning when --disable-nls is in effect.
17651
17652 * src/scan-gram.l: Use strings rather than escapes when possible,
17653 to minimize the number of warnings from xgettext.
17654 (handle_action_dollar, handle_action_at): Don't use isdigit,
17655 as it mishandles negative chars and it may not work as expected
17656 outside the C locale.
17657
17658 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
17659 this is a GCC extension and is not portable to other compilers.
17660
17661 * src/system.h (alloca): Use same pattern as ../lib/error.c.
17662 Do not include <ctype.h>; no longer needed.
17663 Do not include <malloc.h>; no longer needed (and generates
17664 warnings on OpenBSD 3.0).
17665
17666 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
17667 it's not portable.
17668
17669 * tests/regression.at: Do not use 'cc -c input.c -o input';
17670 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
17671
17672 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
17673 exit status as failure, not just exit status 1. Sun C exits
17674 with status 2 sometimes.
17675
17676 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
17677 Use it for the two large tests.
17678
17679 2002-08-02 Akim Demaille <akim@epita.fr>
17680
17681 * src/conflicts.c (conflicts_output): Don't output rules never
17682 reduced here, since anyway that computation doesn't work.
17683 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
17684 (rule_useless_p, rule_never_reduced_p): New.
17685 (grammar_rules_partial_print): Use a filter instead of a range.
17686 Display the title only if needed.
17687 (grammar_rules_print): Adjust.
17688 (grammar_rules_never_reduced_report): New.
17689 * src/tables.c (action_row): Move the computation of rules never
17690 reduced to...
17691 (token_actions): here.
17692 * src/main.c (main): Make the parser before making the report, so
17693 that rules never reduced are computed.
17694 Call grammar_rules_never_reduced_report.
17695 * src/print.c (print_results): Report rules never reduced.
17696 * tests/conflicts.at, tests/reduce.at: Adjust.
17697
17698 2002-08-01 Akim Demaille <akim@epita.fr>
17699
17700 Instead of attaching lookaheads and duplicating the rules being
17701 reduced by a state, attach the lookaheads to the reductions.
17702
17703 * src/state.h (state_t): Remove the `lookaheads',
17704 `lookaheads_rule' member.
17705 (reductions_t): Add a `lookaheads' member.
17706 Use a regular array for the `rules'.
17707 * src/state.c (reductions_new): Initialize the lookaheads member
17708 to 0.
17709 (state_rule_lookaheads_print): Adjust.
17710 * src/state.h, src/state.c (state_reductions_find): New.
17711 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
17712 (count_rr_conflicts): Adjust.
17713 * src/lalr.c (LArule): Remove.
17714 (add_lookback_edge): Adjust.
17715 (state_lookaheads_count): New.
17716 (states_lookaheads_initialize): Merge into...
17717 (initialize_LA): this.
17718 (lalr_free): Adjust.
17719 * src/main.c (main): Don't free nullable and derives too early: it
17720 is used by --verbose.
17721 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
17722
17723 2002-08-01 Akim Demaille <akim@epita.fr>
17724
17725 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
17726 `rule_number_t**'.
17727 (set_derives, free_derives): Rename as...
17728 (derives_compute, derives_free): this.
17729 Adjust all dependencies.
17730 * src/nullable.c (set_nullable, free_nullable): Rename as...
17731 (nullable_compute, nullable_free): these.
17732 (rule_list_t): Store rule_t *, not rule_number_t.
17733 * src/state.c (state_rule_lookaheads_print): Directly compare rule
17734 pointers, instead of their numbers.
17735 * src/main.c (main): Call nullable_free, and derives_free earlier,
17736 as they were lo longer used.
17737
17738 2002-08-01 Akim Demaille <akim@epita.fr>
17739
17740 * lib/timevar.c (get_time): Include children time.
17741 * src/lalr.h (LA, LArule): Don't export them: used with the
17742 state_t.
17743 * src/lalr.c (LA, LArule): Static.
17744 * src/lalr.h, src/lalr.c (lalr_free): New.
17745 * src/main.c (main): Call it.
17746 * src/tables.c (pack_vector): Check whether loc is >= to the
17747 table_size, not >.
17748 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
17749 (tables_generate): do it, since that's also it which allocates
17750 them.
17751 Don't free LA and LArule, main does.
17752
17753 2002-07-31 Akim Demaille <akim@epita.fr>
17754
17755 Separate parser tables computation and output.
17756
17757 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
17758 (conflict_list, conflict_list_cnt, table, check, table_ninf)
17759 (yydefgoto, yydefact, high): Move to...
17760 * src/tables.h, src/tables.c: here.
17761 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
17762 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
17763 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
17764 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
17765 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
17766 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
17767 (action_row, save_row, token_actions, save_column, default_goto)
17768 (goto_actions, sort_actions, matching_state, pack_vector)
17769 (table_ninf_remap, pack_table, prepare_actions): Move to...
17770 * src/tables.c: here.
17771 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
17772 * src/output.c (token_actions, output_base, output_conflicts)
17773 (output_check): Merge into...
17774 (prepare_actions): this.
17775 (actions_output): Rename as...
17776 (user_actions_output): this.
17777 * src/main.c (main): Call tables_generate and tables_free.
17778
17779 2002-07-31 Akim Demaille <akim@epita.fr>
17780
17781 Steal GCC's --time-report support.
17782
17783 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
17784 stolen/adjusted from GCC.
17785 * m4/stage.m4: Remove time related checks.
17786 * m4/timevar.m4: New.
17787 * configure.in: Adjust.
17788 * src/system.h: Adjust to using timevar.h.
17789 * src/getargs.h, src/getargs.c: Support trace_time for
17790 --trace=time.
17791 * src/main.c (stage): Remove.
17792 (main): Replace `stage' invocations with timevar calls.
17793 * src/output.c: Insert pertinent timevar calls.
17794
17795 2002-07-31 Akim Demaille <akim@epita.fr>
17796
17797 Let --trace have arguments.
17798
17799 * src/getargs.h (enum trace_e): New.
17800 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
17801 (long_options, short_options): --trace/-T takes an optional
17802 argument.
17803 Change all the uses of trace_flag to reflect the new flags.
17804 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
17805
17806 Strengthen `stage' portability.
17807
17808 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
17809 * configure.in: Use it.
17810 Don't check for malloc.h and sys/times.h.
17811 * src/system.h: Include them when appropriate.
17812 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
17813 times and struct tms are available.
17814
17815 2002-07-30 Akim Demaille <akim@epita.fr>
17816
17817 In verbose parse error message, don't report `error' as an
17818 expected token.
17819 * tests/actions.at (Printers and Destructors): Adjust.
17820 * tests/calc.at (Calculator $1): Adjust.
17821 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
17822 error message, do not report the parser accepts the error token in
17823 that state.
17824
17825 2002-07-30 Akim Demaille <akim@epita.fr>
17826
17827 Normalize conflict related messages.
17828
17829 * src/complain.h, src/complain.c (warn, complain): New.
17830 * src/conflicts.c (conflicts_print): Use them.
17831 (conflict_report_yacc): New, extracted from...
17832 (conflicts_print): here.
17833 * tests/conflicts.at, tests/existing.at: Adjust.
17834
17835 2002-07-30 Akim Demaille <akim@epita.fr>
17836
17837 Report rules which are never reduced by the parser: those hidden
17838 by conflicts.
17839
17840 * src/LR0.c (save_reductions): Don't make the final state too
17841 different: save its reduction (accept) instead of having a state
17842 without any action (no shift or goto, no reduce).
17843 Note: the final state is now a ``regular'' state, i.e., the
17844 parsers now contain `reduce 0' as default reduction.
17845 Nevertheless, since they decide to `accept' when yystate =
17846 final_state, they still will not reduce rule 0.
17847 * src/print.c (print_actions, print_reduction): Adjust.
17848 * src/output.c (action_row): Track reduced rules.
17849 (token_actions): Report rules never reduced.
17850 * tests/conflicts.at, tests/regression.at: Adjust.
17851
17852 2002-07-30 Akim Demaille <akim@epita.fr>
17853
17854 `stage' was accidently included in a previous patch.
17855 Initiate its autoconfiscation.
17856
17857 * configure.in: Look for malloc.h and sys/times.h.
17858 * src/main.c (stage): Adjust.
17859 Report only when trace_flag.
17860
17861 2002-07-29 Akim Demaille <akim@epita.fr>
17862
17863 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
17864 state_number_t.
17865 (errs_t): symbol_t*, not symbol_number_t.
17866 (reductions_t): rule_t*, not rule_number_t.
17867 (FOR_EACH_SHIFT): New.
17868 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
17869 * src/print.c, src/print_graph.c: Adjust.
17870
17871 2002-07-29 Akim Demaille <akim@epita.fr>
17872
17873 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
17874
17875 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
17876 (endtoken, accept): these.
17877 * src/reader.c (reader): Set endtoken's default tag to "$end".
17878 Set undeftoken's tag to "$undefined" instead of "$undefined.".
17879 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
17880 Adjust.
17881
17882 2002-07-29 Akim Demaille <akim@epita.fr>
17883
17884 * src/reduce.c (reduce_grammar): When the language is empty,
17885 complain about the start symbol, not the axiom.
17886 Use its location.
17887 * tests/reduce.at (Empty Language): New.
17888
17889 2002-07-26 Akim Demaille <akim@epita.fr>
17890
17891 * src/reader.h, src/reader.c (gram_error): ... can't get
17892 yycontrol without making too strong assumptions on the parser
17893 itself.
17894 * src/output.c (prepare_tokens): Use the real 0th value of
17895 token_translations instead of `0'.
17896 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
17897 visible here.
17898 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
17899 for the time being: %locations ought to provide it to yyerror.
17900
17901 2002-07-25 Akim Demaille <akim@epita.fr>
17902
17903 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
17904 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
17905 * tests/regression.at (Web2c Actions): Adjust.
17906
17907 2002-07-25 Akim Demaille <akim@epita.fr>
17908
17909 Stop storing rules from 1 to nrules + 1.
17910
17911 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
17912 * src/nullable.c, src/output.c, src/print.c, src/reader.c
17913 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
17914 Iterate from 0 to nrules.
17915 Use rule_number_as_item_number and item_number_as_rule_number.
17916 Adjust to `derive' now containing possibly 0.
17917 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
17918 Handle the `- 1' part in rule numbers from/to item numbers.
17919 * src/conflicts.c (log_resolution): Fix the message which reversed
17920 shift and reduce.
17921 * src/output.c (action_row): Initialize default_rule to -1.
17922 (token_actions): Adjust.
17923 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
17924 expected output.
17925 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
17926
17927 2002-07-25 Akim Demaille <akim@epita.fr>
17928
17929 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
17930 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
17931 (b4_c_knr_arg_decl): New.
17932 * data/yacc.c: Use it to define yysymprint, yydestruct, and
17933 yyreport_parse_error.
17934
17935 2002-07-25 Akim Demaille <akim@epita.fr>
17936
17937 * data/yacc.c (yyreport_parse_error): New, extracted from...
17938 (yyparse): here.
17939 (yydestruct, yysymprint): Move above yyparse.
17940 Be K&R compliant.
17941
17942 2002-07-25 Akim Demaille <akim@epita.fr>
17943
17944 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
17945 replace...
17946 (b4_sint_type, b4_uint_type): these.
17947 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
17948 * tests/regression.at (Web2c Actions): Adjust.
17949
17950 2002-07-25 Akim Demaille <akim@epita.fr>
17951
17952 * src/gram.h (TIEM_NUMBER_MAX): New.
17953 (item_number_of_rule_number, rule_number_of_item_number): Rename
17954 as...
17955 (rule_number_as_item_number, item_number_as_rule_number): these.
17956 Adjust dependencies.
17957 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
17958 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
17959 (symbol_number_to_vector_number): New.
17960 (order): Of vector_number_t* type.
17961 (base_t, BASE_MAX, BASE_MIN): New.
17962 (froms, tos, width, pos, check): Of base_t type.
17963 (action_number_t, ACTION_MIN, ACTION_MAX): New.
17964 (actrow): Of action_number_t type.
17965 (conflrow): Of unsigned int type.
17966 (table_ninf, base_ninf): New.
17967 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
17968 (muscle_insert_int_table, muscle_insert_base_table)
17969 (muscle_insert_rule_number_table): New.
17970 (prepare_tokens): Output `toknum' as int_table.
17971 (action_row): Returns a rule_number_t.
17972 Use ACTION_MIN, not SHRT_MIN.
17973 (token_actions): yydefact is rule_number_t*.
17974 (table_ninf_remap): New.
17975 (pack_table): Use it for `base' and `table'.
17976 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
17977 replaced with...
17978 (YYPACT_NINF, YYTABLE_NINF): these.
17979 (yypact, yytable): Compute their types instead of hard-coded
17980 `short'.
17981 * tests/regression.at (Web2c Actions): Adjust.
17982
17983 2002-07-19 Akim Demaille <akim@epita.fr>
17984
17985 * src/scan-gram.l (id): Can start with an underscore.
17986
17987 2002-07-16 Akim Demaille <akim@epita.fr>
17988
17989 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
17990 Adjust all former `associativity' dependencies.
17991 * src/symtab.c (symbol_new): Default associativity is `undef', not
17992 `right'.
17993 (symbol_check_alias_consistence): Adjust.
17994
17995 2002-07-09 Akim Demaille <akim@epita.fr>
17996
17997 * doc/bison.texinfo: Properly set the ``header'' part.
17998 Use @dircategory ``GNU programming tools'' as per Texinfo's
17999 documentation.
18000 Use @copying.
18001
18002 2002-07-09 Akim Demaille <akim@epita.fr>
18003
18004 * lib/quotearg.h: Protect against multiple inclusions.
18005 * src/location.h (location_t): Add a `file' member.
18006 (LOCATION_RESET, LOCATION_PRINT): Adjust.
18007 * src/complain.c (warn_at, complain_at, fatal_at): Drop
18008 `error_one_per_line' support.
18009
18010 2002-07-09 Akim Demaille <akim@epita.fr>
18011
18012 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
18013 * src/reader.c (lineno): Remove.
18014 Adjust all dependencies.
18015 (get_merge_function): Take a location and use complain_at.
18016 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
18017 * tests/regression.at (Invalid inputs, Mixing %token styles):
18018 Adjust.
18019
18020 2002-07-09 Akim Demaille <akim@epita.fr>
18021
18022 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
18023 recovery rule, and forbid extensions when --yacc.
18024 (gram_error): Use complain_at.
18025 * src/reader.c (reader): Exit if there were parse errors.
18026
18027 2002-07-09 Akim Demaille <akim@epita.fr>
18028
18029 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
18030 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
18031 Reported by R Blake <blakers@mac.com>.
18032
18033 2002-07-09 Akim Demaille <akim@epita.fr>
18034
18035 * data/yacc.c: Output the copyright notive in the header.
18036
18037 2002-07-03 Akim Demaille <akim@epita.fr>
18038
18039 * src/output.c (froms, tos): Are state_number_t.
18040 (save_column): sp, sp1, and sp2 are state_number_t.
18041 (prepare): Rename `final' as `final_state_number', `nnts' as
18042 `nterms_number', `nrules' as `rules_number', `nstates' as
18043 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
18044 unused.
18045 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
18046 * data/lalr1.cc (nsym_): Remove, unused.
18047
18048 2002-07-03 Akim Demaille <akim@epita.fr>
18049
18050 * src/lalr.h, src/lalr.c (goto_number_t): New.
18051 * src/lalr.c (goto_list_t): New.
18052 Propagate them.
18053 * src/nullable.c (rule_list_t): New.
18054 Propagate.
18055 * src/types.h: Remove.
18056
18057 2002-07-03 Akim Demaille <akim@epita.fr>
18058
18059 * src/closure.c (print_fderives): Use rule_rhs_print.
18060 * src/derives.c (print_derives): Use rule_rhs_print.
18061 (rule_list_t): New, replaces `shorts'.
18062 (set_derives): Add comments.
18063 * tests/sets.at (Nullable, Firsts): Adjust.
18064
18065 2002-07-03 Akim Demaille <akim@epita.fr>
18066
18067 * src/output.c (prepare_actions): Free `tally' and `width'.
18068 (prepare_actions): Allocate and free `order'.
18069 * src/symtab.c (symbols_free): Free `symbols'.
18070 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
18071 * src/output.c (m4_invoke): Move to...
18072 * src/scan-skel.l: here.
18073 (<<EOF>>): Close yyout, and free its name.
18074
18075 2002-07-03 Akim Demaille <akim@epita.fr>
18076
18077 Fix some memory leaks, and fix a bug: state 0 was examined twice.
18078
18079 * src/LR0.c (new_state): Merge into...
18080 (state_list_append): this.
18081 (new_states): Merge into...
18082 (generate_states): here.
18083 (set_states): Don't ensure a proper `errs' state member here, do it...
18084 * src/conflicts.c (conflicts_solve): here.
18085 * src/state.h, src/state.c: Comment changes.
18086 (state_t): Rename member `shifts' as `transitions'.
18087 Adjust all dependencies.
18088 (errs_new): For consistency, also take the values as argument.
18089 (errs_dup): Remove.
18090 (state_errs_set): New.
18091 (state_reductions_set, state_transitions_set): Assert that no
18092 previous value was assigned.
18093 (state_free): New.
18094 (states_free): Use it.
18095 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
18096 temporary storage: use `errs' and `nerrs' as elsewhere.
18097 (set_conflicts): Allocate and free this `errs'.
18098
18099 2002-07-02 Akim Demaille <akim@epita.fr>
18100
18101 * lib/libiberty.h: New.
18102 * lib: Update the bitset implementation from upstream.
18103 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
18104 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
18105 * src/main.c: Adjust bitset stats calls.
18106
18107 2002-07-01 Paul Eggert <eggert@twinsun.com>
18108
18109 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
18110 char, so that negative chars don't collide with $.
18111
18112 2002-06-30 Akim Demaille <akim@epita.fr>
18113
18114 Have the GLR tests be `warning' checked, and fix the warnings.
18115
18116 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
18117 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
18118 (yyremoveDeletes): `yyi' and `yyj' are size_t.
18119 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
18120 (yyaddDeferredAction): static.
18121 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
18122 (yyreportParseError): yyprefix is const.
18123 yytokenp is used only when verbose.
18124 (yy__GNUC__): Replace with __GNUC__.
18125 (yypdumpstack): yyi is size_t.
18126 (yypreference): Un-yy local variables and arguments, to avoid
18127 clashes with `yyr1'. Anyway, we are not in the user name space.
18128 (yytname_size): be an int, as is compared with ints.
18129 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
18130 Use them.
18131 * tests/cxx-gram.at: Use quotation to protect $1.
18132 Use AT_COMPILE to enable warnings hunts.
18133 Prototype yylex and yyerror.
18134 `Use' argc.
18135 Include `string.h', not `strings.h'.
18136 Produce and prototype stmtMerge only when used.
18137 yylex takes a location.
18138
18139 2002-06-30 Akim Demaille <akim@epita.fr>
18140
18141 We spend a lot of time in quotearg, in particular when --verbose.
18142
18143 * src/symtab.c (symbol_get): Store a quoted version of the key.
18144 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
18145 Adjust all callers.
18146
18147 2002-06-30 Akim Demaille <akim@epita.fr>
18148
18149 * src/state.h (reductions_t): Rename member `nreds' as num.
18150 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
18151 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
18152
18153 2002-06-30 Akim Demaille <akim@epita.fr>
18154
18155 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
18156 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
18157 (shifts_to): Rename as...
18158 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
18159 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
18160 (TRANSITION_IS_DISABLED, transitions_to): these.
18161
18162 2002-06-30 Akim Demaille <akim@epita.fr>
18163
18164 * src/print.c (print_shifts, print_gotos): Merge into...
18165 (print_transitions): this.
18166 (print_transitions, print_errs, print_reductions): Align the
18167 lookaheads columns.
18168 (print_core, print_transitions, print_errs, print_state,
18169 print_grammar): Output empty lines separator before, not after.
18170 (state_default_rule_compute): Rename as...
18171 (state_default_rule): this.
18172 * tests/conflicts.at (Defaulted Conflicted Reduction),
18173 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
18174 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
18175
18176 2002-06-30 Akim Demaille <akim@epita.fr>
18177
18178 Display items as we display rules.
18179
18180 * src/gram.h, src/gram.c (rule_lhs_print): New.
18181 * src/gram.c (grammar_rules_partial_print): Use it.
18182 * src/print.c (print_core): Likewise.
18183 * tests/conflicts.at (Defaulted Conflicted Reduction),
18184 (Unresolved SR Conflicts): Adjust.
18185 (Unresolved SR Conflicts): Adjust and rename as...
18186 (Resolved SR Conflicts): this, as was meant.
18187 * tests/regression.at (Web2c Report): Adjust.
18188
18189 2002-06-30 Akim Demaille <akim@epita.fr>
18190
18191 * src/print.c (state_default_rule_compute): New, extracted from...
18192 (print_reductions): here.
18193 Pessimize, but clarify the code.
18194 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
18195
18196 2002-06-30 Akim Demaille <akim@epita.fr>
18197
18198 * src/output.c (action_row): Let default_rule be always a rule
18199 number.
18200
18201 2002-06-30 Akim Demaille <akim@epita.fr>
18202
18203 * src/closure.c (print_firsts, print_fderives, closure):
18204 Use BITSET_EXECUTE.
18205 * src/lalr.c (lookaheads_print): Likewise.
18206 * src/state.c (state_rule_lookaheads_print): Likewise.
18207 * src/print_graph.c (print_core): Likewise.
18208 * src/print.c (print_reductions): Likewise.
18209 * src/output.c (action_row): Likewise.
18210 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
18211
18212 2002-06-30 Akim Demaille <akim@epita.fr>
18213
18214 * src/print_graph.c: Use report_flag.
18215
18216 2002-06-30 Akim Demaille <akim@epita.fr>
18217
18218 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
18219 to...
18220 * src/relation.h, src/relation.c (traverse, relation_digraph)
18221 (relation_print, relation_transpose): New.
18222
18223 2002-06-30 Akim Demaille <akim@epita.fr>
18224
18225 * src/state.h, src/state.c (shifts_to): New.
18226 * src/lalr.c (build_relations): Use it.
18227
18228 2002-06-30 Akim Demaille <akim@epita.fr>
18229
18230 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
18231 (item_number_of_rule_number, rule_number_of_item_number): New.
18232 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
18233 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
18234 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
18235 Propagate their use.
18236 Much remains to be done, in particular wrt `shorts' from types.h.
18237
18238 2002-06-30 Akim Demaille <akim@epita.fr>
18239
18240 * src/symtab.c (symbol_new): Initialize the `printer' member.
18241
18242 2002-06-30 Akim Demaille <akim@epita.fr>
18243
18244 * src/LR0.c (save_reductions): Remove, replaced by...
18245 * src/state.h, src/state.c (state_reductions_set): New.
18246 (reductions, errs): Rename as...
18247 (reductions_t, errs_t): these.
18248 Adjust all dependencies.
18249
18250 2002-06-30 Akim Demaille <akim@epita.fr>
18251
18252 * src/LR0.c (state_list_t, state_list_append): New.
18253 (first_state, last_state): Now symbol_list_t.
18254 (this_state): Remove.
18255 (new_itemsets, append_states, save_reductions): Take a state_t as
18256 argument.
18257 (set_states, generate_states): Adjust.
18258 (save_shifts): Remove, replaced by...
18259 * src/state.h, src/state.c (state_shifts_set): New.
18260 (shifts): Rename as...
18261 (shifts_t): this.
18262 Adjust all dependencies.
18263 * src/state.h (state_t): Remove the `next' member.
18264
18265 2002-06-30 Akim Demaille <akim@epita.fr>
18266
18267 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
18268 escaped in slot 0.
18269
18270 2002-06-30 Akim Demaille <akim@epita.fr>
18271
18272 Use hash.h for the state hash table.
18273
18274 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
18275 (allocate_storage): Use state_hash_new.
18276 (free_storage): Use state_hash_free.
18277 (new_state, get_state): Adjust.
18278 * src/lalr.h, src/lalr.c (states): Move to...
18279 * src/states.h (state_t): Remove the `link' member, no longer
18280 used.
18281 * src/states.h, src/states.c: here.
18282 (state_hash_new, state_hash_free, state_hash_lookup)
18283 (state_hash_insert, states_free): New.
18284 * src/states.c (state_table, state_compare, state_hash): New.
18285 * src/output.c (output_actions): Do not free states now, since we
18286 still need to know the final_state number in `prepare', called
18287 afterwards. Do it...
18288 * src/main.c (main): here: call states_free after `output'.
18289
18290 2002-06-30 Akim Demaille <akim@epita.fr>
18291
18292 * src/state.h, src/state.c (state_new): New, extracted from...
18293 * src/LR0.c (new_state): here.
18294 * src/state.h (STATE_ALLOC): Move to...
18295 * src/state.c: here.
18296 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
18297 * src/state.h, src/state.c: here.
18298
18299 2002-06-30 Akim Demaille <akim@epita.fr>
18300
18301 * src/reader.c (gensym): Rename as...
18302 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
18303 (getsym): Rename as...
18304 (symbol_get): this.
18305
18306 2002-06-30 Akim Demaille <akim@epita.fr>
18307
18308 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
18309 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
18310 * src/output.c, src/print.c, src/print_graph.c: Propagate.
18311 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
18312
18313 2002-06-30 Akim Demaille <akim@epita.fr>
18314
18315 Make the test suite pass with warnings checked.
18316
18317 * tests/actions.at (Printers and Destructors): Improve.
18318 Avoid unsigned vs. signed issues.
18319 * tests/calc.at: Don't exercise the scanner here, do it...
18320 * tests/input.at (Torturing the Scanner): here.
18321
18322 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18323
18324 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
18325 reorganize first lines parallel to yacc.c.
18326
18327 2002-06-28 Akim Demaille <akim@epita.fr>
18328
18329 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
18330 (b4_token_enum, b4_token_defines): New, factored from...
18331 * data/lalr1.cc, data/yacc.c, glr.c: here.
18332
18333 2002-06-28 Akim Demaille <akim@epita.fr>
18334
18335 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
18336 unused variables.
18337 * src/output.c (merger_output): static.
18338
18339 2002-06-28 Akim Demaille <akim@epita.fr>
18340
18341 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
18342 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
18343 pacify GCC.
18344 * src/output.c (save_row): Initialize all the variables to pacify GCC.
18345
18346 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18347
18348 Accumulated changelog for new GLR parsing features.
18349
18350 * src/conflicts.c (count_total_conflicts): Change name to
18351 conflicts_total_count.
18352 * src/conflicts.h: Ditto.
18353 * src/output.c (token_actions): Use the new name.
18354 (output_conflicts): Change conflp => conflict_list_heads, and
18355 confl => conflict_list for better readability.
18356 * data/glr.c: Use the new names.
18357 * NEWS: Add self to GLR announcement.
18358
18359 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
18360
18361 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
18362 Akim Demaille.
18363
18364 * data/bison.glr: Change name to glr.c
18365 * data/glr.c: Renamed from bison.glr.
18366 * data/Makefile.am: Add glr.c
18367
18368 * src/getargs.c:
18369
18370 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
18371 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
18372
18373 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18374
18375 * data/bison.glr: Be sure to restore the
18376 current #line when returning to the skeleton contents after having
18377 exposed the input file's #line.
18378
18379 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18380
18381 * data/bison.glr: Bring up to date with changes to bison.simple.
18382
18383 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18384
18385 * data/bison.glr: Correct definitions that use b4_prefix.
18386 Various reformatting.
18387 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
18388 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
18389 yytokenp argument; now part of stack.
18390 (yychar): Define to behave as documented.
18391 (yyclearin): Ditto.
18392
18393 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18394
18395 * src/reader.h: Add declaration for free_merger_functions.
18396
18397 * src/reader.c (merge_functions): New variable.
18398 (get_merge_function): New function.
18399 (free_merger_functions): New function.
18400 (readgram): Check for %prec that is not followed by a symbol.
18401 Handle %dprec and %merge declarations.
18402 (packgram): Initialize dprec and merger fields in rules array.
18403
18404 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
18405 conflict_list_cnt, conflict_list_free): New variables.
18406 (table_grow): Also grow conflict_table.
18407 (prepare_rules): Output dprec and merger tables.
18408 (conflict_row): New function.
18409 (action_row): Output conflict lists for GLR parser. Don't use
18410 default reduction in conflicted states for GLR parser so that there
18411 are spaces for the conflict lists.
18412 (save_row): Also save conflict information.
18413 (token_actions): Allocate conflict list.
18414 (merger_output): New function.
18415 (pack_vector): Pack conflict table, too.
18416 (output_conflicts): New function to output yyconflp and yyconfl.
18417 (output_check): Allocate conflict_tos.
18418 (output_actions): Output conflict tables, also.
18419 (output_skeleton): Output b4_mergers definition.
18420 (prepare): Output b4_max_rhs_length definition.
18421 Use 'bison.glr' as default skeleton for GLR parsers.
18422
18423 * src/gram.c (glr_parser): New flag.
18424 (grammar_free): Call free_merger_functions.
18425
18426 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
18427 all pairs of conflicting reductions, rather than just all tokens
18428 causing conflicts. Needed to size conflict tables.
18429 (conflicts_output): Modify call to count_rr_conflicts for new
18430 interface.
18431 (conflicts_print): Ditto.
18432 (count_total_conflicts): New function.
18433
18434 * src/reader.h (merger_list): New type.
18435 (merge_functions): New variable.
18436
18437 * src/lex.h (tok_dprec, tok_merge): New token types.
18438
18439 * src/gram.h (rule_s): Add dprec and merger fields.
18440 (glr_parser): New flag.
18441
18442 * src/conflicts.h (count_total_conflicts): New function.
18443
18444 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
18445
18446 * doc/bison.texinfo (Generalized LR Parsing): New section.
18447 (GLR Parsers): New section.
18448 (Language and Grammar): Mention GLR parsing.
18449 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
18450 Correct typo ("tge" -> "the").
18451
18452 * data/bison.glr: New skeleton for GLR parsing.
18453
18454 * tests/cxx-gram.at: New tests for GLR parsing.
18455
18456 * tests/testsuite.at: Include cxx-gram.at.
18457
18458 * tests/Makefile.am: Add cxx-gram.at.
18459
18460 * src/parse-gram.y:
18461
18462 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
18463
18464 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
18465
18466 2002-06-27 Akim Demaille <akim@epita.fr>
18467
18468 * src/options.h, src/options.c: Remove.
18469 * src/getargs.c (short_options, long_options): New.
18470
18471 2002-06-27 Akim Demaille <akim@epita.fr>
18472
18473 * data/bison.simple, data/bison.c++: Rename as...
18474 * data/yacc.c, data/lalr1.cc: these.
18475 * doc/bison.texinfo (Environment Variables): Remove.
18476
18477 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
18478
18479 * src/getargs.c (report_argmatch): Initialize strtok().
18480
18481 2002-06-20 Akim Demaille <akim@epita.fr>
18482
18483 * data/bison.simple (b4_symbol_actions): New, replaces...
18484 (b4_symbol_destructor, b4_symbol_printer): these.
18485 (yysymprint): Be sure to call YYPRINT only for tokens, and using
18486 user token numbers.
18487
18488 2002-06-20 Akim Demaille <akim@epita.fr>
18489
18490 * data/bison.simple (yydestructor): Rename as...
18491 (yydestruct): this.
18492
18493 2002-06-20 Akim Demaille <akim@epita.fr>
18494
18495 * src/symtab.h, src/symtab.c (symbol_type_set)
18496 (symbol_destructor_set, symbol_precedence_set): The location is
18497 the last argument.
18498 Adjust all callers.
18499
18500 2002-06-20 Akim Demaille <akim@epita.fr>
18501
18502 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
18503 internals.
18504 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
18505 Takes a location.
18506 * src/symtab.h, src/symtab.c (symbol_class_set)
18507 (symbol_user_token_number_set): Likewise.
18508 Adjust all callers.
18509 Promote complain_at.
18510 * tests/input.at (Type Clashes): Adjust.
18511
18512 2002-06-20 Akim Demaille <akim@epita.fr>
18513
18514 * data/bison.simple (YYLEX): Fix the declaration when
18515 %pure-parser.
18516
18517 2002-06-20 Akim Demaille <akim@epita.fr>
18518
18519 * data/bison.simple (yysymprint): Don't print the token number,
18520 just its name.
18521 * tests/actions.at (Destructors): Rename as...
18522 (Printers and Destructors): this.
18523 Also exercise %printer.
18524
18525 2002-06-20 Akim Demaille <akim@epita.fr>
18526
18527 * data/bison.simple (YYDSYMPRINT): New.
18528 Use it to remove many of the #if YYDEBUG/if (yydebug).
18529
18530 2002-06-20 Akim Demaille <akim@epita.fr>
18531
18532 * src/symtab.h, src/symtab.c (symbol_t): printer and
18533 printer_location are new members.
18534 (symbol_printer_set): New.
18535 * src/parse-gram.y (PERCENT_PRINTER): New token.
18536 Handle its associated rule.
18537 * src/scan-gram.l: Adjust.
18538 (handle_destructor_at, handle_destructor_dollar): Rename as...
18539 (handle_symbol_code_at, handle_symbol_code_dollar): these.
18540 * src/output.c (symbol_printers_output): New.
18541 (output_skeleton): Call it.
18542 * data/bison.simple (yysymprint): New. Cannot be named yyprint
18543 since there are already many grammar files with a user `yyprint'.
18544 Replace the calls to YYPRINT to calls to yysymprint.
18545 * tests/calc.at: Adjust.
18546 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
18547 taking advantage of parser very internal details (stack size!).
18548
18549 2002-06-20 Akim Demaille <akim@epita.fr>
18550
18551 * src/scan-gram.l: Complete the scanner with the missing patterns
18552 to pacify Flex.
18553 Use `quote' and `symbol_tag_get' where appropriate.
18554
18555 2002-06-19 Akim Demaille <akim@epita.fr>
18556
18557 * tests/actions.at (Destructors): Augment to test locations.
18558 * data/bison.simple (yydestructor): Pass it the current location
18559 if locations are enabled.
18560 Prototype only when __STDC__ or C++.
18561 Change the argument names to move into the yy name space: there is
18562 user code here.
18563
18564 2002-06-19 Akim Demaille <akim@epita.fr>
18565
18566 * data/bison.simple (b4_pure_if): New.
18567 Use it instead of #ifdef YYPURE.
18568
18569 2002-06-19 Akim Demaille <akim@epita.fr>
18570
18571 * data/bison.simple (b4_location_if): New.
18572 Use it instead of #ifdef YYLSP_NEEDED.
18573
18574 2002-06-19 Akim Demaille <akim@epita.fr>
18575
18576 Prepare @$ in %destructor, but currently don't bind it in the
18577 skeleton, as %location use is not cleaned up yet.
18578
18579 * src/scan-gram.l (handle_dollar, handle_destructor_at)
18580 (handle_action_at): New.
18581 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
18582 a braced_code_t and a location as additional arguments.
18583 (handle_destructor_dollar): Instead of requiring `b4_eval', just
18584 unquote one when outputting `b4_dollar_dollar'.
18585 Adjust callers.
18586 * data/bison.simple (b4_eval): Remove.
18587 (b4_symbol_destructor): Adjust.
18588 * tests/input.at (Invalid @n): Adjust.
18589
18590 2002-06-19 Zack Weinberg <zack@codesourcery.com>
18591
18592 * doc/bison.texinfo: Document ability to have multiple
18593 prologue sections.
18594
18595 2002-06-18 Akim Demaille <akim@epita.fr>
18596
18597 * src/files.c (compute_base_names): When computing the output file
18598 names from the input file name, strip the directory part.
18599
18600 2002-06-18 Akim Demaille <akim@epita.fr>
18601
18602 * data/bison.simple.new: Comment changes.
18603 Reported by Andreas Schwab.
18604
18605 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
18606
18607 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
18608 there are no `label `yyoverflowlab' defined but not used' warnings
18609 when yyoverflow is defined.
18610
18611 2002-06-18 Akim Demaille <akim@epita.fr>
18612
18613 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
18614 new member.
18615 (symbol_destructor_set): Adjust.
18616 * src/output.c (symbol_destructors_output): Output the destructor
18617 locations.
18618 Output the symbol name.
18619 * data/bison.simple (b4_symbol_destructor): Adjust.
18620
18621 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
18622 and Akim Demaille <akim@epita.fr>
18623
18624 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
18625 what's left on the stack when the error recovery hits EOF.
18626 * tests/actions.at (Destructors): Complete to exercise this case.
18627
18628 2002-06-17 Akim Demaille <akim@epita.fr>
18629
18630 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
18631 arguments is really empty, not only equal to `[]'.
18632 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
18633 member.
18634 (symbol_destructor_set): New.
18635 * src/output.c (symbol_destructors_output): New.
18636 * src/reader.h (brace_code_t, current_braced_code): New.
18637 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
18638 (handle_dollar): Rename as...
18639 (handle_action_dollar): this.
18640 (handle_destructor_dollar): New.
18641 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
18642 (grammar_declaration): Use it.
18643 * data/bison.simple (yystos): Is always defined.
18644 (yydestructor): New.
18645 * tests/actions.at (Destructors): New.
18646 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
18647
18648 2002-06-17 Akim Demaille <akim@epita.fr>
18649
18650 * src/symlist.h, src/symlist.c (symbol_list_length): New.
18651 * src/scan-gram.l (handle_dollar, handle_at): Compute the
18652 rule_length only when needed.
18653 * src/output.c (actions_output, token_definitions_output): Output
18654 the full M4 block.
18655 * src/symtab.c: Don't access directly to the symbol tag, use
18656 symbol_tag_get.
18657 * src/parse-gram.y: Use symbol_list_free.
18658
18659 2002-06-17 Akim Demaille <akim@epita.fr>
18660
18661 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
18662 (symbol_list_prepend, get_type_name): Move to...
18663 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
18664 (symbol_list_prepend, symbol_list_n_type_name_get): here.
18665 Adjust all callers.
18666 (symbol_list_free): New.
18667 * src/scan-gram.l (handle_dollar): Takes a location.
18668 * tests/input.at (Invalid $n): Adjust.
18669
18670 2002-06-17 Akim Demaille <akim@epita.fr>
18671
18672 * src/reader.h, src/reader.c (symbol_list_new): Export it.
18673 (symbol_list_prepend): New.
18674 * src/parse-gram.y (%union): `list' is a new member.
18675 (symbols.1): New, replaces...
18676 (terms_to_prec.1, nterms_to_type.1): these.
18677 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
18678 Take a location as additional argument.
18679 Adjust all callers.
18680
18681 2002-06-15 Akim Demaille <akim@epita.fr>
18682
18683 * src/parse-gram.y: Move %token in the declaration section so that
18684 we don't depend upon CVS Bison.
18685
18686 2002-06-15 Akim Demaille <akim@epita.fr>
18687
18688 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
18689 * src/print.c (print_core): Use it.
18690
18691 2002-06-15 Akim Demaille <akim@epita.fr>
18692
18693 * src/conflicts.c (log_resolution): Accept the rule involved in
18694 the sr conflicts instead of the lookahead number that points to
18695 that rule.
18696 (flush_reduce): Accept the current lookahead vector as argument,
18697 instead of the index in LA.
18698 (resolve_sr_conflict): Accept the current number of lookahead
18699 bitset to consider for the STATE, instead of the index in LA.
18700 (set_conflicts): Adjust.
18701 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
18702
18703 2002-06-15 Akim Demaille <akim@epita.fr>
18704
18705 * src/state.h (state_t): Replace the `lookaheadsp' member, a
18706 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
18707 Adjust all dependencies.
18708 * src/lalr.c (initialize_lookaheads): Split into...
18709 (states_lookaheads_count, states_lookaheads_initialize): these.
18710 (lalr): Adjust.
18711
18712 2002-06-15 Akim Demaille <akim@epita.fr>
18713
18714 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
18715 out of...
18716 (grammar_rules_print): here.
18717 * src/reduce.c (reduce_output): Use it.
18718 * tests/reduce.at (Useless Rules, Reduced Automaton)
18719 (Underivable Rules): Adjust.
18720
18721 2002-06-15 Akim Demaille <akim@epita.fr>
18722
18723 Copy BYacc's nice way to report the grammar.
18724
18725 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
18726 New.
18727 Don't print the rules' location, it is confusing and useless.
18728 (rule_print): Use grammar_rhs_print.
18729 * src/print.c (print_grammar): Use grammar_rules_print.
18730
18731 2002-06-15 Akim Demaille <akim@epita.fr>
18732
18733 Complete and rationalize `useless thing' warnings.
18734
18735 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
18736 (symbol_tag_print): New.
18737 Use them everywhere in place of accessing directly the tag member.
18738 * src/gram.h, src/gram.c (rule_print): New.
18739 Use it where a rule used to be printed `by hand'.
18740 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
18741 (reduce_grammar_tables): Report the useless rules.
18742 (reduce_print): Useless things are a warning, not an error.
18743 Report it as such.
18744 * tests/reduce.at (Useless Nonterminals, Useless Rules):
18745 (Reduced Automaton, Underivable Rules): Adjust.
18746 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
18747 * tests/conflicts.at (Unresolved SR Conflicts)
18748 (Solved SR Conflicts): Adjust.
18749
18750 2002-06-15 Akim Demaille <akim@epita.fr>
18751
18752 Let symbols have a location.
18753
18754 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
18755 (getsym): Adjust.
18756 Adjust all callers.
18757 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
18758 Use location_t, not int.
18759 * src/symtab.c (symbol_check_defined): Take advantage of the
18760 location.
18761 * tests/regression.at (Invalid inputs): Adjust.
18762
18763 2002-06-15 Akim Demaille <akim@epita.fr>
18764
18765 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
18766 (input): Don't try to initialize yylloc here, do it in the
18767 scanner.
18768 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
18769 * src/gram.h (rule_t): Change line and action_line into location
18770 and action_location, of location_t type.
18771 Adjust all dependencies.
18772 * src/location.h, src/location.c (empty_location): New.
18773 * src/reader.h, src/reader.c (grammar_start_symbol_set)
18774 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
18775 (grammar_current_rule_symbol_append)
18776 (grammar_current_rule_action_append): Expect a location as argument.
18777 * src/reader.c (grammar_midrule_action): Adjust to attach an
18778 action's location as dummy symbol location.
18779 * src/symtab.h, src/symtab.c (startsymbol_location): New.
18780 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
18781 the line numbers.
18782
18783 2002-06-14 Akim Demaille <akim@epita.fr>
18784
18785 Grammar declarations may be found in the grammar section.
18786
18787 * src/parse-gram.y (rules_or_grammar_declaration): New.
18788 (declarations): Each declaration may end with a semicolon, not
18789 just...
18790 (grammar_declaration): `"%union"'.
18791 (grammar): Branch to rules_or_grammar_declaration.
18792
18793 2002-06-14 Akim Demaille <akim@epita.fr>
18794
18795 * src/main.c (main): Invoke scanner_free.
18796
18797 2002-06-14 Akim Demaille <akim@epita.fr>
18798
18799 * src/output.c (m4_invoke): Extracted from...
18800 (output_skeleton): here.
18801 Free tempfile.
18802
18803 2002-06-14 Akim Demaille <akim@epita.fr>
18804
18805 * src/parse-gram.y (directives, directive, gram)
18806 (grammar_directives, precedence_directives, precedence_directive):
18807 Rename as...
18808 (declarations, declaration, grammar, grammar_declaration)
18809 (precedence_declaration, precedence_declarator): these.
18810 (symbol_declaration): New.
18811
18812 2002-06-14 Akim Demaille <akim@epita.fr>
18813
18814 * src/files.c (action_obstack): Remove, unused.
18815 (output_obstack): Remove it, and all its dependencies, as it is no
18816 longer needed.
18817 * src/reader.c (epilogue_set): Build the epilogue in the
18818 muscle_obstack.
18819 * src/output.h, src/output.c (muscle_obstack): Move to...
18820 * src/muscle_tab.h, src/muscle_tab.h: here.
18821 (muscle_init): Initialize muscle_obstack.
18822 (muscle_free): New.
18823 * src/main.c (main): Call it.
18824
18825 2002-06-14 Akim Demaille <akim@epita.fr>
18826
18827 * src/location.h: New, extracted from...
18828 * src/reader.h: here.
18829 * src/Makefile.am (noinst_HEADERS): Merge into
18830 (bison_SOURCES): this.
18831 Add location.h.
18832 * src/parse-gram.y: Use location_t instead of Bison's.
18833 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
18834 Use location_t instead of ints.
18835
18836 2002-06-14 Akim Demaille <akim@epita.fr>
18837
18838 * data/bison.simple, data/bison.c++: Be sure to restore the
18839 current #line when returning to the skeleton contents after having
18840 exposed the input file's #line.
18841
18842 2002-06-12 Akim Demaille <akim@epita.fr>
18843
18844 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
18845 eager.
18846 * tests/actions.at (Exotic Dollars): New.
18847
18848 2002-06-12 Akim Demaille <akim@epita.fr>
18849
18850 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
18851 ['"/] too eagerly.
18852 * tests/input.at (Torturing the Scanner): New.
18853
18854 2002-06-11 Akim Demaille <akim@epita.fr>
18855
18856 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
18857 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
18858 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
18859 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
18860 * src/reader.c (reader): Use it.
18861
18862 2002-06-11 Akim Demaille <akim@epita.fr>
18863
18864 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
18865 Adjust all callers.
18866 (scanner_last_string_free): New.
18867
18868 2002-06-11 Akim Demaille <akim@epita.fr>
18869
18870 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
18871 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
18872 (last_string, YY_OBS_FREE): New.
18873 Use them when returning an ID.
18874
18875 2002-06-11 Akim Demaille <akim@epita.fr>
18876
18877 Have Bison grammars parsed by a Bison grammar.
18878
18879 * src/reader.c, src/reader.h (prologue_augment): New.
18880 * src/reader.c (copy_definition): Remove.
18881
18882 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
18883 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
18884 (grammar_current_rule_prec_set, grammar_current_rule_check)
18885 (grammar_current_rule_symbol_append)
18886 (grammar_current_rule_action_append): Export.
18887 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
18888 (symbol_list_action_append): Remove.
18889 Hook the routines from reader.
18890 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
18891 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
18892
18893 * src/reader.c (read_declarations): Remove, unused.
18894
18895 * src/parse-gram.y: Handle the epilogue.
18896 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
18897 (grammar_start_symbol_set): this.
18898 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
18899 * src/reader.c (readgram): Remove, unused.
18900 (reader): Adjust to insert eoftoken and axiom where appropriate.
18901
18902 * src/reader.c (copy_dollar): Replace with...
18903 * src/scan-gram.h (handle_dollar): this.
18904 * src/parse-gram.y: Remove `%thong'.
18905
18906 * src/reader.c (copy_at): Replace with...
18907 * src/scan-gram.h (handle_at): this.
18908
18909 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
18910 New.
18911
18912 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
18913 time being.
18914
18915 * src/reader.h, src/reader.c (grammar_rule_end): New.
18916
18917 * src/parse.y (current_type, current_class): New.
18918 Implement `%nterm', `%token' support.
18919 Merge `%term' into `%token'.
18920 (string_as_id): New.
18921 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
18922 type name.
18923
18924 * src/parse-gram.y: Be sure to handle properly the beginning of
18925 rules.
18926
18927 * src/parse-gram.y: Handle %type.
18928 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
18929
18930 * src/parse-gram.y: More directives support.
18931 * src/options.c: No longer handle source directives.
18932
18933 * src/parse-gram.y: Fix %output.
18934
18935 * src/parse-gram.y: Handle %union.
18936 Use the prologue locations.
18937 * src/reader.c (parse_union_decl): Remove.
18938
18939 * src/reader.h, src/reader.c (epilogue_set): New.
18940 * src/parse-gram.y: Use it.
18941
18942 * data/bison.simple, data/bison.c++: b4_stype is now either not
18943 defined, then default to int, or to the contents of %union,
18944 without `union' itself.
18945 Adjust.
18946 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
18947
18948 * src/output.c (actions_output): Don't output braces, as they are
18949 already handled by the scanner.
18950
18951 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
18952 characters to themselves.
18953
18954 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
18955 that the epilogue has a proper #line.
18956
18957 * src/parse-gram.y: Handle precedence/associativity.
18958
18959 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
18960 a terminal.
18961 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
18962 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
18963 at all to define terminals that cannot be emitted.
18964
18965 * src/scan-gram.l: Escape M4 characters.
18966
18967 * src/scan-gram.l: Working properly with escapes in user
18968 strings/characters.
18969
18970 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
18971 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
18972 grammar.
18973 Use more modest sizes, as for the time being the parser does not
18974 release memory, and therefore the process swallows a huge amount
18975 of memory.
18976
18977 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
18978 stricter %token grammar.
18979
18980 * src/symtab.h (associativity): Add `undef_assoc'.
18981 (symbol_precedence_set): Do nothing when passed an undef_assoc.
18982 * src/symtab.c (symbol_check_alias_consistence): Adjust.
18983
18984 * tests/regression.at (Invalid %directive): Remove, as it is now
18985 meaningless.
18986 (Invalid inputs): Adjust to the new error messages.
18987 (Token definitions): The new grammar doesn't allow too many
18988 eccentricities.
18989
18990 * src/lex.h, src/lex.c: Remove.
18991 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
18992 (copy_character, copy_string2, copy_string, copy_identifier)
18993 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
18994 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
18995 (parse_action): Remove.
18996 * po/POTFILES.in: Adjust.
18997
18998 2002-06-11 Akim Demaille <akim@epita.fr>
18999
19000 * src/reader.c (parse_action): Don't store directly into the
19001 rule's action member: return the action as a string.
19002 Don't require `rule_length' as an argument: compute it.
19003 (grammar_current_rule_symbol_append)
19004 (grammar_current_rule_action_append): New, eved out from
19005 (readgram): here.
19006 Remove `action_flag', `rulelength', unused now.
19007
19008 2002-06-11 Akim Demaille <akim@epita.fr>
19009
19010 * src/reader.c (grammar_current_rule_prec_set).
19011 (grammar_current_rule_check): New, eved out from...
19012 (readgram): here.
19013 Remove `xaction', `first_rhs': useless.
19014 * tests/input.at (Type clashes): New.
19015 * tests/existing.at (GNU Cim Grammar): Adjust.
19016
19017 2002-06-11 Akim Demaille <akim@epita.fr>
19018
19019 * src/reader.c (grammar_midrule_action): New, Eved out from
19020 (readgram): here.
19021
19022 2002-06-11 Akim Demaille <akim@epita.fr>
19023
19024 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
19025 New.
19026 (readgram): Use them as replacement of inlined code, crule and
19027 crule1.
19028
19029 2002-06-11 Akim Demaille <akim@epita.fr>
19030
19031 * src/reader.c (grammar_end, grammar_symbol_append): New.
19032 (readgram): Use them.
19033 Make the use of `p' as local as possible.
19034
19035 2002-06-10 Akim Demaille <akim@epita.fr>
19036
19037 GCJ's parser requires the tokens to be defined before the prologue.
19038
19039 * data/bison.simple: Output the token definition before the user's
19040 prologue.
19041 * tests/regression.at (Braces parsing, Duplicate string)
19042 (Mixing %token styles): Check the output from bison.
19043 (Early token definitions): New.
19044
19045 2002-06-10 Akim Demaille <akim@epita.fr>
19046
19047 * src/symtab.c (symbol_user_token_number_set): Don't complain when
19048 assigning twice the same user number to a token, so that we can
19049 use it in...
19050 * src/lex.c (lex): here.
19051 Also use `symbol_class_set' instead of hand written code.
19052 * src/reader.c (parse_assoc_decl): Likewise.
19053
19054 2002-06-10 Akim Demaille <akim@epita.fr>
19055
19056 * src/symtab.c, src/symtab.c (symbol_class_set)
19057 (symbol_user_token_number_set): New.
19058 * src/reader.c (parse_token_decl): Use them.
19059 Use a switch instead of ifs.
19060 Use a single argument.
19061
19062 2002-06-10 Akim Demaille <akim@epita.fr>
19063
19064 Remove `%thong' support as it is undocumented, unused, duplicates
19065 `%token's job, and creates useless e-mail traffic with people who
19066 want to know what it is, why it is undocumented, unused, and
19067 duplicates `%token's job.
19068
19069 * src/reader.c (parse_thong_decl): Remove.
19070 * src/options.c (option_table): Remove "thong".
19071 * src/lex.h (tok_thong): Remove.
19072
19073 2002-06-10 Akim Demaille <akim@epita.fr>
19074
19075 * src/symtab.c, src/symtab.c (symbol_type_set)
19076 (symbol_precedence_set): New.
19077 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
19078 (value_components_used): Remove, unused.
19079
19080 2002-06-09 Akim Demaille <akim@epita.fr>
19081
19082 Move symbols handling code out of the reader.
19083
19084 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
19085 (axiom): Move to...
19086 * src/symtab.h, src/symtab.c: here.
19087
19088 * src/gram.c (start_symbol): Remove: use startsymbol->number.
19089 * src/reader.c (startval): Rename as...
19090 * src/symtab.h, src/symtab.c (startsymbol): this.
19091 * src/reader.c: Adjust.
19092
19093 * src/reader.c (symbol_check_defined, symbol_make_alias)
19094 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
19095 (token_translations_init)
19096 Move to...
19097 * src/symtab.c: here.
19098 * src/reader.c (packsymbols): Move to...
19099 * src/symtab.h, src/symtab.c (symbols_pack): here.
19100 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
19101 argument.
19102
19103 2002-06-03 Akim Demaille <akim@epita.fr>
19104
19105 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
19106 then statements.
19107
19108 2002-06-03 Akim Demaille <akim@epita.fr>
19109
19110 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
19111 structs with non literals.
19112 * src/scan-skel.l: never-interactive.
19113 * src/conflicts.c (enum conflict_resolution_e): No trailing
19114 comma.
19115 * src/getargs.c (usage): Split long literal strings.
19116 Reported by Hans Aberg.
19117
19118 2002-05-28 Akim Demaille <akim@epita.fr>
19119
19120 * data/bison.c++: Use C++ ostreams.
19121 (cdebug_): New member.
19122
19123 2002-05-28 Akim Demaille <akim@epita.fr>
19124
19125 * src/output.c (output_skeleton): Be sure to allocate enough room
19126 for `/' _and_ for `\0' in full_skeleton.
19127
19128 2002-05-28 Akim Demaille <akim@epita.fr>
19129
19130 * data/bison.c++: Catch up with bison.simple:
19131 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19132 and Paul Eggert <eggert@twinsun.com>: `error' handing.
19133 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
19134 and popping traces.
19135
19136 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19137
19138 * src/output.c (output_skeleton): Put an explicit path in front of
19139 the skeleton file name, rather than relying on the -I directory,
19140 to partially alleviate effects of having a skeleton file lying around
19141 in the current directory.
19142
19143 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19144
19145 * src/conflicts.c (log_resolution): Correct typo:
19146 obstack_printf should be obstack_fgrow1.
19147
19148 2002-05-26 Akim Demaille <akim@epita.fr>
19149
19150 * src/state.h (state_t): `solved_conflicts' is a new member.
19151 * src/LR0.c (new_state): Set it to 0.
19152 * src/conflicts.h, src/conflicts.c (print_conflicts)
19153 (free_conflicts, solve_conflicts): Rename as...
19154 (conflicts_print, conflicts_free, conflicts_solve): these.
19155 Adjust callers.
19156 * src/conflicts.c (enum conflict_resolution_e)
19157 (solved_conflicts_obstack): New, used by...
19158 (log_resolution): this.
19159 Adjust to attach the conflict resolution to each state.
19160 Complete the description with the precedence/associativity
19161 information.
19162 (resolve_sr_conflict): Adjust.
19163 * src/print.c (print_state): Output its solved_conflicts.
19164 * tests/conflicts.at (Unresolved SR Conflicts)
19165 (Solved SR Conflicts): Exercise --report=all.
19166
19167 2002-05-26 Akim Demaille <akim@epita.fr>
19168
19169 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
19170 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
19171 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
19172 (token_number_t, item_number_as_token_number)
19173 (token_number_as_item_number, muscle_insert_token_number_table):
19174 Rename as...
19175 (symbol_number_t, item_number_as_symbol_number)
19176 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
19177 these, since it is more appropriate.
19178
19179 2002-05-26 Akim Demaille <akim@epita.fr>
19180
19181 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
19182 `Error:' lines.
19183 * data/bison.simple (yystos) [YYDEBUG]: New.
19184 (yyparse) [YYDEBUG]: Display the symbols which are popped during
19185 error recovery.
19186 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
19187
19188 2002-05-25 Akim Demaille <akim@epita.fr>
19189
19190 * doc/bison.texinfo (Debugging): Split into...
19191 (Tracing): this new section, its former contents, and...
19192 (Understanding): this new section.
19193 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
19194 by...
19195 (report_flag): this.
19196 Adjust all dependencies.
19197 (report_args, report_types, report_argmatch): New.
19198 (usage, getargs): Report/support -r, --report.
19199 * src/options.h
19200 (struct option_table_struct): Rename as..,
19201 (struct option_table_s): this.
19202 Rename the `set_flag' member to `flag' to match with getopt_long's
19203 struct.
19204 * src/options.c (option_table): Split verbose into an entry for
19205 %verbose, and another for --verbose.
19206 Support --report/-r, so remove -r from the obsolete --raw.
19207 * src/print.c: Attach full item sets and lookaheads reports to
19208 report_flag instead of trace_flag.
19209 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
19210
19211 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19212 and Paul Eggert <eggert@twinsun.com>
19213
19214 * data/bison.simple (yyparse): Correct error handling to conform to
19215 POSIX and yacc. Specifically, after syntax error is discovered,
19216 do not reduce further before shifting the error token.
19217 Clean up the code a bit by removing the labels yyerrdefault,
19218 yyerrhandle, yyerrpop.
19219 * NEWS: Document the above.
19220
19221 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19222
19223 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
19224 type; it isn't always big enough, since it doesn't necessarily
19225 include non-terminals.
19226 (yytranslate): Expand definition of yy_token_number_type, so that
19227 the latter can be removed.
19228 (yy_token_number_type): Remove, only one use.
19229 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
19230 don't use TokenNumberType as element type.
19231
19232 * tests/regression.at: Modify expected output to agree with change
19233 to yyr1 and yytranslate.
19234
19235 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
19236
19237 * src/reader.c (parse_action): Use copy_character instead of
19238 obstack_1grow.
19239
19240 2002-05-13 Akim Demaille <akim@epita.fr>
19241
19242 * tests/regression.at (Token definitions): Prototype yylex and
19243 yyerror.
19244
19245 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19246
19247 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
19248 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
19249 32-bit arithmetic.
19250 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
19251
19252 2002-05-07 Akim Demaille <akim@epita.fr>
19253
19254 * tests/synclines.at: Be sure to prototype yylex and yyerror to
19255 avoid GCC warnings.
19256
19257 2002-05-07 Akim Demaille <akim@epita.fr>
19258
19259 Kill GCC warnings.
19260
19261 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
19262 over the RHS of each rule.
19263 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
19264 * src/state.h (state_t): Member `nitems' is unsigned short.
19265 * src/LR0.c (get_state): Adjust.
19266 * src/reader.c (packgram): Likewise.
19267 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
19268 `Type'.
19269 (muscle_insert_int_table): Remove, unused.
19270 (prepare_rules): Remove `max'.
19271
19272 2002-05-06 Akim Demaille <akim@epita.fr>
19273
19274 * src/closure.c (print_firsts): Display of the symbol tags.
19275 (bitmatrix_print): Move to...
19276 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
19277 here.
19278 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
19279
19280 2002-05-06 Akim Demaille <akim@epita.fr>
19281
19282 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
19283 hash_do_for_each.
19284
19285 2002-05-06 Akim Demaille <akim@epita.fr>
19286
19287 * src/LR0.c (new_state, get_state): Instead of using the global
19288 `kernel_size' and `kernel_base', have two new arguments:
19289 `core_size' and `core'.
19290 Adjust callers.
19291
19292 2002-05-06 Akim Demaille <akim@epita.fr>
19293
19294 * src/reader.c (packgram): No longer end `ritem' with a 0
19295 sentinel: it is not used.
19296
19297 2002-05-05 Akim Demaille <akim@epita.fr>
19298
19299 New experimental feature: display the lookaheads in the report and
19300 graph.
19301
19302 * src/print (print_core): When --trace-flag, display the rules
19303 lookaheads.
19304 * src/print_graph.c (print_core): Likewise.
19305 Swap the arguments.
19306 Adjust caller.
19307
19308 2002-05-05 Akim Demaille <akim@epita.fr>
19309
19310 * tests/torture.at (Many lookaheads): New test.
19311
19312 2002-05-05 Akim Demaille <akim@epita.fr>
19313
19314 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
19315 (GENERATE_MUSCLE_INSERT_TABLE): this.
19316 (output_int_table, output_unsigned_int_table, output_short_table)
19317 (output_token_number_table, output_item_number_table): Replace with...
19318 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
19319 (muscle_insert_short_table, muscle_insert_token_number_table)
19320 (muscle_insert_item_number_table): these.
19321 Adjust all callers.
19322 (prepare_tokens): Don't free `translations', since...
19323 * src/reader.h, src/reader.c (grammar_free): do it.
19324 Move to...
19325 * src/gram.h, src/gram.c (grammar_free): here.
19326 * data/bison.simple, data/bison.c++: b4_token_number_max is now
19327 b4_translate_max.
19328
19329 2002-05-05 Akim Demaille <akim@epita.fr>
19330
19331 * src/output.c (output_unsigned_int_table): New.
19332 (prepare_rules): `i' is unsigned.
19333 `prhs', `rline', `r2' are unsigned int.
19334 Rename muscle `rhs_number_max' as `rhs_max'.
19335 Output muscles `prhs_max', `rline_max', and `r2_max'.
19336 Free rline and r1.
19337 * data/bison.simple, data/bison.c++: Adjust to use these muscles
19338 to compute types instead of constant types.
19339 * tests/regression.at (Web2c Actions): Adjust.
19340
19341 2002-05-04 Akim Demaille <akim@epita.fr>
19342
19343 * src/symtab.h (SALIAS, SUNDEF): Rename as...
19344 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
19345 Adjust dependencies.
19346 * src/output.c (token_definitions_output): Be sure not to output a
19347 `#define 'a'' when fed with `%token 'a' "a"'.
19348 * tests/regression.at (Token definitions): New.
19349
19350 2002-05-03 Paul Eggert <eggert@twinsun.com>
19351
19352 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
19353 for K&R C.
19354
19355 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
19356
19357 * Makefile.am (SUBDIRS): Remove intl.
19358 (EXTRA_DIST): Add config/config.rpath.
19359
19360 2002-05-03 Akim Demaille <akim@epita.fr>
19361
19362 * data/bison.simple (m4_if): Don't output empty enums.
19363 And actually, output valid enum definitions :(.
19364
19365 2002-05-03 Akim Demaille <akim@epita.fr>
19366
19367 * configure.bat: Remove, completely obsolete.
19368 * Makefile.am (EXTRA_DIST): Adjust.
19369 Don't distribute config.rpath...
19370 * config/Makefile.am (EXTRA_DIST): Do it.
19371
19372 2002-05-03 Akim Demaille <akim@epita.fr>
19373
19374 * configure.in (GETTEXT_VERSION): New.
19375 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
19376
19377 2002-05-03 Akim Demaille <akim@epita.fr>
19378
19379 * data/bison.simple (b4_token_enum): New.
19380 (b4_token_defines): Use it to output tokens both as #define and
19381 enums.
19382 Suggested by Paul Eggert.
19383 * src/output.c (token_definitions_output): Don't output spurious
19384 white spaces.
19385
19386 2002-05-03 Akim Demaille <akim@epita.fr>
19387
19388 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
19389
19390 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
19391
19392 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
19393 Update the stack class, give a try to deque as the default container.
19394
19395 2002-05-02 Akim Demaille <akim@epita.fr>
19396
19397 * data/bison.simple (yyparse): Do not implement @$ = @1.
19398 (YYLLOC_DEFAULT): Adjust to do it.
19399 * doc/bison.texinfo (Location Default Action): Fix.
19400
19401 2002-05-02 Akim Demaille <akim@epita.fr>
19402
19403 * src/reader.c (parse_braces): Merge into...
19404 (parse_action): this.
19405
19406 2002-05-02 Akim Demaille <akim@epita.fr>
19407
19408 * configure.in (ALL_LINGUAS): Remove.
19409 * po/LINGUAS, hr.po: New.
19410
19411 2002-05-02 Akim Demaille <akim@epita.fr>
19412
19413 Remove the so called hairy (semantic) parsers.
19414
19415 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
19416 * src/gram.h, src/gram.c (semantic_parser): Remove.
19417 (rule_t): Remove the guard and guard_line members.
19418 * src/lex.h (token_t): remove tok_guard.
19419 * src/options.c (option_table): Remove %guard and %semantic_parser
19420 support.
19421 * src/output.c, src/output.h (guards_output): Remove.
19422 (prepare): Adjust.
19423 (token_definitions_output): Don't output the `T'
19424 tokens (???).
19425 (output_skeleton): Don't output the guards.
19426 * src/files.c, src/files.c (attrsfile): Remove.
19427 * src/reader.c (symbol_list): Remove the guard and guard_line
19428 members.
19429 Adjust dependencies.
19430 (parse_guard): Remove.
19431 * data/bison.hairy: Remove.
19432 * doc/bison.texinfo (Environment Variables): Remove occurrences of
19433 BISON_HAIRY.
19434
19435 2002-05-02 Akim Demaille <akim@epita.fr>
19436
19437 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
19438 (parse_guard): Rename the formal argument `stack_offset' as
19439 `rule_length', which is more readable.
19440 Adjust callers.
19441 (copy_at, copy_dollar): Instead of outputting the hard coded
19442 values of $$, $n and so forth, output invocation to b4_lhs_value,
19443 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
19444 Note: this patch partially drops `semantic-parser' support: it
19445 always does `rule_length - n', where semantic parsers ought to
19446 always use `-n'.
19447 * data/bison.simple, data/bison.c++ (b4_lhs_value)
19448 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
19449
19450 2002-05-02 Akim Demaille <akim@epita.fr>
19451
19452 * configure.in (AC_INIT): Bump to 1.49b.
19453 (AM_INIT_AUTOMAKE): Short invocation.
19454
19455 2002-05-02 Akim Demaille <akim@epita.fr>
19456
19457 Version 1.49a.
19458
19459 2002-05-01 Akim Demaille <akim@epita.fr>
19460
19461 * src/skeleton.h: Remove.
19462
19463 2002-05-01 Akim Demaille <akim@epita.fr>
19464
19465 * src/skeleton.h: Fix the #endif.
19466 Reported by Magnus Fromreide.
19467
19468 2002-04-26 Paul Eggert <eggert@twinsun.com>
19469
19470 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
19471 Define if we define YYSTYPE and YYLTYPE, respectively.
19472 (YYCOPY): Fix [] quoting problem in the non-GCC case.
19473
19474 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
19475
19476 * src/scan-skel.l: Postprocess quadrigraphs.
19477
19478 * src/reader.c (copy_character): New function, used to output
19479 single characters while replacing `[' and `]' with quadrigraphs, to
19480 avoid troubles with M4 quotes.
19481 (copy_comment): Output characters with copy_character.
19482 (read_additionnal_code): Likewise.
19483 (copy_string2): Likewise.
19484 (copy_definition): Likewise.
19485
19486 * tests/calc.at: Exercise M4 quoting.
19487
19488 2002-04-25 Akim Demaille <akim@epita.fr>
19489
19490 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
19491 between `!' and the command.
19492 Reported by Paul Eggert.
19493
19494 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
19495
19496 * tests/calc.at: Exercise prologue splitting.
19497
19498 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
19499 `b4_post_prologue' instead of `b4_prologue'.
19500
19501 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
19502 muscles.
19503 (output): Free pre_prologue_obstack and post_prologue_obstack.
19504 * src/files.h, src/files.c (attrs_obstack): Remove.
19505 (pre_prologue_obstack, post_prologue_obstack): New.
19506 * src/reader.c (copy_definition): Add a parameter to specify the
19507 obstack to fill, instead of using attrs_obstack unconditionally.
19508 (read_declarations): Pass pre_prologue_obstack to copy_definition if
19509 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
19510
19511 2002-04-23 Paul Eggert <eggert@twinsun.com>
19512
19513 * data/bison.simple: Remove unnecessary commentary and white
19514 space differences from 1_29-branch.
19515 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
19516
19517 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
19518 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
19519 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
19520 constructors or destructors.
19521
19522 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
19523
19524 2002-04-23 Akim Demaille <akim@epita.fr>
19525
19526 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
19527 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
19528 location with columns.
19529 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
19530 All reported by Paul Eggert.
19531
19532 2002-04-22 Akim Demaille <akim@epita.fr>
19533
19534 * src/reduce.c (dump_grammar): Move to...
19535 * src/gram.h, src/gram.c (grammar_dump): here.
19536 Be sure to separate long item numbers.
19537 Don't read the members of a rule's prec if its nil.
19538
19539 2002-04-22 Akim Demaille <akim@epita.fr>
19540
19541 * src/output.c (table_size, table_grow): New.
19542 (MAXTABLE): Remove, replace uses with table_size.
19543 (pack_vector): Instead of dying when the table is too big, grow it.
19544
19545 2002-04-22 Akim Demaille <akim@epita.fr>
19546
19547 * data/bison.simple (yyr1): Its type is that of a token number.
19548 * data/bison.c++ (r1_): Likewise.
19549 * tests/regression.at (Web2c Actions): Adjust.
19550
19551 2002-04-22 Akim Demaille <akim@epita.fr>
19552
19553 * src/reader.c (token_translations_init): 256 is now the default
19554 value for the error token, i.e., it will be assigned another
19555 number if the user assigned 256 to one of her tokens.
19556 (reader): Don't force 256 to error.
19557 * doc/bison.texinfo (Symbols): Adjust.
19558 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
19559 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
19560 etc. instead of 10, 20, 30 (which was used to `jump' over error
19561 (256) and undefined (2)).
19562
19563 2002-04-22 Akim Demaille <akim@epita.fr>
19564
19565 Propagate more token_number_t.
19566
19567 * src/gram.h (token_number_as_item_number)
19568 (item_number_as_token_number): New.
19569 * src/output.c (GENERATE_OUTPUT_TABLE): New.
19570 Use it to create output_item_number_table and
19571 output_token_number_table.
19572 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
19573 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
19574 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
19575 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
19576
19577 2002-04-22 Akim Demaille <akim@epita.fr>
19578
19579 * src/output.h, src/output.c (get_lines_number): Remove.
19580
19581 2002-04-19 Akim Demaille <akim@epita.fr>
19582
19583 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
19584 as Lex/Flex'.
19585 (Debugging): More details about enabling the debugging features.
19586 (Table of Symbols): Describe $$, $n, @$, and @n.
19587 Suggested by Tim Josling.
19588
19589 2002-04-19 Akim Demaille <akim@epita.fr>
19590
19591 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
19592
19593 2002-04-10 Akim Demaille <akim@epita.fr>
19594
19595 * src/system.h: Rely on HAVE_LIMITS_H.
19596 Suggested by Paul Eggert.
19597
19598 2002-04-09 Akim Demaille <akim@epita.fr>
19599
19600 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
19601 full stderr, and strip it according to the bison options, instead
19602 of composing the error message from different bits.
19603 This makes it easier to check for several error messages.
19604 Adjust all the invocations.
19605 Add an invocation exercising the error token.
19606 Add an invocation demonstrating a stupid error message.
19607 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
19608 Adjust the tests.
19609 Error message are for stderr, not stdout.
19610
19611 2002-04-09 Akim Demaille <akim@epita.fr>
19612
19613 * src/gram.h, src/gram.c (error_token_number): Remove, use
19614 errtoken->number.
19615 * src/reader.c (reader): Don't specify the user token number (2)
19616 for $undefined, as it uselessly prevents using it.
19617 * src/gram.h (token_number_t): Move to...
19618 * src/symtab.h: here.
19619 (state_t.number): Is a token_number_t.
19620 * src/print.c, src/reader.c: Use undeftoken->number instead of
19621 hard coded 2.
19622 (Even though this 2 is not the same as above: the number of the
19623 undeftoken remains being 2, it is its user token number which
19624 might not be 2).
19625 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
19626 `user_token_number_max'.
19627 Output `undef_token_number'.
19628 * data/bison.simple, data/bison.c++: Use them.
19629 Be sure to map invalid yylex return values to
19630 `undef_token_number'. This saves us from gratuitous SEGV.
19631
19632 * tests/conflicts.at (Solved SR Conflicts)
19633 (Unresolved SR Conflicts): Adjust.
19634 * tests/regression.at (Web2c Actions): Adjust.
19635
19636 2002-04-08 Akim Demaille <akim@epita.fr>
19637
19638 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
19639 Adding #line.
19640 Remove the duplicate `typedefs'.
19641 (RhsNumberType): Fix the declaration and various other typos.
19642 Use __ofile__.
19643 * data/bison.simple: Use __ofile__.
19644 * src/scan-skel.l: Handle __ofile__.
19645
19646 2002-04-08 Akim Demaille <akim@epita.fr>
19647
19648 * src/gram.h (item_number_t): New, the type of item numbers in
19649 RITEM. Note that it must be able to code symbol numbers as
19650 positive number, and the negation of rule numbers as negative
19651 numbers.
19652 Adjust all dependencies (pretty many).
19653 * src/reduce.c (rule): Remove this `short *' pointer: use
19654 item_number_t.
19655 * src/system.h (MINSHORT, MAXSHORT): Remove.
19656 Include `limits.h'.
19657 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
19658 (shortcpy): Remove.
19659 (MAXTABLE): Move to...
19660 * src/output.c (MAXTABLE): here.
19661 (prepare_rules): Use output_int_table to output rhs.
19662 * data/bison.simple, data/bison.c++: Adjust.
19663 * tests/torture.at (Big triangle): Move the limit from 254 to
19664 500.
19665 * tests/regression.at (Web2c Actions): Ajust.
19666
19667 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
19668 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
19669 passes, but produces negative #line number, once fixed, GCC is
19670 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
19671 C), it passes.
19672 * src/state.h (state_h): Code input lines on ints, not shorts.
19673
19674 2002-04-08 Akim Demaille <akim@epita.fr>
19675
19676 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
19677 and then the grammar.
19678
19679 2002-04-08 Akim Demaille <akim@epita.fr>
19680
19681 * src/system.h: No longer using strndup.
19682
19683 2002-04-07 Akim Demaille <akim@epita.fr>
19684
19685 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
19686 * src/output.c (output_table_data): Return the longest number.
19687 (prepare_tokens): Output `token_number_max').
19688 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
19689 New.
19690 Use them to define yy_token_number_type/TokenNumberType.
19691 Use this type for yytranslate.
19692 * tests/torture.at (Big triangle): Push the limit from 124 to
19693 253.
19694 * tests/regression.at (Web2c Actions): Adjust.
19695
19696 2002-04-07 Akim Demaille <akim@epita.fr>
19697
19698 * tests/torture.at (Big triangle): New.
19699 (GNU AWK Grammar, GNU Cim Grammar): Move to...
19700 * tests/existing.at: here.
19701
19702 2002-04-07 Akim Demaille <akim@epita.fr>
19703
19704 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
19705 nritems.
19706 Adjust dependencies.
19707
19708 2002-04-07 Akim Demaille <akim@epita.fr>
19709
19710 * src/reader.c: Normalize increments to prefix form.
19711
19712 2002-04-07 Akim Demaille <akim@epita.fr>
19713
19714 * src/reader.c, symtab.c: Remove debugging code.
19715
19716 2002-04-07 Akim Demaille <akim@epita.fr>
19717
19718 Rename all the `bucket's as `symbol_t'.
19719
19720 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
19721 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
19722 * src/symtab.c, src/symtab.h (bucket): Rename as...
19723 (symbol_t): this.
19724 (symbol_list_new, bucket_check_defined, bucket_make_alias)
19725 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
19726 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
19727 (buckets_new, buckets_free, buckets_do): Rename as...
19728 (symbol_list_new, symbol_check_defined, symbol_make_alias)
19729 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
19730 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
19731 (symbols_new, symbols_free, symbols_do): these.
19732
19733 2002-04-07 Akim Demaille <akim@epita.fr>
19734
19735 Use lib/hash for the symbol table.
19736
19737 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
19738 EOF.
19739 * src/lex.c (lex): Set the `number' member of new terminals.
19740 * src/reader.c (bucket_check_defined, bucket_make_alias)
19741 (bucket_check_alias_consistence, bucket_translation): New.
19742 (reader, grammar_free, readgram, token_translations_init)
19743 (packsymbols): Adjust.
19744 (reader): Number the predefined tokens.
19745 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
19746 for predefined tokens.
19747 * src/symtab.h (bucket): Remove all the hash table related
19748 members.
19749 * src/symtab.c (symtab): Replace by...
19750 (bucket_table): this.
19751 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
19752 (buckets_new, buckets_do): New.
19753
19754 2002-04-07 Akim Demaille <akim@epita.fr>
19755
19756 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
19757 (start_symbol, max_user_token_number, semantic_parser)
19758 (error_token_number): Initialize.
19759 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
19760 Initialize.
19761 (reader): Don't.
19762 (errtoken, eoftoken, undeftoken, axiom): Extern.
19763
19764 2002-04-07 Akim Demaille <akim@epita.fr>
19765
19766 * src/gram.h (rule_s): prec and precsym are now pointers
19767 to the bucket giving the priority/associativity.
19768 Member `associativity' removed: useless.
19769 * src/reduce.c, src/conflicts.c: Adjust.
19770
19771 2002-04-07 Akim Demaille <akim@epita.fr>
19772
19773 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
19774 Properly escape the symbols' TAG when outputting them.
19775
19776 2002-04-07 Akim Demaille <akim@epita.fr>
19777
19778 * src/lalr.h (LA): Is a bitsetv, not bitset*.
19779
19780 2002-04-07 Akim Demaille <akim@epita.fr>
19781
19782 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
19783 (LArule): this, which is an array to rule_t*.
19784 * src/print.c, src/conflicts.c: Adjust.
19785
19786 2002-04-07 Akim Demaille <akim@epita.fr>
19787
19788 * src/gram.h (rule_t): Rename `number' as `user_number'.
19789 `number' is a new member.
19790 Adjust dependencies.
19791 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
19792
19793 2002-04-07 Akim Demaille <akim@epita.fr>
19794
19795 As a result of the previous patch, it is no longer needed
19796 to reorder ritem itself.
19797
19798 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
19799
19800 2002-04-07 Akim Demaille <akim@epita.fr>
19801
19802 Be sure never to walk through RITEMS, but use only data related to
19803 the rules themselves. RITEMS should be banished.
19804
19805 * src/output.c (output_token_translations): Rename as...
19806 (prepare_tokens): this.
19807 In addition to `translate', prepare the muscles `tname' and
19808 `toknum', which were handled by...
19809 (output_rule_data): this.
19810 Remove, and move the remainder of its outputs into...
19811 (prepare_rules): this new routines, which also merges content from
19812 (output_gram): this.
19813 (prepare_rules): Be sure never to walk through RITEMS.
19814 (output_stos): Rename as...
19815 (prepare_stos): this.
19816 (output): Always invoke prepare_states, after all, just don't use it
19817 in the output if you don't need it.
19818
19819 2002-04-07 Akim Demaille <akim@epita.fr>
19820
19821 * src/LR0.c (new_state): Display `nstates' as the name of the
19822 newly created state.
19823 Adjust to initialize first_state and last_state if needed.
19824 Be sure to distinguish the initial from the final state.
19825 (new_states): Create the itemset of the initial state, and use
19826 new_state.
19827 * src/closure.c (closure): Now that the initial state has its
19828 items properly set, there is no need for a special case when
19829 creating `ruleset'.
19830
19831 As a result, now the rule 0, reducing to $axiom, is visible in the
19832 outputs. Adjust the test suite.
19833
19834 * tests/conflicts.at (Solved SR Conflicts)
19835 (Unresolved SR Conflicts): Adjust.
19836 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
19837 * tests/conflicts.at (S/R in initial): New.
19838
19839 2002-04-07 Akim Demaille <akim@epita.fr>
19840
19841 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
19842 the RHS of the rules.
19843 * src/output.c (output_gram): Likewise.
19844
19845 2002-04-07 Akim Demaille <akim@epita.fr>
19846
19847 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
19848 bucket.
19849 Adjust all dependencies.
19850 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
19851 `number' of the buckets too.
19852 * src/gram.h: Include `symtab.h'.
19853 (associativity): Move to...
19854 * src/symtab.h: here.
19855 No longer include `gram.h'.
19856
19857 2002-04-07 Akim Demaille <akim@epita.fr>
19858
19859 * src/gram.h, src/gram.c (rules_rhs_length): New.
19860 (ritem_longest_rhs): Use it.
19861 * src/gram.h (rule_t): `number' is a new member.
19862 * src/reader.c (packgram): Set it.
19863 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
19864 the end of `rules', and count them out of `nrules'.
19865 (reduce_output, dump_grammar): Adjust.
19866 * src/print.c (print_grammar): It is no longer needed to check for
19867 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
19868 * tests/reduce.at (Reduced Automaton): New test.
19869
19870 2002-04-07 Akim Demaille <akim@epita.fr>
19871
19872 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
19873 lacking `+ 1' to nrules, Bison reported as useless a token if it
19874 was used solely to set the precedence of the last rule...
19875
19876 2002-04-07 Akim Demaille <akim@epita.fr>
19877
19878 * data/bison.c++, data/bison.simple: Don't output the current file
19879 name in #line, to avoid useless diffs between two identical
19880 outputs under different names.
19881
19882 2002-04-07 Akim Demaille <akim@epita.fr>
19883
19884 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
19885 Normalize loops to using `< nrules + 1', not `<= nrules'.
19886
19887 2002-04-07 Akim Demaille <akim@epita.fr>
19888
19889 * TODO: Update.
19890
19891 2002-04-07 Akim Demaille <akim@epita.fr>
19892
19893 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
19894 bucket.value as bucket.number.
19895
19896 2002-04-07 Akim Demaille <akim@epita.fr>
19897
19898 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
19899 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
19900 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
19901 RHS, instead of being an index in RITEMS.
19902
19903 2002-04-04 Paul Eggert <eggert@twinsun.com>
19904
19905 * doc/bison.texinfo: Update copyright date.
19906 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
19907 (Symbols): Warn about running Bison in one character set,
19908 but compiling and/or running in an incompatible one.
19909 Warn about character code 256, too.
19910
19911 2002-04-03 Paul Eggert <eggert@twinsun.com>
19912
19913 * src/bison.data (YYSTACK_ALLOC): Depend on whether
19914 YYERROR_VERBOSE is nonzero, not whether it is defined.
19915
19916 Merge changes from bison-1_29-branch.
19917
19918 2002-03-20 Paul Eggert <eggert@twinsun.com>
19919
19920 Merge fixes from Debian bison_1.34-1.diff.
19921
19922 * configure.in (AC_PREREQ): 2.53.
19923
19924 2002-03-20 Akim Demaille <akim@epita.fr>
19925
19926 * src/conflicts.c (log_resolution): Argument `resolution' is const.
19927
19928 2002-03-19 Paul Eggert <eggert@twinsun.com>
19929
19930 * src/bison.simple (YYCOPY): New macro.
19931 (YYSTACK_RELOCATE): Use it.
19932 Remove Type arg; no longer needed. All callers changed.
19933 (yymemcpy): Remove; no longer needed.
19934
19935 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
19936 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
19937
19938 2002-03-19 Akim Demaille <akim@epita.fr>
19939
19940 Test and fix the #line outputs.
19941
19942 * tests/atlocal.at (GCC): New.
19943 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
19944 (Prologue synch line, %union synch line, Postprologue synch line)
19945 (Action synch line, Epilogue synch line): New tests.
19946 * src/reader.c (parse_union_decl): Define the muscle stype_line.
19947 * data/bison.simple, data/bison.c++: Use it.
19948
19949 2002-03-19 Akim Demaille <akim@epita.fr>
19950
19951 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
19952 (Solved SR Conflicts, %expect not enough, %expect right)
19953 (%expect too much): Move to...
19954 * tests/conflicts.at: this new file.
19955
19956 2002-03-19 Akim Demaille <akim@epita.fr>
19957
19958 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
19959 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
19960 that we can move to enums for instance.
19961 * src/output.c (token_definitions_output): Output a list of
19962 `token-name, token-number' instead of the #define.
19963 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
19964
19965 2002-03-14 Akim Demaille <akim@epita.fr>
19966
19967 Use Gettext 0.11.1.
19968
19969 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
19970
19971 * data/bison.c++: Make the user able to add members to the generated
19972 parser by subclassing.
19973
19974 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
19975
19976 * src/reader.c (read_additionnal_code): `c' should be an integer, not
19977 a character.
19978 Reported by Nicolas Tisserand and Nicolas Burrus.
19979
19980 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
19981
19982 * src/reader.c: Warn about lacking semi-colons, do not complain.
19983
19984 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
19985
19986 * data/bison.c++: Remove a debug line.
19987
19988 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
19989
19990 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
19991 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
19992 provide a default implementation.
19993
19994 2002-03-04 Akim Demaille <akim@epita.fr>
19995
19996 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
19997 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
19998 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
19999 * tests/semantic.at (Parsing Guards): Similarly.
20000 * src/reader.at (readgram): Complain if the last rule is not ended
20001 with a semi-colon.
20002
20003 2002-03-04 Akim Demaille <akim@epita.fr>
20004
20005 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
20006 * src/closure.c: here.
20007 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
20008 RTC.
20009 * src/warshall.h, src/warshall.c: Remove.
20010 * tests/sets.at (Broken Closure): Adjust.
20011
20012 2002-03-04 Akim Demaille <akim@epita.fr>
20013
20014 * src/output.c (output_skeleton): tempdir is const.
20015 bytes_read is unused.
20016
20017 2002-03-04 Akim Demaille <akim@epita.fr>
20018
20019 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
20020 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
20021 Update.
20022 From Michael Hayes.
20023
20024 2002-03-04 Akim Demaille <akim@epita.fr>
20025
20026 * src/closure.c (closure): `r' is unused.
20027
20028 2002-03-04 Akim Demaille <akim@epita.fr>
20029
20030 * tests/sets.at (Broken Closure): Add the ending `;'.
20031 * src/reader.at (readgram): Complain if a rule is not ended with a
20032 semi-colon.
20033
20034 2002-03-04 Akim Demaille <akim@epita.fr>
20035
20036 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
20037 (count_sr_conflicts): Use bitset_count.
20038 * src/reduce.c (inaccessable_symbols): Ditto.
20039 (bits_size): Remove.
20040 * src/warshall.h, src/warshall.c: Convert to bitsetv.
20041
20042 2002-03-04 Akim Demaille <akim@epita.fr>
20043
20044 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
20045 * src/reduce.c: Remove the `bitset_zero's following the
20046 `bitset_create's, as now it is performed by the latter.
20047
20048 2002-03-04 Akim Demaille <akim@epita.fr>
20049
20050 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
20051 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
20052 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
20053 latest sources from Michael.
20054
20055 2002-03-04 Akim Demaille <akim@epita.fr>
20056
20057 * src/output.c (output): Don't free the grammar.
20058 * src/reader.c (grammar_free): New.
20059 * src/main.c (main): Call it and don't free symtab here.
20060
20061 2002-03-04 Akim Demaille <akim@epita.fr>
20062
20063 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
20064 before returning.
20065 Reported by Benoit Perrot.
20066
20067 2002-03-04 Akim Demaille <akim@epita.fr>
20068
20069 Use bitset operations when possible, not loops over bits.
20070
20071 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
20072 bitset_or.
20073 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
20074 * src/reduce.c (useless_nonterminals): Formatting changes.
20075 * src/warshall.c (TC): Use bitset_or.
20076
20077 2002-03-04 Akim Demaille <akim@epita.fr>
20078
20079 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
20080 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
20081 Ditto.
20082
20083 2002-03-04 Akim Demaille <akim@epita.fr>
20084
20085 * src/lalr.c (F): Now a bitset*.
20086 Adjust all dependencies.
20087
20088 2002-03-04 Akim Demaille <akim@epita.fr>
20089
20090 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
20091 Adjust all dependencies.
20092
20093 2002-03-04 Akim Demaille <akim@epita.fr>
20094
20095 * src/L0.c, src/LR0.h (nstates): Be size_t.
20096 Adjust comparisons (signed vs unsigned).
20097 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
20098 bitset*.
20099 Adjust all dependencies.
20100
20101 2002-03-04 Akim Demaille <akim@epita.fr>
20102
20103 * src/closure.c (firsts): Now, also a bitset.
20104 Adjust all dependencies.
20105 (varsetsize): Remove, now unused.
20106 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
20107
20108 2002-03-04 Akim Demaille <akim@epita.fr>
20109
20110 * src/print.c: Convert to use bitset.h, not hand coded iterations
20111 over ints.
20112
20113 2002-03-04 Akim Demaille <akim@epita.fr>
20114
20115 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
20116
20117 2002-03-04 Akim Demaille <akim@epita.fr>
20118
20119 * src/closure.c (ruleset): Be a bitset.
20120 (rulesetsize): Remove.
20121
20122 2002-03-04 Akim Demaille <akim@epita.fr>
20123
20124 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
20125 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
20126 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
20127 * src/closure.c (fderives): Be an array of bitsets.
20128
20129 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
20130
20131 * data/bison.c++: Merge the two generated headers. Insert a copyright
20132 notice in each output file.
20133
20134 2002-02-28 Akim Demaille <akim@epita.fr>
20135
20136 * data/bison.c++: Copy the prologue of bison.simple to fetch
20137 useful M4 definitions, such as b4_header_guard.
20138
20139 2002-02-25 Akim Demaille <akim@epita.fr>
20140
20141 * src/getargs.c (version): Give the name of the authors, and use a
20142 translator friendly scheme for the bgr
20143 copyright notice.
20144
20145 2002-02-25 Akim Demaille <akim@epita.fr>
20146
20147 * src/output.c (header_output): Remove, now handled completely via
20148 M4.
20149
20150 2002-02-25 Akim Demaille <akim@epita.fr>
20151
20152 * m4/m4.m4: New, from CVS Autoconf.
20153 * configure.in: Invoke it.
20154 * src/output.c (output_skeleton): Use its result instead of the
20155 hard coded name.
20156
20157 2002-02-25 Akim Demaille <akim@epita.fr>
20158
20159 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
20160 Fileutils 4.1.5.
20161 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
20162 * src/output.c (output_skeleton): Use mkstemp to create a real
20163 temporary file.
20164 Move the filling of `skeleton' and its muscle to...
20165 (prepare): here.
20166 (output): Move the definition of the prologue muscle to...
20167 (prepare): here.
20168 * src/system.h (DEFAULT_TMPDIR): New.
20169
20170 2002-02-14 Paul Eggert <eggert@twinsun.com>
20171
20172 Remove the support for C++ namespace cleanliness; it was
20173 causing more problems than it was curing, since it didn't work
20174 properly on some nonstandard C++ compilers. This can wait
20175 for a proper C++ parser.
20176
20177 * NEWS: Document this.
20178 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
20179 of C++, as it's treated like C now.
20180 * src/bison.simple (YYSTD): Remove.
20181 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
20182 Treat C++ just like Standard C instead of trying to support
20183 namespace cleanliness.
20184
20185 2002-02-14 Akim Demaille <akim@epita.fr>
20186
20187 * tests/regression.at (else): Adjust to Andreas' change.
20188
20189 2002-02-14 Akim Demaille <akim@epita.fr>
20190
20191 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
20192
20193 2002-02-13 Andreas Schwab <schwab@suse.de>
20194
20195 * src/output.c (output_rule_data): Don't output NULL, it might
20196 not be defined yet.
20197
20198 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
20199
20200 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
20201 (Copyright notice): Update.
20202
20203 2002-02-11 Akim Demaille <akim@epita.fr>
20204
20205 * tests/regression.at (%nonassoc and eof): Don't include
20206 nonportable headers.
20207
20208 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
20209
20210 * data/bison.c++: Correct error recovery. Make the user able to
20211 initialize the starting location.
20212
20213 2002-02-07 Akim Demaille <akim@epita.fr>
20214
20215 * tests/input.at: New.
20216
20217 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
20218
20219 * data/bison.c++: Replace some direct m4 expansions by constants. Be
20220 more consistent when naming methods and variables. Put preprocessor
20221 directives around tables only needed for debugging.
20222
20223 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
20224
20225 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
20226 C++ parsers.
20227 (yy::b4_name::parse): Use print_.
20228
20229 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
20230
20231 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
20232
20233 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
20234
20235 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
20236 C++ parsers.
20237 (yy::b4_name::parse): Build verbose error messages, and use error_.
20238
20239 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
20240
20241 * data/bison.c++: Fix m4 quoting in comments.
20242
20243 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
20244
20245 * data/bison.c++: Adjust the parser code. Fix some muscles that were
20246 not expanded by m4.
20247
20248 2002-02-05 Akim Demaille <akim@epita.fr>
20249
20250 * data/bison.c++: Adjust to the M4 back end.
20251 More is certainly needed.
20252
20253 2002-02-05 Akim Demaille <akim@epita.fr>
20254
20255 Give a try to M4 as a back end.
20256
20257 * lib/readpipe.c: New, from wdiff.
20258 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
20259 BISON_HAIRY.
20260 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
20261 specific values. Now it is m4 that performs the lookup.
20262 * src/parse-skel.y: Remove.
20263 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
20264 * src/output.c (actions_output, guards_output)
20265 (token_definitions_output): No longer keeps track of the output
20266 line number, hence remove the second argument.
20267 (guards_output): Check against the guard member of a rule, not the
20268 action member.
20269 Adjust callers.
20270 (output_skeleton): Don't look for the skeleton location, let m4 do
20271 that.
20272 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
20273 file will be used.
20274 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
20275 (prepare): Given that for the time being changesyntax is not
20276 usable in M4, rename the muscles using `-' to `_'.
20277 Define `defines_flag', `output_parser_name' and `output_header_name'.
20278 * src/output.h (actions_output, guards_output)
20279 (token_definitions_output): Adjust prototypes.
20280 * src/scan-skel.l: Instead of scanning the skeletons, it now
20281 processes the output of m4: `__oline__' and `#output'.
20282 * data/bison.simple: Adjust to be used by M4(sugar).
20283 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
20284 to date.
20285 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
20286 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
20287 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
20288 shamelessly stolen from CVS Autoconf.
20289
20290 2002-02-05 Akim Demaille <akim@epita.fr>
20291
20292 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
20293 * configure.in: Check for the declarations of free and malloc.
20294 * src/muscle_tab.c: Adjust.
20295
20296 2002-02-05 Akim Demaille <akim@epita.fr>
20297
20298 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
20299 which have no values.
20300
20301 2002-02-05 Akim Demaille <akim@epita.fr>
20302
20303 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
20304 * data/: here.
20305
20306 2002-01-29 Paul Eggert <eggert@twinsun.com>
20307
20308 * src/bison.simple (YYSIZE_T): Do not define merely because
20309 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
20310 On some platforms, <alloca.h> does not declare YYSTD (size_t).
20311
20312 2002-01-27 Akim Demaille <akim@epita.fr>
20313
20314 Fix `%nonassoc and eof'.
20315
20316 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
20317 which were not properly copied! Replace
20318 memcpy (res->errs, src->errs, src->nerrs);
20319 with
20320 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
20321 !!!
20322 * tests/regression.at (%nonassoc and eof): Adjust to newest
20323 Autotest: `.' is not in the PATH.
20324
20325 2002-01-27 Akim Demaille <akim@epita.fr>
20326
20327 * tests/sets.at (AT_EXTRACT_SETS): New.
20328 (Nullable): Use it.
20329 (Firsts): New.
20330
20331 2002-01-26 Akim Demaille <akim@epita.fr>
20332
20333 * tests/actions.at, tests/calc.at, tests/headers.at,
20334 * tests/torture.at: Adjust to the newest Autotest which no longer
20335 forces `.' in the PATH.
20336
20337 2002-01-25 Akim Demaille <akim@epita.fr>
20338
20339 * tests/regression.at (%nonassoc and eof): New.
20340 Suggested by Robert Anisko.
20341
20342 2002-01-24 Akim Demaille <akim@epita.fr>
20343
20344 Bison dumps core when trying to complain about broken input files.
20345 Reported by Cris van Pelt.
20346
20347 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
20348 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
20349 into...
20350 (Invalid inputs): Strengthen: exercise parse_percent_token.
20351
20352 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
20353
20354 * src/Makefile.am: Add bison.c++.
20355 * src/bison.c++: New skeleton.
20356
20357 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
20358
20359 * po/it.po: New.
20360
20361 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
20362
20363 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
20364
20365 2002-01-20 Marc Autret <marc@gnu.org>
20366
20367 * src/files.c (compute_output_file_names): Fix
20368
20369 2002-01-20 Marc Autret <marc@gnu.org>
20370
20371 * tests/output.at: New test.
20372 * src/files.c (compute_base_names): Don't map extensions when
20373 the YACC flag is set, use defaults.
20374 Reported by Evgeny Stambulchik.
20375
20376 2002-01-20 Marc Autret <marc@gnu.org>
20377
20378 * src/system.h: Need to define __attribute__ away for non-GCC
20379 compilers as well (i.e., the vendor C compiler).
20380 Suggested by Albert Chin-A-Young.
20381
20382 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
20383
20384 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
20385 canonical definition.
20386 * src/system.h: Use the canonical definition for PARAMS (avoids
20387 a conflict with the macro from lib/hash.h).
20388
20389 2002-01-11 Akim Demaille <akim@epita.fr>
20390
20391 * configure.in: Use AC_FUNC_STRNLEN.
20392 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
20393
20394 2002-01-09 Akim Demaille <akim@epita.fr>
20395
20396 * src/files.c, src/files.h (output_infix): New.
20397 (tab_extension): Remove.
20398 (compute_base_names): Compute the former, drop the latter.
20399 * src/output.c (prepare): Insert the muscles `output-infix', and
20400 `output-suffix'.
20401 * src/parse-skel.y (string, string.1): New.
20402 (section.header): Use it.
20403 (section.yacc): Remove.
20404 (prefix): Remove too.
20405 * src/scan-skel.l: Adjust.
20406 * src/bison.simple, src/bison.hairy: Adjust.
20407
20408 2002-01-09 Akim Demaille <akim@epita.fr>
20409
20410 * configure.in (WERROR_CFLAGS): Compute it.
20411 * src/Makefile.am (CFLAGS): Pass it.
20412 * tests/atlocal.in (CFLAGS): Idem.
20413 * src/files.c: Fix a few warnings.
20414 (get_extension_index): Remove, unused.
20415
20416 2002-01-08 Akim Demaille <akim@epita.fr>
20417
20418 * src/getargs.c (AS_FILE_NAME): New.
20419 (getargs): Use it to convert DOSish file names.
20420 * src/files.c (base_name): Rename as full_base_name to avoid
20421 clashes with `base_name ()'.
20422 (filename_split): New.
20423 (compute_base_names): N-th rewrite, using filename_split.
20424
20425 2002-01-08 Akim Demaille <akim@epita.fr>
20426
20427 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
20428 New, stolen from the Fileutils 4.1.
20429 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
20430 * configure.in: Check for the presence of memrchr, and of its
20431 prototype.
20432
20433 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
20434
20435 * lib/hash.h (__P): Added definition for this macro.
20436 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
20437 BUILT_SOURCES, to ensure they are generated first.
20438 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
20439 %error-verbose to allow bootstrapping with bison 1.30x.
20440
20441 2002-01-06 Akim Demaille <akim@epita.fr>
20442
20443 * src/reader.c (parse_braces): Don't fetch the next char, the
20444 convention is to fetch on entry.
20445 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
20446 'switch' without a following semicolon.
20447 * tests/regression.at (braces parsing): New.
20448
20449 2002-01-06 Akim Demaille <akim@epita.fr>
20450
20451 Bison is dead wrong in its RR conflict reports.
20452
20453 * tests/torture.at (GNU Cim Grammar): New.
20454 * src/conflicts.c (count_rr_conflicts): Fix.
20455
20456 2002-01-06 Akim Demaille <akim@epita.fr>
20457
20458 Creating package.m4 from configure.ac causes too many problems.
20459
20460 * tests/Makefile.am (package.m4): Create it by hand,
20461 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
20462
20463 2002-01-06 Akim Demaille <akim@epita.fr>
20464
20465 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
20466 skeleton.h.
20467
20468 2002-01-04 Paul Eggert <eggert@twinsun.com>
20469
20470 * doc/bison.texinfo (Debugging):
20471 Remove YYSTDERR; it's no longer defined or used.
20472 Also, s/cstdio.h/cstdio/.
20473
20474 2002-01-03 Akim Demaille <akim@epita.fr>
20475
20476 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
20477
20478 2002-01-03 Akim Demaille <akim@epita.fr>
20479
20480 * src/parse-skel.y (process_skeleton): Don't bind the parser's
20481 tracing code to --trace, wait for a better --trace option, with
20482 args.
20483
20484 2002-01-03 Akim Demaille <akim@epita.fr>
20485
20486 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
20487 The ISO C++ standard is extremely clear about it: stderr is
20488 considered a macro, not a regular symbol (see table 94 `Header
20489 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
20490 Therefore std:: does not apply to it. It still does with fprintf.
20491 Also, s/cstdio.h/cstdio/.
20492
20493 2002-01-03 Akim Demaille <akim@epita.fr>
20494
20495 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
20496 for non system headers.
20497
20498 2002-01-02 Akim Demaille <akim@epita.fr>
20499
20500 Equip the skeleton chain with location tracking, runtime trace,
20501 pure parser and scanner.
20502
20503 * src/parse-skel.y: Request a pure parser, locations, and prefix
20504 renaming.
20505 (%union): Having several members with the same type does not help
20506 type mismatches, simplify.
20507 (YYPRINT, yyprint): New.
20508 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
20509 (skel_error): this.
20510 Handle locations.
20511 * src/scan-skel.l: Adjust to these changes.
20512 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
20513 (LOCATION_PRINT, skel_control_t): New.
20514
20515 2001-12-30 Akim Demaille <akim@epita.fr>
20516
20517 * src/parse-skel.y: Get rid of the shift/reduce conflict:
20518 replace `gb' with BLANKS.
20519 * src/scan-skel.l: Adjust.
20520
20521 2001-12-30 Akim Demaille <akim@epita.fr>
20522
20523 * src/system.h: We don't need nor want bcopy.
20524 Throw away MS-DOS crap: we don't need getpid.
20525 * configure.in: We don't need strndup. It was even causing
20526 problems: because Flex includes the headers *before* us,
20527 _GNU_SOURCE is not defined by config.h, and therefore strndup was
20528 not visible.
20529 * lib/xstrndup.c: New.
20530 * src/scan-skel.l: Use it.
20531 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
20532 * src/parse-skel.y: Use %directives instead of #defines.
20533
20534 2001-12-30 Akim Demaille <akim@epita.fr>
20535
20536 * src/skeleton.h: New.
20537 * src/output.c (output_parser, output_master_parser): Remove, dead
20538 code.
20539 * src/output.h (get_lines_number, actions_output, guards_output)
20540 (token_definitions_output): Prototype them.
20541 * src/parse-skel.y: Add the license notice.
20542 Include output.h and skeleton.h.
20543 (process_skeleton): Returns void, and takes a single parameter.
20544 * src/scan-skel.l: Add the license notice.
20545 Include skeleton.h.
20546 Don't use %option yylineno: it seems that then Flex imagines
20547 REJECT has been used, and therefore it won't reallocate its
20548 buffers (which makes no other sense to me than a bug). It results
20549 in warnings for `unused: yy_flex_realloc'.
20550
20551 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
20552
20553 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
20554 (MUSCLE_INSERT_PREFIX): ...to there.
20555 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
20556 (MUSCLE_INSERT_PREFIX): Move from here...
20557
20558 * src/bison.hairy: Add a section directive. Put braces around muscle
20559 names. This parser skeleton is still broken, but Bison should not
20560 choke on a bad muscle 'syntax'.
20561 * src/bison.simple: Add a section directive. Put braces around muscle
20562 names.
20563
20564 * src/files.h (strsuffix, stringappend): Add declarations.
20565 (tab_extension): Add declaration.
20566 (short_base_name): Add declaration.
20567
20568 * src/files.c (strsuffix, stringappend): No longer static. These
20569 functions are used in the skeleton parser.
20570 (tab_extension): New.
20571 (compute_base_names): Use the computations done in this function
20572 to guess if the generated parsers should have '.tab' in their
20573 names.
20574 (short_base_name): No longer static.
20575
20576 * src/output.c (output_skeleton): New.
20577 (output): Disable call to output_master_parser, and give a try to
20578 a new skeleton handling system.
20579 (guards_output, actions_output): No longer static.
20580 (token_definitions_output, get_lines_number): No longer static.
20581
20582 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
20583
20584 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
20585 parse-skel.y.
20586
20587 * src/parse-skel.y: New file.
20588 * src/scan-skel.l: New file.
20589
20590 2001-12-29 Akim Demaille <akim@epita.fr>
20591
20592 %name-prefix is broken.
20593
20594 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
20595 Adjust all dependencies.
20596 * tests/headers.at (export YYLTYPE): Strengthen this test: use
20597 %name-prefix.
20598
20599 Renaming yylval but not yylloc is not consistent. Now we do.
20600
20601 * src/bison.simple: Prefix yylloc if used.
20602 * doc/bison.texinfo (Decl Summary): Document that.
20603
20604 2001-12-29 Akim Demaille <akim@epita.fr>
20605
20606 * doc/bison.texinfo: Promote `%long-directive' over
20607 `%long_directive'.
20608 Remove all references to fixed-output-files, yacc is enough.
20609
20610 2001-12-29 Akim Demaille <akim@epita.fr>
20611
20612 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
20613 user prologue. These are defaults.
20614 * tests/actions.at (Mid-rule actions): Make sure the user can
20615 define YYDEBUG and YYERROR_VERBOSE.
20616
20617 2001-12-29 Akim Demaille <akim@epita.fr>
20618
20619 * src/output.c (header_output): Don't forget to export YYLTYPE and
20620 yylloc.
20621 * tests/headers.at (export YYLTYPE): New, make sure it does.
20622 * tests/regression.at (%union and --defines, Invalid CPP headers):
20623 Move to...
20624 * tests/headers.at: here.
20625
20626 2001-12-29 Akim Demaille <akim@epita.fr>
20627
20628 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
20629
20630 2001-12-29 Akim Demaille <akim@epita.fr>
20631
20632 * tests/actions.at (Mid-rule actions): Output on a single line
20633 instead of several.
20634
20635 2001-12-29 Akim Demaille <akim@epita.fr>
20636
20637 * doc/bison.texinfo: Formatting changes.
20638
20639 2001-12-29 Akim Demaille <akim@epita.fr>
20640
20641 Don't store the token defs in a muscle, just be ready to output it
20642 on command. Now possible via `symbols'. Fixes a memory leak.
20643
20644 * src/output.c (token_definitions_output): New.
20645 (output_parser, header_output): Use it.
20646 * src/reader.c (symbols_save): Remove.
20647
20648 2001-12-29 Akim Demaille <akim@epita.fr>
20649
20650 * src/bison.simple: Do not provide a default for YYSTYPE and
20651 YYLTYPE before the user's prologue. Otherwise it's hardly... a
20652 default.
20653
20654 2001-12-29 Akim Demaille <akim@epita.fr>
20655
20656 Mid-rule actions are simply... ignored!
20657
20658 * src/reader.c (readgram): Be sure to attach mid-rule actions to
20659 the empty-rule associated to the dummy symbol, not to the host
20660 rule.
20661 * tests/actions.at (Mid-rule actions): New.
20662
20663 2001-12-29 Akim Demaille <akim@epita.fr>
20664
20665 Memory leak.
20666
20667 * src/reader.c (reader): Free grammar.
20668
20669 2001-12-29 Akim Demaille <akim@epita.fr>
20670
20671 Memory leak.
20672
20673 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
20674 since it allocates it for each state, although only one is needed.
20675 (allocate_storage): Do it here.
20676
20677 2001-12-29 Akim Demaille <akim@epita.fr>
20678
20679 * src/options.h, src/options.c (create_long_option_table): Rename
20680 as...
20681 (long_option_table_new): this, with a clearer prototype.
20682 (percent_table): Remove, unused,
20683 * src/getargs.c (getargs): Adjust.
20684
20685 2001-12-29 Akim Demaille <akim@epita.fr>
20686
20687 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
20688 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
20689 as states.
20690
20691 2001-12-29 Akim Demaille <akim@epita.fr>
20692
20693 * src/lalr.c (build_relations): Rename `states' as `states1'.
20694 Sorry, I don't understand exactly what it is, no better name...
20695
20696 2001-12-29 Akim Demaille <akim@epita.fr>
20697
20698 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
20699 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
20700 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
20701 as rules.
20702
20703 2001-12-29 Akim Demaille <akim@epita.fr>
20704
20705 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
20706 ago.
20707
20708 2001-12-29 Akim Demaille <akim@epita.fr>
20709
20710 * src/reader.c, src/reader.h (user_toknums): Remove.
20711 Adjust all users to use symbols[i]->user_token_number.
20712
20713 2001-12-29 Akim Demaille <akim@epita.fr>
20714
20715 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
20716 Adjust all users to use symbols[i]->prec or ->assoc.
20717
20718 2001-12-29 Akim Demaille <akim@epita.fr>
20719
20720 * src/reader.c, src/reader.h (tags): Remove.
20721 Adjust all users to use symbols[i]->tag.
20722
20723 2001-12-29 Akim Demaille <akim@epita.fr>
20724
20725 * src/gram.h, src/gram.c (symbols): New, similar to state_table
20726 and rule_table.
20727 * src/reader.c (packsymbols): Fill this table.
20728 Drop sprec.
20729 * src/conflicts.c (resolve_sr_conflict): Adjust.
20730 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
20731 single table.
20732 Use symbols[i]->tag instead of tags[i].
20733
20734 2001-12-29 Akim Demaille <akim@epita.fr>
20735
20736 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
20737 In addition, put a comment in there, to replace...
20738 * tests/regression.at (%union and C comments): Remove.
20739
20740 2001-12-29 Akim Demaille <akim@epita.fr>
20741
20742 * tests/regression.at (Web2c Actions): Blindly move the actual
20743 output as expected output. The contents *seem* right to me, but I
20744 can't pretend reading perfectly parser tables... Nonetheless, all
20745 the other tests pass correctly, the table look OK, even though the
20746 presence of `$axiom' is to be noted: AFAICS it is useless (but
20747 harmless).
20748
20749 2001-12-29 Akim Demaille <akim@epita.fr>
20750
20751 * src/reader.c (readgram): Don't add the rule 0 if there were no
20752 rules read. In other words, add it _after_ having performed
20753 grammar sanity checks.
20754 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
20755
20756 2001-12-29 Akim Demaille <akim@epita.fr>
20757
20758 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
20759 visible, and some states have now a different number.
20760
20761 2001-12-29 Akim Demaille <akim@epita.fr>
20762
20763 * src/reader.c (readgram): Bind the initial rule's lineno to that
20764 of the first rule.
20765 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
20766 (Solved SR Conflicts): Adjust rule 0's line number.
20767
20768 2001-12-29 Akim Demaille <akim@epita.fr>
20769
20770 Fix the `GAWK Grammar' failure.
20771
20772 * src/LR0.c (final_state): Initialize to -1 so that we do compute
20773 the reductions of the first state which was mistakenly confused
20774 with the final state because precisely final_state was initialized
20775 to 0.
20776 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
20777 now noticed by Bison.
20778 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
20779 have a reduction on $default.
20780
20781 2001-12-29 Akim Demaille <akim@epita.fr>
20782
20783 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
20784 rule line numbers.
20785 * src/closure.c (print_closure): Likewise.
20786 * src/derives.c (print_derives): Likewise.
20787 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
20788 now.
20789
20790 2001-12-29 Akim Demaille <akim@epita.fr>
20791
20792 * src/lalr.c (lookaheads_print): New.
20793 (lalr): Call it when --trace-flag.
20794 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
20795 are dumped.
20796
20797 2001-12-29 Akim Demaille <akim@epita.fr>
20798
20799 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
20800 when walking through ritem, even via rule->rhs.
20801 * src/reduce.c (dump_grammar, useful_production, reduce_output)
20802 (useful_production, useless_nonterminals): Likewise.
20803 (reduce_grammar_tables): Likewise, plus update nritems.
20804 * src/nullable.c (set_nullable): Likewise.
20805 * src/lalr.c (build_relations): Likewise.
20806 * tests/sets.at (Nullable): Adjust.
20807 Fortunately, now, the $axiom is no longer nullable.
20808
20809 2001-12-29 Akim Demaille <akim@epita.fr>
20810
20811 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
20812 the 0-sentinel.
20813 * src/gram.c (ritem_longest_rhs): Likewise.
20814 * src/reduce.c (nonterminals_reduce): Likewise.
20815 * src/print_graph.c (print_graph): Likewise.
20816 * src/output.c (output_rule_data): Likewise.
20817 * src/nullable.c (set_nullable): Likewise.
20818
20819 2001-12-29 Akim Demaille <akim@epita.fr>
20820
20821 * src/output.c: Comment changes.
20822
20823 2001-12-27 Paul Eggert <eggert@twinsun.com>
20824
20825 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
20826 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
20827 Sparc, as they were causing more porting problems than the
20828 (minor) performance improvement was worth.
20829
20830 Also, catch up with 1.31's YYSTD.
20831
20832 2001-12-27 Akim Demaille <akim@epita.fr>
20833
20834 * src/output.c (output_gram): Rely on nritems, not the
20835 0-sentinel. See below.
20836 Use -1 as separator, not 0.
20837 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
20838 Rely on -1 as separator in yyrhs, instead of 0.
20839 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
20840 twice `Now at end of input', therefore there are two lines less to
20841 expect.
20842
20843 2001-12-27 Akim Demaille <akim@epita.fr>
20844
20845 * tests/regression.at (Unresolved SR Conflicts):
20846 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
20847 below.
20848
20849 2001-12-27 Akim Demaille <akim@epita.fr>
20850
20851 * src/LR0.c (new_state): Recognize the final state by the fact it
20852 is reached by eoftoken.
20853 (insert_start_shifting_state, insert_eof_shifting_state)
20854 (insert_accepting_state, augment_automaton): Remove, since now
20855 these states are automatically computed from the initial state.
20856 (generate_states): Adjust.
20857 * src/print.c: When reporting a rule number to the user, substract
20858 1, so that the axiom rule is rule 0, and the first user rule is 1.
20859 * src/reduce.c: Likewise.
20860 * src/print_graph.c (print_core): For the time being, just as for
20861 the report, depend upon --trace-flags to dump the full set of
20862 items.
20863 * src/reader.c (readgram): Once the grammar read, insert the rule
20864 0: `$axiom: START-SYMBOL $'.
20865 * tests/set.at: Adjust: rule 0 is now displayed, and since the
20866 number of the states has changed (the final state is no longer
20867 necessarily the last), catch up.
20868
20869 2001-12-27 Akim Demaille <akim@epita.fr>
20870
20871 Try to make the use of the eoftoken valid. Given that its value
20872 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
20873 is used instead of > 0 where appropriate, (ii), depend upon nritems
20874 instead of the 0-sentinel.
20875
20876 * src/gram.h, src/gram.c (nritems): New.
20877 Expected to be duplication of nitems, but for the time being...
20878 * src/reader.c (packgram): Assert nritems and nitems are equal.
20879 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
20880 * src/closure.c (print_closure, print_fderives): Likewise.
20881 * src/gram.c (ritem_print): Likewise.
20882 * src/print.c (print_core, print_grammar): Likewise.
20883 * src/print_graph.c: Likewise.
20884
20885 2001-12-27 Akim Demaille <akim@epita.fr>
20886
20887 * src/main.c (main): If there are complains after grammar
20888 reductions, then output the report anyway if requested, then die.
20889 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
20890 * src/reader.c (eoftoken): New.
20891 (parse_token_decl): If the token being defined has value `0', it
20892 is the eoftoken.
20893 (packsymbols): No longer hack `tags' to insert `$' by hand.
20894 Be sure to preserve the value of the eoftoken.
20895 (reader): Make sure eoftoken is defined.
20896 Initialize nsyms to 0: now eoftoken is created just like the others.
20897 * src/print.c (print_grammar): Don't special case the eof token.
20898 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
20899 lie anyway, albeit pleasant.
20900 * tests/calc.at: Exercise error messages with eoftoken.
20901 Change the grammar so that empty input is invalid.
20902 Adjust expectations.
20903 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
20904
20905 2001-12-27 Akim Demaille <akim@epita.fr>
20906
20907 * configure.in: Check the protos of strchr ans strspn.
20908 Replace strchr if needed.
20909 * src/system.h: Provide the protos of strchr, strspn and memchr if
20910 missing.
20911 * lib/strchr.c: New.
20912 * src/reader.c (symbols_save): Use strchr.
20913
20914 2001-12-27 Akim Demaille <akim@epita.fr>
20915
20916 * src/print.c, src/print_graph.c (escape): New.
20917 Use it to quote the TAGS outputs.
20918 * src/print_graph.c (print_state): Now errors are in red, and
20919 reductions in green.
20920 Prefer high to wide: output the state number on a line of its own.
20921
20922 2001-12-27 Akim Demaille <akim@epita.fr>
20923
20924 * src/state.h, src/state.c (reductions_new): New.
20925 * src/LR0.c (set_state_table): Let all the states have a
20926 `reductions', even if reduced to 0.
20927 (save_reductions): Adjust.
20928 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
20929 * src/print.c (print_reductions, print_actions): Adjust.
20930 * src/output.c (action_row): Adjust.
20931
20932 2001-12-27 Akim Demaille <akim@epita.fr>
20933
20934 * src/state.h, src/state.c (errs_new, errs_dup): New.
20935 * src/LR0.c (set_state_table): Let all the states have an errs,
20936 even if reduced to 0.
20937 * src/print.c (print_errs, print_reductions): Adjust.
20938 * src/output.c (output_actions, action_row): Adjust.
20939 * src/conflicts.c (resolve_sr_conflict): Adjust.
20940
20941 2001-12-27 Akim Demaille <akim@epita.fr>
20942
20943 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
20944
20945 2001-12-27 Akim Demaille <akim@epita.fr>
20946
20947 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
20948 * src/print.c: here.
20949 (lookaheadset, shiftset): New, used as additional storage by
20950 print_reductions.
20951 (print_results): Adjust.
20952 (print_shifts, print_gotos, print_errs): New, extracted from...
20953 (print_actions): here.
20954 * src/print_graph.c (print_actions): Remove dead code.
20955
20956 2001-12-27 Akim Demaille <akim@epita.fr>
20957
20958 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
20959 `$n' and `@n'.
20960
20961 2001-12-27 Akim Demaille <akim@epita.fr>
20962
20963 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
20964 (build_relations): Adjust.
20965
20966 2001-12-27 Akim Demaille <akim@epita.fr>
20967
20968 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
20969 duplication.
20970
20971 2001-12-27 Akim Demaille <akim@epita.fr>
20972
20973 * src/reader.c (packgram): Catch nitems overflows.
20974
20975 2001-12-27 Akim Demaille <akim@epita.fr>
20976
20977 * src/files.c, src/files.h (guard_obstack): Remove.
20978 * src/output.c (output): Adjust.
20979 * src/reader.c (parse_braces): New, factoring...
20980 (copy_action, copy_guard): these two which are renamed as...
20981 (parse_action, parse_guard): these.
20982 As a voluntary consequence, using braces around guards is now
20983 mandatory.
20984
20985 2001-12-27 Akim Demaille <akim@epita.fr>
20986
20987 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
20988 * src/reader.c (symbol_list): `guard' and `guard_line' are new
20989 members.
20990 (symbol_list_new): Adjust.
20991 (copy_action): action_line is the first line, not the last.
20992 (copy_guard): Just as for actions, store the `action' only, not
20993 the switch/case/break flesh.
20994 Don't parse the user action that might follow the guard, let...
20995 (readgram): do it, i.e., now, there can be an action after a
20996 guard.
20997 In other words the guard is just explicitly optional.
20998 (packgram): Adjust.
20999 * src/output.c (guards_output): New.
21000 (output_parser): Call it when needed.
21001 (output): Also free the guard and attrs obstacks.
21002 * src/files.c, src/files.h (obstack_save): Remove.
21003 (output_files): Remove.
21004 As a result, if one needs the former `.act' file, using an
21005 appropriate skeleton which requires actions and guards is now
21006 required.
21007 * src/main.c (main): Adjust.
21008 * tests/semantic.at: New.
21009 * tests/regression.at: Use `input.y' as input file name.
21010 Avoid 8+3 problems by requiring input.c when the test needs the
21011 parser.
21012
21013 2001-12-27 Akim Demaille <akim@epita.fr>
21014
21015 * src/reader.c (symbol_list_new): Be sure to initialize all the
21016 fields.
21017
21018 2001-12-27 Akim Demaille <akim@epita.fr>
21019
21020 All the hacks using a final pseudo state are now useless.
21021
21022 * src/LR0.c (set_state_table): state_table holds exactly nstates.
21023 * src/lalr.c (nLA): New.
21024 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
21025 instead of lookaheadsp from the pseudo state (nstate + 1).
21026
21027 2001-12-27 Akim Demaille <akim@epita.fr>
21028
21029 * src/output.c (action_row, token_actions): Use a state_t instead
21030 of a integer, and nlookaheads instead of the following state's
21031 lookaheadsp.
21032
21033 2001-12-27 Akim Demaille <akim@epita.fr>
21034
21035 * src/conflicts.c (log_resolution, flush_shift)
21036 (resolve_sr_conflict, set_conflicts, solve_conflicts)
21037 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
21038 (conflicts_print, print_reductions): Use a state_t instead of an
21039 integer when referring to a state.
21040 As much as possible, depend upon nlookaheads, instead of the
21041 `lookaheadsp' member of the following state (since lookaheads of
21042 successive states are successive, the difference between state n + 1
21043 and n served as the number of lookaheads for state n).
21044 * src/lalr.c (add_lookback_edge): Likewise.
21045 * src/print.c (print_core, print_actions, print_state)
21046 (print_results): Likewise.
21047 * src/print_graph.c (print_core, print_actions, print_state)
21048 (print_graph): Likewise.
21049 * src/conflicts.h: Adjust.
21050
21051 2001-12-27 Akim Demaille <akim@epita.fr>
21052
21053 * src/bison.hairy: Formatting/comment changes.
21054 ANSIfy.
21055 Remove `register' indications.
21056 Add plenty of `static'.
21057
21058 2001-12-27 Akim Demaille <akim@epita.fr>
21059
21060 * src/output.c (prepare): Drop the muscle `ntbase' which
21061 duplicates ntokens.
21062 * src/bison.simple: Formatting/comment changes.
21063 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
21064 is an undocumented synonym.
21065
21066 2001-12-22 Akim Demaille <akim@epita.fr>
21067
21068 * src/output.c (output_table_data): Change the prototype to use
21069 `int' for array ranges: some invocations do pass an int, not a
21070 short.
21071 Reported by Wayne Green.
21072
21073 2001-12-22 Akim Demaille <akim@epita.fr>
21074
21075 Some actions of web2c.y are improperly triggered.
21076 Reported by Mike Castle.
21077
21078 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
21079 * tests/regression.at (Web2c): Rename as...
21080 (Web2c Report): this.
21081 (Web2c Actions): New.
21082
21083 2001-12-22 Akim Demaille <akim@epita.fr>
21084
21085 Reductions in web2c.y are improperly reported.
21086 Reported by Mike Castle.
21087
21088 * src/conflicts.c (print_reductions): Fix.
21089 * tests/regression.at (Web2c): New.
21090
21091 2001-12-18 Akim Demaille <akim@epita.fr>
21092
21093 Some host fail on `assert (!"foo")', which expands to
21094 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
21095 Reported by Nelson Beebee.
21096
21097 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
21098 `#define it_succeeded 0' and `assert (it_succeeded)'.
21099
21100 2001-12-17 Marc Autret <autret_m@epita.fr>
21101
21102 * src/bison.simple: Don't hard code the skeleton line and filename.
21103 * src/output.c (output_parser): Rename 'line' as 'output_line'.
21104 New line counter 'skeleton_line' (skeleton-line muscle).
21105
21106 2001-12-17 Paul Eggert <eggert@twinsun.com>
21107
21108 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
21109 YYDEBUG must be defined to a nonzero value.
21110
21111 * src/bison.simple (yytname): Do not assume that the user defines
21112 YYDEBUG to a properly parenthesized expression.
21113
21114 2001-12-17 Akim Demaille <akim@epita.fr>
21115
21116 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
21117 nlookaheads is a new member.
21118 Adjust all users.
21119 * src/lalr.h (nlookaheads): Remove this orphan declaration.
21120 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
21121 state.
21122
21123 2001-12-17 Akim Demaille <akim@epita.fr>
21124
21125 * src/files.h, src/files.c (open_files, close_files): Remove.
21126 * src/main.c (main): Don't open/close files, nor invoke lex_free,
21127 let...
21128 * src/reader.c (reader): Do it.
21129
21130 2001-12-17 Akim Demaille <akim@epita.fr>
21131
21132 * src/conflicts.c (print_reductions): Formatting changes.
21133
21134 2001-12-17 Akim Demaille <akim@epita.fr>
21135
21136 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
21137 (flush_reduce): New.
21138 (resolve_sr_conflict): Adjust.
21139
21140 2001-12-17 Akim Demaille <akim@epita.fr>
21141
21142 * src/output.c (output_obstack): Be static and rename as...
21143 (format_obstack): this, to avoid any confusion with files.c's
21144 output_obstack.
21145 * src/reader.h (muscle_obstack): Move to...
21146 * src/output.h: here, since it's defined in output.c.
21147
21148 2001-12-17 Akim Demaille <akim@epita.fr>
21149
21150 * src/output.c (action_row, save_column, default_goto)
21151 (sort_actions, matching_state, pack_vector): Better variable
21152 locality.
21153
21154 2001-12-17 Akim Demaille <akim@epita.fr>
21155
21156 * src/output.c: Various formatting changes.
21157
21158 2001-12-17 Akim Demaille <akim@epita.fr>
21159
21160 * src/files.c (output_files): Free the output_obstack.
21161 * src/main.c (main): Call print and print_graph conditionally.
21162 * src/print.c (print): Work unconditionally.
21163 * src/print_graph.c (print_graph): Work unconditionally.
21164 * src/conflicts.c (log_resolution): Output only if verbose_flag.
21165
21166 2001-12-16 Marc Autret <autret_m@epita.fr>
21167
21168 * src/output.c (actions_output): Fix. When we use %no-lines,
21169 there is one less line per action.
21170
21171 2001-12-16 Marc Autret <autret_m@epita.fr>
21172
21173 * src/bison.simple: Remove a useless #line directive.
21174 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
21175 * src/output.c (get_lines_number): New.
21176 (output_parser): Adjust, now takes care about the lines of a
21177 output muscles.
21178 Fix line numbering.
21179 (actions_output): Computes the number of lines taken by actions.
21180 (output_master_parser): Insert new skeleton which is the name of
21181 the output parser file name.
21182
21183 2001-12-15 Marc Autret <autret_m@epita.fr>
21184
21185 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
21186
21187 2001-12-15 Marc Autret <autret_m@epita.fr>
21188
21189 * src/output.c (output_gram): Keep track of the hairy one.
21190
21191 2001-12-15 Akim Demaille <akim@epita.fr>
21192
21193 Make `make distcheck' work.
21194
21195 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
21196 system.h which uses libgettext.h.
21197
21198 2001-12-15 Akim Demaille <akim@epita.fr>
21199
21200 * src/nullable.c (set_nullable): Useless rules must be skipped,
21201 otherwise, since we range over their symbols, we might look at a
21202 nonterminal which no longer ``exists'', i.e., it is not counted in
21203 `nvars', hence we overflow our arrays.
21204
21205 2001-12-15 Akim Demaille <akim@epita.fr>
21206
21207 The header can also be produced directly, without any obstack!
21208 Yahoo!
21209
21210 * src/files.c, src/files.h (defines_obstack): Remove.
21211 (compute_header_macro): Global.
21212 (defines_obstack_save): Remove.
21213 * src/reader.c (parse_union_decl): No longer output to
21214 defines_obstack: its content can be found in the `stype' muscle
21215 anyway.
21216 (output_token_translations): Merge into...
21217 (symbols_output): this.
21218 Rename as...
21219 (symbols_save): this.
21220 (reader): Adjust.
21221 * src/output.c (header_output): New.
21222 (output): Call it.
21223
21224 2001-12-15 Akim Demaille <akim@epita.fr>
21225
21226 * src/reader.c (parse_union_decl): Instead of handling two obstack
21227 simultaneously, use one to define the `stype' muscle, and use the
21228 value of the latter to fill defines_obstack.
21229 (copy_comment): Remove.
21230 (copy_comment2): Work for a single obstack.
21231 Rename as...
21232 (copy_comment): this.
21233
21234 2001-12-15 Akim Demaille <akim@epita.fr>
21235
21236 * src/lex.c, src/lex.h (xgetc): No longer static.
21237 * src/reader.c (parse_union_decl): Revamp.
21238
21239 2001-12-15 Akim Demaille <akim@epita.fr>
21240
21241 Still making progress in separating Bison into (i) input, (ii)
21242 process, (iii) output: now we can directly output the parser file
21243 without using table_obstack at all.
21244
21245 * src/files.c, src/files.h (table_obstack): Bye bye.
21246 (parser_file_name): New.
21247 * src/files.c (compute_output_file_names): Compute it.
21248 * src/output.c (actions_output, output_parser)
21249 (output_master_parser): To a file instead of an obstack.
21250
21251 2001-12-15 Akim Demaille <akim@epita.fr>
21252
21253 Attach actions to rules, instead of pre-outputting them to
21254 actions_obstack.
21255
21256 * src/gram.h (rule_t): action and action_line are new members.
21257 * src/reader.c (symbol_list): Likewise.
21258 (copy_action): Save the actions within the rule.
21259 (packgram): Save them in rule_table.
21260 * src/output.c (actions_output): New.
21261 (output_parser): Use it on `%%actions'.
21262 (output_rule_data): Don't free rule_table.
21263 (output): Do it.
21264 (prepare): Don't save the `action' muscle.
21265 * src/bison.simple: s/%%action/%%actions/.
21266
21267 2001-12-15 Akim Demaille <akim@epita.fr>
21268
21269 * src/reader.c (copy_action): When --yacc, don't append a `;'
21270 to the user action: let it fail if lacking.
21271 Suggested by Arnold Robbins and Tom Tromey.
21272
21273 2001-12-14 Akim Demaille <akim@epita.fr>
21274
21275 * src/lex.c (literalchar): Simply return the char you decoded, non
21276 longer mess around with obstacks and int pointers.
21277 Adjust all callers.
21278
21279 2001-12-14 Akim Demaille <akim@epita.fr>
21280
21281 * src/lex.c (literalchar): Don't escape the special characters,
21282 just decode them, and keep them as char (before, eol was output as
21283 the 2 char string `\n' etc.).
21284 * src/output.c (output_rule_data): Use quotearg to output the
21285 token strings.
21286
21287 2001-12-13 Paul Eggert <eggert@twinsun.com>
21288
21289 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
21290 Do not infringe on the global user namespace when using C++.
21291 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
21292 All uses of `fprintf' and `stderr' changed.
21293
21294 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
21295
21296 2001-12-13 Akim Demaille <akim@epita.fr>
21297
21298 The computation of nullable is broken: it doesn't handle empty
21299 RHS's properly.
21300
21301 * tests/torture.at (GNU AWK Grammar): New.
21302 * tests/sets.at (Nullable): New.
21303 * src/nullable.c (set_nullable): Instead of blindly looping over
21304 `ritems', loop over the rules, and then over their rhs's.
21305
21306 Work around Autotest bugs.
21307
21308 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
21309 frame, because Autotest understand lines starting with a `+' as
21310 traces from the shell. Then, they are not processed properly.
21311 Admittedly an Autotest bug, but we don't have time to wait for
21312 Autotest to catch up.
21313 * tests/regression.at (Broken Closure): Adjust to the new table
21314 frames.
21315 Move to...
21316 * tests/sets.at: here.
21317
21318 2001-12-13 Akim Demaille <akim@epita.fr>
21319
21320 * src/closure.c (closure): Use nrules instead of playing tricks
21321 with BITS_PER_WORD.
21322
21323 2001-12-13 Akim Demaille <akim@epita.fr>
21324
21325 * src/print.c (print_actions): Output the handling of `$' as the
21326 traces do: shifting the token EOF. Before EOF was treated as a
21327 nonterminal.
21328 * tests/regression.at: Adjust some tests.
21329 * src/print_graph.c (print_core): Complete the set of items via
21330 closure. The next-to-final and final states are still unsatisfying,
21331 but that's to be addressed elsewhere.
21332 No longer output the rule numbers, but do output the state number.
21333 A single loop for the shifts + gotos is enough, but picked a
21334 distinct color for each.
21335 (print_graph): Initialize and finalize closure.
21336
21337 2001-12-13 Akim Demaille <akim@epita.fr>
21338
21339 * src/reader.c (readgram): Remove dead code, an strip useless
21340 braces.
21341 (get_type): Remove, unused.
21342
21343 2001-12-12 Akim Demaille <akim@epita.fr>
21344
21345 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
21346 on that of lib/error.c.
21347
21348 2001-12-12 Akim Demaille <akim@epita.fr>
21349
21350 Some hosts don't like `/' in includes.
21351
21352 * src/system.h: Include libgettext.h without qualifying the path.
21353 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
21354 $(top_srcdir).
21355
21356 2001-12-11 Marc Autret <autret_m@epita.fr>
21357
21358 * src/output.c (output_parser): Remove useless muscle.
21359
21360 2001-12-11 Marc Autret <autret_m@epita.fr>
21361
21362 * src/bison.simple: Remove #line just before %%epilogue. It
21363 is now handled in ...
21364 * src/reader.c (read_additionnal_code): Add the output of a
21365 #line for the epilogue.
21366
21367 2001-12-10 Marc Autret <autret_m@epita.fr>
21368
21369 * src/reader.c (copy_definition): Re-use CPP-outed code which
21370 replace precedent remove.
21371 * src/bison.simple: Remove #line before %%prologue because
21372 %%input-line is wrong at this time.
21373
21374 2001-12-10 Marc Autret <autret_m@epita.fr>
21375
21376 * src/reader.c (symbols_output): Clean up.
21377 * src/output.c (output_gram, output): Clean up.
21378
21379 2001-12-10 Akim Demaille <akim@epita.fr>
21380
21381 * src/lalr.c (initialize_lookaheads): New. Extracted from...
21382 * src/LR0.c (set_state_table): here.
21383 * src/lalr.c (lalr): Call it.
21384
21385 2001-12-10 Akim Demaille <akim@epita.fr>
21386
21387 * src/state.h (shifts): Remove the `number' member: shifts are
21388 attached to state, hence no longer need to be labelled with a
21389 state number.
21390
21391 2001-12-10 Akim Demaille <akim@epita.fr>
21392
21393 Now that states have a complete set of members, the linked list of
21394 shifts is useless: just fill directly the state's shifts member.
21395
21396 * src/state.h (shifts): Remove the `next' member.
21397 * src/LR0.c (first_state, last_state): Remove.
21398 Adjust the callers.
21399 (augment_automaton): Don't look for the shifts that must be added
21400 a shift on EOF: it is those of the state we looked for! But now,
21401 since shifts are attached, it is no longer needed to looking
21402 merely by its id: its number.
21403
21404 2001-12-10 Akim Demaille <akim@epita.fr>
21405
21406 * src/LR0.c (augment_automaton): Better variable locality.
21407 Remove an impossible branch: if there is a state corresponding to
21408 the start symbol being shifted, then there is shift for the start
21409 symbol from the initial state.
21410
21411 2001-12-10 Akim Demaille <akim@epita.fr>
21412
21413 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
21414 only when appropriate: when insert_start_shifting_state' is not
21415 invoked.
21416 * tests/regression.at (Rule Line Numbers): Adjust.
21417
21418 2001-12-10 Akim Demaille <akim@epita.fr>
21419
21420 * src/LR0.c (augment_automaton): Now that all states have shifts,
21421 merge the two cases addition shifts to the initial state.
21422
21423 2001-12-10 Akim Demaille <akim@epita.fr>
21424
21425 * src/lalr.c (set_state_table): Move to...
21426 * src/LR0.c: here.
21427 * src/lalr.c (lalr): Don't call it...
21428 * src/LR0.c (generate_states): do it.
21429 * src/LR0.h (first_state): Remove, only the table is used.
21430
21431 2001-12-10 Akim Demaille <akim@epita.fr>
21432
21433 * src/LR0.h (first_shift, first_reduction): Remove.
21434 * src/lalr.c: Don't use first_shift: find shifts through the
21435 states.
21436
21437 2001-12-10 Akim Demaille <akim@epita.fr>
21438
21439 * src/LR0.c: Attach shifts to states as soon as they are
21440 computed.
21441 * src/lalr.c (set_state_table): Instead of assigning shifts to
21442 state, just assert that the mapping was properly done.
21443
21444 2001-12-10 Akim Demaille <akim@epita.fr>
21445
21446 * src/LR0.c (insert_start_shift): Rename as...
21447 (insert_start_shifting_state): this.
21448 (insert_eof_shifting_state, insert_accepting_state): New.
21449 (augment_automaton): Adjust.
21450 Better locality of the variables.
21451 When looking if the start_symbol is shifted from the initial
21452 state, using `while (... symbol != start_symbol ...)' sounds
21453 better than `while (... symbol < start_symbol ...)': If fail
21454 to see how the order between symbols could be relevant!
21455
21456 2001-12-10 Akim Demaille <akim@epita.fr>
21457
21458 * src/getargs.h: Don't declare `spec_name_prefix' and
21459 `spec_file_prefix', declared by src/files.h.
21460 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
21461 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
21462 * src/output.c (prepare): Adjust.
21463 * src/reader.c (symbols_output): Likewise.
21464 * src/vmsgetargs.c: Vaguely adjust, but who cares?
21465
21466 2001-12-10 Akim Demaille <akim@epita.fr>
21467
21468 * src/muscle_tab.c (muscle_init): NULL is a better default than
21469 `"0"'.
21470
21471 2001-12-10 Akim Demaille <akim@epita.fr>
21472
21473 * src/reader.c (reader): Calling symbols_output once is enough.
21474
21475 2001-12-10 Akim Demaille <akim@epita.fr>
21476
21477 Now that states have a complete set of members, the linked list of
21478 reductions is useless: just fill directly the state's reductions
21479 member.
21480
21481 * src/state.h (struct reductions): Remove member `number' and
21482 `next'.
21483 * src/LR0.c (first_reduction, last_reduction): Remove.
21484 (save_reductions): Don't link the new reductions, store them in
21485 this_state.
21486 * src/lalr.c (set_state_table): No need to attach reductions to
21487 states, it's already done.
21488 * src/output.c (output_actions): No longer free the shifts, then
21489 the reductions, then the states: free all the states and their
21490 members.
21491
21492 2001-12-10 Akim Demaille <akim@epita.fr>
21493
21494 * src/options.c (OPTN, DRTV, BOTH): New.
21495 (option_table): Use them.
21496
21497 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
21498 the job of system.h.
21499 * src/options.c: Don't include stdio.h and xalloc.h for the same
21500 reasons.
21501
21502 2001-12-10 Akim Demaille <akim@epita.fr>
21503
21504 * src/output.c (output, prepare): Make sure the values of the
21505 muscles `action' and `prologue' are 0-terminated.
21506
21507 2001-12-10 Akim Demaille <akim@epita.fr>
21508
21509 Clean up GCC warnings.
21510
21511 * src/reader.c (copy_action): `buf' is not used.
21512 (parse_skel_decl): Be static.
21513 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
21514 * src/options.h (create_long_option_table): Have a real prototype.
21515 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
21516 (hash_delete_at): Return const void *.
21517 Adjust casts to preserve the const.
21518
21519 2001-12-10 Akim Demaille <akim@epita.fr>
21520
21521 * configure.in: Require 2.52g.
21522 M4 is not needed, but AUTOM4TE is.
21523 * m4/m4.m4: Remove.
21524 * tests/Makefile.am: Adjust.
21525
21526 2001-12-10 Akim Demaille <akim@epita.fr>
21527
21528 One structure for states is enough, even though theoretically
21529 there are LR(0) states and LALR(1) states.
21530
21531 * src/lalr.h (state_t): Remove.
21532 (state_table): Be state_t **, not state_t *.
21533 * src/state.h (core, CORE_ALLOC): Rename as...
21534 (state_t, STATE_ALLOC): this.
21535 Add the LALR(1) members: shifts, reductions, errs.
21536 * src/LR0.c (state_table): Rename as...
21537 (state_hash): this, to avoid name clashes with the global
21538 `state_table'.
21539 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
21540 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
21541
21542 2001-12-10 Akim Demaille <akim@epita.fr>
21543
21544 Bison dumps core on bash.y.
21545 Reported by Pascal Bart.
21546
21547 * src/warshall.c (bitmatrix_print): New.
21548 (TC): Use it.
21549 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
21550 j must be the outer loop.
21551 * tests/regression.at (Broken Closure): New.
21552
21553 2001-12-05 Akim Demaille <akim@epita.fr>
21554
21555 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
21556 its argument.
21557 Reported by Peter Hamorsky.
21558
21559 2001-12-05 Akim Demaille <akim@epita.fr>
21560
21561 * src/conflicts.c (err_table): Remove.
21562 (resolve_sr_conflict): Adjust.
21563 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
21564 Rename as...
21565 (state_t.reductions, state_t.shifts): this.
21566
21567 2001-12-05 Akim Demaille <akim@epita.fr>
21568
21569 * src/reduce.c (reduce_grammar_tables): No longer disable the
21570 removal of useless rules via CPP but via `if (0)', so that the
21571 compiler still check the code is valid.
21572 For instance, it should have noticed `rline' no longer exists: use
21573 the `line' member of rule_t.
21574 * src/gram.c (dummy, rline): Remove, unused.
21575
21576 2001-12-05 Akim Demaille <akim@epita.fr>
21577
21578 * src/output.c (pack_vector): Use assert, not berror.
21579 * src/main.c (berror): Remove, unused.
21580
21581 2001-12-05 Akim Demaille <akim@epita.fr>
21582
21583 New experimental feature: if --verbose --trace output all the
21584 items of a state, not only its kernel.
21585
21586 * src/print.c (print_core): If `trace_flag', then invoke closure
21587 before outputting the items of the state (print_core is no longer
21588 a correct name them).
21589 (print_results): Invoke new_closure/free_closure if needed.
21590
21591 2001-12-05 Akim Demaille <akim@epita.fr>
21592
21593 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
21594 * src/closure.c, src/closure.h (itemsetsize): Rename as...
21595 (nitemset): for consistency with the rest of the project.
21596
21597 2001-12-05 Akim Demaille <akim@epita.fr>
21598
21599 * src/closure.c (print_closure): Improve.
21600 (closure): Use it for printing input and output.
21601
21602 2001-12-05 Akim Demaille <akim@epita.fr>
21603
21604 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
21605 indexed by nonterminals.
21606
21607 2001-12-05 Akim Demaille <akim@epita.fr>
21608
21609 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
21610 what it was!).
21611 * src/warshall.h: Remove accidental duplication of the content.
21612
21613 2001-12-05 Akim Demaille <akim@epita.fr>
21614
21615 * src/closure.c (set_fderives): De-obfuscate.
21616
21617 2001-12-05 Akim Demaille <akim@epita.fr>
21618
21619 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
21620
21621 2001-12-05 Akim Demaille <akim@epita.fr>
21622
21623 * src/closure.c (set_firsts): De-obfuscate.
21624
21625 2001-12-05 Akim Demaille <akim@epita.fr>
21626
21627 * src/output.c (action_row): De-obfuscate
21628 using the good o' techniques: arrays not pointers, variable
21629 locality, BITISSET, RESETBIT etc.
21630
21631 2001-12-05 Akim Demaille <akim@epita.fr>
21632
21633 Pessimize the code to simplify it: from now on, all the states
21634 have a valid SHIFTS, which NSHIFTS is possibly 0.
21635
21636 * src/LR0.c (shifts_new): Be global and move to..
21637 * src/state.c, src/state.h: here.
21638 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
21639 * src/print_graph: Adjust.
21640
21641 2001-12-05 Akim Demaille <akim@epita.fr>
21642
21643 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
21644 * src/conflicts.c: Use it.
21645 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
21646 incorrectly ``simplified''.
21647
21648 2001-12-05 Akim Demaille <akim@epita.fr>
21649
21650 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
21651 using the good o' techniques: arrays not pointers, variable
21652 locality, BITISSET, RESETBIT etc.
21653
21654 2001-12-05 Akim Demaille <akim@epita.fr>
21655
21656 * src/state.h (SHIFT_SYMBOL): New.
21657 * src/conflicts.c: Use it to deobfuscate.
21658
21659 2001-12-05 Akim Demaille <akim@epita.fr>
21660
21661 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
21662 (print_reductions): De-obfuscate using the good o' techniques:
21663 arrays not pointers, variable locality, BITISSET.
21664
21665 2001-12-05 Akim Demaille <akim@epita.fr>
21666
21667 * src/conflicts.c (print_reductions): Arrays, not pointers.
21668 Use BITISSET.
21669
21670 2001-12-05 Akim Demaille <akim@epita.fr>
21671
21672 * src/conflicts.c (print_reductions): Pessimize, but clarify.
21673
21674 2001-12-05 Akim Demaille <akim@epita.fr>
21675
21676 * src/conflicts.c (print_reductions): Improve variable locality.
21677
21678 2001-12-05 Akim Demaille <akim@epita.fr>
21679
21680 * src/conflicts.c (print_reductions): Pessimize, but clarify.
21681
21682 2001-12-05 Akim Demaille <akim@epita.fr>
21683
21684 * src/conflicts.c (print_reductions): Improve variable locality.
21685
21686 2001-12-05 Akim Demaille <akim@epita.fr>
21687
21688 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
21689 * src/lalr.c: Use them.
21690
21691 2001-12-05 Akim Demaille <akim@epita.fr>
21692
21693 * src/LR0.c (augment_automaton): Formatting changes.
21694 Better variable locality.
21695
21696 2001-12-05 Akim Demaille <akim@epita.fr>
21697
21698 * src/lalr.c (matrix_print): New.
21699 (transpose): Use it.
21700 Use arrays instead of pointers.
21701
21702 2001-12-05 Akim Demaille <akim@epita.fr>
21703
21704 * src/lalr.c (maxrhs): Move to...
21705 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
21706 * src/lalr.c (build_relations): Adjust.
21707
21708 2001-12-05 Akim Demaille <akim@epita.fr>
21709
21710 * src/lalr.c (transpose): Free the memory allocated to the
21711 argument, as it is replaced by the results by the unique caller.
21712 (build_relations): Merely invoke transpose: it handles the memory
21713 deallocation.
21714 Improve variable locality.
21715 Avoid variables used as mere abbreviations.
21716 (compute_lookaheads): Use arrays instead of pointers.
21717
21718 2001-12-05 Akim Demaille <akim@epita.fr>
21719
21720 * src/lalr.c (initialize_F): Improve variable locality.
21721 Avoid variables used as mere abbreviations.
21722
21723 2001-12-05 Akim Demaille <akim@epita.fr>
21724
21725 * src/derives.c (print_derives): Display the ruleno.
21726 * src/lalr.c (initialize_F, transpose): Better variable locality
21727 to improve readability.
21728 Avoid variables used as mere abbreviations.
21729
21730 2001-12-05 Akim Demaille <akim@epita.fr>
21731
21732 * src/lalr.c (traverse): Use arrays instead of pointers.
21733
21734 2001-12-05 Akim Demaille <akim@epita.fr>
21735
21736 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
21737 the handling of squeue.
21738 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
21739
21740 2001-12-05 Akim Demaille <akim@epita.fr>
21741
21742 Because useless nonterminals are now kept alive (instead of being
21743 `destroyed'), we now sometimes examine them, and store information
21744 related to them. Hence we need to know their number, and adjust
21745 memory allocations.
21746
21747 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
21748 static.
21749 * src/LR0.c (allocate_itemsets): The memory allocated to
21750 `symbol_count' was used for two different purpose: once to count
21751 the number of occurrences of each symbol, and later reassigned to
21752 `shift_symbol', containing the symbol that can be shifted from a
21753 given state.
21754 Deobfuscate, i.e., allocate, use and free `symbol_count' here
21755 only, and...
21756 (new_itemsets): Allocate `shift_symbol' here.
21757 (allocate_itemsets): symbol_count includes useless nonterminals.
21758 Make room for them.
21759 (free_storage): Use `free', not `XFREE', for pointers that cannot
21760 be null.
21761
21762 2001-12-05 Akim Demaille <akim@epita.fr>
21763
21764 * src/nullable.c (set_nullable): Deobfuscate the handling of
21765 ritem.
21766 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
21767
21768 2001-12-05 Akim Demaille <akim@epita.fr>
21769
21770 * src/gram.c, src/gram.h (ritem_print): New.
21771 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
21772 (This useless function was defined only to work around VMS linkers
21773 that can't handle compilation units with variables only).
21774 * src/reduce.c (dump_grammar): Use it to trace the construction of
21775 ritem.
21776
21777 2001-12-04 Paul Eggert <eggert@twinsun.com>
21778
21779 * src/bison.simple (union yyalloc): Change member names
21780 to be the same as the stack names.
21781 (yyparse): yyptr is now union yyalloc *, not char *.
21782 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
21783 and may generate better code on some machines.
21784 (yystpcpy): Use prototype if __STDC__ is defined, not just
21785 if __cplusplus is defined.
21786
21787 2001-11-30 Akim Demaille <akim@epita.fr>
21788
21789 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
21790 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
21791 Gettext doesn't compile cleanly, and dies with -Werror.
21792 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
21793 Include WARNING_CFLAGS here.
21794 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
21795 before being defined.
21796
21797 2001-11-27 Paul Eggert <eggert@twinsun.com>
21798
21799 * lib/quotearg.h (quotearg_n, quotearg_n_style):
21800 First arg is int, not unsigned.
21801 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
21802 (SIZE_MAX, UINT_MAX): New macros.
21803 (quotearg_n_options): Abort if N is negative.
21804 Avoid overflow check on hosts where size_t is 64 bits and int
21805 is 32 bits, as overflow is impossible there.
21806 Fix off-by-one typo that caused unnecessary reallocation.
21807
21808 2001-11-29 Paul Eggert <eggert@twinsun.com>
21809
21810 Name space cleanup in generated parser.
21811
21812 * doc/bison.texinfo (Bison Parser): Discuss system headers
21813 and their effect on the user name space.
21814
21815 * src/bison.simple:
21816 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
21817 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
21818 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
21819
21820 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
21821 on user names when possible.
21822
21823 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
21824 Simplify test for whather <alloca.h> exists.
21825
21826 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
21827
21828 (<stdio.h>): Include if YYDEBUG.
21829
21830 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
21831 ! defined (yyoverflow) && ! defined (yymemcpy).
21832
21833 (yymemcpy, yyparse): Rename local variables as needed so that
21834 they all begin with 'yy'.
21835
21836 (yystrlen, yystpcpy): New functions.
21837
21838 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
21839 All uses changed.
21840
21841 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
21842 instead of relying on string.h functions. Use YYSTACK_ALLOC
21843 and YYSTACK_FREE instead of malloc and free.
21844
21845 2001-11-30 Akim Demaille <akim@epita.fr>
21846
21847 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
21848 before their first uses.
21849 (YYBISON, YYPURE): Move to the top of the output.
21850
21851 2001-11-30 Akim Demaille <akim@epita.fr>
21852
21853 * tests/reduce.at (Useless Nonterminals): Fix.
21854
21855 2001-11-30 Akim Demaille <akim@epita.fr>
21856
21857 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
21858 if body instead of `;' to pacify GCC's warnings.
21859
21860 2001-11-30 Akim Demaille <akim@epita.fr>
21861
21862 Instead of mapping the LHS of unused rules to -1, keep the LHS
21863 valid, but flag the rules as invalid.
21864
21865 * src/gram.h (rule_t): `useful' is a new member.
21866 * src/print.c (print_grammar): Adjust.
21867 * src/derives.c (set_derives): Likewise.
21868 * src/reader.c (packgram, reduce_output): Likewise.
21869 * src/reduce.c (reduce_grammar_tables): Likewise.
21870 * tests/reduce.at (Underivable Rules, Useless Rules): New.
21871
21872 2001-11-30 Akim Demaille <akim@epita.fr>
21873
21874 * src/reduce.c (reduce_output): Formatting changes.
21875 * src/print.c (print_results, print_grammar): Likewise.
21876 * tests/regression.at (Rule Line Numbers)
21877 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
21878
21879 2001-11-30 Akim Demaille <akim@epita.fr>
21880
21881 * src/reduce.c (nonterminals_reduce): Instead of throwing away
21882 useless nonterminals, move them at the end of the symbol arrays.
21883 (reduce_output): Adjust.
21884 * tests/reduce.at (Useless Nonterminals): Adjust.
21885
21886 2001-11-30 Akim Demaille <akim@epita.fr>
21887
21888 * src/reduce.c: Various comment/formatting changes.
21889 (nonterminals_reduce): New, extracted from...
21890 (reduce_grammar_tables): here.
21891 (reduce_grammar): Call nonterminals_reduce.
21892
21893 2001-11-29 Paul Eggert <eggert@twinsun.com>
21894
21895 * src/bison.simple (YYSTACK_REALLOC): Remove.
21896 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
21897 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
21898 New macros.
21899 (union yyalloc): New type.
21900 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
21901 an arbitrary restriction on hosts where size_t is wider than int.
21902
21903 (yyparse): Don't dump core if alloca or malloc fails; instead, report
21904 a parser stack overflow. Allocate just one block of memory for all
21905 three stacks, instead of allocating three blocks; this typically is
21906 faster and reduces fragmentation.
21907
21908 Do not limit the number of items in the stack to a value that fits
21909 in 'int', as this is an arbitrary limit on hosts with 64-bit
21910 size_t and 32-bit int.
21911
21912 2001-11-29 Marc Autret <autret_m@epita.fr>
21913
21914 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
21915 of defining YYERROR_VERBOSE.
21916 [AT_DATA]: $4 is now out of C declarations in the prologue.
21917
21918 2001-11-28 Marc Autret <autret_m@epita.fr>
21919
21920 * src/reader.c (parse_dquoted_param): New.
21921 (parse_skel_decl): Use it.
21922 * src/lex.h: Add its prototype.
21923 * src/lex.c (literalchar): Become not static.
21924
21925 2001-11-28 Marc Autret <autret_m@epita.fr>
21926
21927 * src/output.h: And put its extern declaration here.
21928 * src/output.c (error_verbose): Define here.
21929 (prepare): Echo name modification.
21930 * src/getargs.h: Clean its extern declaration.
21931 * src/getargs.c (error_verbose_flag): Remove.
21932 (getargs): Remove case 'e'.
21933 * src/options.c (option_table): 'error-verbose' is now seen as simple
21934 percent option.
21935 Include output.h.
21936
21937 * src/reader.c (read_declarations): Remove case tok_include.
21938 (parse_include_decl): Remove.
21939 * src/lex.h (token_t): Remove tok_include.
21940 * src/options.c (option_table): 'include' is now a simple command line
21941 option.
21942
21943 2001-11-28 Marc Autret <autret_m@epita.fr>
21944
21945 * src/bison.simple: Adjust muscle names.
21946 * src/muscle_tab.c (muscle_init): Also rename the muscles.
21947 * src/output.c (prepare): s/_/-/ for the muscles names.
21948 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
21949
21950 2001-11-28 Marc Autret <autret_m@epita.fr>
21951
21952 * src/bison.simple: Fix debug.
21953 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
21954
21955 2001-11-28 Akim Demaille <akim@epita.fr>
21956
21957 * src/LR0.c (shifts_new): New.
21958 (save_shifts, insert_start_shift, augment_automaton): Use it.
21959
21960 2001-11-28 Akim Demaille <akim@epita.fr>
21961
21962 * src/closure.c (closure): `b' and `ruleno' denote the same value:
21963 keep ruleno only.
21964
21965 2001-11-28 Akim Demaille <akim@epita.fr>
21966
21967 * src/closure.c (closure): Instead of looping over word in array
21968 then bits in words, loop over bits in array.
21969
21970 2001-11-28 Akim Demaille <akim@epita.fr>
21971
21972 * src/closure.c (closure): No longer optimize the special case
21973 where all the bits of `ruleset[r]' are set to 0, to make the code
21974 clearer.
21975
21976 2001-11-28 Akim Demaille <akim@epita.fr>
21977
21978 * src/closure.c (closure): `r' and `c' are new variables, used to
21979 de-obfuscate accesses to RULESET and CORE.
21980
21981 2001-11-28 Akim Demaille <akim@epita.fr>
21982
21983 * src/reduce.c (reduce_print): Use ngettext.
21984 (dump_grammar): Improve the trace accuracy.
21985
21986 2001-11-28 Akim Demaille <akim@epita.fr>
21987
21988 * src/reduce.c (dump_grammar): Don't translate trace messages.
21989
21990 2001-11-28 Akim Demaille <akim@epita.fr>
21991
21992 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
21993 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
21994 as all tags are free'ed afterwards.
21995 From Enrico Scholz.
21996
21997 2001-11-27 Paul Eggert <eggert@twinsun.com>
21998
21999 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
22000 use alloca when we didn't want to, and vice versa.
22001
22002 2001-11-27 Marc Autret <autret_m@epita.fr>
22003
22004 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
22005 initialization.
22006 * src/output.c (prepare): Remove its update.
22007
22008 2001-11-27 Marc Autret <autret_m@epita.fr>
22009
22010 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
22011 Use %error-verbose.
22012
22013 2001-11-27 Marc Autret <autret_m@epita.fr>
22014
22015 * src/bison.simple: Remove YYERROR_VERBOSE using.
22016 Use %%error_verbose.
22017 (yyparse): Likewise.
22018 * src/output.c (prepare): Give its final value.
22019 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
22020 * src/getargs.h: Add its extern declaration.
22021 * src/getargs.c (error_verbose_flag): New int.
22022 (getargs): Update to catch new case.
22023 * src/options.c (option_table): 'error-verbose' is a new option.
22024 (shortopts): Update.
22025
22026 2001-11-27 Akim Demaille <akim@epita.fr>
22027
22028 * src/system.h: Use intl/libgettext.h.
22029 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
22030
22031 2001-11-27 Akim Demaille <akim@epita.fr>
22032
22033 * tests/torture.at (Exploding the Stack Size with Malloc):
22034 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
22035
22036 2001-11-27 Akim Demaille <akim@epita.fr>
22037
22038 * src/files.c: Include error.h.
22039 Reported by Hans Aberg.
22040
22041 2001-11-26 Marc Autret <autret_m@epita.fr>
22042
22043 * src/reader.c (parse_include_decl): New, not yet implemented.
22044 (read_declarations): Add case tok_include.
22045 * src/getargs.h (include): Add its extern definition.
22046 * src/getargs.c (include): New const char *.
22047 (getargs): Add case '-I'.
22048 * src/options.c (option_table): Add include as command line and
22049 percent option.
22050 * src/lex.h (token_t): Add tok_include.
22051
22052 2001-11-26 Akim Demaille <akim@epita.fr>
22053
22054 * src/reader.c (readgram): Make sure rules for mid-rule actions
22055 have a lineno equal to that of their host rule.
22056 Reported by Hans Aberg.
22057 * tests/regression.at (Rule Line Numbers): New.
22058
22059 2001-11-26 Akim Demaille <akim@epita.fr>
22060
22061 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
22062 size_ts.
22063
22064 2001-11-26 Akim Demaille <akim@epita.fr>
22065
22066 * src/complain.c, src/complain.h (error): Remove, provided by
22067 lib/error.[ch].
22068
22069 2001-11-26 Akim Demaille <akim@epita.fr>
22070
22071 * src/reader.c (read_declarations): Don't abort on tok_illegal,
22072 issue an error message.
22073 * tests/regression.at (Invalid %directive): New.
22074 Reported by Hans Aberg.
22075
22076 2001-11-26 Akim Demaille <akim@epita.fr>
22077
22078 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
22079 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
22080
22081 2001-11-26 Akim Demaille <akim@epita.fr>
22082
22083 * src/conflicts.c (conflicts_print): Don't complain at all when
22084 there are no reduce/reduce conflicts, and as many shift/reduce
22085 conflicts as expected.
22086 * tests/regression.at (%expect right): Adjust.
22087
22088 2001-11-23 Akim Demaille <akim@epita.fr>
22089
22090 * lib/alloca.c: Update, from fileutils.
22091
22092 2001-11-23 Akim Demaille <akim@epita.fr>
22093
22094 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
22095
22096 2001-11-23 Akim Demaille <akim@epita.fr>
22097
22098 * src/system.h: Include alloca.h.
22099 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
22100
22101 2001-11-23 Akim Demaille <akim@epita.fr>
22102
22103 * src/print_graph.c (print_actions): Remove `rule', unused.
22104 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
22105 pacify GCC's signed < unsigned warnings.
22106 * src/closure.c (itemsetsize): Likewise.
22107 * src/reader.c (symbol_list_new): Static.
22108
22109 2001-11-23 Akim Demaille <akim@epita.fr>
22110
22111 Attaching lineno to buckets is stupid, since only one copy of each
22112 symbol is kept, only the line of the first occurrence is kept too.
22113
22114 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
22115 * src/reader.c (rline_allocated): Remove, unused.
22116 (symbol_list): Have a `line' member.
22117 (symbol_list_new): New.
22118 (readgram): Use it.
22119 * src/print.c (print_grammar): Output the rule line numbers.
22120 * tests/regression.at (Solved SR Conflicts)
22121 (Unresolved SR Conflicts): Adjust.
22122 Reported by Hans Aberg.
22123
22124 2001-11-22 Marc Autret <autret_m@epita.fr>
22125
22126 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
22127
22128 2001-11-22 Marc Autret <autret_m@epita.fr>
22129
22130 * src/muscle_tab.c (muscle_init): Remove initialization of
22131 skeleton muscle.
22132 * src/output.c (output_master_parser): Do it here.
22133
22134 2001-11-20 Akim Demaille <akim@epita.fr>
22135
22136 * po/sv.po: New.
22137 * configure.in (ALL_LINGUAS): Adjust.
22138 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
22139 longer contains strings to translate.
22140
22141 2001-11-19 Akim Demaille <akim@epita.fr>
22142
22143 * src/conflicts.c (conflicts_print): Add a missing \n.
22144
22145 2001-11-19 Akim Demaille <akim@epita.fr>
22146
22147 * src/nullable.c (nullable_print): New.
22148 (set_nullable): Call it when tracing.
22149 Better locality of variables.
22150
22151 2001-11-19 Akim Demaille <akim@epita.fr>
22152
22153 * src/print.c (print_actions): Better locality of variables.
22154
22155 2001-11-19 Akim Demaille <akim@epita.fr>
22156
22157 * src/derives.c (print_derives): Fix and enrich.
22158 * src/closure.c (print_fderives): Likewise.
22159
22160 2001-11-19 Akim Demaille <akim@epita.fr>
22161
22162 * src/closure.c (itemsetend): Remove, replaced with...
22163 (itemsetsize): new.
22164
22165 2001-11-19 Akim Demaille <akim@epita.fr>
22166
22167 * src/LR0.c (kernel_end): Remove, replaced with...
22168 (kernel_size): new.
22169
22170 2001-11-19 Akim Demaille <akim@epita.fr>
22171
22172 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
22173 to clarify.
22174
22175 2001-11-19 Akim Demaille <akim@epita.fr>
22176
22177 * src/closure.c (closure): Use arrays instead of pointers to clarify.
22178
22179 2001-11-19 Akim Demaille <akim@epita.fr>
22180
22181 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
22182 trace messages.
22183 * src/LR0.c: Likewise.
22184 (allocate_itemsets): Use arrays instead of pointers to clarify.
22185
22186 2001-11-19 Akim Demaille <akim@epita.fr>
22187
22188 * src/getargs.c (statistics_flag): Replace with...
22189 (trace_flag): New.
22190 (longopts): Accept --trace instead of --statistics.
22191 * src/getargs.h, src/options.c: Adjust.
22192 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
22193 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
22194
22195 2001-11-19 Akim Demaille <akim@epita.fr>
22196
22197 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
22198 pointers to clarify the code.
22199 (save_reductions, save_shifts): Factor common parts of alternatives.
22200
22201 2001-11-19 Akim Demaille <akim@epita.fr>
22202
22203 * src/LR0.c (new_state, get_state): Complete TRACE code.
22204 * src/closure.c: Include `reader.h' to get `tags', needed by the
22205 trace code.
22206 Rename the conditional DEBUG as TRACE.
22207 Output consistently TRACEs to stderr, not stdout.
22208 * src/derives.c: Likewise.
22209 * src/reduce.c: (inaccessable_symbols): Using if is better style
22210 than goto.
22211 Use `#if TRACE' instead of `#if 0' for tracing code.
22212
22213 2001-11-19 Akim Demaille <akim@epita.fr>
22214
22215 * src/system.h (LIST_FREE, shortcpy): New.
22216 * src/LR0.c: Use them.
22217 * src/output.c (free_itemsets, free_reductions, free_shifts):
22218 Remove, replaced by LIST_FREE.
22219
22220 2001-11-19 Akim Demaille <akim@epita.fr>
22221
22222 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
22223 (REDUCTIONS_ALLOC): New.
22224 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
22225 allocation.
22226
22227 2001-11-19 Akim Demaille <akim@epita.fr>
22228
22229 * src/LR0.c (new_state): Complete trace code.
22230 * src/nullable.c (set_nullable): Don't translate traces.
22231
22232 2001-11-19 Akim Demaille <akim@epita.fr>
22233
22234 * src/print_graph.c (print_core): Better locality of variables.
22235 * src/print.c (print_core): Likewise.
22236
22237 2001-11-19 Akim Demaille <akim@epita.fr>
22238
22239 * src/vcg.c: You do the output, so you are responsible of the
22240 handling of VCG syntax, in particular: use quotearg.
22241 * src/print_graph.c: Don't.
22242 (print_actions): Don't output the actions as part of the nodes,
22243 since that's the job of the edges.
22244 (print_state): Don't output by hand: fill the node description,
22245 and ask for its output.
22246
22247 2001-11-19 Akim Demaille <akim@epita.fr>
22248
22249 * src/bison.simple (yyparse): When verbosely reporting an error,
22250 no longer put additional quotes around token names.
22251 * tests/calc.at: Adjust.
22252
22253 2001-11-19 Akim Demaille <akim@epita.fr>
22254
22255 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
22256 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
22257 * src/output.c: Adjust.
22258
22259 2001-11-19 Akim Demaille <akim@epita.fr>
22260
22261 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
22262 (rule_t): this.
22263 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
22264
22265 2001-11-19 Akim Demaille <akim@epita.fr>
22266
22267 * src/gram.h (rule_t): New.
22268 (rule_table): New.
22269 (rrhs, rlhs): Remove, part of state_t.
22270 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
22271 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
22272 * src/reader.c, src/reduce.c: Adjust.
22273
22274 2001-11-19 Akim Demaille <akim@epita.fr>
22275
22276 * src/reader.c (symbols_output): New, extracted from...
22277 (packsymbols): Here.
22278 (reader): Call it.
22279
22280 2001-11-19 Akim Demaille <akim@epita.fr>
22281
22282 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
22283 (maxrhs): this new function.
22284
22285 2001-11-19 Akim Demaille <akim@epita.fr>
22286
22287 * src/lalr.c (F): New macro to access the variable F.
22288 Adjust.
22289
22290 2001-11-19 Akim Demaille <akim@epita.fr>
22291
22292 * src/lalr.h (LA): New macro to access the variable LA.
22293 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22294 * src/lalr.c: Adjust.
22295
22296 2001-11-19 Akim Demaille <akim@epita.fr>
22297
22298 * src/lalr.c (initialize_LA): Only initialize LA. Let...
22299 (set_state_table): handle the `lookaheads' members.
22300
22301 2001-11-19 Akim Demaille <akim@epita.fr>
22302
22303 * src/lalr.h (lookaheads): Removed array, whose contents is now
22304 a member of...
22305 (state_t): this structure.
22306 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22307 Adjust.
22308
22309 2001-11-19 Akim Demaille <akim@epita.fr>
22310
22311 * src/lalr.h (consistent): Removed array, whose contents is now
22312 a member of...
22313 (state_t): this structure.
22314 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22315 Adjust.
22316
22317 2001-11-19 Akim Demaille <akim@epita.fr>
22318
22319 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
22320 contents are now members of...
22321 (state_t): this structure.
22322 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22323 Adjust.
22324
22325 2001-11-19 Akim Demaille <akim@epita.fr>
22326
22327 * src/lalr.h (state_t): New.
22328 (state_table): Be a state_t * instead of a core **.
22329 (accessing_symbol): Remove, part of state_t.
22330 * src/lalr.c: Adjust.
22331 (set_accessing_symbol): Merge into...
22332 (set_state_table): this.
22333 * src/print_graph.c, src/conflicts.c: Adjust.
22334
22335 2001-11-14 Akim Demaille <akim@epita.fr>
22336
22337 * tests/calc.at, tests/output.at, tests/regression.at,
22338 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
22339 now the tests are run in private dirs, therefore AC_CLEANUP and
22340 family can be simplified to 0-ary.
22341 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
22342 use abs. path to find config.h.
22343 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
22344 stderr, there can be way too much random noise.
22345 Instead pass -Werror to GCC and rely on the exit status.
22346 Reported by Wolfram Wagner.
22347
22348 2001-11-14 Akim Demaille <akim@epita.fr>
22349
22350 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
22351 defined only if yyoverflow is defined, to avoid `warning: unused
22352 variable `yyvs1''.
22353 Reported by The Test Suite.
22354
22355 2001-11-14 Akim Demaille <akim@epita.fr>
22356
22357 * src/print.c: Include reduce.h.
22358 Reported by Hans Aberg.
22359
22360 2001-11-14 Akim Demaille <akim@epita.fr>
22361
22362 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
22363 Revert a previous patch: these are really const.
22364 * src/conflicts.c (conflict_report): Additional useless pair of
22365 braces to pacify GCC's warnings for `if () if () {} else {}'.
22366 * src/lex.c (parse_percent_token): Replace equal_offset with
22367 arg_offset.
22368 arg is const.
22369 Be sure to strdup `arg' when used, since there is no reason for
22370 token_buffer not to change.
22371
22372 2001-11-14 Akim Demaille <akim@epita.fr>
22373
22374 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
22375 definition.
22376 * src/main.c (main): Use them.
22377 Suggested by Hans Aberg.
22378
22379 2001-11-12 Akim Demaille <akim@epita.fr>
22380
22381 * src/system.h (ngettext): Now that we use ngettext, be sure to
22382 provide a default definition when NLS are not used.
22383
22384 2001-11-12 Akim Demaille <akim@epita.fr>
22385
22386 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
22387 Use @kbd to denote user input.
22388 (Language and Grammar): ANSIfy the example.
22389 Adjust its layout for info/notinfo.
22390 (Location Tracking Calc): Output error messages to stderr.
22391 Output locations in a more GNUtically correct way.
22392 Fix a couple of Englishos.
22393 Adjust @group/@end group pairs.
22394
22395 2001-11-12 Akim Demaille <akim@epita.fr>
22396
22397 %expect was not functioning at all.
22398
22399 * src/conflicts.c (expected_conflicts): Set to -1.
22400 (conflict_report): Use ngettext.
22401 (conflicts_print): Check %expect and make its violation an error.
22402 * doc/bison.texinfo (Expect Decl): Adjust.
22403 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
22404 * tests/regression.at (%expect not enough, %expect right)
22405 (%expect too much): New.
22406
22407 2001-11-12 Akim Demaille <akim@epita.fr>
22408
22409 * tests/regression.at (Conflicts): Rename as...
22410 (Unresolved SR Conflicts): this.
22411 (Solved SR Conflicts): New.
22412
22413 2001-11-12 Akim Demaille <akim@epita.fr>
22414
22415 * src/reduce.c (print_results): Rename as...
22416 (reduce_output): This.
22417 Output to OUT, passed as argument, instead of output_obstack.
22418 (dump_grammar): Likewise.
22419 (reduce_free): New.
22420 Also free V1.
22421 (reduce_grammar): No longer call reduce_output, since...
22422 * src/print.c (print_results): do it.
22423 * src/main.c (main): Call reduce_free;
22424
22425 2001-11-12 Akim Demaille <akim@epita.fr>
22426
22427 * src/conflicts.c (print_reductions): Accept OUT as argument.
22428 Output to it, not to output_obstack.
22429 * src/print.c (print_actions): Adjust.
22430
22431 2001-11-12 Akim Demaille <akim@epita.fr>
22432
22433 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
22434 the result instead of using...
22435 (src_total, rrc_total, src_count, rrc_count): Remove.
22436 (any_conflicts): Remove.
22437 (print_conflicts): Split into...
22438 (conflicts_print, conflicts_output): New.
22439 * src/conflicts.h: Adjust.
22440 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
22441 * src/print.c (print_grammar): Issue `\n' between two rules.
22442 * tests/regression.at (Conflicts): New.
22443 Reported by Tom Lane.
22444
22445 2001-11-12 Akim Demaille <akim@epita.fr>
22446
22447 * tests/regression.at (Invalid input): Remove, duplicate with
22448 ``Invalid input: 1''.
22449
22450 2001-11-12 Akim Demaille <akim@epita.fr>
22451
22452 * tests/torture.at (AT_DATA_STACK_TORTURE)
22453 (Exploding the Stack Size with Alloca)
22454 (Exploding the Stack Size with Malloc): New.
22455
22456 2001-11-12 Akim Demaille <akim@epita.fr>
22457
22458 * src/bison.simple (YYSTACK_REALLOC): New.
22459 (yyparse) [!yyoverflow]: Use it and free the old stack.
22460 Reported by Per Allansson.
22461
22462 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
22463
22464 * src/bison.simple: Define type yystype instead of YYSTYPE, and
22465 define CPP macro, which substitute YYSTYPE by yystype.
22466 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
22467 with yyltype/YYLTYPE. This allows inclusion of the generated
22468 header within the parser if the compiler, such as GGC, accepts
22469 multiple equivalent #defines.
22470 From Akim.
22471
22472 2001-11-05 Akim Demaille <akim@epita.fr>
22473
22474 * src/reader.c (symbols_output): New, extracted from...
22475 (packsymbols): here.
22476 (reader): Adjust.
22477
22478 2001-11-05 Akim Demaille <akim@epita.fr>
22479
22480 * src/lex.c (parse_percent_token): s/quotearg/quote/.
22481
22482 2001-11-05 Akim Demaille <akim@epita.fr>
22483
22484 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
22485 pattern.
22486
22487 2001-11-05 Akim Demaille <akim@epita.fr>
22488
22489 * src/options.h (struct option_table_struct): set_flags is void*.
22490 * src/options.c (longopts): Support `--output' and `%output'.
22491 (usage): Adjust.
22492 * src/lex.h (tok_setopt): Remove, replaced with...
22493 (tok_intopt, tok_stropt): these new guys.
22494 * src/lex.c (getopt.h): Not needed.
22495 (token_buffer, unlexed_token_buffer): Not const.
22496 (percent_table): Promote `-' over `_' in directive names.
22497 Active `%name-prefix', `file-prefix', and `output'.
22498 (parse_percent_token): Accept possible arguments to directives.
22499 Promote `-' over `_' in directive names.
22500
22501 2001-11-04 Akim Demaille <akim@epita.fr>
22502
22503 * doc/bison.texinfo (Decl Summary): Split the list into
22504 `directives for grammars' and `directives for bison'.
22505 Sort'em.
22506 Add description of `%name-prefix', `file-prefix', and `output'.
22507 Promote `-' over `_' in directive names.
22508 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
22509 Simplify the description of `--name-prefix'.
22510 Promote `-' over `_' in directive names.
22511 Promote `--output' over `--output-file'.
22512 Fix the description of `--defines'.
22513 * tests/output.at: Exercise %file-prefix and %output.
22514
22515 2001-11-02 Akim Demaille <akim@epita.fr>
22516
22517 * doc/refcard.tex: Update.
22518
22519 2001-11-02 Akim Demaille <akim@epita.fr>
22520
22521 * src/symtab.h (SUNDEF): New.
22522 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
22523 stand for `uninitialized', instead of 0.
22524 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
22525 * src/lex.c (lex): Adjust.
22526
22527 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
22528 Number it 0.
22529 Let yylex return it instead of a plain 0.
22530 Reported by Dick Streefland.
22531
22532 2001-11-02 Akim Demaille <akim@epita.fr>
22533
22534 * tests/regression.at (Mixing %token styles): New test.
22535
22536 2001-11-02 Akim Demaille <akim@epita.fr>
22537
22538 * src/reader.c (parse_thong_decl): Formatting changes.
22539 (token_translations_init): New, extracted from...
22540 (packsymbols): Here.
22541 Adjust.
22542
22543 2001-11-01 Akim Demaille <akim@epita.fr>
22544
22545 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
22546 Check that `9foo.y' produces correct cpp guards.
22547 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
22548 guards.
22549 Reported by Wwp.
22550
22551 2001-11-01 Akim Demaille <akim@epita.fr>
22552
22553 * tests/regression.at (Invalid input: 2): New.
22554 * src/lex.c (unlexed_token_buffer): New.
22555 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
22556 too.
22557 Reported by Wwp.
22558
22559 2001-11-01 Akim Demaille <akim@epita.fr>
22560
22561 * tests/calc.at: Catch up with 1.30.
22562 * configure.in: Bump to 1.49a.
22563 Adjust to newer Autotest.
22564
22565 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
22566
22567 * src/conflicts.c: Move global variables rrc_total and src_total ...
22568 (print_conflicts): here.
22569 * src/output.c (output): Free global variable user_toknums.
22570 * src/lex.c (token_obstack): Become static.
22571
22572 2001-10-18 Akim Demaille <akim@epita.fr>
22573
22574 * tests/atlocal.in (GCC): Add.
22575 * tests/calc.at: s/m4_match/m4_bmatch/.
22576 s/m4_patsubst/m4_bpatsubst/.
22577 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
22578 * configure.in: AC_SUBST(GCC).
22579
22580 2001-10-14 Marc Autret <autret_m@epita.fr>
22581
22582 * src/options.c (create_long_option_table): Fix.
22583
22584 2001-10-10 Akim Demaille <akim@epita.fr>
22585
22586 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
22587
22588 2001-10-04 Akim Demaille <akim@epita.fr>
22589
22590 * src/reader.c (parse_union_decl): Push the caracters in
22591 union_obstack, not attrs_obstack.
22592
22593 2001-10-04 Akim Demaille <akim@epita.fr>
22594
22595 Merge in the branch 1.29.
22596
22597 * src/reader.c (packsymbols): Use a temporary obstack for
22598 `%%tokendef', since output_stack is already used elsewhere.
22599
22600 2001-10-02 Akim Demaille <akim@epita.fr>
22601
22602 Bump 1.29d.
22603
22604 2001-10-02 Akim Demaille <akim@epita.fr>
22605
22606 Version 1.29c.
22607
22608 2001-10-02 Akim Demaille <akim@epita.fr>
22609
22610 * tests/regression.at (Invalid CPP headers): New.
22611 From Alexander Belopolsky.
22612 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
22613
22614 2001-10-02 Akim Demaille <akim@epita.fr>
22615
22616 * tests/regression.at (Invalid input): New.
22617 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
22618 Reported by Shura.
22619
22620 2001-10-02 Akim Demaille <akim@epita.fr>
22621
22622 * tests/calc.at: Now that --debug works, the tests must be adjusted.
22623
22624 2001-10-02 Akim Demaille <akim@epita.fr>
22625
22626 * src/output.c (output_parser): Assert `skeleton'.
22627 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
22628 systems.
22629 From Shura.
22630
22631 2001-10-01 Marc Autret <autret_m@epita.fr>
22632
22633 * src/lex.h: Echo modifications.
22634 * src/lex.c (unlex): Parameter is now token_t.
22635 From Hans Aberg.
22636
22637 2001-10-01 Marc Autret <autret_m@epita.fr>
22638
22639 * src/main.c: Include lex.h.
22640 From Hans Aberg.
22641
22642 2001-09-29 Akim Demaille <akim@epita.fr>
22643
22644 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
22645
22646 2001-09-28 Akim Demaille <akim@epita.fr>
22647
22648 * tests/testsuite.at: Update to newer Autotest.
22649 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
22650
22651 2001-09-27 Akim Demaille <akim@epita.fr>
22652
22653 Position independent wrapper.
22654
22655 * tests/bison: Remove.
22656 * tests/bison.in: New.
22657 * configure.in: Adjust.
22658
22659 2001-09-27 Paul Eggert <eggert@twinsun.com>
22660
22661 Port quotearg fixes from tar 1.13.24.
22662
22663 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
22664 tm to be declared.
22665 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
22666 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
22667
22668 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
22669 * m4/mbrtowc.m4: New file.
22670 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
22671 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
22672
22673 2001-09-27 Akim Demaille <akim@epita.fr>
22674
22675 Bump to 1.29c.
22676
22677 2001-09-27 Akim Demaille <akim@epita.fr>
22678
22679 Version 1.29b.
22680
22681 2001-09-25 Akim Demaille <akim@epita.fr>
22682
22683 * src/system.h: Include `xalloc.h'.
22684 Remove it from the C files.
22685 * src/files.c (output_files): Free the obstacks.
22686 * src/lex.c (init_lex): Rename as...
22687 (lex_init): this.
22688 (lex_free): New.
22689 * src/main.c (main): Use it.
22690
22691 2001-09-24 Marc Autret <autret_m@epita.fr>
22692
22693 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
22694 to output informations in fout (FILE*).
22695 (open_graph, close_graph): Likewise.
22696 (output_graph, output_edge, output_node): Likewise.
22697 * src/vcg.h: Update function prototypes.
22698 * src/print_graph.c (print_graph): Open output graph file.
22699 (print_actions): Adjust.
22700 * src/files.h: Remove extern declaration.
22701 * src/files.c: Remove graph_obstack declaration.
22702 (open_files): Remove graph_obstack initialization.
22703 (output_files): Remove graph_obstack saving.
22704
22705 2001-09-24 Marc Autret <autret_m@epita.fr>
22706
22707 * src/files.c (compute_output_file_names): Fix.
22708
22709 2001-09-24 Marc Autret <autret_m@epita.fr>,
22710 Akim Demaille <akim@epita.fr>
22711
22712 * src/reader.c (reader): Remove call to free_symtab ().
22713 * src/main.c (main): Call it here.
22714 Include symtab.h.
22715 * src/conflicts.c (initialize_conflicts): Rename as...
22716 (solve_conflicts): this.
22717 * src/print.c (print_core, print_actions, print_state)
22718 (print_grammar): Dump to a file instead a `output_obstack'.
22719 (print_results): Dump `output_obstack', and then proceed with the
22720 FILE *.
22721 * src/files.c (compute_output_file_names, close_files): New.
22722 (output_files): Adjust.
22723 * src/main.c (main): Adjust.
22724
22725 2001-09-23 Marc Autret <autret_m@epita.fr>
22726
22727 * src/files.c (compute_header_macro): Computes header macro name
22728 from spec_defines_file when given.
22729
22730 2001-09-23 Marc Autret <autret_m@epita.fr>
22731
22732 * src/files.c (output_files): Add default extensions.
22733
22734 2001-09-22 Akim Demaille <akim@epita.fr>
22735
22736 * src/conflicts.c (finalize_conflicts): Rename as...
22737 (free_conflicts): this.
22738
22739 2001-09-22 Akim Demaille <akim@epita.fr>
22740
22741 * src/gram.c (gram_free): Rename back as...
22742 (dummy): this.
22743 (output_token_translations): Free `token_translations'.
22744 * src/symtab.c (free_symtab): Free the tag field.
22745
22746 2001-09-22 Akim Demaille <akim@epita.fr>
22747
22748 Remove `translations' as it is always set to true.
22749
22750 * src/gram.h: Adjust.
22751 * src/reader.c (packsymbols, parse_token_decl): Adjust
22752 * src/print.c (print_grammar): Adjust.
22753 * src/output.c (output_token_translations): Adjust.
22754 * src/lex.c (lex): Adjust.
22755 * src/gram.c: Be sure the set pointers to NULL.
22756 (dummy): Rename as...
22757 (gram_free): this.
22758
22759 2001-09-22 Akim Demaille <akim@epita.fr>
22760
22761 * configure.in: Invoke AM_LIB_DMALLOC.
22762 * src/system.h: Use dmalloc.
22763 * src/LR0.c: Be sure to have pointers initialized to NULL.
22764 (allocate_itemsets): Allocate kernel_items only if needed.
22765
22766 2001-09-22 Akim Demaille <akim@epita.fr>
22767
22768 * configure.in: Bump to 1.29b.
22769 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
22770 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
22771 need xmalloc.c in calc.y.
22772 From Pascal Bart.
22773
22774 2001-09-21 Akim Demaille <akim@epita.fr>
22775
22776 Version 1.29a.
22777 * Makefile.maint, config/config.guess, config/config.sub,
22778 * config/missing: Update from masters.
22779 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
22780 upon package.m4.
22781 * configure.in (ALL_LINGUAS): Add `tr'.
22782
22783 2001-09-21 Akim Demaille <akim@epita.fr>
22784
22785 * tests/Makefile.am (package.m4): Move to...
22786 ($(srcdir)/$(TESTSUITE)): here.
22787
22788 2001-09-20 Akim Demaille <akim@epita.fr>
22789
22790 * src/complain.c: No longer try to be standalone: use system.h.
22791 Don't assume __STDC__ is defined to 1. Just test if it is defined.
22792 * src/complain.h: Likewise.
22793 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
22794 Remove the unused variable `n'.
22795 From Albert Chin-A-Young.
22796
22797 2001-09-18 Marc Autret <autret_m@epita.fr>
22798
22799 * doc/bison.1: Update.
22800 * doc/bison.texinfo (Bison Options): Update --defines and --graph
22801 descriptions.
22802 (Option Cross Key): Update.
22803 Add --graph.
22804
22805 2001-09-18 Marc Autret <autret_m@epita.fr>
22806
22807 * tests/regression.at: New test (comment in %union).
22808
22809 2001-09-18 Marc Autret <autret_m@epita.fr>
22810
22811 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
22812 do that.
22813 Reported by Keith Browne.
22814
22815 2001-09-18 Marc Autret <autret_m@epita.fr>
22816
22817 * tests/output.at: Add tests for --defines and --graph.
22818
22819 2001-09-18 Marc Autret <autret_m@epita.fr>
22820
22821 * tests/output.at: Removes tests of %{header,src}_extension features.
22822
22823 2001-09-18 Akim Demaille <akim@epita.fr>
22824
22825 * tests/Makefile.am (package.m4): New.
22826 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
22827 (_AT_CHECK_CALC_ERROR): Likewise.
22828 Factor the `, ' part of verbose error messages.
22829
22830 2001-09-18 Marc Autret <autret_m@epita.fr>
22831
22832 * src/getargs.c (longopts): Declare --defines and --graph as options
22833 with optional arguments.
22834 * src/files.h: Add extern declarations.
22835 * src/files.c (spec_graph_file, spec_defines_file): New.
22836 (output_files): Update.
22837 Remove CPP-outed code.
22838
22839 2001-09-18 Marc Autret <autret_m@epita.fr>
22840
22841 Turn off %{source,header}_extension feature.
22842
22843 * src/files.c (compute_exts_from_gf): Update.
22844 (compute_exts_from_src): Update.
22845 (output_files): CPP-out useless code.
22846 * src/files.h: Remove {header,source}_extension extern declarations.
22847 * src/reader.c (parse_dquoted_param): CPP-out.
22848 (parse_header_extension_decl): Remove.
22849 (parse_source_extension_decl): Remove.
22850 (read_declarations): Remove cases tok_{hdrext,srcext}.
22851 * src/lex.c (percent_table): Remove {header,source}_extension entries.
22852 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
22853
22854 2001-09-10 Akim Demaille <akim@epita.fr>
22855
22856 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
22857 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
22858 (AT_CHECK_OUTPUT): this.
22859 Merely check ls' exit status, its output is useless.
22860
22861 2001-09-10 Akim Demaille <akim@epita.fr>
22862
22863 * tests/calc.at: Use m4_match.
22864 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
22865
22866 2001-09-10 Marc Autret <autret_m@epita.fr>,
22867 Akim Demaille <akim@epita.fr>
22868
22869 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
22870 enum color_e.
22871 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
22872 to `normal'.
22873 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
22874 * src/lex.h: Adjust prototype.
22875 (token_t): Add `tok_undef'.
22876 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
22877 (parse_percent_token): Now returns token_t.
22878 Add default statement in switch.
22879 (lex): Separate `c' as an input variable, from the token_t result
22880 part.
22881 (unlexed): Is a token_t.
22882
22883 2001-09-10 Akim Demaille <akim@epita.fr>
22884
22885 * configure.in: Bump to 1.29a.
22886
22887 2001-09-07 Akim Demaille <akim@epita.fr>
22888
22889 Version 1.29.
22890
22891 2001-08-30 Akim Demaille <akim@epita.fr>
22892
22893 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
22894 * m4/atconfig.m4: Remove.
22895 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
22896 * tests/bison: New.
22897 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
22898 m4_if, m4_patsubst, and m4_regexp.
22899 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
22900 `input' file instead of echo.
22901
22902 2001-08-29 Akim Demaille <akim@epita.fr>
22903
22904 Bump to 1.28e.
22905
22906 2001-08-29 Akim Demaille <akim@epita.fr>
22907
22908 Version 1.28d.
22909
22910 2001-08-29 Paul Eggert <eggert@twinsun.com>
22911
22912 * src/bison.simple (yyparse): Don't take the address of an
22913 item before the start of an array, as that doesn't conform to
22914 the C Standard.
22915
22916 2001-08-29 Robert Anisko <anisko_r@epita.fr>
22917
22918 * doc/bison.texinfo (Location Tracking Calc): New node.
22919
22920 2001-08-29 Paul Eggert <eggert@twinsun.com>
22921
22922 * src/output.c (output): Do not define const, as this now
22923 causes more problems than it cures.
22924
22925 2001-08-29 Akim Demaille <akim@epita.fr>
22926
22927 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
22928 the nodes.
22929 Be sure to tag the `detailmenu'.
22930
22931 2001-08-29 Akim Demaille <akim@epita.fr>
22932
22933 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
22934 download in a tmp dir.
22935
22936 2001-08-28 Marc Autret <autret_m@epita.fr>
22937
22938 * config/depcomp: New file.
22939
22940 2001-08-28 Marc Autret <autret_m@epita.fr>
22941
22942 * doc/bison.1 (mandoc): Adjust.
22943 From Juan Manuel Guerrero.
22944
22945 2001-08-28 Marc Autret <autret_m@epita.fr>
22946
22947 * src/print_graph.c (print_state): Fix.
22948
22949 2001-08-27 Marc Autret <autret_m@epita.fr>
22950
22951 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
22952 char * members.
22953 Echo modifications to the functions prototypes.
22954 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
22955
22956 2001-08-27 Marc Autret <autret_m@epita.fr>
22957
22958 * src/vcg.c: Include `xalloc.h'.
22959 (add_colorentry): New.
22960 (add_classname): New.
22961 (add_infoname): New.
22962 * src/vcg.h: Add new prototypes.
22963
22964 2001-08-27 Akim Demaille <akim@epita.fr>
22965
22966 * Makefile.maint: Sync. again with CVS Autoconf.
22967
22968 2001-08-27 Akim Demaille <akim@epita.fr>
22969
22970 * Makefile.maint: Formatting changes.
22971 (po-update, cvs-update, update): New targets.
22972 (AMTAR): Remove.
22973
22974 2001-08-27 Akim Demaille <akim@epita.fr>
22975
22976 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
22977 * Makefile.maint: Sync. with CVS Autoconf.
22978
22979 2001-08-27 Marc Autret <autret_m@epita.fr>
22980
22981 * src/vcg.h (struct infoname_s): New.
22982 (struct colorentry_s): New.
22983 (graph_s): New fields {vertical,horizontal}_order in structure.
22984 Add `infoname' field.
22985 Add `colorentry' field;
22986 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
22987 (G_HORIZONTAL_ORDER): New.
22988 (G_INFONAME): New.
22989 (G_COLORENTRY): New.
22990 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
22991 Add output of `infoname'.
22992 Add output of `colorentry'.
22993
22994 2001-08-27 Marc Autret <autret_m@epita.fr>
22995
22996 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
22997 This one shadowed a global parameter.
22998
22999 2001-08-24 Marc Autret <autret_m@epita.fr>
23000
23001 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
23002 instead of `unsigned'.
23003 (print_state): Do not call obstack_object_size () in obstack_grow ()
23004 to avoid macro variables shadowing.
23005
23006 2001-08-23 Marc Autret <autret_m@epita.fr>
23007
23008 * src/lex.c (percent_table): Typo: s/naem/name/.
23009 Add graph option.
23010 Normalize new options declarations.
23011
23012 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
23013
23014 * tests/suite.at: Exercise %header_extension and %source_extension.
23015
23016 2001-08-16 Marc Autret <autret_m@epita.fr>
23017
23018 * src/reader.c (parse_dquoted_param): New.
23019 (parse_header_extension_decl): Use it.
23020 (parse_source_extension_decl): Likewise.
23021
23022 2001-08-16 Marc Autret <autret_m@epita.fr>
23023
23024 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
23025 (get_xxxx_str): Use assert () instead of complain ().
23026 Remove return invokations in default cases.
23027 (get_decision_str): Modify default behaviour. Remove second argument.
23028 Echo modifications on calls.
23029 (output_graph): Fix.
23030
23031 2001-08-16 Marc Autret <autret_m@epita.fr>
23032
23033 * src/getargs.c (usage): Update with ``-g, --graph''.
23034
23035 2001-08-16 Marc Autret <autret_m@epita.fr>
23036
23037 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
23038 (Option Cross Key): Likewise.
23039 * doc/bison.1: Update.
23040
23041 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
23042
23043 * src/output.c (output_master_parser): Don't finish action_obstack.
23044 (output_parser): Don't care about the muscle action, here.
23045 (prepare): Copy the action_obstack in the action muscle.
23046 (output): Free action_obstack.
23047
23048 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
23049
23050 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
23051 will contain `%union' declaration.
23052 (parse_union_decl): Delete #line directive output.
23053 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
23054 informations about %union.
23055 (parse_union_decl): Copy the union_obstack in the muscle stype.
23056 * src/bison.simple: Add new #line directive.
23057 Add typdef %%stype YYSTYPE.
23058
23059 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
23060
23061 * src/bison.simple: Add new `#line' directive.
23062
23063 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
23064
23065 * src/bison.simple: New `#line' directive.
23066 * src/output.c (output_parser): Support new dynamic muscle input_line.
23067
23068 2001-09-22 Marc Autret <autret_m@epita.fr>
23069
23070 * src/output.c (output_master_parser): New.
23071 (output_parser): Be more re-entrant.
23072
23073 2001-09-21 Marc Autret <autret_m@epita.fr>
23074
23075 * src/reader.c (copy_definition, parse_union_decl): Update and use
23076 `linef' muscle.
23077 (copy_action): Likewise.
23078 Use obstack_1grow ().
23079 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
23080
23081 2001-09-21 Marc Autret <autret_m@epita.fr>
23082
23083 * src/options.c (option_table): Adjust.
23084 * src/lex.c (parse_percent_token): Fix.
23085
23086 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
23087
23088 * src/options.c (symtab.h): Include it, need by lex.h.
23089
23090 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
23091
23092 * src/lex.c (parse_percent_token): Change type of variable `tx', which
23093 is now an option_table_struct*.
23094 (option_strcmp): New function option_strcmp.
23095 (parse_percent_token): Call option_strcmp.
23096 * src/getargs.c (xalloc.h, options.h): Include it.
23097 (getargs): Call create_long_option_table.
23098 (getargs): Free longopts at the end of the function.
23099 (shortopts): Move in options.c.
23100 * src/options.c (create_long_option_table): New function. Convert
23101 information from option_table to option structure.
23102 * src/reader.c (options.h): Include it.
23103
23104 * src/Makefile.am: Adjust.
23105 * src/options.c (option_table): Create from longopts and percent_table.
23106 * src/getargs.c (longopts): Delete.
23107 * src/lex.c (struct percent_table_struct): Delete.
23108 (percent_table): Delete.
23109 (options.h): Include it.
23110 * src/options.c: Create.
23111 * src/options.h: Create.
23112 Declare enum opt_access_e.
23113 Define struct option_table_struct.
23114
23115 2001-09-20 Marc Autret <autret_m@epita.fr>
23116
23117 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
23118 sections of Bison.
23119
23120 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
23121
23122 * src/bison.simple: s/%%filename/%%skeleton.
23123 * src/muscle_tab.c (getargs.h): Include it.
23124 (muscle_init): Insert new muscle skeleton.
23125
23126 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
23127
23128 * src/output.c (output_parser): Delete unused variable actions_dumped.
23129
23130 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
23131
23132 * src/output.c (output): Delete call to reader_output_yylsp.
23133 * src/reader.c (reader): Likewise.
23134 * src/reader.h: Delete declaration of reader_output_yylsp.
23135
23136 2001-09-02 Marc Autret <autret_m@epita.fr>
23137
23138 * src/reader.c: Include muscle_tab.h.
23139 (parse_union_decl): Update.
23140 (parse_macro_decl): Rename parse_muscle_decl.
23141 Update to use renamed functions and variable.
23142 (read_declarations, copy_action, read_additionnal_code, : Updated
23143 with correct variables and functions names.
23144 (packsymbols, reader): Likewise.
23145
23146 * src/reader.h (muscle_obstack): Extern declaration update.
23147
23148 * src/output.c: Include muscle_tab.h
23149 In all functions using macro_insert, change by using muscle_insert ().
23150 (macro_obstack): Rename muscle_obstack.
23151 Echo modifications in the whole file.
23152 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
23153 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
23154 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
23155
23156 * src/muscle_tab.h: Update double inclusion macros.
23157 (macro_entry_s): Rename muscle_entry_s.
23158 Update prototypes.
23159
23160 * src/muscle_tab.c: Include muscle_tab.h.
23161 Rename macro_tabble to muscle_table.
23162 (mhash1, mhash2, mcmp): Use muscle_entry.
23163 (macro_init): Rename muscle_init. Update.
23164 (macro_insert): Rename muscle_insert. Update.
23165 (macro_find): Rename muscle_find. Update.
23166
23167 * src/main.c: Include muscle_tab.h.
23168 (main): Call muscle_init ().
23169 * src/Makefile.am (bison_SOURCES): Echo modifications.
23170
23171 2001-09-02 Marc Autret <autret_m@epita.fr>
23172
23173 Now the files macro_tab.[ch] are named muscle_tab.[ch].
23174
23175 * src/muscle_tab.c, src/muscle_tab.h: Add files.
23176
23177 2001-09-02 Marc Autret <autret_m@epita.fr>
23178
23179 * src/macrotab.c, src/macrotab.h: Remove.
23180
23181 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
23182
23183 * src/reader.c (copy_guard): Use muscle to specify the `#line'
23184 filename.
23185
23186 2001-09-01 Marc Autret <autret_m@epita.fr>
23187
23188 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
23189 to an explicit value to activate the feature. We do it here.
23190
23191 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
23192
23193 * src/output.c (prepare): Delete the `filename' muscule insertion.
23194 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
23195 (parse_union_decl): Likewise.
23196 * src/macrotab.c (macro_init): Initialize filename by infile.
23197
23198 2001-08-31 Marc Autret <autret_m@epita.fr>
23199
23200 * src/bison.simple (YYLSP_NEEDED): New definition.
23201 * src/output.c (prepare): Add macro insertion of `locations_flag'
23202
23203 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
23204
23205 * src/output.c (prepare): Delete insertion of previous muscles,
23206 and insert the `prefix' muscles.
23207 * src/macrotab.c (macro_init): Likewise.
23208 (macro_init): Initialization prefix directive by `yy'.
23209 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
23210 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
23211 yylval, yydebug, yyerror, yynerrs and yyparse.
23212 New directive `#define' to substitute yydebug, ... with option
23213 name_prefix.
23214
23215 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
23216
23217 * src/main.c (main): Standardize.
23218 * src/output.c (output_table_data, output_parser): Likewise.
23219 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
23220
23221 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
23222
23223 * src/reader.c (read_additionnal_code): Rename %%user_code to
23224 %%epilogue.
23225 * src/output.c (output): Rename %%declarations to %%prologue.
23226 * src/bison.simple: Echo modifications.
23227
23228 2001-08-31 Marc Autret <autret_m@epita.fr>
23229
23230 * src/reader.c (readgram): CleanUp.
23231 (output_token_defines): Likewise.
23232 (packsymbols): Likewise.
23233 (reader): Likewise.
23234 * src/output.c (output): CPP-out useless code.
23235
23236 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
23237
23238 * src/reader.c (reader): Delete obsolete call to function
23239 output_trailers and output_headers.
23240 * src/output.h: Remove obsolete functions prototypes of output_headers
23241 and output_trailers.
23242
23243 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
23244
23245 * src/main.c: Include macrotab.h.
23246 * src/macrotab.h (macro_entry_s): Constify fields.
23247 Adjust functions prototypes.
23248 * src/macrotab.c (macro_insert): Constify key and value.
23249 (macro_find): Constify key.
23250 (macro_insert): Include 'xalloc.h'
23251 (macro_insert): Use XMALLOC.
23252 (macro_find): Constify return value.
23253 * src/output.c (output_table_data): Rename table to table_data.
23254 (output_parser): Constify macro_key, macro_value.
23255
23256 2001-08-30 Marc Autret <autret_m@epita.fr>
23257
23258 * src/reader.c (parse_skel_decl): New.
23259 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
23260 * src/lex.h (token_t): New token `tok_skel'.
23261 * src/lex.c (percent_table): Add skeleton option entry.
23262 Standardize.
23263
23264 2001-08-29 Marc Autret <autret_m@epita.fr>
23265
23266 * src/bison.simple: Add %%user_code directive at the end.
23267 * src/reader.c (read_additionnal_code): New.
23268 (reader): Use it.
23269 * src/output.c (output_program): Remove.
23270 (output): Update.
23271
23272 2001-08-28 Marc Autret <autret_m@epita.fr>
23273
23274 * src/output.c (output_actions): Clean up.
23275 (output_gram): CPP-out useless code.
23276 * src/reader.c (reader): Clean up, CPP-out useless code.
23277
23278 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
23279
23280 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
23281 directive.
23282 * src/bison.simple: Add `%%definitions'.
23283
23284 2001-08-28 Marc Autret <autret_m@epita.fr>
23285
23286 * config/depcomp: New file.
23287
23288 2001-08-27 Paul Eggert <eggert@twinsun.com>
23289
23290 * src/bison.simple (yyparse): Don't take the address of an
23291 item before the start of an array, as that doesn't conform to
23292 the C Standard.
23293
23294 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
23295
23296 * src/output.c (output): Remove the initialization of the macro
23297 obstack. It was done too late here.
23298
23299 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
23300 completely wrong.
23301 (reader): Initialize the macro obstack here, since we need it to grow
23302 '%define' directives.
23303
23304 * src/reader.h: Declare the macro obstack as extern.
23305
23306 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
23307
23308 * src/output.c (output_parser): Fix. Store single '%' characters in
23309 the output obstack instead of throwing them away.
23310
23311 2001-08-27 Akim Demaille <akim@epita.fr>
23312
23313 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
23314
23315 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23316
23317 * lib/Makefile.am: Adjust.
23318
23319 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23320
23321 * src/bison.simple: Update and add '%%' directives.
23322
23323 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23324
23325 * src/reader.c (reader): Remove calls to 'output_headers' and
23326 'output_trailers'. Remove some C output.
23327 (readgram): Disable a piece of code that was writing a default
23328 definition for 'YYSTYPE'.
23329 (reader_output_yylsp): Remove.
23330 (packsymbols): Output token defintions to a macro.
23331 (copy_definition): Disable C output.
23332
23333 * src/reader.c (parse_macro_decl): New function used to parse macro
23334 declarations.
23335 (copy_string2): Put the body of copy_string into this new function.
23336 Add a parameter to let the caller choose whether he wants to copy the
23337 string delimiters or not.
23338 (copy_string): Be a simple call to copy_string2 with the last argument
23339 bound to true.
23340 (read_declarations): Add case for macro definition.
23341 (copy_identifier): New.
23342 (parse_macro_decl): Read macro identifiers using copy_identifier
23343 rather than lex.
23344
23345 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23346
23347 * src/output.c (prepare): Add prefixed names.
23348 (output_parser): Output semantic actions.
23349 (output_parser): Fix bug on '%%line' directives.
23350
23351 * src/output.c (output_headers): Remove. The C code printed by this
23352 function should now be in the skeletons.
23353 (output_trailers): Remove.
23354 (output): Disable call to 'reader_output_yylsp'.
23355 (output_rule_data): Do not output tables to the table obstack.
23356
23357 * src/output.c: Remove some C dedicated output.
23358 Improve the use of macro and output obstacks.
23359 (output_defines): Remove.
23360
23361 * src/output.c (output_token_translations): Associate 'translate'
23362 table with a macro. No output to the table obstack.
23363 (output_gram): Same for 'rhs' and 'prhs'.
23364 (output_stos): Same for 'stos'.
23365 (output_rule_data): Same for 'r1' and 'r2'.
23366 (token_actions): Same for 'defact'.
23367 (goto_actions): Same for 'defgoto'.
23368 (output_base): Same for 'pact' and 'pgoto'.
23369 (output_table): Same for 'table'.
23370 (output_check): Same for 'check'.
23371
23372 * src/output.c (output_table_data): New function.
23373 (output_short_table): Remove.
23374 (output_short_or_char_table): Remove.
23375
23376 * src/output.c (output_parser): Replace most of the skeleton copy code
23377 with something new. Skeletons are now processed character by character
23378 rather than line by line, and Bison looks for '%%' macros. This is the
23379 first step in making Bison's output process (a lot) more flexible.
23380 (output_parser): Use the macro table.
23381
23382 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23383
23384 * src/main.c (main): Initialize the macro table.
23385
23386 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23387
23388 * src/lex.c (percent_table): Add tok_define.
23389 * src/lex.h: Add tok_define.
23390
23391 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23392
23393 * src/macrotab.c: New file.
23394 * src/macrotab.h: New file.
23395 * src/Makefile.am: Update.
23396
23397 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23398
23399 * lib/hash.c: New file.
23400 * lib/hash.h: New file.
23401 * lib/Makefile.am: Update.
23402
23403 2001-08-15 Akim Demaille <akim@epita.fr>
23404
23405 Version 1.28c.
23406
23407 2001-08-15 Marc Autret <autret_m@epita.fr>
23408
23409 * src/reader.c (readgram): Indent output macro YYSTYPE.
23410 (packsymbols): Likewise.
23411 (output_token_defines): Likewise.
23412 * src/files.c: Standardize.
23413 (compute_header_macro): New.
23414 (defines_obstack_save): New. Use compute_header_macro.
23415 (output_files): Update. Use defines_obstack_save.
23416
23417 2001-08-15 Akim Demaille <akim@epita.fr>
23418
23419 * doc/bison.texinfo (Table of Symbols): Document
23420 YYSTACK_USE_ALLOCA.
23421
23422 2001-08-15 Akim Demaille <akim@epita.fr>
23423
23424 * missing: Update from CVS Automake.
23425 * config/config.guess, config/config.sub, config/texinfo.tex:
23426 Update from gnu.org.
23427
23428 2001-08-15 Akim Demaille <akim@epita.fr>
23429
23430 * Makefile.maint: Sync with CVS Autoconf.
23431
23432 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
23433
23434 * doc/bison.texinfo: Include GNU Free Documentation License from
23435 `fdl.texi'.
23436 * doc/fdl.texi: Add to package.
23437
23438 2001-08-14 Marc Autret <autret_m@epita.fr>
23439
23440 Turn on %{source,header}_extension features.
23441
23442 * src/lex.c (percent_table): Un-CPP out header_extension and
23443 source_extension.
23444 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
23445 (compute_exts_from_src): Remove conditions. It restores priorities
23446 between options.
23447
23448 2001-08-14 Marc Autret <autret_m@epita.fr>
23449
23450 * src/files.c (compute_base_names): Add extensions computing when
23451 `--file-prefix' used.
23452 Standardize function calls.
23453
23454 2001-08-13 Marc Autret <autret_m@epita.fr>
23455
23456 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
23457 defining it (defined but null disables alloca).
23458
23459 2001-08-13 Marc Autret <autret_m@epita.fr>
23460
23461 * src/bison.simple (_yy_memcpy): CPP reformat.
23462
23463 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
23464
23465 * tests/atconfig.in (CPPFLAGS): Fix.
23466
23467 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
23468
23469 * doc/bison.texinfo: Include GNU General Public License from
23470 `gpl.texi'.
23471 * doc/gpl.texi: Add to package.
23472
23473 2001-08-10 Marc Autret <autret_m@epita.fr>
23474
23475 * src/print_graph.h: Fix.
23476 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
23477
23478 2001-08-10 Akim Demaille <akim@epita.fr>
23479
23480 * src/system.h: Provide default declarations for stpcpy, strndup,
23481 and strnlen.
23482
23483 2001-08-10 Robert Anisko <anisko_r@epita.fr>
23484
23485 * doc/bison.texinfo (Locations): Update @$ stuff.
23486
23487 2001-08-09 Robert Anisko <anisko_r@epita.fr>
23488
23489 * src/bison.simple (YYLLOC_DEFAULT): Update.
23490 (yyparse): Adjust.
23491
23492 2001-08-08 Marc Autret <autret_m@epita.fr>
23493
23494 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
23495 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
23496 Reported by Fabrice Bauzac.
23497
23498 2001-08-08 Marc Autret <autret_m@epita.fr>
23499
23500 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
23501 * src/vcg.c (output_node): Fix.
23502 * src/vcg.h: Cleanup.
23503 * src/print_graph.c: Add comments.
23504 (node_output_size): New global variable. Simplify the formatting of
23505 the VCG graph output.
23506 (print_actions): Unused code is now used. It notifies the final state
23507 and no action states in the VCG graph. It also give the reduce actions.
23508 The `shift and goto' edges are red and the `go to state' edges are
23509 blue.
23510 Get the current node name and node_obstack by argument.
23511 (node_obstack): New variable.
23512 (print_state): Manage node_obstack.
23513 (print_core): Use node_obstack given by argument.
23514 A node is not only computed here but in print_actions also.
23515 (print_graph): CPP out useless code instead of commenting it.
23516
23517 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
23518
23519 * tests/atconfig.in (CPPFLAGS): Fix.
23520
23521 2001-08-07 Akim Demaille <akim@epita.fr>
23522
23523 * src/print_graph.c (quote): New.
23524 (print_core): Use it.
23525
23526 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
23527
23528 * src/vcg.c (complain.h): Include it.
23529 Unepitaize `return' invocations.
23530 [NDEBUG] (main): Remove.
23531 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
23532 * src/files.c (open_files): Initialize graph_obstack.
23533 * src/print_graph.c (print_actions): CPP out useless code.
23534 (print_core): Don't output the last `\n' in labels.
23535 Use `quote'.
23536 * src/files.c (output_files): Output the VCG file.
23537 * src/main.c (main): Invoke print_graph ();
23538
23539 2001-08-06 Marc Autret <autret_m@epita.fr>
23540
23541 Automaton VCG graph output.
23542 Using option ``-g'' or long option ``--graph'', you can generate
23543 a gram_filename.vcg file containing a VCG description of the LALR (1)
23544 automaton of your grammar.
23545
23546 * src/main.c: Call to print_graph() function.
23547 * src/getargs.h: Update.
23548 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
23549 (graph_flag): New flag.
23550 (longopts): Update.
23551 (getargs): Add case `g'.
23552 * src/files.c (graph_obstack): New obstack struct.
23553 (open_files): Initialize new obstack.
23554 (output_files): Saves graph_obstack if required.
23555 * src/files.h (graph_obstack): New extern declaration.
23556 * src/Makefile.am: Add new source files.
23557
23558 2001-08-06 Marc Autret <autret_m@epita.fr>
23559
23560 * src/print_graph.c, src/print_graph.h (graph): New.
23561 * src/vcg.h: New file.
23562 * src/vcg.c: New file, VCG graph handling.
23563
23564 2001-08-06 Marc Autret <autret_m@epita.fr>
23565
23566 Add of %source_extension and %header_extension which specify
23567 the source or/and the header output file extension.
23568
23569 * src/files.c (compute_base_names): Remove initialisation of
23570 src_extension and header_extension.
23571 (compute_exts_from_gf): Update.
23572 (compute_exts_from_src): Update.
23573 (output_files): Update.
23574 * src/reader.c (parse_header_extension_decl): New.
23575 (parse_source_extension_decl): New.
23576 (read_declarations): New case statements for the new tokens.
23577 * src/lex.c (percent_table): Add entries for %source_extension
23578 and %header_extension.
23579 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
23580
23581 2001-08-06 Marc Autret <autret_m@epita.fr>
23582
23583 * configure.in: Bump to 1.28c.
23584 * doc/bison.texinfo: Texinfo thingies.
23585
23586 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
23587
23588 * tests/atconfig.in (CPPFLAGS): Add.
23589 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
23590
23591 2001-08-03 Akim Demaille <akim@epita.fr>
23592
23593 Version 1.28b.
23594
23595 2001-08-03 Akim Demaille <akim@epita.fr>
23596
23597 * tests/Makefile.am (check-local): Ship testsuite.
23598 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
23599 Include `string.h'.
23600
23601 2001-08-03 Akim Demaille <akim@epita.fr>
23602
23603 * configure.in: Try using -Wformat when compiling.
23604
23605 2001-08-03 Akim Demaille <akim@epita.fr>
23606
23607 * configure.in: Bump to 1.28b.
23608
23609 2001-08-03 Akim Demaille <akim@epita.fr>
23610
23611 * src/complain.c: Adjust strerror_r portability issues.
23612
23613 2001-08-03 Akim Demaille <akim@epita.fr>
23614
23615 Version 1.28a.
23616
23617 2001-08-03 Akim Demaille <akim@epita.fr>
23618
23619 * src/getargs.c, src/getarg.h (skeleton)): Constify.
23620 * src/lex.c (literalchar): Avoid name clashes on `buf'.
23621 * src/getargs.c: Include complain.h.
23622 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
23623 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
23624
23625 2001-08-03 Akim Demaille <akim@epita.fr>
23626
23627 * src/reader.c (readgram): Display hidden chars in error messages.
23628
23629 2001-08-03 Akim Demaille <akim@epita.fr>
23630
23631 Update to gettext 0.10.39.
23632
23633 2001-08-03 Akim Demaille <akim@epita.fr>
23634
23635 * lib/strspn.c: New.
23636
23637 2001-08-01 Marc Autret <autret_m@epita.fr>
23638
23639 * doc/bison.texinfo: Update.
23640 * doc/bison.1 (mandoc): Update.
23641 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
23642 * src/files.c: Support output files extensions computing.
23643 (src_extension): New static variable.
23644 (header_extension): New static variable.
23645 (tr): New function.
23646 (get_extension_index): New function, gets the index of an extension
23647 filename in a string.
23648 (compute_exts_from_gf): New function, computes extensions from the
23649 grammar file extension.
23650 (compute_exts_from_src): New functions, computes extensions from the
23651 C source file extension, file given by ``-o'' option.
23652 (compute_base_names): Update.
23653 (output_files): Update.
23654
23655 2001-08-01 Robert Anisko <anisko_r@epita.fr>
23656
23657 * doc/bison.texi: Document @$.
23658 (Locations): New section.
23659
23660 2001-07-18 Akim Demaille <akim@epita.fr>
23661
23662 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
23663 * config/prev-version.txt, config/move-if-change: New.
23664 * Makefile.am: Adjust.
23665
23666 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
23667
23668 * src/bison.simple (yyparse): Suppress warning `comparaison
23669 between signed and unsigned'.
23670
23671 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
23672
23673 * src/getargs.h (raw_flag): Remove.
23674 * src/getargs.c: Die on `-r'/`--raw'.
23675 * src/lex.c (parse_percent_token): Die on `%raw'.
23676 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
23677 * tests/calc.at: Suppress test with option `--raw'.
23678
23679 2001-07-14 Akim Demaille <akim@epita.fr>
23680
23681 * config/: New.
23682 * configure.in: Require Autoconf 2.50.
23683 Update to gettext 0.10.38.
23684
23685 2001-03-16 Akim Demaille <akim@epita.fr>
23686
23687 * doc/bison.texinfo: ANSIfy the examples.
23688
23689 2001-03-16 Akim Demaille <akim@epita.fr>
23690
23691 * getargs.c (skeleton): New variable.
23692 (longopts): --skeleton is a new option.
23693 (shortopts, getargs): -S is a new option.
23694 * getargs.h: Declare skeleton.
23695 * output.c (output_parser): Use it.
23696
23697 2001-03-16 Akim Demaille <akim@epita.fr>
23698
23699 * m4/strerror_r.m4: New.
23700 * m4/error.m4: Run AC_FUNC_STRERROR_R.
23701 * lib/error.h, lib/error.c: Update.
23702
23703 2001-03-16 Akim Demaille <akim@epita.fr>
23704
23705 * src/getargs.c (longopts): Clean up.
23706
23707 2001-02-21 Akim Demaille <akim@epita.fr>
23708
23709 * src/reader.c (gensym): `gensym_count' is your own.
23710 Use a static buf to create the symbol name, as token_buffer is no
23711 longer a buffer.
23712
23713 2001-02-08 Akim Demaille <akim@epita.fr>
23714
23715 * src/conflicts.c (conflict_report): Be sure not to append to res
23716 between two calls, which could happen if both first sprintf were
23717 skipped, but not the first cp += strlen.
23718
23719 2001-02-08 Akim Demaille <akim@epita.fr>
23720
23721 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
23722 New, from fileutils 4.0.37.
23723 * configure.in: Require Autoconf 2.49c. I took some time before
23724 making this decision. This is the only way out for portability
23725 issues in Bison, it would mean way too much duplicate effort to
23726 import in Bison features implemented in 2.49c since 2.13.
23727 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
23728
23729 2001-02-02 Akim Demaille <akim@epita.fr>
23730
23731 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
23732 * lib/xalloc.h, lib/xmalloc.c: Update.
23733
23734 2001-01-19 Akim Demaille <akim@epita.fr>
23735
23736 Get rid of the ad hoc handling of token_buffer in the scanner: use
23737 the obstacks.
23738
23739 * src/lex.c (token_obstack): New.
23740 (init_lex): Initialize it. No longer call...
23741 (grow_token_buffer): this. Remove it.
23742 Adjust all the places which used it to use the obstack.
23743
23744 2001-01-19 Akim Demaille <akim@epita.fr>
23745
23746 * src/lex.h: Rename all the tokens:
23747 s/\bENDFILE\b/tok_eof/g;
23748 s/\bIDENTIFIER\b/tok_identifier/g;
23749 etc.
23750 Let them be enums, not #define, to ease debugging.
23751 Adjust all the code.
23752
23753 2001-01-18 Akim Demaille <akim@epita.fr>
23754
23755 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
23756 * src/lex.c (maxtoken, grow_token_buffer): Static.
23757
23758 2001-01-18 Akim Demaille <akim@epita.fr>
23759
23760 Since we now use obstacks, more % directives can be enabled.
23761
23762 * src/lex.c (percent_table): Also accept `%yacc',
23763 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
23764 `%debug'.
23765 Handle the actions for `%semantic_parser' and `%pure_parser' here,
23766 instead of returning a token.
23767 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
23768 * src/reader.c (read_declarations): Adjust.
23769 * src/files.c (open_files): Don't call `compute_base_names', don't
23770 compute `attrsfile' since they depend upon data which might be
23771 *in* the input file now.
23772 (output_files): Do it here.
23773 * src/output.c (output_headers): Document the fact that this patch
23774 introduces a guaranteed SEGV for semantic parsers.
23775 * doc/bison.texinfo: Document them.
23776 * tests/suite.at: Exercise these %options.
23777
23778 2000-12-20 Akim Demaille <akim@epita.fr>
23779
23780 Also handle the output file (--verbose) with obstacks.
23781
23782 * files.c (foutput): Remove.
23783 (output_obstack): New.
23784 Adjust all dependencies.
23785 * src/conflicts.c: Return a string.
23786 * src/system.h (obstack_grow_string): Rename as...
23787 (obstack_sgrow): this. Be ready to work with non literals.
23788 (obstack_fgrow4): New.
23789
23790 2000-12-20 Akim Demaille <akim@epita.fr>
23791
23792 * src/files.c (open_files): Fix the computation of short_base_name
23793 in the case of `-o foo.tab.c'.
23794
23795 2000-12-20 Akim Demaille <akim@epita.fr>
23796
23797 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
23798 (copy_dollar): Now that everything uses obstacks, get rid of the
23799 FILE * parameters.
23800
23801 2000-12-20 Akim Demaille <akim@epita.fr>
23802
23803 * src/files.c (open_files): Actually the `.output' file is based
23804 on the short_base_name, not base_name.
23805 * tests/suite.at (Checking output file names): Adjust.
23806
23807 2000-12-20 Akim Demaille <akim@epita.fr>
23808
23809 * src/bison.s1: Remove, we now use directly...
23810 * src/bison.simple: this.
23811 * src/Makefile.am: Use pkgdata instead of data.
23812
23813 2000-12-20 Akim Demaille <akim@epita.fr>
23814
23815 * src/files.c (guard_obstack): New.
23816 (open_files): Initialize it.
23817 (output_files): Dump it...
23818 * src/files.h: Export it.
23819 * src/reader.c (copy_guard): Use it.
23820
23821 2000-12-19 Akim Demaille <akim@epita.fr>
23822
23823 * src/files.c (outfile, defsfile, actfile): Removed as global
23824 vars.
23825 (open_files): Don't compute them.
23826 (output_files): Adjust.
23827 (base_name, short_base_name): Be global.
23828 Adjust dependencies.
23829
23830 2000-12-19 Akim Demaille <akim@epita.fr>
23831
23832 * src/files.c (strsuffix): New.
23833 (stringappend): Be just like strcat but allocate.
23834 (base_names): Eve out from open_files.
23835 Try to simplify the rather hairy computation of base_name and
23836 short_base_name.
23837 (open_files): Use it.
23838 * tests/suite.at (Checking output file names): New test.
23839
23840 2000-12-19 Akim Demaille <akim@epita.fr>
23841
23842 * src/system.h (obstack_grow_literal_string): Rename as...
23843 (obstack_grow_string): this.
23844 * src/output.c (output_parser): Recognize `%% actions' instead of
23845 `$'.
23846 * src/bison.s1: s/$/%% actions/.
23847 * src/bison.hairy: Likewise.
23848
23849 2000-12-19 Akim Demaille <akim@epita.fr>
23850
23851 * src/output.c (output_parser): Compute the `#line' lines when
23852 there are.
23853 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
23854 Suggested by Hans Aberg.
23855
23856 2000-12-19 Akim Demaille <akim@epita.fr>
23857
23858 Let the handling of the skeleton files be local to the procedures
23859 that use it.
23860
23861 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
23862 longer static.
23863 (fparser, open_extra_files): Remove.
23864 (open_files, output_files): Don't take care of fparser.
23865 * src/files.h: Adjust.
23866 * src/output.c (output_parser): Open and close the file to the
23867 skeleton.
23868 * src/reader.c (read_declarations): When %semantic_parser, open
23869 fguard.
23870
23871 2000-12-19 Akim Demaille <akim@epita.fr>
23872
23873 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
23874 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
23875
23876 2000-12-19 Akim Demaille <akim@epita.fr>
23877
23878 * src/files.c (open_files): Yipee! We no longer need all the code
23879 looking for `/tmp' since we have no tmp file.
23880
23881 2000-12-19 Akim Demaille <akim@epita.fr>
23882
23883 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
23884 New macros.
23885 * src/files.c (open_files): Less dependency on MSDOS etc.
23886
23887 2000-12-14 Akim Demaille <akim@epita.fr>
23888
23889 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
23890 Provide a default definition.
23891 Use it when executing the default @ action.
23892 * src/reader.c (reader_output_yylsp): No longer include
23893 `timestamp' and `text' in the default YYLTYPE.
23894
23895 2000-12-12 Akim Demaille <akim@epita.fr>
23896
23897 * src/reader.c (copy_definition, parse_union_decl, copy_action)
23898 (copy_guard): Quote the file names.
23899 Reported by Laurent Mascherpa.
23900
23901 2000-12-12 Akim Demaille <akim@epita.fr>
23902
23903 * src/output.c (output_headers, output_program, output): Be sure
23904 to escape special characters when outputting filenames.
23905 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
23906 (output_headers): Don't depend on them, Use ACTSTR.
23907
23908 2000-11-17 Akim Demaille <akim@epita.fr>
23909
23910 * lib/obstack.h: Formatting changes.
23911 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
23912 prevents type checking.
23913 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
23914 cast the value to (void *): assigning a `foo *' to a `void *'
23915 variable is valid.
23916 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
23917 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
23918 append characters.
23919
23920 2000-11-17 Akim Demaille <akim@epita.fr>
23921
23922 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
23923 as...
23924 (suite.m4, regression.m4, calc.m4): these.
23925 * tests/atgeneral.m4: Update from CVS Autoconf.
23926
23927 2000-11-17 Akim Demaille <akim@epita.fr>
23928
23929 * tests/regression.m4 (%union and --defines): New test,
23930 demonstrating a current bug in the obstack implementation.
23931
23932 2000-11-17 Akim Demaille <akim@epita.fr>
23933
23934 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
23935 macros.
23936 Use them to declare the variables which are global or local to
23937 `yyparse'.
23938
23939 2000-11-17 Akim Demaille <akim@epita.fr>
23940
23941 * acconfig.h: Remove, no longer used.
23942
23943 2000-11-07 Akim Demaille <akim@epita.fr>
23944
23945 * src: s/Copyright (C)/Copyright/g.
23946
23947 2000-11-07 Akim Demaille <akim@epita.fr>
23948
23949 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
23950 defining.
23951 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
23952
23953 2000-11-07 Akim Demaille <akim@epita.fr>
23954
23955 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
23956 Merge in a single CPP if/else.
23957
23958 2000-11-07 Akim Demaille <akim@epita.fr>
23959
23960 * src/output.c (output): Remove useless variables.
23961 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
23962 argument `data' for consistency with the prototypes.
23963 Qualify it `const'.
23964 (obstack_copy, obstack_copy0): Rename the second argument as
23965 `address' for consistency. Qualify it `const'.
23966 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
23967 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
23968 `const' their input argument (`data' or `address').
23969 Adjust the corresponding macros to include `const' in casts.
23970
23971 2000-11-03 Akim Demaille <akim@epita.fr>
23972
23973 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
23974 s/PFILE1/BISON_HAIRY/.
23975 Adjust dependencies.
23976
23977 2000-11-03 Akim Demaille <akim@epita.fr>
23978
23979 For some reason, this was not applied.
23980
23981 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
23982 `unlink': it's no longer used.
23983
23984 2000-11-03 Akim Demaille <akim@epita.fr>
23985
23986 * src/files.c (skeleton_find): New function, eved out of...
23987 (open_files, open_extra_files): here.
23988
23989 2000-11-03 Akim Demaille <akim@epita.fr>
23990
23991 Don't use `atexit'.
23992
23993 * src/files.c (obstack_save): New function.
23994 (done): Rename as...
23995 (output_files): this.
23996 Use `obstack_save'.
23997 * src/main.c (main): Don't use `atexit' to register `done', since
23998 it no longer has to remove tmp files, just call `output_files'
23999 when there are no errors.
24000
24001 2000-11-02 Akim Demaille <akim@epita.fr>
24002
24003 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
24004 `unlink': it's no longer used.
24005 * src/files.h: Formatting changes.
24006
24007 2000-11-02 Akim Demaille <akim@epita.fr>
24008
24009 Remove the last uses of mktemp and unlink/delete.
24010
24011 * src/files.c (fdefines, ftable): Removed.
24012 (defines_ostack, table_obstack): New.
24013 Adjust dependencies of the former into uses of the latter.
24014 * src/output.c (output_short_or_char_table, output_short_table):
24015 Convert to using obstacks.
24016 * src/reader.c (copy_comment2): Accept one FILE * and two
24017 obstacks.
24018 (output_token_defines, reader_output_yylsp): Use obstacks.
24019 * src/system.h (obstack_fgrow3): New.
24020 * po/POTFILES.in: Adjust.
24021
24022 2000-11-01 Akim Demaille <akim@epita.fr>
24023
24024 Change each use of `fattrs' into a use of `attrs_obstack'.
24025
24026 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
24027 * src/files.c (fattrs): Remove.
24028 (attrs_obstack): New.
24029 Adjust all dependencies.
24030 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
24031
24032 2000-11-01 Akim Demaille <akim@epita.fr>
24033
24034 Introduce obstacks.
24035 Change each use of `faction' into a use of `action_obstack'.
24036
24037 * lib/obstack.h, lib/obstack.c: New files.
24038 * src/files.c (faction): Remove.
24039 (action_obstack): New.
24040 Adjust all dependencies.
24041
24042 2000-10-20 Akim Demaille <akim@epita.fr>
24043
24044 * lib/quote.h (PARAMS): New macro. Use it.
24045
24046 2000-10-16 Akim Demaille <akim@epita.fr>
24047
24048 * src/output.c (output_short_or_char_table): New function.
24049 (output_short_table, output_token_translations): Use it.
24050 (goto_actions): Use output_short_table.
24051
24052 2000-10-16 Akim Demaille <akim@epita.fr>
24053
24054 * src/symtab.c (bucket_new): New function.
24055 (getsym): Use it.
24056
24057 * src/output.c (output_short_table): New argument to display the
24058 comment associated with the table.
24059 Adjust dependencies.
24060 (output_gram): Use it.
24061 (output_rule_data): Nicer output layout for YYTNAME.
24062
24063 2000-10-16 Akim Demaille <akim@epita.fr>
24064
24065 * src/lex.c (read_typename): New function.
24066 (lex): Use it.
24067 * src/reader.c (copy_dollar): Likewise.
24068
24069 2000-10-16 Akim Demaille <akim@epita.fr>
24070
24071 * src/reader.c (copy_comment2): Expect the input stream to be on
24072 the `/' which is suspected to open a comment, instead of being
24073 called after `//' or `/*' was read.
24074 (copy_comment, copy_definition, parse_union_decl, copy_action)
24075 (copy_guard): Adjust.
24076
24077 2000-10-16 Akim Demaille <akim@epita.fr>
24078
24079 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
24080 `read_signed_integer'.
24081
24082 2000-10-16 Akim Demaille <akim@epita.fr>
24083
24084 * src/reader.c (copy_dollar): New function.
24085 (copy_guard, copy_action): Use it.
24086
24087 2000-10-16 Akim Demaille <akim@epita.fr>
24088
24089 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
24090 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
24091 New files, from Fileutils 4.0.27.
24092 * src/main.c (printable_version): Remove.
24093 * src/lex.c, src/reader.c: Use `quote'.
24094
24095 2000-10-04 Akim Demaille <akim@epita.fr>
24096
24097 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
24098
24099 2000-10-04 Akim Demaille <akim@epita.fr>
24100
24101 * doc/bison.texinfo: Various typos spotted by Neil Booth.
24102
24103 2000-10-04 Akim Demaille <akim@epita.fr>
24104
24105 When a literal string is used to define two different tokens,
24106 `bison -v' segfaults.
24107 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
24108
24109 * tests/regression.m4: New file.
24110 Include the core of the sample provided by Piotr Gackiewicz.
24111 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
24112 properly.
24113
24114 2000-10-04 Akim Demaille <akim@epita.fr>
24115
24116 * src/reader.c (parse_expect_decl): Keep `count' within the size
24117 of `buffer'.
24118 From Neil Booth.
24119
24120 2000-10-02 Paul Eggert <eggert@twinsun.com>
24121
24122 * bison.s1 (yyparse): Assign the default value
24123 unconditionally, to avoid a GCC warning and make the parser a
24124 tad smaller.
24125
24126 2000-10-02 Akim Demaille <akim@epita.fr>
24127
24128 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
24129 options.
24130
24131 2000-10-02 Akim Demaille <akim@epita.fr>
24132
24133 * src/derives.c, src/print.c, src/reduce.c: To ease the
24134 translation, move some `\n' out of the translated strings.
24135
24136 2000-10-02 Akim Demaille <akim@epita.fr>
24137
24138 The location tracking mechanism is precious for parse error
24139 messages. Nevertheless, it is enabled only when `@n' is used in
24140 the grammar, which is a different issue (you can use it in error
24141 message, but not in the grammar per se). Therefore, there should
24142 be another means to enable it.
24143
24144 * src/getargs.c (getargs): Support `--locations'.
24145 (usage): Report it.
24146 * src/getargs.h (locationsflag): Export it.
24147 * src/lex.c (percent_table): Support `%locations'.
24148 * src/reader.c (yylsp_needed): Remove this variable, now replaced
24149 with `locationsflag'.
24150 * doc/bison.texinfo: Document `--locations' and `%locations'.
24151 Sort the options.
24152 * tests/calc.m4: Test it.
24153
24154 For regularity of the names, replace each
24155 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
24156 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
24157 In addition replace each `flag' with `_flag'.
24158
24159 2000-10-02 Akim Demaille <akim@epita.fr>
24160
24161 Also test parse error messages, including with YYERROR_VERBOSE.
24162
24163 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
24164 associative).
24165 Use it to check the computations.
24166 Use it to check `nonassoc' is honored.
24167 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
24168 `--yyerror-verbose'.
24169 (_AT_CHECK_CALC): Adjust to this option.
24170 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
24171
24172 2000-10-02 Akim Demaille <akim@epita.fr>
24173
24174 Test also `--verbose', `--defines' and `--name-prefix'. Testing
24175 the latter demonstrates a flaw in the handling of non debugging
24176 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
24177 was used in order to simplify:
24178
24179 #if YYDEBUG
24180 if (yydebug)
24181 {
24182 ...
24183 }
24184 #endif
24185
24186 into
24187
24188 if (yydebug)
24189 {
24190 ...
24191 }
24192
24193 unfortunately this leads to a CPP conflict when
24194 `--name-prefix=foo' is used since it produces `#define yydebug
24195 foodebug'.
24196
24197 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
24198 (YYDPRINTF): New macro.
24199 Spread its use.
24200 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
24201 the bison options.
24202 Also test `--verbose', `--defines' and `--name-prefix'.
24203
24204 2000-10-02 Akim Demaille <akim@epita.fr>
24205
24206 Improve the readability of the produced parsers.
24207
24208 * src/bison.s1: Formatting changes.
24209 Improve the comment related to the `$' mark.
24210 (yydefault): Don't fall through to `yyresume': `goto' there.
24211 * src/output.c (output_parser): When the `$' is met, skip the end
24212 of its line.
24213 New variable, `number_of_dollar_signs', to check there's exactly
24214 one `$' in the parser skeleton.
24215
24216 2000-10-02 Akim Demaille <akim@epita.fr>
24217
24218 * lib/xstrdup.c: New file, from the fileutils.
24219 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
24220 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
24221 instead of strlen + xmalloc + strcpy.
24222 * src/symtab.c (copys): Remove, use xstrdup instead.
24223
24224 2000-10-02 Akim Demaille <akim@epita.fr>
24225
24226 * src/gram.h (associativity): New enum type which replaces the
24227 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
24228 `right_assoc', `left_assoc' and `non_assoc'.
24229 Adjust all dependencies.
24230 * src/reader.c: Formatting changes.
24231 (LTYPESTR): Don't define it, use it as a literal in
24232 `reader_output_yylsp'.
24233 * src/symtab.h (symbol_class): New enum type which replaces the
24234 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
24235 `sunknown', `stoken and `snterm'.
24236
24237 2000-10-02 Akim Demaille <akim@epita.fr>
24238
24239 * src/getargs.c (fixed_outfiles): Rename as...
24240 (yaccflag): for consistency and accuracy.
24241 Adjust dependencies.
24242
24243 2000-10-02 Akim Demaille <akim@epita.fr>
24244
24245 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
24246 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
24247 difficult and introduced a lot of core dump. It turns out that
24248 Bison used an implementation of `xmalloc' based on `calloc', and
24249 at various places it does depend upon the initialization to 0. I
24250 have not tried to isolate the pertinent places, and all the former
24251 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
24252 someone should address this issue.
24253
24254 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
24255 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
24256 files.
24257 Adjust dependencies.
24258 * src/warshall.h: New file.
24259 Propagate.
24260
24261 2000-10-02 Akim Demaille <akim@epita.fr>
24262
24263 Various anti-`extern in *.c' changes.
24264
24265 * src/system.h: Include `assert.h'.
24266
24267 2000-10-02 Akim Demaille <akim@epita.fr>
24268
24269 * src/state.h (nstates, final_state, first_state, first_shift)
24270 (first_reduction): Move their exportation from here...
24271 * src/LR0.h: to here.
24272 Adjust dependencies.
24273 * src/getargs.c (statisticsflag): New variable.
24274 Add support for `--statistics'.
24275 Adjust dependencies.
24276
24277 Remove a lot of now useless `extern' statements in most files.
24278
24279 2000-10-02 Akim Demaille <akim@epita.fr>
24280
24281 * src/LR0.h: New file.
24282 Propagate its use.
24283
24284 2000-10-02 Akim Demaille <akim@epita.fr>
24285
24286 * src/print.h: New file.
24287 Propagate its use.
24288 * src/print.c: Formatting and ordering changes.
24289 (verbose, terse): Replace with...
24290 (print_results): this new function.
24291 Adjust dependencies.
24292
24293 2000-10-02 Akim Demaille <akim@epita.fr>
24294
24295 * src/conflicts.c (conflict_report): New function.
24296 (conflict_log, verbose_conflict_log): Replace with...
24297 (print_conflicts): this function.
24298 Adjust dependencies.
24299 * src/conflicts.h: New file.
24300 Propagate its inclusion.
24301
24302 2000-10-02 Akim Demaille <akim@epita.fr>
24303
24304 * src/nullable.h: New file.
24305 Propagate its inclusion.
24306 * src/nullable.c: Formatting changes.
24307
24308 2000-10-02 Akim Demaille <akim@epita.fr>
24309
24310 * src/reduce.h: New file.
24311 Propagate its inclusion.
24312 * src/reduce.c: Topological sort and other formatting changes.
24313 (bool, TRUE, FALSE): Move their definition to...
24314 * src/system.h: here.
24315
24316 2000-10-02 Akim Demaille <akim@epita.fr>
24317
24318 * src/files.c: Formatting changes.
24319 (tryopen, tryclose, openfiles): Rename as...
24320 (xfopen, xfclose, open_files): this.
24321 (stringappend): static.
24322 * src/files.h: Complete the list of exported symbols.
24323 Propagate its use.
24324
24325 2000-10-02 Akim Demaille <akim@epita.fr>
24326
24327 * src/reader.h: New file.
24328 Propagate its use instead of tedious list of `extern' and
24329 prototypes.
24330 * src/reader.c: Formatting changes, topological sort,
24331 s/register//.
24332
24333 2000-10-02 Akim Demaille <akim@epita.fr>
24334
24335 * src/lex.h: Prototype `lex.c' exported functions.
24336 * src/reader.c: Adjust.
24337 * src/lex.c: Formatting changes.
24338 (safegetc): Rename as...
24339 (xgetc): this.
24340
24341 2000-10-02 Akim Demaille <akim@epita.fr>
24342
24343 * src/lalr.h: New file.
24344 Propagate its inclusion instead of prototypes and `extern'.
24345 * src/lalr.c: Formatting changes, topological sorting etc.
24346
24347 2000-10-02 Akim Demaille <akim@epita.fr>
24348
24349 * src/output.c (token_actions): Introduce a temporary array,
24350 YYDEFACT, that makes it possible for this function to use
24351 output_short_table.
24352
24353 2000-10-02 Akim Demaille <akim@epita.fr>
24354
24355 `user_toknums' is output as a `short[]' in `output.c', while it is
24356 defined as a `int[]' in `reader.c'. For consistency with the
24357 other output tables, `user_toknums' is now defined as a table of
24358 shorts.
24359
24360 * src/reader.c (user_toknums): Be a short table instead of an int
24361 table.
24362 Adjust dependencies.
24363
24364 Factor the short table outputs.
24365
24366 * src/output.c (output_short_table): New function.
24367 * src/output.c (output_gram, output_stos, output_rule_data)
24368 (output_base, output_table, output_check): Use it.
24369
24370 2000-10-02 Akim Demaille <akim@epita.fr>
24371
24372 * src/output.c (output): Topological sort of the functions, in
24373 order to get rid of the `static' prototypes.
24374 No longer use `register'.
24375 * src/output.h: New file.
24376 Propagate its inclusion in files explicitly prototyping functions
24377 from output.c.
24378
24379 2000-09-21 Akim Demaille <akim@epita.fr>
24380
24381 * src/atgeneral.m4: Update from Autoconf.
24382
24383 2000-09-21 Akim Demaille <akim@epita.fr>
24384
24385 * src/closure.h: New file.
24386 * src/closure.c: Formatting changes, topological sort over the
24387 functions, use of closure.h.
24388 (initialize_closure, finalize_closure): Rename as...
24389 (new_closure, free_closure): these. Adjust dependencies.
24390 * src/LR0.c: Formatting changes, topological sort, use of
24391 cloture.h.
24392 (initialize_states): Rename as...
24393 (new_states): this.
24394 * src/Makefile.am (noinst_HEADERS): Adjust.
24395
24396 2000-09-20 Akim Demaille <akim@epita.fr>
24397
24398 * src/acconfig.h: Don't protect config.h against multiple
24399 inclusion.
24400 Don't define PARAMS.
24401 * src/system.h: Define PARAMS.
24402 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
24403 purpose of config.h. system.h must not try to fix wrong
24404 definitions in config.h.
24405
24406 2000-09-20 Akim Demaille <akim@epita.fr>
24407
24408 * src/derives.h: New file.
24409 * src/main.c, src/derives.h: Use it.
24410 Formatting changes.
24411 * src/Makefile.am (noinst_HEADERS): Adjust.
24412
24413 2000-09-20 Akim Demaille <akim@epita.fr>
24414
24415 * tests/atgeneral.m4: Update from Autoconf.
24416 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
24417 (AT_CHECK_CALC): New macros.
24418 Use these macros to test bison with options `', `--raw',
24419 `--debug', `--yacc', `--yacc --debug'.
24420
24421 2000-09-19 Akim Demaille <akim@epita.fr>
24422
24423 * src/output.c: Formatting changes.
24424 * src/machine.h: Remove, leaving its contents in...
24425 * src/system.h: here.
24426 Include stdio.h.
24427 Adjust all dependencies on stdio.h and machine.h.
24428 * src/getargs.h: New file.
24429 Let all `extern' declarations about getargs.c be replaced with
24430 inclusion of `getargs.h'.
24431 * src/Makefile.am (noinst_HEADERS): Adjust.
24432
24433 * tests/calc.m4 (yyin): Be initialized in main, not on the global
24434 scope.
24435 (yyerror): Returns void, not int.
24436 * doc/bison.texinfo: Formatting changes.
24437
24438 2000-09-19 Akim Demaille <akim@epita.fr>
24439
24440 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
24441 portable.
24442
24443 2000-09-18 Akim Demaille <akim@epita.fr>
24444
24445 * configure.in: Append WARNING_CFLAGS to CFLAGS.
24446 * src/Makefile.am (INCLUDES): Don't.
24447 Be ready to fetch headers in lib/.
24448
24449 2000-09-18 Akim Demaille <akim@epita.fr>
24450
24451 * doc/bison.texinfo: Update the copyright.
24452 ANSIfy and GNUify the examples.
24453 Remove the old menu.
24454
24455 2000-09-18 Akim Demaille <akim@epita.fr>
24456
24457 First set of tests: use the `calc' example from the documentation.
24458
24459 * src/bison.s1 (yyparse): Condition the code using `yytname' which
24460 is defined only when YYDEBUG is.
24461 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
24462 * src/files.c (tryopen, tryclose): Formatting changes.
24463 Move to the top and be static.
24464 * src/reader.c (read_signed_integer): Likewise.
24465 * tests/calc.m4: New file.
24466 * Makefile.am, suite.m4: Adjust.
24467 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
24468
24469 2000-09-18 Akim Demaille <akim@epita.fr>
24470
24471 Add support for an Autotest test suite for Bison.
24472
24473 * m4/m4.m4, m4/atconfig.m4: New files.
24474 * m4/Makefile.am (EXTRA_DIST): Adjust.
24475 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
24476 files.
24477 * src/getargs.c: Display a more standard --version message.
24478 * src/reader.c (reader): Formatting changes.
24479 No longer depend upon VERSION_STRING.
24480 * configure.in: No longer use `dnl'.
24481 Set up the test suite and the new directory `tests/.
24482 (VERSION_STRING): Remove.
24483
24484 2000-04-14 Akim Demaille <akim@epita.fr>
24485
24486 * src/reader.c (copy_comment2): New function, same as former
24487 `copy_comment', but outputs into two FILE *.
24488 (copy_comment): Use it.
24489 (parse_union_decl): Use it.
24490 (get_type, parse_start_decl): Use the same `invalid' message.
24491 (parse_start_decl, parse_union_decl): Use the same `multiple'
24492 message.
24493 (parse_union_decl, copy_guard, copy_action): Use the same
24494 `unmatched' message.
24495 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
24496
24497 2000-03-31 Akim Demaille <akim@epita.fr>
24498
24499 * src/files.c (tryopen, tryclose): Move to the top.
24500 Be static.
24501
24502 2000-03-31 Akim Demaille <akim@epita.fr>
24503
24504 * src/main.c (main): Don't call `done', exit does it.
24505
24506 2000-03-31 Akim Demaille <akim@epita.fr>
24507
24508 * allocate.c: s/return (foo)/return foo/.
24509 * lalr.c: Likewise.
24510 * LR0.c: Likewise.
24511 * output.c: Likewise.
24512 * reader.c: Likewise.
24513 * symtab.c: Likewise.
24514 * vmsgetargs.c: Likewise.
24515
24516 2000-03-31 Akim Demaille <akim@epita.fr>
24517
24518 Clean up the error reporting functions.
24519
24520 * src/report.c: New file.
24521 * src/report.h: Likewise.
24522 * src/Makefile.am: Adjust.
24523 * m4/error.m4: New file.
24524 * m4/Makefile.am: Adjust.
24525 * configure.in (jm_PREREQ_ERROR): Call it.
24526 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
24527 Remove.
24528 (fatal, fatals): Remove. All callers use complain.c::fatal.
24529 (warn, warni, warns, warnss, warnss): Remove. All callers use
24530 complain.c::complain.
24531 (toomany): Remove, use fatal instead.
24532 * src/files.c (done): No argument, use complain_message_count.
24533 * src/main.c (main): Register `done' to `atexit'.
24534
24535 * src/getargs.c (usage): More `fputs', less `fprintf'.
24536
24537 2000-03-28 Akim Demaille <akim@epita.fr>
24538
24539 * lib/: New directory.
24540 * Makefile.am (SUBDIRS): Adjust.
24541 * configure.in: Adjust.
24542 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
24543 useless.
24544 * src/alloca.c: Moved to lib/.
24545 * src/getopt.c: Likewise.
24546 * src/getopt1.c: Likewise.
24547 * src/getopt.h: Likewise.
24548 * src/ansi2knr.c: Likewise.
24549 * src/ansi2knr.1: Likewise.
24550 * src/Makefile.am: Adjust.
24551 * lib/Makefile.am: New file.
24552
24553 2000-03-28 Akim Demaille <akim@epita.fr>
24554
24555 * src/getargs.c (usage): Refresh the help message.
24556
24557 2000-03-17 Akim Demaille <akim@epita.fr>
24558
24559 * src/getopt1.c: Updated from textutils 2.0e
24560 * src/getopt.c: Likewise.
24561 * src/getopt.h: Likewise.
24562
24563 2000-03-17 Akim Demaille <akim@epita.fr>
24564
24565 * src/Makefile.am (bison.simple): Fix the awk program: quote only
24566 the file name, not the whole `#line LINE FILE'.
24567
24568 2000-03-17 Akim Demaille <akim@epita.fr>
24569
24570 On syntax errors, report the token on which we choked.
24571
24572 * src/bison.s1 (yyparse): In the label yyerrlab, when
24573 YYERROR_VERBOSE, add yychar in msg.
24574
24575 2000-03-17 Akim Demaille <akim@epita.fr>
24576
24577 * src/reader.c (copy_at): New function.
24578 (copy_guard): Use it.
24579 (copy_action): Use it.
24580
24581 2000-03-17 Akim Demaille <akim@epita.fr>
24582
24583 Be kind to translators, save some useless translations.
24584
24585 * src/main.c (banner): New function.
24586 (fatal_banner): Use it.
24587 (warn_banner): Use it.
24588
24589 2000-03-17 Akim Demaille <akim@epita.fr>
24590
24591 * src/reader.c (copy_definition): Use copy_string and
24592 copy_comment. Removed now unused `match', `ended',
24593 `cplus_comment'.
24594 (copy_comment, copy_string): Moved, to be visible from
24595 copy_definition.
24596
24597 2000-03-17 Akim Demaille <akim@epita.fr>
24598
24599 * src/reader.c (copy_string): Declare `static inline'. No
24600 problems with inline, since it is checked by configure.
24601 (copy_comment): Likewise.
24602
24603 2000-03-17 Akim Demaille <akim@epita.fr>
24604
24605 * src/reader.c (packsymbols): Formatting changes.
24606
24607 2000-03-17 Akim Demaille <akim@epita.fr>
24608
24609 * src/reader.c (copy_comment): New function, factored out from:
24610 (copy_action): Use it. Removed now unused `match', `ended',
24611 `cplus_comment'.
24612 (copy_guard): Likewise.
24613
24614 2000-03-17 Akim Demaille <akim@epita.fr>
24615
24616 * src/reader.c (copy_string): New function, factored out from:
24617 (copy_action): Use it.
24618 (copy_guard): Likewise.
24619
24620 2000-03-17 Akim Demaille <akim@epita.fr>
24621
24622 Change the handling of @s so that they behave exactly like $s.
24623 There is now a pseudo variable @$ (readble and writable), location
24624 of the lhs of the rule (by default ranging from the location of
24625 the first symbol of the rhs, to the location of the last symbol,
24626 or, if the rhs is empty, YYLLOC).
24627
24628 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
24629 yyval.
24630 (yyparse): When providing a default semantic action, provide a
24631 default location action.
24632 (after the $): No longer change `*YYLSP', just stack YYLOC the
24633 same way you stack YYVAL.
24634 * src/reader.c (read_declarations): Use warns.
24635 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
24636 (copy_action, case '@'): Likewise.
24637 Use a standard error message, to save useless work from
24638 translators.
24639
24640 2000-03-17 Akim Demaille <akim@epita.fr>
24641
24642 * src/bison.s1: Formatting and cosmetics changes.
24643 * src/reader.c: Likewise.
24644 Update the Copyright notice.
24645
24646 2000-03-17 Akim Demaille <akim@epita.fr>
24647
24648 * src/bison.s1 (#line): All set to `#line' only, since the
24649 Makefile now handles them.
24650
24651 2000-03-16 Akim Demaille <akim@epita.fr>
24652
24653 * src/output.c (output_rule_data): Output the documentation of
24654 some of the tables.
24655 (Copyright notice): Update.
24656 Formatting changes.
24657
24658 2000-03-16 Akim Demaille <akim@epita.fr>
24659
24660 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
24661 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
24662 One `#if YYDEBUG' remains, since it uses variables which are
24663 defined only if `YYDEBUG != 0'.
24664
24665 2000-03-16 Akim Demaille <akim@epita.fr>
24666
24667 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
24668 and related variables so that the similarities are highlighted.
24669
24670 2000-03-16 Akim Demaille <akim@epita.fr>
24671
24672 * src/bison.s1: Properly indent CPP directives.
24673
24674 2000-03-16 Akim Demaille <akim@epita.fr>
24675
24676 * src/bison.s1: Properly indent the `alloca' CPP section.
24677
24678 2000-03-16 Akim Demaille <akim@epita.fr>
24679
24680 Do not hard code values of directories in `configure.in'.
24681 Update the `configure' tool chain.
24682
24683 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
24684 src/makefile.am.
24685 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
24686 (AC_OUTPUT): Add m4/Makefile.
24687 Bump to bison 1.28a, 1.29 has never been released.
24688 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
24689 handled via src/Makefile.am.
24690 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
24691 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
24692 autoheader.
24693 * Makefile.am (SUBDIRS): Add m4.
24694 (ACLOCAL_AM_FLAGS): New variable.
24695 (AUTOMAKE_OPTIONS): Add check-news.
24696 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
24697 the proper line number and file name.
24698 (DEFS): Propagate the location of bison library files and of the
24699 locale files.
24700 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
24701 builddir.
24702 * acinclude.m4: Remove, replaced by the directory m4.
24703 * m4/Makefile.am (EXTRA_DIST): New variable.
24704 * m4/gettext.m4: New file, from the fileutils.
24705 * m4/lcmessage.m4: Likewise
24706 * m4/progtest.m4: Likewise.
24707 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
24708
24709 2000-03-10 Akim Demaille <akim@epita.fr>
24710
24711 * src/closure.c:
24712 Formatting changes of various comments.
24713 Respect the GNU coding standards at various places.
24714 Don't use `_()' when no translation is needed.
24715
24716 1999-12-13 Jesse Thilo <jthilo@gnu.org>
24717
24718 * src/files.c:
24719 OS/2 honors TMPDIR environment variable.
24720
24721 1999-12-13 Jesse Thilo <jthilo@gnu.org>
24722
24723 * doc/bison.texinfo: Tweaked spelling and grammar.
24724 Updated ISBN.
24725 Removed reference to price of printed copy.
24726 Mention BISON_SIMPLE and BISON_HAIRY.
24727
24728 1999-12-13 Jesse Thilo <jthilo@gnu.org>
24729
24730 * configure.in, NEWS:
24731 Bison 1.29 released.
24732
24733 1999-10-27 Jesse Thilo <jthilo@gnu.org>
24734
24735 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
24736 Added reference card.
24737
24738 1999-07-26 Jesse Thilo <jthilo@gnu.org>
24739
24740 * po/ru.po: Added Russian translation.
24741
24742 1999-07-26 Jesse Thilo <jthilo@gnu.org>
24743
24744 * configure.in: Added Russian translation.
24745
24746 1999-07-06 Jesse Thilo <jthilo@gnu.org>
24747
24748 * configure.in, NEWS, README:
24749 Released version 1.28.
24750
24751 1999-06-14 Jesse Thilo <jthilo@gnu.org>
24752
24753 * src/system.h:
24754 Squashed redefinition warning on some systems.
24755
24756 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
24757 Have configure build version string instead of relying on ANSI string
24758 concatentation.
24759
24760 1999-06-14 Jesse Thilo <jthilo@gnu.org>
24761
24762 * po/POTFILES.in: Got rid of version.c.
24763
24764 1999-06-14 Jesse Thilo <jthilo@gnu.org>
24765
24766 * acconfig.h, configure.in:
24767 Have configure build version string instead of relying on ANSI string
24768 concatentation.
24769
24770 1999-06-08 Jesse Thilo <jthilo@gnu.org>
24771
24772 * doc/bison.1:
24773 Dropped mention of `+' for long-named options.
24774
24775 1999-05-30 Jesse Thilo <jthilo@gnu.org>
24776
24777 * src/files.c: Added <unistd.h> for unlink().
24778
24779 * src/Makefile.am, src/system.h:
24780 I18n fixes.
24781
24782 1999-05-30 Jesse Thilo <jthilo@gnu.org>
24783
24784 * README: Added a FAQ list.
24785
24786 * configure.in, acconfig.h:
24787 I18n fixes.
24788
24789 1999-05-30 Jesse Thilo <jthilo@gnu.org>
24790
24791 * doc/FAQ, doc/Makefile.am:
24792 Added a FAQ list.
24793
24794 1999-05-19 Jesse Thilo <jthilo@gnu.org>
24795
24796 * src/alloc.h, src/symtab.h, src/version.c:
24797 Protected inclusion of "config.h" with HAVE_CONFIG_H.
24798
24799 1999-04-18 Jesse Thilo <jthilo@gnu.org>
24800
24801 * src/.cvsignore, src/Makefile.am:
24802 Reorganized: sources in `src', documentation in `doc'.
24803
24804 * src/lex.c (literalchar):
24805 fixed the code for escaping double quotes (thanks
24806 Jonathan Czisny.)
24807
24808 1999-04-18 Jesse Thilo <jthilo@gnu.org>
24809
24810 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
24811 Adjusted paths to reflect directory reorganization.
24812
24813 1999-04-18 Jesse Thilo <jthilo@gnu.org>
24814
24815 * doc/.cvsignore, doc/Makefile.am:
24816 Reorganized: sources in `src', documentation in `doc'.
24817
24818 1999-04-18 Jesse Thilo <jthilo@gnu.org>
24819
24820 * configure.in:
24821 Updated AC_INIT file to reflect directory reorganization.
24822
24823 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
24824 Reorganized: sources in `src', documentation in `doc'.
24825
24826 1999-04-13 Jesse Thilo <jthilo@gnu.org>
24827
24828 * src/allocate.c:
24829 Don't declare calloc() and realloc() if not necessary.
24830
24831 1999-04-13 Jesse Thilo <jthilo@gnu.org>
24832
24833 * configure.in, acconfig.h, acinclude.m4:
24834 Don't declare calloc() and realloc() if not necessary.
24835
24836 1999-03-23 Jesse Thilo <jthilo@gnu.org>
24837
24838 * po/.cvsignore: Added i18n support.
24839
24840 1999-03-23 Jesse Thilo <jthilo@gnu.org>
24841
24842 * acconfig.h, configure.in, Makefile.am:
24843 Added i18n support.
24844
24845 1999-03-22 Jesse Thilo <jthilo@gnu.org>
24846
24847 * src/bison.s1: Fixed #line numbers.
24848
24849 1999-03-15 Jesse Thilo <jthilo@gnu.org>
24850
24851 * po/es.po, po/fr.po, po/nl.po, po/de.po:
24852 Added PO files from Translation Project.
24853
24854 1999-03-03 Jesse Thilo <jthilo@gnu.org>
24855
24856 * Makefile.am:
24857 Added support for non-ANSI compilers (ansi2knr).
24858
24859 1999-02-16 Jesse Thilo <jthilo@gnu.org>
24860
24861 * configure.in: Bumped version number to 1.27.
24862
24863 * Makefile.am:
24864 Added `bison.simple' to list of files removed by `make distclean'.
24865
24866 1999-02-12 Jesse Thilo <jthilo@gnu.org>
24867
24868 * src/files.c, src/files.h:
24869 Defined locations of parser files in config.h instead of Makefile.
24870
24871 1999-02-12 Jesse Thilo <jthilo@gnu.org>
24872
24873 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
24874 Defined locations of parser files in config.h instead of Makefile.
24875
24876 1999-02-09 Jesse Thilo <jthilo@gnu.org>
24877
24878 * Makefile.am:
24879 Removed inappropriate use of $< macro.
24880
24881 1999-02-05 Jesse Thilo <jthilo@gnu.org>
24882
24883 * po/Makefile.in.in, po/POTFILES.in:
24884 Add `po' directory skeleton.
24885
24886 1999-01-27 Jesse Thilo <jthilo@gnu.org>
24887
24888 * README: Document help-bison list.
24889
24890 * configure.in: Add check for mkstemp().
24891
24892 1999-01-20 Jesse Thilo <jthilo@gnu.org>
24893
24894 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
24895 Hush a few compiler warnings.
24896
24897 * src/files.c:
24898 Add tryclose(), which verifies that fclose was successful.
24899 Hush a couple of compiler warnings.
24900
24901 1999-01-20 Jesse Thilo <jthilo@gnu.org>
24902
24903 * Makefile.am, OChangeLog:
24904 ChangeLog is now automatically generated. Include the old version as
24905 OChangeLog.
24906
24907 1999-01-14 Jesse Thilo <jthilo@gnu.org>
24908
24909 * 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:
24910 Update FSF address.
24911
24912 1999-01-14 Jesse Thilo <jthilo@gnu.org>
24913
24914 * doc/bison.texinfo: Fix formatting glitch.
24915
24916 * doc/bison.texinfo: Update FSF address.
24917
24918 1999-01-14 Jesse Thilo <jthilo@gnu.org>
24919
24920 * acconfig.h: Update FSF address.
24921
24922 1999-01-08 Jesse Thilo <jthilo@gnu.org>
24923
24924 * src/system.h:
24925 Don't define PACKAGE here, since config.h defines it.
24926
24927 1998-12-30 Jesse Thilo <jthilo@gnu.org>
24928
24929 * src/reader.c: Update copyright date.
24930
24931 * src/main.c:
24932 Ditch sprintf to statically-sized buffers in fatal/warn functions in
24933 favor of output directly to stderr (avoids buffer overruns).
24934
24935 * src/reader.c: Some checks for premature EOF.
24936
24937 * 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:
24938 Use prototypes if the compiler understands them.
24939
24940 * src/files.c: Honor TMPDIR on Unix hosts.
24941 Use prototypes if the compiler understands them.
24942
24943 * src/reader.c:
24944 Fix a couple of buffer overrun bugs.
24945 Use prototypes if the compiler understands them.
24946
24947 * src/system.h: Include unistd.h and ctype.h.
24948 Use #ifdef instead of #if for NLS symbols.
24949
24950 1998-12-30 Jesse Thilo <jthilo@gnu.org>
24951
24952 * doc/bison.texinfo:
24953 Delete comment "consider using @set for edition number, etc..." since
24954 we now are doing so.
24955
24956 1998-12-30 Jesse Thilo <jthilo@gnu.org>
24957
24958 * configure.in:
24959 Use prototypes if the compiler understands them.
24960
24961 * NEWS: Document 1.26 highlights.
24962
24963 * Makefile.am: Require Automake 1.3 or later.
24964
24965 * acconfig.h:
24966 Use prototypes if the compiler understands them.
24967
24968 1998-12-29 Jesse Thilo <jthilo@gnu.org>
24969
24970 * src/version.c:
24971 Use VERSION symbol from automake for version number.
24972
24973 1998-12-29 Jesse Thilo <jthilo@gnu.org>
24974
24975 * acconfig.h, configure.in, version.cin:
24976 Use VERSION symbol from automake for version number.
24977
24978 1998-11-28 Jesse Thilo <jthilo@gnu.org>
24979
24980 * Makefile.am:
24981 Distribute original version of simple parser (bison.s1), not built
24982 version (bison.simple).
24983
24984 1998-11-28 Jesse Thilo <jthilo@gnu.org>
24985
24986 * doc/bison.texinfo: Add info dir entry.
24987
24988 * doc/bison.texinfo:
24989 Let automake put version number into documentation.
24990
24991 1998-11-26 Jesse Thilo <jthilo@gnu.org>
24992
24993 * src/bison.cld, src/build.com, src/vmshlp.mar:
24994 Add non-RCS files from /gd/gnu/bison.
24995
24996 1998-11-26 Jesse Thilo <jthilo@gnu.org>
24997
24998 * doc/bison.1:
24999 Document the BISON_HAIRY and BISON_SIMPLE variables.
25000
25001 1998-11-25 Jesse Thilo <jthilo@gnu.org>
25002
25003 * src/version.c: Build version.c automatically.
25004
25005 * src/reader.c:
25006 Fix token numbering (used to start at 258, not 257).
25007
25008 * src/system.h: Include config.h.
25009
25010 * src/getargs.c: Update bug report address.
25011
25012 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
25013 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
25014
25015 1998-11-25 Jesse Thilo <jthilo@gnu.org>
25016
25017 * Makefile.am:
25018 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
25019
25020 * configure.in, version.cin:
25021 Build version.c automatically.
25022
25023 * AUTHORS: Add AUTHORS file.
25024
25025 * README: Update bug report address.
25026
25027 * bison.simple:
25028 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
25029
25030 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
25031 Add automake stuff.
25032
25033 1998-11-25 Jesse Thilo <jthilo@gnu.org>
25034
25035 * doc/bison.texinfo: Clean up some formatting.
25036
25037 1998-05-05 Richard Stallman <rms@gnu.org>
25038
25039 * doc/bison.texinfo:
25040 Explain better why to make a pure parser.
25041
25042 1998-01-05 Richard Stallman <rms@gnu.org>
25043
25044 * src/files.c (openfiles):
25045 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
25046 find a temporary directory, if possible. Do not unlink files while
25047 they are open.
25048
25049 1997-08-25 Richard Stallman <rms@gnu.org>
25050
25051 * src/reader.c (stack_offset;):
25052 Change some warni to warns.
25053
25054 * src/lex.c (literalchar): Use warns, not warni.
25055
25056 1997-06-28 Richard Stallman <rms@gnu.org>
25057
25058 * src/bison.s1: Add a Bison version comment.
25059
25060 * src/main.c (fatal, warn, berror):
25061 Use program_name.
25062
25063 1997-06-28 Richard Stallman <rms@gnu.org>
25064
25065 * Makefile.in (bison_version): New variable.
25066 (dist): Use that variable.
25067 (bison.s1): Substitute the Bison version into bison.simple.
25068
25069 * bison.simple: Add a Bison version comment.
25070
25071 1997-06-18 Richard Stallman <rms@gnu.org>
25072
25073 * src/main.c (fatal, warn, berror):
25074 Make error messages standard.
25075 (toomany): Improve error message text.
25076
25077 * 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:
25078 new.h renamed to alloc.h.
25079
25080 1997-06-18 Richard Stallman <rms@gnu.org>
25081
25082 * Makefile.in: new.h renamed to alloc.h.
25083
25084 1997-05-24 Richard Stallman <rms@gnu.org>
25085
25086 * src/lex.c (literalchar):
25087 Fix the code for escaping \, " and '.
25088
25089 (lex): Avoid trouble when there are many chars
25090 to discard in a char literal with just several chars in it.
25091
25092 1997-05-17 Richard Stallman <rms@gnu.org>
25093
25094 * src/bison.s1:
25095 Use malloc, if using alloca is troublesome.
25096 (YYSTACK_USE_ALLOCA): New flag macro.
25097 Define it for some systems and compilers.
25098 (YYSTACK_ALLOC): New macro.
25099 (yyparse): Use YYSTACK_ALLOC to allocate stack.
25100 If it was malloc'd, free it.
25101
25102 1997-05-17 Richard Stallman <rms@gnu.org>
25103
25104 * bison.simple:
25105 Use malloc, if using alloca is troublesome.
25106 (YYSTACK_USE_ALLOCA): New flag macro.
25107 Define it for some systems and compilers.
25108 (YYSTACK_ALLOC): New macro.
25109 (yyparse): Use YYSTACK_ALLOC to allocate stack.
25110 If it was malloc'd, free it.
25111
25112 1997-04-23 Richard Stallman <rms@gnu.org>
25113
25114 * src/bison.s1:
25115 (alloca) [__hpux]: Always define as __builtin_alloca.
25116
25117 1997-04-23 Richard Stallman <rms@gnu.org>
25118
25119 * bison.simple:
25120 (alloca) [__hpux]: Always define as __builtin_alloca.
25121
25122 1997-04-22 Richard Stallman <rms@gnu.org>
25123
25124 * src/bison.s1:
25125 [__hpux]: Include alloca.h (right for HPUX 10)
25126 instead of declaring alloca (right for HPUX 9).
25127
25128 * src/bison.s1 (__yy_memcpy):
25129 Declare arg `count' as unsigned int.
25130 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
25131
25132 1997-04-22 Richard Stallman <rms@gnu.org>
25133
25134 * bison.simple:
25135 [__hpux]: Include alloca.h (right for HPUX 10)
25136 instead of declaring alloca (right for HPUX 9).
25137
25138 * bison.simple (__yy_memcpy):
25139 Declare arg `count' as unsigned int.
25140 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
25141
25142 1997-01-03 Richard Stallman <rms@gnu.org>
25143
25144 * src/allocate.c: [__STDC__ or _MSC_VER]:
25145 Declare calloc and realloc to return void *.
25146
25147 1997-01-02 Richard Stallman <rms@gnu.org>
25148
25149 * src/system.h:
25150 [_MSC_VER]: Include stdlib.h and process.h.
25151 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
25152
25153 * src/main.c (main): Return FAILURE as a value.
25154 (printable_version): Declare arg as int, not char.
25155
25156 1997-01-02 Richard Stallman <rms@gnu.org>
25157
25158 * Makefile.in (dist):
25159 Explicitly check for symlinks, and copy them.
25160
25161 1996-12-19 Richard Stallman <rms@gnu.org>
25162
25163 * src/files.c:
25164 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
25165
25166 1996-12-18 Paul Eggert <eggert@gnu.org>
25167
25168 * src/bison.s1 (yyparse):
25169 If __GNUC__ and YYPARSE_PARAM are both defined,
25170 declare yyparse to have a void * argument.
25171
25172 1996-12-18 Paul Eggert <eggert@gnu.org>
25173
25174 * bison.simple (yyparse):
25175 If __GNUC__ and YYPARSE_PARAM are both defined,
25176 declare yyparse to have a void * argument.
25177
25178 1996-12-17 Richard Stallman <rms@gnu.org>
25179
25180 * src/reduce.c (nbits): Add some casts.
25181
25182 1996-08-12 Richard Stallman <rms@gnu.org>
25183
25184 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
25185
25186 1996-08-12 Richard Stallman <rms@gnu.org>
25187
25188 * bison.simple: Test _MSDOS as well as _MSDOS_.
25189
25190 1996-07-31 Richard Stallman <rms@gnu.org>
25191
25192 * src/bison.s1:
25193 [__sun && __i386]: Include alloca.h.
25194
25195 1996-07-31 Richard Stallman <rms@gnu.org>
25196
25197 * bison.simple:
25198 [__sun && __i386]: Include alloca.h.
25199
25200 1996-07-30 Richard Stallman <rms@gnu.org>
25201
25202 * src/bison.s1: Comment change.
25203
25204 * src/bison.s1: Test _MSDOS_, not MSDOS.
25205
25206 1996-07-30 Richard Stallman <rms@gnu.org>
25207
25208 * bison.simple: Comment change.
25209
25210 * bison.simple: Test _MSDOS_, not MSDOS.
25211
25212 1996-06-01 Richard Stallman <rms@gnu.org>
25213
25214 * 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:
25215 Insert `_' macro around many string constants.
25216
25217 * src/main.c:
25218 Insert `_' macro around many string constants.
25219
25220 (main): Call setlocale, bindtextdomain and textdomain.
25221
25222 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
25223 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
25224 [ENABLE_NLS]: Include libintl.h.
25225 [ENABLE_NLS] (gettext): Define.
25226 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
25227 (N_, PACKAGE, LOCALEDIR): New macros.
25228
25229 1996-06-01 Richard Stallman <rms@gnu.org>
25230
25231 * POTFILES.in: New file.
25232
25233 * Makefile.in (allocate.o):
25234 Define target explicitly.
25235
25236 * Makefile.in (CFLAGS): Set to @CFLAGS@.
25237 (LDFLAGS): Set to @LDFLAGS@.
25238 (configure): Run autoconf only if preceding `cd' succeeds.
25239 (bison.s1): Redirect output to temporary file then move the
25240 temporary to the target, rather than redirecting directly to bison.s1.
25241 (clean): Remove config.status and config.log.
25242 (distclean): Don't remove config.status here.
25243
25244 1996-05-12 Richard Stallman <rms@gnu.org>
25245
25246 * src/bison.s1:
25247 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
25248
25249 1996-05-12 Richard Stallman <rms@gnu.org>
25250
25251 * bison.simple:
25252 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
25253
25254 1996-05-11 Richard Stallman <rms@gnu.org>
25255
25256 * src/bison.s1 (__yy_memcpy):
25257 Really reorder the args, as was supposedly done on Feb 14 1995.
25258 (yyparse): Calls changed accordingly.
25259
25260 1996-05-11 Richard Stallman <rms@gnu.org>
25261
25262 * Makefile.in (dist): Don't use $(srcdir).
25263
25264 * bison.simple (__yy_memcpy):
25265 Really reorder the args, as was supposedly done on Feb 14 1995.
25266 (yyparse): Calls changed accordingly.
25267
25268 1996-01-27 Richard Stallman <rms@gnu.org>
25269
25270 * src/output.c (output_rule_data):
25271 Test YYERROR_VERBOSE in the conditional
25272 around the definition of ttyname.
25273
25274 1995-12-29 Richard Stallman <rms@gnu.org>
25275
25276 * src/bison.s1:
25277 Fix line numbers in #line commands.
25278
25279 1995-12-29 Richard Stallman <rms@gnu.org>
25280
25281 * bison.simple:
25282 Fix line numbers in #line commands.
25283
25284 1995-12-27 Richard Stallman <rms@gnu.org>
25285
25286 * src/bison.s1 (YYPARSE_PARAM_DECL):
25287 In C++, make it always null.
25288 (YYPARSE_PARAM_ARG): New macro.
25289 (yyparse): Use YYPARSE_PARAM_ARG.
25290
25291 1995-12-27 Richard Stallman <rms@gnu.org>
25292
25293 * bison.simple (YYPARSE_PARAM_DECL):
25294 In C++, make it always null.
25295 (YYPARSE_PARAM_ARG): New macro.
25296 (yyparse): Use YYPARSE_PARAM_ARG.
25297
25298 1995-11-29 Richard Stallman <rms@gnu.org>
25299
25300 * doc/bison.texinfo:
25301 Describe literal string tokens, %raw, %no_lines, %token_table.
25302
25303 1995-11-29 Daniel Hagerty <hag@gnu.org>
25304
25305 * doc/bison.texinfo: Fixed update date
25306
25307 1995-10-16 Richard Stallman <rms@gnu.org>
25308
25309 * src/version.c: Version 1.25.
25310
25311 1995-10-16 Richard Stallman <rms@gnu.org>
25312
25313 * NEWS: *** empty log message ***
25314
25315 1995-10-16 Richard Stallman <rms@gnu.org>
25316
25317 * doc/bison.1, doc/bison.rnh:
25318 Add new options.
25319
25320 1995-10-15 Richard Stallman <rms@gnu.org>
25321
25322 * src/vmsgetargs.c, src/getargs.c:
25323 Added -n, -k, and -raw switches.
25324 (noparserflag, toknumflag, rawtoknumflag): New variables.
25325
25326 * src/symtab.h (SALIAS):
25327 New #define for adding aliases to %token.
25328 (struct bucket): Added `alias' field.
25329
25330 * src/reduce.c (reduce_grammar):
25331 Revise error message.
25332 (print_notices): Remove final `.' from error message.
25333
25334 * src/reader.c (reader_output_yylsp):
25335 New function.
25336 (readgram): Use `#if 0' around code that accepted %command
25337 inside grammar rules: The documentation doesn't allow it,
25338 and it will fail since the %command processors scan for the next %.
25339 (parse_token_decl): Extended the %token
25340 declaration to allow a multi-character symbol as an alias.
25341 (parse_thong_decl): New function.
25342 (read_declarations): Added %thong declarations.
25343 (read_declarations): Handle NOOP to deal with allowing
25344 % declarations as another means to specify the flags.
25345 (readgram): Allow %prec prior to semantics embedded in a rule.
25346 (skip_to_char, read_declarations, copy_definition)
25347 (parse_token_decl, parse_start_decl, parse_type_decl)
25348 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
25349 (get_type_name, copy_guard, copy_action, readgram)
25350 (get_type, packsymbols): Revised most error messages.
25351 Changed `fatal' to `warnxxx' to avoid aborting for error.
25352 Revised and use multiple warnxxx functions to avoid using VARARGS1.
25353 (read_declarations): Improve the error message for
25354 an invalid character. Do not abort.
25355 (read_declarations, copy_guard, copy_action): Use
25356 printable_version to avoid unprintable characters in printed output.
25357 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
25358 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
25359 Allow the type of a non-terminal can be given
25360 more than once, as long as all specifications give the same type.
25361
25362 * src/output.c:
25363 (output_headers, output_trailers, output, output_gram)
25364 (output_rule_data): Implement noparserflag variable.
25365 Implement toknumflag variable.
25366 (output): Call reader_output_yylsp to output LTYPESTR.
25367
25368 * src/main.c (main):
25369 If reader sees an error, don't process the grammar.
25370 (fatals): Updated to not use VARARGS1.
25371 (printable_version, int_to_string, warn, warni, warns, warnss)
25372 (warnsss): New error reporting functions. Avoid abort for error.
25373
25374 * src/lex.h:
25375 Added THONG and NOOP for alias processing.
25376 Added SETOPT for the new code that allows setting options with %flags.
25377
25378 * src/lex.c:
25379 Include getopt.h. Add some extern decls.
25380 (safegetc): New function to deal with EOF gracefully.
25381 (literalchar); new function to deal with reading \ escapes.
25382 (lex): Use literalchar.
25383 (lex): Implemented "..." tokens.
25384 (literalchar, lex, parse_percent_token): Made tokenbuffer
25385 always contain the token. This includes growing the token
25386 buffer while reading an integer.
25387 (parse_percent_token): Replaced if-else statement with percent_table.
25388 (parse_percent_token): Added % declarations as another
25389 way to specify the flags -n, -l, and -r. Also added hooks for
25390 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
25391 major changes to files.c.
25392 (lex) Retain in the incoming stream a character following
25393 an incorrect '/'.
25394 (skip_white_space, lex): Revised most error messages
25395 and changed fatal to warn to avoid aborting.
25396 (percent_table): Added %thong declarations.
25397
25398 * src/gram.h: Comment changes.
25399
25400 * src/files.c (openfiles, open_extra_files, done):
25401 Add faction flag
25402 and actfile file. Handle noparserflag. Both for -n switch.
25403
25404 * src/conflicts.c (resolve_sr_conflict):
25405 Remove use of alloca.
25406
25407 1995-06-01 Jim Meyering <meyering@gnu.org>
25408
25409 * doc/bison.texinfo: *** empty log message ***
25410
25411 1995-05-06 Richard Stallman <rms@gnu.org>
25412
25413 * src/bison.s1: Comment change.
25414
25415 1995-05-06 Richard Stallman <rms@gnu.org>
25416
25417 * bison.simple: Comment change.
25418
25419 1995-05-03 Richard Stallman <rms@gnu.org>
25420
25421 * src/version.c: Version now 1.24.
25422
25423 * src/bison.s1: Change distribution terms.
25424
25425 * src/version.c: Version now 1.23.
25426
25427 1995-05-03 Richard Stallman <rms@gnu.org>
25428
25429 * doc/bison.texinfo:
25430 Rewrite "Conditions for Using Bison".
25431 Update version to 1.24.
25432
25433 1995-05-03 Richard Stallman <rms@gnu.org>
25434
25435 * bison.simple: Change distribution terms.
25436
25437 1995-02-23 Richard Stallman <rms@gnu.org>
25438
25439 * src/files.c: Test __VMS_POSIX as well as VMS.
25440
25441 1995-02-14 Jim Meyering <meyering@gnu.org>
25442
25443 * src/bison.s1 (__yy_memcpy):
25444 Renamed from __yy_bcopy to avoid
25445 confusion. Reverse FROM and TO arguments to be consistent with
25446 those of memcpy.
25447
25448 1995-02-14 Jim Meyering <meyering@gnu.org>
25449
25450 * bison.simple (__yy_memcpy):
25451 Renamed from __yy_bcopy to avoid
25452 confusion. Reverse FROM and TO arguments to be consistent with
25453 those of memcpy.
25454
25455 1994-11-10 David J. MacKenzie <djm@gnu.org>
25456
25457 * NEWS: reformat
25458
25459 * NEWS: New file.
25460
25461 * Makefile.in (DISTFILES): Include NEWS.
25462
25463 * Makefile.in (DISTFILES):
25464 Include install-sh, not install.sh.
25465
25466 * configure.in: Update to Autoconf v2 macro names.
25467
25468 1994-10-05 David J. MacKenzie <djm@gnu.org>
25469
25470 * Makefile.in: fix typo
25471
25472 * Makefile.in (prefix, exec_prefix):
25473 Let configure set them.
25474
25475 1994-09-28 David J. MacKenzie <djm@gnu.org>
25476
25477 * Makefile.in: Set datadir to $(prefix)/share.
25478
25479 1994-09-15 Richard Stallman <rms@gnu.org>
25480
25481 * src/bison.s1:
25482 Update copyright notice and GPL version.
25483
25484 1994-09-15 Richard Stallman <rms@gnu.org>
25485
25486 * bison.simple:
25487 Update copyright notice and GPL version.
25488
25489 1994-07-12 Richard Stallman <rms@gnu.org>
25490
25491 * src/reduce.c, src/reader.c:
25492 entered into RCS
25493
25494 1994-05-05 David J. MacKenzie <djm@gnu.org>
25495
25496 * Makefile.in: entered into RCS
25497
25498 1994-03-26 Richard Stallman <rms@gnu.org>
25499
25500 * src/bison.s1: entered into RCS
25501
25502 1994-03-26 Richard Stallman <rms@gnu.org>
25503
25504 * bison.simple: entered into RCS
25505
25506 1994-03-25 Richard Stallman <rms@gnu.org>
25507
25508 * src/main.c: entered into RCS
25509
25510 1994-03-24 Richard Stallman <rms@gnu.org>
25511
25512 * src/conflicts.c: entered into RCS
25513
25514 1994-01-02 Richard Stallman <rms@gnu.org>
25515
25516 * Makefile.in: *** empty log message ***
25517
25518 1993-11-21 Richard Stallman <rms@gnu.org>
25519
25520 * src/bison.s1: *** empty log message ***
25521
25522 1993-11-21 Richard Stallman <rms@gnu.org>
25523
25524 * doc/bison.texinfo: entered into RCS
25525
25526 * doc/bison.texinfo: *** empty log message ***
25527
25528 1993-11-21 Richard Stallman <rms@gnu.org>
25529
25530 * bison.simple: *** empty log message ***
25531
25532 1993-10-25 David J. MacKenzie <djm@gnu.org>
25533
25534 * doc/bison.texinfo: *** empty log message ***
25535
25536 1993-10-19 Richard Stallman <rms@gnu.org>
25537
25538 * src/bison.s1: *** empty log message ***
25539
25540 1993-10-19 Richard Stallman <rms@gnu.org>
25541
25542 * bison.simple: *** empty log message ***
25543
25544 1993-10-14 Richard Stallman <rms@gnu.org>
25545
25546 * src/bison.s1: *** empty log message ***
25547
25548 1993-10-14 Richard Stallman <rms@gnu.org>
25549
25550 * bison.simple: *** empty log message ***
25551
25552 1993-09-14 David J. MacKenzie <djm@gnu.org>
25553
25554 * doc/bison.texinfo: *** empty log message ***
25555
25556 1993-09-13 Noah Friedman <friedman@gnu.org>
25557
25558 * Makefile.in: *** empty log message ***
25559
25560 1993-09-10 Richard Stallman <rms@gnu.org>
25561
25562 * src/conflicts.c: *** empty log message ***
25563
25564 * src/system.h: entered into RCS
25565
25566 1993-09-10 Richard Stallman <rms@gnu.org>
25567
25568 * doc/bison.1: entered into RCS
25569
25570 1993-09-06 Noah Friedman <friedman@gnu.org>
25571
25572 * src/version.c: entered into RCS
25573
25574 1993-09-06 Noah Friedman <friedman@gnu.org>
25575
25576 * Makefile.in: *** empty log message ***
25577
25578 1993-07-30 David J. MacKenzie <djm@gnu.org>
25579
25580 * Makefile.in: *** empty log message ***
25581
25582 1993-07-24 Richard Stallman <rms@gnu.org>
25583
25584 * src/bison.s1: *** empty log message ***
25585
25586 1993-07-24 Richard Stallman <rms@gnu.org>
25587
25588 * bison.simple: *** empty log message ***
25589
25590 1993-07-08 David J. MacKenzie <djm@gnu.org>
25591
25592 * Makefile.in: *** empty log message ***
25593
25594 1993-07-04 Richard Stallman <rms@gnu.org>
25595
25596 * src/bison.s1: *** empty log message ***
25597
25598 1993-07-04 Richard Stallman <rms@gnu.org>
25599
25600 * bison.simple: *** empty log message ***
25601
25602 1993-06-26 David J. MacKenzie <djm@gnu.org>
25603
25604 * src/getargs.c: entered into RCS
25605
25606 1993-06-26 David J. MacKenzie <djm@gnu.org>
25607
25608 * doc/bison.texinfo: *** empty log message ***
25609
25610 * doc/bison.1: New file.
25611
25612 1993-06-25 Richard Stallman <rms@gnu.org>
25613
25614 * src/getargs.c: New file.
25615
25616 1993-06-16 Richard Stallman <rms@gnu.org>
25617
25618 * src/bison.s1: *** empty log message ***
25619
25620 1993-06-16 Richard Stallman <rms@gnu.org>
25621
25622 * bison.simple: *** empty log message ***
25623
25624 1993-06-03 Richard Stallman <rms@gnu.org>
25625
25626 * src/bison.s1: New file.
25627
25628 1993-06-03 Richard Stallman <rms@gnu.org>
25629
25630 * doc/bison.texinfo: *** empty log message ***
25631
25632 1993-06-03 Richard Stallman <rms@gnu.org>
25633
25634 * bison.simple: New file.
25635
25636 1993-05-19 Richard Stallman <rms@gnu.org>
25637
25638 * doc/bison.texinfo: New file.
25639
25640 1993-05-07 Noah Friedman <friedman@gnu.org>
25641
25642 * Makefile.in: *** empty log message ***
25643
25644 1993-04-28 Noah Friedman <friedman@gnu.org>
25645
25646 * src/reader.c: *** empty log message ***
25647
25648 1993-04-23 Noah Friedman <friedman@gnu.org>
25649
25650 * src/alloc.h: entered into RCS
25651
25652 1993-04-20 David J. MacKenzie <djm@gnu.org>
25653
25654 * src/version.c: *** empty log message ***
25655
25656 * src/files.c, src/allocate.c:
25657 entered into RCS
25658
25659 * src/reader.c: *** empty log message ***
25660
25661 * src/lex.c: entered into RCS
25662
25663 * src/conflicts.c: New file.
25664
25665 * src/symtab.c: entered into RCS
25666
25667 * src/alloc.h: New file.
25668
25669 * src/LR0.c: entered into RCS
25670
25671 1993-04-18 Noah Friedman <friedman@gnu.org>
25672
25673 * src/reader.c: New file.
25674
25675 * src/version.c: *** empty log message ***
25676
25677 1993-04-18 Noah Friedman <friedman@gnu.org>
25678
25679 * Makefile.in: *** empty log message ***
25680
25681 1993-04-17 Noah Friedman <friedman@gnu.org>
25682
25683 * Makefile.in: *** empty log message ***
25684
25685 1993-04-15 Richard Stallman <rms@gnu.org>
25686
25687 * src/main.c, src/files.c:
25688 New file.
25689
25690 1993-04-15 Noah Friedman <friedman@gnu.org>
25691
25692 * configure.in: entered into RCS
25693
25694 * configure.in: *** empty log message ***
25695
25696 * configure.in: New file.
25697
25698 1993-04-14 Richard Stallman <rms@gnu.org>
25699
25700 * Makefile.in: New file.
25701
25702 1993-04-13 Richard Stallman <rms@gnu.org>
25703
25704 * src/version.c: New file.
25705
25706 1993-03-25 Richard Stallman <rms@gnu.org>
25707
25708 * src/output.c: entered into RCS
25709
25710 1992-09-25 Richard Stallman <rms@gnu.org>
25711
25712 * configure.bat: entered into RCS
25713
25714 1992-06-22 Richard Stallman <rms@gnu.org>
25715
25716 * src/vmsgetargs.c: entered into RCS
25717
25718 1992-06-22 Richard Stallman <rms@gnu.org>
25719
25720 * doc/bison.rnh: entered into RCS
25721
25722 1992-04-20 David J. MacKenzie <djm@gnu.org>
25723
25724 * README: entered into RCS
25725
25726 1992-01-22 Richard Stallman <rms@gnu.org>
25727
25728 * src/machine.h: entered into RCS
25729
25730 1991-12-21 Richard Stallman <rms@gnu.org>
25731
25732 * src/lalr.c, src/closure.c:
25733 entered into RCS
25734
25735 1991-12-20 Richard Stallman <rms@gnu.org>
25736
25737 * src/state.h: entered into RCS
25738
25739 1991-12-18 Richard Stallman <rms@gnu.org>
25740
25741 * src/print.c, src/nullable.c, src/derives.c:
25742 entered into RCS
25743
25744 1991-11-03 David J. MacKenzie <djm@gnu.org>
25745
25746 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
25747 entered into RCS
25748
25749 1988-09-09 Richard Stallman <rms@gnu.org>
25750
25751 * src/bison.hairy: entered into RCS
25752
25753 1987-12-16 Richard Stallman <rms@gnu.org>
25754
25755 * REFERENCES: entered into RCS
25756
25757
25758 -----
25759
25760 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
25761 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
25762 2008, 2009, 2010 Free Software Foundation, Inc.
25763
25764 Copying and distribution of this file, with or without
25765 modification, are permitted provided the copyright notice and this
25766 notice are preserved.